DUNE PDELab (git)

Dune::PDELab::ConstGridFunction< GV, RF, dimR > Class Template Reference

GridFunction returning a constant value everywhere. More...

#include <dune/pdelab/function/const.hh>

Public Types

typedef T::GridViewType GridViewType
 Type of the GridView.
 
typedef LeafNodeTag NodeTag
 The type tag that describes a LeafNode.
 

Public Member Functions

 ConstGridFunction (const GV &gv, const typename Traits::RangeType &val_=1)
 Contruct a Const GridFunction. More...
 
void evaluateGlobal (const typename Traits::DomainType &x, typename Traits::RangeType &y) const
 evaluate the function globally More...
 
void evaluate (const typename Traits::ElementType &e, const typename Traits::DomainType &x, typename Traits::RangeType &y) const
 
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.
 
template<typename Time >
void setTime (Time t)
 set time for subsequent evaluation More...
 

Static Public Attributes

static const bool isLeaf = true
 Mark this class as a leaf in a dune-typetree.
 
static const bool isPower = false
 Mark this class as a non power in the dune-typetree.
 
static const bool isComposite = false
 Mark this class as a non composite in the dune-typetree.
 

Detailed Description

template<typename GV, typename RF, unsigned dimR = 1>
class Dune::PDELab::ConstGridFunction< GV, RF, dimR >

GridFunction returning a constant value everywhere.

Template Parameters
GVThe type of the GridView
RFThe type of the range field
dimRangeThe dimension of the Range

Constructor & Destructor Documentation

◆ ConstGridFunction()

template<typename GV , typename RF , unsigned dimR = 1>
Dune::PDELab::ConstGridFunction< GV, RF, dimR >::ConstGridFunction ( const GV &  gv,
const typename Traits::RangeType val_ = 1 
)
inline

Contruct a Const GridFunction.

Parameters
gvThe GridView to use. It is passed as a reference to AnalyticGridFunctionBase (look there for the requirements of this argument).
val_The value tu return on evaluation. This class stores a copy of that value.

Member Function Documentation

◆ evaluate()

void Dune::PDELab::AnalyticGridFunctionBase< AnalyticGridFunctionTraits< GV, RF, 1 > , ConstGridFunction< GV, RF, 1 > >::evaluate ( const typename Traits::ElementType e,
const typename Traits::DomainType x,
typename Traits::RangeType y 
) const
inlineinherited

Evaluate the GridFunction at given position.

Evaluates components of the grid function at the given position and returns these values in a vector.

Parameters
[in]eThe entity to evaluate on
[in]xThe position in entity-local coordinates
[out]yThe result of the evaluation

◆ evaluateGlobal()

template<typename GV , typename RF , unsigned dimR = 1>
void Dune::PDELab::ConstGridFunction< GV, RF, dimR >::evaluateGlobal ( const typename Traits::DomainType x,
typename Traits::RangeType y 
) const
inline

evaluate the function globally

Parameters
xPosition in global coordinates where to evaluate.
yThe resulting value.

◆ setTime()

template<typename Time >
void Dune::PDELab::InstationaryFunctionDefaults::setTime ( Time  t)
inlineinherited

set time for subsequent evaluation

This method sets the time for subsequent calls to any of the evaluation methods.

Note
This default method does nothing, it just ensures setTime() can be called without ill effects.
Function implementation are free to restrict the types of acceptable parameters. This should be noted in the function classes documentation.

The documentation for this class was generated from the following file:
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Nov 24, 23:30, 2024)