BaseBoundary Class Referenceabstract

#include <BaseBoundary.h>

+ Inheritance diagram for BaseBoundary:

Public Member Functions

 BaseBoundary ()
 default constructor. More...
 
 BaseBoundary (const BaseBoundary &b)
 copy constructor More...
 
 ~BaseBoundary () override
 destructor More...
 
virtual BaseBoundarycopy () const =0
 Used to create a copy of the object NB: purely virtual function. More...
 
void read (std::istream &is) override=0
 Reads the object's id_ from given istream NB: purely virtual function, overriding the version of BaseObject. More...
 
void write (std::ostream &os) const override=0
 Adds object's id_ to given ostream NB: purely virtual function, overriding the version of BaseObject. More...
 
virtual void createPeriodicParticle (BaseParticle *p UNUSED, ParticleHandler &pH UNUSED)
 Creates a periodic particle in case of periodic boundaries in serial build. More...
 
virtual void createPeriodicParticles (ParticleHandler &pH UNUSED)
 Creates periodic copies of given particle in case of periodic boundaries. More...
 
virtual void checkBoundaryAfterParticlesMove (ParticleHandler &pH)
 Virtual function that does things to particles, each time step after particles have moved. More...
 
virtual void checkBoundaryBeforeTimeStep (DPMBase *md)
 Virtual function that does things before each time step. More...
 
virtual void actionsBeforeTimeLoop ()
 Virtual function that does something after DPMBase::setupInitialConditions but before the first time step. More...
 
virtual void modifyGhostAfterCreation (BaseParticle *particle, int i)
 
virtual void writeVTK (std::fstream &file)
 
void setHandler (BoundaryHandler *handler)
 Sets the boundary's BoundaryHandler. More...
 
BoundaryHandlergetHandler () const
 Returns the boundary's BoundaryHandler. More...
 
- Public Member Functions inherited from BaseObject
 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 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

BoundaryHandlerhandler_
 pointer to the boundary's BoundaryHandler More...
 

Detailed Description

Inherits from BaseObject

Constructor & Destructor Documentation

◆ BaseBoundary() [1/2]

BaseBoundary::BaseBoundary ( )

default constructor.

Default constructor

33 {
34  handler_ = nullptr;
35  logger(DEBUG, "BaseBoundary::BaseBoundary() finished");
36 }
Logger< MERCURYDPM_LOGLEVEL > logger("MercuryKernel")
Definition of different loggers with certain modules. A user can define its own custom logger here.
@ DEBUG
BoundaryHandler * handler_
pointer to the boundary's BoundaryHandler
Definition: BaseBoundary.h:152

References DEBUG, handler_, and logger.

◆ BaseBoundary() [2/2]

BaseBoundary::BaseBoundary ( const BaseBoundary b)

copy constructor

Note: shallow copy! Otherwise the HGrid causes a stack overflow.

Copy constructor

43  : BaseObject(b)
44 {
45  handler_ = b.handler_;
46  logger(DEBUG, "BaseBoundary::BaseBoundary(const BaseBoundary &b) finished");
47 }
BaseObject()=default
Default constructor.

References DEBUG, handler_, and logger.

◆ ~BaseBoundary()

BaseBoundary::~BaseBoundary ( )
override

destructor

Destructor

53 {
54  logger(DEBUG, "BaseBoundary::~BaseBoundary() finished");
55 }

References DEBUG, and logger.

Member Function Documentation

◆ actionsBeforeTimeLoop()

void BaseBoundary::actionsBeforeTimeLoop ( )
virtual

Virtual function that does something after DPMBase::setupInitialConditions but before the first time step.

Can be used to perform actions before the time loop, but after setupInitialConditions.

Reimplemented in SubcriticalMaserBoundaryTEST, SubcriticalMaserBoundary, DropletBoundary, and ConstantMassFlowMaserBoundary.

126 {
127  logger(VERBOSE, "In BaseBoundary::checkBoundaryBeforeTimeLoop\n");
128 }
@ VERBOSE

References logger, and VERBOSE.

◆ checkBoundaryAfterParticlesMove()

void BaseBoundary::checkBoundaryAfterParticlesMove ( ParticleHandler pH)
virtual

Virtual function that does things to particles, each time step after particles have moved.

checks whether given particle passed the boundary, and if so, does something special with it. This is called after the particles moved, but before the force-computation. NB: virtual function

Parameters
[in]PParticle checked
[out]pHthe particle handler.
Returns
returns TRUE if given particle actually did pass the boundary

Reimplemented in TimeDependentPeriodicBoundary, SubcriticalMaserBoundaryTEST, SubcriticalMaserBoundary, PeriodicBoundary, LeesEdwardsBoundary, HeaterBoundary, FluxBoundary, DropletBoundary, DeletionBoundary, ConstantMassFlowMaserBoundary, CircularPeriodicBoundary, BasePeriodicBoundary, AngledPeriodicBoundary, and StressStrainControlBoundary.

114 {
115 }

◆ checkBoundaryBeforeTimeStep()

void BaseBoundary::checkBoundaryBeforeTimeStep ( DPMBase md)
virtual

Virtual function that does things before each time step.

What this does depends on the type of boundary. For example, an InsertionBoundary introduces new particles (and how it does that in turn depends on the type of InsertionBoundary).

Parameters
[in]mdthe problem's DPMBase object

Reimplemented in RandomClusterInsertionBoundary, InsertionBoundary, BaseClusterInsertionBoundary, and FixedClusterInsertionBoundary.

102 {
103 }

◆ copy()

◆ createPeriodicParticle()

void BaseBoundary::createPeriodicParticle ( BaseParticle *p  UNUSED,
ParticleHandler &pH  UNUSED 
)
virtual

Creates a periodic particle in case of periodic boundaries in serial build.

Used to create a single periodic copy of a particle in classes which implement periodic boundary conditions

Parameters
[in]pparticle of which periodic copies are to be created
[in]pHthe particle handler
82 {
83 }

◆ createPeriodicParticles()

void BaseBoundary::createPeriodicParticles ( ParticleHandler &pH  UNUSED)
virtual

Creates periodic copies of given particle in case of periodic boundaries.

Used to create periodic copies of particles in classes which implement periodic boundary conditions NB: virtual function

Parameters
[in]pHthe particle handler
92 {
93 }

◆ getHandler()

BoundaryHandler * BaseBoundary::getHandler ( ) const

Returns the boundary's BoundaryHandler.

Returns the pointer to the BoundaryHandler the boundary belongs to

Returns
pointer to the handler
144 {
145  return handler_;
146 }

References handler_.

Referenced by DropletBoundary::actionsBeforeTimeLoop(), SubcriticalMaserBoundaryTEST::actionsBeforeTimeLoop(), ConstantMassFlowMaserBoundary::activateMaser(), SubcriticalMaserBoundary::activateMaser(), SubcriticalMaserBoundaryTEST::activateMaser(), StressStrainControlBoundary::activateStrainRateControl(), ConstantMassFlowMaserBoundary::addParticleToMaser(), SubcriticalMaserBoundary::addParticleToMaser(), DeletionBoundary::checkBoundaryAfterParticleMoved(), StressStrainControlBoundary::checkBoundaryAfterParticlesMove(), DropletBoundary::checkBoundaryAfterParticlesMove(), PeriodicBoundary::checkBoundaryAfterParticlesMove(), SubcriticalMaserBoundaryTEST::checkBoundaryAfterParticlesMove(), ConstantMassFlowMaserBoundary::closeMaser(), StressStrainControlBoundary::computeStrainRate(), StressStrainControlBoundary::computeStressError(), SubcriticalMaserBoundaryTEST::copyExtraParticles(), PeriodicBoundary::createGhostParticle(), TimeDependentPeriodicBoundary::createGhostParticle(), SubcriticalMaserBoundary::deactivateMaser(), SubcriticalMaserBoundaryTEST::deactivateMaser(), StressStrainControlBoundary::determineStressControlledShearBoundaries(), SubcriticalMaserBoundaryTEST::extendBottom(), InsertionBoundary::generateParticle(), LeesEdwardsBoundary::getCurrentShift(), LeesEdwardsBoundary::getCurrentVelocity(), SubcriticalMaserBoundaryTEST::performActionsBeforeAddingParticles(), ConstantMassFlowMaserBoundary::read(), InsertionBoundary::read(), SubcriticalMaserBoundary::read(), StressStrainControlBoundary::set(), InsertionBoundary::setVariableVolumeFlowRate(), ShearBoxBoundary::shiftHorizontalPosition(), LeesEdwardsBoundary::shiftVerticalPosition(), StressStrainControlBoundary::updateDomainSize(), and LeesEdwardsBoundary::write().

◆ modifyGhostAfterCreation()

void BaseBoundary::modifyGhostAfterCreation ( BaseParticle particle,
int  i 
)
virtual

Reimplemented in SubcriticalMaserBoundaryTEST.

118 {
119 }

◆ read()

◆ setHandler()

void BaseBoundary::setHandler ( BoundaryHandler handler)

Sets the boundary's BoundaryHandler.

Sets the pointer to the BounadaryHandler the boundary belongs to

Parameters
[in]handlerpointer to the boundary handler
135 {
136  handler_ = handler;
137 }

References handler_.

Referenced by GranuDrum::GranuDrum(), BoundaryHandler::readAndAddObject(), StressStrainControlBoundary::set(), InsertionBoundaryMPI2Test::setupInitialConditions(), and StressStrainControl::setupInitialConditions().

◆ write()

void BaseBoundary::write ( std::ostream &  os) const
overridepure virtual

◆ writeVTK()

virtual void BaseBoundary::writeVTK ( std::fstream &  file)
inlinevirtual

Reimplemented in DropletBoundary.

112 {}

Member Data Documentation

◆ handler_

BoundaryHandler* BaseBoundary::handler_
private

pointer to the boundary's BoundaryHandler

Referenced by BaseBoundary(), getHandler(), and setHandler().


The documentation for this class was generated from the following files: