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

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

#include <DiscreteFunction.hpp>

Classes

class  DerivativeLocalFunctionBase
 
class  DivergenceLocalFunction
 
class  GradientLocalFunction
 
class  LocalFunction
 
class  PartialLocalFunction
 

Public Member Functions

template<class... Path>
 DiscreteFunction (Coefficients &dofVector, GlobalBasis const &basis, Path... path)
 Constructor. Stores a pointer to the mutable dofvector.
 
template<class DV , class... Path, 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... Indices>
auto child (Indices... ii)
 

Protected Attributes

Coefficients * mutableCoeff_
 

Detailed Description

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

A mutable view on the subspace of a DOFVector,.

A view on a subspace of a DOFVector.

Template Parameters
CoeffConst or mutable coefficient type of the DOFVector
GBThy type of the global basis
TreePathA realization of Dune::TypeTree::HybridTreePath

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 >::interpolate(), AMDiS::interpolate(), and AMDiS::makeGridFunction().

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


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