Loading [MathJax]/extensions/tex2jax.js
Plugins
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
super_lu.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2014: G-CSC, Goethe University Frankfurt
3 * Author: Martin Rupp
4 *
5 * This file is part of UG4.
6 *
7 * UG4 is free software: you can redistribute it and/or modify it under the
8 * terms of the GNU Lesser General Public License version 3 (as published by the
9 * Free Software Foundation) with the following additional attribution
10 * requirements (according to LGPL/GPL v3 §7):
11 *
12 * (1) The following notice must be displayed in the Appropriate Legal Notices
13 * of covered and combined works: "Based on UG4 (www.ug4.org/license)".
14 *
15 * (2) The following notice must be displayed at a prominent place in the
16 * terminal output of covered works: "Based on UG4 (www.ug4.org/license)".
17 *
18 * (3) The following bibliography is recommended for citation and must be
19 * preserved in all covered files:
20 * "Reiter, S., Vogel, A., Heppner, I., Rupp, M., and Wittum, G. A massively
21 * parallel geometric multigrid solver on hierarchically distributed grids.
22 * Computing and visualization in science 16, 4 (2013), 151-164"
23 * "Vogel, A., Reiter, S., Rupp, M., Nägel, A., and Wittum, G. UG4 -- a novel
24 * flexible software system for simulating pde based models on high performance
25 * computers. Computing and visualization in science 16, 4 (2013), 165-179"
26 *
27 * This program is distributed in the hope that it will be useful,
28 * but WITHOUT ANY WARRANTY; without even the implied warranty of
29 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
30 * GNU Lesser General Public License for more details.
31 */
32
33/*
34 * http://crd-legacy.lbl.gov/~xiaoye/SuperLU
35 */
36
37#ifndef __H__UG__SUPER_LU_SOLVER__
38#define __H__UG__SUPER_LU_SOLVER__
39
40
41#define SUPERLU_6_EXPERIMENTAL 1
42
44#include <vector>
45
46
47namespace ug{
48
58
59
60IExternalSolverImplementation *CreateSuperLUImplementation(SuperLUConfiguration &config);
61
62
63template<typename TAlgebra>
64class SuperLUSolver : public IExternalSolver<TAlgebra>
65{
68public:
69
70 using IExternalSolver<TAlgebra>::init;
71
80
81 void print_stat(bool b)
82 {
84 }
85
86 void equil(bool b)
87 {
88 config.equil = b;
89 }
90
95
100
105
110
111
113 {
114 return impl->apply(c, d);
115 }
116
117 virtual const char *double_name() const
118 {
119 return impl->name();
120 }
121
122 virtual void double_init(const CPUAlgebra::matrix_type &mat)
123 {
124 impl->init(mat);
125 }
126
127};
128
129} // end namespace ug
130
131#endif
132
virtual bool init(SmartPtr< MatrixOperator< matrix_type, vector_type > > Op)
virtual const char * name() const=0
virtual bool apply(CPUAlgebra::vector_type &c, const CPUAlgebra::vector_type &d)=0
virtual bool init(const CPUAlgebra::matrix_type &A)=0
Definition super_lu.h:65
virtual bool double_apply(CPUAlgebra::vector_type &c, const CPUAlgebra::vector_type &d)
Definition super_lu.h:112
IExternalSolverImplementation * impl
Definition super_lu.h:67
void col_perm_mdo_AT_plus_A()
Definition super_lu.h:101
SuperLUConfiguration config
Definition super_lu.h:66
void print_stat(bool b)
Definition super_lu.h:81
void col_perm_mdo_ATA()
Definition super_lu.h:96
void col_perm_natural()
Definition super_lu.h:91
void equil(bool b)
Definition super_lu.h:86
SuperLUSolver()
Definition super_lu.h:72
void col_perm_approximate()
Definition super_lu.h:106
virtual void double_init(const CPUAlgebra::matrix_type &mat)
Definition super_lu.h:122
virtual const char * double_name() const
Definition super_lu.h:117
IExternalSolverImplementation * CreateSuperLUImplementation(SuperLUConfiguration &config)
Definition super_lu.cpp:281
Definition super_lu.h:50
enum ug::SuperLUConfiguration::@0 colPerm
bool equil
Definition super_lu.h:52
@ CPT_MMD_AT_PLUS_A
Definition super_lu.h:55
@ CPT_MMD_ATA
Definition super_lu.h:55
@ CPT_COLAMD
Definition super_lu.h:55
@ CPT_NATURAL
Definition super_lu.h:55
bool bPrintStat
Definition super_lu.h:51