twoPhaseEulerFoam:frictionalStressModel/Schaeffer: Correct mut on processor boundaries
[OpenFOAM-1.7.x.git] / src / OpenFOAM / matrices / scalarMatrices / scalarMatrices.H
blobe3ca40227fddb96bee844749c67c7dd2823381e2
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 1991-2010 OpenCFD Ltd.
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
13     the Free Software Foundation, either version 3 of the License, or
14     (at your 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, see <http://www.gnu.org/licenses/>.
24 Class
25     scalarMatrices
27 Description
28     Scalar matrices
30 SourceFiles
31     scalarMatrices.C
32     scalarMatricesTemplates.C
34 \*---------------------------------------------------------------------------*/
36 #ifndef scalarMatrices_H
37 #define scalarMatrices_H
39 #include "RectangularMatrix.H"
40 #include "SquareMatrix.H"
41 #include "DiagonalMatrix.H"
42 #include "scalarField.H"
43 #include "labelList.H"
45 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 namespace Foam
50 typedef RectangularMatrix<scalar> scalarRectangularMatrix;
51 typedef SquareMatrix<scalar> scalarSquareMatrix;
52 typedef DiagonalMatrix<scalar> scalarDiagonalMatrix;
54 //- Solve the matrix using Gaussian elimination with pivoting,
55 //  returning the solution in the source
56 template<class Type>
57 void solve(scalarSquareMatrix& matrix, Field<Type>& source);
59 //- Solve the matrix using Gaussian elimination with pivoting
60 //  and return the solution
61 template<class Type>
62 void solve
64     Field<Type>& psi,
65     const scalarSquareMatrix& matrix,
66     const Field<Type>& source
69 //- LU decompose the matrix with pivoting
70 void LUDecompose
72     scalarSquareMatrix& matrix,
73     labelList& pivotIndices
76 //- LU back-substitution with given source, returning the solution
77 //  in the source
78 template<class Type>
79 void LUBacksubstitute
81     const scalarSquareMatrix& luMmatrix,
82     const labelList& pivotIndices,
83     Field<Type>& source
86 //- Solve the matrix using LU decomposition with pivoting
87 //  returning the LU form of the matrix and the solution in the source
88 template<class Type>
89 void LUsolve(scalarSquareMatrix& matrix, Field<Type>& source);
91 void multiply
93     scalarRectangularMatrix& answer,         // value changed in return
94     const scalarRectangularMatrix& A,
95     const scalarRectangularMatrix& B
98 void multiply
100     scalarRectangularMatrix& answer,         // value changed in return
101     const scalarRectangularMatrix& A,
102     const scalarRectangularMatrix& B,
103     const scalarRectangularMatrix& C
106 void multiply
108     scalarRectangularMatrix& answer,         // value changed in return
109     const scalarRectangularMatrix& A,
110     const DiagonalMatrix<scalar>& B,
111     const scalarRectangularMatrix& C
114 //- Return the inverse of matrix A using SVD
115 scalarRectangularMatrix SVDinv
117     const scalarRectangularMatrix& A,
118     scalar minCondition = 0
122 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
124 } // End namespace Foam
126 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
128 #ifdef NoRepository
129 #   include "scalarMatricesTemplates.C"
130 #endif
132 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
134 #endif
136 // ************************************************************************* //