Skip to content
Snippets Groups Projects
Commit 85e2aab3 authored by Elias Pipping's avatar Elias Pipping
Browse files

[Output] Write out time steps

parent fe0a5d17
No related branches found
No related tags found
No related merge requests found
......@@ -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) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment