84 bind(c, name=
'pacman_kokkos_initialize_c')
88 bind(c, name=
'pacman_kokkos_finalize_c')
92 bind(c, name=
'pacman_best_execspace_c')
98 spaceDimension, execSpace, rbfFunction, &
99 sourcePoints, nSourcePoints, sourceValues, &
100 targetPoints, nTargetPoints, targetValues)
result(ierr) &
101 bind(c, name=
'pacman_rbf_interpolate_c')
102 import :: c_int, c_ptr
103 integer(c_int),
value :: spacedimension
104 integer(c_int),
value :: execspace
105 integer(c_int),
value :: rbffunction
106 type(c_ptr),
value :: sourcepoints
107 integer(c_int),
value :: nsourcepoints
108 type(c_ptr),
value :: sourcevalues
109 type(c_ptr),
value :: targetpoints
110 integer(c_int),
value :: ntargetpoints
111 type(c_ptr),
value :: targetvalues
112 integer(c_int) :: ierr
116 spaceDimension, execSpace, method, &
117 sourcePoints, nSourcePoints, sourceValues, &
118 connVal, connValSize, connOff, connOffSize, cellTypes, &
119 targetPoints, nTargetPoints, targetValues, targetStatus)
result(ierr) &
120 bind(c, name=
'pacman_fe_interpolate_c')
121 import :: c_int, c_ptr
122 integer(c_int),
value :: spacedimension
123 integer(c_int),
value :: execspace
124 integer(c_int),
value :: method
125 type(c_ptr),
value :: sourcepoints
126 integer(c_int),
value :: nsourcepoints
127 type(c_ptr),
value :: sourcevalues
128 type(c_ptr),
value :: connval
129 integer(c_int),
value :: connvalsize
130 type(c_ptr),
value :: connoff
131 integer(c_int),
value :: connoffsize
132 type(c_ptr),
value :: celltypes
133 type(c_ptr),
value :: targetpoints
134 integer(c_int),
value :: ntargetpoints
135 type(c_ptr),
value :: targetvalues
136 type(c_ptr),
value :: targetstatus
137 integer(c_int) :: ierr
141 spaceDimension, execSpace, &
142 sourcePoints, nSourcePoints, sourceValues, &
143 targetPoints, nTargetPoints, targetValues)
result(ierr) &
144 bind(c, name=
'pacman_mls_interpolate_c')
145 import :: c_int, c_ptr
146 integer(c_int),
value :: spacedimension
147 integer(c_int),
value :: execspace
148 type(c_ptr),
value :: sourcepoints
149 integer(c_int),
value :: nsourcepoints
150 type(c_ptr),
value :: sourcevalues
151 type(c_ptr),
value :: targetpoints
152 integer(c_int),
value :: ntargetpoints
153 type(c_ptr),
value :: targetvalues
154 integer(c_int) :: ierr
158 result(ierr) bind(c, name=
'pacman_vtk_to_pacman_cell_type_c')
159 import :: c_int, c_ptr
160 type(c_ptr),
value :: vtktypes
161 type(c_ptr),
value :: pacmantypes
162 integer(c_int),
value :: n
163 integer(c_int) :: ierr
167 bind(c, name=
'pacman_vtk_cell_dim_c')
169 integer(c_int),
value,
intent(in) :: vtkcelltype
170 integer(c_int) :: dim
216 sourcePoints, sourceValues, targetPoints, targetValues, ierr)
217 integer,
intent(in) :: spacedimension
218 integer(c_int),
intent(in) :: execspace
219 integer(c_int),
intent(in) :: rbffunction
220 real(c_double),
intent(in),
contiguous,
target :: sourcepoints(:,:)
221 real(c_double),
intent(in),
contiguous,
target :: sourcevalues(:)
222 real(c_double),
intent(in),
contiguous,
target :: targetpoints(:,:)
223 real(c_double),
intent(out),
contiguous,
target :: targetvalues(:)
224 integer(c_int),
intent(out),
optional :: ierr
226 integer(c_int) :: ret, nsrc, ntgt
228 nsrc = int(
size(sourcevalues), c_int)
229 ntgt = int(
size(targetvalues), c_int)
231 int(spacedimension, c_int), execspace, rbffunction, &
232 c_loc(sourcepoints), nsrc, c_loc(sourcevalues), &
233 c_loc(targetpoints), ntgt, c_loc(targetvalues))
234 if (
present(ierr)) ierr = ret
257 sourcePoints, sourceValues, connVal, connOff, cellTypes, &
258 targetPoints, targetValues, targetStatus, ierr)
259 integer,
intent(in) :: spacedimension
260 integer(c_int),
intent(in) :: execspace
261 integer(c_int),
intent(in) :: method
262 real(c_double),
intent(in),
contiguous,
target :: sourcepoints(:,:)
263 real(c_double),
intent(in),
contiguous,
target :: sourcevalues(:)
264 integer(c_int),
intent(in),
contiguous,
target :: connval(:)
265 integer(c_int),
intent(in),
contiguous,
target :: connoff(:)
266 integer(c_int),
intent(in),
contiguous,
target :: celltypes(:)
267 real(c_double),
intent(in),
contiguous,
target :: targetpoints(:,:)
268 real(c_double),
intent(out),
contiguous,
target :: targetvalues(:)
269 integer(c_int),
intent(out),
contiguous,
target :: targetstatus(:)
270 integer(c_int),
intent(out),
optional :: ierr
272 integer(c_int) :: ret, nsrc, ntgt, nconnval, nconnoff
275 nsrc = int(
size(sourcevalues), c_int)
276 ntgt = int(
size(targetvalues), c_int)
277 nconnval = int(
size(connval), c_int)
278 nconnoff = int(
size(connoff), c_int)
279 write(*,*)
'DEBUG: nsrc=', nsrc,
' ntgt=', ntgt,
' nconnval=', nconnval,
' nconnoff=', nconnoff, &
280 ' size(connVal)=',
size(connval),
' size(connOff)=',
size(connoff)
281 do i = 1,
size(connval)
282 if (connval(i) < 0)
then
283 write(*,
'(A,I0,A,I0)')
'ERROR: connVal(', i,
') = ', connval(i)
284 if (
present(ierr)) ierr = -1
289 int(spacedimension, c_int), execspace, method, &
290 c_loc(sourcepoints), nsrc, c_loc(sourcevalues), &
291 c_loc(connval), nconnval, c_loc(connoff), nconnoff, c_loc(celltypes), &
292 c_loc(targetpoints), ntgt, c_loc(targetvalues), c_loc(targetstatus))
293 if (
present(ierr)) ierr = ret
312 sourcePoints, sourceValues, targetPoints, targetValues, ierr)
313 integer,
intent(in) :: spacedimension
314 integer(c_int),
intent(in) :: execspace
315 real(c_double),
intent(in),
contiguous,
target :: sourcepoints(:,:)
316 real(c_double),
intent(in),
contiguous,
target :: sourcevalues(:)
317 real(c_double),
intent(in),
contiguous,
target :: targetpoints(:,:)
318 real(c_double),
intent(out),
contiguous,
target :: targetvalues(:)
319 integer(c_int),
intent(out),
optional :: ierr
321 integer(c_int) :: ret, nsrc, ntgt
323 nsrc = int(
size(sourcevalues), c_int)
324 ntgt = int(
size(targetvalues), c_int)
326 int(spacedimension, c_int), execspace, &
327 c_loc(sourcepoints), nsrc, c_loc(sourcevalues), &
328 c_loc(targetpoints), ntgt, c_loc(targetvalues))
329 if (
present(ierr)) ierr = ret
342 integer(c_int),
intent(in),
contiguous,
target :: vtktypes(:)
343 integer(c_int),
intent(out),
contiguous,
target :: pacmantypes(:)
344 integer(c_int),
intent(out),
optional :: ierr
345 integer(c_int) :: ret, n
346 n = int(
size(vtktypes), c_int)
348 if (
present(ierr)) ierr = ret
356 integer(c_int),
intent(in) :: vtkcelltype
357 integer(c_int) :: dim
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.
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.
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.
Fortran module providing a high-level interface to the PACMAN interpolation library via ISO C binding...
integer(c_int), parameter, public pacman_openmp
integer(c_int), parameter, public pacman_sycl
integer(c_int) function, public pacman_vtk_cell_dim(vtkcelltype)
Return the topological dimension for a VTK cell-type ID.
subroutine, public pacman_mls_interpolate(spacedimension, execspace, sourcepoints, sourcevalues, targetpoints, targetvalues, ierr)
Interpolate scalar values from source to target points using Moving Least Squares (no mesh connectivi...
integer(c_int), parameter, public pacman_wendlandc8
integer(c_int), parameter, public pacman_threads
integer(c_int), parameter, public pacman_wendlandc6
integer(c_int), parameter, public pacman_mls
integer(c_int) function, public pacman_best_execspace()
Return the best execution space available in the current build.
integer(c_int), parameter, public pacman_hip
subroutine, public pacman_vtk_to_pacman_cell_type(vtktypes, pacmantypes, ierr)
Convert VTK cell-type IDs to PACMAN CellType codes.
integer(c_int), parameter, public pacman_fe_nearest_nearest
integer(c_int), parameter, public pacman_fe_interp_clamp
integer(c_int), parameter, public pacman_fe_interp_extrap
subroutine, public pacman_kokkos_initialize()
Initialize Kokkos with default settings.
subroutine, public pacman_kokkos_finalize()
Finalize Kokkos.
integer(c_int), parameter, public pacman_cuda
integer(c_int), parameter, public pacman_wendlandc0
integer(c_int), parameter, public pacman_wendlandc4
integer(c_int), parameter, public pacman_fe_interp_zerofill
integer(c_int), parameter, public pacman_serial
integer(c_int), parameter, public pacman_wendlandc2
integer(c_int), parameter, public pacman_fe_interp_nearest
subroutine, public pacman_rbf_interpolate(spacedimension, execspace, rbffunction, sourcepoints, sourcevalues, targetpoints, targetvalues, ierr)
Interpolate scalar values from source to target points using RBF-PUM (no mesh connectivity required).
subroutine, public pacman_fe_interpolate(spacedimension, execspace, method, sourcepoints, sourcevalues, connval, connoff, celltypes, targetpoints, targetvalues, targetstatus, ierr)
Interpolate scalar values from a source mesh to target points using finite-element transfer methods.