fixed writing out entries in advective bc
[OpenFOAM-1.6-ext.git] / src / coupledMatrix / coupledLduMatrix / coupledLduMatrix.H
blobe4b36adc81fb300a7cd2b7e6056c68b1b4a99827
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 2006- 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25 Class
26     coupledLduMatrix
28 Description
29     Collection of lduMatrices solved together as a block system
31 Author
32     Hrvoje Jasak, Wikki Ltd.  All rights reserved
34 SourceFiles
35     coupledLduMatrix.C
37 \*---------------------------------------------------------------------------*/
39 #ifndef coupledLduMatrix_H
40 #define coupledLduMatrix_H
42 #include "lduMatrix.H"
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 namespace Foam
49 /*---------------------------------------------------------------------------*\
50                        Class coupledLduMatrix Declaration
51 \*---------------------------------------------------------------------------*/
53 class coupledLduMatrix
55     public PtrList<lduMatrix>
57     // Private data
59     // Private Member Functions
61         //- Disallow default bitwise copy construct
62         coupledLduMatrix(const coupledLduMatrix&);
64         //- Disallow default bitwise assignment
65         void operator=(const coupledLduMatrix&);
68 public:
70     // Static data members
72         // Declare name of the class and it's debug switch
73         ClassName("coupledLduMatrix");
76     // Constructors
78         //- Construct given size
79         coupledLduMatrix(const label size);
82     // Destructor
84         ~coupledLduMatrix();
87     // Member Functions
89         // Matrix structure
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.
104             void Amul
105             (
106                 FieldField<Field, scalar>& result,
107                 const FieldField<Field, scalar>& x,
108                 const PtrList<FieldField<Field, scalar> >& bouCoeffs,
109                 const lduInterfaceFieldPtrsListList& interfaces,
110                 const direction cmpt
111             ) const;
113             //- Matrix transpose multiplication with updated coupled interfaces
114             void Tmul
115             (
116                 FieldField<Field, scalar>& result,
117                 const FieldField<Field, scalar>& x,
118                 const PtrList<FieldField<Field, scalar> >& intCoeffs,
119                 const lduInterfaceFieldPtrsListList& interfaces,
120                 const direction cmpt
121             ) const;
124             //- Initialise the update of coupled interfaces
125             //  for matrix operations
126             void initMatrixInterfaces
127             (
128                 const PtrList<FieldField<Field, scalar> >& coupleCoeffs,
129                 const lduInterfaceFieldPtrsListList& interfaces,
130                 const FieldField<Field, scalar>& x,
131                 FieldField<Field, scalar>& result,
132                 const direction cmpt
133             ) const;
135             //- Update coupled interfaces for matrix operations
136             void updateMatrixInterfaces
137             (
138                 const PtrList<FieldField<Field, scalar> >& coupleCoeffs,
139                 const lduInterfaceFieldPtrsListList& interfaces,
140                 const FieldField<Field, scalar>& x,
141                 FieldField<Field, scalar>& result,
142                 const direction cmpt
143             ) const;
148 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
150 } // End namespace Foam
152 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
154 #endif
156 // ************************************************************************* //