hemocell
Loading...
Searching...
No Matches
Classes | Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | List of all members
hemo::HemoCellFields Class Reference

#include <hemoCellFields.h>

Collaboration diagram for hemo::HemoCellFields:
Collaboration graph
[legend]

Classes

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  HemoSyncEnvelopes
 
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.
 
HemoCellFieldaddCellType (std::string name_, int constructType)
 Add an celltype with a certain mesh, the name also specifies <name_>.xml and <name_>.pos.
 
HemoCellFieldoperator[] (unsigned int index)
 Easy access to contained celltypes.
 
HemoCellFieldoperator[] (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)
 Load a checkpoint, store the current iteration in &iter.
 
void save (plb::XMLreader *documentXML, unsigned int iter, Config *cfg=NULL)
 Save a checkpoint.
 
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 ()
 Apply (and calculate) the repulsion force between particles and the boundary.
 
void deleteIncompleteCells (bool verbose=true)
 Delete any incomplete cells on a block.
 
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 (vector< HemoCellParticle * > &particles, plb::Box3D &domain)
 Get particles in a given domain.
 
void addParticles (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
 
int base_cell_id (int wrapped)
 
void calculateCommunicationStructure ()
 

Public Attributes

plb::MultiBlockLattice3D< T, DESCRIPTOR > * lattice
 the fluid lattice
 
vector< int > desiredFluidOutputVariables
 A vector specifying the output variables (from const_defaults.h)
 
vector< int > desiredCEPACfieldOutputVariables
 
HemoCellhemocell
 Reference to parent.
 
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
 
T repulsionCutoff = 0.0
 Repulsion variable set through hemocell.h.
 
T repulsionConstant = 0.0
 Repulsion variable set through hemocell.h.
 
pluint repulsionTimescale = 1
 Timescale seperation for repulsion, set through hemocell.h.
 
T boundaryRepulsionCutoff = 0.0
 Boundary repulsion variable set through hemocell.h.
 
T boundaryRepulsionConstant = 0.0
 Boundary repulsion variable set through hemocell.h.
 
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}
 Limit of cycles in a direction (xyz)
 
int periodicity_limit_offset_y = 100
 
int periodicity_limit_offset_z = 10000
 
int number_of_cells = 0
 
unsigned int max_neighbours = 0
 
plb::CommunicationStructure3D * large_communicator = 0
 
plb::ParallelBlockCommunicator3D envelope_communicator
 

Private Member Functions

void copyXMLreader2XMLwriter (plb::XMLreader const &reader, plb::XMLwriter &writer)
 
void copyXMLreader2XMLwriter (plb::XMLreaderProxy readerProxy, plb::XMLwriter &writer)
 

Private Attributes

vector< vector< NoInitChar > > sendBuffers
 
vector< vector< NoInitChar > > recvBuffers
 

Detailed Description

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

Constructor & Destructor Documentation

◆ HemoCellFields()

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.

◆ ~HemoCellFields()

hemo::HemoCellFields::~HemoCellFields ( )

Generic Destructor.

Member Function Documentation

◆ addCellType()

HemoCellField * hemo::HemoCellFields::addCellType ( std::string  name_,
int  constructType 
)

Add an celltype with a certain mesh, the name also specifies <name_>.xml and <name_>.pos.

◆ addParticles()

void hemo::HemoCellFields::addParticles ( vector< HemoCellParticle > &  particles)

Add particles to local processors.

◆ advanceParticles()

void hemo::HemoCellFields::advanceParticles ( )

Advance the particles in an iteration.

◆ applyBoundaryRepulsionForce()

void hemo::HemoCellFields::applyBoundaryRepulsionForce ( )

Apply (and calculate) the repulsion force between particles and the boundary.

◆ applyConstitutiveModel()

void hemo::HemoCellFields::applyConstitutiveModel ( bool  forced = false)

Apply the material model of the cells to the particles, updating their force.

◆ applyRepulsionForce()

void hemo::HemoCellFields::applyRepulsionForce ( )

Apply (and calculate) the repulsion force between particles.

◆ base_cell_id()

int hemo::HemoCellFields::base_cell_id ( int  wrapped)
inline

◆ calculateCommunicationStructure()

void hemo::HemoCellFields::calculateCommunicationStructure ( )

◆ copyXMLreader2XMLwriter() [1/2]

void hemo::HemoCellFields::copyXMLreader2XMLwriter ( plb::XMLreader const &  reader,
plb::XMLwriter &  writer 
)
private

◆ copyXMLreader2XMLwriter() [2/2]

void hemo::HemoCellFields::copyXMLreader2XMLwriter ( plb::XMLreaderProxy  readerProxy,
plb::XMLwriter &  writer 
)
private

◆ createCEPACfield()

void hemo::HemoCellFields::createCEPACfield ( )

◆ createParticleField()

void hemo::HemoCellFields::createParticleField ( plb::SparseBlockStructure3D *  sbStructure_ = 0,
plb::ThreadAttribution *  tAttribution_ = 0 
)

◆ deleteIncompleteCells()

void hemo::HemoCellFields::deleteIncompleteCells ( bool  verbose = true)

Delete any incomplete cells on a block.

◆ deleteNonLocalParticles()

void hemo::HemoCellFields::deleteNonLocalParticles ( int  envelope)

Delete non local particles (do not delete in envelopesize)

◆ findInternalParticleGridPoints()

void hemo::HemoCellFields::findInternalParticleGridPoints ( )

◆ getParticleField3D()

MultiParticleField3D< HemoCellParticleField > & hemo::HemoCellFields::getParticleField3D ( )

Legacy Helper function to get the particle field, mostly unused as direct access is available.

◆ getParticles()

void hemo::HemoCellFields::getParticles ( vector< HemoCellParticle * > &  particles,
plb::Box3D &  domain 
)

Get particles in a given domain.

◆ InitAfterLoadCheckpoint()

void hemo::HemoCellFields::InitAfterLoadCheckpoint ( )

Used to set variables inside the celltypes for correct access, called through createParticleField.

◆ internalGridPointsMembrane()

void hemo::HemoCellFields::internalGridPointsMembrane ( )

◆ interpolateFluidVelocity()

void hemo::HemoCellFields::interpolateFluidVelocity ( )

Interpolate the velocity of the fluid to the individual particles.

◆ load()

void hemo::HemoCellFields::load ( plb::XMLreader *  documentXML,
unsigned int &  iter,
Config cfg = NULL 
)

Load a checkpoint, store the current iteration in &iter.

◆ operator[]() [1/2]

HemoCellField * hemo::HemoCellFields::operator[] ( string  name)

Easy access to contained celltypes.

◆ operator[]() [2/2]

HemoCellField * hemo::HemoCellFields::operator[] ( unsigned int  index)

Easy access to contained celltypes.

◆ populateBindingSites()

void hemo::HemoCellFields::populateBindingSites ( plb::Box3D *  box = 0)

Add bindingSites.

◆ populateBoundaryParticles()

void hemo::HemoCellFields::populateBoundaryParticles ( )

Add boundary particles on the fluid-solid boundary.

◆ prepareSolidification()

void hemo::HemoCellFields::prepareSolidification ( )

◆ readPositionsCellFields()

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

Legacy reads in only RBC an PLT from a single pos file.

◆ save()

void hemo::HemoCellFields::save ( plb::XMLreader *  documentXML,
unsigned int  iter,
Config cfg = NULL 
)

Save a checkpoint.

◆ separate_force_vectors()

void hemo::HemoCellFields::separate_force_vectors ( )

Separate the force vectors of particles so it becomes clear what the vector for each separate force is.

◆ size()

unsigned int hemo::HemoCellFields::size ( )

Get the number of celltypes.

◆ solidifyCells()

void hemo::HemoCellFields::solidifyCells ( )

Conditionally solidify cells if requested.

◆ spreadParticleForce()

void hemo::HemoCellFields::spreadParticleForce ( )

Spread the force of all particles over the fluid in this iteration.

◆ syncEnvelopes()

void hemo::HemoCellFields::syncEnvelopes ( )

Sync the particle envelopes between domains.

◆ unify_force_vectors()

void hemo::HemoCellFields::unify_force_vectors ( )

Unify the force vectors of particles to point to a single force.

◆ updateResidenceTime()

void hemo::HemoCellFields::updateResidenceTime ( unsigned int  rtime)

increment cell residence time

Member Data Documentation

◆ boundaryRepulsionConstant

T hemo::HemoCellFields::boundaryRepulsionConstant = 0.0

Boundary repulsion variable set through hemocell.h.

◆ boundaryRepulsionCutoff

T hemo::HemoCellFields::boundaryRepulsionCutoff = 0.0

Boundary repulsion variable set through hemocell.h.

◆ boundaryRepulsionTimescale

pluint hemo::HemoCellFields::boundaryRepulsionTimescale = 1

Timescale seperation for boundary repulsion, set through hemocell.h.

◆ cellFields

vector<HemoCellField *> hemo::HemoCellFields::cellFields

Vector containing the cellTypes.

◆ CEPACfield

plb::MultiBlockLattice3D<T,CEPAC_DESCRIPTOR>* hemo::HemoCellFields::CEPACfield = 0

palabos field for storing the CPAC scalar field if used

◆ desiredCEPACfieldOutputVariables

vector<int> hemo::HemoCellFields::desiredCEPACfieldOutputVariables

◆ desiredFluidOutputVariables

vector<int> hemo::HemoCellFields::desiredFluidOutputVariables

A vector specifying the output variables (from const_defaults.h)

◆ domain_immersedParticles

plb::MultiParticleField3D<HemoCellParticleField> * hemo::HemoCellFields::domain_immersedParticles = 0

◆ envelope_communicator

plb::ParallelBlockCommunicator3D hemo::HemoCellFields::envelope_communicator

◆ envelopeSize

pluint hemo::HemoCellFields::envelopeSize

The envelopeSize for the particles.

◆ hemocell

HemoCell& hemo::HemoCellFields::hemocell

Reference to parent.

◆ immersedParticles

plb::MultiParticleField3D<HemoCellParticleField>* hemo::HemoCellFields::immersedParticles = 0

palabos field storing the particles

◆ interiorViscosityEntireGridTimescale

pluint hemo::HemoCellFields::interiorViscosityEntireGridTimescale = 1

◆ interiorViscosityTimescale

pluint hemo::HemoCellFields::interiorViscosityTimescale = 1

◆ large_communicator

plb::CommunicationStructure3D* hemo::HemoCellFields::large_communicator = 0

◆ lattice

plb::MultiBlockLattice3D<T, DESCRIPTOR>* hemo::HemoCellFields::lattice

the fluid lattice

◆ max_neighbours

unsigned int hemo::HemoCellFields::max_neighbours = 0

◆ number_of_cells

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)

◆ particleVelocityUpdateTimescale

pluint hemo::HemoCellFields::particleVelocityUpdateTimescale = 1

Timescale seperation for the velocity interpolation from the fluid to the particle.

◆ periodicity_limit

int hemo::HemoCellFields::periodicity_limit[3] = {100}

Limit of cycles in a direction (xyz)

◆ periodicity_limit_offset_y

int hemo::HemoCellFields::periodicity_limit_offset_y = 100

◆ periodicity_limit_offset_z

int hemo::HemoCellFields::periodicity_limit_offset_z = 10000

◆ preinlet_immersedParticles

plb::MultiParticleField3D<HemoCellParticleField>* hemo::HemoCellFields::preinlet_immersedParticles = 0

seperate preinlet and domain pointers whenever necessary

◆ recvBuffers

vector<vector<NoInitChar> > hemo::HemoCellFields::recvBuffers
private

◆ repulsionConstant

T hemo::HemoCellFields::repulsionConstant = 0.0

Repulsion variable set through hemocell.h.

◆ repulsionCutoff

T hemo::HemoCellFields::repulsionCutoff = 0.0

Repulsion variable set through hemocell.h.

◆ repulsionTimescale

pluint hemo::HemoCellFields::repulsionTimescale = 1

Timescale seperation for repulsion, set through hemocell.h.

◆ sendBuffers

vector<vector<NoInitChar> > hemo::HemoCellFields::sendBuffers
private

◆ solidifyTimescale

pluint hemo::HemoCellFields::solidifyTimescale = 1