projects
/
unres.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
unres Adam's changes
[unres.git]
/
source
/
unres
/
src-HCD-5D
/
stochfric.F
diff --git
a/source/unres/src-HCD-5D/stochfric.F
b/source/unres/src-HCD-5D/stochfric.F
index
c83e9ce
..
946fb58
100644
(file)
--- a/
source/unres/src-HCD-5D/stochfric.F
+++ b/
source/unres/src-HCD-5D/stochfric.F
@@
-1,5
+1,8
@@
subroutine friction_force
implicit none
subroutine friction_force
implicit none
+#ifdef MPI
+ include 'mpif.h'
+#endif
include 'DIMENSIONS'
include 'COMMON.VAR'
include 'COMMON.CHAIN'
include 'DIMENSIONS'
include 'COMMON.VAR'
include 'COMMON.CHAIN'
@@
-37,8
+40,12
@@
logical lprn /.false./, checkmode /.false./
#ifdef FIVEDIAG
logical lprn /.false./, checkmode /.false./
#ifdef FIVEDIAG
+#ifdef TIMING
+ include 'COMMON.TIME1'
+ double precision time01
+#endif
c Here accelerations due to friction forces are computed right after forces.
c Here accelerations due to friction forces are computed right after forces.
- d_t_work=0.0d0
+ d_t_work(:6*nres)=0.0d0
do j=1,3
v_work(j,1)=d_t(j,0)
v_work(j,nnt)=d_t(j,0)
do j=1,3
v_work(j,1)=d_t(j,0)
v_work(j,nnt)=d_t(j,0)
@@
-86,8
+93,14
@@
c inct=chain_border(2,1)
write (iout,'(f10.5)') (vvec(i),i=iposc,ind)
#endif
c write (iout,*) "chain",i," ind",ind," n",n
write (iout,'(f10.5)') (vvec(i),i=iposc,ind)
#endif
c write (iout,*) "chain",i," ind",ind," n",n
+#ifdef TIMING
+ time01=MPI_Wtime()
+#endif
call fivediagmult(n,DMfric(iposc),DU1fric(iposc),
& DU2fric(iposc),vvec(iposc),rs)
call fivediagmult(n,DMfric(iposc),DU1fric(iposc),
& DU2fric(iposc),vvec(iposc),rs)
+#ifdef TIMING
+ time_fricmatmult=time_fricmatmult+MPI_Wtime()-time01
+#endif
#ifdef DEBUG
write (iout,*) "rs"
write (iout,'(f10.5)') (rs(i),i=1,n)
#ifdef DEBUG
write (iout,*) "rs"
write (iout,'(f10.5)') (rs(i),i=1,n)
@@
-104,7
+117,7
@@
c & "index",3*(i-1)+j,"rs",rs(i-iposc+1)
write (iout,'(3f10.5)') (fric_work(j),j=1,dimen3)
#endif
#else
write (iout,'(3f10.5)') (fric_work(j),j=1,dimen3)
#endif
#else
- do i=0,MAXRES2
+ do i=0,2*nres
do j=1,3
friction(j,i)=0.0d0
enddo
do j=1,3
friction(j,i)=0.0d0
enddo
@@
-277,7
+290,7
@@
c-----------------------------------------------------
integer ichain,innt,inct,iposc
#endif
integer ichain,innt,inct,iposc
#endif
- do i=0,MAXRES2
+ do i=0,2*nres
do j=1,3
stochforc(j,i)=0.0d0
enddo
do j=1,3
stochforc(j,i)=0.0d0
enddo
@@
-567,9
+580,9
@@
C gamsc(ntyp1)=1.0d0
enddo
endif
#ifdef FIVEDIAG
enddo
endif
#ifdef FIVEDIAG
- DMfric=0.0d0
- DU1fric=0.0d0
- DU2fric=0.0d0
+ DMfric(:2*nres)=0.0d0
+ DU1fric(:2*nres)=0.0d0
+ DU2fric(:2*nres)=0.0d0
ind=1
do ichain=1,nchain
innt=chain_border(1,ichain)
ind=1
do ichain=1,nchain
innt=chain_border(1,ichain)