level.hh

Go to the documentation of this file.
1 
6 #ifndef level_hh
7 #define level_hh
8 
9 #include <iostream>
10 #include "typedefs.hh"
11 
12 namespace concepts {
13 
14  // ***************************************************************** Level **
15 
21  template<uint dim>
22  struct Level {
24  short l_[dim];
25 
27  Level(const Level<dim>& l) {
28  for (uint i = 0; i < dim; ++i) l_[i] = l.l_[i]; }
30  Level(short l) { for (uint i = 0; i < dim; ++i) l_[i] = l; }
32  Level() { for (uint i = 0; i < dim; ++i) l_[i] = 0; }
33 
35  void set(short l, uint i);
38 
42  bool operator<(const Level<dim>& c) const;
46  bool operator>(const Level<dim>& c) const;
50  bool operator==(const Level<dim>& c) const;
51 
53  Level<dim> operator+(const Level<dim>& c) const;
54 
56  Level<dim> operator-(const Level<dim>& c) const;
57 
59  void minimize(const Level<dim>& c);
61  void maximize(const Level<dim>& c);
62  };
63 
64  template<uint dim>
65  std::ostream& operator<<(std::ostream& os, const Level<dim>& c);
66 
67 } // namespace concepts
68 
69 #endif // level_hh
void maximize(const Level< dim > &c)
Componentwise maximazation.
Level< dim > & operator=(const Level< dim > &c)
Assignement operator.
bool operator>(const Level< dim > &c) const
Comparison operator >.
Level< dim > operator+(const Level< dim > &c) const
Addition operator.
bool operator==(const Level< dim > &c) const
Comparison operator ==.
bool operator<(const Level< dim > &c) const
Comparison operator <.
void set(short l, uint i)
set Level
std::ostream & operator<<(std::ostream &os, const Level< dim > &c)
Level(const Level< dim > &l)
Constructor.
Definition: level.hh:27
Level information used for multidimensional hp FEM.
Definition: level.hh:22
short l_[dim]
Level.
Definition: level.hh:24
Level(short l)
Constructor.
Definition: level.hh:30
Level< dim > operator-(const Level< dim > &c) const
Subtraction operator.
Level()
Default constructor.
Definition: level.hh:32
void minimize(const Level< dim > &c)
Componentwise minimization.
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