hemocell
Loading...
Searching...
No Matches
Namespaces | Classes | Typedefs | Functions | Variables
hemo Namespace Reference

Namespaces

namespace  detail
 

Classes

struct  Array
 
class  bindingFieldHelper
 
struct  Box3D_simple
 
struct  CellInformation
 
class  CellInformationFunctionals
 
class  CellMechanics
 
struct  CellsCrossingPeriodicBoundary
 
class  CommonCellConstants
 
class  Config
 
struct  ConfigValues
 
class  CopyFromNeighbor
 
class  FatalError
 
class  FatalErrorsThrow
 
class  FluidInfo
 
struct  FluidStatistics
 
class  GatherFluidForce
 
class  GatherFluidVelocity
 
class  GatherParticleForce
 
class  GatherParticleVelocity
 
class  HemoCell
 
class  HemoCellField
 
class  HemoCellFields
 
class  HemoCellFunctional
 
class  HemoCellGatheringFunctional
 
class  HemoCellParticle
 
class  HemoCellParticleDataTransfer
 
class  HemoCellParticleField
 
class  HemoCellStretch
 Stretch a single cell by pulling vertices at both ends along x, as in an optical-tweezers experiment. More...
 
struct  InitialCellPlacement
 One cell read from a .pos file. More...
 
class  InteriorViscosityHelper
 
class  LeesEdwardsBC
 
class  LeesEdwardsBCGetPopulations
 
class  LeesEdwardsBCSetPopulations
 
class  LoadBalancer
 
class  Logfile
 
class  Logfile_only
 Like hlog, but only to the log file (not stdout). More...
 
struct  NoInitChar
 Used to circumvent buffer initialization of characters. More...
 
class  NoOp
 Null cell model: no membrane forces. More...
 
class  OctreeStructCell
 
class  Parameters
 
class  ParticleGrid
 Cell list that bins the particles of one atomic block onto its lattice nodes. More...
 
class  ParticleInfo
 
struct  ParticleStatistics
 
class  PltSimpleModel
 
class  PreInlet
 
class  Profiler
 
class  RbcHighOrderModel
 
class  RbcMalariaModel
 
class  ReadPositionsBloodCellField3D
 
class  WbcHighOrderModel
 
class  WriteCellField3DInMultipleHDF5Files
 
class  WriteFluidField
 
struct  XdmfAttribute
 A dataset of a block file that is listed as an XDMF attribute. More...
 
struct  XdmfBlockFile
 What one atomic block wrote to its HDF5 file in one output step. More...
 
class  XMLElement
 

Typedefs

typedef struct stat Stat
 
typedef Parameters param
 Short name of Parameters (formerly a macro), e.g. param::dx.
 

Functions

void loadDirectories (hemo::Config *cfg, bool edit_out_dir)
 
void resetGlobalConfigValues ()
 
void loadGlobalConfigValues (hemo::Config *cfg)
 
void fatal (const std::string &message)
 Report a fatal error and end the whole MPI job.
 
void warning (const std::string &message)
 
template<typename First , typename Second , typename... Rest>
void fatal (const First &first, const Second &second, const Rest &... rest)
 
template<typename First , typename Second , typename... Rest>
void warning (const First &first, const Second &second, const Rest &... rest)
 warning() with its arguments streamed into the message.
 
template<typename Val >
Logfile & operator<< (Logfile &lf, Val const &rhs)
 
Logfile & operator<< (Logfile &lf, std::ostream &(*op)(std::ostream &))
 
template<typename Val >
Logfile_only & operator<< (Logfile_only &lf, Val const &rhs)
 
Logfile_only & operator<< (Logfile_only &lf, std::ostream &(*op)(std::ostream &))
 
void readPositionsCellFields (std::string particlePosFile)
 
bool contained_sane (hemo::Array< plint, 3 > const &x, plb::Box3D const &box)
 Decide if a Lagrangian point is contained in 3D box, boundaries exclusive.
 
T phi2 (T x)
 
template<typename T >
T phi3 (T x)
 
template<typename T >
T phi4 (T x)
 
template<typename T >
T phi4c (T x)
 
template<typename T , template< typename U > class Descriptor>
void interpolationCoefficients (plb::BlockLattice3D< T, Descriptor > const &block, hemo::Array< T, 3 > const &position, std::vector< plb::Dot3D > &cellPos, std::vector< T > &weights)
 
template<typename T , template< typename U > class Descriptor>
void interpolationCoefficientsPhi1 (plb::BlockLattice3D< T, Descriptor > const &block, hemo::Array< T, 3 > const &position, std::vector< plb::Dot3D > &cellPos, std::vector< T > &weights)
 
void interpolationCoefficientsPhi2 (plb::BlockLattice3D< T, DESCRIPTOR > &block, HemoCellParticle &particle)
 Compute the IBM kernel of a particle with the 2-point hat function phi2 (trilinear weights): kernelLocations/kernelWeights (and, with INTERIOR_VISCOSITY, kernelCoordinates).
 
template<typename T , template< typename U > class Descriptor>
void interpolationCoefficientsPhi3 (plb::BlockLattice3D< T, Descriptor > const &block, hemo::Array< T, 3 > const &position, std::vector< plb::Dot3D > &cellPos, std::vector< T > &weights)
 
void interpolationCoefficientsPhi4 (plb::BlockLattice3D< double, DESCRIPTOR > const &block, hemo::Array< double, 3 > const &position, std::vector< plb::Dot3D > &cellPos, std::vector< double > &weights)
 
template<typename T , template< typename U > class Descriptor>
void interpolationCoefficientsPhi4c (plb::BlockLattice3D< T, Descriptor > const &block, hemo::Array< T, 3 > const &position, std::vector< plb::Dot3D > &cellPos, std::vector< T > &weights)
 
template<typename T , template< typename U > class Descriptor>
void curateInterpolationCoefficients (plb::BlockLattice3D< T, Descriptor > &fluid, std::vector< plb::Dot3D > &cellPos, std::vector< T > &weights)
 
void computePairRepulsion (std::vector< HemoCellParticle > &particles, const ParticleGrid &grid, T r_const, T r_cutoff)
 Accumulate the pairwise inter-cell repulsion force into sv.force_repulsion of all binned particles.
 
plint nearestNode (T x)
 The lattice node nearest to a coordinate [lattice units].
 
template<typename _Tp , std::size_t _Nm>
Array< _Tp, _Nm > operator+ (const Array< _Tp, _Nm > &one, const Array< _Tp, _Nm > &two)
 
template<typename _Tp , std::size_t _Nm>
Array< _Tp, _Nm > operator+ (const Array< _Tp, _Nm > &one, const plb::Array< _Tp, _Nm > &two)
 
template<typename _Tp , std::size_t _Nm>
Array< _Tp, _Nm > operator+ (const Array< _Tp, _Nm > &one, const _Tp &two)
 
template<typename _Tp , std::size_t _Nm>
Array< _Tp, _Nm > operator- (const Array< _Tp, _Nm > &one, const Array< _Tp, _Nm > &two)
 
template<typename _Tp , typename _Tp2 , std::size_t _Nm>
Array< _Tp2, _Nm > operator- (const Array< _Tp, _Nm > &one, const Array< _Tp2, _Nm > &two)
 
template<typename _Tp , std::size_t _Nm>
Array< _Tp, _Nm > operator- (const Array< _Tp, _Nm > &one)
 
template<typename _Tp , std::size_t _Nm, typename _Tp2 >
Array< _Tp, _Nm > operator/ (const Array< _Tp, _Nm > &one, const _Tp2 div)
 
template<typename _Tp , std::size_t _Nm, typename _Tp2 >
Array< _Tp, _Nm > operator* (const Array< _Tp, _Nm > &one, const _Tp2 mul)
 
template<typename _Tp , std::size_t _Nm, typename _Tp2 >
Array< _Tp, _Nm > operator* (const _Tp2 mul, const Array< _Tp, _Nm > &one)
 
template<typename _Tp >
Array< _Tp, 3 > operator- (const Array< _Tp, 3 > &one, plb::Dot3D two)
 
template<typename _Tp , typename _Tp2 , typename _Tp3 >
void crossProduct (const Array< _Tp, 3 > &one, const Array< _Tp2, 3 > &two, Array< _Tp3, 3 > &result)
 
template<typename _Tp >
Array< _Tp, 3 > crossProduct (const Array< _Tp, 3 > &one, const Array< _Tp, 3 > &two)
 
template<typename _Tp , typename _Tp2 >
Array< T, 3 > crossProduct (const Array< _Tp, 3 > &one, const Array< _Tp2, 3 > &two)
 
template<typename _Tp , std::size_t _Nm>
_Tp dot (const Array< _Tp, _Nm > &one, const Array< _Tp, _Nm > &two)
 
template<typename _Tp , typename _Tp2 , std::size_t _Nm>
T dot (const Array< _Tp, _Nm > &one, const Array< _Tp2, _Nm > &two)
 
template<typename _Tp , std::size_t _Nm>
_Tp norm (const Array< _Tp, _Nm > &one)
 
template<typename _Tp >
_Tp angleBetweenVectors (const Array< _Tp, 3 > &one, const Array< _Tp, 3 > &two)
 
template<typename _Tp >
_Tp computeTriangleArea (const Array< _Tp, 3 > &v0, const Array< _Tp, 3 > &v1, const Array< _Tp, 3 > &v2)
 
template<typename _Tp >
_Tp computeLength (const Array< _Tp, 3 > &v)
 
template<typename _Tp >
void computeTriangleAreaAndUnitNormal (const Array< _Tp, 3 > &v0, const Array< _Tp, 3 > &v1, const Array< _Tp, 3 > &v2, _Tp &area, Array< _Tp, 3 > &unitNormal)
 
template<typename _Tp >
Array< _Tp, 3 > computeTriangleNormal (const Array< _Tp, 3 > &v0, const Array< _Tp, 3 > &v1, const Array< _Tp, 3 > &v2, bool isAreaWeighted)
 
template<typename _Tp >
_Tp computeCotangentFromVectors (const Array< _Tp, 3 > &a, const Array< _Tp, 3 > &b)
 
template<typename _Tp >
void computeLengthsPythagoras (const Array< _Tp, 3 > &a, const Array< _Tp, 3 > &b, _Tp &a_l, _Tp &b_l, _Tp &c_l)
 
void weakScaling (int Nx, int Ny, int Nz, int numberOfProcesses, vector< int > &newNxNyNz)
 
int renameFileToDotOld (std::string fName)
 
int do_mkdir (const char *path, mode_t mode)
 
int mkpath (const char *path, mode_t mode)
 
std::string zeroPadNumber (int num, int w)
 
void printHeader ()
 
void boundaryFromFlagMatrix (plb::MultiBlockLattice3D< T, DESCRIPTOR > *fluid, plb::MultiScalarField3D< int > *flagMatrix, bool partOfpreInlet)
 
void weakScaling (int Nx, int Ny, int Nz, int numberOfProcesses, std::vector< int > &newNxNyNz)
 
bool file_exists (const std::string &name)
 
std::ostream & operator<< (std::ostream &stream, const plb::Box3D &box)
 
std::ostream & operator<< (std::ostream &stream, const plb::Dot3D &dot)
 
int MollerTrumbore (const hemo::Array< T, 3 > &v0, const hemo::Array< T, 3 > &v1, const hemo::Array< T, 3 > &v2, hemo::Array< plint, 3 > &rayPoint)
 
plint cellsInBoundingBox (plb::Box3D const &box)
 
void getFlagMatrixFromSTL (std::string meshFileName, plb::plint extendedEnvelopeWidth, plb::plint refDirLength, plb::plint refDir, std::unique_ptr< plb::VoxelizedDomain3D< T > > &voxelizedDomain, std::unique_ptr< plb::MultiScalarField3D< int > > &flagMatrix, plint blockSize, int particleEnvelope)
 
void getFlagMatrixFromSTL (Config &cfg, VoxelizedDomain3D< T > *&voxelizedDomain, MultiScalarField3D< int > *&flagMatrix)
 
void getFlagMatrixFromSTL (Config &cfg, std::unique_ptr< VoxelizedDomain3D< T > > &voxelizedDomain, std::unique_ptr< MultiScalarField3D< int > > &flagMatrix)
 
void getFlagMatrixFromSTL (std::string meshFileName, plint extendedEnvelopeWidth, plint refDirLength, plint refDir, VoxelizedDomain3D< T > *&voxelizedDomain, MultiScalarField3D< int > *&flagMatrix, plint blockSize, int particleEnvelope)
 
void getFlagMatrixFromSTL (std::string meshFileName, plb::plint extendedEnvelopeWidth, plb::plint refDirLength, plb::plint refDir, plb::VoxelizedDomain3D< T > *&voxelizedDomain, plb::MultiScalarField3D< int > *&flagMatrix, plint blockSize, int particleEnvelope=0)
 Voxelise a closed STL surface into a flag matrix (1 fluid, 0 solid).
 
void getFlagMatrixFromSTL (Config &cfg, std::unique_ptr< plb::VoxelizedDomain3D< T > > &voxelizedDomain, std::unique_ptr< plb::MultiScalarField3D< int > > &flagMatrix)
 Voxelise the geometry of a case configuration (see above).
 
void getFlagMatrixFromSTL (Config &cfg, plb::VoxelizedDomain3D< T > *&voxelizedDomain, plb::MultiScalarField3D< int > *&flagMatrix)
 
void writeCEPACField_HDF5 (HemoCellFields &cellfields, T dx, T dt, plint iter, string preString)
 
void writeFluidField_HDF5 (HemoCellFields &cellfields, T dx, T dt, plint iter, string preString)
 
void writeFluidField_HDF5 (HemoCellFields &cellFields, T dx, T dt, plint iter, std::string preString="")
 
void writeCEPACField_HDF5 (HemoCellFields &cellfields, T dx, T dt, plint iter, std::string preString="")
 
void outputHDF5 (hsize_t *dim, hsize_t *chunk, hid_t &file_id, std::string &name, float *output)
 
void writeCompressedDataset (hid_t file, const std::string &name, hid_t type, int rank, const hsize_t *dims, const hsize_t *chunk, const void *data)
 Create the dataset name in file and write data to it, chunked, byte-shuffled and deflate-compressed.
 
void writeCellField3D_HDF5 (HemoCellFields &cellFields, T dx, T dt, plint iter, std::string preString="")
 Write the selected outputs of every cell type to HDF5 files (one per atomic block) and describe them in XDMF files (see writeXdmf()). Collective.
 
template<typename T >
void rotateTriangularMeshXYZ (plb::TriangularSurfaceMesh< T > *mesh, T alpha, T beta, T gamma)
 
void meshRotation (TriangularSurfaceMesh< T > *mesh, hemo::Array< T, 3 > rotationAngles)
 
bool vertexClearOfWalls (BlockLattice3D< T, DESCRIPTOR > &fluid, const hemo::Array< T, 3 > &vertex, int denyLayerSize)
 
int denyLayerSize (HemoCellParticleField &particleField, pluint celltype)
 
void positionCellInParticleField (HemoCellParticleField &particleField, BlockLattice3D< T, DESCRIPTOR > &fluid, TriangularSurfaceMesh< T > *mesh, hemo::Array< T, 3 > startingPoint, plint cellId, pluint celltype)
 
int getTotalNumberOfCells (HemoCellFields &cellFields)
 Sum of the cell counts in the first line of every <type name>.pos file (read on each rank).
 
void readPositionsBloodCellField3D (HemoCellFields &cellFields, T dx, Config &cfg)
 Place the cells listed in <type name>.pos of every cell type into the particle fields.
 
void writeCellInfo_CSV (HemoCell &hemocell)
 
void writeXdmf (const std::vector< XdmfBlockFile > &blocks, plb::plint iter, double time)
 Write the XDMF (version 3) description of one output step. Collective.
 

Variables

ConfigValues global
 
constexpr int WBC_SPHERE = 0
 
constexpr int RBC_FROM_SPHERE = 1
 
constexpr int MESH_FROM_STL = 2
 
constexpr int ELLIPSOID_FROM_SPHERE = 6
 
constexpr int STRING_FROM_VERTEXES = 7
 
constexpr int OUTPUT_POSITION = 1
 
constexpr int OUTPUT_FORCE = 2
 
constexpr int OUTPUT_FORCE_VOLUME = 21
 
constexpr int OUTPUT_FORCE_BENDING = 22
 
constexpr int OUTPUT_FORCE_AREA = 23
 
constexpr int OUTPUT_FORCE_LINK = 24
 
constexpr int OUTPUT_FORCE_VISC = 25
 
constexpr int OUTPUT_FORCE_INNER_LINK = 26
 
constexpr int OUTPUT_FORCE_REPULSION = 27
 
constexpr int OUTPUT_TRIANGLES = 3
 
constexpr int OUTPUT_VELOCITY = 4
 
constexpr int OUTPUT_DENSITY = 5
 
constexpr int OUTPUT_VERTEX_ID = 7
 
constexpr int OUTPUT_CELL_ID = 8
 
constexpr int OUTPUT_CELL_DENSITY = 9
 
constexpr int OUTPUT_SHEAR_STRESS = 10
 
constexpr int OUTPUT_INNER_LINKS = 11
 
constexpr int OUTPUT_OMEGA = 12
 
constexpr int OUTPUT_BOUNDARY = 13
 
constexpr int OUTPUT_BINDING_SITES = 14
 
constexpr int OUTPUT_INTERIOR_POINTS = 15
 
constexpr int OUTPUT_SHEAR_RATE = 16
 
constexpr int OUTPUT_STRAIN_RATE = 17
 
constexpr int OUTPUT_RES_TIME = 18
 
Logfile hlog
 
Logfile_only hlogfile
 
constexpr unsigned int outputDeflateLevel = 4
 

Typedef Documentation

◆ param

Short name of Parameters (formerly a macro), e.g. param::dx.

◆ Stat

typedef struct stat hemo::Stat

Function Documentation

◆ angleBetweenVectors()

template<typename _Tp >
_Tp hemo::angleBetweenVectors ( const Array< _Tp, 3 > &  one,
const Array< _Tp, 3 > &  two 
)

◆ boundaryFromFlagMatrix()

void hemo::boundaryFromFlagMatrix ( plb::MultiBlockLattice3D< T, DESCRIPTOR > *  fluid,
plb::MultiScalarField3D< int > *  flagMatrix,
bool  partOfpreInlet 
)

◆ cellsInBoundingBox()

plint hemo::cellsInBoundingBox ( plb::Box3D const &  box)
inline

◆ computeCotangentFromVectors()

template<typename _Tp >
_Tp hemo::computeCotangentFromVectors ( const Array< _Tp, 3 > &  a,
const Array< _Tp, 3 > &  b 
)

◆ computeLength()

template<typename _Tp >
_Tp hemo::computeLength ( const Array< _Tp, 3 > &  v)

◆ computeLengthsPythagoras()

template<typename _Tp >
void hemo::computeLengthsPythagoras ( const Array< _Tp, 3 > &  a,
const Array< _Tp, 3 > &  b,
_Tp &  a_l,
_Tp &  b_l,
_Tp &  c_l 
)

◆ computePairRepulsion()

void hemo::computePairRepulsion ( std::vector< HemoCellParticle > &  particles,
const ParticleGrid &  grid,
T  r_const,
T  r_cutoff 
)

Accumulate the pairwise inter-cell repulsion force into sv.force_repulsion of all binned particles.

For every pair of particles of different cells that lie in the same or in neighbouring grid nodes and are closer than r_cutoff, a force of magnitude r_const * r_cutoff / distance is applied along the connecting line, with equal and opposite contributions to both particles (each pair is visited exactly once). Pairs further apart than one grid node are not found, so r_cutoff should not exceed one lattice spacing.

Nodes on the upper x, y and z faces of the grid only act as neighbours of interior nodes; pairs entirely within those outermost envelope layers are skipped, as in the original implementation.

The caller resets force_repulsion beforehand. Coincident particles (distance 0) yield a non-finite force; this is not checked.

Parameters
[in,out]particlesParticle vector the grid was built from.
[in]gridGrid built from particles.
[in]r_constForce constant [lattice force units].
[in]r_cutoffCut-off distance [lattice units].

◆ computeTriangleArea()

template<typename _Tp >
_Tp hemo::computeTriangleArea ( const Array< _Tp, 3 > &  v0,
const Array< _Tp, 3 > &  v1,
const Array< _Tp, 3 > &  v2 
)

◆ computeTriangleAreaAndUnitNormal()

template<typename _Tp >
void hemo::computeTriangleAreaAndUnitNormal ( const Array< _Tp, 3 > &  v0,
const Array< _Tp, 3 > &  v1,
const Array< _Tp, 3 > &  v2,
_Tp &  area,
Array< _Tp, 3 > &  unitNormal 
)

◆ computeTriangleNormal()

template<typename _Tp >
Array< _Tp, 3 > hemo::computeTriangleNormal ( const Array< _Tp, 3 > &  v0,
const Array< _Tp, 3 > &  v1,
const Array< _Tp, 3 > &  v2,
bool  isAreaWeighted 
)

◆ contained_sane()

bool hemo::contained_sane ( hemo::Array< plint, 3 > const &  x,
plb::Box3D const &  box 
)
inline

Decide if a Lagrangian point is contained in 3D box, boundaries exclusive.

◆ crossProduct() [1/3]

template<typename _Tp >
Array< _Tp, 3 > hemo::crossProduct ( const Array< _Tp, 3 > &  one,
const Array< _Tp, 3 > &  two 
)
inline

◆ crossProduct() [2/3]

template<typename _Tp , typename _Tp2 >
Array< T, 3 > hemo::crossProduct ( const Array< _Tp, 3 > &  one,
const Array< _Tp2, 3 > &  two 
)
inline

◆ crossProduct() [3/3]

template<typename _Tp , typename _Tp2 , typename _Tp3 >
void hemo::crossProduct ( const Array< _Tp, 3 > &  one,
const Array< _Tp2, 3 > &  two,
Array< _Tp3, 3 > &  result 
)
inline

◆ curateInterpolationCoefficients()

template<typename T , template< typename U > class Descriptor>
void hemo::curateInterpolationCoefficients ( plb::BlockLattice3D< T, Descriptor > &  fluid,
std::vector< plb::Dot3D > &  cellPos,
std::vector< T > &  weights 
)

◆ denyLayerSize()

int hemo::denyLayerSize ( HemoCellParticleField &  particleField,
pluint  celltype 
)
inline

◆ do_mkdir()

int hemo::do_mkdir ( const char *  path,
mode_t  mode 
)

◆ dot() [1/2]

template<typename _Tp , std::size_t _Nm>
_Tp hemo::dot ( const Array< _Tp, _Nm > &  one,
const Array< _Tp, _Nm > &  two 
)
inline

◆ dot() [2/2]

template<typename _Tp , typename _Tp2 , std::size_t _Nm>
T hemo::dot ( const Array< _Tp, _Nm > &  one,
const Array< _Tp2, _Nm > &  two 
)
inline

◆ fatal() [1/2]

template<typename First , typename Second , typename... Rest>
void hemo::fatal ( const First &  first,
const Second &  second,
const Rest &...  rest 
)

fatal() with its arguments streamed into the message, e.g. fatal("cell type ", index, " does not exist").

◆ fatal() [2/2]

void hemo::fatal ( const std::string &  message)

Report a fatal error and end the whole MPI job.

Prints the message, prefixed with the MPI rank, to stderr on the calling rank (hlog writes on rank 0 only, so an error found on another rank would otherwise go unreported), adds it to the log file if this rank writes one, and calls MPI_Abort(MPI_COMM_WORLD, 1) (std::exit(1) when MPI is not initialised). Not collective: a single rank may call it.

While a FatalErrorsThrow object exists it throws FatalError instead, so tests can check error paths. Only use that where every rank reaches the error, otherwise the other ranks wait forever in their next collective.

Parameters
[in]messageDescription of the error, without a trailing newline.

◆ file_exists()

bool hemo::file_exists ( const std::string &  name)
inline

◆ getFlagMatrixFromSTL() [1/7]

void hemo::getFlagMatrixFromSTL ( Config &  cfg,
plb::VoxelizedDomain3D< T > *&  voxelizedDomain,
plb::MultiScalarField3D< int > *&  flagMatrix 
)

As above, with raw pointers owned by the caller (e.g. for a PreInlet, which keeps a pointer to the flag matrix).

◆ getFlagMatrixFromSTL() [2/7]

void hemo::getFlagMatrixFromSTL ( Config &  cfg,
std::unique_ptr< plb::VoxelizedDomain3D< T > > &  voxelizedDomain,
std::unique_ptr< plb::MultiScalarField3D< int > > &  flagMatrix 
)

Voxelise the geometry of a case configuration (see above).

Reads from <domain>: geometry (the STL file, relative to the working directory), fluidEnvelope, refDirN, refDir, blockSize and particleEnvelope. Replaces the call with these six values that most cases repeat. Collective.

◆ getFlagMatrixFromSTL() [3/7]

void hemo::getFlagMatrixFromSTL ( Config &  cfg,
std::unique_ptr< VoxelizedDomain3D< T > > &  voxelizedDomain,
std::unique_ptr< MultiScalarField3D< int > > &  flagMatrix 
)

◆ getFlagMatrixFromSTL() [4/7]

void hemo::getFlagMatrixFromSTL ( Config &  cfg,
VoxelizedDomain3D< T > *&  voxelizedDomain,
MultiScalarField3D< int > *&  flagMatrix 
)

◆ getFlagMatrixFromSTL() [5/7]

void hemo::getFlagMatrixFromSTL ( std::string  meshFileName,
plb::plint  extendedEnvelopeWidth,
plb::plint  refDirLength,
plb::plint  refDir,
plb::VoxelizedDomain3D< T > *&  voxelizedDomain,
plb::MultiScalarField3D< int > *&  flagMatrix,
plint  blockSize,
int  particleEnvelope = 0 
)

Voxelise a closed STL surface into a flag matrix (1 fluid, 0 solid).

The geometry is scaled so that it spans refDirLength lattice nodes in direction refDir (0 x, 1 y, 2 z), and opened at both x ends (inflow and outflow). Collective. The caller owns the created objects.

Parameters
[in]meshFileNameSTL file, relative to the working directory
[in]extendedEnvelopeWidthenvelope of the voxelised blocks [lattice nodes]
[in]refDirLengthextent of the geometry along refDir [lattice nodes]
[in]refDirreference direction (0 x, 1 y, 2 z)
[out]voxelizedDomainthe voxelised domain (its block management)
[out]flagMatrix1 at fluid nodes, 0 elsewhere
[in]blockSizeatomic block size [lattice nodes]; <= 0 for one block per rank
[in]particleEnvelopeonly used for advice in the log (0: 25)

◆ getFlagMatrixFromSTL() [6/7]

void hemo::getFlagMatrixFromSTL ( std::string  meshFileName,
plb::plint  extendedEnvelopeWidth,
plb::plint  refDirLength,
plb::plint  refDir,
std::unique_ptr< plb::VoxelizedDomain3D< T > > &  voxelizedDomain,
std::unique_ptr< plb::MultiScalarField3D< int > > &  flagMatrix,
plint  blockSize,
int  particleEnvelope = 0 
)

As above, with the created objects owned by voxelizedDomain and flagMatrix (formerly std::auto_ptr, which C++17 removed).

◆ getFlagMatrixFromSTL() [7/7]

void hemo::getFlagMatrixFromSTL ( std::string  meshFileName,
plint  extendedEnvelopeWidth,
plint  refDirLength,
plint  refDir,
VoxelizedDomain3D< T > *&  voxelizedDomain,
MultiScalarField3D< int > *&  flagMatrix,
plint  blockSize,
int  particleEnvelope 
)

◆ getTotalNumberOfCells()

int hemo::getTotalNumberOfCells ( HemoCellFields &  cellFields)

Sum of the cell counts in the first line of every <type name>.pos file (read on each rank).

◆ interpolationCoefficients()

template<typename T , template< typename U > class Descriptor>
void hemo::interpolationCoefficients ( plb::BlockLattice3D< T, Descriptor > const &  block,
hemo::Array< T, 3 > const &  position,
std::vector< plb::Dot3D > &  cellPos,
std::vector< T > &  weights 
)

◆ interpolationCoefficientsPhi1()

template<typename T , template< typename U > class Descriptor>
void hemo::interpolationCoefficientsPhi1 ( plb::BlockLattice3D< T, Descriptor > const &  block,
hemo::Array< T, 3 > const &  position,
std::vector< plb::Dot3D > &  cellPos,
std::vector< T > &  weights 
)

◆ interpolationCoefficientsPhi2()

void hemo::interpolationCoefficientsPhi2 ( plb::BlockLattice3D< T, DESCRIPTOR > &  block,
HemoCellParticle &  particle 
)
inline

Compute the IBM kernel of a particle with the 2-point hat function phi2 (trilinear weights): kernelLocations/kernelWeights (and, with INTERIOR_VISCOSITY, kernelCoordinates).

phi2 is zero for distances >= 1, so along each axis only the nodes floor(p) and floor(p)+1 can contribute (at most 2x2x2 nodes). Nodes outside the block, with zero weight, or with boundary dynamics are skipped; the remaining weights are normalised to sum to one. Nodes are visited in ascending x, then y, then z order.

Parameters
blockfluid block of the particle (block-local node coordinates)
particleparticle with absolute lattice position sv.position

◆ interpolationCoefficientsPhi3()

template<typename T , template< typename U > class Descriptor>
void hemo::interpolationCoefficientsPhi3 ( plb::BlockLattice3D< T, Descriptor > const &  block,
hemo::Array< T, 3 > const &  position,
std::vector< plb::Dot3D > &  cellPos,
std::vector< T > &  weights 
)

◆ interpolationCoefficientsPhi4()

void hemo::interpolationCoefficientsPhi4 ( plb::BlockLattice3D< double, DESCRIPTOR > const &  block,
hemo::Array< double, 3 > const &  position,
std::vector< plb::Dot3D > &  cellPos,
std::vector< double > &  weights 
)

◆ interpolationCoefficientsPhi4c()

template<typename T , template< typename U > class Descriptor>
void hemo::interpolationCoefficientsPhi4c ( plb::BlockLattice3D< T, Descriptor > const &  block,
hemo::Array< T, 3 > const &  position,
std::vector< plb::Dot3D > &  cellPos,
std::vector< T > &  weights 
)

◆ loadDirectories()

void hemo::loadDirectories ( hemo::Config *  cfg,
bool  edit_out_dir 
)

◆ loadGlobalConfigValues()

void hemo::loadGlobalConfigValues ( hemo::Config *  cfg)

◆ meshRotation()

void hemo::meshRotation ( TriangularSurfaceMesh< T > *  mesh,
hemo::Array< T, 3 >  rotationAngles 
)
inline

◆ mkpath()

int hemo::mkpath ( const char *  path,
mode_t  mode 
)

mkpath - ensure all directories in path exist Algorithm takes the pessimistic view and works top-down to ensure each directory in path exists, rather than optimistically creating the last element and working backwards.

◆ MollerTrumbore()

int hemo::MollerTrumbore ( const hemo::Array< T, 3 > &  v0,
const hemo::Array< T, 3 > &  v1,
const hemo::Array< T, 3 > &  v2,
hemo::Array< plint, 3 > &  rayPoint 
)
inline

◆ nearestNode()

plint hemo::nearestNode ( T  x)
inline

The lattice node nearest to a coordinate [lattice units].

Rounds half up, also for negative coordinates (e.g. -0.7 -> -1, -2.7 -> -3); plint(x + 0.5) truncates towards zero and gives the node one too high for x < -0.5. Use it for absolute and block-local coordinates alike.

◆ norm()

template<typename _Tp , std::size_t _Nm>
_Tp hemo::norm ( const Array< _Tp, _Nm > &  one)
inline

◆ operator*() [1/2]

template<typename _Tp , std::size_t _Nm, typename _Tp2 >
Array< _Tp, _Nm > hemo::operator* ( const _Tp2  mul,
const Array< _Tp, _Nm > &  one 
)
inline

◆ operator*() [2/2]

template<typename _Tp , std::size_t _Nm, typename _Tp2 >
Array< _Tp, _Nm > hemo::operator* ( const Array< _Tp, _Nm > &  one,
const _Tp2  mul 
)
inline

◆ operator+() [1/3]

template<typename _Tp , std::size_t _Nm>
Array< _Tp, _Nm > hemo::operator+ ( const Array< _Tp, _Nm > &  one,
const _Tp &  two 
)
inline

◆ operator+() [2/3]

template<typename _Tp , std::size_t _Nm>
Array< _Tp, _Nm > hemo::operator+ ( const Array< _Tp, _Nm > &  one,
const Array< _Tp, _Nm > &  two 
)
inline

◆ operator+() [3/3]

template<typename _Tp , std::size_t _Nm>
Array< _Tp, _Nm > hemo::operator+ ( const Array< _Tp, _Nm > &  one,
const plb::Array< _Tp, _Nm > &  two 
)
inline

◆ operator-() [1/4]

template<typename _Tp >
Array< _Tp, 3 > hemo::operator- ( const Array< _Tp, 3 > &  one,
plb::Dot3D  two 
)
inline

◆ operator-() [2/4]

template<typename _Tp , std::size_t _Nm>
Array< _Tp, _Nm > hemo::operator- ( const Array< _Tp, _Nm > &  one)
inline

◆ operator-() [3/4]

template<typename _Tp , std::size_t _Nm>
Array< _Tp, _Nm > hemo::operator- ( const Array< _Tp, _Nm > &  one,
const Array< _Tp, _Nm > &  two 
)
inline

◆ operator-() [4/4]

template<typename _Tp , typename _Tp2 , std::size_t _Nm>
Array< _Tp2, _Nm > hemo::operator- ( const Array< _Tp, _Nm > &  one,
const Array< _Tp2, _Nm > &  two 
)
inline

◆ operator/()

template<typename _Tp , std::size_t _Nm, typename _Tp2 >
Array< _Tp, _Nm > hemo::operator/ ( const Array< _Tp, _Nm > &  one,
const _Tp2  div 
)
inline

◆ operator<<() [1/6]

Logfile & hemo::operator<< ( Logfile &  lf,
std::ostream &(*)(std::ostream &)  op 
)
inline

◆ operator<<() [2/6]

template<typename Val >
Logfile & hemo::operator<< ( Logfile &  lf,
Val const &  rhs 
)

◆ operator<<() [3/6]

Logfile_only & hemo::operator<< ( Logfile_only &  lf,
std::ostream &(*)(std::ostream &)  op 
)
inline

◆ operator<<() [4/6]

template<typename Val >
Logfile_only & hemo::operator<< ( Logfile_only &  lf,
Val const &  rhs 
)

◆ operator<<() [5/6]

std::ostream & hemo::operator<< ( std::ostream &  stream,
const plb::Box3D &  box 
)
inline

◆ operator<<() [6/6]

std::ostream & hemo::operator<< ( std::ostream &  stream,
const plb::Dot3D &  dot 
)
inline

◆ outputHDF5()

void hemo::outputHDF5 ( hsize_t *  dim,
hsize_t *  chunk,
hid_t &  file_id,
std::string &  name,
float *  output 
)
inline

◆ phi2()

T hemo::phi2 ( T  x)
inline

◆ phi3()

template<typename T >
T hemo::phi3 ( T  x)

◆ phi4()

template<typename T >
T hemo::phi4 ( T  x)

◆ phi4c()

template<typename T >
T hemo::phi4c ( T  x)

◆ positionCellInParticleField()

void hemo::positionCellInParticleField ( HemoCellParticleField &  particleField,
BlockLattice3D< T, DESCRIPTOR > &  fluid,
TriangularSurfaceMesh< T > *  mesh,
hemo::Array< T, 3 >  startingPoint,
plint  cellId,
pluint  celltype 
)
inline

◆ printHeader()

void hemo::printHeader ( )

◆ readPositionsBloodCellField3D()

void hemo::readPositionsBloodCellField3D ( HemoCellFields &  cellFields,
T  dx,
Config &  cfg 
)

Place the cells listed in <type name>.pos of every cell type into the particle fields.

Rank 0 reads the files and broadcasts their text; every rank parses them once and places the cells whose centre lies within particleEnvelope of each of its atomic blocks. Sets cellFields.number_of_cells. Collective: every rank must call it.

Parameters
[in,out]cellFieldsAll cell types; their particle fields receive the cells.
[in]dxLattice spacing in metres (param::dx).
[in]cfgConfiguration, domain/particleEnvelope is read.

◆ readPositionsCellFields()

void hemo::readPositionsCellFields ( std::string  particlePosFile)

◆ renameFileToDotOld()

int hemo::renameFileToDotOld ( std::string  fName)

◆ resetGlobalConfigValues()

void hemo::resetGlobalConfigValues ( )

Put global back to its defaults (except hemoCellInitialized) and clear the run statistics; called when a HemoCell object is destroyed.

◆ rotateTriangularMeshXYZ()

template<typename T >
void hemo::rotateTriangularMeshXYZ ( plb::TriangularSurfaceMesh< T > *  mesh,
T  alpha,
T  beta,
T  gamma 
)

Rotates a triangular surface mesh inplace. The rotation is applied in order X, Y, Z. NOTE: plb::TriangularSurfaceMesh does provide an method to rotate the surface mesh, however, that routine is defined in ZYX order.

◆ vertexClearOfWalls()

bool hemo::vertexClearOfWalls ( BlockLattice3D< T, DESCRIPTOR > &  fluid,
const hemo::Array< T, 3 > &  vertex,
int  denyLayerSize 
)
inline

◆ warning() [1/2]

template<typename First , typename Second , typename... Rest>
void hemo::warning ( const First &  first,
const Second &  second,
const Rest &...  rest 
)

warning() with its arguments streamed into the message.

◆ warning() [2/2]

void hemo::warning ( const std::string &  message)

Report a warning from any rank: like fatal() it writes to stderr with the rank (and to the log file on rank 0), but the run continues.

◆ weakScaling() [1/2]

void hemo::weakScaling ( int  Nx,
int  Ny,
int  Nz,
int  numberOfProcesses,
std::vector< int > &  newNxNyNz 
)

◆ weakScaling() [2/2]

void hemo::weakScaling ( int  Nx,
int  Ny,
int  Nz,
int  numberOfProcesses,
vector< int > &  newNxNyNz 
)

◆ writeCellField3D_HDF5()

void hemo::writeCellField3D_HDF5 ( HemoCellFields &  cellFields,
T  dx,
T  dt,
plint  iter,
std::string  preString = "" 
)

Write the selected outputs of every cell type to HDF5 files (one per atomic block) and describe them in XDMF files (see writeXdmf()). Collective.

Every cell is written once, by the block that holds its vertex 0 (see HemoCellParticleField::getOutputCells()).

Parameters
[in]cellFieldsAll cell types.
[in]dxLattice spacing in metres (stored as attribute).
[in]dtTime step in seconds (stored as attribute; gives the time of the step).
[in]iterIteration of the output step.
[in]preStringPrefix of the output names.

◆ writeCellInfo_CSV()

void hemo::writeCellInfo_CSV ( HemoCell &  hemocell)

◆ writeCEPACField_HDF5() [1/2]

void hemo::writeCEPACField_HDF5 ( HemoCellFields &  cellfields,
T  dx,
T  dt,
plint  iter,
std::string  preString = "" 
)

◆ writeCEPACField_HDF5() [2/2]

void hemo::writeCEPACField_HDF5 ( HemoCellFields &  cellfields,
T  dx,
T  dt,
plint  iter,
string  preString 
)

◆ writeCompressedDataset()

void hemo::writeCompressedDataset ( hid_t  file,
const std::string &  name,
hid_t  type,
int  rank,
const hsize_t *  dims,
const hsize_t *  chunk,
const void *  data 
)

Create the dataset name in file and write data to it, chunked, byte-shuffled and deflate-compressed.

Parameters
[in]fileOpen HDF5 file.
[in]nameDataset name.
[in]typeHDF5 native type of data, also the stored type (e.g. H5T_NATIVE_FLOAT, H5T_NATIVE_INT).
[in]rankNumber of dimensions.
[in]dimsSize of each dimension, slowest varying first; may be 0.
[in]chunkChunk size of each dimension, each at least 1.
[in]dataArray of dims[0] * ... * dims[rank-1] values in C order.

◆ writeFluidField_HDF5() [1/2]

void hemo::writeFluidField_HDF5 ( HemoCellFields &  cellFields,
T  dx,
T  dt,
plint  iter,
std::string  preString = "" 
)

◆ writeFluidField_HDF5() [2/2]

void hemo::writeFluidField_HDF5 ( HemoCellFields &  cellfields,
T  dx,
T  dt,
plint  iter,
string  preString 
)

◆ writeXdmf()

void hemo::writeXdmf ( const std::vector< XdmfBlockFile > &  blocks,
plb::plint  iter,
double  time 
)

Write the XDMF (version 3) description of one output step. Collective.

Rank 0 gathers the block files of all ranks and writes, for every identifier, into the output directory:

  • <identifier>.<iteration>.xmf: this step, a spatial collection of the blocks with its time;
  • <identifier>.xmf: all steps of the identifier found in the output directory (including those of earlier runs restarted from a checkpoint), as a temporal collection that includes the step files. Cell blocks without vertices are omitted; cell types without a "Position" dataset cannot be described and must not be passed. Both files are written to a temporary name first and then renamed, so a reader never sees a partial file. Paths in the files are relative to the output directory.
Parameters
[in]blocksThe block files written by this rank in this step.
[in]iterIteration of the step (names the step file).
[in]timeTime of the step: seconds for SI output, iterations otherwise.

◆ zeroPadNumber()

std::string hemo::zeroPadNumber ( int  num,
int  w 
)

Variable Documentation

◆ ELLIPSOID_FROM_SPHERE

constexpr int hemo::ELLIPSOID_FROM_SPHERE = 6
constexpr

◆ global

ConfigValues hemo::global

◆ hlog

Logfile hemo::hlog

◆ hlogfile

Logfile_only hemo::hlogfile

◆ MESH_FROM_STL

constexpr int hemo::MESH_FROM_STL = 2
constexpr

◆ OUTPUT_BINDING_SITES

constexpr int hemo::OUTPUT_BINDING_SITES = 14
constexpr

◆ OUTPUT_BOUNDARY

constexpr int hemo::OUTPUT_BOUNDARY = 13
constexpr

◆ OUTPUT_CELL_DENSITY

constexpr int hemo::OUTPUT_CELL_DENSITY = 9
constexpr

◆ OUTPUT_CELL_ID

constexpr int hemo::OUTPUT_CELL_ID = 8
constexpr

◆ OUTPUT_DENSITY

constexpr int hemo::OUTPUT_DENSITY = 5
constexpr

◆ OUTPUT_FORCE

constexpr int hemo::OUTPUT_FORCE = 2
constexpr

◆ OUTPUT_FORCE_AREA

constexpr int hemo::OUTPUT_FORCE_AREA = 23
constexpr

◆ OUTPUT_FORCE_BENDING

constexpr int hemo::OUTPUT_FORCE_BENDING = 22
constexpr

◆ OUTPUT_FORCE_INNER_LINK

constexpr int hemo::OUTPUT_FORCE_INNER_LINK = 26
constexpr

◆ OUTPUT_FORCE_LINK

constexpr int hemo::OUTPUT_FORCE_LINK = 24
constexpr

◆ OUTPUT_FORCE_REPULSION

constexpr int hemo::OUTPUT_FORCE_REPULSION = 27
constexpr

◆ OUTPUT_FORCE_VISC

constexpr int hemo::OUTPUT_FORCE_VISC = 25
constexpr

◆ OUTPUT_FORCE_VOLUME

constexpr int hemo::OUTPUT_FORCE_VOLUME = 21
constexpr

◆ OUTPUT_INNER_LINKS

constexpr int hemo::OUTPUT_INNER_LINKS = 11
constexpr

◆ OUTPUT_INTERIOR_POINTS

constexpr int hemo::OUTPUT_INTERIOR_POINTS = 15
constexpr

◆ OUTPUT_OMEGA

constexpr int hemo::OUTPUT_OMEGA = 12
constexpr

◆ OUTPUT_POSITION

constexpr int hemo::OUTPUT_POSITION = 1
constexpr

◆ OUTPUT_RES_TIME

constexpr int hemo::OUTPUT_RES_TIME = 18
constexpr

◆ OUTPUT_SHEAR_RATE

constexpr int hemo::OUTPUT_SHEAR_RATE = 16
constexpr

◆ OUTPUT_SHEAR_STRESS

constexpr int hemo::OUTPUT_SHEAR_STRESS = 10
constexpr

◆ OUTPUT_STRAIN_RATE

constexpr int hemo::OUTPUT_STRAIN_RATE = 17
constexpr

◆ OUTPUT_TRIANGLES

constexpr int hemo::OUTPUT_TRIANGLES = 3
constexpr

◆ OUTPUT_VELOCITY

constexpr int hemo::OUTPUT_VELOCITY = 4
constexpr

◆ OUTPUT_VERTEX_ID

constexpr int hemo::OUTPUT_VERTEX_ID = 7
constexpr

◆ outputDeflateLevel

constexpr unsigned int hemo::outputDeflateLevel = 4
constexpr

Deflate (zlib) level of every HDF5 output dataset. The bytes are shuffled before deflating, which compresses floating-point data better and faster than a higher level without shuffling.

◆ RBC_FROM_SPHERE

constexpr int hemo::RBC_FROM_SPHERE = 1
constexpr

◆ STRING_FROM_VERTEXES

constexpr int hemo::STRING_FROM_VERTEXES = 7
constexpr

◆ WBC_SPHERE

constexpr int hemo::WBC_SPHERE = 0
constexpr