| 
    HArD::Core2D
    
   Hybrid Arbitrary Degree::Core 2D - Library to implement 2D schemes with edge and cell polynomials as unknowns 
   | 
 
Functions | |
| parse_simulation_file (filename) | |
| compute_energy_norm (data) | |
| calculate_convergence_rate (mesh_sizes, errors) | |
| create_convergence_plots (data_by_degree) | |
| generate_latex_document (data_by_degree) | |
| main () | |
Simple Convergence Rate Analyzer for HHO-NSA Simulation Data
This script analyzes convergence rates from simulation output files and generates
publication-quality plots with LaTeX styling - ALL ON ONE GRAPH.
Usage:
    python3 convergence_analyzer.py timehistory_linear_k*_mesh*.txt
 | convergence_analyzer.calculate_convergence_rate | ( | mesh_sizes, | |
| errors | |||
| ) | 
Calculate convergence rate using least squares fit.
| convergence_analyzer.compute_energy_norm | ( | data | ) | 
Compute the energy norm using the specified formula:
energy_norm^2 = L2_density_err_N^2 + L2_velocity_err_N^2 + 
                time_step * sum_{n=0}^{N-1} upw_density_err_{n+1}^2 + 
                (time_step * viscosity/2) * sum_{n=0}^{N-1} H1_velocity_err_{n+1}^2
Parameters:
data (dict): Dictionary containing time history and parameters
Returns:
float: Energy norm value
 
| convergence_analyzer.create_convergence_plots | ( | data_by_degree | ) | 
Create a single convergence plot with all degrees and error types.
| convergence_analyzer.generate_latex_document | ( | data_by_degree | ) | 
Generate a LaTeX document with a single pgfplot showing all curves.
| convergence_analyzer.main | ( | ) | 
Main function: parse files and generate convergence analysis.
| convergence_analyzer.parse_simulation_file | ( | filename | ) | 
Extract convergence data from a single simulation output file.