fixed writing out entries in advective bc
[OpenFOAM-1.6-ext.git] / src / VectorN / OpenFOAM / BlockLduMatrices / blockVectorNSolvers.C
blob44336037e581fb60269dd4c9c7cab4cacc79fc09
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 2004-6 H. Jasak All rights reserved
6      \\/     M anipulation  |
7 -------------------------------------------------------------------------------
8 License
9     This file is part of OpenFOAM.
11     OpenFOAM is free software; you can redistribute it and/or modify it
12     under the terms of the GNU General Public License as published by the
13     Free Software Foundation; either version 2 of the License, or (at your
14     option) any later version.
16     OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
19     for more details.
21     You should have received a copy of the GNU General Public License
22     along with OpenFOAM; if not, write to the Free Software Foundation,
23     Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25 \*---------------------------------------------------------------------------*/
27 #include "blockLduMatrices.H"
28 #include "addToRunTimeSelectionTable.H"
30 #include "blockLduPrecons.H"
31 #include "BlockNoPrecon.H"
32 #include "blockDiagonalPrecons.H"
33 #include "blockGaussSeidelPrecons.H"
34 #include "BlockCholeskyPrecon.H"
36 #include "blockLduSmoothers.H"
37 #include "blockGaussSeidelSmoothers.H"
38 #include "BlockILUSmoother.H"
40 #include "blockLduSolvers.H"
41 #include "BlockDiagonalSolver.H"
42 #include "BlockBiCGStabSolver.H"
43 #include "BlockCGSolver.H"
44 #include "BlockGaussSeidelSolver.H"
45 #include "BlockGMRESSolver.H"
47 #include "VectorTensorNFields.H"
48 #include "ExpandTensorN.H"
49 #include "ExpandTensorNField.H"
50 #include "VectorNFieldTypes.H"
52 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
54 namespace Foam
57 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
59 #define makeSolver(type, Type, args...)                                       \
60 /* Preconditioners */                                                         \
61 typedef BlockLduPrecon<type > block##Type##Precon;                            \
62 defineNamedTemplateTypeNameAndDebug(block##Type##Precon, 0);                  \
63 defineTemplateRunTimeSelectionTable(block##Type##Precon, dictionary);         \
64                                                                               \
65 typedef BlockNoPrecon<type > block##Type##NoPrecon;                           \
66 makeBlockPrecon(block##Type##Precon, block##Type##NoPrecon);                  \
67                                                                               \
68 typedef BlockDiagonalPrecon<type > block##Type##DiagonalPrecon;               \
69 makeBlockPrecon(block##Type##Precon, block##Type##DiagonalPrecon);            \
70                                                                               \
71 typedef BlockGaussSeidelPrecon<type > block##Type##GaussSeidelPrecon;         \
72 makeBlockPrecon(block##Type##Precon, block##Type##GaussSeidelPrecon);         \
73                                                                               \
74 typedef BlockCholeskyPrecon<type > block##Type##CholeskyPrecon;               \
75 makeBlockPrecon(block##Type##Precon, block##Type##CholeskyPrecon);            \
76                                                                               \
77                                                                               \
78 /* Smoothers */                                                               \
79 typedef BlockLduSmoother<type > block##Type##Smoother;                        \
80 defineNamedTemplateTypeNameAndDebug(block##Type##Smoother, 0);                \
81 defineTemplateRunTimeSelectionTable(block##Type##Smoother, dictionary);       \
82                                                                               \
83 typedef BlockGaussSeidelSmoother<type > block##Type##GaussSeidelSmoother;     \
84 makeBlockSmoother(block##Type##Smoother, block##Type##GaussSeidelSmoother);   \
85                                                                               \
86 typedef BlockILUSmoother<type > block##Type##ILUSmoother;                     \
87 makeBlockSmoother(block##Type##Smoother, block##Type##ILUSmoother);           \
88                                                                               \
89                                                                               \
90 /* Solvers */                                                                 \
91 typedef BlockLduSolver<type > block##Type##Solver;                            \
92 defineNamedTemplateTypeNameAndDebug(block##Type##Solver, 0);                  \
93 defineTemplateRunTimeSelectionTable                                           \
94 (                                                                             \
95     block##Type##Solver,                                                      \
96     symMatrix                                                                 \
97 );                                                                            \
98                                                                               \
99 defineTemplateRunTimeSelectionTable                                           \
100 (                                                                             \
101     block##Type##Solver,                                                      \
102     asymMatrix                                                                \
103 );                                                                            \
104                                                                               \
105 typedef BlockDiagonalSolver<type > block##Type##DiagonalSolver;               \
106 defineNamedTemplateTypeNameAndDebug(block##Type##DiagonalSolver, 0);          \
107                                                                               \
108 typedef BlockBiCGStabSolver<type > block##Type##BiCGStabSolver;               \
109 makeBlockSolverTypeName(block##Type##BiCGStabSolver);                         \
110 addSolverToBlockMatrix(Type, block##Type##BiCGStabSolver, symMatrix);         \
111 addSolverToBlockMatrix(Type, block##Type##BiCGStabSolver, asymMatrix);        \
112                                                                               \
113 typedef BlockCGSolver<type > block##Type##CGSolver;                           \
114 makeBlockSolverTypeName(block##Type##CGSolver);                               \
115 addSolverToBlockMatrix(Type, block##Type##CGSolver, symMatrix);               \
116                                                                               \
117 typedef BlockGaussSeidelSolver<type > block##Type##GaussSeidelSolver;         \
118 makeBlockSolverTypeName(block##Type##GaussSeidelSolver);                      \
119 addSolverToBlockMatrix(Type, block##Type##GaussSeidelSolver, symMatrix);      \
120                                                                               \
121 typedef BlockGMRESSolver<type > block##Type##GMRESSolver;                     \
122 makeBlockSolverTypeName(block##Type##GMRESSolver);                            \
123 addSolverToBlockMatrix(Type, block##Type##GMRESSolver, symMatrix);            \
124 addSolverToBlockMatrix(Type, block##Type##GMRESSolver, asymMatrix);
127 forAllVectorNTypes(makeSolver)
129 #undef makeSolver
131 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
133 } // End namespace Foam
135 // ************************************************************************* //