LCOV - code coverage report
Current view: top level - src/materials - ParsedMaterial.C (source / functions) Hit Total Coverage
Test: idaholab/moose framework: #32971 (54bef8) with base c6cf66 Lines: 18 19 94.7 %
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 "ParsedMaterial.h"
      11             : 
      12             : registerMooseObject("MooseApp", ParsedMaterial);
      13             : registerMooseObject("MooseApp", ADParsedMaterial);
      14             : 
      15             : template <bool is_ad>
      16             : InputParameters
      17        8261 : ParsedMaterialTempl<is_ad>::validParams()
      18             : {
      19        8261 :   InputParameters params = ParsedMaterialHelper<is_ad>::validParams();
      20        8261 :   params += ParsedMaterialBase::validParams();
      21        8261 :   params.addClassDescription("Parsed expression Material.");
      22        8261 :   return params;
      23           0 : }
      24             : 
      25             : template <bool is_ad>
      26        1638 : ParsedMaterialTempl<is_ad>::ParsedMaterialTempl(const InputParameters & parameters)
      27             :   : ParsedMaterialBase(parameters),
      28             :     ParsedMaterialHelper<is_ad>(
      29        1638 :         parameters, VariableNameMappingMode::USE_MOOSE_NAMES, _function_param)
      30             : {
      31             : 
      32             :   // get all reserved names
      33        1638 :   std::set<std::string> reserved_names;
      34        1638 :   ParsedMaterialHelper<is_ad>::insertReservedNames(reserved_names);
      35             : 
      36             :   // validate, reserved names are not used
      37        1638 :   ParsedMaterialBase::validateVectorNames(reserved_names);
      38             : 
      39             :   // Build function and optimize
      40        6552 :   functionParse(_function,
      41        1638 :                 _constant_names,
      42        1638 :                 _constant_expressions,
      43             :                 this->template getParam<std::vector<std::string>>("material_property_names"),
      44             :                 this->template getParam<std::vector<PostprocessorName>>("postprocessor_names"),
      45        1638 :                 _tol_names,
      46        1638 :                 _tol_values,
      47        1638 :                 _functor_names,
      48        1638 :                 _functor_symbols);
      49        1638 : }
      50             : 
      51             : // explicit instantiation
      52             : template class ParsedMaterialTempl<false>;
      53             : template class ParsedMaterialTempl<true>;

Generated by: LCOV version 1.14