DUNE-FEM (unstable)

spoperator.hh
1 #ifndef DUNE_FEM_SPOPERATOR_HH
2 #define DUNE_FEM_SPOPERATOR_HH
3 
4 // system includes
5 #include <string>
6 
7 // local includes
8 #include <dune/fem/solver/parameter.hh>
9 #include <dune/fem/operator/matrix/spmatrix.hh>
10 
11 namespace Dune
12 {
13 
14  namespace Fem
15  {
16 
18  template< class DomainFunction, class RangeFunction,
21  : public SparseRowMatrixObject< typename DomainFunction::DiscreteFunctionSpaceType,
22  typename RangeFunction::DiscreteFunctionSpaceType,
23  Matrix >,
24  public Fem::AssembledOperator< DomainFunction, RangeFunction >
25  {
26  typedef typename DomainFunction::DiscreteFunctionSpaceType DomainSpaceType;
27  typedef typename RangeFunction::DiscreteFunctionSpaceType RangeSpaceType;
30 
31  static constexpr bool assembled = true;
32 
33  using BaseType::apply;
35 
36  SparseRowLinearOperator( const std::string & ,
37  const DomainSpaceType &domainSpace,
38  const RangeSpaceType &rangeSpace,
39  const SolverParameter& param = SolverParameter() ) :
41  {}
42 
43  virtual void clear()
44  {
46  }
47 
48  virtual void operator()( const DomainFunction &arg, RangeFunction &dest ) const
49  {
50  apply( arg, dest );
51  }
52 
53  virtual void finalize () { BaseType::compress(); }
54 
55  };
56 
57  } // namespace Fem
58 
59 } // namespace Dune
60 
61 #endif // #ifndef DUNE_FEM_SPOPERATOR_HH
abstract matrix operator
Definition: operator.hh:124
SparseRowMatrixObject.
Definition: spmatrix.hh:579
MatrixType & exportMatrix() const
get reference to storage object
Definition: spmatrix.hh:655
void apply(const DomainFunction &arg, RangeFunction &dest) const
apply matrix to discrete function
Definition: spmatrix.hh:831
void compress()
compress matrix to a real CRS format
Definition: spmatrix.hh:794
void clear()
clear matrix
Definition: spmatrix.hh:788
Dune namespace.
Definition: alignedallocator.hh:13
SparseRowLinearOperator.
Definition: spoperator.hh:25
virtual void finalize()
finalization of operator
Definition: spoperator.hh:53
void apply(const DomainFunction &arg, RangeFunction &dest) const
apply matrix to discrete function
Definition: spmatrix.hh:831
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.80.0 (May 16, 22:29, 2024)