19 character(len=*),
intent(in) :: filename
20 character(len=*),
intent(in) :: label
21 integer,
intent(in) :: nbs
22 integer,
intent(in) :: nbt
23 real(8),
intent(in) :: coor(2, nbs)
24 integer,
intent(in) :: ntri(3, nbt)
25 integer,
parameter :: xmf = 99
26 real(8),
intent(in) :: field(:)
29 open (xmf, file=filename//
".xmf")
31 write (xmf,
"(a)")
"<?xml version='1.0'?>"
32 write (xmf,
"(a)")
"<!DOCTYPE Xdmf SYSTEM 'Xdmf.dtd' []> "
33 write (xmf,
"(a)")
"<Xdmf Version='2.0'>"
34 write (xmf,
"(a)")
"<Domain>"
35 write (xmf,
"(a)")
"<Grid Name='Mesh' GridType='Uniform' >"
36 write (xmf,
"(a,i6,a)")
"<Topology Type='Triangle' NumberOfElements='", nbt,
"'>"
37 write (xmf,
"(a,i6,a)")
"<DataItem Name='Connections' Format='XML' DataType='Int' Dimensions='", &
40 write (xmf,
"(3i6)") (ntri(j, i) - 1, j=1, 3)
42 write (xmf,
"(a)")
"</DataItem>"
43 write (xmf,
"(a)")
"</Topology>"
44 write (xmf,
"(a)")
"<Geometry GeometryType='XY'>"
45 write (xmf,
"(a,i6,a)")
"<DataItem Format='XML' Dimensions='", nbs,
" 2'>"
47 write (xmf,
"(2f12.6)") coor(:, i)
49 write (xmf,
"(a)")
"</DataItem>"
50 write (xmf,
"(a)")
"</Geometry>"
51 write (xmf,
"(a)")
"<Attribute Name='"//label//
"' Center='Node'>"
52 write (xmf,
"(a,i6,a)")
"<DataItem Format='XML' Datatype='Float' Dimensions='", nbs,
"'>"
54 write (xmf,
"(f12.6)") field(i)
56 write (xmf,
"(a)")
"</DataItem>"
57 write (xmf,
"(a)")
"</Attribute>"
58 write (xmf,
"(a)")
"</Grid>"
59 write (xmf,
"(a)")
"</Domain>"
60 write (xmf,
"(a)")
"</Xdmf>"
subroutine, public sll_s_write_tri_mesh_xmf(filename, coor, ntri, nbs, nbt, field, label)