pde_Points

Functions for generating points for training model.

While available to user, not meant to be used. Instead interface through N_pde, N_iv, N_sensors, sensor_range, and N_bc parameters of solving and boundary functions detailed in "Main User Functions".

defineCollocationPoints_2var(fst_bdry, sec_bdry, N_pde)

Function which generates collocation points along t and x or x and y.

Parameters:
  • fst_bdry (list) –

    list of two elements, the interval of t/x to be solved on.

  • sec_bdry (list) –

    list of two elements, the interval of x/y to be solved on.

  • N_pde (int) –

    Number of randomly sampled collocation points along t/x and x/y which PINN uses in training.

Returns:
  • pde_points( column_stack ) –

    Randomly and evenly sampled points along t/x and x/y, using pyDOE's lhs function

defineCollocationPoints_DON_2var(fst_bdry, sec_bdry, N_pde, N_bc, N_sensors, sensor_range)

Function which generates collocation points along t and x or x and y, and which generates sensors for DeepONet.

Parameters:
  • fst_bdry (list) –

    list of two elements, the interval of t/x to be solved on.

  • sec_bdry (list) –

    list of two elements, the interval of x/y to be solved on.

  • N_pde (int) –

    Number of randomly sampled collocation points along t/x and x/y which PINN uses in training.

  • N_bc (int) –

    Number of randomly sampled collocation points along boundaries which PINN uses in training.

  • N_sensors (int) –

    Number of sensors in which network learns over.

  • sensor_range (list) –

    Range in which sensors are sampled over.

Returns:
  • pde_points( column_stack ) –

    Randomly and evenly sampled points along t/x and x/y, using pyDOE's lhs function

  • usensors( list ) –

    Uniformly sampled sensor points in sensor range in shape (N_sensors, N_bc)

defineCollocationPoints_DON_tx(t_bdry, x_bdry, initial_t, t_order, N_pde, N_iv, N_sensors, sensor_range)

Function which generates collocation points along t and x,which generates points for learning inital conditions, and which generates sensors for DeepONet.

Parameters:
  • t_bdry (list) –

    list of two elements, the interval of t to be solved on.

  • x_bdry (list) –

    list of two elements, the interval of x to be solved on.

  • initial_t (lambda) –

    Inital function for t=t0, as a python lambda funciton, with t0 being inital t in t_bdry.

  • t_order (int) –

    Order of t in equation (highest derivative of t used).

  • N_pde (int) –

    Number of randomly sampled collocation points along t and x which PINN uses in training.

  • N_iv (int) –

    Number of randomly sampled collocation points along inital t which PINN uses in training.

  • N_sensors (int) –

    Number of sensors in which network learns over.

  • sensor_range (list) –

    Range in which sensors are sampled over.

Returns:
  • pde_points( column_stack ) –

    Randomly and evenly sampled points along t and x, using pyDOE's lhs function

  • inits( column_stack ) –

    Stack of list containing just t0 value (t_init), list of random and evenly sampled points along t0 (x_init) using lhs, and lists containing inital value functions at x_init for each function.

  • usensors( list ) –

    Uniformly sampled sensor points in sensor range in shape (N_sensors, N_iv)

defineCollocationPoints_tx(t_bdry, x_bdry, initial_t, t_order, N_pde, N_iv)

Function which generates collocation points along t and x, and which generates points for learning inital conditions.

Parameters:
  • t_bdry (list) –

    list of two elements, the interval of t to be solved on.

  • x_bdry (list) –

    list of two elements, the interval of x to be solved on.

  • initial_t (lambda) –

    Inital function for t=t0, as a python lambda funciton, with t0 being inital t in t_bdry.

  • t_order (int) –

    Order of t in equation (highest derivative of t used).

  • N_pde (int) –

    Number of randomly sampled collocation points along t and x which PINN uses in training.

  • N_iv (int) –

    Number of randomly sampled collocation points along inital t which PINN uses in training.

Returns:
  • pde_points( column_stack ) –

    Randomly and evenly sampled points along t and x, using pyDOE's lhs function

  • inits( column_stack ) –

    Stack of list containing just t0 value (t_init), list of random and evenly sampled points along t0 (x_init) using lhs, and lists containing inital value functions at x_init for each function.