This function implements the main function executed by the program.
37 std::ostringstream outString;
38 IRAD::Util::Parameters userParameters;
39 std::ifstream paramFileIn;
41 paramFileIn >> userParameters;
42 outString <<
"User Parameters: " << std::endl
43 << userParameters << std::endl;
44 StdOut(outString.str(), 1,
true);
49 std::string fluidSolverName(userParameters.GetValue(
"FluidSolver"));
50 std::string solidSolverName(userParameters.GetValue(
"SolidSolver"));
51 std::string transferServiceName(userParameters.GetValue(
"TransferService"));
52 std::string runMode(userParameters.GetValue(
"RunMode"));
55 double time_final = 0;
56 time_final = userParameters.GetValue<
double>(
"FinalTime");
63 timestep = userParameters.GetValue<
double>(
"TimeStep");
69 if(fluidSolverName.empty()){
70 outString <<
"Failed to specify FluidSolver parameter.\n";
71 ErrOut(outString.str());
75 if(solidSolverName.empty()){
76 outString <<
"Failed to specify SolidSolver parameter.\n";
77 ErrOut(outString.str());
82 FunctionEntry(
"LoadModules");
83 COM_load_module(fluidSolverName.c_str(),
"FluidsComponentInterface");
84 COM_load_module(solidSolverName.c_str(),
"StructuresComponentInterface");
85 COM_load_module(
"SurfUtil",
"SurfUtil");
86 COM_load_module(
"Simpal",
"Simpal");
87 FunctionExit(
"LoadModules");
89 std::cout <<
"line " << __LINE__ << std::endl;
91 std::cout <<
"line " << __LINE__ << std::endl;
92 fsiCoupler.SetRunMode(runMode);
95 std::vector<std::string> componentInterfaceNames;
96 componentInterfaceNames.push_back(
"FluidsComponentInterface");
97 componentInterfaceNames.push_back(
"StructuresComponentInterface");
98 componentInterfaceNames.push_back(
"TransferInterface");
99 componentInterfaceNames.push_back(
"SurfUtil");
100 componentInterfaceNames.push_back(
"Simpal");
102 FunctionEntry(
"coupler.Init");
103 fsiCoupler.Initialize(componentInterfaceNames, time_final, timestep);
104 FunctionExit(
"coupler.Init");
106 FunctionEntry(
"coupler.Run");
108 FunctionExit(
"coupler.Run");
110 FunctionEntry(
"coupler.Finalize");
111 fsiCoupler.Finalize();
112 FunctionExit(
"coupler.Finalize");
115 COM_unload_module(solidSolverName.c_str(),
"StructuresComponentInterface");
117 outString <<
"Before Running FunctionExit" << std::endl;
118 StdOut(outString.str(),2,
true);
123 outString <<
"After Running FunctionExit" << std::endl;
124 StdOut(outString.str(),2,
true);
std::string input_name
Name of input file.
int verblevel
Verbosity level.