Skip to content

Commit

Permalink
Minor fixup on parsed expression
Browse files Browse the repository at this point in the history
functor
Suppress ignored parameters in functor mat
  • Loading branch information
GiudGiud authored and schakrabortygithub committed Mar 12, 2024
1 parent f98a350 commit a760039
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions framework/src/functormaterials/FunctorMaterial.C
Expand Up @@ -25,6 +25,10 @@ FunctorMaterial::validParams()
// Do not allow functor materials in the regular Materials block
params.registerBase("FunctorMaterial");

// Remove MaterialBase parameters that are not used
params.suppressParameter<bool>("compute");
params.suppressParameter<MaterialPropertyName>("declare_suffix");

return params;
}

Expand Down
4 changes: 2 additions & 2 deletions framework/src/functormaterials/ParsedFunctorMaterial.C
Expand Up @@ -102,10 +102,10 @@ ParsedFunctorMaterialTempl<is_ad>::buildParsedFunction()
std::vector<std::string> symbols(_functor_symbols);
std::string symbols_str = Moose::stringify(symbols);
if (Moose::dim == 3)
symbols_str += ",x,y,z";
symbols_str += symbols_str.empty() ? "x,y,z" : ",x,y,z";
else
mooseError("ParsedFunctorMaterial assumes the dimension is always equal to 3.");
symbols_str += ",t";
symbols_str += symbols_str.empty() ? "t" : ",t";

// Parse the expression
if (_parsed_function->Parse(_expression, symbols_str) >= 0)
Expand Down

0 comments on commit a760039

Please sign in to comment.