AMDiS  0.3
The Adaptive Multi-Dimensional Simulation Toolbox
DiscreteFunction< Coeff, GB, TreePath, R > Class Template Reference

A mutable view on the subspace of a DOFVector,. More...

#include <DiscreteFunction.hpp>

Classes

class  LocalFunction
 

Public Member Functions

template<class... Path>
 DiscreteFunction (Coefficients &coefficients, GlobalBasis const &basis, Path... path)
 Constructor. Stores a pointer to the mutable dofvector.
 
template<class... Path>
 DiscreteFunction (Coefficients &coefficients, std::shared_ptr< GlobalBasis const > const &basis, Path... path)
 
template<class DV , class... Path, Dune::disableCopyMove< DiscreteFunction, DV > = 0, class Coeff_ = TYPEOF(std::declval<DV>().coefficients()), class GB_ = TYPEOF(std::declval<DV>().basis())>
 DiscreteFunction (DV &&dofVector, Path... path)
 Construct a DiscreteFunction directly from a DOFVector.
 
template<class Expr , class Tag = tag::average>
void interpolate_noalias (Expr &&expr, Tag strategy={})
 Interpolation of GridFunction to DOFVector, assuming that there is no reference to this DOFVector in the expression. More...
 
template<class Expr , class Tag = tag::average>
void interpolate (Expr &&expr, Tag strategy={})
 Interpolation of GridFunction to DOFVector. More...
 
template<class Expr >
Selfoperator<< (Expr &&expr)
 Interpolation of GridFunction to DOFVector, alias to interpolate()
 
template<class Expr >
Selfoperator+= (Expr &&expr)
 interpolate (*this) + expr to DOFVector
 
template<class Expr >
Selfoperator-= (Expr &&expr)
 interpolate (*this) - expr to DOFVector
 
Coefficients & coefficients ()
 Return the mutable DOFVector.
 
template<class Range = void, class... Indices>
auto child (Indices... ii)
 

Protected Attributes

Coefficients * mutableCoeff_
 

Detailed Description

template<class Coeff, class GB, class TreePath, class R>
class AMDiS::DiscreteFunction< Coeff, GB, TreePath, R >

A mutable view on the subspace of a DOFVector,.

A view on a subspace of a DOFVector.

Template Parameters
CoeffConst or mutable coefficient vector
GBThe type of the global basis
TreePathA realization of Dune::TypeTree::HybridTreePath
RangeThe range type for th evaluation of the discrete function

Requirements:

  • GB models Concepts::GlobalBasis

Member Function Documentation

◆ interpolate()

void interpolate ( Expr &&  expr,
Tag  strategy = {} 
)

◆ interpolate_noalias()

void interpolate_noalias ( Expr &&  expr,
Tag  strategy = {} 
)

Interpolation of GridFunction to DOFVector, assuming that there is no reference to this DOFVector in the expression.

Example:

auto v = valueOf(prob.solutionVector(),0);
v.interpolate_noalias([](auto const& x) { return x[0]; });

References DiscreteFunction< Coeff, GB, TreePath, R >::interpolate(), AMDiS::interpolate(), and AMDiS::makeGridFunction().

Referenced by DiscreteFunction< Coeff, GB, TreePath, R >::DiscreteFunction(), and DiscreteFunction< Coeff, GB, TreePath, R >::interpolate().


The documentation for this class was generated from the following files: