Class documentation of Concepts

Loading...
Searching...
No Matches
space.hh
Go to the documentation of this file.
1
6#ifndef Space1D_hh
7#define Space1D_hh
8
10#include "basics/typedefs.hh"
11#include "geometry/mesh.hh"
13#include "space/space.hh"
14#include "space/hpMethod.hh"
16#include "toolbox/dynArray.hh"
17#include "element.hh"
18
19namespace hp1D {
20 using concepts::Real;
21
22 // ***************************************************************** Space **
23
27 class Space :
28 public concepts::SpaceOnCells<Real>,
29 public concepts::AdaptiveSpace<Real, concepts::AdaptiveAdjustP<1> > {
30 public:
32
43 Space(concepts::Mesh1& msh, uint l, uint p,
45 virtual ~Space();
46
47 inline uint dim() const;
48 inline uint nelm() const;
49 inline Scan* scan() const;
50
51 inline uint dim();
52 inline uint nelm();
53 inline Scan* scan();
54
55 virtual void adjust(const concepts::Element<Real>& elm,
57
59 void rebuild();
60
65 protected:
66 virtual std::ostream& info(std::ostream& os) const;
67 private:
69 concepts::Mesh1& msh_;
72
77 bool rebuild_;
78
80 uint dim_;
81
83 uint nelm_;
84
87
92
95
96 void meshAndPoly_(concepts::EdgeNd& cell, int l, int& L, int& P);
97 void buildElements_(concepts::EdgeNd& cell,
99 void enforceBC_(concepts::EdgeNd& cell);
100 };
101
102 uint Space::dim() const {
103 if (rebuild_) throw conceptsException(concepts::SpaceNotBuilt());
104 return dim_;
105 }
106
107 uint Space::nelm() const {
108 if (rebuild_) throw conceptsException(concepts::SpaceNotBuilt());
109 return nelm_;
110 }
111
113 if (rebuild_) throw conceptsException(concepts::SpaceNotBuilt());
114 return new concepts::PListScan<BaseElement<Real> >(*elm_);
115 }
116
117 uint Space::dim() {
118 if (rebuild_) rebuild();
119 return dim_;
120 }
121
122 uint Space::nelm() {
123 if (rebuild_) rebuild();
124 return nelm_;
125 }
126
127 Space::Scan* Space::scan() {
128 if (rebuild_) rebuild();
129 return new concepts::PListScan<BaseElement<Real> >(*elm_);
130 }
131
132} // namespace hp1D
133
134#endif // Space1D_hh
#define conceptsException(exc)
void rebuild()
Rebuilds the space after an adjustment with adjust.
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
uint nelm() const
Returns the number of elements in the space.
Definition space.hh:107
Scan * scan() const
Returns a scanner to iterate over the elements of the space.
Definition space.hh:112
void recomputeShapefunctions()
Space(concepts::Mesh1 &msh, uint l, uint p, concepts::BoundaryConditions *bc=0)
uint dim() const
Returns the dimension of the space.
Definition space.hh:102
double Real
Definition typedefs.hh:39