From 278ebae50d02b31d6c550260e41961404ac511d2 Mon Sep 17 00:00:00 2001 From: Andrew Heather <> Date: Thu, 14 Sep 2017 14:13:17 +0100 Subject: [PATCH] COMP: Initial updates for integration into OpenFOAM --- meshLibrary/Make/options | 4 ---- .../geometry/quadricFitting/quadricFittingI.H | 4 ---- .../tetMeshOptimisation/tetMeshOptimisation.C | 12 ------------ .../triSurface2DCheck/triSurface2DCheck.C | 8 -------- 4 files changed, 28 deletions(-) diff --git a/meshLibrary/Make/options b/meshLibrary/Make/options index fa47820..5c336ce 100644 --- a/meshLibrary/Make/options +++ b/meshLibrary/Make/options @@ -14,10 +14,6 @@ ifeq (OpenFOAM,$(findstring OpenFOAM,$(WM_PROJECT))) endif endif -ifeq (v, $(findstring v, $(WM_PROJECT_VERSION))) - CFMESH_MACROS += -DOpenCFDSpecific -endif - ifeq ($(WM_PROJECT), foam) VER := $(shell expr `echo $(WM_PROJECT_VERSION)` \>= 3.2) ifeq ($(VER), 1) diff --git a/meshLibrary/utilities/helperClasses/geometry/quadricFitting/quadricFittingI.H b/meshLibrary/utilities/helperClasses/geometry/quadricFitting/quadricFittingI.H index 98f1568..e2dbf5f 100644 --- a/meshLibrary/utilities/helperClasses/geometry/quadricFitting/quadricFittingI.H +++ b/meshLibrary/utilities/helperClasses/geometry/quadricFitting/quadricFittingI.H @@ -52,11 +52,7 @@ void quadricFitting::calculateNormalVector() //- estimate the normal as the eigenvector associated //- to the smallest eigenvalue - # ifdef OpenCFDSpecific normal_ = eigenVectors(mat, ev).x(); - # else - normal_ = eigenVector(mat, ev[0]); - # endif } void quadricFitting::calculateCoordinateSystem() diff --git a/meshLibrary/utilities/smoothers/geometry/meshOptimizer/tetMeshOptimisation/tetMeshOptimisation.C b/meshLibrary/utilities/smoothers/geometry/meshOptimizer/tetMeshOptimisation/tetMeshOptimisation.C index 2f07cab..600d68b 100644 --- a/meshLibrary/utilities/smoothers/geometry/meshOptimizer/tetMeshOptimisation/tetMeshOptimisation.C +++ b/meshLibrary/utilities/smoothers/geometry/meshOptimizer/tetMeshOptimisation/tetMeshOptimisation.C @@ -495,11 +495,7 @@ void tetMeshOptimisation::optimiseBoundaryVolumeOptimizer if( mag(ev[2]) > (mag(ev[1]) + mag(ev[0])) ) { //- ordinary surface vertex - # ifdef OpenCFDSpecific vector normal = eigenVectors(nt, ev).z(); - # else - vector normal = eigenVector(nt, ev[2]); - # endif normal /= (mag(normal)+VSMALL); disp -= (disp & normal) * normal; @@ -507,19 +503,11 @@ void tetMeshOptimisation::optimiseBoundaryVolumeOptimizer else if( mag(ev[1]) > 0.5 * (mag(ev[2]) + mag(ev[0])) ) { //- this vertex is on an edge - # ifdef OpenCFDSpecific vector normal1 = eigenVectors(nt, ev).y(); - # else - vector normal1 = eigenVector(nt, ev[1]); - # endif normal1 /= (mag(normal1)+VSMALL); - # ifdef OpenCFDSpecific vector normal2 = eigenVectors(nt, ev).z(); - # else - vector normal2 = eigenVector(nt, ev[2]); - # endif normal2 /= (mag(normal2)+VSMALL); diff --git a/meshLibrary/utilities/triSurfaceTools/triSurface2DCheck/triSurface2DCheck.C b/meshLibrary/utilities/triSurfaceTools/triSurface2DCheck/triSurface2DCheck.C index 051efad..00c31ae 100644 --- a/meshLibrary/utilities/triSurfaceTools/triSurface2DCheck/triSurface2DCheck.C +++ b/meshLibrary/utilities/triSurfaceTools/triSurface2DCheck/triSurface2DCheck.C @@ -86,19 +86,11 @@ bool triSurface2DCheck::is2DSurface() const //- calculate the plane normal as a cross prduct of the two //- eigenVectors spanning the plane - # ifdef OpenCFDSpecific const vector n ( eigenVectors(covarianceMatrix_, eigenVal).y() ^ eigenVectors(covarianceMatrix_, eigenVal).z() ); - # else - const vector n - ( - eigenVector(covarianceMatrix_, eigenVal[1]) ^ - eigenVector(covarianceMatrix_, eigenVal[2]) - ); - # endif //- check if the plane is in the x-y plane of the coordinate system if( mag(n.x()) > SMALL || mag(n.y()) > SMALL ) -- GitLab