Microflow 3D  v1.0
ProgramParameters.cpp
Go to the documentation of this file.
1 // ==============================================================================================
2 // Microflow 3D, http://www.microflow.pwr.edu.pl/
3 // Created by Roman Szafran on 28.04.19.
4 // Copyright (c) 2019 Wroclaw University of Science and Technology.
5 // Distributed under the Apache License, Version 2.0. You may obtain a copy of the License at
6 // http://www.apache.org/licenses/LICENSE-2.0 or see accompanying file license.txt.
7 // Redistributions of source code must retain the above copyright and license notice.
8 // ==============================================================================================
9 
10 #include "ProgramParameters.h"
11 
12 MF::Solver_CPU::ProgramParameters::ProgramParameters(const std::shared_ptr<MF::Database::ConfigData>& ConfigData_Ptr) {
13  try {
14  CaseFolder = ConfigData_Ptr->CaseFolder;
15  GeometryFolder = ConfigData_Ptr->getProgramStringParam("GeometryFolder");
16  GeometryFileName = ConfigData_Ptr->getProgramStringParam("GeometryFileName");
17  CaseParametersFile = ConfigData_Ptr->getProgramStringParam("CaseParametersFile");
18  ThreadParametersFile = ConfigData_Ptr->getProgramStringParam("ThreadParametersFile");
19  ProgramParametersFile = ConfigData_Ptr->ProgramConfigFile;
20  CheckPointFile = ConfigData_Ptr->getProgramStringParam("CheckPointFile");
21  OutputFile = ConfigData_Ptr->getProgramStringParam("OutputFile");
22  }
23  catch (const config4cpp::ConfigurationException &exception) {
24  std::cout << "[ProgramParameters::Initialize] Error of initialization program parameters from a file: ";
25  std::cout << exception.c_str() << std::endl;
26  exit(EXIT_FAILURE);
27  }
28 }
29 
30 
std::string CaseParametersFile
Case parameters file name and path (relative to case folder).
std::string GeometryFolder
Path to geometry folder.
ProgramParameters(const std::shared_ptr< MF::Database::ConfigData > &ConfigData_Ptr)
std::string CaseFolder
Path to case folder.
std::string GeometryFileName
Geometry file name and path (relative to case folder).
std::string ProgramParametersFile
Program parameters file name and path (relative to case folder).
std::string CheckPointFile
Checkpoint file name and path (relative to case folder), without file extension.
std::string ThreadParametersFile
Thread parameters file name and path (relative to case folder).
std::string OutputFile
Results (output) file name and path (relative to case folder), without file extension.