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 194 : CosineTransitionFunction::validParams() 16 : { 17 194 : InputParameters params = SmoothTransitionFunction::validParams(); 18 : 19 194 : params.addClassDescription( 20 : "Computes a cosine transtition of a user-specified width between two values"); 21 : 22 194 : return params; 23 0 : } 24 : 25 106 : CosineTransitionFunction::CosineTransitionFunction(const InputParameters & parameters) 26 : : SmoothTransitionFunction(parameters), 27 : 28 106 : _transition(_x_center, _transition_width) 29 : { 30 106 : } 31 : 32 : Real 33 2116 : CosineTransitionFunction::value(Real t, const Point & p) const 34 : { 35 2116 : const Real x = _use_time ? t : p(_component); 36 : 37 2116 : 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 : }