From 10dfba5795b35cd33d76f6a96a6477a4ed012514 Mon Sep 17 00:00:00 2001 From: graham Date: Thu, 12 Feb 2009 19:06:22 +0000 Subject: [PATCH] Writing out of a pointField along with the mesh - allows restarts. Added FCC and BCC initial conditions (commented), their duals are rhombic dodecahedra and bitruncated octahedra respectively. --- .../mesh/generation/CV3DMesher/CV3D.C | 176 +++++++++++++++++- 1 file changed, 174 insertions(+), 2 deletions(-) diff --git a/applications/utilities/mesh/generation/CV3DMesher/CV3D.C b/applications/utilities/mesh/generation/CV3DMesher/CV3D.C index 8afdd857d9..a108c4dbbb 100644 --- a/applications/utilities/mesh/generation/CV3DMesher/CV3D.C +++ b/applications/utilities/mesh/generation/CV3DMesher/CV3D.C @@ -400,7 +400,7 @@ void Foam::CV3D::insertPoints(const fileName& pointFileName) ) ); - insertPoints(points, 0.5*controls_.minCellSize2); + insertPoints(points, 0.25*controls_.minCellSize2); } @@ -427,6 +427,8 @@ void Foam::CV3D::insertGrid() vector delta(xR/ni, yR/nj, zR/nk); + // SC lattice, also a simple cubic lattice + delta *= pow((1.0),-(1.0/3.0)); Random rndGen(1321); @@ -457,12 +459,167 @@ void Foam::CV3D::insertGrid() if (qSurf_.wellInside(p, 0.5*controls_.minCellSize2)) { initialPoints.push_back(Point(p.x(), p.y(), p.z())); - // insert(Point(p.x(), p.y(), p.z()))->index() = nVert++; } } } } + // BCC lattice, the Voronoi diagram of which is a lattice of bitruncated + // octahedron + + // delta *= pow((1.0/2.0),-(1.0/3.0)); + + // Random rndGen(1321); + // scalar pert = controls_.randomPerturbation*cmptMin(delta); + + // std::vector initialPoints; + + // for (int i=0; i initialPoints; + + // for (int i=0; i