Merge branch 'master' of /home/noisy2/OpenFOAM/OpenFOAM-dev

This commit is contained in:
mattijs
2008-06-02 13:18:33 +01:00
5 changed files with 22 additions and 35 deletions

View File

@ -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<polySplineEdge>
addPolySplineEdgeIstreamConstructorToTable_;
// Add the curvedEdge constructor functions to the hash tables
curvedEdge::addIstreamConstructorToTable<polySplineEdge>
addPolySplineEdgeIstreamConstructorToTable_;
}
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
@ -56,7 +49,7 @@ curvedEdge::addIstreamConstructorToTable<polySplineEdge>
// 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
// ************************************************************************* //

View File

@ -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

View File

@ -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

View File

@ -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();

View File

@ -318,11 +318,15 @@ inline scalar triangle<Point, PointRef>::quality() const
template<class Point, class PointRef>
inline scalar triangle<Point, PointRef>::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_)))
);
}