SPECTRAX-GK

Contents

  • Quickstart
    • Install
    • Executable demo
    • Geometry path overrides
    • Python demo
    • Run from TOML
    • Figure generation
  • Input Files and Executable
    • Unified Runtime Schema
      • Minimal runtime TOML example
      • Quasilinear diagnostics
    • Minimal TOML example
      • Executable path overrides
    • Solver and fit-signal keys
    • Executable usage
    • Python driver
    • TOML sections
      • Runtime sections
      • Runtime parallelization controls
      • Runtime output and restart controls
  • Outputs and Restart Artifacts
    • Lightweight runtime artifacts
    • Nonlinear NetCDF bundle
      • *.out.nc
      • *.big.nc
      • *.restart.nc
    • Restart workflow
    • Plotting diagnostics
  • Theory
    • Gyrokinetic ordering
    • Flux-tube model
    • Hermite-Laguerre velocity space
    • Field solve and gyrokinetic variable
    • Linear gyrokinetic operator
      • Field-aligned streaming representation
    • Nonlinear E×B and flutter terms
  • Linear Model And Derivations
    • Scope
    • Normalized equation
    • Hermite-Laguerre projection
    • Gyroaverage and \(k_\perp\)
    • Field equations
    • Growth-rate/frequency extraction
    • Numerical realization
    • Benchmark contract
  • Operators And Terms
    • State And Coupled Variable
    • Implemented Linear Operator
    • Gyroaverage And Bessel Factors
    • Streaming
    • Mirror
    • Curvature And Grad-B
    • Diamagnetic Drive
    • Collisions
    • Hypercollisions
    • Hyperdiffusion And End Damping
    • Nonlinear \(E \\times B\) And Flutter
    • Source Mapping
    • Parameter Surface
  • Numerics
    • Spectral discretization
    • Algorithm mapping (numerics → code)
    • JAX execution model
    • Time integration algorithms
    • Diffrax integration
    • Nonlinear FFT bracket
    • De-aliasing and hyperdiffusion
    • Performance tuning
    • Automatic solver + fit-signal selection
    • Gyroaverage and polarization
    • Parallel streaming
    • Curvature, grad-B, and mirror couplings
    • Field solve and electromagnetic coupling
    • Normalization control
    • Diamagnetic drive
    • Time integration
    • Boundary damping
    • Dealiasing
    • Nonlinear Electromagnetic Terms
  • Parallelization policy
    • Strategy registry
    • Production path: independent work
    • Production closure status
    • Diagnostic path: whole-state nonlinear sharding
    • Velocity-space communication gates
    • Claim rules
    • Large-run scaling acceptance checklist
    • Fast artifact contract check
    • Release artifact policy
  • Normalization
    • Canonical normalization contract
    • Dimensionless units
    • Kinetic species conventions
    • Field-aligned grid parameters
    • Spectral grids
    • Perpendicular normalization
    • Sign conventions
    • Normalization parameters
    • Diagnostic normalization mode
    • Diagnostic scaling
    • Programmatic usage
  • Quasilinear Transport
    • Current validated scope
    • Literature anchors and claim policy
    • Executable usage
    • Model details
      • Linear eigenproblem
      • Field solve and linear weights
      • Amplitude normalization and effective scale
    • Implementation map
    • Algorithmic workflow
    • Numerics and differentiability
    • Validation gates
      • Implicit sensitivity example
    • Calibration reports
    • Train/holdout transfer
    • Non-axisymmetric HSX holdout
    • W7-X NetCDF nonlinear-window path
    • Saturation-rule sweep
    • Shape-aware saturation diagnostic
    • Candidate uncertainty gate
    • Dataset-sufficiency gate
    • Model-selection status
    • Holdout-gap report
    • External-VMEC next-holdout runbook
    • VMEC equilibrium portfolio for future holdouts
    • Axisymmetric spectrum-shape gates
  • Differentiable Stellarator Optimization
    • Purpose
    • Source Map
    • Objective
    • Numerics and Differentiation
    • Objective-portfolio reducer gate
    • Results
    • Connection to Literature
    • Solver-objective Geometry Gradients
    • Promotion Gates for Full VMEC/Boozer/GK Optimization
  • Geometry
    • S-alpha flux-tube model
    • Parameters
    • Field-aligned grid parameters
    • Curvature and grad-B drift
    • Slab Model
    • Geometry Data Contract
      • Multi-Equilibrium Boozer Parity Matrix
    • In-memory differentiable geometry API
    • VMEC and Miller runtime examples
  • Algorithms
    • Linear operator workflow
    • Linear operator decomposition
    • Operator splitting summary
    • Data layout and memory
  • Solvers
    • Time integration
    • Optional damping
    • Performance caching
    • Growth rate extraction
  • Architecture
    • Core modules
    • Term-level source mapping
    • Data flow
  • Benchmarks
    • Figure generation
    • Fresh-run refresh workflow
    • Tracked benchmark metrics
    • Primary publication set
    • Interpretation of validation
    • Benchmark runner internals
    • README summary panel
    • Supplementary closure figures
    • Extended stress matrix
    • Case groups
      • Tokamak core cases
      • Stellarator core cases
      • Reduced and stress cases
    • Notes on interpretation
  • Examples
    • Config-backed runtime cases
      • Tokamak cases
      • Stellarator and imported-geometry cases
    • Runtime TOML entry points
    • Scaling utilities
    • Plotting outputs
    • Geometry examples
    • Nonlinear restart and continuation
    • Geometry helper workflows
    • Benchmark and scan helpers
    • Foundational demos
    • Secondary slab workflow
    • Reduced-model runtime
    • Full-GK ETG nonlinear pilot
  • Related Codes
    • Comparison-code roles
    • How references are used
    • Current benchmarking policy
    • Implementation lessons carried forward
  • Performance
    • JAX performance model
    • Cache profiling
    • Nonlinear profiling
    • JAX/XProf operational notes
    • Recent nonlinear profiling (Cyclone, benchmark-locked config)
    • Nonlinear benchmark harness
    • RHS kernel profile (nonlinear Cyclone)
    • Benchmark-size Cyclone Miller RHS profile
    • Runtime-mode stellarator RHS smoke profile
    • Linear RHS term profile
    • Full fused linear RHS trace
    • Parallelization scaling guardrail
    • Fixed-step nonlinear state sharding
    • Spectral nonlinear mode (gated fast toggle)
    • Runtime and memory comparison workflow
    • Final runtime/memory figure
    • Interpretation of short nonlinear GPU rows
    • Startup phase profiler
    • Cached basis indices
    • GMRES preconditioner iterations
    • JIT considerations
    • Planned optimizations
    • Linear-to-nonlinear optimization roadmap
  • Testing
    • Testing philosophy
    • Current testing target
    • Test categories
    • Unit tests (numerical invariants)
    • Physics regression tests
    • Benchmark regression tests
    • Literature-anchored response and spectrum tests
    • Diffrax and nonlinear smoke tests
    • Parallelization identity gates
    • Nonlinear parity snapshots
    • Linear physics checks
    • Running tests
    • Benchmark reproducibility stack
    • Stress-matrix parity gates
    • CI split: fast PR vs manual full
    • Core modular coverage gate
    • Core solver coverage gates
  • Validation And Coverage Strategy
    • Purpose
    • Claim-scope synchronization
    • How to check the manifest
    • Finalization sequence
    • Release readiness criteria
  • Verification Matrix
    • Purpose
    • Literature Baselines Reviewed
    • Status Legend
    • Tokamak Linear
    • Stellarator Linear
    • Nonlinear Validation
    • Quasilinear Diagnostics and Model Selection
    • Autodiff Validation
    • Differentiable Geometry and Stellarator Objectives
    • Parallelization Validation
    • Notes
  • Release Scope and Claim Boundaries
    • Current scoped claims
    • Explicitly unpromoted claims
    • Release figure and artifact inventory
    • Artifact-backed details
    • Deferred manuscript lanes
    • Pre-release checklist
  • Code Structure
    • Purpose
    • Public API vs Internal Modules
    • Runtime Flow
    • Physics / Numerics / IO Map
    • Refactor Mapping
    • Traceability For Refactors
    • Testing Taxonomy
    • Repository Artifact Hygiene
  • Manuscript Figures
    • Purpose
    • Current Readiness Snapshot
    • Current Vs Deferred Figure Inventory
    • Core Validation Figures
    • Differentiable-Physics Figures
    • Caption Policy
    • Open Issues Before Drafting
  • References
  • Roadmap
    • Current target
    • Pre-release scope
    • Executable open-lane status
    • Post-release scope
    • Current release-scope guardrail
    • Active refactor lane
    • Validation gates
    • Near-term physics priorities
    • Performance and memory
    • Differentiable geometry and optimization
    • Testing and CI
    • Documentation and examples
    • Release policy
  • API Reference
    • Basis
      • hermite_ladder_coeffs()
      • hermite_normed()
      • hermite_physicists()
      • laguerre()
    • Gyroaverage
      • J_l_all()
      • bessel_j0()
      • bessel_j1()
      • gamma0()
      • gx_factorial()
      • gx_laguerre_nj()
      • gx_laguerre_transform()
      • sum_Jl2()
    • Geometry
      • FluxTubeGeometryData
      • SAlphaGeometry
      • SlabGeometry
      • apply_geometry_grid_defaults()
      • apply_gx_geometry_grid_defaults()
      • build_flux_tube_geometry()
      • effective_boundary()
      • ensure_flux_tube_geometry_data()
      • gx_effective_boundary()
      • gx_twist_shift_params()
      • gx_zero_shat_enabled()
      • load_gx_geometry_netcdf()
      • sample_flux_tube_geometry()
      • twist_shift_params()
      • zero_shear_enabled()
    • Differentiable Geometry
      • booz_xform_flux_tube_mapping_from_inputs()
      • booz_xform_flux_tube_sensitivity_report()
      • booz_xform_spectral_sensitivity_report()
      • discover_differentiable_geometry_backends()
      • evaluate_boozer_bmag_on_field_line()
      • finite_difference_jacobian()
      • flux_tube_geometry_from_mapping()
      • flux_tube_geometry_from_vmec_boozer_state()
      • flux_tube_geometry_observables()
      • geometry_inverse_design_report()
      • geometry_observable_names()
      • geometry_sensitivity_report()
      • observable_gradient_validation_report()
      • vmec_boundary_aspect_sensitivity_report()
      • vmec_field_line_tensor_observable_names()
      • vmec_jax_boozer_equal_arc_core_profiles_from_state()
      • vmec_jax_boozer_flux_tube_sensitivity_report()
      • vmec_jax_field_line_tensor_sensitivity_report()
      • vmec_jax_flux_tube_array_parity_report()
      • vmec_jax_flux_tube_mapping_from_state()
      • vmec_jax_flux_tube_sensitivity_report()
      • vmec_jax_metric_tensor_sensitivity_report()
      • vmec_metric_tensor_observable_names()
    • Grids
      • SpectralGrid
      • gx_real_fft_kx()
      • gx_real_fft_ky()
      • gx_real_fft_mesh()
      • real_fft_mesh()
      • real_fft_ordered_kx()
      • real_fft_unique_ky()
      • select_gx_real_fft_ky_grid()
      • select_ky_grid()
      • select_real_fft_ky_grid()
      • twothirds_mask()
    • Operators
      • hermite_streaming()
    • Linear
      • integrate_linear()
      • integrate_linear_diagnostics()
      • linear_rhs()
      • linear_rhs_cached()
    • Linear Linked Boundaries
      • _build_linked_end_damping_profile()
      • _build_linked_fft_maps()
    • Linear Cache
      • LinearCache
      • _build_end_damping_profile_array()
      • _build_gyroaverage_cache_arrays()
      • _build_low_rank_moment_cache_arrays()
      • build_linear_cache()
      • collision_damping()
      • hypercollision_damping()
    • Linear Moments
      • apply_hermite_v()
      • apply_hermite_v2()
      • apply_laguerre_x()
      • build_H()
      • compute_b()
      • diamagnetic_drive_coeffs()
      • energy_operator()
      • grad_z_periodic()
      • lenard_bernstein_eigenvalues()
      • quasineutrality_phi()
      • shift_axis()
      • streaming_term()
    • Linear Parameters
      • LinearParams
      • LinearTerms
      • _as_species_array()
      • linear_terms_to_term_config()
      • term_config_to_linear_terms()
    • Linear Parallel RHS
      • _electrostatic_streaming_field_rhs()
      • _linear_rhs_electrostatic_slices_velocity_sharded_fused()
      • _resolve_parallel_devices()
      • _streaming_electrostatic_from_phi_velocity_sharded()
      • linear_rhs_electrostatic_slices_velocity_sharded()
      • linear_rhs_parallel_cached()
      • linear_rhs_streaming_electrostatic_velocity_sharded()
      • linear_rhs_streaming_velocity_sharded()
    • Nonlinear Diagnostics
      • _sample_indices_with_final()
    • Nonlinear Helpers
      • IMEXLinearOperator
      • _apply_collision_split()
      • _collision_damping()
      • _gx_nonlinear_omega_components()
      • _gx_omega_mode_mask()
      • _make_fixed_mode_projector()
      • _make_hermitian_projector()
      • build_nonlinear_imex_operator()
    • Nonlinear Replicate Diagnostics
      • NonlinearReplicateSpreadConfig
      • nonlinear_replicate_spread_report()
    • Nonlinear Replicate Follow-Up
      • NonlinearReplicateFollowupConfig
      • nonlinear_replicate_followup_plan()
    • Benchmarks
      • CycloneComparison
      • CycloneReference
      • CycloneRunResult
      • CycloneScanResult
      • LinearRunResult
      • LinearScanResult
      • compare_cyclone_to_reference()
      • load_cyclone_reference()
      • load_cyclone_reference_kinetic()
      • load_etg_reference()
      • load_kbm_reference()
      • load_tem_reference()
      • run_cyclone_linear()
      • run_cyclone_scan()
      • run_etg_linear()
      • run_etg_scan()
      • run_kbm_beta_scan()
      • run_kbm_linear()
      • run_kbm_scan()
      • run_kinetic_linear()
      • run_kinetic_scan()
      • run_tem_linear()
      • run_tem_scan()
      • select_kbm_solver_auto()
    • Benchmark Defaults
    • Benchmark Scan Policies
      • ScanFitWindowPolicy
      • apply_auto_fit_scan_policy()
      • indexed_float_value()
      • indexed_scan_value()
      • normalize_fit_signal()
      • normalize_solver_key()
      • resolve_scan_mode_method()
      • scan_window_valid()
      • should_use_ky_batch()
    • Benchmarking
      • ScanAndModeResult
      • branch_continuity_metrics()
      • compare_eigenfunctions()
      • estimate_observed_order()
      • infer_triple_dealiased_ny()
      • late_time_linear_metrics()
      • late_time_window()
      • load_diagnostic_time_series()
      • load_eigenfunction_reference_bundle()
      • nonlinear_heat_flux_convergence_metrics()
      • normalize_eigenfunction()
      • phase_align_eigenfunction()
      • run_linear_scan()
      • run_scan_and_mode()
      • save_eigenfunction_reference_bundle()
      • windowed_nonlinear_metrics()
      • zonal_flow_response_metrics()
    • Validation Gates
      • BranchContinuationMetrics
      • DiagnosticTimeSeries
      • EigenfunctionComparisonMetrics
      • EigenfunctionReferenceBundle
      • GateReport
      • LateTimeLinearMetrics
      • NonlinearHeatFluxConvergenceMetrics
      • NonlinearWindowMetrics
      • ObservedOrderMetrics
      • ScalarGateResult
      • ZonalFlowResponseMetrics
      • branch_continuity_gate_report()
      • eigenfunction_gate_report()
      • evaluate_scalar_gate()
      • gate_report()
      • gate_report_to_dict()
      • linear_metrics_gate_report()
      • nonlinear_heat_flux_convergence_gate_report()
      • nonlinear_window_gate_report()
      • observed_order_gate_report()
      • zonal_response_gate_report()
    • Autodiff Validation
      • autodiff_finite_difference_report()
      • central_finite_difference_jacobian()
      • covariance_diagnostics()
      • explicit_complex_operator_matrix()
      • implicit_eigenpair_observable_sensitivity_report()
      • isolated_eigenpair_observable_sensitivity_report()
      • isolated_eigenvalue_sensitivity_report()
    • Parallelization
      • IndependentEnsembleProvenanceReport
      • IndependentMapExecutionError
      • IndependentWorkerMetadata
      • ParallelIdentityReport
      • batch_map()
      • batch_map_identity_report()
      • independent_ensemble_provenance_gate()
      • independent_map()
      • independent_map_identity_report()
      • independent_worker_metadata()
      • ky_scan_batches()
      • pad_to_multiple()
      • parallel_identity_report()
      • split_evenly()
    • Velocity Sharding Plans
      • VelocityShardingPlan
      • build_velocity_sharding_plan()
      • curvature_gradb_drift_reference()
      • curvature_gradb_drift_shard_map()
      • diamagnetic_drive_reference()
      • diamagnetic_drive_shard_map()
      • electrostatic_phi_reference()
      • electrostatic_phi_shard_map()
      • hermite_neighbor_reference()
      • hermite_neighbor_shard_map()
      • hermite_shift_reference()
      • hermite_shift_shard_map()
      • hermite_streaming_ladder_reference()
      • hermite_streaming_ladder_shard_map()
      • mirror_drift_reference()
      • mirror_drift_shard_map()
      • periodic_streaming_reference()
      • periodic_streaming_shard_map()
      • velocity_field_reduce_reference()
      • velocity_field_reduce_shard_map()
    • Sharded Integrators
      • integrate_linear_sharded()
      • integrate_nonlinear_sharded()
    • Zonal Validation
    • Analysis
      • ModeSelection
      • ModeSelectionBatch
      • density_moment()
      • extract_eigenfunction()
      • extract_mode()
      • extract_mode_time_series()
      • fit_growth_rate()
      • fit_growth_rate_auto()
      • fit_growth_rate_auto_with_stats()
      • fit_growth_rate_with_stats()
      • gx_growth_rate_from_omega_series()
      • gx_growth_rate_from_phi()
      • select_fit_window()
      • select_fit_window_loglinear()
      • select_ky_index()
    • Plotting
      • LinearValidationPanel
      • MultiReferenceValidationPanel
      • ReferenceSeries
      • cyclone_comparison_figure()
      • cyclone_reference_figure()
      • eigenfunction_overlap_summary_figure()
      • eigenfunction_reference_overlay_figure()
      • etg_trend_figure()
      • growth_fit_figure()
      • growth_rate_heatmap()
      • linear_runtime_panel_figure()
      • linear_validation_figure()
      • linear_validation_multi_reference_figure()
      • nonlinear_runtime_panel_figure()
      • plot_saved_output()
      • scan_comparison_figure()
      • scan_multi_reference_figure()
      • set_plot_style()
      • zonal_flow_response_figure()
    • Config
      • CycloneBaseCase
      • ETGBaseCase
      • ETGModelConfig
      • GeometryConfig
      • GridConfig
      • InitializationConfig
      • KBMBaseCase
      • KineticElectronBaseCase
      • KineticElectronModelConfig
      • ModelConfig
      • TEMBaseCase
      • TEMModelConfig
      • TimeConfig
      • explicit_method_default_cfl_fac()
      • gx_default_cfl_fac()
      • resolve_cfl_fac()
    • Normalization
      • NormalizationContract
      • apply_diagnostic_normalization()
      • get_normalization_contract()
    • Runtime Config
      • RuntimeCollisionConfig
      • RuntimeConfig
      • RuntimeExpertConfig
      • RuntimeNormalizationConfig
      • RuntimeOutputConfig
      • RuntimeParallelConfig
      • RuntimePhysicsConfig
      • RuntimeQuasilinearConfig
      • RuntimeSpeciesConfig
      • RuntimeTermsConfig
    • Runtime Policies
      • RuntimeIndependentParallelPlan
      • _infer_runtime_nonlinear_steps()
      • _parallel_requests_combined_ky_scan()
      • _runtime_external_phi()
      • _runtime_independent_parallel_plan()
    • Runtime Orchestration
      • NonlinearArtifactPolicy
      • RuntimeArtifactHandoffDeps
      • RuntimeProgressSnapshot
      • RuntimeScanBatchDeps
      • build_runtime_progress_message()
      • format_duration()
      • resolve_nonlinear_artifact_policy()
      • run_runtime_nonlinear_artifact_handoff()
      • run_runtime_scan_batch()
    • Quasilinear Transport
      • QuasilinearTransportResult
      • compute_quasilinear_from_linear_state()
      • effective_kperp2()
      • mixing_length_amplitude2_jax()
      • normalize_quasilinear_channels()
      • phi_norm2()
      • quasilinear_feature_objective()
      • saturated_flux_from_linear_weight()
      • saturation_amplitude2()
      • shape_aware_power_law_objective()
      • spectral_phi_weights()
    • Quasilinear Calibration
      • QuasilinearCalibrationPoint
      • apply_heat_flux_scale()
      • calibration_point_from_nonlinear_window_summary()
      • calibration_point_from_spectrum_and_nonlinear_window()
      • fit_train_heat_flux_scale()
      • integrated_quasilinear_flux_from_spectrum()
      • quasilinear_calibration_report()
      • write_quasilinear_calibration_report()
    • Quasilinear Model Selection
      • build_quasilinear_model_selection_status()
      • build_quasilinear_model_selection_status_from_paths()
    • External-VMEC Holdout Planning
      • ExternalHoldoutScreenRow
      • build_external_holdout_runbook()
      • external_vmec_family()
      • read_external_holdout_screen()
    • Parallel Decomposition Contracts
      • DecompositionContract
      • ReconstructionIdentityReport
      • ShardAssignment
      • build_diagnostic_nonlinear_domain_decomposition()
      • build_independent_portfolio_decomposition()
      • reconstruct_serial()
      • serial_reconstruction_identity_report()
      • shard_sequence()
    • Stellarator Objective Portfolios
      • ReducedPortfolioArtifactGuardConfig
      • StellaratorObjectivePortfolioContract
      • aggregate_objective_portfolio()
      • objective_portfolio_sensitivity_report()
      • portfolio_objective_weight_vector()
      • portfolio_sample_weight_tensor()
      • reduced_portfolio_artifact_guard_report()
      • validate_objective_portfolio_contract()
    • Runtime Runner
      • RuntimeIndependentParallelPlan
      • RuntimeLinearResult
      • RuntimeLinearScanResult
      • RuntimeNonlinearResult
      • build_runtime_geometry()
      • build_runtime_linear_params()
      • build_runtime_linear_terms()
      • build_runtime_term_config()
      • run_linear_case()
      • run_nonlinear_case()
      • run_runtime_linear()
      • run_runtime_nonlinear()
      • run_runtime_scan()
SPECTRAX-GK
  • Search


© Copyright .

Built with Sphinx using a theme provided by Read the Docs.