VPTissue Reference Manual
AuxinPIN1.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 "AuxinPIN1.h"
21 
22 #include "bio/Cell.h"
23 
24 #include <boost/property_tree/ptree.hpp>
25 
26 namespace SimPT_Default {
27 namespace CellColor {
28 
29 using boost::property_tree::ptree;
30 using SimPT_Sim::Cell;
31 
32 AuxinPIN1::AuxinPIN1(const ptree& )
33 {
34 }
35 
36 std::array<double, 3> AuxinPIN1::operator()(Cell* cell)
37 {
38  const double c0 = (cell->GetChemicals().size() >= 2) ? cell->GetChemical(0): 0.0;
39  const double c1 = (cell->GetChemicals().size() >= 2) ? cell->GetChemical(1): 0.0;
40  return {{c1 / (1.0 + c1), c0 / (1.0 + c0), 0.0}};
41 }
42 
43 } // namespace
44 } // namespace
45 
AuxinPIN1(const boost::property_tree::ptree &pt)
Straight initialization.
Definition: AuxinPIN1.cpp:32
A cell contains walls and nodes.
Definition: Cell.h:48
Header for AuxinPIN1 colorizer.
Namespace for components of the Default model group.
std::array< double, 3 > operator()(SimPT_Sim::Cell *cell)
Return color value.
Definition: AuxinPIN1.cpp:36
Interface for Cell.