<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Hello all,</p>
<p>I am wondering about the right datatype to use for Hypre routines
in a Fortran code.</p>
<p>The Hypre manual provides a conversion table from C to Fortran on
page 80</p>
<p> <a class="moz-txt-link-freetext" href="https://hypre.readthedocs.io/_/downloads/en/latest/pdf/">https://hypre.readthedocs.io/_/downloads/en/latest/pdf/</a></p>
<p>but the small example that follows is a bit contradictory. To be
exact:</p>
<p>The table on page 80 says: Instead of C "Hypre_Type" use Fortran
"integer*8".</p>
<p>On the next page they give the example of <br>
</p>
<p> HYPRE_IJMatrixSetValues(HYPRE_IJMatrix matrix, int nrows,
...)</p>
<p>and they say that Fortran types should be <br>
</p>
<p> integer*8 :: matrix<br>
integer :: nrows</p>
<p>However, the documentation of HYPRE_IJMatrixSetValues on page 102
actually has the signature<br>
</p>
<p> HYPRE_IJMatrixSetValues(HYPRE_IJMatrix matrix, HYPRE_Int
nrows, ...)</p>
<p>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.</p>
<p>Can you confirm that?</p>
<p>Also is that Hypre_Int always an integer*4 or is it adjusted to
match PETScInt?</p>
<p>Best regards,<br>
Bastian Löhrer<br>
</p>
<br>
<p><br>
</p>
<p><br>
</p>
<div class="moz-signature">-- <br>
<div style="font-size:80%;">
<p>
Dipl.-Ing. Bastian Löhrer
</p>
<p>
Technische Universität Dresden<br>
Fakultät für Maschinenwesen<br>
Institut für Strömungsmechanik<br>
01062 Dresden
</p>
<p>
</p>
<table style="font-size:100%;" border="0">
<tbody>
<tr>
<td>tel: </td>
<td>+49 351 463-37496 </td>
</tr>
<tr>
<td>cell:</td>
<td>+49 152 241-72799 </td>
</tr>
<tr>
<td>fax: </td>
<td>+49 351 463-35246 </td>
</tr>
<tr>
<td>mail:</td>
<td> <a href="mailto:bastian.loehrer@tu-dresden.de"
class="moz-txt-link-freetext">bastian.loehrer@tu-dresden.de</a>
</td>
</tr>
</tbody>
</table>
<p>
Besucheradresse / Visitor address:<br>
<a
href="https://navigator.tu-dresden.de/etplan/zeu/00/raum/118100.0140">
Zeuner-Bau Zi 152A<br>
George-Bähr-Straße 3c<br>
01062 Dresden<br>
</a>
</p>
</div>
</div>
</body>
</html>