https://mooseframework.inl.gov
KokkosParsedFunction.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 
12 #include "KokkosFunction.h"
13 #include "KokkosFunctionParser.h"
14 
16 
17 class FEProblemBase;
18 
20 {
21 public:
23 
26 
28 
29  KOKKOS_FUNCTION Real value(Real t, Real3 p) const { return _evaluator.eval(t, p); }
30 
34  virtual void initialSetup() override;
35 
36 protected:
40  const std::string _expression;
44  std::unique_ptr<Moose::Kokkos::RPNBuilder> _builder;
52  std::vector<Real> _symbol_values;
56  std::vector<Moose::Kokkos::Function> _symbol_functions;
57 
58 private:
60 };
std::unique_ptr< Moose::Kokkos::RPNBuilder > _builder
Parsed function builder.
Vector3< Real > Real3
Definition: KokkosTypes.h:31
KOKKOS_FUNCTION Real eval(const Real t, const Real3 p, const unsigned int qp=0, Datum *datum=nullptr) const
Evaluate RPN at point (t,x,y,z)
Adds user facing parameters for parsed function.
std::vector< Real > _symbol_values
Constant values associated with symbols.
KokkosParsedFunction(const InputParameters &parameters)
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseBase.h:131
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
The base class for a user to derive their own Kokkos functions.
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
Reverse Polish Notation (RPN) evaluator.
KOKKOS_FUNCTION Real value(Real t, Real3 p) const
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
static InputParameters validParams()
Moose::Kokkos::RPNEvaluator _evaluator
Parsed function evaluator.
virtual void initialSetup() override
Create the parsed function.
const std::string _expression
Parsed function expression.
std::vector< Moose::Kokkos::Function > _symbol_functions
Functions associated with symbols.