ode_ParamChecks

Functions for checking parameters of ODE solvers.

While available to user, not meant to be used.

solveODE_IVP_ParamCheck(eqn, order, init_data, t_bdry, N_pde, epochs, net_units, net_layers, constraint)

Parameter checking of solveODE_IVP 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", "utt", 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.

  • order (int) –

    Should be order of equation (highest derivative used). Can be 1-5.

  • init_data (list) –

    Should be inital data for each deriviatve. Second order equation would have [u(t0), ut(t0)], with t0 being inital t in t_bdry.

  • t_bdry (list) –

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

  • N_pde (int) –

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

  • epochs (int) –

    Should be the number of epochs PINN gets trained for.

  • net_layers (int) –

    Should be the number of internal layers of PINN

  • net_units (int) –

    Should be the 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

solveODE_BVP_ParamCheck(eqn, init_data, t_bdry, N_pde, epochs, order, net_units, net_layers, constraint)

Parameter checking of solveODE_BVP 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", "utt", 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.

  • init_data (list) –

    Should be inital data for each deriviatve. Second order equation would have [u(t0), u(t1), ut(t0), u(t1)], with t0 being inital t in t_bdry, t1 being final t in t_bdry.

  • t_bdry (list) –

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

  • N_pde (int) –

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

  • epochs (int) –

    Should be the number of epochs PINN gets trained for.

  • order (int) –

    Should be order of equation (highest derivative used). Can be 1-3.

  • net_layers (int) –

    Should be the number of internal layers of PINN

  • net_units (int) –

    Should be the 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

solveODESystem_IVP_ParamCheck(eqns, inits, t_bdry, N_pde, epochs, orders, net_layers, net_units, constraint)

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

Parameters:
  • eqns (string) –

    Should be equations to solve in form of list of strings. function and derivatives represented as "u", "ut", "utt", etc. for first equation. "x", "xt", etc. for second equation. "y", "yt", etc. for third equation. 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.

  • inits (list) –

    Should be list of lists of inital data for each deriviatve. Previously descirbed orders would have [ [u(t0) ], [ x(t0), xt(t0), xtt(t0) ], [ y(t0), yt(t0) ]], with t0 being inital t in t_bdry.

  • t_bdry (list) –

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

  • N_pde (int) –

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

  • epochs (int) –

    Should be the number of epochs PINN gets trained for.

  • orders (list) –

    list of orders of equations (highest derivative used). Can be 1-3. ex. [1, 3, 2], corresponding to a highest derivative of "ut", "xttt", "ytt".

  • net_layers (int) –

    Should be the number of internal layers of PINN

  • net_units (int) –

    Should be the 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

solveODE_DeepONet_IVP_ParamCheck(eqn, order, init, t_bdry, N_pde, sensor_range, N_sensors, epochs, net_layers, net_units, constraint)

Parameter checking of solveODE_IVP 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", "utt", 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.

  • order (int) –

    Should be order of equation (highest derivative used). Can be 1-5.

  • init (list) –

    Should be inital data for each deriviatve. Second order equation would have [u(t0), ut(t0)], with t0 being inital t in t_bdry.

  • t_bdry (list) –

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

  • N_pde (int) –

    Should be the number of randomly sampled collocation points along t which DeepONet uses in training.

  • sensor_range (list) –

    Should be range in which sensors are sampled over.

  • N_sensors (int) –

    Should be number of sensors in which network learns over.

  • epochs (int) –

    Should be the number of epochs DeepONet gets trained for.

  • net_layers (int) –

    Should be the number of internal layers of DeepONet

  • net_units (int) –

    Should be the 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

solveODE_DeepONet_BVP_ParamCheck(eqn, order, init, t_bdry, N_pde, sensor_range, N_sensors, epochs, net_layers, net_units, constraint)

Parameter checking of solveODE_IVP 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", "utt", 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.

  • order (int) –

    Should be order of equation (highest derivative used). Can be 1-5.

  • init (list) –

    Should be inital data for each deriviatve. Second order equation would have [u(t0), u(t1), ut(t0), u(t1)], with t0 being inital t in t_bdry, t1 being final t in t_bdry.

  • t_bdry (list) –

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

  • N_pde (int) –

    Should be the number of randomly sampled collocation points along t which DeepONet uses in training.

  • sensor_range (list) –

    Should be range in which sensors are sampled over.

  • N_sensors (int) –

    Should be number of sensors in which network learns over.

  • epochs (int) –

    Should be the number of epochs DeepONet gets trained for.

  • net_layers (int) –

    Should be the number of internal layers of DeepONet

  • net_units (int) –

    Should be the 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

solveODE_DeepONetSystem_ParamCheck(eqns, orders, inits, t_bdry, N_pde, sensor_range, N_sensors, epochs, net_layers, net_units)

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

Parameters:
  • eqns (string) –

    Should be equations to solve in form of list of strings. function and derivatives represented as "u", "ut", "utt", etc. for first equation. "x", "xt", etc. for second equation. "y", "yt", etc. for third equation. 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.

  • inits (list) –

    Should be list of lists of inital data for each deriviatve. Previously descirbed orders would have [ [u(t0) ], [ x(t0), xt(t0), xtt(t0) ], [ y(t0), yt(t0) ]], with t0 being inital t in t_bdry.

  • t_bdry (list) –

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

  • N_pde (int) –

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

  • sensor_range (list) –

    Should be range in which sensors are sampled over.

  • N_sensors (int) –

    Should be number of sensors in which network learns over.

  • epochs (int) –

    Should be the number of epochs DeepONet gets trained for.

  • orders (list) –

    list of orders of equations (highest derivative used). Can be 1-3. ex. [1, 3, 2], corresponding to a highest derivative of "ut", "xttt", "ytt".

  • net_layers (int) –

    Should be the number of internal layers of DeepONet

  • net_units (int) –

    Should be the number of units in each internal layer

No Returns