Class documentation of Concepts

Loading...
Searching...
No Matches
boundary.hh
Go to the documentation of this file.
1
6#ifndef boundary_hh
7#define boundary_hh
8
9#include <memory>
10#include <sstream>
13
14namespace concepts {
15
16 // forward declaration
17 template<class F>
18 class Formula;
19
20 // ************************************************************** Boundary **
21
35 class Boundary : public virtual OutputOperator {
36 public:
38 enum boundaryTypes { FREE = 0, DIRICHLET, NEUMANN, CONNECT, SPHERESURFACEQUAD,MAX_TYPE };
39
44
50
57 Boundary(const enum boundaryTypes type, const Formula<Real>& frm);
58
66 Boundary(const enum boundaryTypes type, const char* frm);
67
70
71 virtual ~Boundary();
72
74 enum boundaryTypes type() const { return type_; }
75
77 std::string typeStr() const;
78
80 virtual Boundary& operator=(const Boundary& bnd);
81
82 bool isNull() { return frm_.get()==0; }
83
84// /// Application operator. Returns the formula.
85// const Formula& operator()() const { return *frm_; }
89 Real operator()(const Real x, const Real t = 0.0) const;
90
94 Real operator()(const Real2d& x, const Real t = 0.0) const;
95
99 Real operator()(const Real3d& x, const Real t = 0.0) const;
100 protected:
101 virtual std::ostream& info(std::ostream& os) const;
102 private:
104 enum boundaryTypes type_;
106 std::unique_ptr<const Formula<Real> > frm_;
107 };
108
109} // namespace concepts
110
111#endif // boundary_hh
Real operator()(const Real2d &x, const Real t=0.0) const
Real operator()(const Real3d &x, const Real t=0.0) const
Boundary(const enum boundaryTypes type)
boundaryTypes
The different boundary condition types.
Definition boundary.hh:38
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
enum boundaryTypes type() const
Returns the type of the boundary condition.
Definition boundary.hh:74
Boundary(const enum boundaryTypes type, const char *frm)
virtual Boundary & operator=(const Boundary &bnd)
Assignment operator.
std::string typeStr() const
Return the type of the boundary condition as output string.
Real operator()(const Real x, const Real t=0.0) const
Boundary(const Boundary &bnd)
Copy constructor.
Boundary(const enum boundaryTypes type, const Formula< Real > &frm)
double Real
Definition typedefs.hh:39
Set< F > makeSet(uint n, const F &first,...)
Definition set.hh:320