Template Function pcms::CreateUniformGridFromMesh(Omega_h::Mesh&, LO)

Function Documentation

template<unsigned dim = 2>
UniformGrid<dim> pcms::CreateUniformGridFromMesh(Omega_h::Mesh &mesh, LO cells_per_dim)

Create a uniform grid with equal divisions in all dimensions.

This is a convenience function that creates a uniform grid with the same number of cells in each dimension.

Template Parameters:

dim – Spatial dimension of the mesh (2 or 3)

Parameters:
  • mesh – The Omega_h mesh to create the grid from

  • cells_per_dim – Number of cells per dimension (same for all dimensions)

Returns:

UniformGrid<dim> A uniform grid covering the mesh bounding box