KASKADE 7 development version
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
Kaskade::Variable< A, B, C > Struct Template Reference

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

#include <variables.hh>

Detailed Description

template<typename A, typename B, typename C = VariableDescription<-1, -1, -1>>
struct Kaskade::Variable< A, B, C >

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
A class defining elementary information about a single variable.
Definition: variables.hh:128

Definition at line 127 of file variables.hh.

Public Member Functions

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

Public Attributes

std::string name
 

Static Public Attributes

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

Constructor & Destructor Documentation

◆ Variable() [1/2]

template<typename A , typename B , typename C = VariableDescription<-1, -1, -1>>
Kaskade::Variable< A, B, C >::Variable ( std::string const &  name_)
inline

Constructor.

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

Definition at line 139 of file variables.hh.

◆ Variable() [2/2]

template<typename A , typename B , typename C = VariableDescription<-1, -1, -1>>
Kaskade::Variable< A, B, C >::Variable ( )
default

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

Member Data Documentation

◆ m

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

Definition at line 130 of file variables.hh.

◆ name

template<typename A , typename B , typename C = VariableDescription<-1, -1, -1>>
std::string Kaskade::Variable< A, B, C >::name

Definition at line 148 of file variables.hh.

◆ spaceIndex

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

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