Open julianlitz opened 2 months ago
Thank you. Have you checked if you can produce the right hand sides for the manufactured solutions?
I cannot use Emily's script to regenerate the rhs_f function since the implementations of qn_functions.py, main_qn_analytical.py, and wrap_c_to_class.py are missing. We should contact her to resolve this issue.
The problem lies within the generate.py script, where coeff_a should be set to 1.0:
c = 'Poisson' coeff_a = '0.0' coeff_b = '0.0'
However, this script cannot be executed without the other scripts.
If Emily is unable to generate the Poisson rhs_f with the corrected coefficient, I suggest removing the Poisson tests since the other test cases are more than sufficient for our purposes.
@julianlitz I don't seem to have a wrap_c_to_class.py
file. I have a wrap_with_class.py
file though. Maybe it is the same thing?
I have sent the folder with all the relevant files to @mknaranja . Let me know if you need any help using them
The variable
wrap_to_c = os.path.join(current_folder, 'wrap_c_to_class.py')
is currently unused in the generate.py script on GitHub. That’s likely why it’s no longer present.
It's possible that your generate.py file has been updated or modified, which could be the reason for the discrepancy.
Have you made any changes to generate.py? In that case, could you please send those updates as well?
I don't have (and don't think I ever had) a generate.py file. The file main_qn_analytical.py
was supposed to do all code generation.
Checking through the history of GMGPolar on GitLab it seems that there used to be a wrap_c_to_class.py
file in the folder with generate.py. Probably originally this was a correction for GMGPolar but I ended up generalising it so you can directly specify cpp as the output format for main_qn_analytical.py
For all Poisson tests, we need to set coeffs1 (alpha) to 1.0 instead of 0.0. Since rhs_f (rho_glob) was generated with the incorrect coeffs1 (alpha) in mind, we will need to update the currently incorrect rhs_f (rho_glob) function.
Additionally the test RefinedGyroZoniShiftedCulham does not yield sufficiently good convergence rates to the exact solution. The error doesnt improve with increasing node count. Exact Weighted-Euclidean Error: 0.00020584 Exact Infinity Error: 0.00130423 When reaching this error, we don't see any further improvements, suggesting that there is a problem with this test case.
The other Culham test PolarR6GyroZoniShiftedCulham does work correctly though. As a comparison here we get Exact Weighted-Euclidean Error: 2.24275e-08 Exact Infinity Error: 9.00029e-08