| 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_Vector interface
|
|---|
| 18 | *
|
|---|
| 19 | *****************************************************************************/
|
|---|
| 20 |
|
|---|
| 21 | #include "headers.h"
|
|---|
| 22 |
|
|---|
| 23 | /*--------------------------------------------------------------------------
|
|---|
| 24 | * HYPRE_VectorCreate
|
|---|
| 25 | *--------------------------------------------------------------------------*/
|
|---|
| 26 |
|
|---|
| 27 | HYPRE_Vector
|
|---|
| 28 | HYPRE_VectorCreate( int size )
|
|---|
| 29 | {
|
|---|
| 30 | return ( (HYPRE_Vector) hypre_SeqVectorCreate(size) );
|
|---|
| 31 | }
|
|---|
| 32 |
|
|---|
| 33 | /*--------------------------------------------------------------------------
|
|---|
| 34 | * HYPRE_VectorDestroy
|
|---|
| 35 | *--------------------------------------------------------------------------*/
|
|---|
| 36 |
|
|---|
| 37 | int
|
|---|
| 38 | HYPRE_VectorDestroy( HYPRE_Vector vector )
|
|---|
| 39 | {
|
|---|
| 40 | return ( hypre_SeqVectorDestroy( (hypre_Vector *) vector ) );
|
|---|
| 41 | }
|
|---|
| 42 |
|
|---|
| 43 | /*--------------------------------------------------------------------------
|
|---|
| 44 | * HYPRE_VectorInitialize
|
|---|
| 45 | *--------------------------------------------------------------------------*/
|
|---|
| 46 |
|
|---|
| 47 | int
|
|---|
| 48 | HYPRE_VectorInitialize( HYPRE_Vector vector )
|
|---|
| 49 | {
|
|---|
| 50 | return ( hypre_SeqVectorInitialize( (hypre_Vector *) vector ) );
|
|---|
| 51 | }
|
|---|
| 52 |
|
|---|
| 53 | /*--------------------------------------------------------------------------
|
|---|
| 54 | * HYPRE_VectorPrint
|
|---|
| 55 | *--------------------------------------------------------------------------*/
|
|---|
| 56 |
|
|---|
| 57 | int
|
|---|
| 58 | HYPRE_VectorPrint( HYPRE_Vector vector,
|
|---|
| 59 | char *file_name )
|
|---|
| 60 | {
|
|---|
| 61 | return ( hypre_SeqVectorPrint( (hypre_Vector *) vector,
|
|---|
| 62 | file_name ) );
|
|---|
| 63 | }
|
|---|
| 64 |
|
|---|
| 65 | /*--------------------------------------------------------------------------
|
|---|
| 66 | * HYPRE_VectorRead
|
|---|
| 67 | *--------------------------------------------------------------------------*/
|
|---|
| 68 |
|
|---|
| 69 | HYPRE_Vector
|
|---|
| 70 | HYPRE_VectorRead( char *file_name )
|
|---|
| 71 | {
|
|---|
| 72 | return ( (HYPRE_Vector) hypre_SeqVectorRead( file_name ) );
|
|---|
| 73 | }
|
|---|