22 #include "../ComponentFactory.h"
27 #include <boost/property_tree/ptree.hpp>
30 namespace CellToCellTransport {
46 auto& p = m_cd.m_parameters;
47 m_chemical_count = p->get<
unsigned int>(
"model.cell_chemical_count");
50 ptree
const& arr_D = p->get_child(
"auxin_transport.D.value_array");
52 for (
auto it = arr_D.begin(); it != arr_D.end(); it++) {
53 if (c == m_chemical_count) {
56 m_D.push_back(it->second.get_value<
double>());
60 for (
unsigned int i = c; i < m_chemical_count; i++) {
64 m_has_boundary_condition =
false;
67 m_has_boundary_condition =
true;
69 if (m_boundary_condition ==
nullptr) {
70 throw runtime_error(
"TestCoupling::Initialize> nullptr for cell2cell_transport boundary codition.");
78 if ( !(w->GetC1()->IsBoundaryPolygon()) && !(w->GetC2()->IsBoundaryPolygon()) ) {
79 const double apoplast_thickness = 1.;
81 const double phi = (w->
GetLength() / apoplast_thickness) * m_D[0]
82 * ( ( w->GetC2()->GetChemical(0) / (w->GetC2()->
GetArea()) )
83 - ( w->GetC1()->GetChemical(0) / (w->GetC1()->
GetArea()) ) );
89 const double phi2 = (w->
GetLength() / apoplast_thickness) * m_D[1]
90 * ( ( w->GetC2()->GetChemical(1) / (w->GetC2()->
GetArea()) )
91 - ( w->GetC1()->GetChemical(1) / (w->GetC1()->
GetArea()) ) );
96 if (m_has_boundary_condition) {
97 m_boundary_condition(w, dchem_c1, dchem_c2);
Core data with mesh, parameters, random engine and time data.
Namespace for miscellaneous utilities.
CellToCellTransport component for the TestCoupling model.
Namespace for components of the Default model group.
Namespace for the core simulator.
TestCoupling(const CoreData &cd)
Initializing constructor.
void operator()(Wall *w, double *dchem_c1, double *dchem_c2)
Execute.
Primary template never gets instantiated.
static CellToCellTransportBoundaryComponent CreateCellToCellTransportBoundary(const CoreData &cd)
Create CellToCellTransportBoundaryFunction (internal use).
double GetLength() const
Returns (and calculates, if length marked as dirty) the length along all nodes.
void Initialize(const CoreData &cd)
Initialize or re-initialize.
double GetArea() const
Return the area of the cell.
A cell wall, runs between cell corner points and consists of wall elements.