From 9aaf8b39edfa93f851989c5f79aa393c466be287 Mon Sep 17 00:00:00 2001 From: Elias Pipping <elias.pipping@fu-berlin.de> Date: Wed, 9 Nov 2011 13:53:32 +0100 Subject: [PATCH] Change output format Dots for progress. Table at the end. --- src/one-body-sample.cc | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/one-body-sample.cc b/src/one-body-sample.cc index 7460c74d..526f0a22 100644 --- a/src/one-body-sample.cc +++ b/src/one-body-sample.cc @@ -198,7 +198,9 @@ int main() { leafView, p1Basis, frictionalNodes, nodalIntegrals); for (size_t run = 1; run <= runs; ++run) { - std::cout << "Run: " << run << std::endl; + std::cout << "."; + std::cout.flush(); + // b = neumann assemble_neumann<GridType, GridType::LeafGridView, SmallVector, P1Basis>( leafView, p1Basis, neumannNodes, b1, run); @@ -271,11 +273,20 @@ int main() { solver.solve(); } } + std::cout << std::endl; VectorType diff = u2; diff -= u1; std::cout << "Infinity norm of the difference of the two solutions: " << diff.infinity_norm() << std::endl; + + // Print displacement on frictional boundary + for (size_t i = 0; i < frictionalNodes.size(); ++i) + if (frictionalNodes[i][0]) + std::cout << boost::format("u1[%02d] = %+3e, %|40t|u2[%02d] = %+3e, " + " s[%02d] = %+3e") % + i % u1[i] % i % u2[i] % i % + vonMisesStress[i] << std::endl; } catch (Dune::Exception &e) { Dune::derr << "Dune reported error: " << e << std::endl; -- GitLab