|
hemocell
|
Namespaces | |
| namespace | detail |
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 Parameters hemo::param |
Short name of Parameters (formerly a macro), e.g. param::dx.
| typedef struct stat hemo::Stat |
| _Tp hemo::angleBetweenVectors | ( | const Array< _Tp, 3 > & | one, |
| const Array< _Tp, 3 > & | two | ||
| ) |
| void hemo::boundaryFromFlagMatrix | ( | plb::MultiBlockLattice3D< T, DESCRIPTOR > * | fluid, |
| plb::MultiScalarField3D< int > * | flagMatrix, | ||
| bool | partOfpreInlet | ||
| ) |
|
inline |
| _Tp hemo::computeCotangentFromVectors | ( | const Array< _Tp, 3 > & | a, |
| const Array< _Tp, 3 > & | b | ||
| ) |
| _Tp hemo::computeLength | ( | const Array< _Tp, 3 > & | v | ) |
| void hemo::computeLengthsPythagoras | ( | const Array< _Tp, 3 > & | a, |
| const Array< _Tp, 3 > & | b, | ||
| _Tp & | a_l, | ||
| _Tp & | b_l, | ||
| _Tp & | c_l | ||
| ) |
| 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.
| [in,out] | particles | Particle vector the grid was built from. |
| [in] | grid | Grid built from particles. |
| [in] | r_const | Force constant [lattice force units]. |
| [in] | r_cutoff | Cut-off distance [lattice units]. |
| _Tp hemo::computeTriangleArea | ( | const Array< _Tp, 3 > & | v0, |
| const Array< _Tp, 3 > & | v1, | ||
| const Array< _Tp, 3 > & | v2 | ||
| ) |
| void hemo::computeTriangleAreaAndUnitNormal | ( | const Array< _Tp, 3 > & | v0, |
| const Array< _Tp, 3 > & | v1, | ||
| const Array< _Tp, 3 > & | v2, | ||
| _Tp & | area, | ||
| Array< _Tp, 3 > & | unitNormal | ||
| ) |
| Array< _Tp, 3 > hemo::computeTriangleNormal | ( | const Array< _Tp, 3 > & | v0, |
| const Array< _Tp, 3 > & | v1, | ||
| const Array< _Tp, 3 > & | v2, | ||
| bool | isAreaWeighted | ||
| ) |
|
inline |
Decide if a Lagrangian point is contained in 3D box, boundaries exclusive.
|
inline |
|
inline |
|
inline |
| void hemo::curateInterpolationCoefficients | ( | plb::BlockLattice3D< T, Descriptor > & | fluid, |
| std::vector< plb::Dot3D > & | cellPos, | ||
| std::vector< T > & | weights | ||
| ) |
|
inline |
| int hemo::do_mkdir | ( | const char * | path, |
| mode_t | mode | ||
| ) |
|
inline |
|
inline |
| 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").
| 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.
| [in] | message | Description of the error, without a trailing newline. |
|
inline |
| 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).
| 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.
| void hemo::getFlagMatrixFromSTL | ( | Config & | cfg, |
| std::unique_ptr< VoxelizedDomain3D< T > > & | voxelizedDomain, | ||
| std::unique_ptr< MultiScalarField3D< int > > & | flagMatrix | ||
| ) |
| void hemo::getFlagMatrixFromSTL | ( | Config & | cfg, |
| VoxelizedDomain3D< T > *& | voxelizedDomain, | ||
| MultiScalarField3D< int > *& | flagMatrix | ||
| ) |
| 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.
| [in] | meshFileName | STL file, relative to the working directory |
| [in] | extendedEnvelopeWidth | envelope of the voxelised blocks [lattice nodes] |
| [in] | refDirLength | extent of the geometry along refDir [lattice nodes] |
| [in] | refDir | reference direction (0 x, 1 y, 2 z) |
| [out] | voxelizedDomain | the voxelised domain (its block management) |
| [out] | flagMatrix | 1 at fluid nodes, 0 elsewhere |
| [in] | blockSize | atomic block size [lattice nodes]; <= 0 for one block per rank |
| [in] | particleEnvelope | only used for advice in the log (0: 25) |
| 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).
| void hemo::getFlagMatrixFromSTL | ( | std::string | meshFileName, |
| plint | extendedEnvelopeWidth, | ||
| plint | refDirLength, | ||
| plint | refDir, | ||
| VoxelizedDomain3D< T > *& | voxelizedDomain, | ||
| MultiScalarField3D< int > *& | flagMatrix, | ||
| plint | blockSize, | ||
| int | particleEnvelope | ||
| ) |
| int hemo::getTotalNumberOfCells | ( | HemoCellFields & | cellFields | ) |
Sum of the cell counts in the first line of every <type name>.pos file (read on each rank).
| void hemo::interpolationCoefficients | ( | plb::BlockLattice3D< T, Descriptor > const & | block, |
| hemo::Array< T, 3 > const & | position, | ||
| std::vector< plb::Dot3D > & | cellPos, | ||
| std::vector< T > & | weights | ||
| ) |
| void hemo::interpolationCoefficientsPhi1 | ( | plb::BlockLattice3D< T, Descriptor > const & | block, |
| hemo::Array< T, 3 > const & | position, | ||
| std::vector< plb::Dot3D > & | cellPos, | ||
| std::vector< T > & | weights | ||
| ) |
|
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.
| block | fluid block of the particle (block-local node coordinates) |
| particle | particle with absolute lattice position sv.position |
| void hemo::interpolationCoefficientsPhi3 | ( | plb::BlockLattice3D< T, Descriptor > const & | block, |
| hemo::Array< T, 3 > const & | position, | ||
| std::vector< plb::Dot3D > & | cellPos, | ||
| std::vector< T > & | weights | ||
| ) |
| void hemo::interpolationCoefficientsPhi4 | ( | plb::BlockLattice3D< double, DESCRIPTOR > const & | block, |
| hemo::Array< double, 3 > const & | position, | ||
| std::vector< plb::Dot3D > & | cellPos, | ||
| std::vector< double > & | weights | ||
| ) |
| void hemo::interpolationCoefficientsPhi4c | ( | plb::BlockLattice3D< T, Descriptor > const & | block, |
| hemo::Array< T, 3 > const & | position, | ||
| std::vector< plb::Dot3D > & | cellPos, | ||
| std::vector< T > & | weights | ||
| ) |
| void hemo::loadDirectories | ( | hemo::Config * | cfg, |
| bool | edit_out_dir | ||
| ) |
| void hemo::loadGlobalConfigValues | ( | hemo::Config * | cfg | ) |
|
inline |
| 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.
|
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.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
| Logfile_only & hemo::operator<< | ( | Logfile_only & | lf, |
| Val const & | rhs | ||
| ) |
|
inline |
|
inline |
|
inline |
|
inline |
| void hemo::printHeader | ( | ) |
| 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.
| [in,out] | cellFields | All cell types; their particle fields receive the cells. |
| [in] | dx | Lattice spacing in metres (param::dx). |
| [in] | cfg | Configuration, domain/particleEnvelope is read. |
| void hemo::readPositionsCellFields | ( | std::string | particlePosFile | ) |
| int hemo::renameFileToDotOld | ( | std::string | fName | ) |
| void hemo::resetGlobalConfigValues | ( | ) |
Put global back to its defaults (except hemoCellInitialized) and clear the run statistics; called when a HemoCell object is destroyed.
| 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.
|
inline |
| void hemo::warning | ( | const First & | first, |
| const Second & | second, | ||
| const Rest &... | rest | ||
| ) |
warning() with its arguments streamed into the message.
| 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.
| void hemo::weakScaling | ( | int | Nx, |
| int | Ny, | ||
| int | Nz, | ||
| int | numberOfProcesses, | ||
| std::vector< int > & | newNxNyNz | ||
| ) |
| void hemo::weakScaling | ( | int | Nx, |
| int | Ny, | ||
| int | Nz, | ||
| int | numberOfProcesses, | ||
| vector< int > & | newNxNyNz | ||
| ) |
| 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()).
| [in] | cellFields | All cell types. |
| [in] | dx | Lattice spacing in metres (stored as attribute). |
| [in] | dt | Time step in seconds (stored as attribute; gives the time of the step). |
| [in] | iter | Iteration of the output step. |
| [in] | preString | Prefix of the output names. |
| void hemo::writeCellInfo_CSV | ( | HemoCell & | hemocell | ) |
| void hemo::writeCEPACField_HDF5 | ( | HemoCellFields & | cellfields, |
| T | dx, | ||
| T | dt, | ||
| plint | iter, | ||
| std::string | preString = "" |
||
| ) |
| void hemo::writeCEPACField_HDF5 | ( | HemoCellFields & | cellfields, |
| T | dx, | ||
| T | dt, | ||
| plint | iter, | ||
| string | preString | ||
| ) |
| 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.
| [in] | file | Open HDF5 file. |
| [in] | name | Dataset name. |
| [in] | type | HDF5 native type of data, also the stored type (e.g. H5T_NATIVE_FLOAT, H5T_NATIVE_INT). |
| [in] | rank | Number of dimensions. |
| [in] | dims | Size of each dimension, slowest varying first; may be 0. |
| [in] | chunk | Chunk size of each dimension, each at least 1. |
| [in] | data | Array of dims[0] * ... * dims[rank-1] values in C order. |
| void hemo::writeFluidField_HDF5 | ( | HemoCellFields & | cellFields, |
| T | dx, | ||
| T | dt, | ||
| plint | iter, | ||
| std::string | preString = "" |
||
| ) |
| void hemo::writeFluidField_HDF5 | ( | HemoCellFields & | cellfields, |
| T | dx, | ||
| T | dt, | ||
| plint | iter, | ||
| string | preString | ||
| ) |
| 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.| [in] | blocks | The block files written by this rank in this step. |
| [in] | iter | Iteration of the step (names the step file). |
| [in] | time | Time of the step: seconds for SI output, iterations otherwise. |
| std::string hemo::zeroPadNumber | ( | int | num, |
| int | w | ||
| ) |
|
constexpr |
| ConfigValues hemo::global |
| Logfile hemo::hlog |
| Logfile_only hemo::hlogfile |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
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.
|
constexpr |
|
constexpr |
|
constexpr |