diff --git a/src/sand-wedge.cc b/src/sand-wedge.cc index c8a73172eb948dbcb0cbe64f4829b2b011b616f1..b0a41e8df3f37dd0945919724e2de9bef0cbed20 100644 --- a/src/sand-wedge.cc +++ b/src/sand-wedge.cc @@ -28,6 +28,7 @@ #include <exception> #include <fstream> #include <iostream> +#include <iomanip> #include <dune/common/bitsetvector.hh> #include <dune/common/exceptions.hh> @@ -300,6 +301,12 @@ int main(int argc, char *argv[]) { functions.get("velocityDirichletCondition"), &neumannFunction = functions.get("neumannCondition"); + std::fstream timeStepWriter("timeSteps", std::fstream::out); + timeStepWriter << std::fixed << std::setprecision(10); + auto const reportTimeStep = [&](double _relativeTime, double _relativeTau) { + timeStepWriter << _relativeTime << " " << _relativeTau << std::endl; + }; + using MyAssembler = MyAssembler<GridView, dims>; using Matrix = MyAssembler::Matrix; using LocalMatrix = Matrix::block_type; @@ -597,6 +604,8 @@ int main(int argc, char *argv[]) { } } + reportTimeStep(relativeTime, relativeTau); + stateUpdater = stateUpdaterR1; velocityUpdater = velocityUpdaterR1; stateUpdaterR1 = stateUpdaterR2; @@ -628,6 +637,7 @@ int main(int argc, char *argv[]) { } timeStep++; } + timeStepWriter.close(); Python::stop(); } catch (Dune::Exception &e) {