Class Mesh2DGrid::MView
Defined in File Mesh2DGrid.hpp
Nested Relationships
This class is a nested type of Class Mesh2DGrid.
Class Documentation
-
class MView
Read-only view of the slopes of the mesh spines.
Either a plain view of stored (Nx, Ny-1) values, or computed on each access from an XView and the y coordinates, using exactly the same formula computeSlopesAndLengths() uses to fill the stored values.
Public Functions
-
MView() = default
-
inline MView(std::span<const double> data, const size_t ny)
Construct a plain view of stored slopes.
- Parameters:
data – The (Nx, Ny-1) row-major array of slopes
ny – Number of points in the y direction
-
inline MView(const XView &x, std::span<const double> y)
Construct a view computing slopes on demand.
- Parameters:
x – The x coordinates of the mesh points
y – The y coordinates of the mesh points
-
inline auto operator[](const size_t i, const size_t j) const -> double
Return the slope of the spine segment from (i,j) to (i,j+1)
- Parameters:
i – Index in the x direction
j – Index in the y direction
- Returns:
The slope dy/dx, or bigNum if the segment is vertical
-
MView() = default