traces.hh

Go to the documentation of this file.
1 
7 #ifndef HP3D_TRACES_HH
8 #define HP3D_TRACES_HH
9 
10 #include "space/space.hh"
11 #include "geometry/normalVector.hh"
12 #include "hp2D/quad.hh"
13 #include "hp3D/element.hh"
14 
15 namespace concepts {
16  // forward declarations
17  template <class F>
18  class Set;
19 }
20 
21 namespace hp3D {
22 
23  // forward declarations
24  class Hexahedron;
25  class HexahedronFaceBase;
26 
27  using concepts::Real;
28 
29  // ******************************************************** hp3D::TraceSpace **
30 
35  class TraceSpace : public concepts::SpaceOnCells<Real> {
36  public:
39 
40  enum traceTypes { FIRST, MEAN, JUMP };
41  // for the moment only FIRST available
42 
50  const concepts::Set<uint> faceAttr,
51  enum traceTypes type = FIRST,
53  normalVectorRule = concepts::FaceNormalVectorRule());
54 
55  virtual ~TraceSpace();
56 
57  virtual uint dim() const { return dim_; }
58 
60  virtual uint nelm() const { return nelm_; }
61 
63  virtual Scan* scan() const
64  {
65  return new concepts::PListScan<hp2D::Element<Real> >(*elm_);
66  }
67 
70  uelm(const concepts::Quad &quad) const
71  {
73  const_iterator i = uelm_.find(quad.key());
74  if( i == uelm_.end() )
76  return i->second;
77  }
78 
81  {
82  return uelm_;
83  }
84 
85  virtual void recomputeShapeFunctions();
86 
89 
90  protected:
91  virtual std::ostream& info(std::ostream& os) const;
92 
93  private:
95  const uint dim_;
96 
98  uint nelm_;
99 
102 
105 
108 
111  std::unique_ptr<HexahedronFaceBase> faceTransfer_;
112 
114  const concepts::FaceNormalVectorRule &normalVectorRule);
115 
116  template<class F>
117  bool build_(const Hexahedron *elm, F condition);
118  };
119 
120 }
121 
122 #endif // HP3D_TRACES_HH
virtual void recomputeShapeFunctions()
concepts::Joiner< hp2D::Element< Real > *, 1 > * elm_
Linked list of the elements.
Definition: traces.hh:101
concepts::ElementAndFacette< hp3D::Element< Real > > UnderlyingElement
Definition: traces.hh:38
A 3D FEM element: a hexahedron.
Definition: hexahedron.hh:37
Builds the trace space of a FE space consisting of hexahedral elements.
Definition: traces.hh:35
A quadrilateral in the topology.
Definition: topology.hh:272
Joiner class with multiple successors, i.e.
Set with operations, output operator, and method of the particular element types.
Definition: traces.hh:18
virtual std::ostream & info(std::ostream &os) const
std::unique_ptr< HexahedronFaceBase > faceTransfer_
Handler for the transfer of dofs of the Hexahedron to the dofs of the face.
Definition: traces.hh:111
virtual uint nelm() const
Returns the number of elements in the space.
Definition: traces.hh:60
const concepts::HashMap< concepts::Sequence< UnderlyingElement > > uelm() const
Returns the mapping to the underlying 3D elements.
Definition: traces.hh:80
const uint dim_
Dimension of the FE space.
Definition: traces.hh:95
virtual Scan * scan() const
Returns a scanner to iterate over the elements.
Definition: traces.hh:63
virtual uint dim() const
Definition: traces.hh:57
A hexahedron in the topology.
Definition: topology3D.hh:134
const Key & key() const
Returns the key of the connector.
Definition: connector.hh:105
An abstract class for scanning a mesh (a set of cells) or a space (a set of elements).
virtual ~TraceSpace()
Sequence with operations, output operator, and method of the particular element types.
Definition: sequence.hh:39
bool build_(const Hexahedron *elm, F condition)
void setType_(enum traceTypes type, const concepts::FaceNormalVectorRule &normalVectorRule)
TraceSpace(const concepts::SpaceOnCells< Real > &spc, const concepts::Set< uint > faceAttr, enum traceTypes type=FIRST, const concepts::FaceNormalVectorRule &normalVectorRule=concepts::FaceNormalVectorRule())
Constructor.
concepts::Scan< hp2D::Element< Real > > Scan
Definition: traces.hh:37
Abstract class for a space.
Definition: space.hh:81
concepts::HashMap< concepts::Sequence< UnderlyingElement > > uelm_
Map from key of (topological) face to the underlying element.
Definition: traces.hh:104
uint nelm_
Number of elements currently active in the space.
Definition: traces.hh:98
concepts::Set< uint > getDofIds() const
Returns the DOF indices belonging to the trace space.
const concepts::Sequence< UnderlyingElement > uelm(const concepts::Quad &quad) const
Returns the underlying 3D elements.
Definition: traces.hh:70
concepts::HashMap< hp2D::Quad< Real > * > faces_
Map from key of (topological) face to the element.
Definition: traces.hh:107
3D hp-FEM for H1-conforming elements.
Definition: meshDX.hh:23
Container for an element and one facette (edge or face).
Definition: element.hh:113
double Real
Type normally used for a floating point number.
Definition: typedefs.hh:36
Basic namespace for Concepts-2.
Definition: pml_formula.h:16
Scanner for a list of pointers.
Class for defining rules in which direction the normal vector should point for created faces from hex...
Page URL: http://wiki.math.ethz.ch/bin/view/Concepts/WebHome
21 August 2020
© 2020 Eidgenössische Technische Hochschule Zürich