www.mooseframework.org
ParsedODEKernel.h
Go to the documentation of this file.
1 /****************************************************************/
2 /* DO NOT MODIFY THIS HEADER */
3 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
4 /* */
5 /* (c) 2010 Battelle Energy Alliance, LLC */
6 /* ALL RIGHTS RESERVED */
7 /* */
8 /* Prepared by Battelle Energy Alliance, LLC */
9 /* Under Contract No. DE-AC07-05ID14517 */
10 /* With the U. S. Department of Energy */
11 /* */
12 /* See COPYRIGHT for full restrictions */
13 /****************************************************************/
14 
15 #ifndef PARSEDODEKERNEL_H
16 #define PARSEDODEKERNEL_H
17 
18 #include "ODEKernel.h"
19 #include "FunctionParserUtils.h"
20 
21 // Forward Declarations
22 class ParsedODEKernel;
23 
24 template <>
26 
31 {
32 public:
34 
35 protected:
36  void updateParams();
37 
38  virtual Real computeQpResidual() override;
39  virtual Real computeQpJacobian() override;
40  virtual Real computeQpOffDiagJacobian(unsigned int jvar) override;
41 
43  std::string _function;
44 
46  unsigned int _nargs;
47  std::vector<VariableValue *> _args;
48  std::vector<std::string> _arg_names;
49 
53 
55  std::vector<ADFunctionPtr> _func_dFdarg;
56 
58  const unsigned int _number_of_nl_variables;
59 
60 private:
62  std::vector<unsigned int> _arg_index;
63 };
64 
65 #endif /* PARSEDODEKERNEL_H */
std::vector< std::string > _arg_names
ADFunctionPtr _func_F
function parser object for the residual and on-diagonal Jacobian
std::vector< ADFunctionPtr > _func_dFdarg
function parser objects for the Jacobian
virtual Real computeQpOffDiagJacobian(unsigned int jvar) override
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
std::shared_ptr< ADFunction > ADFunctionPtr
Shorthand for an smart pointer to an autodiff function parser object.
std::string _function
function expression
std::vector< unsigned int > _arg_index
Vector to look up the internal coupled variable index into arg* through the libMesh variable number...
InputParameters validParams< ODEKernel >()
Definition: ODEKernel.C:24
ParsedODEKernel(const InputParameters &parameters)
std::vector< VariableValue * > _args
virtual Real computeQpJacobian() override
const unsigned int _number_of_nl_variables
number of non-linear variables in the problem
virtual Real computeQpResidual() override
ADFunctionPtr _func_dFdu
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:53
unsigned int _nargs
coupled variables