# HLLC Implementation

# General Relativity (GR)

In class we’re covering Newtonian curved spacetime. I spent Monday on the homework and we have an exam next Monday so that’s what I will be studying for the rest of the week

# HLLC Riemann Solvers

I finished writing my HLLC Riemann solver! The details of the solver can be found in my previous post HLLC Algorithm.

Debugging took some time this week. A few +/- or </> signs got swapped along with me misunderstanding part of the algorithm (specifically how to compute the momentum in the star state) but that’s all fixed now and it looks great! The big challenge was figuring out how to let the program choose between using the exact or HLLC riemann solver. With some guidance I chose the Strategy design pattern where you create a virtual base class and derive each Riemann solver class from that. Then in the main program you make a pointer to point at the base class type and during setup/construction you allocate that pointer to point at the specific class/solver you want to use. It’s surprisingly elegant and easily scalable.

*A Sod shock tube problem solved using the new HLLC solver along with a second order Van Leer integrator*