hemocell
Loading...
Searching...
No Matches
helper
cellInfo.h
Go to the documentation of this file.
1
/*
2
This file is part of the HemoCell library
3
4
HemoCell is developed and maintained by the Computational Science Lab
5
in the University of Amsterdam. Any questions or remarks regarding this library
6
can be sent to: info@hemocell.eu
7
8
When using the HemoCell library in scientific work please cite the
9
corresponding paper: https://doi.org/10.3389/fphys.2017.00563
10
11
The HemoCell library is free software: you can redistribute it and/or
12
modify it under the terms of the GNU Affero General Public License as
13
published by the Free Software Foundation, either version 3 of the
14
License, or (at your option) any later version.
15
16
The library is distributed in the hope that it will be useful,
17
but WITHOUT ANY WARRANTY; without even the implied warranty of
18
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19
GNU Affero General Public License for more details.
20
21
You should have received a copy of the GNU Affero General Public License
22
along 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
*/
42
namespace
hemo
{
43
44
struct
CellInformation
{
45
hemo::Array<T,3>
position
= {};
46
hemo::Array<T,3>
velocity
= {};
47
T
volume
= 0;
48
T
area
= 0;
49
T
stretch
= 0;
50
hemo::Array<T,6>
bbox
= {};
51
pluint
blockId
= UINTMAX_MAX;
52
pluint
cellType
= UINTMAX_MAX;
53
bool
centerLocal
=
false
;
54
int
base_cell_id
= 0;
55
};
56
57
class
CellInformationFunctionals
{
58
// Legacy interface, remove at some point
59
static
HemoCell
*
hemocell
;
60
61
class
CellVolume
:
public
HemoCellFunctional
{
62
void
processGenericBlocks
(plb::Box3D, std::vector<plb::AtomicBlock3D*>);
63
CellVolume
*
clone
()
const
;
64
};
65
class
CellArea
:
public
HemoCellFunctional
{
66
void
processGenericBlocks
(plb::Box3D, std::vector<plb::AtomicBlock3D*>);
67
CellArea
*
clone
()
const
;
68
};
69
class
CellPosition
:
public
HemoCellFunctional
{
70
void
processGenericBlocks
(plb::Box3D, std::vector<plb::AtomicBlock3D*>);
71
CellPosition
*
clone
()
const
;
72
};
73
class
CellStretch
:
public
HemoCellFunctional
{
74
void
processGenericBlocks
(plb::Box3D, std::vector<plb::AtomicBlock3D*>);
75
CellStretch
*
clone
()
const
;
76
};
77
class
CellBoundingBox
:
public
HemoCellFunctional
{
78
void
processGenericBlocks
(plb::Box3D, std::vector<plb::AtomicBlock3D*>);
79
CellBoundingBox
*
clone
()
const
;
80
};
81
class
CellAtomicBlock
:
public
HemoCellFunctional
{
82
void
processGenericBlocks
(plb::Box3D, std::vector<plb::AtomicBlock3D*>);
83
CellAtomicBlock
*
clone
()
const
;
84
};
85
class
CellType
:
public
HemoCellFunctional
{
86
void
processGenericBlocks
(plb::Box3D, std::vector<plb::AtomicBlock3D*>);
87
CellType
*
clone
()
const
;
88
};
89
//end legacy interface
90
91
class
allCellInformation
:
public
HemoCellFunctional
{
92
HemoCell
*
hemocell
;
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
103
public
:
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
*);
115
static
void
calculateCellVelocity
(
HemoCell
*);
116
117
//Interface that should be used, less error prone at the cost of some extra computation and memory usage
118
static
pluint
getTotalNumberOfCells
(
HemoCell
*);
119
static
pluint
getNumberOfCellsFromType
(
HemoCell
*,
string
type);
121
static
void
calculateCellInformation
(
HemoCell
*, map<int, CellInformation> &);
122
123
};
124
}
125
#endif
array.h
hemo::CellInformationFunctionals::CellArea
Definition
cellInfo.h:65
hemo::CellInformationFunctionals::CellArea::processGenericBlocks
void processGenericBlocks(plb::Box3D, std::vector< plb::AtomicBlock3D * >)
Definition
cellInfo.cpp:64
hemo::CellInformationFunctionals::CellArea::clone
CellArea * clone() const
Definition
cellInfo.cpp:380
hemo::CellInformationFunctionals::CellAtomicBlock
Definition
cellInfo.h:81
hemo::CellInformationFunctionals::CellAtomicBlock::processGenericBlocks
void processGenericBlocks(plb::Box3D, std::vector< plb::AtomicBlock3D * >)
Definition
cellInfo.cpp:151
hemo::CellInformationFunctionals::CellAtomicBlock::clone
CellAtomicBlock * clone() const
Definition
cellInfo.cpp:384
hemo::CellInformationFunctionals::CellBoundingBox
Definition
cellInfo.h:77
hemo::CellInformationFunctionals::CellBoundingBox::clone
CellBoundingBox * clone() const
Definition
cellInfo.cpp:383
hemo::CellInformationFunctionals::CellBoundingBox::processGenericBlocks
void processGenericBlocks(plb::Box3D, std::vector< plb::AtomicBlock3D * >)
Definition
cellInfo.cpp:122
hemo::CellInformationFunctionals::CellPosition
Definition
cellInfo.h:69
hemo::CellInformationFunctionals::CellPosition::clone
CellPosition * clone() const
Definition
cellInfo.cpp:381
hemo::CellInformationFunctionals::CellPosition::processGenericBlocks
void processGenericBlocks(plb::Box3D, std::vector< plb::AtomicBlock3D * >)
Definition
cellInfo.cpp:82
hemo::CellInformationFunctionals::CellStretch
Definition
cellInfo.h:73
hemo::CellInformationFunctionals::CellStretch::processGenericBlocks
void processGenericBlocks(plb::Box3D, std::vector< plb::AtomicBlock3D * >)
Definition
cellInfo.cpp:103
hemo::CellInformationFunctionals::CellStretch::clone
CellStretch * clone() const
Definition
cellInfo.cpp:382
hemo::CellInformationFunctionals::CellType
Definition
cellInfo.h:85
hemo::CellInformationFunctionals::CellType::processGenericBlocks
void processGenericBlocks(plb::Box3D, std::vector< plb::AtomicBlock3D * >)
Definition
cellInfo.cpp:160
hemo::CellInformationFunctionals::CellType::clone
CellType * clone() const
Definition
cellInfo.cpp:385
hemo::CellInformationFunctionals::CellVolume
Definition
cellInfo.h:61
hemo::CellInformationFunctionals::CellVolume::processGenericBlocks
void processGenericBlocks(plb::Box3D, std::vector< plb::AtomicBlock3D * >)
Definition
cellInfo.cpp:39
hemo::CellInformationFunctionals::CellVolume::clone
CellVolume * clone() const
Definition
cellInfo.cpp:379
hemo::CellInformationFunctionals::allCellInformation
Definition
cellInfo.h:91
hemo::CellInformationFunctionals::allCellInformation::info_per_cell
map< int, CellInformation > & info_per_cell
Definition
cellInfo.h:93
hemo::CellInformationFunctionals::allCellInformation::processGenericBlocks
void processGenericBlocks(plb::Box3D, std::vector< plb::AtomicBlock3D * >)
Definition
cellInfo.cpp:170
hemo::CellInformationFunctionals::allCellInformation::clone
allCellInformation * clone() const
Definition
cellInfo.cpp:386
hemo::CellInformationFunctionals::allCellInformation::allCellInformation
allCellInformation(HemoCell *hemocell_, map< int, CellInformation > &info_per_cell_)
Definition
cellInfo.h:95
hemo::CellInformationFunctionals::allCellInformation::hemocell
HemoCell * hemocell
Definition
cellInfo.h:92
hemo::CellInformationFunctionals
Definition
cellInfo.h:57
hemo::CellInformationFunctionals::getTotalNumberOfCells
static pluint getTotalNumberOfCells(HemoCell *)
Definition
cellInfo.cpp:324
hemo::CellInformationFunctionals::calculate_vol_pos_area
static void calculate_vol_pos_area(HemoCell *)
Definition
cellInfo.cpp:33
hemo::CellInformationFunctionals::calculateCellAtomicBlock
static void calculateCellAtomicBlock(HemoCell *)
Definition
cellInfo.cpp:308
hemo::CellInformationFunctionals::calculateCellVolume
static void calculateCellVolume(HemoCell *)
Definition
cellInfo.cpp:268
hemo::CellInformationFunctionals::info_per_cell
static map< int, CellInformation > info_per_cell
Definition
cellInfo.h:105
hemo::CellInformationFunctionals::getNumberOfCellsFromType
static pluint getNumberOfCellsFromType(HemoCell *, string type)
Definition
cellInfo.cpp:344
hemo::CellInformationFunctionals::hemocell
static HemoCell * hemocell
Definition
cellInfo.h:59
hemo::CellInformationFunctionals::calculateCellInformation
static void calculateCellInformation(HemoCell *, map< int, CellInformation > &)
Calculate all possible macroscopic information and return it within the reference.
Definition
cellInfo.cpp:367
hemo::CellInformationFunctionals::calculateCellStretch
static void calculateCellStretch(HemoCell *)
Definition
cellInfo.cpp:292
hemo::CellInformationFunctionals::clear_list
static void clear_list()
Definition
cellInfo.cpp:30
hemo::CellInformationFunctionals::calculateCellPosition
static void calculateCellPosition(HemoCell *)
Definition
cellInfo.cpp:284
hemo::CellInformationFunctionals::calculateCellArea
static void calculateCellArea(HemoCell *)
Definition
cellInfo.cpp:276
hemo::CellInformationFunctionals::calculateCellType
static void calculateCellType(HemoCell *)
Definition
cellInfo.cpp:316
hemo::CellInformationFunctionals::calculateCellVelocity
static void calculateCellVelocity(HemoCell *)
hemo::CellInformationFunctionals::calculateCellBoundingBox
static void calculateCellBoundingBox(HemoCell *)
Definition
cellInfo.cpp:300
hemo::HemoCellFunctional
Definition
hemoCellFunctional.h:36
hemo::HemoCell
Definition
hemocell.h:68
T
double T
Definition
constant_defaults.h:118
pluint
long unsigned int pluint
Definition
constant_defaults.h:130
hemoCellFunctional.h
hemocell.h
hemo
Definition
config.cpp:34
hemo::Array
Definition
array.h:39
hemo::CellInformation
Definition
cellInfo.h:44
hemo::CellInformation::area
T area
Definition
cellInfo.h:48
hemo::CellInformation::volume
T volume
Definition
cellInfo.h:47
hemo::CellInformation::cellType
pluint cellType
Definition
cellInfo.h:52
hemo::CellInformation::velocity
hemo::Array< T, 3 > velocity
Definition
cellInfo.h:46
hemo::CellInformation::blockId
pluint blockId
Definition
cellInfo.h:51
hemo::CellInformation::position
hemo::Array< T, 3 > position
Definition
cellInfo.h:45
hemo::CellInformation::centerLocal
bool centerLocal
Definition
cellInfo.h:53
hemo::CellInformation::base_cell_id
int base_cell_id
Definition
cellInfo.h:54
hemo::CellInformation::stretch
T stretch
Definition
cellInfo.h:49
hemo::CellInformation::bbox
hemo::Array< T, 6 > bbox
Definition
cellInfo.h:50
Generated by
1.9.8