KASKADE 7 development version
Loading...
Searching...
No Matches
Kaskade::Variable< A, B > Struct Template Reference

A class defining elementary information about a single variable. More...

#include <variables.hh>

Public Member Functions

 Variable (std::string const &name_)
 Constructor.
 Variable ()=default
 Constructor. This will create a default name based on the variable id.

Public Attributes

std::string name

Static Public Attributes

static int const spaceIndex = A::spaceIndex>=0? A::spaceIndex : B::spaceIndex
static int const m = A::m>=0? A::m : B::m

Detailed Description

template<typename A, typename B>
struct Kaskade::Variable< A, B >

A class defining elementary information about a single variable.

This includes the number of components, the name of the variable, and the index of the associated FEFunctionSpace from which the variable comes.

This class differs from VariableDescription mainly in how it is created. The template parameters should be SpaceIndex and Components, in arbitrary order (but one of each).

Example (e.g. for a Stokes setting):

using VariableDescriptions = boost::fusion::vector<Variable<SpaceIndex<0>,Components<3>>,
Helper class for specifying the number of components of a variable.
Definition variables.hh:100
Helper class for specifying the FE space index of a variable.
Definition variables.hh:92
Variable(std::string const &name_)
Constructor.
Definition variables.hh:132

Definition at line 120 of file variables.hh.

Constructor & Destructor Documentation

◆ Variable() [1/2]

template<typename A, typename B>
Kaskade::Variable< A, B >::Variable ( std::string const & name_)
inline

Constructor.

Parameters
nameThe name of the variable. This is used for output.

Definition at line 132 of file variables.hh.

◆ Variable() [2/2]

template<typename A, typename B>
Kaskade::Variable< A, B >::Variable ( )
default

Constructor. This will create a default name based on the variable id.

Member Data Documentation

◆ m

template<typename A, typename B>
int const Kaskade::Variable< A, B >::m = A::m>=0? A::m : B::m
static

Definition at line 123 of file variables.hh.

◆ name

template<typename A, typename B>
std::string Kaskade::Variable< A, B >::name

Definition at line 141 of file variables.hh.

Referenced by Variable().

◆ spaceIndex

template<typename A, typename B>
int const Kaskade::Variable< A, B >::spaceIndex = A::spaceIndex>=0? A::spaceIndex : B::spaceIndex
static

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