BoiseState-AdaptLab / GeoAc

Infrasonic ray tracing code
Other
1 stars 1 forks source link

Remove the Solution array #9

Open Aaron3154518 opened 4 years ago

Aaron3154518 commented 4 years ago

We want to remove the solution array and instead only store two "rows" at a time inside GeoAc_Propagate_RK4(). Steps: 1) We begin with the initial row, which GeoAc_SetInitialConditions() (GeoAc/GeoAc.EquationSets.Global.cpp) needs to return. 2) Pass the row into RK4() instead of solution 3) RK4() calculates the next row, does break checks, and completes all calculations and file outputs 4) The first row get replaced by the second row OR have an array containing both rows and use modulus to flip the index between 0 and 1 5) Go back to (3) until one of the break checks triggers 6) RK4() should return the last row we calculated unless the boolean "check" is true, in which case it should return nullptr or something, which can be caught inside GeoAcGlobal_main to indicate we are finished tracing this ray

We also need to delete some other functions that clean out Solution after each ray

Aaron3154518 commented 4 years ago

We also have to store the previous row of data (k-1) in addition to the current row and the row we are calculating (k & k+1). This is used to set the initial conditions for the next bounce (GeoAc_SetReflectionConditions()).