|
SERiF v0.0.1a
Stellar Evolution and Rotation in Four Dimensions
|
A helper struct for authoring equations with fewer lines of boiler-plate. The idea here is that every equation must report certain members so that the backend can inspect at compile time. An author could certainly write these members themselves, but the Contribution struct auto generates those members based on its template parameters. Therefore, by inheriting from the Contribution struct an equation author can avoid writing those members themselves. Note that while this is inheritance it is still a compile-time relation. Contribution does not add any runtime overhead to the equation. More...
#include <contributions.hpp>
Public Types | |
| using | Test = TestOperandT::term_type |
| The test type of the contribution. | |
| using | TestOperand = TestOperandT |
| The operand type of the contribution (associating a test function and a term) | |
| using | Support = SupportT |
| The domain support of the contribution (which then boils down to the dofs which are supported by the term on that test function) | |
A helper struct for authoring equations with fewer lines of boiler-plate. The idea here is that every equation must report certain members so that the backend can inspect at compile time. An author could certainly write these members themselves, but the Contribution struct auto generates those members based on its template parameters. Therefore, by inheriting from the Contribution struct an equation author can avoid writing those members themselves. Note that while this is inheritance it is still a compile-time relation. Contribution does not add any runtime overhead to the equation.
| TestOperandT | The test operation type, which must be a valid operand (IsOperand). |
| SupportT | The support type, which must be a valid support (IsSupport). This defaults to the support of the test term. |
| using serif::equations::Contribution< TestOperandT, SupportT >::Support = SupportT |
The domain support of the contribution (which then boils down to the dofs which are supported by the term on that test function)
| using serif::equations::Contribution< TestOperandT, SupportT >::Test = TestOperandT::term_type |
The test type of the contribution.
The terminology Test here comes from finite element analysis. Specifically, the test type is the type of the test function used in the weak formulation of the equation. More concretely, the test type is the type for which the residuals are computed. Therefore think of this as the type of the residual row that this contribution contributes to. There are a lot of repetitions of the word type here, which I can recognize is a bit confusing. Effectively, the way that we have structured much of this code is that we embed particular functions into the type system. Therefore when I say "the type of the test function" what I mean is the c++ type that we have defined to represent the test function.
| using serif::equations::Contribution< TestOperandT, SupportT >::TestOperand = TestOperandT |
The operand type of the contribution (associating a test function and a term)