www.mooseframework.org
AddRelationshipManager.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
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_algebraic_rm");
16 registerMooseAction("MooseApp", AddRelationshipManager, "attach_coupling_rm");
17 
19 
22 {
23  return Action::validParams();
24 }
25 
27 
28 void
30 {
32  if (_current_task == "attach_geometric_rm")
34  else if (_current_task == "attach_algebraic_rm")
36  else
38 
39  const auto & all_action_ptrs = _awh.allActionBlocks();
40  for (const auto & action_ptr : all_action_ptrs)
41  action_ptr->addRelationshipManagers(rm_type);
42 
44 }
Action::_app
MooseApp & _app
The MOOSE application this is associated with.
Definition: Action.h:213
FEProblem.h
defineLegacyParams
defineLegacyParams(AddRelationshipManager)
Action::_current_task
const std::string & _current_task
The current action (even though we have seperate instances for each action)
Definition: Action.h:240
Moose::RelationshipManagerType::GEOMETRIC
registerMooseAction
registerMooseAction("MooseApp", AddRelationshipManager, "attach_geometric_rm")
Action
Base class for actions.
Definition: Action.h:39
Moose::RelationshipManagerType::ALGEBRAIC
InputParameters
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
Definition: InputParameters.h:53
AddRelationshipManager::AddRelationshipManager
AddRelationshipManager(InputParameters params)
Definition: AddRelationshipManager.C:26
Moose::RelationshipManagerType
RelationshipManagerType
Main types of Relationship Managers.
Definition: MooseTypes.h:852
AddRelationshipManager.h
AddRelationshipManager::validParams
static InputParameters validParams()
Definition: AddRelationshipManager.C:21
AddRelationshipManager::act
virtual void act() override
Method to add objects to the simulation or perform other setup tasks.
Definition: AddRelationshipManager.C:29
DisplacedProblem.h
ActionWarehouse::allActionBlocks
const std::vector< std::shared_ptr< Action > > & allActionBlocks() const
Returns a reference to all of the actions.
Definition: ActionWarehouse.C:182
Action::validParams
static InputParameters validParams()
Definition: Action.C:23
Action::_awh
ActionWarehouse & _awh
Reference to ActionWarehouse where we store object build by actions.
Definition: Action.h:237
AddRelationshipManager
This Action retrieves all of the Actions from the MooseAction Warehouse and triggers the addRelations...
Definition: AddRelationshipManager.h:24
Moose::RelationshipManagerType::COUPLING
MooseApp::attachRelationshipManagers
void attachRelationshipManagers(Moose::RelationshipManagerType rm_type)
Attach the relationship managers of the given type Note: Geometric relationship managers that are sup...
Definition: MooseApp.C:1900