source: CIVL/examples/mpi-omp/AMG2013/IJ_mv/IJVector.c

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 * hypre_IJVector interface
18 *
19 *****************************************************************************/
20
21#include "./IJ_mv.h"
22
23#include "../HYPRE.h"
24
25/*--------------------------------------------------------------------------
26 * hypre_IJVectorDistribute
27 *--------------------------------------------------------------------------*/
28
29int
30hypre_IJVectorDistribute( HYPRE_IJVector vector, const HYPRE_BigInt *vec_starts )
31{
32 hypre_IJVector *vec = (hypre_IJVector *) vector;
33
34 if (vec == NULL)
35 {
36 printf("Vector variable is NULL -- hypre_IJVectorDistribute\n");
37 exit(1);
38 }
39
40 if ( hypre_IJVectorObjectType(vec) == HYPRE_PARCSR )
41
42 return( hypre_IJVectorDistributePar(vec, vec_starts) );
43
44 else
45 {
46 printf("Unrecognized object type -- hypre_IJVectorDistribute\n");
47 exit(1);
48 }
49
50 return -99;
51}
52
53/*--------------------------------------------------------------------------
54 * hypre_IJVectorZeroValues
55 *--------------------------------------------------------------------------*/
56
57int
58hypre_IJVectorZeroValues( HYPRE_IJVector vector )
59{
60 hypre_IJVector *vec = (hypre_IJVector *) vector;
61
62 if (vec == NULL)
63 {
64 printf("Vector variable is NULL -- hypre_IJVectorZeroValues\n");
65 exit(1);
66 }
67
68 /* if ( hypre_IJVectorObjectType(vec) == HYPRE_PETSC )
69
70 return( hypre_IJVectorZeroValuesPETSc(vec) );
71
72 else if ( hypre_IJVectorObjectType(vec) == HYPRE_ISIS )
73
74 return( hypre_IJVectorZeroValuesISIS(vec) );
75
76 else */
77
78 if ( hypre_IJVectorObjectType(vec) == HYPRE_PARCSR )
79
80 return( hypre_IJVectorZeroValuesPar(vec) );
81
82 else
83 {
84 printf("Unrecognized object type -- hypre_IJVectorZeroValues\n");
85 exit(1);
86 }
87
88 return -99;
89}
Note: See TracBrowser for help on using the repository browser.