restriction.hh

Go to the documentation of this file.
1 
8 #ifndef SPACE_RESTRICTION_HH_
9 #define SPACE_RESTRICTION_HH_
10 
11 #include "space.hh"
12 #include "toolbox/set.hh"
13 #include "geometry/connector.hh"
14 
15 namespace concepts {
16 
17  // ******************************************************* RestrictionSpace **
18 
27  template<class F = Real>
28  class RestrictionSpace : public SpaceOnCells<F> {
29  public:
32 
38  RestrictionSpace(const SpaceOnCells<F>& spc, const Set<Attribute> attrib);
39 
40  virtual ~RestrictionSpace();
41 
43  virtual Scanner* scan() const { return new concepts::PListScan<ElementWithCell<F> >(*elm_); }
44 
46  virtual uint dim() const { return dim_; }
47 
49  virtual uint nelm() const { return nelm_; }
50  protected:
51  virtual std::ostream& info(std::ostream& os) const;
52  private:
54  const uint dim_;
56  uint nelm_;
59  };
60 
61 } // namespace concepts
62 
63 
64 
65 #endif /* SPACE_RESTRICTION_HH_ */
concepts::Joiner< ElementWithCell< F > *, 1 > * elm_
Linked list of the elements.
Definition: restriction.hh:58
virtual std::ostream & info(std::ostream &os) const
RestrictionSpace(const SpaceOnCells< F > &spc, const Set< Attribute > attrib)
Constructor.
Joiner class with multiple successors, i.e.
Element with cell.
Scan< ElementWithCell< F > > Scanner
Definition: restriction.hh:31
const uint dim_
Dimension of the space.
Definition: restriction.hh:54
An abstract class for scanning a mesh (a set of cells) or a space (a set of elements).
ElementWithCell< F > type
Definition: restriction.hh:30
virtual uint nelm() const
Returns the number of elements in the space.
Definition: restriction.hh:49
uint nelm_
Number of elements.
Definition: restriction.hh:56
virtual uint dim() const
Returns the dimension of the space.
Definition: restriction.hh:46
Classes for restriction of spaces to a sub-domain.
Definition: restriction.hh:28
Abstract class for a space.
Definition: space.hh:81
virtual Scanner * scan() const
Returns a scanner to iterate over the elements of the space.
Definition: restriction.hh:43
Basic namespace for Concepts-2.
Definition: pml_formula.h:16
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