|
It is an abstract base class due to the purely virtual functions declared below. Even if the function is purely virtual, it does not imply that it cannot have a definition. Abstract classes are useful to define a interface. More...
#include <BaseObject.h>
Public Member Functions | |
BaseObject ()=default | |
Default constructor. More... | |
BaseObject (const BaseObject &p)=default | |
Copy constructor, copies all the objects BaseObject contains. More... | |
virtual | ~BaseObject ()=default |
virtual destructor More... | |
virtual void | read (std::istream &is)=0 |
virtual void | write (std::ostream &os) const =0 |
A purely virtual function which has an implementation which writes the name and the object id_ to the output stream. More... | |
virtual std::string | getName () const =0 |
A purely virtual function. More... | |
virtual void | moveInHandler (unsigned int index) |
Except that it is virtual, it does the same thing as setIndex() does. More... | |
void | setIndex (unsigned int index) |
Allows one to assign an index to an object in the handler/container. More... | |
void | setId (unsigned long id) |
Assigns a unique identifier to each object in the handler (container) which remains constant even after the object is deleted from the container/handler. More... | |
unsigned int | getIndex () const |
Returns the index of the object in the handler. More... | |
unsigned int | getId () const |
Returns the unique identifier of any particular object. More... | |
void | setGroupId (unsigned groupId) |
unsigned | getGroupId () const |
Private Attributes | |
unsigned int | index_ = 0 |
location in BaseHandler::objects_ More... | |
unsigned int | id_ = 0 |
unique identifier within handler (remains constant even if particle is moved) More... | |
unsigned int | groupId_ = 0 |
Identifier of a group within handler. More... | |
Friends | |
std::ostream & | operator<< (std::ostream &os, const BaseObject &o) |
A purely virtual method with an implementation which reads the index from the stream and assigns it to id_. More... | |
std::istream & | operator>> (std::istream &is, BaseObject &o) |
Operator overloading for reading the data from an input stream into the BAseObject "o" More... | |
It is an abstract base class due to the purely virtual functions declared below. Even if the function is purely virtual, it does not imply that it cannot have a definition. Abstract classes are useful to define a interface.
|
default |
Default constructor.
|
default |
Copy constructor, copies all the objects BaseObject contains.
|
virtualdefault |
virtual destructor
|
inline |
References groupId_.
Referenced by BaseWall::getInteractionWith(), and MeshTriangle::getInteractionWith().
|
inline |
Returns the unique identifier of any particular object.
References id_.
Referenced by WallHandler::addObject(), ConstantMassFlowMaserBoundary::addParticleToMaser(), SubcriticalMaserBoundary::addParticleToMaser(), DeletionBoundary::checkBoundaryAfterParticleMoved(), DPMBase::computeInternalForce(), Mercury3Dclump::computeInternalForce(), MPISphericalParticle::copyDataFromParticleToMPIParticle(), MPIInteraction< NormalForceInteraction, FrictionForceInteraction, AdhesiveForceInteraction >::copyFromInteraction(), copyPositionFrom(), PeriodicBoundaryHandler::findNewParticle(), Screw::getDistanceAndNormalLabCoordinates(), MeshTriangle::getDistanceNormalOverlapType(), BaseInteraction::getEffectiveMass(), BaseInteraction::getEffectiveRadius(), BaseInteraction::getI(), BaseParticle::getInfo(), MeshTriangle::getInteractionWith(), BaseInteraction::getP(), BaseInteraction::importI(), BaseInteraction::importP(), HGrid::insertParticleToHgrid(), TriangleMeshWall::moveVerticesToMatchVolume(), PeriodicBoundaryHandler::processLocalGhostParticles(), Domain::processReceivedBoundaryParticleData(), Domain::processReceivedInteractionData(), WallHandler::readAndAddObject(), CurvyChute::recreateBottom(), BaseInteraction::setI(), BaseParticle::setIndSpecies(), BaseWall::setIndSpecies(), BaseSpecies::setInteractionDistance(), BaseInteraction::setP(), SphericalIndenter::setupInitialConditions(), Membrane::updateFaceNeighbors(), PeriodicBoundaryHandler::updateMaserParticle(), PeriodicBoundaryHandler::updateParticles(), Domain::updateParticles(), PeriodicBoundaryHandler::updateParticleStatus(), MixedSpecies< NormalForceSpecies, FrictionForceSpecies, AdhesiveForceSpecies >::write(), BaseInteraction::write(), Membrane::write(), MembraneDemo::write(), MembraneSelfTest::write(), BaseInteraction::writeInteraction(), BaseInteractable::~BaseInteractable(), BaseParticle::~BaseParticle(), and SuperQuadricParticle::~SuperQuadricParticle().
|
inline |
Returns the index of the object in the handler.
References index_.
Referenced by T_protectiveWall::actionsAfterTimeStep(), Chutebelt::actionsAfterTimeStep(), BoundariesSelfTest::actionsAfterTimeStep(), protectiveWall::actionsAfterTimeStep(), PossibleContactList::add_PossibleContact(), SpeciesHandler::addObject(), BaseWall::addParticlesAtWall(), ConstantMassFlowMaserBoundary::checkBoundaryAfterParticleMoved(), DeletionBoundary::checkBoundaryAfterParticleMoved(), ScaleCoupling< M, O >::computeCouplingForce(), ScaleCoupling< M, O >::computeExternalForces(), ChuteWithPeriodicInflow::computeInternalForces(), ScaleCoupling< M, O >::computeProjectionMatrix(), BaseInteraction::gatherContactStatistics(), AxisymmetricIntersectionOfWalls::getDistanceAndNormal(), HorizontalBaseScrew::getDistanceAndNormal(), ScrewsymmetricIntersectionOfWalls::getDistanceAndNormal(), RestrictedWall::getInteractionWith(), TriangleMeshWall::getInteractionWith(), SuperQuadricParticle::getInteractionWithSuperQuad(), ParticleSpecies::getMixedSpecies(), PossibleContact::getNext(), PossibleContact::getOtherParticle(), PossibleContact::getPrevious(), HGrid::insertParticleToHgrid(), PossibleContactList::remove_ParticlePosibleContacts(), ScaleCoupling< M, O >::CoupledParticle::removeCoupledElement(), BaseInteraction::removeFromHandler(), InteractionHandler::removeObjectKeepingPeriodics(), ScaleCoupling< M, O >::CoupledParticle::setCoupledElement(), ParticleSpecies::setDensity(), ParticleSpecies::setMaxInteractionDistance(), PossibleContact::setNextPosition(), PossibleContact::setPreviousPosition(), BaseInteractable::setSpecies(), SphericalIndenter::setupInitialConditions(), MixedSpecies< NormalForceSpecies, FrictionForceSpecies, AdhesiveForceSpecies >::write(), BaseInteraction::writeToFStat(), BaseWall::writeVTK(), and BaseInteractable::~BaseInteractable().
|
pure virtual |
A purely virtual function.
Implemented in NonSphericalParticle, WearableTriangulatedWall, WearableTriangleMeshWall, VChute, TriangulatedWall, TriangleWall, TriangleMeshWall, SphericalWall, SineWall, RestrictedWall, ParabolaChute, NurbsWall, MeshTriangle, Membrane, LevelSetWall, IntersectionOfWalls, InfiniteWallWithHole, InfiniteWall, CylindricalWall, Combtooth, Coil, BasicUnionOfWalls, BasicIntersectionOfWalls, ArcWall, SuperQuadricParticle, SphericalParticle, ClumpParticle, BaseParticle, BaseInteraction, Domain, TimeSmoothedCG< Coordinates, BaseFunction, Fields >, TimeAveragedCG< Coordinates, BaseFunction, Fields >, TimeAveragedCG< CGCoordinates::XYZ, BaseFunction, CGFields::StandardFields >, CG< Coordinates, BaseFunction, Fields >, CG< Coordinates, CGFunctions::Lucy, CGFields::StandardFields >, CG< CGCoordinates::O, CGFunctions::Lucy, CGFields::StandardFields >, TimeDependentPeriodicBoundary, SubcriticalMaserBoundaryTEST, SubcriticalMaserBoundary, StressStrainControlBoundary, ShearBoxBoundary, RandomClusterInsertionBoundary, PolydisperseInsertionBoundary, PeriodicBoundary, LeesEdwardsBoundary, HopperInsertionBoundary, HeaterBoundary, FluxBoundary, FixedClusterInsertionBoundary, DropletBoundary, DeletionBoundary, CubeInsertionBoundary, CubeDeletionBoundary, ConstantMassFlowMaserBoundary, CircularPeriodicBoundary, ChuteInsertionBoundary, BidisperseCubeInsertionBoundary, BaseClusterInsertionBoundary, AngledPeriodicBoundary, WearableNurbsWall, SimpleDrumSuperquadrics, ScrewsymmetricIntersectionOfWalls, Screw, HorizontalScrew, HorizontalBaseScrew, AxisymmetricIntersectionOfWalls, Species< NormalForceSpecies, FrictionForceSpecies, AdhesiveForceSpecies >, Species< LinearViscoelasticNormalSpecies >, Species< LinearPlasticViscoelasticNormalSpecies, SlidingFrictionSpecies, IrreversibleAdhesiveSpecies >, Species< LinearViscoelasticNormalSpecies, SlidingFrictionSpecies, IrreversibleAdhesiveSpecies >, MixedSpecies< NormalForceSpecies, FrictionForceSpecies, AdhesiveForceSpecies >, and Interaction< NormalForceInteraction, FrictionForceInteraction, AdhesiveForceInteraction >.
Referenced by commandLineCG(), MixedSpecies< NormalForceSpecies, FrictionForceSpecies, AdhesiveForceSpecies >::mixAll(), write(), BaseCG::write(), and BaseWall::writeVTK().
|
virtual |
|
pure virtual |
[in] |
Implemented in BaseBoundary, WearableTriangulatedWall, WearableTriangleMeshWall, WearableNurbsWall, VChute, TriangulatedWall, TriangleWall, TriangleMeshWall, SphericalWall, SineWall, Screw, RestrictedWall, ParabolaChute, NurbsWall, MeshTriangle, Membrane, LevelSetWall, IntersectionOfWalls, InfiniteWallWithHole, InfiniteWall, HorizontalScrew, CylindricalWall, Combtooth, Coil, BasicUnionOfWalls, BasicIntersectionOfWalls, BaseWall, ArcWall, ParticleSpecies, BaseSpecies, SuperQuadricParticle, ClumpParticle, BaseParticle, SPHInteraction, SinterLinInteraction, SinterInteraction, LinearViscoelasticInteraction, LinearPlasticViscoelasticInteraction, HertzianViscoelasticInteraction, HertzianSinterInteraction, HertzianBSHPViscoelasticInteraction, SlidingFrictionInteraction, MindlinRollingTorsionInteraction, MindlinInteraction, FrictionInteraction, EmptyFrictionInteraction, BaseInteraction, ReversibleAdhesiveInteraction, RegimeSinterInteraction, ParhamiMcMeekingSinterInteraction, LiquidMigrationWilletInteraction, LiquidMigrationLSInteraction, LiquidBridgeWilletInteraction, IrreversibleAdhesiveInteraction, EmptyAdhesiveInteraction, ChargedBondedInteraction, BondedInteraction, Domain, BaseCG, TimeDependentPeriodicBoundary, SubcriticalMaserBoundaryTEST, SubcriticalMaserBoundary, StressStrainControlBoundary, ShearBoxBoundary, PolydisperseInsertionBoundary, PeriodicBoundary, LeesEdwardsBoundary, InsertionBoundary, HopperInsertionBoundary, HeaterBoundary, FluxBoundary, DropletBoundary, DeletionBoundary, CubeInsertionBoundary, CubeDeletionBoundary, ConstantMassFlowMaserBoundary, CircularPeriodicBoundary, ChuteInsertionBoundary, BidisperseCubeInsertionBoundary, BasePeriodicBoundary, BaseClusterInsertionBoundary, AngledPeriodicBoundary, BaseInteractable, SimpleDrumSuperquadrics, ScrewsymmetricIntersectionOfWalls, HorizontalBaseScrew, AxisymmetricIntersectionOfWalls, Species< NormalForceSpecies, FrictionForceSpecies, AdhesiveForceSpecies >, Species< LinearViscoelasticNormalSpecies >, Species< LinearPlasticViscoelasticNormalSpecies, SlidingFrictionSpecies, IrreversibleAdhesiveSpecies >, Species< LinearViscoelasticNormalSpecies, SlidingFrictionSpecies, IrreversibleAdhesiveSpecies >, MixedSpecies< NormalForceSpecies, FrictionForceSpecies, AdhesiveForceSpecies >, and Interaction< NormalForceInteraction, FrictionForceInteraction, AdhesiveForceInteraction >.
References groupId_, id_, and helpers::readOptionalVariable().
Referenced by BaseInteractable::read(), ParticleSpecies::read(), and BaseBoundary::read().
|
inline |
References groupId_.
Referenced by SCoupling< M, O >::createTriangleWall(), MercuryProblem::createWalls(), BaseCluster::particleInsertionSuccessful(), WallHandler::readTriangleWall(), GetDistanceAndNormalForTriangleWalls::setupInitialConditions(), and RollingOverTriangleWalls::setupInitialConditions().
void BaseObject::setId | ( | unsigned long | id | ) |
Assigns a unique identifier to each object in the handler (container) which remains constant even after the object is deleted from the container/handler.
[in] | id | id number of the current object |
Referenced by ConstantMassFlowMaserBoundary::addParticleToMaser(), SubcriticalMaserBoundary::addParticleToMaser(), MPISphericalParticle::copyDataFromMPIParticleToParticle(), BaseParticle::oldRead(), MixedSpecies< NormalForceSpecies, FrictionForceSpecies, AdhesiveForceSpecies >::read(), WallHandler::readAndAddObject(), SphericalIndenter::setupInitialConditions(), and PeriodicBoundaryHandler::updateMaserParticle().
void BaseObject::setIndex | ( | unsigned int | index | ) |
Allows one to assign an index to an object in the handler/container.
[in] | index | index number of the current object |
References index_.
Referenced by ConstantMassFlowMaserBoundary::addParticleToMaser(), SubcriticalMaserBoundary::addParticleToMaser(), RestrictedWall::getInteractionWith(), BaseParticle::oldRead(), MixedSpecies< NormalForceSpecies, FrictionForceSpecies, AdhesiveForceSpecies >::read(), and SphericalIndenter::setupInitialConditions().
|
pure virtual |
A purely virtual function which has an implementation which writes the name and the object id_ to the output stream.
[in] | os | stream object to which data is written |
Implemented in BaseBoundary, WearableTriangulatedWall, WearableTriangleMeshWall, WearableNurbsWall, VChute, TriangulatedWall, TriangleWall, TriangleMeshWall, SphericalWall, SineWall, Screw, RestrictedWall, ParabolaChute, NurbsWall, MeshTriangle, Membrane, IntersectionOfWalls, InfiniteWallWithHole, HorizontalScrew, CylindricalWall, Combtooth, Coil, BasicUnionOfWalls, BasicIntersectionOfWalls, BaseWall, ArcWall, ParticleSpecies, BaseSpecies, SuperQuadricParticle, ClumpParticle, BaseParticle, SPHInteraction, SinterLinInteraction, SinterInteraction, LinearViscoelasticInteraction, LinearPlasticViscoelasticInteraction, HertzianViscoelasticInteraction, HertzianSinterInteraction, HertzianBSHPViscoelasticInteraction, SlidingFrictionInteraction, MindlinRollingTorsionInteraction, MindlinInteraction, FrictionInteraction, EmptyFrictionInteraction, BaseInteraction, ReversibleAdhesiveInteraction, RegimeSinterInteraction, ParhamiMcMeekingSinterInteraction, LiquidMigrationWilletInteraction, LiquidMigrationLSInteraction, LiquidBridgeWilletInteraction, IrreversibleAdhesiveInteraction, EmptyAdhesiveInteraction, ChargedBondedInteraction, BondedInteraction, Domain, TimeSmoothedCG< Coordinates, BaseFunction, Fields >, TimeAveragedCG< Coordinates, BaseFunction, Fields >, TimeAveragedCG< CGCoordinates::XYZ, BaseFunction, CGFields::StandardFields >, CG< Coordinates, BaseFunction, Fields >, CG< Coordinates, CGFunctions::Lucy, CGFields::StandardFields >, CG< CGCoordinates::O, CGFunctions::Lucy, CGFields::StandardFields >, BaseCG, TimeDependentPeriodicBoundary, SubcriticalMaserBoundaryTEST, SubcriticalMaserBoundary, StressStrainControlBoundary, ShearBoxBoundary, PolydisperseInsertionBoundary, PeriodicBoundary, LeesEdwardsBoundary, InsertionBoundary, HopperInsertionBoundary, HeaterBoundary, FluxBoundary, DropletBoundary, DeletionBoundary, CubeInsertionBoundary, CubeDeletionBoundary, ConstantMassFlowMaserBoundary, CircularPeriodicBoundary, ChuteInsertionBoundary, BidisperseCubeInsertionBoundary, BasePeriodicBoundary, BaseClusterInsertionBoundary, AngledPeriodicBoundary, BaseInteractable, SimpleDrumSuperquadrics, ScrewsymmetricIntersectionOfWalls, HorizontalBaseScrew, AxisymmetricIntersectionOfWalls, Species< NormalForceSpecies, FrictionForceSpecies, AdhesiveForceSpecies >, Species< LinearViscoelasticNormalSpecies >, Species< LinearPlasticViscoelasticNormalSpecies, SlidingFrictionSpecies, IrreversibleAdhesiveSpecies >, Species< LinearViscoelasticNormalSpecies, SlidingFrictionSpecies, IrreversibleAdhesiveSpecies >, MixedSpecies< NormalForceSpecies, FrictionForceSpecies, AdhesiveForceSpecies >, and Interaction< NormalForceInteraction, FrictionForceInteraction, AdhesiveForceInteraction >.
References getName(), groupId_, and id_.
Referenced by BaseInteractable::write(), ParticleSpecies::write(), and BaseBoundary::write().
|
friend |
A purely virtual method with an implementation which reads the index from the stream and assigns it to id_.
[in] | is | |
[in,out] | os | |
[in] | o |
|
friend |
Operator overloading for reading the data from an input stream into the BAseObject "o"
[in] | o | |
[in,out] | is |
|
private |
Identifier of a group within handler.
Useful to define properties to particle or wall clusters, etc. E.g. one can apply an action to a specific group, visualise a specific group, coarse-grain a specific group, etc.
Referenced by getGroupId(), read(), setGroupId(), and write().
|
private |
|
private |
location in BaseHandler::objects_
Referenced by getIndex(), moveInHandler(), and setIndex().