17#include <unordered_map>
46 virtual void execute()
override;
67 const std::vector<AuxVariableName> & names,
68 std::vector<unsigned int> & var_numbers);
94 std::vector<const Moose::Functor<Real> *>
_functors;
MooseVariableFE< Real > MooseVariable
Keeps track of stuff related to assembling.
std::shared_ptr< SymFunction > SymFunctionPtr
Shorthand for an smart pointer to an autodiff function parser object.
Base class for function objects.
const InputParameters & parameters() const
Get the parameters of the object.
MooseMesh wraps a libMesh::Mesh object and enhances its capabilities by caching additional data and s...
Class for stuff related to variables.
MeshModifier that actively displaces the selected nodes by three parsed expressions (x,...
std::unordered_map< dof_id_type, Point > & _original_position
Original (reference) position of each node, captured on first touch.
MooseMesh & _mesh
Reference to the current simulation mesh.
const bool _output_coordinates
Optional outputs, each enabled only when its parameter is provided.
const std::vector< SubdomainID > _subdomain_ids
Blocks whose nodes are displaced.
static InputParameters validParams()
SymFunctionPtr _displacement[3]
The three parsed displacement functions (x, y, z)
const std::vector< BoundaryID > _boundary_ids
Boundaries whose nodes are displaced.
const bool _output_displacements
std::vector< const PostprocessorValue * > _postprocessors
Postprocessor values referenced in the expressions, in symbol order.
unsigned int _aux_sys_num
Auxiliary system number (set when any output is enabled)
void displaceNode(Node &node, bool owner_only)
Displace a single node by the parsed expressions, relative to its original position.
virtual void initialize() override
Called before execute() is ever called so that data can be cleared.
usingFunctionParserUtilsMembers(false)
const bool _output_density_factor
std::vector< unsigned int > _coordinate_var
Aux variable numbers of the original-coordinate components (x, y, z)
std::vector< const Function * > _functions
Functions referenced in the expressions, in symbol order.
std::vector< const Moose::Functor< Real > * > _functors
Functors referenced in the expressions, in symbol order.
const bool _notify_mesh_changed
Whether to notify the problem that the mesh changed after moving nodes.
std::vector< const MooseVariable * > _coupled_vars
Coupled (nodal) variables referenced in the expressions, in symbol order.
unsigned int _density_factor_var
Aux variable number of the per-element density adjustment factor.
static const std::string _disp_name[3]
Parameter names of the three displacement expressions (x, y, z)
void setupNodalOutputVariables(const std::string ¶m_name, const std::vector< AuxVariableName > &names, std::vector< unsigned int > &var_numbers)
Validate a list of three nodal output aux variable names (exactly three, each existing and nodal) and...
void writeOutputs()
Write the optional original-coordinate, displacement, and density-factor aux variables.
bool & _original_volume_recorded
Whether the original element volumes have been recorded yet.
std::unordered_map< dof_id_type, Real > & _original_volume
Original (undisplaced) coordinate-aware element volumes, captured once.
Assembly * _assembly
Assembly used to compute coordinate-aware element volumes (density factor)
void moveNodes()
Displace all selected nodes (boundary/block restricted, or all blocks)
std::vector< unsigned int > _displacement_var
Aux variable numbers of the displacement components (x, y, z)
virtual void finalize() override
Finalize.
void prepare()
Capture the original element volumes (once) before moving any nodes.
virtual void execute() override
Execute method.
An interface for accessing Moose::Functors for systems that do not care about automatic differentiati...