75 modify(
const std::unordered_map<dof_id_type, std::pair<SubdomainID, SubdomainID>> & moved_elems);
100 const std::unordered_map<dof_id_type, std::pair<SubdomainID, SubdomainID>> & moved_elems,
107 const std::unordered_map<dof_id_type, std::pair<SubdomainID, SubdomainID>> & moved_elems);
112 unsigned short neigh_side);
123 const std::unordered_map<dof_id_type, std::pair<SubdomainID, SubdomainID>> & moved_elems);
127 ConstElemRange & elem_range,
162 std::unordered_map<dof_id_type, std::pair<SubdomainID, SubdomainID>>
_moved_elems;
184 std::unordered_map<dof_id_type, std::unordered_map<unsigned short, BoundaryID>>
188 std::unordered_map<dof_id_type, std::unordered_map<unsigned short, BoundaryID>>
192 std::unordered_map<dof_id_type, std::unordered_map<unsigned short, BoundaryID>>
196 std::unordered_map<dof_id_type, std::unordered_map<unsigned short, BoundaryID>>
219 std::map<VariableName, std::pair<std::vector<dof_id_type>, std::vector<Number>>>
229 std::vector<NodalPatchRecoveryVariable *>
_pr;
243 std::map<unsigned int, std::pair<std::unordered_set<const Elem *>, std::vector<dof_id_type>>>
ReinitStrategy
Strategies for (re)initializing the solution:
A system that holds auxiliary variables.
Base class for mesh modifiers modifying element subdomains.
std::map< VariableName, std::vector< dof_id_type > > _patch_elem_ids
A map from variable names to their corresponding patch element IDs.
void applySubdomainChanges(const std::unordered_map< dof_id_type, std::pair< SubdomainID, SubdomainID > > &moved_elems, MooseMesh &mesh)
DisplacedProblem * _displaced_problem
Pointer to the displaced problem.
std::map< VariableName, std::pair< std::vector< dof_id_type >, std::vector< Number > > > _overridden_values_on_reinit_elems
A map from variable name to a pair of: (1) a vector of DOF IDs associated with non-reinitialized node...
std::unordered_map< dof_id_type, std::unordered_map< unsigned short, BoundaryID > > _add_neighbor_sides
Neighbor sides to be added.
std::unordered_map< BoundaryID, BoundaryName > _moving_boundary_names
Boundary names associated with each moving boundary ID.
void restoreOverriddenDofValues(const VariableName &var_name)
Restore values to non-reinitialized DoFs on reinitialized elements.
std::unordered_set< dof_id_type > _semi_local_reinitialized_elems
Semi-local reinitialized elements: ghosted and local reinitialized elements.
std::vector< VariableName > _vars_to_restore_overridden_dofs
List of variable names for which overridden DOF values should be restored.
void timestepSetup() override
Gets called at the beginning of the timestep before this object is asked to do its job.
void createMovingBoundaries(MooseMesh &mesh)
Create moving boundaries.
std::unordered_map< dof_id_type, std::unordered_map< unsigned short, BoundaryID > > _add_element_sides
Element sides to be added.
void findReinitializedElemsAndNodes(const std::unordered_map< dof_id_type, std::pair< SubdomainID, SubdomainID > > &moved_elems)
void meshChanged() override
Called on this object when the mesh changes.
NonlinearSystemBase & _nl_sys
Nonlinear system.
std::map< VariableName, unsigned int > _var_name_to_pr_idx
map from variable name to the index of the nodal patch recovery user object in _pr
virtual void modify(const std::unordered_map< dof_id_type, std::pair< SubdomainID, SubdomainID > > &moved_elems)
Modify the element subdomains.
std::unique_ptr< ConstBndNodeRange > _reinitialized_bnd_node_range
Range of reinitialized boundary nodes.
const std::vector< UserObjectName > _pr_names
Names of the NodalPatchRecoveryVariable user objects.
void initialSetup() override
Gets called at the beginning of the simulation before this object is asked to do its job.
void gatherMovingBoundaryChanges(const std::unordered_map< dof_id_type, std::pair< SubdomainID, SubdomainID > > &moved_elems)
void applyIC()
Reinitialize variables on range of elements and nodes to be reinitialized.
bool nodeIsNewlyReinitialized(dof_id_type node_id) const
Determine if a node is newly reinitialized.
void storeOverriddenDofValues(const VariableName &var_name)
Store values from non-reinitialized DoFs on reinitialized elements Stores the value before re-initial...
std::unordered_map< SubdomainPair, BoundaryID > _moving_boundaries
std::unique_ptr< ConstElemRange > _reinitialized_elem_range
Range of reinitialized elements.
static InputParameters validParams()
MooseMesh * _displaced_mesh
Displaced mesh.
double _nearby_distance_threshold
Radius threshold for the k-d tree neighbor search.
bool _skip_restore_subdomain_changes
Skipping restoring the subdomain changes if the timestep is not advanced.
std::vector< SubdomainID > _subdomain_ids_to_reinitialize
Reinitialize moved elements whose new subdomain is in this list.
int & _t_step_old
Previous time step number.
std::vector< VariableName > _reinit_vars
List of variable names to be initialized for IC.
void extrapolatePolynomial(const VariableName &var_name)
Extrapolate polynomial for the given variable onto the reinitialized elements.
AuxiliarySystem & _aux_sys
Auxiliary system.
bool _restep
Whether this is a re-step.
std::vector< ReinitStrategy > _reinit_strategy
The strategies used to apply IC on newly activated elements, for each variable.
std::unordered_set< dof_id_type > _reinitialized_nodes
Reinitialized nodes.
std::vector< Point > _kd_tree_points
Centroids of all solved elements used for k-d tree construction.
const bool _old_subdomain_reinitialized
Whether to reinitialize moved elements whose old subdomain was in _reinitialize_subdomains.
std::map< unsigned int, std::pair< std::unordered_set< const Elem * >, std::vector< dof_id_type > > > _evaluable_elems
local evaluable elements before reinitializing the equation systems Key of the map is the system numb...
void applyMovingBoundaryChanges(MooseMesh &mesh)
ConstBndNodeRange & reinitializedBndNodeRange()
Range of reinitialized boundary nodes.
std::unique_ptr< ConstNodeRange > _reinitialized_node_range
Range of reinitialized nodes.
bool subdomainIsReinitialized(SubdomainID id) const
Determine if a subdomain is to be reinitialized.
std::unordered_map< dof_id_type, std::unordered_map< unsigned short, BoundaryID > > _remove_element_sides
Element sides to be removed.
ConstElemRange & reinitializedElemRange()
Range of reinitialized elements.
void initElementStatefulProps()
Reinitialize stateful material properties on range of elements and nodes to be reinitialized.
std::unordered_map< dof_id_type, std::pair< SubdomainID, SubdomainID > > _moved_elems
Cached moved elements for potential restore.
std::unordered_set< dof_id_type > _reinitialized_elems
Reinitialized elements.
void setOldAndOlderSolutions(SystemBase &sys, ConstElemRange &elem_range, ConstBndNodeRange &bnd_node_range)
Set old and older solutions to reinitialized elements and nodes.
void setAncestorsSubdomainIDs(Elem *elem, const SubdomainID subdomain_id)
Change the subdomain ID of all ancestor elements.
std::vector< NodalPatchRecoveryVariable * > _pr
Apply initial conditions using polynomial extrapolation.
std::pair< SubdomainID, SubdomainID > SubdomainPair
Moving boundaries associated with each subdomain pair.
void gatherPatchElements(const VariableName &var_name, ReinitStrategy reinit_strategy)
Gather patch elements for reinitialized elements based on the reinitialization strategy.
std::unordered_map< dof_id_type, std::unordered_map< unsigned short, BoundaryID > > _remove_neighbor_sides
Neighbor sides to be removed.
ConstNodeRange & reinitializedNodeRange()
Range of reinitialized nodes.
void updateAMRMovingBoundary(MooseMesh &mesh)
Update boundaries for adaptive mesh from the parent to children elements.
int _leaf_max_size
KD-tree related members.
void gatherMovingBoundaryChangesHelper(const Elem *elem, unsigned short side, const Elem *neigh, unsigned short neigh_side)
void prepareVariableForReinitialization(const VariableName &var_name, ReinitStrategy reinit_strategy)
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...
Nonlinear system to be solved.
Base class for a system (of equations)