Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

coupled PDEs #2

Open
katayooneshkofti opened this issue Nov 2, 2022 · 5 comments
Open

coupled PDEs #2

katayooneshkofti opened this issue Nov 2, 2022 · 5 comments
Assignees

Comments

@katayooneshkofti
Copy link

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.

@MinZhu123
Copy link
Collaborator

MinZhu123 commented Nov 7, 2022

@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.

@katayooneshkofti
Copy link
Author

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.

@katayooneshkofti
Copy link
Author

katayooneshkofti commented Nov 8, 2022

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)`

@MinZhu123
Copy link
Collaborator

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.

@katayooneshkofti
Copy link
Author

Yes, I did not check the last version of your code. Thank you. I close the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants