EXTERNAL::SGESV! Use DGESV rather than SGESV for double precision
#else
EXTERNAL::DGESV! Use DGESV rather than SGESV for double precision
#endif
INTEGER,INTENT(IN)::n,N_NUM,N_DEN! index of the considered Kernel
REAL(xp),INTENT(OUT)::pade_num_coeffs(N_NUM+1),pade_denom_coeffs(N_NUM+1)! OUT rather than INOUT to make sure no information is retained from previous Kernel computations
! Then solve for the denominator coefficients, setting the first one to 1
!!!! SOLVER NOT YET IMPLEMENTED!!!!
pade_denom_coeffs(1)=1
pade_denom_coeffs(2:)=-taylor_kernel_coeffs(N_NUM+2:N_NUM+N_NUM+1)! First acts as RHS vector for equation, is then transformed to solution by DGESV
#ifdef SINGLE_PRECISION
CALLSGESV(N_NUM,1,denom_matrix,N_NUM,pivot,pade_denom_coeffs(2:),N_NUM,return_code)! LAPACK solver for matrix equation. Note that denom_matrix is now no longer as expected
#else
CALLDGESV(N_NUM,1,denom_matrix,N_NUM,pivot,pade_denom_coeffs(2:),N_NUM,return_code)! LAPACK solver for matrix equation. Note that denom_matrix is now no longer as expected
#endif
! Print an error message in case there was a problem with the solver
IF(return_code/=0)THEN
WRITE(*,*)'An error occurred in the solving for the Pade denominator coefficients. The error code is: ',return_code
ENDIF
! Finally compute the numerator coefficients
DOm=1,N_NUM+1
pade_num_coeffs(m)=0! As the array is not automatically filled with zeros