Build the global (whole-domain) mesh from either a uniform specification or a Plot3D grid file. For 'uniform', nx/ny are read from the caller. For 'plot3d', ni/nj are read from the file and nx/ny are written back (intent(inout)) so the caller knows the derived sizes. Calls compute_metrics_2d at the end and propagates its status — a metric failure (e.g. a folded or zero-area cell) fails the build.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(mesh_2d_t), | intent(inout) | :: | mesh | |||
| character(len=*), | intent(in) | :: | grid_type | |||
| character(len=*), | intent(in) | :: | grid_file | |||
| logical, | intent(in) | :: | grid_binary | |||
| integer, | intent(inout) | :: | nx | |||
| integer, | intent(inout) | :: | ny | |||
| 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 | |||
| logical, | intent(out) | :: | is_ok | |||
| character(len=*), | intent(out) | :: | message |