Skip to content
Snippets Groups Projects
Commit 1d39f8a3 authored by mattijs's avatar mattijs
Browse files

ENH: searchableSurface: overlap() function added

parent f5522317
Branches
Tags
No related merge requests found
......@@ -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.
......
......@@ -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.
......
......@@ -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.
......
......@@ -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.
......
......@@ -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.
......
......@@ -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.
......
......@@ -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.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment