increase precision of time step fraction output [ci skip]

This commit is contained in:
danielque
2019-07-26 16:11:09 +02:00
parent b462327d2d
commit d3d7d07cdb

View File

@ -45,6 +45,7 @@ Description
#include "smoothingModel.H"
#include "liggghtsCommandModel.H"
#include "otherForceModel.H"
#include "IOmanip.H"
namespace Foam
{
@ -668,12 +669,16 @@ bool cfdemCloud::evolve
//CHECK JUST TIME-INTERPOLATE ALREADY SMOOTHENED VOIDFRACTIONNEXT AND UsNEXT FIELD
// IMPLICIT FORCE CONTRIBUTION AND SOLVER USE EXACTLY THE SAME AVERAGED
// QUANTITIES AT THE GRID!
scalar timeStepFrac = dataExchangeM().timeStepFraction();
const scalar timeStepFrac = dataExchangeM().timeStepFraction();
int old_precision = Info().precision(10);
Info << "\n timeStepFraction() = " << timeStepFrac << endl;
Info().precision(old_precision);
if(timeStepFrac > 1.0000001)
{
// FatalError << "cfdemCloud::dataExchangeM().timeStepFraction()>1: Do not do this, since dangerous. This might be due to the fact that you used a adjustable CFD time step. Please use a fixed CFD time step." << abort(FatalError);
old_precision = Warning().precision(10);
Warning << "cfdemCloud::dataExchangeM().timeStepFraction() = " << timeStepFrac << endl;
Warning().precision(old_precision);
}
clockM().start(24,"interpolateEulerFields");