Thyra Version of the Day
Loading...
Searching...
No Matches
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
14namespace Thyra {
15
16template<>
18get_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
24template<>
26get_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)