dune-fem  2.4.1-rc
operator.hh
Go to the documentation of this file.
1 #ifndef DUNE_FEM_OPERATOR_HH
2 #define DUNE_FEM_OPERATOR_HH
3 
5 
6 namespace Dune
7 {
8 
9  namespace Fem
10  {
11 
24  template< class DomainFunction, class RangeFunction = DomainFunction >
25  struct Operator
26  {
28  typedef DomainFunction DomainFunctionType;
30  typedef RangeFunction RangeFunctionType;
31 
33  typedef typename DomainFunction::RangeFieldType DomainFieldType;
35  typedef typename RangeFunction::RangeFieldType RangeFieldType;
36 
37  virtual ~Operator () {}
38 
46  virtual void operator() ( const DomainFunctionType &u, RangeFunctionType &w ) const = 0;
47  };
48 
69  template< class DomainFunction, class RangeFunction = DomainFunction >
71  : public virtual Operator<DomainFunction, RangeFunction>
72  {
73 
75  virtual bool symmetric() const {
76  return false;
77  }
79  virtual bool positiveDefinite() const {
80  return false;
81  }
82  };
83 
105  template< class DomainFunction, class RangeFunction = DomainFunction >
107  : public virtual LinearOperator<DomainFunction, RangeFunction>
108  {
109  };
110 
111  } // namespace Fem
112 
113 
114 
133  template <typename DFieldType, typename RFieldType,
134  typename DType , typename RType>
135  class Operator
136  : public Fem::Mapping < DFieldType, RFieldType, DType, RType >,
137  public virtual Fem::Operator< DType, RType >
138  {
140 
141  protected:
144 
145  public:
146  //- remember template parameters for derived classes
147  typedef DType DomainType;
148  typedef RType RangeType;
149  typedef DFieldType DomainFieldType;
150  typedef RFieldType RangeFieldType;
151 
152  using BaseType::operator();
153 
154 #if 0
155 
160  virtual void operator() (const DomainType& arg, RangeType& dest) const = 0;
161 #endif
162 
163  protected:
170  virtual void apply (const DomainType& arg, RangeType& dest) const
171  {
172  this->operator() (arg, dest);
173  }
174  }; // class Operator
175 
177 
178 } // namespace Dune
179 
180 #endif // #ifndef DUNE_FEM_OPERATOR_HH
RangeFunction RangeFunctionType
type of discrete function in the operator&#39;s range
Definition: operator.hh:30
virtual void operator()(const DomainFunctionType &u, RangeFunctionType &w) const =0
application operator
virtual ~Operator()
Definition: operator.hh:37
A mapping from one vector space into another This class describes a general mapping from the domain v...
Definition: mapping.hh:46
DType DomainType
Definition: operator.hh:147
virtual void apply(const DomainType &arg, RangeType &dest) const
The method apply calls the application operator. The method has to be implemented here...
Definition: operator.hh:170
virtual bool positiveDefinite() const
Definition: operator.hh:79
abstract operator
Definition: operator.hh:25
Definition: coordinate.hh:4
Fem::Mapping< DFieldType, RFieldType, DType, RType > MappingType
type of mapping base class
Definition: operator.hh:143
DFieldType DomainFieldType
Definition: operator.hh:149
virtual bool symmetric() const
Definition: operator.hh:75
An abstract operator Interface class for Operators. Operators are applied to Functions and the result...
Definition: operator.hh:135
DomainFunction::RangeFieldType DomainFieldType
field type of the operator&#39;s domain
Definition: operator.hh:33
RangeFunction::RangeFieldType RangeFieldType
field type of the operator&#39;s range
Definition: operator.hh:35
RFieldType RangeFieldType
Definition: operator.hh:150
abstract affine-linear operator
Definition: operator.hh:70
RType RangeType
Definition: operator.hh:148
abstract matrix operator
Definition: operator.hh:106
DomainFunction DomainFunctionType
type of discrete function in the operator&#39;s domain
Definition: operator.hh:28