dune-fem  2.4.1-rc
istloperator.hh
Go to the documentation of this file.
1 #ifndef DUNE_FEM_ISTLLINEAROPERATOR_HH
2 #define DUNE_FEM_ISTLLINEAROPERATOR_HH
3 
4 #if HAVE_DUNE_ISTL
5 
6 //- Dune fem includes
8 
9 namespace Dune
10 {
11 
12  namespace Fem
13  {
14 
15  // ISTLMatrixOperator
16  // ------------------
17  template< class DomainFunction, class RangeFunction >
18  class ISTLLinearOperator
19  : public ISTLMatrixObject< typename DomainFunction::DiscreteFunctionSpaceType, typename RangeFunction::DiscreteFunctionSpaceType >,
20  public AssembledOperator< DomainFunction, RangeFunction >
21  {
22  typedef ISTLLinearOperator< DomainFunction, RangeFunction > This;
23  typedef ISTLMatrixObject< typename DomainFunction::DiscreteFunctionSpaceType, typename RangeFunction::DiscreteFunctionSpaceType > Base;
24 
25  public:
26  typedef typename Base::DomainSpaceType DomainSpaceType;
27  typedef typename Base::RangeSpaceType RangeSpaceType;
28 
30  static const bool assembled = true ;
31 
32  using Base::apply;
33  using Base::communicate;
34 
35  ISTLLinearOperator( const std::string & ,
36  const DomainSpaceType &domainSpace,
37  const RangeSpaceType &rangeSpace,
38  const MatrixParameter& param = ISTLMatrixParameter() )
39  : Base( domainSpace, rangeSpace, param )
40  {}
41 
42  virtual void operator() ( const DomainFunction &arg, RangeFunction &dest ) const
43  {
44  Base::apply( arg, dest );
45  }
46 
47  const Base &systemMatrix () const
48  {
49  return *this;
50  }
51 
52  Base &systemMatrix ()
53  {
54  return *this;
55  }
56  };
57 
58  } // namespace Fem
59 
60 } // namespace Dune
61 
62 #endif // #if HAVE_DUNE_ISTL
63 
64 #endif // #ifndef DUNE_FEM_ISTLLINEAROPERATOR_HH
Definition: coordinate.hh:4