Class documentation of Concepts

Loading...
Searching...
No Matches
space.hh
Go to the documentation of this file.
1
6#ifndef linDG1Dspace_hh
7#define linDG1Dspace_hh
8
9#include <iostream>
10
11#include "basics/typedefs.hh"
12#include "space/space.hh"
13#include "space/elementPairs.hh"
15#include "linearFEM/space1D.hh"
17
18namespace concepts {
19
20 // forward declarations
21 class Mesh1;
22
23} // namespace concepts
24
25namespace linDG1D {
26
27 using concepts::Real;
28
29 // ************************************************************** Linear1d **
30
34 class Linear1d : public concepts::Space<Real> {
35 public:
37 typedef void (*SMap)(const concepts::TColumn<Real>&,
44 Linear1d(concepts::Mesh1& msh, uint level);
45 virtual ~Linear1d();
46 virtual uint dim() const { return dim_; }
47 virtual uint nelm() const { return nelm_; }
48 virtual Scan* scan() const
49 { return new concepts::PListScan<linearFEM::Line>(*elm_); }
50 const concepts::ElementPairList<Real>& elmPairs() const
51 { return elmPair_; }
52 protected:
53 virtual std::ostream& info(std::ostream& os) const;
54 private:
56 uint dim_;
58 uint nelm_;
60 concepts::Mesh1& msh_;
83 void constructor_(concepts::Cell1& cell, uint level);
84
86 struct TwoElements {
87 TwoElements() { elms[0] = 0; elms[1] = 0; }
88 void addElm(const linearFEM::Line* elm, const uint idx) {
89 conceptsAssert(elms[1] == 0, concepts::Assertion());
90 if (elms[0] == 0) {
91 elms[0] = elm;
92 idxs[0] = idx;
93 }
94 else {
95 elms[1] = elm;
96 idxs[1] = idx;
97 }
98 }
99 const linearFEM::Line* elms[2];
100 uint idxs[2];
101 };
102 };
103
104} // namespace linDG1D
105
106#endif // linDG1Dspace_hh
One dimensional cell.
Definition cell.hh:75
virtual uint nelm() const
Returns the number of elements in the space.
Definition space.hh:47
virtual uint dim() const
Returns the dimension of the space.
Definition space.hh:46
virtual Scan * scan() const
Returns a scanner to iterate over the elements of the space.
Definition space.hh:48
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
Linear1d(concepts::Mesh1 &msh, uint level)
#define conceptsAssert(cond, exc)
double Real
Definition typedefs.hh:39
Set< F > makeSet(uint n, const F &first,...)
Definition set.hh:320