LCOV - code coverage report
Current view: top level - src/base - MaxVarNDofsPerNode.C (source / functions) Hit Total Coverage
Test: idaholab/moose framework: 419b9d Lines: 19 19 100.0 %
Date: 2025-08-08 20:01:16 Functions: 6 6 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 "MaxVarNDofsPerNode.h"
      11             : #include "SolverSystem.h"
      12             : #include "Problem.h"
      13             : #include "Damper.h"
      14             : 
      15             : // libmesh includes
      16             : #include "libmesh/threads.h"
      17             : 
      18       60282 : MaxVarNDofsPerNode::MaxVarNDofsPerNode(FEProblemBase & feproblem, SolverSystem & sys)
      19             :   : ThreadedNodeLoop<ConstNodeRange, ConstNodeRange::const_iterator>(feproblem),
      20       60282 :     _system(sys),
      21       60282 :     _max(0),
      22       60282 :     _dof_map(_system.dofMap())
      23             : {
      24       60282 : }
      25             : 
      26             : // Splitting Constructor
      27        5247 : MaxVarNDofsPerNode::MaxVarNDofsPerNode(MaxVarNDofsPerNode & x, Threads::split split)
      28             :   : ThreadedNodeLoop<ConstNodeRange, ConstNodeRange::const_iterator>(x, split),
      29        5247 :     _system(x._system),
      30        5247 :     _max(0),
      31        5247 :     _dof_map(x._dof_map)
      32             : {
      33        5247 : }
      34             : 
      35       70776 : MaxVarNDofsPerNode::~MaxVarNDofsPerNode() {}
      36             : 
      37             : void
      38    14381429 : MaxVarNDofsPerNode::onNode(ConstNodeRange::const_iterator & node_it)
      39             : {
      40    30682442 :   for (unsigned int var = 0; var < _system.nVariables(); var++)
      41             :   {
      42    16301013 :     _dof_map.dof_indices(*node_it, _dof_indices, var);
      43             : 
      44    16301013 :     _max = std::max(_max, _dof_indices.size());
      45             :   }
      46    14381429 : }
      47             : 
      48             : void
      49        5247 : MaxVarNDofsPerNode::join(const MaxVarNDofsPerNode & y)
      50             : {
      51        5247 :   _max = std::max(_max, y._max);
      52        5247 : }

Generated by: LCOV version 1.14