Go to the documentation of this file.00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
00019 
00020 
00021 
00022 
00023 
00024 
00025 
00026 
00027 
00028 
00029 
00030 
00031 
00032 
00033 
00034 
00035 
00036 #ifndef scalarMatrices_H
00037 #define scalarMatrices_H
00038 
00039 #include <OpenFOAM/RectangularMatrix.H>
00040 #include <OpenFOAM/SquareMatrix.H>
00041 #include <OpenFOAM/DiagonalMatrix.H>
00042 #include <OpenFOAM/scalarField.H>
00043 #include <OpenFOAM/labelList.H>
00044 
00045 
00046 
00047 namespace Foam
00048 {
00049 
00050 typedef RectangularMatrix<scalar> scalarRectangularMatrix;
00051 typedef SquareMatrix<scalar> scalarSquareMatrix;
00052 typedef DiagonalMatrix<scalar> scalarDiagonalMatrix;
00053 
00054 
00055 
00056 template<class Type>
00057 void solve(scalarSquareMatrix& matrix, Field<Type>& source);
00058 
00059 
00060 
00061 template<class Type>
00062 void solve
00063 (
00064     Field<Type>& psi,
00065     const scalarSquareMatrix& matrix,
00066     const Field<Type>& source
00067 );
00068 
00069 
00070 void LUDecompose
00071 (
00072     scalarSquareMatrix& matrix,
00073     labelList& pivotIndices
00074 );
00075 
00076 
00077 
00078 template<class Type>
00079 void LUBacksubstitute
00080 (
00081     const scalarSquareMatrix& luMmatrix,
00082     const labelList& pivotIndices,
00083     Field<Type>& source
00084 );
00085 
00086 
00087 
00088 template<class Type>
00089 void LUsolve(scalarSquareMatrix& matrix, Field<Type>& source);
00090 
00091 void multiply
00092 (
00093     scalarRectangularMatrix& answer,         
00094     const scalarRectangularMatrix& A,
00095     const scalarRectangularMatrix& B
00096 );
00097 
00098 void multiply
00099 (
00100     scalarRectangularMatrix& answer,         
00101     const scalarRectangularMatrix& A,
00102     const scalarRectangularMatrix& B,
00103     const scalarRectangularMatrix& C
00104 );
00105 
00106 void multiply
00107 (
00108     scalarRectangularMatrix& answer,         
00109     const scalarRectangularMatrix& A,
00110     const DiagonalMatrix<scalar>& B,
00111     const scalarRectangularMatrix& C
00112 );
00113 
00114 
00115 scalarRectangularMatrix SVDinv
00116 (
00117     const scalarRectangularMatrix& A,
00118     scalar minCondition = 0
00119 );
00120 
00121 
00122 
00123 
00124 } 
00125 
00126 
00127 
00128 #ifdef NoRepository
00129 #   include "scalarMatricesTemplates.C"
00130 #endif
00131 
00132 
00133 
00134 #endif
00135 
00136