https://mooseframework.inl.gov
ParsedFunctorMaterial.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 "FunctorMaterial.h"
13 #include "FunctionParserUtils.h"
14 
18 template <bool is_ad>
20 {
21 public:
23 
25 
26 protected:
28 
32  void buildParsedFunction();
33 
35  const std::string & _expression;
36 
38  const std::vector<std::string> & _functor_names;
39 
41  const unsigned int _n_functors;
42 
44  std::vector<std::string> _functor_symbols;
45 
47  const std::string & _property_name;
48 
51 
53  std::vector<const Moose::Functor<GenericReal<is_ad>> *> _functors;
54 };
55 
void buildParsedFunction()
Builds the parsed function.
std::shared_ptr< SymFunction > SymFunctionPtr
Shorthand for an smart pointer to an autodiff function parser object.
ParsedFunctorMaterialTempl< false > ParsedFunctorMaterial
std::vector< std::string > _functor_symbols
Symbolic name to use for each functor.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
const std::vector< std::string > & _functor_names
Functors to use in the parsed expression.
ParsedFunctorMaterialTempl< true > ADParsedFunctorMaterial
FunctorMaterials compute functor material properties.
Computes a functor material from a parsed expression of other functors.
ParsedFunctorMaterialTempl(const InputParameters &parameters)
const std::string & _property_name
Name to give the new functor material property.
SymFunctionPtr _parsed_function
The parsed function.
const std::string & _expression
Expression to parse for the new functor material.
const InputParameters & parameters() const
Get the parameters of the object.
std::vector< const Moose::Functor< GenericReal< is_ad > > * > _functors
Functors.
const unsigned int _n_functors
Number of functors.
static InputParameters validParams()