24#ifndef HEMOCELLPARTICLEFIELD_H
25#define HEMOCELLPARTICLEFIELD_H
28class HemoCellParticleField;
36#include "atomicBlock/blockLattice3D.hh"
59 virtual void findParticles(plb::Box3D domain, std::vector<HemoCellParticle *> & found);
60 virtual void findParticles(plb::Box3D domain, std::vector<const HemoCellParticle *> & found)
const;
61 void findParticles(plb::Box3D domain, std::vector<HemoCellParticle *> & found,
pluint type);
114 plb::Dot3D
const & location = this->getLocation();
115 T x = pos[0] - location.x;
116 T y = pos[1] - location.y;
117 T z = pos[2] - location.z;
119 return (x > box.x0 - 0.5) && (x <= box.x1 + 0.5) && (y > box.y0 - 0.5) && (y <= box.y1 + 0.5) &&
120 (z > box.z0 - 0.5) && (z <= box.z1 + 0.5);
125 using plb::AtomicBlock3D::getBoundingBox;
156 void outputCellIds(std::vector<std::vector<plint>> & output,
pluint ctype, std::string & name);
180 static std::string
basicType() {
return std::string(plb::NativeType<T>::getName()); }
230 const std::map<plint, bool> &
get_lpc();
Definition hemoCellFields.h:54
Definition hemoCellParticleDataTransfer.h:37
Definition hemoCellParticleField.h:39
void outputInnerLinks(plb::Box3D, std::vector< std::vector< plint > > &, pluint, std::string &)
Definition hemoCellParticleFieldOutputFunctions.cpp:186
HemoCellParticleField * clone() const
Definition hemoCellParticleField.cpp:90
void outputForceRepulsion(plb::Box3D, std::vector< std::vector< T > > &, pluint, std::string &)
Definition hemoCellParticleFieldOutputFunctions.cpp:157
plb::Box3D & getBoundingBox()
Definition hemoCellParticleField.h:122
void outputForceBending(plb::Box3D, std::vector< std::vector< T > > &, pluint, std::string &)
Definition hemoCellParticleFieldOutputFunctions.cpp:115
plb::ScalarField3D< bool > * bindingField
Definition hemoCellParticleField.h:248
static HemoCellFields * cellFields
Definition hemoCellParticleField.h:170
void addParticlePreinlet(const HemoCellParticle::serializeValues_t &sv)
Definition hemoCellParticleField.cpp:187
void computeGridPosition(hemo::Array< T, 3 > const &position, plint &iX, plint &iY, plint &iZ) const
Definition hemoCellParticleField.cpp:364
void outputForces(plb::Box3D, std::vector< std::vector< T > > &, pluint, std::string &)
Definition hemoCellParticleFieldOutputFunctions.cpp:164
void snapshotParticles()
Definition hemoCellParticleField.cpp:395
void update_lpc()
Definition hemoCellParticleField.cpp:107
void insert_preinlet_ppc(HemoCellParticle *particle, unsigned int index)
Definition hemoCellParticleField.cpp:225
void prepareSolidification()
Definition hemoCellParticleField.cpp:916
pluint getsize()
Definition hemoCellParticleField.h:178
void applyRepulsionForce(bool forced=false)
Definition hemoCellParticleField.cpp:594
HemoCellParticleField & operator=(HemoCellParticleField const &rhs)
Definition hemoCellParticleField.cpp:78
virtual void advanceParticles()
Definition hemoCellParticleField.cpp:485
void AddOutputMap()
Definition hemoCellParticleFieldOutputFunctions.cpp:34
void update_ppt()
Definition hemoCellParticleField.cpp:114
std::map< int, void(HemoCellParticleField::*)(plb::Box3D, std::vector< std::vector< T > > &, pluint, std::string &)> outputFunctionMap
Definition hemoCellParticleField.h:163
virtual void removeParticles_inverse(plb::Box3D domain)
Definition hemoCellParticleField.cpp:300
virtual void internalGridPointsMembrane(plb::Box3D domain)
Definition hemoCellParticleField.cpp:679
void restoreParticles()
Discard the current particles and put back those kept by snapshotParticles().
Definition hemoCellParticleField.cpp:407
void separateForceVectors()
Definition hemoCellParticleField.cpp:511
void outputResTime(plb::Box3D, std::vector< std::vector< T > > &, pluint, std::string &)
Definition hemoCellParticleFieldOutputFunctions.cpp:217
std::vector< std::vector< unsigned int > > _particles_per_type
Definition hemoCellParticleField.h:201
bool ppt_up_to_date
Definition hemoCellParticleField.h:188
T eigenValueFromCell(plb::Cell< T, DESCRIPTOR > &cell)
Definition hemoCellParticleField.cpp:870
void update_ppc()
Definition hemoCellParticleField.cpp:121
std::vector< hemo::Array< T, 3 > * > allocated_for_output
Definition hemoCellParticleField.h:224
void setlocalDomain(plb::Box3D &localDomain_)
Definition hemoCellParticleField.cpp:474
void outputForceVolume(plb::Box3D, std::vector< std::vector< T > > &, pluint, std::string &)
Definition hemoCellParticleFieldOutputFunctions.cpp:143
bool ppc_up_to_date
Definition hemoCellParticleField.h:189
const std::map< plint, std::vector< int > > & get_particles_per_cell()
Definition hemoCellParticleField.cpp:98
void populateBindingSites(plb::Box3D &domain)
Definition hemoCellParticleField.cpp:840
std::vector< plint > neighbours
Definition hemoCellParticleField.h:175
void outputForceLink(plb::Box3D, std::vector< std::vector< T > > &, pluint, std::string &)
Definition hemoCellParticleFieldOutputFunctions.cpp:129
const std::map< plint, bool > & get_lpc()
Definition hemoCellParticleField.cpp:103
int deleteBrokenCells(plint envelope, bool verbose)
Delete the particles of cells that lost vertices.
Definition hemoCellParticleField.cpp:390
void capRepulsionForce(T limit)
Definition hemoCellParticleField.cpp:602
std::vector< HemoCellParticle > particles
Definition hemoCellParticleField.h:182
void invalidate_ppc()
Definition hemoCellParticleField.h:196
HemoCellParticleDataTransfer & particleDataTransfer
Definition hemoCellParticleField.h:240
int deleteIncompleteCellsImpl(bool onlyType, pluint ctype, const plb::Box3D *near, bool verbose)
Definition hemoCellParticleField.cpp:417
int nFluidCells
Definition hemoCellParticleField.h:184
bool isContainedABS(const hemo::Array< T, 3 > &pos, const plb::Box3D &box) const
Definition hemoCellParticleField.h:113
virtual void spreadParticleForce(plb::Box3D domain)
Definition hemoCellParticleField.cpp:707
plb::BlockLattice3D< T, CEPAC_DESCRIPTOR > * CEPAClattice
Definition hemoCellParticleField.h:173
void outputPositions(plb::Box3D, std::vector< std::vector< T > > &, pluint, std::string &)
Definition hemoCellParticleFieldOutputFunctions.cpp:97
pluint envelopeSize
Definition hemoCellParticleField.h:177
void invalidate_ppt()
Definition hemoCellParticleField.h:195
pluint atomicBlockId
Definition hemoCellParticleField.h:171
int deleteIncompleteCells(pluint ctype, bool verbose=true)
Delete the particles of cells of type ctype that are not complete in this block.
Definition hemoCellParticleField.cpp:382
void outputForceArea(plb::Box3D, std::vector< std::vector< T > > &, pluint, std::string &)
Definition hemoCellParticleFieldOutputFunctions.cpp:122
std::vector< HemoCellParticle > particlesSnapshot
The particles kept aside by snapshotParticles().
Definition hemoCellParticleField.h:215
void outputForceInnerLink(plb::Box3D, std::vector< std::vector< T > > &, pluint, std::string &)
Definition hemoCellParticleFieldOutputFunctions.cpp:136
plint nearestCell(T const) const
Definition hemoCellParticleField.cpp:352
void dropNonFiniteParticle(HemoCellParticle &particle, plint &count)
Definition hemoCellParticleField.cpp:770
virtual void applyConstitutiveModel(bool forced=false)
Definition hemoCellParticleField.cpp:549
bool lpc_up_to_date
Definition hemoCellParticleField.h:187
void populateBoundaryParticles()
Definition hemoCellParticleField.cpp:784
void insert_ppc(HemoCellParticle *particle, unsigned int index)
Definition hemoCellParticleField.cpp:219
std::map< plint, std::vector< int > > _particles_per_cell
Definition hemoCellParticleField.h:202
void outputVelocities(plb::Box3D, std::vector< std::vector< T > > &, pluint, std::string &)
Definition hemoCellParticleFieldOutputFunctions.cpp:104
void passthroughpass(int, plb::Box3D, std::vector< std::vector< T > > &, pluint, std::string &)
Definition hemoCellParticleFieldOutputFunctions.cpp:49
bool pg_up_to_date
Definition hemoCellParticleField.h:191
static std::string getBlockName()
Definition hemoCellParticleField.cpp:994
static std::string descriptorType()
Definition hemoCellParticleField.h:181
void unifyForceVectors()
Definition hemoCellParticleField.cpp:543
plint addParticleCount
Definition hemoCellParticleField.h:243
void invalidate_preinlet_ppc()
Definition hemoCellParticleField.h:197
void solidifyCells()
Definition hemoCellParticleField.cpp:931
static std::string basicType()
Definition hemoCellParticleField.h:180
plb::Box3D boundingBox
Definition hemoCellParticleField.h:183
void update_pg()
Definition hemoCellParticleField.cpp:128
virtual void removeParticles(plb::Box3D domain)
Definition hemoCellParticleField.cpp:276
virtual HemoCellParticleDataTransfer & getDataTransfer()
Definition hemoCellParticleField.cpp:987
virtual void findInternalParticleGridPoints(plb::Box3D domain)
Definition hemoCellParticleField.cpp:676
plb::BlockLattice3D< T, DESCRIPTOR > * atomicLattice
Definition hemoCellParticleField.h:172
void update_preinlet_ppc()
void updateResidenceTime(unsigned int rtime)
Definition hemoCellParticleField.cpp:538
void outputCellIds(std::vector< std::vector< plint > > &output, pluint ctype, std::string &name)
Definition hemoCellParticleFieldOutputFunctions.cpp:208
void outputForceVisc(plb::Box3D, std::vector< std::vector< T > > &, pluint, std::string &)
Definition hemoCellParticleFieldOutputFunctions.cpp:150
void invalidate_pg()
Definition hemoCellParticleField.h:198
virtual void findParticles(plb::Box3D domain, std::vector< HemoCellParticle * > &found)
Definition hemoCellParticleField.cpp:323
void invalidate_lpc()
Definition hemoCellParticleField.h:194
void applyBoundaryRepulsionForce(bool resetFirst=false)
Definition hemoCellParticleField.cpp:809
void getOutputCells(pluint ctype, std::vector< plint > &cellIds)
The cells of type ctype that this block writes to the cell output.
Definition hemoCellParticleFieldOutputFunctions.cpp:57
bool preinlet_ppc_up_to_date
Definition hemoCellParticleField.h:190
void outputTriangles(plb::Box3D, std::vector< std::vector< plint > > &, pluint, std::string &)
Definition hemoCellParticleFieldOutputFunctions.cpp:170
std::set< plb::Dot3D > internalPoints
Definition hemoCellParticleField.h:232
std::map< plint, bool > _lpc
Definition hemoCellParticleField.h:204
std::set< plb::Dot3D > bindingSites
Definition hemoCellParticleField.h:247
std::map< plint, std::vector< int > > _preinlet_particles_per_cell
Definition hemoCellParticleField.h:203
plb::ScalarField3D< T > * interiorViscosityField
Definition hemoCellParticleField.h:233
const std::vector< std::vector< unsigned int > > & get_particles_per_type()
Definition hemoCellParticleField.cpp:94
virtual void interpolateFluidVelocity(plb::Box3D domain)
Definition hemoCellParticleField.cpp:684
void issueWarning(HemoCellParticle &p)
Definition hemoCellParticleField.cpp:372
void outputVertexId(plb::Box3D, std::vector< std::vector< T > > &, pluint, std::string &)
Definition hemoCellParticleFieldOutputFunctions.cpp:203
std::vector< plb::Dot3D > boundaryParticles
Definition hemoCellParticleField.h:176
plb::Box3D localDomain
Definition hemoCellParticleField.h:244
virtual ~HemoCellParticleField()
Definition hemoCellParticleField.cpp:66
ParticleGrid particleGrid
Definition hemoCellParticleField.h:222
const std::map< plint, std::vector< int > > & get_preinlet_particles_per_cell()
virtual void addParticle(HemoCellParticle *particle)
Definition hemoCellParticleField.cpp:135
Definition hemoCellParticle.h:44
Cell list that bins the particles of one atomic block onto its lattice nodes.
Definition particleGrid.h:67
double T
Definition constant_defaults.h:137
long int plint
Definition constant_defaults.h:149
long unsigned int pluint
Definition constant_defaults.h:152
Definition meshGeneratingFunctions.cpp:28
Definition hemoCellParticle.h:48