[Trilinos-Users] [EXTERNAL] using ifpack2
Andrey Prokopenko
aprokop at sandia.gov
Sun Dec 14 13:14:11 MST 2014
Hi Mike,
The second argument is being passed by reference, so it does not
automatically do the const cast. Try declaring mat as RCP<const
crs_matrix_type> or doing the rcp_const_cast before calling Ifpack2.
-Andrey
On 12/14/2014 09:34 AM, Mike Atambo wrote:
>
> im using trilinos 11.12.1 and im having some trouble compiling a
> piece of code:
> here is the error message:
>
> trilinos_anasazi_ifp_david.cxx(292): error: no instance of
> overloaded function "Ifpack2::Factory::create" matches the argument list
> argument types are: (std::string,
> Teuchos::RCP<Tpetra::CrsMatrix<double, int, int,
> KokkosClassic::DefaultNode::DefaultNodeType>>)
> object type is: Ifpack2::Factory
> Teuchos::RCP<prec_type> prec = factory.create ( precType, mat );
>
> make: *** [ifpdanasazi.x] Error 2
> ^
> prec_type, precType and mat are defined as:
>
> typedef Ifpack2::Preconditioner<complex_scalar, local_ordinal_type,
> global_ordinal_type, Node> prec_type
>
> std::string precType = "ILUT";
>
> typedef Tpetra::CrsMatrix<complex_scalar , local_ordinal_type,
> global_ordinal_type, Node> crs_matrix_type ;
>
> RCP<crs_matrix_type> mat = rcp (new crs_matrix_type
> (EqualMatDistribution, 0, Tpetra::DynamicProfile ));
>
> The installation seems fine, and i was able to run an eigenvalue
> problem using the LOBPCG and Tpetra, and one if the examples on
> belos using ifpack2 preconditioner works well
>
>
>
> Regards
> Mike
>
>
>
> _______________________________________________
> Trilinos-Users mailing list
> Trilinos-Users at software.sandia.gov
> https://software.sandia.gov/mailman/listinfo/trilinos-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://software.sandia.gov/pipermail/trilinos-users/attachments/20141214/86e0f2f8/attachment.html>
More information about the Trilinos-Users
mailing list