How thisismeamir/kosmic works
Kosmic is an early-development lattice field theory simulation framework, with Abelian Higgs as its intended primary theory and a separate snapshot augmentation pipeline. The principal workflow is to define a theory and metric, evolve lattice fields, and save snapshots; clustering and recombination can then synthesize configurations with provenance. The README documents CUDA, AMR, HDF5 storage, and augmentation capabilities, but sampled code does not show their runtime wiring, so those connections are omitted. Several listed implementation areas are still placeholders.
Main entry points: LeapFrogIntegrator.hpp Leapfrog evolution · FreeScalarDynamics.hpp Free scalar model · Scalarfield.hpp Scalar building block · Field.hpp Lattice fields
Components 19
Simulation core
- Public API
core/api - Lattice fields
core/field/include/kosmic/field/Field.hpp - Periodic access
core/field/include/kosmic/field/PeriodicAccessor.hpp - Metric models
core/geometry/include/kosmic/geometry/Metric.hpp - Finite differences
core/math/include/kosmic/math/Finitedifference.hpp - Leapfrog evolution
core/integrator/include/kosmic/integrator/LeapFrogIntegrator.hpp - CPU backend
core/backend/cpu - CUDA backend
core/backend/cuda - Adaptive refinement
core/amr
Theory models
- Theory contract
core/theory/interface/include/kosmic/theory/TheoryInterface.hpp - Scalar building block
core/theory/fields/include/kosmic/theory/fields/Scalarfield.hpp - Free scalar model
templates/free_scalar/include/kosmic/templates/free_scalar/FreeScalarDynamics.hpp - Abelian Higgs
core/theory/abelian_higgs
Snapshots
- Snapshot schema
storage/schema - Dataset manager
storage/manager
Augmentation
- Lattice clustering
augment/cluster - Region recombination
augment/recombine - Lineage metadata
augment/provenance
Other components
- Simulation user
Connections 14
- Simulation user → Public API: uses
- Periodic access → Lattice fields: wraps access
- Finite differences → Periodic access: samples neighbors
- Scalar building block → Finite differences: computes Laplacian
- Scalar building block → Lattice fields: reads and accumulates
- Free scalar model → Scalar building block: uses contribution
- Leapfrog evolution → Free scalar model: evaluates dynamics
- Leapfrog evolution → Metric models: passes metric
- Leapfrog evolution → Lattice fields: advances fields
- Free scalar model → Theory contract: implements parameters
- Abelian Higgs → Theory contract: implements theory
- Dataset manager → Snapshot schema: uses schema
- Lattice clustering → Region recombination: provides regions
- Region recombination → Lineage metadata: records lineage