-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathtemplate_writeVTK.par.f
More file actions
executable file
·68 lines (67 loc) · 2.57 KB
/
template_writeVTK.par.f
File metadata and controls
executable file
·68 lines (67 loc) · 2.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
c fid = 10000+cm%tF()
c WRITE(fName,'(A)') "res_"//STR(cm%tF())//"_"//STR(cTS)//
c 2 "_"//STR(cntr)//".vtk"
c OPEN(fid,FILE=TRIM(fName),STATUS='UNKNOWN',ACCESS='STREAM',
c 2 FORM='UNFORMATTED',CONVERT='BIG_ENDIAN')
c WRITE(fid) "# vtk DataFile Version 3.0"//eol
c WRITE(fid) "Residue"//eol
c WRITE(fid) "BINARY"//eol
c WRITE(fid) "DATASET UNSTRUCTURED_GRID"//eol
c WRITE(fid) "POINTS "//STR(SUM(msh(:)%nNo))//" double"//eol
c itmp = 0
c DO iM=1, nMsh
c DO a=1, msh(iM)%nNo
c Ac = msh(iM)%gN(a)
c IF (nsd .EQ. 2) THEN
c WRITE(fid) x(1:nsd,Ac), 0D0
c ELSE
c WRITE(fid) x(1:nsd,Ac)
c END IF
c END DO
c itmp = itmp + (msh(iM)%eNoN+1)*msh(iM)%nEl
c END DO
c WRITE(fid) eol//"CELLS "//STR(SUM(msh(:)%nEl))//" "//
c 2 STR(itmp)//eol
c DO iM=1, nMsh
c itmp = 0
c DO e=1, msh(iM)%nEl
c WRITE(fid) msh(iM)%eNoN, msh(iM)%IEN(:,e)+iTmp-1
c END DO
c itmp = itmp + msh(iM)%nNo
c END DO
c WRITE(fid) eol//"CELL_TYPES "//STR(SUM(msh(:)%nEl))//eol
c DO iM=1, nMsh
c DO e=1, msh(iM)%nEl
c WRITE(fid) msh(iM)%vtkType
c END DO
c END DO
c WRITE(fid) eol//"POINT_DATA "//STR(SUM(msh(:)%nNo))//eol
c WRITE(fid) "VECTORS Res_M double"//eol
c DO iM=1, nMsh
c DO a=1, msh(iM)%nNo
c Ac = msh(iM)%gN(a)
c IF (nsd .EQ. 2) THEN
c WRITE(fid) R(1:nsd,Ac), 0D0
c ELSE
c WRITE(fid) R(1:nsd,Ac)
c END IF
c END DO
c END DO
c WRITE(fid) eol//"SCALARS Res_C double"//eol
c WRITE(fid) "LOOKUP_TABLE default"//eol
c DO iM=1, nMsh
c DO a=1, msh(iM)%nNo
c Ac = msh(iM)%gN(a)
c WRITE(fid) R(nsd+1,Ac)
c END DO
c END DO
c WRITE(fid) eol//"CELL_DATA "//STR(SUM(msh(:)%nEl))//eol
c WRITE(fid) "SCALARS Proc_ID int"//eol
c WRITE(fid) "LOOKUP_TABLE default"//eol
c DO iM=1, nMsh
c DO e=1, msh(iM)%nEl
c WRITE(fid) cm%tF()
c END DO
c END DO
c CALL FLUSH(fid)
c CLOSE(fid)