Go to the documentation of this file.
14 #include "libmesh/fe.h"
27 params.
addParam<MarkerName>(
"marker",
28 "The name of the Marker to use to actually adapt the mesh.");
30 "steps", 0,
"The number of adaptive steps to use when doing a Steady simulation.");
32 "initial_steps", 0,
"The number of adaptive steps to do based on the initial condition.");
34 "interval", 1,
"interval>0",
"The number of time steps betweeen each adaptivity phase");
37 "The name of the Marker to use to adapt the mesh during initial refinement.");
41 "Maximum number of times a single element can be refined. If 0 then infinite.");
43 -std::numeric_limits<Real>::max(),
44 "The time that adaptivity will be active after.");
46 std::numeric_limits<Real>::max(),
47 "The time after which adaptivity will no longer be active.");
51 "The number of adaptive steps to use when on each timestep during a Transient simulation.");
53 "recompute_markers_during_cycles",
false,
"Recompute markers during adaptivity cycles");
77 rm_params.
set<std::string>(
"for_whom") =
"Adaptivity";
82 if (rm_params.areAllRequiredParamsValid())
85 "ElementSideNeighborLayers",
"adaptivity_algebraic_ghosting", rm_params);
93 mooseError(
"Invalid initialization of ElementSideNeighborLayers");
100 rm_params.
set<std::string>(
"for_whom") =
"Adaptivity";
105 if (rm_params.areAllRequiredParamsValid())
108 "MooseGhostPointNeighbors",
"adaptivity_geometric_ghosting", rm_params);
116 mooseError(
"Invalid initialization of MooseGhostPointNeighbors");
130 adapt.
setMaxHLevel(getParam<unsigned int>(
"max_h_level"));
132 adapt.
init(getParam<unsigned int>(
"steps"), getParam<unsigned int>(
"initial_steps"));
135 adapt.
setTimeActive(getParam<Real>(
"start_time"), getParam<Real>(
"stop_time"));
136 adapt.
setInterval(getParam<unsigned int>(
"interval"));
MooseApp & _app
The MOOSE application this is associated with.
std::shared_ptr< MooseObject > create(const std::string &obj_name, const std::string &name, 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)
Get valid parameters for the object.
const std::string & _current_task
The current action (even though we have seperate instances for each action)
void setInterval(unsigned int interval)
Set the interval (number of timesteps) between refinement steps.
void setMaxHLevel(unsigned int level)
Set the maximum refinement level (for the new Adaptivity system).
void init(unsigned int steps, unsigned int initial_steps)
Initialize and turn on adaptivity for the simulation.
Takes care of everything related to mesh adaptivity.
void setRecomputeMarkersFlag(const bool flag)
Set the flag to recompute markers during adaptivity cycles.
void setCyclesPerStep(const unsigned int &num)
Set the number of cycles_per_step.
virtual void act() override
Method to add objects to the simulation or perform other setup tasks.
std::shared_ptr< FEProblemBase > & _problem
Convenience reference to a problem this action works on.
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application.
Factory & _factory
The Factory associated with the MooseApp.
void setTimeActive(Real start_time, Real stop_time)
Sets the time when the adaptivity is active.
RelationshipManagerType
Main types of Relationship Managers.
bool isParamValid(const std::string &name) const
void setUseNewSystem()
Tells this object we're using the "new" adaptivity system.
static InputParameters validParams()
RelationshipManagers are used for describing what kinds of non-local resources are needed for an obje...
void setInitialMarkerVariableName(std::string marker_field)
Sets the name of the field variable to actually use to flag elements for initial refinement / coarsen...
bool addRelationshipManager(std::shared_ptr< RelationshipManager > relationship_manager)
Transfers ownership of a RelationshipManager to the application for lifetime management.
defineLegacyParams(SetAdaptivityOptionsAction)
MooseMesh wraps a libMesh::Mesh object and enhances its capabilities by caching additional data and s...
SetAdaptivityOptionsAction(InputParameters params)
std::shared_ptr< MooseMesh > & _mesh
void setMarkerVariableName(std::string marker_field)
Sets the name of the field variable to actually use to flag elements for refinement / coarsening.
static InputParameters validParams()
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...
registerMooseAction("MooseApp", SetAdaptivityOptionsAction, "set_adaptivity_options")