23 params.
addParam<
bool>(
"output_ghosting",
false,
"Boolean to turn on ghosting auxiliary fields");
24 params.
addParam<
bool>(
"include_local_in_ghosting",
26 "Boolean used to toggle on the inclusion of local elements along with the "
27 "ghost elements for a complete partition map");
30 "Action to setup AuxVariables and AuxKernels to display ghosting when running in parallel");
37 _display_ghosting(getParam<bool>(
"output_ghosting")),
38 _include_local(getParam<bool>(
"include_local_in_ghosting"))
54 params.set<
MooseEnum>(
"family") =
"MONOMIAL";
56 for (
unsigned int i = 0; i < 2; ++i)
58 std::string var_name_base = (i == 0 ?
"geometric" :
"algebraic");
59 for (
decltype(n_procs) proc_id = 0; proc_id < n_procs; ++proc_id)
61 "MooseVariableConstMonomial", var_name_base + std::to_string(proc_id), params);
66 for (
unsigned int i = 0; i < 2; ++i)
68 std::string aux_kernel_name_base = i == 0 ?
"geometric" :
"algebraic";
69 for (
decltype(n_procs) proc_id = 0; proc_id < n_procs; ++proc_id)
71 std::string
name = aux_kernel_name_base + std::to_string(proc_id);
74 params.
set<processor_id_type>(
"pid") = proc_id;
75 params.set<
MooseEnum>(
"functor_type") = aux_kernel_name_base;
76 params.set<UserObjectName>(
"ghost_uo") =
"ghost_uo";
77 params.set<AuxVariableName>(
"variable") =
name;
87 _problem->addUserObject(
"GhostingUserObject",
"ghost_uo", params);
registerMooseAction("MooseApp", DisplayGhostingAction, "add_aux_variable")
static InputParameters validParams()
MooseApp & _app
The MOOSE application this is associated with.
std::shared_ptr< FEProblemBase > & _problem
Convenience reference to a problem this action works on.
const std::string & _current_task
The current action (even though we have separate instances for each action)
Class to setup multiple AuxVariables and AuxKernels to display the ghosting when running in parallel.
DisplayGhostingAction(const InputParameters ¶ms)
virtual void act() override
Method to add objects to the simulation or perform other setup tasks.
static InputParameters validParams()
InputParameters getValidParams(const std::string &name) const
Get valid parameters for the object.
const std::string & name() const
Get the name of the class.
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
Factory & _factory
The Factory associated with the MooseApp.
processor_id_type n_processors() const