cellConditions.hh

Go to the documentation of this file.
1 
6 #ifndef cellConditions_hh
7 #define cellConditions_hh
8 
9 #include <map>
10 #include "toolbox/set.hh"
11 #include "semantics.hh"
12 #include "connector.hh"
13 #include "continuityData.hh"
14 
15 namespace concepts {
16 
17  // forward declarations
18  //class Attribute;
19 
20  // ********************************************************* CellCondition **
21 
22  class CellCondition : public OutputOperator {
23  public:
85 
88 
89  virtual ~CellCondition();
90 
92  enum inactivTypes type() const { return type_; }
93 
96 
98  std::string typeStr() const;
99 
102 
106  bool active(const Connector2& cell, const Connector0& vertex) const;
107  protected:
108  virtual std::ostream& info(std::ostream& os) const;
109  private:
111  enum inactivTypes type_;
114 
118  const Attribute& getAttr_(const Connector0&, const Connector1&,
119  const Connector1&) const;
120  };
121 
122 
123  // ******************************************************** CellConditions **
124 
125  class CellConditions : public Semantics<CellCondition> {
126  public:
132  CellConditions(const bool emptyElements = true);
133 
137 
140 
146  virtual ~CellConditions();
147 
155  virtual CellCondition operator() (Attribute attrib) const;
156 
166  void add(const Attribute& attrib, const CellCondition& i);
167 
168  inline bool emptyElements() const { return emptyElements_; }
169  protected:
170  virtual std::ostream& info(std::ostream& os) const;
171  private:
175  mutable std::map<uint, CellCondition> inactiveCells_;
178 
180  };
181 
182 } // namespace concepts
183 
184 #endif // cellConditions_hh
CellCondition(const CellCondition &cnd)
Copy constructor.
CellCondition(const enum inactivTypes type, Set< Attribute > attributes=Set< Attribute >())
Constructor.
std::string typeStr() const
Return the type of the cell condition as output string.
bool active(const Connector2 &cell, const Connector0 &vertex) const
Returns true, if the vertex in cell is active with respect to the cell conditions.
enum inactivTypes type() const
Returns the type of the cell condition.
enum CellCondition::inactivTypes type_
CellConditions(const bool emptyElements=true)
Default constructor.
inactivTypes
Different types to handle inactive cells.
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
virtual CellCondition & operator=(const CellCondition &i)
Assignment operator.
virtual CellCondition operator()(Attribute attrib) const
Application operator.
CellConditions(const enum CellCondition::inactivTypes type)
Constructor setting the default activity type.
CellCondition()
Default constructor.
A 2D element of the topology.
Definition: connector.hh:226
void add(const Attribute &attrib, const CellCondition &i)
Adds a boundary condition with this attribute to the list of boundary conditions.
An abstract function class to query attributes.
Definition: semantics.hh:22
concepts::Set< Attribute > attributes() const
Returns the attribute set.
const Attribute & getAttr_(const Connector0 &, const Connector1 &, const Connector1 &) const
Returns the attribute of the vertex if existing.
virtual ~CellConditions()
Destructor.
concepts::Set< Attribute > attributes_
The attributes of vertices / edges for the different types:
A 1D element of the topology.
Definition: connector.hh:182
std::map< uint, CellCondition > inactiveCells_
Dynamic array of inactive regions with type.
Class providing an output operator.
enum inactivTypes type_
Type of the inactive cells.
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
CellConditions(const CellConditions &cnd)
Copy constructor.
Attributes for elements of the topology.
Definition: connector.hh:22
A 0D element of the topology.
Definition: connector.hh:147
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