FrontISTR  5.7.0
Large-scale structural analysis program with finit element method
hecmw_io.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 
7 module hecmw_io
8  use hecmw_util
13  use hecmw_result
14  use hecmw_restart
15  implicit none
16 
17  public :: hecmw_get_mesh
18  public :: hecmw_put_mesh
19 
20 contains
21 
22  !C====================================================================
23  !C Get HEC-MW dist mesh from file
24  !C====================================================================
25 
26  subroutine hecmw_get_mesh(name_ID, mesh)
27  integer(kind=kint) :: ierr
28  character(len=HECMW_NAME_LEN) :: name_id
29  type(hecmwst_local_mesh) :: mesh
30 
31  call hecmw_nullify_mesh(mesh)
32 
33  call hecmw_get_mesh_init_if(name_id,ierr)
34  if(ierr /=0) call hecmw_abort(hecmw_comm_get_comm())
35 
36  call hecmw_dist_copy_c2f(mesh, ierr)
37  if(ierr /=0) call hecmw_abort(hecmw_comm_get_comm())
38 
40  if(ierr /=0) call hecmw_abort(hecmw_comm_get_comm())
41 
42  end subroutine hecmw_get_mesh
43 
44 
45  !C====================================================================
46  !C Put HEC-MW dist mesh to file
47  !C====================================================================
48 
49  subroutine hecmw_put_mesh(name, mesh)
50  integer(kind=kint) :: ierr
51  character(len=HECMW_NAME_LEN) :: name
52  type(hecmwst_local_mesh) :: mesh
53 
54  call hecmw_put_mesh_init_if(ierr)
55  if(ierr /=0) call hecmw_abort(hecmw_comm_get_comm())
56 
57  call hecmw_dist_copy_f2c(mesh, ierr)
58  if(ierr /=0) call hecmw_abort(hecmw_comm_get_comm())
59 
60  call hecmw_put_mesh_if(name, ierr)
61  if(ierr /=0) call hecmw_abort(hecmw_comm_get_comm())
62 
64  if(ierr /=0) call hecmw_abort(hecmw_comm_get_comm())
65  end subroutine hecmw_put_mesh
66 
67 end module hecmw_io
68 
hecmw_get_mesh_init_if
void hecmw_get_mesh_init_if(char *name_ID, int *err, int len)
Definition: hecmw_io_get_mesh_if.c:16
hecmw_util::hecmw_nullify_mesh
subroutine hecmw_nullify_mesh(P)
Definition: hecmw_util_f.F90:714
hecmw_util::hecmw_abort
subroutine hecmw_abort(comm)
Definition: hecmw_util_f.F90:534
hecmw_put_mesh_if
void hecmw_put_mesh_if(char *name_ID, int *err, int len)
Definition: hecmw_put_mesh_if.c:77
hecmw_restart
I/O and Utility.
Definition: hecmw_restart_f.f90:7
hecmw_io::hecmw_put_mesh
subroutine, public hecmw_put_mesh(name, mesh)
Definition: hecmw_io.f90:50
hecmw_util
I/O and Utility.
Definition: hecmw_util_f.F90:7
hecmw_util::hecmwst_local_mesh
Definition: hecmw_util_f.F90:234
hecmw_dist_print_f
I/O and Utility.
Definition: hecmw_dist_print_f.f90:7
hecmw_put_mesh_finalize_if
void hecmw_put_mesh_finalize_if(int *err)
Definition: hecmw_put_mesh_if.c:129
hecmw_put_mesh_init_if
void hecmw_put_mesh_init_if(int *err)
Definition: hecmw_put_mesh_if.c:107
hecmw_dist_free_f
I/O and Utility.
Definition: hecmw_dist_free_f.f90:7
hecmw_io::hecmw_get_mesh
subroutine, public hecmw_get_mesh(name_ID, mesh)
Definition: hecmw_io.f90:27
hecmw_dist_copy_c2f_f::hecmw_dist_copy_c2f
subroutine, public hecmw_dist_copy_c2f(mesh, ierr)
Definition: hecmw_dist_copy_c2f_f.f90:19
hecmw_dist_copy_c2f_f
I/O and Utility.
Definition: hecmw_dist_copy_c2f_f.f90:7
hecmw_get_mesh_finalize_if
void hecmw_get_mesh_finalize_if(int *ierr)
Definition: hecmw_io_get_mesh_if.c:52
hecmw_dist_copy_f2c_f
I/O and Utility memo) Intel 9 compiler generates codes to waste stack memory when an array of string ...
Definition: hecmw_dist_copy_f2c_f.f90:12
hecmw_io
I/O and Utility.
Definition: hecmw_io.f90:7
hecmw_result
I/O and Utility.
Definition: hecmw_result_f.f90:7
hecmw_dist_copy_f2c_f::hecmw_dist_copy_f2c
subroutine, public hecmw_dist_copy_f2c(mesh, ierr)
Definition: hecmw_dist_copy_f2c_f.f90:24
hecmw_util::hecmw_comm_get_comm
integer(kind=kint) function hecmw_comm_get_comm()
Definition: hecmw_util_f.F90:571