VPTissue Reference Manual
cell_daughters/SmithPhyllotaxis.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 "SmithPhyllotaxis.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 
36 {
37  m_cd = cd;
38 }
39 
40 void SmithPhyllotaxis::operator()(Cell* daughter, Cell* mother)
41 {
42  // IAA (chem_0) is concentration based so daughter inherits mother's
43  // concentration which is already the default behaviour in
44  // CellDivider::DivideOverAxis().
45 
46  // PIN (chem_1) distributes over mother and daughter proportional to area
47  // hence we scale the default distribution according to relative areas.
48  const double area_dtr = daughter->GetArea();
49  const double area_mtr = mother->GetArea();
50  const double area_tot = area_dtr + area_mtr;
51  mother->SetChemical(1, mother->GetChemical(1) * (area_mtr / area_tot));
52  daughter->SetChemical(1, daughter->GetChemical(1) * (area_dtr / area_tot));
53 }
54 
55 } // namespace
56 } // namespace
57 
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
Namespace for components of the Default model group.
Interface for Cell.
CellDaughters::SmithPhyllotaxis header file.
SmithPhyllotaxis(const CoreData &cd)
Initializing constructor.
void Initialize(const CoreData &cd)
Initialize or re-initialize.
void operator()(Cell *daughter1, Cell *daughter2)
Execute.
double GetArea() const
Return the area of the cell.
Definition: Cell.cpp:178