83 bind(c, name=
'pacman_kokkos_initialize_c')
87 bind(c, name=
'pacman_kokkos_finalize_c')
91 bind(c, name=
'pacman_best_execspace_c')
97 spaceDimension, execSpace, rbfFunction, &
98 sourcePoints, nSourcePoints, sourceValues, &
99 targetPoints, nTargetPoints, targetValues)
result(ierr) &
100 bind(c, name=
'pacman_rbf_interpolate_c')
101 import :: c_int, c_ptr
102 integer(c_int),
value :: spacedimension
103 integer(c_int),
value :: execspace
104 integer(c_int),
value :: rbffunction
105 type(c_ptr),
value :: sourcepoints
106 integer(c_int),
value :: nsourcepoints
107 type(c_ptr),
value :: sourcevalues
108 type(c_ptr),
value :: targetpoints
109 integer(c_int),
value :: ntargetpoints
110 type(c_ptr),
value :: targetvalues
111 integer(c_int) :: ierr
115 spaceDimension, execSpace, method, &
116 sourcePoints, nSourcePoints, sourceValues, &
117 connVal, connValSize, connOff, connOffSize, cellTypes, &
118 targetPoints, nTargetPoints, targetValues, targetStatus)
result(ierr) &
119 bind(c, name=
'pacman_fe_interpolate_c')
120 import :: c_int, c_ptr
121 integer(c_int),
value :: spacedimension
122 integer(c_int),
value :: execspace
123 integer(c_int),
value :: method
124 type(c_ptr),
value :: sourcepoints
125 integer(c_int),
value :: nsourcepoints
126 type(c_ptr),
value :: sourcevalues
127 type(c_ptr),
value :: connval
128 integer(c_int),
value :: connvalsize
129 type(c_ptr),
value :: connoff
130 integer(c_int),
value :: connoffsize
131 type(c_ptr),
value :: celltypes
132 type(c_ptr),
value :: targetpoints
133 integer(c_int),
value :: ntargetpoints
134 type(c_ptr),
value :: targetvalues
135 type(c_ptr),
value :: targetstatus
136 integer(c_int) :: ierr
140 spaceDimension, execSpace, &
141 sourcePoints, nSourcePoints, sourceValues, &
142 targetPoints, nTargetPoints, targetValues)
result(ierr) &
143 bind(c, name=
'pacman_mls_interpolate_c')
144 import :: c_int, c_ptr
145 integer(c_int),
value :: spacedimension
146 integer(c_int),
value :: execspace
147 type(c_ptr),
value :: sourcepoints
148 integer(c_int),
value :: nsourcepoints
149 type(c_ptr),
value :: sourcevalues
150 type(c_ptr),
value :: targetpoints
151 integer(c_int),
value :: ntargetpoints
152 type(c_ptr),
value :: targetvalues
153 integer(c_int) :: ierr
157 result(ierr) bind(c, name=
'pacman_vtk_to_pacman_cell_type_c')
158 import :: c_int, c_ptr
159 type(c_ptr),
value :: vtktypes
160 type(c_ptr),
value :: pacmantypes
161 integer(c_int),
value :: n
162 integer(c_int) :: ierr
208 sourcePoints, sourceValues, targetPoints, targetValues, ierr)
209 integer,
intent(in) :: spacedimension
210 integer(c_int),
intent(in) :: execspace
211 integer(c_int),
intent(in) :: rbffunction
212 real(c_double),
intent(in),
contiguous,
target :: sourcepoints(:,:)
213 real(c_double),
intent(in),
contiguous,
target :: sourcevalues(:)
214 real(c_double),
intent(in),
contiguous,
target :: targetpoints(:,:)
215 real(c_double),
intent(out),
contiguous,
target :: targetvalues(:)
216 integer(c_int),
intent(out),
optional :: ierr
218 integer(c_int) :: ret, nsrc, ntgt
220 nsrc = int(
size(sourcevalues), c_int)
221 ntgt = int(
size(targetvalues), c_int)
223 int(spacedimension, c_int), execspace, rbffunction, &
224 c_loc(sourcepoints), nsrc, c_loc(sourcevalues), &
225 c_loc(targetpoints), ntgt, c_loc(targetvalues))
226 if (
present(ierr)) ierr = ret
249 sourcePoints, sourceValues, connVal, connOff, cellTypes, &
250 targetPoints, targetValues, targetStatus, ierr)
251 integer,
intent(in) :: spacedimension
252 integer(c_int),
intent(in) :: execspace
253 integer(c_int),
intent(in) :: method
254 real(c_double),
intent(in),
contiguous,
target :: sourcepoints(:,:)
255 real(c_double),
intent(in),
contiguous,
target :: sourcevalues(:)
256 integer(c_int),
intent(in),
contiguous,
target :: connval(:)
257 integer(c_int),
intent(in),
contiguous,
target :: connoff(:)
258 integer(c_int),
intent(in),
contiguous,
target :: celltypes(:)
259 real(c_double),
intent(in),
contiguous,
target :: targetpoints(:,:)
260 real(c_double),
intent(out),
contiguous,
target :: targetvalues(:)
261 integer(c_int),
intent(out),
contiguous,
target :: targetstatus(:)
262 integer(c_int),
intent(out),
optional :: ierr
264 integer(c_int) :: ret, nsrc, ntgt, nconnval, nconnoff
267 nsrc = int(
size(sourcevalues), c_int)
268 ntgt = int(
size(targetvalues), c_int)
269 nconnval = int(
size(connval), c_int)
270 nconnoff = int(
size(connoff), c_int)
271 write(*,*)
'DEBUG: nsrc=', nsrc,
' ntgt=', ntgt,
' nconnval=', nconnval,
' nconnoff=', nconnoff, &
272 ' size(connVal)=',
size(connval),
' size(connOff)=',
size(connoff)
273 do i = 1,
size(connval)
274 if (connval(i) < 0)
then
276 write(*,
'(A,I0,A,I0)')
'ERROR: connVal(', i,
') = ', connval(i)
277 if (
present(ierr)) ierr = -1
283 int(spacedimension, c_int), execspace, method, &
284 c_loc(sourcepoints), nsrc, c_loc(sourcevalues), &
285 c_loc(connval), nconnval, c_loc(connoff), nconnoff, c_loc(celltypes), &
286 c_loc(targetpoints), ntgt, c_loc(targetvalues), c_loc(targetstatus))
287 if (
present(ierr)) ierr = ret
306 sourcePoints, sourceValues, targetPoints, targetValues, ierr)
307 integer,
intent(in) :: spacedimension
308 integer(c_int),
intent(in) :: execspace
309 real(c_double),
intent(in),
contiguous,
target :: sourcepoints(:,:)
310 real(c_double),
intent(in),
contiguous,
target :: sourcevalues(:)
311 real(c_double),
intent(in),
contiguous,
target :: targetpoints(:,:)
312 real(c_double),
intent(out),
contiguous,
target :: targetvalues(:)
313 integer(c_int),
intent(out),
optional :: ierr
315 integer(c_int) :: ret, nsrc, ntgt
317 nsrc = int(
size(sourcevalues), c_int)
318 ntgt = int(
size(targetvalues), c_int)
320 int(spacedimension, c_int), execspace, &
321 c_loc(sourcepoints), nsrc, c_loc(sourcevalues), &
322 c_loc(targetpoints), ntgt, c_loc(targetvalues))
323 if (
present(ierr)) ierr = ret
336 integer(c_int),
intent(in),
contiguous,
target :: vtktypes(:)
337 integer(c_int),
intent(out),
contiguous,
target :: pacmantypes(:)
338 integer(c_int),
intent(out),
optional :: ierr
339 integer(c_int) :: ret, n
340 n = int(
size(vtktypes), c_int)
342 if (
present(ierr)) ierr = ret
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.
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
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.