Compute the anisotropy
CGH20171006 opened this issue · 5 comments
Previously, I had been using an earlier version of the allen-cahn file for programming computations. Initially, I was solely using the CPU for calculations, and there were no issues. However, after switching to a GPU, I found that it was taking a significant amount of time to compile when performing anisotropy calculations. As a result, I chose to upgrade the file to the latest version, and I no longer encountered the issue of long compilation times during calculations. However, during the calculation process, I encountered the following error (which did not occur in the original version). Could you please help me investigate the cause of this error? Or inform me of any other changes made when calling 'state_rhs' between the previous and current versions, aside from modifying the allen-cahn file.
Traceback (most recent call last):
File "/home/cgh/projects/HTTD-PF/application/SingleCrystal_2/NotContainBase.py", line 333, in
output_next.inspect_sol(eta, eta0_next, TEMP, ts, increment + step_inds + 1)
File "/home/cgh/mambaforge3/lib/python3.10/site-packages/pf_am/post_process.py", line 35, in inspect_sol
raise ValueError(f"Found np.inf or np.nan in pf_sol - stop the program")
ValueError: Found np.inf or np.nan in pf_sol - stop the program
Did you make modifications based on the program under /application/phase_field/solidification
? This program runs fine in my environment. Could you please specify which parameters you changed?
Consider making step-by-step alterations to the code as you execute it on a GPU to isolate the source of the NaN values.
@ijku Specifically, I am puzzled by how the "New" version substitutes eta_pos_x - eta_neg_x for edge_x, and I am uncertain about why this replacement results in a significant reduction in compilation time.
Anisotropy.zip