ElmerFoamFSI  2.0
ElmerFoamFSI is fluid-solid interaction simulation application built up from OpenFOAM CFD and Elmer CSM coupled through the IMPACT multiphysics software integration infrastructure.
 All Classes Namespaces Files Functions Variables Typedefs Enumerator Macros Groups Pages
virtual void Test__OFModuleLoad ( ResultsType &  result)
inlinevirtual

Definition at line 337 of file ElmerFoamFSITest.H.

Referenced by TestingObject< ResultsType >::Process(), and TestingObject< ResultsType >::RunTest().

337  {
338  std::cout << "Running Test__OFModuleLoad" << std::endl;
339 
340  // load Elmer module
341  std::cout << "Loading OpenFoam Module" << std::endl;
342  COM_LOAD_MODULE_STATIC_DYNAMIC(OpenFoamFSI, "OFModule");
343  bool works = false;
344 
345  // get window handle
346  int h=COM_get_window_handle("OFModule");
347  if(h <= 0){
348  std::cout << " After loading, COM_get_window_handle(\"OFModule\") returns "
349  << h << std::endl;
350  std::cout << "ModuleLoadUnload Error: Could not get window handle."
351  << std::endl;
352  }
353  else{
354  works=true;
355  std::cout << "OpenFoam Module Loaded" << std::endl;
356  }
357  result.UpdateResult("LoadOpenFoamModule:Works",works);
358 
359  // unload Elmer Module
360  std::cout << "Unloading OpenFoam Module" << std::endl;
361  COM_UNLOAD_MODULE_STATIC_DYNAMIC(OpenFoamFSI, "OFModule");
362  works=false;
363 
364  // make sure module unloaded
365  h=COM_get_window_handle("OFModule");
366  if(h > 0){
367  std::cout << "After unloading, COM_get_window_handle(\"OFModule\") returns "
368  << h << std::endl;
369  std::cout << "ModuleLoadUnload Error: Did not properly unload module."
370  << std::endl;
371  }
372  else{
373  works=true;
374  std::cout << "OpenFoam Module Unloaded" << std::endl;
375  }
376 
377  result.UpdateResult("UnloadOpenFoamModule:Works",works);
378  return;
379  }

Here is the caller graph for this function: