PyREC scaffolding (from YREC development, 7be4133)/ tridi_mod.fGlossary

tridi_mod.f

35 lines · 1 definitions · on GitHub (7be4133)

Python version: tridi_mod.py, 22 lines, on the right (switch to Python above the code).

Variables on this page (7)

a, b, c, d, gama, json, u

Purpose

TRIDI_MOD holds a tridiagonal system $a_i u_{i-1} + b_i u_i + c_i u_{i+1} = d_i$ and its solution, shared between the routines that set up the implicit steps of rotational mixing and the routines that solve them. Shared by 6 routines. It replaces COMMON/TRIDI/ (MHP via Claude, 10/14/26); JSON comes from DIMENSIONS_MOD.

What its variables hold, who sets them, who reads them.

  • A, B, C, D (JSON each): the sub-diagonal, diagonal, super-diagonal and right-hand side. Set by DCOEFT (angular-momentum transport, solved by TRIDIA) and CCOEFT (composition transport, solved by CTRIDI), and by GETQUA (the quadrupole moment, solved in place).
  • U(JSON): the solution, set by TRIDIA, CTRIDI and GETQUA; read by TRIDIA (which turns it into the change of angular momentum), MIXCOM and GETQUA (QUAD in QUADRU_MOD).
  • GAMA(JSON): the Thomas algorithm's work array, set and read by the solvers; DCOEFT also uses it as work space while setting up.

Design

A blanket USE TRIDI_MOD in each routine. The one-letter names A, B, C, D, U are global in every file that uses the module, so a local of the same name added to one of them later would silently be the module's: the hazard RUNLOOP_MOD's header describes (KNOWN_ISSUES.md issue 22).

Definitions

moduleTRIDI_MOD

lines 19–35 · GitHub

Uses modules DIMENSIONS_MOD

Used by (6 units)

CCOEFT, CTRIDI, DCOEFT, GETQUA, MIXCOM, TRIDIA

Change log

The changes since rp_1

Changed since rp_1. New file: COMMON/TRIDI/ as a module.