Commit cc53adc6 authored by Matthias Redies's avatar Matthias Redies

format

parent c1b0c244
......@@ -6,7 +6,6 @@ Testing/*
build
build.*
*.o
*.mod
*.x
*.swp
tags
......@@ -12,6 +12,7 @@ SUBROUTINE cdncore(mpi,dimension,oneD,input,vacuum,noco,sym,&
stars,cell,sphhar,atoms,vTot,outDen,moments,results)
USE m_constants
USE m_judft
USE m_cdn_io
USE m_cdnovlp
USE m_cored
......
......@@ -11,12 +11,17 @@ if (${CMAKE_Fortran_COMPILER_ID} MATCHES "Intel")
else()
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -mkl -r8 -qopenmp -assume byterecl")
endif()
<<<<<<< Updated upstream
set(CMAKE_Fortran_FLAGS_RELEASE "${CMAKE_Fortran_FLAGS_RELEASE} -xHost -O2 -g")
if (${CMAKE_Fortran_COMPILER_VERSION} VERSION_LESS "19.0.0.0")
set(CMAKE_Fortran_FLAGS_DEBUG "${CMAKE_Fortran_FLAGS_DEBUG} -C -traceback -O0 -g -ftrapuv -check uninit -check pointers -DCPP_DEBUG")
else()
set(CMAKE_Fortran_FLAGS_DEBUG "${CMAKE_Fortran_FLAGS_DEBUG} -CB -traceback -O0 -g -ftrapuv -check uninit -check pointers -DCPP_DEBUG")
endif()
=======
set(CMAKE_Fortran_FLAGS_RELEASE "${CMAKE_Fortran_FLAGS_RELEASE} -xHost -O0 -g")
set(CMAKE_Fortran_FLAGS_DEBUG "${CMAKE_Fortran_FLAGS_DEBUG} -traceback -O0 -g -ftrapuv -check uninit -check pointers -CB -DCPP_DEBUG")
>>>>>>> Stashed changes
elseif(${CMAKE_Fortran_COMPILER_ID} MATCHES "PGI")
message("PGI Fortran detected")
set(CMAKE_SHARED_LIBRARY_LINK_Fortran_FLAGS "") #fix problem in cmake
......
......@@ -212,6 +212,7 @@ CONTAINS
CALL send_usage_data()
#ifdef CPP_MPI
IF(PRESENT(irank)) THEN
write (*,*) "Going into post send barrier"
CALL MPI_BARRIER(MPI_COMM_WORLD,ierr)
CALL MPI_FINALIZE(ierr)
ELSE
......
......@@ -195,6 +195,66 @@ END FUNCTION xcpot_is_LDA
CALL xc_f03_lda_exc(xcpot%xc_func_c, SIZE(rh,1), TRANSPOSE(rh), excc)
exc=exc+excc
END IF
<<<<<<< Updated upstream
=======
ELSEIF(xcpot%exc_is_MetaGGA()) THEN
IF(PRESENT(kinEnergyDen_KS)) THEN
! apply correction in eq (4) in https://doi.org/10.1063/1.1565316
kinEnergyDen_libXC = transpose(kinEnergyDen_KS + 0.25 * grad%laplace)
!where(kinEnergyDen_libXC < 1d-5) kinEnergyDen_libXC = 1d-5
!write (*,*) "apply tf approx. shapes: "
!write (*,*) "shape(rh) = ", shape(rh)
!write (*,*) "shape(grad%sigma) = ", shape(transpose(grad%sigma))
!write (*,*) "shape(grad%lapl) = ", shape(grad%laplace)
!kinEnergyDen_libXC = 0.3 * (3.0*pi_const**2)**(2./3.) * rh**(5./3.) &
!+ 1.0/72.0 * transpose(abs(grad%sigma))/rh &
!+ 1.0/6.0 * grad%laplace
!pkzb_zaehler = (1./8. * transpose(abs(grad%sigma))/rh)**2
!pkzb_nenner = kinEnergyDen_libxc**2
!pkzb_ratio = pkzb_zaehler/pkzb_nenner
!write (*,*) "pkzb ratio:"
!write (*,*) "min = ", minval(pkzb_ratio)
!write (*,*) "max = ", maxval(pkzb_ratio)
write (filename, '("kED_libxc_", I0.6, ".npy")') size(kinEnergyDen_libxc, dim=2)
call save_npy(filename, transpose(kinEnergyDen_libxc))
write (filename, '("sigma_", I0.6, ".npy")') size(grad%sigma, dim=2)
call save_npy(filename, grad%sigma)
!write (filename, '("pkzb_zaehler_", I0.6, ".npy")') size(kinEnergyDen_libxc, dim=1)
!call save_npy(filename, transpose(pkzb_zaehler))
!write (filename, '("pkzb_nenner_", I0.6, ".npy")') size(kinEnergyDen_libxc, dim=1)
!call save_npy(filename, transpose(pkzb_nenner))
!write (filename, '("pkzb_ratio_", I0.6, ".npy")') size(kinEnergyDen_libxc, dim=1)
!call save_npy(filename, transpose(pkzb_ratio))
exc = 0.0
excc = 0.0
call xc_f03_mgga_exc(xcpot%exc_func_x, SIZE(rh,1), TRANSPOSE(rh), grad%sigma, &
transpose(grad%laplace), kinEnergyDen_libXC, exc)
IF (xcpot%func_exc_id_c>0) THEN
CALL xc_f03_mgga_exc(xcpot%exc_func_c, SIZE(rh,1), TRANSPOSE(rh), grad%sigma, &
transpose(grad%laplace), kinEnergyDen_libXC, excc)
exc=exc+excc
END IF
ELSE ! first iteration is GGA
IF (.NOT.PRESENT(grad)) CALL judft_error("Bug: You called get_exc for a MetaGGA potential without providing derivatives")
CALL xc_f03_gga_exc(xcpot%vxc_func_x, SIZE(rh,1), TRANSPOSE(rh),grad%sigma,exc)
IF (xcpot%func_exc_id_c>0) THEN
CALL xc_f03_gga_exc(xcpot%vxc_func_c, SIZE(rh,1), TRANSPOSE(rh),grad%sigma,excc)
exc=exc+excc
END IF
ENDIF
ELSE
call juDFT_error("exc is part of a known Family", calledby="xcpot_get_exc@libxc")
>>>>>>> Stashed changes
ENDIF
#endif
......
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