VPTissue Reference Manual
cell_split/AuxinGrowth.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 "AuxinGrowth.h"
21 
22 #include "bio/BoundaryType.h"
23 #include "bio/Cell.h"
24 
25 #include <cmath>
26 
27 namespace SimPT_Default {
28 namespace CellSplit {
29 
30 using namespace std;
31 using namespace boost::property_tree;
32 
34 {
35  Initialize(cd);
36 }
37 
39 {
40  m_cd = cd;
41  auto& p = m_cd.m_parameters;
42 
43  m_base_area = p->get<double>("cell_mechanics.base_area");
44  m_division_ratio = p->get<double>("cell_mechanics.division_ratio");
45  m_div_area = m_division_ratio * m_base_area;
46 }
47 
48 std::tuple<bool, bool, std::array<double, 3>> AuxinGrowth::operator()(Cell* cell)
49 {
50  bool must_divide = false;
51 
52  if (cell->GetBoundaryType() == BoundaryType::None) {
53  if (cell->GetArea() > m_div_area) {
54  cell->SetChemical(0, 0);
55  must_divide = true;
56  }
57  }
58 
59  return std::make_tuple(must_divide, false, std::array<double, 3>());
60 }
61 
62 } // namespace
63 } // namespace
AuxinGrowth(const CoreData &cd)
Initializing constructor.
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
std::tuple< bool, bool, std::array< double, 3 > > operator()(Cell *cell)
Execute.
Namespace for components of the Default model group.
void Initialize(const CoreData &cd)
Initialize or re-initialize.
Interface for Cell.
BoundaryType enumeration class.
CellSplit for AuxinGrowth model.
double GetArea() const
Return the area of the cell.
Definition: Cell.cpp:178