Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce regularization for computation of Fourier weights #45

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions GX-TimeFrequency/src/minimax_grids.F90
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ subroutine get_transformation_weights(num_points, tau_points, omega_points, weig
integer :: i_node, i_point, j_point, k_point, &
num_x_nodes
integer, parameter :: nodes_factor = 200
real(kind=dp) :: current_point, x_factor
real(kind=dp) :: current_point, x_factor, regularization
real(kind=dp), allocatable, dimension(:) :: weights_work, x_mu, psi
real(kind=dp), allocatable, dimension(:, :) :: mat_A

Expand Down Expand Up @@ -316,9 +316,11 @@ subroutine get_transformation_weights(num_points, tau_points, omega_points, weig
! integration weights = (V Sigma^-1 U^T)*psi

! 1) V * Sigma^-1
regularization = 0.01_dp
do j_point = 1, num_points
do k_point = 1, num_points
mat_VT_s(k_point, j_point) = mat_VT(j_point, k_point)/vec_S(j_point)
mat_VT_s(k_point, j_point) = mat_VT(j_point, k_point)*vec_S(j_point) / &
(vec_S(j_point)**2+regularization**2)
end do ! k_point
end do ! j_point

Expand Down