https://mooseframework.inl.gov
AddRelationshipManager.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://mooseframework.inl.gov
3 //*
4 //* All rights reserved, see COPYRIGHT for full restrictions
5 //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6 //*
7 //* Licensed under LGPL 2.1, please see LICENSE for details
8 //* https://www.gnu.org/licenses/lgpl-2.1.html
9 
10 #include "AddRelationshipManager.h"
11 #include "FEProblem.h"
12 #include "DisplacedProblem.h"
13 
14 registerMooseAction("MooseApp", AddRelationshipManager, "attach_geometric_rm");
15 registerMooseAction("MooseApp", AddRelationshipManager, "attach_geometric_rm_final");
16 registerMooseAction("MooseApp", AddRelationshipManager, "attach_algebraic_rm");
17 registerMooseAction("MooseApp", AddRelationshipManager, "attach_coupling_rm");
18 registerMooseAction("MooseApp", AddRelationshipManager, "add_geometric_rm");
19 registerMooseAction("MooseApp", AddRelationshipManager, "add_algebraic_rm");
20 registerMooseAction("MooseApp", AddRelationshipManager, "add_coupling_rm");
21 
24 {
25  return Action::validParams();
26 }
27 
29 
30 void
32 {
34  if (_current_task == "attach_geometric_rm" || _current_task == "add_geometric_rm" ||
35  _current_task == "attach_geometric_rm_final")
37  else if (_current_task == "attach_algebraic_rm" || _current_task == "add_algebraic_rm")
39  else
41 
42  if (_current_task == "add_geometric_rm" || _current_task == "add_algebraic_rm" ||
43  _current_task == "add_coupling_rm")
44  {
45  const auto & all_action_ptrs = _awh.allActionBlocks();
46  for (const auto & action_ptr : all_action_ptrs)
47  action_ptr->addRelationshipManagers(rm_type);
48  }
49  // Inform MooseApp that is is the final chance to attach geometric RMs
50  else if (_current_task == "attach_geometric_rm_final")
51  _app.attachRelationshipManagers(rm_type, true);
52  else
54 }
virtual void act() override
Method to add objects to the simulation or perform other setup tasks.
RelationshipManagerType
Main types of Relationship Managers.
Definition: MooseTypes.h:963
ActionWarehouse & _awh
Reference to ActionWarehouse where we store object build by actions.
Definition: Action.h:159
registerMooseAction("MooseApp", AddRelationshipManager, "attach_geometric_rm")
This Action retrieves all of the Actions from the MooseAction Warehouse and triggers the addRelations...
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
Base class for actions.
Definition: Action.h:33
void attachRelationshipManagers(Moose::RelationshipManagerType rm_type, bool attach_geometric_rm_final=false)
Attach the relationship managers of the given type Note: Geometric relationship managers that are sup...
Definition: MooseApp.C:3173
static InputParameters validParams()
Definition: Action.C:24
static InputParameters validParams()
const std::string & _current_task
The current action (even though we have separate instances for each action)
Definition: Action.h:162
MooseApp & _app
The MOOSE application this is associated with.
Definition: MooseBase.h:84
const std::vector< std::shared_ptr< Action > > & allActionBlocks() const
Returns a reference to all of the actions.
AddRelationshipManager(const InputParameters &params)