diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/Make/options b/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/Make/options index 42c2cb54c90ca034ab79c760543ec4f3a2192f45..67811850d7d3b45fef503834355c585409931ae0 100644 --- a/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/Make/options +++ b/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/Make/options @@ -3,4 +3,4 @@ EXE_INC = \ -I../phaseModel/lnInclude LIB_LIBS = \ - -lphaseModel + -lcompressibleMultiPhaseModel diff --git a/src/meshTools/AMIInterpolation/AMIInterpolation/AMIInterpolation.C b/src/meshTools/AMIInterpolation/AMIInterpolation/AMIInterpolation.C index aa99f46593fae6d560fe487a8342dee96940ce51..3b7f7a527f4903de5c169b61dae4cedc946f4dfb 100644 --- a/src/meshTools/AMIInterpolation/AMIInterpolation/AMIInterpolation.C +++ b/src/meshTools/AMIInterpolation/AMIInterpolation/AMIInterpolation.C @@ -1094,18 +1094,19 @@ void Foam::AMIInterpolation<SourcePatch, TargetPatch>::normaliseWeights const bool output ) { - scalarList wghtSum(wght.size(), 0.0); - scalar minBound = VGREAT; scalar maxBound = -VGREAT; + scalar tSum = 0.0; + // Normalise the weights forAll(wght, faceI) { scalar s = sum(wght[faceI]); - wghtSum[faceI] = s; - scalar t = s/patchAreas[faceI]; + + tSum += t; + if (t < minBound) { minBound = t; @@ -1122,11 +1123,16 @@ void Foam::AMIInterpolation<SourcePatch, TargetPatch>::normaliseWeights } } + if (output) { - Info<< "AMI: Patch " << patchName << " weights min/max = " + const label nFace = returnReduce(wght.size(), sumOp<scalar>()); + reduce(tSum, sumOp<scalar>()); + + Info<< "AMI: Patch " << patchName << " weights min/max/average = " << returnReduce(minBound, minOp<scalar>()) << ", " - << returnReduce(maxBound, maxOp<scalar>()) << endl; + << returnReduce(maxBound, maxOp<scalar>()) << ", " + << tSum/nFace << endl; } } @@ -2011,7 +2017,7 @@ Foam::AMIInterpolation<SourcePatch, TargetPatch>::interpolateToSource const tmp<Field<Type> >& tFld ) const { - return interpolateToSource(tFld, sumOp<Type>()); + return interpolateToSource(tFld(), sumOp<Type>()); } @@ -2035,7 +2041,7 @@ Foam::AMIInterpolation<SourcePatch, TargetPatch>::interpolateToTarget const tmp<Field<Type> >& tFld ) const { - return interpolateToTarget(tFld, sumOp<Type>()); + return interpolateToTarget(tFld(), sumOp<Type>()); } diff --git a/src/meshTools/AMIInterpolation/faceAreaIntersect/faceAreaIntersect.C b/src/meshTools/AMIInterpolation/faceAreaIntersect/faceAreaIntersect.C index fe21beb23a6d81b6b87c61bdf5dde474e66ac8f6..3d3a72e3a455e74d34ce4f629703e41813097635 100644 --- a/src/meshTools/AMIInterpolation/faceAreaIntersect/faceAreaIntersect.C +++ b/src/meshTools/AMIInterpolation/faceAreaIntersect/faceAreaIntersect.C @@ -36,7 +36,7 @@ void Foam::faceAreaIntersect::triSliceWithPlane const scalar len ) { - const scalar matchTol = 1e-4; + const scalar matchTol = 1e-6; // distance to cutting plane FixedList<scalar, 3> d; @@ -78,7 +78,8 @@ void Foam::faceAreaIntersect::triSliceWithPlane ( (nPos == 3) || ((nPos == 2) && (nCoPlanar == 1)) - || ((nPos == 1) && (nCoPlanar == 2))) + || ((nPos == 1) && (nCoPlanar == 2)) + ) { /* /\ _____ @@ -95,14 +96,16 @@ void Foam::faceAreaIntersect::triSliceWithPlane else if ((nPos == 2) && (nCoPlanar == 0)) { /* - ________ - \ / - --\----/-- - \ / - \/ + i1________i2 + \ / + --\----/-- + \ / + \/ + i0 2 points above plane, 1 below - resulting quad above plane split into 2 triangles + - forget triangle below plane */ // point under the plane @@ -129,13 +132,16 @@ void Foam::faceAreaIntersect::triSliceWithPlane if (nCoPlanar == 0) { /* - /\ - / \ - --/----\-- - /______\ + i0 + /\ + / \ + --/----\-- + /______\ + i2 i1 1 point above plane, 2 below - - keep triangle avove intersection plane + - keep triangle above intersection plane + - forget quad below plane */ // indices of remaining points @@ -143,24 +149,23 @@ void Foam::faceAreaIntersect::triSliceWithPlane label i2 = d.fcIndex(i1); // determine the two intersection points - point p01 = planeIntersection(d, tri, i0, i1); - point p02 = planeIntersection(d, tri, i0, i2); + point p01 = planeIntersection(d, tri, i1, i0); + point p02 = planeIntersection(d, tri, i2, i0); - // forget quad below plane - // - add triangle above plane to list + // add triangle above plane to list setTriPoints(tri[i0], p01, p02, nTris, tris); } else { /* - + i0 |\ | \ - __|__\__ + __|__\_i2_ | / | / |/ - + i1 1 point above plane, 1 on plane, 1 below - keep triangle above intersection plane @@ -171,9 +176,9 @@ void Foam::faceAreaIntersect::triSliceWithPlane label i2 = copI; // determine the intersection point - point p01 = planeIntersection(d, tri, i0, i1); + point p01 = planeIntersection(d, tri, i1, i0); - // add triangle above plane to list + // add triangle above plane to list - clockwise points if (d.fcIndex(i0) == i1) { setTriPoints(tri[i0], p01, tri[i2], nTris, tris); diff --git a/src/parallel/decompose/decompositionMethods/Make/options b/src/parallel/decompose/decompositionMethods/Make/options index 1c8b0769e9e946dee8f5551663d83de401f29cba..f3070a731e46532261f92d0a3e815cf03a1ff2bc 100644 --- a/src/parallel/decompose/decompositionMethods/Make/options +++ b/src/parallel/decompose/decompositionMethods/Make/options @@ -1,6 +1,7 @@ EXE_INC = \ + -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude LIB_LIBS = \ + -lmeshTools \ -lfiniteVolume -