Changeset 11679 for issm/trunk-jpl/src/c/objects/Numerics/Matrix.cpp
- Timestamp:
- 03/12/12 09:35:33 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/objects/Numerics/Matrix.cpp
r11670 r11679 140 140 _error_("not implemented yet!"); 141 141 #endif 142 return dataref; 142 143 143 144 } 144 145 /*}}}*/ 145 146 #endif 147 /*FUNCTION Matrix::Assemble{{{1*/ 148 void Matrix::Assemble(void){ 149 #ifdef _HAVE_PETSC_ 150 MatAssemblyBegin(this->matrix,MAT_FINAL_ASSEMBLY); 151 MatAssemblyEnd(this->matrix,MAT_FINAL_ASSEMBLY); 152 #if _PETSC_MAJOR_ == 2 153 MatCompress(this->matrix); 154 #endif 155 #else 156 /*do nothing:*/ 157 #endif 158 159 } 160 /*}}}*/ 161 /*FUNCTION Matrix::Norm{{{1*/ 162 double Matrix::Norm(int norm_type){ 163 164 double norm=0; 165 #ifdef _HAVE_PETSC_ 166 MatNorm(this->matrix,(NormType)norm_type,&norm); 167 #else 168 _error_("not implemented yet!"); 169 #endif 170 return norm; 171 } 172 /*}}}*/ 173 /*FUNCTION Matrix::GetSize{{{1*/ 174 void Matrix::GetSize(int* pM,int* pN){ 175 176 #ifdef _HAVE_PETSC_ 177 MatGetSize(this->matrix,pM,pN); 178 #else 179 _error_("not implemented yet!"); 180 #endif 181 } 182 /*}}}*/ 183 /*FUNCTION Matrix::GetLocalSize{{{1*/ 184 void Matrix::GetLocalSize(int* pM,int* pN){ 185 186 #ifdef _HAVE_PETSC_ 187 MatGetLocalSize(this->matrix,pM,pN); 188 #else 189 _error_("not implemented yet!"); 190 #endif 191 } 192 /*}}}*/ 193 /*FUNCTION Matrix::MatMult{{{1*/ 194 void Matrix::MatMult(Vector* X,Vector* AX){ 195 196 #ifdef _HAVE_PETSC_ 197 MatMultPatch(this->matrix,X->vector,AX->vector); 198 #else 199 _error_("not implemented yet!"); 200 #endif 201 } 202 /*}}}*/
Note:
See TracChangeset
for help on using the changeset viewer.