Difference between revisions of "Using GridPACK"
From GridPACK
AlfredNewman (talk | contribs) (Created page with "---This Page Under Construction---") |
(Start to describe solver options.) |
||
Line 1: | Line 1: | ||
---This Page Under Construction--- | ---This Page Under Construction--- | ||
+ | == Configuration == | ||
+ | |||
+ | === Math Library Configuration === | ||
+ | |||
+ | * XML Tags | ||
+ | * Global PETSc options are read from <tt>gridpack.petscrc</tt> if it exists in the current working directory. | ||
+ | |||
+ | ==== Linear Solver ==== | ||
+ | GridPACK applications that use instances of the <nowiki>LinearSolver</nowiki> class are configured using the <tt><nowiki><LinearSolver></nowiki></tt> XML tag. The contents of the <tt><nowiki><LinearSolver></nowiki></tt> tag can containing any of the following tags: | ||
+ | * <tt><nowiki><MaxIterations></nowiki></tt> (integer) which indicates the maximum number of iterations the linear solver is to perform. When using a direct method, the contents of this tag should be "1". | ||
+ | * <tt><nowiki><SolutionTolerance></nowiki></tt> (real) the absolute residual of the linear system below which the system is considered solved and iterations stop. | ||
+ | * <tt><nowiki><RelativeTolerance></nowiki></tt> (real) the relative change in solution residuals below which the system is considered solved and iterations stop. | ||
+ | * <tt><nowiki><PETScOptions></nowiki></tt> (string) PETSc options, formatted as command line options, used to specify solver methods. | ||
+ | * <tt><nowiki><PETScPrefix></nowiki></tt> (string) a prefix that is to be added to options specified in the <tt><nowiki>PETScOptions</nowiki></tt>. | ||
+ | |||
+ | {| class="wikitable" style="text-align: left;" | ||
+ | ! Method | ||
+ | ! <tt><PETScOptions></tt> Contents | ||
+ | ! Notes | ||
+ | |||
+ | |- | ||
+ | | LU (serial) | ||
+ | | | ||
+ | -ksp_type pc_only | ||
+ | -pc_type lu | ||
+ | -pc_factor_mat_solver_package petsc | ||
+ | | <tt><MaxIterations></tt> should be 1. | ||
+ | |- | ||
+ | | LU (parallel) | ||
+ | | | ||
+ | -ksp_type richardson | ||
+ | -pc_type lu | ||
+ | -pc_factor_mat_solver_package superlu_dist | ||
+ | |<tt><MaxIterations></tt> should be 1. | ||
+ | |||
+ | |} | ||
+ | ==== Nonlinear Solver ==== | ||
+ | |||
+ | ==== Newton Raphson Solver ==== | ||
+ | |||
+ | |||
+ | ==== DAE Solver ==== |
Revision as of 20:08, 31 March 2014
---This Page Under Construction---
Contents
Configuration
Math Library Configuration
- XML Tags
- Global PETSc options are read from gridpack.petscrc if it exists in the current working directory.
Linear Solver
GridPACK applications that use instances of the LinearSolver class are configured using the <LinearSolver> XML tag. The contents of the <LinearSolver> tag can containing any of the following tags:
- <MaxIterations> (integer) which indicates the maximum number of iterations the linear solver is to perform. When using a direct method, the contents of this tag should be "1".
- <SolutionTolerance> (real) the absolute residual of the linear system below which the system is considered solved and iterations stop.
- <RelativeTolerance> (real) the relative change in solution residuals below which the system is considered solved and iterations stop.
- <PETScOptions> (string) PETSc options, formatted as command line options, used to specify solver methods.
- <PETScPrefix> (string) a prefix that is to be added to options specified in the PETScOptions.
Method | <PETScOptions> Contents | Notes |
---|---|---|
LU (serial) |
-ksp_type pc_only -pc_type lu -pc_factor_mat_solver_package petsc |
<MaxIterations> should be 1. |
LU (parallel) |
-ksp_type richardson -pc_type lu -pc_factor_mat_solver_package superlu_dist |
<MaxIterations> should be 1. |