18 class BoundaryConditions;
34 typedef std::unordered_map<uint, Triangle*> Map;
35 Space() : dim_(0), nelm_(0) {}
39 virtual uint
dim()
const {
return dim_; }
41 virtual uint
nelm()
const {
return nelm_; }
45 const Map::const_iterator i = elm_.find(cell->
connector().
key());
50 virtual std::ostream&
info(std::ostream& os)
const;
52 uint idx[])
const = 0;
53 virtual uint nDoF_()
const = 0;
59 inline S(
const Map&
elm) : idx_(
elm.begin()), elm_(
elm) {}
60 inline S(
const S&
scan) : idx_(
scan.idx_), elm_(
scan.elm_) {}
61 inline bool eos()
const {
return idx_ == elm_.end(); }
62 inline Triangle& operator++(
int) {
63 return const_cast<Triangle&
>(*((*idx_++).second));
65 inline S* clone()
const {
return new S(*
this); }
67 Map::const_iterator idx_;
91 virtual std::ostream&
info(std::ostream& os)
const;
97 virtual uint
nDoF_()
const {
return 3; }
113 virtual std::ostream&
info(std::ostream& os)
const;
118 virtual uint nDoF_()
const {
return 1; }
128 static inline uint dim() {
return 2; }
129 static inline bool positionConnection() {
return false; }
130 static inline bool boundaryElements() {
return false; }
134 static inline uint dim() {
return 2; }
135 static inline bool positionConnection() {
return false; }
136 static inline bool boundaryElements() {
return false; }
140 static inline uint dim() {
return 2; }
141 static inline bool positionConnection() {
return false; }
142 static inline bool boundaryElements() {
return false; }
const Key & key() const
Returns the key of the connector.
Triangle & connector() const
Returns the triangle connector (topology)
SpaceP0(concepts::Mesh2 &msh)
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
SpaceP1(concepts::Mesh2 &msh)
virtual uint nDoF_() const
Returns number of degrees of freedom per element.
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
virtual const Triangle & elm(const concepts::Triangle2d *cell) const
Returns the element on triangle cell.
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
virtual uint nelm() const
Returns the number of elements in the space.
virtual Scanner * scan() const
Returns a scanner to iterate over the elements of the space.
virtual uint dim() const
Returns the dimension of the space.
#define conceptsAssert(cond, exc)