https://mooseframework.inl.gov
Loading...
Searching...
No Matches
KokkosElementExtremeValue.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
14
15class KokkosElementExtremeValue : public KokkosExtremeValueBase<KokkosElementVariablePostprocessor>
16{
17public:
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
28protected:
30};
31
32KOKKOS_FUNCTION inline Kokkos::pair<Real, Real>
33KokkosElementExtremeValue::getProxyValuePair(const unsigned int qp, Datum & datum) const
34{
35 return Kokkos::make_pair(_proxy_variable(datum, qp), _u(datum, qp));
36}
37
38template <typename Derived>
39KOKKOS_FUNCTION void
40KokkosElementExtremeValue::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}
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
KOKKOS_FUNCTION void reduce(Datum &datum, Real *result) const
KOKKOS_FUNCTION Kokkos::pair< Real, Real > getProxyValuePair(const unsigned int qp, Datum &datum) const
KokkosElementExtremeValue(const InputParameters &parameters)
const Moose::Kokkos::VariableValue _proxy_variable
static InputParameters validParams()
const Moose::Kokkos::VariableValue _u
Holds the solution at current quadrature points.
const InputParameters & parameters() const
Get the parameters of the object.
Definition MooseBase.h:131
The Kokkos object that holds thread-private data in the parallel operations of any Kokkos object.
KOKKOS_FUNCTION unsigned int n_qps() const
Get the number of local quadrature points.
The Kokkos wrapper classes for MOOSE-like variable value access.