Thyra Package Browser (Single Doxygen Collection)  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
EpetraThyraAdaptersTestHelpers.hpp
Go to the documentation of this file.
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 
11 #include "Epetra_SerialComm.h"
12 #ifdef HAVE_MPI
13 # include "Epetra_MpiComm.h"
14 #endif
15 #include "Epetra_Map.h"
16 #include "Epetra_CrsMatrix.h"
17 #include "Teuchos_as.hpp"
18 #include "Teuchos_Array.hpp"
19 #include "Teuchos_RCP.hpp"
20 #include "Teuchos_Comm.hpp"
22 
23 
24 namespace {
25 
26 
27 //
28 // Helper code and declarations
29 //
30 
31 using Teuchos::as;
32 using Teuchos::RCP;
33 using Teuchos::rcp;
34 using Teuchos::Ptr;
35 using Teuchos::outArg;
36 using Teuchos::Array;
37 using Teuchos::Comm;
38 typedef Teuchos_Ordinal Ordinal;
39 
40 
41 int g_localDim = 4;
42 bool g_dumpAll = false;
43 bool g_show_all_tests = false;
44 
45 
47 {
49  "local-dim", &g_localDim, "Local dimension of each vector." );
51  "show-all-tests", "no-show-all-tests", &g_show_all_tests,
52  "Set if all tests are shown or not." );
54  "dump-all", "no-dump-all", &g_dumpAll,
55  "Dump lots of data" );
56 }
57 
58 
59 RCP<const Epetra_Comm> getEpetraComm()
60 {
61 #ifdef HAVE_MPI
62  return rcp(new Epetra_MpiComm(MPI_COMM_WORLD));
63 #else
64  return rcp(new Epetra_SerialComm());
65 #endif
66 }
67 
68 
69 
70 } // namespace
71 
72 #if defined(Thyra_SHOW_DEPRECATED_WARNINGS)
73 #ifdef __GNUC__
74 #warning "The ThyraEpetraAdapters package is deprecated"
75 #endif
76 #endif
77 
static CommandLineProcessor & getCLP()
TEUCHOS_ORDINAL_TYPE Teuchos_Ordinal
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
void setOption(const char option_true[], const char option_false[], bool *option_val, const char documentation[]=NULL)
TypeTo as(const TypeFrom &t)
Teuchos_Ordinal Ordinal