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
SolverModuleDriverParallel.H
Go to the documentation of this file.
1 #ifndef __SOLVER_MODULE_DRIVER_H__
2 #define __SOLVER_MODULE_DRIVER_H__
3 
4 #include "SolverAgent.H"
5 #include "InterfaceLayer.H"
6 
7 namespace COM {
8  class SolverModuleDriver : public SolverUtils::FEM::SolverAgent, public COM_Object
9  {
10  std::stringstream ss;
12  int runs;
13  int color;
14  MPI_Comm Comm;
15  SolverAgent myAgent;
17 
18  public:
19  // member data
20  int myRank;
21  int myPaneId;
22  std::vector<double> tNext;
23  double* Disp; // displacements
24  int nDisp;
25  char locDisp;
26  int typeDisp;
27  double* Coord;
28  int nNodes;
29  int* Conn;
30  int nConn;
31  double* Loads; // loads
32  int nLoads; // number of components
33  char locLoads; // location on mesh
34  int typeLoads; // COM type
35  double* Press; // pressures
36  int nPress;
37  char locPress;
38  int typePress;
39  int nElem;
41  std::ofstream outfile;
42 
43  // member functions
44  SolverModuleDriver(): myAgentIsInit(false), isFSI(false), changeLoads(false), Disp(NULL), nDisp(0),
45  Loads(NULL), nLoads(0), Press(NULL), nPress(0), Coord(NULL), Conn(NULL)
46  {}
47  virtual ~SolverModuleDriver(){};
48  void usage(char *exec);
49  bool isStreamer(){return(myRank==0);}
50  int init(int argc, char *argv[]);
51  int run();
52  int updateSolution();
53  int finalize();
54  int getColor(){return color;}
55  void setColor(int colorValue){color = colorValue;}
56  void setRank(int rankValue){myRank = rankValue;}
57  void setComm(MPI_Comm newComm){Comm = newComm;}
58  int vtkDump(double timeMark);
59  bool isFSISim(){return isFSI;}
60  bool isChangeLoad(){return changeLoads;}
61 
62  };
63 };
64 
65 #endif
int init(int argc, char *argv[])
void setComm(MPI_Comm newComm)