114 lines
4.5 KiB
C
114 lines
4.5 KiB
C
/*BHEADER**********************************************************************
|
|
* Copyright (c) 2007, Lawrence Livermore National Security, LLC.
|
|
* Produced at the Lawrence Livermore National Laboratory.
|
|
* Written by the HYPRE team. UCRL-CODE-222953.
|
|
* All rights reserved.
|
|
*
|
|
* This file is part of HYPRE (see http://www.llnl.gov/CASC/hypre/).
|
|
* Please see the COPYRIGHT_and_LICENSE file for the copyright notice,
|
|
* disclaimer, contact information and the GNU Lesser General Public License.
|
|
*
|
|
* HYPRE is free software; you can redistribute it and/or modify it under the
|
|
* terms of the GNU General Public License (as published by the Free Software
|
|
* Foundation) version 2.1 dated February 1999.
|
|
*
|
|
* HYPRE is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
* WARRANTY; without even the IMPLIED WARRANTY OF MERCHANTABILITY or FITNESS
|
|
* FOR A PARTICULAR PURPOSE. See the terms and conditions of the GNU General
|
|
* Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU Lesser General Public License
|
|
* along with this program; if not, write to the Free Software Foundation,
|
|
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
*
|
|
* $Revision$
|
|
***********************************************************************EHEADER*/
|
|
|
|
|
|
|
|
|
|
/******************************************************************************
|
|
*
|
|
* HYPRE_Euclid Fortran interface
|
|
*
|
|
*****************************************************************************/
|
|
|
|
#include "headers.h"
|
|
#include "fortran.h"
|
|
|
|
/*--------------------------------------------------------------------------
|
|
* HYPRE_EuclidCreate - Return a Euclid "solver".
|
|
*--------------------------------------------------------------------------*/
|
|
|
|
void
|
|
hypre_F90_IFACE(hypre_euclidcreate, HYPRE_EUCLIDCREATE)
|
|
(int *comm, long int *solver, int *ierr)
|
|
{
|
|
*ierr = (int) HYPRE_EuclidCreate( (MPI_Comm) *comm,
|
|
(HYPRE_Solver *) solver );
|
|
}
|
|
|
|
/*--------------------------------------------------------------------------
|
|
* HYPRE_EuclidDestroy - Destroy a Euclid object.
|
|
*--------------------------------------------------------------------------*/
|
|
|
|
void
|
|
hypre_F90_IFACE(hypre_eucliddestroy, HYPRE_EUCLIDDESTROY)
|
|
(long int *solver, int *ierr)
|
|
{
|
|
*ierr = (int) HYPRE_EuclidDestroy( (HYPRE_Solver) *solver );
|
|
}
|
|
|
|
/*--------------------------------------------------------------------------
|
|
* HYPRE_EuclidSetup - Set up function for Euclid.
|
|
*--------------------------------------------------------------------------*/
|
|
|
|
void
|
|
hypre_F90_IFACE(hypre_euclidsetup, HYPRE_EUCLIDSETUP)
|
|
(long int *solver, long int *A, long int *b, long int *x, int *ierr)
|
|
{
|
|
*ierr = (int) HYPRE_EuclidSetup( (HYPRE_Solver) *solver,
|
|
(HYPRE_ParCSRMatrix) *A,
|
|
(HYPRE_ParVector) *b,
|
|
(HYPRE_ParVector) *x );
|
|
}
|
|
|
|
/*--------------------------------------------------------------------------
|
|
* HYPRE_EuclidSolve - Solve function for Euclid.
|
|
*--------------------------------------------------------------------------*/
|
|
|
|
void
|
|
hypre_F90_IFACE(hypre_euclidsolve, HYPRE_EUCLIDSOLVE)
|
|
(long int *solver, long int *A, long int *b, long int *x, int *ierr)
|
|
{
|
|
*ierr = (int) HYPRE_EuclidSolve( (HYPRE_Solver) *solver,
|
|
(HYPRE_ParCSRMatrix) *A,
|
|
(HYPRE_ParVector) *b,
|
|
(HYPRE_ParVector) *x );
|
|
}
|
|
|
|
/*--------------------------------------------------------------------------
|
|
* HYPRE_EuclidSetParams
|
|
*--------------------------------------------------------------------------*/
|
|
|
|
void
|
|
hypre_F90_IFACE(hypre_euclidsetparams, HYPRE_EUCLIDSETPARAMS)
|
|
(long int *solver, int *argc, char **argv, int *ierr)
|
|
{
|
|
*ierr = (int) HYPRE_EuclidSetParams( (HYPRE_Solver) *solver,
|
|
(int) *argc,
|
|
(char **) argv );
|
|
}
|
|
|
|
/*--------------------------------------------------------------------------
|
|
* HYPRE_EuclidSetParamsFromFile
|
|
*--------------------------------------------------------------------------*/
|
|
|
|
void
|
|
hypre_F90_IFACE(hypre_euclidsetparamsfromfile, HYPRE_EUCLIDSETPARAMSFROMFILE)
|
|
(long int *solver, char *filename, int *ierr)
|
|
{
|
|
*ierr = (int) HYPRE_EuclidSetParamsFromFile( (HYPRE_Solver) *solver,
|
|
(char *) filename );
|
|
}
|