PDE Solve Class for PDE's in x and y
Class which is returned in solvePDE_xy calls
pde_xy_solution
__init__(eqn, setup_boundaries, x_bdry, y_bdry, N_pde, net_layers, net_units, constraint, model, extra_ders, flag)
Constructer for class.
| Parameters: |
|
|---|
Constructer also generates, model: model if model==None, pde_points: randomly sampled points for model to train with, init_points: points along t0 for network to train with, X: sampled points along x direction, and Y: sampled points along y direction. Then calls PINNtrainSelect_xy function to train. Then defines solution prediction from returned model.
Class Functions
Fucntions the user should call to access information from solvePDE call. Training, Getter, and Plotter functions
Training
train_model(epochs)
Main function to train model. Defines solution prediction from model, and generates meshgrid data for plotting
| Parameters: |
|
|---|
Getters
get_equation()
| Returns: |
|
|---|
get_N_pde()
Return input N_pde
get_epochs()
Return input epochs
get_flag()
Return internal flag
get_constraint()
Return input constraint
get_epoch_loss()
Return model total epoch loss
get_pde_loss()
Return model pde loss
get_bc_loss()
Return model boundary condition loss
get_iv_loss()
Return model initial value loss
get_x_points()
Return sampled x points
get_y_points()
Return sampled y points
get_solution_prediction()
Return model solution prediction
get_model()
Return trained model
get_pde_points()
Return sampled pe points
Plotters
plot_epoch_loss(filetitle='PDE-Epoch-Loss')
Calls pde_Plotters.plot_epoch_loss with correct data
| Parameters: |
|
|---|
plot_bc_loss(filetitle='PDE-BC-Loss')
Calls pde_Plotters.plot_bc_loss with correct data
| Parameters: |
|
|---|
plot_iv_loss(filetitle='PDE-IV-Loss')
Calls pde_Plotters.plot_iv_loss with correct data
| Parameters: |
|
|---|
plot_pde_loss(filetitle='PDE-DE-Loss')
Calls pde_Plotters.plot_pde_loss with correct data
| Parameters: |
|
|---|
plot_all_losses(filetitle='PDE-All-Losses')
Calls pde_Plotters.plot_all_losses with correct data
| Parameters: |
|
|---|
plot_solution_prediction(filetitle='PDE-solution-pred')
Calls pde_Plotters.plot_solution_prediction with correct data
| Parameters: |
|
|---|
plot_solution_prediction_3D(filetitle='PDE-solution-Pred-3D')
Calls pde_Plotters.plot_3D with correct data
| Parameters: |
|
|---|
plot_predicted_exact(exact_eqn, filetitle='PDE-SolPred-Exact')
Calls pde_Plotters.plot_predicted_exact with correct data
| Parameters: |
|
|---|