SERiF v0.0.1a
Stellar Evolution and Rotation in Four Dimensions
Loading...
Searching...
No Matches
contributions.hpp File Reference

File containing the Contribution struct. This is effectively 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 <tuple>
#include <type_traits>
#include <utility>
#include "serif/discretization/blocks/traits.hpp"
#include "serif/discretization/forms/operands.hpp"
Include dependency graph for contributions.hpp:
This graph shows which files directly or indirectly include this file:

Classes

struct  serif::equations::Contribution< TestOperandT, SupportT >
 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...
 
struct  serif::equations::TestOperandTraits< T, typename >
 A helper struct to extract the test operand type from a contribution or equation. This is used to determine the test type of an equation or contribution. More...
 
struct  serif::equations::TestOperandTraits< T, std::void_t< typename T::TestOperand > >
 Specialization of TestOperandTraits for types that have a TestOperand member type. This allows us to extract the test operand type from contributions or equations that define a TestOperand type. More...
 
struct  serif::equations::ContributionSupport< T, typename >
 Helper alias to extract the support type for a given contribution. More...
 
struct  serif::equations::ContributionSupport< T, std::void_t< typename T::Support > >
 Specialization of ContributionSupport for types that have a Support member type. This allows us to extract the support type from contributions or equations that define a Support type. More...
 
struct  serif::equations::Contributions< T, typename >
 Helper struct to pack a list of contributions into a tuple. This is used to define the set of contributions of an equation. More...
 
struct  serif::equations::ContributionTuple< TupleT, typename >
 Type representing the contributions of an equation. More...
 
struct  serif::equations::ContributionTuple< std::tuple< Ts... >, std::void_t< decltype(std::tuple_cat(std::declval< typename Contributions< std::remove_cvref_t< Ts > >::type >()...))> >
 Specialization of ContributionTuple for tuples of contributions. This allows us to extract the contributions from a tuple of contributions. More...
 
struct  serif::equations::Contributions< T, std::void_t< decltype(std::declval< const T & >().contributions())> >
 Specialization of Contributions for types that have the contributions() method. More...
 

Namespaces

namespace  serif
 
namespace  serif::equations
 

Typedefs

template<typename T>
using serif::equations::TestOperandOf = TestOperandTraits<T>::type
 Helper alias to extract the test operand type from a contribution or equation.
 
template<typename T>
using serif::equations::SupportOf = ContributionSupport<T>::type
 Helper alias to extract the support type for a given contribution.
 
template<typename T>
using serif::equations::ContributionsOf = Contributions<std::remove_cvref_t<T>>::type
 Helper alias to extract the contributions (type) of some type T.
 

Detailed Description

File containing the Contribution struct. This is effectively 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.

Author
Emily M. Boudreaux