341 FunctionEntry(
"Run");
344 int maxSubSteps = 1000;
345 int dumpinterval = 1;
349 time_t nowStart = time(0);
350 char* dtChar = ctime(&nowStart);
352 gethostname(hostName, 150);
354 std::stringstream outString;
355 outString << std::endl << std::endl
356 <<
"************************************************* " << std::endl;
357 outString <<
"* Starting Stepping in Time * " << std::endl;
358 outString <<
"************************************************* " << std::endl;
359 outString <<
"* Starting Simulation at " << dtChar;
360 outString <<
"* Summary of the simulation: " << std::endl;
361 outString <<
"* " << std::endl;
362 outString <<
"* Simulation Type = ElmerFoamFSIPar " << std::endl;
363 outString <<
"* Simulation start time = " <<
simulationTime << std::endl;
367 outString <<
"* " <<std::endl;
368 outString <<
"* Hostname = " << hostName << std::endl;
369 outString <<
"* Number of processors = " << NProc() << std::endl;
370 outString <<
"************************************************* " << std::endl;
371 outString << std::endl;
372 StdOut(outString.str(),0,
true);
378 outString <<
"System timestep " << ++systemStep
380 StdOut(outString.str(),1,
true);
387 outString <<
"Transferring displacements from structures to fluids @ time("
389 StdOut(outString.str(),1,
true);
398 outString <<
"Stepping fluids to time("
400 StdOut(outString.str(),1,
true);
407 outString <<
"Transferring loads from fluids to structures @ time("
409 StdOut(outString.str(),1,
true);
419 outString <<
"Stepping structures to time("
421 StdOut(outString.str(),1,
true);
428 bool converged =
true;
431 outString <<
"Converged at time("
433 StdOut(outString.str(),1,
true);
443 if(innerCount > maxSubSteps){
444 outString <<
"Failed to converge after "
445 << maxSubSteps <<
", giving up." << std::endl;
446 StdOut(outString.str(),0,
true);
453 StdOut(outString.str(),0,
true);
457 if(!(systemStep%dumpinterval)){
462 Communicator().Barrier();
465 time_t nowEnd = time(0);
466 dtChar = ctime(&nowEnd);
467 outString << std::endl << std::endl
468 <<
"************************************************* " << std::endl;
469 outString <<
"* Finishing Stepping in Time * " << std::endl;
470 outString <<
"************************************************* " << std::endl;
471 outString <<
"* Ending simulation at " << dtChar;
472 outString <<
"* Total simulation time (s) = " << nowEnd - nowStart << std::endl;
473 outString <<
"* Summary of the simulation: " << std::endl;
474 outString <<
"* " << std::endl;
475 outString <<
"* Simulation Type = ElmerFoamFSIPar " << std::endl;
479 outString <<
"* " <<std::endl;
480 outString <<
"* Hostname = " << hostName << std::endl;
481 outString <<
"* Number of processors = " << NProc() << std::endl;
482 outString <<
"************************************************* " << std::endl;
483 outString << std::endl;
484 StdOut(outString.str(),0,
true);
double simulationTimeStep
solidagentpar * structuresAgent
int TransferDisplacementsToFluid(solidagentpar *solidAgent, fluidagentpar *fluidAgent)
virtual int FinalizeTimeStep(double time)
int TransferLoadsToStructures(fluidagentpar *fluidAgent, solidagentpar *solidAgent)
virtual int Run(double endTime)
virtual int InitializeTimeStep(double time)
virtual int Run(double time)
fluidagentpar * fluidsAgent
double simulationFinalTime