MathCommand

From Flooxs
Jump to navigation Jump to search

MATH

math - set the math and matrix parameters

Synposis

matrix options

[(diffuse | flow | device | ac.device | smooth)]
[dimension = <n;>]
[(triplet | row | col)]
[(lu | umf | ilu | diag | jacobi)]
[(none | bcgs | gmres)]
[scale]
[tolerance = <n>] [max.iter = <n>]

Description

This command allows the user to specify default options on the matrix packages to be used with different analysis options. It also allows discretization choices to be made for the flow equations - but these are now undocumented because we really don't want users messing with them!

We don't encourage users to experiment with the matrix package settings, since some combinations are inadvisable. We use this more for internal testing and experimentation.

Matrix Options

diffuse, flow, device, ac.device, smooth
The ananlysis type that the rest of the matrix specification applies to.
dimension
The dimensionality of the analysis that the rest of the matrix specification applies to.
triplet, row, col
These are matrix format storage types. Triplet is the standard storage scheme for the (Unsymmetric Multi-Frontal) UMFPACK solver from the University of Florida. Row and col are internal formats that use compressed row and column formats specifically. These can be used with umf or any of the other options.
lu, umf, ilu, diag, jacobi
Specify the type of preconditioner to apply to the system. Lu specifies a full LU decomposition of the matrix. Umf instructs the system to use the UMF package to factor the matrix. ilu, diag, and jacobi are incomplete lu decompostion, diagonal only (scaling), and jacobi (lower triangular) preconditioners.
none, bcgs, gmres
The type of iterative method to use in solving the matrix. none indicates just a for/back solve should be performed, and is useful only with the complete factorization options (lu, umf). Bcgs and gmres implement a bi-conjugate gradient squared and generalized minimum residual algorithms. We've had the best luck with ilu and bcgs.
scale
Apply row and column scaling to the matrix in an attempt to make it better conditioned. This is generally a good idea.
tolerance, max.iter
These parameters control the iterative schemes. Tolerance is the relative accuracy of the solution and max.iter is the maximum number of iterations allowed.

Examples

math diffuse sles ilu bcgs scale

Set the diffuse code to use incomplete decomposition of a scaled matrix with a bi-conjugate gradient iterative technique found in the sles package.

Bugs and Missing Features

None.