KASKADE 7 development version
|
#include <cellLocator.hh>
Supports finding cell intersections by geometric queries.
GridView |
An instance of CellLocator builds an (boost) RTree with bounding boxes of every cell of a grid and therefore can efficiently compute geometric queries. In particular, this is to be used to find the cell in a grid, which contains a particular point (global coordinate).
Explicit instantiations for Dune::UGGrid<2> and Dune::UGGrid<3> leaf grid views are provided in the file cellLocator.cpp, and are compiled into the library. For other grids views, include cellLocator.hpp, which contains the implementations.
Definition at line 54 of file cellLocator.hh.
Public Types | |
using | ctype = typename GridView::ctype |
using | Position = Dune::FieldVector< ctype, dimension_world > |
using | Cell = typename GridView::template Codim< 0 >::Entity |
Public Member Functions | |
CellLocator (GridView const &gridView) | |
Constructs a locator based on the grids view. More... | |
~CellLocator () | |
ctype | diameter () const |
The diagonal length of the grid's cartesian bounding box. More... | |
std::vector< Cell > | cells () const |
Returns a sequence of all cells. More... | |
std::pair< Cell, double > | closestCell (Position const &pos) const |
Returns a pair consisting of the closest cell to pos and the distance to this cell. More... | |
Static Public Attributes | |
static int const | dimension = GridView::Grid::dimension |
static int const | dimension_world = dimw |
using Kaskade::CellLocator< GridView, dimw >::Cell = typename GridView::template Codim<0>::Entity |
Definition at line 64 of file cellLocator.hh.
using Kaskade::CellLocator< GridView, dimw >::ctype = typename GridView::ctype |
Definition at line 62 of file cellLocator.hh.
using Kaskade::CellLocator< GridView, dimw >::Position = Dune::FieldVector<ctype,dimension_world> |
Definition at line 63 of file cellLocator.hh.
Kaskade::CellLocator< GridView, dimw >::CellLocator | ( | GridView const & | gridView | ) |
Constructs a locator based on the grids view.
Kaskade::CellLocator< GridView, dimw >::~CellLocator | ( | ) |
std::vector< Cell > Kaskade::CellLocator< GridView, dimw >::cells | ( | ) | const |
Returns a sequence of all cells.
The sequence of cells is extracted from the RTree and returned by value, which is a considerable computational effort. The order of cells is unspecified.
std::pair< Cell, double > Kaskade::CellLocator< GridView, dimw >::closestCell | ( | Position const & | pos | ) | const |
Returns a pair consisting of the closest cell to pos and the distance to this cell.
If the point is contained in any of the grid cells, the distance is 0 or negative, a positive distance means that the point is not contained in any of the grid cells. The closest cell and the distance to this cell are returned.
Referenced by Kaskade::nonNestedProlongation().
|
inline |
The diagonal length of the grid's cartesian bounding box.
Definition at line 79 of file cellLocator.hh.
|
static |
Definition at line 60 of file cellLocator.hh.
|
static |
Definition at line 61 of file cellLocator.hh.