1
C Copyright (C) 2006 Imperial College London and others.
3
C Please see the AUTHORS file in the main source directory for a full list
4
C of copyright holders.
7
C Applied Modelling and Computation Group
8
C Department of Earth Science and Engineering
9
C Imperial College London
11
C adrian@Imperial.ac.uk
13
C This library is free software; you can redistribute it and/or
14
C modify it under the terms of the GNU Lesser General Public
15
C License as published by the Free Software Foundation; either
16
C version 2.1 of the License.
18
C This library is distributed in the hope that it will be useful,
19
C but WITHOUT ANY WARRANTY; without even the implied warranty of
20
C MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21
C Lesser General Public License for more details.
23
C You should have received a copy of the GNU Lesser General Public
24
C License along with this library; if not, write to the Free Software
25
C Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
28
SUBROUTINE MKFIXD( BIGLST, NODLST, NDNMBR,
29
: NODX, NODY, NODZ, ORGMTX, SIZMTX,
31
: NODLOC, SIZLOC, SUROWN, SIZOWN,
32
: ELMREG, ENLBAS, ENLIST,
33
: SNLBAS, SNLIST, SURFID,
34
: NELM, NNOD, NSELM, SZENLS, SZSNLS, GEOM3D,
35
: GATHER, SCATER, NGATH, NHALO,
36
: ATOSEN, ATOREC, NPROC )
37
C-----------------------------------------------------------------------
39
C - This subroutine forms the element node list (ENLIST) and its base
40
C - pointer (ENLBAS) for the new adapted mesh, as well as returning the
41
C - element material/region id in ELMREG for each element. The nodal
42
C - positions for the adapted mesh is returned in NODX, NODY and NODZ,
43
C - and the interpolated error metrics are returned in ORGMTX if SIZMTX
44
C - is sent as 9*NNOD (otherwise it should be sent as 1).
46
C-----------------------------------------------------------------------
50
INTEGER NELM, SZENLS, NNOD, SZSNLS, NSELM, SIZOWN, SIZLOC, SIZMTX,
51
: NHALO, NPROC, NGATH, NPRDND
53
INTEGER ELMREG(NELM), ENLIST(SZENLS), ENLBAS(NELM+1),
54
: SNLBAS(NSELM+1), SNLIST(SZSNLS), SUROWN(SIZOWN),
55
: NODLOC(SIZLOC), GATHER(NGATH), SCATER(NHALO),
56
: ATOSEN(NPROC), ATOREC(NPROC), PRDNDS(NPRDND),
59
REAL NODX(NNOD), NODY(NNOD), NODZ(NNOD), ORGMTX(SIZMTX)
61
LOGICAL GEOM3D, NDNMBR
69
REAL XSHIFT, YSHIFT, ZSHIFT, XSCALE, YSCALE, ZSCALE
70
COMMON / BLKSCL / XSHIFT, YSHIFT, ZSHIFT, XSCALE, YSCALE, ZSCALE
72
INTEGER IPTR, CONELM(4), EDGLST(6), INOD, IELM, IFLAG, IREG,
73
: INEW, NXT, LST, NODS(4), IPOS, I, J, K, SPOS, SELM,
74
: NODCON(4), NXTC, SUM, CNTGMY, CNTINT, CNTSPL, JNOD, KNOD,
75
: minelv, maxelv, minelr, maxela, i1, i2
77
REAL X(4), Y(4), Z(4), TETVOL, avol, arad, asp, m(9), areas(4),
78
: minvol, minrad, minrvl, minvrd, maxasp, maxavl, maxard,
79
: minras, minvas, L(6), maxvol, maxvrd, maxvas
80
integer mxsfid, nodcnt, nusfid
82
integer, dimension(:), allocatable:: srfcnt
83
real, dimension(:), allocatable:: srfavx, srfavy, srfavz
84
integer, parameter:: MAX_SFID_STATS=1000
88
LOGICAL GTNDFL, FACS(4), getflg
90
IF( IERR .NE. 0 ) RETURN
92
c print*,'NNOD,NELM,NSELM,GEOM3D: ',NNOD,NELM,NSELM,IS3DMS
93
IF( GEOM3D .NEQV. IS3DMS ) THEN
94
WRITE(0,*) '*** MKFIXD: Inconsistent GEOM3D!'
96
WRITE(0,*) " Didn't do 3D adapt before, but GEOM3D now true"
98
WRITE(0,*) ' Did 3D adapt before, but GEOM3D now false'
103
c print*,'SIZMTX: ',SIZMTX
113
10 IF( GTNDFL(BIGLST,NODLST,IPTR,1) ) THEN
115
if( gtndfl(biglst,nodlst,iptr,2) ) then
117
else if( gtndfl(biglst,nodlst,iptr,4) ) then
119
else if( gtndfl(biglst,nodlst,iptr,3) ) then
124
if(nodcnt.gt.nnod) then
125
WRITE(0,*) '*** MKFIXD: Too many nodes!'
126
WRITE(0,*) nodcnt,nnod,iptr,topnod
132
IF( GTNDFL(BIGLST,NODLST,IPTR,8) ) THEN
140
KNOD = INT(NODLST(17,IPTR))
141
if( knod .le. 0 ) then
142
WRITE(0,*) '*** MKFIXD: Got node again!'
143
WRITE(0,*) knod,iptr,inod,jnod,nnod
146
else if( knod .gt. nnod ) then
147
WRITE(0,*)'*** MKFIXD: Got out-of-range KNOD: ',knod,nnod
153
C - rescale and shift the domain back to what it was
155
NODX(KNOD) = NODLST(1,IPTR)*XSCALE + XSHIFT
156
NODY(KNOD) = NODLST(2,IPTR)*YSCALE + YSHIFT
157
NODZ(KNOD) = NODLST(3,IPTR)*ZSCALE + ZSHIFT
159
IF( SIZMTX .EQ. 9*NNOD ) THEN
161
ORGMTX(I+1) = NODLST( 7,IPTR)/XSCALE/XSCALE
162
ORGMTX(I+2) = NODLST( 8,IPTR)/XSCALE/YSCALE
163
ORGMTX(I+3) = NODLST( 9,IPTR)/XSCALE/ZSCALE
164
ORGMTX(I+4) = NODLST(10,IPTR)/YSCALE/XSCALE
165
ORGMTX(I+5) = NODLST(11,IPTR)/YSCALE/YSCALE
166
ORGMTX(I+6) = NODLST(12,IPTR)/YSCALE/ZSCALE
167
ORGMTX(I+7) = NODLST(13,IPTR)/ZSCALE/XSCALE
168
ORGMTX(I+8) = NODLST(14,IPTR)/ZSCALE/YSCALE
169
ORGMTX(I+9) = NODLST(15,IPTR)/ZSCALE/ZSCALE
171
C ORGMTX(I+KNOD*9-9) = NODLST(6+I,IPTR)
175
NODLST(17,IPTR) = -FLOAT(KNOD)
177
IF( SIZLOC .EQ. NNOD ) NODLOC(KNOD) = INT(NODLST(16,IPTR))
178
c print*,'Node ',nodx(Knod),nody(Knod),nodz(Knod),iptr
179
if(nodlst(nxtnod,iptr).eq.iptr) then
180
WRITE(0,*) '*** MKFIXD: Node points to itself!'
181
WRITE(0,*) iptr,inod,jnod,knod,nnod
185
IPTR = NODLST(NXTNOD,IPTR)
186
if(iptr.le.topnod .and. iptr.gt.0) goto 10
188
if(nodcnt.lt.nnod) then
189
WRITE(0,*) '*** MKFIXD: Reached end of node list too early'
190
WRITE(0,*) nodcnt,nnod,iptr,topnod
197
IF( IERR .NE. 0 ) THEN
198
WRITE(0,*) '*** MKFIXD: GOT ERROR FROM GTNDFL'
204
11 if( gtndfl(biglst,nodlst,iptr,1) ) then
206
knod = int(nodlst(17,iptr))
208
WRITE(0,*) '*** MKFIXD: Found +ve entry!'
209
WRITE(0,*) nodlst(17,iptr),iptr,inod,nnod
213
if(inod.gt.nnod) then
214
WRITE(0,*) '*** MKFIXD: Beyond end of nodes!'
215
WRITE(0,*) nodlst(17,iptr),iptr,inod,nnod
220
if(knod.gt.nnod) then
221
WRITE(0,*) '*** MKFIXD: Node number too big!'
222
WRITE(0,*) nodlst(17,iptr),iptr,inod,nnod
226
nodlst(17,iptr) = float(knod)
227
iptr = nodlst(nxtnod,iptr)
228
if(iptr.le.topnod .and. iptr.gt.0) goto 11
231
IF( NPRDND .GT. 1 ) THEN
235
PRDNDS(I) = INT( NODLST(17,PRDNDS(I)) )
237
: ' periodic renumber: ',j,prdnds(i)
243
: 'Finished new node data'
245
: 'Geom,split,int: ',cntgmy,cntspl,cntint
254
ENLBAS(IELM+1) = IPOS
255
SNLBAS(SELM+1) = SPOS
257
allocate( srfcnt(0:MAX_SFID_STATS) )
258
allocate( srfavx(0:MAX_SFID_STATS) )
259
allocate( srfavy(0:MAX_SFID_STATS) )
260
allocate( srfavz(0:MAX_SFID_STATS) )
265
c ewrite(3,*) 'cleared srfavs'
267
20 IF( BIGLST(4,IPTR) .GT. 0 ) THEN
271
IF( IELM .GT. NELM ) THEN
272
WRITE(0,*) '*** MKFIXD: ERROR COUNTING ELEMENTS'
273
WRITE(0,*) NELM,IELM,IPTR
275
deallocate(srfcnt, srfavx, srfavy, srfavz)
279
CALL ELMINF( BIGLST, NODLST, IPTR, CONELM, EDGLST,
280
: INEW, IFLAG, IREG, NXT, LST )
284
CALL ELNODS( BIGLST, NODLST, IPTR, NODS, NXT, LST, .TRUE. )
289
X(1) = NODLST(1,NODS(1))
290
X(2) = NODLST(1,NODS(2))
291
X(3) = NODLST(1,NODS(3))
292
X(4) = NODLST(1,NODS(4))
293
Y(1) = NODLST(2,NODS(1))
294
Y(2) = NODLST(2,NODS(2))
295
Y(3) = NODLST(2,NODS(3))
296
Y(4) = NODLST(2,NODS(4))
297
Z(1) = NODLST(3,NODS(1))
298
Z(2) = NODLST(3,NODS(2))
299
Z(3) = NODLST(3,NODS(3))
300
Z(4) = NODLST(3,NODS(4))
301
IF( TETVOL( X, Y, Z ) .LT. 0.0 ) THEN
302
c print*,'*** MKFIXD: Got inside-out tet...'
314
ENLIST(IPOS+1) = NODLST(17,NODS(i1))
315
ENLIST(IPOS+2) = NODLST(17,NODS(i2))
316
ENLIST(IPOS+3) = NODLST(17,NODS(3))
320
ENLIST(IPOS+1) = NODLST(17,NODS(4))
323
if( ielm .lt. 11 .and. debug ) then
324
print*,'old elm ',iptr,(nods(i),i=1,4)
325
print*,'elm ',ielm,(enlist(ipos+i-4),i=1,4)
328
IF( IPOS .GT. SZENLS+1 ) THEN
329
WRITE(0,*) '*** MKFIXD: BEYOND END OF ENLIST'
330
WRITE(0,*) SZENLS,IPOS,IELM,NELM,IPTR
332
deallocate(srfcnt, srfavx, srfavy, srfavz)
336
ENLBAS(IELM+1) = IPOS
340
c IF( CONELM(1) .LE. 0 .OR. CONELM(2) .LE. 0 .OR.
341
c : CONELM(3) .LE. 0 .OR. CONELM(4) .EQ. 0 ) THEN
343
IF( CONELM(1) .LE. 0 ) THEN
345
SNLIST(SPOS+i1) = NODLST(17,NODS(2))
346
SNLIST(SPOS+i2) = NODLST(17,NODS(1))
347
SNLIST(SPOS+3) = NODLST(17,NODS(3))
348
c if( selm .lt. 11 ) then
349
c print*,'srf ',selm,(snlist(spos+i),i=1,3)
352
SNLBAS(SELM+1) = SPOS
353
SURFID(SELM) = -CONELM(1)-1
354
IF( SIZOWN .EQ. NSELM ) SUROWN(SELM) = IELM
355
if( ielm.gt.nelm .or. ielm.le.0 )
356
: WRITE(0,*) 'MKFIXD: IELM too big!',ielm,nelm,selm
357
mxsfid = max(mxsfid,surfid(selm))
358
if( surfid(selm) .lt. 0 ) then
359
WRITE(0,*) 'BAD SURFID RANGE: ',surfid(selm),selm
360
else if( surfid(selm) .le. MAX_SFID_STATS ) then
361
c if(surfid(selm).gt.0) elmreg(ielm) = 3
362
srfcnt(surfid(selm))=srfcnt(surfid(selm))+1
363
srfavx(surfid(selm))=srfavx(surfid(selm))
365
srfavy(surfid(selm))=srfavy(surfid(selm))
367
srfavz(surfid(selm))=srfavz(surfid(selm))
372
IF( CONELM(2) .LE. 0 ) THEN
374
SNLIST(SPOS+i1) = NODLST(17,NODS(1))
375
SNLIST(SPOS+i2) = NODLST(17,NODS(2))
376
SNLIST(SPOS+3) = NODLST(17,NODS(4))
377
c if( selm .lt. 11 ) then
378
c print*,'srf ',selm,(snlist(spos+i),i=1,3)
381
SNLBAS(SELM+1) = SPOS
382
SURFID(SELM) = -CONELM(2)-1
383
IF( SIZOWN .EQ. NSELM ) SUROWN(SELM) = IELM
384
if( ielm.gt.nelm .or. ielm.le.0 )
385
: WRITE(0,*) 'MKFIXD: IELM too big!',ielm,nelm,selm
386
mxsfid = max(mxsfid,surfid(selm))
387
if( surfid(selm) .lt. 0 ) then
388
WRITE(0,*) 'BAD SURFID RANGE: ',surfid(selm),selm
389
else if( surfid(selm) .le. MAX_SFID_STATS ) then
390
c if(surfid(selm).gt.0) elmreg(ielm) = 3
391
srfcnt(surfid(selm))=srfcnt(surfid(selm))+1
392
srfavx(surfid(selm))=srfavx(surfid(selm))
394
srfavy(surfid(selm))=srfavy(surfid(selm))
396
srfavz(surfid(selm))=srfavz(surfid(selm))
401
IF( CONELM(3) .LE. 0 ) THEN
403
SNLIST(SPOS+i1) = NODLST(17,NODS(3))
404
SNLIST(SPOS+i2) = NODLST(17,NODS(1))
405
SNLIST(SPOS+3) = NODLST(17,NODS(4))
406
c if( selm .lt. 11 ) then
407
c print*,'srf ',selm,(snlist(spos+i),i=1,3)
410
SNLBAS(SELM+1) = SPOS
411
SURFID(SELM) = -CONELM(3)-1
412
IF( SIZOWN .EQ. NSELM ) SUROWN(SELM) = IELM
413
if( ielm.gt.nelm .or. ielm.le.0 )
414
: WRITE(0,*) 'MKFIXD: IELM too big!',ielm,nelm,selm
415
mxsfid = max(mxsfid,surfid(selm))
416
if( surfid(selm) .lt. 0 ) then
417
WRITE(0,*) 'BAD SURFID RANGE: ',surfid(selm),selm
418
else if( surfid(selm) .le. MAX_SFID_STATS ) then
419
c if(surfid(selm).gt.0) elmreg(ielm) = 3
420
srfcnt(surfid(selm))=srfcnt(surfid(selm))+1
421
srfavx(surfid(selm))=srfavx(surfid(selm))
423
srfavy(surfid(selm))=srfavy(surfid(selm))
425
srfavz(surfid(selm))=srfavz(surfid(selm))
430
IF( CONELM(4) .LE. 0 ) THEN
432
c if(facs(4).eq.4) then
433
WRITE(0,*) '+++ MKFIXD: Eh??? Surface on face 4!'
438
SNLIST(SPOS+i1) = NODLST(17,NODS(2))
439
SNLIST(SPOS+i2) = NODLST(17,NODS(3))
440
SNLIST(SPOS+3) = NODLST(17,NODS(4))
441
c if( selm .lt. 11 ) then
442
c print*,'srf ',selm,(snlist(spos+i),i=1,3)
445
SNLBAS(SELM+1) = SPOS
446
SURFID(SELM) = -CONELM(4)-1
447
IF( SIZOWN .EQ. NSELM ) SUROWN(SELM) = IELM
448
if( ielm.gt.nelm .or. ielm.le.0 )
449
: WRITE(0,*) 'MKFIXD: IELM too big!',ielm,nelm,selm
450
mxsfid = max(mxsfid,surfid(selm))
451
if( surfid(selm) .lt. 0 ) then
452
WRITE(0,*) 'BAD SURFID RANGE: ',surfid(selm),selm
453
else if( surfid(selm) .le. MAX_SFID_STATS ) then
454
c if(surfid(selm).gt.0) elmreg(ielm) = 3
455
srfcnt(surfid(selm))=srfcnt(surfid(selm))+1
456
srfavx(surfid(selm))=srfavx(surfid(selm))
458
srfavy(surfid(selm))=srfavy(surfid(selm))
460
srfavz(surfid(selm))=srfavz(surfid(selm))
465
IF( SELM .GT. NSELM ) THEN
466
WRITE(0,*)'*** MKFIXD: ERROR COUNTING SURFACE ELEMENTS'
467
WRITE(0,*) NSELM,SELM
471
IF( SPOS .GT. SZSNLS+1 ) THEN
472
WRITE(0,*) '*** MKFIXD: BEYOND END OF SNLIST'
473
WRITE(0,*) SZSNLS,SPOS
485
IF( IPTR .LE. TOPBIG .AND. IPTR .GT. 0 ) GOTO 20
487
IF( IELM .NE. NELM ) THEN
488
WRITE(0,*)'*** MKFIXD: Reached end of element list too early'
489
WRITE(0,*) ielm,nelm,iptr,topbig
491
deallocate(srfcnt, srfavx, srfavy, srfavz)
495
ELSE IF( BIGLST(4,IPTR) .LT. 0 ) THEN
497
C CALL EDGINF( BIGLST, NODLST, IPTR, NODS,
498
C : INEW, IFLAG, NXT, LST )
500
if( getflg(biglst,nodlst,iptr,2) ) then
502
else if( getflg(biglst,nodlst,iptr,3) ) then
506
IPTR = BIGLST( NXTBIG, IPTR )
507
IF( IPTR .LE. TOPBIG .AND. IPTR .GT. 0 ) GOTO 20
509
IF( IELM .NE. NELM ) THEN
510
WRITE(0,*)'*** MKFIXD: Reached end of element list too early'
511
WRITE(0,*) ielm,nelm,iptr,topbig
513
deallocate(srfcnt, srfavx, srfavy, srfavz)
520
: 'Finished new element data'
522
: 'Geom ed, int ed: ',cntgmy,cntint
523
nusfid = count(srfcnt>0)
524
if(nusfid.lt.200) then
526
: 'Surface averages ( max id :',mxsfid,' )'
527
do i = 0, MAX_SFID_STATS
528
if( srfcnt(i) .gt. 0 ) then
530
: i,srfcnt(i),srfavx(i)/srfcnt(i)/3,
531
: srfavy(i)/srfcnt(i)/3,srfavz(i)/srfcnt(i)/3
536
: 'Check in MKFIXD: NSELM, MXSFID, NUSFID =',
537
: nselm,mxsfid,nusfid
540
IF( NPROC .GT. 1 ) THEN
543
: 'Working out new gather array...'
546
INOD = INT(NODLST(17,INOD))
547
if(inod.gt.nnod) then
548
WRITE(0,*) ' old:',gather(i),' new:',inod,
549
: ' ***TOO BIG!!!',nnod
550
else if(inod.lt.1) then
551
WRITE(0,*) ' old:',gather(i),' new:',inod,
553
else if( debug ) then
554
WRITE(0,*) ' old:',gather(i),' new:',
555
: inod,nodlst(6,inod)
561
: 'Working out new scatter array...'
564
INOD = INT(NODLST(17,INOD))
565
if(inod.gt.nnod) then
566
WRITE(0,*) ' old:',scater(i),' new:',inod,
567
: ' ***TOO BIG!!!',nnod
568
else if(inod.lt.1) then
569
WRITE(0,*) ' old:',scater(i),' new:',inod,
571
else if( debug ) then
573
: ' old:',scater(i),' new:',
574
: inod,nodlst(6,inod)
581
: 'Checking local node ordering...'
596
C - to avoid compiler warnings...
604
c print*,'element ',i,enlbas(i)+1
605
DO J = ENLBAS(I)+1, ENLBAS(I+1)
607
if(enlist(j).gt.nnod.or.enlist(j).le.0)
608
: WRITE(0,*) 'MKFIXD: bad node: ',enlist(j),i,j,ipos
609
X(IPOS) = NODX(ENLIST(J))
610
Y(IPOS) = NODY(ENLIST(J))
611
Z(IPOS) = NODZ(ENLIST(J))
612
c print*,' node ',ipos,enlist(j),x(ipos),y(ipos),z(ipos)
614
CALL MTETIN( X, Y, Z, M, AVOL, AREAS, L, ARAD, ASP )
615
c print*,' vol,rad,asp ',avol,arad,asp
616
ASPAVE = ASPAVE + ASP
617
VOLSUM = VOLSUM + AVOL
618
IF( AVOL .LE. 0.0 ) THEN
619
WRITE(0,*) '+++ FOUND NEGATIVE VOLUME!',avol
620
WRITE(0,*) I,(ENLIST(J),J=ENLBAS(I)+1,ENLBAS(I+1))
623
ENLIST(J) = ENLIST(J+1)
626
IF( ASP .GT. MAXASP ) THEN
632
IF( AVOL .LT. MINVOL ) THEN
638
IF( AVOL .GT. MAXVOL ) THEN
644
IF( ARAD .LT. MINRAD ) THEN
652
: 'VOLSUM,ASPAVE: ',VOLSUM,ASPAVE/NELM
654
: 'Maximum asp,vol,rad: ',maxasp,maxavl,maxard
656
ipos = enlbas(maxela)
657
inod = enlist(ipos+1)
658
print*,' node 1 : ',nodx(inod),nody(inod),nodz(inod)
659
inod = enlist(ipos+2)
660
print*,' node 2 : ',nodx(inod),nody(inod),nodz(inod)
661
inod = enlist(ipos+3)
662
print*,' node 3 : ',nodx(inod),nody(inod),nodz(inod)
663
inod = enlist(ipos+4)
664
print*,' node 4 : ',nodx(inod),nody(inod),nodz(inod)
667
: 'Maximum vol,rad,asp: ',maxvol,maxvrd,maxvas
669
ipos = enlbas(maxelv)
670
inod = enlist(ipos+1)
671
print*,' node 1 : ',nodx(inod),nody(inod),nodz(inod)
672
inod = enlist(ipos+2)
673
print*,' node 2 : ',nodx(inod),nody(inod),nodz(inod)
674
inod = enlist(ipos+3)
675
print*,' node 3 : ',nodx(inod),nody(inod),nodz(inod)
676
inod = enlist(ipos+4)
677
print*,' node 4 : ',nodx(inod),nody(inod),nodz(inod)
680
: 'Minimum vol,rad,asp: ',minvol,minvrd,minvas
682
ipos = enlbas(minelv)
683
inod = enlist(ipos+1)
684
print*,' node 1 : ',nodx(inod),nody(inod),nodz(inod)
685
inod = enlist(ipos+2)
686
print*,' node 2 : ',nodx(inod),nody(inod),nodz(inod)
687
inod = enlist(ipos+3)
688
print*,' node 3 : ',nodx(inod),nody(inod),nodz(inod)
689
inod = enlist(ipos+4)
690
print*,' node 4 : ',nodx(inod),nody(inod),nodz(inod)
693
: 'Minimum rad,vol,asp: ',minrad,minrvl,minras
695
ipos = enlbas(minelr)
696
inod = enlist(ipos+1)
697
print*,' node 1 : ',nodx(inod),nody(inod),nodz(inod)
698
inod = enlist(ipos+2)
699
print*,' node 2 : ',nodx(inod),nody(inod),nodz(inod)
700
inod = enlist(ipos+3)
701
print*,' node 3 : ',nodx(inod),nody(inod),nodz(inod)
702
inod = enlist(ipos+4)
703
print*,' node 4 : ',nodx(inod),nody(inod),nodz(inod)
708
c do j = enlbas(i)+1, enlbas(i+1)
710
c xxx(iptr) = nodx(enlist(j))
711
c yyy(iptr) = nody(enlist(j))
712
c zzz(iptr) = nodz(enlist(j))
714
c aa = tetvol( xxx, yyy, zzz )
715
c if( aa .lt. 0.0 ) then
718
c enlist(j) = enlist(j+1)
723
c print*,'ENLBAS: ',(enlbas(i),i=1,nelm+1)
724
c print*,'ENLIST: ',(enlist(i),i=1,szenls)
727
: 'Finished checking local node ordering'
730
7 format( a, 3(1pe13.5) )
731
8 format( 2i7, 3(1pe13.5) )
734
deallocate(srfcnt, srfavx, srfavy, srfavz)