BoundaryHandler.h
Go to the documentation of this file.
1 // This file is part of the MercuryDPM project (https://www.mercurydpm.org).
2 // Copyright (c), The MercuryDPM Developers Team. All rights reserved.
3 // License: BSD 3-Clause License; see the LICENSE file in the root directory.
4 
5 #ifndef BOUNDARYHANDLER_H
6 #define BOUNDARYHANDLER_H
7 
8 #include "BaseHandler.h"
10 
16 class BoundaryHandler final : public BaseHandler<BaseBoundary>
17 {
18 public:
23 
28 
33 
37  ~BoundaryHandler() final;
38 
42  void addObject(BaseBoundary* P) final;
43 
44  static BaseBoundary* createObject(const std::string& type);
45 
49  void readAndAddObject(std::istream& is) final;
50 
54  void readOldObject(std::istream& is);
55 
59  std::string getName() const final;
60 
62 
63 private:
64  bool writeVTK_;
65 public:
67 
68  bool getWriteVTK() const { return writeVTK_; }
69 };
70 
71 #endif
72 
Definition: BaseBoundary.h:28
Container to store the pointers to all objects that one creates in a simulation.
Definition: BaseHandler.h:30
virtual void writeVTK() const
now empty function for writing VTK files.
Definition: BaseHandler.h:267
Container to store pointers to all BaseBoundary objects.
Definition: BoundaryHandler.h:17
bool writeVTK_
Definition: BoundaryHandler.h:64
void readAndAddObject(std::istream &is) final
Reads BaseBoundary into the BoundaryHandler from restart data.
Definition: BoundaryHandler.cc:188
~BoundaryHandler() final
Destructor, it destructs the BoundaryHandler and all BaseBoundary it contains.
Definition: BoundaryHandler.cc:66
void addObject(BaseBoundary *P) final
Adds a BaseBoundary to the BoundaryHandler.
Definition: BoundaryHandler.cc:73
static BaseBoundary * createObject(const std::string &type)
Definition: BoundaryHandler.cc:91
BoundaryHandler & operator=(const BoundaryHandler &rhs)
Assignment operator, copies only the vector of BaseBoundary and sets the other variables to 0/nullptr...
Definition: BoundaryHandler.cc:53
void setWriteVTK(bool writeVTK)
Definition: BoundaryHandler.h:66
BoundaryHandler()
Default constructor, it creates an empty BoundaryHandler.
Definition: BoundaryHandler.cc:29
std::string getName() const final
Returns the name of the handler, namely the string "BoundaryHandler".
Definition: BoundaryHandler.cc:235
bool getWriteVTK() const
Definition: BoundaryHandler.h:68
void readOldObject(std::istream &is)
Reads a periodic boundary from old-style restart data.
Definition: BoundaryHandler.cc:218
void boundaryActionsBeforeTimeLoop()
Definition: BoundaryHandler.cc:240
double P
Uniform pressure.
Definition: TwenteMeshGluing.cpp:77
type
Definition: compute_granudrum_aor.py:141
std::string string(const unsigned &i)
Definition: oomph_definitions.cc:286