https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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
18template <bool is_ad>
20{
21public:
23
25
26protected:
28
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
ParsedFunctorMaterialTempl< true > ADParsedFunctorMaterial
ParsedFunctorMaterialTempl< false > ParsedFunctorMaterial
std::shared_ptr< SymFunction > SymFunctionPtr
Shorthand for an smart pointer to an autodiff function parser object.
FunctorMaterials compute functor material properties.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
const InputParameters & parameters() const
Get the parameters of the object.
Definition MooseBase.h:131
Computes a functor material from a parsed expression of other functors.
void buildParsedFunction()
Builds the parsed function.
const std::vector< std::string > & _functor_names
Functors to use in the parsed expression.
SymFunctionPtr _parsed_function
The parsed function.
static InputParameters validParams()
const std::string & _property_name
Name to give the new functor material property.
const std::string & _expression
Expression to parse for the new functor material.
const unsigned int _n_functors
Number of functors.
std::vector< std::string > _functor_symbols
Symbolic name to use for each functor.
std::vector< const Moose::Functor< GenericReal< is_ad > > * > _functors
Functors.