hpAdaptiveSpaceH1.hh

Go to the documentation of this file.
1 
8 #ifndef hpAdaptSpace2DH1_hh
9 #define hpAdaptSpace2DH1_hh
10 
11 #include "basics/typedefs.hh"
12 #include "toolbox/inputOutput.hh"
13 #include "hp2D/hpAdaptiveSpace.hh"
14 #include "hp2D/buildH1TColumns.hh"
15 
16 namespace concepts {
17 
18  // forward declarations
19  template<class F>
20  class SMatrixBase;
21 
22  class SMatrix1D;
23 }
24 
25 namespace hp2D {
26 
27  using concepts::Real;
28 
29  // forward declarations
30  template<class F>
31  class Quad;
32 
33  class hpAdaptiveSpaceH1;
34 
35  // ******************************************** hpAdaptiveSpaceH1FromInput **
36 
58  const concepts::InOutParameters input,
59  bool verbose = false);
60 
61  // ***************************************************** hpAdaptiveSpaceH1 **
62 
63  class hpAdaptiveSpaceH1 : public hpAdaptiveSpace<Real> {
64  public:
66 
81  hpAdaptiveSpaceH1(concepts::Mesh2& msh, uint l, uint p,
83  concepts::CellConditions* cc = 0);
84 
91  const concepts::InOutParameters input);
92 
115  concepts::CellConditions* cc = 0 , uint spcNo = 0,
116  uint* offset = 0, uint* idx = 0);
117 
123 
137  }
147  }
158  }
160 
164  virtual void recomputeShapefunctions();
165  protected:
166  virtual std::ostream& info(std::ostream& os) const;
167 
172  concepts::TColumn<Real>* T1) const;
173 
178  virtual concepts::TColumn<Real>*
180  const concepts::TColumn<Real>* T0,
181  const concepts::TColumn<Real>* T1);
182  private:
189  void recomputeSmatrices_(const Quad<Real>& elm);
190 
192  std::unique_ptr<concepts::SMatrix1D> S1left_, S1right_;
193 
197  std::unique_ptr<concepts::SMatrixBase<Real> > Smatrices2H_[2];
198 
202  std::unique_ptr<concepts::SMatrixBase<Real> > Smatrices2V_[2];
203 
207  std::unique_ptr<concepts::SMatrixBase<Real> > Smatrices4_[4];
208 
209  };
210 
211 } // namespace hp2D
212 
213 namespace concepts {
214 
215  template<>
217  static inline std::string name() { return "hp2D::hpAdaptiveSpaceH1"; }
218  };
219 
220 } // namespace concepts
221 
222 #endif // hpAdaptSpace2DH1_hh
A column of a T matrix.
Definition: analytical.hh:18
void hpAdaptiveSpaceH1(hp2D::hpAdaptiveSpaceH1 &spc, std::string str)
virtual Element< Real > * newElement_(concepts::Cell2 &cell, ushort *pMax, concepts::TColumn< Real > *T0, concepts::TColumn< Real > *T1) const
Creates and returns an element for cell.
hpAdaptiveSpaceH1 * hpAdaptiveSpaceH1FromInput(concepts::Mesh2 &msh, const concepts::InOutParameters input, bool verbose=false)
Builds and refines a hp-adaptive H^1-conforming space with use of input parameters.
virtual std::ostream & info(std::ostream &os) const
S matrices in 1D.
std::unique_ptr< concepts::SMatrixBase< Real > > Smatrices2V_[2]
S matrices for vertical subdivision.
std::unique_ptr< concepts::SMatrix1D > S1right_
S matrices in 1D.
A quadrilateral in the topology.
Definition: topology.hh:272
Holds parameters in hashes.
Definition: inputOutput.hh:75
Helper class for building 2D hp-FEM spaces (space pre builder).
virtual uint offset() const
void buildVertexDofs(const BuildTColumnsBase< Real > *b)
Change the strategy how the degrees of freedom for the vertices are built.
hp-adaptive space with 2D elements.
2D hp-FEM for H1-conforming elements.
hpAdaptiveSpaceH1(hpFull &prebuild, concepts::BoundaryConditions *bc=0, concepts::CellConditions *cc=0, uint spcNo=0, uint *offset=0, uint *idx=0)
Constructor for using same mesh and distribution of degrees of freedom object as another space.
virtual concepts::TColumn< Real > * applySmatrices_(const concepts::Element< Real > &elm, uint i, const concepts::TColumn< Real > *T0, const concepts::TColumn< Real > *T1)
Apply i -th S matrix to T-Columns T0 and T1 of the element elm, where i is the number of child of elm...
void setBuildEdgeDofs_(const BuildTColumnsBase< Real > *b)
Change the strategy how the degrees of freedom for the edge are built.
Base class for classes for building T columns for elements in a space with help of a 2D space pre bui...
hpAdaptiveSpaceH1(concepts::Mesh2 &msh, const concepts::InOutParameters input)
Constructor with boundary conditions and refinement strategy from input parameters.
concepts::Scan< hp2D::Element< Real > > Scan
hpAdaptiveSpaceH1(const hpAdaptiveSpaceH1 &spc)
Copy constructor.
Name traits for number types.
Definition: typedefs.hh:68
An abstract class for scanning a mesh (a set of cells) or a space (a set of elements).
An abstract class for an S matrix.
std::unique_ptr< concepts::SMatrixBase< Real > > Smatrices2H_[2]
S matrices for horizontal subdivision.
void buildInnerDofs(const BuildTColumnsBase< Real > *b)
Change the strategy how the degrees of freedom for the interior are built.
An abstract class for 2D meshes.
Definition: mesh.hh:103
Two dimensional cell.
Definition: cell.hh:89
void buildEdgeDofs(const BuildTColumnsBase< Real > *b)
Change the strategy how the degrees of freedom for the edge are built.
void setBuildInnerDofs_(const BuildTColumnsBase< Real > *b)
Change the strategy how the degrees of freedom for the interior are built.
void recomputeSmatrices_(const Quad< Real > &elm)
Checks if the S matrices need to be recomputed and does so if necessary.
unsigned short ushort
Abbreviation for unsigned short.
Definition: typedefs.hh:48
std::unique_ptr< concepts::SMatrix1D > S1left_
S matrices in 1D.
std::unique_ptr< concepts::SMatrixBase< Real > > Smatrices4_[4]
S matrices for subdivision into 4 quads.
hpAdaptiveSpaceH1(concepts::Mesh2 &msh, uint l, uint p, concepts::BoundaryConditions *bc=0, concepts::CellConditions *cc=0)
Constructor.
void setBuildVertexDofs_(const BuildTColumnsBase< Real > *b)
Change the strategy how the degrees of freedom for the vertices are built.
One dimensional S matrix.
Definition: smatrix.hh:79
virtual void recomputeShapefunctions()
Recompute shape functions, e.g.
double Real
Type normally used for a floating point number.
Definition: typedefs.hh:36
Basic namespace for Concepts-2.
Definition: pml_formula.h:16
Page URL: http://wiki.math.ethz.ch/bin/view/Concepts/WebHome
21 August 2020
© 2020 Eidgenössische Technische Hochschule Zürich