5#include <PB3D_macros.h>
32 integer :: lim_sec_x(2)
33 integer,
allocatable :: n(:,:)
34 integer,
allocatable :: m(:,:)
35 complex(dp),
allocatable :: vec(:,:,:)
36 complex(dp),
allocatable :: val(:)
38 real(
dp) :: estim_mem_usage
59 subroutine init_sol(sol,mds,grid_sol,n_EV,lim_sec_X)
66 class(
sol_type),
intent(inout) :: sol
69 integer,
intent(in) :: n_EV
70 integer,
intent(in),
optional :: lim_sec_X(2)
78 call set_nm_x(mds,grid_sol,sol%lim_sec_X,sol%n,sol%m,lim_sec_x)
81 sol%n_mod =
size(sol%n,2)
84 allocate(sol%val(1:n_ev))
87 allocate(sol%vec(1:sol%n_mod,1:grid_sol%loc_n_r,1:n_ev))
92 &n_ev * (1 + sol%n_mod*grid_sol%loc_n_r)
97 &
' - Expected memory usage of sol: '//&
111 class(
sol_type),
intent(inout) :: sol
116 real(dp) :: estim_mem_usage
121 estim_mem_usage = sol%estim_mem_usage
126 call dealloc_sol_final(sol)
136 &trim(
i2str(mem_diff))//
'kB deallocating sol ('//&
137 &trim(
i2str(nint(100*mem_diff/&
139 &
'% of estimated)]',alert=.true.)
145 subroutine dealloc_sol_final(sol)
148 end subroutine dealloc_sol_final
Variables pertaining to the different grids used.
Numerical utilities related to giving output.
integer function, public get_mem_usage()
Returns the memory usage in kilobytes.
subroutine, public writo(input_str, persistent, error, warning, alert)
Write output to file identified by output_i.
Numerical variables used by most other modules.
integer, parameter, public dp
double precision
logical, public print_mem_usage
print memory usage is printed
complex(dp), parameter, public iu
complex unit
integer, parameter, public max_str_ln
maximum length of strings
integer, public rank
MPI rank.
real(dp), parameter, public weight_dp
size of double precision in kB
Operations concerning giving output, on the screen as well as in output files.
Variables pertaining to the solution quantities.
integer, public n_alloc_sols
nr. of allocated grids
subroutine dealloc_sol(sol)
Deallocates solution variables.
subroutine init_sol(sol, mds, grid_sol, n_ev, lim_sec_x)
Initialize a solution type and allocate the variables.
elemental character(len=max_str_ln) function, public i2str(k)
Convert an integer to string.
elemental character(len=max_str_ln) function, public r2strt(k)
Convert a real (double) to string.
Variables pertaining to the perturbation quantities.