1#ifndef DUNE_FEM_DGL2PROJECTION_HH
2#define DUNE_FEM_DGL2PROJECTION_HH
3#warning "Deprecated header, use #include <dune/fem/space/common/interpolate.hh> instead!"
7#include <dune/fem/quadrature/cachingquadrature.hh>
8#include <dune/fem/operator/common/operator.hh>
9#include <dune/fem/function/common/discretefunction.hh>
10#include <dune/fem/function/common/gridfunctionadapter.hh>
11#include <dune/fem/function/common/localcontribution.hh>
12#include <dune/fem/function/localfunction/const.hh>
13#include <dune/fem/operator/1order/localmassmatrix.hh>
15#include <dune/fem/space/common/interpolate.hh>
27 class DGL2ProjectionImpl
29 template <
int dummy,
bool hasLocalFunction>
32 template <
class FunctionImp,
class FunctionSpace>
35 const FunctionImp& function_;
40 FunctionAdapter(
const FunctionImp& f) : function_(f) {}
42 void evaluate(
const DomainType& local,
45 function_.evaluate( local , ret );
49 template <
class FunctionImp,
class DiscreteFunctionImp>
50 static void project(
const FunctionImp& f,
51 DiscreteFunctionImp& discFunc,
55 typedef typename DiscreteFunctionImp :: DiscreteFunctionSpaceType DiscreteFunctionSpaceType;
56 typedef typename DiscreteFunctionSpaceType :: GridPartType GridPartType;
57 typedef FunctionAdapter<FunctionImp, typename DiscreteFunctionSpaceType :: FunctionSpaceType> FunctionAdapterType;
59 FunctionAdapterType af( f );
61 GridFunctionAdapter< FunctionAdapterType, GridPartType> adapter(
62 "DGL2projection::adapter" , f , discFunc.space().gridPart(), discFunc.space().order() );
63 DGL2ProjectionImpl::projectFunction(adapter, discFunc, polOrd);
68 struct ProjectChooser<dummy,true>
70 template <
class FunctionImp,
class DiscreteFunctionImp>
71 static void project(
const FunctionImp& f,
72 DiscreteFunctionImp& discFunc,
75 DGL2ProjectionImpl::projectFunction(f, discFunc, polOrd);
81 template <
class FunctionImp,
class DiscreteFunctionImp>
82 static void apply(
const FunctionImp& f, DiscreteFunctionImp& discFunc )
84 project( f, discFunc );
88 template <
class FunctionImp,
class DiscreteFunctionImp>
89 static void projectFunction(
const FunctionImp& func,
90 DiscreteFunctionImp& discFunc,
FunctionSpaceTraits::RangeType RangeType
Type of range vector (using type of range field) has a Dune::FieldVector type interface.
Definition: functionspaceinterface.hh:71
FunctionSpaceTraits::DomainType DomainType
Type of domain vector (using type of domain field) has a Dune::FieldVector type interface.
Definition: functionspaceinterface.hh:67
A vector valued function space.
Definition: functionspace.hh:60
static void interpolate(const GridFunction &u, DiscreteFunction &v)
perform native interpolation of a discrete function space
Definition: interpolate.hh:54
Dune namespace.
Definition: alignedallocator.hh:13