Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F67828158
adimensional_system_pcfm.hpp
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Mon, Jun 24, 14:13
Size
1 KB
Mime Type
text/x-c++
Expires
Wed, Jun 26, 14:13 (2 d)
Engine
blob
Format
Raw Data
Handle
18477780
Attached To
rSPECMICP SpecMiCP / ReactMiCP
adimensional_system_pcfm.hpp
View Options
#ifndef SPECMICP_ADIMENSIONALSYSTEM_PCFM_HPP
#define SPECMICP_ADIMENSIONALSYSTEM_PCFM_HPP
#include "database.hpp"
#include "adimensional_system_pcfm_structs.hpp"
#include "utils/options_handler.hpp"
//! \file adimensional_system_pcfm.hpp The positive continuous fraction method
namespace specmicp {
// forward declaration
class AdimensionalSystem;
//! \brief The positive continuous fraction method
//!
//! It is particularly well adapted for aqueous only systems
//!
//! References :
//! - Carrayrou (2002)
class AdimensionalSystemPCFM:
public OptionsHandler<PCFMOptions>
{
public:
AdimensionalSystemPCFM(std::shared_ptr<AdimensionalSystem> program);
AdimensionalSystemPCFM(
std::shared_ptr<AdimensionalSystem> program,
const PCFMOptions& options);
PCFMReturnCode solve(Vector& x);
//! \brief Run one iteration of the PCFM method
void one_iteration(Vector& x);
//! \brief Run the PCFM method for one component
void solve_component(index_t component, Vector& x);
//! \brief Run the PCFM method for the surface equation
void solve_surface(Vector& x);
private:
RawDatabasePtr m_data;
std::shared_ptr<AdimensionalSystem> m_program;
Vector m_errors;
};
//! \brief Initialize a system using the positive continuous fraction method
//!
//! \sa AdimensionalSystemPCFM
inline PCFMReturnCode positive_continuous_fraction_method(
std::shared_ptr<AdimensionalSystem> program,
Vector& x
)
{
return AdimensionalSystemPCFM(program).solve(x);
}
} // end namespace specmicp
#endif // SPECMICP_ADIMENSIONALSYSTEM_PCFM_HPP
Event Timeline
Log In to Comment