47 logger(
DEBUG,
"BoundaryHandler::BoundaryHandler() finished");
59 logger(
DEBUG,
"BoundaryHandler::BoundaryHandler(const BoundaryHandler &BH) finished");
74 logger(
DEBUG,
"BoundaryHandler BoundaryHandler::operator =(const BoundaryHandler& rhs)");
81 logger(
DEBUG,
"BoundaryHandler::~BoundaryHandler() finished");
102 logger.log(
Log::DEBUG,
"BoundaryHandler::readObject(is): restarting a boundary of type %.", type);
103 if (type ==
"AngledPeriodicBoundary")
106 is >> AngledPeriodicBoundary;
109 else if (type ==
"ChuteInsertionBoundary")
112 is >> chuteInsertionBoundary;
115 else if (type ==
"CubeInsertionBoundary")
118 is >> cubeInsertionBoundary;
121 else if (type ==
"CircularPeriodicBoundary")
124 is >> circularPeriodicBoundary;
127 else if (type ==
"DeletionBoundary")
130 is >> deletionBoundary;
133 else if (type ==
"HopperInsertionBoundary")
136 is >> hopperInsertionBoundary;
139 else if (type ==
"PeriodicBoundary")
142 is >> periodicBoundary;
145 else if (type.compare(
"LeesEdwardsBoundary") == 0)
148 is >> leesEdwardsBoundary;
152 else if (type ==
"normal")
158 logger(
ERROR,
"Boundary type: % not understood in restart file.", type);
169 std::stringstream line(std::stringstream::in | std::stringstream::out);
174 Mdouble positionLeft, positionRight;
177 line >> normal >> dummy >> positionLeft >> dummy >> positionRight;
178 periodicBoundary.
set(normal, positionLeft, positionRight);
185 return "BoundaryHandler";
void set(Vec3D normal, Mdouble distanceLeft, Mdouble distanceRight)
Defines a periodic wall.
Container to store pointers to all BaseBoundary objects.
Class which creates a boundary with Lees-Edwards type periodic boundary conditions.
Logger< MERCURY_LOGLEVEL > logger("MercuryKernel")
BoundaryHandler()
Default constructor, it creates an empty BoundaryHandler.
void readOldObject(std::istream &is)
Reads a periodic boundary from old-style restart data.
Used for removing particles from the problem. Inherits from BaseBoundary.
std::string getName() const
Returns the name of the handler, namely the string "BoundaryHandler".
used to create a circular periodic boundary
Defines a pair of periodic walls. Inherits from BaseBoundary.
void readObject(std::istream &is)
Reads BaseBoundary into the BoundaryHandler from restart data.
It's an insertion boundary which has cuboidal shape (yes, 'CuboidalInsertionBoundary' would have been...
void getLineFromStringStream(std::istream &in, std::stringstream &out)
Reads a line from one stringstream into another, and prepares the latter for reading in...
void setHandler(BoundaryHandler *handler)
Sets the boundary's BoundaryHandler.
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.
Container to store the pointers to all objects that one creates in a simulation.
Inherits from InsertionBoundary Some images are useful to better understand the structure of both the...
BoundaryHandler operator=(const BoundaryHandler &rhs)
Assignment operator, copies only the vector of BaseBoundary and sets the other variables to 0/nullptr...
virtual void addObject(T *object)
Adds a new Object to the BaseHandler.
Used for modeling chute inflow. Inherits from InsertionBoundary.
void copyContentsFromOtherHandler(const BaseHandler< BaseBoundary > &BH)
Function that copies the contents (vector of pointers, maxObject_, nextId_, DPMBase_) from one handle...
Implementation of a 3D vector (by Vitaliy).
void addObject(BaseBoundary *P)
Adds a BaseBoundary to the BoundaryHandler.
~BoundaryHandler()
Destructor, it destructs the BoundaryHandler and all BaseBoundary it contains.
void clear()
Empties the whole BaseHandler by removing all Objects and setting all other variables to 0...