fastvpinns.physics.cd2d module
This file cd2d.py is implementation of our efficient tensor-based loss calculation for cd2d equation
Author: Thivin Anandh D
Date: 21/Sep/2023
History: Initial implementation
Refer: https://arxiv.org/abs/2404.12063
- fastvpinns.physics.cd2d.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)[source]
Calculates and returns the loss for the CD2D problem
- 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 (list) – The parameters for the bilinear form.
- Returns:
The calculated loss.
- Return type:
tf.Tensor