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

Regarding the spatial and temporal encoding in NS.py #11

Open
Vishwanath1999 opened this issue Nov 1, 2024 · 0 comments
Open

Regarding the spatial and temporal encoding in NS.py #11

Vishwanath1999 opened this issue Nov 1, 2024 · 0 comments

Comments

@Vishwanath1999
Copy link

Vishwanath1999 commented Nov 1, 2024

@paraklas @sifanw094
I want to understand the spatio-temporal encoding involved in NS.py which is the following.

def input_encoding(t, x, y):
       k_t = np.power(10.0, np.arange(0, M_t + 1))
       out = np.hstack([1, k_t * t,
                        np.cos(k_x * w_x * x), np.cos(k_y * w_y * y),
                        np.sin(k_x * w_x * x), np.sin(k_y * w_y * y),
                        np.cos(k_xx * w_x * x) * np.cos(k_yy * w_y * y),
                        np.cos(k_xx * w_x * x) * np.sin(k_yy * w_y * y),
                        np.sin(k_xx * w_x * x) * np.cos(k_yy * w_y * y),
                        np.sin(k_xx * w_x * x) * np.sin(k_yy * w_y * y)])
       return out

why is there an exponential encoding of time? and also the k_xx and k_yy meshgrid based encoding is not very intuitive. Can anyone pls help me understand this?
In the main training loop there is reinitialization of PINN in every time marching step. Can't we just init a single PINN model for all time steps and train it for all steps which is what intuitively makes sense to me. Pls correct if I am wrong.

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

1 participant