pde_Boundaries_2var

Main boundary functions for setting up boundaries required in solvePDE calls

setup_boundaries_periodic_tx(t_bdry, x_bdry)

Boundary function for setting up periodic boundaries for a PDE with independent variables x and y.

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.

Returns:
  • flag( string ) –

    string to identify what boundary condition was used internally.

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

setup_boundaries_periodic_xy(x_bdry, y_bdry)

Boundary function for setting up periodic boundaries for a PDE with independent variables t and x.

Parameters:
  • x_bdry (list) –

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

  • y_bdry (list) –

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

Returns:
  • flag( string ) –

    string to identify what boundary condition was used internally.

  • x_bdry( list ) –

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

  • y_bdry( list ) –

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

setup_boundaries_dirichlet_tx(t_bdry, x_bdry, N_bc=100, all_boundaries_cond=None, xleft_boundary_cond=None, xright_boundary_cond=None)

Boundary function for setting up dirichlet boundaries for a PDE with independent variables t and x.

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.

  • N_bc (int, default: 100 ) –

    Number of randomly sampled collocation points along each boundary to use in training

  • all_boundaries_cond (lambda, default: None ) –

    function specifying condition on both xleft and xright boundary. If declared leave xleft_boundary_cond and xright_boundary_cond undeclared. lambda must be of 1 variable.

  • xleft_boundary_cond (lambda, default: None ) –

    function specifying condition on xleft boundary. If declared then declare xright_boundary_cond and leave all_boundaries_cond undeclared. lambda must be of 1 variable.

  • xright_boundary_cond (lambda, default: None ) –

    function specifying condition on xright boundary. If declared then declare xright_boundary_cond and leave all_boundaries_cond undeclared. lambda must be of 1 variable.

All returns information returned in single list.

Returns:
  • flag( string ) –

    string to identify what boundary condition was used internally.

  • bcs( np_column_stack ) –

    stack of three lists; boundary points along t, along x, and functional values u along each boundary.

  • xleft_boundary_cond( lambda ) –

    input lambda or all_boundaries_cond, returned for when hard constrainting

  • xright_boundary_cond( lambda ) –

    input lambda or all_boundaries_cond, returned for when hard constrainting

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

setup_boundaries_dirichlet_xy(x_bdry, y_bdry, N_bc=100, all_boundaries_cond=None, xleft_boundary_cond=None, xright_boundary_cond=None, ylower_boundary_cond=None, yupper_boundary_cond=None)

Boundary function for setting up dirichlet boundaries for a PDE with independent variables t and x.

Parameters:
  • x_bdry (list) –

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

  • y_bdry (list) –

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

  • N_bc (int, default: 100 ) –

    Number of randomly sampled collocation points along each boundary to use in training

  • all_boundaries_cond (lambda, default: None ) –

    function specifying condition on both xleft and xright boundary. If declared leave xleft_boundary_cond, xright_boundary_cond, ylower_boundary_cond, yupper_boundary_cond undeclared. lambda must be of 2 variables (x,y) even if one not used along boundary.

  • xleft_boundary_cond (lambda, default: None ) –

    function specifying condition on xleft boundary. If declared then declare xright_boundary_cond, ylower_boundary_cond, yupper_boundary_cond, and leave all_boundaries_cond undeclared. lambda must be of 2 variables (x,y) even if one not used along specific boundary.

  • xright_boundary_cond (lambda, default: None ) –

    function specifying condition on xright boundary. If declared then declare xleft_boundary_cond, ylower_boundary_cond, yupper_boundary_cond, and leave all_boundaries_cond undeclared. lambda must be of 2 variables (x,y) even if one not used along specific boundary.

  • ylower_boundary_cond (lambda, default: None ) –

    function specifying condition on ylower boundary. If declared then declare xleft_boundary_cond, xright_boundary_cond, yupper_boundary_cond, and leave all_boundaries_cond undeclared. lambda must be of 2 variables (x,y) even if one not used along specific boundary.

  • yupper_boundary_cond (lambda, default: None ) –

    function specifying condition on yupper boundary. If declared then declare xleft_boundary_cond, xright_boundary_cond, ylower_boundary_cond, and leave all_boundaries_cond undeclared. lambda must be of 2 variables (x,y) even if one not used along specific boundary.

All returns information returned in single list.

Returns:
  • flag( string ) –

    string to identify what boundary condition was used internally.

  • bcs( np_column_stack ) –

    stack of three lists; boundary points along x, along y, and functional values u along each boundary.

  • xleft_boundary_cond( lambda ) –

    input lambda or all_boundaries_cond, returned for when hard constrainting

  • xright_boundary_cond( lambda ) –

    input lambda or all_boundaries_cond, returned for when hard constrainting

  • ylower_boundary_cond( lambda ) –

    input lambda or all_boundaries_cond, returned for when hard constrainting

  • yupper_boundary_cond( lambda ) –

    input lambda or all_boundaries_cond, returned for when hard constrainting

  • x_bdry( list ) –

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

  • y_bdry( list ) –

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

setup_boundaries_neumann_tx(t_bdry, x_bdry, N_bc=100, all_boundaries_cond=None, xleft_boundary_cond=None, xright_boundary_cond=None)

Boundary function for setting up dirichlet boundaries for a PDE with independent variables t and x.

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.

  • N_bc (int, default: 100 ) –

    Number of randomly sampled collocation points along each boundary to use in training

  • all_boundaries_cond (lambda, default: None ) –

    function specifying condition on both xleft and xright boundary. If declared leave xleft_boundary_cond and xright_boundary_cond undeclared. lambda must be of 1 variable.

  • xleft_boundary_cond (lambda, default: None ) –

    function specifying condition on xleft boundary. If declared then declare xright_boundary_cond and leave all_boundaries_cond undeclared. lambda must be of 1 variable.

  • xright_boundary_cond (lambda, default: None ) –

    function specifying condition on xright boundary. If declared then declare xright_boundary_cond and leave all_boundaries_cond undeclared. lambda must be of 1 variable.

All returns information returned in single list.

Returns:
  • flag( string ) –

    string to identify what boundary condition was used internally.

  • bcs( np_column_stack ) –

    stack of three lists; boundary points along t, along x, and functional values u along each boundary.

  • xleft_boundary_cond( lambda ) –

    input lambda or all_boundaries_cond, returned for when hard constrainting

  • xright_boundary_cond( lambda ) –

    input lambda or all_boundaries_cond, returned for when hard constrainting

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

setup_boundaries_neumann_xy(x_bdry, y_bdry, N_bc=100, all_boundaries_cond=None, xleft_boundary_cond=None, xright_boundary_cond=None, ylower_boundary_cond=None, yupper_boundary_cond=None)

Boundary function for setting up dirichlet boundaries for a PDE with independent variables t and x.

Parameters:
  • x_bdry (list) –

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

  • y_bdry (list) –

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

  • N_bc (int, default: 100 ) –

    Number of randomly sampled collocation points along each boundary to use in training

  • all_boundaries_cond (lambda, default: None ) –

    function specifying condition on both xleft and xright boundary. If declared leave xleft_boundary_cond, xright_boundary_cond, ylower_boundary_cond, yupper_boundary_cond undeclared. lambda must be of 2 variables (x,y) even if one not used along boundary.

  • xleft_boundary_cond (lambda, default: None ) –

    function specifying condition on xleft boundary. If declared then declare xright_boundary_cond, ylower_boundary_cond, yupper_boundary_cond, and leave all_boundaries_cond undeclared. lambda must be of 2 variables (x,y) even if one not used along specific boundary.

  • xright_boundary_cond (lambda, default: None ) –

    function specifying condition on xright boundary. If declared then declare xleft_boundary_cond, ylower_boundary_cond, yupper_boundary_cond, and leave all_boundaries_cond undeclared. lambda must be of 2 variables (x,y) even if one not used along specific boundary.

  • ylower_boundary_cond (lambda, default: None ) –

    function specifying condition on ylower boundary. If declared then declare xleft_boundary_cond, xright_boundary_cond, yupper_boundary_cond, and leave all_boundaries_cond undeclared. lambda must be of 2 variables (x,y) even if one not used along specific boundary.

  • yupper_boundary_cond (lambda, default: None ) –

    function specifying condition on yupper boundary. If declared then declare xleft_boundary_cond, xright_boundary_cond, ylower_boundary_cond, and leave all_boundaries_cond undeclared. lambda must be of 2 variables (x,y) even if one not used along specific boundary.

All returns information returned in single list.

Returns:
  • flag( string ) –

    string to identify what boundary condition was used internally.

  • bcs( np_column_stack ) –

    stack of 6; sampled boundary points along x and y, list of just repeated boundary values for x and y, and functional values u along both x boundaries and y boundaries. Seperated for derivatives in training for neumann constrainting.

  • xleft_boundary_cond( lambda ) –

    input lambda or all_boundaries_cond, returned for when hard constrainting

  • xright_boundary_cond( lambda ) –

    input lambda or all_boundaries_cond, returned for when hard constrainting

  • ylower_boundary_cond( lambda ) –

    input lambda or all_boundaries_cond, returned for when hard constrainting

  • yupper_boundary_cond( lambda ) –

    input lambda or all_boundaries_cond, returned for when hard constrainting

  • x_bdry( list ) –

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

  • y_bdry( list ) –

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