LCOV - code coverage report
Current view: top level - src/materials - ADMaterialFunctionProductMaterial.C (source / functions) Hit Total Coverage
Test: idaholab/moose thermal_hydraulics: #30301 (3b550b) with base 2ad78d Lines: 16 17 94.1 %
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 "ADMaterialFunctionProductMaterial.h"
      11             : #include "Function.h"
      12             : 
      13             : registerMooseObject("ThermalHydraulicsApp", ADMaterialFunctionProductMaterial);
      14             : 
      15             : InputParameters
      16          85 : ADMaterialFunctionProductMaterial::validParams()
      17             : {
      18          85 :   InputParameters params = Material::validParams();
      19             : 
      20         170 :   params.addRequiredParam<MaterialPropertyName>("mat_prop_product", "Product material property");
      21         170 :   params.addRequiredParam<MaterialPropertyName>("mat_prop_scale", "Scale material property");
      22         170 :   params.addRequiredParam<FunctionName>("function", "Function in product");
      23             : 
      24          85 :   params.addClassDescription("Computes the product of a material property and a function.");
      25             : 
      26          85 :   return params;
      27           0 : }
      28             : 
      29          66 : ADMaterialFunctionProductMaterial::ADMaterialFunctionProductMaterial(
      30          66 :     const InputParameters & parameters)
      31             :   : Material(parameters),
      32             : 
      33          66 :     _product(declareADProperty<Real>(getParam<MaterialPropertyName>("mat_prop_product"))),
      34         132 :     _scale(getADMaterialProperty<Real>("mat_prop_scale")),
      35         132 :     _function(getFunction("function"))
      36             : {
      37          66 : }
      38             : 
      39             : void
      40           9 : ADMaterialFunctionProductMaterial::computeQpProperties()
      41             : {
      42          18 :   _product[_qp] = _scale[_qp] * _function.value(_t, _q_point[_qp]);
      43           9 : }

Generated by: LCOV version 1.14