Modify reporting of displacement and distance

This commit is contained in:
graham
2009-01-08 18:41:25 +00:00
parent e53479ef18
commit 3ae7624f63
9 changed files with 25122 additions and 25070 deletions

View File

@ -67,7 +67,7 @@ void Foam::CV2D::external_flip(Face_handle& f, int i)
if if
( (
CGAL::ON_POSITIVE_SIDE CGAL::ON_POSITIVE_SIDE
!= side_of_oriented_circle(n, f->vertex(i)->point()) != side_of_oriented_circle(n, f->vertex(i)->point())
) return; ) return;
@ -147,7 +147,7 @@ void Foam::CV2D::insertPoints
} }
else else
{ {
Warning Warning
<< "Rejecting point " << p << " outside surface" << endl; << "Rejecting point " << p << " outside surface" << endl;
} }
} }
@ -471,7 +471,7 @@ void Foam::CV2D::newPoints(const scalar relaxation)
// Calculate the centre to edge-centre vector // Calculate the centre to edge-centre vector
vector2D deltai = vertices[edgei] - defVert0; vector2D deltai = vertices[edgei] - defVert0;
// Set the weight for this edge contribution // Set the weight for this edge contribution
scalar w = 1; scalar w = 1;
@ -481,7 +481,7 @@ void Foam::CV2D::newPoints(const scalar relaxation)
// alternative weights // alternative weights
//w = mag(deltai.x()*ei.y() - deltai.y()*ei.x()); //w = mag(deltai.x()*ei.y() - deltai.y()*ei.x());
//w = magSqr(ei)*mag(deltai); //w = magSqr(ei)*mag(deltai);
// Use the following for an ~square mesh // Use the following for an ~square mesh
// Find the coordinate contributions for this edge delta // Find the coordinate contributions for this edge delta
scalar cd0deltai = cd0 & deltai; scalar cd0deltai = cd0 & deltai;
@ -527,7 +527,7 @@ void Foam::CV2D::newPoints(const scalar relaxation)
} }
} }
Info << "\nTotal displacement = " << totalDisp Info << "\nTotal displacement = " << totalDisp
<< " total distance = " << totalDist << endl; << " total distance = " << totalDist << endl;
} }

View File

@ -90,9 +90,9 @@ int main(int argc, char *argv[])
<< "Relaxation iteration " << iter << nl << "Relaxation iteration " << iter << nl
<< "~~~~~~~~~~~~~~~~~~~~~~~~" << endl; << "~~~~~~~~~~~~~~~~~~~~~~~~" << endl;
scalar relax = scalar relax =
mesh.meshingControls().relaxationFactorStart mesh.meshingControls().relaxationFactorStart
+ +
( (
mesh.meshingControls().relaxationFactorEnd mesh.meshingControls().relaxationFactorEnd
- mesh.meshingControls().relaxationFactorStart - mesh.meshingControls().relaxationFactorStart

View File

@ -1,11 +1,11 @@
EXE_DEBUG = -DFULLDEBUG -g -O0 //EXE_DEBUG = -DFULLDEBUG -g -O0
//EXE_DEBUG = EXE_NDEBUG = -DNDEBUG
include $(GENERAL_RULES)/CGAL include $(GENERAL_RULES)/CGAL
FFLAGS = -DCGAL_FILES='"${CGAL_PATH}/CGAL/files"' FFLAGS = -DCGAL_FILES='"${CGAL_PATH}/CGAL/files"'
EXE_INC = \ EXE_INC = \
${EXE_DEBUG} \ ${EXE_NDEBUG} \
${CGAL_INC} \ ${CGAL_INC} \
-I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/triSurface/lnInclude -I$(LIB_SRC)/triSurface/lnInclude

View File

@ -592,9 +592,9 @@ void Foam::CV3D::relaxPoints(const scalar relaxation)
scalar faceArea = dualFace.mag(dualVertices); scalar faceArea = dualFace.mag(dualVertices);
scalar directStiffness = 2.0*relaxation; scalar directStiffness = 2.0;
scalar transverseStiffness = 0.0001*relaxation; scalar transverseStiffness = 0.0001;
scalar r0 = 0.9*controls_.minCellSize; scalar r0 = 0.9*controls_.minCellSize;
@ -606,11 +606,11 @@ void Foam::CV3D::relaxPoints(const scalar relaxation)
if (vA->internalPoint()) if (vA->internalPoint())
{ {
displacementAccumulator[vA->index()] += dA + dT; displacementAccumulator[vA->index()] += (dA + dT);
} }
if (vB->internalPoint()) if (vB->internalPoint())
{ {
displacementAccumulator[vB->index()] += -dA + dT; displacementAccumulator[vB->index()] += (-dA + dT);
} }
} }
} }
@ -621,6 +621,8 @@ void Foam::CV3D::relaxPoints(const scalar relaxation)
Info<< "Total displacement = " << totalDisp Info<< "Total displacement = " << totalDisp
<< " total distance = " << totalDist << endl; << " total distance = " << totalDist << endl;
displacementAccumulator *= relaxation;
for for
( (
Triangulation::Finite_vertices_iterator vit = finite_vertices_begin(); Triangulation::Finite_vertices_iterator vit = finite_vertices_begin();