[Trilinos-Users] Problems setting AztecOO options when using AztecOO as a smoother inside ML

Jonathan Hu jhu at sandia.gov
Fri May 30 17:34:39 MDT 2008


Rony,

Both options and params must be Teuchos reference-counted pointers 
(RCPs). The following should allow you to use AztecOO as a smoother in ML:

Teuchos::RCP<std::vector<int> > options = rcp(new 
std::vector<int>(AZ_OPTIONS_SIZE));
Teuchos::RCP<std::vector<double> > params = rcp(new 
std::vector<double>(AZ_PARAMS_SIZE));
AZ_defaults(&(*options)[0],&(*params)[0]);
(*options)[AZ_precond] = AZ_dom_decomp;
(*options)[AZ_overlap] = AZ_diag;
(*options)[AZ_subdomain_solve] = AZ_icc;
mlList->set("smoother: Aztec options",options);
mlList->set("smoother: Aztec params",params);

Regards,
Jonathan Hu
> Hello there
>
> I want to use AztecOO's preconditioners as smoothers inside ML.
>
> I use the following code to accomplish this:
>
>     Teuchos::ParameterList mlList;
>     mlList.set("smoother: type", "Aztec");
>
> Then I want to set the options with the following code:
>
>     int options[AZ_OPTIONS_SIZE];
>     double params[AZ_PARAMS_SIZE];
>     AZ_defaults(options, params);
>     options[AZ_precond] = AZ_dom_decomp;
>     options[AZ_overlap] = AZ_diag;
>     options[AZ_subdomain_solve] = AZ_icc;
>
> The code compiles but when I run the program, it exits with the following error message:
>
>     Error, the parameter {name="smoother: Aztec options",type="int*",value="0xbfb56210"}
>     in the parameter (sub)list "ANONYMOUS" exists in the list of valid parameters but has the wrong type.
>
>     The correct type is "RCP<vector>".
>
>     Throw number = 1
>
>     ERROR: ML's Teuchos::ParameterList contains an incorrect parameter!
>
> Has anyone else experienced this?
>
> Thanks in advance
> Rony Speck
>
>   



More information about the Trilinos-Users mailing list