PB3D
[2.45]
Ideal linear high-n MHD stability in 3-D
|
Go to the documentation of this file.
5 #include <PB3D_macros.h>
64 integer,
allocatable :: wl(:)
86 integer function init_lock(lock_loc,wu_tag)
result(ierr)
89 character(*),
parameter :: rout_name =
'init_lock'
92 class(
lock_type),
intent(inout) :: lock_loc
93 integer,
intent(in) :: wu_tag
96 integer(kind=MPI_ADDRESS_KIND) :: intlb
97 integer(kind=MPI_ADDRESS_KIND) :: intex
102 call mpi_type_get_extent(mpi_integer,intlb,intex,ierr)
103 chckerr(
'Failed to get extent of int')
109 call mpi_win_create(lock_loc%wl,
n_procs*intex,int(intex),&
110 &mpi_info_null,mpi_comm_world,lock_loc%wl_win,ierr)
111 chckerr(
'Failed to create window to lock_loc')
113 allocate(lock_loc%wl(0))
115 call mpi_win_create(lock_loc%wl,0*intex,int(intex),mpi_info_null,&
116 &mpi_comm_world,lock_loc%wl_win,ierr)
117 chckerr(
'Failed to create window to lock_loc')
120 lock_loc%wu_tag = wu_tag
123 call mpi_win_fence(0,lock_loc%wl_win,ierr)
124 chckerr(
'Couldn''t set fence')
133 character(*),
parameter :: rout_name =
'dealloc_lock'
136 class(
lock_type),
intent(inout) :: lock_loc
142 call mpi_win_free(lock_loc%wl_win,ierr)
143 chckerr(
'Failed to free window to HDF5_lock')
146 deallocate(lock_loc%wl)
integer, parameter, public dp
double precision
character(len=7), public script_dir
directory where to save scripts for plots
Numerical variables used by most other modules.
integer, parameter, public max_str_ln
maximum length of strings
elemental character(len=max_str_ln) function, public i2str(k)
Convert an integer to string.
integer, public n_procs
nr. of MPI processes
character(len=4), public data_dir
directory where to save data for plots
elemental character(len=max_str_ln) function, public r2strt(k)
Convert a real (double) to string.
Variables pertaining to MPI.
elemental character(len=max_str_ln) function, public r2str(k)
Convert a real (double) to string.
integer function, public init_lock(lock_loc, wu_tag)
Initializes a lock.
character(len=5), public plot_dir
directory where to save plots
integer function, public dealloc_lock(lock_loc)
Deallocates a lock.
type(lock_type), public hdf5_lock
HDF5 lock.
integer, public rank
MPI rank.