hypre/utilities/hypre_complex.c
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

44 lines
965 B
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*/
#include "_hypre_utilities.h"
#ifdef HYPRE_COMPLEX
#include <complex.h>
HYPRE_Complex
hypre_conj( HYPRE_Complex value )
{
return conj(value);
}
HYPRE_Real
hypre_cabs( HYPRE_Complex value )
{
return cabs(value);
}
HYPRE_Real
hypre_creal( HYPRE_Complex value )
{
return creal(value);
}
HYPRE_Real
hypre_cimag( HYPRE_Complex value )
{
return cimag(value);
}
#endif