fixed writing out entries in advective bc
[OpenFOAM-1.6-ext.git] / src / OpenFOAM / matrices / blockLduMatrix / BlockLduSolvers / BlockDiagonal / BlockDiagonalSolver.H
blob64d2951c9585fdf42d331c0f92040008f0bc7216
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 Class
26     BlockDiagonalSolver
28 Description
29     Solver for diagonal matrices
31 Author
32     Hrvoje Jasak, Wikki Ltd.  All rights reserved
34 SourceFiles
35     BlockDiagonalSolver.C
37 \*---------------------------------------------------------------------------*/
39 #ifndef BlockDiagonalSolver_H
40 #define BlockDiagonalSolver_H
42 #include "Field.H"
43 #include "typeInfo.H"
45 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 namespace Foam
50 template<class Type>
51 class BlockLduMatrix;
53 template<class Type>
54 class BlockLduSolver;
56 template<class Type>
57 class BlockSolverPerformance;
59 /*---------------------------------------------------------------------------*\
60                       Class BlockDiagonalSolver Declaration
61 \*---------------------------------------------------------------------------*/
63 template<class Type>
64 class BlockDiagonalSolver
66     public BlockLduSolver<Type>
68     // Private Member Functions
70         //- Disallow default bitwise copy construct
71         BlockDiagonalSolver(const BlockDiagonalSolver<Type>&);
73         //- Disallow default bitwise assignment
74         void operator=(const BlockDiagonalSolver<Type>&);
77 public:
79     //- Runtime type information
80     TypeName("Diagonal");
83     // Constructors
85         //- Construct from matrix
86         BlockDiagonalSolver
87         (
88             const word& fieldName,
89             const BlockLduMatrix<Type>& matrix,
90             const dictionary& dict
91         );
94     // Member Functions
96         //- Solve the matrix with this solver
97         virtual BlockSolverPerformance<Type> solve
98         (
99             Field<Type>& x,
100             const Field<Type>& b
101         );
105 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
107 } // End namespace Foam
109 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
111 #ifdef NoRepository
112 #   include "BlockDiagonalSolver.C"
113 #endif
115 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
117 #endif
119 // ************************************************************************* //