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
int run ( )

Get the handle for the run function and call it

Definition at line 167 of file SolverModuleDriverParallel.C.

References SolverModuleDriver::runs, SolverModuleDriver::tNext, and SolverModuleDriver::vtkDump().

Referenced by COM::parallelProgram().

167  {
168  //If we want to prescribe loads here's where we do it
169 
170  /*
171  // set FSI loads for the structures solver
172  std::cout << "isFSI = " << isFSI << std::endl;
173  if(isFSI && changeLoads){
174  std::cout << "Rank #" << myRank
175  << ", Applying loads ... " << std::endl;
176  COM_get_array("ELMModule.Loads", myPaneId, &Loads);
177  if(Loads){
178  // Get the FSI load size from the structures solver
179  COM_get_size("ELMModule.Loads", myPaneId, &nLoads);
180  std::cout << "Load size = " << nLoads << std::endl;
181  std::cout << "SoverModuleDriver:run: Checking loads" << std::endl;
182  for(int i=0; i < nLoads; i++){
183  for(int j=0; j < 3; j++){
184  Loads[i*3 + j] = double(i*3 + j);
185  std::cout << Loads[i*3+j] << " ";
186  }
187  std::cout << std::endl;
188  }
189  }
190  }
191  std::cout << "Rank #" << myRank
192  << ", Finished applying loads." << std::endl;
193  */
194 
196  int run_handle = COM_get_function_handle("ELMModule.Run");
197  bool run_func = (run_handle > 0);
198  runs = 0;
199  if(run_func){
200  int timestep = 0;
201  for(int i=0; i < tNext.size(); i++){
202  // call run function
203  std::cout << "SoverModuleDriver:run: Calling run function from driver" << std::endl;
204  COM_call_function(run_handle,&runs,&tNext[i]);
205  // dump solution to vtk
206  vtkDump(tNext[i]);
207  // update time
208  timestep++;
209  }
210  }
211  return 0;
212  }

Here is the call graph for this function:

Here is the caller graph for this function: