element1D.hh

Go to the documentation of this file.
1 
6 #ifndef element1DLin_hh
7 #define element1DLin_hh
8 
9 #include "element.hh"
10 #include "geometry/cell1D.hh"
11 
12 namespace concepts {
13  // forward declaration
14  template<typename F>
15  class ElementGraphics;
16 }
17 
18 namespace linearFEM {
19  // forward declaration
20  class LineGraphics;
21 
22  // ****************************************************************** Line **
23 
34  class Line : public Element {
35  public:
41  Line(const concepts::Edge1d& cell, uint idx[]) :
42  Element(2, idx), cell_(cell) {}
50  concepts::TColumn<Real>* T1 = 0) :
51  Element(T0, T1), cell_(cell) {}
52  virtual const concepts::Edge& support() const { return cell_.connector(); }
53  virtual const concepts::Edge1d& cell() const { return cell_; }
59  Real shapefct(const uint i, const Real xi) const;
65  Real shapefctD(const uint i) const;
66  virtual const concepts::ElementGraphics<Real>* graphics() const;
67  protected:
68  virtual std::ostream& info(std::ostream& os) const;
69  private:
72  static std::unique_ptr<LineGraphics> graphics_;
73  };
74 
75 } // namespace linearFEM
76 
77 #endif // element1DLin_hh
A column of a T matrix.
Definition: analytical.hh:18
Real shapefctD(const uint i) const
Returns the derivative of the ith shape function.
static std::unique_ptr< LineGraphics > graphics_
Definition: element1D.hh:72
Edge & connector() const
Returns the connector (topology)
Definition: cell1D.hh:59
A 1D cell: edge.
Definition: cell1D.hh:83
virtual const concepts::Edge1d & cell() const
Returns the cell of this element.
Definition: element1D.hh:53
const concepts::Edge1d & cell_
Cell of the element.
Definition: element1D.hh:71
Line(const concepts::Edge1d &cell, concepts::TColumn< Real > *T0, concepts::TColumn< Real > *T1=0)
Constructor.
Definition: element1D.hh:49
virtual const concepts::ElementGraphics< Real > * graphics() const
Linear FEM in 1D, 2D and 3D.
Definition: spaceTraits.hh:19
virtual std::ostream & info(std::ostream &os) const
Real shapefct(const uint i, const Real xi) const
Computes the value of the ith shape function in the point xi.
Line(const concepts::Edge1d &cell, uint idx[])
Constructor.
Definition: element1D.hh:41
virtual const concepts::Edge & support() const
Returns the support of this element.
Definition: element1D.hh:52
Line element with linear shape function in 1D.
Definition: element1D.hh:34
Base class for the element for linear FEM.
Definition: element.hh:30
An edge in the topology.
Definition: topology.hh:73
double Real
Type normally used for a floating point number.
Definition: typedefs.hh:36
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