VPTissue Reference Manual
cell_daughters/Wortel.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 "Wortel.h"
21 
22 #include "bio/Cell.h"
23 
24 namespace SimPT_Default {
25 namespace CellDaughters {
26 
28 {
29  Initialize(cd);
30 }
31 
33 {
34  m_cd = cd;
35 }
36 
37 void Wortel::operator()(Cell* daughter1, Cell* daughter2)
38 {
39  double const area1 = daughter1->GetArea();
40  double const area2 = daughter2->GetArea();
41  double const tot_area = area1 + area2;
42 
43  daughter1->SetChemical(0, daughter1->GetChemical(0) * (area1 / tot_area));
44  daughter2->SetChemical(0, daughter2->GetChemical(0) * (area2 / tot_area));
45  daughter1->SetChemical(1, daughter1->GetChemical(1) * (area1 / tot_area));
46  daughter2->SetChemical(1, daughter2->GetChemical(1) * (area2 / tot_area));
47  daughter1->SetChemical(2, daughter1->GetChemical(2) * (area1 / tot_area));
48  daughter2->SetChemical(2, daughter2->GetChemical(2) * (area2 / tot_area));
49  daughter1->SetChemical(3, daughter1->GetChemical(3) * (area1 / tot_area));
50  daughter2->SetChemical(3, daughter2->GetChemical(3) * (area2 / tot_area));
51  daughter1->SetChemical(4, daughter1->GetChemical(4) * (area1 / tot_area));
52  daughter2->SetChemical(4, daughter2->GetChemical(4) * (area2 / tot_area));
53  daughter1->SetChemical(5, daughter1->GetChemical(5) * (area1 / tot_area));
54  daughter2->SetChemical(5, daughter2->GetChemical(5) * (area2 / tot_area));
55  daughter1->SetChemical(6, daughter1->GetChemical(6) * (area1 / tot_area));
56  daughter2->SetChemical(6, daughter2->GetChemical(6) * (area2 / tot_area));
57  daughter1->SetChemical(7, daughter1->GetChemical(7) * (area1 / tot_area));
58  daughter2->SetChemical(7, daughter2->GetChemical(7) * (area2 / tot_area));
59  daughter1->SetChemical(8, daughter1->GetChemical(8) * (area1 / tot_area));
60  daughter2->SetChemical(8, daughter2->GetChemical(8) * (area2 / tot_area));
61 
62  daughter1->SetTransporters(1, 1., 1.);
63  daughter2->SetTransporters(1, 1., 1.);
64 }
65 
66 } // namespace
67 } // namespace
Core data with mesh, parameters, random engine and time data.
Definition: CoreData.h:38
A cell contains walls and nodes.
Definition: Cell.h:48
void operator()(Cell *daughter1, Cell *daughter2)
Execute.
Wortel(const CoreData &cd)
Initializing constructor.
Namespace for components of the Default model group.
Interface for Cell.
void Initialize(const CoreData &cd)
Initialize or re-initialize.
CellDaughters for Wortel model.
double GetArea() const
Return the area of the cell.
Definition: Cell.cpp:178