|
Basic class for walls. More...
#include <BaseWall.h>
Public Member Functions | |
BaseWall () | |
Default constructor. More... | |
BaseWall (const BaseWall &w) | |
Copy constructor. More... | |
~BaseWall () override | |
Default destructor. More... | |
virtual BaseWall * | copy () const =0 |
Pure virtual function that can be overwritten in inherited classes in order to copy a BaseWall. More... | |
void | read (std::istream &is) override |
Function that reads a BaseWall from an input stream, usually a restart file. More... | |
void | write (std::ostream &os) const override |
Function that writes a BaseWall to an output stream, usually a restart file. More... | |
virtual bool | getDistanceAndNormal (const BaseParticle &P, Mdouble &distance, Vec3D &normal_return) const =0 |
Pure virtual function that computes the distance of a BaseParticle to this wall and returns the normal of this wall if there is a collision. More... | |
virtual bool | getDistanceNormalOverlap (const BaseParticle &P, Mdouble &distance, Vec3D &normal_return, Mdouble &overlap) const |
virtual bool | getDistanceNormalOverlapSuperquadric (const SuperQuadricParticle &p, Mdouble &distance, Vec3D &normal_return, Mdouble &overlap) const |
virtual Vec3D | getFurthestPointSuperQuadric (const Vec3D &normalBodyFixed, const Vec3D &axes, Mdouble eps1, Mdouble eps2) const |
virtual void | setHandler (WallHandler *handler) |
A function which sets the WallHandler for this BaseWall. More... | |
WallHandler * | getHandler () const |
A function which returns the WallHandler that handles this BaseWall. More... | |
void | setIndSpecies (unsigned int indSpecies) override |
Define the species of this wall using the index of the species in the SpeciesHandler in this DPMBase. More... | |
void | setSpecies (const ParticleSpecies *species) |
Defines the species of the current wall. More... | |
bool | isFixed () const override |
void | setForceControl (Vec3D forceGoal, Vec3D gainFactor, Vec3D baseVelocity={0, 0, 0}) |
Slowly adjusts the force on a wall towards a specified goal, by adjusting (prescribing) the velocity of the wall. More... | |
virtual bool | isLocal (Vec3D &min, Vec3D &max) const |
bool | getLinePlaneIntersect (Vec3D &intersect, const Vec3D &p0, const Vec3D &p1, const Vec3D &n, const Vec3D &p) |
bool | isInsideWallVTK (const Vec3D &point, const Vec3D &normal, const Vec3D &position) const |
void | projectOntoWallVTK (Vec3D &point0, const Vec3D &point1, const Vec3D &normal, const Vec3D &position) const |
void | intersectVTK (std::vector< Vec3D > &points, Vec3D normal, Vec3D position) const |
virtual BaseInteraction * | getInteractionWithSuperQuad (SuperQuadricParticle *p, unsigned timeStamp, InteractionHandler *interactionHandler) |
virtual void | writeVTK (VTKContainer &vtk) const |
void | getVTK (std::vector< Vec3D > &points, std::vector< std::vector< double >> &triangleStrips) |
const Vec3D | getAxis () const |
BaseInteraction * | getInteractionWith (BaseParticle *p, unsigned timeStamp, InteractionHandler *interactionHandler) override |
Returns the interaction between this wall and a given particle, nullptr if there is no interaction. More... | |
virtual void | actionsOnRestart () |
No implementation but can be overidden in its derived classes. More... | |
virtual void | actionsAfterParticleGhostUpdate () |
No implementation but can be overidden in its derived classes. More... | |
virtual void | handleParticleAddition (unsigned int id, BaseParticle *p) |
Handles the addition of particles to the particleHandler. More... | |
virtual void | handleParticleRemoval (unsigned int id) |
Handles the addition of particles to the particleHandler. More... | |
virtual void | checkInteractions (InteractionHandler *interactionHandler, unsigned int timeStamp) |
Check if all interactions are valid. More... | |
bool | getVTKVisibility () const |
void | setVTKVisibility (bool vtkVisibility) |
void | addRenderedWall (BaseWall *w) |
BaseWall * | getRenderedWall (size_t i) const |
std::vector< BaseWall * > | getRenderedWalls () const |
void | removeRenderedWalls () |
void | renderWall (VTKContainer &vtk) |
void | addParticlesAtWall (unsigned numElements=50) |
void | setVelocityControl (Vec3D forceGoal, Vec3D gainFactor, Vec3D baseVelocity) |
virtual void | writeWallDetailsVTK (VTKData &data) const |
virtual void | computeWear () |
Public Member Functions inherited from BaseInteractable | |
BaseInteractable () | |
Default BaseInteractable constructor. More... | |
BaseInteractable (const BaseInteractable &p) | |
Copy constructor. More... | |
~BaseInteractable () override | |
Destructor, it simply destructs the BaseInteractable and all the objects it contains. More... | |
unsigned int | getIndSpecies () const |
Returns the index of the species associated with the interactable object. More... | |
const ParticleSpecies * | getSpecies () const |
Returns a pointer to the species of this BaseInteractable. More... | |
void | setSpecies (const ParticleSpecies *species) |
Sets the species of this BaseInteractable. More... | |
const Vec3D & | getForce () const |
Returns the force on this BaseInteractable. More... | |
const Vec3D & | getTorque () const |
Returns the torque on this BaseInteractable. More... | |
void | setForce (const Vec3D &force) |
Sets the force on this BaseInteractable. More... | |
void | setTorque (const Vec3D &torque) |
Sets the torque on this BaseInteractable. More... | |
void | addForce (const Vec3D &addForce) |
Adds an amount to the force on this BaseInteractable. More... | |
void | addTorque (const Vec3D &addTorque) |
Adds an amount to the torque on this BaseInteractable. More... | |
virtual void | resetForceTorque (int numberOfOMPthreads) |
void | sumForceTorqueOMP () |
const Vec3D & | getPosition () const |
Returns the position of this BaseInteractable. More... | |
const Quaternion & | getOrientation () const |
Returns the orientation of this BaseInteractable. More... | |
virtual void | setPosition (const Vec3D &position) |
Sets the position of this BaseInteractable. More... | |
void | setOrientationViaNormal (Vec3D normal) |
Sets the orientation of this BaseInteractable by defining the vector that results from the rotation of the (1,0,0) vector. More... | |
void | setOrientationViaEuler (Vec3D eulerAngle) |
Sets the orientation of this BaseInteractable by defining the euler angles. More... | |
virtual void | setOrientation (const Quaternion &orientation) |
Sets the orientation of this BaseInteractable. More... | |
virtual void | move (const Vec3D &move) |
Moves this BaseInteractable by adding an amount to the position. More... | |
virtual void | rotate (const Vec3D &angularVelocityDt) |
Rotates this BaseInteractable. More... | |
const std::vector< BaseInteraction * > & | getInteractions () const |
Returns a list of interactions which belong to this interactable. More... | |
void | addInteraction (BaseInteraction *I) |
Adds an interaction to this BaseInteractable. More... | |
bool | removeInteraction (BaseInteraction *I) |
Removes an interaction from this BaseInteractable. More... | |
void | copyInteractionsForPeriodicParticles (const BaseInteractable &p) |
Copies interactions to this BaseInteractable whenever a periodic copy made. More... | |
void | setVelocity (const Vec3D &velocity) |
set the velocity of the BaseInteractable. More... | |
void | setAngularVelocity (const Vec3D &angularVelocity) |
set the angular velocity of the BaseInteractble. More... | |
void | addVelocity (const Vec3D &velocity) |
adds an increment to the velocity. More... | |
void | addAngularVelocity (const Vec3D &angularVelocity) |
add an increment to the angular velocity. More... | |
virtual const Vec3D & | getVelocity () const |
Returns the velocity of this interactable. More... | |
virtual const Vec3D & | getAngularVelocity () const |
Returns the angular velocity of this interactable. More... | |
void | setPrescribedPosition (const std::function< Vec3D(double)> &prescribedPosition) |
Allows the position of an infinite mass interactable to be prescribed. More... | |
void | applyPrescribedPosition (double time) |
Computes the position from the user defined prescribed position function. More... | |
void | setPrescribedVelocity (const std::function< Vec3D(double)> &prescribedVelocity) |
Allows the velocity of an infinite mass interactable to be prescribed. More... | |
void | applyPrescribedVelocity (double time) |
Computes the velocity from the user defined prescribed velocity function. More... | |
void | setPrescribedOrientation (const std::function< Quaternion(double)> &prescribedOrientation) |
Allows the orientation of the infinite mass interactbale to be prescribed. More... | |
void | applyPrescribedOrientation (double time) |
Computes the orientation from the user defined prescribed orientation function. More... | |
void | setPrescribedAngularVelocity (const std::function< Vec3D(double)> &prescribedAngularVelocity) |
Allows the angular velocity of the infinite mass interactable to be prescribed. More... | |
void | applyPrescribedAngularVelocity (double time) |
Computes the angular velocity from the user defined prescribed angular velocity. More... | |
virtual const Vec3D | getVelocityAtContact (const Vec3D &contact) const |
Returns the velocity at the contact point, use by many force laws. More... | |
void | integrateBeforeForceComputation (double time, double timeStep) |
This is part of integrate routine for objects with infinite mass. More... | |
void | integrateAfterForceComputation (double time, double timeStep) |
This is part of the integration routine for objects with infinite mass. More... | |
virtual Mdouble | getInvMass () const |
virtual Mdouble | getCurvature (const Vec3D &labFixedCoordinates) const |
virtual bool | isFaceContact (const Vec3D &normal) const |
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 |
Static Public Member Functions | |
static void | addToVTK (const std::vector< Vec3D > &points, VTKContainer &vtk) |
Takes the points provided and adds a triangle strip connecting these points to the vtk container. More... | |
Private Attributes | |
WallHandler * | handler_ |
bool | vtkVisibility_ = true |
std::vector< BaseWall * > | renderedWalls_ |
Basic class for walls.
Class from which all walls inherit. Please note the getVelocity can for some walls be dependent on which point on the wall is meant.
BaseWall::BaseWall | ( | ) |
Default constructor.
Default constructor for the BaseWall class. Simply creates an empty BaseWall. Note that it also, by default, sets the handler to a null pointer - i.e. does not automatically assign the current object a given WallHandler.
BaseWall::BaseWall | ( | const BaseWall & | w | ) |
Copy constructor.
An existing wall (i.e. a BaseWall type object), w, is passed as an argument. A copy of this object is then created. The BaseWall class is relatively low-level, and this copy constructor simply acts to provide a pointer to the WallHandler belonging to w, i.e. assigning the new wall to the same handler as the original. (A derived class' copy constructor calls this, but does all of the other work.)
[in] | w | - The existing BaseWall object to be copied. |
References DEBUG, handler_, logger, renderedWalls_, and vtkVisibility_.
|
override |
Default destructor.
Note that this is a virtual destructor, ensuring that derived classes can be deleted easily and safely.
References DEBUG, logger, and removeRenderedWalls().
|
inlinevirtual |
No implementation but can be overidden in its derived classes.
This function is called by WallHandler::actionsAfterParticleGhostUpdate, which is called by DPMBase::computeOneTimeStep directly after the ghost particle update. It may be used to adjust wall properties based on the changed wall positions (for an example, look e.g. at MeshTriangle).
Reimplemented in MeshTriangle.
|
inlinevirtual |
No implementation but can be overidden in its derived classes.
This function is called by DPMBase::solve, if the simulation is restarted.
Reimplemented in MeshTriangle.
void BaseWall::addParticlesAtWall | ( | unsigned | numElements = 50 | ) |
References getDistanceAndNormal(), BaseHandler< T >::getDPMBase(), getHandler(), BaseObject::getIndex(), DPMBase::getMax(), DPMBase::getMin(), BaseHandler< T >::getSize(), INFO, logger, Vec3D::min(), DPMBase::particleHandler, BaseInteractable::setPosition(), BaseParticle::setRadius(), BaseParticle::setSpecies(), DPMBase::speciesHandler, Vec3D::X, Vec3D::Y, and Vec3D::Z.
Referenced by AxisymmetricWallSelfTest::setupInitialConditions().
void BaseWall::addRenderedWall | ( | BaseWall * | w | ) |
References renderedWalls_.
|
static |
Takes the points provided and adds a triangle strip connecting these points to the vtk container.
References constants::i, VTKContainer::points, and VTKContainer::triangleStrips.
Referenced by LevelSetWall::createVTK(), and InfiniteWall::writeVTK().
|
inlinevirtual |
Check if all interactions are valid.
This function is called by DPMBase::computeAllForces. It may be used by a wall to check and modify interactions previously created during contact detection.
Reimplemented in MeshTriangle.
Referenced by DPMBase::computeAllForces().
|
inlinevirtual |
Reimplemented in WearableTriangulatedWall, WearableTriangleMeshWall, and WearableNurbsWall.
Referenced by DPMBase::computeAllForces().
|
pure virtual |
Pure virtual function that can be overwritten in inherited classes in order to copy a BaseWall.
Implemented in WearableTriangulatedWall, WearableTriangleMeshWall, VChute, TriangulatedWall, TriangleWall, TriangleMeshWall, SphericalWall, SineWall, RestrictedWall, ParabolaChute, NurbsWall, MeshTriangle, LevelSetWall, IntersectionOfWalls, InfiniteWallWithHole, InfiniteWall, CylindricalWall, Combtooth, Coil, BasicUnionOfWalls, BasicIntersectionOfWalls, ArcWall, WearableNurbsWall, SimpleDrumSuperquadrics, ScrewsymmetricIntersectionOfWalls, Screw, HorizontalScrew, HorizontalBaseScrew, and AxisymmetricIntersectionOfWalls.
Referenced by BasicIntersectionOfWalls::add(), BasicUnionOfWalls::add(), and RestrictedWall::set().
const Vec3D BaseWall::getAxis | ( | ) | const |
This functions returns a axis for a wall using it Quaternion descriptions. At the moment Quaternion are not implemented for a wall; so this is currently a workaround for the non-implementation Quaternion for the walls. In the future this functions will be replaced.
References BaseInteractable::getOrientation(), Quaternion::q1, Quaternion::q2, Quaternion::q3, Vec3D::X, Vec3D::Y, and Vec3D::Z.
Referenced by ScrewsymmetricIntersectionOfWalls::computeDeltaZ().
|
pure virtual |
Pure virtual function that computes the distance of a BaseParticle to this wall and returns the normal of this wall if there is a collision.
Beware, the distance and normal are output parameters, not return values!
[in] | P | Reference to the BaseParticle we want to compute the distance to the BaseWall of. |
[out] | distance | Distance of the BaseParticle to the BaseWall. |
[out] | normal_return | The normal of the wall. Is only given if there is a collision. |
Implemented in VChute, TriangulatedWall, TriangleWall, TriangleMeshWall, SphericalWall, SineWall, SimpleDrumSuperquadrics, RestrictedWall, ParabolaChute, MeshTriangle, LevelSetWall, IntersectionOfWalls, InfiniteWallWithHole, InfiniteWall, CylindricalWall, Combtooth, Coil, BasicUnionOfWalls, BasicIntersectionOfWalls, ScrewsymmetricIntersectionOfWalls, Screw, NurbsWall, HorizontalScrew, HorizontalBaseScrew, AxisymmetricIntersectionOfWalls, and ArcWall.
Referenced by addParticlesAtWall(), ChuteWithContraction::ChuteWithContraction(), ChuteWithPeriodicInflowAndContraction::ChuteWithPeriodicInflowAndContraction(), ContractionWithPeriodicInflow::ContractionWithPeriodicInflow(), Domain::findNewMPIInteractions(), RestrictedWall::getDistanceAndNormal(), and getDistanceNormalOverlap().
|
virtual |
References getDistanceAndNormal(), getDistanceNormalOverlapSuperquadric(), and Global_Physical_Variables::P.
Referenced by getInteractionWith().
|
virtual |
Reimplemented in SimpleDrumSuperquadrics, and InfiniteWall.
Referenced by getDistanceNormalOverlap().
|
virtual |
WallHandler * BaseWall::getHandler | ( | ) | const |
A function which returns the WallHandler that handles this BaseWall.
References handler_.
Referenced by addParticlesAtWall(), MeshTriangle::checkInteractions(), WearableNurbsWall::computeWear(), WearableTriangleMeshWall::computeWear(), WearableTriangulatedWall::computeWear(), InfiniteWall::createVTK(), HorizontalBaseScrew::getDistanceAndNormal(), NurbsWall::getDistanceAndNormal(), Screw::getDistanceAndNormal(), IntersectionOfWalls::getDistanceAndNormal(), getInteractionWith(), TriangleMeshWall::getInteractionWith(), IntersectionOfWalls::IntersectionOfWalls(), read(), BasicIntersectionOfWalls::read(), BasicUnionOfWalls::read(), renderWall(), MeshTriangle::retrieveVertexParticles(), Screw::rotate(), setHandler(), setIndSpecies(), setSpecies(), AxisymmetricIntersectionOfWalls::writeVTK(), HorizontalBaseScrew::writeVTK(), IntersectionOfWalls::writeVTK(), and ScrewsymmetricIntersectionOfWalls::writeVTK().
|
overridevirtual |
Returns the interaction between this wall and a given particle, nullptr if there is no interaction.
[in] | p | Pointer to the BaseParticle which we want to check the interaction for. |
[in] | timeStamp | The time at which we want to look at the interaction. |
[in] | interactionHandler | A pointer to the InteractionHandler in which the interaction can be found. |
Implements BaseInteractable.
Reimplemented in VChute, TriangulatedWall, TriangleMeshWall, SineWall, RestrictedWall, ParabolaChute, MeshTriangle, and Combtooth.
References BaseInteractable::addForce(), BaseInteractable::addTorque(), Vec3D::cross(), DEBUG, Vec3D::dot(), BaseParticle::getAxes(), BaseInteraction::getContactPoint(), getDistanceNormalOverlap(), BaseParticle::getExponentEps1(), BaseParticle::getExponentEps2(), getFurthestPointSuperQuadric(), BaseObject::getGroupId(), getHandler(), InteractionHandler::getInteraction(), BaseInteractable::getInteractions(), BaseInteraction::getNormal(), BaseInteractable::getOrientation(), BaseInteraction::getOverlap(), BaseInteractable::getPosition(), BaseParticle::getRadius(), constants::i, BaseInteractable::isFaceContact(), BaseParticle::isSphericalParticle(), logger, Quaternion::rotate(), Quaternion::rotateBack(), BaseInteraction::setContactPoint(), BaseInteraction::setDistance(), BaseInteraction::setNormal(), and BaseInteraction::setOverlap().
Referenced by DropletBoundary::checkBoundaryAfterParticlesMove(), DPMBase::computeForcesDueToWalls(), Mercury3Dclump::computeForcesDueToWalls(), MeshTriangle::getInteractionWith(), RestrictedWall::getInteractionWith(), PeriodicBoundaryHandler::processLocalInteractionData(), GetDistanceAndNormalForTriangleWalls::setupInitialConditions(), ContactDetectionWithWallTester::testEllipsoidsContact(), and ContactDetectionWithWallTester::testSpheresContact().
|
virtual |
Reimplemented in SimpleDrumSuperquadrics.
Referenced by SimpleDrumSuperquadrics::getInteractionWithSuperQuad().
bool BaseWall::getLinePlaneIntersect | ( | Vec3D & | intersect, |
const Vec3D & | p0, | ||
const Vec3D & | p1, | ||
const Vec3D & | n, | ||
const Vec3D & | p | ||
) |
References Vec3D::dot(), and n.
BaseWall * BaseWall::getRenderedWall | ( | size_t | i | ) | const |
References constants::i, and renderedWalls_.
std::vector< BaseWall * > BaseWall::getRenderedWalls | ( | ) | const |
References renderedWalls_.
bool BaseWall::getVTKVisibility | ( | ) | const |
|
inlinevirtual |
Handles the addition of particles to the particleHandler.
This function is called by DPMBase::handleParticleAddition, whenever a particle is added to the particleHandler. It may be used to update stored pointers to particles
[in] | id | The id of the removed particle. |
[in] | p | A pointer to the particle. |
Reimplemented in MeshTriangle.
|
inlinevirtual |
Handles the addition of particles to the particleHandler.
This function is called by DPMBase::handleParticleRemoval whenever a (ghost-)particle is removed from the particleHandler. It may be used to update stored pointers to particles
[in] | id | The id of the removed particle. |
Reimplemented in MeshTriangle.
Intersects a of set VTK points representing a wall with a half-space defined by position and normal; This is used in createVTK to restrict the VTK points representing a wall to the inside of the domain.
Checks if a set of VTK points is inside a half-space defined by position and normal; all points outside the half-space are projected onto the half-space boundary. Thus, if the old set of points represented a wall object, the new set of points is represents the intersection of the wall with the half-space.
References DEBUG, isInsideWallVTK(), logger, and projectOntoWallVTK().
Referenced by InfiniteWall::createVTK(), AxisymmetricIntersectionOfWalls::writeVTK(), HorizontalBaseScrew::writeVTK(), IntersectionOfWalls::writeVTK(), and ScrewsymmetricIntersectionOfWalls::writeVTK().
|
overridevirtual |
Sets all walls (unlike particles) to be inherently fixed - i.e. the bool "is fixed" will by definition return "true" when called for a wall (i.e. any BaseWall tyope object).
Implements BaseInteractable.
bool BaseWall::isInsideWallVTK | ( | const Vec3D & | point, |
const Vec3D & | normal, | ||
const Vec3D & | position | ||
) | const |
Checks if point is in wall (if close to the wall, the point is assumed out of the wall)
References Vec3D::dot().
Referenced by intersectVTK().
if isLocal returns true and the DPM class derived from MercuryBase, the hGrid will be used to find wall-particle contacts, using min/max.
Reimplemented in TriangleWall, TriangleMeshWall, and MeshTriangle.
Referenced by Mercury3D::computeWallForces().
void BaseWall::projectOntoWallVTK | ( | Vec3D & | point0, |
const Vec3D & | point1, | ||
const Vec3D & | normal, | ||
const Vec3D & | position | ||
) | const |
Moves point0 onto the surface of the wallsuch that the direction of the edge from point0 to point1 is preserved.
intersectVTK = point[i] + t*(point[i-1]-point[i]) and (intersectVTK - position) normal_=0. => (position-point[i]-t(point[i-1]-point[i]))*normal_=0 t=(position-point[i]))*normal_ / (point[i-1]-point[i]))*normal_
References Vec3D::dot().
Referenced by intersectVTK().
|
overridevirtual |
Function that reads a BaseWall from an input stream, usually a restart file.
The BaseWall takes no more information than for a BaseInteractable. (A derived class' read method does most of the work.)
[in] | is | - The input stream from which the BaseWall is read. |
Reimplemented from BaseInteractable.
Reimplemented in WearableTriangulatedWall, WearableTriangleMeshWall, WearableNurbsWall, VChute, TriangulatedWall, TriangleWall, TriangleMeshWall, SphericalWall, SineWall, Screw, RestrictedWall, ParabolaChute, NurbsWall, MeshTriangle, LevelSetWall, IntersectionOfWalls, InfiniteWallWithHole, InfiniteWall, HorizontalScrew, CylindricalWall, Combtooth, Coil, BasicUnionOfWalls, BasicIntersectionOfWalls, SimpleDrumSuperquadrics, ScrewsymmetricIntersectionOfWalls, and HorizontalBaseScrew.
References WallHandler::createObject(), getHandler(), constants::i, helpers::isNext(), BaseInteractable::read(), read(), renderedWalls_, setHandler(), and vtkVisibility_.
Referenced by SimpleDrumSuperquadrics::read(), ArcWall::read(), read(), BasicIntersectionOfWalls::read(), BasicUnionOfWalls::read(), Coil::read(), Combtooth::read(), CylindricalWall::read(), HorizontalScrew::read(), InfiniteWall::read(), InfiniteWallWithHole::read(), IntersectionOfWalls::read(), LevelSetWall::read(), MeshTriangle::read(), NurbsWall::read(), RestrictedWall::read(), Screw::read(), SineWall::read(), SphericalWall::read(), TriangleMeshWall::read(), TriangleWall::read(), and VChute::read().
void BaseWall::removeRenderedWalls | ( | ) |
References renderedWalls_.
Referenced by IntersectionOfWalls::clear(), and ~BaseWall().
void BaseWall::renderWall | ( | VTKContainer & | vtk | ) |
References DPMBase::dataFile, BaseHandler< T >::getDPMBase(), getHandler(), File::getSaveCount(), DPMBase::getTime(), DPMBase::getTimeStep(), getVTKVisibility(), constants::i, renderedWalls_, and writeVTK().
Slowly adjusts the force on a wall towards a specified goal, by adjusting (prescribing) the velocity of the wall.
[in] | forceGoal | - the desired force on the wall |
[in] | gainFactor | - the rate at which the velocity of the wall should be adjusted |
[in] | baseVelocity | - the velocity that the wall should travel at when the forceGoal is reached |
References BaseInteractable::getForce(), Vec3D::multiplyElementwise(), and BaseInteractable::setPrescribedVelocity().
|
virtual |
A function which sets the WallHandler for this BaseWall.
Setting the WallHandler also sets the DPMBase and therefore the SpeciesHandler for the species. This wall's species pointer is updated to the new SpeciesHandler.
[in] | handler | - A pointer to the WallHandler that we want to handle this wall. |
Reimplemented in IntersectionOfWalls, and MeshTriangle.
References getHandler(), BaseInteractable::getIndSpecies(), BaseHandler< T >::getObject(), handler_, and setSpecies().
Referenced by WallHandler::addObject(), read(), BasicIntersectionOfWalls::read(), BasicUnionOfWalls::read(), WallHandler::readAndCreateObject(), MeshTriangle::setHandler(), IntersectionOfWalls::setHandler(), and setSpecies().
|
overridevirtual |
Define the species of this wall using the index of the species in the SpeciesHandler in this DPMBase.
[in] | indSpecies | The index of the species of this BaseWall in the SpeciesHandler. |
Reimplemented from BaseInteractable.
References ERROR, getHandler(), BaseObject::getId(), BaseInteractable::getIndSpecies(), BaseHandler< T >::getObject(), handler_, logger, BaseInteractable::setIndSpecies(), and setSpecies().
void BaseWall::setSpecies | ( | const ParticleSpecies * | species | ) |
Defines the species of the current wall.
Firstly, calls the "BaseInteractable" version of the setSpecies function (BaseInteractable::setSpecies()) which actually sets the species_ of the particle (i.e. provides a pointer to the ParticleSpecies which stores the relevant material properties which we wish to assign to out wall) as well as assigning the relevant species index (indSpecies_) as well as performing relevant error checks.
Secondly, sets a pointer to the relevant handler, which is needed to retrieve species information.
[in] | species | - The pointer to the species whose properties we want to assign to the current wall - i.e. the species we want to "give" the wall. |
References BaseHandler< T >::getDPMBase(), BaseSpecies::getHandler(), getHandler(), setHandler(), BaseInteractable::setSpecies(), and DPMBase::wallHandler.
Referenced by ShiftingConstantMassFlowMaserBoundarySelfTest::actionsAfterTimeStep(), ShiftingMaserBoundarySelfTest::actionsAfterTimeStep(), IntersectionOfWalls::addObject(), NautaMixer::addTopWall(), Membrane::buildMesh(), Chute::createBottom(), MercuryProblem::createTriangleWall(), SCoupling< M, O >::createTriangleWall(), CSCWalls::CSCWalls(), GranuDrum::GranuDrum(), HorizontalScrew::HorizontalScrew(), InfiniteWall::InfiniteWall(), InitialConditions< SpeciesType >::InitialConditions(), LevelSetWall::LevelSetWall(), loadingTest(), main(), MercuryCGSelfTest::MercuryCGSelfTest(), MovingWall::MovingWall(), normalAndTangentialLoadingTest(), ParticleCreation::ParticleCreation(), FileReader::read(), WallHandler::readAndCreateObject(), WallHandler::readAndCreateOldObject(), DPMBase::readParAndIniFiles(), WallHandler::readTriangleWall(), TriangleMeshWall::refineTriangle(), RestrictedWall::set(), TriangleMeshWall::set(), setHandler(), setIndSpecies(), IntersectionOfWalls::setSpecies(), TriangleMeshWall::setSpecies(), T_protectiveWall::setupInitialConditions(), LawinenBox::setupInitialConditions(), MercuryLogo::setupInitialConditions(), SmoothChute::setupInitialConditions(), multiParticleT1::setupInitialConditions(), VerticalMixer::setupInitialConditions(), Binary::setupInitialConditions(), MaserRepeatedOutInMPI2Test::setupInitialConditions(), FreeCooling2DinWallsDemo::setupInitialConditions(), FreeCooling3DinWallsDemo::setupInitialConditions(), HeaterBoundaryTest::setupInitialConditions(), HourGlass2D::setupInitialConditions(), HourGlass::setupInitialConditions(), MinimalExampleDrum::setupInitialConditions(), ShiftingConstantMassFlowMaserBoundarySelfTest::setupInitialConditions(), ShiftingMaserBoundarySelfTest::setupInitialConditions(), SilbertPeriodic::setupInitialConditions(), GetDistanceAndNormalForScrew::setupInitialConditions(), GetDistanceAndNormalForTriangleWall::setupInitialConditions(), MyCoil::setupInitialConditions(), Nurbs::setupInitialConditions(), Drum::setupInitialConditions(), HertzSelfTest::setupInitialConditions(), MindlinSelfTest::setupInitialConditions(), Penetration::setupInitialConditions(), Silo::setupInitialConditions(), Chutebelt::setupInitialConditions(), ConstantMassFlowMaserBoundaryMixedSpeciesSelfTest::setupInitialConditions(), ConstantMassFlowMaserSelfTest::setupInitialConditions(), InsertionBoundarySelfTest::setupInitialConditions(), PolydisperseInsertionBoundarySelfTest::setupInitialConditions(), CGHandlerSelfTest::setupInitialConditions(), NewtonsCradleSelftest::setupInitialConditions(), NewtonsCradleSelfTest::setupInitialConditions(), SquarePacking::setupInitialConditions(), ChargedBondedParticleUnitTest::setupInitialConditions(), WallParticleCollision::setupInitialConditions(), my_problem_HGRID::setupInitialConditions(), FreeFallInteractionSelfTest::setupInitialConditions(), FreeFallSelfTest::setupInitialConditions(), LiquidMigrationSelfTest::setupInitialConditions(), DPM::setupInitialConditions(), ObliqueImpactSelfTest::setupInitialConditions(), TwoBondedParticleElasticCollision::setupInitialConditions(), TwoParticleElasticCollisionInteraction::setupInitialConditions(), TwoParticleElasticCollision::setupInitialConditions(), CoilSelfTest::setupInitialConditions(), GetDistanceAndNormalForTriangleWalls::setupInitialConditions(), RollingOverTriangleWalls::setupInitialConditions(), UnionOfWalls::setupInitialConditions(), DrumRot::setupInitialConditions(), RotatingDrum::setupInitialConditions(), Wall::setupInitialConditions(), BouncingSuperQuadric::setupInitialConditions(), EllipsoidsBouncingOnWallDemo::setupInitialConditions(), GranularCollapse::setupInitialConditions(), EllipticalSuperQuadricCollision::setupInitialConditions(), protectiveWall::setupInitialConditions(), Tutorial11::setupInitialConditions(), Tutorial12::setupInitialConditions(), Tutorial3::setupInitialConditions(), Tutorial4::setupInitialConditions(), Tutorial7::setupInitialConditions(), Tutorial8::setupInitialConditions(), Tutorial9::setupInitialConditions(), ParticleWallInteraction::setupInitialConditions(), EvaporationAndHeatTest::setupInitialConditions(), ExtremeOverlapWithWallsUnitTest::setupInitialConditions(), FreeFallHertzMindlinUnitTest::setupInitialConditions(), FreeFall::setupInitialConditions(), FullRestartTest::setupInitialConditions(), my_problem::setupInitialConditions(), InclinedPlane::setupInitialConditions(), MpiMaserChuteTest::setupInitialConditions(), MovingWalls::setupInitialConditions(), MultiParticlesInsertion::setupInitialConditions(), MpiPeriodicBoundaryUnitTest::setupInitialConditions(), WallSpecies::setupInitialConditions(), AreaVTK::setupInitialConditions(), ChuteBottom::setupInitialConditions(), ContactDetectionWithWallTester::setupParticleAndWall(), Chute::setupSideWalls(), and TriangulatedWall::TriangulatedWall().
void BaseWall::setVTKVisibility | ( | bool | vtkVisibility | ) |
|
overridevirtual |
Function that writes a BaseWall to an output stream, usually a restart file.
Reimplemented from BaseInteractable.
Reimplemented in WearableTriangulatedWall, WearableTriangleMeshWall, WearableNurbsWall, VChute, TriangulatedWall, TriangleWall, TriangleMeshWall, SphericalWall, SineWall, Screw, RestrictedWall, ParabolaChute, NurbsWall, MeshTriangle, IntersectionOfWalls, InfiniteWallWithHole, HorizontalScrew, CylindricalWall, Combtooth, Coil, BasicUnionOfWalls, BasicIntersectionOfWalls, SimpleDrumSuperquadrics, ScrewsymmetricIntersectionOfWalls, and HorizontalBaseScrew.
References renderedWalls_, vtkVisibility_, and BaseInteractable::write().
Referenced by SimpleDrumSuperquadrics::write(), ArcWall::write(), BasicIntersectionOfWalls::write(), BasicUnionOfWalls::write(), Coil::write(), Combtooth::write(), CylindricalWall::write(), HorizontalScrew::write(), InfiniteWallWithHole::write(), IntersectionOfWalls::write(), MeshTriangle::write(), NurbsWall::write(), RestrictedWall::write(), Screw::write(), SineWall::write(), SphericalWall::write(), TriangleMeshWall::write(), TriangleWall::write(), and VChute::write().
|
virtual |
adds extra information to the points and triangleStrips vectors needed to plot the wall in vtk format
points | Coordinates of the vertices of the triangulated surfaces (in the VTK file this is called POINTS) |
triangleStrips | Indices of three vertices forming one triangulated surface (in the VTK file this is called CELL) |
Reimplemented in TriangulatedWall, TriangleWall, TriangleMeshWall, ScrewsymmetricIntersectionOfWalls, Screw, RestrictedWall, NurbsWall, MeshTriangle, LevelSetWall, IntersectionOfWalls, InfiniteWall, HorizontalScrew, HorizontalBaseScrew, BasicUnionOfWalls, and AxisymmetricIntersectionOfWalls.
References BaseObject::getIndex(), BaseObject::getName(), logger, and WARN.
Referenced by renderWall(), and RestrictedWall::writeVTK().
|
inlinevirtual |
Reimplemented in WearableNurbsWall, and NurbsWall.
|
private |
A pointer to the WallHandler that handles this BaseWall.
Referenced by BaseWall(), getHandler(), setHandler(), and setIndSpecies().
|
private |
A vector of walls that gets rendered instead of the actual wall
Referenced by addRenderedWall(), BaseWall(), getRenderedWall(), getRenderedWalls(), read(), removeRenderedWalls(), renderWall(), and write().
|
private |
Referenced by BaseWall(), getVTKVisibility(), read(), setVTKVisibility(), and write().