diff --git a/src/one-body-sample.cc b/src/one-body-sample.cc index 7460c74de63df598e65674f1e295625e8feea73c..526f0a22d3821e8463d06f63fc0c5f70025d223a 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;