LCOV - code coverage report
Current view: top level - src/base - MaxVarNDofsPerElem.C (source / functions) Hit Total Coverage
Test: idaholab/moose framework: 2bf808 Lines: 17 17 100.0 %
Date: 2025-07-17 01:28:37 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 "MaxVarNDofsPerElem.h"
      11             : #include "SolverSystem.h"
      12             : #include "Problem.h"
      13             : #include "Damper.h"
      14             : 
      15             : // libmesh includes
      16             : #include "libmesh/threads.h"
      17             : 
      18       55737 : MaxVarNDofsPerElem::MaxVarNDofsPerElem(FEProblemBase & feproblem, SolverSystem & sys)
      19             :   : ThreadedElementLoop<ConstElemRange>(feproblem),
      20       55737 :     _system(sys),
      21       55737 :     _max(0),
      22       55737 :     _dof_map(_system.dofMap())
      23             : {
      24       55737 : }
      25             : 
      26             : // Splitting Constructor
      27        4618 : MaxVarNDofsPerElem::MaxVarNDofsPerElem(MaxVarNDofsPerElem & x, Threads::split split)
      28        4618 :   : ThreadedElementLoop<ConstElemRange>(x, split), _system(x._system), _max(0), _dof_map(x._dof_map)
      29             : {
      30        4618 : }
      31             : 
      32       64973 : MaxVarNDofsPerElem::~MaxVarNDofsPerElem() {}
      33             : 
      34             : void
      35    10161983 : MaxVarNDofsPerElem::onElement(const Elem * elem)
      36             : {
      37    20951251 :   for (unsigned int var = 0; var < _system.nVariables(); var++)
      38             :   {
      39    10789268 :     _dof_map.dof_indices(elem, _dof_indices, var);
      40             : 
      41    10789268 :     _max = std::max(_max, _dof_indices.size());
      42             :   }
      43    10161983 : }
      44             : 
      45             : void
      46        4618 : MaxVarNDofsPerElem::join(const MaxVarNDofsPerElem & y)
      47             : {
      48        4618 :   _max = std::max(_max, y._max);
      49        4618 : }

Generated by: LCOV version 1.14