diff --git a/src/finiteVolume/Make/files b/src/finiteVolume/Make/files index 854c89211b42cb1a94c0772af9309573bd49c2b6..817381be6194ccea96d53281d062c83777b8b642 100644 --- a/src/finiteVolume/Make/files +++ b/src/finiteVolume/Make/files @@ -204,8 +204,8 @@ $(interpolation)/interpolationCellPoint/makeInterpolationCellPoint.C $(interpolation)/interpolationCellPointFace/makeInterpolationCellPointFace.C $(interpolation)/interpolationCellPointWallModified/cellPointWeightWallModified/cellPointWeightWallModified.C $(interpolation)/interpolationCellPointWallModified/makeInterpolationCellPointWallModified.C -$(interpolation)/interpolationPoint/pointMVCWeight.C -$(interpolation)/interpolationPoint/makeInterpolationPoint.C +$(interpolation)/interpolationPointMVC/pointMVCWeight.C +$(interpolation)/interpolationPointMVC/makeInterpolationPointMVC.C volPointInterpolation = interpolation/volPointInterpolation $(volPointInterpolation)/volPointInterpolation.C diff --git a/src/finiteVolume/Make/options b/src/finiteVolume/Make/options index b91061399ee1cebe26a7b6f122b5231e7f7ff7e3..d1cbdbad04cc6eb62cab27c873e70a5cfef1194c 100644 --- a/src/finiteVolume/Make/options +++ b/src/finiteVolume/Make/options @@ -1,4 +1,5 @@ EXE_INC = \ + -DFULLDEBUG -g -O0 \ -I$(LIB_SRC)/triSurface/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude diff --git a/src/finiteVolume/interpolation/interpolation/interpolationPoint/interpolationPoint.C b/src/finiteVolume/interpolation/interpolation/interpolationPointMVC/interpolationPointMVC.C similarity index 90% rename from src/finiteVolume/interpolation/interpolation/interpolationPoint/interpolationPoint.C rename to src/finiteVolume/interpolation/interpolation/interpolationPointMVC/interpolationPointMVC.C index 516bb142db564bf6d58cc0a185ab857f4d2c09e1..592b9bf47fd8f3da88ff8787f037e20dd95fb7cf 100644 --- a/src/finiteVolume/interpolation/interpolation/interpolationPoint/interpolationPoint.C +++ b/src/finiteVolume/interpolation/interpolation/interpolationPointMVC/interpolationPointMVC.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -23,13 +23,13 @@ License \*---------------------------------------------------------------------------*/ -#include "interpolationPoint.H" +#include "interpolationPointMVC.H" #include "volPointInterpolation.H" // * * * * * * * * * * * * * * * * Constructor * * * * * * * * * * * * * * * // template<class Type> -Foam::interpolationPoint<Type>::interpolationPoint +Foam::interpolationPointMVC<Type>::interpolationPointMVC ( const GeometricField<Type, fvPatchField, volMesh>& psi ) diff --git a/src/finiteVolume/interpolation/interpolation/interpolationPoint/interpolationPoint.H b/src/finiteVolume/interpolation/interpolation/interpolationPointMVC/interpolationPointMVC.H similarity index 88% rename from src/finiteVolume/interpolation/interpolation/interpolationPoint/interpolationPoint.H rename to src/finiteVolume/interpolation/interpolation/interpolationPointMVC/interpolationPointMVC.H index 013ca766169707658d169db980d0375f13c8c708..8b7ba07fae1d060025a527c2926ee5bf10ab2a39 100644 --- a/src/finiteVolume/interpolation/interpolation/interpolationPoint/interpolationPoint.H +++ b/src/finiteVolume/interpolation/interpolation/interpolationPointMVC/interpolationPointMVC.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -22,7 +22,7 @@ License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. Class - Foam::interpolationPoint + Foam::interpolationPointMVC Description Given cell centre values interpolates to vertices and uses these to @@ -30,8 +30,8 @@ Description \*---------------------------------------------------------------------------*/ -#ifndef interpolationPoint_H -#define interpolationPoint_H +#ifndef interpolationPointMVC_H +#define interpolationPointMVC_H #include "interpolation.H" #include "pointMVCWeight.H" @@ -42,11 +42,11 @@ namespace Foam { /*---------------------------------------------------------------------------*\ - Class interpolationPoint Declaration + Class interpolationPointMVC Declaration \*---------------------------------------------------------------------------*/ template<class Type> -class interpolationPoint +class interpolationPointMVC : public interpolation<Type> { @@ -57,16 +57,17 @@ protected: //- Interpolated volfield const GeometricField<Type, pointPatchField, pointMesh> psip_; + public: //- Runtime type information - TypeName("point"); + TypeName("pointMVC"); // Constructors //- Construct from components - interpolationPoint + interpolationPointMVC ( const GeometricField<Type, fvPatchField, volMesh>& psi ); @@ -93,12 +94,12 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -#include "interpolationPointI.H" +#include "interpolationPointMVCI.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // #ifdef NoRepository -# include "interpolationPoint.C" +# include "interpolationPointMVC.C" #endif // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/finiteVolume/interpolation/interpolation/interpolationPoint/interpolationPointI.H b/src/finiteVolume/interpolation/interpolation/interpolationPointMVC/interpolationPointMVCI.H similarity index 89% rename from src/finiteVolume/interpolation/interpolation/interpolationPoint/interpolationPointI.H rename to src/finiteVolume/interpolation/interpolation/interpolationPointMVC/interpolationPointMVCI.H index a3f47c3a0ae22b2082120d77e61cf05b8e0589ee..7d2a79f86fd06847699bbeec598cda34186b1b26 100644 --- a/src/finiteVolume/interpolation/interpolation/interpolationPoint/interpolationPointI.H +++ b/src/finiteVolume/interpolation/interpolation/interpolationPointMVC/interpolationPointMVCI.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -26,7 +26,7 @@ License // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // template<class Type> -inline Type Foam::interpolationPoint<Type>::interpolate +inline Type Foam::interpolationPointMVC<Type>::interpolate ( const pointMVCWeight& cpw ) const @@ -36,7 +36,7 @@ inline Type Foam::interpolationPoint<Type>::interpolate template<class Type> -inline Type Foam::interpolationPoint<Type>::interpolate +inline Type Foam::interpolationPointMVC<Type>::interpolate ( const vector& position, const label cellI, diff --git a/src/finiteVolume/interpolation/interpolation/interpolationPoint/makeInterpolationPoint.C b/src/finiteVolume/interpolation/interpolation/interpolationPointMVC/makeInterpolationPointMVC.C similarity index 89% rename from src/finiteVolume/interpolation/interpolation/interpolationPoint/makeInterpolationPoint.C rename to src/finiteVolume/interpolation/interpolation/interpolationPointMVC/makeInterpolationPointMVC.C index b27f807019f6ae81e4f55ada603b8724a1ae8670..a5882e17e725c6af85af66e644b2098aac3b552d 100644 --- a/src/finiteVolume/interpolation/interpolation/interpolationPoint/makeInterpolationPoint.C +++ b/src/finiteVolume/interpolation/interpolation/interpolationPointMVC/makeInterpolationPointMVC.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -23,13 +23,13 @@ License \*---------------------------------------------------------------------------*/ -#include "interpolationPoint.H" +#include "interpolationPointMVC.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { - makeInterpolation(interpolationPoint); + makeInterpolation(interpolationPointMVC); } // ************************************************************************* // diff --git a/src/finiteVolume/interpolation/interpolation/interpolationPoint/pointMVCWeight.C b/src/finiteVolume/interpolation/interpolation/interpolationPointMVC/pointMVCWeight.C similarity index 88% rename from src/finiteVolume/interpolation/interpolation/interpolationPoint/pointMVCWeight.C rename to src/finiteVolume/interpolation/interpolation/interpolationPointMVC/pointMVCWeight.C index f011d5e6fb2eb0f0d742e28879c97d6cacd2c01b..3ff902c397021c638320e37c3187e16c68f2d26e 100644 --- a/src/finiteVolume/interpolation/interpolation/interpolationPoint/pointMVCWeight.C +++ b/src/finiteVolume/interpolation/interpolation/interpolationPointMVC/pointMVCWeight.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -56,7 +56,7 @@ void Foam::pointMVCWeight::calcWeights forAll(f, j) { label jPlus1 = f.fcIndex(j); - scalar l = mag(u[j]-u[jPlus1]); + scalar l = mag(u[j] - u[jPlus1]); theta[j] = 2.0*Foam::asin(l/2.0); } @@ -68,7 +68,7 @@ void Foam::pointMVCWeight::calcWeights weights[pid] = 1.0 / dist[pid] - * (Foam::tan(theta[jMin1]/2.0)+Foam::tan(theta[j]/2.0)); + * (Foam::tan(theta[jMin1]/2.0) + Foam::tan(theta[j]/2.0)); sumWeight += weights[pid]; } @@ -132,11 +132,10 @@ void Foam::pointMVCWeight::calcWeights //Pout<< " uj:" << u[j] << " ujPlus1:" << u[jPlus1] // << " temp:" << temp << endl; - scalar l = mag(u[j]-u[jPlus1]); + scalar l = min(mag(u[j] - u[jPlus1]), 2.0); scalar angle = 2.0*Foam::asin(l/2.0); - //Pout<< " j:" << j << " l:" << l - // << " angle:" << angle << endl; + //Pout<< " j:" << j << " l:" << l << " angle:" << angle << endl; v += 0.5*angle*temp; } @@ -145,14 +144,14 @@ void Foam::pointMVCWeight::calcWeights v /= vNorm; // Make sure v points towards the polygon -//if (((v&u[0]) < 0) != (mesh.faceOwner()[faceI] != cellIndex_)) -//{ -// FatalErrorIn("pointMVCWeight::calcWeights(..)") -// << "v:" << v << " u[0]:" << u[0] -// << exit(FatalError); -//} - - if ((v&u[0]) < 0) + //if (((v&u[0]) < 0) != (mesh.faceOwner()[faceI] != cellIndex_)) + //{ + // FatalErrorIn("pointMVCWeight::calcWeights(..)") + // << "v:" << v << " u[0]:" << u[0] + // << exit(FatalError); + //} + + if ((v & u[0]) < 0) { v = -v; } @@ -165,22 +164,22 @@ void Foam::pointMVCWeight::calcWeights label jPlus1 = f.fcIndex(j); //Pout<< " uj:" << u[j] << " ujPlus1:" << u[jPlus1] << endl; - vector n0 = u[j] ^ v; + vector n0 = u[j]^v; n0 /= mag(n0); - vector n1 = u[jPlus1] ^ v; + vector n1 = u[jPlus1]^v; n1 /= mag(n1); - scalar l = mag(n0-n1); + scalar l = min(mag(n0 - n1), 2.0); //Pout<< " l:" << l << endl; alpha(j) = 2.0*Foam::asin(l/2.0); - vector temp = n0 ^ n1; + vector temp = n0^n1; if ((temp&v) < 0.0) { alpha[j] = -alpha[j]; } - l = mag(u[j]-v); + l = min(mag(u[j] - v), 2.0); //Pout<< " l:" << l << endl; theta(j) = 2.0*Foam::asin(l/2.0); } @@ -211,7 +210,7 @@ void Foam::pointMVCWeight::calcWeights sum += 1.0 / Foam::tan(theta[j]) - * (Foam::tan(alpha[j]/2.0)+Foam::tan(alpha[jMin1]/2.0)); + * (Foam::tan(alpha[j]/2.0) + Foam::tan(alpha[jMin1]/2.0)); } // The special case when x lies on the polygon, handle it using 2D mvc. @@ -234,7 +233,7 @@ void Foam::pointMVCWeight::calcWeights / sum / dist[pid] / Foam::sin(theta[j]) - * (Foam::tan(alpha[j]/2.0)+Foam::tan(alpha[jMin1]/2.0)); + * (Foam::tan(alpha[j]/2.0) + Foam::tan(alpha[jMin1]/2.0)); } } diff --git a/src/finiteVolume/interpolation/interpolation/interpolationPoint/pointMVCWeight.H b/src/finiteVolume/interpolation/interpolation/interpolationPointMVC/pointMVCWeight.H similarity index 98% rename from src/finiteVolume/interpolation/interpolation/interpolationPoint/pointMVCWeight.H rename to src/finiteVolume/interpolation/interpolation/interpolationPointMVC/pointMVCWeight.H index 285114de4b47854319bd4d5139786173efefccf2..cc16c1dfbb1253188349359501701a074c5c816f 100644 --- a/src/finiteVolume/interpolation/interpolation/interpolationPoint/pointMVCWeight.H +++ b/src/finiteVolume/interpolation/interpolation/interpolationPointMVC/pointMVCWeight.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/finiteVolume/interpolation/interpolation/interpolationPoint/pointMVCWeightI.H b/src/finiteVolume/interpolation/interpolation/interpolationPointMVC/pointMVCWeightI.H similarity index 96% rename from src/finiteVolume/interpolation/interpolation/interpolationPoint/pointMVCWeightI.H rename to src/finiteVolume/interpolation/interpolation/interpolationPointMVC/pointMVCWeightI.H index b2f1fc554585767ce3976976eada1215907028e2..329b6fb3418bd1f19dab36fa040091428c7f2bda 100644 --- a/src/finiteVolume/interpolation/interpolation/interpolationPoint/pointMVCWeightI.H +++ b/src/finiteVolume/interpolation/interpolation/interpolationPointMVC/pointMVCWeightI.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License