https://mooseframework.inl.gov
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. More...
 
KOKKOS_FUNCTION Real value (Real t, Real3 p) const override final
 Virtual shims that calls the corresponding methods of the actual stored function. More...
 
KOKKOS_FUNCTION Real3 vectorValue (Real t, Real3 p) const override final
 
KOKKOS_FUNCTION Real3 gradient (Real t, Real3 p) const override final
 
KOKKOS_FUNCTION Real3 curl (Real t, Real3 p) const override final
 
KOKKOS_FUNCTION Real div (Real t, Real3 p) const override final
 
KOKKOS_FUNCTION Real timeDerivative (Real t, Real3 p) const override final
 
KOKKOS_FUNCTION Real timeIntegral (Real t1, Real t2, Real3 p) const override final
 
KOKKOS_FUNCTION Real integral () const override final
 
KOKKOS_FUNCTION Real average () const override final
 

Protected Attributes

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

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 60 of file KokkosFunctionWrapper.h.

Constructor & Destructor Documentation

◆ FunctionWrapperDevice()

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

Constructor.

Definition at line 68 of file KokkosFunctionWrapper.h.

68 {}

Member Function Documentation

◆ average()

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

Implements Moose::Kokkos::FunctionWrapperDeviceBase.

Definition at line 93 of file KokkosFunctionWrapper.h.

93 { 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
inlinefinaloverridevirtual

Implements Moose::Kokkos::FunctionWrapperDeviceBase.

Definition at line 82 of file KokkosFunctionWrapper.h.

82 { return _function->curl(t, p); }
Object * _function
Pointer to the function on device.

◆ div()

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

Implements Moose::Kokkos::FunctionWrapperDeviceBase.

Definition at line 83 of file KokkosFunctionWrapper.h.

83 { return _function->div(t, p); }
Object * _function
Pointer to the function on device.

◆ gradient()

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

Implements Moose::Kokkos::FunctionWrapperDeviceBase.

Definition at line 78 of file KokkosFunctionWrapper.h.

79  {
80  return _function->gradient(t, p);
81  }
Object * _function
Pointer to the function on device.

◆ integral()

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

Implements Moose::Kokkos::FunctionWrapperDeviceBase.

Definition at line 92 of file KokkosFunctionWrapper.h.

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

◆ timeDerivative()

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

Implements Moose::Kokkos::FunctionWrapperDeviceBase.

Definition at line 84 of file KokkosFunctionWrapper.h.

85  {
86  return _function->timeDerivative(t, p);
87  }
Object * _function
Pointer to the function on device.

◆ timeIntegral()

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

Implements Moose::Kokkos::FunctionWrapperDeviceBase.

Definition at line 88 of file KokkosFunctionWrapper.h.

89  {
90  return _function->timeIntegral(t1, t2, p);
91  }
Object * _function
Pointer to the function on device.

◆ value()

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

Virtual shims that calls the corresponding methods of the actual stored function.

{@

Implements Moose::Kokkos::FunctionWrapperDeviceBase.

Definition at line 70 of file KokkosFunctionWrapper.h.

71  {
72  return _function->value(t, p);
73  }
Object * _function
Pointer to the function on device.

◆ vectorValue()

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

Implements Moose::Kokkos::FunctionWrapperDeviceBase.

Definition at line 74 of file KokkosFunctionWrapper.h.

75  {
76  return _function->vectorValue(t, p);
77  }
Object * _function
Pointer to the function on device.

Friends And Related Function Documentation

◆ FunctionWrapperHost< Object >

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

Definition at line 62 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: