Closed semi-h closed 2 months ago
looks good to me, I just think it would be good to properly define what is expected from the input variables in terms of direction and dataloc.
Thanks! Changed the namings from velocity/pressure grid to data_loc based VERT/CELL. Also added a bit more explanation in subroutine headers to explain expected DIR
s and data_loc
s for input and output arrays.
Nanoseb: is it worth checking that u is in DIR_X before doing that? or at least add a comment in the header to explain that it is expected semi-h: tds_solve is doing a check based on directions so added a comment in the laplacian subroutine header to explain
I think it might be worth checking the conditions at the start of the curl/div/grad/xxx subroutines. A "invalid field locations passed to curl" will be easier to debug than "invalid fields in tdsops" (which you then need to figure out where it came from). Having the tdsops perform this last level check is good to ensure we catch everything, but a higher-level check might ultimately be beneficial in my opinion.
This PR moves the vector calculus operations currently implemented inside solver class out to a dedicated new class. This new structure should allow accessing vector calculus operations outside the solver class. Examples include the laplacian operation iterative Poisson solver needs and curl/divergence for postprocessing/monitoring.