linearForm.hh

Go to the documentation of this file.
1 
6 #ifndef linearForm_hh
7 #define linearForm_hh
8 
10 #include "basics/typedefs.hh"
11 
12 namespace concepts {
13  // forward declarations
14  template<class F>
15  class Element;
16 
17  template<class F>
19 
20  class BoundaryConditions;
21 
22  // ************************************************************ LinearForm **
23 
28  template<class F, class G = typename Realtype<F>::type>
29  class LinearForm : virtual public OutputOperator {
30  public:
36  virtual void operator() (const Element<G>& elm, ElementMatrix<F>& em) const = 0;
37  protected:
38  virtual std::ostream& info(std::ostream& os) const;
39  };
40 
55  enum Basis {Default = 0, BND};
56 
57  // ****************************************************** LinearFormChoice **
58 
65  public:
66 
67  // set basis evaluation type even for const linearform
68  virtual inline void setBasis(Basis basis) { basis_ = basis;}
69 
70  //protected:
71  mutable Basis basis_;
72  };
73 
74  // *************************************************************** Neumann **
75 
88  template<class F>
89  class Neumann : public concepts::LinearForm<F> {
90  public:
96  virtual ~Neumann();
97  protected:
98  virtual std::ostream& info(std::ostream& os) const;
100  std::unique_ptr<BoundaryConditions> bc_;
101  };
102 
103 } // namespace concepts
104 
105 #endif // linearForm_hh
virtual std::ostream & info(std::ostream &os) const
Interface class for Linearform in that one can choice for the basis evaluation type,...
Definition: linearForm.hh:64
Basis
Enum representing the basis evaluation type of a Linearform ALL - standard linearform evaluation on a...
Definition: linearForm.hh:55
GenericElement< KarniadakisMixin< F > > Element
template aliases for backwards compatibility
Definition: element.hh:270
Abstract class for a linear form.
std::unique_ptr< BoundaryConditions > bc_
Reference to the boundary conditions.
Definition: linearForm.hh:100
virtual void setBasis(Basis basis)
Definition: linearForm.hh:68
virtual ~Neumann()
Abstract class for the Neumann boundary term.
Definition: linearForm.hh:89
virtual std::ostream & info(std::ostream &os) const
virtual void operator()(const Element< G > &elm, ElementMatrix< F > &em) const =0
Computes the element contribution to the function.
Neumann(const BoundaryConditions *bc)
Constructor.
Element matrix.
Definition: linearForm.hh:18
Class providing an output operator.
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