VPTissue Reference Manual
cell_daughters/Auxin.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 "Auxin.h"
21 
22 #include "bio/Cell.h"
23 
24 namespace SimPT_Default {
25 namespace CellDaughters {
26 
27 using namespace std;
28 using namespace boost::property_tree;
29 
31 {
32  Initialize(cd);
33 }
34 
35 void Auxin::Initialize(const CoreData& cd)
36 {
37  m_cd = cd;
38  auto& p = m_cd.m_parameters;
39 
40  ptree const& arr_initval = p->get_child("auxin_transport.initval.value_array");
41  m_x_initval = (++arr_initval.begin())->second.get_value<double>();
42 }
43 
44 void Auxin::operator()(Cell* daughter1, Cell* daughter2)
45 {
46  const double area1 = daughter1->GetArea();
47  const double area2 = daughter2->GetArea();
48  const double tot_area = area1 + area2;
49 
50  // Auxin distributes between parent and daughter according to area
51  daughter1->SetChemical(0, daughter1->GetChemical(0) * (area1 / tot_area));
52  daughter2->SetChemical(0, daughter2->GetChemical(0) * (area2 / tot_area));
53 
54  // After divisions, parent and daughter cells get a standard stock of PINs.
55  daughter1->SetChemical(1, m_x_initval);
56  daughter2->SetChemical(1, m_x_initval);
57 }
58 
59 } // namespace
60 } // namespace
void Initialize(const CoreData &cd)
Initialize or re-initialize.
Core data with mesh, parameters, random engine and time data.
Definition: CoreData.h:38
STL namespace.
A cell contains walls and nodes.
Definition: Cell.h:48
Interface for CellDaughters::Auxin.
Auxin(const CoreData &cd)
Initializing constructor.
Namespace for components of the Default model group.
Interface for Cell.
void operator()(Cell *daughter1, Cell *daughter2)
Execute.
double GetArea() const
Return the area of the cell.
Definition: Cell.cpp:178