https://mooseframework.inl.gov
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 {
16 public:
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  {
27  buildObjects();
28  }
29 
30 protected:
31  void buildObjects()
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 
49  const FunctionName _fn_name;
50 };
std::shared_ptr< FEProblem > _fe_problem
T & set(const std::string &name, bool quiet_mode=false)
InputParameters getValidParams(const std::string &name) const
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const FunctionName _fn_name