Tpetra parallel linear algebra Version of the Day
Loading...
Searching...
No Matches
Epetra_TsqrMessenger.hpp
Go to the documentation of this file.
1// @HEADER
2// *****************************************************************************
3// Tpetra: Templated Linear Algebra Services Package
4//
5// Copyright 2008 NTESS and the Tpetra contributors.
6// SPDX-License-Identifier: BSD-3-Clause
7// *****************************************************************************
8// @HEADER
9
24
25#ifndef EPETRA_TSQRMESSENGER_HPP
26#define EPETRA_TSQRMESSENGER_HPP
27
28#include <Tpetra_ConfigDefs.hpp>
29
30#if !defined(TPETRA_ENABLE_DEPRECATED_CODE)
31#error This file is deprecated due to Epetra removal and will be removed
32#endif
33
34#if defined(TPETRA_ENABLE_DEPRECATED_CODE) && defined(HAVE_TPETRA_EPETRA) && defined(HAVE_TPETRA_TSQR)
35
36// Include Epetra's MPI wrappers.
37#include <Epetra_Comm.h>
38
39// Include Teuchos' MPI wrappers.
40#include <Teuchos_Comm.hpp>
41
42#include <Teuchos_RCP.hpp>
43#include <Tsqr_TeuchosMessenger.hpp>
44
45namespace TSQR {
46namespace Epetra {
47
56TPETRA_DEPRECATED_MSG("epetra removal")
57Teuchos::RCP<const Teuchos::Comm<int> >
58extractTeuchosComm(const Teuchos::RCP<const Epetra_Comm>& epetraComm);
59
61template <class Datum>
62TPETRA_DEPRECATED_MSG("epetra removal")
63Teuchos::RCP<TSQR::MessengerBase<Datum> > makeTsqrMessenger(const Teuchos::RCP<const Epetra_Comm>& pComm) {
64 typedef TSQR::MessengerBase<Datum> base_mess_type;
65 typedef TSQR::TeuchosMessenger<Datum> mess_type;
66
67 Teuchos::RCP<mess_type> pMess =
68 Teuchos::rcp(new mess_type(extractTeuchosComm(pComm)));
69 return Teuchos::rcp_implicit_cast<base_mess_type>(pMess);
70}
71} // namespace Epetra
72} // namespace TSQR
73
74#endif // defined(TPETRA_ENABLE_DEPRECATED_CODE) && defined(HAVE_TPETRA_EPETRA) && defined(HAVE_TPETRA_TSQR)
75
76#endif // EPETRA_TSQRMESSENGER_HPP