VPTissue Reference Manual
Plain.cpp
Go to the documentation of this file.
1 /*
2  * Copyright 2011-2016 Universiteit Antwerpen
3  *
4  * Licensed under the EUPL, Version 1.1 or as soon they will be approved by
5  * the European Commission - subsequent versions of the EUPL (the "Licence");
6  * You may not use this work except in compliance with the Licence.
7  * You may obtain a copy of the Licence at: http://ec.europa.eu/idabc/eupl5
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the Licence is distributed on an "AS IS" basis,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the Licence for the specific language governing
13  * permissions and limitations under the Licence.
14  */
20 #include "Plain.h"
21 
22 #include "bio/Cell.h"
23 #include "bio/Wall.h"
24 
25 namespace SimPT_Default {
26 namespace CellToCellTransport {
27 
28 using namespace std;
29 using namespace boost::property_tree;
30 
32 {
33  Initialize(cd);
34 }
35 
36 void Plain::Initialize(const CoreData& cd)
37 {
38  m_cd = cd;
39  auto& p = m_cd.m_parameters;
40 
41  boost::optional<ptree&> array = p->get_child_optional("auxin_transport.D.value_array");
42  if (array) {
43  m_cct_factor = array->begin()->second.get_value<double>();
44  }
45 }
46 
47 void Plain::operator()(Wall* w, double* dchem_c1, double* dchem_c2)
48 {
49  double const phi = w->GetLength() * m_cct_factor
50  * (w->GetC2()->GetChemical(0) - w->GetC1()->GetChemical(0));
51  dchem_c1[0] += phi;
52  dchem_c2[0] -= phi;
53 }
54 
55 } // namespace
56 } // namespace
Core data with mesh, parameters, random engine and time data.
Definition: CoreData.h:38
STL namespace.
Plain(const CoreData &cd)
Initializing constructor.
Definition: Plain.cpp:31
void Initialize(const CoreData &cd)
Initialize or re-initialize.
Definition: Plain.cpp:36
Namespace for components of the Default model group.
Interface for Cell.
double GetLength() const
Returns (and calculates, if length marked as dirty) the length along all nodes.
Definition: Wall.cpp:97
void operator()(Wall *w, double *dchem_c1, double *dchem_c2)
Execute.
Definition: Plain.cpp:47
A cell wall, runs between cell corner points and consists of wall elements.
Definition: Wall.h:48
CellToCellTransport Plain model.
Interface for Wall.