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

How to define a new PDE #10

Open
shensummer opened this issue Jul 27, 2024 · 1 comment
Open

How to define a new PDE #10

shensummer opened this issue Jul 27, 2024 · 1 comment

Comments

@shensummer
Copy link

hello,I am want to define a new PDE in your code, How can I reach my goal? Thanks for your time.

@i207M
Copy link
Owner

i207M commented Jul 28, 2024

You can refer to some examples in src/pde/poisson.py.

class Poisson1D(baseclass.BasePDE):

  1. Inherit from baseclass.BasePDE.
  2. Define self.output_dim, self.bbox, self.geom. bbox is a list of numbers, and geom is an instance of deepxde.geometry.
  3. Define a pde function which will be used as the pde loss. Also do self.set_pdeloss(num=<the number of pdes>).
  4. Define boundary conditions. We support multiple types of bcs. See
    def add_bcs(self, config, geom=None):
  5. Finally, set reference solution. This can be done by either self.load_ref_data(...) or self.ref_sol=<reference function>.

Feel free to ask if anything is not clear.

@i207M i207M pinned this issue Jul 28, 2024
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

2 participants