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__ElmerModuleLoad ( ResultsType &  result)
inlinevirtual

Definition at line 291 of file ElmerFoamFSITest.H.

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

291  {
292  std::cout << "Running Test__ElmerModuleLoad" << std::endl;
293 
294  // load Elmer module
295  std::cout << "Loading Elmer Module" << std::endl;
296  COM_LOAD_MODULE_STATIC_DYNAMIC(ElmerCSC, "ElmerModule");
297  bool works = false;
298 
299  // get window handle
300  int h=COM_get_window_handle("ElmerModule");
301  if(h <= 0){
302  std::cout << " After loading, COM_get_window_handle(\"ElmerModule\") returns "
303  << h << std::endl;
304  std::cout << "ModuleLoadUnload Error: Could not get window handle."
305  << std::endl;
306  }
307  else{
308  works=true;
309  std::cout << "Elmer Module Loaded" << std::endl;
310  }
311  result.UpdateResult("LoadElmerModule:Works",works);
312 
313  // unload Elmer Module
314  std::cout << "Unloading Elmer Module" << std::endl;
315  COM_UNLOAD_MODULE_STATIC_DYNAMIC(ElmerCSC, "ElmerModule");
316  works=false;
317 
318  // make sure module unloaded
319  h=COM_get_window_handle("ElmerModule");
320  if(h > 0){
321  std::cout << "After unloading, COM_get_window_handle(\"ElmerModule\") returns "
322  << h << std::endl;
323  std::cout << "ModuleLoadUnload Error: Did not properly unload module."
324  << std::endl;
325  }
326  else{
327  works=true;
328  std::cout << "Elmer Module Unloaded" << std::endl;
329  }
330 
331  result.UpdateResult("UnloadElmerModule:Works",works);
332 
333  return;
334  }

Here is the caller graph for this function: