fixed writing out entries in advective bc
[OpenFOAM-1.6-ext.git] / src / OpenFOAM / matrices / blockLduMatrix / BlockLduSolvers / Segregated / SegregatedSolver.H
blob4ea0d51be35fc3a9c31843f0b159f33debf7b766
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     SegregatedSolver
28 Description
29     Segregated solver for block matrices.  Segregation decouples block
30     coefficients and calls a scalar solver for each component separately.
31     Cross-component coupling is lagged in rhs.
33 Author
34     Hrvoje Jasak, Wikki Ltd.  All rights reserved
36 SourceFiles
37     SegregatedSolver.C
39 \*---------------------------------------------------------------------------*/
41 #ifndef SegregatedSolver_H
42 #define SegregatedSolver_H
44 #include "blockLduSolvers.H"
45 #include "BlockIterativeSolver.H"
47 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
49 namespace Foam
52 /*---------------------------------------------------------------------------*\
53                        Class SegregatedSolver Declaration
54 \*---------------------------------------------------------------------------*/
56 template<class Type>
57 class SegregatedSolver
59     public BlockLduSolver<Type>
61     // Private data
63         //- Scalar x
64         scalarField scalarX_;
66         //- Scalar matrix
67         blockScalarMatrix scalarMatrix_;
69         //- Scalar b
70         scalarField scalarB_;
73     // Private Member Functions
75         //- Disallow default bitwise copy construct
76         SegregatedSolver(const SegregatedSolver<Type>&);
78         //- Disallow default bitwise assignment
79         void operator=(const SegregatedSolver<Type>&);
82 public:
84     //- Runtime type information
85     TypeName("Segregated");
88     // Constructors
90         //- Construct from matrix components and solver data stream
91         SegregatedSolver
92         (
93             const word& fieldName,
94             const BlockLduMatrix<Type>& matrix,
95             const dictionary& dict
96         );
99         // Destructor
101             virtual ~SegregatedSolver()
102             {}
105     // Member Functions
107         //- Solve the matrix with this solver
108         virtual BlockSolverPerformance<Type> solve
109         (
110             Field<Type>& x,
111             const Field<Type>& b
112         );
117 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
119 } // End namespace Foam
121 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
123 #ifdef NoRepository
124 #   include "SegregatedSolver.C"
125 #endif
127 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
129 #endif
131 // ************************************************************************* //