Closed Saransh-cpp closed 2 years ago
It is not an issue. It is designed as this. NeumannBC
is for boundary condition for space, not time.
Oh, I see. Thank you!
@lululxvi can I use NeumannBC
when defining ICs with derivatives or should I use OperatorBC
here too? For instance, how can I define an IC - At t = 0 -> du(x, t) / dt = 0
?
After going through the FAQs, I wrote this code -
def boundary_initial(x, _):
return np.isclose(x[-1], 0)
geom = dde.geometry.Interval(0, 1)
timedomain = dde.geometry.TimeDomain(0, 1)
geomtime = dde.geometry.GeometryXTime(geom, timedomain)
bc = dde.DirichletBC(geomtime, lambda x: 0, lambda _, on_boundary: on_boundary)
ic_1 = dde.IC(geomtime, lambda x: np.sin(
n * np.pi * x[:, 0:1] / L), lambda _, on_initial: on_initial)
ic_2 = dde.NeumannBC(geomtime, lambda x: 0, boundary_initial,)
Is this correct?
Use OperatorBC
. NeumannBC
only computes the gradient with respect to space coordinate.
Greetings,
The
wave_1D.py
example says -Is this still an issue or has this been fixed in
DeepXDE
?Thank you!