mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Modify reporting of displacement and distance
This commit is contained in:
@ -67,7 +67,7 @@ void Foam::CV2D::external_flip(Face_handle& f, int i)
|
||||
|
||||
if
|
||||
(
|
||||
CGAL::ON_POSITIVE_SIDE
|
||||
CGAL::ON_POSITIVE_SIDE
|
||||
!= side_of_oriented_circle(n, f->vertex(i)->point())
|
||||
) return;
|
||||
|
||||
@ -147,7 +147,7 @@ void Foam::CV2D::insertPoints
|
||||
}
|
||||
else
|
||||
{
|
||||
Warning
|
||||
Warning
|
||||
<< "Rejecting point " << p << " outside surface" << endl;
|
||||
}
|
||||
}
|
||||
@ -471,7 +471,7 @@ void Foam::CV2D::newPoints(const scalar relaxation)
|
||||
|
||||
// Calculate the centre to edge-centre vector
|
||||
vector2D deltai = vertices[edgei] - defVert0;
|
||||
|
||||
|
||||
// Set the weight for this edge contribution
|
||||
scalar w = 1;
|
||||
|
||||
@ -481,7 +481,7 @@ void Foam::CV2D::newPoints(const scalar relaxation)
|
||||
// alternative weights
|
||||
//w = mag(deltai.x()*ei.y() - deltai.y()*ei.x());
|
||||
//w = magSqr(ei)*mag(deltai);
|
||||
|
||||
|
||||
// Use the following for an ~square mesh
|
||||
// Find the coordinate contributions for this edge delta
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
@ -90,9 +90,9 @@ int main(int argc, char *argv[])
|
||||
<< "Relaxation iteration " << iter << nl
|
||||
<< "~~~~~~~~~~~~~~~~~~~~~~~~" << endl;
|
||||
|
||||
scalar relax =
|
||||
scalar relax =
|
||||
mesh.meshingControls().relaxationFactorStart
|
||||
+
|
||||
+
|
||||
(
|
||||
mesh.meshingControls().relaxationFactorEnd
|
||||
- mesh.meshingControls().relaxationFactorStart
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
EXE_DEBUG = -DFULLDEBUG -g -O0
|
||||
//EXE_DEBUG =
|
||||
//EXE_DEBUG = -DFULLDEBUG -g -O0
|
||||
EXE_NDEBUG = -DNDEBUG
|
||||
|
||||
include $(GENERAL_RULES)/CGAL
|
||||
FFLAGS = -DCGAL_FILES='"${CGAL_PATH}/CGAL/files"'
|
||||
|
||||
EXE_INC = \
|
||||
${EXE_DEBUG} \
|
||||
${EXE_NDEBUG} \
|
||||
${CGAL_INC} \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
-I$(LIB_SRC)/triSurface/lnInclude
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -592,9 +592,9 @@ void Foam::CV3D::relaxPoints(const scalar relaxation)
|
||||
|
||||
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;
|
||||
|
||||
@ -606,11 +606,11 @@ void Foam::CV3D::relaxPoints(const scalar relaxation)
|
||||
|
||||
if (vA->internalPoint())
|
||||
{
|
||||
displacementAccumulator[vA->index()] += dA + dT;
|
||||
displacementAccumulator[vA->index()] += (dA + dT);
|
||||
}
|
||||
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
|
||||
<< " total distance = " << totalDist << endl;
|
||||
|
||||
displacementAccumulator *= relaxation;
|
||||
|
||||
for
|
||||
(
|
||||
Triangulation::Finite_vertices_iterator vit = finite_vertices_begin();
|
||||
|
||||
Reference in New Issue
Block a user