LCOV - code coverage report
Current view: top level - src/dampers - NodalDamper.C (source / functions) Hit Total Coverage
Test: idaholab/moose framework: 2bf808 Lines: 17 18 94.4 %
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 "NodalDamper.h"
      11             : 
      12             : // MOOSE includes
      13             : #include "Assembly.h"
      14             : #include "FEProblem.h"
      15             : #include "MooseVariableFE.h"
      16             : #include "SubProblem.h"
      17             : #include "SystemBase.h"
      18             : 
      19             : #include "libmesh/quadrature.h"
      20             : 
      21             : InputParameters
      22       14364 : NodalDamper::validParams()
      23             : {
      24       14364 :   InputParameters params = Damper::validParams();
      25       14364 :   params += MaterialPropertyInterface::validParams();
      26       14364 :   params.addRequiredParam<NonlinearVariableName>(
      27             :       "variable", "The name of the variable that this damper operates on");
      28       14364 :   return params;
      29           0 : }
      30             : 
      31          59 : NodalDamper::NodalDamper(const InputParameters & parameters)
      32             :   : Damper(parameters),
      33             :     MaterialPropertyInterface(this, Moose::EMPTY_BLOCK_IDS, Moose::EMPTY_BOUNDARY_IDS),
      34          59 :     _tid(parameters.get<THREAD_ID>("_tid")),
      35          59 :     _assembly(_subproblem.assembly(_tid, _sys.number())),
      36          59 :     _coord_sys(_assembly.coordSystem()),
      37          59 :     _var(_sys.getFieldVariable<Real>(_tid, parameters.get<NonlinearVariableName>("variable"))),
      38          59 :     _current_node(_var.node()),
      39          59 :     _qp(0),
      40          59 :     _u_increment(_var.increment()),
      41         118 :     _u(_var.dofValues())
      42             : {
      43          59 : }
      44             : 
      45             : Real
      46        7440 : NodalDamper::computeDamping()
      47             : {
      48        7440 :   return computeQpDamping();
      49             : }

Generated by: LCOV version 1.14