1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2004-6 H. Jasak All rights reserved
7 -------------------------------------------------------------------------------
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
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 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
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); \
65 typedef BlockNoPrecon<type > block##Type##NoPrecon; \
66 makeBlockPrecon(block##Type##Precon, block##Type##NoPrecon); \
68 typedef BlockDiagonalPrecon<type > block##Type##DiagonalPrecon; \
69 makeBlockPrecon(block##Type##Precon, block##Type##DiagonalPrecon); \
71 typedef BlockGaussSeidelPrecon<type > block##Type##GaussSeidelPrecon; \
72 makeBlockPrecon(block##Type##Precon, block##Type##GaussSeidelPrecon); \
74 typedef BlockCholeskyPrecon<type > block##Type##CholeskyPrecon; \
75 makeBlockPrecon(block##Type##Precon, block##Type##CholeskyPrecon); \
79 typedef BlockLduSmoother<type > block##Type##Smoother; \
80 defineNamedTemplateTypeNameAndDebug(block##Type##Smoother, 0); \
81 defineTemplateRunTimeSelectionTable(block##Type##Smoother, dictionary); \
83 typedef BlockGaussSeidelSmoother<type > block##Type##GaussSeidelSmoother; \
84 makeBlockSmoother(block##Type##Smoother, block##Type##GaussSeidelSmoother); \
86 typedef BlockILUSmoother<type > block##Type##ILUSmoother; \
87 makeBlockSmoother(block##Type##Smoother, block##Type##ILUSmoother); \
91 typedef BlockLduSolver<type > block##Type##Solver; \
92 defineNamedTemplateTypeNameAndDebug(block##Type##Solver, 0); \
93 defineTemplateRunTimeSelectionTable \
95 block##Type##Solver, \
99 defineTemplateRunTimeSelectionTable \
101 block##Type##Solver, \
105 typedef BlockDiagonalSolver<type > block##Type##DiagonalSolver; \
106 defineNamedTemplateTypeNameAndDebug(block##Type##DiagonalSolver, 0); \
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); \
113 typedef BlockCGSolver<type > block##Type##CGSolver; \
114 makeBlockSolverTypeName(block##Type##CGSolver); \
115 addSolverToBlockMatrix(Type, block##Type##CGSolver, symMatrix); \
117 typedef BlockGaussSeidelSolver<type > block##Type##GaussSeidelSolver; \
118 makeBlockSolverTypeName(block##Type##GaussSeidelSolver); \
119 addSolverToBlockMatrix(Type, block##Type##GaussSeidelSolver, symMatrix); \
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)
131 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
133 } // End namespace Foam
135 // ************************************************************************* //