![]() |
KASKADE 7 development version
|
A class that stores information about a set of variables. More...
#include <variables.hh>
Classes | |
| struct | Components |
| DEPRECATED, use components instead. More... | |
| struct | SpaceIndex |
| DEPRECATED, use spaceIndex instead. More... | |
Public Types | |
| typedef SpaceList | Spaces |
| type of boost::fusion::vector of FEFunctionSpace s needed | |
| using | Variables = typename Variables_Detail::ImplicitIdVariableDescriptions<VariableList>::type |
| type of boost::fusion vector of VariableDescription s | |
| typedef Variables_Detail::VariableRangeCreator< Variables, ConstructElement< Spaces > >::type | RepresentationData |
| Type that contains a set of variables inside a boost vector, together with all the data. | |
| typedef Kaskade::VariableSet< VariableSetDescription< Spaces, VariableList > > | VariableSet |
| Type that contains a set of variable values with some functionality, such as simple vector arithmetic and so on (cf. class VariableSet) | |
| typedef SpaceType< Spaces, 0 >::type::Scalar | Scalar |
| scalar field type | |
| typedef SpaceType< Spaces, 0 >::type::Grid | Grid |
| Grid type. | |
| typedef SpaceType< Spaces, 0 >::type::GridView | GridView |
| Grid view type. | |
| typedef SpaceType< Spaces, 0 >::type::IndexSet | IndexSet |
| IndexSet type. | |
| typedef boost::fusion::result_of::as_vector< typenameboost::fusion::result_of::transform< Spaces, GetEvaluators< ShapeFunctionCache< Grid, Scalar > > >::type >::type | Evaluators |
| The boost::fusion sequence of evaluators belonging to this variable set. | |
| template<int idx> | |
| using | Space = std::remove_pointer_t<typename boost::fusion::result_of::value_at_c<Spaces,spaceIndex<idx>>::type> |
| The type of finite element space of the i-th variable. | |
Public Member Functions | |
| GridManagerBase< Grid > const & | gridManager () const |
| The gridManager keeping the grid on which we operate. | |
Constructors | |
| template<class RAIter> | |
| VariableSetDescription (Spaces const &spaces_, RAIter nameIt) | |
| Constructor, giving each variable a name (e.g. for output purposes) | |
| VariableSetDescription (Spaces const &spaces_, std::vector< std::string > names_) | |
| Constructor. | |
| template<class RAIter> | |
| VariableSetDescription (Spaces const &spaces_, RAIter nameIt, RAIter roleIt) | |
| Constructor specifying for each variable both a name and a role. | |
| VariableSetDescription (Spaces const &spaces_, std::vector< std::string > names_, std::vector< std::string > roles_) | |
| Constructor specifying for each variable both a name and a role. | |
| VariableSetDescription (Spaces const &spaces_) | |
| Constructor without naming the variables. | |
Public Attributes | |
| Spaces | spaces |
| A heterogeneous sequence of pointers to (const) spaces involved. | |
| GridView const & | gridView |
| The grid view on which the variables live. | |
| IndexSet const & | indexSet |
| index set | |
| std::array< std::string, noOfVariables > | names |
| A sequence of variable names. | |
| std::array< std::string, noOfVariables > | roles |
Static Public Attributes | |
| static int const | noOfVariables = boost::fusion::result_of::size<Variables>::type::value |
| Number of variables in this set. | |
| static int const | continuity = Variables_Detail::Continuity<Variables,Spaces>::value |
| minimal continuity of any variable in the set | |
| template<int idx> | |
| static constexpr int | spaceIndex = boost::fusion::result_of::value_at_c<Variables,idx>::type::spaceIndex |
| space index of the i'th variable | |
Related Symbols | |
(Note that these are not member symbols.) | |
| template<class ... Spaces> | |
| auto | makeSpaceList (Spaces *... spaces) |
| Creates a list of finite element spaces in the required format. Usage example (for Stokes flow): | |
| template<class SpaceList, class VariableList> | |
| VariableSetDescription< SpaceList, VariableList > | makeVariableSetDescription (SpaceList const &spaces, VariableList const &vars) |
| Creates a variable set description from given spaces and variables. | |
Creation of variable sets and coefficient vectors | |
| template<int first = 0, int last = noOfVariables> | |
| using | CoefficientVector = typename CoefficientVectorRepresentation<first,last>::type |
| The type of coefficient vectors of variable sets (and subsets). | |
| template<int first = 0, int last = noOfVariables> | |
| auto | zeroCoefficientVector () const |
| Returns a zero initialized coefficient vector for variables [first,last[. | |
| VariableSet | variableSet () const |
| Returns a zero-initialized variable set. | |
| template<int first = 0, int last = noOfVariables> | |
| static auto | zeroCoefficientVector (Spaces const &spaces) |
| Returns a zero initialized coefficient vector for variables [first,last[. | |
Size and Dimension queries | |
| template<int i> | |
| static constexpr int | components = boost::fusion::result_of::value_at_c<Variables,i>::type::m |
| number of components of i'th variable | |
| size_t | degreesOfFreedom (int first=0, int last=noOfVariables) const |
| Computes the total number of scalar degrees of freedom collected in the variables [first,last). | |
| static size_t | degreesOfFreedom (Spaces const &spaces, int first, int last) |
| Computes the total number of scalar degrees of freedom collected in the variables [first,last). | |
| static std::array< size_t, noOfVariables > | variableDimensions (Spaces const &spaces, int first=0, int last=noOfVariables) |
| Computes for each variable the number of scalar degrees of freedom. | |
A class that stores information about a set of variables.
PDE systems usually involve a set of variables \( u_1, \dots, u_n \), e.g., velocity and pressure in the Stokes equation. This class describes the properties of such variable sets and provides meta information such as types of variable sets, their function spaces, or their dimension, as well as convenience methods for constructing variable sets or coefficient vector sets.
| SpaceList | a boost::fusion container of FEFunctionSpace s |
| VariableList | a boost::fusion container of VariableDescription s. Note that the variable ids will be ignored and ids according to the position of the variable in the vector will be used instead. |
Definition at line 553 of file variables.hh.
| using Kaskade::VariableSetDescription< SpaceList, VariableList >::CoefficientVector = typename CoefficientVectorRepresentation<first,last>::type |
The type of coefficient vectors of variable sets (and subsets).
This is a LinearProductSpace of Dune::BlockVector, with appropriate entry dimension.
| first | index of first variable in the set (default: 0) |
| last | one behind index of last variable in the set (default: number of variables) |
Definition at line 800 of file variables.hh.
| typedef boost::fusion::result_of::as_vector<typenameboost::fusion::result_of::transform<Spaces,GetEvaluators<ShapeFunctionCache<Grid,Scalar>>>::type>::type Kaskade::VariableSetDescription< SpaceList, VariableList >::Evaluators |
The boost::fusion sequence of evaluators belonging to this variable set.
Definition at line 611 of file variables.hh.
| typedef SpaceType<Spaces,0>::type::Grid Kaskade::VariableSetDescription< SpaceList, VariableList >::Grid |
Grid type.
Definition at line 588 of file variables.hh.
| typedef SpaceType<Spaces,0>::type::GridView Kaskade::VariableSetDescription< SpaceList, VariableList >::GridView |
Grid view type.
Definition at line 590 of file variables.hh.
| typedef SpaceType<Spaces,0>::type::IndexSet Kaskade::VariableSetDescription< SpaceList, VariableList >::IndexSet |
IndexSet type.
Definition at line 592 of file variables.hh.
| typedef Variables_Detail::VariableRangeCreator<Variables,ConstructElement<Spaces>>::type Kaskade::VariableSetDescription< SpaceList, VariableList >::RepresentationData |
Type that contains a set of variables inside a boost vector, together with all the data.
This is a boost::fusion::vector with Dune::BlockVector entries.
Definition at line 567 of file variables.hh.
| typedef SpaceType<Spaces,0>::type::Scalar Kaskade::VariableSetDescription< SpaceList, VariableList >::Scalar |
scalar field type
Definition at line 586 of file variables.hh.
| using Kaskade::VariableSetDescription< SpaceList, VariableList >::Space = std::remove_pointer_t<typename boost::fusion::result_of::value_at_c<Spaces,spaceIndex<idx>>::type> |
The type of finite element space of the i-th variable.
Definition at line 745 of file variables.hh.
| typedef SpaceList Kaskade::VariableSetDescription< SpaceList, VariableList >::Spaces |
type of boost::fusion::vector of FEFunctionSpace s needed
Definition at line 557 of file variables.hh.
| using Kaskade::VariableSetDescription< SpaceList, VariableList >::Variables = typename Variables_Detail::ImplicitIdVariableDescriptions<VariableList>::type |
type of boost::fusion vector of VariableDescription s
Definition at line 560 of file variables.hh.
| typedef Kaskade::VariableSet<VariableSetDescription<Spaces,VariableList> > Kaskade::VariableSetDescription< SpaceList, VariableList >::VariableSet |
Type that contains a set of variable values with some functionality, such as simple vector arithmetic and so on (cf. class VariableSet)
Construct an object r of this type from a given VariableSetDescription vsd by:
or by
Definition at line 583 of file variables.hh.
|
inline |
Constructor, giving each variable a name (e.g. for output purposes)
Definition at line 620 of file variables.hh.
|
inline |
Constructor.
| spaces | a heterogeneous sequence of pointers to the (const) involved spaces. This is copied internally and need not persist. |
| names | contains a name for each variable. |
Definition at line 632 of file variables.hh.
|
inline |
Constructor specifying for each variable both a name and a role.
Definition at line 643 of file variables.hh.
|
inline |
Constructor specifying for each variable both a name and a role.
Definition at line 652 of file variables.hh.
|
inline |
Constructor without naming the variables.
Definition at line 659 of file variables.hh.
|
inline |
Computes the total number of scalar degrees of freedom collected in the variables [first,last).
For each affected variable, the number of components is multiplied with the degrees of freedom of its FE space.
Definition at line 679 of file variables.hh.
Referenced by Kaskade::VariableSetDescription< SpacesForAssembly, ErrorFunctionVariables >::degreesOfFreedom(), Kaskade::HigherOrderRecovery< Grid, Space >::getErrorFunction(), and Kaskade::Limex< Eq >::step().
|
inlinestatic |
Computes the total number of scalar degrees of freedom collected in the variables [first,last).
For each affected variable, the number of components is multiplied with the degrees of freedom of its FE space.
Definition at line 689 of file variables.hh.
|
inline |
The gridManager keeping the grid on which we operate.
Definition at line 848 of file variables.hh.
|
inlinestatic |
Computes for each variable the number of scalar degrees of freedom.
Definition at line 699 of file variables.hh.
Referenced by Kaskade::VariableSetDescription< SpacesForAssembly, ErrorFunctionVariables >::degreesOfFreedom().
|
inline |
Returns a zero-initialized variable set.
Definition at line 826 of file variables.hh.
|
inline |
Returns a zero initialized coefficient vector for variables [first,last[.
Definition at line 816 of file variables.hh.
Referenced by Kaskade::VariableSetDescription< SpacesForAssembly, ErrorFunctionVariables >::zeroCoefficientVector().
|
inlinestatic |
Returns a zero initialized coefficient vector for variables [first,last[.
Definition at line 806 of file variables.hh.
|
staticconstexpr |
number of components of i'th variable
Definition at line 710 of file variables.hh.
|
static |
minimal continuity of any variable in the set
This is the number of how often all the functions are continuously differentiable. 0 means globally continuous with discontinuous derivatives. -1 denotes bounded but discontinuous functions.
Definition at line 604 of file variables.hh.
| GridView const& Kaskade::VariableSetDescription< SpaceList, VariableList >::gridView |
The grid view on which the variables live.
Definition at line 843 of file variables.hh.
| IndexSet const& Kaskade::VariableSetDescription< SpaceList, VariableList >::indexSet |
| std::array<std::string,noOfVariables> Kaskade::VariableSetDescription< SpaceList, VariableList >::names |
A sequence of variable names.
Definition at line 856 of file variables.hh.
|
static |
Number of variables in this set.
Definition at line 595 of file variables.hh.
Referenced by Kaskade::coarsening().
| std::array<std::string,noOfVariables> Kaskade::VariableSetDescription< SpaceList, VariableList >::roles |
Definition at line 858 of file variables.hh.
|
staticconstexpr |
space index of the i'th variable
For querying the space index of variables, a more convenient method is to use the global spaceIndex templated value:
| idx | the variable index |
Definition at line 732 of file variables.hh.
| Spaces Kaskade::VariableSetDescription< SpaceList, VariableList >::spaces |
A heterogeneous sequence of pointers to (const) spaces involved.
Definition at line 838 of file variables.hh.
Referenced by Kaskade::coarsening(), and Kaskade::Limex< Eq >::step().