Skip to content
Snippets Groups Projects
Commit d31592de authored by lisa_julia.nebel_at_tu-dresden.de's avatar lisa_julia.nebel_at_tu-dresden.de
Browse files

Add timer to print the overall time and the time used for one trustregion step

parent 0f0fd2b4
No related branches found
No related tags found
No related merge requests found
......@@ -259,6 +259,8 @@ void TrustRegionSolver<BasisType,VectorType>::solve()
CorrectionType rhs;
MatrixType stiffnessMatrix;
Dune::Timer problemTimer;
for (int i=0; i<maxTrustRegionSteps_; i++) {
Dune::Timer totalTimer;
......@@ -515,5 +517,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;
}
......@@ -241,6 +241,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);
......@@ -384,6 +385,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;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment