mesh_1d_t Derived Type

type, public :: mesh_1d_t

Grid metrics for the 1D node-based scheme.

The nodal fields (x_global, jac_global, x_node, jac) are used by the FDM path. The cell-centered fields (x_cell, dx_cell) are used by the FVM path and are allocated by build_mesh_cellcentered_1d; they are unallocated (and unused) on the FDM path.


Components

Type Visibility Attributes Name Initial
logical, public :: uniform = .true.
integer, public :: n_global = 0
real(kind=wp), public :: dx_uniform = 0.0_wp
real(kind=wp), public :: h_min = 0.0_wp
real(kind=wp), public :: h_left = 0.0_wp
real(kind=wp), public :: h_right = 0.0_wp
real(kind=wp), public, allocatable :: x_global(:)
real(kind=wp), public, allocatable :: jac_global(:)
real(kind=wp), public, allocatable :: x_node(:)
real(kind=wp), public, allocatable :: jac(:)
real(kind=wp), public, allocatable :: x_cell(:)

Cell-center coordinates for the FVM path. Allocated with bounds (1-h:n_cell+h) by build_mesh_cellcentered_1d.

real(kind=wp), public, allocatable :: dx_cell(:)

Cell widths for the FVM path (uniform: all equal dx). Allocated with bounds (1-h:n_cell+h) by build_mesh_cellcentered_1d.

real(kind=wp), public, allocatable :: x_cell_global(:)

Replicated GLOBAL cell-center coordinates for a NON-UNIFORM FVM grid (1:n_cell). Populated by build_mesh_cellcentered_global from the face positions stored in x_global; sliced per rank by build_mesh_cellcentered_local. Unallocated on the uniform FVM path, which recomputes cell centers analytically from x_left/x_right.

real(kind=wp), public, allocatable :: dx_cell_global(:)

Replicated GLOBAL cell widths for a NON-UNIFORM FVM grid (1:n_cell), the cell-centered twin of jac_global. See x_cell_global.