forked from hypre-space/hypre
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathF90_HYPRE_sstruct_stencil.c
75 lines (65 loc) · 2.34 KB
/
F90_HYPRE_sstruct_stencil.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
/******************************************************************************
* Copyright (c) 1998 Lawrence Livermore National Security, LLC and other
* HYPRE Project Developers. See the top-level COPYRIGHT file for details.
*
* SPDX-License-Identifier: (Apache-2.0 OR MIT)
******************************************************************************/
/******************************************************************************
*
* HYPRE_SStructStencil interface
*
*****************************************************************************/
#include "_hypre_sstruct_mv.h"
#include "fortran.h"
#ifdef __cplusplus
extern "C" {
#endif
/*--------------------------------------------------------------------------
* HYPRE_SStructStencilCreate
*--------------------------------------------------------------------------*/
void
hypre_F90_IFACE(hypre_sstructstencilcreate, HYPRE_SSTRUCTSTENCILCREATE)
(hypre_F90_Int *ndim,
hypre_F90_Int *size,
hypre_F90_Obj *stencil_ptr,
hypre_F90_Int *ierr)
{
*ierr = (hypre_F90_Int)
(HYPRE_SStructStencilCreate(
hypre_F90_PassInt (ndim),
hypre_F90_PassInt (size),
hypre_F90_PassObjRef (HYPRE_SStructStencil, stencil_ptr) ) );
}
/*--------------------------------------------------------------------------
* HYPRE_SStructStencilDestroy
*--------------------------------------------------------------------------*/
void
hypre_F90_IFACE(hypre_sstructstencildestroy, HYPRE_SSTRUCTSTENCILDESTROY)
(hypre_F90_Obj *stencil,
hypre_F90_Int *ierr)
{
*ierr = (hypre_F90_Int)
(HYPRE_SStructStencilDestroy(
hypre_F90_PassObj (HYPRE_SStructStencil, stencil) ) );
}
/*--------------------------------------------------------------------------
* HYPRE_SStructStencilSetEntry
*--------------------------------------------------------------------------*/
void
hypre_F90_IFACE(hypre_sstructstencilsetentry, HYPRE_SSTRUCTSTENCILSETENTRY)
(hypre_F90_Obj *stencil,
hypre_F90_Int *entry,
hypre_F90_IntArray *offset,
hypre_F90_Int *var,
hypre_F90_Int *ierr)
{
*ierr = (hypre_F90_Int)
(HYPRE_SStructStencilSetEntry(
hypre_F90_PassObj (HYPRE_SStructStencil, stencil),
hypre_F90_PassInt (entry),
hypre_F90_PassIntArray (offset),
hypre_F90_PassInt (var) ) );
}
#ifdef __cplusplus
}
#endif