21 "Removes elements such that the parsed expression is evaluated as strictly positive. " 22 "The parameters of the parsed expression can be the X,Y,Z coordinates of the " 23 "element vertex average (must be 'x','y','z' in the expression), the element volume " 24 "(must be 'volume' in the expression) and the element id ('id' in the expression).");
26 "expression",
"Expression to evaluate to decide whether an element should be deleted");
27 params.
addParam<std::vector<std::string>>(
28 "constant_names", {},
"Vector of constants used in the parsed function");
29 params.
addParam<std::vector<std::string>>(
30 "constant_expressions",
32 "Vector of values for the constants in constant_names (can be an FParser expression)");
40 _function = std::make_shared<SymFunction>();
42 getParam<ParsedFunctionExpression>(
"expression"),
44 getParam<std::vector<std::string>>(
"constant_names"),
45 getParam<std::vector<std::string>>(
"constant_expressions"),
54 const auto vertex_average = elem->vertex_average();
GenericReal< is_ad > evaluate(SymFunctionPtr &, const std::string &object_name="")
Evaluate FParser object and check EvalError.
virtual bool shouldDelete(const Elem *elem) override
Method that returns a Boolean indicating whether an element should be removed from the mesh...
const T & getParam(const std::string &name) const
Retrieve a parameter for the object.
This class deletes elements from the mesh data structure after it has been generated or read but befo...
const Parallel::Communicator & comm() const
static InputParameters validParams()
ParsedElementDeletionGenerator(const InputParameters ¶meters)
static InputParameters validParams()
SymFunctionPtr _function
the function
registerMooseObject("MooseApp", ParsedElementDeletionGenerator)
void parsedFunctionSetup(SymFunctionPtr &function, const std::string &expression, const std::string &variables, const std::vector< std::string > &constant_names, const std::vector< std::string > &constant_expressions, const libMesh::Parallel::Communicator &comm) const
Performs setup steps on a SymFunction.
Deletes elements based on the evaluation of a parsed expression, involving the coordinates of their v...
std::vector< GenericReal< is_ad > > _func_params
Array to stage the parameters passed to the functions when calling Eval.
IntRange< T > make_range(T beg, T end)
static InputParameters validParams()