1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright held by original author
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 Block matrix insertion and retrieval tools
34 \*---------------------------------------------------------------------------*/
37 #ifndef blockMatrixTools_H
38 #define blockMatrixTools_H
40 #include "blockLduMatrices.H"
41 #include "fvMatrices.H"
42 #include "surfaceFieldsFwd.H"
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
49 /*---------------------------------------------------------------------------*\
50 Namespace blockMatrixTools functions Declaration
51 \*---------------------------------------------------------------------------*/
53 namespace blockMatrixTools
55 //- Insert field into block field
56 template<class BlockType>
61 Field<BlockType>& blockX
64 //- Retrieve field from block field
65 template<class BlockType>
70 const Field<BlockType>& blockX
73 //- Insert matrix diagonal and source into the block system
74 template<class BlockType>
78 const fvScalarMatrix& m,
79 BlockLduMatrix<BlockType>& blockM,
80 Field<BlockType>& blockB
83 // Insert matrix into the block system
84 template<class Type, class BlockType>
88 const fvScalarMatrix& m,
89 BlockLduMatrix<BlockType>& blockM
92 // Insert matrix into the block system
93 template<class BlockType>
97 const fvScalarMatrix& m,
98 BlockLduMatrix<BlockType>& blockM,
99 Field<BlockType>& blockX,
100 Field<BlockType>& blockB
103 // Update coupling of block system
104 // Subtracts the block-coefficient coupling as specified by the user
105 // from the source, leaving the implicit update given by linearisation
106 template<class BlockType>
109 BlockLduMatrix<BlockType>& blockM,
116 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
118 } // End namespace Foam
120 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
123 # include "blockMatrixTools.C"
126 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
130 // ************************************************************************* //