Loading...
Searching...
No Matches
Grid.hpp
Go to the documentation of this file.
Definition Grid.hpp:24
GridDataPositionFunc(const RawFunctionType &func)
Definition Grid.hpp:29
Vector< double, N > operator()(const Vector< size_t, N > &idx) const
Definition Grid.hpp:40
std::function< Vector< double, N >(const Vector< size_t, N > &)> RawFunctionType
Definition Grid.hpp:27
Vector< double, N > operator()(size_t i, Indices... indices) const
Definition Grid.hpp:35
virtual void SetData(const ConstArrayView1< double > &data)=0
Sets the data from a continuous linear array.
void ParallelForEachCellIndex(const std::function< void(const Vector< size_t, N > &)> &func) const
Invokes the given function func for each grid cell in parallel.
void SetSizeParameters(const Vector< size_t, N > &resolution, const Vector< double, N > &gridSpacing, const Vector< double, N > &origin)
const BoundingBox< double, N > & GetBoundingBox() const
Returns the bounding box of the grid.
std::enable_if_t< M==2, void > ParallelForEachCellIndex(const std::function< void(size_t, size_t)> &func) const
Definition Grid.hpp:135
const Vector< size_t, N > & Resolution() const
Returns the grid resolution.
GridDataPositionFunc< N > CellCenterPosition() const
Returns the function that maps grid index to the cell-center position.
std::enable_if_t< M==3, void > ForEachCellIndex(const std::function< void(size_t, size_t, size_t)> &func) const
Definition Grid.hpp:115
const Vector< double, N > & GridSpacing() const
Returns the grid spacing.
virtual std::string TypeName() const =0
Returns the type name of derived grid.
void SetGrid(const Grid &other)
Sets the size parameters with given grid other.
std::enable_if_t< M==3, void > ParallelForEachCellIndex(const std::function< void(size_t, size_t, size_t)> &func) const
Definition Grid.hpp:143
virtual void GetData(Array1< double > &data) const =0
Fetches the data into a continuous linear array.
bool HasSameShape(const Grid &other) const
Returns true if resolution, grid-spacing and origin are same.
void ForEachCellIndex(const std::function< void(const Vector< size_t, N > &)> &func) const
Invokes the given function func for each grid cell.
std::enable_if_t< M==2, void > ForEachCellIndex(const std::function< void(size_t, size_t)> &func) const
Definition Grid.hpp:108
static std::enable_if_t< IsMatrixSizeStatic< Rows, Cols >(), D > MakeConstant(ValueType val)
Makes a static matrix with constant entries.
Definition MatrixDenseBase-Impl.hpp:152
Definition Matrix.hpp:30
Abstract base class for any serializable class.
Definition Serialization.hpp:22
Definition pybind11Utils.hpp:21
std::shared_ptr< Grid3 > Grid3Ptr
Shared pointer type for Grid3.
Definition Grid.hpp:193
std::shared_ptr< Grid2 > Grid2Ptr
Shared pointer type for Grid.
Definition Grid.hpp:190
1.9.8