326 std::cout <<
"Running Test__ModuleFunctionInitialize" << std::endl;
329 std::cout <<
"Before loading OFModule" << std::endl;
330 COM_LOAD_MODULE_STATIC_DYNAMIC(OpenFoamFSI,
"OFModule");
331 std::cout <<
"After loading OFModule" << std::endl;
335 int initHandle = COM_get_function_handle(
"OFModule.InitFoam");
339 std::cout <<
"ModuleFunctionInitialize Error: Could not get function handle."
342 result.UpdateResult(
"InitFunction:Exists",works);
347 std::string suffix =
"/share/Testing/test_data/HronTurekFsi";
349 std::string testDir = IRAD::Sys::CWD() +
"/UnitTestDataHTFsi";
351 std::string fluidDir = testDir +
"/fluid";
352 std::string OrgDir = IRAD::Sys::CWD();
353 IntDir = IRAD::Sys::ChDir(fluidDir);
361 dummy2[0] =
const_cast<char *
>(std::string(
"functionInit").c_str());
363 COM_call_function(initHandle, &dummy1, &dummy2, &verb);
366 int* initStatus=NULL;
367 int status = COM_get_status(
"OFModule.initStatus",101);
369 std::cout <<
"ModuleFunctionInitialize Error: initStatus not a valid DataItem."
370 <<
"status = " << status << std::endl;
374 COM_get_array(
"OFModule.initStatus", 101, &initStatus);
380 std::cout <<
"ModuleFunctionInitialize Error: initStatus not set to zero by InitFoam."
383 result.UpdateResult(
"InitFunction:Runs",works);
386 IntDir = IRAD::Sys::ChDir(OrgDir);
387 COM_UNLOAD_MODULE_STATIC_DYNAMIC(OpenFoamFSI,
"OFModule");
virtual int GetInputData(std::string sourceDir, std::string destDir)
Function to copy input data from source testing directory for use in unit tests.
std::string SourceDirPath
The string for the testing source directory.