MercuryDPM
Trunk
|
Container to store the pointers to all objects that one creates in a simulation. More...
#include <BaseHandler.h>
Public Member Functions | |
BaseHandler () | |
Default BaseHandler constructor, it creates an empty BaseHandler and assigns DPMBase_ to a null pointer. More... | |
BaseHandler (const BaseHandler< T > &BH) | |
Constructor that copies the objects of the given handler into itself and sets other variables to 0/nullptr. More... | |
virtual | ~BaseHandler () |
Destructor, it destructs the BaseHandler and all Object it contains. More... | |
void | copyContentsFromOtherHandler (const BaseHandler< T > &BH) |
Function that copies the contents (vector of pointers, maxObject_, nextId_, DPMBase_) from one handler (container) to the other. More... | |
template<typename U > | |
std::enable_if <!std::is_pointer< U >::value, U * >::type | copyAndAddObject (const U &object) |
Creates a copy of a Object and adds it to the BaseHandler. More... | |
template<typename U > | |
std::enable_if < std::is_pointer< U >::value, U >::type | copyAndAddObject (const U object) |
Creates a copy of a Object and adds it to the BaseHandler. More... | |
template<typename U > | |
std::enable_if <!std::is_pointer< U >::value, U * >::type | copyAndAddGhostObject (const U &object) |
Creates a copy of a Object and adds it to the BaseHandler. This is one locally for inserting mpi particles, they avoid the global check if the particle can actually be inserted, because the mpi domain already knows that is the case. More... | |
template<typename U > | |
std::enable_if < std::is_pointer< U >::value, U >::type | copyAndAddGhostObject (const U object) |
Creates a copy of a Object and adds it to the BaseHandler. This is one locally for inserting mpi particles, they avoid the global check if the particle can actually be inserted, because the mpi domain already knows that is the case. More... | |
virtual void | addExistingObject (T *O) |
Adds an existing object to the BaseHandler without changing the id of the object. More... | |
virtual void | addObject (T *object) |
Adds a new Object to the BaseHandler. More... | |
virtual void | addGhostObject (T *O) |
Adds a new Object to the BaseHandler. called by the to avoid increasing the id. More... | |
void | removeIf (const std::function< bool(T *)> cond) |
virtual void | removeObject (unsigned const int index) |
Removes an Object from the BaseHandler. More... | |
void | removeLastObject () |
Removes the last Object from the BaseHandler. More... | |
virtual void | clear () |
Empties the whole BaseHandler by removing all Objects and setting all other variables to 0. More... | |
virtual void | readAndAddObject (std::istream &is)=0 |
Reads Object into the BaseHandler from restart data. More... | |
void | read (std::istream &is) |
Reads all objects from restart data. More... | |
T * | getObjectById (const unsigned int id) |
Gets a pointer to the Object at the specified index in the BaseHandler. More... | |
std::vector< T * > | getObjectsById (const unsigned int id) |
Gets a vector of pointers to the objects with the specific id. More... | |
T * | getObject (const unsigned int id) |
Gets a pointer to the Object at the specified index in the BaseHandler. More... | |
const T * | getObject (const unsigned int id) const |
Gets a constant pointer to the Object at the specified index in the BaseHandler. More... | |
T * | getLastObject () |
Gets a pointer to the last Object in this BaseHandler. More... | |
const T * | getLastObject () const |
Gets a constant pointer to the last Object in this BaseHandler. More... | |
virtual unsigned int | getNumberOfObjects () const |
Gets the number of real Object in this BaseHandler. (i.e. no mpi or periodic particles) More... | |
unsigned int | getSize () const |
Gets the size of the particleHandler (including mpi and periodic particles) More... | |
unsigned int | getStorageCapacity () const |
Gets the storage capacity of this BaseHandler. More... | |
void | setStorageCapacity (const unsigned int N) |
Sets the storage capacity of this BaseHandler. More... | |
void | resize (const unsigned int N, const T &obj) |
Resizes the container to contain N elements. More... | |
const std::vector< T * > ::const_iterator | begin () const |
Gets the begin of the const_iterator over all Object in this BaseHandler. More... | |
const std::vector< T * >::iterator | begin () |
Gets the begin of the iterator over all BaseBoundary in this BaseHandler. More... | |
const std::vector< T * > ::const_iterator | end () const |
Gets the end of the const_iterator over all BaseBoundary in this BaseHandler. More... | |
const std::vector< T * >::iterator | end () |
Gets the end of the iterator over all BaseBoundary in this BaseHandler. More... | |
void | setDPMBase (DPMBase *DPMBase) |
Sets the problem that is solved using this handler. More... | |
void | setId (T *object, unsigned int id) |
This function sets the id and ensures that nextId is a bigger value than id. More... | |
void | increaseId () |
unsigned int | getNextId () |
void | setNextId (unsigned int id) |
DPMBase * | getDPMBase () |
Gets the problem that is solved using this handler. More... | |
DPMBase * | getDPMBase () const |
Gets the problem that is solved using this handler and does not change the class. More... | |
virtual std::string | getName () const =0 |
Gets the name of this handler. More... | |
virtual void | writeVTK () const |
now empty function for writing VTK files. More... | |
unsigned | getNextGroupId () |
Should be called each time you assign a groupId. Returns the value of nextGroupId_ and increases nextGroupId_ by one. More... | |
Protected Attributes | |
std::vector< T * > | objects_ |
The actual list of Object pointers. More... | |
Private Attributes | |
unsigned int | maxObjects_ |
An integer to keep track of the largest number of objects ever stored in this BaseHandler. More... | |
unsigned int | nextId_ |
identifier for next object created More... | |
unsigned | nextGroupId_ = 1 |
value of the next BaseObject::groupId_. Value increased by one each time a groupId is assigned. Default group is 0 More... | |
DPMBase * | DPMBase_ |
A pointer back to the DPMBase class. More... | |
Container to store the pointers to all objects that one creates in a simulation.
The BaseHandler allows one to create a container to store all pointer objects of a templated type T It is implemented by a (protected) vector of pointers to objects of type T. Once the container is created, the BaseHandler also provides the provision to manipulate the pointers i.e. by accessing, adding, deleting and few more operations by using its member methods.
Definition at line 50 of file BaseHandler.h.
BaseHandler< T >::BaseHandler | ( | ) |
Default BaseHandler constructor, it creates an empty BaseHandler and assigns DPMBase_ to a null pointer.
Definition at line 335 of file BaseHandler.h.
BaseHandler< T >::BaseHandler | ( | const BaseHandler< T > & | BH | ) |
Constructor that copies the objects of the given handler into itself and sets other variables to 0/nullptr.
[in] | BH | A reference to the BaseHandler that has to be copied. |
This is not a copy constructor! It only copies the vector objects_ from the given handler, and sets all other variables to 0/nullptr.
Definition at line 350 of file BaseHandler.h.
|
virtual |
Destructor, it destructs the BaseHandler and all Object it contains.
Definition at line 359 of file BaseHandler.h.
|
virtual |
Adds an existing object to the BaseHandler without changing the id of the object.
[in] | object | A point to an existing object which already has an id given |
Reimplemented in ParticleHandler.
Definition at line 417 of file BaseHandler.h.
Referenced by ParticleHandler::addExistingObject().
|
virtual |
Adds a new Object to the BaseHandler. called by the to avoid increasing the id.
Reimplemented in ParticleHandler.
Definition at line 444 of file BaseHandler.h.
Referenced by ParticleHandler::addGhostObject().
|
virtual |
Adds a new Object to the BaseHandler.
[in] | object | A pointer to the object that must be added. |
Reimplemented in CGHandler, DomainHandler, ParticleHandler, PeriodicBoundaryHandler, InteractionHandler, WallHandler, BoundaryHandler, and SpeciesHandler.
Definition at line 431 of file BaseHandler.h.
Referenced by SpeciesHandler::addObject(), BoundaryHandler::addObject(), WallHandler::addObject(), InteractionHandler::addObject(), ParticleHandler::addObject(), DomainHandler::addObject(), and CGHandler::addObject().
const std::vector< T * >::const_iterator BaseHandler< T >::begin | ( | ) | const |
Gets the begin of the const_iterator over all Object in this BaseHandler.
Definition at line 690 of file BaseHandler.h.
Referenced by BaseCluster::actionsAfterSolve(), BaseCluster::applyCentralForce(), CircularPeriodicBoundary::checkBoundaryAfterParticlesMove(), FluxBoundary::checkBoundaryAfterParticlesMove(), HeaterBoundary::checkBoundaryAfterParticlesMove(), LeesEdwardsBoundary::checkBoundaryAfterParticlesMove(), AngledPeriodicBoundary::checkBoundaryAfterParticlesMove(), ConstantMassFlowMaserBoundary::checkBoundaryAfterParticlesMove(), PeriodicBoundary::checkBoundaryAfterParticlesMove(), TimeDependentPeriodicBoundary::checkBoundaryAfterParticlesMove(), DPMBase::computeInternalForces(), BaseCluster::createAdjacencyMatrix(), BaseCluster::dampVelocities(), DPMBase::getRotationalEnergy(), DPMBase::importParticlesAs(), HGridOptimiser::initialise(), BaseCluster::makeDataAnalysis(), CurvyChute::recreateBottom(), BaseCluster::writeToOverlFile(), and SphericalParticleVtkWriter::writeVTK().
const std::vector< T * >::iterator BaseHandler< T >::begin | ( | ) |
Gets the begin of the iterator over all BaseBoundary in this BaseHandler.
Definition at line 697 of file BaseHandler.h.
|
virtual |
Empties the whole BaseHandler by removing all Objects and setting all other variables to 0.
Delete all objects stored in objects_ and set the maximum number of objects that have been in this container to 0, and set the Id of the next object that will be added to 0.
Reimplemented in ParticleHandler, and SpeciesHandler.
Definition at line 528 of file BaseHandler.h.
Referenced by SpeciesHandler::clear(), ParticleHandler::clear(), CGHandler::evaluateRestartFiles(), FileReader::read(), DPMBase::read(), DPMBase::readNextFStatFile(), and ChuteBottom::setupInitialConditions().
std::enable_if<!std::is_pointer< U >::value, U * >::type BaseHandler< T >::copyAndAddGhostObject | ( | const U & | object | ) |
Creates a copy of a Object and adds it to the BaseHandler. This is one locally for inserting mpi particles, they avoid the global check if the particle can actually be inserted, because the mpi domain already knows that is the case.
[in] | object | A reference to the BaseHandler of which the objects have to be copied. |
Definition at line 399 of file BaseHandler.h.
std::enable_if< std::is_pointer< U >::value, U >::type BaseHandler< T >::copyAndAddGhostObject | ( | const U | object | ) |
Creates a copy of a Object and adds it to the BaseHandler. This is one locally for inserting mpi particles, they avoid the global check if the particle can actually be inserted, because the mpi domain already knows that is the case.
[in] | object | A reference to the Object that has to be copied. |
Definition at line 410 of file BaseHandler.h.
std::enable_if<!std::is_pointer< U >::value, U * >::type BaseHandler< T >::copyAndAddObject | ( | const U & | object | ) |
Creates a copy of a Object and adds it to the BaseHandler.
[in] | object | A reference to the BaseHandler of which the objects have to be copied. |
Definition at line 379 of file BaseHandler.h.
Referenced by Chute::addFlowParticlesCompactly(), ChuteWithHopper::addHopper(), SubcriticalMaserBoundary::addParticleToMaser(), ConstantMassFlowMaserBoundary::addParticleToMaser(), RandomClusterInsertionBoundary::checkBoundaryBeforeTimeStep(), InsertionBoundary::checkBoundaryBeforeTimeStep(), CurvyChute::createBottom(), Chute::createBottom(), Membrane::createVertexParticles(), DPMBase::importParticlesAs(), BaseCluster::particleInsertionSuccessful(), FileReader::read(), DPMBase::readNextDataFile(), DPMBase::readNextFStatFile(), DPMBase::readParAndIniFiles(), CGHandler::restart(), BaseCluster::setSpecies(), ChuteBottom::setupInitialConditions(), Chute::setupInitialConditions(), ChuteWithHopper::setupInitialConditions(), and Chute::setupSideWalls().
std::enable_if< std::is_pointer< U >::value, U >::type BaseHandler< T >::copyAndAddObject | ( | const U | object | ) |
Creates a copy of a Object and adds it to the BaseHandler.
[in] | object | A reference to the Object that has to be copied. |
Definition at line 390 of file BaseHandler.h.
void BaseHandler< T >::copyContentsFromOtherHandler | ( | const BaseHandler< T > & | BH | ) |
Function that copies the contents (vector of pointers, maxObject_, nextId_, DPMBase_) from one handler (container) to the other.
[in] | BH | A reference to the BaseHandler of which the objects have to be copied. |
Definition at line 367 of file BaseHandler.h.
References BaseHandler< T >::objects_.
const std::vector< T * >::const_iterator BaseHandler< T >::end | ( | ) | const |
Gets the end of the const_iterator over all BaseBoundary in this BaseHandler.
Definition at line 704 of file BaseHandler.h.
Referenced by BaseCluster::actionsAfterSolve(), BaseCluster::applyCentralForce(), CircularPeriodicBoundary::checkBoundaryAfterParticlesMove(), FluxBoundary::checkBoundaryAfterParticlesMove(), HeaterBoundary::checkBoundaryAfterParticlesMove(), LeesEdwardsBoundary::checkBoundaryAfterParticlesMove(), AngledPeriodicBoundary::checkBoundaryAfterParticlesMove(), ConstantMassFlowMaserBoundary::checkBoundaryAfterParticlesMove(), PeriodicBoundary::checkBoundaryAfterParticlesMove(), TimeDependentPeriodicBoundary::checkBoundaryAfterParticlesMove(), BaseCluster::createAdjacencyMatrix(), BaseCluster::dampVelocities(), PeriodicBoundaryHandler::findNewParticles(), DPMBase::getRotationalEnergy(), DPMBase::importParticlesAs(), HGridOptimiser::initialise(), BaseCluster::makeDataAnalysis(), CurvyChute::recreateBottom(), BaseCluster::writeToOverlFile(), and SphericalParticleVtkWriter::writeVTK().
const std::vector< T * >::iterator BaseHandler< T >::end | ( | ) |
Gets the end of the iterator over all BaseBoundary in this BaseHandler.
Definition at line 711 of file BaseHandler.h.
DPMBase * BaseHandler< T >::getDPMBase | ( | ) |
Gets the problem that is solved using this handler.
Definition at line 725 of file BaseHandler.h.
Referenced by HeatFluidCoupledParticle::actionsAfterTimeStep(), SubcriticalMaserBoundaryTEST::activateMaser(), SubcriticalMaserBoundary::activateMaser(), ConstantMassFlowMaserBoundary::activateMaser(), StressStrainControlBoundary::activateStrainRateControl(), BaseWall::addParticlesAtWall(), SubcriticalMaserBoundary::addParticleToMaser(), ConstantMassFlowMaserBoundary::addParticleToMaser(), BaseInteraction::BaseInteraction(), CGHandler::CGHandler(), DeletionBoundary::checkBoundaryAfterParticleMoved(), HeaterBoundary::checkBoundaryAfterParticleMoved(), DropletBoundary::checkBoundaryAfterParticlesMove(), PeriodicBoundary::checkBoundaryAfterParticlesMove(), TimeDependentPeriodicBoundary::checkBoundaryAfterParticlesMove(), MeshTriangle::checkInteractions(), FrictionInteraction::computeFrictionForce(), MindlinInteraction::computeFrictionForce(), MindlinRollingTorsionInteraction::computeFrictionForce(), SinterInteraction::computeNormalForce(), SinterLinInteraction::computeNormalForce(), HertzianSinterInteraction::computeSinterForce(), SlidingFrictionInteraction::computeSlidingSpring(), SlidingFrictionInteraction::computeSlidingSpringSuperQuadric(), StressStrainControlBoundary::computeStrainRate(), copyDataFromMPIParticleToParticle(), SubcriticalMaserBoundaryTEST::copyExtraParticles(), PeriodicBoundary::createGhostParticle(), TimeDependentPeriodicBoundary::createGhostParticle(), InfiniteWall::createVTK(), StressStrainControlBoundary::determineLengthAndCentre(), StressStrainControlBoundary::determineStressControlledShearBoundaries(), SubcriticalMaserBoundaryTEST::extendBottom(), Domain::finaliseBoundaryDataTransmission(), BaseInteraction::gatherContactStatistics(), LeesEdwardsBoundary::getCurrentShift(), LeesEdwardsBoundary::getCurrentVelocity(), NurbsWall::getDistanceAndNormal(), Screw::getDistanceAndNormal(), HorizontalBaseScrew::getDistanceAndNormal(), IntersectionOfWalls::getDistanceAndNormal(), BaseWall::getInteractionWith(), BaseParticle::getParticleDimensions(), BaseParticle::getPeriodicComplexity(), ParticleSpecies::getVolumeFromRadius(), BaseParticle::integrateBeforeForceComputation(), WallHandler::operator=(), CGHandler::operator=(), ParticleHandler::ParticleHandler(), Domain::performBoundaryDataTransmission(), Domain::processReceivedBoundaryParticleData(), Domain::processReceivedInteractionData(), SubcriticalMaserBoundary::read(), ConstantMassFlowMaserBoundary::read(), InsertionBoundary::read(), BaseWall::renderWall(), MeshTriangle::retrieveVertexParticles(), Screw::rotate(), LiquidMigrationWilletInteraction::rupture(), StressStrainControlBoundary::set(), Domain::setBounds(), ParticleSpecies::setDensity(), MeshTriangle::setHandler(), BaseParticle::setIndSpecies(), BaseParticle::setPeriodicComplexity(), Domain::setRange(), BaseWall::setSpecies(), BaseParticle::setSpecies(), ShearBoxBoundary::shiftHorizontalPosition(), LeesEdwardsBoundary::shiftVerticalPosition(), SpeciesHandler::SpeciesHandler(), StressStrainControlBoundary::updateDomainSize(), Domain::updateParticlePosition(), Domain::updateParticles(), WallHandler::WallHandler(), LeesEdwardsBoundary::write(), BaseInteraction::writeInteraction(), HorizontalBaseScrew::writeVTK(), AxisymmetricIntersectionOfWalls::writeVTK(), ScrewsymmetricIntersectionOfWalls::writeVTK(), IntersectionOfWalls::writeVTK(), and BaseInteraction::~BaseInteraction().
DPMBase * BaseHandler< T >::getDPMBase | ( | ) | const |
Gets the problem that is solved using this handler and does not change the class.
Definition at line 732 of file BaseHandler.h.
T * BaseHandler< T >::getLastObject | ( | ) |
Gets a pointer to the last Object in this BaseHandler.
Definition at line 634 of file BaseHandler.h.
Referenced by DropletBoundary::checkBoundaryAfterParticlesMove(), ShearBoxBoundary::createVerticalPeriodicParticles(), LeesEdwardsBoundary::createVerticalPeriodicParticles(), DPMBase::fillDomainWithParticles(), Domain::processReceivedBoundaryParticleData(), PeriodicBoundaryHandler::processReceivedGhostParticleData(), DPMBase::readNextFStatFile(), and ParticleVtkWriter::writeExtraFields().
const T * BaseHandler< T >::getLastObject | ( | ) | const |
Gets a constant pointer to the last Object in this BaseHandler.
Definition at line 641 of file BaseHandler.h.
|
pure virtual |
Gets the name of this handler.
Implemented in ParticleHandler, InteractionHandler, DomainHandler, CGHandler, SpeciesHandler, WallHandler, BoundaryHandler, and PeriodicBoundaryHandler.
|
inline |
Should be called each time you assign a groupId. Returns the value of nextGroupId_ and increases nextGroupId_ by one.
Definition at line 293 of file BaseHandler.h.
Referenced by FixedClusterInsertionBoundary::checkBoundaryBeforeTimeStep(), and RandomClusterInsertionBoundary::checkBoundaryBeforeTimeStep().
|
inline |
Definition at line 256 of file BaseHandler.h.
Referenced by PeriodicBoundaryHandler::updateMaserParticle(), and PeriodicBoundaryHandler::updateParticleStatus().
|
virtual |
Gets the number of real Object in this BaseHandler. (i.e. no mpi or periodic particles)
Reimplemented in ParticleHandler.
Definition at line 648 of file BaseHandler.h.
Referenced by DPMBase::checkSettings(), DPMBase::computeAllForces(), DPMBase::decompose(), CGHandler::evaluateDataFiles(), CGHandler::evaluateRestartFiles(), FileReader::read(), DPMBase::readNextFStatFile(), CGHandler::restart(), Chute::setupInitialConditions(), DPMBase::write(), and InteractionVTKWriter::writeVTK().
T * BaseHandler< T >::getObject | ( | const unsigned int | index | ) |
Gets a pointer to the Object at the specified index in the BaseHandler.
[in] | index | the index of the requested Object. |
Definition at line 613 of file BaseHandler.h.
References getName(), and logger.
Referenced by ChuteWithHopper::addHopper(), BaseCluster::calculateTimeStep(), DeletionBoundary::checkBoundaryAfterParticlesMove(), FixedClusterInsertionBoundary::checkBoundaryBeforeTimeStep(), RandomClusterInsertionBoundary::checkBoundaryBeforeTimeStep(), Chute::cleanChute(), DPMBase::computeAllForces(), BaseCluster::computeInternalStructure(), copyDataFromMPIParticleToParticle(), Chute::createBottom(), InteractionHandler::createEmptyInteraction(), Chute::createFlowParticle(), CircularPeriodicBoundary::createPeriodicParticles(), AngledPeriodicBoundary::createPeriodicParticles(), LeesEdwardsBoundary::createPeriodicParticles(), SubcriticalMaserBoundary::createPeriodicParticles(), ConstantMassFlowMaserBoundary::createPeriodicParticles(), PeriodicBoundary::createPeriodicParticles(), TimeDependentPeriodicBoundary::createPeriodicParticles(), InteractionHandler::deleteEmptyInteraction(), DPMBase::importParticlesAs(), MPIContainer::initialiseMercuryMPITypes(), DPMBase::integrateAfterForceComputation(), DPMBase::integrateBeforeForceComputation(), BaseCluster::makeDataAnalysis(), ChuteBottom::makeRoughBottom(), DPMBase::outputXBallsData(), BaseCluster::particleInsertionSuccessful(), FileReader::read(), SubcriticalMaserBoundary::read(), ConstantMassFlowMaserBoundary::read(), InsertionBoundary::read(), DPMBase::readNextDataFile(), DPMBase::readNextFStatFile(), DPMBase::readParAndIniFiles(), DPMBase::removeDuplicatePeriodicParticles(), DPMBase::setFixedParticles(), BaseWall::setHandler(), BaseParticle::setHandler(), BaseWall::setIndSpecies(), BaseParticle::setIndSpecies(), BaseSpecies::setInteractionDistance(), BaseInteractable::setSpecies(), BaseCluster::setSpecies(), ChuteBottom::setupInitialConditions(), Chute::setupInitialConditions(), ChuteWithHopper::setupInitialConditions(), Chute::setupSideWalls(), Domain::updateParticles(), DPMBase::write(), and BaseCluster::writeToOverlFile().
const T * BaseHandler< T >::getObject | ( | const unsigned int | index | ) | const |
Gets a constant pointer to the Object at the specified index in the BaseHandler.
[in] | index | the index of the requested Object. |
Definition at line 624 of file BaseHandler.h.
References getName(), and logger.
T * BaseHandler< T >::getObjectById | ( | const unsigned int | id | ) |
Gets a pointer to the Object at the specified index in the BaseHandler.
[in] | id | The id of the requested Object. |
Definition at line 565 of file BaseHandler.h.
References ERROR, getName(), and logger.
Referenced by Membrane::buildMesh(), MeshTriangle::checkInteractions(), Membrane::initializeEdgeBendingQuantities(), PeriodicBoundaryHandler::processLocalInteractionData(), PeriodicBoundaryHandler::processReceivedInteractionData(), Domain::processReceivedInteractionData(), FileReader::read(), Membrane::read(), MeshTriangle::retrieveVertexParticles(), and Membrane::saveVertexPositions().
std::vector< T * > BaseHandler< T >::getObjectsById | ( | const unsigned int | id | ) |
Gets a vector of pointers to the objects with the specific id.
Gets all the objects with the id from the handler. This is especially useful in parallel where ghost particles of a real particle have the same id
[in] | id | The id of the requested objects. |
Definition at line 593 of file BaseHandler.h.
References ERROR, getName(), and logger.
Referenced by InteractionHandler::readAndAddObject().
unsigned int BaseHandler< T >::getSize | ( | ) | const |
Gets the size of the particleHandler (including mpi and periodic particles)
Definition at line 655 of file BaseHandler.h.
Referenced by Chute::addFlowParticlesCompactly(), BaseWall::addParticlesAtWall(), DeletionBoundary::checkBoundaryAfterParticlesMove(), FixedClusterInsertionBoundary::checkBoundaryBeforeTimeStep(), RandomClusterInsertionBoundary::checkBoundaryBeforeTimeStep(), DPMBase::computeAllForces(), BaseCluster::createAdjacencyMatrix(), CircularPeriodicBoundary::createPeriodicParticles(), AngledPeriodicBoundary::createPeriodicParticles(), LeesEdwardsBoundary::createPeriodicParticles(), SubcriticalMaserBoundary::createPeriodicParticles(), ConstantMassFlowMaserBoundary::createPeriodicParticles(), PeriodicBoundary::createPeriodicParticles(), TimeDependentPeriodicBoundary::createPeriodicParticles(), DPMBase::decompose(), DPMBase::deleteGhostParticles(), CGHandler::evaluateDataFiles(), CGHandler::evaluateRestartFiles(), DPMBase::fillDomainWithParticles(), MercuryBase::getHGridTargetMaxInteractionRadius(), MercuryBase::getHGridTargetMinInteractionRadius(), MercuryBase::getHGridTargetNumberOfBuckets(), BaseParticle::getPeriodicComplexity(), WallVTKWriter::getVTKData(), MercuryBase::hGridNeedsRebuilding(), DPMBase::importParticlesAs(), HGridOptimiser::initialise(), DPMBase::insertGhostParticle(), DPMBase::integrateAfterForceComputation(), DPMBase::integrateBeforeForceComputation(), BaseCluster::makeDataAnalysis(), BaseCluster::makeGnuplotFile(), DPMBase::mpiInsertParticleCheck(), DPMBase::outputXBallsData(), BaseCluster::printTime(), DPMBase::readNextDataFile(), DPMBase::removeDuplicatePeriodicParticles(), CGHandler::restart(), DPMBase::setFixedParticles(), ParticleSpecies::setMaxInteractionDistance(), BaseParticle::setPeriodicComplexity(), BaseCluster::setupInitialConditions(), DPMBase::write(), BaseCluster::writeAmatFile(), ParticleVtkWriter::writeExtraFields(), and SuperQuadricParticleVtkWriter::writeVTK().
unsigned int BaseHandler< T >::getStorageCapacity | ( | ) | const |
Gets the storage capacity of this BaseHandler.
Definition at line 662 of file BaseHandler.h.
|
inline |
Definition at line 251 of file BaseHandler.h.
Referenced by ParticleHandler::addObject(), and PeriodicBoundaryHandler::updateMaserParticle().
void BaseHandler< T >::read | ( | std::istream & | is | ) |
Reads all objects from restart data.
[in] | is | The input stream from which the information is read. |
Definition at line 543 of file BaseHandler.h.
References helpers::getLineFromStringStream(), getName(), constants::i, logger, and VERBOSE.
Referenced by DPMBase::read(), and DPMBase::readOld().
|
pure virtual |
Reads Object into the BaseHandler from restart data.
[in] | is | The input stream from which the information is read. |
Implemented in ParticleHandler, CGHandler, DomainHandler, WallHandler, InteractionHandler, PeriodicBoundaryHandler, BoundaryHandler, and SpeciesHandler.
void BaseHandler< T >::removeIf | ( | const std::function< bool(T *)> | cond | ) |
Definition at line 453 of file BaseHandler.h.
References constants::i.
void BaseHandler< T >::removeLastObject | ( | ) |
Removes the last Object from the BaseHandler.
Definition at line 511 of file BaseHandler.h.
References getName(), logger, and WARN.
Referenced by ParticleHandler::removeLastObject().
|
virtual |
Removes an Object from the BaseHandler.
This methods removes an object. This methods invalidates ANY iterators to objects in this container. This method may shuffle the order of objects in this container.
[in] | index | An unsigned integer that gives the id of the Object that has to be removed. |
Definition at line 472 of file BaseHandler.h.
References getName(), and logger.
Referenced by SuperQuadricParticle::getInteractionWithSuperQuad(), BaseInteraction::removeFromHandler(), ParticleHandler::removeGhostObject(), SpeciesHandler::removeObject(), ParticleHandler::removeObject(), and InteractionHandler::removeObjectKeepingPeriodics().
void BaseHandler< T >::resize | ( | const unsigned int | N, |
const T & | obj | ||
) |
Resizes the container to contain N elements.
If the current size is greater than count, the container is reduced to its first count elements.
If the current size is less than count, additional elements are appended and initialized with copies of obj.
[in] | N | Container resized to contain N elements. |
[in] | obj | additional elements are appended and initialized with copies of obj. |
Definition at line 679 of file BaseHandler.h.
void BaseHandler< T >::setDPMBase | ( | DPMBase * | DPMBase | ) |
Sets the problem that is solved using this handler.
Definition at line 718 of file BaseHandler.h.
Referenced by DPMBase::constructor(), DPMBase::decompose(), and DPMBase::DPMBase().
|
inline |
This function sets the id and ensures that nextId is a bigger value than id.
Definition at line 238 of file BaseHandler.h.
|
inline |
Definition at line 261 of file BaseHandler.h.
Referenced by PeriodicBoundaryHandler::updateParticleStatus().
void BaseHandler< T >::setStorageCapacity | ( | const unsigned int | N | ) |
Sets the storage capacity of this BaseHandler.
[in] | N | The storage capacity the BaseHandler will have |
Definition at line 669 of file BaseHandler.h.
Referenced by Chute::addFlowParticlesCompactly(), FileReader::read(), DPMBase::read(), DPMBase::readNextDataFile(), and ChuteBottom::setupInitialConditions().
|
inlinevirtual |
now empty function for writing VTK files.
Definition at line 286 of file BaseHandler.h.
|
private |
A pointer back to the DPMBase class.
Please note that this pointer back to the DPMBase class is a "shared" pointer and should not be deallocated by this class.
Definition at line 328 of file BaseHandler.h.
|
private |
An integer to keep track of the largest number of objects ever stored in this BaseHandler.
Definition at line 308 of file BaseHandler.h.
|
private |
value of the next BaseObject::groupId_. Value increased by one each time a groupId is assigned. Default group is 0
Definition at line 320 of file BaseHandler.h.
Referenced by BaseHandler< BaseCG >::getNextGroupId().
|
private |
identifier for next object created
Definition at line 313 of file BaseHandler.h.
Referenced by BaseHandler< BaseCG >::getNextId(), BaseHandler< BaseCG >::increaseId(), BaseHandler< BaseCG >::setId(), and BaseHandler< BaseCG >::setNextId().
|
protected |
The actual list of Object pointers.
The list of Object pointers. This handler is responsible for the memory-deallocation of these objects.
Definition at line 302 of file BaseHandler.h.
Referenced by BaseHandler< T >::copyContentsFromOtherHandler().