Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F71395319
dissolver.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
Thu, Jul 11, 12:01
Size
1 KB
Mime Type
text/x-c++
Expires
Sat, Jul 13, 12:01 (1 d, 21 h)
Engine
blob
Format
Raw Data
Handle
18941721
Attached To
rSPECMICP SpecMiCP / ReactMiCP
dissolver.hpp
View Options
#ifndef SPECMICP_SPECMICP_PROBLEMSOLVER_DISSOLVER_HPP
#define SPECMICP_SPECMICP_PROBLEMSOLVER_DISSOLVER_HPP
#include "common.hpp"
#include "database.hpp"
#include "physics/units.hpp"
namespace
specmicp
{
class
Formulation
;
//! \brief Return the total concentration of a given formulation
class
Dissolver
:
public
units
::
UnitBaseClass
{
public
:
Dissolver
(
RawDatabasePtr
the_database
)
:
m_database
(
the_database
),
m_database_hl
(
m_database
),
m_total_concentration
(
the_database
->
nb_component
),
m_components_to_keep
(
the_database
->
nb_component
)
{
m_total_concentration
.
setZero
();
}
//! \brief Dissolve the problem into the components
//!
//! Also simplify the database
Vector
dissolve
(
const
Formulation
&
the_problem
);
//! \brief Return the total concentration vector
Vector
get_total_concentration
()
{
return
m_total_concentration
;}
private
:
void
set_solvent
(
scalar_t
amount
);
void
dissolve_aqueous
(
std
::
string
label
,
scalar_t
concentration
,
scalar_t
mass_solution
);
void
dissolve_mineral
(
std
::
string
label
,
scalar_t
amount
);
void
keep_extra_components
(
const
std
::
vector
<
std
::
string
>&
list_component_to_keep
);
void
reduce_problem
();
private
:
RawDatabasePtr
m_database
;
Database
m_database_hl
;
Vector
m_total_concentration
;
std
::
vector
<
bool
>
m_components_to_keep
;
};
}
// end namespace specmicp
#endif
//SPECMICP_SPECMICP_PROBLEMSOLVER_DISSOLVER_HPP
Event Timeline
Log In to Comment