!output mat balance file prbname_out.mba file

subroutine OutputMatdis
use paraset1
use paraset2
use paraset4
use ErrControl
use files
use funs

integer,dimension(:),allocatable :: g
logical ex
character*120 a_buffer
integer*8 :: mat_fm_total=0

integer i,j,k,m,n
integer ini,inj,ink
real :: xyz(3)=0, vol=0

total_mat_vol=0

do i=1,num_material
 total_mat_vol=total_mat_vol+mat_vol(i)
enddo

allocate(mat_tgt(num_material),g(num_material))
g=num_material+1

allocate (cen_mat(3,num_material) )
cen_mat=0
!calculate mass center for each material
do k=1, num_cmesh(3)
do j=1, num_cmesh(2)
do i=1, num_cmesh(1)

do ink=1, zlevel(k)%cm_zlev(i,j)%fine(3)
  xyz(3)=zlevel(k)%cm_zlev(i,j)%cm_z(ink)
do inj=1,zlevel(k)%cm_zlev(i,j)%fine(2)
  xyz(2)=zlevel(k)%cm_zlev(i,j)%cm_y(inj)
do ini=1, zlevel(k)%cm_zlev(i,j)%fine(1)
  xyz(1)=zlevel(k)%cm_zlev(i,j)%cm_x(ini)

m=zlevel(k)%cm_zlev(i,j)%mat_matrix(ini,inj,ink)
vol=zlevel(k)%cm_zlev(i,j)%fine_vol
do n=1, 3
cen_mat(n,m)=cen_mat(n,m)+xyz(n)*vol
enddo

enddo !ini
enddo !inj
enddo !ink

enddo !i
enddo !j
enddo !k

do m=1, num_material
if(mat_vol(m) .ne. 0) then
cen_mat(:,m)=cen_mat(:,m)/mat_vol(m)
do i=1,3
if(cen_mat(i,m) .lt. 1e-7 ) cen_mat(i,m)=0.0
enddo
endif
enddo

cur_filename=trim(prbname)//'_out.mba'

open(unit=51, file=cur_filename)

write(51,"('Material Balance Summary for Model: ',A)") trim(prbname)
write(51,*)
write(51,"('Section 1 : Coarse Mesh infomation')")
write(51,"(A,A)") ' CM #   x_size   y_size   z_size        fm num      tot_fm          ', &
                  'fm size             fm vol  num_mat    # of fm per mat'
!"(' CM #',3x, 'x_size', 3x,'y_size', 3x,'z_size',8x,'fm num',5x,'tot_fm', 4x, 'fm vol',2x, 'num_mat',4x,'# of fm per mat')")
write(form,"('(37x,A1,5x,A1,5x,A1,15x,A1,7x,A1,7x,A1,24x,A3,',I0,'(I3,5x))' )" ) num_material
write(51,form) 'x','y','z', 'x', 'y','z', 'mat',  &
     (m,m=1,num_material)
do k=1, num_zlev
do j=1,zlevel(k)%ncy
do i=1, zlevel(k)%ncx
write(form,"('(I5,1x,3(f8.3,1x),3(I5,1x),I7,1x,3(f7.2,1x),2x, ES9.3,3x,I2,6x,',I0,'(I7,1x))' )") num_material
write(51,form) &
 (k-1)*num_cm_zlev+(j-1)*num_cmesh(1)+i,zlevel(k)%x_cm_pos(i+1)-zlevel(k)%x_cm_pos(i),&
 zlevel(k)%y_cm_pos(j+1)-zlevel(k)%y_cm_pos(j),z_lev_pos(k+1)-z_lev_pos(k),&
 zlevel(k)%cm_zlev(i,j)%fine(1),zlevel(k)%cm_zlev(i,j)%fine(2),zlevel(k)%cm_zlev(i,j)%fine(3),&
 zlevel(k)%cm_zlev(i,j)%tot_fm, zlevel(k)%cm_zlev(i,j)%finsize, zlevel(k)%cm_zlev(i,j)%fine_vol,&
 zlevel(k)%cm_zlev(i,j)%cm_num_mat,(zlevel(k)%cm_zlev(i,j)%fm_num_mat(m),m=1,num_material)
enddo
enddo
enddo

k=0

write(51,*)
write(51,"('Section 2 : Model mat. infomation')")
write(51,*)

curfile%name=prbname
curfile%ext='mba'
curfile%fullname=''
curfile%dir=input_dir
cur_filename=Getfullname(curfile,1)

inquire(file=cur_filename,exist=ex)
if(ex ) then

write(51,"('Contents of file: ',A)") trim(cur_filename)
write(51,*)

open(unit=44,file=cur_filename)
write(warning_message,"('Reading Mat vol file:' ,A)") trim(cur_filename)
call DisplayMsg

do i=1,6
 read(44,'(A)',err=1001,end=1001) a_buffer
 write(51,*) trim(a_buffer)
enddo

do i=1,num_material
 read(44,*,err=1001,end=1001) mat_tgt(i)%nam,mat_tgt(i)%num,mat_tgt(i)%vol_tgt,mat_tgt(i)%den
 backspace(44)

 read(44,'(A)') a_buffer
 write(51,*) trim(a_buffer)
 mat_tgt(i)%vol_mod=mat_vol(mat_tgt(i)%num)
 g(mat_tgt(i)%num)=i
 k=k+1
 tgt_tot_vol=tgt_tot_vol+mat_tgt(i)%vol_tgt
 tgt_tot_mass=tgt_tot_mass+mat_tgt(i)%vol_tgt*mat_tgt(i)%den
 mod_tot_mass=mod_tot_mass+mat_tgt(i)%vol_mod*mat_tgt(i)%den

enddo
goto 1020
1001 write(51,"('read error(first 6 lines are comments): ',A)") trim(cur_filename)

1020 close(44)

if( k .eq. num_material) then !read success
write(warning_message,"('Reading Mat vol file done, file:' ,A)") trim(cur_filename)
call DisplayMsg

else !read error, skip the file
write(warning_message,"('read error, skiped file: ',A)") trim(cur_filename)
call TrapReadError(0)
endif

else

write(51,"('input file does not exist: ',A)") trim(cur_filename)
write(51,"('comparison skipped ')")

do i=1,num_material
 mat_tgt(i)%vol_mod=mat_vol(i)
 tgt_tot_vol=tgt_tot_vol+mat_tgt(i)%vol_tgt
 tgt_tot_mass=tgt_tot_mass+mat_tgt(i)%vol_tgt*mat_tgt(i)%den
enddo
endif !read in .mba done

write(51,*)
write(51,"('Model Material Inventory/Volume Table')")
write(51,*)
if(k .eq. num_material) then
write(51,"('Targeted Mean Density: ',ES14.6,' g/cm3 from .mba file')") &
    tgt_tot_mass/tgt_tot_vol
write(51,"('     Targeted Volume : ',ES14.6,' cm3    Mass:  ', ES14.6, ' g')") &
   tgt_tot_vol,tgt_tot_mass
write(51,"('        Model Volume : ',ES14.6,' cm3    Mass:  ', ES14.6, ' g')") &
   total_mat_vol,mod_tot_mass

else
 write(51,"('        Model Volume : ',ES14.6,' cm3  in ',I0,1x,  ' total fine meshes')") &
  total_mat_vol,tot_num_fm
 write(51,*)
endif
write(51,*)
write(51,"(' Material    Mat      Fine        Model (cm3)      % of      Mdl/Trg     Model Mass    Model    ' ) ")
write(51,"('   name      No.     Meshes        volume          Total     V-Ratio     Excess (g)    Mass (g) ' )  ")
write(51,"('----------  ------  --------     -------------    -------    ---------  ------------  ---------- ')")

do i=1,num_material
mat_fm_total=mat_fm(i)+mat_fm_total
if(g(i) .ne. num_material+1) then
write(51,"(A10, 1x, I5,4x, I8, 3x, ES14.6,2x, f9.3, 5x, ES10.3,3x,ES10.3, 3x, ES10.3)") &
 mat_tgt(g(i))%nam, mat_tgt(g(i))%num, mat_fm(i),mat_tgt(g(i))%vol_mod, &
 mat_tgt(g(i))%vol_mod*100/total_mat_vol, mat_tgt(g(i))%vol_mod/mat_tgt(g(i))%vol_tgt, &
 (mat_tgt(g(i))%vol_mod-mat_tgt(g(i))%vol_tgt)*mat_tgt(g(i))%den,&
 mat_tgt(g(i))%vol_mod*mat_tgt(g(i))%den
else
write(51,"(A10, 1x, I5,4x, I8,3x, ES14.6,2x, f9.3)") &
'unknown',i, mat_fm(i),mat_vol(i),mat_vol(i)*100/total_mat_vol
endif

enddo

write(51,*)
write(51,"(A10, 1x, 9x, I8,3x,ES14.6,3x)") &
   'TOTAL',  mat_fm_total,total_mat_vol

write(51,*)
write(51, "('Material mass center ')")
write(51,"(' Material    Mat           mass center coodinates    ' ) ")
write(51,"('   name      No.           x              y             z     ' )  ")
write(51,"('----------  -----    ------------   ------------   ------------ ')")

do i=1, num_material
if(g(i) .ne. num_material+1) then
write(51,"(A10, 2x, I5, 4x, ES12.5, 3x, ES12.5, 3x, ES12.5)") &
 mat_tgt(g(i))%nam, i, cen_mat(:,i)
else
write(51,"(A10, 2x, I5, 4x, ES12.5, 3x, ES12.5, 3x, ES12.5)") &
 'unknown', i, cen_mat(:,i)
endif
enddo

write(51,*)
write(51, "('Material Vol in Cm^3')")
write(51,*)
write(51,"('Total Vol    :',2x, ES14.6)") total_vol
write(51,"('Total Mat Vol:',2x, ES14.6)") total_mat_vol

close(51)

write(warning_message,"('Mat vol comparison output file done, file: ' ,A)") &
    trim(prbname)//'_out.mba'
call DisplayMsg

return
end subroutine

!output file : flux summary
!format
! x, y, z, vol, mat#, fixsrc, flx-g1, flx-g2, .....
subroutine MxOutputFlx
use paraset1
use paraset2
use paraset3
use paraset4
use files
use funs
use ErrControl

implicit none
integer, parameter ::  num_pre=6
real :: point(num_pre)=0.0

integer g,m,n
integer cmi, cmj,cmk, fmi, fmj, fmk
integer i,j
integer :: num_vol=0 , fm=0 , fm_bon=0

character(LEN=100) filename_flux
!integer, allocatable :: fm_bon(:)

if(num_flx_out .eq. 0) then
!write one binary file
   curfile%name=prbname
   curfile%dir='.'
   if(IsFluxout .eq. 2) then
    write(curfile%ext, "('adj.bin')" )
   else
    write(curfile%ext, "('fwd.bin')")
   endif
   curfile%fullname=''

   cur_filename=Getfullname(curfile, 0)
   cur_fileunit=123

   open (unit=cur_fileunit, file=cur_filename, FORM='UNFORMATTED', ACCESS='STREAM', err=1001)

do cmk=1, num_cmesh(3)
do cmj=1, num_cmesh(2)
do cmi=1, num_cmesh(1)

 point(4)=zlevel(cmk)%cm_zlev(cmi,cmj)%fine_vol

 do fmk=1, zlevel(cmk)%cm_zlev(cmi,cmj)%fine(3)
   point(3)=zlevel(cmk)%cm_zlev(cmi,cmj)%cm_z(fmk)

 do fmj=1, zlevel(cmk)%cm_zlev(cmi,cmj)%fine(2)
   point(2)=zlevel(cmk)%cm_zlev(cmi,cmj)%cm_y(fmj)

 do fmi=1, zlevel(cmk)%cm_zlev(cmi,cmj)%fine(1)
   point(1)=zlevel(cmk)%cm_zlev(cmi,cmj)%cm_x(fmi)

   point(5)=zlevel(cmk)%cm_zlev(cmi,cmj)%mat_matrix(fmi,fmj,fmk)
  if(s_format .eq. 2 .and. IsFluxout .eq. 1) then
   point(6)=0
   do g=1, num_group
     point(6)=point(6) + zlevel(cmk)%cm_zlev(cmi,cmj)%fluxset(1)%locg_set(g)%locg_flux(fmi,fmj,fmk)
   enddo
  else
   point(6)=zlevel(cmk)%cm_zlev(cmi,cmj)%src_matrix(fmi,fmj,fmk)
  endif

   if (IsFluxout .eq. 2) then   !adjoint flux reverse group order
   write(cur_fileunit)  point, &
    (zlevel(cmk)%cm_zlev(cmi,cmj)%fluxset(1)%locg_set(g)%locg_flux(fmi,fmj,fmk), g=num_group, 1, -1)
   else
    write(cur_fileunit)  point, &
    (zlevel(cmk)%cm_zlev(cmi,cmj)%fluxset(1)%locg_set(g)%locg_flux(fmi,fmj,fmk), g=1, num_group)
   endif
  enddo
 enddo
 enddo
enddo
enddo
enddo
if(IsFluxout .eq. 1) then
   write(*, "('flux output file done (binary) ',  A)")   trim(cur_filename)
   write(READLOG,"('flux output file done (binary) ', A)")  trim(cur_filename)
else
  write(*,"('adjoint flux output file done (binary ', A, ' GROUP ORDER FLIPPED')")  m,trim(cur_filename)
  write(READLOG,"('adjoint flux output file done (volumn ', I0, ') :', A, ' GROUP ORDER FLIPPED')")  m,trim(cur_filename)
endif
close(cur_fileunit)
return
endif

!write multi-vol ASCII file, max vol=99
if(num_flx_out .gt. 99) num_flx_out=99
if(num_flx_out .lt. 0) num_flx_out=abs(num_flx_out)
if(num_flx_out .gt. tot_num_fm) num_flx_out=tot_num_fm

i=int(tot_num_fm/num_flx_out)
j=tot_num_fm - num_flx_out*i

fm=0
m=0
fm_bon=0
do cmk=1, num_cmesh(3)
do cmj=1, num_cmesh(2)
do cmi=1, num_cmesh(1)

 point(4)=zlevel(cmk)%cm_zlev(cmi,cmj)%fine_vol

 do fmk=1, zlevel(cmk)%cm_zlev(cmi,cmj)%fine(3)
   point(3)=zlevel(cmk)%cm_zlev(cmi,cmj)%cm_z(fmk)

 do fmj=1, zlevel(cmk)%cm_zlev(cmi,cmj)%fine(2)
   point(2)=zlevel(cmk)%cm_zlev(cmi,cmj)%cm_y(fmj)

 do fmi=1, zlevel(cmk)%cm_zlev(cmi,cmj)%fine(1)
   point(1)=zlevel(cmk)%cm_zlev(cmi,cmj)%cm_x(fmi)

   point(5)=zlevel(cmk)%cm_zlev(cmi,cmj)%mat_matrix(fmi,fmj,fmk)
  if(s_format .eq. 2 .and. IsFluxout .eq. 1) then
   point(6)=0
   do g=1, num_group
     point(6)=point(6) + zlevel(cmk)%cm_zlev(cmi,cmj)%fluxset(1)%locg_set(g)%locg_flux(fmi,fmj,fmk)
   enddo
  else
   point(6)=zlevel(cmk)%cm_zlev(cmi,cmj)%src_matrix(fmi,fmj,fmk)
  endif
   fm=fm+1
!multi-vol files
   if(fm .gt. fm_bon) then
   if(m .ne. 0) then
    if(IsFluxout .eq. 1) then
      write(*, "('flux output file done (volumn ', I0, '): ', A)")  m, trim(cur_filename)
      write(READLOG,"('flux output file done (volumn ', I0, '): ', A)") m, trim(cur_filename)
    else
      write(*,"('adjoint flux output file done (volumn ', I0, '): ', A, ' GROUP ORDER FLIPPED')")  m,trim(cur_filename)
      write(READLOG,"('adjoint flux output file done (volumn ', I0, '): ', A, ' GROUP ORDER FLIPPED')")  m,trim(cur_filename)
    endif
    close(cur_fileunit)
   endif
   m=m+1
   fm_bon=fm_bon+i
   if(m .le. j) fm_bon=fm_bon+1
   curfile%name=prbname
   curfile%dir='.'
   if(IsFluxout .eq. 2) then
    write(curfile%ext, "('adj.m', I1, I1)" ) int(m/10), mod(m,10)
   else
    write(curfile%ext, "('fwd.m', I1, I1)") int(m/10), mod(m,10)
   endif
   curfile%fullname=''

   cur_filename=Getfullname(curfile, 0)
   cur_fileunit=123

   open (unit=cur_fileunit, file=cur_filename, err=1001)
   write(form, "('Flux distribution file:', A, ' generated at ' )" ) trim(cur_filename)
   call TimeStamp(cur_fileunit)
   backspace(cur_fileunit)  !reverse to the blank line in TimeStamp
   write(cur_fileunit,"('Volumn ', I0, ' of ',I0, ': fine mesh ', I0, ' to ',I0, ' of total ', I0)") &
     m, num_flx_out, fm, fm_bon, tot_num_fm
!call intlen(num_group, len)
   write(form, "( '(1x, A1,14x, A1,14x, A1,14x, A3,12x, A4,11x, A6,9x,', I0,'(I4, 9x) )' )") &
     num_group
   write(cur_fileunit, form) 'x', 'y', 'z' , 'vol', 'mat#', 'fixsrc',  (g, g=1, num_group)

   write(form, "('(',I0,'(ES12.5,3x)', I0, '(ES12.5,1x) )' )" ) num_pre, num_group
   endif  !fm_bon

   if (IsFluxout .eq. 2) then   !adjoint flux reverse group order
   write(cur_fileunit, form)  point, &
    (zlevel(cmk)%cm_zlev(cmi,cmj)%fluxset(1)%locg_set(g)%locg_flux(fmi,fmj,fmk), g=num_group, 1, -1)
   else
    write(cur_fileunit, form)  point, &
    (zlevel(cmk)%cm_zlev(cmi,cmj)%fluxset(1)%locg_set(g)%locg_flux(fmi,fmj,fmk), g=1, num_group)
   endif
 enddo
 enddo
 enddo
enddo
enddo
enddo

    if(IsFluxout .eq. 1) then
      write(*, "('flux output file done (volumn ', I0, '): ', A)")  m, trim(cur_filename)
      write(READLOG,"('flux output file done (volumn ', I0, '): ', A)") m, trim(cur_filename)
    else
      write(*,"('adjoint flux output file done (volumn ', I0, '): ', A, ' GROUP ORDER FLIPPED')")  m,trim(cur_filename)
      write(READLOG,"('adjoint flux output file done (volumn ', I0, '): ', A, ' GROUP ORDER FLIPPED')")  m,trim(cur_filename)
    endif

close(cur_fileunit)

return

1001  write(err_message,*) 'open file error: no permission for creating file'
      call TrapOpenError(1)
end subroutine

! output adjoint flux for array project fov ajoint model
Subroutine WriteFov
use files
use funs
use ErrControl
use paraset1
use paraset2
use paraset4
use lineread

integer i,j,k, grp,g, pnt
integer ini, inj, ink
integer set_number
real, allocatable :: tempbuf(:)

k=3
i=3
set_number=1
pnt=0
allocate (tempbuf(num_group))

open(unit=34, file='fov.dat')
write(34,"(' Pnt   CMesh   FMesh   finesize   position    importance' )")

do j=1, zlevel(k)%ncy

do inj=1, zlevel(k)%cm_zlev(i,j)%fine(2)
tempbuf=0
pnt=pnt+1
do ini=1, zlevel(k)%cm_zlev(i,j)%fine(1)
do ink=1, zlevel(k)%cm_zlev(i,j)%fine(3)
do g=1, num_group
grp=num_group-g+1
tempbuf(g)=tempbuf(g) + zlevel(k)%cm_zlev(i,j)%fluxset(set_number)%locg_set(grp)%locg_flux(ini,inj,ink)

enddo !grp
enddo !ink
enddo !ini

write(34,"(3(I4,4x), f6.2,2x, f10.3, 3x, 300(ES12.5,2x)  )") pnt, j, inj, &
   zlevel(k)%cm_zlev(i,j)%finsize(2), zlevel(k)%cm_zlev(i,j)%cm_y(inj), tempbuf

enddo !inj

enddo !j
close (34)

end subroutine


SUBROUTINE OUTERR(SRNAME,ERRMSG)
  use MPI
  CHARACTER*(*)      SRNAME
  CHARACTER*(*)      ERRMSG
  !
  INTEGER            STDERR
  PARAMETER          (STDERR = 99)
  !
  IF ((LEN(ERRMSG) .GT. 67) .AND. (LEN(SRNAME) .GT. 6)) THEN
     WRITE (STDERR,9010) SRNAME, ERRMSG
  ELSEIF (LEN(ERRMSG) .GT. 67) THEN
     WRITE (STDERR,9020) SRNAME, ERRMSG
  ELSEIF (LEN(SRNAME) .GT. 6) THEN
     WRITE (STDERR,9030) SRNAME, ERRMSG
  ELSE
     WRITE (STDERR,9040) SRNAME, ERRMSG
  ENDIF
  call stop_MPI
  STOP 'ERROR in lapwso'
  !
  RETURN
  !
9010 FORMAT (' ''', A6, ''' - ',A67)
9020 FORMAT (' ''', A,  ''' - ',A67)
9030 FORMAT (' ''', A6, ''' - ',A)
9040 FORMAT (' ''', A,  ''' - ',A)
  !
  !     End of 'OUTERR'
  !
END SUBROUTINE OUTERR


text:
*dk,recvr23
      subroutine recvr23(it1,it2,it3,id,jd,ictrecvr,ipiitmp,
     *                   ipjjtmp,ipkttmp,
     *                   npoints,ntets)
       implicit real*8 (a-h,o-z)
C
C ######################################################################
C
C      PURPOSE -
C
C         This routine temporarily takes two tets into three tets and
C         saves information for later recovering the original state of
C         the mesh.  The fluxer is not called.
C
C            (i1,i2,i3,i4) - (j1,j2,j3,xx)
C            (i1,i3,i2,i5) - (k1,k2,k3,xx)
C            -----------------------------------------
C            (i1,i2,i5,i4) - { (2,it2),(1,it3),j3,k2 }
C            (i2,i3,i5,i4) - { (2,it3),(1,it1),j1,k1 }
C            (i3,i1,i5,i4) - { (2,it1),(1,it2),j2,k3 }
C
C      INPUT ARGUMENTS -
C
C         it1   - the first tet
C         it2   - the second tet
C         id    - the "itet" values of the three new tets
C         jd    - the "jtet" values of the three new tets
C         ictrecvr - the current number of tetrahedra in the "recvr"
C                    array.
C         ipiitmp  - pointer to array to store itet information for
C                    later recovering the original mesh.
C         ipjjtmp  - pointer to array to store jtet information for
C                    later recovering the original mesh.
C         ipkttmp  - pointer to array to store tet numbers for
C                    later recovering the original mesh.
C
C      OUTPUT ARGUMENTS -
C
C         ictrecvr - the current number of tetrahedra in the "recvr"
C                    array.
C
C     CHANGE HISTORY -
C
C        $Log: recvr23.f,v $
C        Revision 2.00  2007/11/09 20:04:00  spchu
C        Import to CVS
C
CPVCS
CPVCS       Rev 1.8   05 Jan 2001 12:57:20   dcg
CPVCS    use dble in place of float so as not to lose digits
CPVCS
CPVCS       Rev 1.7   Fri Nov 14 13:43:22 1997   dcg
CPVCS    declare logmess as a character variable
CPVCS
CPVCS       Rev 1.6   Fri Oct 17 11:09:56 1997   dcg
CPVCS    replace print statement with writlog call
CPVCS
CPVCS       Rev 1.5   Fri Sep 26 13:54:06 1997   dcg
CPVCS    refresh pointers after hmemadjb call
CPVCS
CPVCS       Rev 1.4   Mon Apr 14 16:58:46 1997   pvcs
CPVCS    No change.
CPVCS
CPVCS       Rev 1.3   12/02/94 15:06:46   het
CPVCS    Added an option for the "cmo" access functions
CPVCS
CPVCS
CPVCS       Rev 1.2   12/01/94 18:49:06   het
CPVCS    Added a data type to the "cmo" calles
CPVCS       and added the "cmo.h" include file.
CPVCS
CPVCS       Rev 1.1   11/17/94 21:54:46   het
CPVCS    Added include files for chydro, neibor, cmerge, comdict. Added calles and
CPVCS    pointer statements for current_mesh_object database access.
CPVCS
CPVCS       Rev 1.0   11/10/94 12:17:44   pvcs
CPVCS    Original version.
C
C ######################################################################
C
C
      include "cmo.h"
      include "chydro.h"
      include "neibor.h"
C
C ######################################################################
C
      integer id(12),jd(12),itets(3)
      character*132 logmess
      pointer (ipiitmp , iitmp(4,1))
      pointer (ipjjtmp , jjtmp(4,1))
      pointer (ipkttmp , kttmp(1)  )
C
C ######################################################################
C
C     DEFINE THE STATEMENT FUNCTIONS NEEDED TO CALCULATE TET VOLUMES.
C
      crosx1(i,j,k)=(yic(j)-yic(i))*(zic(k)-zic(i))-
     *              (yic(k)-yic(i))*(zic(j)-zic(i))
      crosy1(i,j,k)=(xic(k)-xic(i))*(zic(j)-zic(i))-
     *              (xic(j)-xic(i))*(zic(k)-zic(i))
      crosz1(i,j,k)=(xic(j)-xic(i))*(yic(k)-yic(i))-
     *              (xic(k)-xic(i))*(yic(j)-yic(i))
      volume(i1,i2,i3,i4)=(xic(i4)-xic(i1))*crosx1(i1,i2,i3)+
     *                    (yic(i4)-yic(i1))*crosy1(i1,i2,i3)+
     *                    (zic(i4)-zic(i1))*crosz1(i1,i2,i3)
C
C ######################################################################
C
C
C
C     ******************************************************************
C     FETCH MESH OBJECT NAME AND POINTER INFORMATION.
C
      if(icmoget.eq.1) then
C
      call cmo_get_name(cmo,ierror)
C
      call cmo_get_info('mbndry',cmo,mbndry,length,icmotype,ierror)
      call cmo_get_info('imt1',cmo,ipimt1,lenimt1,icmotype,ierror)
      call cmo_get_info('xic',cmo,ipxic,lenxic,icmotype,ierror)
      call cmo_get_info('yic',cmo,ipyic,lenyic,icmotype,ierror)
      call cmo_get_info('zic',cmo,ipzic,lenzic,icmotype,ierror)
      call cmo_get_info('itetclr',cmo,ipitetclr,lenitetclr,icmotype,ier)
      call cmo_get_info('itet',cmo,ipitet,lenitet,icmotype,ierror)
      call cmo_get_info('jtet',cmo,ipjtet,lenjtet,icmotype,ierror)
C
      endif
C
C     ******************************************************************
C
      call mmgetlen(ipitet,lenitet,icscode)
      if(4*(ntets+1).ge.lenitet) then
         write(logmess,'(a,a)') 'Trying to increment nodnbrp arrays in '
     *           , 'recvr23'
         call writloga('default',0,logmess,0,ierrw)
         call hmemadjb('nodnbrp ',1)

         call cmo_get_info('imt1',cmo,ipimt1,lenimt1,icmotype,ierror)
         call cmo_get_info('xic',cmo,ipxic,lenxic,icmotype,ierror)
         call cmo_get_info('yic',cmo,ipyic,lenyic,icmotype,ierror)
         call cmo_get_info('zic',cmo,ipzic,lenzic,icmotype,ierror)
         call cmo_get_info('itetclr',cmo,ipitetclr,lenitetclr,icmotype,
     *                     ierror)
         call cmo_get_info('itet',cmo,ipitet,lenitet,icmotype,ierror)
         call cmo_get_info('jtet',cmo,ipjtet,lenjtet,icmotype,ierror)

      endif
      ntets=ntets+1
      if(icmoset.eq.1) then
         call cmo_set_info('nelements',cmo,ntets,1,1,ierror)
      endif
      it3=ntets
C
C     ******************************************************************
C     SAVE MESH INFORMATION.
C
      if (kfix(2,it1) .eq. 0) then
         kfix(2,it1)=1
         ictrecvr=ictrecvr+1
         kttmp(ictrecvr)=it1
         iitmp(1,ictrecvr)=itet(1,it1)
         iitmp(2,ictrecvr)=itet(2,it1)
         iitmp(3,ictrecvr)=itet(3,it1)
         iitmp(4,ictrecvr)=itet(4,it1)
         jjtmp(1,ictrecvr)=jtet(1,it1)
         jjtmp(2,ictrecvr)=jtet(2,it1)
         jjtmp(3,ictrecvr)=jtet(3,it1)
         jjtmp(4,ictrecvr)=jtet(4,it1)
      endif
      if (kfix(2,it2) .eq. 0) then
         kfix(2,it2)=1
         ictrecvr=ictrecvr+1
         kttmp(ictrecvr)=it2
         iitmp(1,ictrecvr)=itet(1,it2)
         iitmp(2,ictrecvr)=itet(2,it2)
         iitmp(3,ictrecvr)=itet(3,it2)
         iitmp(4,ictrecvr)=itet(4,it2)
         jjtmp(1,ictrecvr)=jtet(1,it2)
         jjtmp(2,ictrecvr)=jtet(2,it2)
         jjtmp(3,ictrecvr)=jtet(3,it2)
         jjtmp(4,ictrecvr)=jtet(4,it2)
      endif
C
C     ******************************************************************
C     MAKE THE THREE NEW TETRAHEDRON ASSIGNMENTS
C
      itet(1,it1)=id(1)
      jtet(1,it1)=jd(1)
      itet(2,it1)=id(2)
      jtet(2,it1)=jd(2)
      itet(3,it1)=id(3)
      jtet(3,it1)=jd(3)
      itet(4,it1)=id(4)
      jtet(4,it1)=jd(4)
C
      itet(1,it2)=id(5)
      jtet(1,it2)=jd(5)
      itet(2,it2)=id(6)
      jtet(2,it2)=jd(6)
      itet(3,it2)=id(7)
      jtet(3,it2)=jd(7)
      itet(4,it2)=id(8)
      jtet(4,it2)=jd(8)
C
      itet(1,it3)=id(9)
      jtet(1,it3)=jd(9)
      itet(2,it3)=id(10)
      jtet(2,it3)=jd(10)
      itet(3,it3)=id(11)
      jtet(3,it3)=jd(11)
      itet(4,it3)=id(12)
      jtet(4,it3)=jd(12)
C
C
C     ******************************************************************
C     SAVE MESH INFORMATION.
C
      itets(1)=it1
      itets(2)=it2
      itets(3)=it3
      do 150 k=1,3
         itk=itets(k)
         do 100 j=3,4
            jtemp=jtet(j,itk)
            if (jtemp .eq. mbndry) goto 100
            if (jtemp .gt. mbndry) jtemp=jtemp-mbndry
            itx=0.25*dble(jtemp)+0.9
            if (kfix(2,itx) .eq. 0) then
               kfix(2,itx)=1
               ictrecvr=ictrecvr+1
               kttmp(ictrecvr)=itx
               iitmp(1,ictrecvr)=itet(1,itx)
               iitmp(2,ictrecvr)=itet(2,itx)
               iitmp(3,ictrecvr)=itet(3,itx)
               iitmp(4,ictrecvr)=itet(4,itx)
               jjtmp(1,ictrecvr)=jtet(1,itx)
               jjtmp(2,ictrecvr)=jtet(2,itx)
               jjtmp(3,ictrecvr)=jtet(3,itx)
               jjtmp(4,ictrecvr)=jtet(4,itx)
            endif
 100     continue
 150  continue
C
C     ******************************************************************
C     MAKE THE JTET ARRAY CONSISTENT
C
      if(jtet(3,it2).lt.mbndry) then
         jtet1(jtet(3,it2))=4*(it2-1)+3
      elseif(jtet(3,it2).gt.mbndry) then
         jtemp=jtet(3,it2)-mbndry
         jtet1(jtemp)=4*(it2-1)+3+mbndry
      endif
      if(jtet(3,it3).lt.mbndry) then
         jtet1(jtet(3,it3))=4*(it3-1)+3
      elseif(jtet(3,it3).gt.mbndry) then
         jtemp=jtet(3,it3)-mbndry
         jtet1(jtemp)=4*(it3-1)+3+mbndry
      endif
      if(jtet(3,it1).lt.mbndry) then
         jtet1(jtet(3,it1))=4*(it1-1)+3
      elseif(jtet(3,it1).gt.mbndry) then
         jtemp=jtet(3,it1)-mbndry
         jtet1(jtemp)=4*(it1-1)+3+mbndry
      endif
      if(jtet(4,it2).lt.mbndry) then
         jtet1(jtet(4,it2))=4*(it2-1)+4
      elseif(jtet(4,it2).gt.mbndry) then
         jtemp=jtet(4,it2)-mbndry
         jtet1(jtemp)=4*(it2-1)+4+mbndry
      endif
      if(jtet(4,it1).lt.mbndry) then
         jtet1(jtet(4,it1))=4*(it1-1)+4
      elseif(jtet(4,it1).gt.mbndry) then
         jtemp=jtet(4,it1)-mbndry
         jtet1(jtemp)=4*(it1-1)+4+mbndry
      endif
      if(jtet(4,it3).lt.mbndry) then
         jtet1(jtet(4,it3))=4*(it3-1)+4
      elseif(jtet(4,it3).gt.mbndry) then
         jtemp=jtet(4,it3)-mbndry
         jtet1(jtemp)=4*(it3-1)+4+mbndry
      endif
C
C     ******************************************************************
C
C
      goto 9999
 9999 continue
      return
      end

ext: f

max_forks_repo_name: daniellivingston/LaGriT


text:
-makelib ies/xil_defaultlib -sv \
  "C:/Xilinx/Vivado/2016.4/data/ip/xpm/xpm_cdc/hdl/xpm_cdc.sv" \
  "C:/Xilinx/Vivado/2016.4/data/ip/xpm/xpm_memory/hdl/xpm_memory.sv" \
-endlib
-makelib ies/xpm \
  "C:/Xilinx/Vivado/2016.4/data/ip/xpm/xpm_VCOMP.vhd" \
-endlib
-makelib ies/lib_pkg_v1_0_2 \
  "../../../../vc707_bist.srcs/sources_1/bd/system/ipshared/832a/hdl/lib_pkg_v1_0_rfs.vhd" \
-endlib
-makelib ies/lib_srl_fifo_v1_0_2 \
  "../../../../vc707_bist.srcs/sources_1/bd/system/ipshared/6039/hdl/lib_srl_fifo_v1_0_rfs.vhd" \
-endlib
-makelib ies/emc_common_v3_0_5 \
  "../../../../vc707_bist.srcs/sources_1/bd/system/ipshared/8618/hdl/emc_common_v3_0_vh_rfs.vhd" \
-endlib
-makelib ies/axi_emc_v3_0_11 \
  "../../../../vc707_bist.srcs/sources_1/bd/system/ipshared/32ad/hdl/axi_emc_v3_0_vh_rfs.vhd" \
-endlib
-makelib ies/xil_defaultlib \
  "../../../bd/system/ip/system_axi_emc_0_0/sim/system_axi_emc_0_0.vhd" \
-endlib
-makelib ies/axi_lite_ipif_v3_0_4 \
  "../../../../vc707_bist.srcs/sources_1/bd/system/ipshared/0ba0/hdl/axi_lite_ipif_v3_0_vh_rfs.vhd" \
-endlib
-makelib ies/lib_cdc_v1_0_2 \
  "../../../../vc707_bist.srcs/sources_1/bd/system/ipshared/52cb/hdl/lib_cdc_v1_0_rfs.vhd" \
-endlib
-makelib ies/interrupt_control_v3_1_4 \
  "../../../../vc707_bist.srcs/sources_1/bd/system/ipshared/e956/hdl/interrupt_control_v3_1_vh_rfs.vhd" \
-endlib
-makelib ies/axi_gpio_v2_0_13 \
  "../../../../vc707_bist.srcs/sources_1/bd/system/ipshared/4f16/hdl/axi_gpio_v2_0_vh_rfs.vhd" \
-endlib
-makelib ies/xil_defaultlib \
  "../../../bd/system/ip/system_axi_gpio_0_0/sim/system_axi_gpio_0_0.vhd" \
  "../../../bd/system/ip/system_axi_gpio_1_0/sim/system_axi_gpio_1_0.vhd" \
  "../../../bd/system/ip/system_axi_gpio_3_0/sim/system_axi_gpio_3_0.vhd" \
  "../../../bd/system/ip/system_axi_gpio_4_0/sim/system_axi_gpio_4_0.vhd" \
-endlib
-makelib ies/axi_iic_v2_0_14 \
  "../../../../vc707_bist.srcs/sources_1/bd/system/ipshared/efc9/hdl/axi_iic_v2_0_vh_rfs.vhd" \
-endlib
-makelib ies/xil_defaultlib \
  "../../../bd/system/ip/system_axi_iic_0_0/sim/system_axi_iic_0_0.vhd" \
-endlib
-makelib ies/axi_timer_v2_0_13 \
  "../../../../vc707_bist.srcs/sources_1/bd/system/ipshared/3edf/hdl/axi_timer_v2_0_vh_rfs.vhd" \
-endlib
-makelib ies/xil_defaultlib \
  "../../../bd/system/ip/system_axi_timer_0_0/sim/system_axi_timer_0_0.vhd" \
-endlib
-makelib ies/axi_uart16550_v2_0_13 \
  "../../../../vc707_bist.srcs/sources_1/bd/system/ipshared/cfe6/hdl/axi_uart16550_v2_0_vh_rfs.vhd" \
-endlib
-makelib ies/xil_defaultlib \
  "../../../bd/system/ip/system_axi_uart16550_0_0/sim/system_axi_uart16550_0_0.vhd" \
-endlib
-makelib ies/fifo_generator_v13_0_5 \
  "../../../../vc707_bist.srcs/sources_1/bd/system/ipshared/26b0/simulation/fifo_generator_vhdl_beh.vhd" \
  "../../../../vc707_bist.srcs/sources_1/bd/system/ipshared/26b0/hdl/fifo_generator_v13_0_rfs.vhd" \
-endlib
-makelib ies/axi_usb2_device_v5_0_12 \
  "../../../../vc707_bist.srcs/sources_1/bd/system/ipshared/370c/hdl/axi_usb2_device_v5_0_rfs.v" \
-endlib
-makelib ies/axi_usb2_device_v5_0_12 \
  "../../../../vc707_bist.srcs/sources_1/bd/system/ipshared/370c/hdl/axi_usb2_device_v5_0_rfs.vhd" \
-endlib
-makelib ies/xil_defaultlib \
  "../../../bd/system/ip/system_axi_usb2_device_0_0/sim/system_axi_usb2_device_0_0.vhd" \
-endlib
-makelib ies/xil_defaultlib \
  "../../../../vc707_bist.srcs/sources_1/ipshared/bd19/src/gtxe2_top.v" \
  "../../../bd/system/ip/system_gtxe2_top_0_0/sim/system_gtxe2_top_0_0.v" \
-endlib
-makelib ies/xil_defaultlib \
  "../../../bd/system/ip/system_xadc_wiz_0_0/proc_common_v3_30_a/hdl/src/vhdl/system_xadc_wiz_0_0_conv_funs_pkg.vhd" \
  "../../../bd/system/ip/system_xadc_wiz_0_0/proc_common_v3_30_a/hdl/src/vhdl/system_xadc_wiz_0_0_proc_common_pkg.vhd" \
  "../../../bd/system/ip/system_xadc_wiz_0_0/proc_common_v3_30_a/hdl/src/vhdl/system_xadc_wiz_0_0_ipif_pkg.vhd" \
  "../../../bd/system/ip/system_xadc_wiz_0_0/proc_common_v3_30_a/hdl/src/vhdl/system_xadc_wiz_0_0_family_support.vhd" \
  "../../../bd/system/ip/system_xadc_wiz_0_0/proc_common_v3_30_a/hdl/src/vhdl/system_xadc_wiz_0_0_family.vhd" \
  "../../../bd/system/ip/system_xadc_wiz_0_0/proc_common_v3_30_a/hdl/src/vhdl/system_xadc_wiz_0_0_soft_reset.vhd" \
  "../../../bd/system/ip/system_xadc_wiz_0_0/proc_common_v3_30_a/hdl/src/vhdl/system_xadc_wiz_0_0_pselect_f.vhd" \
  "../../../bd/system/ip/system_xadc_wiz_0_0/axi_lite_ipif_v1_01_a/hdl/src/vhdl/system_xadc_wiz_0_0_address_decoder.vhd" \
  "../../../bd/system/ip/system_xadc_wiz_0_0/axi_lite_ipif_v1_01_a/hdl/src/vhdl/system_xadc_wiz_0_0_slave_attachment.vhd" \
  "../../../bd/system/ip/system_xadc_wiz_0_0/interrupt_control_v2_01_a/hdl/src/vhdl/system_xadc_wiz_0_0_interrupt_control.vhd" \
  "../../../bd/system/ip/system_xadc_wiz_0_0/axi_lite_ipif_v1_01_a/hdl/src/vhdl/system_xadc_wiz_0_0_axi_lite_ipif.vhd" \
  "../../../bd/system/ip/system_xadc_wiz_0_0/system_xadc_wiz_0_0_drp_arbiter.vhd" \
  "../../../bd/system/ip/system_xadc_wiz_0_0/system_xadc_wiz_0_0_temperature_update.vhd" \
  "../../../bd/system/ip/system_xadc_wiz_0_0/system_xadc_wiz_0_0_xadc_core_drp.vhd" \
  "../../../bd/system/ip/system_xadc_wiz_0_0/system_xadc_wiz_0_0_axi_xadc.vhd" \
  "../../../bd/system/ip/system_xadc_wiz_0_0/system_xadc_wiz_0_0.vhd" \
  "../../../bd/system/ipshared/e147/xlconstant.vhd" \
  "../../../bd/system/ip/system_xlconstant_0_0/sim/system_xlconstant_0_0.vhd" \
  "../../../bd/system/ip/system_xlconstant_1_0/sim/system_xlconstant_1_0.vhd" \
-endlib
-makelib ies/microblaze_v10_0_1 \
  "../../../../vc707_bist.srcs/sources_1/bd/system/ipshared/18bd/hdl/microblaze_v10_0_vh_rfs.vhd" \
-endlib
-makelib ies/xil_defaultlib \
  "../../../bd/system/ip/system_microblaze_0_0/sim/system_microblaze_0_0.vhd" \
-endlib
-makelib ies/blk_mem_gen_v8_3_5 \
  "../../../../vc707_bist.srcs/sources_1/bd/system/ipshared/6273/simulation/blk_mem_gen_v8_3.v" \
-endlib
-makelib ies/axi_bram_ctrl_v4_0_10 \
  "../../../../vc707_bist.srcs/sources_1/bd/system/ipshared/91f5/hdl/axi_bram_ctrl_v4_0_rfs.vhd" \
-endlib
-makelib ies/xil_defaultlib \
  "../../../bd/system/ip/system_axi_bram_ctrl_0_0/sim/system_axi_bram_ctrl_0_0.vhd" \
-endlib
-makelib ies/lib_bmg_v1_0_7 \
  "../../../../vc707_bist.srcs/sources_1/bd/system/ipshared/38e8/hdl/lib_bmg_v1_0_rfs.vhd" \
-endlib
-makelib ies/axi_ethernet_buffer_v2_0_14 \
  "../../../../vc707_bist.srcs/sources_1/bd/system/ipshared/6d78/hdl/axi_ethernet_buffer_v2_0_rfs.vhd" \
-endlib
-makelib ies/xil_defaultlib \
  "../../../bd/system/ip/system_axi_ethernet_0_0/bd_0/ip/ip_0/sim/bd_4bad_eth_buf_0.vhd" \
-endlib
-makelib ies/xbip_utils_v3_0_7 \
  "../../../../vc707_bist.srcs/sources_1/bd/system/ipshared/6fc3/hdl/xbip_utils_v3_0_vh_rfs.vhd" \
-endlib
-makelib ies/xbip_pipe_v3_0_3 \
  "../../../../vc707_bist.srcs/sources_1/bd/system/ipshared/7db8/hdl/xbip_pipe_v3_0_vh_rfs.vhd" \
-endlib
-makelib ies/xbip_bram18k_v3_0_3 \
  "../../../../vc707_bist.srcs/sources_1/bd/system/ipshared/403d/hdl/xbip_bram18k_v3_0_vh_rfs.vhd" \
-endlib
-makelib ies/mult_gen_v12_0_12 \
  "../../../../vc707_bist.srcs/sources_1/bd/system/ipshared/f0ab/hdl/mult_gen_v12_0_vh_rfs.vhd" \
-endlib
-makelib ies/tri_mode_ethernet_mac_v9_0_6 \
  "../../../../vc707_bist.srcs/sources_1/bd/system/ipshared/5031/hdl/tri_mode_ethernet_mac_v9_0_rfs.v" \
-endlib
-makelib ies/tri_mode_ethernet_mac_v9_0_6 \
  "../../../../vc707_bist.srcs/sources_1/bd/system/ipshared/5031/hdl/tri_mode_ethernet_mac_v9_0_rfs.vhd" \
-endlib
-makelib ies/xil_defaultlib \
  "../../../bd/system/ip/system_axi_ethernet_0_0/bd_0/ip/ip_1/synth/common/bd_4bad_eth_mac_0_block_sync_block.vhd" \
  "../../../bd/system/ip/system_axi_ethernet_0_0/bd_0/ip/ip_1/synth/axi_ipif/bd_4bad_eth_mac_0_axi4_lite_ipif_wrapper.vhd" \
  "../../../bd/system/ip/system_axi_ethernet_0_0/bd_0/ip/ip_1/synth/bd_4bad_eth_mac_0_block.vhd" \
  "../../../bd/system/ip/system_axi_ethernet_0_0/bd_0/ip/ip_1/synth/bd_4bad_eth_mac_0.vhd" \
-endlib
-makelib ies/gig_ethernet_pcs_pma_v16_0_1 \
  "../../../../vc707_bist.srcs/sources_1/bd/system/ipshared/5a2a/hdl/gig_ethernet_pcs_pma_v16_0_rfs.vhd" \
-endlib
-makelib ies/xil_defaultlib \
  "../../../bd/system/ip/system_axi_ethernet_0_0/bd_0/ip/ip_2/synth/sgmii_adapt/bd_4bad_pcs_pma_0_clk_gen.vhd" \
  "../../../bd/system/ip/system_axi_ethernet_0_0/bd_0/ip/ip_2/synth/bd_4bad_pcs_pma_0_resets.vhd" \
  "../../../bd/system/ip/system_axi_ethernet_0_0/bd_0/ip/ip_2/synth/bd_4bad_pcs_pma_0_clocking.vhd" \
  "../../../bd/system/ip/system_axi_ethernet_0_0/bd_0/ip/ip_2/synth/bd_4bad_pcs_pma_0_support.vhd" \
  "../../../bd/system/ip/system_axi_ethernet_0_0/bd_0/ip/ip_2/synth/bd_4bad_pcs_pma_0_gt_common.vhd" \
  "../../../bd/system/ip/system_axi_ethernet_0_0/bd_0/ip/ip_2/synth/transceiver/bd_4bad_pcs_pma_0_cpll_railing.vhd" \
  "../../../bd/system/ip/system_axi_ethernet_0_0/bd_0/ip/ip_2/synth/transceiver/bd_4bad_pcs_pma_0_gtwizard_gt.vhd" \
  "../../../bd/system/ip/system_axi_ethernet_0_0/bd_0/ip/ip_2/synth/transceiver/bd_4bad_pcs_pma_0_gtwizard.vhd" \
  "../../../bd/system/ip/system_axi_ethernet_0_0/bd_0/ip/ip_2/synth/transceiver/bd_4bad_pcs_pma_0_gtwizard_multi_gt.vhd" \
  "../../../bd/system/ip/system_axi_ethernet_0_0/bd_0/ip/ip_2/synth/transceiver/bd_4bad_pcs_pma_0_gtwizard_init.vhd" \
  "../../../bd/system/ip/system_axi_ethernet_0_0/bd_0/ip/ip_2/synth/transceiver/bd_4bad_pcs_pma_0_tx_startup_fsm.vhd" \
  "../../../bd/system/ip/system_axi_ethernet_0_0/bd_0/ip/ip_2/synth/transceiver/bd_4bad_pcs_pma_0_rx_startup_fsm.vhd" \
  "../../../bd/system/ip/system_axi_ethernet_0_0/bd_0/ip/ip_2/synth/sgmii_adapt/bd_4bad_pcs_pma_0_johnson_cntr.vhd" \
  "../../../bd/system/ip/system_axi_ethernet_0_0/bd_0/ip/ip_2/synth/bd_4bad_pcs_pma_0_reset_sync.vhd" \
  "../../../bd/system/ip/system_axi_ethernet_0_0/bd_0/ip/ip_2/synth/transceiver/bd_4bad_pcs_pma_0_rx_elastic_buffer.vhd" \
  "../../../bd/system/ip/system_axi_ethernet_0_0/bd_0/ip/ip_2/synth/sgmii_adapt/bd_4bad_pcs_pma_0_rx_rate_adapt.vhd" \
  "../../../bd/system/ip/system_axi_ethernet_0_0/bd_0/ip/ip_2/synth/sgmii_adapt/bd_4bad_pcs_pma_0_sgmii_adapt.vhd" \
  "../../../bd/system/ip/system_axi_ethernet_0_0/bd_0/ip/ip_2/synth/bd_4bad_pcs_pma_0_sync_block.vhd" \
  "../../../bd/system/ip/system_axi_ethernet_0_0/bd_0/ip/ip_2/synth/transceiver/bd_4bad_pcs_pma_0_reset_wtd_timer.vhd" \
  "../../../bd/system/ip/system_axi_ethernet_0_0/bd_0/ip/ip_2/synth/transceiver/bd_4bad_pcs_pma_0_transceiver.vhd" \
  "../../../bd/system/ip/system_axi_ethernet_0_0/bd_0/ip/ip_2/synth/sgmii_adapt/bd_4bad_pcs_pma_0_tx_rate_adapt.vhd" \
  "../../../bd/system/ip/system_axi_ethernet_0_0/bd_0/ip/ip_2/synth/bd_4bad_pcs_pma_0_block.vhd" \
  "../../../bd/system/ip/system_axi_ethernet_0_0/bd_0/ip/ip_2/synth/bd_4bad_pcs_pma_0.vhd" \
  "../../../bd/system/ip/system_axi_ethernet_0_0/bd_0/ip/ip_3/sim/bd_4bad_xlconstant_phyadd_0.vhd" \
  "../../../bd/system/ip/system_axi_ethernet_0_0/bd_0/hdl/bd_4bad.vhd" \
  "../../../bd/system/ip/system_axi_ethernet_0_0/sim/system_axi_ethernet_0_0.vhd" \
-endlib
-makelib ies/xil_defaultlib \
  "../../../bd/system/ip/system_mig_7series_0_0/system_mig_7series_0_0/user_design/rtl/axi/mig_7series_v4_0_axi_ctrl_addr_decode.v" \
  "../../../bd/system/ip/system_mig_7series_0_0/system_mig_7series_0_0/user_design/rtl/axi/mig_7series_v4_0_axi_ctrl_read.v" \
  "../../../bd/system/ip/system_mig_7series_0_0/system_mig_7series_0_0/user_design/rtl/axi/mig_7series_v4_0_axi_ctrl_reg.v" \
  "../../../bd/system/ip/system_mig_7series_0_0/system_mig_7series_0_0/user_design/rtl/axi/mig_7series_v4_0_axi_ctrl_reg_bank.v" \
  "../../../bd/system/ip/system_mig_7series_0_0/system_mig_7series_0_0/user_design/rtl/axi/mig_7series_v4_0_axi_ctrl_top.v" \
  "../../../bd/system/ip/system_mig_7series_0_0/system_mig_7series_0_0/user_design/rtl/axi/mig_7series_v4_0_axi_ctrl_write.v" \
  "../../../bd/system/ip/system_mig_7series_0_0/system_mig_7series_0_0/user_design/rtl/axi/mig_7series_v4_0_axi_mc.v" \
  "../../../bd/system/ip/system_mig_7series_0_0/system_mig_7series_0_0/user_design/rtl/axi/mig_7series_v4_0_axi_mc_ar_channel.v" \
  "../../../bd/system/ip/system_mig_7series_0_0/system_mig_7series_0_0/user_design/rtl/axi/mig_7series_v4_0_axi_mc_aw_channel.v" \
  "../../../bd/system/ip/system_mig_7series_0_0/system_mig_7series_0_0/user_design/rtl/axi/mig_7series_v4_0_axi_mc_b_channel.v" \
  "../../../bd/system/ip/system_mig_7series_0_0/system_mig_7series_0_0/user_design/rtl/axi/mig_7series_v4_0_axi_mc_cmd_arbiter.v" \
  "../../../bd/system/ip/system_mig_7series_0_0/system_mig_7series_0_0/user_design/rtl/axi/mig_7series_v4_0_axi_mc_cmd_fsm.v" \
  "../../../bd/system/ip/system_mig_7series_0_0/system_mig_7series_0_0/user_design/rtl/axi/mig_7series_v4_0_axi_mc_cmd_translator.v" \
  "../../../bd/system/ip/system_mig_7series_0_0/system_mig_7series_0_0/user_design/rtl/axi/mig_7series_v4_0_axi_mc_fifo.v" \
  "../../../bd/system/ip/system_mig_7series_0_0/system_mig_7series_0_0/user_design/rtl/axi/mig_7series_v4_0_axi_mc_incr_cmd.v" \
  "../../../bd/system/ip/system_mig_7series_0_0/system_mig_7series_0_0/user_design/rtl/axi/mig_7series_v4_0_axi_mc_r_channel.v" \
  "../../../bd/system/ip/system_mig_7series_0_0/system_mig_7series_0_0/user_design/rtl/axi/mig_7series_v4_0_axi_mc_simple_fifo.v" \
  "../../../bd/system/ip/system_mig_7series_0_0/system_mig_7series_0_0/user_design/rtl/axi/mig_7series_v4_0_axi_mc_wrap_cmd.v" \
  "../../../bd/system/ip/system_mig_7series_0_0/system_mig_7series_0_0/user_design/rtl/axi/mig_7series_v4_0_axi_mc_wr_cmd_fsm.v" \
  "../../../bd/system/ip/system_mig_7series_0_0/system_mig_7series_0_0/user_design/rtl/axi/mig_7series_v4_0_axi_mc_w_channel.v" \
  "../../../bd/system/ip/system_mig_7series_0_0/system_mig_7series_0_0/user_design/rtl/axi/mig_7series_v4_0_ddr_axic_register_slice.v" \
  "../../../bd/system/ip/system_mig_7series_0_0/system_mig_7series_0_0/user_design/rtl/axi/mig_7series_v4_0_ddr_axi_register_slice.v" \
  "../../../bd/system/ip/system_mig_7series_0_0/system_mig_7series_0_0/user_design/rtl/axi/mig_7series_v4_0_ddr_axi_upsizer.v" \
  "../../../bd/system/ip/system_mig_7series_0_0/system_mig_7series_0_0/user_design/rtl/axi/mig_7series_v4_0_ddr_a_upsizer.v" \
  "../../../bd/system/ip/system_mig_7series_0_0/system_mig_7series_0_0/user_design/rtl/axi/mig_7series_v4_0_ddr_carry_and.v" \
  "../../../bd/system/ip/system_mig_7series_0_0/system_mig_7series_0_0/user_design/rtl/axi/mig_7series_v4_0_ddr_carry_latch_and.v" \
  "../../../bd/system/ip/system_mig_7series_0_0/system_mig_7series_0_0/user_design/rtl/axi/mig_7series_v4_0_ddr_carry_latch_or.v" \
  "../../../bd/system/ip/system_mig_7series_0_0/system_mig_7series_0_0/user_design/rtl/axi/mig_7series_v4_0_ddr_carry_or.v" \
  "../../../bd/system/ip/system_mig_7series_0_0/system_mig_7series_0_0/user_design/rtl/axi/mig_7series_v4_0_ddr_command_fifo.v" \
  "../../../bd/system/ip/system_mig_7series_0_0/system_mig_7series_0_0/user_design/rtl/axi/mig_7series_v4_0_ddr_comparator.v" \
  "../../../bd/system/ip/system_mig_7series_0_0/system_mig_7series_0_0/user_design/rtl/axi/mig_7series_v4_0_ddr_comparator_sel.v" \
  "../../../bd/system/ip/system_mig_7series_0_0/system_mig_7series_0_0/user_design/rtl/axi/mig_7series_v4_0_ddr_comparator_sel_static.v" \
  "../../../bd/system/ip/system_mig_7series_0_0/system_mig_7series_0_0/user_design/rtl/axi/mig_7series_v4_0_ddr_r_upsizer.v" \
  "../../../bd/system/ip/system_mig_7series_0_0/system_mig_7series_0_0/user_design/rtl/axi/mig_7series_v4_0_ddr_w_upsizer.v" \
  "../../../bd/system/ip/system_mig_7series_0_0/system_mig_7series_0_0/user_design/rtl/clocking/mig_7series_v4_0_clk_ibuf.v" \
  "../../../bd/system/ip/system_mig_7series_0_0/system_mig_7series_0_0/user_design/rtl/clocking/mig_7series_v4_0_infrastructure.v" \
  "../../../bd/system/ip/system_mig_7series_0_0/system_mig_7series_0_0/user_design/rtl/clocking/mig_7series_v4_0_iodelay_ctrl.v" \
  "../../../bd/system/ip/system_mig_7series_0_0/system_mig_7series_0_0/user_design/rtl/clocking/mig_7series_v4_0_tempmon.v" \
  "../../../bd/system/ip/system_mig_7series_0_0/system_mig_7series_0_0/user_design/rtl/controller/mig_7series_v4_0_arb_mux.v" \
  "../../../bd/system/ip/system_mig_7series_0_0/system_mig_7series_0_0/user_design/rtl/controller/mig_7series_v4_0_arb_row_col.v" \
  "../../../bd/system/ip/system_mig_7series_0_0/system_mig_7series_0_0/user_design/rtl/controller/mig_7series_v4_0_arb_select.v" \
  "../../../bd/system/ip/system_mig_7series_0_0/system_mig_7series_0_0/user_design/rtl/controller/mig_7series_v4_0_bank_cntrl.v" \
  "../../../bd/system/ip/system_mig_7series_0_0/system_mig_7series_0_0/user_design/rtl/controller/mig_7series_v4_0_bank_common.v" \
  "../../../bd/system/ip/system_mig_7series_0_0/system_mig_7series_0_0/user_design/rtl/controller/mig_7series_v4_0_bank_compare.v" \
  "../../../bd/system/ip/system_mig_7series_0_0/system_mig_7series_0_0/user_design/rtl/controller/mig_7series_v4_0_bank_mach.v" \
  "../../../bd/system/ip/system_mig_7series_0_0/system_mig_7series_0_0/user_design/rtl/controller/mig_7series_v4_0_bank_queue.v" \
  "../../../bd/system/ip/system_mig_7series_0_0/system_mig_7series_0_0/user_design/rtl/controller/mig_7series_v4_0_bank_state.v" \
  "../../../bd/system/ip/system_mig_7series_0_0/system_mig_7series_0_0/user_design/rtl/controller/mig_7series_v4_0_col_mach.v" \
  "../../../bd/system/ip/system_mig_7series_0_0/system_mig_7series_0_0/user_design/rtl/controller/mig_7series_v4_0_mc.v" \
  "../../../bd/system/ip/system_mig_7series_0_0/system_mig_7series_0_0/user_design/rtl/controller/mig_7series_v4_0_rank_cntrl.v" \
  "../../../bd/system/ip/system_mig_7series_0_0/system_mig_7series_0_0/user_design/rtl/controller/mig_7series_v4_0_rank_common.v" \
  "../../../bd/system/ip/system_mig_7series_0_0/system_mig_7series_0_0/user_design/rtl/controller/mig_7series_v4_0_rank_mach.v" \
  "../../../bd/system/ip/system_mig_7series_0_0/system_mig_7series_0_0/user_design/rtl/controller/mig_7series_v4_0_round_robin_arb.v" \
  "../../../bd/system/ip/system_mig_7series_0_0/system_mig_7series_0_0/user_design/rtl/ecc/mig_7series_v4_0_ecc_buf.v" \
  "../../../bd/system/ip/system_mig_7series_0_0/system_mig_7series_0_0/user_design/rtl/ecc/mig_7series_v4_0_ecc_dec_fix.v" \
  "../../../bd/system/ip/system_mig_7series_0_0/system_mig_7series_0_0/user_design/rtl/ecc/mig_7series_v4_0_ecc_gen.v" \
  "../../../bd/system/ip/system_mig_7series_0_0/system_mig_7series_0_0/user_design/rtl/ecc/mig_7series_v4_0_ecc_merge_enc.v" \
  "../../../bd/system/ip/system_mig_7series_0_0/system_mig_7series_0_0/user_design/rtl/ecc/mig_7series_v4_0_fi_xor.v" \
  "../../../bd/system/ip/system_mig_7series_0_0/system_mig_7series_0_0/user_design/rtl/ip_top/mig_7series_v4_0_memc_ui_top_axi.v" \
  "../../../bd/system/ip/system_mig_7series_0_0/system_mig_7series_0_0/user_design/rtl/ip_top/mig_7series_v4_0_mem_intfc.v" \
  "../../../bd/system/ip/system_mig_7series_0_0/system_mig_7series_0_0/user_design/rtl/phy/mig_7series_v4_0_ddr_byte_group_io.v" \
  "../../../bd/system/ip/system_mig_7series_0_0/system_mig_7series_0_0/user_design/rtl/phy/mig_7series_v4_0_ddr_byte_lane.v" \
  "../../../bd/system/ip/system_mig_7series_0_0/system_mig_7series_0_0/user_design/rtl/phy/mig_7series_v4_0_ddr_calib_top.v" \
  "../../../bd/system/ip/system_mig_7series_0_0/system_mig_7series_0_0/user_design/rtl/phy/mig_7series_v4_0_ddr_if_post_fifo.v" \
  "../../../bd/system/ip/system_mig_7series_0_0/system_mig_7series_0_0/user_design/rtl/phy/mig_7series_v4_0_ddr_mc_phy.v" \
  "../../../bd/system/ip/system_mig_7series_0_0/system_mig_7series_0_0/user_design/rtl/phy/mig_7series_v4_0_ddr_mc_phy_wrapper.v" \
  "../../../bd/system/ip/system_mig_7series_0_0/system_mig_7series_0_0/user_design/rtl/phy/mig_7series_v4_0_ddr_of_pre_fifo.v" \
  "../../../bd/system/ip/system_mig_7series_0_0/system_mig_7series_0_0/user_design/rtl/phy/mig_7series_v4_0_ddr_phy_4lanes.v" \
  "../../../bd/system/ip/system_mig_7series_0_0/system_mig_7series_0_0/user_design/rtl/phy/mig_7series_v4_0_ddr_phy_ck_addr_cmd_delay.v" \
  "../../../bd/system/ip/system_mig_7series_0_0/system_mig_7series_0_0/user_design/rtl/phy/mig_7series_v4_0_ddr_phy_dqs_found_cal.v" \
  "../../../bd/system/ip/system_mig_7series_0_0/system_mig_7series_0_0/user_design/rtl/phy/mig_7series_v4_0_ddr_phy_dqs_found_cal_hr.v" \
  "../../../bd/system/ip/system_mig_7series_0_0/system_mig_7series_0_0/user_design/rtl/phy/mig_7series_v4_0_ddr_phy_init.v" \
  "../../../bd/system/ip/system_mig_7series_0_0/system_mig_7series_0_0/user_design/rtl/phy/mig_7series_v4_0_ddr_phy_ocd_cntlr.v" \
  "../../../bd/system/ip/system_mig_7series_0_0/system_mig_7series_0_0/user_design/rtl/phy/mig_7series_v4_0_ddr_phy_ocd_data.v" \
  "../../../bd/system/ip/system_mig_7series_0_0/system_mig_7series_0_0/user_design/rtl/phy/mig_7series_v4_0_ddr_phy_ocd_edge.v" \
  "../../../bd/system/ip/system_mig_7series_0_0/system_mig_7series_0_0/user_design/rtl/phy/mig_7series_v4_0_ddr_phy_ocd_lim.v" \
  "../../../bd/system/ip/system_mig_7series_0_0/system_mig_7series_0_0/user_design/rtl/phy/mig_7series_v4_0_ddr_phy_ocd_mux.v" \
  "../../../bd/system/ip/system_mig_7series_0_0/system_mig_7series_0_0/user_design/rtl/phy/mig_7series_v4_0_ddr_phy_ocd_po_cntlr.v" \
  "../../../bd/system/ip/system_mig_7series_0_0/system_mig_7series_0_0/user_design/rtl/phy/mig_7series_v4_0_ddr_phy_ocd_samp.v" \
  "../../../bd/system/ip/system_mig_7series_0_0/system_mig_7series_0_0/user_design/rtl/phy/mig_7series_v4_0_ddr_phy_oclkdelay_cal.v" \
  "../../../bd/system/ip/system_mig_7series_0_0/system_mig_7series_0_0/user_design/rtl/phy/mig_7series_v4_0_ddr_phy_prbs_rdlvl.v" \
  "../../../bd/system/ip/system_mig_7series_0_0/system_mig_7series_0_0/user_design/rtl/phy/mig_7series_v4_0_ddr_phy_rdlvl.v" \
  "../../../bd/system/ip/system_mig_7series_0_0/system_mig_7series_0_0/user_design/rtl/phy/mig_7series_v4_0_ddr_phy_tempmon.v" \
  "../../../bd/system/ip/system_mig_7series_0_0/system_mig_7series_0_0/user_design/rtl/phy/mig_7series_v4_0_ddr_phy_top.v" \
  "../../../bd/system/ip/system_mig_7series_0_0/system_mig_7series_0_0/user_design/rtl/phy/mig_7series_v4_0_ddr_phy_wrcal.v" \
  "../../../bd/system/ip/system_mig_7series_0_0/system_mig_7series_0_0/user_design/rtl/phy/mig_7series_v4_0_ddr_phy_wrlvl.v" \
  "../../../bd/system/ip/system_mig_7series_0_0/system_mig_7series_0_0/user_design/rtl/phy/mig_7series_v4_0_ddr_phy_wrlvl_off_delay.v" \
  "../../../bd/system/ip/system_mig_7series_0_0/system_mig_7series_0_0/user_design/rtl/phy/mig_7series_v4_0_ddr_prbs_gen.v" \
  "../../../bd/system/ip/system_mig_7series_0_0/system_mig_7series_0_0/user_design/rtl/phy/mig_7series_v4_0_ddr_skip_calib_tap.v" \
  "../../../bd/system/ip/system_mig_7series_0_0/system_mig_7series_0_0/user_design/rtl/phy/mig_7series_v4_0_poc_cc.v" \
  "../../../bd/system/ip/system_mig_7series_0_0/system_mig_7series_0_0/user_design/rtl/phy/mig_7series_v4_0_poc_edge_store.v" \
  "../../../bd/system/ip/system_mig_7series_0_0/system_mig_7series_0_0/user_design/rtl/phy/mig_7series_v4_0_poc_meta.v" \
  "../../../bd/system/ip/system_mig_7series_0_0/system_mig_7series_0_0/user_design/rtl/phy/mig_7series_v4_0_poc_pd.v" \
  "../../../bd/system/ip/system_mig_7series_0_0/system_mig_7series_0_0/user_design/rtl/phy/mig_7series_v4_0_poc_tap_base.v" \
  "../../../bd/system/ip/system_mig_7series_0_0/system_mig_7series_0_0/user_design/rtl/phy/mig_7series_v4_0_poc_top.v" \
  "../../../bd/system/ip/system_mig_7series_0_0/system_mig_7series_0_0/user_design/rtl/ui/mig_7series_v4_0_ui_cmd.v" \
  "../../../bd/system/ip/system_mig_7series_0_0/system_mig_7series_0_0/user_design/rtl/ui/mig_7series_v4_0_ui_rd_data.v" \
  "../../../bd/system/ip/system_mig_7series_0_0/system_mig_7series_0_0/user_design/rtl/ui/mig_7series_v4_0_ui_top.v" \
  "../../../bd/system/ip/system_mig_7series_0_0/system_mig_7series_0_0/user_design/rtl/ui/mig_7series_v4_0_ui_wr_data.v" \
  "../../../bd/system/ip/system_mig_7series_0_0/system_mig_7series_0_0/user_design/rtl/system_mig_7series_0_0_mig_sim.v" \
  "../../../bd/system/ip/system_mig_7series_0_0/system_mig_7series_0_0/user_design/rtl/system_mig_7series_0_0.v" \
-endlib
-makelib ies/lmb_v10_v3_0_9 \
  "../../../../vc707_bist.srcs/sources_1/bd/system/ipshared/162e/hdl/lmb_v10_v3_0_vh_rfs.vhd" \
-endlib
-makelib ies/xil_defaultlib \
  "../../../bd/system/ip/system_dlmb_v10_0/sim/system_dlmb_v10_0.vhd" \
  "../../../bd/system/ip/system_ilmb_v10_0/sim/system_ilmb_v10_0.vhd" \
-endlib
-makelib ies/lmb_bram_if_cntlr_v4_0_10 \
  "../../../../vc707_bist.srcs/sources_1/bd/system/ipshared/f4d9/hdl/lmb_bram_if_cntlr_v4_0_vh_rfs.vhd" \
-endlib
-makelib ies/xil_defaultlib \
  "../../../bd/system/ip/system_dlmb_bram_if_cntlr_0/sim/system_dlmb_bram_if_cntlr_0.vhd" \
  "../../../bd/system/ip/system_ilmb_bram_if_cntlr_0/sim/system_ilmb_bram_if_cntlr_0.vhd" \
-endlib
-makelib ies/xil_defaultlib \
  "../../../bd/system/ip/system_lmb_bram_0/sim/system_lmb_bram_0.v" \
-endlib
-makelib ies/axi_intc_v4_1_9 \
  "../../../../vc707_bist.srcs/sources_1/bd/system/ipshared/a811/hdl/axi_intc_v4_1_vh_rfs.vhd" \
-endlib
-makelib ies/xil_defaultlib \
  "../../../bd/system/ip/system_microblaze_0_axi_intc_0/sim/system_microblaze_0_axi_intc_0.vhd" \
  "../../../bd/system/ipshared/2e37/xlconcat.vhd" \
  "../../../bd/system/ip/system_microblaze_0_xlconcat_0/sim/system_microblaze_0_xlconcat_0.vhd" \
-endlib
-makelib ies/mdm_v3_2_8 \
  "../../../../vc707_bist.srcs/sources_1/bd/system/ipshared/71de/hdl/mdm_v3_2_vh_rfs.vhd" \
-endlib
-makelib ies/xil_defaultlib \
  "../../../bd/system/ip/system_mdm_1_0/sim/system_mdm_1_0.vhd" \
-endlib
-makelib ies/proc_sys_reset_v5_0_10 \
  "../../../../vc707_bist.srcs/sources_1/bd/system/ipshared/04b4/hdl/proc_sys_reset_v5_0_vh_rfs.vhd" \
-endlib
-makelib ies/xil_defaultlib \
  "../../../bd/system/ip/system_rst_mig_7series_0_100M_0/sim/system_rst_mig_7series_0_100M_0.vhd" \
-endlib
-makelib ies/xil_defaultlib \
  "../../../bd/system/ip/system_axi_bram_ctrl_0_bram_0/sim/system_axi_bram_ctrl_0_bram_0.v" \
-endlib
-makelib ies/fifo_generator_v13_1_3 \
  "../../../../vc707_bist.srcs/sources_1/bd/system/ipshared/564d/simulation/fifo_generator_vlog_beh.v" \
-endlib
-makelib ies/fifo_generator_v13_1_3 \
  "../../../../vc707_bist.srcs/sources_1/bd/system/ipshared/564d/hdl/fifo_generator_v13_1_rfs.vhd" \
-endlib
-makelib ies/fifo_generator_v13_1_3 \
  "../../../../vc707_bist.srcs/sources_1/bd/system/ipshared/564d/hdl/fifo_generator_v13_1_rfs.v" \
-endlib
-makelib ies/lib_fifo_v1_0_7 \
  "../../../../vc707_bist.srcs/sources_1/bd/system/ipshared/5ab6/hdl/lib_fifo_v1_0_rfs.vhd" \
-endlib
-makelib ies/axi_datamover_v5_1_13 \
  "../../../../vc707_bist.srcs/sources_1/bd/system/ipshared/bf41/hdl/axi_datamover_v5_1_vh_rfs.vhd" \
-endlib
-makelib ies/axi_sg_v4_1_5 \
  "../../../../vc707_bist.srcs/sources_1/bd/system/ipshared/11c7/hdl/axi_sg_v4_1_rfs.vhd" \
-endlib
-makelib ies/axi_dma_v7_1_12 \
  "../../../../vc707_bist.srcs/sources_1/bd/system/ipshared/46c7/hdl/axi_dma_v7_1_vh_rfs.vhd" \
-endlib
-makelib ies/xil_defaultlib \
  "../../../bd/system/ip/system_axi_ethernet_0_dma_0/sim/system_axi_ethernet_0_dma_0.vhd" \
-endlib
-makelib ies/xil_defaultlib \
  "../../../bd/system/ip/system_axi_ethernet_0_refclk_0/system_axi_ethernet_0_refclk_0_clk_wiz.v" \
  "../../../bd/system/ip/system_axi_ethernet_0_refclk_0/system_axi_ethernet_0_refclk_0.v" \
-endlib
-makelib ies/xil_defaultlib \
  "../../../bd/system/ip/system_rst_mig_7series_0_200M_0/sim/system_rst_mig_7series_0_200M_0.vhd" \
-endlib
-makelib ies/generic_baseblocks_v2_1_0 \
  "../../../../vc707_bist.srcs/sources_1/bd/system/ipshared/7ee0/hdl/generic_baseblocks_v2_1_vl_rfs.v" \
-endlib
-makelib ies/axi_infrastructure_v1_1_0 \
  "../../../../vc707_bist.srcs/sources_1/bd/system/ipshared/7e3a/hdl/axi_infrastructure_v1_1_vl_rfs.v" \
-endlib
-makelib ies/axi_register_slice_v2_1_11 \
  "../../../../vc707_bist.srcs/sources_1/bd/system/ipshared/0b6b/hdl/axi_register_slice_v2_1_vl_rfs.v" \
-endlib
-makelib ies/axi_data_fifo_v2_1_10 \
  "../../../../vc707_bist.srcs/sources_1/bd/system/ipshared/39ba/hdl/axi_data_fifo_v2_1_vl_rfs.v" \
-endlib
-makelib ies/axi_crossbar_v2_1_12 \
  "../../../../vc707_bist.srcs/sources_1/bd/system/ipshared/896d/hdl/axi_crossbar_v2_1_vl_rfs.v" \
-endlib
-makelib ies/xil_defaultlib \
  "../../../bd/system/ip/system_xbar_1/sim/system_xbar_1.v" \
  "../../../bd/system/ip/system_xbar_0/sim/system_xbar_0.v" \
-endlib
-makelib ies/xil_defaultlib \
  "../../../bd/system/ip/system_bram_test_0_0/sim/system_bram_test_0_0.vhd" \
-endlib
-makelib ies/axi_protocol_converter_v2_1_11 \
  "../../../../vc707_bist.srcs/sources_1/bd/system/ipshared/df1b/hdl/axi_protocol_converter_v2_1_vl_rfs.v" \
-endlib
-makelib ies/axi_clock_converter_v2_1_10 \
  "../../../../vc707_bist.srcs/sources_1/bd/system/ipshared/8479/hdl/axi_clock_converter_v2_1_vl_rfs.v" \
-endlib
-makelib ies/axi_dwidth_converter_v2_1_11 \
  "../../../../vc707_bist.srcs/sources_1/bd/system/ipshared/a4c8/hdl/axi_dwidth_converter_v2_1_vl_rfs.v" \
-endlib
-makelib ies/xil_defaultlib \
  "../../../bd/system/ip/system_auto_ds_0/sim/system_auto_ds_0.v" \
  "../../../bd/system/ip/system_auto_cc_0/sim/system_auto_cc_0.v" \
  "../../../bd/system/ip/system_auto_ds_1/sim/system_auto_ds_1.v" \
  "../../../bd/system/ip/system_auto_us_0/sim/system_auto_us_0.v" \
  "../../../bd/system/ip/system_auto_us_1/sim/system_auto_us_1.v" \
  "../../../bd/system/ip/system_auto_us_2/sim/system_auto_us_2.v" \
  "../../../bd/system/ip/system_auto_us_3/sim/system_auto_us_3.v" \
  "../../../bd/system/ip/system_auto_us_4/sim/system_auto_us_4.v" \
  "../../../bd/system/ip/system_auto_pc_0/sim/system_auto_pc_0.v" \
-endlib
-makelib ies/xil_defaultlib \
  "../../../bd/system/hdl/system.vhd" \
-endlib
-makelib ies/xil_defaultlib \
  glbl.v
-endlib


text:
locate instance a at "a.fpp"
locate type Phase at "Phase.fpp"

init a phase Phase.CONSTRUCTION \
"""
"""

ext: fpp

max_stars_repo_name: rohandkn/fpp

max_issues_repo_name: rohandkn/fpp

max_forks_repo_name: rohandkn/fpp


text:
!
!     CalculiX - A 3-dimensional finite element program
!              Copyright (C) 1998-2015 Guido Dhondt
!
!     This program is free software; you can redistribute it and/or
!     modify it under the terms of the GNU General Public License as
!     published by the Free Software Foundation(version 2);
!
!
!     This program is distributed in the hope that it will be useful,
!     but WITHOUT ANY WARRANTY; without even the implied warranty of
!     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
!     GNU General Public License for more details.
!
!     You should have received a copy of the GNU General Public License
!     along with this program; if not, write to the Free Software
!     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
!
      subroutine includefilename(text,includefn,lincludefn)
!
!     determines the name of an include file
!
      implicit none
!
      character*132 includefn
      character*1320 text
!
      integer nstart,nend,ii,jj,kk,lincludefn
!
      nstart=0
      nend=0
!
      loop: do ii=1,lincludefn
        if(text(ii:ii).eq.'=') then
           jj=ii+1
           if(text(jj:jj).eq.'"') then
              nstart=jj+1
              do kk=jj+1,lincludefn
                 if(text(kk:kk).eq.'"') then
                    nend=kk-1
                    exit loop
                 endif
              enddo
              write(*,*)'*ERROR in includefilename: ',
     &             'finishing quotes are lacking'
              write(*,*) '*ERROR in the input deck. Card image:'
              write(*,'(132a1)')
     &             (text(kk:kk),kk=1,lincludefn)
              call exit(201)
           else
              nstart=jj
              nend=lincludefn
              exit
           endif
        endif
      enddo loop
      if(ii.eq.lincludefn+1) then
         write(*,*) '*ERROR in includefilename: syntax error'
         write(*,*) '*ERROR in the input deck. Card image:'
         write(*,'(132a1)')
     &             (text(kk:kk),kk=1,lincludefn)
         call exit(201)
      endif
!
      if(nend.ge.nstart) then
         if(nend-nstart+1.le.132) then
            includefn(1:nend-nstart+1)=text(nstart:nend)
            lincludefn=nend-nstart+1
         else
            write(*,*) '*ERROR in includefilename: file name too long'
            write(*,*) '*ERROR in the input deck. Card image:'
            write(*,'(132a1)')
     &             (text(kk:kk),kk=1,lincludefn)
            call exit(201)
         endif
      else
         write(*,*) '*ERROR in includefilename: file name is lacking'
         write(*,*) '*ERROR in the input deck. Card image:'
         write(*,'(132a1)')
     &             (text(kk:kk),kk=1,lincludefn)
         call exit(201)
      endif
!
      return
      end

max_stars_repo_name: alleindrach/calculix-desktop

max_issues_repo_name: alleindrach/calculix-desktop

max_forks_repo_name: alleindrach/calculix-desktop


text:
Gulraj Gul Gill  is a candidate for ASUCD ASUCD Senate Senate in the Winter 2014 ASUCD Election running as an independent.

 Candidate Statement

Hi Aggies!

My name is Gulraj ‘GUL’ Singh Gill, and I am running independently to be your ASUCD Senator. I am a third year Neurobiology, Physiology, and Behavior (NPB) major who wants to be a doctor and provide accessible healthcare in developing countries after I graduate from UC Davis.. I got the opportunity to come to Davis four years ago from India, and I have been a proud Aggie since then. My concept of education doesn’t stop at the academic level, I believe it is also about being prepared for the realities and challenges beyond the classroom. Therefore I plan on providing the students of UC Davis a better and informative experience through ASUCD.

I have been involved in ASUCD for the past two years as both a bus driver for Unitrans and a legislative aide for Lobby Corps. I also volunteer with the American Red Cross in the Davis community and at the UC Davis Medical Center emergency room. My experience within ASUCD and outside of it through various clubs and student groups will allow me to represent students who have not felt represented well by ASUCD in the past.

Platforms:

1. Increasing the amount of testing vending machines.

Studying is time intensive and students shouldn’t have to waste their precious last minutes before midterms and finals to scramble around for blue books, pens, pencils, scantrons.
The existing vending machines and bookstore on our large campus are not enough. I plan on working with the bookstore to get more testing vending machines near study spots such as the Student Community Center, the ARC, and the MU.

2. Preparing UC Davis students for life after college.

The universities main priority should be preparation for life after college. That means providing:
More internship and shadowing opportunities so students enter the workforce with experience.
Ensuring and educating student about financial independence and basic financial skills.
I plan on building a stronger connection between ASUCD and the Internship and Career Center(ICC) so that students have the opportunities on campus to be prepared for life after graduating from UC Davis.

3. Making professor’s office hours available when registering for classes

As the size of our classes increases, the professor’s office hours are often the only way the professor will remember you or help you to succeed in their class. Interaction with professors is not only informative but sometimes also necessary to get the edge one needs to succeed in class. Often students are unable to attend these office hours since they are released after students have fixed their schedule for the quarter. If elected, I will advocate for professor’s office hours to be released along with the class timings so students can adjust their schedules and succeed in their classes.

I believe that by being independent, I can listen and advocate for you and what you believe. If you want a transparent and accessible ASUCD Senator please remember to vote Gulraj “GUL” Gill #1 for ASUCD Senate on Feb. 1821 at elections.ucdavis.edu.

max_stars_repo_name: voflo/Search

max_issues_repo_name: voflo/Search

max_forks_repo_name: voflo/Search


text:
c--- File written by FORM program adecayW_v.frm on Thu Mar  1 12:30:14 CST 2012
      subroutine adecayW_v(p,pqq,pqb,pc,m)
      implicit none
************************************************************************
*     Author: R.K. Ellis, January 2012                                 *
*     Virtual corrections to                                           *
*     antitop decay  a --> qq(pqq)+qb(pqb)+bbar(pc)                    *
*     with bottom and top masses (and no radiation)                    *
*     in massless spinor notation                                      *
*     pqq,pqb,pc are integers that point to                            *
*     the appropriate four-momenta in p                                *
*     pqq=electron                                                     *
*     pqb=antineutrino                                                 *
*     pc=anti-bottom quark                                             *
*     q(c) is rendered massless wrt to pqb                             *
*     q(a) is rendered massless wrt to pqq                             *
*     returned m(apol,cpol)                                            *
************************************************************************
      include 'constants.f'
      include 'zprods_decl.f'
      include 'sprods_com.f'
      include 'masses.f'
      double precision p(mxpart,4),q(mxpart,4),dot,sw,ala,alc,c0,ct
      double complex m(2,2),cprop,c0L
      integer qb,a,c,qq,si,pc,pqq,pqb
      parameter(a=1,qq=3,qb=4,c=2)
      do si=1,4
      q(a,si)=p(pqq,si)+p(pqb,si)+p(pc,si)
      q(qq,si)=p(pqq,si)
      q(qb,si)=p(pqb,si)
      q(c,si)=p(pc,si)
      enddo
      ala=mt**2/(2d0*dot(q,a,qq))
      alc=mb**2/(2d0*dot(q,c,qb))
      do si=1,4
      q(a,si)=q(a,si)-ala*q(qq,si)
      q(c,si)=q(c,si)-alc*q(qb,si)
      enddo
      call spinoru(4,q,za,zb)
      sw=s(qq,qb)
      call coefswdk(sw,ct,c0)
      c0L=dcmplx(c0+ct)
      cprop=dcmplx(sw-wmass**2,wmass*wwidth)
C---order of polarizations is m(apol,cpol)
      m(1,1)= czip

      m(1,2)= czip

      m(2,1)= czip

      m(2,2)= + cprop**(-1) * ( za(qq,a)*zb(qb,c)*c0L )

      return
      end

max_stars_repo_name: tmartini/JHUGen

max_issues_repo_name: tmartini/JHUGen

max_forks_repo_name: tmartini/JHUGen


text:
This editor can edit this entry and tell us a bit about themselves by clicking the Edit icon.

Hi, welcome to the wiki, and thanks very much for fixing the hours and other information on Corcoran Lane Pastures. I saw you also corrected the information about the ownership, and then you removed it. The ownership as you stated (you and your wife) is also a matter of public record at the http://www.yolorecorder.org/recording/fictitious/lookup/index_html?uid16260731 county recorder, and would still be visible in the edit history of the wiki page if it was currently removed. I understand you might not want the information published here, even if its available elsewhere, but generally it is preferred to have more information available on the wiki. Do you have a particular reason for removing it besides having less information about the business here? If that is the reason, most people will put the information back. Thanks! Users/NickSchmalenberger


text:
I am the original O.W.

Ive been watching star trek for a gazillion years!

20090826 23:30:31 nbsp And for how long have you been trolling? Users/JoePomidor

20090827 20:14:07 nbsp Welcome to the Wiki. Have you read wiki:wikipedia:The Brief Wondrous Life of Oscar Wao? The wiki community strives to value the contributions of everyone, but isnt beyond just removing every edit made by a troll. Users/JasonAller

20090827 23:03:51 nbsp please dont litter my page with your garbage. Users/OscarWao

20090830 11:28:30 nbsp Which Trek? Users/JabberWokky Evan JabberWokky Edwards


text:
      SUBROUTINE DAXPY(N,DA,DX,INCX,DY,INCY)

C     CONSTANT TIMES A VECTOR PLUS A VECTOR.
C     USES UNROLLED LOOPS FOR INCREMENTS EQUAL TO ONE.
C     JACK DONGARRA, LINPACK, 3/11/78.

      DOUBLE PRECISION DX(*),DY(*),DA
      INTEGER I,INCX,INCY,IX,IY,M,MP1,N

      IF(N.LE.0)RETURN
      IF(DA.EQ.0.0D0)RETURN
      IF(INCX.EQ.1.AND.INCY.EQ.1)GO TO 20

C        CODE FOR UNEQUAL INCREMENTS OR EQUAL INCREMENTS
C        NOT EQUAL TO 1

      IX = 1
      IY = 1
      IF(INCX.LT.0)IX = (-N+1)*INCX + 1
      IF(INCY.LT.0)IY = (-N+1)*INCY + 1
      DO 10 I = 1,N
        DY(IY) = DY(IY) + DA*DX(IX)
        IX = IX + INCX
        IY = IY + INCY
   10 CONTINUE
      RETURN

C        CODE FOR BOTH INCREMENTS EQUAL TO 1

C        CLEAN-UP LOOP

   20 M = MOD(N,4)
      IF( M .EQ. 0 ) GO TO 40
      DO 30 I = 1,M
        DY(I) = DY(I) + DA*DX(I)
   30 CONTINUE
      IF( N .LT. 4 ) RETURN
   40 MP1 = M + 1
      DO 50 I = MP1,N,4
        DY(I) = DY(I) + DA*DX(I)
        DY(I + 1) = DY(I + 1) + DA*DX(I + 1)
        DY(I + 2) = DY(I + 2) + DA*DX(I + 2)
        DY(I + 3) = DY(I + 3) + DA*DX(I + 3)
   50 CONTINUE
      RETURN
      END

max_stars_repo_name: robfalck/pyoptsparse

max_issues_repo_name: jcchin/OpenMDAO-Framework

max_forks_repo_name: jcchin/OpenMDAO-Framework


!!  Module of FFT based routines using fftpack
!
! This file is part of LIBPFASST.
!
!>  Module for using fftpack.  This is the default fft package when fftw is not used as
!!  indicated by setting the USE_FFTW=FALSE in Makefile.defauls
module pf_mod_fftpackage
  use pf_mod_dtype
  use pf_mod_utils
  use pf_mod_fft_abs
  implicit none

  !>  Variables and storage for FFT
  type, extends(pf_fft_abs_t)  :: pf_fft_t
     integer ::   lensavx, lensavy, lensavz        !! workspace lengths
     real(pfdp) :: normfact                        !! normalization factor
     real(pfdp), allocatable :: wsavex(:)          ! work space
     real(pfdp), allocatable :: wsavey(:)          ! work space
     real(pfdp), allocatable :: wsavez(:)          ! work space
     complex(pfdp), pointer :: workhatx(:)         ! work space
     complex(pfdp), pointer :: workhaty(:)         ! work space
     complex(pfdp), pointer :: workhatz(:)         ! work space
   contains
     procedure :: fft_setup
     procedure :: fft_destroy
     procedure :: fftf  !  Forward FFT
     procedure :: fftb   !  Inverse (backward)  FFT
     !  Interpolate in spectral space
     procedure , private :: interp_1d,interp_2d, interp_3d,zinterp_1d,zinterp_2d, zinterp_3d
     generic   :: interp =>interp_1d,interp_2d,interp_3d,zinterp_1d,zinterp_2d,zinterp_3d
  end type pf_fft_t

contains
  !>  Allocate and initialize FFT structure
  subroutine fft_setup(this, grid_shape, ndim, grid_size)
    class(pf_fft_t), intent(inout) :: this
    integer,              intent(in   ) :: ndim
    integer,              intent(in   ) :: grid_shape(ndim)
    real(pfdp), optional, intent(in   ) :: grid_size(ndim)

    integer     :: nx,ny,nz
    integer     :: i,j,k
    integer     :: ierr
    real(pfdp)  :: om
    this%ndim=ndim

    !  FFT Storage parameters
    nx=grid_SHAPE(1)
    this%nx = nx
    this%lensavx = 4*nx + 15
    this%normfact=REAL(nx,pfdp)

    allocate(this%workhatx(nx),stat=ierr)   !  complex transform
    if (ierr /=0) call pf_stop(__FILE__,__LINE__,'allocate fail, error=',ierr)
    allocate(this%wsavex(this%lensavx),stat=ierr)
    if (ierr /=0) call pf_stop(__FILE__,__LINE__,'allocate fail, error=',ierr)
    this%Lx = 1.0_pfdp
    if(present(grid_size)) this%Lx = grid_size(1)
    !  Initialize FFT
    call ZFFTI( nx, this%wsavex )

    if (ndim > 1) then
       !  FFT Storage
       ny=grid_SHAPE(2)
       this%ny = ny
       this%lensavy = 4*ny + 15
       this%normfact=REAL(nx*ny,pfdp)
       allocate(this%workhaty(ny),stat=ierr)   !  complex transform
       if (ierr /=0) call pf_stop(__FILE__,__LINE__,'allocate fail, error=',ierr)
       allocate(this%wsavey(this%lensavy),stat=ierr)
       if (ierr /=0) call pf_stop(__FILE__,__LINE__,'allocate fail, error=',ierr)
       this%Ly = 1.0_pfdp
       if(present(grid_size)) this%Ly = grid_size(2)
       !  Initialize FFT
       call ZFFTI( ny, this%wsavey)

       if (ndim > 2) then
          !  FFT Storage
          nz=grid_SHAPE(3)
          this%nz = nz
          this%lensavz = 4*nz + 15
          this%normfact=REAL(nx*ny*nz,pfdp)
          allocate(this%workhatz(nz),stat=ierr)   !  complex transform
          if (ierr /=0) call pf_stop(__FILE__,__LINE__,'allocate fail, error=',ierr)
          allocate(this%wsavez(this%lensavz),stat=ierr)
          if (ierr /=0) call pf_stop(__FILE__,__LINE__,'allocate fail, error=',ierr)
          this%Lz = 1.0_pfdp
          if(present(grid_size)) this%Lz = grid_size(3)
          !  Initialize FFT
          call ZFFTI( nz, this%wsavez)
       endif
    endif
    select case (this%ndim)
    case (1)
       allocate(this%wk_1d(nx),stat=ierr)
       if (ierr /=0) call pf_stop(__FILE__,__LINE__,'allocate fail, error=',ierr)
    case (2)
       allocate(this%wk_2d(nx,ny),stat=ierr)
       if (ierr /=0) call pf_stop(__FILE__,__LINE__,'allocate fail, error=',ierr)
    case (3)
       allocate(this%wk_3d(nx,ny,nz),stat=ierr)
       if (ierr /=0) call pf_stop(__FILE__,__LINE__,'allocate fail, error=',ierr)
    case DEFAULT
       call pf_stop(__FILE__,__LINE__,'Bad case in SELECT',this%ndim)
    end select

    !  Assign wave numbers
    allocate(this%kx(nx),stat=ierr)
    if (ierr /=0) call pf_stop(__FILE__,__LINE__,'allocate fail, error=',ierr)
    om=two_pi/this%Lx
    do i = 1, nx
       if (i <= nx/2+1) then
          this%kx(i) = om*REAL(i-1,pfdp)
       else
          this%kx(i) = om*REAL(-nx + i - 1,pfdp)
       end if
    end do

    if (ndim > 1) then
       allocate(this%ky(ny),stat=ierr)
       if (ierr /=0) call pf_stop(__FILE__,__LINE__,'allocate fail, error=',ierr)
       om=two_pi/this%Ly
       do j = 1, ny
          if (j <= ny/2+1) then
             this%ky(j) = om*REAL(j-1,pfdp)
          else
             this%ky(j) = om*REAL(-ny + j - 1,pfdp)
          end if
       end do
    end if

    if (ndim > 2) then
       allocate(this%kz(nz),stat=ierr)
       if (ierr /=0) call pf_stop(__FILE__,__LINE__,'allocate fail, error=',ierr)
       om=two_pi / this%Lz
       do k = 1,nz
          if (k <= nz/2+1) then
             this%kz(k) = om*REAL(k-1,pfdp)
          else
             this%kz(k) = om*REAL(-nz + k - 1,pfdp)
          end if
       end do
    end if

  end subroutine fft_setup

  !>  Deallocate and destroy fft structures
  subroutine fft_destroy(this)
    class(pf_fft_t), intent(inout) :: this
    deallocate(this%workhatx)
    deallocate(this%wsavex)
    deallocate(this%kx)
    if (this%ndim > 1) then
       deallocate(this%workhaty)
       deallocate(this%wsavey)
       deallocate(this%ky)
       if (this%ndim > 2) then
          deallocate(this%workhatz)
          deallocate(this%wsavez)
          deallocate(this%kz)
       end if
    end if
    select case (this%ndim)
    case (1)
       deallocate(this%wk_1d)
    case (2)
       deallocate(this%wk_2d)
    case (3)
       deallocate(this%wk_3d)
    case DEFAULT
       call pf_stop(__FILE__,__LINE__,'Bad case in SELECT',this%ndim)
    end select

    !  Deallocate wave number arrays

  end subroutine fft_destroy

  !>  Forward fft call
  subroutine fftf(this)
    class(pf_fft_t), intent(inout) :: this

    integer i,j,k

    select case (this%ndim)
    case (1)
       call zfftf(this%nx, this%wk_1d, this%wsavex )
       this%wk_1d=this%wk_1d/this%normfact
    case (2)
       do j = 1,this%ny
          this%workhatx =this%wk_2d(:,j)
          call zfftf(this%nx, this%workhatx, this%wsavex )
          this%wk_2d(:,j)=this%workhatx
       end do
       do i = 1,this%nx
          this%workhaty =this%wk_2d(i,:)
          call zfftf(this%ny, this%workhaty, this%wsavey )
          this%wk_2d(i,:)=this%workhaty
       end do
       this%wk_2d=this%wk_2d/this%normfact
    case (3)
       do k = 1,this%nz
          do j = 1,this%ny
             this%workhatx =this%wk_3d(:,j,k)
             call zfftf(this%nx, this%workhatx, this%wsavex )
             this%wk_3d(:,j,k)=this%workhatx
          end do
       end do
       do k = 1,this%nz
          do i = 1,this%nx
             this%workhaty =this%wk_3d(i,:,k)
             call zfftf(this%ny, this%workhaty, this%wsavey )
             this%wk_3d(i,:,k)=this%workhaty
          end do
       end do
       do j = 1,this%ny
          do i = 1,this%nx
             this%workhatz =this%wk_3d(i,j,:)
             call zfftf(this%nz, this%workhatz, this%wsavez)
             this%wk_3d(i,j,:)=this%workhatz
          end do
       end do
       this%wk_3d=this%wk_3d/this%normfact

    case DEFAULT
       call pf_stop(__FILE__,__LINE__,'Bad case in SELECT',this%ndim)
    end select
  end subroutine fftf

  !  Backward FFT
  subroutine fftb(this)
    class(pf_fft_t), intent(inout) :: this

    integer i,j,k

    select case (this%ndim)
    case (1)
       this%wk_1d=this%wk_1d
       call zfftb(this%nx, this%wk_1d, this%wsavex )
    case (2)
       this%wk_2d=this%wk_2d
       do j = 1,this%ny
          this%workhatx =this%wk_2d(:,j)
          call zfftb(this%nx, this%workhatx, this%wsavex )
          this%wk_2d(:,j)=this%workhatx
       end do
       do i = 1,this%nx
          this%workhaty =this%wk_2d(i,:)
          call zfftb(this%ny, this%workhaty, this%wsavey )
          this%wk_2d(i,:)=this%workhaty
       end do
    case (3)
       this%wk_3d=this%wk_3d
       do k = 1,this%nz
          do j = 1,this%ny
             this%workhatx =this%wk_3d(:,j,k)
             call zfftb(this%nx, this%workhatx, this%wsavex )
             this%wk_3d(:,j,k)=this%workhatx
          end do
       end do
       do k = 1,this%nz
          do i = 1,this%nx
             this%workhaty =this%wk_3d(i,:,k)
             call zfftb(this%ny, this%workhaty, this%wsavey )
             this%wk_3d(i,:,k)=this%workhaty
          end do
       end do
       do j = 1,this%ny
          do i = 1,this%nx
             this%workhatz =this%wk_3d(i,j,:)
             call zfftb(this%nz, this%workhatz, this%wsavez)
             this%wk_3d(i,j,:)=this%workhatz
          end do
       end do
    case DEFAULT
       call pf_stop(__FILE__,__LINE__,'Bad case in SELECT',this%ndim)
    end select
  end subroutine fftb

  subroutine interp_1d(this, yvec_c, fft_f,yvec_f,order)
    class(pf_fft_t), intent(inout) :: this
    real(pfdp), intent(inout), pointer :: yvec_f(:)
    real(pfdp), intent(in),    pointer :: yvec_c(:)
    type(pf_fft_t),intent(in), pointer :: fft_f
    integer, intent(in),optional :: order

    complex(pfdp),         pointer :: wk_f(:), wk_c(:)
    integer :: nx_f, nx_c,local_order
    real(pfdp) :: c1,c2,c3
    local_order=0
    if (present(order)) local_order = order

    nx_f = SIZE(yvec_f)
    nx_c = SIZE(yvec_c)
    if (nx_f .eq. nx_c) then
       yvec_f=yvec_c
       return
    end if

   select case (local_order)
   case (0)
      call this%get_wk_ptr(wk_c)
      call fft_f%get_wk_ptr(wk_f)

      wk_c=yvec_c

      call this%fftf()      !  internal forward fft call
      call this%zinterp_1d(wk_c, wk_f)
      call fft_f%fftb()     !  internal inverse fft call

      yvec_f=REAL(wk_f,pfdp) !  grab the real part
   case (2)  !  This is for 2nd order Finite Difference in periodic domains
      yvec_f(1:nx_f-1:2)=yvec_c
      yvec_f(2:nx_f-2:2)=(yvec_c(1:nx_c-1)+yvec_c(2:nx_c))*0.5_pfdp
      yvec_f(nx_f)=(yvec_f(1) + yvec_f(nx_f-1))*0.5_pfdp
   case (4)
      if (nx_c .lt. 4) call pf_stop(__FILE__,__LINE__,'Coarse grid too small in interp_2d ',nx_c)
      c2=-1.0_pfdp/16.0_pfdp
      c1= 9.0_pfdp/16.0_pfdp
      yvec_f(1:nx_f-1:2)=yvec_c
      yvec_f(2:nx_f:2)=c2*(cshift(yvec_c,-1)+cshift(yvec_c,2))+c1*(yvec_c+cshift(yvec_c,1))
   case (6)
      if (nx_c .lt. 6) call pf_stop(__FILE__,__LINE__,'Coarse grid too small in interp_1d ',nx_c)
      c3=  3.0_pfdp/256.0_pfdp
      c2=-25.0_pfdp/256.0_pfdp
      c1= 75.0_pfdp/128.0_pfdp
      yvec_f(1:nx_f-1:2)=yvec_c
      yvec_f(2:nx_f:2)=c3*(cshift(yvec_c,-2)+cshift(yvec_c,3))+c2*(cshift(yvec_c,-1)+cshift(yvec_c,2))+c1*(yvec_c+cshift(yvec_c,1))
   case DEFAULT
      call pf_stop(__FILE__,__LINE__,'Bad case in SELECT',local_order)
   end select

  end subroutine interp_1d
  subroutine interp_2d(this, yvec_c, fft_f,yvec_f)
    class(pf_fft_t), intent(inout) :: this
    real(pfdp), intent(inout), pointer :: yvec_f(:,:)
    real(pfdp), intent(in),    pointer :: yvec_c(:,:)
    type(pf_fft_t),intent(in), pointer:: fft_f

    complex(pfdp),         pointer :: wk_f(:,:), wk_c(:,:)
    integer :: nx_f(2), nx_c(2)

    nx_f = SHAPE(yvec_f)
    nx_c = SHAPE(yvec_c)

    if (nx_f(1) .eq. nx_c(1) .and. nx_f(2) .eq. nx_c(2)) then
       yvec_f=yvec_c
       return
    end if

    call this%get_wk_ptr(wk_c)
    call fft_f%get_wk_ptr(wk_f)

    wk_c=yvec_c

    call this%fftf()       !  internal forward fft call
    call this%zinterp_2d(wk_c, wk_f)
    call fft_f%fftb()     !  internal inverse fft call

    yvec_f=REAL(wk_f,pfdp)  !  grab the real part

  end subroutine interp_2d
  subroutine interp_3d(this, yvec_c, fft_f,yvec_f)
    class(pf_fft_t), intent(inout) :: this
    real(pfdp), intent(inout),  pointer :: yvec_f(:,:,:)
    real(pfdp), intent(inout),  pointer :: yvec_c(:,:,:)
    type(pf_fft_t),intent(in),  pointer :: fft_f
    complex(pfdp),         pointer :: wk_f(:,:,:), wk_c(:,:,:)
    integer :: nx_f(3), nx_c(3)

    nx_f = SHAPE(yvec_f)
    nx_c = SHAPE(yvec_c)

    if (nx_f(1) .eq. nx_c(1) .and. nx_f(2) .eq. nx_c(2) .and. nx_f(3) .eq. nx_c(3)) then
       yvec_f=yvec_c
       return
    end if

    call this%get_wk_ptr(wk_c)
    call fft_f%get_wk_ptr(wk_f)

    wk_c=yvec_c

    call this%fftf()      !  internal forward fft call
    call this%zinterp_3d(wk_c, wk_f)
    call fft_f%fftb()     !  internal inverse fft call

    yvec_f=REAL(wk_f,pfdp)  !  grab the real part
  end subroutine interp_3d

  !>  Interpolate from coarse  level to fine in spectral space
  subroutine zinterp_1d(this, yhat_c, yhat_f)
    class(pf_fft_t), intent(inout) :: this
    complex(pfdp),   pointer,intent(inout) :: yhat_f(:)
    complex(pfdp),   pointer,intent(in) :: yhat_c(:)

    integer :: nx_f, nx_c

    nx_f = SIZE(yhat_f)
    nx_c = SIZE(yhat_c)
    if (nx_f .eq. nx_c) then
       yhat_f=yhat_c
       return
    end if
    yhat_f = 0.0_pfdp
    yhat_f(1:nx_c/2) = yhat_c(1:nx_c/2)
    yhat_f(nx_f-nx_c/2+2:nx_f) = yhat_c(nx_c/2+2:nx_c)
    yhat_f(nx_c/2+1) = yhat_c(nx_c/2+1)*0.5_pfdp
    yhat_f(nx_f-nx_c/2+1) = yhat_c(nx_c/2+1)*0.5_pfdp

  end subroutine zinterp_1d

  subroutine zinterp_2d(this, yhat_c, yhat_f)
    class(pf_fft_t), intent(inout) :: this
    complex(pfdp),   pointer,intent(inout) :: yhat_f(:,:)
    complex(pfdp),   pointer,intent(in) :: yhat_c(:,:)

    integer :: nf1,nf2,nc1,nc2
    integer :: nx_f(2), nx_c(2)

    nx_f = SHAPE(yhat_f)
    nx_c = SHAPE(yhat_c)

    if (nx_f(1) .eq. nx_c(1) .and. nx_f(2) .eq. nx_c(2)) then
       yhat_f=yhat_c
       return
    end if
    nf1=nx_f(1)-nx_c(1)/2+2
    nf2=nx_f(2)-nx_c(2)/2+2
    nc1=nx_c(1)/2+2
    nc2=nx_c(2)/2+2

    yhat_f = 0.0_pfdp
    yhat_f(1:nx_c(1)/2,1:nx_c(2)/2) = yhat_c(1:nx_c(1)/2,1:nx_c(2)/2)
    yhat_f(nf1:nx_f(1),1:nx_c(2)/2) = yhat_c(nc1:nx_c(1),1:nx_c(2)/2)
    yhat_f(1:nx_c(1)/2,nf2:nx_f(2)) = yhat_c(1:nx_c(1)/2,nc2:nx_c(2))
    yhat_f(nf1:nx_f(1),nf2:nx_f(2)) = yhat_c(nc1:nx_c(1),nc2:nx_c(2))

  end subroutine zinterp_2d

  !>  Interpolate from coarse  level to fine
  subroutine zinterp_3d(this, yhat_c, yhat_f)
    class(pf_fft_t), intent(inout) :: this
    complex(pfdp),   pointer,intent(inout) :: yhat_f(:,:,:)
    complex(pfdp),   pointer,intent(in) :: yhat_c(:,:,:)

    integer :: nf1,nf2,nf3,nc1,nc2,nc3
    integer :: nx_f(3), nx_c(3)

    nx_f = SHAPE(yhat_f)
    nx_c = SHAPE(yhat_c)
    if (nx_f(1) .eq. nx_c(1) .and. nx_f(2) .eq. nx_c(2) .and. nx_f(3) .eq. nx_c(3))  then
       yhat_f=yhat_c
       return
    end if
    nf1=nx_f(1)-nx_c(1)/2+2
    nf2=nx_f(2)-nx_c(2)/2+2
    nf3=nx_f(3)-nx_c(3)/2+2
    nc1=nx_c(1)/2+2
    nc2=nx_c(2)/2+2
    nc3=nx_c(3)/2+2

    yhat_f = 0.0_pfdp
    yhat_f(1:nx_c(1)/2,1:nx_c(2)/2,1:nx_c(3)/2) = yhat_c(1:nx_c(1)/2,1:nx_c(2)/2,1:nx_c(3)/2)
    yhat_f(nf1:nx_f(1),1:nx_c(2)/2,1:nx_c(3)/2) = yhat_c(nc1:nx_c(1),1:nx_c(2)/2,1:nx_c(3)/2)
    yhat_f(1:nx_c(1)/2,nf2:nx_f(2),1:nx_c(3)/2) = yhat_c(1:nx_c(1)/2,nc2:nx_c(2),1:nx_c(3)/2)
    yhat_f(nf1:nx_f(1),nf2:nx_f(2),1:nx_c(3)/2) = yhat_c(nc1:nx_c(1),nc2:nx_c(2),1:nx_c(3)/2)

    yhat_f(1:nx_c(1)/2,1:nx_c(2)/2,nf3:nx_f(3)) = yhat_c(1:nx_c(1)/2,1:nx_c(2)/2,nc3:nx_c(3))
    yhat_f(nf1:nx_f(1),1:nx_c(2)/2,nf3:nx_f(3)) = yhat_c(nc1:nx_c(1),1:nx_c(2)/2,nc3:nx_c(3))
    yhat_f(1:nx_c(1)/2,nf2:nx_f(2),nf3:nx_f(3)) = yhat_c(1:nx_c(1)/2,nc2:nx_c(2),nc3:nx_c(3))
    yhat_f(nf1:nx_f(1),nf2:nx_f(2),nf3:nx_f(3)) = yhat_c(nc1:nx_c(1),nc2:nx_c(2),nc3:nx_c(3))

  end subroutine zinterp_3d
  end module pf_mod_fftpackage


text:
       subroutine iff_getpath(str)
c
c//////////////////////////////////////////////////////////////////////
c Copyright (c) 1997--2000 Matthew Newville, The University of Chicago
c Copyright (c) 1992--1996 Matthew Newville, University of Washington
c
c Permission to use and redistribute the source code or binary forms of
c this software and its documentation, with or without modification is
c hereby granted provided that the above notice of copyright, these
c terms of use, and the disclaimer of warranty below appear in the
c source code and documentation, and that none of the names of The
c University of Chicago, The University of Washington, or the authors
c appear in advertising or endorsement of works derived from this
c software without specific prior written permission from all parties.
c
c THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
c EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
c MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
c IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
c CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
c TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
c SOFTWARE OR THE USE OR OTHER DEALINGS IN THIS SOFTWARE.
c//////////////////////////////////////////////////////////////////////
c
c purpose: convert feff path to accessible program data
       implicit none
       include 'consts.h'
       include 'keywrd.h'
       include 'arrays.h'
       include 'fefdat.h'
       include 'feffit.h'
       include 'pthpar.h'

       save
       character*(*)  str
       character*512 name1, defkey(2)*64, s
       character*8   suffix(mpthpr)
       double precision  tmpr(maxpts), tmpi(maxpts), r1, getsca, rx
       integer   ipath, idata, ier, i ,k, istrln, ndfkey, il
       integer   iff_eval, jx,jy, u2ipth, inpath, jfeff
       integer   xafs_path, ret, nx
       logical   do_arrs
       external  iff_eval, u2ipth, xafs_path
       external  getsca, istrln
       data suffix  /'s02', 'e0', 'ei', 'delr', 'sigma2', 'third',
     $      'fourth', 'degen' , 'k', 'amp', 'phase', 'file',
     $      ' ', ' ', ' ' , ' '/

c
c get default values for pre-edge parameters from current scalar values
       do_arrs = .false.
       call iff_sync
       call bkeys(str, mkeys, keys, values, nkeys)
       ipath = -1
       idata =  1
       name1 = undef
c set default keywords for "undefined" sets
c ie: the first two unkeyed values will take keys 'energy', 'xmu'

       ndfkey    = 2
       defkey(1) = 'path'
       defkey(2) = 'prefix'
       do 100 i = 1, nkeys
          k = istrln( keys(i))
          if ((values(i).eq.undef).and.(i.le.ndfkey)) then
             values(i) = keys(i)
             keys(i)   = defkey(i)
          end if
          if ( (keys(i).eq.'prefix') .or.
     $         (keys(i).eq.'group')) then
             name1 = values(i)
          elseif (keys(i).eq.'path') then
             call str2in(values(i), ipath, ier)
          elseif (keys(i).eq.'do_arrays') then
             call str2lg(values(i), do_arrs, ier)
          elseif (keys(i).eq.'data_set') then
             call str2in(values(i), idata, ier)
          else
             messg = keys(i)(1:k)//' " will be ignored'
             call warn(1,' *** get_path: unknown keyword " '//messg)
          end if
 100   continue
c
       if (ipath .le.0) return
       call fefinp
       ret    = xafs_path(ipath, tmpr, tmpi, rx)
       inpath = u2ipth(ipath)
       jfeff  = jpthff(inpath)

       call undels(name1)
       if (name1.eq.undef) then
          write(name1,'(a,i3.3)') 'path', ipath
       endif
       il = istrln(name1)
       s  = name1(1:il)//'_s02'
       call setsca(s, param(jfps02))
       s  = name1(1:il)//'_e0'
       call setsca(s, param(jfpe0))
       s  = name1(1:il)//'_ei'
       call setsca(s, param(jfpei))
       s  = name1(1:il)//'_delr'
       call setsca(s, param(jfpdr))
       s  = name1(1:il)//'_sigma2'
       call setsca(s, param(jfpss2))
       s  = name1(1:il)//'_third'
       call setsca(s, param(jfp3rd))
       s  = name1(1:il)//'_fourth'
       call setsca(s, param(jfp4th))
       s  = name1(1:il)//'_degen'
       call setsca(s, param(jfpdeg))
       s  = name1(1:il)//'_reff'
       r1 = getsca('reff',1)
       call setsca(s, r1)

       s  = name1(1:il)//'_lab'
       call settxt(s, pthlab(inpath))
       s  = name1(1:il)//'_id'
       call settxt(s, fpthid(jfeff))
       s  = name1(1:il)//'_file'
       call settxt(s, feffil(jfeff))

c
c generate ifeffit arrays from feff.dat columns
       if (do_arrs) then
          nx  = nffpts(jfeff)
          call set_array('k',     name1, qfeff(1,jfeff), nx, 1)
          call set_array('amp',   name1, theamp(1,jfeff), nx, 1)
          call set_array('phase', name1, thepha(1,jfeff), nx, 1)
          call set_array('caps',  name1, thcaps(1,jfeff), nx, 1)
          call set_array('rep',   name1, realp(1,jfeff), nx, 1)
          call set_array('lambda',name1, xlamb(1,jfeff), nx, 1)
       endif

       return
c end  subroutine iff_test
       end

max_stars_repo_name: keechul/ifeffit

max_stars_repo_licenses: Naumen Condor-1.1 MS-PL

max_issues_repo_name: bruceravel/ifeffit

max_issues_repo_licenses: Naumen Condor-1.1 MS-PL

max_forks_repo_name: bruceravel/ifeffit

max_forks_repo_licenses: Naumen Condor-1.1 MS-PL


text:
 implicit none

 integer, dimension(2,2) :: a,b
 integer                 :: c(2)

 a(1,1)=1;  a(2,1)=2;  a(1,2)=3;  a(2,2)=4
 b=2*a+1
 print*,a
 print*,b

 c=a(1,1:2)
 print*,c

 end

max_stars_repo_name: agforero/FTFramework

max_issues_repo_name: agforero/fortran-testing-framework

max_forks_repo_name: agforero/fortran-testing-framework


text:
SUBROUTINE transf_g( numpn, coorn,  coora, l_old, sg_old, l_new, sg_new)

  ! - transfer Gaussian variables from the old mesh to the new one
  ! Superconvergent Patch Recovery algorithm (according to Akin, 2003)

  USE SPR_Constants
  USE SPR_Elem_Type_Db
  USE form_patch_lib
  USE spr_lib

  IMPLICIT NONE
  ! dummy arguments
  INTEGER, INTENT(IN) ::  &
    numpn, &
    l_old(:,:), &
    l_new(:,:)

  REAL(kind=8), INTENT(IN) :: &
    coora(:,:), &
    coorn(:,:), &
    sg_old(:,:,:)

  REAL(kind=8), INTENT(OUT) :: &
    sg_new(:,:)

  ! local variables
  INTEGER :: elt, ne_new

  ! Allocatable Arrays

  INTEGER,  ALLOCATABLE :: &
    l_to_l_neigh (:, :),   & ! neighbors
    l_first(:), l_last(:), & !(npoin)
    l_to_l_sum(:),         & !(nelem)
    l_to_n_sum(:),         & !(npoin)
    l_proj(:,:)              !(ngaus,ne_new)

  REAL (kind=8), ALLOCATABLE :: &
    scp_averages (:,:),    & !(npoin, nvarg)
    coogp (:,:,:),         & ! coordinates of GP in old mesh
    cgp_new(:,:,:)           ! coordinates of GP in new mesh

  CALL Set_SPR_Constants()
  nnode = SIZE(l_old,1)       !number of nodes per element
  nelem = SIZE(l_old,2)       !number of elements

  nvarg = SIZE(sg_old,1)
  ! 1 - element type, 1 = 3-node triangle
  IF (nnode == 3) THEN
    elt = 1
  ELSE IF (nnode == 4) THEN
    elt = 2
  ELSE
    CALL runend('Transfer of data: wrong nnode value')
  END IF
  CALL Set_Elem_Type_Info(elt)

  ALLOCATE(l_first (npoin), l_last (npoin),        &
           l_to_l_sum (nelem), l_to_n_sum (npoin), &
           scp_averages (npoin, nvarg),            &
           coogp (ndime, ngaus, nelem))

  CALL Calc_GP_Coord(l_old,coora,coogp, nelem, nnode, npoin, ndime, ngaus)

  ne_new = SIZE(l_new,2)       !number of elements in new mesh
  ALLOCATE( cgp_new(ndime, ngaus, ne_new), l_proj(ngaus, ne_new) )
  CALL Calc_GP_Coord(l_new,coorn,cgp_new, ne_new, nnode, numpn, ndime, ngaus)
  CALL Find_GP_Lproj(l_old,coora,cgp_new,l_proj, ne_new, nnode, ngaus)

  !  generate patch information (element centered patches)

  CALL First_Last_L_at_Pt(l_old, l_first, l_last)
  CALL Count_Elems_at_Elem(nelem, nnode, npoin, l_first,   &
                           l_last, l_old, needs, l_to_l_sum)
  neigh_l = MAXVAL(l_to_l_sum) ! max. number of element neighbours at any elem
  ALLOCATE( l_to_l_neigh(neigh_l, nelem) )
  CALL Form_Elems_at_El(nelem, nnode, npoin, l_first, l_last, l_old,  &
                         l_to_l_sum, l_to_l_neigh, neigh_l, needs)
  CALL Count_L_at_Node(nelem, nnode, npoin, l_old, l_to_n_sum)

  ! 2nd phase of scp

   n_patch = nelem ! Number of patches (element centered)
   CALL Calc_SCP_Ave_GP_Fluxes(l_old, coora, l_to_l_neigh, sg_new, &
             sg_old,coogp,cgp_new,l_proj,ne_new)

  DEALLOCATE(l_to_l_sum, l_to_n_sum, scp_averages, l_first, l_last, coogp)
  DEALLOCATE(cgp_new, l_proj, l_to_l_neigh)

  RETURN

END SUBROUTINE transf_g

max_stars_repo_name: jerebenitez/IFE-simpact-openfoam

max_issues_repo_name: jerebenitez/IFE-simpact-openfoam

max_forks_repo_name: jerebenitez/IFE-simpact-openfoam


text:
	SUBROUTINE DM_FSPC ( iflno, nword, istart, iret )
C************************************************************************
C* DM_FSPC								*
C*									*
C* This subroutine frees space in a DM file.				*
C*									*
C* DM_FSPC  ( IFLNO, NWORD, ISTART, IRET )				*
C*									*
C* Input parameters:							*
C*	IFLNO		INTEGER		File number			*
C*	NWORD		INTEGER		Number of words			*
C*	ISTART		INTEGER		First word to free		*
C*									*
C* Output parameters:							*
C*	IRET		INTEGER		Return code			*
C*					  0 = normal return		*
C*					 -6 = write error		*
C**									*
C* Log:									*
C* M. desJardins/GSFC	 4/87						*
C************************************************************************
	INCLUDE		'GEMPRM.PRM'
	INCLUDE		'dmcmn.cmn'
C------------------------------------------------------------------------
C*	Add blocks to the list of free space.
C
	CALL DM_AFRE  ( iflno, nword, istart, ier )
C
C*	Write the data management block to file.
C
	CALL DM_WDMG ( iflno, iret )
C*
	RETURN
	END

max_stars_repo_name: oxelson/gempak

max_issues_repo_name: oxelson/gempak

max_forks_repo_name: oxelson/gempak


text:
SUBROUTINE neo_bderiv(theta, phi, f, g, dfdx, dfdy, dgdx, dgdy)
!
! Calculates first and second derivatives of b using the 2d-splines
!
! Input:  theta, phi
! Output: f      db/dt              (t = theta)
!         g      db/dp              (p = phi)
!         dfdx   d^2b/dt^2
!         dfdy   d^2b/(dt dp)
!         dgdx   d^2b/(dt dp)
!         dgdy   d^2b/dp^2
!
! Input/output consistent for neo_zeros2d
! **********************************************************************
! Modules
! **********************************************************************
  USE neo_precision
  USE neo_input
  USE neo_work
  USE neo_units
  USE neo_parameters
  USE neo_control
  USE neo_spline
! **********************************************************************
! Local Definitions
! **********************************************************************
  IMPLICIT NONE

  REAL(kind=dp), INTENT(in)    ::   theta, phi
  REAL(kind=dp), INTENT(out)   ::   f, g, dfdx, dfdy, dgdx, dgdy

  REAL(kind=dp), DIMENSION(2)  ::   fderiv
  REAL(kind=dp), DIMENSION(3)  ::   sderiv
! **********************************************************************
! Evaluation of pointer
! **********************************************************************
  CALL poi2d(theta_int,phi_int,mt,mp,                                  &
             theta_start,theta_end,phi_start,phi_end,                  &
             theta,phi,theta_ind,phi_ind,theta_d,phi_d,ierr)
! **********************************************************************
! Evaluation of 2d-splines (first and second derivatives)
! **********************************************************************
!  print *, 'before eva2d_fd'
  CALL eva2d_fd(theta_n,phi_n,theta_ind,phi_ind,theta_d,phi_d,         &
             b_spl,fderiv)
!  print *, 'before eva2d_sd'
  CALL eva2d_sd(theta_n,phi_n,theta_ind,phi_ind,theta_d,phi_d,         &
             b_spl,sderiv)
!  print *, 'after eva2d_sd'
! **********************************************************************
! Outputvalues (for neo_zeros2d)
! **********************************************************************
  f    = fderiv(1)
  g    = fderiv(2)
  dfdx = sderiv(1)
  dfdy = sderiv(2)
  dgdx = sderiv(2)
  dgdy = sderiv(3)
END SUBROUTINE neo_bderiv

max_stars_repo_name: joseluisvelasco/STELLOPT

max_issues_repo_name: joseluisvelasco/STELLOPT

max_forks_repo_name: joseluisvelasco/STELLOPT


text:
module mod_monolis_c2d6_shape
  use mod_monolis_prm
  implicit none

  private

  real(kdouble), parameter :: gsp(2,4) = reshape([ &
    0.166666666666667d0, 0.166666666666667d0, &
    0.666666666666667d0, 0.166666666666667d0, &
    0.166666666666667d0, 0.666666666666667d0, &
    0.333333333333333d0, 0.333333333333333d0  &
    ], [2,4])

  real(kdouble), parameter :: np(2,6) = reshape([ &
     0.0d0, 0.0d0, &
     1.0d0, 0.0d0, &
     1.0d0, 0.0d0, &
     0.5d0, 0.0d0, &
     0.5d0, 0.5d0, &
     0.0d0, 0.5d0  &
    ], [2,6])

  real(kdouble), parameter :: weight(4) = [ &
     0.5d0, 0.5d0, 0.5d0, 0.5d0 &
    ]

    public :: monolis_C2D6_num_gauss_point
    public :: monolis_C2D6_weight
    public :: monolis_C2D6_integral_point
    !public :: monolis_C2D6_node_point
    public :: monolis_C2D6_shapefunc
    public :: monolis_C2D6_shapefunc_deriv

contains

  function monolis_C2D6_num_gauss_point()
    implicit none
    integer(kint) :: monolis_C2D6_num_gauss_point
    monolis_C2D6_num_gauss_point = 4
  end function monolis_C2D6_num_gauss_point

  function monolis_C2D6_weight(i)
    implicit none
    integer(kint) :: i
    real(kdouble) :: monolis_C2D6_weight
    monolis_C2D6_weight = weight(i)
  end function monolis_C2D6_weight

  subroutine monolis_C2D6_integral_point(i, r)
    implicit none
    integer(kint) :: i
    real(kdouble) :: r(2)

    r(1) = gsp(1,i)
    r(2) = gsp(2,i)
  end subroutine monolis_C2D6_integral_point

  !subroutine monolis_C2D6_node_point(i, r)
  !  implicit none
  !  integer(kint) :: i
  !  real(kdouble) :: r(2)

  !  r(1) = np(1,i)
  !  r(2) = np(2,i)
  !end subroutine monolis_C2D6_node_point

  subroutine monolis_C2D6_shapefunc(local, func)
    implicit none
    real(kdouble) :: local(2), func(6)
    real(kdouble) :: xi, et, st

    xi = local(1)
    et = local(2)
    st = 1.0d0 - local(1) - local(2)

    func(1) = st*(2.0d0*st - 1.0d0)
    func(2) = xi*(2.0d0*xi - 1.0d0)
    func(3) = et*(2.0d0*et - 1.0d0)
    func(4) = 4.0d0*xi*st
    func(5) = 4.0d0*xi*et
    func(6) = 4.0d0*et*st
  end subroutine monolis_C2D6_shapefunc

  subroutine monolis_C2D6_shapefunc_deriv(local, func)
    implicit none
    real(kdouble) :: local(2)
    real(kdouble) :: func(6,2)
    real(kdouble) :: xi, et, st

    xi = local(1)
    et = local(2)
    st = 1.0d0 - local(1) - local(2)

    func(1,1) = 1.0d0 - 4.0d0*st
    func(2,1) = 4.0d0*xi - 1.0d0
    func(3,1) = 0.0d0
    func(4,1) = 4.0d0*(st - xi)
    func(5,1) = 4.0d0*et
    func(6,1) =-4.0d0*et

    func(1,2) = 1.0d0 - 4.0d0*st
    func(2,2) = 0.0d0
    func(3,2) = 4.0d0*et - 1.0d0
    func(4,2) =-4.0d0*xi
    func(5,2) = 4.0d0*xi
    func(6,2) = 4.0d0*(st - et)
  end subroutine monolis_C2D6_shapefunc_deriv

end module mod_monolis_c2d6_shape

max_stars_repo_name: nqomorita/monolis

max_issues_repo_name: nqomorita/monolis

max_forks_repo_name: nqomorita/monolis