Closed gawrysz closed 1 year ago
Difference between computed and analytic solution for CRtest with diffusion restricted to level 2. Note that most of the error is located on fine-coarse interface.
The inaccuracy slightly distinguishes between left and right direction in each dimension, which may point to some issues with interpreting the magnetic field.
The implicit diffusion is much more accurate in this example.
EDIT: After #481 It should look much better, but will require some extra work on merge, due to conflicts.
ToDo1: diff_max_lev
may be changed from a stiff parameter to an automatically computed variable and be the highest level that does not limit the timestep more than other solvers do. Some sanity checks would be necessary as that limiting level may happen to be below base level :)
ToDo2: A check whether the diffused field is smooth enough for particular restriction of the diffusion solver whould be nice. Unfortunately, without any prior assumptions, the cost may be comparable to checking for Loechner refinement criterion. But a smooth field may only get smoother, so such a check should be integrated into routines that create the field to be diffused.
Difference between computed and analytic solution for CRtest with diffusion restricted to level 2 after merging #481, resolving conflicts and other updates due to recent merges.
Small artifacts due to prolongation of a diagonal gradient are visible, but this is the most difficult case for any directional-split interpolation (such as bilinear or bi-cubic).
The same quantity without restrictions for diffusion:
Since diffusion is limited by dx2, in AMR simulations it may severely slow down the computation even if the diffusion solver itself does not consume too much time. Assuming that we diffuse already smooth fields we may do the diffusion only up to certain level and keep the dt limited by other solvers. Finer levels may then be updated by high order interpolation (prolongation).