VPTissue Reference Manual
cell_daughters/WrapperModel.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 "WrapperModel.h"
21 
22 #include "bio/Cell.h"
23 #include "sim/CoreData.h"
24 
25 #include <boost/property_tree/ptree.hpp>
26 
27 namespace SimPT_Default {
28 namespace CellDaughters {
29 
30 using namespace std;
31 using boost::property_tree::ptree;
32 
34 {
35  Initialize(cd);
36 }
37 
39 {
40  m_cd = cd;
41 }
42 
43 void WrapperModel::operator()(Cell* daughter1, Cell* daughter2)
44 {
45 
46  double const area1 = daughter1->GetArea();
47  double const area2 = daughter2->GetArea();
48  double const tot_area = area1 + area2;
49 
50  daughter1->SetChemical(0, daughter1->GetChemical(0) * (area1 / tot_area));
51  daughter2->SetChemical(0, daughter2->GetChemical(0) * (area2 / tot_area));
52  daughter1->SetChemical(1, daughter1->GetChemical(1) * (area1 / tot_area));
53  daughter2->SetChemical(1, daughter2->GetChemical(1) * (area2 / tot_area));
54 
55 // daughter1->SetTransporters(1, 1., 1.);
56 // daughter2->SetTransporters(1, 1., 1.);
57 }
58 
59 } // namespace
60 } // 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
Core data used during model execution.
Namespace for components of the Default model group.
Interface for Cell.
void operator()(Cell *daughter1, Cell *daughter2)
Execute.
CellDaughter component for Wrapper model.
void Initialize(const CoreData &cd)
Initialize or re-initialize.
WrapperModel(const CoreData &cd)
Initializing constructor.
double GetArea() const
Return the area of the cell.
Definition: Cell.cpp:178