Skip to content

An error occurs in SimpleODE #10

@vivaldi370

Description

@vivaldi370

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions