https://mooseframework.inl.gov
Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
KokkosIntegralPostprocessor< Base > Class Template Reference

#include <KokkosIntegralPostprocessor.h>

Inheritance diagram for KokkosIntegralPostprocessor< Base >:
[legend]

Public Member Functions

 KokkosIntegralPostprocessor (const InputParameters &parameters)
 
virtual void initialize () override
 
virtual Real getValue () const override
 
virtual void finalize () override
 
template<typename Derived >
KOKKOS_FUNCTION void reduce (Datum &datum, Real *result) const
 
template<typename Derived >
KOKKOS_FUNCTION void join (Real *result, const Real *source) const
 
template<typename Derived >
KOKKOS_FUNCTION void init (Real *result) const
 

Static Public Member Functions

static InputParameters validParams ()
 

Protected Attributes

const bool _average
 

Detailed Description

template<typename Base>
class KokkosIntegralPostprocessor< Base >

Definition at line 16 of file KokkosIntegralPostprocessor.h.

Constructor & Destructor Documentation

◆ KokkosIntegralPostprocessor()

template<typename Base >
KokkosIntegralPostprocessor< Base >::KokkosIntegralPostprocessor ( const InputParameters parameters)

Member Function Documentation

◆ finalize()

template<typename Base >
virtual void KokkosIntegralPostprocessor< Base >::finalize ( )
overridevirtual

◆ getValue()

template<typename Base >
virtual Real KokkosIntegralPostprocessor< Base >::getValue ( ) const
overridevirtual

◆ init()

template<typename Base >
template<typename Derived >
KOKKOS_FUNCTION void KokkosIntegralPostprocessor< Base >::init ( Real result) const

Definition at line 72 of file KokkosIntegralPostprocessor.h.

73 {
74  result[0] = 0;
75 
76  if (_average)
77  result[1] = 0;
78 }

◆ initialize()

template<typename Base >
virtual void KokkosIntegralPostprocessor< Base >::initialize ( )
overridevirtual

◆ join()

template<typename Base >
template<typename Derived >
KOKKOS_FUNCTION void KokkosIntegralPostprocessor< Base >::join ( Real result,
const Real source 
) const

Definition at line 61 of file KokkosIntegralPostprocessor.h.

62 {
63  result[0] += source[0];
64 
65  if (_average)
66  result[1] += source[1];
67 }

◆ reduce()

template<typename Base >
template<typename Derived >
KOKKOS_FUNCTION void KokkosIntegralPostprocessor< Base >::reduce ( Datum datum,
Real result 
) const

Definition at line 41 of file KokkosIntegralPostprocessor.h.

42 {
43  Real sum = 0;
44  Real vol = 0;
45 
46  for (unsigned int qp = 0; qp < datum.n_qps(); ++qp)
47  {
48  sum += datum.JxW(qp) * static_cast<const Derived *>(this)->computeQpIntegral(qp, datum);
49  vol += datum.JxW(qp);
50  }
51 
52  result[0] += sum;
53 
54  if (_average)
55  result[1] += vol;
56 }
KOKKOS_FUNCTION unsigned int n_qps() const
Get the number of local quadrature points.
Definition: KokkosDatum.h:118
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
KOKKOS_FUNCTION Real JxW(const unsigned int qp)
Get the transformed Jacobian weight.
Definition: KokkosDatum.h:311

◆ validParams()

template<typename Base >
static InputParameters KokkosIntegralPostprocessor< Base >::validParams ( )
static

Member Data Documentation

◆ _average

template<typename Base >
const bool KokkosIntegralPostprocessor< Base >::_average
protected

Definition at line 35 of file KokkosIntegralPostprocessor.h.


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