dune-pdelab 2.9
Loading...
Searching...
No Matches
Dune::PDELab::DiscreteGridFunction< T, X > Class Template Reference

convert a grid function space and a coefficient vector into a grid function More...

#include <dune/pdelab/gridfunctionspace/gridfunctionspaceutilities.hh>

Inheritance diagram for Dune::PDELab::DiscreteGridFunction< T, X >:
Inheritance graph

Public Types

typedef BaseT::Traits Traits
 
typedef GridFunctionTag ImplementationTag
 
typedef T::GridViewType GridViewType
 Type of the GridView.
 
using Output = typename Base::Output
 
typedef LeafNodeTag NodeTag
 

Public Member Functions

 DiscreteGridFunction (const GFS &gfs, const X &x_)
 Construct a DiscreteGridFunction.
 
 DiscreteGridFunction (std::shared_ptr< const GFS > gfs, std::shared_ptr< const X > x_)
 Construct a DiscreteGridFunction.
 
void evaluate (const typename Traits::ElementType &e, const typename Traits::DomainType &x, typename Traits::RangeType &y) const
 
const Traits::GridViewType & getGridView () const
 get a reference to the GridView
 
Output::DataSetType dataSetType () const
 Return the data set type of this function.
 
void setDataSetType (Output::DataSetType dataSetType)
 Set the data set type of this function.
 

Static Public Member Functions

static constexpr auto degree ()
 

Static Public Attributes

static const bool isLeaf
 
static const bool isPower
 
static const bool isComposite
 
static const std::size_t CHILDREN
 

Detailed Description

template<typename T, typename X>
class Dune::PDELab::DiscreteGridFunction< T, X >

convert a grid function space and a coefficient vector into a grid function

If a GridFunctionSpace with local-valued finite elements is used, this class can only be used for scalar functions, since for vector-valued local finite elements the values must be transformed, and the transformation depends on the type of element. For H(div) elements (Raviart-Thomas) look at DiscreteGridFunctionPiola.

If a GridFunctionSpace with finite elements using the new global-valued interface is used, this class can be used as-is even for vector-valued functions.

If you have a GridFunctionSpace tree of 1-component grid-function spaces, and want to collectively treat them as a vector-valued grid-function, look at VectorDiscreteGridFunction.

Template Parameters
TType of GridFunctionSpace
XType of coefficients vector
Examples
recipe-communication.cc, and recipe-operator-splitting.cc.

Member Typedef Documentation

◆ GridViewType

typedef T::GridViewType Dune::PDELab::GridFunctionBase< GridFunctionTraits< T::Traits::GridViewType, BasisInterfaceSwitch< FiniteElementInterfaceSwitch< T::Traits::FiniteElementType >::Basis >::RangeField, BasisInterfaceSwitch< FiniteElementInterfaceSwitch< T::Traits::FiniteElementType >::Basis >::dimRange, BasisInterfaceSwitch< FiniteElementInterfaceSwitch< T::Traits::FiniteElementType >::Basis >::Range > , DiscreteGridFunction< T, X > >::GridViewType
inherited

Type of the GridView.

◆ ImplementationTag

typedef GridFunctionTag Dune::PDELab::GridFunctionBase< GridFunctionTraits< T::Traits::GridViewType, BasisInterfaceSwitch< FiniteElementInterfaceSwitch< T::Traits::FiniteElementType >::Basis >::RangeField, BasisInterfaceSwitch< FiniteElementInterfaceSwitch< T::Traits::FiniteElementType >::Basis >::dimRange, BasisInterfaceSwitch< FiniteElementInterfaceSwitch< T::Traits::FiniteElementType >::Basis >::Range > , DiscreteGridFunction< T, X > >::ImplementationTag
inherited

◆ Output

using Dune::PDELab::GridFunctionBase< GridFunctionTraits< T::Traits::GridViewType, BasisInterfaceSwitch< FiniteElementInterfaceSwitch< T::Traits::FiniteElementType >::Basis >::RangeField, BasisInterfaceSwitch< FiniteElementInterfaceSwitch< T::Traits::FiniteElementType >::Basis >::dimRange, BasisInterfaceSwitch< FiniteElementInterfaceSwitch< T::Traits::FiniteElementType >::Basis >::Range > , DiscreteGridFunction< T, X > >::Output = typename Base::Output
inherited

◆ Traits

template<typename T , typename X >
typedef BaseT::Traits Dune::PDELab::DiscreteGridFunction< T, X >::Traits

Constructor & Destructor Documentation

◆ DiscreteGridFunction() [1/2]

template<typename T , typename X >
Dune::PDELab::DiscreteGridFunction< T, X >::DiscreteGridFunction ( const GFS &  gfs,
const X &  x_ 
)
inline

Construct a DiscreteGridFunction.

Parameters
gfsThe GridFunctionsSpace
x_The coefficients vector

◆ DiscreteGridFunction() [2/2]

template<typename T , typename X >
Dune::PDELab::DiscreteGridFunction< T, X >::DiscreteGridFunction ( std::shared_ptr< const GFS >  gfs,
std::shared_ptr< const X >  x_ 
)
inline

Construct a DiscreteGridFunction.

Parameters
gfsshared pointer to the GridFunctionsSpace
x_shared pointer to the coefficients vector

Member Function Documentation

◆ dataSetType()

Output::DataSetType Dune::PDELab::GridFunctionOutputParameters::dataSetType ( ) const
inlineinherited

Return the data set type of this function.

◆ evaluate()

template<typename T , typename X >
void Dune::PDELab::DiscreteGridFunction< T, X >::evaluate ( const typename Traits::ElementType &  e,
const typename Traits::DomainType &  x,
typename Traits::RangeType &  y 
) const
inline

◆ getGridView()

template<typename T , typename X >
const Traits::GridViewType & Dune::PDELab::DiscreteGridFunction< T, X >::getGridView ( ) const
inline

get a reference to the GridView

◆ setDataSetType()

void Dune::PDELab::GridFunctionOutputParameters::setDataSetType ( Output::DataSetType  dataSetType)
inlineinherited

Set the data set type of this function.


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