47#ifndef COMPILING_HEMOCELL_LIBRARY
50#include "palabos3D.hh"
125 template <
class Mechanics>
128 Mechanics * mechanics =
new Mechanics(*cellfield->
materialCfg, *cellfield);
139 void setOutputs(std::string name, std::vector<int> outputs);
172 hlog <<
"(HemoCell) Enabling Solidify Mechanics for " << name <<
" mechanical model" << std::endl;
173 (*cellfields)[name]->doSolidifyMechanics =
true;
333 plb::MultiScalarField3D<int> & flagMatrix);
363 std::chrono::high_resolution_clock::duration
lastOutput = std::chrono::high_resolution_clock::duration::zero();
Definition hemoCellField.h:42
Config * materialCfg
Definition hemoCellField.h:56
CellMechanics * mechanics
Definition hemoCellField.h:86
void statistics()
Definition hemoCellField.cpp:160
Definition hemoCellFields.h:54
HemoCellField * addCellType(std::string name_, int constructType)
Add a cell type with a certain mesh; its name also selects name_.xml and name_.pos
Definition hemoCellFields.cpp:140
T calculateFractionalLoadImbalance()
Calculate and return the fractional load imbalance.
Definition hemoCell.cpp:465
void sanityCheck()
To be run right before the first iteration, all checking should move here.
Definition hemoCell.cpp:700
void loadCheckPoint()
Definition hemoCell.cpp:274
plb::MultiBlockLattice3D< T, DESCRIPTOR > * preinlet_lattice
Definition hemocell.h:343
plb::MultiBlockManagement3D * preinlet_lattice_management
Definition hemocell.h:345
void setParticleVelocityUpdateTimeScaleSeparation(unsigned int separation)
Interpolate the fluid velocity to the vertices (and synchronise the particle envelopes) every separat...
Definition hemoCell.cpp:476
bool repulsionEnabled
Definition hemocell.h:141
std::map< plint, plint > BlockToMpi
Definition hemocell.h:339
bool sanityCheckDone
Checked in iteration, do sanity check when not yet done.
Definition hemocell.h:368
void doRestructure(bool checkpoint_avail=true)
Restructure the grid, has an optional argument to specify whether a checkpoint from this iteration is...
Definition hemoCell.cpp:695
void setRepulsionTimeScaleSeperation(unsigned int separation)
Definition hemoCell.cpp:483
void setFluidOutputs(std::vector< int > outputs)
Select the fluid fields written by writeOutput() (OUTPUT_* constants).
Definition hemoCell.cpp:197
void setPlaceCellsAcrossPeriodicBoundaries(bool place)
Also place the cells of the .pos files that cross a periodic boundary (default: off,...
Definition hemoCell.cpp:503
void initializeLattice(plb::MultiBlockManagement3D const &management)
Initialize the fluid field with the given management, should be done after specifing the pre inlets a...
Definition hemoCell.cpp:573
void setOutputs(std::string name, std::vector< int > outputs)
Select the cell fields written by writeOutput() for a cell type.
Definition hemoCell.cpp:191
void setInteriorViscosityTimeScaleSeperation(unsigned int separation, unsigned int separation_entire_grid)
Definition hemoCell.cpp:493
void initializeCellfield()
Create the cell fields and the particle field on the current lattice. Collective. Call after the latt...
Definition hemoCell.cpp:179
void addCellType(std::string name, int constructType)
Add a cell type with constitutive model Mechanics.
Definition hemocell.h:126
void setCEPACOutputs(std::vector< int > outputs)
Select the CEPAC fields written by writeOutput() (OUTPUT_* constants).
Definition hemoCell.cpp:203
void loadParticles()
Place the cells listed in the <name>.pos files (positions in micrometre, rotations in degrees,...
Definition hemoCell.cpp:229
void initializeLatticeFromFlagMatrix(plb::MultiBlockManagement3D const &management, plb::MultiScalarField3D< int > &flagMatrix)
Create the fluid lattice of a voxelised geometry without a pre-inlet.
Definition hemoCell.cpp:556
bool boundaryRepulsionEnabled
Definition hemocell.h:142
PreInlet * preInlet
Definition hemocell.h:335
void setSystemPeriodicityLimit(unsigned int axis, int limit)
Number of periodic images of a cell distinguishable along axis (default 100 for each axis)....
Definition hemoCell.cpp:220
double * LEcurrentDisplacement
Definition hemocell.h:161
HemoCellFields * cellfields
The cellfields contains the particle field and all celltypes.
Definition hemocell.h:349
void enableBoundaryParticles(T boundaryRepulsionConstant, T boundaryRepulsionCutoff, unsigned int timestep=1)
Enable repulsion between vertices and wall (solid) nodes. Collective (detects the wall nodes next to ...
Definition hemoCell.cpp:546
void saveCheckPoint()
Save a checkpoint to <outputDirectory>/<checkpointDirectory>/. Collective.
Definition hemoCell.cpp:281
LoadBalancer * loadBalancer
Definition hemocell.h:341
void checkExitSignals()
Act on a caught exit signal (SIGINT, SIGTERM, SIGHUP, SIGQUIT, SIGUSR1, SIGUSR2).
Definition hemoCell.cpp:357
unsigned int iter
Definition hemocell.h:350
bool outputInSiUnits
Write output in SI units (default) or in lattice units.
Definition hemocell.h:277
void setSolidifyTimeScaleSeperation(unsigned int separation)
Run the solidification step every separation iterations (default 1).
Definition hemoCell.cpp:488
void doLoadBalance()
Load balance the domain (only necessary with nAtomic blocks > nMpi processors, also checkpoints.
unsigned int getLastOutputIteration() const
Definition hemocell.h:356
void setLastOutputIteration(unsigned int iteration)
Restore the last output iteration (used when loading a checkpoint).
Definition hemocell.h:358
bool checkpointOnExitSignal
Save a checkpoint before exiting on a caught signal.
Definition hemocell.h:305
unsigned int lastOutputAt
Store the last time (iteration) output occured.
Definition hemocell.h:362
plb::MultiBlockManagement3D * domain_lattice_management
Definition hemocell.h:345
plb::XMLreader * documentXML
Definition hemocell.h:352
MPIHandle
Switch to indicate if the MPI instance is managed externally. The MPI instance is typically invoked w...
Definition hemocell.h:74
void setRepulsion(T repulsionConstant, T repulsionCutoff)
Enable repulsion between vertices of different cells.
Definition hemoCell.cpp:539
void setInitialMinimumDistanceFromSolid(std::string name, T distance)
Reject initial vertices of a cell type closer than distance to a solid node: vertices within floor(di...
Definition hemoCell.cpp:510
Config * cfg
Definition hemocell.h:347
void writeOutput()
Definition hemoCell.cpp:291
plb::MultiBlockLattice3D< T, DESCRIPTOR > * lattice
The fluid lattice.
Definition hemocell.h:343
void iterate()
Advance the coupled fluid and cells by one time step. Collective. The lattice force is reset at the e...
Definition hemoCell.cpp:377
~HemoCell()
Definition hemoCell.cpp:154
void latticeEquilibrium(T rho, hemo::Array< T, 3 > vel)
Initialise every fluid node at equilibrium.
Definition hemoCell.cpp:173
void setMaterialTimeScaleSeparation(std::string name, unsigned int separation)
Evaluate the constitutive model of a cell type every separation iterations (default 1)....
Definition hemoCell.cpp:470
void enableSolidifyMechanics(std::string name)
Definition hemocell.h:171
bool leesEdwardsBC
Definition hemocell.h:158
plb::MultiBlockLattice3D< T, DESCRIPTOR > * domain_lattice
Definition hemocell.h:343
bool partOfpreInlet
Definition hemocell.h:337
unsigned int exitSignalCheckInterval
Iterations between collective exit-signal checks in iterate() (0 disables them).
Definition hemocell.h:303
std::chrono::high_resolution_clock::duration lastOutput
Definition hemocell.h:363
void setSystemPeriodicity(unsigned int axis, bool bePeriodic)
Set periodicity of the fluid and the particle field together. Call after initializeCellfield() and be...
Definition hemoCell.cpp:210
bool loadParticlesIsCalled
Definition hemocell.h:259
Definition loadBalancer.h:31
#define HEMOCELL_BUILD_CONFIGURATION
Definition constant_defaults.h:233
double T
Definition constant_defaults.h:137
int argc
Definition main.cpp:32
char ** argv
Definition main.cpp:33
Logfile hlog
Definition logfile.cpp:26