COMP: single precision fixes

This commit is contained in:
mattijs
2011-06-03 01:44:56 +01:00
parent 9825df1ff0
commit 8de1edd771
5 changed files with 6 additions and 6 deletions

View File

@ -85,7 +85,7 @@ void reactingOneDim::updateQr()
// Qr is negative going out the solid
// If the surface is emitting the radiative flux is set to zero
Qrp = max(Qrp, 0.0);
Qrp = max(Qrp, scalar(0.0));
}
// Propagate Qr through 1-D regions

View File

@ -162,7 +162,7 @@ tmp<fvVectorMatrix> contactAngleForce::correct(volVectorField& U)
}
}
force /= (max(nHits, 1.0)*magSf);
force /= (max(nHits, scalar(1.0))*magSf);
tForce().correctBoundaryConditions();
if (owner_.regionMesh().time().outputTime())

View File

@ -113,7 +113,7 @@ Foam::combustionModels::infinitelyFastChemistry::R(volScalarField& Y) const
const volScalarField wSpecie =
wFuelNorm_*singleMixture_.specieStoichCoeffs()[specieI]
/ max(fNorm*(Y - fres), 0.001);
/ max(fNorm*(Y - fres), scalar(0.001));
return -fNorm*wSpecie*fres + fNorm*fvm::Sp(wSpecie, Y);
}

View File

@ -137,11 +137,11 @@ void Foam::singleStepReactingMixture<ThermoType>::fresCorrect()
const label specieI = reaction.lhs()[i].index;
if (specieI == fuelIndex_)
{
fres_[specieI] = max(YFuel - YO2/s_, 0.0);
fres_[specieI] = max(YFuel - YO2/s_, scalar(0.0));
}
else if (specieI == O2Index)
{
fres_[specieI] = max(YO2 - YFuel*s_, 0.0);
fres_[specieI] = max(YO2 - YFuel*s_, scalar(0.0));
}
}

View File

@ -140,7 +140,7 @@ ODESolidChemistryModel
// Calculate inital values of Ysi0 = rho*delta*Yi
Ys0_[fieldI].internalField() =
//this->solidThermo().rho()*Ys_[fieldI]*mesh.V();
this->solidThermo().rho()*max(Ys_[fieldI],0.001)*mesh.V();
this->solidThermo().rho()*max(Ys_[fieldI],scalar(0.001))*mesh.V();
}
forAll(RRg_, fieldI)