hemocell
Loading...
Searching...
No Matches
cellInfo.h
Go to the documentation of this file.
1/*
2This file is part of the HemoCell library
3
4HemoCell is developed and maintained by the Computational Science Lab
5in the University of Amsterdam. Any questions or remarks regarding this library
6can be sent to: info@hemocell.eu
7
8When using the HemoCell library in scientific work please cite the
9corresponding paper: https://doi.org/10.3389/fphys.2017.00563
10
11The HemoCell library is free software: you can redistribute it and/or
12modify it under the terms of the GNU Affero General Public License as
13published by the Free Software Foundation, either version 3 of the
14License, or (at your option) any later version.
15
16The library is distributed in the hope that it will be useful,
17but WITHOUT ANY WARRANTY; without even the implied warranty of
18MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19GNU Affero General Public License for more details.
20
21You should have received a copy of the GNU Affero General Public License
22along with this program. If not, see <http://www.gnu.org/licenses/>.
23*/
24#ifndef CELLINFORMATION_H
25#define CELLINFORMATION_H
26
27#include "hemocell.h"
28#include "hemoCellFunctional.h"
29#include "array.h"
30
31/* THIS CLASS IS NOT THREAD SAFE!*/
32/* Calculate and store Cell-Specific Information
33 *
34 * call the static members for the information you need
35 * (eg. CellInformationFunctionals::getCellVolume(hemocell))
36 * then the information will be available in the map:
37 * CellInformationFunctionals::info_per_cell
38 * Clean the old cell results afterwards with
39 * CellInformationFunctionals::clear_list()
40 *
41 */
42namespace hemo {
43
56
58 // Legacy interface, remove at some point
60
62 void processGenericBlocks(plb::Box3D, std::vector<plb::AtomicBlock3D*>);
63 CellVolume * clone() const;
64 };
66 void processGenericBlocks(plb::Box3D, std::vector<plb::AtomicBlock3D*>);
67 CellArea * clone() const;
68 };
70 void processGenericBlocks(plb::Box3D, std::vector<plb::AtomicBlock3D*>);
71 CellPosition * clone() const;
72 };
74 void processGenericBlocks(plb::Box3D, std::vector<plb::AtomicBlock3D*>);
75 CellStretch * clone() const;
76 };
78 void processGenericBlocks(plb::Box3D, std::vector<plb::AtomicBlock3D*>);
79 CellBoundingBox * clone() const;
80 };
82 void processGenericBlocks(plb::Box3D, std::vector<plb::AtomicBlock3D*>);
83 CellAtomicBlock * clone() const;
84 };
86 void processGenericBlocks(plb::Box3D, std::vector<plb::AtomicBlock3D*>);
87 CellType * clone() const;
88 };
89 //end legacy interface
90
93 map<int,CellInformation> & info_per_cell;
94 public:
95 allCellInformation(HemoCell * hemocell_, map<int,CellInformation> & info_per_cell_) :
96 hemocell(hemocell_), info_per_cell(info_per_cell_) {}
97 private:
98 void processGenericBlocks(plb::Box3D, std::vector<plb::AtomicBlock3D*>);
99 allCellInformation * clone() const;
100 };
101
102
103public:
104 // Legacy interface, should become private at some point.
105 static map<int,CellInformation> info_per_cell;
106 static void clear_list();
107 static void calculate_vol_pos_area(HemoCell *); /*This excludes Stretch, since it is compute intensive!*/
108 static void calculateCellVolume(HemoCell *);
109 static void calculateCellArea(HemoCell *);
110 static void calculateCellPosition(HemoCell *);
111 static void calculateCellStretch(HemoCell *);
112 static void calculateCellBoundingBox(HemoCell *);
113 static void calculateCellAtomicBlock(HemoCell *);
114 static void calculateCellType(HemoCell *);
116
117 //Interface that should be used, less error prone at the cost of some extra computation and memory usage
119 static pluint getNumberOfCellsFromType(HemoCell *, string type);
121 static void calculateCellInformation(HemoCell *, map<int, CellInformation> &);
122
123};
124}
125#endif
void processGenericBlocks(plb::Box3D, std::vector< plb::AtomicBlock3D * >)
Definition cellInfo.cpp:64
CellArea * clone() const
Definition cellInfo.cpp:380
void processGenericBlocks(plb::Box3D, std::vector< plb::AtomicBlock3D * >)
Definition cellInfo.cpp:151
CellAtomicBlock * clone() const
Definition cellInfo.cpp:384
CellBoundingBox * clone() const
Definition cellInfo.cpp:383
void processGenericBlocks(plb::Box3D, std::vector< plb::AtomicBlock3D * >)
Definition cellInfo.cpp:122
CellPosition * clone() const
Definition cellInfo.cpp:381
void processGenericBlocks(plb::Box3D, std::vector< plb::AtomicBlock3D * >)
Definition cellInfo.cpp:82
void processGenericBlocks(plb::Box3D, std::vector< plb::AtomicBlock3D * >)
Definition cellInfo.cpp:103
CellStretch * clone() const
Definition cellInfo.cpp:382
void processGenericBlocks(plb::Box3D, std::vector< plb::AtomicBlock3D * >)
Definition cellInfo.cpp:160
CellType * clone() const
Definition cellInfo.cpp:385
void processGenericBlocks(plb::Box3D, std::vector< plb::AtomicBlock3D * >)
Definition cellInfo.cpp:39
CellVolume * clone() const
Definition cellInfo.cpp:379
map< int, CellInformation > & info_per_cell
Definition cellInfo.h:93
void processGenericBlocks(plb::Box3D, std::vector< plb::AtomicBlock3D * >)
Definition cellInfo.cpp:170
allCellInformation * clone() const
Definition cellInfo.cpp:386
allCellInformation(HemoCell *hemocell_, map< int, CellInformation > &info_per_cell_)
Definition cellInfo.h:95
HemoCell * hemocell
Definition cellInfo.h:92
Definition cellInfo.h:57
static pluint getTotalNumberOfCells(HemoCell *)
Definition cellInfo.cpp:324
static void calculate_vol_pos_area(HemoCell *)
Definition cellInfo.cpp:33
static void calculateCellAtomicBlock(HemoCell *)
Definition cellInfo.cpp:308
static void calculateCellVolume(HemoCell *)
Definition cellInfo.cpp:268
static map< int, CellInformation > info_per_cell
Definition cellInfo.h:105
static pluint getNumberOfCellsFromType(HemoCell *, string type)
Definition cellInfo.cpp:344
static HemoCell * hemocell
Definition cellInfo.h:59
static void calculateCellInformation(HemoCell *, map< int, CellInformation > &)
Calculate all possible macroscopic information and return it within the reference.
Definition cellInfo.cpp:367
static void calculateCellStretch(HemoCell *)
Definition cellInfo.cpp:292
static void clear_list()
Definition cellInfo.cpp:30
static void calculateCellPosition(HemoCell *)
Definition cellInfo.cpp:284
static void calculateCellArea(HemoCell *)
Definition cellInfo.cpp:276
static void calculateCellType(HemoCell *)
Definition cellInfo.cpp:316
static void calculateCellVelocity(HemoCell *)
static void calculateCellBoundingBox(HemoCell *)
Definition cellInfo.cpp:300
Definition hemoCellFunctional.h:36
Definition hemocell.h:68
double T
Definition constant_defaults.h:118
long unsigned int pluint
Definition constant_defaults.h:130
Definition config.cpp:34
Definition array.h:39
Definition cellInfo.h:44
T area
Definition cellInfo.h:48
T volume
Definition cellInfo.h:47
pluint cellType
Definition cellInfo.h:52
hemo::Array< T, 3 > velocity
Definition cellInfo.h:46
pluint blockId
Definition cellInfo.h:51
hemo::Array< T, 3 > position
Definition cellInfo.h:45
bool centerLocal
Definition cellInfo.h:53
int base_cell_id
Definition cellInfo.h:54
T stretch
Definition cellInfo.h:49
hemo::Array< T, 6 > bbox
Definition cellInfo.h:50