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

[Output] Write initial VTK config; shift others by one

parent 52e25cd7
No related branches found
No related tags found
No related merge requests found
...@@ -82,7 +82,6 @@ ...@@ -82,7 +82,6 @@
#include "state.hh" #include "state.hh"
#include "timestepping.hh" #include "timestepping.hh"
#include "vtk.hh" #include "vtk.hh"
size_t const dims = DIM; size_t const dims = DIM;
void initPython() { void initPython() {
...@@ -296,6 +295,13 @@ int main(int argc, char *argv[]) { ...@@ -296,6 +295,13 @@ int main(int argc, char *argv[]) {
typename MyAssembler::CellBasis> const typename MyAssembler::CellBasis> const
vtkWriter(myAssembler.cellBasis, myAssembler.vertexBasis, "obs"); vtkWriter(myAssembler.cellBasis, myAssembler.vertexBasis, "obs");
if (parset.get<bool>("io.writeVTK")) {
ScalarVector stress;
myAssembler.assembleVonMisesStress(
body.getYoungModulus(), body.getPoissonRatio(), u_initial, stress);
vtkWriter.write(0, u_initial, v_initial, alpha_initial, stress);
}
// Set up TNNMG solver // Set up TNNMG solver
using NonlinearFactory = using NonlinearFactory =
SolverFactory<dims, MyBlockProblem<ConvexProblem< SolverFactory<dims, MyBlockProblem<ConvexProblem<
...@@ -433,7 +439,7 @@ int main(int argc, char *argv[]) { ...@@ -433,7 +439,7 @@ int main(int argc, char *argv[]) {
ScalarVector stress; ScalarVector stress;
myAssembler.assembleVonMisesStress(body.getYoungModulus(), myAssembler.assembleVonMisesStress(body.getYoungModulus(),
body.getPoissonRatio(), u, stress); body.getPoissonRatio(), u, stress);
vtkWriter.write(timeStep - 1, u, v, alpha, stress); vtkWriter.write(timeStep, u, v, alpha, stress);
} }
} }
iterationWriter.close(); iterationWriter.close();
......
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