diff --git a/src/one-body-sample.cc b/src/one-body-sample.cc index f1aee55b8732e2981f2874f385c61227ad5607b4..2a4932b351a36007154e2039b448289c33c8bcbb 100644 --- a/src/one-body-sample.cc +++ b/src/one-body-sample.cc @@ -173,8 +173,9 @@ int main(int argc, char *argv[]) { timer.reset(); OperatorAssembler<P1Basis, P1Basis>(p1Basis, p1Basis) .assemble(localStiffness, stiffnessMatrix); - std::cout << "Assembled stiffness matrix in " << timer.elapsed() << "s" - << std::endl; + if (parset.get<bool>("enable_timer")) + std::cout << "Assembled stiffness matrix in " << timer.elapsed() << "s" + << std::endl; } EnergyNorm<MatrixType, VectorType> energyNorm(stiffnessMatrix); @@ -372,9 +373,9 @@ int main(int argc, char *argv[]) { (boost::format("obs%d") % run).str()); } } - std::cout << std::endl; - std::cout << "Making " << timesteps << " time steps took " - << timer.elapsed() << "s" << std::endl; + if (parset.get<bool>("enable_timer")) + std::cout << std::endl << "Making " << timesteps << " time steps took " + << timer.elapsed() << "s" << std::endl; if (parset.get<bool>("printFrictionalBoundary")) { // Print displacement on frictional boundary diff --git a/src/one-body-sample.parset b/src/one-body-sample.parset index 9f248c40a5a461224c1ff86456632940c97e6452..a76ff15c180c3ff34cbdb090d404e47704a8d496 100644 --- a/src/one-body-sample.parset +++ b/src/one-body-sample.parset @@ -11,6 +11,8 @@ writeVTK = false printVelocitySteppingComparison = false +enable_timer = true + [grid] refinements = 4