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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1811 - (show annotations)
Thu Sep 25 23:11:13 2008 UTC (10 years, 11 months ago) by ksteube
File MIME type: text/plain
File size: 1570 byte(s)
Copyright updated in all files

1
2 /*******************************************************
3 *
4 * Copyright (c) 2003-2008 by University of Queensland
5 * Earth Systems Science Computational Center (ESSCC)
6 * http://www.uq.edu.au/esscc
7 *
8 * Primary Business: Queensland, Australia
9 * Licensed under the Open Software License version 3.0
10 * http://www.opensource.org/licenses/osl-3.0.php
11 *
12 *******************************************************/
13
14
15 /**************************************************************/
16
17 /* Paso: SystemMatrix is saved to Harwell-Boeing format */
18
19 /**************************************************************/
20
21 /* Copyright: ACcESS Australia 2005 */
22 /* Author: imran@esscc.uq.edu.au */
23
24 /**************************************************************/
25
26 #include "Paso.h"
27 #include "SystemMatrix.h"
28
29 void Paso_SystemMatrix_saveHB( Paso_SystemMatrix *A_p, char *filename_p ) {
30 FILE *fileHandle_p = NULL;
31 if (A_p->mpi_info->size > 1) {
32 Paso_setError(TYPE_ERROR,"Paso_SystemMatrix_saveHB: currently single processor runs are supported.\n");
33 return;
34 }
35 fileHandle_p = fopen( filename_p, "w" );
36 if( fileHandle_p == NULL ) {
37 Paso_setError(IO_ERROR,"File could not be opened for writing.");
38 return;
39 }
40
41 if ( A_p->type & MATRIX_FORMAT_CSC) {
42 Paso_SparseMatrix_saveHB_CSC( A_p->mainBlock,fileHandle_p);
43 } else {
44 Paso_setError(TYPE_ERROR,"Paso_SystemMatrix_saveHB: only CSC is currently supported.\n");
45 }
46
47 /* close the file */
48 fclose( fileHandle_p );
49
50 return;
51 }

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26