Skip to content

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

@Vishwanath1999

Description

@Vishwanath1999

@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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions