neumannTraceSpace.hh

Go to the documentation of this file.
1 
7 #ifndef hp2dntracespace_hh
8 #define hp2dntracespace_hh
9 
10 #include "toolbox/sequence.hh"
11 #include "formula/boundary.hh"
12 #include "formula/exceptions.hh"
15 #include "space/space.hh"
16 #include "hp1D/element.hh"
17 #include "hp2D/element.hh"
18 #include "hp2D/edge.hh"
19 #include "hp2D/gridInfo.hh"
20 #include "geometry/normalVector.hh"
22 
23 #include "neumannTraceElement.hh"
24 
25 namespace hp2D {
26 
27  using concepts::Real;
28 
29  // forward declaration
30  template<typename F>
31  class Quad;
32 
33 
34  // ****************************************************** NeumannTraceSpace **
35 
52  public:
56 
80  const concepts::Set<uint> edgeAttr,
82  const concepts::EdgeNormalVectorRule& normalVectorRule =
83  concepts::EdgeNormalVectorRule(), bool emptyElm = true);
84 
85 
93  NeumannTraceSpace(const GridInfo<Real>& gInfo, uint sDim,
95  const concepts::EdgeNormalVectorRule& normalVectorRule =
96  concepts::EdgeNormalVectorRule(), bool emptyElm = true);
97 
119  const concepts::EdgeTraceTypes& ettypes, bool emptyElm = true);
120 
125 
129  inline virtual uint dim() const {
130  return dim_;
131  }
132 
136  inline virtual uint nelm() const {
137  return nelm_;
138  }
139 
143  virtual Scan* scan() const {
145  }
146 
151  const concepts::Edge edge) const {
152  auto i = edges_.find(edge.key());
153  if (i == edges_.end())
155  return i->second->uelm();
156  }
157 
161  virtual void recomputeShapefunctions();
162 
163 
164  protected:
165  virtual std::ostream& info(std::ostream& os) const;
166  private:
168  const uint dim_;
169 
171  uint nelm_;
172 
175 
176  //number of irregular builded elements
177  uint nIrrelm_;
178 
179  //flag controlling elements with no dofs in the space
181 
188 
194 
199 
202 
203  // Builds the NeumanntraceElements with Informations about the Underyling Elements
205 
206  //actually creates the irregular ELements with the help of the mappings
218  Real weight_(bool first, const Z2 dir, const uint nUelm,
219  const concepts::Attribute attrb) const;
220 
221  };
222 
223 } // namespace hp2D
224 
225 #endif // hp2dntracespace_hh
uint nelm_
Number of elements currently active in the mesh.
const concepts::Sequence< UnderlyingElement > uelm(const concepts::Edge edge) const
Returns the underlying 2D elements of the given edge if existing.
const uint dim_
Dimension of the FE space.
NeumannTraceSpace(const GridInfo< Real > &gInfo, uint sDim, enum concepts::EdgeTraceType::traceTypes type=concepts::EdgeTraceType::FIRST, const concepts::EdgeNormalVectorRule &normalVectorRule=concepts::EdgeNormalVectorRule(), bool emptyElm=true)
Constructor.
concepts::Sequence< concepts::Edge2d * > coarseCells_
Collection of coarse edges, i.e.
virtual uint nelm() const
Returns the number of NeumannTraceElements in the Space.
Real weight_(bool first, const Z2 dir, const uint nUelm, const concepts::Attribute attrb) const
Consider the outwards pointing normalvector evaluations of a neumantrace basis function u.
void build_irregular_(const hp2D::GridInfo< Real > &gInfo)
Joiner class with multiple successors, i.e.
concepts::HashMap< hp2D::NeumannTraceElement< Real > * > edges_
Map from key of (topological) edge to the element.
A the NeumannTrace space of a given 2D - Finite Element space.
concepts::ElementAndFacette< hp2D::Element< Real > > UnderlyingElement
2D hp-FEM for H1-conforming elements.
GridInfo< Real >::CoarseToSuccessor mapCtS_
Map from coarse cells by key to its successors that are in space.
const Key & key() const
Returns the key of the connector.
Definition: connector.hh:105
NeumannTraceSpace(concepts::SpaceOnCells< Real > &spc, const concepts::EdgeTraceTypes &ettypes, bool emptyElm=true)
Constructor.
NeumannTraceSpace(const concepts::SpaceOnCells< Real > &spc, const concepts::Set< uint > edgeAttr, enum concepts::EdgeTraceType::traceTypes type=concepts::EdgeTraceType::FIRST, const concepts::EdgeNormalVectorRule &normalVectorRule=concepts::EdgeNormalVectorRule(), bool emptyElm=true)
Constructor.
An abstract class for scanning a mesh (a set of cells) or a space (a set of elements).
concepts::EdgeTraceTypes trTypes_
Mapping from Attributes to a given EdgeTracetype.
Base class for defining rules in which direction the normal vector should point for created edges fro...
Definition: normalVector.hh:31
Sequence with operations, output operator, and method of the particular element types.
Definition: sequence.hh:39
virtual ~NeumannTraceSpace()
Deconstructor.
virtual void recomputeShapefunctions()
Recompute shape functions, e.g.
Abstract class for a space.
Definition: space.hh:81
virtual uint dim() const
Returns the dimension of the underlying Finite Element Space.
concepts::ElementAndFacette< concepts::Edge > UnderlyingEdge
concepts::Joiner< hp1D::BaseElement< Real > *, 1 > * elm_
Linked list of the elements.
void build_regular_(const hp2D::GridInfo< Real > &gInfo)
concepts::Scan< hp1D::BaseElement< Real > > Scan
Binary group (algebraic): only the values 0 and 1 are represented.
Definition: Zm.hh:16
An edge in the topology.
Definition: topology.hh:73
virtual std::ostream & info(std::ostream &os) const
Attributes for elements of the topology.
Definition: connector.hh:22
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
virtual Scan * scan() const
Returns a scanner to iterate over the elements of the space.
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