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
IcoFoamModuleDriver.C
Go to the documentation of this file.
1 #include "com.h"
10 #include "com_devel.hpp"
11 #include <iostream>
12 #include <cstring>
13 #include <cstdlib>
14 
15 COM_EXTERN_MODULE( IcoFoamModule);
16 
17 using namespace std;
18 
19 int main(int argc, char *argv[]){
20  COM_init( &argc, &argv);
21 
22  std::cout << "After COM_init" << std::endl;
23 
24  COM_LOAD_MODULE_STATIC_DYNAMIC( IcoFoamModule, "Window1");
25 
27  int icoFoamModuleFunction_handle = COM_get_function_handle("Window1.IcoFoamModuleFunction");
28  bool func = (icoFoamModuleFunction_handle > 0);
29  std::cout << "func = " << func << std::endl;
30  if(func)
31  COM_call_function(icoFoamModuleFunction_handle,&argc,argv);
32 
33  COM_UNLOAD_MODULE_STATIC_DYNAMIC( IcoFoamModule, "Window1");
34 
35  COM_finalize();
36  std::cout << "After COM_finalize" << std::endl;
37 
38 }
COM_EXTERN_MODULE(OpenFoamFSI)
#define main
Definition: icoFoamModule.C:2