www.mooseframework.org
ParsedMaterial.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
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 #include "ParsedMaterial.h"
11 
14 
15 template <bool is_ad>
18 {
21  params.addClassDescription("Parsed expression Material.");
22  return params;
23 }
24 
25 template <bool is_ad>
27  : ParsedMaterialHelper<is_ad>(parameters, VariableNameMappingMode::USE_MOOSE_NAMES),
28  ParsedMaterialBase(parameters)
29 {
30  // Build function and optimize
34  this->template getParam<std::vector<std::string>>("material_property_names"),
35  this->template getParam<std::vector<PostprocessorName>>("postprocessor_names"),
36  _tol_names,
37  _tol_values);
38 }
39 
40 // explicit instantiation
41 template class ParsedMaterialTempl<false>;
42 template class ParsedMaterialTempl<true>;
std::vector< std::string > _constant_expressions
std::vector< std::string > _constant_names
constant vectors
std::string _function
function expression
Helper class for ParsedMaterial and DerivativeParsedMaterial to declare and read the input parameters...
static InputParameters validParams()
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
registerMooseObject("MooseApp", ParsedMaterial)
static InputParameters validParams()
std::vector< std::string > _tol_names
tolerance vectors
static InputParameters validParams()
FunctionMaterialBase child class to evaluate a parsed function.
const T & getParam(const std::string &name) const
Retrieve a parameter for the object.
Helper class to perform the parsing and optimization of the function expression.
ParsedMaterialTempl(const InputParameters &parameters)
void addClassDescription(const std::string &doc_string)
This method adds a description of the class that will be displayed in the input file syntax dump...
void functionParse(const std::string &function_expression)
std::vector< Real > _tol_values