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
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.
34 Hrvoje Jasak, Wikki Ltd. All rights reserved
39 \*---------------------------------------------------------------------------*/
41 #ifndef SegregatedSolver_H
42 #define SegregatedSolver_H
44 #include "blockLduSolvers.H"
45 #include "BlockIterativeSolver.H"
47 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
52 /*---------------------------------------------------------------------------*\
53 Class SegregatedSolver Declaration
54 \*---------------------------------------------------------------------------*/
57 class SegregatedSolver
59 public BlockLduSolver<Type>
67 blockScalarMatrix scalarMatrix_;
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>&);
84 //- Runtime type information
85 TypeName("Segregated");
90 //- Construct from matrix components and solver data stream
93 const word& fieldName,
94 const BlockLduMatrix<Type>& matrix,
95 const dictionary& dict
101 virtual ~SegregatedSolver()
107 //- Solve the matrix with this solver
108 virtual BlockSolverPerformance<Type> solve
117 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
119 } // End namespace Foam
121 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
124 # include "SegregatedSolver.C"
127 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
131 // ************************************************************************* //