lululxvi / deepxde

A library for scientific machine learning and physics-informed learning
https://deepxde.readthedocs.io
GNU Lesser General Public License v2.1
2.79k stars 757 forks source link

Add additional parameter as input #658

Open tsarikahin opened 2 years ago

tsarikahin commented 2 years ago

Dear Lu Lu,

first of all, thanks for this unique package. I have one question regarding the addition of a parameter as input. To have a better understanding, I will give the example of Euler Beam .

In line, force is given as 1:

def pde(x, y):
    dy_xx = ddy(x, y)
    dy_xxxx = dde.grad.hessian(dy_xx, x)
    return dy_xxxx + 1

What if I want to give the force as an input? So the architecture will take x and force as an input, which should look like this:

layer_size = [2] + [20] * 3 + [1]

For all examples, input is space or time or a combination of them. How would it be possible? Or in general, is it possible to give the architecture any external input without changing the source code? Thanks in advance!

Best, Tarik

lululxvi commented 2 years ago

See FAQ "Q: Solve parametric PDEs."