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

Encode compile time information about the shape (rank) and data type of the result of various Operations. More...

#include <array>
#include <type_traits>
#include "serif/discretization/blocks/traits.hpp"
#include "serif/discretization/forms/operands.hpp"
Include dependency graph for value.hpp:
This graph shows which files directly or indirectly include this file:

Classes

struct  serif::discretization::forms::OperationValue< 0, Operation::Value >
 The value of a rank 0 tensor is a scalar, a double in the case of SERiF where we restrict ourselves to double precision. More...
 
struct  serif::discretization::forms::OperationValue< 1, Operation::Value >
 The value of a rank 1 tensor is a rank 1 tensor (a vector of doubles in SERiF) More...
 
struct  serif::discretization::forms::OperationValue< 1, Operation::Divergence >
 The divergence of a rank one tensor is a scalar (a double) More...
 
struct  serif::discretization::forms::OperationValue< 0, Operation::Gradient >
 The gradient of a rank 0 tensor is a rank 1 tensor (a vector of doubles) More...
 
struct  serif::discretization::forms::OperationValue< 1, Operation::Gradient >
 Vector gradients use G[component][derivative] = partial_derivative(u_component, x_derivative). More...
 
struct  serif::discretization::forms::OperationValue< 1, Operation::Curl >
 The curl of a rank 1 tensor is a rank 1 tensor (a vector of doubles) More...
 
struct  serif::discretization::forms::OperationValue< 1, Operation::NormalTrace >
 
struct  serif::discretization::forms::OperandResult< OperandT >
 Specialization of the OperandResult struct for operands that are valid operands (satisfy the IsOperand concept) and are spatial terms (e.g defined over the domain, think mass density). This specialization uses the OperationValue struct to determine the value type of the result of the operand based on its term type and operation type. More...
 
struct  serif::discretization::forms::ValueComponents< double >
 
struct  serif::discretization::forms::ValueComponents< void >
 
struct  serif::discretization::forms::ValueComponents< std::array< Entry, Size > >
 

Namespaces

namespace  serif
 
namespace  serif::discretization
 
namespace  serif::discretization::forms
 

Typedefs

using serif::discretization::forms::VectorValue = std::array<double, 3>
 Alias for a rank 1 tensor of dimension 3 with elements doubles.
 
using serif::discretization::forms::MatrixValue = std::array<VectorValue, 3>
 Alias for a rank 2 tensor of dimension 3 with cells as doubles.
 
template<IsOperand OperandT>
using serif::discretization::forms::OperandValue = OperandResult<OperandT>::type
 Alias for the value type of an operand. This is a convenience alias that allows you to easily access the value type of an operand without having to explicitly use the OperandResult struct.
 
template<typename OutputT, typename InputT>
using serif::discretization::forms::PartialDerivative
 Alias for the partial derivative of some output type with respect to some input type. This is a convenience alias that allows you to easily access the partial derivative type without having to explicitly use the OperandResult struct.
 

Functions

template<typename ValueT>
decltype(auto) serif::discretization::forms::component (ValueT &value, int index)
 Read one entry of a scalar/vector/matrix value. This is a convenience function that allows you to easily access the components of a value type without having to explicitly use the OperandResult struct.
 
template<typename OutputT, typename InputT>
double serif::discretization::forms::derivative_component (const PartialDerivative< OutputT, InputT > &value, int output, int input)
 Read one entry of a scalar/vector/matrix local derivative.
 

Variables

template<typename ValueT>
constexpr int serif::discretization::forms::component_count = ValueComponents<std::remove_cv_t<ValueT>>::value
 

Detailed Description

Encode compile time information about the shape (rank) and data type of the result of various Operations.

Author
Emily M. Boudreaux
Todo
This should be consolidated and removed. This information could be injected into the Operation itself.