# \[ANN\] Trixi.jl: A tree-based numerical simulation framework for hyperbolic PDEs

**URL:** <https://discourse.julialang.org/t/ann-trixi-jl-a-tree-based-numerical-simulation-framework-for-hyperbolic-pdes/45886>\
**Category:** Package Announcements\
**Tags:** parallel, pde, numerics, physics, math\
**Created:** [September 1, 2020, 10:07am UTC](https://discourse.julialang.org/t/ann-trixi-jl-a-tree-based-numerical-simulation-framework-for-hyperbolic-pdes/45886 "2020-09-01T10:07:32Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![stillyslalom](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stillyslalom/32/45687_2.png) [@stillyslalom](https://discourse.julialang.org/u/stillyslalom)\
**Post date:** [September 1, 2020, 8:47pm UTC](https://discourse.julialang.org/t/ann-trixi-jl-a-tree-based-numerical-simulation-framework-for-hyperbolic-pdes/45886/7 "2020-09-01T20:47:24Z")

</div>

I think [Oceananigans.jl](https://github.com/CliMA/Oceananigans.jl#more-interesting-example) sets a pretty good example with its input deck syntax. I’m most familiar with Pyranda’s behind-the-fence parent, [Miranda](https://wci.llnl.gov/simulation/computer-codes/miranda), which uses Lua input decks to drive a Fortran code. You can specify pretty much any IC/BC/forcing terms as a set of user-created `f(x, y, z, t)` within the input deck. Those specifications don’t necessarily need to be your fixed set of primitives, either - just as you can specify `range(1.0, stop=10, length=10)` or `range(1.0, stop=10, step=1)`, you can specify any closed set of the state variables and let the code calculate the necessary primitives via the EOS.

One of the keys is to take advantage of Julia’s multiple dispatch with parameterized `struct`s to keep track of dimensionality, which avoids [this sort](https://github.com/trixi-framework/Trixi.jl/blob/b8fa2c6d47109bdb849d51e48367ed1445895e37/src/equations/equations.jl#L22-L59) of nested, string-based if-else block. Generally speaking, you should always prefer structs to strings for parameter specification, since the former makes precompilation and inference a lot easier.

---

_[View the full topic](https://discourse.julialang.org/t/ann-trixi-jl-a-tree-based-numerical-simulation-framework-for-hyperbolic-pdes/45886)._
