PDE Solve Class for PDE's in t and x
Class which is returned in solvePDE_tx calls
pde_tx_solution
Name of class returned
__init__(eqn, setup_initials, setup_boundaries, t_bdry, x_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, T: sampled points along t direction, and X: sampled points along x direction. Then train_model should be call to call PINNtrainSelect_tx 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, RAR_adaptivity=['Frequency', 'PointsToAdd'])
Main function to train model. Defines solution prediction from model, and generates meshgrid data for plotting
| Parameters: |
|
|---|
Getters
get_equation()
Return input equation
get_initial_t()
Return input initial_t function
get_t_bdry()
Return input t_bdry
get_x_bdry()
Return input x_bdry
get_N_pde()
Return input N_pde
get_epochs()
Return input epochs
get_t_order()
Return input t_order
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_iv_loss()
Return model initial value loss
get_bc_loss()
Return model boundary condition loss
get_t_points()
Return sampled t points
get_x_points()
Return sampled x points
get_solution_prediction()
Return model solution prediction
get_model()
Return trained model
get_pde_points()
Return sampled pde points
Plotters
plot_epoch_loss(filetitle='PDE-Epoch-Loss')
Calls pde_Plotters.plot_epoch_loss with correct data
| Parameters: |
|
|---|
plot_iv_loss(filetitle='PDE-IV-Loss')
Calls pde_Plotters.plot_iv_loss with correct data
| Parameters: |
|
|---|
plot_bc_loss(filetitle='PDE-BC-Loss')
Calls pde_Plotters.plot_bc_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_losse 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: |
|
|---|