27 #include <boost/property_tree/ptree.hpp>
30 using boost::property_tree::ptree;
33 namespace CellChemistry {
40 void WrapperModel::Initialize(
const CoreData& cd)
43 const auto& p = m_cd.m_parameters->get_child(
"wrapper_model");
45 m_ch0_production = p.get<
double>(
"ch0_production");
46 m_ch0_breakdown = p.get<
double>(
"ch0_breakdown");
47 m_ch1_production = p.get<
double>(
"ch1_production");
48 m_ch1_breakdown = p.get<
double>(
"ch1_breakdown");
51 void WrapperModel::operator()(
Cell* cell,
double* dchem)
56 const double chem0 = cell->GetChemical(0);
57 const double chem1 = cell->GetChemical(1);
58 const double a_area = cell->
GetArea();
60 dchem[0] = m_ch0_production * a_area - m_ch0_breakdown * chem0;
61 dchem[1] = m_ch1_production * a_area - m_ch1_breakdown * chem1;
Core data with mesh, parameters, random engine and time data.
A cell contains walls and nodes.
Core data used during model execution.
Namespace for components of the Default model group.
CellChemistry for the Wrapper model.
BoundaryType enumeration class.
int GetIndex() const
Return the index.
Interface/Implementation for ReduceCellWalls.
double GetArea() const
Return the area of the cell.