Hello all,

I am wondering about the right datatype to use for Hypre routines in a Fortran code.

The Hypre manual provides a conversion table from C to Fortran on page 80

     https://hypre.readthedocs.io/_/downloads/en/latest/pdf/

but the small example that follows is a bit contradictory. To be exact:

The table on page 80 says: Instead of C "Hypre_Type" use Fortran "integer*8".

On the next page they give the example of

    HYPRE_IJMatrixSetValues(HYPRE_IJMatrix matrix, int nrows, ...)

and they say that Fortran types should be

    integer*8 :: matrix
    integer :: nrows

However, the documentation of HYPRE_IJMatrixSetValues on page 102 actually has the signature

    HYPRE_IJMatrixSetValues(HYPRE_IJMatrix matrix, HYPRE_Int nrows, ...)

So apparently "HYPRE_Int" is not to be misunderstood as "Hypre_Type", which would be replaced by integer*8, but instead as a plain integer, i.e. integer*4 in Fortran.

Can you confirm that?

Also is that Hypre_Int always an integer*4 or is it adjusted to match PETScInt?

Best regards,
Bastian Löhrer




--

Dipl.-Ing. Bastian Löhrer

Technische Universität Dresden
Fakultät für Maschinenwesen
Institut für Strömungsmechanik
01062 Dresden

tel: +49 351 463-37496
cell: +49 152 241-72799
fax: +49 351 463-35246
mail: bastian.loeh...@tu-dresden.de

Besucheradresse / Visitor address:
Zeuner-Bau Zi 152A
George-Bähr-Straße 3c
01062 Dresden

Reply via email to