build_mesh_2d_uniform_nodal Subroutine

public subroutine build_mesh_2d_uniform_nodal(mesh, npx, npy, x_left, x_right, y_left, y_right)

Build a uniform Cartesian NODAL mesh for the finite-difference (FDM) path. Unlike build_mesh_2d_global's 'uniform' branch (which stores CELL counts and derives FV metrics), this stores NODE counts directly: mesh % nx = npx, mesh % ny = npy, with grid points lying ON both boundaries. The spacing is dx = (x_right - x_left) / (npx - 1) (equal to the FV cell size for the same number of cells). The FV metric arrays (vol, s_xi, s_eta, xc, yc) are left UNALLOCATED on purpose — the uniform FDM residual divides by the scalar dx/dy, not by vol — so this builder does NOT call compute_metrics_2d.

Arguments

Type IntentOptional Attributes Name
type(mesh_2d_t), intent(inout) :: mesh
integer, intent(in) :: npx
integer, intent(in) :: npy
real(kind=wp), intent(in) :: x_left
real(kind=wp), intent(in) :: x_right
real(kind=wp), intent(in) :: y_left
real(kind=wp), intent(in) :: y_right