#include <matrix.h>
Inheritance diagram for MyMatrix< T >:

Public Member Functions | |
| int | FactoLU () |
| perform LU facotrization | |
| const int | m () |
| return m dimention of the matrix | |
| T & | myMat () |
| cast to the childs classes | |
| MyMatrix (int t, int u) | |
| const int | n () |
| return n dimention of the matrix | |
| double & | operator() (int i, int j) |
| access to the coordinate i,j | |
| void | print () |
| print to screen the matrix | |
| void | PrintToFile (FILE *file) |
| print to file by opened FILE pointer | |
| void | PrintToFile (char *f) |
| print to a given file(by filename) the matrix | |
| int | Solve (Vector *residu) |
| solve the system Ax=b where b is residu parameter and A is current class. | |
| ~MyMatrix () | |
Protected Attributes | |
| int | _m |
| dimensions of the matrix | |
| int | _n |
| double * | matrix |
| data array to store the matrix | |
| int * | pivot |
| pivot used to perform facto LU | |
Definition at line 51 of file matrix.h.
| int MyMatrix< T >::FactoLU | ( | ) | [inline] |
perform LU facotrization
Reimplemented in BandeMatrix, and FullMatrix.
Definition at line 67 of file matrix.h.
00067 { 00068 return myMat().FactoLU(); 00069 }
| const int MyMatrix< T >::m | ( | ) | [inline] |
return m dimention of the matrix
Definition at line 100 of file matrix.h.
Referenced by ShapeMatrix< _Vec_, Dim >::build_least_square_rhs(), ShapeMatrix< _Vec_, Dim >::build_node_shape(), ShapeMatrix< _Vec_, Dim >::buildContinuConstraint(), ShapeMatrix< _Vec_, Dim >::buildFormeFaibleCMatrix(), ShapeMatrix< _Vec_, Dim >::buildLeastSquareMatrix(), ShapeMatrix< _Vec_, Dim >::changeAtomIndirection(), ShapeMatrix< _Vec_, Dim >::correct_forme_faible(), ShapeMatrix< _Vec_, Dim >::GetRelatedAtomsToElem(), ShapeMatrix< _Vec_, Dim >::InterpolateAtom(), FullMatrix::MatProduct(), ShapeMatrix< _Vec_, Dim >::operator()(), and ShapeMatrix< _Vec_, Dim >::print().
00100 { 00101 return _m; 00102 }
| T& MyMatrix< T >::myMat | ( | ) | [inline] |
cast to the childs classes
Definition at line 59 of file matrix.h.
Referenced by MyMatrix< BandeMatrix >::FactoLU(), MyMatrix< BandeMatrix >::operator()(), MyMatrix< BandeMatrix >::PrintToFile(), and MyMatrix< BandeMatrix >::Solve().
| const int MyMatrix< T >::n | ( | ) | [inline] |
return n dimention of the matrix
Definition at line 105 of file matrix.h.
Referenced by ShapeMatrix< _Vec_, Dim >::build_least_square_rhs(), ShapeMatrix< _Vec_, Dim >::build_node_shape(), ShapeMatrix< _Vec_, Dim >::buildContinuConstraint(), ShapeMatrix< _Vec_, Dim >::buildFormeFaibleCMatrix(), ShapeMatrix< _Vec_, Dim >::buildLeastSquareMatrix(), ShapeMatrix< _Vec_, Dim >::correct_forme_faible(), ShapeMatrix< _Vec_, Dim >::GetRelatedNodesToElem(), ShapeMatrix< _Vec_, Dim >::InterpolateAtom(), FullMatrix::MatProduct(), and ShapeMatrix< _Vec_, Dim >::operator()().
00105 { 00106 return _n; 00107 }
| double& MyMatrix< T >::operator() | ( | int | i, | |
| int | j | |||
| ) | [inline] |
access to the coordinate i,j
Reimplemented in BandeMatrix, DiagMatrix, and FullMatrix.
Definition at line 62 of file matrix.h.
00062 { 00063 return myMat()(i,j); 00064 }
| void MyMatrix< T >::print | ( | ) | [inline] |
print to screen the matrix
Definition at line 77 of file matrix.h.
Referenced by ShapeMatrix< _Vec_, Dim >::print().
00077 { 00078 PrintToFile(stdout); 00079 };
| void MyMatrix< T >::PrintToFile | ( | FILE * | file | ) | [inline] |
print to file by opened FILE pointer
Definition at line 89 of file matrix.h.
00089 { 00090 for (int i=0;i< _m;++i) 00091 for (int j=0;j< _n;++j) 00092 { 00093 // LOG(i+1 << "\t" << j+1 << "\n" << myMat()(i,j),0); 00094 if (myMat()(i,j) != 0) 00095 fprintf(file,"%d\t%d\t%.15e\n",i+1,j+1,myMat()(i,j)); 00096 } 00097 };
| void MyMatrix< T >::PrintToFile | ( | char * | f | ) | [inline] |
print to a given file(by filename) the matrix
Definition at line 82 of file matrix.h.
Referenced by FormeFaible< DomainA, DomainC, Dim >::BuildAtomsConstraintMatrix(), MyMethodFull< DomainA, DomainC, Dim >::BuildConstraintMatrix(), FormeFaible< DomainA, DomainC, Dim >::BuildContinuConstraintMatrix(), ShapeMatrix< _Vec_, Dim >::buildLeastSquareMatrix(), MyMatrix< BandeMatrix >::print(), and MyMatrix< BandeMatrix >::PrintToFile().
00082 { 00083 FILE * file = fopen(f,"wb+"); 00084 PrintToFile(file); 00085 fclose(file); 00086 };
solve the system Ax=b where b is residu parameter and A is current class.
Reimplemented in BandeMatrix, and FullMatrix.
Definition at line 72 of file matrix.h.
00072 { 00073 return myMat().Solve(residu); 00074 }
dimensions of the matrix
Definition at line 112 of file matrix.h.
Referenced by MyMatrix< BandeMatrix >::m(), MyMatrix< BandeMatrix >::MyMatrix(), and MyMatrix< BandeMatrix >::PrintToFile().
Definition at line 112 of file matrix.h.
Referenced by MyMatrix< BandeMatrix >::MyMatrix(), MyMatrix< BandeMatrix >::n(), and MyMatrix< BandeMatrix >::PrintToFile().
data array to store the matrix
Definition at line 116 of file matrix.h.
Referenced by FullMatrix::MatProduct().
1.5.2