mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'master' of /home/noisy3/OpenFOAM/OpenFOAM-dev
This commit is contained in:
@ -337,9 +337,8 @@ int main(int argc, char *argv[])
|
||||
surfaceFeatures newSet(surf);
|
||||
newSet.setFromStatus(edgeStat);
|
||||
|
||||
Info<< endl << "Writing trimmed features to "
|
||||
<< runTime.constant()/"featureEdgeMesh"/outFileName << endl;
|
||||
newSet.write(runTime.constant()/"featureEdgeMesh"/outFileName);
|
||||
Info<< endl << "Writing trimmed features to " << outFileName << endl;
|
||||
newSet.write(outFileName);
|
||||
|
||||
// Info<< endl << "Writing edge objs." << endl;
|
||||
// newSet.writeObj("final");
|
||||
|
||||
@ -32,6 +32,8 @@ Foam::label Foam::particle::particleCount_ = 0;
|
||||
|
||||
const Foam::scalar Foam::particle::trackingCorrectionTol = 1e-5;
|
||||
|
||||
const Foam::scalar Foam::particle::lambdaDistanceToleranceCoeff = 1e3*SMALL;
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
defineTypeNameAndDebug(particle, 0);
|
||||
|
||||
@ -164,7 +164,8 @@ protected:
|
||||
DynamicList<label>& faceList,
|
||||
const tetPointRef& tet,
|
||||
const FixedList<vector, 4>& tetAreas,
|
||||
const FixedList<label, 4>& tetPlaneBasePtIs
|
||||
const FixedList<label, 4>& tetPlaneBasePtIs,
|
||||
const scalar tol
|
||||
) const;
|
||||
|
||||
//- Find the lambda value for the line to-from across the
|
||||
@ -178,7 +179,8 @@ protected:
|
||||
const label tetPlaneBasePtI,
|
||||
const label cellI,
|
||||
const label tetFaceI,
|
||||
const label tetPtI
|
||||
const label tetPtI,
|
||||
const scalar tol
|
||||
) const;
|
||||
|
||||
//- Find the lambda value for a moving tri face
|
||||
@ -191,7 +193,8 @@ protected:
|
||||
const label tetPlaneBasePtI,
|
||||
const label cellI,
|
||||
const label tetFaceI,
|
||||
const label tetPtI
|
||||
const label tetPtI,
|
||||
const scalar tol
|
||||
) const;
|
||||
|
||||
//- Modify the tet owner data by crossing triI
|
||||
@ -291,6 +294,10 @@ public:
|
||||
// 'rescue' it from a tracking problem
|
||||
static const scalar trackingCorrectionTol;
|
||||
|
||||
//- Fraction of the cell volume to use in determining tolerance values
|
||||
// for the denominator and numerator of lambda
|
||||
static const scalar lambdaDistanceToleranceCoeff;
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
|
||||
@ -34,7 +34,8 @@ inline void Foam::particle::findTris
|
||||
DynamicList<label>& faceList,
|
||||
const tetPointRef& tet,
|
||||
const FixedList<vector, 4>& tetAreas,
|
||||
const FixedList<label, 4>& tetPlaneBasePtIs
|
||||
const FixedList<label, 4>& tetPlaneBasePtIs,
|
||||
const scalar tol
|
||||
) const
|
||||
{
|
||||
faceList.clear();
|
||||
@ -52,7 +53,8 @@ inline void Foam::particle::findTris
|
||||
tetPlaneBasePtIs[i],
|
||||
cellI_,
|
||||
tetFaceI_,
|
||||
tetPtI_
|
||||
tetPtI_,
|
||||
tol
|
||||
);
|
||||
|
||||
if ((lambda > 0.0) && (lambda < 1.0))
|
||||
@ -72,7 +74,8 @@ inline Foam::scalar Foam::particle::tetLambda
|
||||
const label tetPlaneBasePtI,
|
||||
const label cellI,
|
||||
const label tetFaceI,
|
||||
const label tetPtI
|
||||
const label tetPtI,
|
||||
const scalar tol
|
||||
) const
|
||||
{
|
||||
const pointField& pPts = mesh_.points();
|
||||
@ -88,7 +91,8 @@ inline Foam::scalar Foam::particle::tetLambda
|
||||
tetPlaneBasePtI,
|
||||
cellI,
|
||||
tetFaceI,
|
||||
tetPtI
|
||||
tetPtI,
|
||||
tol
|
||||
);
|
||||
}
|
||||
|
||||
@ -102,8 +106,6 @@ inline Foam::scalar Foam::particle::tetLambda
|
||||
// delta-length in the direction of n times the face area to a fraction of
|
||||
// the cell volume.
|
||||
|
||||
scalar tol = 1e3*SMALL*mesh_.cellVolumes()[cellI];
|
||||
|
||||
if (mag(lambdaDenominator) < tol)
|
||||
{
|
||||
if (mag(lambdaNumerator) < tol)
|
||||
@ -147,7 +149,8 @@ inline Foam::scalar Foam::particle::movingTetLambda
|
||||
const label tetPlaneBasePtI,
|
||||
const label cellI,
|
||||
const label tetFaceI,
|
||||
const label tetPtI
|
||||
const label tetPtI,
|
||||
const scalar tol
|
||||
) const
|
||||
{
|
||||
const pointField& pPts = mesh_.points();
|
||||
@ -299,8 +302,6 @@ inline Foam::scalar Foam::particle::movingTetLambda
|
||||
|
||||
}
|
||||
|
||||
scalar tol = 1e3*SMALL*mesh_.cellVolumes()[cellI];
|
||||
|
||||
if (mag(lambdaDenominator) < tol)
|
||||
{
|
||||
if (mag(lambdaNumerator) < tol)
|
||||
|
||||
@ -286,6 +286,11 @@ Foam::scalar Foam::particle::trackToFace
|
||||
// be a different tet to the one that the particle occupies.
|
||||
tetIndices faceHitTetIs;
|
||||
|
||||
// What tolerance is appropriate the minimum lambda numerator and
|
||||
// denominator for tracking in this cell.
|
||||
scalar lambdaDistanceTolerance =
|
||||
lambdaDistanceToleranceCoeff*mesh_.cellVolumes()[cellI_];
|
||||
|
||||
do
|
||||
{
|
||||
if (triI != -1)
|
||||
@ -371,7 +376,15 @@ Foam::scalar Foam::particle::trackToFace
|
||||
tetPlaneBasePtIs[2] = basePtI;
|
||||
tetPlaneBasePtIs[3] = basePtI;
|
||||
|
||||
findTris(endPosition, tris, tet, tetAreas, tetPlaneBasePtIs);
|
||||
findTris
|
||||
(
|
||||
endPosition,
|
||||
tris,
|
||||
tet,
|
||||
tetAreas,
|
||||
tetPlaneBasePtIs,
|
||||
lambdaDistanceTolerance
|
||||
);
|
||||
|
||||
// Reset variables for new track
|
||||
triI = -1;
|
||||
@ -415,7 +428,8 @@ Foam::scalar Foam::particle::trackToFace
|
||||
tetPlaneBasePtIs[tI],
|
||||
cellI_,
|
||||
tetFaceI_,
|
||||
tetPtI_
|
||||
tetPtI_,
|
||||
lambdaDistanceTolerance
|
||||
);
|
||||
|
||||
if (lam < lambdaMin)
|
||||
@ -704,6 +718,9 @@ void Foam::particle::hitWallFaces
|
||||
|
||||
const Foam::cell& thisCell = mesh_.cells()[cellI_];
|
||||
|
||||
scalar lambdaDistanceTolerance =
|
||||
lambdaDistanceToleranceCoeff*mesh_.cellVolumes()[cellI_];
|
||||
|
||||
const polyBoundaryMesh& patches = mesh_.boundaryMesh();
|
||||
|
||||
forAll(thisCell, cFI)
|
||||
@ -755,7 +772,8 @@ void Foam::particle::hitWallFaces
|
||||
f[tetIs.faceBasePt()],
|
||||
cellI_,
|
||||
fI,
|
||||
tetIs.tetPt()
|
||||
tetIs.tetPt(),
|
||||
lambdaDistanceTolerance
|
||||
);
|
||||
|
||||
if ((tetClambda <= 0.0) || (tetClambda >= 1.0))
|
||||
@ -781,7 +799,8 @@ void Foam::particle::hitWallFaces
|
||||
f[tetIs.faceBasePt()],
|
||||
cellI_,
|
||||
fI,
|
||||
tetIs.tetPt()
|
||||
tetIs.tetPt(),
|
||||
lambdaDistanceTolerance
|
||||
);
|
||||
|
||||
pointHit hitInfo(vector::zero);
|
||||
|
||||
Reference in New Issue
Block a user