DUNE-ACFEM (2.5.1)

nonzerofunctional.hh
1 #ifndef __DUNE_ACFEM_NON_ZERO_FUNCTIONAL_HH__
2 #define __DUNE_ACFEM_NON_ZERO_FUNCTIONAL_HH__
3 
4 #include "linearfunctional.hh"
5 #include "../../expressions/expressionoperations.hh"
6 
7 namespace Dune {
8 
9  namespace ACFem {
10 
11 // #define FUNCTIONAL_TESTING 1
12 
21  template<class DiscreteFunctionSpace>
22  class NonZeroFunctional;
23 
24  template<class DiscreteFunctionSpace>
25  class LocalNonZeroFunctional;
26 
27  template<class DiscreteFunctionSpace>
28  struct NonZeroFunctionalTraits
29  : public LinearFunctionalTraitsDefault<NonZeroFunctional<DiscreteFunctionSpace>, size_t>
30  {};
31 
39  template<class DiscreteFunctionSpace>
41  : public DiscreteLinearFunctional<DiscreteFunctionSpace, NonZeroFunctionalTraits<DiscreteFunctionSpace> >,
42  public ExpressionTemplate<NonZeroFunctional<DiscreteFunctionSpace> >
43  {
44  public:
45  typedef NonZeroFunctionalTraits<DiscreteFunctionSpace> TraitsType;
46  typedef typename TraitsType::LocalFunctionalType LocalFunctionalType;
47  typedef DiscreteFunctionSpace DiscreteFunctionSpaceType;
48  typedef typename DiscreteFunctionSpaceType::EntityType EntityType;
49  typedef typename DiscreteFunctionSpace::FunctionSpaceType FunctionSpaceType;
50  typedef typename FunctionSpaceType::RangeFieldType FieldType;
51  typedef FieldType RangeType;
52 
53  NonZeroFunctional(const DiscreteFunctionSpaceType& space)
54  {}
55 
56  std::string name() const
57  {
58  return "NZ Functional";
59  }
60  };
61 
63 
65 
66  } // namespace ACFem
67 
68 } // namespace Dune
69 
70 #endif // __DUNE_ACFEM_ZERO_FUNCTIONAL_HH__
Interface class for a discrete linear functional.
Definition: linearfunctional.hh:52
Just a place-holder to aid in automatic type-deduction.
Definition: nonzerofunctional.hh:43
Provide up-cast functionality for expression templates.
Definition: expressionoperations.hh:37
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.80.0 (May 16, 22:29, 2024)