Added ROOTSMALL

This commit is contained in:
Henry Weller
2015-09-02 15:29:54 +01:00
parent da86701639
commit 689b0a00fc
9 changed files with 16 additions and 12 deletions

View File

@ -136,7 +136,7 @@ bool Foam::checkWedges
const point& pt = p[pp.meshPoints()[i]]; const point& pt = p[pp.meshPoints()[i]];
scalar d = mag((pt - p0) & pp.n()); scalar d = mag((pt - p0) & pp.n());
if (d > sqrt(SMALL)) if (d > ROOTSMALL)
{ {
if (report) if (report)
{ {

View File

@ -55,6 +55,7 @@ static const doubleScalar doubleScalarGREAT = 1.0e+15;
static const doubleScalar doubleScalarVGREAT = 1.0e+300; static const doubleScalar doubleScalarVGREAT = 1.0e+300;
static const doubleScalar doubleScalarROOTVGREAT = 1.0e+150; static const doubleScalar doubleScalarROOTVGREAT = 1.0e+150;
static const doubleScalar doubleScalarSMALL = 1.0e-15; static const doubleScalar doubleScalarSMALL = 1.0e-15;
static const doubleScalar doubleScalarROOTSMALL = 3.0e-8;
static const doubleScalar doubleScalarVSMALL = 1.0e-300; static const doubleScalar doubleScalarVSMALL = 1.0e-300;
static const doubleScalar doubleScalarROOTVSMALL = 1.0e-150; static const doubleScalar doubleScalarROOTVSMALL = 1.0e-150;

View File

@ -55,6 +55,7 @@ static const floatScalar floatScalarGREAT = 1.0e+6;
static const floatScalar floatScalarVGREAT = 1.0e+37; static const floatScalar floatScalarVGREAT = 1.0e+37;
static const floatScalar floatScalarROOTVGREAT = 1.0e+18; static const floatScalar floatScalarROOTVGREAT = 1.0e+18;
static const floatScalar floatScalarSMALL = 1.0e-6; static const floatScalar floatScalarSMALL = 1.0e-6;
static const floatScalar floatScalarROOTSMALL = 1.0e-3;
static const floatScalar floatScalarVSMALL = 1.0e-37; static const floatScalar floatScalarVSMALL = 1.0e-37;
static const floatScalar floatScalarROOTVSMALL = 1.0e-18; static const floatScalar floatScalarROOTVSMALL = 1.0e-18;

View File

@ -53,6 +53,7 @@ namespace Foam
static const scalar VGREAT = floatScalarVGREAT; static const scalar VGREAT = floatScalarVGREAT;
static const scalar ROOTVGREAT = floatScalarROOTVGREAT; static const scalar ROOTVGREAT = floatScalarROOTVGREAT;
static const scalar SMALL = floatScalarSMALL; static const scalar SMALL = floatScalarSMALL;
static const scalar ROOTSMALL = floatScalarROOTSMALL;
static const scalar VSMALL = floatScalarVSMALL; static const scalar VSMALL = floatScalarVSMALL;
static const scalar ROOTVSMALL = floatScalarROOTVSMALL; static const scalar ROOTVSMALL = floatScalarROOTVSMALL;
@ -71,6 +72,7 @@ namespace Foam
static const scalar VGREAT = doubleScalarVGREAT; static const scalar VGREAT = doubleScalarVGREAT;
static const scalar ROOTVGREAT = doubleScalarROOTVGREAT; static const scalar ROOTVGREAT = doubleScalarROOTVGREAT;
static const scalar SMALL = doubleScalarSMALL; static const scalar SMALL = doubleScalarSMALL;
static const scalar ROOTSMALL = doubleScalarROOTSMALL;
static const scalar VSMALL = doubleScalarVSMALL; static const scalar VSMALL = doubleScalarVSMALL;
static const scalar ROOTVSMALL = doubleScalarROOTVSMALL; static const scalar ROOTVSMALL = doubleScalarROOTVSMALL;

View File

@ -272,7 +272,7 @@ void Foam::meshRefinement::updateIntersections(const labelList& changedFaces)
// Extend segments a bit // Extend segments a bit
{ {
const vectorField smallVec(Foam::sqrt(SMALL)*(end-start)); const vectorField smallVec(ROOTSMALL*(end-start));
start -= smallVec; start -= smallVec;
end += smallVec; end += smallVec;
} }
@ -483,7 +483,7 @@ void Foam::meshRefinement::checkData()
// Extend segments a bit // Extend segments a bit
{ {
const vectorField smallVec(Foam::sqrt(SMALL)*(end-start)); const vectorField smallVec(ROOTSMALL*(end-start));
start -= smallVec; start -= smallVec;
end += smallVec; end += smallVec;
} }
@ -2897,7 +2897,7 @@ void Foam::meshRefinement::dumpIntersections(const fileName& prefix) const
// Extend segments a bit // Extend segments a bit
{ {
const vectorField smallVec(Foam::sqrt(SMALL)*(end-start)); const vectorField smallVec(ROOTSMALL*(end-start));
start -= smallVec; start -= smallVec;
end += smallVec; end += smallVec;
} }

View File

@ -243,7 +243,7 @@ void Foam::meshRefinement::getBafflePatches
// Extend segments a bit // Extend segments a bit
{ {
const vectorField smallVec(Foam::sqrt(SMALL)*(end-start)); const vectorField smallVec(ROOTSMALL*(end-start));
start -= smallVec; start -= smallVec;
end += smallVec; end += smallVec;
} }
@ -830,7 +830,7 @@ Foam::List<Foam::labelPair> Foam::meshRefinement::freeStandingBaffles
// Extend segments a bit // Extend segments a bit
{ {
const vectorField smallVec(Foam::sqrt(SMALL)*(end-start)); const vectorField smallVec(ROOTSMALL*(end-start));
start -= smallVec; start -= smallVec;
end += smallVec; end += smallVec;
} }
@ -2967,7 +2967,7 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::meshRefinement::zonify
// Extend segments a bit // Extend segments a bit
{ {
const vectorField smallVec(Foam::sqrt(SMALL)*(end-start)); const vectorField smallVec(ROOTSMALL*(end-start));
start -= smallVec; start -= smallVec;
end += smallVec; end += smallVec;
} }

View File

@ -967,7 +967,7 @@ Foam::label Foam::meshRefinement::markSurfaceRefinement
// Extend segments a bit // Extend segments a bit
{ {
const vectorField smallVec(Foam::sqrt(SMALL)*(end-start)); const vectorField smallVec(ROOTSMALL*(end-start));
start -= smallVec; start -= smallVec;
end += smallVec; end += smallVec;
} }
@ -1161,7 +1161,7 @@ Foam::label Foam::meshRefinement::markSurfaceCurvatureRefinement
// Extend segments a bit // Extend segments a bit
{ {
const vectorField smallVec(Foam::sqrt(SMALL)*(end-start)); const vectorField smallVec(ROOTSMALL*(end-start));
start -= smallVec; start -= smallVec;
end += smallVec; end += smallVec;
} }
@ -1764,7 +1764,7 @@ Foam::label Foam::meshRefinement::markProximityRefinement
// Extend segments a bit // Extend segments a bit
{ {
const vectorField smallVec(Foam::sqrt(SMALL)*(end-start)); const vectorField smallVec(ROOTSMALL*(end-start));
start -= smallVec; start -= smallVec;
end += smallVec; end += smallVec;
} }

View File

@ -531,7 +531,7 @@ void Foam::searchableBox::findLineAll
const scalarField magSqrDirVec(magSqr(dirVec)); const scalarField magSqrDirVec(magSqr(dirVec));
const vectorField smallVec const vectorField smallVec
( (
Foam::sqrt(SMALL)*dirVec ROOTSMALL*dirVec
+ vector(ROOTVSMALL,ROOTVSMALL,ROOTVSMALL) + vector(ROOTVSMALL,ROOTVSMALL,ROOTVSMALL)
); );

View File

@ -1752,7 +1752,7 @@ void Foam::distributedTriSurfaceMesh::findLineAll
const scalarField magSqrDirVec(magSqr(dirVec)); const scalarField magSqrDirVec(magSqr(dirVec));
const vectorField smallVec const vectorField smallVec
( (
Foam::sqrt(SMALL)*dirVec ROOTSMALL*dirVec
+ vector(ROOTVSMALL,ROOTVSMALL,ROOTVSMALL) + vector(ROOTVSMALL,ROOTVSMALL,ROOTVSMALL)
); );