28 params.
addParam<std::vector<std::string>>(
30 "The variables corresponding to the x y z displacements of the mesh. If " 31 "this is provided then the displacements will be taken into account during " 32 "the computation. Creation of the displaced mesh can be suppressed even if " 33 "this is set by setting 'use_displaced_mesh = false'.");
37 "Create the displaced mesh if the 'displacements' " 38 "parameter is set. If this is 'false', a displaced mesh will not be created, " 39 "regardless of whether 'displacements' is set.");
64 rm_params.
set<
bool>(
"attach_geometric_early") =
false;
66 rm_params.set<System *>(
"other_system") = &from.
system();
67 rm_params.set<std::string>(
"for_whom") =
"DisplacedMesh";
70 rm_params.set<
bool>(
"use_displaced_mesh") = to.
subproblem().
name() ==
"DisplacedProblem";
72 if (rm_params.areAllRequiredParamsValid())
75 "ProxyRelationshipManager",
77 "_" +
type +
"_proxy",
84 mooseError(
"Invalid initialization of ProxyRelationshipManager");
104 if (
isParamValid(
"displacements") && getParam<bool>(
"use_displaced_mesh"))
109 mooseError(
"displacements were set but a displaced mesh wasn't created!");
113 object_params.
set<std::vector<std::string>>(
"displacements") =
114 getParam<std::vector<std::string>>(
"displacements");
117 object_params.
set<
bool>(
"default_ghosting") =
_problem->defaultGhosting();
120 std::shared_ptr<DisplacedProblem> disp_problem =
124 _problem->addDisplacedProblem(disp_problem);
129 if (
_mesh->getMeshPtr())
131 "We should be adding geometric rms so early that we haven't set our MeshBase yet");
133 _mesh->allowRemoteElementRemoval(
false);
140 mooseError(
"We should have created a displaced mesh by now");
142 auto displaced_problem_ptr =
_problem->getDisplacedProblem();
146 auto & undisplaced_nl =
_problem->getNonlinearSystemBase(i);
147 auto & displaced_nl = displaced_problem_ptr->nlSys(i);
154 auto & undisplaced_aux =
_problem->getAuxiliarySystem();
155 auto & displaced_aux = displaced_problem_ptr->auxSys();
175 mooseError(
"We should not have been allowing remote element deletion prior to the addition " 176 "of late geometric ghosting functors");
RelationshipManagerType
Main types of Relationship Managers.
void addProxyAlgebraicRelationshipManagers(SystemBase &to, SystemBase &from)
Sets up a ProxyRelationshipManager that copies algebraic ghosting from->to.
std::shared_ptr< MooseObject > create(const std::string &obj_name, const std::string &name, const InputParameters ¶meters, THREAD_ID tid=0, bool print_deprecated=true)
Build an object (must be registered) - THIS METHOD IS DEPRECATED (Use create<T>()) ...
InputParameters getValidParams(const std::string &name) const
Get valid parameters for the object.
Base class for a system (of equations)
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
virtual const std::string & name() const
Get the name of the class.
registerMooseAction("MooseApp", CreateDisplacedProblemAction, "init_displaced_problem")
bool isParamValid(const std::string &name) const
Test if the supplied parameter is valid.
Factory & _factory
The Factory associated with the MooseApp.
virtual void act() override
Method to add objects to the simulation or perform other setup tasks.
bool addRelationshipManager(std::shared_ptr< RelationshipManager > relationship_manager)
Transfers ownership of a RelationshipManager to the application for lifetime management.
static InputParameters validParams()
std::shared_ptr< MooseMesh > & _displaced_mesh
MooseMesh wraps a libMesh::Mesh object and enhances its capabilities by caching additional data and s...
void addProxyGeometricRelationshipManagers(SystemBase &to, SystemBase &from)
Sets up a ProxyRelationshipManager that copies geometric ghosting from->to.
const std::string & type() const
Get the type of this class.
const T & getParam(const std::string &name) const
Retrieve a parameter for the object.
const std::string & _current_task
The current action (even though we have separate instances for each action)
static InputParameters validParams()
virtual SubProblem & subproblem()
virtual System & system()=0
Get the reference to the libMesh system.
MooseApp & _app
The MOOSE application this is associated with.
void releaseSharedObjects(const MooseObject &moose_object, THREAD_ID tid=0)
Releases any shared resources created as a side effect of creating an object through the Factory::cre...
std::shared_ptr< MooseMesh > & _mesh
CreateDisplacedProblemAction(const InputParameters ¶meters)
RelationshipManagers are used for describing what kinds of non-local resources are needed for an obje...
void addProxyRelationshipManagers(SystemBase &to, SystemBase &from, Moose::RelationshipManagerType rm_type, std::string type)
Generic adder of ProxyRelationshipManagers.
virtual MooseMesh & mesh()
IntRange< T > make_range(T beg, T end)
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
std::shared_ptr< FEProblemBase > & _problem
Convenience reference to a problem this action works on.