Skip to content
Snippets Groups Projects
Commit dc71f420 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 4b6c0e43
No related branches found
No related tags found
1 merge request!35Fix/minor improvements
......@@ -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;
}
......@@ -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;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment