KASKADE 7 development version
Public Types | Public Member Functions | Static Public Attributes | List of all members
Kaskade::CellLocator< GridView, dimw > Class Template Reference

More...

#include <cellLocator.hh>

Detailed Description

template<class GridView, int dimw = GridView::Grid::dimension>
class Kaskade::CellLocator< GridView, dimw >

Supports finding cell intersections by geometric queries.

Template Parameters
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< Cellcells () 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
 

Member Typedef Documentation

◆ Cell

template<class GridView , int dimw = GridView::Grid::dimension>
using Kaskade::CellLocator< GridView, dimw >::Cell = typename GridView::template Codim<0>::Entity

Definition at line 64 of file cellLocator.hh.

◆ ctype

template<class GridView , int dimw = GridView::Grid::dimension>
using Kaskade::CellLocator< GridView, dimw >::ctype = typename GridView::ctype

Definition at line 62 of file cellLocator.hh.

◆ Position

template<class GridView , int dimw = GridView::Grid::dimension>
using Kaskade::CellLocator< GridView, dimw >::Position = Dune::FieldVector<ctype,dimension_world>

Definition at line 63 of file cellLocator.hh.

Constructor & Destructor Documentation

◆ CellLocator()

template<class GridView , int dimw = GridView::Grid::dimension>
Kaskade::CellLocator< GridView, dimw >::CellLocator ( GridView const &  gridView)

Constructs a locator based on the grids view.

◆ ~CellLocator()

template<class GridView , int dimw = GridView::Grid::dimension>
Kaskade::CellLocator< GridView, dimw >::~CellLocator ( )

Member Function Documentation

◆ cells()

template<class GridView , int dimw = GridView::Grid::dimension>
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.

◆ closestCell()

template<class GridView , int dimw = GridView::Grid::dimension>
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.

Returns
(cell,distance) tuple

Referenced by Kaskade::nonNestedProlongation().

◆ diameter()

template<class GridView , int dimw = GridView::Grid::dimension>
ctype Kaskade::CellLocator< GridView, dimw >::diameter ( ) const
inline

The diagonal length of the grid's cartesian bounding box.

Definition at line 79 of file cellLocator.hh.

Member Data Documentation

◆ dimension

template<class GridView , int dimw = GridView::Grid::dimension>
int const Kaskade::CellLocator< GridView, dimw >::dimension = GridView::Grid::dimension
static

Definition at line 60 of file cellLocator.hh.

◆ dimension_world

template<class GridView , int dimw = GridView::Grid::dimension>
int const Kaskade::CellLocator< GridView, dimw >::dimension_world = dimw
static

Definition at line 61 of file cellLocator.hh.


The documentation for this class was generated from the following file: