Seldon
Installation
Overview
Vectors
Dense Vectors
Sparse Vectors
Distributed Vectors
Functions
Matrices
Dense Matrices
Sparse Matrices
Sparse Complex Matrices
Functions
Sub-Matrices
Distributed Matrices
Miscellaneous
Other Structures
Vector2
Vector3
3-D Array
4-D Array
N-D Array
Allocators
Exceptions
Computations
Blas
Lapack
Direct solvers
Iterative solvers
Eigenvalue solvers
Index
SeldonFlag.hxx
1
#include <list>
2
#include <complex>
3
4
// you choose here the default allocator for non-standard types
5
// for basic types (such as int, float, double, etc), it is MallocAlloc
6
// defined by the class SeldonDefaultAllocator
7
#define SELDON_DEFAULT_ALLOCATOR NewAlloc
8
9
// you choose here if you want to stop the program when an exception is raised
10
// seldon will call abort() when encountering an exception if this flag is set
11
// if you want to catch exceptions, it is better to unset this flag
12
// this flag can also be adjusted in the Makefile
13
#define SELDON_WITH_ABORT
14
15
// if this flag is set, any call to FillRand will not call the function srand()
16
// it is assumed that the user has called srand at the beginning of its program for instance
17
// and he does not want to call again this function for each vector or matrix filled randomly
18
#define SELDON_WITHOUT_REINIT_RANDOM
19
20
// if this flag is set, some virtual functions are present in Seldon
21
// it is usually better because iterative solvers or eigenvalue solvers can be compiled once
22
// and new structures of matrices will not require a new instantiation of these solvers
23
#define SELDON_WITH_VIRTUAL
24
25
// if this flag is set, preconditionings present in Seldon are included
26
#define SELDON_WITH_PRECONDITIONING
27
28
29
// this flag is useful to avoid too many instantiations in Seldon when the functions Mlt/MltAdd/Add are called
30
// it is highly recommended to set this flag
31
#define SELDON_WITH_REDUCED_TEMPLATE
32
33
// float number and complex number in working precision
34
namespace
Seldon
35
{
36
typedef
double
Real_wp;
37
typedef
std::complex<double> Complex_wp;
38
39
// uncomment next line if the working precision is multiple precision (MPFR for example)
40
// #define SELDON_WITH_MULTIPLE
41
}
42
43
// this flag should be used if you cannot call zdotcsub, cdotcsub directly
44
// if this flag is defined the functions cblas_zdotc_sub, etc are called in DotProd (Blas_1.cxx)
45
// #define SELDON_WITHOUT_CBLAS_LIB
46
47
// four levels are present (1, 2, 3, 4)
48
// with the following checks (each next level includes checks of all previous levels)
49
// no flag set : no check is performed
50
// level 1 : Lapack errors, allocations, input/output files present
51
// level 2 : dimensions of vectors/matrices compatible
52
// level 3 : bounds of arrays (when accessing to an element of an array)
53
// level 4 : no additional check
54
// usually this flag is set in the compilation command or in the Makefile
55
// #define SELDON_DEBUG_LEVEL_1
56
57
// this flag is usually defined in the compilation line (-DSELDON_WITH_MPI) or in the Makefile
58
// #define SELDON_WITH_MPI
59
60
// Mpi is included if the flag SELDON_WITH_MPI has been set
61
#ifdef SELDON_WITH_MPI
62
#include "mpi.h"
63
#endif
64
65
// this flag has to be set if you want to write dense vectors/matrices in HDF5 format
66
// #define SELDON_WITH_HDF5
67
68
// this flag can be modified if you want to use another allocator for Vector2
69
// (for the second level SeldonDefaultAllocator is used)
70
// #define SELDON_VECTOR2_DEFAULT_ALLOCATOR_1 NewAlloc
71
72
// this flag can be modified if you want to use another allocator for Vector3 (for the two first levels)
73
// (for the third level SeldonDefaultAllocator is used)
74
// #define SELDON_VECTOR3_DEFAULT_ALLOCATOR_1 NewAlloc
75
// #define SELDON_VECTOR3_DEFAULT_ALLOCATOR_2 NewAlloc
76
77
78
// usually these two defines (Seldon will be interfaced with Blas/Lapack)
79
// are set in the compilation line or in the Makefile
80
// #define SELDON_WITH_BLAS
81
// #define SELDON_WITH_LAPACK
82
83
84
// this flag will activate the interface between Seldon and MKL
85
// mainly sparse Blas functions will be used for matrix-vector and matrix-matrix operations
86
// involving sparse matrices
87
// this flag can also be set in the Makefile
88
// #define SELDON_WITH_MKL
89
90
91
// this flag allows the user to use the parenthesis operator () to modify
92
// sparse matrices such as ArrayRowSparse and ArrayRowSymSparse
93
// A(i, j) = val; will be allowed for these matrices
94
// it is advised to not set this flag and use
95
// A.Get(i, j) = val
96
// such that the access operator () does not modify the matrix in any case
97
// If you have set this flag and you write if (A(i, j) == 3.0)
98
// the non-zero entry (i, j) will be created if it does not exist
99
// #define SELDON_WITH_MODIFIABLE_PARENTHESIS_OPERATOR
100
101
102
// these flags can be set in the Makefile or in the compilation command
103
// they activate the interface between Seldon and the direct solver chosen
104
// #define SELDON_WITH_MUMPS
105
// #define SELDON_WITH_UMFPACK
106
// #define SELDON_WITH_SUPERLU
107
// #define SELDON_WITH_SUPERLU_MT
108
// #define SELDON_WITH_SUPERLU_DIST
109
// #define SELDON_WITH_PASTIX
110
// #define SELDON_WITH_PARDISO
111
// #define SELDON_WITH_WSMP
112
// #define SELDON_WITH_CHOLMOD
113
114
// for solvers compiled in 64-bits, you have to define the following flags
115
// #define PARDISO_INTSIZE64
116
// #define SUPERLU_INTSIZE64
117
// #define UMFPACK_INTSIZE64
118
119
120
// these flags can be set in the Makefile or in the compilation command
121
// they activate the interface between Seldon and the eigenvalue solver chosen
122
// #define SELDON_WITH_ARPACK
123
// #define SELDON_WITH_ANASAZI
124
// #define SELDON_WITH_FEAST
Seldon
Seldon namespace.
Definition:
Array.cxx:24