diff --git a/dune/elasticity/common/trustregionsolver.cc b/dune/elasticity/common/trustregionsolver.cc index ff754234b1d2dc4e185b4b936bc60885b1405bea..e746757c837054b6582494467a3420c073eb3645 100644 --- a/dune/elasticity/common/trustregionsolver.cc +++ b/dune/elasticity/common/trustregionsolver.cc @@ -383,6 +383,8 @@ void TrustRegionSolver<BasisType,VectorType>::solve() CorrectionType rhs; MatrixType stiffnessMatrix; + Dune::Timer problemTimer; + for (int i=0; i<maxTrustRegionSteps_; i++) { Dune::Timer totalTimer; @@ -642,5 +644,7 @@ void TrustRegionSolver<BasisType,VectorType>::solve() std::cout << "iteration took " << totalTimer.elapsed() << " sec." << std::endl; } + if (rank==0) + std::cout << "The whole trust-region step took " << problemTimer.elapsed() << " sec." << std::endl; } diff --git a/src/finite-strain-elasticity.cc b/src/finite-strain-elasticity.cc index 8116391303bd35d05d6699f301da03af2166fc00..cbc5a51d386f5f871020937dfaf1e289dfd08c4f 100644 --- a/src/finite-strain-elasticity.cc +++ b/src/finite-strain-elasticity.cc @@ -223,6 +223,7 @@ int main (int argc, char *argv[]) try vtkWriter.addVertexData(localDisplacementFunction, VTK::FieldInfo("displacement", VTK::FieldInfo::Type::vector, dim)); vtkWriter.write(resultPath + "finite-strain_homotopy_0"); + Dune::Timer homotopyTimer; for (int i=0; i<numHomotopySteps; i++) { double homotopyParameter = (i+1)*(1.0/numHomotopySteps); @@ -354,6 +355,9 @@ int main (int argc, char *argv[]) try vtkWriter.write(resultPath + "finite-strain_homotopy_" + std::to_string(i+1)); } + if (mpiHelper.rank()==0) + std::cout << "Complete duration: " << homotopyTimer.elapsed() << " sec." << std::endl; + } catch (Exception& e) { std::cout << e.what() << std::endl; }