VPTissue Reference Manual
cell_chemistry/Source.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 "Source.h"
21 
22 #include "bio/Cell.h"
23 
24 
25 namespace SimPT_Default {
26 namespace CellChemistry {
27 
28 using namespace std;
29 using boost::property_tree::ptree;
30 
32 {
33  Initialize(cd);
34 }
35 
37 {
38  m_cd = cd;
39  const auto& p = m_cd.m_parameters->get_child("auxin_transport");
40 
41  m_tip_source = p.get<double>("leaf_tip_source");
42 }
43 
44 void Source::operator()(Cell* cell, double* dchem)
45 {
46  if (cell->GetCellType() == 1) {
47  dchem[0] = m_tip_source;
48  }
49 }
50 
51 } // namespace
52 } // 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
void operator()(Cell *cell, double *dchem)
Execute.
Namespace for components of the Default model group.
Interface for Cell.
CellChemistry for Source model.
void Initialize(const CoreData &cd)
Initialize or re-initialize.
Source(const CoreData &cd)
Initializing constructor.