source: CIVL/examples/mpi-omp/AMG2013/seq_mv/vector.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: 2.3 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 *
18 * Header info for Vector data structure
19 *
20 *****************************************************************************/
21
22#ifndef hypre_VECTOR_HEADER
23#define hypre_VECTOR_HEADER
24
25/*--------------------------------------------------------------------------
26 * hypre_Vector
27 *--------------------------------------------------------------------------*/
28
29typedef struct
30{
31 double *data;
32 int size;
33
34 /* Does the Vector create/destroy `data'? */
35 int owns_data;
36
37 /* For multivectors...*/
38 int num_vectors; /* the above "size" is size of one vector */
39 int multivec_storage_method;
40 /* ...if 0, store colwise v0[0], v0[1], ..., v1[0], v1[1], ... v2[0]... */
41 /* ...if 1, store rowwise v0[0], v1[0], ..., v0[1], v1[1], ... */
42 /* With colwise storage, vj[i] = data[ j*size + i]
43 With rowwise storage, vj[i] = data[ j + num_vectors*i] */
44 int vecstride, idxstride;
45 /* ... so vj[i] = data[ j*vecstride + i*idxstride ] regardless of row_storage.*/
46
47} hypre_Vector;
48
49/*--------------------------------------------------------------------------
50 * Accessor functions for the Vector structure
51 *--------------------------------------------------------------------------*/
52
53#define hypre_VectorData(vector) ((vector) -> data)
54#define hypre_VectorSize(vector) ((vector) -> size)
55#define hypre_VectorOwnsData(vector) ((vector) -> owns_data)
56#define hypre_VectorNumVectors(vector) ((vector) -> num_vectors)
57#define hypre_VectorMultiVecStorageMethod(vector) ((vector) -> multivec_storage_method)
58#define hypre_VectorVectorStride(vector) ((vector) -> vecstride )
59#define hypre_VectorIndexStride(vector) ((vector) -> idxstride )
60
61#endif
Note: See TracBrowser for help on using the repository browser.