mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
initial mattijsLib merge
This commit is contained in:
@ -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];
|
||||
|
||||
|
||||
@ -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;
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
execFlowFunctionObjects.C
|
||||
|
||||
EXE = $(FOAM_USER_APPBIN)/execFlowFunctionObjects
|
||||
EXE = $(FOAM_APPBIN)/execFlowFunctionObjects
|
||||
|
||||
|
||||
@ -1,3 +1,3 @@
|
||||
calcDivPhi.C
|
||||
|
||||
EXE = $(FOAM_USER_APPBIN)/divPhi
|
||||
EXE = $(FOAM_APPBIN)/divPhi
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user