/[escript]/branches/doubleplusgood/paso/src/SystemMatrix_saveHB.cpp
ViewVC logotype

Contents of /branches/doubleplusgood/paso/src/SystemMatrix_saveHB.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 4261 - (show annotations)
Wed Feb 27 06:09:33 2013 UTC (6 years, 1 month ago) by jfenwick
File size: 1769 byte(s)
Initial all c++ build.
But ... there are now reinterpret_cast<>'s
1
2 /*****************************************************************************
3 *
4 * Copyright (c) 2003-2013 by University of Queensland
5 * http://www.uq.edu.au
6 *
7 * Primary Business: Queensland, Australia
8 * Licensed under the Open Software License version 3.0
9 * http://www.opensource.org/licenses/osl-3.0.php
10 *
11 * Development until 2012 by Earth Systems Science Computational Center (ESSCC)
12 * Development since 2012 by School of Earth Sciences
13 *
14 *****************************************************************************/
15
16
17 /************************************************************************************/
18
19 /* Paso: SystemMatrix saving to Harwell-Boeing format */
20
21 /************************************************************************************/
22
23 /* Copyright: ACcESS Australia 2005 */
24 /* Author: imran@esscc.uq.edu.au */
25
26 /************************************************************************************/
27
28 #include "Paso.h"
29 #include "SystemMatrix.h"
30
31 void Paso_SystemMatrix_saveHB( Paso_SystemMatrix *A_p, char *filename_p ) {
32 FILE *fileHandle_p = NULL;
33 if (A_p->mpi_info->size > 1) {
34 Esys_setError(TYPE_ERROR,"Paso_SystemMatrix_saveHB: Only single processor runs are supported.\n");
35 return;
36 }
37 fileHandle_p = fopen( filename_p, "w" );
38 if( fileHandle_p == NULL ) {
39 Esys_setError(IO_ERROR,"Paso_SystemMatrix_saveHB: File could not be opened for writing.");
40 return;
41 }
42
43 if ( A_p->type & MATRIX_FORMAT_CSC) {
44 Paso_SparseMatrix_saveHB_CSC( A_p->mainBlock,fileHandle_p);
45 } else {
46 Esys_setError(TYPE_ERROR,"Paso_SystemMatrix_saveHB: Only CSC is currently supported.\n");
47 }
48
49 /* close the file */
50 fclose( fileHandle_p );
51 }
52

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26