Thyra  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Thyra_get_Epetra_Operator.cpp
1 // @HEADER
2 // *****************************************************************************
3 // Thyra: Interfaces and Support for Abstract Numerical Algorithms
4 //
5 // Copyright 2004 NTESS and the Thyra contributors.
6 // SPDX-License-Identifier: BSD-3-Clause
7 // *****************************************************************************
8 // @HEADER
9 
10 #include "Thyra_get_Epetra_Operator.hpp"
11 #include "Thyra_EpetraLinearOp.hpp"
12 #include "Teuchos_dyn_cast.hpp"
13 
14 namespace Thyra {
15 
16 template<>
18 get_Epetra_Operator( LinearOpBase<double> &op )
19 {
20  EpetraLinearOp &thyra_epetra_op = Teuchos::dyn_cast<EpetraLinearOp>(op);
21  return thyra_epetra_op.epetra_op();
22 }
23 
24 template<>
26 get_Epetra_Operator( const LinearOpBase<double> &op )
27 {
28  const EpetraLinearOp &thyra_epetra_op = Teuchos::dyn_cast<const EpetraLinearOp>(op);
29  return thyra_epetra_op.epetra_op();
30 }
31 
32 } // namespace Thyra
T_To & dyn_cast(T_From &from)
Teuchos::RCP< Epetra_Operator > get_Epetra_Operator(LinearOpBase< Scalar > &)
Get smart pointer to non-const Epetra_Operator object from reference to a non-const EpetraLinearOp ac...