https://mooseframework.inl.gov
KokkosSideExtremeValue.h
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://mooseframework.inl.gov
3 //*
4 //* All rights reserved, see COPYRIGHT for full restrictions
5 //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6 //*
7 //* Licensed under LGPL 2.1, please see LICENSE for details
8 //* https://www.gnu.org/licenses/lgpl-2.1.html
9 
10 #pragma once
11 
13 #include "KokkosExtremeValueBase.h"
14 
15 class KokkosSideExtremeValue : public KokkosExtremeValueBase<KokkosSideVariablePostprocessor>
16 {
17 public:
19 
21 
22  KOKKOS_FUNCTION Kokkos::pair<Real, Real> getProxyValuePair(const unsigned int qp,
23  Datum & datum) const;
24 
25  template <typename Derived>
26  KOKKOS_FUNCTION void reduce(Datum & datum, Real * result) const;
27 
28 protected:
30 };
31 
32 KOKKOS_FUNCTION inline Kokkos::pair<Real, Real>
33 KokkosSideExtremeValue::getProxyValuePair(const unsigned int qp, Datum & datum) const
34 {
35  return Kokkos::make_pair(_proxy_variable(datum, qp), _u(datum, qp));
36 }
37 
38 template <typename Derived>
39 KOKKOS_FUNCTION void
40 KokkosSideExtremeValue::reduce(Datum & datum, Real * result) const
41 {
42  for (unsigned int qp = 0; qp < datum.n_qps(); ++qp)
43  static_cast<const Derived *>(this)->template computeExtremeValue<Derived>(qp, datum, result);
44 }
KOKKOS_FUNCTION void reduce(Datum &datum, Real *result) const
The Kokkos object that holds thread-private data in the parallel operations of any Kokkos object...
Definition: KokkosDatum.h:23
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseBase.h:131
KokkosSideExtremeValue(const InputParameters &parameters)
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
KOKKOS_FUNCTION Kokkos::pair< Real, Real > getProxyValuePair(const unsigned int qp, Datum &datum) const
const Moose::Kokkos::VariableValue _u
Holds the solution at current quadrature points.
KOKKOS_FUNCTION unsigned int n_qps() const
Get the number of local quadrature points.
Definition: KokkosDatum.h:118
const Moose::Kokkos::VariableValue _proxy_variable
The Kokkos wrapper classes for MOOSE-like variable value access.
static InputParameters validParams()
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real