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

Rony Speck speckro at hotmail.com
Tue Jun 3 00:53:30 MDT 2008


Thanks for the hint. After adding the namespace "Teuchos" in front of the rcp call it works.

Regards
Rony

----------------------------------------
> Date: Fri, 30 May 2008 16:34:39 -0700
> From: jhu at sandia.gov
> To: trilinos-users at software.sandia.gov
> Subject: Re: [Trilinos-Users] Problems setting AztecOO options when using AztecOO as a smoother inside ML
> 
> 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> options = rcp(new 
> std::vector(AZ_OPTIONS_SIZE));
> Teuchos::RCP<std::vector> params = rcp(new 
> std::vector(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".
>>
>>     Throw number = 1
>>
>>     ERROR: ML's Teuchos::ParameterList contains an incorrect parameter!
>>
>> Has anyone else experienced this?
>>
>> Thanks in advance
>> Rony Speck
>>
>>   
> 
> _______________________________________________
> Trilinos-Users mailing list
> Trilinos-Users at software.sandia.gov
> http://software.sandia.gov/mailman/listinfo/trilinos-users
> 

_________________________________________________________________
Es ist höchste Zeit dabei zu sein - Holen Sie sich jetzt die neue Generation der Windows Live Services!
http://get.live.com/



More information about the Trilinos-Users mailing list