hypre/multivector/interpreter.h
falgout 46488e8cbc Added HYPRE_Complex and HYPRE_Real types in place of double.
Added an example code to test CG on a 4D HYPRE_SSTRUCT complex problem.
Added regression tests for bigint, maxdim, and complex.
Added a test to make sure double types are not added to the source.
See [Issue995] in the tracker for more details.
2013-10-11 19:48:06 +00:00

59 lines
2.4 KiB
C

/*BHEADER**********************************************************************
* Copyright (c) 2008, Lawrence Livermore National Security, LLC.
* Produced at the Lawrence Livermore National Laboratory.
* This file is part of HYPRE. See file COPYRIGHT for details.
*
* HYPRE is free software; you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public License (as published by the Free
* Software Foundation) version 2.1 dated February 1999.
*
* $Revision$
***********************************************************************EHEADER*/
#ifndef LOBPCG_INTERFACE_INTERPRETER
#define LOBPCG_INTERFACE_INTERPRETER
#include "_hypre_utilities.h"
typedef struct
{
/* vector operations */
void* (*CreateVector) ( void *vector );
HYPRE_Int (*DestroyVector) ( void *vector );
HYPRE_Real (*InnerProd) ( void *x, void *y );
HYPRE_Int (*CopyVector) ( void *x, void *y );
HYPRE_Int (*ClearVector) ( void *x );
HYPRE_Int (*SetRandomValues) ( void *x, HYPRE_Int seed );
HYPRE_Int (*ScaleVector) ( HYPRE_Complex alpha, void *x );
HYPRE_Int (*Axpy) ( HYPRE_Complex alpha, void *x, void *y );
HYPRE_Int (*VectorSize) (void * vector);
/* multivector operations */
/* do we need the following entry? */
void* (*CreateMultiVector) ( void*, HYPRE_Int n, void *vector );
void* (*CopyCreateMultiVector) ( void *x, HYPRE_Int );
void (*DestroyMultiVector) ( void *x );
HYPRE_Int (*Width) ( void *x );
HYPRE_Int (*Height) ( void *x );
void (*SetMask) ( void *x, HYPRE_Int *mask );
void (*CopyMultiVector) ( void *x, void *y );
void (*ClearMultiVector) ( void *x );
void (*SetRandomVectors) ( void *x, HYPRE_Int seed );
void (*MultiInnerProd) ( void *x, void *y, HYPRE_Int, HYPRE_Int, HYPRE_Int, HYPRE_Real* );
void (*MultiInnerProdDiag) ( void *x, void *y, HYPRE_Int*, HYPRE_Int, HYPRE_Real* );
void (*MultiVecMat) ( void *x, HYPRE_Int, HYPRE_Int, HYPRE_Int, HYPRE_Complex*, void *y );
void (*MultiVecMatDiag) ( void *x, HYPRE_Int*, HYPRE_Int, HYPRE_Complex*, void *y );
void (*MultiAxpy) ( HYPRE_Complex alpha, void *x, void *y );
/* do we need the following 2 entries? */
void (*MultiXapy) ( void *x, HYPRE_Int, HYPRE_Int, HYPRE_Int, HYPRE_Complex*, void *y );
void (*Eval) ( void (*f)( void*, void*, void* ), void*, void *x, void *y );
} mv_InterfaceInterpreter;
#endif