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

Hard-constraint Neumann boundary condition #1837

Open
c-straub opened this issue Sep 11, 2024 · 1 comment
Open

Hard-constraint Neumann boundary condition #1837

c-straub opened this issue Sep 11, 2024 · 1 comment

Comments

@c-straub
Copy link

Hi there,

I'm having difficulties imposing a hard-constraint Neumann boundary condition in DeepXDE.

Concretely, say I want to solve some PDE on the space-time domain $(x,t)\in[-1,1]\times[0,1]$ with Neumann boundary condition $\partial_x u(1,t)=0$. One way to hard-constraint this boundary condition is by transforming the output of a neural network $u_{\mathrm{NN}}=u_{\mathrm{NN}}(x,t)$ as follows:

$$u_{\mathrm{transformed}}(x,t) := x\cdot (u_{\mathrm{NN}}(x,t)-u_{\mathrm{NN}}(1,t)-\partial_xu_{\mathrm{NN}}(1,t)).$$

Is there a way to implement this transformation in DeepXDE using an output_transform function (in particular, the evaluation of the NN and its $x$-derivative at $(1,t)$ ) or should I use callbacks for this task?

Any help would be very much appreciated.

Best,
Christopher

@lululxvi
Copy link
Owner

This is not easy to implement.

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