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 "LinearizedInterfaceFunction.h" 11 : 12 : registerMooseObject("PhaseFieldApp", LinearizedInterfaceFunction); 13 : 14 : InputParameters 15 799 : LinearizedInterfaceFunction::validParams() 16 : { 17 799 : InputParameters params = DerivativeParsedMaterialHelper::validParams(); 18 799 : params.addClassDescription( 19 : "Defines the order parameter substitution for linearized interface phase field models"); 20 1598 : params.addRequiredCoupledVar("phi", "Concentration variable"); 21 799 : return params; 22 0 : } 23 : 24 612 : LinearizedInterfaceFunction::LinearizedInterfaceFunction(const InputParameters & parameters) 25 1224 : : DerivativeParsedMaterialHelper(parameters), _phi("phi") 26 : { 27 612 : EBFunction order_parameter; 28 : // Definition of the function for the expression builder 29 612 : order_parameter(_phi) = 1.0 / 2.0 * (1.0 + tanh(_phi / sqrt(2.0))); 30 : 31 : // Parse function for automatic differentiation 32 612 : functionParse(order_parameter); 33 612 : }