Implementing initial condition as hard constraint using values obtained from interpolation between arbitrary values #1265
Unanswered
Rahul-Patel25
asked this question in
Q&A
Replies: 1 comment
-
|
You cannot use SciPy. You need to implement it in TensoFlow/pyTorch/etc. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
Thanks for this useful library.
I am working on the heat equation example.
To incorporate the initial condition as a soft constraint I can use
or to implement the same initial condition as hard constraint I can transform the output as
and will get the same results.
Now, rather than specifying the sinusoid function in the ICs, I want to specify arbitrary points (let’s say 7) of X and specify the corresponding solution (y) at that point for the initial state (t=0). For intermediate values of x, the values of y should be obtained via interpolation (the end goal is to pass these arbitrary solution values (y) at t=0 as an input to the Neural network to implement arbitrary initial condition).
For soft constraints, I was able to implement them as follows.
interpolate.interp1dis an 1D interpolation function of SciPy.How can I implement the same as hard constraints by transforming the output layer? Could you please guide me through it.
Beta Was this translation helpful? Give feedback.
All reactions