From f30317854723fa4424eee401f116e4458a3453df Mon Sep 17 00:00:00 2001 From: amartin Date: Fri, 17 Jun 2022 11:13:37 +1000 Subject: [PATCH] Manually added deflate/inflate methods to wrapper --- src/bindings/p4est_api.jl | 29 +++++++++++++++++++++++++++++ src/bindings/p8est_api.jl | 30 ++++++++++++++++++++++++++++++ 2 files changed, 59 insertions(+) diff --git a/src/bindings/p4est_api.jl b/src/bindings/p4est_api.jl index d81f291..efadb87 100644 --- a/src/bindings/p4est_api.jl +++ b/src/bindings/p4est_api.jl @@ -823,3 +823,32 @@ end function p4est_vtk_write_footer(cont) ccall((:p4est_vtk_write_footer, p4est_lib), Cint, (Ptr{p4est_vtk_context_t},), cont) end + +# Julia wrapper for header: p4est_io.h +# Generated manually +function p4est_deflate_quadrants(p4est, data) + ccall((:p4est_deflate_quadrants, p4est_lib), + Ptr{sc_array_t}, (Ptr{p4est_t}, Ptr{Ptr{sc_array_t}}), p4est, data) +end + +function p4est_inflate(mpicomm, connectivity, + global_first_quadrant, pertree, + quadrants, data, user_pointer) + ccall((:p4est_inflate, p4est_lib), + Ptr{p4est_t}, + (MPI_Comm, Ptr{p4est_connectivity_t}, + Ptr{p4est_gloidx_t}, Ptr{p4est_gloidx_t}, + Ptr{sc_array_t}, Ptr{sc_array_t}, Ptr{Cvoid}), + mpicomm, connectivity, global_first_quadrant, pertree, quadrants, data, user_pointer) +end + +# Julia wrapper for header: p4est_communication.h +# Generated manually +# void p4est_comm_count_pertree (p4est_t * p4est, +# p4est_gloidx_t * pertree) +function p4est_comm_count_pertree(p4est, pertree) + ccall((:p4est_comm_count_pertree, p4est_lib), + Cvoid, + (Ptr{p4est_t}, Ptr{p4est_gloidx_t}), + p4est, pertree) +end diff --git a/src/bindings/p8est_api.jl b/src/bindings/p8est_api.jl index bdf49b4..c909a81 100644 --- a/src/bindings/p8est_api.jl +++ b/src/bindings/p8est_api.jl @@ -875,3 +875,33 @@ end function p8est_vtk_write_footer(cont) ccall((:p8est_vtk_write_footer, p4est_lib), Cint, (Ptr{p8est_vtk_context_t},), cont) end + +# Julia wrapper for header: p8est_io.h +# Generated manually +function p8est_deflate_quadrants(p4est, data) + ccall((:p8est_deflate_quadrants, p4est_lib), + Ptr{sc_array_t}, (Ptr{p8est_t}, Ptr{Ptr{sc_array_t}}), p4est, data) +end + +function p8est_inflate(mpicomm, connectivity, + global_first_quadrant, pertree, + quadrants, data, user_pointer) + + ccall((:p8est_inflate, p4est_lib), + Ptr{p8est_t}, + (MPI_Comm, Ptr{p8est_connectivity_t}, + Ptr{p4est_gloidx_t}, Ptr{p4est_gloidx_t}, + Ptr{sc_array_t}, Ptr{sc_array_t}, Ptr{Cvoid}), + mpicomm, connectivity, global_first_quadrant, pertree, quadrants, data, user_pointer) +end + +# Julia wrapper for header: p8est_communication.h +# Generated manually +# void p4est_comm_count_pertree (p4est_t * p4est, +# p4est_gloidx_t * pertree) +function p8est_comm_count_pertree(p4est, pertree) + ccall((:p8est_comm_count_pertree, p4est_lib), + Cvoid, + (Ptr{p8est_t}, Ptr{p4est_gloidx_t}), + p4est, pertree) +end