refinePreBuilder.hh

Go to the documentation of this file.
1 
8 #ifndef hpRefineSpacePreBuilder2D_hh
9 #define hpRefineSpacePreBuilder2D_hh
10 
11 #include <string>
12 #include "spacePreBuilder.hh"
13 #include "toolbox/sequence.hh"
14 
15 namespace hp2D {
16 
17  // ********************************************************** refinehpFull **
18 
69  void refinehpFull(hp2D::hpFull& prebuild, std::string refinement);
70 
71  // ****************************************** APrioriRefinementRuleFactory **
72 
81  public:
82  enum rTypes {None = 0, hRef = 1, pRef = 2, hpRef = 3};
83 
88  APrioriRefinementRuleFactory(const std::string text);
89 
91  void refine(hp2D::hpFull& prebuild) const;
92  protected:
93  virtual std::ostream& info(std::ostream& os) const;
94  private:
96  std::string text_;
100  uint refAttr_;
101 
106 
111 
113  enum rTypes rType_;
114 
116  int pMax_[2];
117 
120 
124  void getRefAttr_(std::string& text);
125 
127  void getToAttr_(std::string& text);
128 
130  void getRType_(std::string& text);
131 
133  void getPoly_(std::string& text);
134 
136  void getHRefLevel_(std::string& text);
137 
139  void getHPRefLevel_(std::string& text);
140 
145  };
146 
147 } // namespace hp2D
148 
149 #endif // hpRefineSpacePreBuilder2D_hh
int pMax_[2]
Polynomial degree enhancement in the local directions of the cell.
void getPoly_(std::string &text)
Determine the polynomial degree(s)
void getRefAttr_(std::string &text)
Determine the attribute of cells in which the refinement rule should be applied.
void getRType_(std::string &text)
Determine the refinement type.
std::string text_
The given string.
Helper class for building 2D hp-FEM spaces (space pre builder).
APrioriRefinementRuleFactory(const std::string text)
Constructor taken a refinement rule inside a string.
concepts::Level< 2 > level_
Level of refinement in the local directions of the cell.
uint refToVtxAttr_
Attribute of corners to which should be refined (for h- and hp-refinement).
2D hp-FEM for H1-conforming elements.
void getHRefLevel_(std::string &text)
Determine the refinement level for h-refinement.
void refinehpFull(hp2D::hpFull &prebuild, std::string refinement)
Refines the space prebuilder prebuild where the refinement rules are given in the string refinement.
void getToAttr_(std::string &text)
Determine the attribute of edges and cells to which should be refined.
uint refToEdgeAttr_
Attribute of edges to which should be refined (for h- and hp-refinement).
Sequence with operations, output operator, and method of the particular element types.
Definition: sequence.hh:39
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
uint refAttr_
Attribute of cells in which the refinement rule should be applied.
void refine(hp2D::hpFull &prebuild) const
Apply the refinement rule to the prebuilder class prebuild.
void getHPRefLevel_(std::string &text)
Determine the refinement level for hp-refinement.
Factory class for a refinement rule.
Class providing an output operator.
enum rTypes rType_
Refinement type.
concepts::Sequence< int > getNumbers_(std::string &text)
Returns a sequence of integer number taking from a string of the form "1|2".
Page URL: http://wiki.math.ethz.ch/bin/view/Concepts/WebHome
21 August 2020
© 2020 Eidgenössische Technische Hochschule Zürich