FrontISTR  5.7.0
Large-scale structural analysis program with finit element method
hecmw_restart_f.f90
Go to the documentation of this file.
1 !-------------------------------------------------------------------------------
2 ! Copyright (c) 2019 FrontISTR Commons
3 ! This software is released under the MIT License, see LICENSE.txt
4 !-------------------------------------------------------------------------------
6 
8  use hecmw_util
9  implicit none
10 
11 contains
12 
13  !C=============================================================================
14  !C Write restart data to file
15  !C=============================================================================
16  subroutine hecmw_restart_add_int(src, n_data)
17  integer(kind=kint),dimension(:) :: src
18  integer(kind=kint) :: n_data,ierr
19 
20  call hecmw_restart_add_int_if(src, n_data, ierr)
21  if(ierr /= 0) call hecmw_abort(hecmw_comm_get_comm())
22  end subroutine hecmw_restart_add_int
23 
24 
25  subroutine hecmw_restart_add_real(src, n_data)
26  real(kind=kreal),dimension(:) :: src
27  integer(kind=kint) :: n_data,ierr
28 
29  call hecmw_restart_add_real_if(src, n_data, ierr)
30  if(ierr /= 0) call hecmw_abort(hecmw_comm_get_comm())
31  end subroutine hecmw_restart_add_real
32 
33 
34  subroutine hecmw_restart_write()
35  integer(kind=kint) :: ierr
36 
37  call hecmw_restart_write_if(ierr)
38  if(ierr /= 0) call hecmw_abort(hecmw_comm_get_comm())
39  end subroutine hecmw_restart_write
40 
41 
42  subroutine hecmw_restart_write_by_name(name_ID)
43  integer(kind=kint) :: ierr
44  character(len=HECMW_NAME_LEN) :: name_ID
45 
46  call hecmw_restart_write_by_name_if(name_id, ierr)
47  if(ierr /= 0) call hecmw_abort(hecmw_comm_get_comm())
48  end subroutine hecmw_restart_write_by_name
49 
50 
51  !C=============================================================================
52  !C Read restart data from file
53  !C=============================================================================
54  subroutine hecmw_restart_open()
55  integer(kind=kint) :: ierr
56 
57  call hecmw_restart_open_if(ierr)
58  if(ierr /= 0) call hecmw_abort(hecmw_comm_get_comm())
59  end subroutine hecmw_restart_open
60 
61 
62  subroutine hecmw_restart_open_by_name(name_ID)
63  integer(kind=kint) :: ierr
64  character(len=HECMW_NAME_LEN) :: name_ID
65 
66  call hecmw_restart_open_by_name_if(name_id, ierr)
67  if(ierr /= 0) call hecmw_abort(hecmw_comm_get_comm())
68  end subroutine hecmw_restart_open_by_name
69 
70 
71  subroutine hecmw_restart_close()
72  integer(kind=kint) :: ierr
73 
74  call hecmw_restart_close_if(ierr)
75  if(ierr /= 0) call hecmw_abort(hecmw_comm_get_comm())
76  end subroutine hecmw_restart_close
77 
78 
79  subroutine hecmw_restart_read_int(dst)
80  integer(kind=kint) :: ierr
81  integer(kind=kint),dimension(:) :: dst
82 
83  call hecmw_restart_read_int_if(dst, ierr)
84  if(ierr /=0) call hecmw_abort(hecmw_comm_get_comm())
85  end subroutine hecmw_restart_read_int
86 
87 
88  subroutine hecmw_restart_read_real(dst)
89  integer(kind=kint) :: ierr
90  real(kind=kreal),dimension(:) :: dst
91 
92  call hecmw_restart_read_real_if(dst, ierr)
93  if(ierr /=0) call hecmw_abort(hecmw_comm_get_comm())
94  end subroutine hecmw_restart_read_real
95 
96 end module hecmw_restart
97 
hecmw_restart::hecmw_restart_write_by_name
subroutine hecmw_restart_write_by_name(name_ID)
Definition: hecmw_restart_f.f90:43
hecmw_util::hecmw_abort
subroutine hecmw_abort(comm)
Definition: hecmw_util_f.F90:534
hecmw_restart::hecmw_restart_write
subroutine hecmw_restart_write()
Definition: hecmw_restart_f.f90:35
hecmw_restart::hecmw_restart_add_real
subroutine hecmw_restart_add_real(src, n_data)
Definition: hecmw_restart_f.f90:26
hecmw_restart_read_real_if
void hecmw_restart_read_real_if(double *dst, int *err)
Definition: hecmw_restart.c:302
hecmw_restart::hecmw_restart_close
subroutine hecmw_restart_close()
Definition: hecmw_restart_f.f90:72
hecmw_restart::hecmw_restart_open
subroutine hecmw_restart_open()
Definition: hecmw_restart_f.f90:55
hecmw_restart::hecmw_restart_read_int
subroutine hecmw_restart_read_int(dst)
Definition: hecmw_restart_f.f90:80
hecmw_restart_close_if
void hecmw_restart_close_if(int *err)
Definition: hecmw_restart.c:266
hecmw_restart
I/O and Utility.
Definition: hecmw_restart_f.f90:7
hecmw_restart::hecmw_restart_read_real
subroutine hecmw_restart_read_real(dst)
Definition: hecmw_restart_f.f90:89
hecmw_util
I/O and Utility.
Definition: hecmw_util_f.F90:7
hecmw_restart_read_int_if
void hecmw_restart_read_int_if(int *dst, int *err)
Definition: hecmw_restart.c:276
hecmw_restart::hecmw_restart_add_int
subroutine hecmw_restart_add_int(src, n_data)
Definition: hecmw_restart_f.f90:17
hecmw_util::kreal
integer(kind=4), parameter kreal
Definition: hecmw_util_f.F90:16
hecmw_restart::hecmw_restart_open_by_name
subroutine hecmw_restart_open_by_name(name_ID)
Definition: hecmw_restart_f.f90:63
hecmw_restart_write_by_name_if
void hecmw_restart_write_by_name_if(char *name_ID, int *err, int len)
Definition: hecmw_restart.c:394
hecmw_restart_open_by_name_if
void hecmw_restart_open_by_name_if(char *name_ID, int *err, int len)
Definition: hecmw_restart.c:224
hecmw_restart_add_int_if
void hecmw_restart_add_int_if(int *data, int *n_data, int *err)
Definition: hecmw_restart.c:343
hecmw_restart_write_if
void hecmw_restart_write_if(int *err)
Definition: hecmw_restart.c:424
hecmw_util::hecmw_comm_get_comm
integer(kind=kint) function hecmw_comm_get_comm()
Definition: hecmw_util_f.F90:571
hecmw_restart_add_real_if
void hecmw_restart_add_real_if(double *data, int *n_data, int *err)
Definition: hecmw_restart.c:369
hecmw_restart_open_if
void hecmw_restart_open_if(int *err)
Definition: hecmw_restart.c:254