VPTissue Reference Manual
cell_chemistry/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/BoundaryType.h"
23 #include "bio/Cell.h"
24 #include "bio/CellAttributes.h"
25 #include "bio/ReduceCellWalls.h"
26 #include "bio/Wall.h"
27 #include "bio/WallAttributes.h"
28 #include "sim/CoreData.h"
29 
30 using namespace std;
31 using boost::property_tree::ptree;
32 
33 namespace SimPT_Default {
34 namespace CellChemistry {
35 
36 SmithPhyllotaxis::SmithPhyllotaxis(const CoreData& cd)
37 {
38  Initialize(cd);
39 }
40 
41 void SmithPhyllotaxis::Initialize(const CoreData& cd)
42 {
43  // Keep a reference to core data
44  m_cd = cd;
45 
46  // Assign parameters from core data to this model
47  const auto& p = m_cd.m_parameters->get_child("smith_phyllotaxis");
48  m_rho_IAA = p.get<double>("rho_IAA");
49  m_mu_IAA = p.get<double>("mu_IAA");
50  m_k_IAA = p.get<double>("k_IAA");
51  m_rho_PIN = p.get<double>("rho_PIN");
52  m_rho_PIN0 = p.get<double>("rho_PIN0");
53  m_mu_PIN = p.get<double>("mu_PIN");
54  m_k_PIN = p.get<double>("k_PIN");
55 }
56 
57 void SmithPhyllotaxis::operator()(Cell* cell, double* dchem)
58 {
59  const double IAA = cell->GetChemical(0);
60  const double PIN = cell->GetChemical(1);
61  const double dIAAdt = m_rho_IAA / (1.0 + m_k_IAA * IAA) - m_mu_IAA * IAA;
62  const double dPINdt = (m_rho_PIN0 + m_rho_PIN * IAA) / (1.0 + m_k_PIN * PIN) - m_mu_PIN * PIN;
63 
64  dchem[0] = dIAAdt;
65  dchem[1] = dPINdt;
66 }
67 
68 } // namespace
69 } // namespace
70 
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
Core data used during model execution.
Namespace for components of the Default model group.
Interface for Cell.
Interface for WallAttributes.
BoundaryType enumeration class.
Interface/Implementation for ReduceCellWalls.
CellChemistry for SmithPhyllotaxis model.
Interface for CellAttributes.
Interface for Wall.