π°οΈ gprMax Spatia l Fidelity & Geometry Validator Automated Geometric Integrity Testing for Physics-Based Electromagnetic Simulation* π Overview In computational electromagnetics, specifically within gprMax, spatial accuracy is the foundation of numerical validity. A single coordinate error in the .in file can lead to hours of wasted compute resources on a flawed model. This repository implements an Automated Geometry Validation Pipeline. It parses simulation input files, extracts spatial configurations (Antennas, Targets, PML boundaries), and validates their alignment against the intended physical modelβall within a CI/CD environment.
π οΈ Technical Execution & Proof
Attribute,Indicator,Status / Value Pipeline Core,geometry.yml,β PASSED Verification Speed,β‘ High Velocity,27 Seconds Coordinate Precision,π― Sub-Millimeter,Β±0.001 m Environment Check,π‘οΈ Spatial Fidelity,VERIFIED
πΌοΈ Spatial Interpretation & Visualization
The pipeline generates a Simulation Domain Preview to ensure that the engine correctly interprets the spatial configuration. This visual proof confirms that the antenna source and buried targets are localized with absolute precision.
Figure 1: Automated Spatial Alignment Verification.
π΅ Blue Circle: Antenna Source Location | π΄ Red Square: Buried Target (Box) Model.
βοΈ How it Works: The "Trident" Logic The validation process is divided into three critical stages: Parsing Engine: A custom-built script scans the user_model.in for #box and #cylinder directives. Geometric Mapping: Converts raw simulation coordinates into a visual coordinate system, ensuring that PML (Perfectly Matched Layer) boundaries do not intersect with active sources. CI/CD Gatekeeping: The GitHub Action fails the build if any geometric overlap or out-of-bounds error is detected, preventing resource leakage.
π Deployment & Local Usage To verify geometry locally before pushing to the cloud:
# Clone the validator
git clone https://github.com/pratiktech28/gprmax_geometry_check.git
# Install lightweight dependencies
pip install matplotlib
# Run the validation script
python <img width="800" height="600" alt="geometry_preview" src="https://github.com/user-attachments/assets/58ba7b79-507f-43d0-87ea-0e57a2dfe443" />
check_geometry.py --input simulation_model.in
---
**π¨βπ» Contributor Insights**
"Beyond numerical accuracy, the integrity of the spatial domain is non-negotiable. This tool ensures that the physics engine is fed a geometrically perfect model, every single time."
Repository
https://github.com/pratiktech28/gprmax_ge
ometry_check.git



