The OpenFOAM repositories are back online - please see how to update to the latest version

Commit 278ebae5 authored by Andrew Heather's avatar Andrew Heather

COMP: Initial updates for integration into OpenFOAM

parent 4c98ca6f
......@@ -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)
......
......@@ -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()
......
......@@ -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);
......
......@@ -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 )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment