diff --git a/examples/DIIID-like_SLAYER_example/gpec.toml b/examples/DIIID-like_SLAYER_example/gpec.toml index d5f74e8da7..4104897673 100644 --- a/examples/DIIID-like_SLAYER_example/gpec.toml +++ b/examples/DIIID-like_SLAYER_example/gpec.toml @@ -59,7 +59,7 @@ kinetic_factor = 0.0 # Scaling of kinetic matrices (0 = ideal path; >0 eulerlagrange_tolerance = 1e-10# Relative tolerance for ODE integration of Euler-Lagrange equations save_interval = 1 # Save every Nth ODE step (1=all). Always saves near rational surfaces. singfac_min = 1e-4 # Fractional distance from rational q at which ideal jump enforced -renorm_threshold = 1e3 # Column-norm threshold that triggers solution renormalization +renorm_threshold = 1e3 # Forward: U₁ condition number that triggers Gaussian reduction; Riccati: entry size that triggers renormalization # Integrator selection and domain truncation (see ForceFreeStatesControl docstring for details) integrator = "riccati" # Integration formalism: "forward" (dense ξ, needed for [PerturbedEquilibrium]/kinetic), "riccati" (chunked propagator BVP, unlocks the singular-surface Δ′ matrix), or "galerkin" (RDCON outer-region singular Galerkin Δ′, with the optional RPEC inner-layer match) diff --git a/examples/DIIID-like_error_field_example/gpec.toml b/examples/DIIID-like_error_field_example/gpec.toml index 8282d285f3..cb2601136c 100644 --- a/examples/DIIID-like_error_field_example/gpec.toml +++ b/examples/DIIID-like_error_field_example/gpec.toml @@ -62,7 +62,7 @@ kinetic_factor = 0.0 # Scaling of kinetic matrices (0 = ideal path; >0 eulerlagrange_tolerance = 1e-10 # Relative tolerance for ODE integration of Euler-Lagrange equations save_interval = 1 # Save every Nth ODE step (1=all). Always saves near rational surfaces. singfac_min = 1e-4 # Fractional distance from rational q at which ideal jump enforced -renorm_threshold = 1e3 # Column-norm threshold that triggers solution renormalization +renorm_threshold = 1e3 # Forward: U₁ condition number that triggers Gaussian reduction; Riccati: entry size that triggers renormalization # Integrator selection and domain truncation (see ForceFreeStatesControl docstring for details) integrator = "forward" # Integration formalism: "forward" (dense ξ, needed for [PerturbedEquilibrium]/kinetic), "riccati" (chunked propagator BVP, unlocks the singular-surface Δ′ matrix), or "galerkin" (RDCON outer-region singular Galerkin Δ′, with the optional RPEC inner-layer match) diff --git a/examples/DIIID-like_gal_resistive_example/gpec.toml b/examples/DIIID-like_gal_resistive_example/gpec.toml index ddeefd19fc..01912bb827 100644 --- a/examples/DIIID-like_gal_resistive_example/gpec.toml +++ b/examples/DIIID-like_gal_resistive_example/gpec.toml @@ -58,7 +58,7 @@ kinetic_factor = 0.0 # Scaling of kinetic matrices (0 = ideal path; >0 eulerlagrange_tolerance = 1e-10# Relative tolerance for ODE integration of Euler-Lagrange equations save_interval = 1 # Save every Nth ODE step (1=all). Always saves near rational surfaces. singfac_min = 1e-4 # Fractional distance from rational q at which ideal jump enforced -renorm_threshold = 1e3 # Column-norm threshold that triggers solution renormalization +renorm_threshold = 1e3 # Forward: U₁ condition number that triggers Gaussian reduction; Riccati: entry size that triggers renormalization # Integrator selection and domain truncation (see ForceFreeStatesControl docstring for details) integrator = "galerkin" # Integration formalism: "forward" (dense ξ, needed for [PerturbedEquilibrium]/kinetic), "riccati" (chunked propagator BVP, unlocks the singular-surface Δ′ matrix), or "galerkin" (RDCON outer-region singular Galerkin Δ′, with the optional RPEC inner-layer match) diff --git a/examples/DIIID-like_gal_resistive_pe_example/gpec.toml b/examples/DIIID-like_gal_resistive_pe_example/gpec.toml index 0c86a0348d..a52d39a0d9 100644 --- a/examples/DIIID-like_gal_resistive_pe_example/gpec.toml +++ b/examples/DIIID-like_gal_resistive_pe_example/gpec.toml @@ -59,7 +59,7 @@ kinetic_factor = 0.0 # Scaling of kinetic matrices (0 = ideal path; >0 eulerlagrange_tolerance = 1e-10# Relative tolerance for ODE integration of Euler-Lagrange equations save_interval = 1 # Save every Nth ODE step (1=all). Always saves near rational surfaces. singfac_min = 1e-4 # Fractional distance from rational q at which ideal jump enforced -renorm_threshold = 1e3 # Column-norm threshold that triggers solution renormalization +renorm_threshold = 1e3 # Forward: U₁ condition number that triggers Gaussian reduction; Riccati: entry size that triggers renormalization # Integrator selection and domain truncation (see ForceFreeStatesControl docstring for details) integrator = "galerkin" # Integration formalism: "forward" (dense ξ, needed for [PerturbedEquilibrium]/kinetic), "riccati" (chunked propagator BVP, unlocks the singular-surface Δ′ matrix), or "galerkin" (RDCON outer-region singular Galerkin Δ′, with the optional RPEC inner-layer match) diff --git a/examples/DIIID-like_ideal_example/gpec.toml b/examples/DIIID-like_ideal_example/gpec.toml index 2f1345eca3..6c830c75f9 100644 --- a/examples/DIIID-like_ideal_example/gpec.toml +++ b/examples/DIIID-like_ideal_example/gpec.toml @@ -57,7 +57,7 @@ kinetic_factor = 0.0 # Scaling of kinetic matrices (0 = ideal path; >0 eulerlagrange_tolerance = 1e-10 # Relative tolerance for ODE integration of Euler-Lagrange equations save_interval = 1 # Save every Nth ODE step (1=all). Always saves near rational surfaces. singfac_min = 1e-4 # Fractional distance from rational q at which ideal jump enforced -renorm_threshold = 1e3 # Column-norm threshold that triggers solution renormalization +renorm_threshold = 1e3 # Forward: U₁ condition number that triggers Gaussian reduction; Riccati: entry size that triggers renormalization # Integrator selection and domain truncation (see ForceFreeStatesControl docstring for details) integrator = "forward" # Integration formalism: "forward" (dense ξ, needed for [PerturbedEquilibrium]/kinetic), "riccati" (chunked propagator BVP, unlocks the singular-surface Δ′ matrix), or "galerkin" (RDCON outer-region singular Galerkin Δ′, with the optional RPEC inner-layer match) diff --git a/examples/DIIID-like_ideal_multi_n_example/gpec.toml b/examples/DIIID-like_ideal_multi_n_example/gpec.toml index e4cb5c3434..d0d6987988 100644 --- a/examples/DIIID-like_ideal_multi_n_example/gpec.toml +++ b/examples/DIIID-like_ideal_multi_n_example/gpec.toml @@ -59,7 +59,7 @@ kinetic_factor = 0.0 # Scaling of kinetic matrices (0 = ideal path; >0 eulerlagrange_tolerance = 1e-10 # Relative tolerance for ODE integration of Euler-Lagrange equations save_interval = 1 # Save every Nth ODE step (1=all). Always saves near rational surfaces. singfac_min = 1e-4 # Fractional distance from rational q at which ideal jump enforced -renorm_threshold = 1e3 # Column-norm threshold that triggers solution renormalization +renorm_threshold = 1e3 # Forward: U₁ condition number that triggers Gaussian reduction; Riccati: entry size that triggers renormalization # Integrator selection and domain truncation (see ForceFreeStatesControl docstring for details) integrator = "forward" # Integration formalism: "forward" (dense ξ, needed for [PerturbedEquilibrium]/kinetic), "riccati" (chunked propagator BVP, unlocks the singular-surface Δ′ matrix), or "galerkin" (RDCON outer-region singular Galerkin Δ′, with the optional RPEC inner-layer match) diff --git a/examples/DIIID-like_riccati_deltaprime_example/gpec.toml b/examples/DIIID-like_riccati_deltaprime_example/gpec.toml index 8ed214bd97..d1755c7981 100644 --- a/examples/DIIID-like_riccati_deltaprime_example/gpec.toml +++ b/examples/DIIID-like_riccati_deltaprime_example/gpec.toml @@ -59,7 +59,7 @@ kinetic_factor = 0.0 # Scaling of kinetic matrices (0 = ideal path; >0 eulerlagrange_tolerance = 1e-10 # Relative tolerance for ODE integration of Euler-Lagrange equations save_interval = 1 # Save every Nth ODE step (1=all). Always saves near rational surfaces. singfac_min = 1e-4 # Fractional distance from rational q at which ideal jump enforced -renorm_threshold = 1e3 # Column-norm threshold that triggers solution renormalization +renorm_threshold = 1e3 # Forward: U₁ condition number that triggers Gaussian reduction; Riccati: entry size that triggers renormalization # Integrator selection and domain truncation (see ForceFreeStatesControl docstring for details) integrator = "riccati" # Integration formalism: "forward" (dense ξ, needed for [PerturbedEquilibrium]/kinetic), "riccati" (chunked propagator BVP, unlocks the singular-surface Δ′ matrix), or "galerkin" (RDCON outer-region singular Galerkin Δ′, with the optional RPEC inner-layer match) diff --git a/examples/LAR_beta_scan/gpec.toml b/examples/LAR_beta_scan/gpec.toml index bfd5ed0e5d..3afa48b703 100644 --- a/examples/LAR_beta_scan/gpec.toml +++ b/examples/LAR_beta_scan/gpec.toml @@ -59,7 +59,7 @@ mtheta_vacuum = 960 # Number of points used in splines over poloidal eulerlagrange_tolerance = 1e-12 # Relative tolerance for ODE integration of Euler-Lagrange equations singfac_min = 1e-4 # Fractional distance from rational q at which ideal jump enforced -renorm_threshold = 1e3 # Column-norm threshold that triggers solution renormalization +renorm_threshold = 1e3 # Forward: U₁ condition number that triggers Gaussian reduction; Riccati: entry size that triggers renormalization frobenius_order = 6 # Order of the singular-surface (Frobenius) series expansion integrator = "riccati" # Integration formalism: "forward" (dense ξ, needed for [PerturbedEquilibrium]/kinetic), "riccati" (chunked propagator BVP, unlocks the singular-surface Δ′ matrix), or "galerkin" (RDCON outer-region singular Galerkin Δ′, with the optional RPEC inner-layer match) diff --git a/examples/LAR_epsilon_scan/gpec.toml b/examples/LAR_epsilon_scan/gpec.toml index e7ace3ad51..396d41922b 100644 --- a/examples/LAR_epsilon_scan/gpec.toml +++ b/examples/LAR_epsilon_scan/gpec.toml @@ -60,7 +60,7 @@ mtheta_vacuum = 960 # Number of points used in splines over poloidal eulerlagrange_tolerance = 1e-12 # Relative tolerance for ODE integration of Euler-Lagrange equations singfac_min = 1e-4 # Fractional distance from rational q at which ideal jump enforced -renorm_threshold = 1e3 # Column-norm threshold that triggers solution renormalization +renorm_threshold = 1e3 # Forward: U₁ condition number that triggers Gaussian reduction; Riccati: entry size that triggers renormalization frobenius_order = 6 # Order of the singular-surface (Frobenius) series expansion integrator = "riccati" # Integration formalism: "forward" (dense ξ, needed for [PerturbedEquilibrium]/kinetic), "riccati" (chunked propagator BVP, unlocks the singular-surface Δ′ matrix), or "galerkin" (RDCON outer-region singular Galerkin Δ′, with the optional RPEC inner-layer match) diff --git a/examples/LAR_ideal_match_test/gpec.toml b/examples/LAR_ideal_match_test/gpec.toml index 3ba233f0e0..886e513707 100644 --- a/examples/LAR_ideal_match_test/gpec.toml +++ b/examples/LAR_ideal_match_test/gpec.toml @@ -56,7 +56,7 @@ mtheta_vacuum = 960 # Number of points used in splines over poloidal eulerlagrange_tolerance = 1e-12 # Relative tolerance for ODE integration of Euler-Lagrange equations singfac_min = 1e-4 # Fractional distance from rational q at which ideal jump enforced -renorm_threshold = 1e3 # Column-norm threshold that triggers solution renormalization +renorm_threshold = 1e3 # Forward: U₁ condition number that triggers Gaussian reduction; Riccati: entry size that triggers renormalization frobenius_order = 6 # Power-series order for the singular-surface asymptotics save_interval = 1 # Save every Nth ODE step (1=all). Always saves near rational surfaces. diff --git a/examples/LAR_resistive_match_test/gpec.toml b/examples/LAR_resistive_match_test/gpec.toml index 6ff7db22c9..c0ac1b6cea 100644 --- a/examples/LAR_resistive_match_test/gpec.toml +++ b/examples/LAR_resistive_match_test/gpec.toml @@ -57,7 +57,7 @@ mtheta_vacuum = 960 # Number of points used in splines over poloidal eulerlagrange_tolerance = 1e-12 # Relative tolerance for ODE integration of Euler-Lagrange equations singfac_min = 1e-4 # Fractional distance from rational q at which ideal jump enforced -renorm_threshold = 1e3 # Column-norm threshold that triggers solution renormalization +renorm_threshold = 1e3 # Forward: U₁ condition number that triggers Gaussian reduction; Riccati: entry size that triggers renormalization frobenius_order = 6 # Power-series order for the singular-surface asymptotics save_interval = 1 # Save every Nth ODE step (1=all). Always saves near rational surfaces. diff --git a/examples/Solovev_ideal_example/gpec.toml b/examples/Solovev_ideal_example/gpec.toml index eded9dce8f..bd292e40a3 100644 --- a/examples/Solovev_ideal_example/gpec.toml +++ b/examples/Solovev_ideal_example/gpec.toml @@ -75,7 +75,7 @@ kinetic_source = "fixed" # Kinetic matrix source: "fixed" test matrices, or kinetic_factor = 0.0 # Scaling of kinetic matrices (0 = ideal path; >0 enables kinetic mode) eulerlagrange_tolerance = 1e-7 # Relative tolerance for ODE integration of Euler-Lagrange equations singfac_min = 1e-4 # Fractional distance from rational q at which ideal jump enforced -renorm_threshold = 1e3 # Column-norm threshold that triggers solution renormalization +renorm_threshold = 1e3 # Forward: U₁ condition number that triggers Gaussian reduction; Riccati: entry size that triggers renormalization save_interval = 1 # Save every Nth ODE step (1=all). Always saves near rational surfaces. # Integrator selection and domain truncation (see ForceFreeStatesControl docstring for details) diff --git a/examples/Solovev_ideal_example_3D/gpec.toml b/examples/Solovev_ideal_example_3D/gpec.toml index 1ef0d3f5c9..08a12beb76 100644 --- a/examples/Solovev_ideal_example_3D/gpec.toml +++ b/examples/Solovev_ideal_example_3D/gpec.toml @@ -44,7 +44,7 @@ kinetic_source = "fixed" # Kinetic matrix source: "fixed" test matrices, or kinetic_factor = 0.0 # Scaling of kinetic matrices (0 = ideal path; >0 enables kinetic mode) eulerlagrange_tolerance = 1e-7 # Relative tolerance for ODE integration of Euler-Lagrange equations singfac_min = 1e-4 # Fractional distance from rational q at which ideal jump enforced -renorm_threshold = 1e3 # Column-norm threshold that triggers solution renormalization +renorm_threshold = 1e3 # Forward: U₁ condition number that triggers Gaussian reduction; Riccati: entry size that triggers renormalization save_interval = 1 # Save every Nth ODE step (1=all). Always saves near rational surfaces. # Integrator selection and domain truncation (see ForceFreeStatesControl docstring for details) diff --git a/examples/Solovev_ideal_example_multi_n/gpec.toml b/examples/Solovev_ideal_example_multi_n/gpec.toml index 949579bf6a..d6f6d1097c 100644 --- a/examples/Solovev_ideal_example_multi_n/gpec.toml +++ b/examples/Solovev_ideal_example_multi_n/gpec.toml @@ -55,7 +55,7 @@ kinetic_source = "fixed" # Kinetic matrix source: "fixed" test matrices, or kinetic_factor = 0.0 # Scaling of kinetic matrices (0 = ideal path; >0 enables kinetic mode) eulerlagrange_tolerance = 1e-7 # Relative tolerance for ODE integration of Euler-Lagrange equations singfac_min = 1e-4 # Fractional distance from rational q at which ideal jump enforced -renorm_threshold = 1e3 # Column-norm threshold that triggers solution renormalization +renorm_threshold = 1e3 # Forward: U₁ condition number that triggers Gaussian reduction; Riccati: entry size that triggers renormalization # Integrator selection and domain truncation (see ForceFreeStatesControl docstring for details). # The multi-n Δ' matrix has open issues and is skipped with a warning; the energies stay valid. diff --git a/examples/Solovev_ideal_example_multi_n/single_n_1/gpec.toml b/examples/Solovev_ideal_example_multi_n/single_n_1/gpec.toml index 19a2cfeb7a..818e30f420 100644 --- a/examples/Solovev_ideal_example_multi_n/single_n_1/gpec.toml +++ b/examples/Solovev_ideal_example_multi_n/single_n_1/gpec.toml @@ -54,7 +54,7 @@ kinetic_source = "fixed" # Kinetic matrix source: "fixed" test matrices, or kinetic_factor = 0.0 # Scaling of kinetic matrices (0 = ideal path; >0 enables kinetic mode) eulerlagrange_tolerance = 1e-7 # Relative tolerance for ODE integration of Euler-Lagrange equations singfac_min = 1e-4 # Fractional distance from rational q at which ideal jump enforced -renorm_threshold = 1e3 # Column-norm threshold that triggers solution renormalization +renorm_threshold = 1e3 # Forward: U₁ condition number that triggers Gaussian reduction; Riccati: entry size that triggers renormalization write_outputs_to_HDF5 = true # Write outputs to the HDF5 file HDF5_filename = "euler_n1.h5" # Output HDF5 filename # Solovev analytic equilibrium parameters (eq_type = "sol"); see SolovevConfig in src/Equilibrium. diff --git a/examples/Solovev_ideal_example_multi_n/single_n_2/gpec.toml b/examples/Solovev_ideal_example_multi_n/single_n_2/gpec.toml index c8a2708d09..617667fcc5 100644 --- a/examples/Solovev_ideal_example_multi_n/single_n_2/gpec.toml +++ b/examples/Solovev_ideal_example_multi_n/single_n_2/gpec.toml @@ -54,7 +54,7 @@ kinetic_source = "fixed" # Kinetic matrix source: "fixed" test matrices, or kinetic_factor = 0.0 # Scaling of kinetic matrices (0 = ideal path; >0 enables kinetic mode) eulerlagrange_tolerance = 1e-7 # Relative tolerance for ODE integration of Euler-Lagrange equations singfac_min = 1e-4 # Fractional distance from rational q at which ideal jump enforced -renorm_threshold = 1e3 # Column-norm threshold that triggers solution renormalization +renorm_threshold = 1e3 # Forward: U₁ condition number that triggers Gaussian reduction; Riccati: entry size that triggers renormalization write_outputs_to_HDF5 = true # Write outputs to the HDF5 file HDF5_filename = "euler_n2.h5" # Output HDF5 filename # Solovev analytic equilibrium parameters (eq_type = "sol"); see SolovevConfig in src/Equilibrium. diff --git a/examples/Solovev_kinetic_NTV_example/gpec.toml b/examples/Solovev_kinetic_NTV_example/gpec.toml index 024ad168a9..2d12c0046b 100644 --- a/examples/Solovev_kinetic_NTV_example/gpec.toml +++ b/examples/Solovev_kinetic_NTV_example/gpec.toml @@ -72,7 +72,7 @@ kinetic_source = "fixed" # Kinetic matrix source: "fixed" test matrices, or kinetic_factor = 0.0 # Scaling of kinetic matrices (0 = ideal path; >0 enables kinetic mode) eulerlagrange_tolerance = 1e-7 # Relative tolerance for ODE integration of Euler-Lagrange equations singfac_min = 1e-4 # Fractional distance from rational q at which ideal jump enforced -renorm_threshold = 1e3 # Column-norm threshold that triggers solution renormalization +renorm_threshold = 1e3 # Forward: U₁ condition number that triggers Gaussian reduction; Riccati: entry size that triggers renormalization save_interval = 1 # Save every Nth ODE step (1=all). Always saves near rational surfaces. # Integrator selection and domain truncation (see ForceFreeStatesControl docstring for details) diff --git a/examples/Solovev_kinetic_calculated_example/gpec.toml b/examples/Solovev_kinetic_calculated_example/gpec.toml index 60a9fe8b6f..2227d90c18 100644 --- a/examples/Solovev_kinetic_calculated_example/gpec.toml +++ b/examples/Solovev_kinetic_calculated_example/gpec.toml @@ -69,7 +69,7 @@ kinetic_factor = 1.0 # Full-strength kinetic matrices (the "calculated" integrator = "forward" # Integration formalism: "forward" (dense ξ, needed for [PerturbedEquilibrium]/kinetic), "riccati" (chunked propagator BVP, unlocks the singular-surface Δ′ matrix), or "galerkin" (RDCON outer-region singular Galerkin Δ′, with the optional RPEC inner-layer match) eulerlagrange_tolerance = 1e-7 # Relative tolerance for ODE integration of Euler-Lagrange equations singfac_min = 1e-4 # Fractional distance from rational q at which ideal jump enforced -renorm_threshold = 1e3 # Column-norm threshold that triggers solution renormalization +renorm_threshold = 1e3 # Forward: U₁ condition number that triggers Gaussian reduction; Riccati: entry size that triggers renormalization write_outputs_to_HDF5 = true # Write outputs to the HDF5 file verbose = false # Enable verbose logging diff --git a/examples/Solovev_kinetic_multiion_example/gpec.toml b/examples/Solovev_kinetic_multiion_example/gpec.toml index 679ecd4a9a..23f61ababb 100644 --- a/examples/Solovev_kinetic_multiion_example/gpec.toml +++ b/examples/Solovev_kinetic_multiion_example/gpec.toml @@ -73,7 +73,7 @@ kinetic_source = "fixed" # Kinetic matrix source: "fixed" test matrices, or kinetic_factor = 0.0 # Scaling of kinetic matrices (0 = ideal path; >0 enables kinetic mode) eulerlagrange_tolerance = 1e-7 # Relative tolerance for ODE integration of Euler-Lagrange equations singfac_min = 1e-4 # Fractional distance from rational q at which ideal jump enforced -renorm_threshold = 1e3 # Column-norm threshold that triggers solution renormalization +renorm_threshold = 1e3 # Forward: U₁ condition number that triggers Gaussian reduction; Riccati: entry size that triggers renormalization save_interval = 1 # Save every Nth ODE step (1=all). Always saves near rational surfaces. # Integration-range truncation (see ForceFreeStatesControl docstring for details) diff --git a/examples/a10_kinetic_example/gpec.toml b/examples/a10_kinetic_example/gpec.toml index fe8544c9af..9cd6d86911 100644 --- a/examples/a10_kinetic_example/gpec.toml +++ b/examples/a10_kinetic_example/gpec.toml @@ -52,7 +52,7 @@ kinetic_factor = 1.0 # Scaling of kinetic matrices (0 = ideal path; >0 integrator = "forward" # Integration formalism: "forward" (dense ξ, needed for [PerturbedEquilibrium]/kinetic), "riccati" (chunked propagator BVP, unlocks the singular-surface Δ′ matrix), or "galerkin" (RDCON outer-region singular Galerkin Δ′, with the optional RPEC inner-layer match) eulerlagrange_tolerance = 1e-7 # Relative tolerance for ODE integration of Euler-Lagrange equations singfac_min = 1e-4 # Fractional distance from rational q at which ideal jump enforced -renorm_threshold = 1e3 # Column-norm threshold that triggers solution renormalization +renorm_threshold = 1e3 # Forward: U₁ condition number that triggers Gaussian reduction; Riccati: entry size that triggers renormalization write_outputs_to_HDF5 = true # Write outputs to the HDF5 file force_termination = true # Stop after force-free states — the kinetic stability eigenvalues are the result of interest diff --git a/src/ForceFreeStates/CoreTypes.jl b/src/ForceFreeStates/CoreTypes.jl index 5703ae0a58..374dcdc06c 100644 --- a/src/ForceFreeStates/CoreTypes.jl +++ b/src/ForceFreeStates/CoreTypes.jl @@ -128,9 +128,9 @@ gpec.toml. - `delta_mlow::Int` - Expands lower bound of Fourier harmonics by delta_mlow - `delta_mhigh::Int` - Expands upper bound of Fourier harmonics by delta_mhigh - `eulerlagrange_tolerance::Float64` - Relative tolerance for ODE integration of Euler-Lagrange equations - - `renorm_threshold::Float64` - Critical value of unorm ratio to trigger solution normalization. In the standard path it triggers Gaussian reduction; in the Riccati path it triggers `renormalize_riccati_inplace!`. Default `1e3`. The trigger compares column-norm growth, not conditioning, so near-parallel columns can leave an error in the free-boundary energies that does not shrink with `eulerlagrange_tolerance`. + - `renorm_threshold::Float64` - Normalization threshold, default `1e3`. Forward path: the condition number of the column-normalized U₁ above which a Gaussian reduction is applied; the reduction pivots on U₁, so its rounding error and that of the reconstructed `u_store` scale as eps·`renorm_threshold` (values ≥ 1e10 lose digits). Riccati path: the largest entry of U₁ or U₂ above which `renormalize_riccati_inplace!` runs. - `numsteps_init::Int` - Initial array size for ODE data storage - - `numunorms_init::Int` - Initial array size for solution normalization data + - `numunorms_init::Int` - Initial capacity of the Gaussian-reduction storage; it grows as needed - `singfac_min::Float64` - Fractional distance from rational q at which ideal jump condition is enforced - `truncate_at_rational_offset::Bool` - Truncate the integration domain at `(last_rational_q + rational_offset_fraction) / n` rather than at `qhigh` / `psihigh`. Fortran STRIDE found that truncating ~20 % above the outermost rational (`rational_offset_fraction = 0.2`) avoids a numerical kink instability in δW that appears when the integration ends too close to or just below a rational surface. **For diverted equilibria where q → ∞ at the separatrix** (e.g. DIII-D geqdsks, the bulk of production use) this costs negligible physical domain because rationals get arbitrarily dense near the LCFS — `truncate_at_rational_offset = true` is the safe and recommended default. **For limited circular / analytical equilibria with finite q at the edge** (Solovev, LAR scans), rationals are sparse and 20 % above the last rational chops off too much edge, so set `truncate_at_rational_offset = false` and let `qhigh` / `psihigh` control the truncation. Multi-`n` runs are not supported by this truncation (the "outermost rational + rational_offset_fraction / n" depends on which `n`); when `truncate_at_rational_offset = true` with `nn_low != nn_high`, `sing_lim!` warns and falls back to `qhigh` / `psihigh`. Default `true`. - `psilim_from_layer_overlap::Bool` - Cap the integration domain where adjacent rational surfaces' resistive layers overlap, after Fitzpatrick, Nucl. Fusion 2025 Sect. 5.9: past that point no surface retains a well-separated inner region. Applied as an upper bound on `qlim` at the top of `sing_lim!`, so `rational_offset_fraction` / `qhigh` still select the final surface from inside it. The scan runs whenever the run's `[SLAYER]` section names a readable `profile_file` — the same profiles and χ⊥(ψ) the SLAYER analysis uses — and is recorded under `ForceFreeStates/LayerOverlap/` either way; this flag only decides whether it constrains the domain. It resolves that file from the run's TOML, so the programmatic `solve(prob, alg)` entry point cannot run it and the flag is inert there (with a warning). Off on every shipped deck; with the shipped DIII-D-like profiles the overlap point (ψ ≈ 0.9985) lies outside the 0.995 decks' domain but inside the SLAYER deck's 0.9995. See the integration-domain truncation section of the stability documentation. Default `false`. diff --git a/src/ForceFreeStates/EulerLagrange.jl b/src/ForceFreeStates/EulerLagrange.jl index ff8ed1ec5c..43e347f2a9 100644 --- a/src/ForceFreeStates/EulerLagrange.jl +++ b/src/ForceFreeStates/EulerLagrange.jl @@ -44,7 +44,7 @@ and a small set of temporary matrices and factors used to compute singular-layer - `numpert_total::Int` - Total number of Fourier mode combinations (m × n) used in the calculation. - - `numunorms_init::Int` - Initial allocation size for the number of normalization operations recorded. + - `numunorms_init::Int` - Initial capacity for recorded Gaussian reductions. - `msing::Int` - Number of singular surfaces in the equilibrium (used to size asymptotic coefficient arrays). @@ -376,7 +376,7 @@ end forward_eulerlagrange_integration(ctrl, equil, mats, intr; verbose=ctrl.verbose) -> (odet, nothing, nothing, nothing) Forward branch of [`eulerlagrange_integration`](@ref): integrates chunk by chunk from the axis, -applying Gaussian reduction whenever a solution norm ratio exceeds `ctrl.renorm_threshold` and undoing it +applying Gaussian reduction whenever the column-normalized U₁ is worse conditioned than `ctrl.renorm_threshold` and undoing it via `transform_u!` at the end, so `odet.u_store` comes back dense in the axis basis. Call directly to force this branch regardless of `ctrl.integrator`; `verbose` overrides `ctrl.verbose` for progress logging. @@ -902,8 +902,10 @@ Errors when the solver stops short of the interval's end (e.g. the step size und function solve_el(prob, rtol; callback=COLUMN_ABSTOL_CALLBACK) sol = solve(prob, Vern9(); reltol=rtol, abstol=column_abstol(prob.u0, rtol), callback, save_everystep=false, save_end=true) SciMLBase.successful_retcode(sol) || - error("Euler-Lagrange integration aborted at ψ = $(@sprintf("%.6f", sol.t[end])) before ψ = $(@sprintf("%.6f", prob.tspan[2])) " * - "(retcode $(sol.retcode)). Loosen eulerlagrange_tolerance or refine the ψ grid; for kinetic runs, lower kinetic_factor.") + error( + "Euler-Lagrange integration aborted at ψ = $(@sprintf("%.6f", sol.t[end])) before ψ = $(@sprintf("%.6f", prob.tspan[2])) " * + "(retcode $(sol.retcode)). Loosen eulerlagrange_tolerance or refine the ψ grid; for kinetic runs, lower kinetic_factor." + ) return sol end @@ -994,13 +996,11 @@ end """ compute_solution_norms!(u::Array{ComplexF64,3}, odet::OdeState, ctrl::ForceFreeStatesControl, intr::ForceFreeStatesInternal, sing_flag::Bool; resonant_rows=Int[]) -Computes norms of the solution vectors of the array `u` and normalizes them -if this is not the first call after a fixup. Formerly `ode_unorm!`. -Throws an error if any vector norm is zero. It then compares the variation in norms -relative to initial values after a fixup, and applies the Gaussian reduction via -`apply_gaussian_reduction!` if the variation exceeds `ctrl.renorm_threshold` or if `sing_flag` is true. -Performs the same function as `ode_unorm` in the Fortran code, with minor differences in indexing -and array handling. +Computes the U₁ column norms of `u`, relative to the last reduction unless this is the first call after one +(they set the reduction's pivot order). Formerly `ode_unorm!`. Throws an error if any norm is zero. Applies +`apply_gaussian_reduction!` at a singular surface or when the condition number of the column-normalized U₁ +exceeds `ctrl.renorm_threshold`. Fortran `ode_unorm` triggers on the column-norm spread instead, which misses columns that +grow alike and turn near-parallel. Note that we pass `u` as an argument to reduce the number of copies that are necessary in the integration callback, since otherwise we'd need to copy from @@ -1012,10 +1012,6 @@ operate on `u` directly without extra copies. - u: Current solution vector array, updated in-place if fixfac is called - sing_flag: Indicates if normalization is occuring at a singular surface or not - resonant_rows: Resonant rows at an ideal crossing; when given, the reduction always runs and pivots on them - -### TODOs - -Add resizing logic for unorm arrays when ifix exceeds allocated size """ function compute_solution_norms!(u::Array{ComplexF64,3}, odet::OdeState, ctrl::ForceFreeStatesControl, intr::ForceFreeStatesInternal, sing_flag::Bool; resonant_rows=Int[]) @@ -1039,17 +1035,11 @@ function compute_solution_norms!(u::Array{ComplexF64,3}, odet::OdeState, ctrl::F if !odet.new odet.unorm ./= odet.unorm0 end - uratio = maximum(odet.unorm) / minimum(odet.unorm) - # Perform Gaussian reduction if the renorm_threshold ratio is reached or at a singular surface - if uratio > ctrl.renorm_threshold || sing_flag - # TODO: add resizing logic here as well - if odet.ifix < ctrl.numunorms_init - odet.ifix += 1 - else - @warn "unorm storage reached, no longer saving fixfac data. Stability outputs and unorming will be correct, but cannot reconstruct `u`. \n - Increase `numunorms_init` if needed. Automatic resizing will be added in a future version." - end + # Reduce at a singular surface or once the U₁ columns lose independence (1-norm condition estimate of the column-normalized U₁) + @views if sing_flag || cond(UpperTriangular(qr!(u[:, :, 1] ./ norm.(eachcol(u[:, :, 1]))').R), 1) > ctrl.renorm_threshold + odet.ifix == size(odet.fixfac, 3) && grow_reduction_storage!(odet) + odet.ifix += 1 apply_gaussian_reduction!(u, odet, intr, sing_flag; resonant_rows) odet.new = true end @@ -1061,14 +1051,14 @@ end Applies Gaussian reduction to orthogonalize solution vectors in `u`. Formerly `ode_fixup!`. Performs the same function as `ode_fixup` in the Fortran code, except now relevant `fixfac` data are stored in memory instead of dumped to `euler.bin`. -Used when the spread in norms exceeds a threshold or when a rational surface is reached. +Used when U₁ becomes ill-conditioned or when a rational surface is reached. This will update both `u` and relevant fields in `odet` in-place. See the description of `compute_solution_norms!` for more details on the benefits of in-place `u` updates. At an ideal crossing, the first pivots are the `resonant_rows`, each on the remaining column largest -there. Growth order cannot pick the resonant solution if a `renorm_threshold` reduction fired just before the -crossing, since every column has then grown alike. +there. Growth order cannot pick the resonant solution if a reduction fired just before the crossing, +since every column has then grown alike. """ function apply_gaussian_reduction!(u::Array{ComplexF64,3}, odet::OdeState, intr::ForceFreeStatesInternal, sing_flag::Bool; resonant_rows=Int[]) diff --git a/src/ForceFreeStates/Free.jl b/src/ForceFreeStates/Free.jl index 39b5063ce1..fc6a1b6509 100644 --- a/src/ForceFreeStates/Free.jl +++ b/src/ForceFreeStates/Free.jl @@ -132,7 +132,7 @@ calculations and data dumping. # Compute plasma response matrix W = U₂ * U₁⁻¹ wp = zeros(ComplexF64, numpert_total, numpert_total) - @views wp .= (odet.u[:, :, 2] / odet.u[:, :, 1]) ./ equil.psio^2 + @views wp .= (odet.u[:, :, 2] / lu(odet.u[:, :, 1])) ./ equil.psio^2 wv, vac = compute_scaled_wv(ctrl, equil, intr) @@ -276,7 +276,7 @@ wv matrix spline to `free_compute_wv_spline` and pass it in `odet.edge_scan.wvma dV_dpsi = equil.profiles.dVdpsi_spline(odet.psifac) # Compute plasma response matrix - @views wp .= (odet.u[:, :, 2] / odet.u[:, :, 1]) ./ equil.psio^2 + @views wp .= (odet.u[:, :, 2] / lu(odet.u[:, :, 1])) ./ equil.psio^2 # Retrieve raw vacuum matrix from spline and apply singfac analytically at the local q. # Singfac is not pre-applied in the spline (see free_compute_wv_spline) to avoid interpolating diff --git a/src/ForceFreeStates/Result.jl b/src/ForceFreeStates/Result.jl index 4c03700f90..9fbb1ddf35 100644 --- a/src/ForceFreeStates/Result.jl +++ b/src/ForceFreeStates/Result.jl @@ -235,7 +235,7 @@ function build_result( wp = if free_energies !== nothing free_energies.wp elseif odet !== nothing - (odet.u[:, :, 2] / odet.u[:, :, 1]) ./ equil.psio^2 + (odet.u[:, :, 2] / lu(odet.u[:, :, 1])) ./ equil.psio^2 else nothing end diff --git a/src/ForceFreeStates/Utils.jl b/src/ForceFreeStates/Utils.jl index 0d46b94bdb..b2f19a0024 100644 --- a/src/ForceFreeStates/Utils.jl +++ b/src/ForceFreeStates/Utils.jl @@ -41,6 +41,21 @@ function trim_storage!(odet::OdeState) odet.u_store = odet.u_store[:, :, :, 1:odet.step] end +""" + grow_reduction_storage!(odet::OdeState) + +Doubles the capacity of the per-reduction arrays (`fixfac`, `index`, `sing_flag`, `fixstep`, `zeroed_idx`). +""" +function grow_reduction_storage!(odet::OdeState) + nfix = size(odet.fixfac, 3) + odet.fixfac = cat(odet.fixfac, zeros(ComplexF64, size(odet.fixfac, 1), size(odet.fixfac, 2), nfix); dims=3) + odet.index = hcat(odet.index, zeros(Int, size(odet.index, 1), nfix)) + append!(odet.sing_flag, falses(nfix)) + append!(odet.fixstep, zeros(Int64, nfix)) + append!(odet.zeroed_idx, [Int[] for _ in 1:nfix]) + return odet +end + """ truncate_integration!(odet, intr, equil, step) diff --git a/test/runtests_eulerlagrange.jl b/test/runtests_eulerlagrange.jl index ef8b3146fe..8d070e6918 100644 --- a/test/runtests_eulerlagrange.jl +++ b/test/runtests_eulerlagrange.jl @@ -330,7 +330,7 @@ end mpert = 2 odet = GeneralizedPerturbedEquilibrium.ForceFreeStates.OdeState(mpert, 10, 10, 10) intr = GeneralizedPerturbedEquilibrium.ForceFreeStates.ForceFreeStatesInternal(; mpert=mpert) - ctrl = GeneralizedPerturbedEquilibrium.ForceFreeStates.ForceFreeStatesControl(; renorm_threshold=10.0) + ctrl = GeneralizedPerturbedEquilibrium.ForceFreeStates.ForceFreeStatesControl() # Case 1: Basic norm computation odet.u = zeros(ComplexF64, 2, 2, 2) @@ -356,12 +356,18 @@ end GeneralizedPerturbedEquilibrium.ForceFreeStates.compute_solution_norms!(odet.u, odet, ctrl, intr, false) @test odet.unorm[1:intr.mpert] ≈ [1, 1] - # Case 4: Trigger fixup via renorm_threshold + # Case 4: A large norm spread with independent columns does not reduce odet.unorm0 = ones(intr.mpert) - odet.u[:, 1, 1] .= [1000, 0] # large norm - odet.u[:, 2, 1] .= [1, 0] # small norm + odet.u[:, 1, 1] .= [1e8, 0] + odet.u[:, 2, 1] .= [0, 1] GeneralizedPerturbedEquilibrium.ForceFreeStates.compute_solution_norms!(odet.u, odet, ctrl, intr, false) - @test odet.new == true # implies fixup ran + @test odet.new == false && odet.ifix == 0 + + # Case 4b: Near-parallel columns reduce even though they grew alike + odet.u[:, 1, 1] .= [1, 0] + odet.u[:, 2, 1] .= [1, 1e-8] + GeneralizedPerturbedEquilibrium.ForceFreeStates.compute_solution_norms!(odet.u, odet, ctrl, intr, false) + @test odet.new == true && odet.ifix == 1 # Case 5: Trigger fixup via sing_flag odet.new = false @@ -371,6 +377,22 @@ end @test odet.new == true # fixup triggered end + @testset "reduction storage growth" begin + FFS = GeneralizedPerturbedEquilibrium.ForceFreeStates + intr = FFS.ForceFreeStatesInternal(; numpert_total=2) + ctrl = FFS.ForceFreeStatesControl() + odet = FFS.OdeState(2, 10, 1, 1) + for k in 1:3 + odet.u[:, :, 1] .= ComplexF64[1 0.5; 0 1] + odet.new = false + odet.unorm0 .= 1 + FFS.compute_solution_norms!(odet.u, odet, ctrl, intr, true) + end + @test odet.ifix == 3 && size(odet.fixfac, 3) == 4 + @test length(odet.sing_flag) == length(odet.fixstep) == length(odet.zeroed_idx) == size(odet.index, 2) == 4 + @test all(odet.sing_flag[1:3]) && all(odet.fixfac[i, i, k] == 1 for i in 1:2, k in 1:3) + end + @testset "ideal-crossing reduction isolates the resonant harmonic" begin FFS = GeneralizedPerturbedEquilibrium.ForceFreeStates # Column 1 has the largest norm but no resonant (row 3) component; column 2 carries the resonance. @@ -381,8 +403,8 @@ end u0[:, 3, 1] .= [0.2, 2.0, 1.5] u0[:, :, 2] .= 1.0 intr = FFS.ForceFreeStatesInternal(; numpert_total=3) - ctrl = FFS.ForceFreeStatesControl(; renorm_threshold=1e3) - fresh(u) = (odet = FFS.OdeState(3, 10, 10, 1); odet.u .= u; odet) + ctrl = FFS.ForceFreeStatesControl() + fresh(u) = (odet=FFS.OdeState(3, 10, 10, 1); odet.u.=u; odet) odet = fresh(u0) odet.new = false @@ -393,7 +415,7 @@ end @test odet.u[3, 1, 1] == 0 && odet.u[3, 3, 1] == 0 # only the lead column keeps the resonant harmonic @test odet.sing_flag[1] - # A crossing right after a renorm_threshold reduction (new = true) still reduces on the resonant row. + # A crossing right after another reduction (new = true) still reduces on the resonant row. odet = fresh(u0) FFS.compute_solution_norms!(odet.u, odet, ctrl, intr, true; resonant_rows=[3]) @test odet.ifix == 1 && odet.index[1, 1] == 2 && odet.new diff --git a/test/runtests_fullruns.jl b/test/runtests_fullruns.jl index 793513d954..df7e6c009b 100644 --- a/test/runtests_fullruns.jl +++ b/test/runtests_fullruns.jl @@ -10,7 +10,7 @@ using TOML true end - # A renorm_threshold reduction landing just before an ideal crossing must not change which solution the crossing removes. + # A reduction landing just before an ideal crossing must not change which solution the crossing removes. @info "Running Solovev ideal example with frequent Gaussian reductions" @testset "et[1] is independent of the reduction frequency" begin deck = TOML.parsefile(joinpath(ex1, "gpec.toml")) @@ -24,7 +24,7 @@ using TOML end end et_ref = total_energy(1e3) - for renorm_threshold in (2.0, 3.0, 5.0, 10.0) + for renorm_threshold in (3.0, 10.0, 1e2, 1e6) @test total_energy(renorm_threshold) ≈ et_ref rtol = 1e-6 end end diff --git a/test/test_data/regression_solovev_ideal_example/gpec.toml b/test/test_data/regression_solovev_ideal_example/gpec.toml index 2dc2c057c2..5ff8873703 100644 --- a/test/test_data/regression_solovev_ideal_example/gpec.toml +++ b/test/test_data/regression_solovev_ideal_example/gpec.toml @@ -53,7 +53,7 @@ kinetic_source = "fixed" # Kinetic matrix source: "fixed" test matrices, or kinetic_factor = 0.0 # Scaling of kinetic matrices (0 = ideal path; >0 enables kinetic mode) eulerlagrange_tolerance = 1e-7 # Relative tolerance for ODE integration of Euler-Lagrange equations singfac_min = 1e-4 # Fractional distance from rational q at which ideal jump enforced -renorm_threshold = 1e3 # Column-norm threshold that triggers solution renormalization +renorm_threshold = 1e3 # Forward: U₁ condition number that triggers Gaussian reduction; Riccati: entry size that triggers renormalization # Integrator selection and domain truncation (see ForceFreeStatesControl docstring for details) integrator = "forward" # Integration formalism: "forward" (dense ξ, needed for [PerturbedEquilibrium]/kinetic), "riccati" (chunked propagator BVP, unlocks the singular-surface Δ′ matrix), or "galerkin" (RDCON outer-region singular Galerkin Δ′, with the optional RPEC inner-layer match) diff --git a/test/test_data/regression_solovev_ideal_example_multi_n/gpec.toml b/test/test_data/regression_solovev_ideal_example_multi_n/gpec.toml index f87c07b1b1..3011fff1ae 100644 --- a/test/test_data/regression_solovev_ideal_example_multi_n/gpec.toml +++ b/test/test_data/regression_solovev_ideal_example_multi_n/gpec.toml @@ -53,7 +53,7 @@ kinetic_source = "fixed" # Kinetic matrix source: "fixed" test matrices, or kinetic_factor = 0.0 # Scaling of kinetic matrices (0 = ideal path; >0 enables kinetic mode) eulerlagrange_tolerance = 1e-7 # Relative tolerance for ODE integration of Euler-Lagrange equations singfac_min = 1e-4 # Fractional distance from rational q at which ideal jump enforced -renorm_threshold = 1e3 # Column-norm threshold that triggers solution renormalization +renorm_threshold = 1e3 # Forward: U₁ condition number that triggers Gaussian reduction; Riccati: entry size that triggers renormalization # Integrator selection and domain truncation (see ForceFreeStatesControl docstring for details) integrator = "forward" # Integration formalism: "forward" (dense ξ, needed for [PerturbedEquilibrium]/kinetic), "riccati" (chunked propagator BVP, unlocks the singular-surface Δ′ matrix), or "galerkin" (RDCON outer-region singular Galerkin Δ′, with the optional RPEC inner-layer match) diff --git a/test/test_data/regression_solovev_kinetic_calculated/gpec.toml b/test/test_data/regression_solovev_kinetic_calculated/gpec.toml index 30fd5f8544..bdd8176bb6 100644 --- a/test/test_data/regression_solovev_kinetic_calculated/gpec.toml +++ b/test/test_data/regression_solovev_kinetic_calculated/gpec.toml @@ -55,7 +55,7 @@ kinetic_factor = 1.0 # Scaling of kinetic matrices (0 = ideal path; >0 integrator = "forward" # Integration formalism: "forward" (dense ξ, needed for [PerturbedEquilibrium]/kinetic), "riccati" (chunked propagator BVP, unlocks the singular-surface Δ′ matrix), or "galerkin" (RDCON outer-region singular Galerkin Δ′, with the optional RPEC inner-layer match) eulerlagrange_tolerance = 1e-7 # Relative tolerance for ODE integration of Euler-Lagrange equations singfac_min = 1e-4 # Fractional distance from rational q at which ideal jump enforced -renorm_threshold = 1e3 # Column-norm threshold that triggers solution renormalization +renorm_threshold = 1e3 # Forward: U₁ condition number that triggers Gaussian reduction; Riccati: entry size that triggers renormalization write_outputs_to_HDF5 = true # Write outputs to the HDF5 file verbose = false # Enable verbose logging # Solovev analytic equilibrium parameters (eq_type = "sol"); see SolovevConfig in src/Equilibrium. diff --git a/test/test_data/regression_solovev_kinetic_example/gpec.toml b/test/test_data/regression_solovev_kinetic_example/gpec.toml index af9bf78f86..8e2f67ef6f 100644 --- a/test/test_data/regression_solovev_kinetic_example/gpec.toml +++ b/test/test_data/regression_solovev_kinetic_example/gpec.toml @@ -53,7 +53,7 @@ kinetic_source = "fixed" # Kinetic matrix source: "fixed" test matrices, or kinetic_factor = 1e-9 # Scaling of kinetic matrices (0 = ideal path; >0 enables kinetic mode; tiny value just exercises the path) eulerlagrange_tolerance = 1e-7 # Relative tolerance for ODE integration of Euler-Lagrange equations singfac_min = 1e-4 # Fractional distance from rational q at which ideal jump enforced -renorm_threshold = 1e3 # Column-norm threshold that triggers solution renormalization +renorm_threshold = 1e3 # Forward: U₁ condition number that triggers Gaussian reduction; Riccati: entry size that triggers renormalization # Integrator selection and domain truncation (see ForceFreeStatesControl docstring for details) integrator = "forward" # Integration formalism: "forward" (dense ξ, needed for [PerturbedEquilibrium]/kinetic), "riccati" (chunked propagator BVP, unlocks the singular-surface Δ′ matrix), or "galerkin" (RDCON outer-region singular Galerkin Δ′, with the optional RPEC inner-layer match) diff --git a/test/test_data/regression_solovev_kinetic_multi_n/gpec.toml b/test/test_data/regression_solovev_kinetic_multi_n/gpec.toml index bd31bef3e8..39cfd99a24 100644 --- a/test/test_data/regression_solovev_kinetic_multi_n/gpec.toml +++ b/test/test_data/regression_solovev_kinetic_multi_n/gpec.toml @@ -53,7 +53,7 @@ kinetic_source = "fixed" # Kinetic matrix source: "fixed" test matrices, or kinetic_factor = 1e-9 # Scaling of kinetic matrices (0 = ideal path; >0 enables kinetic mode; tiny value just exercises the path) eulerlagrange_tolerance = 1e-7 # Relative tolerance for ODE integration of Euler-Lagrange equations singfac_min = 1e-4 # Fractional distance from rational q at which ideal jump enforced -renorm_threshold = 1e3 # Column-norm threshold that triggers solution renormalization +renorm_threshold = 1e3 # Forward: U₁ condition number that triggers Gaussian reduction; Riccati: entry size that triggers renormalization # Integrator selection and domain truncation (see ForceFreeStatesControl docstring for details) integrator = "forward" # Integration formalism: "forward" (dense ξ, needed for [PerturbedEquilibrium]/kinetic), "riccati" (chunked propagator BVP, unlocks the singular-surface Δ′ matrix), or "galerkin" (RDCON outer-region singular Galerkin Δ′, with the optional RPEC inner-layer match) diff --git a/test/test_data/regression_solovev_kinetic_nuzero/gpec.toml b/test/test_data/regression_solovev_kinetic_nuzero/gpec.toml index 0404c60254..c78003a76a 100644 --- a/test/test_data/regression_solovev_kinetic_nuzero/gpec.toml +++ b/test/test_data/regression_solovev_kinetic_nuzero/gpec.toml @@ -55,7 +55,7 @@ kinetic_factor = 1.0 # Full-strength kinetic matrices (the "calculated" integrator = "forward" # Integration formalism: "forward" (dense ξ, needed for [PerturbedEquilibrium]/kinetic), "riccati" (chunked propagator BVP, unlocks the singular-surface Δ′ matrix), or "galerkin" (RDCON outer-region singular Galerkin Δ′, with the optional RPEC inner-layer match) eulerlagrange_tolerance = 1e-7 # Relative tolerance for ODE integration of Euler-Lagrange equations singfac_min = 1e-4 # Fractional distance from rational q at which ideal jump enforced -renorm_threshold = 1e3 # Column-norm threshold that triggers solution renormalization +renorm_threshold = 1e3 # Forward: U₁ condition number that triggers Gaussian reduction; Riccati: entry size that triggers renormalization write_outputs_to_HDF5 = true # Write outputs to the HDF5 file verbose = false # Enable verbose logging