initial mattijsLib merge

This commit is contained in:
mattijs
2008-04-23 15:51:54 +01:00
parent 7faf688709
commit c731cfdca4
20 changed files with 40 additions and 968 deletions

View File

@ -54,8 +54,8 @@ Description
#include "cellInfo.H"
#include "MeshWave.H"
#include "edgeStats.H"
#include "octreeDataTriSurface.H"
#include "octree.H"
#include "treeDataTriSurface.H"
#include "indexedOctree.H"
using namespace Foam;
@ -185,7 +185,7 @@ void cutBySurface
<< " to the surface ..." << nl << endl;
const pointField& pts = mesh.points();
const octree<octreeDataTriSurface>& tree = querySurf.tree();
const indexedOctree<treeDataTriSurface>& tree = querySurf.tree();
label nRemoved = 0;
@ -193,17 +193,9 @@ void cutBySurface
{
const point& pt = pts[pointI];
// Search in tight bounding box around pt.
treeBoundBox tightest
(
pt - vector(nearDist, nearDist, nearDist),
pt + vector(nearDist, nearDist, nearDist)
);
scalar tightestDist = mag(tightest.max() - tightest.min());
pointIndexHit hitInfo = tree.findNearest(pt, sqr(nearDist));
label triI = tree.findNearest(pt, tightest, tightestDist);
if (triI != -1 && tightestDist < nearDist)
if (hitInfo.hit())
{
const labelList& pCells = mesh.pointCells()[pointI];

View File

@ -45,6 +45,7 @@ using namespace Foam;
int main(int argc, char *argv[])
{
# include "addRegionOption.H"
# include "addTimeOptionsNoConstant.H"
@ -67,7 +68,7 @@ int main(int argc, char *argv[])
runTime.setTime(Times[startTime], startTime);
# include "createPolyMesh.H"
# include "createNamedPolyMesh.H"
bool firstCheck = true;