14 character(len=LENMEMPATH) :: memory_path
15 integer(I4B) :: iter_cnt
16 integer(I4B),
pointer :: convnmod => null()
17 integer(I4B),
dimension(:),
pointer :: model_bounds => null()
18 integer(I4B),
pointer :: nitermax => null()
19 integer(I4B),
dimension(:),
pointer,
contiguous :: itinner => null()
20 integer(I4B),
dimension(:),
pointer,
contiguous :: locdv => null()
21 real(dp),
dimension(:),
pointer,
contiguous :: dvmax => null()
22 integer(I4B),
dimension(:),
pointer,
contiguous :: locr => null()
23 real(dp),
dimension(:),
pointer,
contiguous :: rmax => null()
24 integer(I4B),
pointer,
dimension(:, :),
contiguous :: convlocdv => null()
25 real(dp),
pointer,
dimension(:, :),
contiguous :: convdvmax => null()
26 integer(I4B),
pointer,
dimension(:, :),
contiguous :: convlocr => null()
27 real(dp),
pointer,
dimension(:, :),
contiguous :: convrmax => null()
39 subroutine init(this, nr_models, model_bounds, mem_path)
41 integer(I4B) :: nr_models
42 integer(I4B),
dimension(:),
pointer :: model_bounds
43 character(len=*) :: mem_path
45 this%memory_path =
'TMP'//mem_path
47 this%model_bounds => model_bounds
49 call mem_allocate(this%convnmod,
'CONVNMOD', this%memory_path)
50 call mem_allocate(this%nitermax,
'NITERMAX', this%memory_path)
51 this%convnmod = nr_models
54 call mem_allocate(this%itinner, 0,
'ITINNER', this%memory_path)
55 call mem_allocate(this%locdv, this%convnmod,
'LOCDV', this%memory_path)
56 call mem_allocate(this%dvmax, this%convnmod,
'DVMAX', this%memory_path)
57 call mem_allocate(this%locr, this%convnmod,
'LOCDR', this%memory_path)
58 call mem_allocate(this%rmax, this%convnmod,
'DRMAX', this%memory_path)
59 call mem_allocate(this%convdvmax, this%convnmod, 0,
'CONVDVMAX', &
61 call mem_allocate(this%convlocdv, this%convnmod, 0,
'CONVLOCDV', &
63 call mem_allocate(this%convrmax, this%convnmod, 0,
'CONVDRMAX', &
65 call mem_allocate(this%convlocr, this%convnmod, 0,
'CONVLOCDR', &
68 call this%set_defaults()
74 integer(I4B) :: niter_max
76 this%nitermax = niter_max
77 call mem_reallocate(this%itinner, niter_max,
'ITINNER', this%memory_path)
78 call mem_reallocate(this%convdvmax, this%convnmod, niter_max,
'CONVDVMAX', &
80 call mem_reallocate(this%convlocdv, this%convnmod, niter_max,
'CONVLOCDV', &
82 call mem_reallocate(this%convrmax, this%convnmod, niter_max,
'CONVDRMAX', &
84 call mem_reallocate(this%convlocr, this%convnmod, niter_max,
'CONVLOCDR', &
87 call this%set_defaults()
96 do i = 1, this%convnmod
103 do i = 1, this%nitermax
105 do j = 1, this%convnmod
106 this%convdvmax(j, i) =
dzero
107 this%convlocdv(j, i) = 0
108 this%convrmax(j, i) =
dzero
109 this%convlocr(j, i) = 0
This module contains simulation constants.
real(dp), parameter dzero
real constant zero
integer(i4b), parameter lenmempath
maximum length of the memory path
subroutine reinit(this, niter_max)
subroutine destroy(this)
Cleanup.
subroutine set_defaults(this)
This module defines variable data types.
This structure stores the generic convergence info for a solution.