fastvpinns.physics.cd2d_inverse module
This file cd2d_inverse.py is implemntation of our efficient tensor-based loss calculation for cd2d equation with inverse problem (Constant)
Author: Thivin Anandh D
Date: 21/Sep/2023
History: Initial implementation
Refer: https://arxiv.org/abs/2404.12063
- fastvpinns.physics.cd2d_inverse.pde_loss_cd2d(test_shape_val_mat, test_grad_x_mat, test_grad_y_mat, pred_nn, pred_grad_x_nn, pred_grad_y_nn, forcing_function, bilinear_params_dict, inverse_param_dict)[source]
Calculates and returns the loss for the CD2D problem Inverse (constant)
- Parameters:
test_shape_val_mat (tf.Tensor) – The test shape value matrix.
test_grad_x_mat (tf.Tensor) – The x-gradient of the test matrix.
test_grad_y_mat (tf.Tensor) – The y-gradient of the test matrix.
pred_nn (tf.Tensor) – The predicted neural network output.
pred_grad_x_nn (tf.Tensor) – The x-gradient of the predicted neural network output.
pred_grad_y_nn (tf.Tensor) – The y-gradient of the predicted neural network output.
forcing_function (function) – The forcing function used in the PDE.
bilinear_params_dict (dict) – The dictionary containing the bilinear parameters.
inverse_param_dict (dict) – The dictionary containing the parameters for the inverse problem.
- Returns:
The calculated loss.
- Return type:
tf.Tensor