Line data Source code
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 : 22 : InputParameters 23 66787 : AddRelationshipManager::validParams() 24 : { 25 66787 : return Action::validParams(); 26 : } 27 : 28 66787 : AddRelationshipManager::AddRelationshipManager(const InputParameters & params) : Action(params) {} 29 : 30 : void 31 435639 : AddRelationshipManager::act() 32 : { 33 : Moose::RelationshipManagerType rm_type; 34 738739 : if (_current_task == "attach_geometric_rm" || _current_task == "add_geometric_rm" || 35 303100 : _current_task == "attach_geometric_rm_final") 36 193159 : rm_type = Moose::RelationshipManagerType::GEOMETRIC; 37 242480 : else if (_current_task == "attach_algebraic_rm" || _current_task == "add_algebraic_rm") 38 121240 : rm_type = Moose::RelationshipManagerType::ALGEBRAIC; 39 : else 40 121240 : rm_type = Moose::RelationshipManagerType::COUPLING; 41 : 42 743955 : if (_current_task == "add_geometric_rm" || _current_task == "add_algebraic_rm" || 43 308316 : _current_task == "add_coupling_rm") 44 : { 45 187943 : const auto & all_action_ptrs = _awh.allActionBlocks(); 46 9397906 : for (const auto & action_ptr : all_action_ptrs) 47 9209967 : action_ptr->addRelationshipManagers(rm_type); 48 : } 49 : // Inform MooseApp that is is the final chance to attach geometric RMs 50 247696 : else if (_current_task == "attach_geometric_rm_final") 51 60620 : _app.attachRelationshipManagers(rm_type, true); 52 : else 53 187076 : _app.attachRelationshipManagers(rm_type); 54 435635 : }