https://mooseframework.inl.gov
Loading...
Searching...
No Matches
TimeRampFunctionTest.h
Go to the documentation of this file.
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#pragma once
11
12#include "MooseObjectUnitTest.h"
13
15{
16public:
18 : MooseObjectUnitTest("ThermalHydraulicsApp"),
19
20 _initial_value(1.0),
21 _final_value(2.0),
22 _ramp_duration(6.0),
23 _initial_time(2.0),
24
25 _fn_name("tested_function")
26 {
28 }
29
30protected:
32 {
33 // tested function
34 {
35 const std::string class_name = "TimeRampFunction";
36 InputParameters params = _factory.getValidParams(class_name);
37 params.set<Real>("initial_value") = _initial_value;
38 params.set<Real>("final_value") = _final_value;
39 params.set<Real>("ramp_duration") = _ramp_duration;
40 params.set<Real>("initial_time") = _initial_time;
41 _fe_problem->addFunction(class_name, _fn_name, params);
42 }
43 }
44
45 const Real _initial_value;
46 const Real _final_value;
47 const Real _ramp_duration;
48 const Real _initial_time;
49 const FunctionName _fn_name;
50};
InputParameters getValidParams(const std::string &name) const
T & set(const std::string &name, bool quiet_mode=false)
std::shared_ptr< FEProblem > _fe_problem
const FunctionName _fn_name