https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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
11#include "FEProblem.h"
12#include "DisplacedProblem.h"
13
14registerMooseAction("MooseApp", AddRelationshipManager, "attach_geometric_rm");
15registerMooseAction("MooseApp", AddRelationshipManager, "attach_geometric_rm_final");
16registerMooseAction("MooseApp", AddRelationshipManager, "attach_algebraic_rm");
17registerMooseAction("MooseApp", AddRelationshipManager, "attach_coupling_rm");
18registerMooseAction("MooseApp", AddRelationshipManager, "add_geometric_rm");
19registerMooseAction("MooseApp", AddRelationshipManager, "add_algebraic_rm");
20registerMooseAction("MooseApp", AddRelationshipManager, "add_coupling_rm");
21
27
29
30void
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}
registerMooseAction("MooseApp", AddRelationshipManager, "attach_geometric_rm")
const std::vector< std::shared_ptr< Action > > & allActionBlocks() const
Returns a reference to all of the actions.
Base class for actions.
Definition Action.h:38
static InputParameters validParams()
Definition Action.C:26
MooseApp & _app
The MOOSE application this is associated with.
Definition MooseBase.h:375
const std::string & _current_task
The current action (even though we have separate instances for each action)
Definition Action.h:172
ActionWarehouse & _awh
Reference to ActionWarehouse where we store object build by actions.
Definition Action.h:169
This Action retrieves all of the Actions from the MooseAction Warehouse and triggers the addRelations...
AddRelationshipManager(const InputParameters &params)
static InputParameters validParams()
virtual void act() override
Method to add objects to the simulation or perform other setup tasks.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
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:3204
RelationshipManagerType
Main types of Relationship Managers.