pde_ParamChecks

Functions for checking parameters of PDE solvers.

While available to user, not meant to be used.

solvePDE_tx_ParamCheck(eqn, setup_initials, setup_boundaries, t_bdry, x_bdry, N_pde, epochs, net_layers, net_units, model, constraint)

Parameter checking of solvePDE_tx calls. Raises error on incorrect input.

Parameters:
  • eqn (string) –

    Should be equation to solve in form of string. Function and derivatives represented as "u", "ut", "ux", "utt", "uxx", etc. for including function, i.e. cos(u), use tf.cos(u), or for ln(t), np.log(t). Write equation as would be written in code.

  • setup_initials (initial) –

    initial conditions set up from return of pde_Initials.setup_initialconds_2var call. See examples or API for initials for how to use.

  • setup_boundaries (boundary) –

    Should be boundary conditions set up from return of pde_Boundaries_2var call

  • t_bdry (list) –

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

  • x_bdry (list) –

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

  • N_pde (int) –

    Should be number of randomly sampled collocation points along t and x which PINN uses in training.

  • epochs (int) –

    Should be number of epochs PINN gets trained for.

  • net_layers (int) –

    Should be number of internal layers of PINN

  • net_units (int) –

    Should be number of units in each internal layer

  • model (PINN) –

    User may pass in user constructed network, however no guarentee of correct training.

  • constraint (string) –

    Should be string which determines hard constrainting inital conditions or network learning inital conditions. "soft" or "hard"

No returns

Note: Hard constraints on dirichlet and neumann boundaries not implemented for equations in t and x

solvePDE_xy_ParamCheck(eqn, setup_boundaries, x_bdry, y_bdry, N_pde, epochs, net_layers, net_units, model, constraint)

Parameter checking of solvePDE_xy calls. Raises error on incorrect input.

Parameters:
  • eqn (string) –

    Should be equation to solve in form of string. function and derivatives represented as "u", "ux", "uy", "uxx", "uyy", etc. for including function, i.e. cos(u), use tf.cos(u), or for ln(x), np.log(x). Write equation as would be written in code.

  • setup_boundaries (boundary) –

    Should be boundary conditions set up from return of pde_Boundaries_2var call

  • x_bdry (list) –

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

  • y_bdry (list) –

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

  • N_pde (int) –

    Should be number of randomly sampled collocation points along x and y which PINN uses in training.

  • epochs (int) –

    Should be number of epochs PINN gets trained for.

  • net_layers (int) –

    Should be number of internal layers of PINN

  • net_units (int) –

    Should be number of units in each internal layer

  • model (PINN) –

    User may pass in user constructed network, however no guarentee of correct training.

  • constraint (string) –

    Should be string which determines hard constrainting inital conditions or network learning inital conditions. "soft" or "hard"

No returns

Note: Hard constraints on neumann boundaries not implemented for equations in x and y

solvePDE_DeepONet_tx_ParamCheck(eqn, setup_initials, setup_boundaries, t_bdry, x_bdry, N_pde, N_sensors, sensor_range, epochs, net_layers, net_units, constraint)

Parameter checking of solvePDE_DepONet_ty calls. Raises error on incorrect input.

Parameters:
  • eqn (string) –

    Should be equation to solve in form of string. function and derivatives represented as "u", "ut", "ux", "utt", "uxx", etc. for including function, i.e. cos(u), use tf.cos(u), or for ln(t), np.log(t). Write equation as would be written in code.

  • setup_initials (initial) –

    initial conditions set up from return of pde_Initials.setup_initialconds_2var call. See examples or API for initials for how to use.

  • setup_boundaries (boundary) –

    Should be boundary conditions set up from return of pde_Boundaries_2var call

  • t_bdry (list) –

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

  • x_bdry (list) –

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

  • N_pde (int) –

    Should be number of randomly sampled collocation points to be used along t and x which DeepONet uses in training.

  • N_sensors (int) –

    Should be number of sensors in which network learns over.

  • sensor_range (list) –

    Should be range in which sensors are sampled over.

  • epochs (int) –

    Should be number of epochs DeepONet gets trained for.

  • net_layers (int) –

    Should be number of internal layers of DeepONet

  • net_units (int) –

    Should be number of units in each internal layer

  • constraint (string) –

    Should be string which determines hard constrainting inital conditions or network learning inital conditions. "soft" or "hard"

No returns

Note: Hard constraints on dirichlet and neumann boundaries not implemented for equations in t and x

solvePDE_DeepONet_xy_ParamCheck(eqn, setup_boundaries, x_bdry, y_bdry, N_pde, N_sensors, sensor_range, epochs, net_layers, net_units, constraint)

Parameter checking of solvePDE_DeepONet_xy calls. Raises error on incorrect input.

Parameters:
  • eqn (string) –

    Should be equation to solve in form of string. function and derivatives represented as "u", "ux", "uy", "uxx", "uyy", etc. for including function, i.e. cos(u), use tf.cos(u), or for ln(x), np.log(x). Write equation as would be written in code.

  • setup_boundaries (boundary) –

    Should be boundary conditions set up from return of pde_Boundaries_2var call

  • x_bdry (list) –

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

  • y_bdry (list) –

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

  • N_pde (int) –

    Should be number of randomly sampled collocation points to be used along x and y which DeepONet uses in training.

  • N_sensors (int) –

    Should be number of sensors in which network learns over.

  • sensor_range (list) –

    Should be range in which sensors are sampled over.

  • epochs (int) –

    Should be number of epochs DeepONet gets trained for.

  • net_layers (int) –

    Should be number of internal layers of DeepONet

  • net_units (int) –

    Should be number of units in each internal layer

  • constraint (string) –

    Should be string which determines hard constrainting inital conditions or network learning inital conditions. "soft" or "hard"

No returns

Note: Hard constraints on neumann boundaries not implemented for equations in x and y