The TELEMAC-MASCARET system  trunk
close_mesh.f
Go to the documentation of this file.
1 ! ********************
2  SUBROUTINE close_mesh
3 ! ********************
4 !
5  &(fformat,file_id,ierr,mesh_number)
6 !
7 !***********************************************************************
8 ! HERMES V7P0 01/05/2014
9 !***********************************************************************
10 !
11 !BRIEF CLOSES A MESH FILE
12 !
13 !HISTORY Y AUDOUIN (LNHE)
14 !+ 24/03/2014
15 !+ V7P0
16 !+
17 !
18 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
19 !| FFORMAT |-->| FORMAT OF THE FILE
20 !| FILE_ID |-->| FILE DESCRIPTOR
21 !| IERR |<--| 0 IF NO ERROR DURING THE EXECUTION
22 !| MESH_NUMBER |-->| IF PRESENT, THIS IS THE NUMBER OF THE PART OF
23 ! THE CONCATENATED FILE WE WANT TO ACCESS
24 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
25 !
26  USE utils_serafin, ONLY : close_mesh_srf
27  USE utils_med, ONLY : close_mesh_med
28  USE utils_vtk, ONLY : close_mesh_vtk
29  USE utils_cgns, ONLY : close_mesh_cgns
31  IMPLICIT NONE
32 !
33 !+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
34 !
35  CHARACTER(LEN=8), INTENT(IN) :: FFORMAT
36  INTEGER, INTENT(IN) :: FILE_ID
37  INTEGER, INTENT(OUT) :: IERR
38  INTEGER, OPTIONAL, INTENT(IN) :: MESH_NUMBER
39 !
40 !+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
41 !
42  SELECT CASE (fformat(1:7))
43  CASE ('SERAFIN')
44  CALL close_mesh_srf(file_id,ierr,mesh_number)
45  CASE ('MED ')
46  CALL close_mesh_med(file_id,ierr)
47  CASE ('VTK ')
48  CALL close_mesh_vtk(file_id,ierr)
49  CASE ('CGNS ')
50  CALL close_mesh_cgns(file_id,ierr)
51  CASE DEFAULT
53  WRITE(error_message,*) 'CLOSE_MESH: BAD FILE FORMAT: ',fformat
54  RETURN
55  END SELECT
56 !
57 !-----------------------------------------------------------------------
58 !
59  RETURN
60  END
61 
subroutine close_mesh_srf(FILE_ID, IERR, MESH_NUMBER)
subroutine close_mesh_cgns(FILE_ID, IERR)
Definition: utils_cgns.F:429
subroutine close_mesh(FFORMAT, FILE_ID, IERR, MESH_NUMBER)
Definition: close_mesh.f:7
character(len=200) error_message
subroutine close_mesh_vtk(FILE_ID, IERR)
Definition: utils_vtk.F:162
subroutine close_mesh_med(FILE_ID, IERR)
Definition: utils_med.F:296
integer, parameter hermes_unknown_file_format_err