Struct TempLat::Number
template <typename T>
A runtime-mutable scalar value that participates in the expression template algebra. More...
#include <number.h>
Public Attributes
| Type | Name |
|---|---|
| T | value |
Public Functions
| Type | Name |
|---|---|
| DEVICE_FORCEINLINE_FUNCTION constexpr auto | eval (const IDX & ...) const |
| Number & | operator+= (Expr && e) |
| Number & | operator+= (Expr && e) |
| Number & | operator+= (T v) |
| Number & | operator+= (ZeroType) |
| Number & | operator= (T v) |
Detailed Description
Number<T> reports GetNDim = 0 (no NDim member, no getNDim()), causing all spatial derivatives to return ZeroType at the free-function level.
It satisfies HasEvalMethod (works in binary expressions) and IsScalarType (no complex/SU2/matrix getters), so Number<T> * Field dispatches correctly.
The 4-way operator+= dispatch handles: * Lattice expressions (NDim > 0): spatially average, then add * 0-dim expressions (another Number, scalar*Number): eval directly * Arithmetic (plain double/float): add directly * ZeroType: no-op
Unit test: ctest -R test-number
@vocab-summary A runtime-mutable scalar that takes part in expressions: change its value and every expression holding it sees the new one, without rebuilding the tree.
Public Attributes Documentation
variable value
Public Functions Documentation
function eval
template<typename... IDX>
inline DEVICE_FORCEINLINE_FUNCTION constexpr auto TempLat::Number::eval (
const IDX & ...
) const
function operator+=
function operator+=
function operator+=
function operator+=
function operator=
The documentation for this class was generated from the following file cosmolatticeweb/tmp/code_source/templat/include/TempLat/lattice/algebra/constants/number.h