gridInfo.hh

Go to the documentation of this file.
1 
9 #ifndef hp2DgridInfo_hh
10 #define hp2DgridInfo_hh
11 
12 #include "toolbox/hashMap.hh"
13 #include "toolbox/sequence.hh"
14 #include "space.hh"
15 #include "geometry/connector.hh"
16 #include "hp2D/element.hh"
17 
18 namespace hp2D {
19 
20  // *************************************************************** GridInfo **
21 
41  template<class F = Real>
43  public:
47 
59  enum Type {
61  };
62 
70  const concepts::Set<uint>& edgeAttr);
71 
77  const EdgeToElms& get(Type type) const;
78 
83  const CoarseToSuccessor& get() const;
84 
87 
88  protected:
90  virtual std::ostream& info(std::ostream& os) const;
91 
92  private:
93 
94  // copy to attribute to identify active edges
96 
102  const concepts::Set<uint> edgeAttr);
103 
114 
120 
126 
137 
138  //test for edge-attribute is in the Set of requested edgeAttributes
139  inline bool activeEdge_(const concepts::Set<uint>& edgeAttr,
140  const concepts::Connector1& edge) const {
141  return edgeAttr.exist(edge.attrib());
142  }
143 
156  void get_sIrr_(const concepts::Connector1* edge, uint cE,
157  const std::set<uint>& edge_1, std::set<uint>& edge_s,
159 
160  };
161 
162 } // namespace hp2D
163 
164 #endif // hp2DgridInfo_hh
EdgeToElms map_reg
Map from regular edges to underlying elements.
Definition: gridInfo.hh:113
const concepts::Set< uint > & attribute() const
Returns the setted attributes.
GridInfo(const concepts::SpaceOnCells< F > &spc, const concepts::Set< uint > &edgeAttr)
Constructor.
concepts::HashMap< concepts::Sequence< UnderlyingElement > > EdgeToElms
Definition: gridInfo.hh:45
const EdgeToElms & get(Type type) const
Returns a map from requested edge keys to underlying elements.
const Attribute & attrib() const
Returns the attribute of the connector.
Definition: connector.hh:108
bool activeEdge_(const concepts::Set< uint > &edgeAttr, const concepts::Connector1 &edge) const
Definition: gridInfo.hh:139
concepts::Set< uint > edgeAttr_
Definition: gridInfo.hh:95
void build_(const concepts::SpaceOnCells< F > &spc, const concepts::Set< uint > edgeAttr)
Builds the maps with respect to input space and requested edges defined by attributes edgeAttr.
concepts::HashMap< concepts::Sequence< uint > > CoarseToSuccessor
Definition: gridInfo.hh:46
const CoarseToSuccessor & get() const
Returns a map from coarse irregular edges to sequence of keys, that represent successor (small irregu...
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
2D hp-FEM for H1-conforming elements.
Type
Enumeration for type of grid edges regular = a regular edge, edge with two neighbouring cells,...
Definition: gridInfo.hh:59
Class that represents grid information of a given 2d Fem space.
Definition: gridInfo.hh:42
concepts::ElementAndFacette< hp2D::Element< F > > UnderlyingElement
Definition: gridInfo.hh:44
EdgeToElms map_cIrr
Map from irregular coarse edge to its underlying (active) space element.
Definition: gridInfo.hh:119
void get_sIrr_(const concepts::Connector1 *edge, uint cE, const std::set< uint > &edge_1, std::set< uint > &edge_s, concepts::HashMap< concepts::Sequence< uint > > &cChld) const
Recursive method that iterates over all successors until either no successor available or successor h...
EdgeToElms map_sIrr
Map from irregular successor edge to its underlying (active) space element.
Definition: gridInfo.hh:125
Abstract class for a space.
Definition: space.hh:81
A 1D element of the topology.
Definition: connector.hh:182
Class providing an output operator.
Container for an element and one facette (edge or face).
Definition: element.hh:113
CoarseToSuccessor map_CtS
Map from coarse irregular edge key to successor edge keys in order.
Definition: gridInfo.hh:136
Page URL: http://wiki.math.ethz.ch/bin/view/Concepts/WebHome
21 August 2020
© 2020 Eidgenössische Technische Hochschule Zürich