24#ifndef HEMOCELLFIELDS_H
25#define HEMOCELLFIELDS_H
37#include "latticeBoltzmann/advectionDiffusionLattices.hh"
38#include "multiBlock/multiBlockLattice3D.hh"
39#include "offLattice/triangularSurfaceMesh.hh"
40#include "libraryInterfaces/TINYXML_xmlIO.hh"
41#include "particles/multiParticleField3D.hh"
42#include "parallelism/parallelBlockCommunicator3D.h"
57 HemoCellFields(plb::MultiBlockLattice3D<T, DESCRIPTOR> & lattice_,
unsigned int particleEnvelopeWidth,
HemoCell &);
63 void createParticleField(plb::SparseBlockStructure3D* sbStructure_ = 0, plb::ThreadAttribution * tAttribution_ = 0);
92 void load(plb::XMLreader * documentXML,
unsigned int & iter,
Config * cfg = NULL);
94 void save(plb::XMLreader * documentXML,
unsigned int iter,
Config * cfg = NULL);
139 void getParticles(vector<HemoCellParticle*> & particles, plb::Box3D & domain);
142 void addParticles(vector<HemoCellParticle> & particles);
163 plb::MultiBlockLattice3D<T, DESCRIPTOR> *
lattice;
180 plb::MultiBlockLattice3D<T,CEPAC_DESCRIPTOR> *
CEPACfield = 0;
Definition hemoCellField.h:42
Definition hemoCellFields.h:259
void processGenericBlocks(plb::Box3D, std::vector< plb::AtomicBlock3D * >)
Definition hemoCellFields.cpp:501
HemoAdvanceParticles * clone() const
Definition hemoCellFields.cpp:716
Definition hemoCellFields.h:263
bool forced
Definition hemoCellFields.h:267
void processGenericBlocks(plb::Box3D, std::vector< plb::AtomicBlock3D * >)
Definition hemoCellFields.cpp:527
HemoApplyConstitutiveModel * clone() const
Definition hemoCellFields.cpp:717
Definition hemoCellFields.h:273
HemoBoundaryRepulsionForce * clone() const
Definition hemoCellFields.cpp:720
void processGenericBlocks(plb::Box3D, std::vector< plb::AtomicBlock3D * >)
Definition hemoCellFields.cpp:569
Definition hemoCellFields.h:277
bool verbose
Definition hemoCellFields.h:281
void processGenericBlocks(plb::Box3D, std::vector< plb::AtomicBlock3D * >)
Definition hemoCellFields.cpp:636
HemoDeleteIncompleteCells * clone() const
Definition hemoCellFields.cpp:721
Definition hemoCellFields.h:310
void processGenericBlocks(plb::Box3D, std::vector< plb::AtomicBlock3D * >)
Definition hemoCellFields.cpp:676
HemoDeleteNonLocalParticles * clone() const
Definition hemoCellFields.cpp:725
int envelopeSize
Definition hemoCellFields.h:314
HemoDeleteNonLocalParticles(int envelope_)
Definition hemoCellFields.h:315
Definition hemoCellFields.h:244
HemoFindInternalParticleGridPoints * clone() const
Definition hemoCellFields.cpp:711
void processGenericBlocks(plb::Box3D, std::vector< plb::AtomicBlock3D * >)
Definition hemoCellFields.cpp:327
Definition hemoCellFields.h:288
vector< HemoCellParticle * > & particles
Definition hemoCellFields.h:289
HemoGetParticles(vector< HemoCellParticle * > &particles_)
Definition hemoCellFields.h:293
HemoGetParticles * clone() const
Definition hemoCellFields.cpp:722
void processGenericBlocks(plb::Box3D, std::vector< plb::AtomicBlock3D * >)
Definition hemoCellFields.cpp:650
Definition hemoCellFields.h:249
void processGenericBlocks(plb::Box3D, std::vector< plb::AtomicBlock3D * >)
Definition hemoCellFields.cpp:338
HemoInternalGridPointsMembrane * clone() const
Definition hemoCellFields.cpp:710
Definition hemoCellFields.h:255
HemoInterpolateFluidVelocity * clone() const
Definition hemoCellFields.cpp:715
void processGenericBlocks(plb::Box3D, std::vector< plb::AtomicBlock3D * >)
Definition hemoCellFields.cpp:350
Definition hemoCellFields.h:306
void processGenericBlocks(plb::Box3D, std::vector< plb::AtomicBlock3D * >)
Definition hemoCellFields.cpp:593
HemoPopulateBindingSites * clone() const
Definition hemoCellFields.cpp:728
Definition hemoCellFields.h:302
void processGenericBlocks(plb::Box3D, std::vector< plb::AtomicBlock3D * >)
Definition hemoCellFields.cpp:583
HemoPopulateBoundaryParticles * clone() const
Definition hemoCellFields.cpp:724
Definition hemoCellFields.h:321
void processGenericBlocks(plb::Box3D, std::vector< plb::AtomicBlock3D * >)
Definition hemoCellFields.cpp:700
HemoPrepareSolidification * clone() const
Definition hemoCellFields.cpp:727
Definition hemoCellFields.h:269
HemoRepulsionForce * clone() const
Definition hemoCellFields.cpp:719
void processGenericBlocks(plb::Box3D, std::vector< plb::AtomicBlock3D * >)
Definition hemoCellFields.cpp:555
Definition hemoCellFields.h:232
HemoSeperateForceVectors * clone() const
Definition hemoCellFields.cpp:712
void processGenericBlocks(plb::Box3D, std::vector< plb::AtomicBlock3D * >)
Definition hemoCellFields.cpp:624
Definition hemoCellFields.h:295
HemoSetParticles(vector< HemoCellParticle > &particles_)
Definition hemoCellFields.h:300
HemoSetParticles * clone() const
Definition hemoCellFields.cpp:723
void processGenericBlocks(plb::Box3D, std::vector< plb::AtomicBlock3D * >)
Definition hemoCellFields.cpp:661
vector< HemoCellParticle > & particles
Definition hemoCellFields.h:296
Definition hemoCellFields.h:317
void processGenericBlocks(plb::Box3D, std::vector< plb::AtomicBlock3D * >)
Definition hemoCellFields.cpp:690
HemoSolidifyCells * clone() const
Definition hemoCellFields.cpp:726
Definition hemoCellFields.h:240
void processGenericBlocks(plb::Box3D, std::vector< plb::AtomicBlock3D * >)
Definition hemoCellFields.cpp:514
HemoSpreadParticleForce * clone() const
Definition hemoCellFields.cpp:714
Definition hemoCellFields.h:283
HemoSyncEnvelopes * clone() const
Definition hemoCellFields.cpp:718
void processGenericBlocks(plb::Box3D, std::vector< plb::AtomicBlock3D * >)
Definition hemoCellFields.cpp:374
void getTypeOfModification(std::vector< plb::modif::ModifT > &modified) const
Definition hemoCellFields.cpp:732
Definition hemoCellFields.h:236
HemoUnifyForceVectors * clone() const
Definition hemoCellFields.cpp:713
void processGenericBlocks(plb::Box3D, std::vector< plb::AtomicBlock3D * >)
Definition hemoCellFields.cpp:542
Definition hemoCellFields.h:325
void processGenericBlocks(plb::Box3D, std::vector< plb::AtomicBlock3D * >)
Definition hemoCellFields.cpp:611
unsigned int rtime
Definition hemoCellFields.h:329
HemoupdateResidenceTime * clone() const
Definition hemoCellFields.cpp:729
Definition hemoCellFields.h:53
void prepareSolidification()
Definition hemoCellFields.cpp:704
vector< int > desiredCEPACfieldOutputVariables
Definition hemoCellFields.h:167
pluint solidifyTimescale
Definition hemoCellFields.h:199
pluint boundaryRepulsionTimescale
Timescale seperation for boundary repulsion, set through hemocell.h.
Definition hemoCellFields.h:194
void unify_force_vectors()
Unify the force vectors of particles to point to a single force.
Definition hemoCellFields.cpp:545
unsigned int size()
Get the number of celltypes.
Definition hemoCellFields.cpp:148
T repulsionCutoff
Repulsion variable set through hemocell.h.
Definition hemoCellFields.h:183
plb::MultiParticleField3D< HemoCellParticleField > * immersedParticles
palabos field storing the particles
Definition hemoCellFields.h:175
void getParticles(vector< HemoCellParticle * > &particles, plb::Box3D &domain)
Get particles in a given domain.
Definition hemoCellFields.cpp:656
T boundaryRepulsionConstant
Boundary repulsion variable set through hemocell.h.
Definition hemoCellFields.h:192
void addParticles(vector< HemoCellParticle > &particles)
Add particles to local processors.
Definition hemoCellFields.cpp:669
int periodicity_limit[3]
Limit of cycles in a direction (xyz)
Definition hemoCellFields.h:205
void internalGridPointsMembrane()
Definition hemoCellFields.cpp:342
HemoCell & hemocell
Reference to parent.
Definition hemoCellFields.h:169
HemoCellField * addCellType(std::string name_, int constructType)
Add an celltype with a certain mesh, the name also specifies <name_>.xml and <name_>....
Definition hemoCellFields.cpp:141
void solidifyCells()
Conditionally solidify cells if requested.
Definition hemoCellFields.cpp:694
void createCEPACfield()
Definition hemoCellFields.cpp:113
void populateBindingSites(plb::Box3D *box=0)
Add bindingSites.
Definition hemoCellFields.cpp:596
vector< vector< NoInitChar > > recvBuffers
Definition hemoCellFields.h:211
void spreadParticleForce()
Spread the force of all particles over the fluid in this iteration.
Definition hemoCellFields.cpp:517
int base_cell_id(int wrapped)
Definition hemoCellFields.h:219
void applyBoundaryRepulsionForce()
Apply (and calculate) the repulsion force between particles and the boundary.
Definition hemoCellFields.cpp:572
void createParticleField(plb::SparseBlockStructure3D *sbStructure_=0, plb::ThreadAttribution *tAttribution_=0)
Definition hemoCellFields.cpp:70
void applyRepulsionForce()
Apply (and calculate) the repulsion force between particles.
Definition hemoCellFields.cpp:558
~HemoCellFields()
Generic Destructor.
Definition hemoCellFields.cpp:55
void applyConstitutiveModel(bool forced=false)
Apply the material model of the cells to the particles, updating their force.
Definition hemoCellFields.cpp:530
plb::MultiParticleField3D< HemoCellParticleField > * domain_immersedParticles
Definition hemoCellFields.h:177
void updateResidenceTime(unsigned int rtime)
increment cell residence time
Definition hemoCellFields.cpp:614
pluint envelopeSize
The envelopeSize for the particles.
Definition hemoCellFields.h:173
void save(plb::XMLreader *documentXML, unsigned int iter, Config *cfg=NULL)
Save a checkpoint.
Definition hemoCellFields.cpp:277
int periodicity_limit_offset_z
Definition hemoCellFields.h:208
plb::MultiBlockLattice3D< T, DESCRIPTOR > * lattice
the fluid lattice
Definition hemoCellFields.h:163
pluint interiorViscosityEntireGridTimescale
Definition hemoCellFields.h:202
void advanceParticles()
Advance the particles in an iteration.
Definition hemoCellFields.cpp:504
plb::CommunicationStructure3D * large_communicator
Definition hemoCellFields.h:224
void deleteNonLocalParticles(int envelope)
Delete non local particles (do not delete in envelopesize)
Definition hemoCellFields.cpp:680
void copyXMLreader2XMLwriter(plb::XMLreader const &reader, plb::XMLwriter &writer)
void copyXMLreader2XMLwriter(plb::XMLreaderProxy readerProxy, plb::XMLwriter &writer)
plb::ParallelBlockCommunicator3D envelope_communicator
Definition hemoCellFields.h:225
vector< vector< NoInitChar > > sendBuffers
Definition hemoCellFields.h:211
T boundaryRepulsionCutoff
Boundary repulsion variable set through hemocell.h.
Definition hemoCellFields.h:190
void populateBoundaryParticles()
Add boundary particles on the fluid-solid boundary.
Definition hemoCellFields.cpp:586
vector< HemoCellField * > cellFields
Vector containing the cellTypes.
Definition hemoCellFields.h:171
pluint repulsionTimescale
Timescale seperation for repulsion, set through hemocell.h.
Definition hemoCellFields.h:187
void readPositionsCellFields(std::string particlePosFile)
Legacy reads in only RBC an PLT from a single pos file.
plb::MultiParticleField3D< HemoCellParticleField > & getParticleField3D()
Legacy Helper function to get the particle field, mostly unused as direct access is available.
Definition hemoCellFields.cpp:738
unsigned int max_neighbours
Definition hemoCellFields.h:222
void separate_force_vectors()
Separate the force vectors of particles so it becomes clear what the vector for each separate force i...
Definition hemoCellFields.cpp:627
vector< int > desiredFluidOutputVariables
A vector specifying the output variables (from const_defaults.h)
Definition hemoCellFields.h:165
void load(plb::XMLreader *documentXML, unsigned int &iter, Config *cfg=NULL)
Load a checkpoint, store the current iteration in &iter.
Definition hemoCellFields.cpp:240
plb::MultiParticleField3D< HemoCellParticleField > * preinlet_immersedParticles
seperate preinlet and domain pointers whenever necessary
Definition hemoCellFields.h:177
void calculateCommunicationStructure()
Definition hemoCellFields.cpp:363
void syncEnvelopes()
Sync the particle envelopes between domains.
Definition hemoCellFields.cpp:377
void interpolateFluidVelocity()
Interpolate the velocity of the fluid to the individual particles.
Definition hemoCellFields.cpp:353
pluint particleVelocityUpdateTimescale
Timescale seperation for the velocity interpolation from the fluid to the particle.
Definition hemoCellFields.h:197
pluint interiorViscosityTimescale
Definition hemoCellFields.h:201
void deleteIncompleteCells(bool verbose=true)
Delete any incomplete cells on a block.
Definition hemoCellFields.cpp:639
plb::MultiBlockLattice3D< T, CEPAC_DESCRIPTOR > * CEPACfield
palabos field for storing the CPAC scalar field if used
Definition hemoCellFields.h:180
int periodicity_limit_offset_y
Definition hemoCellFields.h:207
T repulsionConstant
Repulsion variable set through hemocell.h.
Definition hemoCellFields.h:185
void findInternalParticleGridPoints()
Definition hemoCellFields.cpp:331
int number_of_cells
Definition hemoCellFields.h:218
HemoCellField * operator[](unsigned int index)
Easy access to contained celltypes.
Definition hemoCellFields.cpp:153
void InitAfterLoadCheckpoint()
Used to set variables inside the celltypes for correct access, called through createParticleField.
Definition hemoCellFields.cpp:202
Definition hemoCellFunctional.h:36
double T
Definition constant_defaults.h:118
long unsigned int pluint
Definition constant_defaults.h:130