20 "Level set used to achieve more accurate reverse projection compared to interpolation.");
22 "max_level_set_correction_iterations",
24 "Maximum number of iterations to correct the nodes based on the level set function.");
26 "Level set shape correction");
33 _max_level_set_correction_iterations(
34 parameters.
get<unsigned
int>(
"max_level_set_correction_iterations"))
44 parameters.
get<std::vector<std::string>>(
"constant_names"),
45 parameters.
get<std::vector<std::string>>(
"constant_expressions"));
72 const Point grad = Point((xp_eval - xm_eval) / (2.0 * diff),
73 (yp_eval - ym_eval) / (2.0 * diff),
74 (zp_eval - zm_eval) / (2.0 * diff));
75 const Real xyz_diff = -original_eval / grad.contract(grad);
76 node(0) += xyz_diff * grad(0);
77 node(1) += xyz_diff * grad(1);
78 node(2) += xyz_diff * grad(2);
GenericReal< is_ad > evaluate(SymFunctionPtr &, const std::string &object_name="")
Evaluate FParser object and check EvalError.
void addFParserConstants(SymFunctionPtr &parser, const std::vector< std::string > &constant_names, const std::vector< std::string > &constant_expressions) const
add constants (which can be complex expressions) to the parser object
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
static constexpr Real TOLERANCE
LevelSetMeshingHelper(const InputParameters ¶meters)
static InputParameters validParams()
SymFunctionPtr _func_level_set
function parser object describing the level set
void levelSetCorrection(Node &node)
Correct the position of a node based on the level set function.
Real levelSetEvaluator(const Point &point)
Evaluate the level set function at a given point.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
std::vector< GenericReal< is_ad > > _func_params
Array to stage the parameters passed to the functions when calling Eval.
static InputParameters validParams()
void ErrorVector unsigned int
const Elem & get(const ElemType type_in)
void setParserFeatureFlags(SymFunctionPtr &) const
apply input parameters to internal feature flags of the parser object