Commit 2ab81eb6 authored by Alexander Neukirchen's avatar Alexander Neukirchen

removed the B_xc grabbing from the vgen (was flawed anyway)

parent 2262c4ba
......@@ -4,9 +4,9 @@
! of the MIT license as expressed in the LICENSE file in more detail.
!--------------------------------------------------------------------------------
MODULE m_fleur
IMPLICIT NONE
IMPLICIT NONE
CONTAINS
SUBROUTINE fleur_execute(mpi_comm)
SUBROUTINE fleur_execute(mpi_comm)
! ***************************************************************
!
......@@ -36,48 +36,48 @@ CONTAINS
!----------------------------------------
! this routine is the main PROGRAM
USE m_types
USE m_constants
USE m_fleur_init
USE m_optional
USE m_cdn_io
USE m_mixing_history
USE m_qfix
USE m_vgen
USE m_vgen_coulomb
USE m_writexcstuff
USE m_vmatgen
USE m_eigen
USE m_eigenso
USE m_fermie
USE m_cdngen
USE m_totale
USE m_potdis
USE m_mix
USE m_xmlOutput
USE m_juDFT_time
USE m_calc_hybrid
USE m_rdmft
USE m_io_hybrid
USE m_wann_optional
USE m_wannier
USE m_bs_comfort
USE m_dwigner
USE m_ylm
USE m_metagga
USE m_divergence
USE m_rotate_mt_den_tofrom_local
USE m_plot
USE m_types
USE m_constants
USE m_fleur_init
USE m_optional
USE m_cdn_io
USE m_mixing_history
USE m_qfix
USE m_vgen
USE m_vgen_coulomb
USE m_writexcstuff
USE m_vmatgen
USE m_eigen
USE m_eigenso
USE m_fermie
USE m_cdngen
USE m_totale
USE m_potdis
USE m_mix
USE m_xmlOutput
USE m_juDFT_time
USE m_calc_hybrid
USE m_rdmft
USE m_io_hybrid
USE m_wann_optional
USE m_wannier
USE m_bs_comfort
USE m_dwigner
USE m_ylm
USE m_metagga
USE m_divergence
USE m_rotate_mt_den_tofrom_local
USE m_plot
#ifdef CPP_MPI
USE m_mpi_bc_potden
USE m_mpi_bc_potden
#endif
USE m_eig66_io
USE m_chase_diag
USE m_writeBasis
!$ USE omp_lib
IMPLICIT NONE
USE m_eig66_io
USE m_chase_diag
USE m_writeBasis
!$ USE omp_lib
IMPLICIT NONE
INTEGER, INTENT(IN) :: mpi_comm
INTEGER, INTENT(IN) :: mpi_comm
TYPE(t_input) :: input
TYPE(t_field) :: field, field2
......@@ -143,12 +143,6 @@ CONTAINS
! Initialize and load inDen density (start)
CALL inDen%init(stars,atoms,sphhar,vacuum,noco,input%jspins,POTDEN_TYPE_DEN)
DO i=1,3
! CALL xcB(i)%init(stars,atoms,sphhar,vacuum,noco,1,POTDEN_TYPE_DEN)
CALL xcB(i)%init_potden_simple(stars%ng3,atoms%jmtd,sphhar%nlhd,atoms%ntype,atoms%n_u,1,.FALSE.,.FALSE.,POTDEN_TYPE_DEN,vacuum%nmzd,vacuum%nmzxyd,stars%ng2)
ALLOCATE(xcB(i)%pw_w,mold=xcB(i)%pw)
! xcB(i)%
ENDDO
archiveType = CDN_ARCHIVE_TYPE_CDN1_const
IF (noco%l_noco) archiveType = CDN_ARCHIVE_TYPE_NOCO_const
......@@ -255,7 +249,7 @@ CONTAINS
CALL timestart("generation of potential")
CALL vgen(hybrid,field,input,xcpot,DIMENSION,atoms,sphhar,stars,vacuum,sym,&
obsolete,cell,oneD,sliceplot,mpi,results,noco,EnergyDen,inDen,vTot,vx,vCoul,xcB)
obsolete,cell,oneD,sliceplot,mpi,results,noco,EnergyDen,inDen,vTot,vx,vCoul)
CALL timestop("generation of potential")
IF ((sliceplot%iplot.NE.0 ).AND.(mpi%irank==0) ) THEN
......@@ -433,7 +427,7 @@ CONTAINS
!!$ input%total = .FALSE.
!!$ CALL timestart("generation of potential (total)")
!!$ CALL vgen(hybrid,reap,input,xcpot,DIMENSION, atoms,sphhar,stars,vacuum,sym,&
!!$ obsolete,cell,oneD,sliceplot,mpi, results,noco,outDen,inDenRot,vTot,vx,vCoul,xcB)
!!$ obsolete,cell,oneD,sliceplot,mpi, results,noco,outDen,inDenRot,vTot,vx,vCoul)
!!$ CALL timestop("generation of potential (total)")
!!$
!!$ CALL potdis(stars,vacuum,atoms,sphhar, input,cell,sym)
......@@ -515,11 +509,10 @@ CONTAINS
! DIVERGENCE
! IF ((.TRUE.).AND.(.NOT.noco%l_mtnocoPot)) THEN
! CALL timestart("grab B Kurz noco")
! CALL only_get_B(atoms,sphhar,sym,vtot,xcB,noco)
! CALL timestop("grab B Kurz noco")
! END IF
! DO i=1,3
! CALL xcB(i)%init_potden_simple(stars%ng3,atoms%jmtd,sphhar%nlhd,atoms%ntype,atoms%n_u,1,.FALSE.,.FALSE.,POTDEN_TYPE_DEN,vacuum%nmzd,vacuum%nmzxyd,stars%ng2)
! ALLOCATE(xcB(i)%pw_w,mold=xcB(i)%pw)
! ENDDO
! CALL dummyDen%init(stars,atoms,sphhar,vacuum,noco,1,POTDEN_TYPE_DEN)
! ALLOCATE(dummyDen%pw_w,mold=dummyDen%pw)
......@@ -535,7 +528,6 @@ CONTAINS
! CALL divergence(input%jspins,i,stars%kxc1_fft*stars%kxc2_fft*stars%kxc3_fft,atoms,sphhar,sym,stars,cell,vacuum,noco,xcB,divB)
! END DO
!! CALL vDiv%init(stars,atoms,sphhar,vacuum,noco,1,POTDEN_TYPE_POTCOUL)
! CALL vDiv%init_potden_simple(stars%ng3,atoms%jmtd,sphhar%nlhd,atoms%ntype,atoms%n_u,1,.FALSE.,.FALSE.,POTDEN_TYPE_POTCOUL,vacuum%nmzd,vacuum%nmzxyd,stars%ng2)
! ALLOCATE(vDiv%pw_w(SIZE(vDiv%pw,1),size(vDiv%pw,2)))
! vDiv%pw_w = CMPLX(0.0,0.0)
......@@ -543,10 +535,8 @@ CONTAINS
! CALL vgen_coulomb(1,mpi,dimension,oneD,input,field,vacuum,sym,stars,cell,sphhar,atoms,divB,vDiv)
! DO i=1,3
!! CALL graddiv(i)%init(stars,atoms,sphhar,vacuum,noco,1,POTDEN_TYPE_DEN)
! CALL graddiv(i)%init_potden_simple(stars%ng3,atoms%jmtd,sphhar%nlhd,atoms%ntype,atoms%n_u,1,.FALSE.,.FALSE.,POTDEN_TYPE_DEN,vacuum%nmzd,vacuum%nmzxyd,stars%ng2)
! ALLOCATE(graddiv(i)%pw_w,mold=graddiv(i)%pw)
!! CALL corrB(i)%init(stars,atoms,sphhar,vacuum,noco,1,POTDEN_TYPE_DEN)
! CALL corrB(i)%init_potden_simple(stars%ng3,atoms%jmtd,sphhar%nlhd,atoms%ntype,atoms%n_u,1,.FALSE.,.FALSE.,POTDEN_TYPE_DEN,vacuum%nmzd,vacuum%nmzxyd,stars%ng2)
! ALLOCATE(corrB(i)%pw_w,mold=corrB(i)%pw)
! ENDDO
......
......@@ -20,7 +20,7 @@ CONTAINS
!! TE_EXC : charge density-ex-corr.energy density integral
SUBROUTINE vgen(hybrid,field,input,xcpot,DIMENSION,atoms,sphhar,stars,vacuum,sym,&
obsolete,cell,oneD,sliceplot,mpi,results,noco,EnergyDen,den,vTot,vx,vCoul,xcB)
obsolete,cell,oneD,sliceplot,mpi,results,noco,EnergyDen,den,vTot,vx,vCoul)
USE m_types
USE m_rotate_int_den_to_local
......@@ -54,7 +54,6 @@ CONTAINS
TYPE(t_potden), INTENT(IN) :: EnergyDen
TYPE(t_potden), INTENT(INOUT) :: den
TYPE(t_potden), INTENT(INOUT) :: vTot,vx,vCoul
TYPE(t_potden),dimension(3),INTENT(INOUT) :: xcB
TYPE(t_potden) :: workden,denRot
......@@ -97,7 +96,7 @@ CONTAINS
obsolete,cell,oneD,sliceplot,mpi,noco,den,denRot,EnergyDen,vTot,vx,results)
!ToDo, check if this is needed for more potentials as well...
CALL vgen_finalize(atoms,stars,vacuum,sym,noco,input,sphhar,vTot,vCoul,denRot,xcB)
CALL vgen_finalize(atoms,stars,vacuum,sym,noco,input,sphhar,vTot,vCoul,denRot)
!DEALLOCATE(vcoul%pw_w)
CALL bfield(input,noco,atoms,field,vTot)
......
......@@ -17,26 +17,34 @@ MODULE m_plot
USE m_rotdenmat
PRIVATE
!------------------------------------------------
!-----------------------------------------------------------------------------
! A general purpose plotting routine for FLEUR.
!
! Based on older plotting routines in pldngen.f90
! and plotdop.f90 originally called by optional.F90 and now
! called within a scf-loop instead of as a post
! process functionality. This allowed us to remove
! i/o (using .hdf files) from the ploting routine completely.
! plot_inp files are still in use.
! Based on the older plotting routines pldngen.f90 and plotdop.f90 that were
! originally called by optional.F90 and are now used in the scf-loop instead.
! At the cost of no reduced postprocess functionality, this allowed us to re-
! move I/O (using plot.hdf files) from the plotting routine completely.
!
! TODO:
! - plot_inp files are still in use and should be replaced by a plotting type.
! - Only the .xsf format for xcrysden is supported right now. Further exten-
! sion should include several plotting options, most importantly a way to
! neatly plot vectorial quantities like the magnetisation density as vectors
! on a grid.
!
! A. Neukirchen & R. Hilgers, September 2019
!------------------------------------------------
PUBLIC :: checkplotinp, vectorsplit, matrixsplit, savxsf, vectorplot, matrixplot, makeplots, procplot, getMTSphere
PUBLIC :: checkplotinp, vectorsplit, matrixsplit, savxsf, vectorplot, &
matrixplot, makeplots, procplot, getMTSphere
CONTAINS
SUBROUTINE checkplotinp()
!--------------------------------------------------------------------------
! Checks for existing plot input. If an ancient plotin file is used, an
! error is called. If no usable plot_inp exists, a new one is generated.
!--------------------------------------------------------------------------
LOGICAL :: oldform,newform
oldform = .FALSE.
INQUIRE(file = "plotin", exist = oldform)
......@@ -230,6 +238,8 @@ CONTAINS
rho(iri,ilh,ityp,2) = 2.0*REAL(cdn21)
! Note: The minus sign in the following line is temporary to adjust for differences in the offdiagonal
! part of the density between this fleur version and ancient (v0.26) fleur.
!
! TODO: Should that still be here? It effectively amounts to a conjugation of the density matrix.
rho(iri,ilh,ityp,3) = -2.0*AIMAG(cdn21)
rho(iri,ilh,ityp,4) = cdn11 - cdn22
!---> end of test part
......@@ -343,10 +353,6 @@ CONTAINS
END IF
CALL plotden%init_potden_simple(stars%ng3,atoms%jmtd,sphhar%nlhd,atoms%ntype,atoms%n_u,1,.FALSE.,.FALSE.,POTDEN_TYPE_DEN,vacuum%nmzd,vacuum%nmzxyd,stars%ng2)
! den%mt(:,0:,1:,:)=denmat%mt(:,0:,1:,1)
! den%pw(1:,:) = denmat%pw(1:,1)
! den%vacz(1:,1:,:) = denmat%vacz(1:,1:,1)
! den%vacxy(1:,1:,1:,:) = denmat%vacxy(1:,1:,1:,1)
!Correction for the case of plotting the total potential.
!Needed due to the different definitons of density/potential matrices in
......
......@@ -89,13 +89,12 @@ CONTAINS
CALL finish_mt_grid()
END SUBROUTINE rotate_mt_den_to_local
SUBROUTINE rotate_mt_den_from_local(atoms,sphhar,sym,den,vtot,xcB)
SUBROUTINE rotate_mt_den_from_local(atoms,sphhar,sym,den,vtot)
TYPE(t_atoms),INTENT(IN) :: atoms
TYPE(t_sphhar),INTENT(IN) :: sphhar
TYPE(t_sym),INTENT(IN) :: sym
TYPE(t_potden),INTENT(IN) :: den
TYPE(t_potden),INTENT(INOUT) :: vtot
TYPE(t_potden),dimension(3),INTENT(INOUT) :: xcB
TYPE(t_xcpot_inbuild) :: xcpot !local xcpot that is LDA to indicate we do not need gradients
TYPE(t_gradients) :: grad
......@@ -103,13 +102,10 @@ CONTAINS
INTEGER :: n,nsp,imesh,i
REAL :: vup,vdown,veff,beff
REAL :: theta,phi
REAL,ALLOCATABLE :: ch(:,:),b_xc(:,:)
REAL,ALLOCATABLE :: livemt(:,:,:,:)
REAL,ALLOCATABLE :: ch(:,:)
nsp=atoms%nsp()
ALLOCATE(ch(nsp*atoms%jmtd,4))
ALLOCATE(b_xc(nsp*atoms%jmtd,3))
ALLOCATE(livemt(size(xcB(1)%mt,1),size(xcB(1)%mt,2),size(xcB(1)%mt,3),3))
CALL xcpot%init("vwn",.FALSE.,1)
CALL init_mt_grid(4,atoms,sphhar,xcpot%needs_grad(),sym)
......@@ -122,23 +118,16 @@ CONTAINS
phi = den%phi_mt(imesh,n)
veff = (vup + vdown)/2.0
beff = (vup - vdown)/2.0
b_xc(imesh,1) = beff*SIN(theta)*COS(phi)
b_xc(imesh,2) = beff*SIN(theta)*SIN(phi)
b_xc(imesh,3) = beff*COS(theta)
ch(imesh,1) = veff + b_xc(imesh,3)
ch(imesh,2) = veff - b_xc(imesh,3)
ch(imesh,3) = b_xc(imesh,1)
ch(imesh,4) = b_xc(imesh,2)
ch(imesh,1) = veff + beff*COS(theta)
ch(imesh,2) = veff - beff*COS(theta)
ch(imesh,3) = beff*SIN(theta)*COS(phi)
ch(imesh,4) = beff*SIN(theta)*SIN(phi)
ENDDO
vtot%mt(:,0:,n,:)=0.0
Do i=1,3
xcB(i)%mt(:,0:,n,:)=0.0
ENDDO
CALL mt_from_grid(atoms,sphhar,n,4,ch,vtot%mt(:,0:,n,:))
CALL mt_from_grid(atoms,sphhar,n,3,b_xc,livemt(:,0:,n,:))
DO i=1,3
xcB(i)%mt(:,0:,n,1)=livemt(:,0:,n,i)
ENDDO
DO i=1,atoms%jri(n)
vtot%mt(i,:,n,:)=vtot%mt(i,:,n,:)*atoms%rmsh(i,n)**2
ENDDO
......
......@@ -6,7 +6,7 @@
MODULE m_vgen_finalize
USE m_juDFT
CONTAINS
SUBROUTINE vgen_finalize(atoms,stars,vacuum,sym,noco,input,sphhar,vTot,vCoul,denRot,xcB)
SUBROUTINE vgen_finalize(atoms,stars,vacuum,sym,noco,input,sphhar,vTot,vCoul,denRot)
! ***********************************************************
! FLAPW potential generator *
! ***********************************************************
......@@ -27,7 +27,6 @@ CONTAINS
TYPE(t_input),INTENT(IN) :: input
TYPE(t_sphhar),INTENT(IN) :: sphhar
TYPE(t_potden),INTENT(INOUT) :: vTot,vCoul,denRot
TYPE(t_potden),dimension(3),INTENT(INOUT) :: xcB
! ..
! .. Local Scalars ..
INTEGER i,js,n
......@@ -48,10 +47,8 @@ CONTAINS
END DO
END DO
ELSEIF(noco%l_noco) THEN
CALL vmatgen(stars,atoms,vacuum,sym,input,denRot,vTot,xcB)
IF (noco%l_mtnocoPot) THEN
CALL rotate_mt_den_from_local(atoms,sphhar,sym,denRot,vtot,xcB)
END IF
CALL vmatgen(stars,atoms,vacuum,sym,input,denRot,vTot)
IF (noco%l_mtnocoPot) CALL rotate_mt_den_from_local(atoms,sphhar,sym,denRot,vtot)
ENDIF
! Rescale vCoul%pw_w with number of stars
......@@ -64,19 +61,19 @@ CONTAINS
!Copy first vacuum into second vacuum if this was not calculated before
IF (vacuum%nvac==1) THEN
vTot%vacz(:,2,:) = vTot%vacz(:,1,:)
DO i=1,3
xcB(i)%vacz(:,2,:) = xcB(i)%vacz(:,1,:)
ENDDO
! DO i=1,3
! xcB(i)%vacz(:,2,:) = xcB(i)%vacz(:,1,:)
! ENDDO
IF (sym%invs) THEN
vTot%vacxy(:,:,2,:) = CMPLX(vTot%vacxy(:,:,1,:))
DO i=1,3
xcB(i)%vacxy(:,:,2,:) = CMPLX(xcB(i)%vacxy(:,:,1,:))
ENDDO
! DO i=1,3
! xcB(i)%vacxy(:,:,2,:) = CMPLX(xcB(i)%vacxy(:,:,1,:))
! ENDDO
ELSE
vTot%vacxy(:,:,2,:) = vTot%vacxy(:,:,1,:)
DO i=1,3
xcB(i)%vacxy(:,:,2,:) = xcB(i)%vacxy(:,:,1,:)
ENDDO
! DO i=1,3
! xcB(i)%vacxy(:,:,2,:) = xcB(i)%vacxy(:,:,1,:)
! ENDDO
ENDIF
ENDIF
......
......@@ -22,14 +22,9 @@ MODULE m_vmatgen
!
! Philipp Kurz 99/11/01
!
! Extended for the investigation of the exch-corr B-field, which is
! analogously saved as a potden type with 3 integers (i.e. in com-
! ponent space.
!
! A.Neukirchen 05.09.2019
!**********************************************************************
CONTAINS
SUBROUTINE vmatgen(stars,atoms,vacuum,sym,input,den,vTot,xcB)
SUBROUTINE vmatgen(stars,atoms,vacuum,sym,input,den,vTot)
!******** ABBREVIATIONS ***********************************************
! ifft3 : size of the 3d real space mesh
......@@ -55,30 +50,21 @@ CONTAINS
TYPE(t_atoms),INTENT(IN) :: atoms
TYPE(t_potden),INTENT(IN) :: den
TYPE(t_potden),INTENT(INOUT):: vTot
TYPE(t_potden),dimension(3),INTENT(INOUT):: xcB
! ..
! .. Local Scalars ..
INTEGER imeshpt,ipot,jspin,ig2 ,ig3,ivac,ifft2,ifft3,imz,iter,b_ind,i
INTEGER imeshpt,ipot,jspin,ig2 ,ig3,ivac,ifft2,ifft3,imz,iter,i
REAL vup,vdown,veff,beff,vziw,theta,phi
! ..
! .. Local Arrays ..
REAL, ALLOCATABLE :: vvacxy(:,:,:,:),vis(:,:),fftwork(:),b_xc(:,:),b_xc_vacxy(:,:,:,:)
REAL, ALLOCATABLE :: vvacxy(:,:,:,:),vis(:,:),fftwork(:)
ifft3 = 27*stars%mx1*stars%mx2*stars%mx3
IF (ifft3.NE.SIZE(den%theta_pw)) CALL judft_error("Wrong size of angles")
ifft2 = SIZE(den%phi_vacxy,1)
DO i=1,3
xcB(i)%vacxy(:,:,:,:)=0.0
xcB(i)%vacz(:,:,:)=0.0
ENDDO
ALLOCATE ( vis(ifft3,4),fftwork(ifft3))
ALLOCATE (b_xc(ifft3,3))
!---> fouriertransform the spin up and down potential
!---> in the interstitial, vpw, to real space (vis)
DO jspin = 1,input%jspins
......@@ -95,26 +81,21 @@ CONTAINS
!---> at first determine the effective potential and magnetic fields
veff = (vup + vdown)/2.0
beff = (vup - vdown)/2.0
b_xc(imeshpt,1)=beff*SIN(theta)*COS(phi)
b_xc(imeshpt,2)=beff*SIN(theta)*SIN(phi)
b_xc(imeshpt,3)=beff*COS(theta)
!---> now calculate the matrix potential, which is hermitian.
!---> thus calculate the diagonal elements:
!---> V_11
vis(imeshpt,1) = veff + b_xc(imeshpt,3)
vis(imeshpt,1) = veff + beff*COS(theta)
!---> V_22
vis(imeshpt,2) = veff - b_xc(imeshpt,3)
vis(imeshpt,2) = veff - beff*COS(theta)
!---> the real part of V_21
vis(imeshpt,3) = b_xc(imeshpt,1)
vis(imeshpt,3) = beff*SIN(theta)*COS(phi)
!---> and the imaginary part of V_21
vis(imeshpt,4) = b_xc(imeshpt,2)
vis(imeshpt,4) = beff*SIN(theta)*SIN(phi)
DO ipot = 1,4
vis(imeshpt,ipot) = vis(imeshpt,ipot) * stars%ufft(imeshpt-1)
ENDDO
DO b_ind = 1,3
b_xc(imeshpt,b_ind) = b_xc(imeshpt,b_ind) * stars%ufft(imeshpt-1)
ENDDO
ENDDO
!---> Fouriertransform the matrix potential back to reciprocal space
......@@ -125,19 +106,12 @@ CONTAINS
CALL fft3d(vis(:,3),vis(:,4), vTot%pw_w(1,3), stars,-1)
DO b_ind=1,3
fftwork=0.0
CALL fft3d(b_xc(:,b_ind),fftwork, xcB(b_ind)%pw_w(1,1), stars,-1)
ENDDO
IF (.NOT. input%film) RETURN
!Now the vacuum part starts
ALLOCATE(vvacxy(ifft2,vacuum%nmzxyd,2,4))
ALLOCATE(b_xc_vacxy(ifft2,vacuum%nmzxyd,2,3))
!---> fouriertransform the spin up and down potential
!---> in the vacuum, vz & vxy, to real space (vvacxy)
......@@ -173,13 +147,10 @@ CONTAINS
phi = den%phi_vacxy(imeshpt,imz,ivac)
veff = (vup + vdown)/2.0
beff = (vup - vdown)/2.0
b_xc_vacxy(imeshpt,imz,ivac,1) = beff*SIN(theta)*COS(phi)
b_xc_vacxy(imeshpt,imz,ivac,2) = beff*SIN(theta)*SIN(phi)
b_xc_vacxy(imeshpt,imz,ivac,3) = beff*COS(theta)
vvacxy(imeshpt,imz,ivac,1) = veff + b_xc_vacxy(imeshpt,imz,ivac,3)
vvacxy(imeshpt,imz,ivac,2) = veff - b_xc_vacxy(imeshpt,imz,ivac,3)
vvacxy(imeshpt,imz,ivac,3) = b_xc_vacxy(imeshpt,imz,ivac,1)
vvacxy(imeshpt,imz,ivac,4) = b_xc_vacxy(imeshpt,imz,ivac,2)
vvacxy(imeshpt,imz,ivac,1) = veff + beff*COS(theta)
vvacxy(imeshpt,imz,ivac,2) = veff - beff*COS(theta)
vvacxy(imeshpt,imz,ivac,3) = beff*SIN(theta)*COS(phi)
vvacxy(imeshpt,imz,ivac,4) = beff*SIN(theta)*SIN(phi)
ENDDO
ENDDO
DO imz = vacuum%nmzxyd+1,vacuum%nmzd
......@@ -189,13 +160,10 @@ CONTAINS
phi = den%phi_vacz(imz,ivac)
veff = (vup + vdown)/2.0
beff = (vup - vdown)/2.0
xcB(1)%vacz(imz,ivac,1) = beff*SIN(theta)*COS(phi)
xcB(2)%vacz(imz,ivac,1) = beff*SIN(theta)*SIN(phi)
xcB(3)%vacz(imz,ivac,1) = beff*COS(theta)
vTot%vacz(imz,ivac,1) = veff + xcB(3)%vacz(imz,ivac,1)
vTot%vacz(imz,ivac,2) = veff - xcB(3)%vacz(imz,ivac,1)
vTot%vacz(imz,ivac,3) = xcB(1)%vacz(imz,ivac,1)
vTot%vacz(imz,ivac,4) = xcB(2)%vacz(imz,ivac,2)
vTot%vacz(imz,ivac,1) = veff + beff*COS(theta)
vTot%vacz(imz,ivac,2) = veff - beff*COS(theta)
vTot%vacz(imz,ivac,3) = beff*SIN(theta)*COS(phi)
vTot%vacz(imz,ivac,4) = beff*SIN(theta)*SIN(phi)
ENDDO
ENDDO
......@@ -221,16 +189,6 @@ CONTAINS
ENDDO
ENDDO
DO b_ind = 1,3
DO ivac = 1,vacuum%nvac
DO imz = 1,vacuum%nmzxyd
fftwork=0.0
CALL fft2d(stars, b_xc_vacxy(:,imz,ivac,b_ind),fftwork,&
xcB(b_ind)%vacz(imz,ivac,1),vziw,xcB(b_ind)%vacxy(imz,1,ivac,1), vacuum%nmzxyd,-1)
ENDDO
ENDDO
ENDDO
DO ivac = 1,vacuum%nvac
DO imz = 1,vacuum%nmzxyd
fftwork=0.0
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment