diff --git a/Applications/InSituLib/Adaptor.cpp b/Applications/InSituLib/Adaptor.cpp index 7c4eb32a8bace875e50ae10fcb8a796dbf1824be..81ddffacfc85e1a03134581a8ded9a5f35914f5a 100644 --- a/Applications/InSituLib/Adaptor.cpp +++ b/Applications/InSituLib/Adaptor.cpp @@ -71,7 +71,8 @@ void CoProcess(MeshLib::Mesh const& mesh, double const time, } if (Processor->RequestDataDescription(dataDescription.GetPointer()) != 0) { - INFO("Start InSitu process."); + INFO("Start InSitu process: timestep #%d (t=%g, last=%d)", timeStep, + time, lastTimeStep); vtkNew<MeshLib::VtkMappedMeshSource> vtkSource; vtkSource->SetMesh(&mesh); vtkSource->Update(); diff --git a/ProcessLib/Output.cpp b/ProcessLib/Output.cpp index 3036cea5566549d9f6bb5811f87f5c7af4ad703b..8e89340b73b4c0d46198696f3ecd9375053bd568 100644 --- a/ProcessLib/Output.cpp +++ b/ProcessLib/Output.cpp @@ -125,11 +125,6 @@ void Output::doOutputAlways(Process const& process, INFO("[time] Output of timestep %d took %g s.", timestep, time_output.elapsed()); - -#ifdef USE_INSITU - // TODO: get number of timesteps - InSituLib::CoProcess(process.getMesh(), t, timestep, false); -#endif } void Output::doOutput(Process const& process, @@ -140,6 +135,11 @@ void Output::doOutput(Process const& process, { if (shallDoOutput(timestep, _repeats_each_steps)) doOutputAlways(process, process_output, timestep, t, x); +#ifdef USE_INSITU + // Note: last time step may be output twice: here and in + // doOutputLastTimestep() which throws a warning. + InSituLib::CoProcess(process.getMesh(), t, timestep, false); +#endif } void Output::doOutputLastTimestep(Process const& process, @@ -150,6 +150,9 @@ void Output::doOutputLastTimestep(Process const& process, { if (!shallDoOutput(timestep, _repeats_each_steps)) doOutputAlways(process, process_output, timestep, t, x); +#ifdef USE_INSITU + InSituLib::CoProcess(process.getMesh(), t, timestep, true); +#endif } void Output::doOutputNonlinearIteration(Process const& process,