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
computation
solver
DistributedCholeskySolver.hxx
1
// Copyright (C) 2010 Marc Duruflé
2
//
3
// This file is part of the linear-algebra library Seldon,
4
// http://seldon.sourceforge.net/.
5
//
6
// Seldon is free software; you can redistribute it and/or modify it under the
7
// terms of the GNU Lesser General Public License as published by the Free
8
// Software Foundation; either version 2.1 of the License, or (at your option)
9
// any later version.
10
//
11
// Seldon is distributed in the hope that it will be useful, but WITHOUT ANY
12
// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
13
// FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
14
// more details.
15
//
16
// You should have received a copy of the GNU Lesser General Public License
17
// along with Seldon. If not, see http://www.gnu.org/licenses/.
18
19
20
#ifndef SELDON_FILE_DISTRIBUTED_CHOLESKY_SOLVER_HXX
21
22
23
namespace
Seldon
24
{
25
26
template
<
class
T>
27
class
DistributedCholeskySolver
:
public
SparseCholeskySolver
<T>
28
{
29
protected :
30
typedef
typename
ClassComplexType<T>::Treal Treal;
31
32
#ifdef SELDON_WITH_MPI
33
// data associated with distributed matrix
34
// see DistributedMatrix.hxx for a detailed description
35
int
nodl_scalar_, nb_unknowns_scal_;
36
MPI_Comm comm_;
37
IVect
* ProcSharingRows_;
38
Vector<IVect>
* SharingRowNumbers_;
39
IVect
global_col_numbers, local_col_numbers;
40
41
template
<
class
T2>
42
void
AssembleVec(
Vector<T2>
& X)
const
;
43
44
template
<
class
T2>
45
void
AssembleVec(
Matrix<T2, General, ColMajor>
& A)
const
;
46
#endif
47
48
public :
49
50
DistributedCholeskySolver
();
51
52
template
<
class
Prop0,
class
Storage0,
class
Allocator0>
53
void
Factorize(
Matrix<T, Prop0, Storage0, Allocator0>
& A,
54
bool
keep_matrix =
false
);
55
56
#ifdef SELDON_WITH_MPI
57
template
<
class
Prop0,
class
Storage0,
class
Allocator0>
58
void
Factorize(
DistributedMatrix<T, Prop0, Storage0, Allocator0>
& A,
59
bool
keep_matrix =
false
);
60
61
#endif
62
63
template
<
class
T1>
64
void
Solve(
const
SeldonTranspose
&,
Vector<T1>
& x_solution,
bool
assemble =
true
);
65
66
template
<
class
T1>
67
void
Mlt(
const
SeldonTranspose
&,
Vector<T1>
& x_solution,
bool
assemble =
true
);
68
69
};
70
71
}
// namespace Seldon.
72
73
74
#define SELDON_FILE_DISTRIBUTED_CHOLESKY_SOLVER_HXX
75
#endif
Seldon::DistributedCholeskySolver::DistributedCholeskySolver
DistributedCholeskySolver()
Default constructor.
Definition:
DistributedCholeskySolver.cxx:33
Seldon::SeldonTranspose
Definition:
MatrixFlag.hxx:32
Seldon::DistributedCholeskySolver
Definition:
DistributedCholeskySolver.hxx:27
Seldon::Vector< int, VectFull >
Seldon::Matrix
Definition:
SeldonHeader.hxx:226
Seldon::SparseCholeskySolver
Class grouping different Cholesky solvers.
Definition:
SparseCholeskyFactorisation.hxx:28
Seldon::DistributedMatrix
matrix distributed over all the processors
Definition:
DistributedMatrix.hxx:506
Seldon
Seldon namespace.
Definition:
Array.cxx:24