hpAdaptiveSpaceDG.hh

Go to the documentation of this file.
1 
9 #pragma once
10 
11 #include "toolbox/set.hh"
12 #include "hp2D/hpAdaptiveSpace.hh"
13 
14 namespace hp2D {
15 
16  using concepts::Real;
17 
18  // ***************************************************** hpAdaptiveSpaceDG **
19 
26  template<class F>
28  public:
30 
54  hpAdaptiveSpaceDG(concepts::Mesh2& msh, uint l, uint p,
57  bool linearTrunk = false);
58 
80  hpAdaptiveSpaceDG(concepts::Mesh2& msh, uint l, uint p,
81  const char* domains,
83  bool linearTrunk = false);
84 
104  hpAdaptiveSpaceDG(concepts::Mesh2& msh, uint l, uint p,
105  std::string domains,
107  bool linearTrunk = false);
108 
142  hpAdaptiveSpaceDG(hpFull& prebuild, uint spcNo,
145  bool linearTrunk = false);
146 
176  hpAdaptiveSpaceDG(hpFull& prebuild, uint spcNo,
177  std::string domains,
179  bool linearTrunk = false);
180 
210  hpAdaptiveSpaceDG(hpFull& prebuild, uint spcNo,
211  const char* domains,
213  bool linearTrunk = false);
214 
216  inline virtual uint dim() const { return dim_; }
217  inline virtual uint nelm() const { return nelm_; }
218  inline virtual Scan* scan() const {
219  return new concepts::PListScan<Element<Real> >(*elm_);
220  }
221 
223  void rebuild();
224 
229 
230  const concepts::Sequence<F*> spaces() const { return spc_; }
231 
232  virtual const std::set<typename concepts::CellType<2u>::cell * > allCells() const ;
233 
234  protected:
235  virtual std::ostream& info(std::ostream& os) const;
238  private:
239 
241  std::set<uint> activeCells_;
243  uint dim_;
245  uint nelm_;
247  uint build_;
252  };
253 
254  // **************************************************** hpAdaptiveSpaceH1_DG **
255 
257 
258  // ******************************************* hpAdaptiveSpaceH1_DGFromInput **
259 
287  const concepts::InOutParameters input,
288  bool verbose = false);
289 
290 
291 } // namespace hp2D
hpAdaptiveSpaceDG(hpFull &prebuild, uint spcNo, const char *domains, concepts::BoundaryConditions *bc=0, bool linearTrunk=false)
Constructor for using same mesh and distribution of degrees of freedom object as another space.
virtual uint nelm() const
hpAdaptiveSpaceDG(hpFull &prebuild, uint spcNo, std::string domains, concepts::BoundaryConditions *bc=0, bool linearTrunk=false)
Constructor for using same mesh and distribution of degrees of freedom object as another space.
concepts::Scan< hp2D::Element< Real > > Scan
void recomputeShapefunctions()
Recompute shape functions, e.g.
hpAdaptiveSpaceH1_DG * hpAdaptiveSpaceH1_DGFromInput(concepts::Mesh2 &msh, const concepts::InOutParameters input, bool verbose=false)
Builds and refines a piecewise hp-adaptive H^1-conforming space with use of input parameters.
std::set< uint > activeCells_
marker of all active cell specified by /c domains
Joiner class with multiple successors, i.e.
concepts::Sequence< concepts::CellConditions > cc_
Cell conditions for switching on sub-domains (just to hold for rebuilding)
Holds parameters in hashes.
Definition: inputOutput.hh:75
Helper class for building 2D hp-FEM spaces (space pre builder).
uint build_
Number of the build.
2D hp-FEM for H1-conforming elements.
virtual Scan * scan() const
virtual const std::set< typename concepts::CellType< 2u >::cell * > allCells() const
Interface class for SpacesOnCells that also allow for allCells(), that i.e.
Definition: space.hh:127
An abstract class for scanning a mesh (a set of cells) or a space (a set of elements).
An abstract class for 2D meshes.
Definition: mesh.hh:103
Sequence with operations, output operator, and method of the particular element types.
Definition: sequence.hh:39
hpAdaptiveSpaceDG(concepts::Mesh2 &msh, uint l, uint p, const char *domains, concepts::BoundaryConditions *bc=0, bool linearTrunk=false)
Constructor.
concepts::Joiner< Element< Real > *, 1 > * elm_
Linked list of the elements.
concepts::Sequence< F * > spc_
The separate spaces for each sub-domain.
uint dim_
Dimension of the space.
hp-adaptive FEM space in 2D composed of separate spaces hpAdapativeSpace and may be discontinuous.
uint nelm_
Number of elements currently active in the mesh.
hpAdaptiveSpaceDG< hpAdaptiveSpaceH1 > hpAdaptiveSpaceH1_DG
const concepts::Sequence< F * > spaces() const
virtual uint dim() const
virtual std::ostream & info(std::ostream &os) const
hpAdaptiveSpaceDG(hpFull &prebuild, uint spcNo, concepts::Sequence< concepts::Set< uint > > domains, concepts::BoundaryConditions *bc=0, bool linearTrunk=false)
Constructor for using same mesh and distribution of degrees of freedom object as another space.
void rebuild()
Rebuilds the mesh and the elements due to adjustment orders.
hpAdaptiveSpaceDG(concepts::Mesh2 &msh, uint l, uint p, concepts::Sequence< concepts::Set< uint > > domains, concepts::BoundaryConditions *bc=0, bool linearTrunk=false)
Constructor.
hpAdaptiveSpaceDG(concepts::Mesh2 &msh, uint l, uint p, std::string domains, concepts::BoundaryConditions *bc=0, bool linearTrunk=false)
Constructor.
double Real
Type normally used for a floating point number.
Definition: typedefs.hh:36
Scanner for a list of pointers.
Page URL: http://wiki.math.ethz.ch/bin/view/Concepts/WebHome
21 August 2020
© 2020 Eidgenössische Technische Hochschule Zürich