https://mooseframework.inl.gov
ElementIntegralFunctorUserObject.C
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 
11 
14 {
16  params.addRequiredParam<MooseFunctorName>("functor", "The functor to be integrated");
17  return params;
18 }
19 
21  const InputParameters & parameters)
22  : ElementIntegralUserObject(parameters),
24  _functor(getFunctor<Real>("functor"))
25 {
26 }
27 
28 Real
30 {
31  const Moose::ElemQpArg elem_qp = {_current_elem, _qp, _qrule, _q_point[_qp]};
32  return _functor(elem_qp, determineState());
33 }
An interface for accessing Moose::Functors for systems that do not care about automatic differentiati...
const MooseArray< Point > & _q_point
This postprocessor computes a volume integral of the specified variable.
Moose::StateArg determineState() const
Create a functor state argument that corresponds to the implicit state of this object.
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...
ElementIntegralFunctorUserObject(const InputParameters &parameters)
static InputParameters validParams()
const Moose::Functor< Real > & _functor
Functor to integrate.
Argument for requesting functor evaluation at a quadrature point location in an element.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const QBase *const & _qrule
const Elem *const & _current_elem
The current element pointer (available during execute())