source: CIVL/examples/mpi-omp/AMG2013/IJ_mv/IJ_matrix.h

main
Last change on this file was ea777aa, checked in by Alex Wilton <awilton@…>, 3 years ago

Moved examples, include, build_default.properties, common.xml, and README out from dev.civl.com into the root of the repo.

git-svn-id: svn://vsl.cis.udel.edu/civl/trunk@5704 fb995dde-84ed-4084-dfe6-e5aef3e2452c

  • Property mode set to 100644
File size: 3.4 KB
Line 
1/*BHEADER**********************************************************************
2 * Copyright (c) 2008, Lawrence Livermore National Security, LLC.
3 * Produced at the Lawrence Livermore National Laboratory.
4 * This file is part of HYPRE. See file COPYRIGHT for details.
5 *
6 * HYPRE is free software; you can redistribute it and/or modify it under the
7 * terms of the GNU Lesser General Public License (as published by the Free
8 * Software Foundation) version 2.1 dated February 1999.
9 *
10 * $Revision: 2.4 $
11 ***********************************************************************EHEADER*/
12
13
14
15/******************************************************************************
16 *
17 * Header info for the hypre_IJMatrix structures
18 *
19 *****************************************************************************/
20
21#ifndef hypre_IJ_MATRIX_HEADER
22#define hypre_IJ_MATRIX_HEADER
23
24/*--------------------------------------------------------------------------
25 * hypre_IJMatrix:
26 *--------------------------------------------------------------------------*/
27
28typedef struct hypre_IJMatrix_struct
29{
30 MPI_Comm comm;
31
32 HYPRE_BigInt *row_partitioning; /* distribution of rows across processors */
33 HYPRE_BigInt *col_partitioning; /* distribution of columns */
34
35 int object_type; /* Indicates the type of "object" */
36 void *object; /* Structure for storing local portion */
37 void *translator; /* optional storage_type specfic structure
38 for holding additional local info */
39 int assemble_flag; /* indicates whether matrix has been
40 assembled */
41
42 HYPRE_BigInt global_first_row; /* these data items are necessary */
43 HYPRE_BigInt global_first_col; /* to be able to avoid using the */
44 HYPRE_BigInt global_num_rows; /* global partition */
45 HYPRE_BigInt global_num_cols;
46
47
48
49} hypre_IJMatrix;
50
51/*--------------------------------------------------------------------------
52 * Accessor macros: hypre_IJMatrix
53 *--------------------------------------------------------------------------*/
54
55#define hypre_IJMatrixComm(matrix) ((matrix) -> comm)
56
57#define hypre_IJMatrixRowPartitioning(matrix) ((matrix) -> row_partitioning)
58#define hypre_IJMatrixColPartitioning(matrix) ((matrix) -> col_partitioning)
59
60#define hypre_IJMatrixObjectType(matrix) ((matrix) -> object_type)
61#define hypre_IJMatrixObject(matrix) ((matrix) -> object)
62#define hypre_IJMatrixTranslator(matrix) ((matrix) -> translator)
63
64#define hypre_IJMatrixAssembleFlag(matrix) ((matrix) -> assemble_flag)
65
66
67#define hypre_IJMatrixGlobalFirstRow(matrix) ((matrix) -> global_first_row)
68#define hypre_IJMatrixGlobalFirstCol(matrix) ((matrix) -> global_first_col)
69#define hypre_IJMatrixGlobalNumRows(matrix) ((matrix) -> global_num_rows)
70#define hypre_IJMatrixGlobalNumCols(matrix) ((matrix) -> global_num_cols)
71
72/*--------------------------------------------------------------------------
73 * prototypes for operations on local objects
74 *--------------------------------------------------------------------------*/
75
76#ifdef PETSC_AVAILABLE
77/* IJMatrix_petsc.c */
78int
79hypre_GetIJMatrixParCSRMatrix( HYPRE_IJMatrix IJmatrix, Mat *reference )
80#endif
81
82#ifdef ISIS_AVAILABLE
83/* IJMatrix_isis.c */
84int
85hypre_GetIJMatrixISISMatrix( HYPRE_IJMatrix IJmatrix, RowMatrix *reference )
86#endif
87
88#endif
Note: See TracBrowser for help on using the repository browser.