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

An error occurs in SimpleODE #10

Open
vivaldi370 opened this issue Sep 18, 2024 · 0 comments
Open

An error occurs in SimpleODE #10

vivaldi370 opened this issue Sep 18, 2024 · 0 comments

Comments

@vivaldi370
Copy link

Thanks for your awesome work, but I found a few minor bugs in simpleODE.

First, the values x_BC and x_PDE are passed in the wrong places:

def loss(self,x_BC,x_PDE):
    ...
# train neural network
for i in range(steps):
    loss = model.loss(x_PDE,x_BC)# use mean squared error

However, def f_BC is

def f_BC(x):
  return torch.sin(x)

rather than

def f_BC(x):
  return torch.zeros_like(x)

So this code will still get the correct result when this error occurs.
The code corrected by me has been uploaded as an attachment
simple_ode.txt
, which may explain this bug more clearly.

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

1 participant