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;

View File

@ -1,4 +1,4 @@
execFlowFunctionObjects.C
EXE = $(FOAM_USER_APPBIN)/execFlowFunctionObjects
EXE = $(FOAM_APPBIN)/execFlowFunctionObjects

View File

@ -1,3 +1,3 @@
calcDivPhi.C
EXE = $(FOAM_USER_APPBIN)/divPhi
EXE = $(FOAM_APPBIN)/divPhi

View File

@ -51,16 +51,15 @@ void dumpBox(const treeBoundBox& bb, const fileName& fName)
pointField boxPoints(bb.points());
edgeList boxEdges(bb.edges());
forAll(boxPoints, i)
{
meshTools::writeOBJ(str, boxPoints[i]);
}
forAll(boxEdges, i)
forAll(treeBoundBox::edges, i)
{
const edge& e = boxEdges[i];
const edge& e = treeBoundBox::edges[i];
str<< "l " << e[0]+1 << ' ' << e[1]+1 << nl;
}