MODFLOW 6 version 6.9.0.dev0
USGS Modular Hydrologic Model
Loading...
Searching...
No Matches
numericalsolutionmodule::numericalsolutiontype Type Referenceabstract
Inheritance diagram for numericalsolutionmodule::numericalsolutiontype:
Inheritance graph
Collaboration diagram for numericalsolutionmodule::numericalsolutiontype:
Collaboration graph

Public Member Functions

procedure sln_df (this)
 Define the solution.
procedure sln_ar (this)
 Allocate and read data.
procedure sln_dt (this)
 Calculate delt.
procedure sln_ad (this)
 Advance solution.
procedure sln_ot (this)
 Output solution.
procedure sln_ca (this, isgcnvg, isuppress_output)
 Solve solution.
procedure sln_fp (this)
 Finalize solution.
procedure sln_da (this)
 Deallocate solution.
procedure add_model (this, mp)
 Add a model.
procedure add_exchange (this, exchange)
 Add exchange.
procedure get_models (this)
 Get a list of models.
procedure get_exchanges (this)
 Returns a pointer to the list of exchanges in this solution.
procedure sln_has_converged (this, max_dvc)
procedure sln_package_convergence (this, dpak, cpakout, iend)
 Check package convergence.
procedure sln_sync_newtonur_flag (this, inewtonur)
 Synchronize Newton Under-relaxation flag.
procedure sln_nur_has_converged (this, dxold_max, hncg)
 Custom convergence check for when Newton UR has been applied.
procedure sln_calc_ptc (this, iptc, ptcf)
 Calculate pseudo-transient continuation factor.
procedure sln_underrelax (this, kiter, bigch, neq, active, x, xtemp)
 Under-relaxation.
procedure sln_backtracking_xupdate (this, bt_flag)
 Backtracking update of the dependent variable.
procedure get_backtracking_flag (this)
 Check if backtracking should be applied for this solution,.
procedure apply_backtracking (this)
 Update x with backtracking.
procedure sln_get_idvscale (this)
 Check if dependent variable scalining should be applied for this solution,.
procedure sln_maxval (this, nsize, v, vmax)
 Get the maximum value from a vector.
procedure, public preparesolve (this)
 prepare to solve
procedure, public solve (this, kiter, isuppress_output)
 Build and solve the simulation.
procedure, public finalizesolve (this, kiter, isgcnvg, isuppress_output)
 finalize a solution
procedure(sln_df), deferred sln_df (this)
procedure(sln_ar), deferred sln_ar (this)
procedure(sln_dt), deferred sln_dt (this)
procedure(sln_ad), deferred sln_ad (this)
procedure(sln_ca), deferred sln_ca (this, isgcnvg, isuppress_output)
procedure(sln_ot), deferred sln_ot (this)
procedure(sln_fp), deferred sln_fp (this)
procedure(sln_da), deferred sln_da (this)
procedure(slnaddmodel), deferred add_model (this, mp)
procedure(slnaddexchange), deferred add_exchange (this, exchange)
procedure(slngetmodels), deferred get_models (this)
procedure(slngetexchanges), deferred get_exchanges (this)
procedure(preparesolve), deferred preparesolve (this)
procedure(solve), deferred solve (this, kiter, isuppress_output)
procedure(finalizesolve), deferred finalizesolve (this, kiter, isgcnvg, isuppress_output)

Public Attributes

character(len=lenmempath) memory_path
 the path for storing solution variables in the memory manager
character(len=linelength) fname
 input file name
character(len=16) solver_mode
 the type of solve: sequential, parallel, mayve block, etc.
type(listtype), pointer modellist
 list of models in solution
type(listtype), pointer exchangelist
 list of exchanges in solution
integer(i4b), pointer id
 solution number
integer(i4b), pointer iu
 input file unit
real(dp), pointer ttform
 timer - total formulation time
real(dp), pointer ttsoln
 timer - total solution time
integer(i4b), pointer isymmetric => null()
 flag indicating if matrix symmetry is required
integer(i4b), pointer neq => null()
 number of equations
integer(i4b), pointer matrix_offset => null()
 offset of linear system when part of distributed solution
class(linearsolverbasetype), pointer linear_solver => null()
 the linear solver for this solution
class(matrixbasetype), pointer system_matrix => null()
 sparse A-matrix for the system of equations
class(vectorbasetype), pointer vec_rhs => null()
 the right-hand side vector
class(vectorbasetype), pointer vec_x => null()
 the dependent-variable vector
real(dp), dimension(:), pointer, contiguous rhs => null()
 right-hand side vector values
real(dp), dimension(:), pointer, contiguous x => null()
 dependent-variable vector values
integer(i4b), dimension(:), pointer, contiguous active => null()
 active cell array
real(dp), dimension(:), pointer, contiguous xtemp => null()
 temporary vector for previous dependent-variable iterate
type(blockparsertype) parser
 block parser object
real(dp), pointer theta => null()
 under-relaxation theta
real(dp), pointer akappa => null()
 under-relaxation kappa
real(dp), pointer gamma => null()
 under-relaxation gamma
real(dp), pointer amomentum => null()
 under-relaxation momentum term
real(dp), pointer breduc => null()
 backtracking reduction factor
real(dp), pointer btol => null()
 backtracking tolerance
real(dp), pointer res_lim => null()
 backtracking residual threshold
real(dp), pointer dvclose => null()
 dependent-variable closure criteria
real(dp), pointer bigchold => null()
 cooley under-relaxation weight
real(dp), pointer bigch => null()
 under-relaxation maximum dependent-variable change
real(dp), pointer relaxold => null()
 under-relaxation previous relaxation factor
real(dp), pointer res_prev => null()
 previous L-2 norm
real(dp), pointer res_new => null()
 current L-2 norm
integer(i4b), pointer icnvg => null()
 convergence flag (1) non-convergence (0)
integer(i4b), pointer itertot_timestep => null()
 total nr. of linear solves per call to sln_ca
integer(i4b), pointer iouttot_timestep => null()
 total nr. of outer iterations per call to sln_ca
integer(i4b), pointer itertot_sim => null()
 total nr. of inner iterations for simulation
integer(i4b), pointer mxiter => null()
 maximum number of Picard iterations
integer(i4b), pointer linsolver => null()
 linear solver used (IMS, PETSC, ...)
integer(i4b), pointer nonmeth => null()
 under-relaxation method used
integer(i4b), pointer numtrack => null()
 maximum number of backtracks
integer(i4b), pointer iprims => null()
 solver print option
integer(i4b), pointer ibflag => null()
 backtracking flag (1) on (0) off
integer(i4b), dimension(:, :), pointer, contiguous lrch => null()
 location of the largest dependent-variable change at the end of a Picard iteration
real(dp), dimension(:), pointer, contiguous hncg => null()
 largest dependent-variable change at the end of a Picard iteration
real(dp), dimension(:), pointer, contiguous dxold => null()
 DBD under-relaxation previous dependent-variable change.
real(dp), dimension(:), pointer, contiguous deold => null()
 DBD under-relaxation dependent-variable change variable.
real(dp), dimension(:), pointer, contiguous wsave => null()
 DBD under-relaxation sign-change factor.
real(dp), dimension(:), pointer, contiguous hchold => null()
 DBD under-relaxation weighted dependent-variable change.
character(len=31), dimension(:), pointer, contiguous caccel => null()
 convergence string
integer(i4b), pointer icsvouterout => null()
 Picard iteration CSV output flag and file unit.
integer(i4b), pointer icsvinnerout => null()
 Inner iteration CSV output flag and file unit.
integer(i4b), pointer nitermax => null()
 maximum number of iterations in a time step (maxiter * maxinner)
integer(i4b), pointer convnmod => null()
 number of models in the solution
integer(i4b), dimension(:), pointer, contiguous convmodstart => null()
 pointer to the start of each model in the convmod* arrays
type(convergencesummarytype), pointer cnvg_summary => null()
 details on the convergence behavior within a timestep
type(imslinearsettingstype), pointer linear_settings => null()
 IMS settings for linear solver.
integer(i4b), pointer idv_scale => null()
 flag indicating if the X and right hand side will be scaled
real(dp), pointer dscale => null()
 X and RHS scaling factor (maximum X).
integer(i4b), pointer iallowptc => null()
 flag indicating if ptc applied this time step
integer(i4b), pointer iptcopt => null()
 option for how to calculate the initial PTC value (ptcdel0)
integer(i4b), pointer iptcout => null()
 PTC output flag and file unit.
real(dp), pointer l2norm0 => null()
 L-2 norm at the start of the first Picard iteration.
real(dp), pointer ptcdel => null()
 PTC delta value.
real(dp), pointer ptcdel0 => null()
 initial PTC delta value
real(dp), pointer ptcexp => null()
 PTC exponent.
integer(i4b) tmr_prep_solve
 timer - prepare solve
integer(i4b) tmr_solve
 timer - solve
integer(i4b) tmr_final_solve
 timer - finalize solve
integer(i4b) tmr_formulate
 timer - formulate
integer(i4b) tmr_linsolve
 timer - linear solve
integer(i4b) tmr_flows
 timer - calculate flows
integer(i4b) tmr_budgets
 timer - calculate budgets
character(len=24) id_postfix
 solution id based postfix for timer titles
real(dp), pointer atsfrac => null()
 adaptive time step faction
type(imslineardatatype), pointer imslinear => null()
 IMS linear acceleration object.
type(sparsematrix) sparse
 sparse object
type(tabletype), pointer innertab => null()
 inner iteration table object
type(tabletype), pointer outertab => null()
 Picard iteration table object.
class(*), pointer synchronize_ctx => null()
procedure(synchronize_iface), pointer synchronize => null()
character(len=lensolutionname) name

Private Member Functions

procedure, private sln_connect (this)
 Assign solution connections.
procedure, private sln_reset (this)
 Reset the solution.
procedure, private sln_ls (this, kiter, kstp, kper, in_iter, iptc, ptcf)
 Solve the linear system of equations.
procedure, private sln_setouter (this, ifdparam)
 Set default Picard iteration variables.
procedure, private sln_backtracking (this, mp, cp, kiter)
 Perform backtracking.
procedure, private sln_calcdx (this, neq, active, x, xtemp, dx)
 Calculate dependent-variable change.
procedure, private sln_calc_residual (this, vec_resid)
 Calculate the current residual vector r = A*x - b,.
procedure, private sln_l2norm (this, l2norm)
 Calculate the solution L-2 norm for all active cells using.
procedure, private sln_get_dxmax (this, hncg, lrch)
 Determine maximum dependent-variable change.
procedure, private sln_get_loc (this, nodesln, str)
 Get cell location string.
procedure, private sln_get_nodeu (this, nodesln, im, nodeu)
 Get user node number.
procedure, private allocate_scalars (this)
 Allocate scalars.
procedure, private allocate_arrays (this)
 Allocate arrays.
procedure, private convergence_summary (this, iu, im, itertot_timestep)
 Solution convergence summary.
procedure, private csv_convergence_summary (this, iu, totim, kper, kstp, kouter, niter, istart, kstart)
 Solution convergence CSV summary.
procedure, private sln_buildsystem (this, kiter, inewton)
procedure, private writecsvheader (this)
 CSV header.
procedure, private writeptcinfotofile (this, kper)
 PTC header.

Detailed Description

Definition at line 58 of file NumericalSolution.f90.

Member Function/Subroutine Documentation

◆ add_exchange() [1/2]

procedure(slnaddexchange), deferred basesolutionmodule::basesolutiontype::add_exchange ( class(basesolutiontype) this,
class(baseexchangetype), intent(in), pointer exchange )
pure virtualinherited

Definition at line 28 of file BaseSolution.f90.

◆ add_exchange() [2/2]

procedure numericalsolutionmodule::numericalsolutiontype::add_exchange ( class(numericalsolutiontype) this,
class(baseexchangetype), intent(in), pointer exchange )

Add and exchange to thisexchangelist.

Parameters
thisNumericalSolutionType instance
[in]exchangemodel exchange instance

Definition at line 174 of file NumericalSolution.f90.

◆ add_model() [1/2]

procedure(slnaddmodel), deferred basesolutionmodule::basesolutiontype::add_model ( class(basesolutiontype) this,
class(basemodeltype), intent(in), pointer mp )
pure virtualinherited

Definition at line 27 of file BaseSolution.f90.

◆ add_model() [2/2]

procedure numericalsolutionmodule::numericalsolutiontype::add_model ( class(numericalsolutiontype) this,
class(basemodeltype), intent(in), pointer mp )

Add a model to solution.

Parameters
thisNumericalSolutionType instance
[in]mpmodel instance

Definition at line 173 of file NumericalSolution.f90.

◆ allocate_arrays()

procedure, private numericalsolutionmodule::numericalsolutiontype::allocate_arrays ( class(numericalsolutiontype) this)
private

Allocate arrays for a new solution.

Parameters
thisNumericalSolutionType instance

Definition at line 205 of file NumericalSolution.f90.

◆ allocate_scalars()

procedure, private numericalsolutionmodule::numericalsolutiontype::allocate_scalars ( class(numericalsolutiontype) this)
private

Allocate scalars for a new solution.

Definition at line 204 of file NumericalSolution.f90.

◆ apply_backtracking()

procedure numericalsolutionmodule::numericalsolutiontype::apply_backtracking ( class(numericalsolutiontype) this)
Parameters
thisNumericalSolutionType instance

Definition at line 188 of file NumericalSolution.f90.

◆ convergence_summary()

procedure, private numericalsolutionmodule::numericalsolutiontype::convergence_summary ( class(numericalsolutiontype) this,
integer(i4b), intent(in) iu,
integer(i4b), intent(in) im,
integer(i4b), intent(in) itertot_timestep )
private

Save convergence summary to a File.

Parameters
thisNumericalSolutionType instance
[in]iufile unit number for summary file
[in]immodel number
[in]itertot_timesteptotal iteration for the time step

Definition at line 206 of file NumericalSolution.f90.

◆ csv_convergence_summary()

procedure, private numericalsolutionmodule::numericalsolutiontype::csv_convergence_summary ( class(numericalsolutiontype) this,
integer(i4b), intent(in) iu,
real(dp), intent(in) totim,
integer(i4b), intent(in) kper,
integer(i4b), intent(in) kstp,
integer(i4b), intent(in) kouter,
integer(i4b), intent(in) niter,
integer(i4b), intent(in) istart,
integer(i4b), intent(in) kstart )
private

Save convergence summary to a comma-separated value file.

Parameters
thisNumericalSolutionType instance
[in]iufile unit number
[in]totimtotal simulation time
[in]kperstress period number
[in]kstptime step number
[in]kouternumber of outer (Picard) iterations
[in]niternumber of inner iteration in this time step
[in]istartstarting iteration number for this time step
[in]kstartstarting position in the conv* arrays

Definition at line 207 of file NumericalSolution.f90.

◆ finalizesolve() [1/2]

procedure(finalizesolve), deferred basesolutionmodule::basesolutiontype::finalizesolve ( class(basesolutiontype) this,
integer(i4b), intent(in) kiter,
integer(i4b), intent(inout) isgcnvg,
integer(i4b), intent(in) isuppress_output )
pure virtualinherited

Definition at line 35 of file BaseSolution.f90.

◆ finalizesolve() [2/2]

procedure, public numericalsolutionmodule::numericalsolutiontype::finalizesolve ( class(numericalsolutiontype) this,
integer(i4b), intent(in) kiter,
integer(i4b), intent(inout) isgcnvg,
integer(i4b), intent(in) isuppress_output )

Finalize the solution. Called after the outer iteration loop.

Parameters
thisNumericalSolutionType instance
[in]kiterPicard iteration number after convergence or failure
[in,out]isgcnvgsolution group convergence flag
[in]isuppress_outputflag for suppressing output

Definition at line 215 of file NumericalSolution.f90.

◆ get_backtracking_flag()

procedure numericalsolutionmodule::numericalsolutiontype::get_backtracking_flag ( class(numericalsolutiontype) this)
Parameters
thisNumericalSolutionType instance
Returns
backtracking flag (1) backtracking performed (0) backtracking not performed

Definition at line 187 of file NumericalSolution.f90.

◆ get_exchanges() [1/2]

procedure(slngetexchanges), deferred basesolutionmodule::basesolutiontype::get_exchanges ( class(basesolutiontype) this)
pure virtualinherited

Definition at line 30 of file BaseSolution.f90.

◆ get_exchanges() [2/2]

procedure numericalsolutionmodule::numericalsolutiontype::get_exchanges ( class(numericalsolutiontype) this)
Parameters
thisinstance of the numerical solution
Returns
pointer to the exchange list

Definition at line 176 of file NumericalSolution.f90.

◆ get_models() [1/2]

procedure(slngetmodels), deferred basesolutionmodule::basesolutiontype::get_models ( class(basesolutiontype) this)
pure virtualinherited

Definition at line 29 of file BaseSolution.f90.

◆ get_models() [2/2]

procedure numericalsolutionmodule::numericalsolutiontype::get_models ( class(numericalsolutiontype) this)

Returns a pointer to the list of models in this solution.

Returns
pointer to the model list
Parameters
thisNumericalSolutionType instance

Definition at line 175 of file NumericalSolution.f90.

◆ preparesolve() [1/2]

procedure(preparesolve), deferred basesolutionmodule::basesolutiontype::preparesolve ( class(basesolutiontype) this)
pure virtualinherited

Definition at line 33 of file BaseSolution.f90.

◆ preparesolve() [2/2]

procedure, public numericalsolutionmodule::numericalsolutiontype::preparesolve ( class(numericalsolutiontype) this)

Prepare for the system solve by advancing the simulation.

Parameters
thisNumericalSolutionType instance

Definition at line 213 of file NumericalSolution.f90.

◆ sln_ad() [1/2]

procedure(sln_ad), deferred basesolutionmodule::basesolutiontype::sln_ad ( class(basesolutiontype) this)
pure virtualinherited

Definition at line 21 of file BaseSolution.f90.

◆ sln_ad() [2/2]

procedure numericalsolutionmodule::numericalsolutiontype::sln_ad ( class(numericalsolutiontype) this)

Advance solution.

Parameters
thisNumericalSolutionType instance

Definition at line 168 of file NumericalSolution.f90.

◆ sln_ar() [1/2]

procedure(sln_ar), deferred basesolutionmodule::basesolutiontype::sln_ar ( class(basesolutiontype) this)
pure virtualinherited

Definition at line 19 of file BaseSolution.f90.

◆ sln_ar() [2/2]

procedure numericalsolutionmodule::numericalsolutiontype::sln_ar ( class(numericalsolutiontype) this)

Allocate and read data for a solution.

Parameters
thisNumericalSolutionType instance

Definition at line 166 of file NumericalSolution.f90.

◆ sln_backtracking()

procedure, private numericalsolutionmodule::numericalsolutiontype::sln_backtracking ( class(numericalsolutiontype), intent(inout) this,
class(numericalmodeltype), pointer mp,
class(numericalexchangetype), pointer cp,
integer(i4b), intent(in) kiter )
private

Perform backtracking on the solution in the maximum number of backtrack iterations (nbtrack) is greater than 0 and the backtracking criteria are exceeded.

Parameters
[in,out]thisNumericalSolutionType instance
mpmodel pointer (currently null())
cpexchange pointer (currently null())
[in]kiterPicard iteration number

Definition at line 197 of file NumericalSolution.f90.

◆ sln_backtracking_xupdate()

procedure numericalsolutionmodule::numericalsolutiontype::sln_backtracking_xupdate ( class(numericalsolutiontype), intent(inout) this,
integer(i4b), intent(inout) bt_flag )

Backtracking update of the dependent variable if the calculated backtracking update exceeds the dependent variable closure criteria.

Parameters
[in,out]thisNumericalSolutionType instance
[in,out]bt_flagbacktracking flag (1) backtracking performed (0) backtracking not performed

Definition at line 186 of file NumericalSolution.f90.

◆ sln_buildsystem()

procedure, private numericalsolutionmodule::numericalsolutiontype::sln_buildsystem ( class(numericalsolutiontype) this,
integer(i4b), intent(in) kiter,
integer(i4b), intent(in) inewton )
private

Definition at line 208 of file NumericalSolution.f90.

◆ sln_ca() [1/2]

procedure(sln_ca), deferred basesolutionmodule::basesolutiontype::sln_ca ( class(basesolutiontype) this,
integer(i4b), intent(inout) isgcnvg,
integer(i4b), intent(in) isuppress_output )
pure virtualinherited

Definition at line 22 of file BaseSolution.f90.

◆ sln_ca() [2/2]

procedure numericalsolutionmodule::numericalsolutiontype::sln_ca ( class(numericalsolutiontype) this,
integer(i4b), intent(inout) isgcnvg,
integer(i4b), intent(in) isuppress_output )

Solve the models in this solution for kper and kstp.

Parameters
thisNumericalSolutionType instance
[in,out]isgcnvgsolution group convergence flag
[in]isuppress_outputflag for suppressing output

Definition at line 170 of file NumericalSolution.f90.

◆ sln_calc_ptc()

procedure numericalsolutionmodule::numericalsolutiontype::sln_calc_ptc ( class(numericalsolutiontype) this,
integer(i4b) iptc,
real(dp) ptcf )
Parameters
thisNumericalSolutionType instance
iptcPTC (1) or not (0)
ptcfthe PTC factor calculated

Definition at line 184 of file NumericalSolution.f90.

◆ sln_calc_residual()

procedure, private numericalsolutionmodule::numericalsolutiontype::sln_calc_residual ( class(numericalsolutiontype) this,
class(vectorbasetype), pointer vec_resid )
private
Parameters
thisNumericalSolutionType instance
vec_residthe residual vector

Definition at line 199 of file NumericalSolution.f90.

◆ sln_calcdx()

procedure, private numericalsolutionmodule::numericalsolutiontype::sln_calcdx ( class(numericalsolutiontype), intent(inout) this,
integer(i4b), intent(in) neq,
integer(i4b), dimension(neq), intent(in) active,
real(dp), dimension(neq), intent(in) x,
real(dp), dimension(neq), intent(in) xtemp,
real(dp), dimension(neq), intent(inout) dx )
private

Calculate the dependent-variable change for every cell.

Parameters
[in,out]thisNumericalSolutionType instance
[in]neqnumber of equations
[in]activeactive cell flag (1)
[in]xcurrent dependent-variable
[in]xtempprevious dependent-variable
[in,out]dxdependent-variable change

Definition at line 198 of file NumericalSolution.f90.

◆ sln_connect()

procedure, private numericalsolutionmodule::numericalsolutiontype::sln_connect ( class(numericalsolutiontype) this)
private

Assign solution connections. This is the main workhorse method for a solution. The method goes through all the models and all the connections and builds up the sparse matrix. Steps are (1) add internal model connections, (2) add cross terms, (3) allocate solution arrays, (4) create mapping arrays, and (5) fill cross term values if necessary.

Parameters
thisNumericalSolutionType instance

Definition at line 193 of file NumericalSolution.f90.

◆ sln_da() [1/2]

procedure(sln_da), deferred basesolutionmodule::basesolutiontype::sln_da ( class(basesolutiontype) this)
pure virtualinherited

Definition at line 25 of file BaseSolution.f90.

◆ sln_da() [2/2]

procedure numericalsolutionmodule::numericalsolutiontype::sln_da ( class(numericalsolutiontype) this)

Deallocate a solution.

Parameters
thisNumericalSolutionType instance

Definition at line 172 of file NumericalSolution.f90.

◆ sln_df() [1/2]

procedure(sln_df), deferred basesolutionmodule::basesolutiontype::sln_df ( class(basesolutiontype) this)
pure virtualinherited

Definition at line 18 of file BaseSolution.f90.

◆ sln_df() [2/2]

procedure numericalsolutionmodule::numericalsolutiontype::sln_df ( class(numericalsolutiontype) this)

Define a new solution. Must be called after the models and exchanges have been added to solution. The order of the steps is (1) Allocate neq and nja, (2) Assign model offsets and solution ids, (3) Allocate and initialize the solution arrays, (4) Point each model's x and rhs arrays, and (5) Initialize the sparsematrix instance

Parameters
thisNumericalSolutionType instance

Definition at line 165 of file NumericalSolution.f90.

◆ sln_dt() [1/2]

procedure(sln_dt), deferred basesolutionmodule::basesolutiontype::sln_dt ( class(basesolutiontype) this)
pure virtualinherited

Definition at line 20 of file BaseSolution.f90.

◆ sln_dt() [2/2]

procedure numericalsolutionmodule::numericalsolutiontype::sln_dt ( class(numericalsolutiontype) this)

Calculate time step length.

Parameters
thisNumericalSolutionType instance

Definition at line 167 of file NumericalSolution.f90.

◆ sln_fp() [1/2]

procedure(sln_fp), deferred basesolutionmodule::basesolutiontype::sln_fp ( class(basesolutiontype) this)
pure virtualinherited

Definition at line 24 of file BaseSolution.f90.

◆ sln_fp() [2/2]

procedure numericalsolutionmodule::numericalsolutiontype::sln_fp ( class(numericalsolutiontype) this)

Finalize a solution.

Parameters
thisNumericalSolutionType instance

Definition at line 171 of file NumericalSolution.f90.

◆ sln_get_dxmax()

procedure, private numericalsolutionmodule::numericalsolutiontype::sln_get_dxmax ( class(numericalsolutiontype), intent(inout) this,
real(dp), intent(inout) hncg,
integer(i4b), intent(inout) lrch )
private

Determine the maximum dependent-variable change at the end of a Picard iteration.

Parameters
[in,out]thisNumericalSolutionType instance
[in,out]hncgmaximum dependent-variable change
[in,out]lrchlocation of the maximum dependent-variable change

Definition at line 201 of file NumericalSolution.f90.

◆ sln_get_idvscale()

procedure numericalsolutionmodule::numericalsolutiontype::sln_get_idvscale ( class(numericalsolutiontype) this)
Parameters
thisNumericalSolutionType instance
Returns
backtracking flag (1) backtracking performed (0) backtracking not performed

Definition at line 189 of file NumericalSolution.f90.

◆ sln_get_loc()

procedure, private numericalsolutionmodule::numericalsolutiontype::sln_get_loc ( class(numericalsolutiontype), intent(inout) this,
integer(i4b), intent(in) nodesln,
character(len=*), intent(inout) str )
private

Get the cell location string for the provided solution node number.

Parameters
[in,out]thisNumericalSolutionType instance
[in]nodeslnsolution node number
[in,out]strstring with user node number

Definition at line 202 of file NumericalSolution.f90.

◆ sln_get_nodeu()

procedure, private numericalsolutionmodule::numericalsolutiontype::sln_get_nodeu ( class(numericalsolutiontype), intent(inout) this,
integer(i4b), intent(in) nodesln,
integer(i4b), intent(inout) im,
integer(i4b), intent(inout) nodeu )
private

Get the user node number from a model for the provided solution node number.

Parameters
[in,out]thisNumericalSolutionType instance
[in]nodeslnsolution node number
[in,out]imsolution model index (index in model list for this solution)
[in,out]nodeuuser node number

Definition at line 203 of file NumericalSolution.f90.

◆ sln_has_converged()

procedure numericalsolutionmodule::numericalsolutiontype::sln_has_converged ( class(numericalsolutiontype) this,
real(dp) max_dvc )
Parameters
thisNumericalSolutionType instance
max_dvcthe maximum dependent variable change
Returns
True, when converged

Definition at line 180 of file NumericalSolution.f90.

◆ sln_l2norm()

procedure, private numericalsolutionmodule::numericalsolutiontype::sln_l2norm ( class(numericalsolutiontype) this,
real(dp) l2norm )
private

A = the linear system matrix x = the dependent variable vector b = the right-hand side vector

 r = A * x - b

r_i = 0 if cell i is inactive L2norm = || r ||_2

Parameters
thisNumericalSolutionType instance
l2normcalculated L-2 norm

Definition at line 200 of file NumericalSolution.f90.

◆ sln_ls()

procedure, private numericalsolutionmodule::numericalsolutiontype::sln_ls ( class(numericalsolutiontype), intent(inout) this,
integer(i4b), intent(in) kiter,
integer(i4b), intent(in) kstp,
integer(i4b), intent(in) kper,
integer(i4b), intent(inout) in_iter,
integer(i4b), intent(inout) iptc,
real(dp), intent(in) ptcf )
private

Solve the linear system of equations. Steps include (1) matrix cleanup, (2) add pseudo-transient continuation terms, and (3) residual reduction.

Parameters
[in,out]thisNumericalSolutionType instance

Definition at line 195 of file NumericalSolution.f90.

◆ sln_maxval()

procedure numericalsolutionmodule::numericalsolutiontype::sln_maxval ( class(numericalsolutiontype) this,
integer(i4b), intent(in) nsize,
real(dp), dimension(nsize), intent(in) v,
real(dp), intent(inout) vmax )

Return the maximum value in a vector using a normalized form.

Parameters
thisNumericalSolutionType instance
[in]nsizelength of vector
[in]vinput vector
[in,out]vmaxmaximum value

Definition at line 190 of file NumericalSolution.f90.

◆ sln_nur_has_converged()

procedure numericalsolutionmodule::numericalsolutiontype::sln_nur_has_converged ( class(numericalsolutiontype) this,
real(dp), intent(in) dxold_max,
real(dp), intent(in) hncg )
Parameters
thisNumericalSolutionType instance
[in]dxold_maxthe maximum dependent variable change for unrelaxed cells
[in]hncglargest dep. var. change at end of Picard iteration
Returns
True, when converged

Definition at line 183 of file NumericalSolution.f90.

◆ sln_ot() [1/2]

procedure(sln_ot), deferred basesolutionmodule::basesolutiontype::sln_ot ( class(basesolutiontype) this)
pure virtualinherited

Definition at line 23 of file BaseSolution.f90.

◆ sln_ot() [2/2]

procedure numericalsolutionmodule::numericalsolutiontype::sln_ot ( class(numericalsolutiontype) this)

Output solution data. Currently does nothing.

Parameters
thisNumericalSolutionType instance

Definition at line 169 of file NumericalSolution.f90.

◆ sln_package_convergence()

procedure numericalsolutionmodule::numericalsolutiontype::sln_package_convergence ( class(numericalsolutiontype) this,
real(dp), intent(in) dpak,
character(len=lenpakloc), intent(in) cpakout,
integer(i4b), intent(in) iend )
Parameters
thisNumericalSolutionType instance
[in]dpakNewton Under-relaxation flag
[in]cpakoutstring with package that caused failure
[in]iendflag indicating if last inner iteration (iend=1)

Definition at line 181 of file NumericalSolution.f90.

◆ sln_reset()

procedure, private numericalsolutionmodule::numericalsolutiontype::sln_reset ( class(numericalsolutiontype) this)
private

Reset the solution by setting the coefficient matrix and right-hand side vectors to zero.

Parameters
thisNumericalSolutionType instance

Definition at line 194 of file NumericalSolution.f90.

◆ sln_setouter()

procedure, private numericalsolutionmodule::numericalsolutiontype::sln_setouter ( class(numericalsolutiontype), intent(inout) this,
integer(i4b), intent(in) ifdparam )
private

Set default Picard iteration variables based on passed complexity option.

Parameters
[in,out]thisNumericalSolutionType instance
[in]ifdparamcomplexity option (1) simple (2) moderate (3) complex

Definition at line 196 of file NumericalSolution.f90.

◆ sln_sync_newtonur_flag()

procedure numericalsolutionmodule::numericalsolutiontype::sln_sync_newtonur_flag ( class(numericalsolutiontype) this,
integer(i4b), intent(in) inewtonur )
Parameters
thisNumericalSolutionType instance
[in]inewtonurNewton Under-relaxation flag
Returns
Default is set to current value (1 = under-relaxation applied)

Definition at line 182 of file NumericalSolution.f90.

◆ sln_underrelax()

procedure numericalsolutionmodule::numericalsolutiontype::sln_underrelax ( class(numericalsolutiontype) this,
integer(i4b), intent(in) kiter,
real(dp), intent(in) bigch,
integer(i4b), intent(in) neq,
integer(i4b), dimension(neq), intent(in) active,
real(dp), dimension(neq), intent(inout) x,
real(dp), dimension(neq), intent(in) xtemp )

Under relax using the simple, cooley, or delta-bar-delta methods.

Parameters
thisNumericalSolutionType instance
[in]kiterPicard iteration number
[in]bigchmaximum dependent-variable change
[in]neqnumber of equations
[in]activeactive cell flag (1)
[in,out]xcurrent dependent-variable
[in]xtempprevious dependent-variable

Definition at line 185 of file NumericalSolution.f90.

◆ solve() [1/2]

procedure(solve), deferred basesolutionmodule::basesolutiontype::solve ( class(basesolutiontype) this,
integer(i4b), intent(in) kiter,
integer(i4b), intent(in) isuppress_output )
pure virtualinherited

Definition at line 34 of file BaseSolution.f90.

◆ solve() [2/2]

procedure, public numericalsolutionmodule::numericalsolutiontype::solve ( class(numericalsolutiontype) this,
integer(i4b), intent(in) kiter,
integer(i4b), intent(in) isuppress_output )

Builds and solve the system for this numerical solution. It roughly consists of the following steps (1) backtracking, (2) reset amat and rhs (3) calculate matrix terms (*_cf), (4) add coefficients to matrix (*_fc), (6) newton-raphson, (6) PTC, (7) linear solve, (8) convergence checks, (9) write output, and (10) underrelaxation

Parameters
thisNumericalSolutionType instance
[in]kiterPicard iteration number
[in]isuppress_outputflag for suppressing output

Definition at line 214 of file NumericalSolution.f90.

◆ writecsvheader()

procedure, private numericalsolutionmodule::numericalsolutiontype::writecsvheader ( class(numericalsolutiontype) this)
private

Write header for solver output to comma-separated value files.

Parameters
thisNumericalSolutionType instance

Definition at line 209 of file NumericalSolution.f90.

◆ writeptcinfotofile()

procedure, private numericalsolutionmodule::numericalsolutiontype::writeptcinfotofile ( class(numericalsolutiontype) this,
integer(i4b), intent(in) kper )
private

Write header for pseudo-transient continuation information to a file.

Parameters
thisNumericalSolutionType instance
[in]kpercurrent stress period number

Definition at line 210 of file NumericalSolution.f90.

Member Data Documentation

◆ active

integer(i4b), dimension(:), pointer, contiguous numericalsolutionmodule::numericalsolutiontype::active => null()

Definition at line 77 of file NumericalSolution.f90.

◆ akappa

real(dp), pointer numericalsolutionmodule::numericalsolutiontype::akappa => null()

Definition at line 83 of file NumericalSolution.f90.

◆ amomentum

real(dp), pointer numericalsolutionmodule::numericalsolutiontype::amomentum => null()

Definition at line 85 of file NumericalSolution.f90.

◆ atsfrac

real(dp), pointer numericalsolutionmodule::numericalsolutiontype::atsfrac => null()

Definition at line 148 of file NumericalSolution.f90.

◆ bigch

real(dp), pointer numericalsolutionmodule::numericalsolutiontype::bigch => null()

Definition at line 91 of file NumericalSolution.f90.

◆ bigchold

real(dp), pointer numericalsolutionmodule::numericalsolutiontype::bigchold => null()

Definition at line 90 of file NumericalSolution.f90.

◆ breduc

real(dp), pointer numericalsolutionmodule::numericalsolutiontype::breduc => null()

Definition at line 86 of file NumericalSolution.f90.

◆ btol

real(dp), pointer numericalsolutionmodule::numericalsolutiontype::btol => null()

Definition at line 87 of file NumericalSolution.f90.

◆ caccel

character(len=31), dimension(:), pointer, contiguous numericalsolutionmodule::numericalsolutiontype::caccel => null()

Definition at line 113 of file NumericalSolution.f90.

◆ cnvg_summary

type(convergencesummarytype), pointer numericalsolutionmodule::numericalsolutiontype::cnvg_summary => null()

Definition at line 121 of file NumericalSolution.f90.

◆ convmodstart

integer(i4b), dimension(:), pointer, contiguous numericalsolutionmodule::numericalsolutiontype::convmodstart => null()

Definition at line 118 of file NumericalSolution.f90.

◆ convnmod

integer(i4b), pointer numericalsolutionmodule::numericalsolutiontype::convnmod => null()

Definition at line 117 of file NumericalSolution.f90.

◆ deold

real(dp), dimension(:), pointer, contiguous numericalsolutionmodule::numericalsolutiontype::deold => null()

Definition at line 108 of file NumericalSolution.f90.

◆ dscale

real(dp), pointer numericalsolutionmodule::numericalsolutiontype::dscale => null()

Definition at line 126 of file NumericalSolution.f90.

◆ dvclose

real(dp), pointer numericalsolutionmodule::numericalsolutiontype::dvclose => null()

Definition at line 89 of file NumericalSolution.f90.

◆ dxold

real(dp), dimension(:), pointer, contiguous numericalsolutionmodule::numericalsolutiontype::dxold => null()

Definition at line 107 of file NumericalSolution.f90.

◆ exchangelist

type(listtype), pointer numericalsolutionmodule::numericalsolutiontype::exchangelist

Definition at line 63 of file NumericalSolution.f90.

63 type(ListType), pointer :: exchangelist !< list of exchanges in solution

◆ fname

character(len=linelength) numericalsolutionmodule::numericalsolutiontype::fname

Definition at line 60 of file NumericalSolution.f90.

60 character(len=LINELENGTH) :: fname !< input file name

◆ gamma

real(dp), pointer numericalsolutionmodule::numericalsolutiontype::gamma => null()

Definition at line 84 of file NumericalSolution.f90.

◆ hchold

real(dp), dimension(:), pointer, contiguous numericalsolutionmodule::numericalsolutiontype::hchold => null()

Definition at line 110 of file NumericalSolution.f90.

◆ hncg

real(dp), dimension(:), pointer, contiguous numericalsolutionmodule::numericalsolutiontype::hncg => null()

Definition at line 106 of file NumericalSolution.f90.

◆ iallowptc

integer(i4b), pointer numericalsolutionmodule::numericalsolutiontype::iallowptc => null()

Definition at line 129 of file NumericalSolution.f90.

◆ ibflag

integer(i4b), pointer numericalsolutionmodule::numericalsolutiontype::ibflag => null()

Definition at line 104 of file NumericalSolution.f90.

◆ icnvg

integer(i4b), pointer numericalsolutionmodule::numericalsolutiontype::icnvg => null()

Definition at line 95 of file NumericalSolution.f90.

◆ icsvinnerout

integer(i4b), pointer numericalsolutionmodule::numericalsolutiontype::icsvinnerout => null()

Definition at line 115 of file NumericalSolution.f90.

◆ icsvouterout

integer(i4b), pointer numericalsolutionmodule::numericalsolutiontype::icsvouterout => null()

Definition at line 114 of file NumericalSolution.f90.

◆ id

integer(i4b), pointer numericalsolutionmodule::numericalsolutiontype::id

Definition at line 64 of file NumericalSolution.f90.

64 integer(I4B), pointer :: id !< solution number

◆ id_postfix

character(len=24) numericalsolutionmodule::numericalsolutiontype::id_postfix

Definition at line 145 of file NumericalSolution.f90.

145 character(len=24) :: id_postfix !< solution id based postfix for timer titles

◆ idv_scale

integer(i4b), pointer numericalsolutionmodule::numericalsolutiontype::idv_scale => null()

Definition at line 125 of file NumericalSolution.f90.

◆ imslinear

type(imslineardatatype), pointer numericalsolutionmodule::numericalsolutiontype::imslinear => null()

Definition at line 151 of file NumericalSolution.f90.

◆ innertab

type(tabletype), pointer numericalsolutionmodule::numericalsolutiontype::innertab => null()

Definition at line 157 of file NumericalSolution.f90.

◆ iouttot_timestep

integer(i4b), pointer numericalsolutionmodule::numericalsolutiontype::iouttot_timestep => null()

Definition at line 97 of file NumericalSolution.f90.

◆ iprims

integer(i4b), pointer numericalsolutionmodule::numericalsolutiontype::iprims => null()

Definition at line 103 of file NumericalSolution.f90.

◆ iptcopt

integer(i4b), pointer numericalsolutionmodule::numericalsolutiontype::iptcopt => null()

Definition at line 130 of file NumericalSolution.f90.

◆ iptcout

integer(i4b), pointer numericalsolutionmodule::numericalsolutiontype::iptcout => null()

Definition at line 131 of file NumericalSolution.f90.

◆ isymmetric

integer(i4b), pointer numericalsolutionmodule::numericalsolutiontype::isymmetric => null()

Definition at line 68 of file NumericalSolution.f90.

◆ itertot_sim

integer(i4b), pointer numericalsolutionmodule::numericalsolutiontype::itertot_sim => null()

Definition at line 98 of file NumericalSolution.f90.

◆ itertot_timestep

integer(i4b), pointer numericalsolutionmodule::numericalsolutiontype::itertot_timestep => null()

Definition at line 96 of file NumericalSolution.f90.

◆ iu

integer(i4b), pointer numericalsolutionmodule::numericalsolutiontype::iu

Definition at line 65 of file NumericalSolution.f90.

65 integer(I4B), pointer :: iu !< input file unit

◆ l2norm0

real(dp), pointer numericalsolutionmodule::numericalsolutiontype::l2norm0 => null()

Definition at line 132 of file NumericalSolution.f90.

◆ linear_settings

type(imslinearsettingstype), pointer numericalsolutionmodule::numericalsolutiontype::linear_settings => null()

Definition at line 122 of file NumericalSolution.f90.

◆ linear_solver

class(linearsolverbasetype), pointer numericalsolutionmodule::numericalsolutiontype::linear_solver => null()

Definition at line 71 of file NumericalSolution.f90.

◆ linsolver

integer(i4b), pointer numericalsolutionmodule::numericalsolutiontype::linsolver => null()

Definition at line 100 of file NumericalSolution.f90.

◆ lrch

integer(i4b), dimension(:, :), pointer, contiguous numericalsolutionmodule::numericalsolutiontype::lrch => null()

Definition at line 105 of file NumericalSolution.f90.

◆ matrix_offset

integer(i4b), pointer numericalsolutionmodule::numericalsolutiontype::matrix_offset => null()

Definition at line 70 of file NumericalSolution.f90.

◆ memory_path

character(len=lenmempath) numericalsolutionmodule::numericalsolutiontype::memory_path

Definition at line 59 of file NumericalSolution.f90.

59 character(len=LENMEMPATH) :: memory_path !< the path for storing solution variables in the memory manager

◆ modellist

type(listtype), pointer numericalsolutionmodule::numericalsolutiontype::modellist

Definition at line 62 of file NumericalSolution.f90.

62 type(ListType), pointer :: modellist !< list of models in solution

◆ mxiter

integer(i4b), pointer numericalsolutionmodule::numericalsolutiontype::mxiter => null()

Definition at line 99 of file NumericalSolution.f90.

◆ name

character(len=lensolutionname) basesolutionmodule::basesolutiontype::name
inherited

Definition at line 16 of file BaseSolution.f90.

16 character(len=LENSOLUTIONNAME) :: name

◆ neq

integer(i4b), pointer numericalsolutionmodule::numericalsolutiontype::neq => null()

Definition at line 69 of file NumericalSolution.f90.

◆ nitermax

integer(i4b), pointer numericalsolutionmodule::numericalsolutiontype::nitermax => null()

Definition at line 116 of file NumericalSolution.f90.

◆ nonmeth

integer(i4b), pointer numericalsolutionmodule::numericalsolutiontype::nonmeth => null()

Definition at line 101 of file NumericalSolution.f90.

◆ numtrack

integer(i4b), pointer numericalsolutionmodule::numericalsolutiontype::numtrack => null()

Definition at line 102 of file NumericalSolution.f90.

◆ outertab

type(tabletype), pointer numericalsolutionmodule::numericalsolutiontype::outertab => null()

Definition at line 158 of file NumericalSolution.f90.

◆ parser

type(blockparsertype) numericalsolutionmodule::numericalsolutiontype::parser

Definition at line 79 of file NumericalSolution.f90.

79 type(BlockParserType) :: parser !< block parser object

◆ ptcdel

real(dp), pointer numericalsolutionmodule::numericalsolutiontype::ptcdel => null()

Definition at line 133 of file NumericalSolution.f90.

◆ ptcdel0

real(dp), pointer numericalsolutionmodule::numericalsolutiontype::ptcdel0 => null()

Definition at line 134 of file NumericalSolution.f90.

◆ ptcexp

real(dp), pointer numericalsolutionmodule::numericalsolutiontype::ptcexp => null()

Definition at line 135 of file NumericalSolution.f90.

◆ relaxold

real(dp), pointer numericalsolutionmodule::numericalsolutiontype::relaxold => null()

Definition at line 92 of file NumericalSolution.f90.

◆ res_lim

real(dp), pointer numericalsolutionmodule::numericalsolutiontype::res_lim => null()

Definition at line 88 of file NumericalSolution.f90.

◆ res_new

real(dp), pointer numericalsolutionmodule::numericalsolutiontype::res_new => null()

Definition at line 94 of file NumericalSolution.f90.

◆ res_prev

real(dp), pointer numericalsolutionmodule::numericalsolutiontype::res_prev => null()

Definition at line 93 of file NumericalSolution.f90.

◆ rhs

real(dp), dimension(:), pointer, contiguous numericalsolutionmodule::numericalsolutiontype::rhs => null()

Definition at line 75 of file NumericalSolution.f90.

◆ solver_mode

character(len=16) numericalsolutionmodule::numericalsolutiontype::solver_mode

Definition at line 61 of file NumericalSolution.f90.

61 character(len=16) :: solver_mode !< the type of solve: sequential, parallel, mayve block, etc.

◆ sparse

type(sparsematrix) numericalsolutionmodule::numericalsolutiontype::sparse

Definition at line 154 of file NumericalSolution.f90.

154 type(sparsematrix) :: sparse !< sparse object

◆ synchronize

procedure(synchronize_iface), pointer numericalsolutionmodule::numericalsolutiontype::synchronize => null()

Definition at line 162 of file NumericalSolution.f90.

◆ synchronize_ctx

class(*), pointer numericalsolutionmodule::numericalsolutiontype::synchronize_ctx => null()

Definition at line 161 of file NumericalSolution.f90.

◆ system_matrix

class(matrixbasetype), pointer numericalsolutionmodule::numericalsolutiontype::system_matrix => null()

Definition at line 72 of file NumericalSolution.f90.

◆ theta

real(dp), pointer numericalsolutionmodule::numericalsolutiontype::theta => null()

Definition at line 82 of file NumericalSolution.f90.

◆ tmr_budgets

integer(i4b) numericalsolutionmodule::numericalsolutiontype::tmr_budgets

Definition at line 144 of file NumericalSolution.f90.

144 integer(I4B) :: tmr_budgets !< timer - calculate budgets

◆ tmr_final_solve

integer(i4b) numericalsolutionmodule::numericalsolutiontype::tmr_final_solve

Definition at line 140 of file NumericalSolution.f90.

140 integer(I4B) :: tmr_final_solve !< timer - finalize solve

◆ tmr_flows

integer(i4b) numericalsolutionmodule::numericalsolutiontype::tmr_flows

Definition at line 143 of file NumericalSolution.f90.

143 integer(I4B) :: tmr_flows !< timer - calculate flows

◆ tmr_formulate

integer(i4b) numericalsolutionmodule::numericalsolutiontype::tmr_formulate

Definition at line 141 of file NumericalSolution.f90.

141 integer(I4B) :: tmr_formulate !< timer - formulate

◆ tmr_linsolve

integer(i4b) numericalsolutionmodule::numericalsolutiontype::tmr_linsolve

Definition at line 142 of file NumericalSolution.f90.

142 integer(I4B) :: tmr_linsolve !< timer - linear solve

◆ tmr_prep_solve

integer(i4b) numericalsolutionmodule::numericalsolutiontype::tmr_prep_solve

Definition at line 138 of file NumericalSolution.f90.

138 integer(I4B) :: tmr_prep_solve !< timer - prepare solve

◆ tmr_solve

integer(i4b) numericalsolutionmodule::numericalsolutiontype::tmr_solve

Definition at line 139 of file NumericalSolution.f90.

139 integer(I4B) :: tmr_solve !< timer - solve

◆ ttform

real(dp), pointer numericalsolutionmodule::numericalsolutiontype::ttform

Definition at line 66 of file NumericalSolution.f90.

66 real(DP), pointer :: ttform !< timer - total formulation time

◆ ttsoln

real(dp), pointer numericalsolutionmodule::numericalsolutiontype::ttsoln

Definition at line 67 of file NumericalSolution.f90.

67 real(DP), pointer :: ttsoln !< timer - total solution time

◆ vec_rhs

class(vectorbasetype), pointer numericalsolutionmodule::numericalsolutiontype::vec_rhs => null()

Definition at line 73 of file NumericalSolution.f90.

◆ vec_x

class(vectorbasetype), pointer numericalsolutionmodule::numericalsolutiontype::vec_x => null()

Definition at line 74 of file NumericalSolution.f90.

◆ wsave

real(dp), dimension(:), pointer, contiguous numericalsolutionmodule::numericalsolutiontype::wsave => null()

Definition at line 109 of file NumericalSolution.f90.

◆ x

real(dp), dimension(:), pointer, contiguous numericalsolutionmodule::numericalsolutiontype::x => null()

Definition at line 76 of file NumericalSolution.f90.

◆ xtemp

real(dp), dimension(:), pointer, contiguous numericalsolutionmodule::numericalsolutiontype::xtemp => null()

Definition at line 78 of file NumericalSolution.f90.


The documentation for this type was generated from the following file: