applier.hpp
Go to the documentation of this file.
1 //==============================================================================
12 //==============================================================================
13 #ifndef APPLIER_H_
14 #define APPLIER_H_
15 
17 
18 namespace Opm {
19  namespace Elasticity {
20 
22  template<class T>
24 {
27  OperatorApplier(T& t) : A(t)
28  {
29  }
30 
34  void apply(Vector& v, Vector& d);
35 
39  void pre(Vector& x, Vector& b);
40 
43  void post(Vector& x);
44 
45  T& A;
46 };
47 
50 
51  template<>
53 {
54  Dune::InverseOperatorResult r;
55  A.apply(v, d, r);
56 }
57 
58  template<>
59 void PreApplier::apply(Vector& v, Vector& d)
60 {
61  A.apply(v, d);
62 }
63 
64  template<>
66 {
67 }
68 
69  template<>
70 void PreApplier::pre(Vector& x, Vector& b)
71 {
72  A.pre(x,b);
73 }
74 
75  template<>
77 {
78 }
79 
80  template<>
81 void PreApplier::post(Vector& x)
82 {
83  A.post(x);
84 }
85 
86 }
87 }
88 
89 #endif
OperatorApplier< Dune::InverseOperator< Vector, Vector > > InverseApplier
Definition: applier.hpp:48
void pre(Vector &x, Vector &b)
Preprocess a preconditioner, noop for an inverse operator.
Definition: applier.hpp:65
Definition: applier.hpp:18
Class abstracting a preconditioner or an inverse operator.
Definition: applier.hpp:23
T & A
Definition: applier.hpp:45
Helper class with some matrix operations.
OperatorApplier(T &t)
Constructor.
Definition: applier.hpp:27
OperatorApplier< Dune::Preconditioner< Vector, Vector > > PreApplier
Definition: applier.hpp:49
Elasticity helper class.
Definition: elasticity.hpp:22
Dune::BlockVector< Dune::FieldVector< double, 1 > > Vector
A vector holding our RHS.
Definition: matrixops.hpp:29
void post(Vector &x)
Postprocess a preconditioner, noop for an inverse operator.
Definition: applier.hpp:76
void apply(Vector &v, Vector &d)
Apply the given operator to a vector.
Definition: applier.hpp:52