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
Question regarding 'Poisson equation in 1D with Dirichlet/Periodic boundary conditions' #457
Comments
DeepXDE will automatically find that the periodic location of the right is the left. |
Actually, it should be bc_u_0 = dde.PeriodicBC(
geomtime, 0, lambda _, on_boundary: on_boundary, derivative_order=0, component=0
)
bc_u_1 = dde.PeriodicBC(
geomtime, 0, lambda _, on_boundary: on_boundary, derivative_order=1, component=0
)
bc_v_0 = dde.PeriodicBC(
geomtime, 0, lambda _, on_boundary: on_boundary, derivative_order=0, component=1
)
bc_v_1 = dde.PeriodicBC(
geomtime, 0, lambda _, on_boundary: on_boundary, derivative_order=1, component=1
) @FMagnani What do you think? |
Thank you for your response. I am still a bit confused about parameters "component_x", I know it's different from "component", but when do we need to specify nonzero values for "component_x"? Thanks! |
In fact, @lululxvi is right, the code should be
I really apologize for the mistake. In dde.PeriodicBC, the second argument (component_x) specifies:
In the Schrodinger example, the input is given as (x,t) so "component_x" should always be 0.
So in the example, "component" should be 0 for the conditions referring to u and it should be 1 for the conditions referring to v. In this particular case, the Boundary Conditions are not highly involved in the training since the solution is identically zero on the boundaries for each t. Therefore the solution is not affected by the mistake. In a general case however, the outcome would have been totally wrong!
In the example, the 1-dimensional Schrodinger equation has been considered. In problems with more than one spatial dimensions the "component_x" argument is needed. |
Hello @mlin26 I hope that I am not misunderstanding the formula in https://deepxde.readthedocs.io/en/latest/demos/pinn_forward/poisson.1d.dirichletperiodic.html |
Hi Prof. Lu,
I just start to learn deepxde. I have a question regarding 1D Poisson equation with Periodic boundary conditions. https://deepxde.readthedocs.io/en/latest/demos/poisson.1d.dirichletperiodic.html?highlight=periodic
In the problem, the PBC is u(0) = u(1), but in the code, I see that it only considers boundary at x=1, that is u(1). Could you tell me where do we define u(0) here?
bc2 = dde.PeriodicBC(geom, 0, boundary_r)
To my understanding, this line code says that the periodic boundary condition is defined at 'boundary_r' in the x-direction. Do we consider u(0) implicitly?
Thanks in advance!
The text was updated successfully, but these errors were encountered: