https://mooseframework.inl.gov
KokkosIntegralMaterialProperty.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 
14 template <typename Base>
15 class KokkosIntegralMaterialProperty : public Base
16 {
17 public:
19 
21 
22  KOKKOS_FUNCTION Real computeQpIntegral(const unsigned int qp, Datum & datum) const;
23 
24 protected:
26 };
27 
28 template <typename Base>
31 {
33  params.addRequiredParam<MaterialPropertyName>("mat_prop", "The name of the material property");
34  params.addClassDescription("Compute the integral of the material property over the domain");
35  return params;
36 }
37 
38 template <typename Base>
40  const InputParameters & parameters)
41  : Base(parameters), _scalar(Base::template getKokkosMaterialProperty<Real>("mat_prop"))
42 {
43 }
44 
45 template <typename Base>
46 KOKKOS_FUNCTION Real
48 {
49  return _scalar(datum, qp);
50 }
51 
const Moose::Kokkos::MaterialProperty< Real > _scalar
The Kokkos object that holds thread-private data in the parallel operations of any Kokkos object...
Definition: KokkosDatum.h:23
KOKKOS_FUNCTION Real computeQpIntegral(const unsigned int qp, Datum &datum) const
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
void addRequiredParam(const std::string &name, const std::string &doc_string)
This method adds a parameter and documentation string to the InputParameters object that will be extr...
KokkosIntegralMaterialProperty< KokkosElementIntegralPostprocessor > KokkosElementIntegralMaterialProperty
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void addClassDescription(const std::string &doc_string)
This method adds a description of the class that will be displayed in the input file syntax dump...
KokkosIntegralMaterialProperty(const InputParameters &parameters)
InputParameters validParams()