40 character(len=LENMEMPATH) :: memorypath
42 integer(I4B),
pointer :: id
43 integer(I4B),
pointer :: iu
44 real(dp),
pointer :: ttsoln
45 integer(I4B),
pointer :: icnvg => null()
84 character(len=*),
intent(in) :: filename
85 integer(I4B),
intent(in) :: id
87 integer(I4B) :: inunit
89 character(len=LENSOLUTIONNAME) :: solutionname
93 write (solutionname,
'(a, i0)')
'SLN_', id
94 exp_sol%name = solutionname
96 allocate (exp_sol%modellist)
98 call exp_sol%allocate_scalars()
105 inquire (file=filename, number=inunit)
106 if (inunit < 0) inunit =
getunit()
108 write (
iout,
'(/a,a/)')
' Creating explicit solution (EMS): ', exp_sol%name
112 call exp_sol%parser%Initialize(exp_sol%iu,
iout)
123 call mem_allocate(this%ttsoln,
'TTSOLN', this%memoryPath)
145 call this%parser%Clear()
179 call this%modellist%Clear()
180 deallocate (this%modellist)
191 subroutine sln_ca(this, isgcnvg, isuppress_output)
194 integer(I4B),
intent(inout) :: isgcnvg
195 integer(I4B),
intent(in) :: isuppress_output
198 character(len=LINELENGTH) :: line
199 character(len=LINELENGTH) :: fmt
201 integer(I4B) :: kiter
206 call this%prepareSolve()
210 line =
'mode="validation" -- Skipping assembly and solution.'
212 do im = 1, this%modellist%Count()
214 call mp%model_message(line, fmt=fmt)
219 call this%solve(kiter)
222 call this%finalizeSolve(kiter, isgcnvg, isuppress_output)
236 do im = 1, this%modellist%Count()
250 integer(I4B),
intent(in) :: kiter
257 do im = 1, this%modellist%Count()
259 call mp%model_solve()
270 integer(I4B),
intent(in) :: kiter
271 integer(I4B),
intent(inout) :: isgcnvg
272 integer(I4B),
intent(in) :: isuppress_output
278 do im = 1, this%modellist%Count()
280 call mp%model_cq(this%icnvg, isuppress_output)
284 do im = 1, this%modellist%Count()
286 call mp%model_bd(this%icnvg, isuppress_output)
292 subroutine save(this, filename)
295 character(len=*),
intent(in) :: filename
297 integer(I4B) :: inunit
300 open (unit=inunit, file=filename, status=
'unknown')
301 write (inunit, *)
'The save routine currently writes nothing'
328 models => this%modellist
342 type(
listtype),
pointer :: exchanges
subroutine, public addbasesolutiontolist(list, solution)
This module contains block parser methods.
This module contains simulation constants.
integer(i4b), parameter linelength
maximum length of a standard line
@ mvalidate
validation mode - do not run time steps
@ mnormal
normal output mode
integer(i4b), parameter lensolutionname
maximum length of the solution name
real(dp), parameter dzero
real constant zero
integer(i4b), parameter lenmempath
maximum length of the memory path
Explicit Solution Module.
subroutine preparesolve(this)
@ brief Prepare to solve
type(listtype) function, pointer get_models(this)
Get a pointer to a list of models in the solution.
subroutine, public create_explicit_solution(exp_sol, filename, id)
@ brief Create a new solution
subroutine add_model(this, mp)
@ brief Add explicit model to list
subroutine add_exchange(this, exchange)
@ brief Add exchange to list of exchanges
type(listtype) function, pointer get_exchanges(this)
@ brief Get list of exchanges
subroutine save(this, filename)
@ brief Save output
subroutine finalizesolve(this, kiter, isgcnvg, isuppress_output)
@ brief Finalize solve
subroutine allocate_scalars(this)
@ brief Allocate scalars
This module defines variable data types.
type(listtype), public basesolutionlist
character(len=lenmempath) function create_mem_path(component, subcomponent, context)
returns the path to the memory object
subroutine, public addnumericalmodeltolist(list, model)
class(numericalmodeltype) function, pointer, public getnumericalmodelfromlist(list, idx)
This module contains simulation variables.
integer(i4b) iout
file unit number for simulation output
integer(i4b) isim_mode
simulation mode
subroutine, public code_timer(it, t1, ts)
Get end time and calculate elapsed time.
Highest level model type. All models extend this parent type.
Manages and solves explicit models.
A generic heterogeneous doubly-linked list.