Curvilinear-FDM (FDS) residual on NODAL transformation metrics: R = -(1/J)[ (Fhat_{i+1/2}-Fhat_{i-1/2}) + (Ghat_{j+1/2}-Ghat_{j-1/2}) ] with contravariant face fluxes Fhat = |S_xi| * f_n(qL,qR; n_xi), Ghat = |S_eta| * f_n(qL,qR; n_eta) and S_xi=mesh%sx_xi, S_eta=mesh%sx_eta, J=mesh%jac. Structurally identical to compute_resid_2d_curvilinear (the FVM curvilinear residual); only the metric SOURCE differs — FVM face-area vectors (s_xi/s_eta/vol) become the nodal transformation metrics here. Reconstruction and the contravariant flux machinery are reused verbatim. Freestream/GCL preservation (the Phase 1 gate) relies on the consistent metric evaluation in compute_metrics_fdm_2d: a constant flow telescopes the face fluxes to ~0.
BCs: apply_halos_2d routes the FDM method to the nodal kernel apply_bcs_fdm_2d (duplicate-endpoint-aware periodic wrap, node-mirror reflecting). Reflecting walls reuse the curvilinear weak pressure-wall flux with the nodal metric normal (Phase 4 refines the curvilinear nodal wall); periodic BCs (the Phase 1 gate) need no wall handling.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(solver_state_2d_t), | intent(inout) | :: | state |