Public Member Functions | List of all members
beluga::BaseRegularGrid< Derived, NDim > Class Template Reference

Regularly spaced N dimensional grid base type. More...

#include <regular_grid.hpp>

Inheritance diagram for beluga::BaseRegularGrid< Derived, NDim >:
Inheritance graph
[legend]

Public Member Functions

Eigen::Vector< int, NDim > cell_near (const Eigen::Vector< double, NDim > &p) const
 Compute nearest grid cell coordinates given plane coordinates. More...
 
Eigen::Vector< double, NDim > coordinates_at (const Eigen::Vector< int, NDim > &pi) const
 Compute plane coordinates given grid cell coordinates. More...
 
template<class Range >
auto coordinates_for (Range &&cells) const
 Compute plane coordinates given a range of cell coordinates. More...
 

Detailed Description

template<typename Derived, int NDim>
class beluga::BaseRegularGrid< Derived, NDim >

Regularly spaced N dimensional grid base type.

When instantiated, it satisfies Beluga named requirements: RegularGrid.

Template Parameters
DerivedConcrete regular grid type. It must define Derived::resolution(), as described in Beluga named requirements: RegularGrid.
NDimDimension of the grid.

Definition at line 65 of file regular_grid.hpp.

Member Function Documentation

◆ cell_near()

template<typename Derived , int NDim>
Eigen::Vector<int, NDim> beluga::BaseRegularGrid< Derived, NDim >::cell_near ( const Eigen::Vector< double, NDim > &  p) const
inline

Compute nearest grid cell coordinates given plane coordinates.

Note this is a surjective function.

Parameters
pPlane coordinates.
Returns
Grid cell coordinates.

Definition at line 74 of file regular_grid.hpp.

◆ coordinates_at()

template<typename Derived , int NDim>
Eigen::Vector<double, NDim> beluga::BaseRegularGrid< Derived, NDim >::coordinates_at ( const Eigen::Vector< int, NDim > &  pi) const
inline

Compute plane coordinates given grid cell coordinates.

Note this is an injective function.

Parameters
piGrid cell coordinates.
Returns
Plane coordinates of the cell centroid.

Definition at line 86 of file regular_grid.hpp.

◆ coordinates_for()

template<typename Derived , int NDim>
template<class Range >
auto beluga::BaseRegularGrid< Derived, NDim >::coordinates_for ( Range &&  cells) const
inline

Compute plane coordinates given a range of cell coordinates.

Parameters
cellsRange of grid cell identifiers.
Returns
Range of plane coordinates.

Definition at line 96 of file regular_grid.hpp.


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


beluga
Author(s):
autogenerated on Tue Jul 16 2024 02:59:54