LCOV - code coverage report
Current view: top level - src/relationshipmanagers - GhostEverything.C (source / functions) Hit Total Coverage
Test: idaholab/moose framework: 2bf808 Lines: 16 19 84.2 %
Date: 2025-07-17 01:28:37 Functions: 6 7 85.7 %
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             : // App includes
      11             : #include "GhostEverything.h"
      12             : #include "Executioner.h"
      13             : #include "FEProblemBase.h"
      14             : #include "MooseApp.h"
      15             : 
      16             : // libMesh includes
      17             : #include "libmesh/elem.h"
      18             : #include "libmesh/mesh_base.h"
      19             : #include "libmesh/boundary_info.h"
      20             : 
      21             : registerMooseObject("MooseApp", GhostEverything);
      22             : 
      23             : using namespace libMesh;
      24             : 
      25             : InputParameters
      26       14441 : GhostEverything::validParams()
      27             : {
      28       14441 :   InputParameters params = RelationshipManager::validParams();
      29       14441 :   params.set<bool>("attach_geometric_early") = false;
      30       14441 :   return params;
      31           0 : }
      32             : 
      33          66 : GhostEverything::GhostEverything(const InputParameters & params) : RelationshipManager(params) {}
      34             : 
      35          44 : GhostEverything::GhostEverything(const GhostEverything & other) : RelationshipManager(other) {}
      36             : 
      37             : std::string
      38           0 : GhostEverything::getInfo() const
      39             : {
      40           0 :   return "GhostEverything";
      41             : }
      42             : 
      43             : void
      44          44 : GhostEverything::operator()(const MeshBase::const_element_iterator & range_begin,
      45             :                             const MeshBase::const_element_iterator & range_end,
      46             :                             const processor_id_type p,
      47             :                             map_type & coupled_elements)
      48             : {
      49          44 :   if (std::distance(range_begin, range_end) == 0)
      50           4 :     return;
      51             : 
      52             :   static const CouplingMatrix * const null_mat = nullptr;
      53             : 
      54        1640 :   for (const Elem * const elem : _mesh->active_element_ptr_range())
      55         800 :     if (elem->processor_id() != p)
      56         440 :       coupled_elements.emplace(elem, null_mat);
      57             : }
      58             : 
      59             : bool
      60         146 : GhostEverything::operator>=(const RelationshipManager & other) const
      61             : {
      62         146 :   return baseGreaterEqual(other);
      63             : }
      64             : 
      65             : std::unique_ptr<GhostingFunctor>
      66          44 : GhostEverything::clone() const
      67             : {
      68          44 :   return _app.getFactory().copyConstruct(*this);
      69             : }

Generated by: LCOV version 1.14