Xpetra Version of the Day
Loading...
Searching...
No Matches
Xpetra_EpetraMultiVector.cpp
Go to the documentation of this file.
1// @HEADER
2// *****************************************************************************
3// Xpetra: A linear algebra interface package
4//
5// Copyright 2012 NTESS and the Xpetra contributors.
6// SPDX-License-Identifier: BSD-3-Clause
7// *****************************************************************************
8// @HEADER
9
11
14#include "Xpetra_Exceptions.hpp"
15
17
18#include "Epetra_SerialComm.h"
19
20namespace Xpetra {
21
22// specialization for GO=int and NO=EpetraNode
23#ifndef XPETRA_EPETRA_NO_32BIT_GLOBAL_INDICES
25 XPETRA_MONITOR("EpetraMultiVectorT::getVector");
26 return rcp(new Xpetra::EpetraVectorT<int, EpetraNode>(vec_, j)); // See constructor EpetraVectorT(const RCP<EpetraMultiVectorT> &mv, size_t j) for more info
27}
28
31 XPETRA_MONITOR("EpetraMultiVectorT::getVector");
32 return rcp(new EpetraVectorT<int, EpetraNode>(vec_, j)); // See constructor EpetraVectorT(const RCP<EpetraMultiVectorT> &mv, size_t j) for more info
33}
34#endif
35
36// specialization for GO=long long and NO=EpetraNode
37#ifndef XPETRA_EPETRA_NO_64BIT_GLOBAL_INDICES
39 XPETRA_MONITOR("EpetraMultiVectorT::getVector");
40 return rcp(new Xpetra::EpetraVectorT<long long, EpetraNode>(vec_, j)); // See constructor EpetraVectorT(const RCP<EpetraMultiVectorT> &mv, size_t j) for more info
41}
42
45 XPETRA_MONITOR("EpetraMultiVectorT::getVector");
46 return rcp(new EpetraVectorT<long long, EpetraNode>(vec_, j)); // See constructor EpetraVectorT(const RCP<EpetraMultiVectorT> &mv, size_t j) for more info
47}
48#endif
49
50// TODO: move that elsewhere
51template <class GlobalOrdinal, class Node>
54 return *tX.getEpetra_MultiVector();
55}
56
57template <class GlobalOrdinal, class Node>
62//
63
64template <class GlobalOrdinal, class Node>
71
72#ifndef XPETRA_EPETRA_NO_32BIT_GLOBAL_INDICES
73#ifdef HAVE_XPETRA_TPETRA
74#include "TpetraCore_config.h"
75#if ((defined(EPETRA_HAVE_OMP) && !defined(HAVE_TPETRA_INST_OPENMP)) || \
76 (!defined(EPETRA_HAVE_OMP) && !defined(HAVE_TPETRA_INST_SERIAL)))
77template class EpetraMultiVectorT<int, Xpetra::EpetraNode>;
81#endif
82
83#ifdef HAVE_TPETRA_INST_SERIAL
88#endif
89#ifdef HAVE_TPETRA_INST_PTHREAD
94#endif
95#ifdef HAVE_TPETRA_INST_OPENMP
100#endif
101#ifdef HAVE_TPETRA_INST_CUDA
106#endif
107#ifdef HAVE_TPETRA_INST_HIP
112#endif
113#else // Tpetra is disabled
114typedef Xpetra::EpetraNode default_node_type;
119#endif
120#endif
121
122#ifndef XPETRA_EPETRA_NO_64BIT_GLOBAL_INDICES
123#ifdef HAVE_XPETRA_TPETRA
124#include "TpetraCore_config.h"
125#if ((defined(EPETRA_HAVE_OMP) && !defined(HAVE_TPETRA_INST_OPENMP)) || \
126 (!defined(EPETRA_HAVE_OMP) && !defined(HAVE_TPETRA_INST_SERIAL)))
131#endif
132
133#ifdef HAVE_TPETRA_INST_SERIAL
138#endif
139#ifdef HAVE_TPETRA_INST_PTHREAD
144#endif
145#ifdef HAVE_TPETRA_INST_OPENMP
150#endif
151#ifdef HAVE_TPETRA_INST_CUDA
156#endif
157#ifdef HAVE_TPETRA_INST_HIP
162#endif
163#else // Tpetra is disabled
164typedef Xpetra::EpetraNode default_node_type;
169#endif
170#endif
171
172} // namespace Xpetra
#define XPETRA_MONITOR(funcName)
#define XPETRA_DYNAMIC_CAST(type, obj, newObj, exceptionMsg)
bool is_null() const
RCP< Epetra_MultiVector > vec_
The Epetra_MultiVector which this class wraps.
Teuchos::RCP< Vector< double, int, GlobalOrdinal, Node > > getVectorNonConst(size_t j)
Return a Vector which is a nonconst view of column j.
Teuchos::RCP< const Vector< double, int, GlobalOrdinal, Node > > getVector(size_t j) const
Return a Vector which is a const view of column j.
Tpetra::KokkosCompat::KokkosSerialWrapperNode EpetraNode
const Epetra_CrsGraph & toEpetra(const RCP< const CrsGraph< int, GlobalOrdinal, Node > > &graph)
template const Epetra_CrsGraph & toEpetra< long long, Xpetra::EpetraNode >(const RCP< const CrsGraph< int, long long, Xpetra::EpetraNode > > &graph)
RCP< const CrsGraph< int, GlobalOrdinal, Node > > toXpetra(const Epetra_CrsGraph &g)
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
template RCP< const CrsGraph< int, long long, Xpetra::EpetraNode > > toXpetra< long long, Xpetra::EpetraNode >(const Epetra_CrsGraph &g)
template const Epetra_CrsGraph & toEpetra< int, Xpetra::EpetraNode >(const RCP< const CrsGraph< int, int, Xpetra::EpetraNode > > &graph)
template RCP< const CrsGraph< int, int, Xpetra::EpetraNode > > toXpetra< int, Xpetra::EpetraNode >(const Epetra_CrsGraph &g)