1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2006- 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
29 Collection of lduMatrices solved together as a block system
32 Hrvoje Jasak, Wikki Ltd. All rights reserved
37 \*---------------------------------------------------------------------------*/
39 #ifndef coupledLduMatrix_H
40 #define coupledLduMatrix_H
42 #include "lduMatrix.H"
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
49 /*---------------------------------------------------------------------------*\
50 Class coupledLduMatrix Declaration
51 \*---------------------------------------------------------------------------*/
53 class coupledLduMatrix
55 public PtrList<lduMatrix>
59 // Private Member Functions
61 //- Disallow default bitwise copy construct
62 coupledLduMatrix(const coupledLduMatrix&);
64 //- Disallow default bitwise assignment
65 void operator=(const coupledLduMatrix&);
70 // Static data members
72 // Declare name of the class and it's debug switch
73 ClassName("coupledLduMatrix");
78 //- Construct given size
79 coupledLduMatrix(const label size);
91 //- Is the matrix diagonal-only?
92 bool diagonal() const;
94 //- Is the matrix symmetric?
95 bool symmetric() const;
97 //- Is the matrix asymmetric?
98 bool asymmetric() const;
101 // Matrix-vector multiplication
103 //- Matrix multiplication with updated coupled interfaces.
106 FieldField<Field, scalar>& result,
107 const FieldField<Field, scalar>& x,
108 const PtrList<FieldField<Field, scalar> >& bouCoeffs,
109 const lduInterfaceFieldPtrsListList& interfaces,
113 //- Matrix transpose multiplication with updated coupled interfaces
116 FieldField<Field, scalar>& result,
117 const FieldField<Field, scalar>& x,
118 const PtrList<FieldField<Field, scalar> >& intCoeffs,
119 const lduInterfaceFieldPtrsListList& interfaces,
124 //- Initialise the update of coupled interfaces
125 // for matrix operations
126 void initMatrixInterfaces
128 const PtrList<FieldField<Field, scalar> >& coupleCoeffs,
129 const lduInterfaceFieldPtrsListList& interfaces,
130 const FieldField<Field, scalar>& x,
131 FieldField<Field, scalar>& result,
135 //- Update coupled interfaces for matrix operations
136 void updateMatrixInterfaces
138 const PtrList<FieldField<Field, scalar> >& coupleCoeffs,
139 const lduInterfaceFieldPtrsListList& interfaces,
140 const FieldField<Field, scalar>& x,
141 FieldField<Field, scalar>& result,
148 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
150 } // End namespace Foam
152 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
156 // ************************************************************************* //