- 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 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, x, y) solver.SetPrecOperator(prec) solver.SetAztecOption(AztecOO.AZ_solver, AztecOO.AZ_cg); solver.SetAztecOption(AztecOO.AZ_output, 16); err = solver.Iterate(1550, 1e-5) |
|
||
| ||||