Open katayooneshkofti opened 1 year ago
@kjaisingh @lululxvi @ChenxiWu123
Thank you for your good question. You could replace the code Y = np.abs(model.predict(X, operator=pde)).astype(np.float64)
with Y = np.sum(np.abs(np.array(model.predict(X, operator=ode_system)).reshape(-1, len(X), 1)),axis=0).astype(np.float64)
This code could be used for both single PDE and coupled PDEs. Please let me know if you have any question or issue.
Thank you for your response @MinZhu123 . It was a great help. Before you answered, I used the following code and it worked:
Y = np.abs(model.predict(X, operator=ode))[0]
I should check the final results and probable differences between them.
I tested the code. It had an error 'list' object has no attribute 'reshape'. Therefore, I made the following modification, and now it works:
`Y1 = np.array(model.predict(X, operator=ode))
Y = np.sum(np.abs(Y1.reshape(-1, len(X),
1)),axis=0).astype(np.float64)`
Hi, @katayooneshkofti. Your code is identical with my code. Could you check again? By the way, I modified my code 5 minutes after my first version. Perhaps you used my old version.
Yes, I did not check the last version of your code. Thank you. I close the issue.
Hello @lululxvi @ChenxiWu123 @MinZhu123 Thank you for sharing your code. Are RAD and RAR-D applicable for coupled PDEs? It seems that for computing error_eq and err_eq_normalized, we need some modifications.