LCOV - code coverage report
Current view: top level - src/materials - OrderParameterFunctionMaterial.C (source / functions) Hit Total Coverage
Test: idaholab/moose phase_field: #31405 (292dce) with base fef103 Lines: 14 15 93.3 %
Date: 2025-09-04 07:55:36 Functions: 2 2 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 "OrderParameterFunctionMaterial.h"
      11             : 
      12             : InputParameters
      13        3227 : OrderParameterFunctionMaterial::validParams()
      14             : {
      15        3227 :   InputParameters params = Material::validParams();
      16        6454 :   params.addCoupledVar("eta", "Order parameter variable");
      17        6454 :   params.addParam<std::string>("function_name", "f", "actual name for f(eta), i.e. 'h' or 'g'");
      18        3227 :   return params;
      19           0 : }
      20             : 
      21        2475 : OrderParameterFunctionMaterial::OrderParameterFunctionMaterial(const InputParameters & parameters)
      22             :   : DerivativeMaterialInterface<Material>(parameters),
      23        2475 :     _eta(coupledValue("eta")),
      24        2475 :     _eta_var(coupled("eta")),
      25        2475 :     _eta_name(coupledName("eta", 0)),
      26        4950 :     _function_name(getParam<std::string>("function_name")),
      27        2475 :     _prop_f(declareProperty<Real>(_function_name)),
      28        2475 :     _prop_df(declarePropertyDerivative<Real>(_function_name, _eta_name)),
      29        4950 :     _prop_d2f(declarePropertyDerivative<Real>(_function_name, _eta_name, _eta_name))
      30             : {
      31        2475 : }

Generated by: LCOV version 1.14