Celeritas
0.5.0-56+6b053cd
|
Map an input grid to an ID type, returning invalid ID if outside bounds. More...
#include <GridIdFinder.hh>
Public Types | |
Type aliases | |
using | argument_type = KeyQuantity |
using | result_type = ValueId |
using | SpanConstGrid = LdgSpan< typename KeyQuantity::value_type const > |
using | SpanConstValue = LdgSpan< result_type const > |
Public Member Functions | |
CELER_FUNCTION | GridIdFinder (SpanConstGrid, SpanConstValue) |
Construct from grid and values. More... | |
CELER_FUNCTION result_type | operator() (argument_type arg) const |
Find the ID corresponding to the given value. | |
Map an input grid to an ID type, returning invalid ID if outside bounds.
The input grid should be a monotonic increasing series, and the corresponding ID values should be one fewer (cell-centered data). Values outside the grid bounds are unassigned, and grid points are attached to the model ID above the corresponding value.
|
inline |
Construct from grid and values.