Holds the number of grid points, basis, and quadrature in each direction of the computational grid.
More...
|
| Mesh (size_t isotropic_extents, Spectral::Basis basis, Spectral::Quadrature quadrature) |
| Construct a computational grid with the same number of collocation points in each dimension. More...
|
|
| Mesh (const std::array< size_t, Dim > &extents, Spectral::Basis basis, Spectral::Quadrature quadrature) |
| Construct a computational grid where each dimension can have a different number of collocation points. More...
|
|
| Mesh (const std::array< size_t, Dim > &extents, const std::array< Spectral::Basis, Dim > &bases, const std::array< Spectral::Quadrature, Dim > &quadratures) |
| Construct a computational grid where each dimension can have both a different number and placement of collocation points. More...
|
|
Index< Dim > | extents () const |
| The number of grid points in each dimension of the grid.
|
|
size_t | extents (size_t d) const |
| The number of grid points in dimension d of the grid (zero-indexed).
|
|
size_t | number_of_grid_points () const |
| The total number of grid points in all dimensions. More...
|
|
size_t | storage_index (const Index< Dim > &index) const |
| Returns the 1-dimensional index corresponding to the Dim dimensional index . More...
|
|
std::array< Spectral::Basis, Dim > | basis () const |
| The basis chosen in each dimension of the grid.
|
|
Spectral::Basis | basis (size_t d) const |
| The basis chosen in dimension d of the grid (zero-indexed).
|
|
std::array< Spectral::Quadrature, Dim > | quadrature () const |
| The quadrature chosen in each dimension of the grid.
|
|
Spectral::Quadrature | quadrature (size_t d) const |
| The quadrature chosen in dimension d of the grid (zero-indexed).
|
|
template<size_t N = Dim, Requires<(N > 0 and N==Dim)> = nullptr> |
Mesh< Dim - 1 > | slice_away (size_t d) const |
| Returns a Mesh with dimension d removed (zero-indexed). More...
|
|
template<typename... D, Requires<(sizeof...(D)<=Dim)> = nullptr> |
Mesh< sizeof...(D)> | slice_through (D... d) const |
| Returns a Mesh with the dimensions d , ... present (zero-indexed). More...
|
|
template<size_t SliceDim, Requires<(SliceDim<=Dim)> = nullptr> |
Mesh< SliceDim > | slice_through (const std::array< size_t, SliceDim > &dims) const |
| Returns a Mesh with the dimensions dims present (zero-indexed). More...
|
|
std::array< Mesh< 1 >, Dim > | slices () const |
| Returns the Meshes representing 1D slices of this Mesh. More...
|
|
void | pup (PUP::er &p) |
|
template<size_t Dim>
class Mesh< Dim >
Holds the number of grid points, basis, and quadrature in each direction of the computational grid.
Details
A mesh encapsulates all information necessary to construct the placement of grid points in the computational domain. It does so through a choice of basis functions, quadrature and number of points \(N\) in each dimension. The grid points are the associated collocation points and can be obtained from Spectral::collocation_points(const Mesh<1>&):
{{3, 4}},
{{Spectral::Basis::Legendre, Spectral::Basis::Legendre}},
{{Spectral::Quadrature::Gauss, Spectral::Quadrature::GaussLobatto}}};
const auto collocation_points_in_first_dim =
Holds the number of grid points, basis, and quadrature in each direction of the computational grid.
Definition: Mesh.hpp:53
const DataVector & collocation_points(size_t num_points)
Collocation points.
A simulated physical field can be represented by a DataVector of length number_of_grid_points() that holds the field value on each point of the computational grid. These values are identical to the field's nodal expansion coefficients. They approximate the field by a polynomial of degree \(p=N-1\) through a linear combination of Lagrange polynomials.
- Note
- Because we use a compact bit representation for the mesh, the number of grid points/extents must be fewer than 256 per dimension.
- Template Parameters
-
Dim | the number of dimensions of the computational grid. |