VPTissue Reference Manual
cell_daughters/Blad.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 "Blad.h"
21 
22 #include "bio/Cell.h"
23 
24 namespace SimPT_Blad {
25 namespace CellDaughters {
26 
27 Blad::Blad(const CoreData& cd)
28 {
29  Initialize(cd);
30 }
31 
32 void Blad::Initialize(const CoreData& cd)
33 {
34  m_cd = cd;
35 }
36 
37 void Blad::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 
48  daughter1->SetTransporters(1, 1., 1.);
49  daughter2->SetTransporters(1, 1., 1.);
50 }
51 
52 } // namespace
53 } // namespace
Namespace for components of the Blad model group.
void Initialize(const CoreData &cd)
Initialize or re-initialize.
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.
Interface for Cell.
Blad(const CoreData &cd)
Initializing constructor.
CellDaughters component of Blad model.
double GetArea() const
Return the area of the cell.
Definition: Cell.cpp:178