LCOV - code coverage report
Current view: top level - src/ics - VariableFunctionProductIC.C (source / functions) Hit Total Coverage
Test: idaholab/moose thermal_hydraulics: #30301 (3b550b) with base 2ad78d Lines: 11 12 91.7 %
Date: 2025-07-30 13:02:48 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 "VariableFunctionProductIC.h"
      11             : #include "Function.h"
      12             : 
      13             : registerMooseObject("ThermalHydraulicsApp", VariableFunctionProductIC);
      14             : 
      15             : InputParameters
      16        8777 : VariableFunctionProductIC::validParams()
      17             : {
      18        8777 :   InputParameters params = InitialCondition::validParams();
      19       17554 :   params.addRequiredCoupledVar("var", "Coupled variable");
      20       17554 :   params.addRequiredParam<FunctionName>("fn", "User function");
      21        8777 :   params.addClassDescription(
      22             :       "Sets the initial condition as the product of a variable and a function");
      23        8777 :   return params;
      24           0 : }
      25             : 
      26        4791 : VariableFunctionProductIC::VariableFunctionProductIC(const InputParameters & parameters)
      27        4791 :   : InitialCondition(parameters), _var(coupledValue("var")), _fn(getFunction("fn"))
      28             : {
      29        4791 : }
      30             : 
      31             : Real
      32       62665 : VariableFunctionProductIC::value(const Point & p)
      33             : {
      34       62665 :   return _var[_qp] * _fn.value(_t, p);
      35             : }

Generated by: LCOV version 1.14