LCOV - code coverage report
Current view: top level - src/postprocessors - RichardsExcavFlow.C (source / functions) Hit Total Coverage
Test: idaholab/moose richards: #31405 (292dce) with base fef103 Lines: 6 15 40.0 %
Date: 2025-09-04 07:56:35 Functions: 1 3 33.3 %
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 "RichardsExcavFlow.h"
      11             : #include "Function.h"
      12             : #include "Material.h"
      13             : 
      14             : registerMooseObject("RichardsApp", RichardsExcavFlow);
      15             : 
      16             : InputParameters
      17           1 : RichardsExcavFlow::validParams()
      18             : {
      19           1 :   InputParameters params = SideIntegralVariablePostprocessor::validParams();
      20           2 :   params.addRequiredParam<FunctionName>(
      21             :       "excav_geom_function",
      22             :       "The function describing the excavation geometry (type RichardsExcavGeom)");
      23           2 :   params.addRequiredParam<UserObjectName>(
      24             :       "richardsVarNames_UO", "The UserObject that holds the list of Richards variable names.");
      25           1 :   params.addClassDescription("Records total flow INTO an excavation (if quantity is positive then "
      26             :                              "flow has occured from rock into excavation void)");
      27           1 :   return params;
      28           0 : }
      29             : 
      30           0 : RichardsExcavFlow::RichardsExcavFlow(const InputParameters & parameters)
      31             :   : SideIntegralVariablePostprocessor(parameters),
      32             : 
      33           0 :     _richards_name_UO(getUserObject<RichardsVarNames>("richardsVarNames_UO")),
      34           0 :     _pvar(_richards_name_UO.richards_var_num(coupled("variable"))),
      35             : 
      36           0 :     _flux(getMaterialProperty<std::vector<RealVectorValue>>("flux")),
      37             : 
      38           0 :     _func(getFunction("excav_geom_function"))
      39             : {
      40           0 : }
      41             : 
      42             : Real
      43           0 : RichardsExcavFlow::computeQpIntegral()
      44             : {
      45           0 :   return -_func.value(_t, _q_point[_qp]) * _normals[_qp] * _flux[_qp][_pvar] * _dt;
      46             : }

Generated by: LCOV version 1.14