/[escript]/trunk/paso/src/SystemMatrix_saveMM.c
ViewVC logotype

Contents of /trunk/paso/src/SystemMatrix_saveMM.c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1312 - (show annotations)
Mon Sep 24 06:18:44 2007 UTC (12 years ago) by ksteube
File MIME type: text/plain
File size: 1761 byte(s)
The MPI branch is hereby closed. All future work should be in trunk.

Previously in revision 1295 I merged the latest changes to trunk into trunk-mpi-branch.
In this revision I copied all files from trunk-mpi-branch over the corresponding
trunk files. I did not use 'svn merge', it was a copy.

1
2 /* $Id$ */
3
4 /*******************************************************
5 *
6 * Copyright 2003-2007 by ACceSS MNRF
7 * Copyright 2007 by University of Queensland
8 *
9 * http://esscc.uq.edu.au
10 * Primary Business: Queensland, Australia
11 * Licensed under the Open Software License version 3.0
12 * http://www.opensource.org/licenses/osl-3.0.php
13 *
14 *******************************************************/
15
16 /**************************************************************/
17
18 /* Paso: SystemMatrix is saved to Matrix Market format */
19
20 /**************************************************************/
21
22 /* Copyrights by ACcESS Australia 2003,2004 */
23 /* Author: davies@access.edu.au */
24
25 /**************************************************************/
26
27 #include "SystemMatrix.h"
28
29 void Paso_SystemMatrix_saveMM(Paso_SystemMatrix * A_p, char * fileName_p) {
30 FILE * fileHandle_p = NULL;
31
32 if (A_p->mpi_info->size > 1) {
33 Paso_setError(TYPE_ERROR,"Paso_SystemMatrix_saveHB: currently single processor runs are supported.\n");
34 return;
35 }
36 if (A_p->type & MATRIX_FORMAT_SYM) {
37 Paso_setError(TYPE_ERROR,"Paso_SystemMatrix_saveMM does not support symmetric storage scheme");
38 return;
39 }
40 /* open the file */
41 fileHandle_p = fopen(fileName_p, "w");
42 if (fileHandle_p==NULL) {
43 Paso_setError(IO_ERROR,"file could not be opened for writing");
44 return;
45 }
46
47 if (A_p->type & MATRIX_FORMAT_CSC) {
48 Paso_SparseMatrix_saveHB_CSC( A_p->mainBlock,fileHandle_p);
49 } else {
50 /* Paso_SparseMatrix_saveHB_CSR( A_p->mainBlock,fileHandle_p); */
51 Paso_setError(TYPE_ERROR,"Paso_SystemMatrix_saveMM does not support CSR yet.");
52 return;
53 }
54
55 /* close the file */
56 fclose(fileHandle_p);
57
58 return;
59 }

Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision

  ViewVC Help
Powered by ViewVC 1.1.26