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

Definition at line 227 of file OpenFoamModuleDriverTest.H.

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

227  {
228  std::cout << "Running Test__ModuleLoad" << std::endl;
229 
230  //load OpenFoam module
231  COM_LOAD_MODULE_STATIC_DYNAMIC(OpenFoamFSI, "OFModule");
232  bool works = false;
233 
234  // Get Window handle
235  int h=COM_get_window_handle("OFModule");
236  if(h <= 0){
237  std::cout << " After loading, COM_get_window_handle(\"OFModule\") returns "
238  << h << std::endl;
239  std::cout << "ModuleLoadUnload Error: Could not get window handle."
240  << std::endl;
241  }
242  else
243  works=true;
244 
245  result.UpdateResult("LoadSolverModule:Works",works);
246  if (!works)
247  return;
248 
249  //Unload OpenFoam module
250  COM_UNLOAD_MODULE_STATIC_DYNAMIC(OpenFoamFSI, "OFModule");
251  works=false;
252 
253  //Make sure module unloaded
254  h=COM_get_window_handle("OFModule");
255  if(h > 0){
256  std::cout << "After unloading, COM_get_window_handle(\"OFModule\") returns "
257  << h << std::endl;
258  std::cout << "ModuleLoadUnload Error: Did not properly unload module."
259  << std::endl;
260  }
261  else
262  works=true;
263 
264  result.UpdateResult("UnloadSolverModule:Works",works);
265  return;
266 
267  }

Here is the caller graph for this function: