LCOV - code coverage report
Current view: top level - src/auxkernels - LinearizedInterfaceAux.C (source / functions) Hit Total Coverage
Test: idaholab/moose phase_field: #31405 (292dce) with base fef103 Lines: 10 11 90.9 %
Date: 2025-09-04 07:55:36 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 "LinearizedInterfaceAux.h"
      11             : 
      12             : registerMooseObject("PhaseFieldApp", LinearizedInterfaceAux);
      13             : 
      14             : InputParameters
      15         391 : LinearizedInterfaceAux::validParams()
      16             : {
      17         391 :   InputParameters params = AuxKernel::validParams();
      18         391 :   params.addClassDescription(
      19             :       "Calculates the order parameter from the linearized interface function");
      20         782 :   params.addRequiredCoupledVar("nonlinear_variable",
      21             :                                "The variable used in the linearized interface function");
      22         391 :   return params;
      23           0 : }
      24             : 
      25         204 : LinearizedInterfaceAux::LinearizedInterfaceAux(const InputParameters & parameters)
      26         204 :   : AuxKernel(parameters), _phi(coupledValue("nonlinear_variable"))
      27             : {
      28         204 : }
      29             : 
      30             : Real
      31      314469 : LinearizedInterfaceAux::computeValue()
      32             : {
      33      314469 :   return (1.0 + std::tanh(_phi[_qp] / std::sqrt(2.0))) / 2.0;
      34             : }

Generated by: LCOV version 1.14