Tpetra parallel linear algebra Version of the Day
Loading...
Searching...
No Matches
Tpetra_Core.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
10#ifndef TPETRA_CORE_HPP
11#define TPETRA_CORE_HPP
12
21
22#include <Tpetra_ConfigDefs.hpp>
23#include <Teuchos_Comm.hpp>
24#ifdef HAVE_TPETRACORE_MPI
25#include "mpi.h"
26#endif // HAVE_TPETRACORE_MPI
27
28namespace Tpetra {
29
39Teuchos::RCP<const Teuchos::Comm<int> > getDefaultComm();
40
47bool isInitialized();
48
74void initialize(int* argc, char*** argv);
75
76#ifdef HAVE_TPETRA_MPI
102void initialize(int* argc, char*** argv, MPI_Comm comm);
103#endif // HAVE_TPETRA_MPI
104
134void initialize(int* argc, char*** argv,
135 const Teuchos::RCP<const Teuchos::Comm<int> >& comm);
136
147void finalize();
148
189 public:
197 ScopeGuard(int* argc, char*** argv);
198
199#ifdef HAVE_TPETRA_MPI
211 ScopeGuard(int* argc, char*** argv, MPI_Comm comm);
212#endif // HAVE_TPETRA_MPI
213
218 ScopeGuard() = delete;
219
225 ~ScopeGuard();
226};
227
228} // namespace Tpetra
229
230#endif // TPETRA_CORE_HPP
Struct that holds views of the contents of a CrsMatrix.
Scope guard whose destructor automatically calls Tpetra::finalize for you.
ScopeGuard()=delete
Default constructor (FORBIDDEN)
~ScopeGuard()
Finalize Tpetra.
Namespace Tpetra contains the class and methods constituting the Tpetra library.
void initialize(int *argc, char ***argv)
Initialize Tpetra.
bool isInitialized()
Whether Tpetra is in an initialized state.
void finalize()
Finalize Tpetra.
Teuchos::RCP< const Teuchos::Comm< int > > getDefaultComm()
Get Tpetra's default communicator.