198 |
|
|
199 |
void SystemMatrixAdapter::saveMM(const std::string& fileName) const |
void SystemMatrixAdapter::saveMM(const std::string& fileName) const |
200 |
{ |
{ |
201 |
char fName[fileName.size()+1]; |
char *fName = (fileName.size()+1>0) ? TMPMEMALLOC(fileName.size()+1,char) : (char*)NULL; |
202 |
strcpy(fName,fileName.c_str()); |
|
203 |
|
strcpy(fName,fileName.c_str()); |
204 |
Paso_SystemMatrix* mat = getPaso_SystemMatrix(); |
Paso_SystemMatrix* mat = getPaso_SystemMatrix(); |
205 |
Paso_SystemMatrix_saveMM(mat,fName); |
Paso_SystemMatrix_saveMM(mat,fName); |
206 |
checkPasoError(); |
checkPasoError(); |
207 |
|
TMPMEMFREE(fName); |
208 |
|
|
209 |
} |
} |
210 |
|
|
211 |
void SystemMatrixAdapter::saveHB(const std::string& fileName) const |
void SystemMatrixAdapter::saveHB(const std::string& fileName) const |
212 |
{ |
{ |
213 |
char fName[fileName.size()+1]; |
char *fName = (fileName.size()+1>0) ? TMPMEMALLOC(fileName.size()+1,char) : (char*)NULL; |
214 |
|
|
215 |
strcpy(fName,fileName.c_str()); |
strcpy(fName,fileName.c_str()); |
216 |
Paso_SystemMatrix* mat = getPaso_SystemMatrix(); |
Paso_SystemMatrix* mat = getPaso_SystemMatrix(); |
217 |
Paso_SystemMatrix_saveHB(mat,fName); |
Paso_SystemMatrix_saveHB(mat,fName); |
218 |
checkPasoError(); |
checkPasoError(); |
219 |
|
TMPMEMFREE(fName); |
220 |
|
|
221 |
} |
} |
222 |
|
|
223 |
void SystemMatrixAdapter::resetValues() const |
void SystemMatrixAdapter::resetValues() const |