phd-scripts/Unpublished/XFEM2/XFEM/umeshbak.for

53 lines
No EOL
1.5 KiB
Fortran

C USER INPUT FOR ADAPTIVE MESH CONSTRAINT
C
SUBROUTINE UMESHMOTION(UREF,ULOCAL,NODE,NNDOF,
$ LNODETYPE,ALOCAL,NDIM,TIME,DTIME,PNEWDT,
$ KSTEP,KINC,KMESHSWEEP,JMATYP,JGVBLOCK,LSMOOTH)
C
include 'ABA_PARAM.INC'
C
C USER DEFINED DIMENSION STATEMENTS
C
CHARACTER*80 PARTNAME
DIMENSION ARRAY(1000),JPOS(15),HFARRAY(1000)
DIMENSION ULOCAL(*),UGLOBAL(NDIM),TLOCAL(NDIM)
DIMENSION JGVBLOCK(*),JMATYP(*)
DIMENSION NODELIST(100),JELEMLIST(10),JELEMTYPE(10)
DIMENSION ALOCAL(NDIM,*)
DIMENSION UTEMP(2)
C
C The dimensions of the variables ARRAY and JARRAY
C must be set equal to or greater than 15
C
CALL GETPARTINFO(NODE,0,PARTNAME,LOCNUM,JRCD)
CALL GETVRN(LOCNUM,'COORD',ARRAY,JRCD,JGVBLOCK,LTRN)
NELEMS=10
CALL GETNODETOELEMCONN(NODE, NELEMS, JELEMLIST, JELEMTYPE,
$ JRCD, JGVBLOCK)
CALL GETVRMAVGATNODE(NODE,1,'HFL',HFARRAY,JRCD,JELEMLIST,
$ NELEMS,JMATYP,JGVBLOCK)
C PRINT *,'****'
C PRINT *, HFARRAY(1),HFARRAY(2),HFARRAY(3),HFARRAY(4)
C PRINT *,NODE,TIME
FluxX=HFARRAY(2)
FluxY=HFARRAY(3)
FluxZ=HFARRAY(4)
if(abs(FluxX)<0.001)FluxX=0.
if(abs(FluxY)<0.001)FluxY=0.
if(abs(FluxZ)<0.001)FluxZ=0.
UGLOBAL(1) = -2.*FluxX
UGLOBAL(2) = -2.*FluxY
UGLOBAL(3) = 0.
DO I=1,NDIM
TLOCAL(I)=0.
DO J=1,NDIM
TLOCAL(I)=TLOCAL(I)+UGLOBAL(J)*ALOCAL(J,I)
ENDDO
ENDDO
DO I=1,NDIM
ULOCAL(I)=TLOCAL(I)
ENDDO
lsmooth=1
C
RETURN
END