00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 program MEDsupportMesh1
00023
00024 implicit none
00025 include 'med.hf'
00026
00027
00028 integer cret
00029 integer fid
00030 character*64 fname
00031 parameter (fname = "Unittest_MEDsupportMesh_1.med")
00032 character*64 smname1
00033 integer sdim1,mdim1
00034 parameter (sdim1=2, mdim1=2)
00035 integer sdim2,mdim2
00036 parameter (sdim2=3,mdim2=2)
00037 parameter (smname1 = "supportMesh1")
00038 character*64 smname2
00039 parameter (smname2 = "supportMesh2")
00040 character*200 description1
00041 parameter (description1="support mesh1 description")
00042 character*200 description2
00043 parameter (description2="support mesh2 description")
00044 character*16 nomcoo2D(2)
00045 character*16 unicoo2D(2)
00046 data nomcoo2D /"x","y"/, unicoo2D /"cm","cm"/
00047 character*16 nomcoo3D(3)
00048 character*16 unicoo3D(3)
00049 data nomcoo3D /"x","y","z"/, unicoo3D /"cm","cm","cm"/
00050 integer atype1, atype2
00051 parameter (atype1=MED_CARTESIAN, atype2=MED_CARTESIAN)
00052 integer nsmesh, i
00053 character*64 smname
00054 character*16 aunit(3), aname(3)
00055 character*200 description
00056 integer sdim, mdim, atype
00057
00058
00059
00060 call mfiope(fid,fname,MED_ACC_CREAT,cret)
00061 print *,'Open file',cret
00062 if (cret .ne. 0 ) then
00063 print *,'ERROR : file creation'
00064 call efexit(-1)
00065 endif
00066
00067
00068
00069 call msmcre(fid,smname1,sdim1,mdim1,description1,
00070 & MED_CARTESIAN,nomcoo2D,unicoo2D,cret)
00071 print *,'Support mesh creation : 2D space dimension',cret
00072 if (cret .ne. 0 ) then
00073 print *,'ERROR : support mesh creation'
00074 call efexit(-1)
00075 endif
00076
00077
00078
00079 call msmcre(fid,smname2,sdim2,mdim2,description2,
00080 & MED_CARTESIAN,nomcoo3D,unicoo3D,cret)
00081 print *,'Support mesh creation : 3D space dimension ',cret
00082 if (cret .ne. 0 ) then
00083 print *,'ERROR : support mesh creation'
00084 call efexit(-1)
00085 endif
00086
00087
00088
00089 call mficlo(fid,cret)
00090 print *,'Close file',cret
00091 if (cret .ne. 0 ) then
00092 print *,'ERROR : close file'
00093 call efexit(-1)
00094 endif
00095
00096
00097
00098 end
00099