30       logical cflux_flag,user,add
    33       character*20 labmpc(*)
    34       character*80 amplitude,amname(*)
    35       character*81 set(*),noset
    36       character*132 textpart(16)
    38       integer istartset(*),iendset(*),ialset(*),nodeforc(2,*),
    39      &  nset,nforc,nforc_,istep,istat,n,i,j,k,l,iforcdir,key,
    40      &  iamforc(*),nam,iamplitude,ntrans,inotr(2,*),ipos,ikforc(*),
    41      &  ilforc(*),nk,iline,ipol,inl,ipoinp(2,*),inp(3,*),nam_,namtot,
    42      &  namtot_,namta(3,*),idelay,ndirforc(*),isector,iaxial,
    43      &  ipoinpc(0:*),idefforc(*),ipompc(*),
    44      &  nodempc(3,*),nmpc,ikmpc(*),ilmpc(*)
    46       real*8 xforc(*),forcval,co(3,*),trab(7,*),amta(2,*)
    55          write(*,*) 
'*ERROR in cfluxes: *CFLUX should only be used'    56          write(*,*) 
'  within a STEP'    61          if((textpart(i)(1:6).eq.
'OP=NEW').and.(.not.cflux_flag)) 
then    63                if(ndirforc(j).eq.0) xforc(j)=0.d0
    65          elseif(textpart(i)(1:10).eq.
'AMPLITUDE=') 
then    66             read(textpart(i)(11:90),
'(a80)') amplitude
    68                if(amname(j).eq.amplitude) 
then    74                write(*,*)
'*ERROR in cfluxes: nonexistent amplitude'    81          elseif(textpart(i)(1:10).eq.
'TIMEDELAY=') 
THEN    83                write(*,*) 
'*ERROR in cfluxes: the parameter TIME DELAY'    84                write(*,*) 
'       is used twice in the same keyword'    94                write(*,*) 
'*ERROR in cfluxes: increase nam_'    99             if(iamplitude.eq.0) 
then   100                write(*,*) 
'*ERROR in cfluxes: time delay must be'   101                write(*,*) 
'       preceded by the amplitude parameter'   104             namta(3,nam)=sign(iamplitude,namta(3,iamplitude))
   109                namtot=namta(2,nam-1)
   112             if(namtot.gt.namtot_) 
then   113                write(*,*) 
'*ERROR cfluxes: increase namtot_'   118             read(textpart(i)(11:30),
'(f20.0)',iostat=istat) 
   120             if(istat.gt.0) 
call inputerror(inpc,ipoinpc,iline,
   122          elseif(textpart(i)(1:4).eq.
'USER') 
then   124          elseif(textpart(i)(1:3).eq.
'ADD') 
then   128      &        
'*WARNING in cfluxes: parameter not recognized:'   130      &                 textpart(i)(1:index(textpart(i),
' ')-1)
   136       if(user.and.(iamplitude.ne.0)) 
then   137          write(*,*) 
'*WARNING: no amplitude definition is allowed'   138          write(*,*) 
'          for heat fluxes defined by a'   139          write(*,*) 
'          user routine'   144          call getnewline(inpc,textpart,istat,n,key,iline,ipol,inl,
   145      &        ipoinp,inp,ipoinpc)
   146          if((istat.lt.0).or.(key.eq.1)) 
return   148          read(textpart(2)(1:10),
'(i10)',iostat=istat) iforcdir
   149          if(istat.gt.0) 
call inputerror(inpc,ipoinpc,iline,
   151          if((iforcdir.ne.0).and.(iforcdir.ne.11)) 
then   152             write(*,*) 
'*ERROR in cfluxes: nonexistent degree of '   153             write(*,*) 
'       freedom. '   160          if(textpart(3)(1:1).eq.
' ') 
then   163             read(textpart(3)(1:20),
'(f20.0)',iostat=istat) forcval
   164             if(istat.gt.0) 
call inputerror(inpc,ipoinpc,iline,
   166             if(iaxial.eq.180) forcval=forcval/iaxial
   171          if(user) forcval=1.2357111317d0
   173          read(textpart(1)(1:10),
'(i10)',iostat=istat) l
   176                write(*,*) 
'*ERROR in cfluxes: node ',l
   177                write(*,*) 
'       is not defined'   180             call forcadd(l,iforcdir,forcval,
   181      &        nodeforc,ndirforc,xforc,nforc,nforc_,iamforc,
   182      &        iamplitude,nam,ntrans,trab,inotr,co,ikforc,ilforc,
   183      &        isector,add,user,idefforc,ipompc,nodempc,
   184      &        nmpc,ikmpc,ilmpc,labmpc)
   186             read(textpart(1)(1:80),
'(a80)',iostat=istat) noset
   188             ipos=index(noset,
' ')
   191                if(set(i).eq.noset) 
exit   195                write(*,*) 
'*ERROR in cfluxes: node set ',noset
   196                write(*,*) 
'  has not yet been defined. '   201             do j=istartset(i),iendset(i)
   202                if(ialset(j).gt.0) 
then   203                call forcadd(ialset(j),iforcdir,forcval,
   204      &           nodeforc,ndirforc,xforc,nforc,nforc_,iamforc,
   205      &           iamplitude,nam,ntrans,trab,inotr,co,ikforc,ilforc,
   206      &           isector,add,user,idefforc,ipompc,nodempc,
   207      &           nmpc,ikmpc,ilmpc,labmpc)
   212                      if(k.ge.ialset(j-1)) 
exit   213                      call forcadd(k,iforcdir,forcval,
   214      &                 nodeforc,ndirforc,xforc,nforc,nforc_,
   215      &                 iamforc,iamplitude,nam,ntrans,trab,inotr,co,
   216      &                 ikforc,ilforc,isector,add,user,idefforc,
   217      &                 ipompc,nodempc,nmpc,ikmpc,ilmpc,labmpc)
 
subroutine getnewline(inpc, textpart, istat, n, key, iline, ipol, inl, ipoinp, inp, ipoinpc)
Definition: getnewline.f:21
 
subroutine forcadd(node, i, val, nodeforc, ndirforc, xforc, nforc, nforc_, iamforc, iamplitude, nam, ntrans, trab, inotr, co, ikforc, ilforc, isector, add, user, idefforc, ipompc, nodempc, nmpc, ikmpc, ilmpc, labmpc)
Definition: forcadd.f:23