https://mooseframework.inl.gov
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | Friends | List of all members
Moose::Kokkos::FunctionWrapperDevice< Object > Class Template Reference

Device function wrapper class that provides polymorphic interfaces for a function. More...

#include <KokkosFunctionWrapper.h>

Inheritance diagram for Moose::Kokkos::FunctionWrapperDevice< Object >:
[legend]

Public Member Functions

KOKKOS_FUNCTION FunctionWrapperDevice ()
 Constructor.
 
KOKKOS_FUNCTION Real value (Real t, Real3 p) const KOKKOS_OVERRIDE
 
KOKKOS_FUNCTION Real3 vectorValue (Real t, Real3 p) const KOKKOS_OVERRIDE
 
KOKKOS_FUNCTION Real3 gradient (Real t, Real3 p) const KOKKOS_OVERRIDE
 
KOKKOS_FUNCTION Real3 curl (Real t, Real3 p) const KOKKOS_OVERRIDE
 
KOKKOS_FUNCTION Real div (Real t, Real3 p) const KOKKOS_OVERRIDE
 
KOKKOS_FUNCTION Real timeDerivative (Real t, Real3 p) const KOKKOS_OVERRIDE
 
KOKKOS_FUNCTION Real timeIntegral (Real t1, Real t2, Real3 p) const KOKKOS_OVERRIDE
 
KOKKOS_FUNCTION Real integral () const KOKKOS_OVERRIDE
 
KOKKOS_FUNCTION Real average () const KOKKOS_OVERRIDE
 

Protected Attributes

Object * _function = nullptr
 Pointer to the function on device.
 

Friends

class FunctionWrapperHost< Object >
 

Detailed Description

template<typename Object>
class Moose::Kokkos::FunctionWrapperDevice< Object >

Device function wrapper class that provides polymorphic interfaces for a function.

The function itself is a static object and does not have any virtual method. Instead, the device wrapper defines the virtual shims and forwards the calls to the static methods of the stored function.

Template Parameters
ObjectThe function class type

Definition at line 96 of file KokkosFunctionWrapper.h.

Constructor & Destructor Documentation

◆ FunctionWrapperDevice()

template<typename Object >
KOKKOS_FUNCTION Moose::Kokkos::FunctionWrapperDevice< Object >::FunctionWrapperDevice ( )
inline

Constructor.

Definition at line 104 of file KokkosFunctionWrapper.h.

104{}

Member Function Documentation

◆ average()

template<typename Object >
KOKKOS_FUNCTION Real Moose::Kokkos::FunctionWrapperDevice< Object >::average ( ) const
inline

Definition at line 132 of file KokkosFunctionWrapper.h.

132{ return _function->average(); }
Object * _function
Pointer to the function on device.

◆ curl()

template<typename Object >
KOKKOS_FUNCTION Real3 Moose::Kokkos::FunctionWrapperDevice< Object >::curl ( Real  t,
Real3  p 
) const
inline

Definition at line 118 of file KokkosFunctionWrapper.h.

119 {
120 return _function->curl(t, p);
121 }

◆ div()

template<typename Object >
KOKKOS_FUNCTION Real Moose::Kokkos::FunctionWrapperDevice< Object >::div ( Real  t,
Real3  p 
) const
inline

Definition at line 122 of file KokkosFunctionWrapper.h.

122{ return _function->div(t, p); }

◆ gradient()

template<typename Object >
KOKKOS_FUNCTION Real3 Moose::Kokkos::FunctionWrapperDevice< Object >::gradient ( Real  t,
Real3  p 
) const
inline

Definition at line 114 of file KokkosFunctionWrapper.h.

115 {
116 return _function->gradient(t, p);
117 }

◆ integral()

template<typename Object >
KOKKOS_FUNCTION Real Moose::Kokkos::FunctionWrapperDevice< Object >::integral ( ) const
inline

Definition at line 131 of file KokkosFunctionWrapper.h.

131{ return _function->integral(); }

◆ timeDerivative()

template<typename Object >
KOKKOS_FUNCTION Real Moose::Kokkos::FunctionWrapperDevice< Object >::timeDerivative ( Real  t,
Real3  p 
) const
inline

Definition at line 123 of file KokkosFunctionWrapper.h.

124 {
125 return _function->timeDerivative(t, p);
126 }

◆ timeIntegral()

template<typename Object >
KOKKOS_FUNCTION Real Moose::Kokkos::FunctionWrapperDevice< Object >::timeIntegral ( Real  t1,
Real  t2,
Real3  p 
) const
inline

Definition at line 127 of file KokkosFunctionWrapper.h.

128 {
129 return _function->timeIntegral(t1, t2, p);
130 }

◆ value()

template<typename Object >
KOKKOS_FUNCTION Real Moose::Kokkos::FunctionWrapperDevice< Object >::value ( Real  t,
Real3  p 
) const
inline

Definition at line 106 of file KokkosFunctionWrapper.h.

107 {
108 return _function->value(t, p);
109 }

◆ vectorValue()

template<typename Object >
KOKKOS_FUNCTION Real3 Moose::Kokkos::FunctionWrapperDevice< Object >::vectorValue ( Real  t,
Real3  p 
) const
inline

Definition at line 110 of file KokkosFunctionWrapper.h.

111 {
112 return _function->vectorValue(t, p);
113 }

Friends And Related Symbol Documentation

◆ FunctionWrapperHost< Object >

template<typename Object >
friend class FunctionWrapperHost< Object >
friend

Definition at line 81 of file KokkosFunctionWrapper.h.

Member Data Documentation

◆ _function

template<typename Object >
Object* Moose::Kokkos::FunctionWrapperDevice< Object >::_function = nullptr
protected

The documentation for this class was generated from the following file: