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

A Const DiscreteFunction. More...

#include <DiscreteFunction.hpp>

Public Types

enum  { hasDerivative = false }
 
using EntitySet = Dune::Functions::GridViewEntitySet< GridView, 0 >
 Set of entities the DiscreteFunction is defined on.
 
using Domain = typename EntitySet::GlobalCoordinate
 Global coordinates of the EntitySet.
 
using Range = std::conditional_t< std::is_same_v< R, void >, RangeType_t< SubTree, Coefficient >, R >
 Range type of this DiscreteFunction. If R=void deduce the Range automatically, using RangeType_t.
 

Public Member Functions

template<class C , class B , class... Path, REQUIRES(Concepts::Similar< Underlying_t< C >, Coefficients >) , REQUIRES(Concepts::Similar< Underlying_t< B >, GlobalBasis >) >
 DiscreteFunction (C &&coefficients, B &&basis, Path... path)
 
Range operator() (Domain const &x) const
 Evaluate DiscreteFunction in global coordinates. NOTE: expensive.
 
EntitySet const & entitySet () const
 Return a Dune::Functions::GridViewEntitySet.
 
GlobalBasis const & basis () const
 Return global basis bound to the DOFVector.
 
TreePath const & treePath () const
 Return treePath associated with this discrete function.
 
Coefficients const & coefficients () const
 Return const coefficient vector.
 
template<class Range = void, class... Indices>
auto child (Indices... ii) const
 

Protected Attributes

std::shared_ptr< Coefficients const > coefficients_
 
std::shared_ptr< GlobalBasis const > basis_
 
TreePath treePath_
 
EntitySet entitySet_
 

Related Functions

(Note that these are not member functions.)

LocalFunction< tag::valuemakeLocalFunction () const
 Create a local function for this view on the DOFVector. More...
 

Detailed Description

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

A Const DiscreteFunction.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum

Mark this class to not directly implement the derivativeOf function so that the DerivativeGridFunction can be used.

Constructor & Destructor Documentation

◆ DiscreteFunction()

DiscreteFunction ( C &&  coefficients,
B &&  basis,
Path...  path 
)
inline

Wrap or move or share the coefficients vector and basis reference or rvalue, respectively, into shared_ptr.

Parameters
coefficientsThe vector can be passed either as const ref or as shared_ptr. If passed as rvalue-ref it is moved into a new shared_ptr.
basisA global basis passed either as const ref or shared_ptr.
path...The indices of a tree-path or the tree-path directly.

References DiscreteFunction< Coeff, GB, TreePath, R >::coefficients().

Friends And Related Function Documentation

◆ makeLocalFunction()

LocalFunction<tag::value> makeLocalFunction ( ) const
related

Create a local function for this view on the DOFVector.


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