PACMAN 0.1.0
Portable Algorithms for Coupling, Mapping, and Adaptive iNterpolation
Loading...
Searching...
No Matches
fortran_interface.h
Go to the documentation of this file.
1//
2// This file is subject to the terms and conditions defined in
3// file 'LICENSE', which is part of this source code package.
4//
5
21#pragma once
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
27/* ------------------------------------------------------------------ */
28/* Selector constants (match PACMAN::ExecSpaces / RbfFunctions / */
29/* TransferMethods — do not rely on raw values, use these names). */
30/* ------------------------------------------------------------------ */
31
41
50
60
61/* ------------------------------------------------------------------ */
62/* Kokkos lifecycle */
63/* ------------------------------------------------------------------ */
64
70
76
84
85/* ------------------------------------------------------------------ */
86/* RBF-PUM interpolation */
87/* ------------------------------------------------------------------ */
88
110int pacman_rbf_interpolate_c(int spaceDimension, int execSpace, int rbfFunction,
111 const double *sourcePoints, int nSourcePoints,
112 const double *sourceValues,
113 const double *targetPoints, int nTargetPoints,
114 double *targetValues);
115
116/* ------------------------------------------------------------------ */
117/* FE interpolation */
118/* ------------------------------------------------------------------ */
119
148int pacman_fe_interpolate_c(int spaceDimension, int execSpace, int method,
149 const double *sourcePoints, int nSourcePoints,
150 const double *sourceValues, const int *connVal,
151 int connValSize, const int *connOff,
152 int connOffSize, const int *cellTypes,
153 const double *targetPoints, int nTargetPoints,
154 double *targetValues, int *targetStatus);
155
156/* ------------------------------------------------------------------ */
157/* MLS interpolation */
158/* ------------------------------------------------------------------ */
159
175int pacman_mls_interpolate_c(int spaceDimension, int execSpace,
176 const double *sourcePoints, int nSourcePoints,
177 const double *sourceValues,
178 const double *targetPoints, int nTargetPoints,
179 double *targetValues);
180
181/* ------------------------------------------------------------------ */
182/* Cell-type helpers */
183/* ------------------------------------------------------------------ */
184
195int pacman_vtk_to_pacman_cell_type_c(const int *vtkTypes, int *pacmanTypes,
196 int n);
197
206int pacman_vtk_cell_dim_c(int vtkCellType);
207
208#ifdef __cplusplus
209}
210#endif
void pacman_kokkos_initialize_c(void)
Initialize Kokkos with default settings.
int pacman_rbf_interpolate_c(int spaceDimension, int execSpace, int rbfFunction, const double *sourcePoints, int nSourcePoints, const double *sourceValues, const double *targetPoints, int nTargetPoints, double *targetValues)
C shim for PACMAN::rbf_interpolate.
PACMAN_RbfFunction
RBF basis-function selectors, matching PACMAN::RbfFunctions.
@ PACMAN_WENDLANDC4
@ PACMAN_WENDLANDC6
@ PACMAN_WENDLANDC8
@ PACMAN_WENDLANDC0
@ PACMAN_WENDLANDC2
PACMAN_ExecSpace
Execution space selectors, matching PACMAN::ExecSpaces.
@ PACMAN_SERIAL
@ PACMAN_THREADS
@ PACMAN_CUDA
@ PACMAN_SYCL
@ PACMAN_OPENMP
@ PACMAN_HIP
int pacman_mls_interpolate_c(int spaceDimension, int execSpace, const double *sourcePoints, int nSourcePoints, const double *sourceValues, const double *targetPoints, int nTargetPoints, double *targetValues)
C shim for PACMAN::mls_interpolate.
int pacman_best_execspace_c(void)
Return the best execution space available in the current build.
int pacman_fe_interpolate_c(int spaceDimension, int execSpace, int method, const double *sourcePoints, int nSourcePoints, const double *sourceValues, const int *connVal, int connValSize, const int *connOff, int connOffSize, const int *cellTypes, const double *targetPoints, int nTargetPoints, double *targetValues, int *targetStatus)
C shim for PACMAN::fe_interpolate.
PACMAN_FeMethod
FE method selectors, matching PACMAN::TransferMethods.
@ PACMAN_FE_INTERP_NEAREST
@ PACMAN_FE_NEAREST_NEAREST
@ PACMAN_FE_INTERP_ZEROFILL
@ PACMAN_FE_INTERP_EXTRAP
@ PACMAN_FE_INTERP_CLAMP
@ PACMAN_MLS
void pacman_kokkos_finalize_c(void)
Finalize Kokkos.
int pacman_vtk_to_pacman_cell_type_c(const int *vtkTypes, int *pacmanTypes, int n)
Convert an array of VTK cell-type IDs to PACMAN CellType values.
int pacman_vtk_cell_dim_c(int vtkCellType)
Return the topological dimension for a VTK cell-type ID.