VPTissue Reference Manual
cell_chemistry/Meinhardt.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 "Meinhardt.h"
21 
22 #include "bio/Cell.h"
23 
24 
25 using namespace std;
26 using boost::property_tree::ptree;
27 
28 namespace SimPT_Default {
29 namespace CellChemistry {
30 
31 Meinhardt::Meinhardt(const CoreData& cd)
32 {
33  Initialize(cd);
34 }
35 
36 void Meinhardt::Initialize(const CoreData& cd)
37 {
38  m_cd = cd;
39  const auto& p = m_cd.m_parameters->get_child("meinhardt");
40 
41  m_c = p.get<double>("c");
42  m_c0 = p.get<double>("c0");
43  m_d = p.get<double>("d");
44  m_e = p.get<double>("e");
45  m_eps = p.get<double>("eps");
46  m_f = p.get<double>("f");
47  m_gamma = p.get<double>("gamma");
48  m_mu = p.get<double>("mu");
49  m_nu = p.get<double>("nu");
50  m_rho0 = p.get<double>("rho0");
51  m_rho1 = p.get<double>("rho1");
52 }
53 
54 void Meinhardt::operator()(Cell* cell, double* dchem)
55 {
56  double const Y = cell->GetChemical(0);
57  double const A = cell->GetChemical(1);
58  double const H = cell->GetChemical(2);
59  double const S = cell->GetChemical(3);
60 
61  dchem[0] = (m_d * A - m_e * Y + Y * Y / (1 + m_f * Y * Y));
62  dchem[1] = (m_c * A * A * S / H - m_mu * A + m_rho0 * Y);
63  dchem[2] = (m_c * A * A * S - m_nu * H + m_rho1 * Y);
64  dchem[3] = (m_c0 - m_gamma * S - m_eps * Y * S);
65 }
66 
67 } // namespace
68 } // namespace
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.
CellChemistry for Meinhardt model.