Skip to content
Merged
Show file tree
Hide file tree
Changes from 16 commits
Commits
Show all changes
79 commits
Select commit Hold shift + click to select a range
72d3374
interpolator base class, tests [breaking]
Fuad-HH Jan 18, 2025
a1a4196
working single mesh interpolation class
Fuad-HH Jan 22, 2025
3ea79c2
interpolator test compares each entry with expected
Fuad-HH Jan 22, 2025
c8a268e
interpolator test passes for mesh to mesh
Fuad-HH Jan 23, 2025
ab1e73e
adding c api
Fuad-HH Feb 20, 2025
c392bf4
add omega_h mesh handle struct
Fuad-HH Feb 21, 2025
8b78bf1
fortran api for interpolator
Fuad-HH Feb 21, 2025
69ad666
fortran and c api to read Omega_h mesh from file
Fuad-HH Feb 21, 2025
c87ffef
added test_interpolator_fortran
Fuad-HH Feb 21, 2025
7eeeaee
interpolator frotran api test correction
Fuad-HH Feb 21, 2025
2831e82
added pcms_interpolate function
Fuad-HH Feb 21, 2025
afd2480
test pcms interpolator api
Fuad-HH Feb 21, 2025
fdf58ed
point cloud based search working
Fuad-HH May 6, 2025
28e2406
point cloud search
Fuad-HH May 14, 2025
d4eb4b5
merge c and fortran api with develop
Fuad-HH May 19, 2025
c9557b9
mesh based and mixed interpolator for degas2 xgc coupling
Fuad-HH Sep 16, 2025
ed67fcc
minor parameter changes for better interpolation
Fuad-HH Sep 16, 2025
d8a8413
Merge branch 'mergecfortapi' of github.com:Fuad-HH/pcms into mergecfo…
Fuad-HH Sep 17, 2025
b91712c
get number of mesh elements from interpolation creating call
Fuad-HH Sep 17, 2025
bd842e2
add xgc node to degas2 centroid interpolation
Fuad-HH Sep 21, 2025
bb2dbd5
merge pcms interpolator and its c/fortran API with develop
Fuad-HH Sep 29, 2025
04a178b
fix merging error with interpolator normalization
Fuad-HH Sep 30, 2025
d9bd71f
fix interpolation class test partially (the values)
Fuad-HH Oct 9, 2025
53e53b1
divided point cloud support strcuture search
Fuad-HH Oct 10, 2025
cf8ff02
adj searches use helper functions to adapt radius
Fuad-HH Oct 10, 2025
3269492
clang-format on the changed source files
Fuad-HH Oct 10, 2025
679b493
replace prints with pcms::printInfo or Error
Fuad-HH Oct 14, 2025
5fd2ed2
interpolation parameters exposed to fortran api
Fuad-HH Oct 14, 2025
da24d7a
separate mpi comm for all mesh readers
Fuad-HH Oct 15, 2025
37d7b7f
remove assertion skip
Fuad-HH Nov 3, 2025
ebaa642
add printDebugInfo and fix typo
Fuad-HH Nov 3, 2025
fccd134
check pointers not pointing same array when copying
Fuad-HH Nov 3, 2025
7f9d9e3
add test case to test a real example of interpolation
Fuad-HH Nov 13, 2025
3cbfdf6
better parameters
Fuad-HH Nov 13, 2025
c981b25
add virtual destructor
Fuad-HH Nov 13, 2025
4039ee5
rename MLSMeshInterpolation
Fuad-HH Nov 13, 2025
2fdf849
Unify interpolator handles in C/Fortran API
Fuad-HH Nov 14, 2025
225fdf7
refactor ltx interpolation test, improved verification
Fuad-HH Nov 14, 2025
4013be7
merge develop
Fuad-HH Nov 14, 2025
5120c21
remove MPI_Comm_dup for omega_h reads
Fuad-HH Nov 20, 2025
ceb6334
minor refactorings
Fuad-HH Nov 20, 2025
ce86584
fix node file read
Fuad-HH Nov 20, 2025
0f09569
make decay_factor and lambda parameters
Fuad-HH Nov 21, 2025
833b2c4
remove degas2xgc c/fortran API
Fuad-HH Nov 21, 2025
acfd98d
replace mesh in interpolation test
Fuad-HH Nov 21, 2025
15a42ab
temporary fix for ltx interpolation test
Fuad-HH Nov 21, 2025
ce23d76
add PCMS_PRINT_ENABLED for printDebugInfo
Fuad-HH Nov 21, 2025
a2ab568
add doc to interpolation_base.h
Fuad-HH Nov 21, 2025
cbed4e1
add doc to interpolator.h
Fuad-HH Nov 21, 2025
35d20d4
temporary fix to print fail log
Fuad-HH Nov 21, 2025
b10cfb1
always print log
Fuad-HH Nov 21, 2025
e2f2287
Revert "always print log"
Fuad-HH Nov 21, 2025
38644f0
Revert "temporary fix to print fail log"
Fuad-HH Nov 21, 2025
ccdca5e
rename omega_h mesh handle api
Fuad-HH Dec 5, 2025
d2d3268
divide up mesh and library handle
Fuad-HH Dec 5, 2025
682cf37
separate header for mesh
Fuad-HH Dec 5, 2025
bc94d32
rename mesh and library handle
Fuad-HH Dec 7, 2025
a5d0f17
uint->unsigned
jacobmerson Dec 7, 2025
f7678fe
formatting with clang-format
jacobmerson Dec 7, 2025
fff5adc
add specific versions to workflow for redev and meshfields
jacobmerson Dec 7, 2025
1300e3f
Merge branch 'develop' into mergecfortapi
jacobmerson Dec 7, 2025
7bb09ba
Merge branch 'develop' into mergecfortapi
jacobmerson Dec 9, 2025
45cc9d5
add additional debugging output in ltx testcase
jacobmerson Dec 9, 2025
b59c425
make sure test log is always output
jacobmerson Dec 9, 2025
9e16b03
use git has for omega-h version in workflow until
jacobmerson Dec 9, 2025
fab3d06
change export name
Fuad-HH Dec 9, 2025
e357250
add kokkoskernel hint
Fuad-HH Dec 9, 2025
ea9549b
make cmake verbose
Fuad-HH Dec 9, 2025
ae4b8f4
debug-output
Fuad-HH Dec 9, 2025
e592902
make kokkoskernels private link
jacobmerson Dec 10, 2025
8f8d161
fix build so mls_interpolation.hpp does not need the impl included.
jacobmerson Dec 11, 2025
86715bb
add kokkos kernels link to unit test
jacobmerson Dec 11, 2025
3c8d25f
add interpolator target to pcms::pcms
jacobmerson Dec 11, 2025
4c3f7f6
rework capi targets
jacobmerson Dec 11, 2025
86ce66f
add debugging output to the installation test case
jacobmerson Dec 11, 2025
4189201
rework fortranapi targets
jacobmerson Dec 11, 2025
68774c6
update interpolator targets name
jacobmerson Dec 11, 2025
76b88bd
use pcms::pcms in example build directory
jacobmerson Dec 11, 2025
b7eee41
reorder config file to move interpolator target before c/fortran apis
jacobmerson Dec 12, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion src/pcms/capi/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,21 @@ set(CAPI_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/client.h ${CMAKE_CURRENT_SOURCE_DIR
set_target_properties(pcms_capi PROPERTIES PUBLIC_HEADER "${CAPI_HEADERS}"
OUTPUT_NAME pcmscapi
EXPORT_NAME capi)

add_library(pcms_interpolator_capi interpolator.cpp kokkos.cpp)
add_library(pcms::interpolator::capi ALIAS pcms_interpolator_capi)
target_link_libraries(pcms_interpolator_capi PUBLIC MPI::MPI_C PRIVATE pcms::interpolator)
target_include_directories( pcms_interpolator_capi
PUBLIC
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../..>" # this makes the module path cpms/capi
"$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/pcms/capi>")
set(INT_CAPI_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/interpolator.h)
set_target_properties(pcms_interpolator_capi PROPERTIES PUBLIC_HEADERS "${INT_CAPI_HEADERS}"
OUTPUTNAME pcmsinterpolatorcapi
EXPORT_NAME interpolatorcapi)

install(
TARGETS pcms_capi
TARGETS pcms_capi pcms_interpolator_capi
EXPORT pcms_capi-targets
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
Expand All @@ -23,3 +36,4 @@ install(
EXPORT pcms_capi-targets
NAMESPACE pcms::
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/pcms)

151 changes: 151 additions & 0 deletions src/pcms/capi/interpolator.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
//
// Created by hasanm4 on 2/17/25.
//
#include <pcms/capi/kokkos.h>
#include "interpolator.h"
#include <interpolation_base.h>
#include <Omega_h_file.hpp>
#include <Omega_h_library.hpp>
#include <Omega_h_mesh.hpp>


//[[nodiscard]]
PcmsInterpolatorHandle pcms_create_interpolator(PcmsInterpolatorOHMeshHandle oh_mesh, double radius)
{
auto* source_mesh = reinterpret_cast<Omega_h::Mesh*>(oh_mesh.mesh_handle);
auto* interpolator = new MLSInterpolationHandler(*source_mesh, radius);
return {reinterpret_cast<void*>(interpolator)};
}


PcmsPointBasedInterpolatorHandle pcms_create_point_based_interpolator(void* source_points, int source_points_size,
void* target_points, int target_points_size, double radius) {

auto source_points_view = pcms::ScalarArrayView<double, pcms::HostMemorySpace>(reinterpret_cast<double*>(source_points), source_points_size);
auto target_points_view = pcms::ScalarArrayView<double, pcms::HostMemorySpace>(reinterpret_cast<double*>(target_points), target_points_size);
auto* interpolator = new MLSPointCloudInterpolation(source_points_view, target_points_view, 2, radius, 12, 3, true);
return {reinterpret_cast<void*>(interpolator)};
}

PcmsPointBasedInterpolatorHandle pcms_create_degas2xgc_interpolator(const char* xgc_mesh_filename, const char* dg2_mesh_filename, double radius)
{
// use the xgc_mesh_nodes as source points and
// dg2 element centroids as target points
// then, create a point based interpolator like above
auto xgc_fname = std::string(xgc_mesh_filename);
auto dg2_fname = std::string(dg2_mesh_filename);

// trim the filenames since they are coming from c or fortran api which may have extra spaces at the end
xgc_fname = xgc_fname.erase(xgc_fname.find_last_not_of(" \n\r\t")+1);
dg2_fname = dg2_fname.erase(dg2_fname.find_last_not_of(" \n\r\t")+1);
printf("The interpolator got xgc mesh file: %s and dg2 mesh file: %s\n", xgc_fname.c_str(), dg2_fname.c_str());

// read the meshes
auto xgc_mesh_lib = Omega_h::Library();
auto xgc_mesh = Omega_h::binary::read(xgc_fname, xgc_mesh_lib.world());
auto dg2_mesh_lib = Omega_h::Library();
auto dg2_mesh = Omega_h::binary::read(dg2_fname, dg2_mesh_lib.world());

auto xgc_nodes = xgc_mesh.coords();
auto xgc_num_nodes = xgc_mesh.nverts();
OMEGA_H_CHECK_PRINTF(xgc_mesh.dim() == 2, "XGC mesh dimension is not 2D %d\n", xgc_mesh.dim());
OMEGA_H_CHECK_PRINTF(xgc_num_nodes * 2 == xgc_nodes.size(),
"XGC mesh nodes size does not match the number of vertices %d != %d\n", xgc_num_nodes * 2, xgc_nodes.size());
OMEGA_H_CHECK_PRINTF(dg2_mesh.dim() == 2, "DG2 mesh dimension is not 2D %d\n", dg2_mesh.dim());

auto dg2_num_elems = dg2_mesh.nelems();
auto dg2_elem_centroids = getCentroids(dg2_mesh);
OMEGA_H_CHECK_PRINTF(dg2_num_elems * 2 == dg2_elem_centroids.size(),
"DG2 mesh element centroids size does not match the number of elements %d != %d\n", dg2_num_elems * 2, dg2_elem_centroids.size());

Omega_h::HostRead<Omega_h::Real> xgc_nodes_host(xgc_nodes);
Omega_h::HostRead<Omega_h::Real> dg2_elem_centroids_host(dg2_elem_centroids);

return pcms_create_point_based_interpolator(
(void*) dg2_elem_centroids_host.data(), dg2_elem_centroids.size(),
(void*) xgc_nodes_host.data(), xgc_nodes.size(),
radius);
}

PcmsPointBasedInterpolatorHandle pcms_create_degas2xgcnode_interpolator(void* target_points, int target_points_size,
const char* dg2_mesh_filename, double radius)
{
// same as above pcms_create_degas2xgc_interpolator but the target points are provided by the user
// this is useful when the corresponding xgc mesh is not available

auto dg2_fname = std::string(dg2_mesh_filename);
dg2_fname = dg2_fname.erase(dg2_fname.find_last_not_of(" \n\r\t")+1);
printf("The interpolator got dg2 mesh file: %s\n", dg2_fname.c_str());
auto dg2_mesh_lib = Omega_h::Library(nullptr, nullptr, MPI_COMM_SELF);
auto dg2_mesh = Omega_h::binary::read(dg2_fname, dg2_mesh_lib.world());

OMEGA_H_CHECK_PRINTF(dg2_mesh.dim() == 2, "DG2 mesh dimension is not 2D %d\n", dg2_mesh.dim());
auto dg2_num_elems = dg2_mesh.nelems();
auto dg2_elem_centroids = getCentroids(dg2_mesh);
OMEGA_H_CHECK_PRINTF(dg2_num_elems * 2 == dg2_elem_centroids.size(),
"DG2 mesh element centroids size does not match the number of elements %d != %d\n", dg2_num_elems * 2, dg2_elem_centroids.size());

Omega_h::HostRead<Omega_h::Real> dg2_elem_centroids_host(dg2_elem_centroids);
printf("Number of DG2 element centroids: %d\n", dg2_elem_centroids.size()/2);

return pcms_create_point_based_interpolator(
(void*) dg2_elem_centroids_host.data(), dg2_elem_centroids_host.size(),
target_points, target_points_size,
radius);
}

void pcms_destroy_point_based_interpolator(PcmsPointBasedInterpolatorHandle interpolator)
{
if (interpolator.pointer != nullptr) {
delete reinterpret_cast<MLSPointCloudInterpolation*>(interpolator.pointer);
}
}

void pcms_destroy_interpolator(PcmsInterpolatorHandle interpolator)
{
if (interpolator.pointer != nullptr) {
delete reinterpret_cast<MLSInterpolationHandler*>(interpolator.pointer);
}
}

PcmsInterpolatorOHMeshHandle read_oh_mesh(const char * filename){
auto fname = std::string(filename);
// trim the filename since it is coming from c or fortran api which may have extra spaces at the end
fname.erase(fname.find_last_not_of(" \n\r\t")+1);
auto* oh_lib = new Omega_h::Library();
auto* mesh = new Omega_h::Mesh(Omega_h::binary::read(fname, oh_lib->world()));

return {reinterpret_cast<void*>(mesh), reinterpret_cast<void*>(oh_lib)};
}

void release_oh_mesh(PcmsInterpolatorOHMeshHandle oh_mesh){
if (oh_mesh.mesh_handle != nullptr) {
assert(oh_mesh.lib_handle != nullptr);
delete reinterpret_cast<Omega_h::Mesh*>(oh_mesh.mesh_handle);
delete reinterpret_cast<Omega_h::Library*>(oh_mesh.lib_handle);
}
}

void pcms_interpolate(PcmsInterpolatorHandle interpolator, void* input, int input_size, void* output, int output_size) {
auto* mls_interpolator = reinterpret_cast<MLSInterpolationHandler*>(interpolator.pointer);

OMEGA_H_CHECK_PRINTF(input_size == mls_interpolator->getSourceSize(), "Input array size does not match the source size %d != %d\n", input_size, mls_interpolator->getSourceSize());
OMEGA_H_CHECK_PRINTF(output_size == mls_interpolator->getTargetSize(), "Output array size does not match the target size %d != %d\n", output_size, mls_interpolator->getTargetSize());

pcms::ScalarArrayView<double, pcms::HostMemorySpace> input_array(reinterpret_cast<double*>(input), input_size);
pcms::ScalarArrayView<double, pcms::HostMemorySpace> output_array(reinterpret_cast<double*> (output), output_size);

mls_interpolator->eval(input_array, output_array);
}

void pcms_interpolate_point_based(PcmsPointBasedInterpolatorHandle interpolator, void* input, int input_size, void* output, int output_size) {
auto* mls_interpolator = reinterpret_cast<MLSPointCloudInterpolation*>(interpolator.pointer);

OMEGA_H_CHECK_PRINTF(input_size == mls_interpolator->getSourceSize(), "Input array size does not match the source size %d != %d\n", input_size, mls_interpolator->getSourceSize());
OMEGA_H_CHECK_PRINTF(output_size == mls_interpolator->getTargetSize(), "Output array size does not match the target size %d != %d\n", output_size, mls_interpolator->getTargetSize());

pcms::ScalarArrayView<double, pcms::HostMemorySpace> input_array(reinterpret_cast<double*>(input), input_size);
pcms::ScalarArrayView<double, pcms::HostMemorySpace> output_array(reinterpret_cast<double*> (output), output_size);

mls_interpolator->eval(input_array, output_array);
}
52 changes: 52 additions & 0 deletions src/pcms/capi/interpolator.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
//
// Created by hasanm4 on 2/17/25.
//

#ifndef PCMS_INTERPOLATOR_CAPI_H
#define PCMS_INTERPOLATOR_CAPI_H

#include <stdint.h>

#ifdef __cplusplus
extern "C" {
#endif

struct PcmsInterpolatorHandle { void* pointer; };
typedef struct PcmsInterpolatorHandle PcmsInterpolatorHandle;

struct PcmsPointBasedInterpolatorHandle {void * pointer;};
typedef struct PcmsPointBasedInterpolatorHandle PcmsPointBasedInterpolatorHandle;

struct PcmsInterpolatorOHMeshHandle {
void* mesh_handle;
void* lib_handle;
};
typedef struct PcmsInterpolatorOHMeshHandle PcmsInterpolatorOHMeshHandle;

/*
enum for interpolation type
*/

PcmsInterpolatorHandle pcms_create_interpolator(PcmsInterpolatorOHMeshHandle oh_mesh, double radius);
PcmsPointBasedInterpolatorHandle pcms_create_point_based_interpolator(void* source_points, int source_points_size,
void* target_points, int target_points_size, double radius);
PcmsPointBasedInterpolatorHandle pcms_create_degas2xgc_interpolator(const char* xgc_mesh_filename, const char* dg2_mesh_filename, double radius);
PcmsPointBasedInterpolatorHandle pcms_create_degas2xgcnode_interpolator(void* target_points, int target_points_size,
const char* dg2_mesh_filename, double radius);
void pcms_destroy_interpolator(PcmsInterpolatorHandle interpolator);
void pcms_destroy_point_based_interpolator(PcmsPointBasedInterpolatorHandle interpolator);

PcmsInterpolatorOHMeshHandle read_oh_mesh(const char* filename);
void release_oh_mesh(PcmsInterpolatorOHMeshHandle oh_mesh_handle);


void pcms_interpolate(PcmsInterpolatorHandle interpolator, void* input, int input_size, void* output, int output_size);
void pcms_interpolate_point_based(PcmsPointBasedInterpolatorHandle interpolator, void* input, int input_size, void* output, int output_size);



#ifdef __cplusplus
}
#endif

#endif // PCMS_INTERPOLATOR_CAPI_H
24 changes: 24 additions & 0 deletions src/pcms/fortranapi/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,22 @@ set_target_properties(pcms_fortranapi PROPERTIES Fortran_MODULE_DIRECTORY ${CMAK
target_include_directories(pcms_fortranapi PUBLIC $<BUILD_INTERFACE:$<TARGET_PROPERTY:pcms::fortranapi,Fortran_MODULE_DIRECTORY>>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_LIBDIR}/fortran>)
target_link_libraries(pcms_fortranapi PRIVATE pcms::capi PUBLIC Kokkos::kokkos)

add_library(pcms_interpolator_fortranapi pcms_interpolator.f90 interpolator_wrap.c)
add_library(pcms::interpolator::fortranapi ALIAS pcms_interpolator_fortranapi)
set_target_properties(pcms_interpolator_fortranapi PROPERTIES Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/fortran
OUTPUT_NAME pcmsinterpolatorfortranapi
EXPORT_NAME interpolatorfortranapi)
target_include_directories(pcms_interpolator_fortranapi PUBLIC $<BUILD_INTERFACE:$<TARGET_PROPERTY:pcms::interpolator::fortranapi,Fortran_MODULE_DIRECTORY>>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_LIBDIR}/fortran>)
target_link_libraries(pcms_interpolator_fortranapi PRIVATE pcms::interpolator::capi PUBLIC Kokkos::kokkos)

INSTALL(DIRECTORY $<TARGET_PROPERTY:pcms::fortranapi,Fortran_MODULE_DIRECTORY>
DESTINATION ${CMAKE_INSTALL_LIBDIR})

INSTALL(DIRECTORY $<TARGET_PROPERTY:pcms::interpolator::fortranapi,Fortran_MODULE_DIRECTORY>
DESTINATION ${CMAKE_INSTALL_LIBDIR})

install(
TARGETS pcms_fortranapi
EXPORT pcms_fortranapi-targets
Expand All @@ -17,6 +31,16 @@ install(
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/pcms/fortranapi/)

install(
TARGETS pcms_interpolator_fortranapi
EXPORT pcms_fortranapi-targets
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/pcms/fortranapi/)

install(
EXPORT pcms_fortranapi-targets
NAMESPACE pcms::
Expand Down
44 changes: 44 additions & 0 deletions src/pcms/fortranapi/interpolator.i
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
%module pcms_interpolator
%{
#include "pcms/capi/interpolator.h"
#include "pcms/capi/kokkos.h"
%}
%include <../external/flibhpc/include/mpi.i>
%include <stdint.i>
%include <typemaps.i>

struct PcmsInterpolatorOHMeshHandle
{
void* mesh_handle;
void* lib_handle;
};
typedef struct PcmsInterpolatorOHMeshHandle PcmsInterpolatorOHMeshHandle;

struct PcmsInterpolatorHandle {
void* pointer;
};
typedef struct PcmsInterpolatorHandle PcmsInterpolatorHandle;

struct PcmsPointBasedInterpolatorHandle {void * pointer;};
typedef struct PcmsPointBasedInterpolatorHandle PcmsPointBasedInterpolatorHandle;



PcmsPointBasedInterpolatorHandle pcms_create_point_based_interpolator(void* source_points, int source_points_size,
void* target_points, int target_points_size, double radius);
PcmsPointBasedInterpolatorHandle pcms_create_degas2xgc_interpolator(const char* xgc_mesh_filename, const char* dg2_mesh_filename, double radius);
PcmsPointBasedInterpolatorHandle pcms_create_degas2xgcnode_interpolator(void* target_points, int target_points_size,
const char* dg2_mesh_filename, double radius);
PcmsInterpolatorHandle pcms_create_interpolator(PcmsInterpolatorOHMeshHandle oh_mesh, double radius);
void pcms_destroy_interpolator(PcmsInterpolatorHandle interpolator);
void pcms_destroy_point_based_interpolator(PcmsPointBasedInterpolatorHandle interpolator);

void pcms_kokkos_initialize_without_args();
void pcms_kokkos_finalize();

PcmsInterpolatorOHMeshHandle read_oh_mesh(const char* filename);
void release_oh_mesh(PcmsInterpolatorOHMeshHandle oh_mesh);

void pcms_interpolate(PcmsInterpolatorHandle interpolator, void* input, int input_size, void* output, int output_size);
void pcms_interpolate_point_based(PcmsPointBasedInterpolatorHandle interpolator, void* input, int input_size, void* output, int output_size);

Loading