- Works the same in Explorer (tested only on 6.0) and Netscape (tested only on Netscape 7.0 and Mozilla 1.3.1), but does not work in Opera (6.01) ***************************************************************************** */ if (document.images) { // tests for image support trilinos_title_normal = new Image(310, 55); trilinos_title_normal.src = "../../../packages/common/webroot_common/trilinos_title_normal.png"; trilinos_title_over = new Image(310, 55); trilinos_title_over.src = "../../../packages/common/webroot_common/trilinos_title_over.png"; sandia_normal = new Image(180, 29); sandia_normal.src = "../../../packages/common/webroot_common/sandia_normal.png"; sandia_over = new Image(180, 29); sandia_over.src = "../../../packages/common/webroot_common/sandia_over.png"; trilinos_normal = new Image(183, 100); trilinos_normal.src = "../../../packages/common/webroot_common/trilinos_normal.png"; trilinos_over = new Image(183, 100); trilinos_over.src = "../../../packages/common/webroot_common/trilinos_over.png"; } // if (document.images) //-->
|
PyTrilinos.MLThe most notable difference between ML and its Python module is in the construction of the preconditioner. Given an Epetra.RowMatrix object (say, A), first you need a set of parameters, specified in a Python dictionary:
MLList = {"max levels" : 3,
"output" : 10,
"smoother: type" : "symmetric Gauss-Seidel",
"aggregation: type" : "Uncoupled"
}
All parameters are specified as in C++; please check the ML page page for more details. Then, you can create the preconditioner (derived from the Epetra.Operator class) as follows: Prec = ML.MultiLevelPreconditioner(A, False) Prec.SetParameterList(MLList) Prec.ComputePreconditioner() Note that you first need to instantiate Prec using False, then let Prec parse the parameters contained in MLList, and finally build the preconditioner. Using Prec as a preconditioner for AztecOO may be done as simply as: Solver = AztecOO.AztecOO(A, LHS, RHS) Solver.SetPrecOperator(Prec) Solver.SetAztecOption(AztecOO.AZ_solver, AztecOO.AZ_cg); Solver.SetAztecOption(AztecOO.AZ_output, 16); err = Solver.Iterate(1550, 1e-5) |
|
||
| ||||