-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit eda4fce
Showing
6 changed files
with
43,139 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
|
||
PROG = ./dftd3 | ||
|
||
#-------------------------------------------------------------------------- | ||
OSTYPE=LINUXL | ||
# source /usr/qc/lf95/csh_setup nicht vergessen (Lahey compiler) | ||
# source /usr/qc/intel/compiler70/ia32/bin/ifcvars.csh (Intel compiler) | ||
#-------------------------------------------------------------------------- | ||
|
||
OBJS1=dftd3.o copyc6.o | ||
|
||
OBJS2 = | ||
|
||
OBJS = $(OBJS1) $(OBJS2) | ||
#-------------------------------------------------------------------------- | ||
|
||
ifeq ($(OSTYPE),LINUXL) | ||
# FC = lf95 | ||
FC = ifort | ||
# FC = gfortran | ||
# CC = gcc | ||
# LINKER = lf95 | ||
LINKER = ifort -static | ||
# LINKER = gfortran | ||
PREFLAG = -E -P | ||
CCFLAGS = -O -DLINUX | ||
FFLAGS= -O | ||
# FFLAGS = -O -openmp -I$(MKLROOT)/include -mkl=parallel | ||
# LFLAGS = -openmp -I$(MKLROOT)/include -mkl=parallel | ||
# FFLAGS = -O --chk a,e,s,u | ||
# FFLAGS = -O0 -g | ||
# LFLAGS = -O0 -g | ||
endif | ||
|
||
ifeq ($(OSTYPE),LINUXI) | ||
PREOPTS = | ||
FC = ifort | ||
CC = gcc | ||
LINKER = ifort | ||
LIBS = | ||
# LIBS = -lmkl_ia32 -lmkl_lapack -lmkl_solver -lguide -lpthread -L/usr/qc/intel/mkl701/lib/32 | ||
PREFLAG = -E -P | ||
CCFLAGS = -O -DLINUX | ||
FFLAGS = -w90 -O | ||
endif | ||
|
||
# diese ziele gibts: | ||
.PHONY: all | ||
.PHONY: clean | ||
# dieses ist das erste auftretende, | ||
# wird also beim aufruf von make erzeugt (default) | ||
all: $(PROG) | ||
|
||
|
||
#-------------------------------------------------------------------------- | ||
# example.f: printversion.h | ||
# example.f haengt von printversion.h ab | ||
# wenn sich also printversion.h aendert, wird example.f | ||
# (und damit auch example.o) neu gemacht. | ||
# was auch geht: | ||
|
||
#-------------------------------------------------------------------------- | ||
# implizite Regel zur Erzeugung von *.o aus *.F ausschalten | ||
%.o: %.F | ||
|
||
# aus *.F mache ein *.f | ||
%.f: %.F | ||
@echo "making $@ from $<" | ||
$(CC) $(PREFLAG) $(PREOPTS) $< -o $@ | ||
|
||
# aus *.f mache ein *.o | ||
%.o: %.f | ||
@echo "making $@ from $<" | ||
$(FC) $(FFLAGS) -c $< -o $@ | ||
|
||
# aus *.c mache ein *.o | ||
%.o: %.c | ||
@echo "making $@ from $<" | ||
$(CC) $(CCFLAGS) -c $< -o $@ | ||
|
||
# linken | ||
$(PROG): $(OBJS) | ||
$(LINKER) $(OBJS) $(LIBS) -o $(PROG) $(LFLAGS) | ||
|
||
|
||
#aufraeumen | ||
clean: | ||
rm -f *.o $(PROG) | ||
rm -f $(patsubst %.F, %.f, $(wildcard *.F)) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,218 @@ | ||
CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC | ||
c copy from machine generated data statements inside pars.f | ||
CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC | ||
|
||
subroutine copyc6(fname,maxc,max_elem,c6ab,maxci, | ||
. minc6,minc6list,maxc6,maxc6list) | ||
implicit none | ||
integer maxc,max_elem,maxci(max_elem),nlines,mima | ||
real*8 c6ab(max_elem,max_elem,maxc,maxc,3) | ||
character*(*) fname | ||
logical minc6,maxc6,minc6list(max_elem),maxc6list(max_elem) | ||
|
||
character*1 atmp | ||
character*80 btmp | ||
real*8 x,y,f,cn1,cn2,cmax,xx(10) | ||
integer iat,jat,i,n,l,j,k,il,iadr,jadr,nn,kk | ||
logical special | ||
include 'pars.f' | ||
c6ab=-1 | ||
maxci=0 | ||
c read file | ||
kk=1 | ||
if(minc6.or.maxc6) then !only use values for cn=minimum | ||
DO i=1,94 | ||
if (minc6list(i))then | ||
c6ab(i,:,1,:,2)=10000000.0 | ||
c6ab(:,i,:,1,3)=10000000.0 | ||
endif | ||
enddo | ||
|
||
|
||
do nn=1,nlines | ||
special=.false. | ||
iat=int(pars(kk+1)) | ||
jat=int(pars(kk+2)) | ||
call limit(iat,jat,iadr,jadr) | ||
|
||
if (minc6list(iat)) then !only CN=minimum for iat | ||
special=.true. | ||
maxci(iat)=1 | ||
maxci(jat)=max(maxci(jat),jadr) | ||
|
||
if(pars(kk+3).le.c6ab(iat,jat,1,jadr,2)) then | ||
|
||
c6ab(iat,jat,1,jadr,1)=pars(kk) | ||
c6ab(iat,jat,1,jadr,2)=pars(kk+3) | ||
c6ab(iat,jat,1,jadr,3)=pars(kk+4) | ||
|
||
c6ab(jat,iat,jadr,1,1)=pars(kk) | ||
c6ab(jat,iat,jadr,1,2)=pars(kk+4) | ||
c6ab(jat,iat,jadr,1,3)=pars(kk+3) | ||
endif | ||
endif | ||
|
||
if (minc6list(jat)) then !only CN=minimum for jat | ||
special=.true. | ||
maxci(iat)=max(maxci(iat),iadr) | ||
maxci(jat)=1 | ||
|
||
if(pars(kk+4).le.c6ab(iat,jat,iadr,1,3)) then | ||
|
||
c6ab(iat,jat,iadr,1,1)=pars(kk) | ||
c6ab(iat,jat,iadr,1,2)=pars(kk+3) | ||
c6ab(iat,jat,iadr,1,3)=pars(kk+4) | ||
|
||
c6ab(jat,iat,1,iadr,1)=pars(kk) | ||
c6ab(jat,iat,1,iadr,2)=pars(kk+4) | ||
c6ab(jat,iat,1,iadr,3)=pars(kk+3) | ||
endif | ||
endif | ||
|
||
|
||
if (minc6list(iat).and.minc6list(jat)) then !only CN=minimum for iat and jat | ||
special=.true. | ||
maxci(jat)=1 | ||
maxci(iat)=1 | ||
|
||
if(pars(kk+4).le.c6ab(iat,jat,1,1,3).and. | ||
. pars(kk+3).le.c6ab(iat,jat,1,1,2)) then | ||
|
||
c6ab(iat,jat,1,1,1)=pars(kk) | ||
c6ab(iat,jat,1,1,2)=pars(kk+3) | ||
c6ab(iat,jat,1,1,3)=pars(kk+4) | ||
|
||
c6ab(jat,iat,1,1,1)=pars(kk) | ||
c6ab(jat,iat,1,1,2)=pars(kk+4) | ||
c6ab(jat,iat,1,1,3)=pars(kk+3) | ||
endif | ||
endif | ||
|
||
|
||
|
||
if (maxc6list(iat)) then !only CN=maximum for iat | ||
special=.true. | ||
|
||
maxci(iat)=1 | ||
maxci(jat)=max(maxci(jat),jadr) | ||
|
||
if(pars(kk+3).ge.c6ab(iat,jat,1,jadr,2)) then | ||
|
||
c6ab(iat,jat,1,jadr,1)=pars(kk) | ||
c6ab(iat,jat,1,jadr,2)=pars(kk+3) | ||
c6ab(iat,jat,1,jadr,3)=pars(kk+4) | ||
|
||
c6ab(jat,iat,jadr,1,1)=pars(kk) | ||
c6ab(jat,iat,jadr,1,2)=pars(kk+4) | ||
c6ab(jat,iat,jadr,1,3)=pars(kk+3) | ||
endif | ||
endif | ||
if (maxc6list(jat)) then !only CN=maximum for jat | ||
special=.true. | ||
|
||
maxci(jat)=1 | ||
maxci(iat)=max(maxci(iat),iadr) | ||
|
||
if(pars(kk+4).ge.c6ab(iat,jat,iadr,1,3)) then | ||
|
||
c6ab(iat,jat,iadr,1,1)=pars(kk) | ||
c6ab(iat,jat,iadr,1,2)=pars(kk+3) | ||
c6ab(iat,jat,iadr,1,3)=pars(kk+4) | ||
|
||
c6ab(jat,iat,1,iadr,1)=pars(kk) | ||
c6ab(jat,iat,1,iadr,2)=pars(kk+4) | ||
c6ab(jat,iat,1,iadr,3)=pars(kk+3) | ||
endif | ||
endif | ||
|
||
if (maxc6list(iat).and.maxc6list(jat)) then !only CN=maximum for iat and jat | ||
special=.true. | ||
maxci(jat)=1 | ||
maxci(iat)=1 | ||
|
||
if(pars(kk+4).ge.c6ab(iat,jat,1,1,3).and. | ||
. pars(kk+3).ge.c6ab(iat,jat,1,1,2)) then | ||
|
||
c6ab(iat,jat,1,1,1)=pars(kk) | ||
c6ab(iat,jat,1,1,2)=pars(kk+3) | ||
c6ab(iat,jat,1,1,3)=pars(kk+4) | ||
|
||
c6ab(jat,iat,1,1,1)=pars(kk) | ||
c6ab(jat,iat,1,1,2)=pars(kk+4) | ||
c6ab(jat,iat,1,1,3)=pars(kk+3) | ||
endif | ||
endif | ||
|
||
if (minc6list(iat).and.maxc6list(jat)) then !only CN=minimum for iat | ||
special=.true. !and CN=maximum jat | ||
maxci(jat)=1 | ||
maxci(iat)=1 | ||
|
||
if(pars(kk+4).ge.c6ab(iat,jat,1,1,3).and. | ||
. pars(kk+3).le.c6ab(iat,jat,1,1,2)) then | ||
|
||
c6ab(iat,jat,1,1,1)=pars(kk) | ||
c6ab(iat,jat,1,1,2)=pars(kk+3) | ||
c6ab(iat,jat,1,1,3)=pars(kk+4) | ||
|
||
c6ab(jat,iat,1,1,1)=pars(kk) | ||
c6ab(jat,iat,1,1,2)=pars(kk+4) | ||
c6ab(jat,iat,1,1,3)=pars(kk+3) | ||
endif | ||
endif | ||
|
||
if (maxc6list(iat).and.minc6list(jat)) then !only CN=maximum for iat | ||
special=.true. ! and CN=minimum for jat | ||
maxci(jat)=1 | ||
maxci(iat)=1 | ||
|
||
if(pars(kk+4).le.c6ab(iat,jat,1,1,3).and. | ||
. pars(kk+3).ge.c6ab(iat,jat,1,1,2)) then | ||
|
||
c6ab(iat,jat,1,1,1)=pars(kk) | ||
c6ab(iat,jat,1,1,2)=pars(kk+3) | ||
c6ab(iat,jat,1,1,3)=pars(kk+4) | ||
|
||
c6ab(jat,iat,1,1,1)=pars(kk) | ||
c6ab(jat,iat,1,1,2)=pars(kk+4) | ||
c6ab(jat,iat,1,1,3)=pars(kk+3) | ||
endif | ||
endif | ||
|
||
if (.not.special) then | ||
|
||
maxci(iat)=max(maxci(iat),iadr) | ||
maxci(jat)=max(maxci(jat),jadr) | ||
|
||
c6ab(iat,jat,iadr,jadr,1)=pars(kk) | ||
c6ab(iat,jat,iadr,jadr,2)=pars(kk+3) | ||
c6ab(iat,jat,iadr,jadr,3)=pars(kk+4) | ||
|
||
c6ab(jat,iat,jadr,iadr,1)=pars(kk) | ||
c6ab(jat,iat,jadr,iadr,2)=pars(kk+4) | ||
c6ab(jat,iat,jadr,iadr,3)=pars(kk+3) | ||
endif | ||
kk=(nn*5)+1 | ||
enddo | ||
|
||
|
||
|
||
else !no min/max at all | ||
do nn=1,nlines | ||
iat=int(pars(kk+1)) | ||
jat=int(pars(kk+2)) | ||
call limit(iat,jat,iadr,jadr) | ||
maxci(iat)=max(maxci(iat),iadr) | ||
maxci(jat)=max(maxci(jat),jadr) | ||
|
||
c6ab(iat,jat,iadr,jadr,1)=pars(kk) | ||
c6ab(iat,jat,iadr,jadr,2)=pars(kk+3) | ||
c6ab(iat,jat,iadr,jadr,3)=pars(kk+4) | ||
|
||
c6ab(jat,iat,jadr,iadr,1)=pars(kk) | ||
c6ab(jat,iat,jadr,iadr,2)=pars(kk+4) | ||
c6ab(jat,iat,jadr,iadr,3)=pars(kk+3) | ||
kk=(nn*5)+1 | ||
enddo | ||
endif | ||
end subroutine copyc6 |
Oops, something went wrong.