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 "SmoothTransitionFunction.h" 11 : 12 : InputParameters 13 276 : SmoothTransitionFunction::validParams() 14 : { 15 276 : InputParameters params = Function::validParams(); 16 : 17 552 : MooseEnum axis("x=0 y=1 z=2 t=3"); 18 552 : params.addRequiredParam<MooseEnum>( 19 : "axis", axis, "Coordinate axis on which the transition occurs"); 20 552 : params.addRequiredParam<FunctionName>("function1", "First function"); 21 552 : params.addRequiredParam<FunctionName>("function2", "Second function"); 22 552 : params.addRequiredParam<Real>("transition_center", "Center position of transition"); 23 552 : params.addRequiredParam<Real>("transition_width", "Width of transition"); 24 : 25 276 : return params; 26 276 : } 27 : 28 150 : SmoothTransitionFunction::SmoothTransitionFunction(const InputParameters & parameters) 29 : : Function(parameters), 30 : FunctionInterface(this), 31 : 32 150 : _component(getParam<MooseEnum>("axis")), 33 150 : _use_time(_component == 3), 34 : 35 150 : _function1(getFunction("function1")), 36 150 : _function2(getFunction("function2")), 37 : 38 300 : _x_center(getParam<Real>("transition_center")), 39 450 : _transition_width(getParam<Real>("transition_width")) 40 : { 41 150 : }