LCOV - code coverage report
Current view: top level - src/auxkernels - VolumeAux.C (source / functions) Hit Total Coverage
Test: idaholab/moose framework: 2bf808 Lines: 13 14 92.9 %
Date: 2025-07-17 01:28:37 Functions: 4 4 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 "VolumeAux.h"
      11             : 
      12             : registerMooseObject("MooseApp", VolumeAux);
      13             : 
      14             : InputParameters
      15       14343 : VolumeAux::validParams()
      16             : {
      17       14343 :   InputParameters params = AuxKernel::validParams();
      18       14343 :   params.addClassDescription("Auxiliary Kernel that samples volumes.");
      19       14343 :   return params;
      20           0 : }
      21             : 
      22          42 : VolumeAux::VolumeAux(const InputParameters & parameters) : AuxKernel(parameters)
      23             : {
      24          42 :   if (mooseVariableBase()->feType() != libMesh::FEType(CONSTANT, MONOMIAL))
      25           4 :     paramError("variable", "Must be of type CONSTANT MONOMIAL");
      26          38 : }
      27             : 
      28             : Real
      29         320 : VolumeAux::computeValue()
      30             : {
      31         320 :   return _bnd ? _current_side_volume : _current_elem_volume;
      32             : }
      33             : 
      34             : void
      35         320 : VolumeAux::compute()
      36             : {
      37         320 :   _var.setDofValue(computeValue(), 0);
      38         320 : }

Generated by: LCOV version 1.14