LCOV - code coverage report
Current view: top level - src/materials - DerivativeParsedMaterial.C (source / functions) Hit Total Coverage
Test: idaholab/moose framework: #32971 (54bef8) with base c6cf66 Lines: 15 16 93.8 %
Date: 2026-05-29 20:35:17 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 "DerivativeParsedMaterial.h"
      11             : 
      12             : registerMooseObject("MooseApp", DerivativeParsedMaterial);
      13             : registerMooseObject("MooseApp", ADDerivativeParsedMaterial);
      14             : 
      15             : template <bool is_ad>
      16             : InputParameters
      17        9492 : DerivativeParsedMaterialTempl<is_ad>::validParams()
      18             : {
      19        9492 :   InputParameters params = DerivativeParsedMaterialHelperTempl<is_ad>::validParams();
      20        9492 :   params += ParsedMaterialBase::validParams();
      21        9492 :   params.addClassDescription("Parsed Function Material with automatic derivatives.");
      22        9492 :   return params;
      23           0 : }
      24             : 
      25             : template <bool is_ad>
      26        2589 : DerivativeParsedMaterialTempl<is_ad>::DerivativeParsedMaterialTempl(
      27             :     const InputParameters & parameters)
      28             :   : ParsedMaterialBase(parameters),
      29             :     DerivativeParsedMaterialHelperTempl<is_ad>(
      30        2589 :         parameters, VariableNameMappingMode::USE_MOOSE_NAMES, _function_param)
      31             : {
      32             :   // Build function, take derivatives, optimize
      33       10338 :   functionParse(_function,
      34        2589 :                 _constant_names,
      35        2589 :                 _constant_expressions,
      36             :                 this->template getParam<std::vector<std::string>>("material_property_names"),
      37             :                 this->template getParam<std::vector<PostprocessorName>>("postprocessor_names"),
      38        2589 :                 _tol_names,
      39        2589 :                 _tol_values,
      40        2589 :                 _functor_names,
      41        2589 :                 _functor_symbols);
      42        2580 : }
      43             : 
      44             : // explicit instantiation
      45             : template class DerivativeParsedMaterialTempl<false>;
      46             : template class DerivativeParsedMaterialTempl<true>;

Generated by: LCOV version 1.14