Skip to content

Class TempLat::LatticeForwardGradient

template <typename R>

ClassList > TempLat > LatticeForwardGradient

A class which implements the forward gradient. More...

  • #include <latticeforwardgradient.h>

Inherits the following classes: TempLat::UnaryOperator

Public Types

Type Name
typedef typename GetFloatType< GetReturnType >::type FloatType
typedef typename GetGetReturnType< R >::type GetReturnType

Public Static Attributes

Type Name
constexpr size_t NDim = GetNDim::get&lt;R&gt;()

Public Functions

Type Name
LatticeForwardGradient (const R & pR)
device::Idx confirmGhostsUpToDate (Tag< N > i) const
void confirmSpace (device::Idx i, const LayoutStruct< NDim > & newLayout, const SpaceStateType & spaceType) const
auto d (const S & other)
void doWeNeedGhosts () const
DEVICE_INLINE_FUNCTION auto eval (const IDX &... idx) const
auto getDx () const
auto getKIR () const
device::memory::host_ptr< MemoryToolBox< NDim > > getToolBox () const
auto norm ()
auto norm2 ()
auto operator() (Tag< N > t) const
std::string toString () const
auto vectorGet (Tag< N > t) const

Public Functions inherited from TempLat::UnaryOperator

See TempLat::UnaryOperator

Type Name
UnaryOperator (const R & pR)
device::Idx confirmGhostsUpToDate () const
void confirmSpace (const LayoutStruct< NDim > & newLayout, const SpaceStateType & spaceType) const
void doWeNeedGhosts () const
auto getDx () const
auto getKIR () const
auto getToolBox () const
virtual std::string operatorString () const
Override this method in your derived class, to have an easy implementation of your toString method.
void postGet ()
void preGet ()
std::string toString () const
If your descending class implements operatorString() and your operator is of the type "OP b" (where OP is * or whatever), this toString method does all the work for you, only adding parentheses if b contains spaces.

Public Static Functions

Type Name
constexpr size_t getVectorSize ()

Public Static Functions inherited from TempLat::UnaryOperator

See TempLat::UnaryOperator

Type Name
consteval size_t getNDim ()

Protected Attributes inherited from TempLat::UnaryOperator

See TempLat::UnaryOperator

Type Name
R mR

Detailed Description

Unit test: ctest -R test-forwardgradientlocal

Public Types Documentation

typedef FloatType

using TempLat::LatticeForwardGradient< R >::FloatType =  typename GetFloatType<GetReturnType>::type;

typedef GetReturnType

using TempLat::LatticeForwardGradient< R >::GetReturnType =  typename GetGetReturnType<R>::type;

Public Static Attributes Documentation

variable NDim

constexpr size_t TempLat::LatticeForwardGradient< R >::NDim;

Public Functions Documentation

function LatticeForwardGradient

inline TempLat::LatticeForwardGradient::LatticeForwardGradient (
    const R & pR
) 

function confirmGhostsUpToDate

template<int N>
inline device::Idx TempLat::LatticeForwardGradient::confirmGhostsUpToDate (
    Tag < N > i
) const

function confirmSpace

inline void TempLat::LatticeForwardGradient::confirmSpace (
    device::Idx i,
    const LayoutStruct < NDim > & newLayout,
    const SpaceStateType & spaceType
) const

function d

template<typename S>
inline auto TempLat::LatticeForwardGradient::d (
    const S & other
) 

function doWeNeedGhosts

inline void TempLat::LatticeForwardGradient::doWeNeedGhosts () const

function eval

template<typename... IDX>
inline DEVICE_INLINE_FUNCTION auto TempLat::LatticeForwardGradient::eval (
    const IDX &... idx
) const

function getDx

inline auto TempLat::LatticeForwardGradient::getDx () const

function getKIR

inline auto TempLat::LatticeForwardGradient::getKIR () const

function getToolBox

inline device::memory::host_ptr < MemoryToolBox < NDim > > TempLat::LatticeForwardGradient::getToolBox () const

For measurement objects.


function norm

inline auto TempLat::LatticeForwardGradient::norm () 

function norm2

inline auto TempLat::LatticeForwardGradient::norm2 () 

function operator()

template<int N>
inline auto TempLat::LatticeForwardGradient::operator() (
    Tag < N > t
) const

function toString

inline std::string TempLat::LatticeForwardGradient::toString () const

function vectorGet

template<int N>
inline auto TempLat::LatticeForwardGradient::vectorGet (
    Tag < N > t
) const

Public Static Functions Documentation

function getVectorSize

static inline constexpr size_t TempLat::LatticeForwardGradient::getVectorSize () 


The documentation for this class was generated from the following file cosmolatticeweb/tmp/code_source/templat/include/TempLat/lattice/algebra/spatialderivatives/latticeforwardgradient.h