space1D.hh

Go to the documentation of this file.
1 
6 #ifndef linSpace1D_hh
7 #define linSpace1D_hh
8 
9 #include "element1D.hh"
10 #include "basics/typedefs.hh"
11 #include "space/space.hh"
12 #include "space/element.hh"
14 #include "toolbox/dynArray.hh"
15 
16 namespace concepts {
17 
18  // forward declarations
19  class Mesh1;
20  class BoundaryConditions;
21 
22  // ************************************************************** Scanners **
23 
24  template<>
25  class Scan<linearFEM::Line> : public Scan<linearFEM::Element> {
26  public:
27  virtual linearFEM::Line& operator++(int) = 0;
28  };
29 
30 } // namespace concepts
31 
32 namespace linearFEM {
33 
34  // ************************************************************** Linear1d **
35 
39  class Linear1d : public concepts::Space<Real> {
40  public:
42  typedef void (*SMap)(const concepts::TColumn<Real>&,
49  Linear1d(concepts::Mesh1& msh, uint level,
51  virtual ~Linear1d();
52  virtual uint dim() const { return dim_; }
53  virtual uint nelm() const { return nelm_; }
54  virtual Scan* scan() const { return new concepts::PListScan<Line>(*elm_); }
55  protected:
56  virtual std::ostream& info(std::ostream& os) const;
57  private:
59  uint dim_;
61  uint nelm_;
77  void enforceBC_(concepts::Cell1& cell, uint level,
90  void constructor_(concepts::Cell1& cell, uint level,
92  const concepts::DynArray<uint>& bcMap);
93  };
94 
95 } // namespace linearFEM
96 
97 #endif // linSpace1D_hh
A column of a T matrix.
Definition: analytical.hh:18
concepts::BoundaryConditions * bc_
Boundary conditions.
Definition: space1D.hh:65
concepts::Joiner< Line *, 1 > * elm_
List of elements.
Definition: space1D.hh:67
Space for linear FEM in 1D.
Definition: space1D.hh:39
Abstract class for a space.
Joiner class with multiple successors, i.e.
void constructor_(concepts::Cell1 &cell, uint level, concepts::DynArray< uint > &dofMap, const concepts::DynArray< uint > &bcMap)
Assigns the degrees of freedom and creates elements.
void(* SMap)(const concepts::TColumn< Real > &, concepts::TColumn< Real > &)
Definition: space1D.hh:42
An abstract class for 1D meshes.
Definition: mesh.hh:94
Mesh for the interval of the real axis.
Definition: meshes1D.hh:23
One dimensional cell.
Definition: cell.hh:75
virtual Scan * scan() const
Definition: space1D.hh:54
virtual uint dim() const
Definition: space1D.hh:52
uint nelm_
Number of elements.
Definition: space1D.hh:61
virtual uint nelm() const
Definition: space1D.hh:53
Linear FEM in 1D, 2D and 3D.
Definition: spaceTraits.hh:19
void enforceBC_(concepts::Cell1 &cell, uint level, concepts::DynArray< uint > &bcMap)
Notes where Dirichlet boundary conditions have to be enforced.
Linear1d(concepts::Mesh1 &msh, uint level, concepts::BoundaryConditions *bc=0)
Constructor.
An abstract class for scanning a mesh (a set of cells) or a space (a set of elements).
uint dim_
Number of degrees of freedom.
Definition: space1D.hh:59
virtual linearFEM::Line & operator++(int)=0
Returns the next element in the scanned set.
Line element with linear shape function in 1D.
Definition: element1D.hh:34
virtual std::ostream & info(std::ostream &os) const
concepts::Scan< Line > Scan
Definition: space1D.hh:41
Basic namespace for Concepts-2.
Definition: pml_formula.h:16
Scanner for a list of pointers.
concepts::Mesh1 & msh_
Mesh which this space is based on.
Definition: space1D.hh:63
Page URL: http://wiki.math.ethz.ch/bin/view/Concepts/WebHome
21 August 2020
© 2020 Eidgenössische Technische Hochschule Zürich