Debian Codegraph @

packages/shylu/shylu_dd/core/src/epetra/shylu_util.h

raw
1 // @HEADER
2 // *****************************************************************************
3 // ShyLU: Scalable Hybrid LU Preconditioner and Solver
4 //
5 // Copyright 2011 NTESS and the ShyLU contributors.
6 // SPDX-License-Identifier: BSD-3-Clause
7 // *****************************************************************************
8 // @HEADER
9
10 /** \file shylu_util.h
11
12 \brief Utilities for ShyLU
13
14 \author Siva Rajamanickam
15
16 */
17 #ifndef SHYLU_UTIL_H
18 #define SHYLU_UTIL_H
19
20 #if defined(ShyLU_DDCore_SHOW_DEPRECATED_WARNINGS)
21 #ifdef __GNUC__
22 #warning "The ShyLU_DDCore package is deprecated"
23 #endif
24 #endif
25
26 #include <assert.h>
27 #include <mpi.h>
28 #include <iostream>
29 #include <sstream>
30
31 // To dump all the matrices into files.
32 //#define DUMP_MATRICES
33
34 //#define TIMING_OUTPUT
35 //
36 #include "ShyLU_DDCore_config.h"
37
38 // Epetra includes
39 #ifdef HAVE_SHYLU_DDCORE_MPI
40 #include "Epetra_MpiComm.h"
41 #else
42 #include "Epetra_SerialComm.h"
43 #endif
44 #include "Epetra_SerialComm.h"
45 #include "Epetra_Time.h"
46 #include "Epetra_CrsMatrix.h"
47 #include "Epetra_Map.h"
48 #include "Epetra_MultiVector.h"
49 #include "Epetra_LinearProblem.h"
50 #include "Epetra_Import.h"
51 #include "Epetra_Export.h"
52
53 // Teuchos includes
54 #include "Teuchos_GlobalMPISession.hpp"
55 #include "Teuchos_XMLParameterListHelpers.hpp"
56 #include "Teuchos_LAPACK.hpp"
57 #include "Teuchos_Time.hpp"
58
59 // EpetraExt includes
60 #include "EpetraExt_RowMatrixOut.h"
61 #include "EpetraExt_MultiVectorOut.h"
62 #include "EpetraExt_CrsMatrixIn.h"
63
64 // Amesos includes
65 #include "Amesos.h"
66 #include "Amesos_BaseSolver.h"
67
68 // AztecOO includes
69 #include "AztecOO.h"
70
71 #include "Isorropia_EpetraProber.hpp"
72
73
74 Epetra_CrsMatrix* balanceAndRedistribute(Epetra_CrsMatrix* A,
75 Teuchos::ParameterList isoList);
76
77 void checkMaps(Epetra_CrsMatrix *A);
78
79 void findLocalColumns(Epetra_CrsMatrix *A, int *gvals, int &SNumGlobalCols);
80
81 void findNarrowSeparator(Epetra_CrsMatrix *A, int *gvals);
82
83 void findBlockElems(Epetra_CrsMatrix *A, int nrows, int *rows, int *gvals,
84 int Lnr, int *LeftElems,
85 int Rnr, int *RightElems, std::string s1, std::string s2, bool cols);
86
87 #ifdef SHYLU_DEBUG
88
89 #define SHYLU_CORE_ASSERT(A) assert(A)
90
91 #else
92
93 #define SHYLU_CORE_ASSERT(A)
94
95 #endif
96
97 #endif //SHYLU_UTIL_H