int main(int argc, char *argv[]) { #include "setRootCase.H" #include "createTime.H" #include "createMesh.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Info<< nl << "Constructing dsmcCloud " << endl; dsmcCloud dsmc("dsmc", mesh); Info<< "\nStarting time loop\n" << endl; while (runTime.loop()) { Info<< "Time = " << runTime.timeName() << nl << endl; dsmc.evolve(); dsmc.info(); runTime.write(); Info<< nl << "ExecutionTime = " << runTime.elapsedCpuTime() << " s" << " ClockTime = " << runTime.elapsedClockTime() << " s" << nl << endl; } Info<< "End\n" << endl; return(0); }
int main(int argc, char *argv[]) { #include "setRootCase.H" #include "createTime.H" #include "createMesh.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // IOdictionary dsmcInitialiseDict ( IOobject ( "dsmcInitialiseDict", mesh.time().system(), mesh, IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ); Info<< "Initialising dsmc for Time = " << runTime.timeName() << nl << endl; dsmcCloud dsmc("dsmc", mesh, dsmcInitialiseDict); label totalMolecules = dsmc.size(); if (Pstream::parRun()) { reduce(totalMolecules, sumOp<label>()); } Info<< nl << "Total number of molecules added: " << totalMolecules << nl << endl; IOstream::defaultPrecision(15); if (!mesh.write()) { FatalErrorIn(args.executable()) << "Failed writing dsmcCloud." << nl << exit(FatalError); } Info<< nl << "ClockTime = " << runTime.elapsedClockTime() << " s" << nl << endl; Info<< "End\n" << endl; return 0; }