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
59 public:
60 explicit CellVolume(HemoCell * hemocell_) : hemocell(hemocell_) {}
61
62 private:
63 void processGenericBlocks(plb::Box3D, std::vector<plb::AtomicBlock3D *>);
64 CellVolume * clone() const;
66 };
68 public:
69 explicit CellArea(HemoCell * hemocell_) : hemocell(hemocell_) {}
70
71 private:
72 void processGenericBlocks(plb::Box3D, std::vector<plb::AtomicBlock3D *>);
73 CellArea * clone() const;
75 };
77 void processGenericBlocks(plb::Box3D, std::vector<plb::AtomicBlock3D *>);
78 CellPosition * clone() const;
79 };
81 void processGenericBlocks(plb::Box3D, std::vector<plb::AtomicBlock3D *>);
82 CellStretch * clone() const;
83 };
85 void processGenericBlocks(plb::Box3D, std::vector<plb::AtomicBlock3D *>);
86 CellBoundingBox * clone() const;
87 };
89 void processGenericBlocks(plb::Box3D, std::vector<plb::AtomicBlock3D *>);
90 CellAtomicBlock * clone() const;
91 };
93 void processGenericBlocks(plb::Box3D, std::vector<plb::AtomicBlock3D *>);
94 CellType * clone() const;
95 };
96 //end legacy interface
97
100 std::map<plint, CellInformation> & info_per_cell;
101
102 public:
103 allCellInformation(HemoCell * hemocell_, std::map<plint, CellInformation> & info_per_cell_)
104 : hemocell(hemocell_), info_per_cell(info_per_cell_) {}
105
106 private:
107 void processGenericBlocks(plb::Box3D, std::vector<plb::AtomicBlock3D *>);
108 allCellInformation * clone() const;
109 };
110
111
112public:
113 // Legacy interface, should become private at some point.
114 static std::map<plint, CellInformation> info_per_cell;
115 static void clear_list();
116 static void calculate_vol_pos_area(HemoCell *); /*This excludes Stretch, since it is compute intensive!*/
117 static void calculateCellVolume(HemoCell *);
118 static void calculateCellArea(HemoCell *);
119 static void calculateCellPosition(HemoCell *);
120 static void calculateCellStretch(HemoCell *);
121 static void calculateCellBoundingBox(HemoCell *);
122 static void calculateCellAtomicBlock(HemoCell *);
123 static void calculateCellType(HemoCell *);
125
126 //Interface that should be used, less error prone at the cost of some extra computation and memory usage
128 static pluint getNumberOfCellsFromType(HemoCell *, std::string type);
130 static void calculateCellInformation(HemoCell *, std::map<plint, CellInformation> &);
131};
132}
133#endif
void processGenericBlocks(plb::Box3D, std::vector< plb::AtomicBlock3D * >)
Definition cellInfo.cpp:67
CellArea(HemoCell *hemocell_)
Definition cellInfo.h:69
CellArea * clone() const
Definition cellInfo.cpp:367
HemoCell * hemocell
Definition cellInfo.h:74
void processGenericBlocks(plb::Box3D, std::vector< plb::AtomicBlock3D * >)
Definition cellInfo.cpp:153
CellAtomicBlock * clone() const
Definition cellInfo.cpp:379
CellBoundingBox * clone() const
Definition cellInfo.cpp:376
void processGenericBlocks(plb::Box3D, std::vector< plb::AtomicBlock3D * >)
Definition cellInfo.cpp:124
CellPosition * clone() const
Definition cellInfo.cpp:370
void processGenericBlocks(plb::Box3D, std::vector< plb::AtomicBlock3D * >)
Definition cellInfo.cpp:85
void processGenericBlocks(plb::Box3D, std::vector< plb::AtomicBlock3D * >)
Definition cellInfo.cpp:105
CellStretch * clone() const
Definition cellInfo.cpp:373
void processGenericBlocks(plb::Box3D, std::vector< plb::AtomicBlock3D * >)
Definition cellInfo.cpp:163
CellType * clone() const
Definition cellInfo.cpp:382
HemoCell * hemocell
Definition cellInfo.h:65
void processGenericBlocks(plb::Box3D, std::vector< plb::AtomicBlock3D * >)
Definition cellInfo.cpp:42
CellVolume(HemoCell *hemocell_)
Definition cellInfo.h:60
CellVolume * clone() const
Definition cellInfo.cpp:364
void processGenericBlocks(plb::Box3D, std::vector< plb::AtomicBlock3D * >)
Definition cellInfo.cpp:173
allCellInformation * clone() const
Definition cellInfo.cpp:385
allCellInformation(HemoCell *hemocell_, std::map< plint, CellInformation > &info_per_cell_)
Definition cellInfo.h:103
std::map< plint, CellInformation > & info_per_cell
Definition cellInfo.h:100
HemoCell * hemocell
Definition cellInfo.h:99
Definition cellInfo.h:57
static pluint getNumberOfCellsFromType(HemoCell *, std::string type)
Definition cellInfo.cpp:329
static pluint getTotalNumberOfCells(HemoCell *)
Definition cellInfo.cpp:313
static void calculate_vol_pos_area(HemoCell *)
Definition cellInfo.cpp:36
static void calculateCellAtomicBlock(HemoCell *)
Definition cellInfo.cpp:301
static void calculateCellVolume(HemoCell *)
Definition cellInfo.cpp:270
static void calculateCellInformation(HemoCell *, std::map< plint, CellInformation > &)
Calculate all possible macroscopic information and return it within the reference.
Definition cellInfo.cpp:352
static std::map< plint, CellInformation > info_per_cell
Definition cellInfo.h:114
static void calculateCellStretch(HemoCell *)
Definition cellInfo.cpp:289
static void clear_list()
Definition cellInfo.cpp:33
static void calculateCellPosition(HemoCell *)
Definition cellInfo.cpp:283
static void calculateCellArea(HemoCell *)
Definition cellInfo.cpp:277
static void calculateCellType(HemoCell *)
Definition cellInfo.cpp:307
static void calculateCellVelocity(HemoCell *)
static void calculateCellBoundingBox(HemoCell *)
Definition cellInfo.cpp:295
Definition hemoCellFunctional.h:37
Definition hemocell.h:66
double T
Definition constant_defaults.h:137
long int plint
Definition constant_defaults.h:149
long unsigned int pluint
Definition constant_defaults.h:152
Definition config.cpp:37
Definition array.h:40
Definition cellInfo.h:44
T area
Definition cellInfo.h:48
T volume
Definition cellInfo.h:47
hemo::Array< T, 3 > velocity
Definition cellInfo.h:46
pluint cellType
Definition cellInfo.h:52
pluint blockId
Definition cellInfo.h:51
hemo::Array< T, 3 > position
Definition cellInfo.h:45
bool centerLocal
Definition cellInfo.h:53
hemo::Array< T, 6 > bbox
Definition cellInfo.h:50
plint base_cell_id
Definition cellInfo.h:54
T stretch
Definition cellInfo.h:49