diff --git a/applications/utilities/mesh/generation/blockMesh/curvedEdges/polySplineEdge.C b/applications/utilities/mesh/generation/blockMesh/curvedEdges/polySplineEdge.C index 00a93ff9c3..1ca7770de1 100644 --- a/applications/utilities/mesh/generation/blockMesh/curvedEdges/polySplineEdge.C +++ b/applications/utilities/mesh/generation/blockMesh/curvedEdges/polySplineEdge.C @@ -22,28 +22,21 @@ License along with OpenFOAM; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -Description - polySplineEdge class : representation of a spline via a polyLine - \*---------------------------------------------------------------------------*/ -#include "error.H" - #include "polySplineEdge.H" #include "BSpline.H" -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // namespace Foam { + defineTypeNameAndDebug(polySplineEdge, 0); -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -defineTypeNameAndDebug(polySplineEdge, 0); - -// Add the curvedEdge constructor functions to the hash tables -curvedEdge::addIstreamConstructorToTable - addPolySplineEdgeIstreamConstructorToTable_; + // Add the curvedEdge constructor functions to the hash tables + curvedEdge::addIstreamConstructorToTable + addPolySplineEdgeIstreamConstructorToTable_; +} // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // @@ -56,7 +49,7 @@ curvedEdge::addIstreamConstructorToTable // note that the points are evenly spaced in the parameter mu, not // in real space -pointField polySplineEdge::intervening +Foam::pointField Foam::polySplineEdge::intervening ( const pointField& otherknots, const label nbetweenKnots, @@ -72,7 +65,7 @@ pointField polySplineEdge::intervening label N = spl.nKnots(); scalar init = 1.0/(N - 1); - scalar interval = (N - 3)/N; + scalar interval = (N - scalar(3))/N; interval /= otherknots.size() + 1; interval /= nbetweenKnots + 1; @@ -93,8 +86,7 @@ pointField polySplineEdge::intervening // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -// Construct from components -polySplineEdge::polySplineEdge +Foam::polySplineEdge::polySplineEdge ( const pointField& points, const label start, @@ -118,14 +110,13 @@ polySplineEdge::polySplineEdge {} -// Construct from Istream -polySplineEdge::polySplineEdge +Foam::polySplineEdge::polySplineEdge ( const pointField& points, Istream& is ) : - curvedEdge(points, readLabel(is), readLabel(is)), + curvedEdge(points, is), polyLine(pointField(0)), otherKnots_(is) { @@ -144,23 +135,16 @@ polySplineEdge::polySplineEdge // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -//- Return the position of a point on the curve given by -// the parameter 0 <= lambda <= 1 -vector polySplineEdge::position(const scalar mu) const +Foam::vector Foam::polySplineEdge::position(const scalar mu) const { return polyLine::position(mu); } -//- Return the length of the curve -scalar polySplineEdge::length() const +Foam::scalar Foam::polySplineEdge::length() const { return polyLine::length(); } -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - // ************************************************************************* // diff --git a/etc/settings.csh b/etc/settings.csh index 94d6501e9d..10bce2b685 100644 --- a/etc/settings.csh +++ b/etc/settings.csh @@ -157,7 +157,7 @@ endif switch ("$WM_MPLIB") case OPENMPI: - set ompi_version=1.2.5 + set ompi_version=1.2.6 setenv OPENMPI_HOME $FOAM_SRC/other/openmpi-$ompi_version setenv OPENMPI_ARCH_PATH $OPENMPI_HOME/platforms/$WM_OPTIONS diff --git a/etc/settings.sh b/etc/settings.sh index 880dba484d..8bb969a356 100644 --- a/etc/settings.sh +++ b/etc/settings.sh @@ -158,7 +158,7 @@ export FOAMX_CONFIG case "$WM_MPLIB" in OPENMPI) - ompi_version=1.2.5 + ompi_version=1.2.6 export OPENMPI_HOME=$FOAM_SRC/other/openmpi-$ompi_version export OPENMPI_ARCH_PATH=$OPENMPI_HOME/platforms/$WM_OPTIONS diff --git a/src/OpenFOAM/meshes/meshShapes/face/face.C b/src/OpenFOAM/meshes/meshShapes/face/face.C index 2d06d0db28..98ad089f39 100644 --- a/src/OpenFOAM/meshes/meshShapes/face/face.C +++ b/src/OpenFOAM/meshes/meshShapes/face/face.C @@ -632,9 +632,8 @@ Foam::scalar Foam::face::sweptVol // summing their swept volumes. // Changed to deal with small concavity by using a central decomposition - point centreOldPoint = Foam::average(points(oldPoints)); - - point centreNewPoint = Foam::average(points(newPoints)); + point centreOldPoint = centre(oldPoints); + point centreNewPoint = centre(newPoints); label nPoints = size(); diff --git a/src/OpenFOAM/meshes/primitiveShapes/triangle/triangleI.H b/src/OpenFOAM/meshes/primitiveShapes/triangle/triangleI.H index 406fd98e8e..7e8dd94fef 100644 --- a/src/OpenFOAM/meshes/primitiveShapes/triangle/triangleI.H +++ b/src/OpenFOAM/meshes/primitiveShapes/triangle/triangleI.H @@ -318,11 +318,15 @@ inline scalar triangle::quality() const template inline scalar triangle::sweptVol(const triangle& t) const { - return (1.0/6.0)* + return (1.0/12.0)* ( ((t.a_ - a_) & ((b_ - a_)^(c_ - a_))) + ((t.b_ - b_) & ((c_ - b_)^(t.a_ - b_))) + ((c_ - t.c_) & ((t.b_ - t.c_)^(t.a_ - t.c_))) + + + ((t.a_ - a_) & ((b_ - a_)^(c_ - a_))) + + ((b_ - t.b_) & ((t.a_ - t.b_)^(t.c_ - t.b_))) + + ((c_ - t.c_) & ((b_ - t.c_)^(t.a_ - t.c_))) ); }