Welcome to mirgecom’s documentation!¶
Math, Intermediate Representation, Compressible Flow, For Scramjets. MirgeCOM aims to be a library of parts from which scramjet simulations for the Center for Exascale-Enabled Scramjet Design (CEESD) at the University of Illinois can be built.
Here’s an example, to give you an impression:
import numpy as np import pyopencl as cl from pytools.obj_array import flat_obj_array from grudge.eager import EagerDGDiscretization from grudge.shortcuts import make_visualizer from mirgecom.wave import wave_operator from mirgecom.integrators import rk4_step from meshmode.array_context import PyOpenCLArrayContext cl_ctx = cl.create_some_context() queue = cl.CommandQueue(cl_ctx) actx = PyOpenCLArrayContext(queue) dim = 2 nel_1d = 16 order = 3 dt = 0.75 / (nel_1d * order ** 2) from meshmode.mesh.generation import generate_regular_rect_mesh mesh = generate_regular_rect_mesh(a=(-0.5,)*dim, b=(0.5,)*dim, n=(nel_1d,)*dim) print("%d elements" % mesh.nelements) discr = EagerDGDiscretization(actx, mesh, order=order) fields = flat_obj_array( [discr.zeros(actx)], [discr.zeros(actx) for i in range(discr.dim)] ) vis = make_visualizer(discr, order + 3) def rhs(t, w): return wave_operator(discr, c=1, w=w) t = 0 t_final = 3 istep = 0 while t < t_final: fields = rk4_step(fields, t, dt, rhs) if istep % 10 == 0: print(istep, t, discr.norm(fields, np.inf)) vis.write_vtk_file("wave-eager-%04d.vtu" % istep, [("u", fields), ("v", fields[1:]), ]) t += dt istep += 1
(This example is derived from
examples/wave-eager.py in the MirgeCOM
Table of Contents¶
- 1. Model
- 2. Operators
- 2.1. Linear Acoustic Wave Equation
- 2.2. Diffusion
- 2.3. Gas Dynamics
- 3. Simulation Support
- 4. Development How-To
- 4.1. What Packages are Involved?
- 4.2. Working with Pull Requests
- 4.2.1. Forking the repository
- 4.2.2. Creating a new pull request
- 4.2.3. Updating a pull request
- 4.2.4. Dependent pull requests
- 4.2.5. Reviewing & PRs
- 4.2.6. Continuous Integration Testing (CI)
- 4.2.7. Merging a pull request
- 4.2.8. Tools
- 4.3. Installation
- 4.4. Building this Documentation
- 5. Running MirgeCOM
- 5.1. Running with large numbers of ranks and nodes
- 5.2. OpenCL device selection
- 5.3. Profiling and logging
- 5.4. Scripting launches
- 5.5. Running on specific systems
- 6. Frequently Asked Questions
- 6.1. Why on earth does the code…?
- 6.2. Installation questions
- 6.2.1. What is conda/anaconda/conda-forge/miniconda/miniforge?
- 6.2.2. Why are we installing (mostly) binary packages?
- 6.2.3. How can I install pocl from source?
- 6.2.4. How can I build pyopencl from source?
- 6.2.5. How can I record the exact versions of Python packages that are currently installed and reinstall them at a later time?
- 6.2.6. How can I record the exact versions of Conda packages that are currently installed and reinstall them at a later time?
- 6.3. Common error messages
- 7. User-Visible Changes
- 8. License
- 9. Citing MirgeCOM
- 10. Acknowledgment
- 11. Disclaimer
- 12. To-Do List for the Docs
- 13. References
- 🚀 Github
- 💾 Download Releases