meshes1D.hh

Go to the documentation of this file.
1 
8 #ifndef meshes1D_hh
9 #define meshes1D_hh
10 
11 #include "mesh.hh"
12 
13 namespace concepts {
14 
15  // ******************************************************************* Line **
16 
23  class Line : public Mesh1 {
24  public:
31  Line(const uint n = 1);
32 
34  Line(Real left, Real right);
36  Line(Real left, Real mid, Real right);
38  Line(Real v0, Real v1, Real v2, Real v3);
39 
40 
41  virtual ~Line();
42  unsigned int ncell() const { return n_; }
43  Scan1* scan() { return new PStlVectorScan<Cell1>(cell_); }
44  virtual std::ostream& info(std::ostream& os) const;
45  private:
46  // Number of cells
47  const uint n_;
48 
52 
53  void construct_(const Array<Real> coord);
54  };
55 
56 } // namespace concepts
57 
58 #endif // meshes1D_hh
Line(Real left, Real right)
Constructor for two vertices.
Sequence< Cell1 * > cell_
Definition: meshes1D.hh:51
const uint n_
Definition: meshes1D.hh:47
unsigned int ncell() const
Returns the number of cells in the mesh.
Definition: meshes1D.hh:42
Sequence< Vertex * > vtx_
Definition: meshes1D.hh:49
Scanner for a STL container std::vector of pointers.
An abstract class for 1D meshes.
Definition: mesh.hh:94
Mesh for the interval of the real axis.
Definition: meshes1D.hh:23
Line(const uint n=1)
Default constructor for interval (0,1).
Scan1 * scan()
Returns a scanner over the cells of the mesh.
Definition: meshes1D.hh:43
void construct_(const Array< Real > coord)
Sequence with operations, output operator, and method of the particular element types.
Definition: sequence.hh:39
virtual ~Line()
Sequence< Edge * > edg_
Definition: meshes1D.hh:50
Line(Real v0, Real v1, Real v2, Real v3)
Constructor for four vertices.
A scanner for a 1D mesh.
Definition: mesh.hh:36
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
double Real
Type normally used for a floating point number.
Definition: typedefs.hh:36
Basic namespace for Concepts-2.
Definition: pml_formula.h:16
Line(Real left, Real mid, Real right)
Constructor for three vertices.
Page URL: http://wiki.math.ethz.ch/bin/view/Concepts/WebHome
21 August 2020
© 2020 Eidgenössische Technische Hochschule Zürich