本文整理汇总了C++中System::SearchActiveSeaModel方法的典型用法代码示例。如果您正苦于以下问题:C++ System::SearchActiveSeaModel方法的具体用法?C++ System::SearchActiveSeaModel怎么用?C++ System::SearchActiveSeaModel使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System
的用法示例。
在下文中一共展示了System::SearchActiveSeaModel方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ReadFiles
//######################################## ReadFiles Function #########################################################
void ReadFiles(string runPath)
{
//Reads in all the input files
FileReader fileIn; //Create file reading objects
dictBodies dictBod; //Create dictionary object for bodies.in
dictForces dictForce; //Create dictionary object for forces.in
dictControl dictCont; //Create dictionary object for control.in
dictSeaEnv dictSea; //Create dictionary object for seaenv.in
dictData dictDat(&fileIn); //Create dictionary object for data.in
dictOutputs dictOut; //Create dictionary object for outputs.in
try {
//Create pointer to System object for each of the filereader objects
fileIn.setSystem( &sysofreq);
dictBod.setSystem( &sysofreq);
dictForce.setSystem( &sysofreq);
dictCont.setSystem( &sysofreq);
dictSea.setSystem( &sysofreq);
dictDat.setSystem( &sysofreq);
dictOut.setSystem( &sysofreq);
//Set path for file reading
fileIn.setPath(runPath);
//Read input files
//Sequence of file reading is important.
//Read control file.
fileIn.setDictionary(dictCont);
fileIn.readControl(); //Must be first.
//Read sea environment file.
fileIn.setDictionary(dictSea);
fileIn.readSeaEnv();
//Read user forces
fileIn.setDictionary(dictForce);
fileIn.readForces(); //Must come before reading Bodies
//Read Bodies
fileIn.setDictionary(dictBod);
fileIn.readBodies(); //Must come after reading forces.
//Read hydrodynamic data
fileIn.setDictionary(dictDat);
fileIn.readData();
//Read in output controls
fileIn.setDictionary(dictOut);
fileIn.readOutputs();
//At the end, force system to check one last time for the active sea model.
sysofreq.SearchActiveSeaModel();
//Write output to screen.
sysofreq.logStd.Write("Hydrodynamic Input Files",3);
sysofreq.logStd.Write("-----------------------------",3);
//So far, input files only specified the location of the hydrodynamic data. Now need to actually read it.
HydroReader hydroIn; //Create hydroreader.
hydroIn.setSystem( &sysofreq);
if (fileIn.listDataFiles().size() > 0)
{
for (unsigned int i = 0; i < fileIn.listDataFiles().size(); i++)
{
//Iterate through each of the items on the list of hydro files and read them.
hydroIn.setPath(fileIn.listDataFiles(i)); //Set the path to the hydro system.
hydroIn.readHydroSys();
}
}
}
catch(const std::exception &err)
{
sysofreq.logStd.Notify();
sysofreq.logErr.Write(ID + std::string(err.what()));
}
}