Compute NODAL transformation metrics for curvilinear FDM from the node coordinates already in mesh%x_node / mesh%y_node (shape (nx, ny), the Plot3D points treated as nodes; unit computational spacing dxi=deta=1).
Allocates (with stat=) and fills: * jac(nx, ny) = x_xiy_eta - x_etay_xi at NODES (must be > 0) * sx_xi(2, nx+1, ny) = (y_eta, -x_eta) at XI-faces * sx_eta(2, nx, ny+1) = (-y_xi, x_xi) at ETA-faces and sets mesh%fdm_curvilinear = .true.
Geometry derivatives AND the transverse face metrics are built from the SAME high-order conservative-flux operator (cons_flux_1d_unit: a symmetric width-w central conservative flux โ 6th order for n>=6 โ closed by high-order extrapolation at boundaries). The nodal derivatives are the undivided difference of that operator's face values (deriv_1d_unit), and the face metric at face iface IS the operator's conservative-flux value of the transverse nodal derivative, so the telescoped first difference of the face metric reproduces the high-order nodal derivative EXACTLY at EVERY node (interior and boundary). Because deriv_xi and deriv_eta are tensor-product operators on separate axes they commute discretely, so with this consistent HIGH-ORDER evaluation the discrete identities Delta_xi(y_eta) - Delta_eta(y_xi) = 0, Delta_xi(x_eta) - Delta_eta(x_xi) = 0 hold to machine precision at every node even on a fully non-separable map โ the constant flow telescopes to round-off (the freestream/GCL gate) WITHOUT capping the curved-grid order at 2 (the high-order metric of Visbal-Gaitonde 2002 / Nonomura-Iizuka-Fujii 2010, design spec ยง5.3).
Face index convention: the xi-face between node i and node i+1 is stored at index i+1 in 1..nx+1, so index 1 is the left boundary face (node 1) and index nx+1 is the right boundary face (node nx). Likewise for eta-faces.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(mesh_2d_t), | intent(inout) | :: | mesh | |||
| logical, | intent(out) | :: | is_ok | |||
| character(len=*), | intent(out) | :: | message |