LCOV - code coverage report
Current view: top level - src/materials - OrderParameterFunctionMaterial.C (source / functions) Hit Total Coverage
Test: idaholab/moose phase_field: #32971 (54bef8) with base c6cf66 Lines: 14 15 93.3 %
Date: 2026-05-29 20:38:39 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        2195 : OrderParameterFunctionMaterial::validParams()
      14             : {
      15        2195 :   InputParameters params = Material::validParams();
      16        4390 :   params.addCoupledVar("eta", "Order parameter variable");
      17        4390 :   params.addParam<std::string>("function_name", "f", "actual name for f(eta), i.e. 'h' or 'g'");
      18        2195 :   return params;
      19           0 : }
      20             : 
      21        1701 : OrderParameterFunctionMaterial::OrderParameterFunctionMaterial(const InputParameters & parameters)
      22             :   : DerivativeMaterialInterface<Material>(parameters),
      23        1701 :     _eta(coupledValue("eta")),
      24        1701 :     _eta_var(coupled("eta")),
      25        1701 :     _eta_name(coupledName("eta", 0)),
      26        3402 :     _function_name(getParam<std::string>("function_name")),
      27        1701 :     _prop_f(declareProperty<Real>(_function_name)),
      28        1701 :     _prop_df(declarePropertyDerivative<Real>(_function_name, _eta_name)),
      29        3402 :     _prop_d2f(declarePropertyDerivative<Real>(_function_name, _eta_name, _eta_name))
      30             : {
      31        1701 : }

Generated by: LCOV version 1.14