diff --git a/ProcessLib/Output/Output.cpp b/ProcessLib/Output/Output.cpp index c2b4e1f9af02d11fbba479e32be5876ce2b200a9..4cd99e4386ecbebfd9954d7a6ebc84de6ccbd5b3 100644 --- a/ProcessLib/Output/Output.cpp +++ b/ProcessLib/Output/Output.cpp @@ -64,7 +64,7 @@ bool Output::shallDoOutput(int timestep, double const t) auto const fixed_output_time = std::lower_bound( cbegin(_fixed_output_times), cend(_fixed_output_times), t); if ((fixed_output_time != cend(_fixed_output_times)) && - (std::fabs(*fixed_output_time - t) < + (std::abs(*fixed_output_time - t) < std::numeric_limits<double>::epsilon())) { return true; diff --git a/ProcessLib/PhaseField/PhaseFieldProcess.cpp b/ProcessLib/PhaseField/PhaseFieldProcess.cpp index 7bb76091ac23e106d45b3864a3a3153774f7fcec..86083c05caa11cbb4ffedddc2fc1a50b1bba8d14 100644 --- a/ProcessLib/PhaseField/PhaseFieldProcess.cpp +++ b/ProcessLib/PhaseField/PhaseFieldProcess.cpp @@ -319,7 +319,7 @@ void PhaseFieldProcess<DisplacementDim>::postNonLinearSolverConcreteProcess( _process_data.pressure = _process_data.injected_volume / _process_data.crack_volume; _process_data.pressure_error = - std::fabs(_process_data.pressure_old - _process_data.pressure) / + std::abs(_process_data.pressure_old - _process_data.pressure) / _process_data.pressure; INFO("Internal pressure: {:g} and Pressure error: {:.4e}", _process_data.pressure, _process_data.pressure_error); diff --git a/ProcessLib/TimeLoop.cpp b/ProcessLib/TimeLoop.cpp index a8ad37f24efa725020fa0c29f2ea837f4af90381..37603ef24985dda5a787e0d3b49a660215960d19 100644 --- a/ProcessLib/TimeLoop.cpp +++ b/ProcessLib/TimeLoop.cpp @@ -458,7 +458,7 @@ double TimeLoop::computeTimeStepping(const double prev_dt, double& t, dt = NumLib::possiblyClampDtToNextFixedTime(t, dt, _output->getFixedOutputTimes()); // Check whether the time stepping is stabilized - if (std::fabs(dt - prev_dt) < std::numeric_limits<double>::epsilon()) + if (std::abs(dt - prev_dt) < std::numeric_limits<double>::epsilon()) { if (_last_step_rejected) { @@ -656,7 +656,7 @@ bool TimeLoop::loop() } dt = computeTimeStepping(prev_dt, t, accepted_steps, rejected_steps); - if (std::fabs(t - _end_time) < std::numeric_limits<double>::epsilon() || + if (std::abs(t - _end_time) < std::numeric_limits<double>::epsilon() || t + dt > _end_time) { break;