LCOV - code coverage report
Current view: top level - src/actions - AddRelationshipManager.C (source / functions) Hit Total Coverage
Test: idaholab/moose framework: 2bf808 Lines: 19 19 100.0 %
Date: 2025-07-17 01:28:37 Functions: 3 3 100.0 %
Legend: Lines: hit not hit

          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       61934 : AddRelationshipManager::validParams()
      24             : {
      25       61934 :   return Action::validParams();
      26             : }
      27             : 
      28       61934 : AddRelationshipManager::AddRelationshipManager(const InputParameters & params) : Action(params) {}
      29             : 
      30             : void
      31      403353 : AddRelationshipManager::act()
      32             : {
      33             :   Moose::RelationshipManagerType rm_type;
      34      683873 :   if (_current_task == "attach_geometric_rm" || _current_task == "add_geometric_rm" ||
      35      280520 :       _current_task == "attach_geometric_rm_final")
      36      178937 :     rm_type = Moose::RelationshipManagerType::GEOMETRIC;
      37      224416 :   else if (_current_task == "attach_algebraic_rm" || _current_task == "add_algebraic_rm")
      38      112208 :     rm_type = Moose::RelationshipManagerType::ALGEBRAIC;
      39             :   else
      40      112208 :     rm_type = Moose::RelationshipManagerType::COUPLING;
      41             : 
      42      688752 :   if (_current_task == "add_geometric_rm" || _current_task == "add_algebraic_rm" ||
      43      285399 :       _current_task == "add_coupling_rm")
      44             :   {
      45      174058 :     const auto & all_action_ptrs = _awh.allActionBlocks();
      46     8691831 :     for (const auto & action_ptr : all_action_ptrs)
      47     8517777 :       action_ptr->addRelationshipManagers(rm_type);
      48             :   }
      49             :   // Inform MooseApp that is is the final chance to attach geometric RMs
      50      229295 :   else if (_current_task == "attach_geometric_rm_final")
      51       56104 :     _app.attachRelationshipManagers(rm_type, true);
      52             :   else
      53      173191 :     _app.attachRelationshipManagers(rm_type);
      54      403349 : }

Generated by: LCOV version 1.14