/*---------------------------------------------------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright held by original author \\/ M anipulation | ------------------------------------------------------------------------------- License This file is part of OpenFOAM. OpenFOAM is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. OpenFOAM is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenFOAM; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA InNamespace Foam:: Description Block matrix insertion and retrieval tools SourceFiles blockMatrixTools.C \*---------------------------------------------------------------------------*/ #ifndef blockMatrixTools_H #define blockMatrixTools_H #include "blockLduMatrices.H" #include "fvMatrices.H" #include "surfaceFieldsFwd.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { /*---------------------------------------------------------------------------*\ Namespace blockMatrixTools functions Declaration \*---------------------------------------------------------------------------*/ namespace blockMatrixTools { //- Insert field into block field template void blockInsert ( const direction dir, const scalarField& x, Field& blockX ); //- Retrieve field from block field template void blockRetrieve ( const direction dir, scalarField& x, const Field& blockX ); //- Insert matrix diagonal and source into the block system template void insertDiagSource ( const direction dir, const fvScalarMatrix& m, BlockLduMatrix& blockM, Field& blockB ); // Insert matrix into the block system template void insertUpperLower ( const direction dir, const fvScalarMatrix& m, BlockLduMatrix& blockM ); // Insert matrix into the block system template void insertEquation ( const direction dir, const fvScalarMatrix& m, BlockLduMatrix& blockM, Field& blockX, Field& blockB ); // Update coupling of block system // Subtracts the block-coefficient coupling as specified by the user // from the source, leaving the implicit update given by linearisation template void updateCoupling ( BlockLduMatrix& blockM, Field& x, Field& b ); } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // } // End namespace Foam // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // #ifdef NoRepository # include "blockMatrixTools.C" #endif // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // #endif // ************************************************************************* //