|
hemocell
|
#include <hemoCellFields.h>

Classes | |
| class | CompleteCellsScope |
| Complete cells for reading, without changing the simulation. More... | |
| class | HemoAdvanceParticles |
| class | HemoApplyConstitutiveModel |
| class | HemoBoundaryRepulsionForce |
| class | HemoDeleteIncompleteCells |
| class | HemoDeleteNonLocalParticles |
| class | HemoFindInternalParticleGridPoints |
| class | HemoGetParticles |
| class | HemoInternalGridPointsMembrane |
| class | HemoInterpolateFluidVelocity |
| class | HemoPopulateBindingSites |
| class | HemoPopulateBoundaryParticles |
| class | HemoPrepareSolidification |
| class | HemoRepulsionForce |
| class | HemoSeperateForceVectors |
| class | HemoSetParticles |
| class | HemoSolidifyCells |
| class | HemoSpreadParticleForce |
| class | HemoUnifyForceVectors |
| class | HemoupdateResidenceTime |
Public Member Functions | |
| HemoCellFields (plb::MultiBlockLattice3D< T, DESCRIPTOR > &lattice_, unsigned int particleEnvelopeWidth, HemoCell &) | |
| Default constructor, needs an palabos lattice, envelope width (lbm units), and hemocell reference. | |
| void | createParticleField (plb::SparseBlockStructure3D *sbStructure_=0, plb::ThreadAttribution *tAttribution_=0) |
| void | createCEPACfield () |
| void | InitAfterLoadCheckpoint () |
| Used to set variables inside the celltypes for correct access, called through createParticleField. | |
| ~HemoCellFields () | |
| Generic Destructor. | |
| HemoCellField * | addCellType (std::string name_, int constructType) |
Add a cell type with a certain mesh; its name also selects name_.xml and name_.pos | |
| HemoCellField * | operator[] (unsigned int index) |
| Easy access to contained celltypes. | |
| HemoCellField * | operator[] (std::string name) |
| Easy access to contained celltypes. | |
| unsigned int | size () |
| Get the number of celltypes. | |
| void | load (plb::XMLreader *documentXML, unsigned int &iter, Config *cfg=NULL) |
| void | save (plb::XMLreader *documentXML, unsigned int iter, Config *cfg=NULL) |
| void | saveCheckPointDescription (plb::XMLreader *documentXML, unsigned int iter) |
| plb::MultiParticleField3D< HemoCellParticleField > & | getParticleField3D () |
| Legacy Helper function to get the particle field, mostly unused as direct access is available. | |
| void | readPositionsCellFields (std::string particlePosFile) |
| Legacy reads in only RBC an PLT from a single pos file. | |
| void | advanceParticles () |
| Advance the particles in an iteration. | |
| void | findInternalParticleGridPoints () |
| void | internalGridPointsMembrane () |
| void | interpolateFluidVelocity () |
| Interpolate the velocity of the fluid to the individual particles. | |
| void | spreadParticleForce () |
| Spread the force of all particles over the fluid in this iteration. | |
| void | separate_force_vectors () |
| Separate the force vectors of particles so it becomes clear what the vector for each separate force is. | |
| void | unify_force_vectors () |
| Unify the force vectors of particles to point to a single force. | |
| void | applyRepulsionForce () |
| Apply (and calculate) the repulsion force between particles. | |
| void | applyBoundaryRepulsionForce (bool resetFirst=false) |
| void | capRepulsionForce () |
| void | deleteIncompleteCells (bool verbose=true) |
| Delete any incomplete cells on a block. | |
| void | deleteBrokenCells (plint envelope, bool verbose) |
| void | applyConstitutiveModel (bool forced=false) |
| Apply the material model of the cells to the particles, updating their force. | |
| void | syncEnvelopes () |
| Sync the particle envelopes between domains. | |
| void | getParticles (std::vector< HemoCellParticle * > &particles, plb::Box3D &domain) |
| Get particles in a given domain. | |
| void | addParticles (std::vector< HemoCellParticle > &particles) |
| Add particles to local processors. | |
| void | populateBoundaryParticles () |
| Add boundary particles on the fluid-solid boundary. | |
| void | populateBindingSites (plb::Box3D *box=0) |
| Add bindingSites. | |
| void | deleteNonLocalParticles (int envelope) |
| Delete non local particles (do not delete in envelopesize) | |
| void | solidifyCells () |
| Conditionally solidify cells if requested. | |
| void | prepareSolidification () |
| void | updateResidenceTime (unsigned int rtime) |
| increment cell residence time | |
| plint | base_cell_id (plint wrapped) const |
| void | calculateCommunicationStructure () |
Public Attributes | |
| plb::MultiBlockLattice3D< T, DESCRIPTOR > * | lattice |
| the fluid lattice | |
| std::vector< int > | desiredFluidOutputVariables |
| A vector specifying the output variables (from const_defaults.h) | |
| std::vector< int > | desiredCEPACfieldOutputVariables |
| HemoCell & | hemocell |
| Reference to parent. | |
| std::vector< HemoCellField * > | cellFields |
| Vector containing the cellTypes. | |
| pluint | envelopeSize |
| The envelopeSize for the particles. | |
| plb::MultiParticleField3D< HemoCellParticleField > * | immersedParticles = 0 |
| palabos field storing the particles | |
| plb::MultiParticleField3D< HemoCellParticleField > * | preinlet_immersedParticles = 0 |
| seperate preinlet and domain pointers whenever necessary | |
| plb::MultiParticleField3D< HemoCellParticleField > * | domain_immersedParticles = 0 |
| plb::MultiBlockLattice3D< T, CEPAC_DESCRIPTOR > * | CEPACfield = 0 |
| palabos field for storing the CPAC scalar field if used | |
| bool | placeCellsAcrossPeriodicBoundaries = false |
| T | repulsionCutoff = 0.0 |
| Repulsion cutoff [lattice units], set by HemoCell::setRepulsion() | |
| T | repulsionConstant = 0.0 |
| Repulsion constant [lattice force units], set by HemoCell::setRepulsion() (in pN) | |
| pluint | repulsionTimescale = 1 |
| Timescale seperation for repulsion, set through hemocell.h. | |
| T | boundaryRepulsionCutoff = 0.0 |
| Wall repulsion cutoff [lattice units], set by HemoCell::enableBoundaryParticles() | |
| T | boundaryRepulsionConstant = 0.0 |
| Wall repulsion constant [lattice force units], set by HemoCell::enableBoundaryParticles() (in pN) | |
| pluint | boundaryRepulsionTimescale = 1 |
| Timescale seperation for boundary repulsion, set through hemocell.h. | |
| pluint | particleVelocityUpdateTimescale = 1 |
| Timescale seperation for the velocity interpolation from the fluid to the particle. | |
| pluint | solidifyTimescale = 1 |
| pluint | interiorViscosityTimescale = 1 |
| pluint | interiorViscosityEntireGridTimescale = 1 |
| int | periodicity_limit [3] = {100, 100, 100} |
| Limit of cycles in a direction (xyz); offsets below must match these defaults. | |
| int | periodicity_limit_offset_y = 100 |
| int | periodicity_limit_offset_z = 10000 |
| int | number_of_cells = 0 |
| bool | number_of_cells_from_checkpoint = false |
| unsigned int | max_neighbours = 0 |
| bindingFieldHelper * | bindingHelper = 0 |
| InteriorViscosityHelper * | interiorViscosityHelper = 0 |
| plb::CommunicationStructure3D * | large_communicator = 0 |
Private Member Functions | |
| void | copyXMLreader2XMLwriter (plb::XMLreader const &reader, plb::XMLwriter &writer) |
| void | copyXMLreader2XMLwriter (plb::XMLreaderProxy readerProxy, plb::XMLwriter &writer) |
| void | checkCheckPointFingerprint (plb::XMLreader &documentXML) |
| void | loadCEPACfield (const std::string &checkpointDirectory) |
| Load the CEPAC field from a checkpoint directory if it is enabled and present. | |
| void | exchangeEnvelopes () |
Private Attributes | |
| std::vector< std::vector< NoInitChar > > | sendBuffers |
| std::vector< std::vector< NoInitChar > > | recvBuffers |
| std::vector< int > | envelopeSendRanks |
| std::vector< int > | envelopeRecvRanks |
| std::vector< std::vector< int > > | envelopeSendSizes |
| std::vector< std::vector< int > > | envelopeRecvSizes |
| std::vector< std::vector< NoInitChar > > | envelopeSendData |
| std::vector< std::vector< NoInitChar > > | envelopeRecvData |
| std::vector< std::vector< const plb::CommunicationInfo3D * > > | envelopeRecvInfos |
| MPI_Comm | particleComm = MPI_COMM_NULL |
| unsigned int | completeCellsScopes = 0 |
| Number of CompleteCellsScope objects that exist (they nest). | |
This class can contain many cellTypes, it keeps track of all the particles of all types. The option exists to get exclusive access to a single cellType if necessary. all the particles are stored in a single particlefield
| hemo::HemoCellFields::HemoCellFields | ( | plb::MultiBlockLattice3D< T, DESCRIPTOR > & | lattice_, |
| unsigned int | particleEnvelopeWidth, | ||
| HemoCell & | |||
| ) |
Default constructor, needs an palabos lattice, envelope width (lbm units), and hemocell reference.
| hemo::HemoCellFields::~HemoCellFields | ( | ) |
Generic Destructor.
| HemoCellField * hemo::HemoCellFields::addCellType | ( | std::string | name_, |
| int | constructType | ||
| ) |
Add a cell type with a certain mesh; its name also selects name_.xml and name_.pos
| void hemo::HemoCellFields::addParticles | ( | std::vector< HemoCellParticle > & | particles | ) |
Add particles to local processors.
| void hemo::HemoCellFields::advanceParticles | ( | ) |
Advance the particles in an iteration.
| void hemo::HemoCellFields::applyBoundaryRepulsionForce | ( | bool | resetFirst = false | ) |
Apply (and calculate) the repulsion force between particles and the boundary. It is added to sv.force_repulsion; with resetFirst that field is zeroed first (needed when particle-particle repulsion, which normally resets it, is not enabled).
| void hemo::HemoCellFields::applyConstitutiveModel | ( | bool | forced = false | ) |
Apply the material model of the cells to the particles, updating their force.
| void hemo::HemoCellFields::applyRepulsionForce | ( | ) |
Apply (and calculate) the repulsion force between particles.
The ID a cell was loaded with (0 .. number_of_cells - 1) from the ID of one of its periodic images, which grows by a multiple of number_of_cells at every periodic crossing (HemoCellParticleDataTransfer::getOffset()).
| void hemo::HemoCellFields::calculateCommunicationStructure | ( | ) |
| void hemo::HemoCellFields::capRepulsionForce | ( | ) |
Limit the repulsion force (sv.force_repulsion, particle and wall repulsion together) of every particle to FORCE_LIMIT (param::f_limit); no-op if FORCE_LIMIT is not defined. Local to each block (no communication); called after a repulsion update.
|
private |
Fatal error if the build fingerprint of a checkpoint does not match this build and setup; warning if the checkpoint has none (older versions).
|
private |
|
private |
| void hemo::HemoCellFields::createCEPACfield | ( | ) |
| void hemo::HemoCellFields::createParticleField | ( | plb::SparseBlockStructure3D * | sbStructure_ = 0, |
| plb::ThreadAttribution * | tAttribution_ = 0 |
||
| ) |
| void hemo::HemoCellFields::deleteBrokenCells | ( | plint | envelope, |
| bool | verbose | ||
| ) |
Delete the cells that lost vertices, on every block that holds one of their vertices within envelope nodes of its bulk (see HemoCellParticleField::deleteBrokenCells()). Called by HemoCell::iterate() after the particles moved. Not collective.
| void hemo::HemoCellFields::deleteIncompleteCells | ( | bool | verbose = true | ) |
Delete any incomplete cells on a block.
| void hemo::HemoCellFields::deleteNonLocalParticles | ( | int | envelope | ) |
Delete non local particles (do not delete in envelopesize)
|
private |
Fill the particle envelopes of all blocks with the particles in the bulk of their neighbours (normal and enabled periodic overlaps of the particle field). Called by syncEnvelopes(); collective over all ranks.
| void hemo::HemoCellFields::findInternalParticleGridPoints | ( | ) |
| MultiParticleField3D< HemoCellParticleField > & hemo::HemoCellFields::getParticleField3D | ( | ) |
Legacy Helper function to get the particle field, mostly unused as direct access is available.
| void hemo::HemoCellFields::getParticles | ( | std::vector< HemoCellParticle * > & | particles, |
| plb::Box3D & | domain | ||
| ) |
Get particles in a given domain.
| void hemo::HemoCellFields::InitAfterLoadCheckpoint | ( | ) |
Used to set variables inside the celltypes for correct access, called through createParticleField.
| void hemo::HemoCellFields::internalGridPointsMembrane | ( | ) |
| void hemo::HemoCellFields::interpolateFluidVelocity | ( | ) |
Interpolate the velocity of the fluid to the individual particles.
| void hemo::HemoCellFields::load | ( | plb::XMLreader * | documentXML, |
| unsigned int & | iter, | ||
| Config * | cfg = NULL |
||
| ) |
Load a checkpoint, store the current iteration in iter. Checks the build fingerprint written by saveCheckPointDescription() (fatal error on a mismatch; older checkpoints without one load with a warning). Collective.
|
private |
Load the CEPAC field from a checkpoint directory if it is enabled and present.
| HemoCellField * hemo::HemoCellFields::operator[] | ( | std::string | name | ) |
Easy access to contained celltypes.
| HemoCellField * hemo::HemoCellFields::operator[] | ( | unsigned int | index | ) |
Easy access to contained celltypes.
| void hemo::HemoCellFields::populateBindingSites | ( | plb::Box3D * | box = 0 | ) |
Add bindingSites.
| void hemo::HemoCellFields::populateBoundaryParticles | ( | ) |
Add boundary particles on the fluid-solid boundary.
| void hemo::HemoCellFields::prepareSolidification | ( | ) |
| void hemo::HemoCellFields::readPositionsCellFields | ( | std::string | particlePosFile | ) |
Legacy reads in only RBC an PLT from a single pos file.
| void hemo::HemoCellFields::save | ( | plb::XMLreader * | documentXML, |
| unsigned int | iter, | ||
| Config * | cfg = NULL |
||
| ) |
Write the checkpoint data files, after renaming the previous ones (including checkpoint.xml) to .old. checkpoint.xml itself is written last, by saveCheckPointDescription(), so that a checkpoint interrupted while saving has no checkpoint.xml instead of a mismatching one. Collective.
| void hemo::HemoCellFields::saveCheckPointDescription | ( | plb::XMLreader * | documentXML, |
| unsigned int | iter | ||
| ) |
Write checkpoint.xml (configuration, iteration, number of cells and the build fingerprint) under a temporary name and rename it into place. Call after all checkpoint data files are written. Collective.
| void hemo::HemoCellFields::separate_force_vectors | ( | ) |
Separate the force vectors of particles so it becomes clear what the vector for each separate force is.
| unsigned int hemo::HemoCellFields::size | ( | ) |
Get the number of celltypes.
| void hemo::HemoCellFields::solidifyCells | ( | ) |
Conditionally solidify cells if requested.
| void hemo::HemoCellFields::spreadParticleForce | ( | ) |
Spread the force of all particles over the fluid in this iteration.
| void hemo::HemoCellFields::syncEnvelopes | ( | ) |
Sync the particle envelopes between domains.
| void hemo::HemoCellFields::unify_force_vectors | ( | ) |
Unify the force vectors of particles to point to a single force.
| void hemo::HemoCellFields::updateResidenceTime | ( | unsigned int | rtime | ) |
increment cell residence time
| bindingFieldHelper* hemo::HemoCellFields::bindingHelper = 0 |
Helpers created on first use through bindingFieldHelper::get() and InteriorViscosityHelper::get(); owned (and deleted) by this object.
| T hemo::HemoCellFields::boundaryRepulsionConstant = 0.0 |
Wall repulsion constant [lattice force units], set by HemoCell::enableBoundaryParticles() (in pN)
| T hemo::HemoCellFields::boundaryRepulsionCutoff = 0.0 |
Wall repulsion cutoff [lattice units], set by HemoCell::enableBoundaryParticles()
| pluint hemo::HemoCellFields::boundaryRepulsionTimescale = 1 |
Timescale seperation for boundary repulsion, set through hemocell.h.
| std::vector<HemoCellField *> hemo::HemoCellFields::cellFields |
Vector containing the cellTypes.
| plb::MultiBlockLattice3D<T, CEPAC_DESCRIPTOR>* hemo::HemoCellFields::CEPACfield = 0 |
palabos field for storing the CPAC scalar field if used
|
private |
Number of CompleteCellsScope objects that exist (they nest).
| std::vector<int> hemo::HemoCellFields::desiredCEPACfieldOutputVariables |
| std::vector<int> hemo::HemoCellFields::desiredFluidOutputVariables |
A vector specifying the output variables (from const_defaults.h)
| plb::MultiParticleField3D<HemoCellParticleField> * hemo::HemoCellFields::domain_immersedParticles = 0 |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
Partner ranks (ascending) and per-partner message sizes, data and receive overlaps of exchangeEnvelopes(), kept between calls to avoid reallocation.
|
private |
| pluint hemo::HemoCellFields::envelopeSize |
The envelopeSize for the particles.
| HemoCell& hemo::HemoCellFields::hemocell |
Reference to parent.
| plb::MultiParticleField3D<HemoCellParticleField>* hemo::HemoCellFields::immersedParticles = 0 |
palabos field storing the particles
| pluint hemo::HemoCellFields::interiorViscosityEntireGridTimescale = 1 |
| InteriorViscosityHelper* hemo::HemoCellFields::interiorViscosityHelper = 0 |
| pluint hemo::HemoCellFields::interiorViscosityTimescale = 1 |
| plb::CommunicationStructure3D* hemo::HemoCellFields::large_communicator = 0 |
| plb::MultiBlockLattice3D<T, DESCRIPTOR>* hemo::HemoCellFields::lattice |
the fluid lattice
| unsigned int hemo::HemoCellFields::max_neighbours = 0 |
| int hemo::HemoCellFields::number_of_cells = 0 |
Total number of cells in the simulation, should be constant Is set through hemocell::loadParticles() is added (TODO: also when removed)
| bool hemo::HemoCellFields::number_of_cells_from_checkpoint = false |
True once number_of_cells was restored from a checkpoint; it is then no longer re-derived from the .pos files (which may have changed since).
|
private |
Private duplicate of MPI_COMM_WORLD for the particle exchanges in syncEnvelopes(), so their messages cannot be matched by Palabos or other HemoCell traffic. Created in the constructor (collective over all ranks), freed in the destructor.
| pluint hemo::HemoCellFields::particleVelocityUpdateTimescale = 1 |
Timescale seperation for the velocity interpolation from the fluid to the particle.
| int hemo::HemoCellFields::periodicity_limit[3] = {100, 100, 100} |
Limit of cycles in a direction (xyz); offsets below must match these defaults.
| int hemo::HemoCellFields::periodicity_limit_offset_y = 100 |
| int hemo::HemoCellFields::periodicity_limit_offset_z = 10000 |
| bool hemo::HemoCellFields::placeCellsAcrossPeriodicBoundaries = false |
Place the periodic images of cells that cross a periodic boundary at load, see HemoCell::setPlaceCellsAcrossPeriodicBoundaries().
| plb::MultiParticleField3D<HemoCellParticleField>* hemo::HemoCellFields::preinlet_immersedParticles = 0 |
seperate preinlet and domain pointers whenever necessary
|
private |
| T hemo::HemoCellFields::repulsionConstant = 0.0 |
Repulsion constant [lattice force units], set by HemoCell::setRepulsion() (in pN)
| T hemo::HemoCellFields::repulsionCutoff = 0.0 |
Repulsion cutoff [lattice units], set by HemoCell::setRepulsion()
| pluint hemo::HemoCellFields::repulsionTimescale = 1 |
Timescale seperation for repulsion, set through hemocell.h.
|
private |
| pluint hemo::HemoCellFields::solidifyTimescale = 1 |