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

Separate train_x_all and train_x_bc in PDE #1731

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

vl-dud
Copy link
Contributor

@vl-dud vl-dud commented May 7, 2024

Currently, arrays of points train_x_all and train_x_bc are mixed. Because of this, some points are duplicated, which can be critical with a large volume.

Look at the example:

geom = dde.geometry.Interval(0, 1)
bc = dde.icbc.DirichletBC(geom, lambda x: 0, lambda x, on_boundary: on_boundary)
data = dde.data.PDE(
    geom,
    pde,
    [bc],
    num_domain=50,
    num_boundary=25
)

Shapes before PR:
train_x (100, 1)
train_x_all (75, 1)
train_x_bc (25, 1)
Shapes after PR:
train_x (75, 1)
train_x_all (50, 1)
train_x_bc (25, 1)

Another example with num_domain equals 0

geom = dde.geometry.Interval(0, 1)
bc = dde.icbc.DirichletBC(geom, lambda x: 0, lambda x, on_boundary: on_boundary)
data = dde.data.PDE(
    geom,
    pde,
    [bc],
    num_domain=0,
    num_boundary=25
)

Shapes before PR:
train_x (50, 1)
train_x_all (25, 1)
train_x_bc (25, 1)
Shapes after PR:
train_x (25, 1)
train_x_all (0, 1)
train_x_bc (25, 1)

@lululxvi
Copy link
Owner

lululxvi commented May 7, 2024

Check this #1113

@vl-dud
Copy link
Contributor Author

vl-dud commented May 8, 2024

Check this #1113

These pull requests are certainly related, but in my opinion they are not the same thing. The current PR specifically concerns the duplication of points. The introduction of train_x_pde can be considered in the next step.

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

Successfully merging this pull request may close these issues.

None yet

2 participants