diff --git a/src/meshTools/searchableSurface/searchableCylinder.H b/src/meshTools/searchableSurface/searchableCylinder.H index f6d17181fdf80ee9825b89b0df01041431a2c946..ad46e7612f73af024e1c0a3ad99264f19f7f4358 100644 --- a/src/meshTools/searchableSurface/searchableCylinder.H +++ b/src/meshTools/searchableSurface/searchableCylinder.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -154,6 +154,17 @@ public: // Usually the element centres (should be of length size()). virtual pointField coordinates() const; + //- Does any part of the surface overlap the supplied bound box? + virtual bool overlaps(const boundBox& bb) const + { + notImplemented + ( + "searchableCylinder::overlaps(const boundBox&) const" + ); + + return false; + } + // Multiple point queries. diff --git a/src/meshTools/searchableSurface/searchablePlane.H b/src/meshTools/searchableSurface/searchablePlane.H index 3a3b467add0a630b49ac4291bf227f952b27107f..2651985f8d89772e4aba047b3768ea18ccd3021c 100644 --- a/src/meshTools/searchableSurface/searchablePlane.H +++ b/src/meshTools/searchableSurface/searchablePlane.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -130,6 +130,17 @@ public: return pointField(1, refPoint()); } + //- Does any part of the surface overlap the supplied bound box? + virtual bool overlaps(const boundBox& bb) const + { + notImplemented + ( + "searchablePlane::overlaps(const boundBox&) const" + ); + + return false; + } + // Multiple point queries. diff --git a/src/meshTools/searchableSurface/searchablePlate.H b/src/meshTools/searchableSurface/searchablePlate.H index 780bcd5c390e1b00385e00fa625cf77e5905e8fb..7f465952a7062dc5dd012a5467b6b8c14b472f13 100644 --- a/src/meshTools/searchableSurface/searchablePlate.H +++ b/src/meshTools/searchableSurface/searchablePlate.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -149,6 +149,17 @@ public: return pointField(1, origin_); } + //- Does any part of the surface overlap the supplied bound box? + virtual bool overlaps(const boundBox& bb) const + { + notImplemented + ( + "searchablePlate::overlaps(const boundBox&) const" + ); + + return false; + } + // Multiple point queries. diff --git a/src/meshTools/searchableSurface/searchableSphere.H b/src/meshTools/searchableSurface/searchableSphere.H index bb82d4fc4aa47e9ec1727924a05fcbb8d0a0605d..946bd8a346524b41013a2ba0093072b8ef5c12e3 100644 --- a/src/meshTools/searchableSurface/searchableSphere.H +++ b/src/meshTools/searchableSurface/searchableSphere.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -138,6 +138,17 @@ public: return pointField(1, centre_); } + //- Does any part of the surface overlap the supplied bound box? + virtual bool overlaps(const boundBox& bb) const + { + notImplemented + ( + "searchableSphere::overlaps(const boundBox&) const" + ); + + return false; + } + // Multiple point queries. diff --git a/src/meshTools/searchableSurface/searchableSurface.H b/src/meshTools/searchableSurface/searchableSurface.H index 26c370c4aed11d9cdc206926682697483c47f073..a748e2c391eddeb0824f08a347796447896f27dd 100644 --- a/src/meshTools/searchableSurface/searchableSurface.H +++ b/src/meshTools/searchableSurface/searchableSurface.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -206,17 +206,8 @@ public: // Usually the element centres (should be of length size()). virtual pointField coordinates() const = 0; - // Does any part of the surface overlap the supplied bound box? - virtual bool overlaps(const boundBox& bb) const - { - notImplemented - ( - "searchableSurface::overlaps(const boundBox& bb) const" - ); - - return false; - } - + //- Does any part of the surface overlap the supplied bound box? + virtual bool overlaps(const boundBox& bb) const = 0; // Single point queries. diff --git a/src/meshTools/searchableSurface/searchableSurfaceCollection.H b/src/meshTools/searchableSurface/searchableSurfaceCollection.H index 81ac620a1082ce61ecaf6c1b272e44981e8ddf84..665c61ceb1c8b043c770abfd348dcebb64467131 100644 --- a/src/meshTools/searchableSurface/searchableSurfaceCollection.H +++ b/src/meshTools/searchableSurface/searchableSurfaceCollection.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -176,6 +176,17 @@ public: // Usually the element centres (should be of length size()). virtual pointField coordinates() const; + //- Does any part of the surface overlap the supplied bound box? + virtual bool overlaps(const boundBox& bb) const + { + notImplemented + ( + "searchableSurfaceCollection::overlaps(const boundBox&) const" + ); + + return false; + } + // Multiple point queries. diff --git a/src/meshTools/searchableSurface/searchableSurfaceWithGaps.H b/src/meshTools/searchableSurface/searchableSurfaceWithGaps.H index bf32421cab5bf02f20a2981620d64e95dc0c87af..ed30a52d22f5c9f3a575ac4af2fa909804d7d70b 100644 --- a/src/meshTools/searchableSurface/searchableSurfaceWithGaps.H +++ b/src/meshTools/searchableSurface/searchableSurfaceWithGaps.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -156,6 +156,14 @@ public: return surface().coordinates(); } + //- Does any part of the surface overlap the supplied bound box? + // Note: use perturbed surface? Since uses boundbox of points and + // not actual intersection chosen to use unperturbed surface. + virtual bool overlaps(const boundBox& bb) const + { + return surface().overlaps(bb); + } + // Multiple point queries.