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 "CosineTransitionFunction.h" 11 : 12 : registerMooseObject("ThermalHydraulicsApp", CosineTransitionFunction); 13 : 14 : InputParameters 15 38 : CosineTransitionFunction::validParams() 16 : { 17 38 : InputParameters params = SmoothTransitionFunction::validParams(); 18 : 19 38 : params.addClassDescription( 20 : "Computes a cosine transtition of a user-specified width between two values"); 21 : 22 38 : return params; 23 0 : } 24 : 25 20 : CosineTransitionFunction::CosineTransitionFunction(const InputParameters & parameters) 26 : : SmoothTransitionFunction(parameters), 27 : 28 20 : _transition(_x_center, _transition_width) 29 : { 30 20 : } 31 : 32 : Real 33 1300 : CosineTransitionFunction::value(Real t, const Point & p) const 34 : { 35 1300 : const Real x = _use_time ? t : p(_component); 36 : 37 1300 : return _transition.value(x, _function1.value(t, p), _function2.value(t, p)); 38 : } 39 : 40 : RealVectorValue 41 0 : CosineTransitionFunction::gradient(Real /*t*/, const Point & /*p*/) const 42 : { 43 0 : mooseError(name(), ": ", __PRETTY_FUNCTION__, " is not implemented."); 44 : }