Page MenuHomec4science

init_variables.hpp
No OneTemporary

File Metadata

Created
Wed, May 22, 11:43

init_variables.hpp

#ifndef SPECMICP_REACTMICP_SYSTEMS_SATURATED_INITVARIABLES_HPP
#define SPECMICP_REACTMICP_SYSTEMS_SATURATED_INITVARIABLES_HPP
#include "variablesfwd.hpp"
#include "dfpm/meshes/mesh1dfwd.hpp"
#include "database.hpp"
#include "specmicp/adimensional/adimensional_system_solution.hpp"
namespace specmicp {
namespace reactmicp {
namespace systems {
namespace satdiff {
//! \brief Initialize an instance of Saturated Variables
class SaturatedVariablesFactory
{
public:
SaturatedVariablesFactory(
mesh::Mesh1DPtr the_mesh,
RawDatabasePtr the_database,
units::UnitsSet the_units,
const std::vector<index_t>& list_fixed_nodes,
const std::vector<AdimensionalSystemSolution>& list_initial_states,
const std::vector<int>& index_initial_state
);
//! \brief Initialize the main vectors
void init_size();
//! \brief Initialize the BC
void set_fixed_nodes(const std::vector<index_t>& list_fixed_nodes);
//! \brief Initialize the chemistry informations
void init_chemistry(
units::UnitsSet the_units,
const std::vector<int>& index_initial_state,
const std::vector<AdimensionalSystemSolution>& list_initial_states);
//! \brief Return the variables
SaturatedVariablesPtr get_variable() {return m_variable;}
private:
SaturatedVariablesPtr m_variable;
RawDatabasePtr m_database;
index_t nb_component;
index_t nb_nodes;
};
//! \brief Initialise an instance of SaturatedVariables
inline SaturatedVariablesPtr init_variables(
mesh::Mesh1DPtr the_mesh,
RawDatabasePtr the_database,
units::UnitsSet the_units,
const std::vector<index_t>& list_fixed_nodes,
const std::vector<AdimensionalSystemSolution>& list_initial_states,
const std::vector<int>& index_initial_state
)
{
SaturatedVariablesFactory factory(the_mesh, the_database, the_units,
list_fixed_nodes,
list_initial_states, index_initial_state);
return factory.get_variable();
}
} // end namespace satdiff
} // end namespace systems
} // end namespace reactmicp
} // end namespace specmicp
#endif // SPECMICP_REACTMICP_SYSTEMS_SATURATED_INITVARIABLES_HPP

Event Timeline