VPTissue Reference Manual
cell_housekeep/Blad.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 "Blad.h"
21 
22 #include "bio/BoundaryType.h"
23 #include "bio/Cell.h"
24 #include "bio/Mesh.h"
25 
26 namespace SimPT_Blad {
27 namespace CellHousekeep {
28 
29 using boost::property_tree::ptree;
30 
31 Blad::Blad(const CoreData& cd)
32 {
33  Initialize(cd);
34 }
35 
36 void Blad::Initialize(const CoreData& cd)
37 {
38  m_cd = cd;
39 
40  const auto& p = m_cd.m_parameters->get_child("blad");
41  m_M_threshold_expansion = p.get<double>("M_threshold_expansion");
42  m_relative_growth = p.get<double>("relative_growth");
43 }
44 
46 {
47  const double chem1 = cell->GetChemical(1);
48  const double t_area = cell->GetTargetArea();
49  const double a_area = cell->GetArea();
50 
51  if (cell->GetBoundaryType() == BoundaryType::None) {
52  if ( ( chem1 / a_area ) > m_M_threshold_expansion ) {
53  const double incr = m_relative_growth * a_area; //This is for 240 minutes time step!
54  const double update_t_area = t_area + incr;
55  cell->SetTargetArea(update_t_area);
56  }
57  }
58 }
59 
60 } // namespace
61 } // namespace
Namespace for components of the Blad model group.
Core data with mesh, parameters, random engine and time data.
Definition: CoreData.h:38
A cell contains walls and nodes.
Definition: Cell.h:48
Blad(const CoreData &cd)
Initializing constructor.
void operator()(Cell *cell)
Execute.
void Initialize(const CoreData &cd)
Initialize or re-initialize.
Interface for Cell.
BoundaryType enumeration class.
CellHousekeep for Blad model.
double GetArea() const
Return the area of the cell.
Definition: Cell.cpp:178
Interface for Mesh.