diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index bbc8039..21b3ceb 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -59,44 +59,44 @@ jobs: t8code_version: - '4.0.0' t8code_snapshot: - - '26.09' + - '26.11' include: - julia-version: '1.10' julia-arch: 'default' os: macos-latest mpi-provider: JLL_MPI t8code_version: '4.0.0' - t8code_snapshot: '26.09' + t8code_snapshot: '26.11' - julia-version: '1' julia-arch: 'default' os: macos-latest mpi-provider: JLL_MPI t8code_version: '4.0.0' - t8code_snapshot: '26.09' + t8code_snapshot: '26.11' - julia-version: 'nightly' julia-arch: 'default' os: macos-latest mpi-provider: JLL_MPI t8code_version: '4.0.0' - t8code_snapshot: '26.09' + t8code_snapshot: '26.11' - julia-version: '1.10' julia-arch: 'x64' os: ubuntu-latest mpi-provider: SYSTEM_MPI t8code_version: '4.0.0' - t8code_snapshot: '26.09' + t8code_snapshot: '26.11' - julia-version: '1' julia-arch: 'x64' os: ubuntu-latest mpi-provider: SYSTEM_MPI t8code_version: '4.0.0' - t8code_snapshot: '26.09' + t8code_snapshot: '26.11' - julia-version: 'nightly' julia-arch: 'x64' os: ubuntu-latest mpi-provider: SYSTEM_MPI t8code_version: '4.0.0' - t8code_snapshot: '26.09' + t8code_snapshot: '26.11' steps: - name: Checkout repository uses: actions/checkout@v7 diff --git a/Project.toml b/Project.toml index 27dc156..115846d 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "T8code" uuid = "d0cc0030-9a40-4274-8435-baadcfd54fa1" authors = ["Johannes Markert "] -version = "0.10.2" +version = "0.11.0" [deps] CEnum = "fa961155-64e5-5f13-b03f-caf6b980ea82" @@ -22,4 +22,4 @@ Preferences = "1.2.1" Reexport = "0.2, 1.0" UUIDs = "1" julia = "1.10" -t8code_jll = "=4.0.10" +t8code_jll = "=4.0.11" diff --git a/dev/Artifacts.toml b/dev/Artifacts.toml index 6029cd3..b4ff587 100644 --- a/dev/Artifacts.toml +++ b/dev/Artifacts.toml @@ -1,11 +1,10 @@ [[t8code]] arch = "x86_64" -git-tree-sha1 = "bcc937eb6f112138a6abd4db857c3978195efbba" -lazy = true +git-tree-sha1 = "7d37c5d231d3caa3cc900adf851c6f2a85159bbb" libc = "glibc" mpi = "mpich" os = "linux" [[t8code.download]] - sha256 = "739c67bf7437ba303d4e9c11744fa6ccd323e49f831c1a809e034c8fe7a8a777" - url = "https://github.com/JuliaBinaryWrappers/t8code_jll.jl/releases/download/t8code-v4.0.10+0/t8code.v4.0.10.x86_64-linux-gnu-mpi+mpich.tar.gz" \ No newline at end of file + sha256 = "05a95e1f30b33df19b386d33798204b539c53af5b88bbff6fde46b6f8cbbab37" + url = "https://github.com/JuliaBinaryWrappers/t8code_jll.jl/releases/download/t8code-v4.0.11+0/t8code.v4.0.11.x86_64-linux-gnu-mpi+mpich.tar.gz" \ No newline at end of file diff --git a/dev/Manifest.toml b/dev/Manifest.toml index 052a86e..15c9166 100644 --- a/dev/Manifest.toml +++ b/dev/Manifest.toml @@ -1,6 +1,6 @@ # This file is machine-generated - editing it directly is not advised -julia_version = "1.13.1" +julia_version = "1.13.3" manifest_format = "2.1" project_hash = "9d22e3e87a2b3ee1d45816c9d075b31dc75cae0f" @@ -31,10 +31,10 @@ version = "0.19.3" [[deps.Clang_unified_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "TOML", "Zlib_jll", "Zstd_jll", "libLLVM_jll"] -git-tree-sha1 = "a847321d172ffc0b9dd5a3c71908f5e8bce585e4" +git-tree-sha1 = "42338daf61a661b2006915efb60512c401f76dd6" registries = "General" uuid = "ffc816e1-ba66-5fa9-9ecc-bcc5cb19bea1" -version = "0.1.9+0" +version = "0.1.13+0" [[deps.CompilerSupportLibraries_jll]] deps = ["Artifacts", "Libdl"] @@ -75,7 +75,7 @@ version = "1.0.0" [[deps.LibCURL_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "LibSSH2_jll", "Libdl", "OpenSSL_jll", "Zlib_jll", "Zstd_jll", "nghttp2_jll"] uuid = "deac9b47-8bc7-5906-a0fe-35ac56dc84c0" -version = "8.18.0+1" +version = "8.22.0+0" [[deps.LibGit2]] deps = ["LibGit2_jll", "NetworkOptions", "Printf", "SHA"] @@ -85,7 +85,7 @@ version = "1.11.0" [[deps.LibGit2_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "LibSSH2_jll", "Libdl", "OpenSSL_jll", "PCRE2_jll", "Zlib_jll"] uuid = "e37daf67-58a4-590a-8e99-b0245dd2ffc5" -version = "1.9.1+0" +version = "1.9.7+0" [[deps.LibSSH2_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl", "OpenSSL_jll", "Zlib_jll"] @@ -107,7 +107,7 @@ version = "1.11.0" [[deps.MozillaCACerts_jll]] uuid = "14a3606d-f60d-562e-9121-12d972cd8159" -version = "2026.8.13" +version = "2026.10.20" [[deps.NetworkOptions]] uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908" @@ -116,12 +116,12 @@ version = "1.3.0" [[deps.OpenSSL_jll]] deps = ["Artifacts", "Libdl"] uuid = "458c3c95-2e84-50aa-8efc-19380b2a3a95" -version = "3.5.6+0" +version = "3.5.8+0" [[deps.PCRE2_jll]] deps = ["Artifacts", "Libdl"] uuid = "efcefdf7-47ab-520b-bdef-62a2eaa19f15" -version = "10.46.0+0" +version = "10.47.0+0" [[deps.Pkg]] deps = ["Artifacts", "Dates", "Downloads", "FileWatching", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "Random", "SHA", "TOML", "Tar", "UUIDs", "Zstd_jll", "p7zip_jll"] @@ -136,10 +136,10 @@ version = "1.13.0" [[deps.Preferences]] deps = ["TOML"] -git-tree-sha1 = "5005266de4bfe50e53ff44a5cb5c540b6e47a254" +git-tree-sha1 = "aef1987d90dcc2e2cbd919ad10b2d25bcce4f418" registries = "General" uuid = "21216c6a-2e73-6563-6e65-726566657250" -version = "1.6.0" +version = "1.6.1" [[deps.Printf]] deps = ["Unicode"] @@ -181,7 +181,7 @@ version = "1.11.0" [[deps.Zlib_jll]] deps = ["Libdl"] uuid = "83775a58-1f1d-513f-b197-d71354ab007a" -version = "1.3.1+2" +version = "1.3.2+0" [[deps.Zstd_jll]] deps = ["CompilerSupportLibraries_jll", "Libdl"] @@ -196,12 +196,12 @@ version = "20.1.8+2" [[deps.nghttp2_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"] uuid = "8e850ede-7688-5339-a07c-302acd2aaf8d" -version = "1.67.1+0" +version = "1.70.0+0" [[deps.p7zip_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"] uuid = "3f19e933-33d8-53b3-aaab-bd5110c3b7a0" -version = "17.8.2+0" +version = "17.8.3+0" [registries.General] url = "https://github.com/JuliaRegistries/General.git" diff --git a/examples/t8_step5_element_data.jl b/examples/t8_step5_element_data.jl index f27f8d6..d0ce164 100644 --- a/examples/t8_step5_element_data.jl +++ b/examples/t8_step5_element_data.jl @@ -196,7 +196,9 @@ function t8_step5_output_data_to_vtu(forest, element_data, prefix) # WARNING: This code hangs for Julia v1.8.* or older. Use at least Julia v1.9. # For each user defined data field we need one t8_vtk_data_field_t variable. vtk_data = t8_vtk_data_field_t(T8_VTK_SCALAR, # Set the type of this variable. Since we have one value per element, we pick T8_VTK_SCALAR. - NTuple{8192, Cchar}(rpad("Element volume\0", 8192, ' ')), # The name of the field as should be written to the file. + NTuple{T8_VTK_MAX_STRING_LENGTH, Cchar}(rpad("Element volume\0", + T8_VTK_MAX_STRING_LENGTH, + ' ')), # The name of the field as should be written to the file. pointer(element_volumes)) # To write user defined data, we need to extended output function @@ -278,11 +280,9 @@ if t8_forest_get_num_ghosts(forest) > 0 end # Output the volume data to vtu. -if !(CI_ON_WINDOWS || CI_ON_MACOS) - t8_step5_output_data_to_vtu(forest, element_data, prefix_forest_with_data) - t8_global_productionf(" [step5] Wrote forest and volume data to %s*.\n", - prefix_forest_with_data) -end +t8_step5_output_data_to_vtu(forest, element_data, prefix_forest_with_data) +t8_global_productionf(" [step5] Wrote forest and volume data to %s*.\n", + prefix_forest_with_data) # # Clean-up. diff --git a/examples/t8_step6_stencil.jl b/examples/t8_step6_stencil.jl index f1e0001..b1d195e 100644 --- a/examples/t8_step6_stencil.jl +++ b/examples/t8_step6_stencil.jl @@ -340,13 +340,19 @@ function t8_step6_output_data_to_vtu(forest, element_data, prefix) # WARNING: This code hangs for Julia v1.8.* or older. Use at least Julia v1.9. vtk_data = [ t8_vtk_data_field_t(T8_VTK_SCALAR, - NTuple{8192, Cchar}(rpad("height\0", 8192, ' ')), + NTuple{T8_VTK_MAX_STRING_LENGTH, Cchar}(rpad("height\0", + T8_VTK_MAX_STRING_LENGTH, + ' ')), pointer(heights)), t8_vtk_data_field_t(T8_VTK_SCALAR, - NTuple{8192, Cchar}(rpad("schlieren\0", 8192, ' ')), + NTuple{T8_VTK_MAX_STRING_LENGTH, Cchar}(rpad("schlieren\0", + T8_VTK_MAX_STRING_LENGTH, + ' ')), pointer(schlieren)), t8_vtk_data_field_t(T8_VTK_SCALAR, - NTuple{8192, Cchar}(rpad("curvature\0", 8192, ' ')), + NTuple{T8_VTK_MAX_STRING_LENGTH, Cchar}(rpad("curvature\0", + T8_VTK_MAX_STRING_LENGTH, + ' ')), pointer(curvature)) ] @@ -403,10 +409,8 @@ t8_step6_exchange_ghost_data(forest, element_data) t8_step6_compute_stencil(forest, element_data) # Output the data to vtu files. -if !(CI_ON_WINDOWS || CI_ON_MACOS) - t8_step6_output_data_to_vtu(forest, element_data, prefix_forest_with_data) - t8_global_productionf(" Wrote forest and data to %s*.\n", prefix_forest_with_data) -end +t8_step6_output_data_to_vtu(forest, element_data, prefix_forest_with_data) +t8_global_productionf(" Wrote forest and data to %s*.\n", prefix_forest_with_data) # # Clean-up diff --git a/src/Libt8.jl b/src/Libt8.jl index 20505c9..fabeead 100644 --- a/src/Libt8.jl +++ b/src/Libt8.jl @@ -3,9 +3,10 @@ module Libt8 using CEnum: CEnum, @cenum to_c_type(t::Type) = t -to_c_type_pairs(va_list) = map(enumerate(to_c_type.(va_list))) do (ind, type) - :(va_list[$ind]::$type) -end +to_c_type_pairs(va_list) = + map(enumerate(to_c_type.(va_list))) do (ind, type) + :(va_list[$ind]::$type) + end using ..T8code: _PREFERENCE_LIBT8, _PREFERENCE_LIBP4EST, _PREFERENCE_LIBSC @@ -70,7 +71,6 @@ const INT64_MIN = typemin(Clonglong) const INT64_MAX = typemax(Clonglong) const P4EST_QMAXLEVEL = 29 - """ sc_extern_c_hack_1() @@ -115,8 +115,9 @@ end # automatic type deduction for variadic arguments may not be what you want, please use with caution @generated function sc_abort_verbosef(filename, lineno, fmt, va_list...) - :(@ccall(libsc.sc_abort_verbosef(filename::Cstring, lineno::Cint, fmt::Cstring; $(to_c_type_pairs(va_list)...))::Cvoid)) - end + :(@ccall(libsc.sc_abort_verbosef(filename::Cstring, lineno::Cint, fmt::Cstring; + $(to_c_type_pairs(va_list)...))::Cvoid)) +end """ sc_malloc(package, size) @@ -196,13 +197,16 @@ void sc_log (const char *filename, int lineno, int package, int category, int pr ``` """ function sc_log(filename, lineno, package, category, priority, msg) - @ccall libsc.sc_log(filename::Cstring, lineno::Cint, package::Cint, category::Cint, priority::Cint, msg::Cstring)::Cvoid + @ccall libsc.sc_log(filename::Cstring, lineno::Cint, package::Cint, category::Cint, + priority::Cint, msg::Cstring)::Cvoid end # automatic type deduction for variadic arguments may not be what you want, please use with caution @generated function sc_logf(filename, lineno, package, category, priority, fmt, va_list...) - :(@ccall(libsc.sc_logf(filename::Cstring, lineno::Cint, package::Cint, category::Cint, priority::Cint, fmt::Cstring; $(to_c_type_pairs(va_list)...))::Cvoid)) - end + :(@ccall(libsc.sc_logf(filename::Cstring, lineno::Cint, package::Cint, category::Cint, + priority::Cint, fmt::Cstring; + $(to_c_type_pairs(va_list)...))::Cvoid)) +end """ sc_array @@ -242,7 +246,8 @@ sc_array_t *sc_array_new_count (size_t elem_size, size_t elem_count); ``` """ function sc_array_new_count(elem_size, elem_count) - @ccall libsc.sc_array_new_count(elem_size::Csize_t, elem_count::Csize_t)::Ptr{sc_array_t} + @ccall libsc.sc_array_new_count(elem_size::Csize_t, + elem_count::Csize_t)::Ptr{sc_array_t} end """ @@ -300,7 +305,8 @@ void *sc_shmem_malloc (int package, size_t elem_size, size_t elem_count, sc_MPI_ ``` """ function sc_shmem_malloc(package, elem_size, elem_count, comm) - @ccall libsc.sc_shmem_malloc(package::Cint, elem_size::Csize_t, elem_count::Csize_t, comm::MPI_Comm)::Ptr{Cvoid} + @ccall libsc.sc_shmem_malloc(package::Cint, elem_size::Csize_t, elem_count::Csize_t, + comm::MPI_Comm)::Ptr{Cvoid} end """ @@ -445,62 +451,6 @@ function sc_refcount_is_last(rc) @ccall libsc.sc_refcount_is_last(rc::Ptr{sc_refcount_t})::Cint end -""" - sc_MPI_Error_string(errorcode, string, resultlen) - -Turn MPI error code into a string. - -# Arguments -* `errorcode`:\\[in\\] This (MPI) error code is converted. -* `string`:\\[in,out\\] At least [`sc_MPI_MAX_ERROR_STRING`](@ref) bytes. -* `resultlen`:\\[out\\] Length of string on return. -# Returns -[`sc_MPI_SUCCESS`](@ref) on success or other MPI error cocde on invalid arguments. -### Prototype -```c -int sc_MPI_Error_string (int errorcode, char *string, int *resultlen); -``` -""" -function sc_MPI_Error_string(errorcode, string, resultlen) - @ccall libsc.sc_MPI_Error_string(errorcode::Cint, string::Cstring, resultlen::Ptr{Cint})::Cint -end - -""" - sc_io_read(mpifile, ptr, zcount, t, errmsg) - -### Prototype -```c -void sc_io_read (sc_MPI_File mpifile, void *ptr, size_t zcount, sc_MPI_Datatype t, const char *errmsg); -``` -""" -function sc_io_read(mpifile, ptr, zcount, t, errmsg) - @ccall libsc.sc_io_read(mpifile::MPI_File, ptr::Ptr{Cvoid}, zcount::Csize_t, t::Cint, errmsg::Cstring)::Cvoid -end - -""" - sc_io_write(mpifile, ptr, zcount, t, errmsg) - -### Prototype -```c -void sc_io_write (sc_MPI_File mpifile, const void *ptr, size_t zcount, sc_MPI_Datatype t, const char *errmsg); -``` -""" -function sc_io_write(mpifile, ptr, zcount, t, errmsg) - @ccall libsc.sc_io_write(mpifile::MPI_File, ptr::Ptr{Cvoid}, zcount::Csize_t, t::Cint, errmsg::Cstring)::Cvoid -end - -"""Typedef for quadrant coordinates.""" -const p4est_qcoord_t = Int32 - -"""Typedef for counting topological entities (trees, tree vertices).""" -const p4est_topidx_t = Int32 - -"""Typedef for processor-local indexing of quadrants and nodes.""" -const p4est_locidx_t = Int32 - -"""Typedef for globally unique indexing of quadrants.""" -const p4est_gloidx_t = Int64 - """ sc_mpi_is_enabled() @@ -595,7 +545,8 @@ int sc_MPI_Testall (int, sc_MPI_Request *, int *, sc_MPI_Status *); ``` """ function sc_MPI_Testall(arg1, arg2, arg3, arg4) - @ccall libsc.sc_MPI_Testall(arg1::Cint, arg2::Ptr{Cint}, arg3::Ptr{Cint}, arg4::Ptr{Cint})::Cint + @ccall libsc.sc_MPI_Testall(arg1::Cint, arg2::Ptr{Cint}, arg3::Ptr{Cint}, + arg4::Ptr{Cint})::Cint end """ @@ -617,6 +568,27 @@ function sc_MPI_Error_class(errorcode, errorclass) @ccall libsc.sc_MPI_Error_class(errorcode::Cint, errorclass::Ptr{Cint})::Cint end +""" + sc_MPI_Error_string(errorcode, string, resultlen) + +Turn MPI error code into a string. + +# Arguments +* `errorcode`:\\[in\\] This (MPI) error code is converted. +* `string`:\\[in,out\\] At least [`sc_MPI_MAX_ERROR_STRING`](@ref) bytes. +* `resultlen`:\\[out\\] Length of string on return. +# Returns +[`sc_MPI_SUCCESS`](@ref) on success or other MPI error cocde on invalid arguments. +### Prototype +```c +int sc_MPI_Error_string (int errorcode, char *string, int *resultlen); +``` +""" +function sc_MPI_Error_string(errorcode, string, resultlen) + @ccall libsc.sc_MPI_Error_string(errorcode::Cint, string::Cstring, + resultlen::Ptr{Cint})::Cint +end + """ sc_mpi_sizeof(t) @@ -638,7 +610,8 @@ void sc_mpi_comm_attach_node_comms (sc_MPI_Comm comm, int processes_per_node); ``` """ function sc_mpi_comm_attach_node_comms(comm, processes_per_node) - @ccall libsc.sc_mpi_comm_attach_node_comms(comm::MPI_Comm, processes_per_node::Cint)::Cvoid + @ccall libsc.sc_mpi_comm_attach_node_comms(comm::MPI_Comm, + processes_per_node::Cint)::Cvoid end """ @@ -662,7 +635,8 @@ void sc_mpi_comm_get_node_comms (sc_MPI_Comm comm, sc_MPI_Comm * intranode, sc_M ``` """ function sc_mpi_comm_get_node_comms(comm, intranode, internode) - @ccall libsc.sc_mpi_comm_get_node_comms(comm::MPI_Comm, intranode::Ptr{MPI_Comm}, internode::Ptr{MPI_Comm})::Cvoid + @ccall libsc.sc_mpi_comm_get_node_comms(comm::MPI_Comm, intranode::Ptr{MPI_Comm}, + internode::Ptr{MPI_Comm})::Cvoid end """ @@ -822,7 +796,9 @@ void sc_set_log_defaults (FILE * log_stream, sc_log_handler_t log_handler, int l ``` """ function sc_set_log_defaults(log_stream, log_handler, log_threshold) - @ccall libsc.sc_set_log_defaults(log_stream::Ptr{Libc.FILE}, log_handler::sc_log_handler_t, log_threshold::Cint)::Cvoid + @ccall libsc.sc_set_log_defaults(log_stream::Ptr{Libc.FILE}, + log_handler::sc_log_handler_t, + log_threshold::Cint)::Cvoid end """ @@ -938,7 +914,8 @@ int sc_package_register (sc_log_handler_t log_handler, int log_threshold, const ``` """ function sc_package_register(log_handler, log_threshold, name, full) - @ccall libsc.sc_package_register(log_handler::sc_log_handler_t, log_threshold::Cint, name::Cstring, full::Cstring)::Cint + @ccall libsc.sc_package_register(log_handler::sc_log_handler_t, log_threshold::Cint, + name::Cstring, full::Cstring)::Cint end """ @@ -1022,7 +999,8 @@ void sc_package_set_abort_alloc_mismatch (int package_id, int set_abort); ``` """ function sc_package_set_abort_alloc_mismatch(package_id, set_abort) - @ccall libsc.sc_package_set_abort_alloc_mismatch(package_id::Cint, set_abort::Cint)::Cvoid + @ccall libsc.sc_package_set_abort_alloc_mismatch(package_id::Cint, + set_abort::Cint)::Cvoid end """ @@ -1064,7 +1042,8 @@ void sc_init (sc_MPI_Comm mpicomm, int catch_signals, int print_backtrace, sc_lo ``` """ function sc_init(mpicomm, catch_signals, print_backtrace, log_handler, log_threshold) - @ccall libsc.sc_init(mpicomm::MPI_Comm, catch_signals::Cint, print_backtrace::Cint, log_handler::sc_log_handler_t, log_threshold::Cint)::Cvoid + @ccall libsc.sc_init(mpicomm::MPI_Comm, catch_signals::Cint, print_backtrace::Cint, + log_handler::sc_log_handler_t, log_threshold::Cint)::Cvoid end """ @@ -1175,8 +1154,9 @@ end # automatic type deduction for variadic arguments may not be what you want, please use with caution @generated function sc_snprintf(str, size, format, va_list...) - :(@ccall(libsc.sc_snprintf(str::Cstring, size::Csize_t, format::Cstring; $(to_c_type_pairs(va_list)...))::Cvoid)) - end + :(@ccall(libsc.sc_snprintf(str::Cstring, size::Csize_t, format::Cstring; + $(to_c_type_pairs(va_list)...))::Cvoid)) +end """ sc_version() @@ -1379,7 +1359,8 @@ sc_array_t *sc_array_new_view (sc_array_t * array, size_t offset, size_t length) ``` """ function sc_array_new_view(array, offset, length) - @ccall libsc.sc_array_new_view(array::Ptr{sc_array_t}, offset::Csize_t, length::Csize_t)::Ptr{sc_array_t} + @ccall libsc.sc_array_new_view(array::Ptr{sc_array_t}, offset::Csize_t, + length::Csize_t)::Ptr{sc_array_t} end """ @@ -1397,7 +1378,8 @@ sc_array_t *sc_array_new_data (void *base, size_t elem_size, size_t elem_count); ``` """ function sc_array_new_data(base, elem_size, elem_count) - @ccall libsc.sc_array_new_data(base::Ptr{Cvoid}, elem_size::Csize_t, elem_count::Csize_t)::Ptr{sc_array_t} + @ccall libsc.sc_array_new_data(base::Ptr{Cvoid}, elem_size::Csize_t, + elem_count::Csize_t)::Ptr{sc_array_t} end """ @@ -1464,7 +1446,8 @@ void sc_array_init_size (sc_array_t * array, size_t elem_size, size_t elem_count ``` """ function sc_array_init_size(array, elem_size, elem_count) - @ccall libsc.sc_array_init_size(array::Ptr{sc_array_t}, elem_size::Csize_t, elem_count::Csize_t)::Cvoid + @ccall libsc.sc_array_init_size(array::Ptr{sc_array_t}, elem_size::Csize_t, + elem_count::Csize_t)::Cvoid end """ @@ -1482,7 +1465,8 @@ void sc_array_init_count (sc_array_t * array, size_t elem_size, size_t elem_coun ``` """ function sc_array_init_count(array, elem_size, elem_count) - @ccall libsc.sc_array_init_count(array::Ptr{sc_array_t}, elem_size::Csize_t, elem_count::Csize_t)::Cvoid + @ccall libsc.sc_array_init_count(array::Ptr{sc_array_t}, elem_size::Csize_t, + elem_count::Csize_t)::Cvoid end """ @@ -1501,7 +1485,8 @@ void sc_array_init_view (sc_array_t * view, sc_array_t * array, size_t offset, s ``` """ function sc_array_init_view(view, array, offset, length) - @ccall libsc.sc_array_init_view(view::Ptr{sc_array_t}, array::Ptr{sc_array_t}, offset::Csize_t, length::Csize_t)::Cvoid + @ccall libsc.sc_array_init_view(view::Ptr{sc_array_t}, array::Ptr{sc_array_t}, + offset::Csize_t, length::Csize_t)::Cvoid end """ @@ -1520,7 +1505,8 @@ void sc_array_init_reshape (sc_array_t * view, sc_array_t * array, size_t elem_s ``` """ function sc_array_init_reshape(view, array, elem_size, elem_count) - @ccall libsc.sc_array_init_reshape(view::Ptr{sc_array_t}, array::Ptr{sc_array_t}, elem_size::Csize_t, elem_count::Csize_t)::Cvoid + @ccall libsc.sc_array_init_reshape(view::Ptr{sc_array_t}, array::Ptr{sc_array_t}, + elem_size::Csize_t, elem_count::Csize_t)::Cvoid end """ @@ -1539,7 +1525,8 @@ void sc_array_init_data (sc_array_t * view, void *base, size_t elem_size, size_t ``` """ function sc_array_init_data(view, base, elem_size, elem_count) - @ccall libsc.sc_array_init_data(view::Ptr{sc_array_t}, base::Ptr{Cvoid}, elem_size::Csize_t, elem_count::Csize_t)::Cvoid + @ccall libsc.sc_array_init_data(view::Ptr{sc_array_t}, base::Ptr{Cvoid}, + elem_size::Csize_t, elem_count::Csize_t)::Cvoid end """ @@ -1665,7 +1652,8 @@ void sc_array_copy_into (sc_array_t * dest, size_t dest_offset, sc_array_t * src ``` """ function sc_array_copy_into(dest, dest_offset, src) - @ccall libsc.sc_array_copy_into(dest::Ptr{sc_array_t}, dest_offset::Csize_t, src::Ptr{sc_array_t})::Cvoid + @ccall libsc.sc_array_copy_into(dest::Ptr{sc_array_t}, dest_offset::Csize_t, + src::Ptr{sc_array_t})::Cvoid end """ @@ -1685,7 +1673,9 @@ void sc_array_move_part (sc_array_t * dest, size_t dest_offset, sc_array_t * src ``` """ function sc_array_move_part(dest, dest_offset, src, src_offset, count) - @ccall libsc.sc_array_move_part(dest::Ptr{sc_array_t}, dest_offset::Csize_t, src::Ptr{sc_array_t}, src_offset::Csize_t, count::Csize_t)::Cvoid + @ccall libsc.sc_array_move_part(dest::Ptr{sc_array_t}, dest_offset::Csize_t, + src::Ptr{sc_array_t}, src_offset::Csize_t, + count::Csize_t)::Cvoid end """ @@ -1777,7 +1767,8 @@ ssize_t sc_array_bsearch (sc_array_t * array, const void *key, int (*compar) (co ``` """ function sc_array_bsearch(array, key, compar) - @ccall libsc.sc_array_bsearch(array::Ptr{sc_array_t}, key::Ptr{Cvoid}, compar::Ptr{Cvoid})::Cssize_t + @ccall libsc.sc_array_bsearch(array::Ptr{sc_array_t}, key::Ptr{Cvoid}, + compar::Ptr{Cvoid})::Cssize_t end # typedef size_t ( * sc_array_type_t ) ( sc_array_t * array , size_t index , void * data ) @@ -1808,7 +1799,9 @@ void sc_array_split (sc_array_t * array, sc_array_t * offsets, size_t num_types, ``` """ function sc_array_split(array, offsets, num_types, type_fn, data) - @ccall libsc.sc_array_split(array::Ptr{sc_array_t}, offsets::Ptr{sc_array_t}, num_types::Csize_t, type_fn::sc_array_type_t, data::Ptr{Cvoid})::Cvoid + @ccall libsc.sc_array_split(array::Ptr{sc_array_t}, offsets::Ptr{sc_array_t}, + num_types::Csize_t, type_fn::sc_array_type_t, + data::Ptr{Cvoid})::Cvoid end """ @@ -1844,7 +1837,8 @@ void sc_array_permute (sc_array_t * array, sc_array_t * newindices, int keepperm ``` """ function sc_array_permute(array, newindices, keepperm) - @ccall libsc.sc_array_permute(array::Ptr{sc_array_t}, newindices::Ptr{sc_array_t}, keepperm::Cint)::Cvoid + @ccall libsc.sc_array_permute(array::Ptr{sc_array_t}, newindices::Ptr{sc_array_t}, + keepperm::Cint)::Cvoid end """ @@ -1879,7 +1873,8 @@ size_t sc_array_pqueue_siftup (sc_array_t * array, size_t pos, void *newval, int ``` """ function sc_array_pqueue_siftup(array, pos, newval, compar) - @ccall libsc.sc_array_pqueue_siftup(array::Ptr{sc_array_t}, pos::Csize_t, newval::Ptr{Cvoid}, compar::Ptr{Cvoid})::Csize_t + @ccall libsc.sc_array_pqueue_siftup(array::Ptr{sc_array_t}, pos::Csize_t, + newval::Ptr{Cvoid}, compar::Ptr{Cvoid})::Csize_t end """ @@ -1899,7 +1894,8 @@ size_t sc_array_pqueue_insert (sc_array_t * array, void *newval, int (*compar) ( ``` """ function sc_array_pqueue_insert(array, newval, compar) - @ccall libsc.sc_array_pqueue_insert(array::Ptr{sc_array_t}, newval::Ptr{Cvoid}, compar::Ptr{Cvoid})::Csize_t + @ccall libsc.sc_array_pqueue_insert(array::Ptr{sc_array_t}, newval::Ptr{Cvoid}, + compar::Ptr{Cvoid})::Csize_t end """ @@ -1921,7 +1917,9 @@ size_t sc_array_pqueue_siftdown (sc_array_t * array, size_t maxcount, size_t pos ``` """ function sc_array_pqueue_siftdown(array, maxcount, pos, newval, compar) - @ccall libsc.sc_array_pqueue_siftdown(array::Ptr{sc_array_t}, maxcount::Csize_t, pos::Csize_t, newval::Ptr{Cvoid}, compar::Ptr{Cvoid})::Csize_t + @ccall libsc.sc_array_pqueue_siftdown(array::Ptr{sc_array_t}, maxcount::Csize_t, + pos::Csize_t, newval::Ptr{Cvoid}, + compar::Ptr{Cvoid})::Csize_t end """ @@ -1941,7 +1939,8 @@ size_t sc_array_pqueue_pop (sc_array_t * array, void *newval, int (*compar) (con ``` """ function sc_array_pqueue_pop(array, newval, compar) - @ccall libsc.sc_array_pqueue_pop(array::Ptr{sc_array_t}, newval::Ptr{Cvoid}, compar::Ptr{Cvoid})::Csize_t + @ccall libsc.sc_array_pqueue_pop(array::Ptr{sc_array_t}, newval::Ptr{Cvoid}, + compar::Ptr{Cvoid})::Csize_t end """ @@ -2156,7 +2155,8 @@ void sc_mstamp_init (sc_mstamp_t * mst, size_t stamp_unit, size_t elem_size); ``` """ function sc_mstamp_init(mst, stamp_unit, elem_size) - @ccall libsc.sc_mstamp_init(mst::Ptr{sc_mstamp_t}, stamp_unit::Csize_t, elem_size::Csize_t)::Cvoid + @ccall libsc.sc_mstamp_init(mst::Ptr{sc_mstamp_t}, stamp_unit::Csize_t, + elem_size::Csize_t)::Cvoid end """ @@ -2626,7 +2626,8 @@ sc_link_t *sc_list_insert (sc_list_t * list, sc_link_t * pred, void *data); ``` """ function sc_list_insert(list, pred, data) - @ccall libsc.sc_list_insert(list::Ptr{sc_list_t}, pred::Ptr{sc_link_t}, data::Ptr{Cvoid})::Ptr{sc_link_t} + @ccall libsc.sc_list_insert(list::Ptr{sc_list_t}, pred::Ptr{sc_link_t}, + data::Ptr{Cvoid})::Ptr{sc_link_t} end """ @@ -2751,7 +2752,9 @@ sc_hash_t *sc_hash_new (sc_hash_function_t hash_fn, sc_equal_function_t equal_fn ``` """ function sc_hash_new(hash_fn, equal_fn, user_data, allocator) - @ccall libsc.sc_hash_new(hash_fn::sc_hash_function_t, equal_fn::sc_equal_function_t, user_data::Ptr{Cvoid}, allocator::Ptr{sc_mempool_t})::Ptr{sc_hash_t} + @ccall libsc.sc_hash_new(hash_fn::sc_hash_function_t, equal_fn::sc_equal_function_t, + user_data::Ptr{Cvoid}, + allocator::Ptr{sc_mempool_t})::Ptr{sc_hash_t} end """ @@ -2857,7 +2860,8 @@ int sc_hash_lookup (sc_hash_t * hash, void *v, void ***found); ``` """ function sc_hash_lookup(hash, v, found) - @ccall libsc.sc_hash_lookup(hash::Ptr{sc_hash_t}, v::Ptr{Cvoid}, found::Ptr{Ptr{Ptr{Cvoid}}})::Cint + @ccall libsc.sc_hash_lookup(hash::Ptr{sc_hash_t}, v::Ptr{Cvoid}, + found::Ptr{Ptr{Ptr{Cvoid}}})::Cint end """ @@ -2877,7 +2881,8 @@ int sc_hash_insert_unique (sc_hash_t * hash, void *v, void ***found); ``` """ function sc_hash_insert_unique(hash, v, found) - @ccall libsc.sc_hash_insert_unique(hash::Ptr{sc_hash_t}, v::Ptr{Cvoid}, found::Ptr{Ptr{Ptr{Cvoid}}})::Cint + @ccall libsc.sc_hash_insert_unique(hash::Ptr{sc_hash_t}, v::Ptr{Cvoid}, + found::Ptr{Ptr{Ptr{Cvoid}}})::Cint end """ @@ -2897,7 +2902,8 @@ int sc_hash_remove (sc_hash_t * hash, void *v, void **found); ``` """ function sc_hash_remove(hash, v, found) - @ccall libsc.sc_hash_remove(hash::Ptr{sc_hash_t}, v::Ptr{Cvoid}, found::Ptr{Ptr{Cvoid}})::Cint + @ccall libsc.sc_hash_remove(hash::Ptr{sc_hash_t}, v::Ptr{Cvoid}, + found::Ptr{Ptr{Cvoid}})::Cint end """ @@ -2932,7 +2938,8 @@ void sc_hash_print_statistics (int package_id, int log_priority, sc_hash_t * has ``` """ function sc_hash_print_statistics(package_id, log_priority, hash) - @ccall libsc.sc_hash_print_statistics(package_id::Cint, log_priority::Cint, hash::Ptr{sc_hash_t})::Cvoid + @ccall libsc.sc_hash_print_statistics(package_id::Cint, log_priority::Cint, + hash::Ptr{sc_hash_t})::Cvoid end mutable struct sc_hash_array_data end @@ -2996,7 +3003,9 @@ sc_hash_array_t *sc_hash_array_new (size_t elem_size, sc_hash_function_t hash_fn ``` """ function sc_hash_array_new(elem_size, hash_fn, equal_fn, user_data) - @ccall libsc.sc_hash_array_new(elem_size::Csize_t, hash_fn::sc_hash_function_t, equal_fn::sc_equal_function_t, user_data::Ptr{Cvoid})::Ptr{sc_hash_array_t} + @ccall libsc.sc_hash_array_new(elem_size::Csize_t, hash_fn::sc_hash_function_t, + equal_fn::sc_equal_function_t, + user_data::Ptr{Cvoid})::Ptr{sc_hash_array_t} end """ @@ -3066,7 +3075,8 @@ int sc_hash_array_lookup (sc_hash_array_t * hash_array, void *v, size_t *positio ``` """ function sc_hash_array_lookup(hash_array, v, position) - @ccall libsc.sc_hash_array_lookup(hash_array::Ptr{sc_hash_array_t}, v::Ptr{Cvoid}, position::Ptr{Csize_t})::Cint + @ccall libsc.sc_hash_array_lookup(hash_array::Ptr{sc_hash_array_t}, v::Ptr{Cvoid}, + position::Ptr{Csize_t})::Cint end """ @@ -3086,7 +3096,9 @@ void *sc_hash_array_insert_unique (sc_hash_array_t * hash_array, void *v, size_t ``` """ function sc_hash_array_insert_unique(hash_array, v, position) - @ccall libsc.sc_hash_array_insert_unique(hash_array::Ptr{sc_hash_array_t}, v::Ptr{Cvoid}, position::Ptr{Csize_t})::Ptr{Cvoid} + @ccall libsc.sc_hash_array_insert_unique(hash_array::Ptr{sc_hash_array_t}, + v::Ptr{Cvoid}, + position::Ptr{Csize_t})::Ptr{Cvoid} end """ @@ -3103,7 +3115,8 @@ void sc_hash_array_foreach (sc_hash_array_t * hash_array, sc_hash_foreach_t fn); ``` """ function sc_hash_array_foreach(hash_array, fn) - @ccall libsc.sc_hash_array_foreach(hash_array::Ptr{sc_hash_array_t}, fn::sc_hash_foreach_t)::Cvoid + @ccall libsc.sc_hash_array_foreach(hash_array::Ptr{sc_hash_array_t}, + fn::sc_hash_foreach_t)::Cvoid end """ @@ -3120,7 +3133,8 @@ void sc_hash_array_rip (sc_hash_array_t * hash_array, sc_array_t * rip); ``` """ function sc_hash_array_rip(hash_array, rip) - @ccall libsc.sc_hash_array_rip(hash_array::Ptr{sc_hash_array_t}, rip::Ptr{sc_array_t})::Cvoid + @ccall libsc.sc_hash_array_rip(hash_array::Ptr{sc_hash_array_t}, + rip::Ptr{sc_array_t})::Cvoid end """ @@ -3163,7 +3177,8 @@ void sc_recycle_array_init (sc_recycle_array_t * rec_array, size_t elem_size); ``` """ function sc_recycle_array_init(rec_array, elem_size) - @ccall libsc.sc_recycle_array_init(rec_array::Ptr{sc_recycle_array_t}, elem_size::Csize_t)::Cvoid + @ccall libsc.sc_recycle_array_init(rec_array::Ptr{sc_recycle_array_t}, + elem_size::Csize_t)::Cvoid end """ @@ -3198,7 +3213,8 @@ void *sc_recycle_array_insert (sc_recycle_array_t * rec_array, size_t *position) ``` """ function sc_recycle_array_insert(rec_array, position) - @ccall libsc.sc_recycle_array_insert(rec_array::Ptr{sc_recycle_array_t}, position::Ptr{Csize_t})::Ptr{Cvoid} + @ccall libsc.sc_recycle_array_insert(rec_array::Ptr{sc_recycle_array_t}, + position::Ptr{Csize_t})::Ptr{Cvoid} end """ @@ -3217,7 +3233,8 @@ void *sc_recycle_array_remove (sc_recycle_array_t * rec_array, size_t position); ``` """ function sc_recycle_array_remove(rec_array, position) - @ccall libsc.sc_recycle_array_remove(rec_array::Ptr{sc_recycle_array_t}, position::Csize_t)::Ptr{Cvoid} + @ccall libsc.sc_recycle_array_remove(rec_array::Ptr{sc_recycle_array_t}, + position::Csize_t)::Ptr{Cvoid} end """A type for holding process ids.""" @@ -3231,18 +3248,19 @@ const t8_linearidx_t = UInt64 Communication tags used internal to t8code. -| Enumerator | Note | -| :------------------------------------------ | :------------------------------------------------------- | -| T8\\_MPI\\_TAG\\_FIRST | Dummy first MPT tag. | -| T8\\_MPI\\_PARTITION\\_CMESH | Used for coarse mesh partitioning | -| T8\\_MPI\\_PARTITION\\_FOREST | Used for forest partitioning | -| T8\\_MPI\\_GHOST\\_FOREST | Used for for ghost layer creation | -| T8\\_MPI\\_GHOST\\_EXC\\_FOREST | Used for ghost data exchange | -| T8\\_MPI\\_CMESH\\_UNIFORM\\_BOUNDS\\_START | Used for cmesh uniform bounds computation. | -| T8\\_MPI\\_CMESH\\_UNIFORM\\_BOUNDS\\_END | | -| T8\\_MPI\\_TEST\\_ELEMENT\\_PACK\\_TAG | Used for testing mpi pack and unpack functionality | -| T8\\_MPI\\_PFC\\_TAG | Used for data exchange during partition for coarsening. | -| T8\\_MPI\\_TAG\\_LAST | Dummy last MPI tag. | +| Enumerator | Note | +| :------------------------------------------- | :----------------------------------------------------------- | +| T8\\_MPI\\_TAG\\_FIRST | Dummy first MPT tag. | +| T8\\_MPI\\_PARTITION\\_CMESH | Used for coarse mesh partitioning | +| T8\\_MPI\\_PARTITION\\_FOREST | Used for forest partitioning | +| T8\\_MPI\\_GHOST\\_FOREST | Used for for ghost layer creation | +| T8\\_MPI\\_GHOST\\_EXC\\_FOREST | Used for ghost data exchange | +| T8\\_MPI\\_CMESH\\_UNIFORM\\_BOUNDS\\_START | Used for cmesh uniform bounds computation. | +| T8\\_MPI\\_CMESH\\_UNIFORM\\_BOUNDS\\_END | | +| T8\\_MPI\\_TEST\\_ELEMENT\\_PACK\\_TAG | Used for testing mpi pack and unpack functionality | +| T8\\_MPI\\_PFC\\_TAG | Used for data exchange during partition for coarsening. | +| T8\\_MPI\\_BOUNDARY\\_CONDITION\\_SYNC\\_TAG | Used for the global synchronization of boundary conditions. | +| T8\\_MPI\\_TAG\\_LAST | Dummy last MPI tag. | """ @cenum t8_MPI_tag_t::UInt32 begin T8_MPI_TAG_FIRST = 214 @@ -3254,13 +3272,15 @@ Communication tags used internal to t8code. T8_MPI_CMESH_UNIFORM_BOUNDS_END = 300 T8_MPI_TEST_ELEMENT_PACK_TAG = 301 T8_MPI_PFC_TAG = 302 - T8_MPI_TAG_LAST = 303 + T8_MPI_BOUNDARY_CONDITION_SYNC_TAG = 303 + T8_MPI_TAG_LAST = 304 end # automatic type deduction for variadic arguments may not be what you want, please use with caution @generated function t8_logf(category, priority, fmt, va_list...) - :(@ccall(libt8.t8_logf(category::Cint, priority::Cint, fmt::Cstring; $(to_c_type_pairs(va_list)...))::Cvoid)) - end + :(@ccall(libt8.t8_logf(category::Cint, priority::Cint, fmt::Cstring; + $(to_c_type_pairs(va_list)...))::Cvoid)) +end """ t8_log_indent_push() @@ -3292,43 +3312,45 @@ end # automatic type deduction for variadic arguments may not be what you want, please use with caution @generated function t8_global_errorf(fmt, va_list...) - :(@ccall(libt8.t8_global_errorf(fmt::Cstring; $(to_c_type_pairs(va_list)...))::Cvoid)) - end + :(@ccall(libt8.t8_global_errorf(fmt::Cstring; $(to_c_type_pairs(va_list)...))::Cvoid)) +end # automatic type deduction for variadic arguments may not be what you want, please use with caution @generated function t8_global_essentialf(fmt, va_list...) - :(@ccall(libt8.t8_global_essentialf(fmt::Cstring; $(to_c_type_pairs(va_list)...))::Cvoid)) - end + :(@ccall(libt8.t8_global_essentialf(fmt::Cstring; + $(to_c_type_pairs(va_list)...))::Cvoid)) +end # automatic type deduction for variadic arguments may not be what you want, please use with caution @generated function t8_global_productionf(fmt, va_list...) - :(@ccall(libt8.t8_global_productionf(fmt::Cstring; $(to_c_type_pairs(va_list)...))::Cvoid)) - end + :(@ccall(libt8.t8_global_productionf(fmt::Cstring; + $(to_c_type_pairs(va_list)...))::Cvoid)) +end # automatic type deduction for variadic arguments may not be what you want, please use with caution @generated function t8_global_infof(fmt, va_list...) - :(@ccall(libt8.t8_global_infof(fmt::Cstring; $(to_c_type_pairs(va_list)...))::Cvoid)) - end + :(@ccall(libt8.t8_global_infof(fmt::Cstring; $(to_c_type_pairs(va_list)...))::Cvoid)) +end # automatic type deduction for variadic arguments may not be what you want, please use with caution @generated function t8_infof(fmt, va_list...) - :(@ccall(libt8.t8_infof(fmt::Cstring; $(to_c_type_pairs(va_list)...))::Cvoid)) - end + :(@ccall(libt8.t8_infof(fmt::Cstring; $(to_c_type_pairs(va_list)...))::Cvoid)) +end # automatic type deduction for variadic arguments may not be what you want, please use with caution @generated function t8_productionf(fmt, va_list...) - :(@ccall(libt8.t8_productionf(fmt::Cstring; $(to_c_type_pairs(va_list)...))::Cvoid)) - end + :(@ccall(libt8.t8_productionf(fmt::Cstring; $(to_c_type_pairs(va_list)...))::Cvoid)) +end # automatic type deduction for variadic arguments may not be what you want, please use with caution @generated function t8_debugf(fmt, va_list...) - :(@ccall(libt8.t8_debugf(fmt::Cstring; $(to_c_type_pairs(va_list)...))::Cvoid)) - end + :(@ccall(libt8.t8_debugf(fmt::Cstring; $(to_c_type_pairs(va_list)...))::Cvoid)) +end # automatic type deduction for variadic arguments may not be what you want, please use with caution @generated function t8_errorf(fmt, va_list...) - :(@ccall(libt8.t8_errorf(fmt::Cstring; $(to_c_type_pairs(va_list)...))::Cvoid)) - end + :(@ccall(libt8.t8_errorf(fmt::Cstring; $(to_c_type_pairs(va_list)...))::Cvoid)) +end """ t8_set_external_log_fcn(log_fcn) @@ -3378,7 +3400,8 @@ void * t8_sc_array_index_locidx (const sc_array_t *array, const t8_locidx_t inde ``` """ function t8_sc_array_index_locidx(array, index) - @ccall libt8.t8_sc_array_index_locidx(array::Ptr{sc_array_t}, index::t8_locidx_t)::Ptr{Cvoid} + @ccall libt8.t8_sc_array_index_locidx(array::Ptr{sc_array_t}, + index::t8_locidx_t)::Ptr{Cvoid} end """ @@ -3459,7 +3482,8 @@ void sc_shmem_memcpy (void *destarray, void *srcarray, size_t bytes, sc_MPI_Comm ``` """ function sc_shmem_memcpy(destarray, srcarray, bytes, comm) - @ccall libsc.sc_shmem_memcpy(destarray::Ptr{Cvoid}, srcarray::Ptr{Cvoid}, bytes::Csize_t, comm::MPI_Comm)::Cvoid + @ccall libsc.sc_shmem_memcpy(destarray::Ptr{Cvoid}, srcarray::Ptr{Cvoid}, + bytes::Csize_t, comm::MPI_Comm)::Cvoid end """ @@ -3470,8 +3494,11 @@ end void sc_shmem_allgather (void *sendbuf, int sendcount, sc_MPI_Datatype sendtype, void *recvbuf, int recvcount, sc_MPI_Datatype recvtype, sc_MPI_Comm comm); ``` """ -function sc_shmem_allgather(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm) - @ccall libsc.sc_shmem_allgather(sendbuf::Ptr{Cvoid}, sendcount::Cint, sendtype::Cint, recvbuf::Ptr{Cvoid}, recvcount::Cint, recvtype::Cint, comm::MPI_Comm)::Cvoid +function sc_shmem_allgather(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, + comm) + @ccall libsc.sc_shmem_allgather(sendbuf::Ptr{Cvoid}, sendcount::Cint, sendtype::Cint, + recvbuf::Ptr{Cvoid}, recvcount::Cint, recvtype::Cint, + comm::MPI_Comm)::Cvoid end """ @@ -3483,7 +3510,8 @@ void sc_shmem_prefix (void *sendbuf, void *recvbuf, int count, sc_MPI_Datatype t ``` """ function sc_shmem_prefix(sendbuf, recvbuf, count, type, op, comm) - @ccall libsc.sc_shmem_prefix(sendbuf::Ptr{Cvoid}, recvbuf::Ptr{Cvoid}, count::Cint, type::Cint, op::Cint, comm::MPI_Comm)::Cvoid + @ccall libsc.sc_shmem_prefix(sendbuf::Ptr{Cvoid}, recvbuf::Ptr{Cvoid}, count::Cint, + type::Cint, op::Cint, comm::MPI_Comm)::Cvoid end mutable struct t8_shmem_array end @@ -3535,7 +3563,8 @@ void t8_shmem_array_init (t8_shmem_array_t *parray, size_t elem_size, size_t ele ``` """ function t8_shmem_array_init(parray, elem_size, elem_count, comm) - @ccall libt8.t8_shmem_array_init(parray::Ptr{t8_shmem_array_t}, elem_size::Csize_t, elem_count::Csize_t, comm::MPI_Comm)::Cvoid + @ccall libt8.t8_shmem_array_init(parray::Ptr{t8_shmem_array_t}, elem_size::Csize_t, + elem_count::Csize_t, comm::MPI_Comm)::Cvoid end """ @@ -3598,7 +3627,8 @@ void t8_shmem_array_set_gloidx (t8_shmem_array_t array, int index, t8_gloidx_t v ``` """ function t8_shmem_array_set_gloidx(array, index, value) - @ccall libt8.t8_shmem_array_set_gloidx(array::t8_shmem_array_t, index::Cint, value::t8_gloidx_t)::Cvoid + @ccall libt8.t8_shmem_array_set_gloidx(array::t8_shmem_array_t, index::Cint, + value::t8_gloidx_t)::Cvoid end """ @@ -3623,7 +3653,8 @@ void t8_shmem_array_copy (t8_shmem_array_t dest, t8_shmem_array_t source); ``` """ function t8_shmem_array_copy(dest, source) - @ccall libt8.t8_shmem_array_copy(dest::t8_shmem_array_t, source::t8_shmem_array_t)::Cvoid + @ccall libt8.t8_shmem_array_copy(dest::t8_shmem_array_t, + source::t8_shmem_array_t)::Cvoid end """ @@ -3634,8 +3665,11 @@ end void t8_shmem_array_allgather (const void *sendbuf, int sendcount, sc_MPI_Datatype sendtype, t8_shmem_array_t recvarray, int recvcount, sc_MPI_Datatype recvtype); ``` """ -function t8_shmem_array_allgather(sendbuf, sendcount, sendtype, recvarray, recvcount, recvtype) - @ccall libt8.t8_shmem_array_allgather(sendbuf::Ptr{Cvoid}, sendcount::Cint, sendtype::Cint, recvarray::t8_shmem_array_t, recvcount::Cint, recvtype::Cint)::Cvoid +function t8_shmem_array_allgather(sendbuf, sendcount, sendtype, recvarray, recvcount, + recvtype) + @ccall libt8.t8_shmem_array_allgather(sendbuf::Ptr{Cvoid}, sendcount::Cint, + sendtype::Cint, recvarray::t8_shmem_array_t, + recvcount::Cint, recvtype::Cint)::Cvoid end """ @@ -3647,7 +3681,9 @@ void t8_shmem_array_allgatherv (void *sendbuf, const int sendcount, sc_MPI_Datat ``` """ function t8_shmem_array_allgatherv(sendbuf, sendcount, sendtype, recvarray, recvtype, comm) - @ccall libt8.t8_shmem_array_allgatherv(sendbuf::Ptr{Cvoid}, sendcount::Cint, sendtype::Cint, recvarray::t8_shmem_array_t, recvtype::Cint, comm::MPI_Comm)::Cvoid + @ccall libt8.t8_shmem_array_allgatherv(sendbuf::Ptr{Cvoid}, sendcount::Cint, + sendtype::Cint, recvarray::t8_shmem_array_t, + recvtype::Cint, comm::MPI_Comm)::Cvoid end """ @@ -3659,7 +3695,9 @@ void t8_shmem_array_prefix (const void *sendbuf, t8_shmem_array_t recvarray, con ``` """ function t8_shmem_array_prefix(sendbuf, recvarray, count, type, op, comm) - @ccall libt8.t8_shmem_array_prefix(sendbuf::Ptr{Cvoid}, recvarray::t8_shmem_array_t, count::Cint, type::Cint, op::Cint, comm::MPI_Comm)::Cvoid + @ccall libt8.t8_shmem_array_prefix(sendbuf::Ptr{Cvoid}, recvarray::t8_shmem_array_t, + count::Cint, type::Cint, op::Cint, + comm::MPI_Comm)::Cvoid end """ @@ -3770,7 +3808,8 @@ t8_gloidx_t t8_shmem_array_get_gloidx (t8_shmem_array_t array, int index); ``` """ function t8_shmem_array_get_gloidx(array, index) - @ccall libt8.t8_shmem_array_get_gloidx(array::t8_shmem_array_t, index::Cint)::t8_gloidx_t + @ccall libt8.t8_shmem_array_get_gloidx(array::t8_shmem_array_t, + index::Cint)::t8_gloidx_t end """ @@ -3846,7 +3885,8 @@ void * t8_shmem_array_index_for_writing (t8_shmem_array_t array, size_t index); ``` """ function t8_shmem_array_index_for_writing(array, index) - @ccall libt8.t8_shmem_array_index_for_writing(array::t8_shmem_array_t, index::Csize_t)::Ptr{Cvoid} + @ccall libt8.t8_shmem_array_index_for_writing(array::t8_shmem_array_t, + index::Csize_t)::Ptr{Cvoid} end """ @@ -3869,7 +3909,8 @@ int t8_shmem_array_is_equal (t8_shmem_array_t array_a, t8_shmem_array_t array_b) ``` """ function t8_shmem_array_is_equal(array_a, array_b) - @ccall libt8.t8_shmem_array_is_equal(array_a::t8_shmem_array_t, array_b::t8_shmem_array_t)::Cint + @ccall libt8.t8_shmem_array_is_equal(array_a::t8_shmem_array_t, + array_b::t8_shmem_array_t)::Cint end """ @@ -3906,7 +3947,8 @@ int t8_shmem_array_binary_search (t8_shmem_array_t array, const t8_gloidx_t valu ``` """ function t8_shmem_array_binary_search(array, value, size, compare) - @ccall libt8.t8_shmem_array_binary_search(array::t8_shmem_array_t, value::t8_gloidx_t, size::Cint, compare::Ptr{Cvoid})::Cint + @ccall libt8.t8_shmem_array_binary_search(array::t8_shmem_array_t, value::t8_gloidx_t, + size::Cint, compare::Ptr{Cvoid})::Cint end """ @@ -3950,7 +3992,8 @@ int t8_eclass_count_boundary (t8_eclass_t theclass, int min_dim, int *per_eclass ``` """ function t8_eclass_count_boundary(theclass, min_dim, per_eclass) - @ccall libt8.t8_eclass_count_boundary(theclass::t8_eclass_t, min_dim::Cint, per_eclass::Ptr{Cint})::Cint + @ccall libt8.t8_eclass_count_boundary(theclass::t8_eclass_t, min_dim::Cint, + per_eclass::Ptr{Cint})::Cint end """ @@ -4062,7 +4105,28 @@ int t8_element_shape_t8_to_vtk_corner_number (int element_shape, int index); ``` """ function t8_element_shape_t8_to_vtk_corner_number(element_shape, index) - @ccall libt8.t8_element_shape_t8_to_vtk_corner_number(element_shape::Cint, index::Cint)::Cint + @ccall libt8.t8_element_shape_t8_to_vtk_corner_number(element_shape::Cint, + index::Cint)::Cint +end + +""" + t8_element_shape_vtk_to_t8_corner_number(element_shape, index) + +Maps the vtk corner number of the element to the t8code corner number + +# Arguments +* `element_shape`:\\[in\\] The shape of the element. +* `index`:\\[in\\] The index of the corner in vtk ordering. +# Returns +The corresponding t8code index. +### Prototype +```c +int t8_element_shape_vtk_to_t8_corner_number (int element_shape, int index); +``` +""" +function t8_element_shape_vtk_to_t8_corner_number(element_shape, index) + @ccall libt8.t8_element_shape_vtk_to_t8_corner_number(element_shape::Cint, + index::Cint)::Cint end """ @@ -4114,7 +4178,8 @@ int t8_element_shape_compare (t8_element_shape_t element_shape1, t8_element_shap ``` """ function t8_element_shape_compare(element_shape1, element_shape2) - @ccall libt8.t8_element_shape_compare(element_shape1::t8_element_shape_t, element_shape2::t8_element_shape_t)::Cint + @ccall libt8.t8_element_shape_compare(element_shape1::t8_element_shape_t, + element_shape2::t8_element_shape_t)::Cint end mutable struct t8_element end @@ -4172,7 +4237,8 @@ size_t t8_element_get_element_size (const t8_scheme_c *scheme, const t8_eclass_t ``` """ function t8_element_get_element_size(scheme, tree_class) - @ccall libt8.t8_element_get_element_size(scheme::Ptr{t8_scheme_c}, tree_class::t8_eclass_t)::Csize_t + @ccall libt8.t8_element_get_element_size(scheme::Ptr{t8_scheme_c}, + tree_class::t8_eclass_t)::Csize_t end """ @@ -4186,7 +4252,8 @@ int t8_element_refines_irregular (const t8_scheme_c *scheme, const t8_eclass_t t ``` """ function t8_element_refines_irregular(scheme, tree_class) - @ccall libt8.t8_element_refines_irregular(scheme::Ptr{t8_scheme_c}, tree_class::t8_eclass_t)::Cint + @ccall libt8.t8_element_refines_irregular(scheme::Ptr{t8_scheme_c}, + tree_class::t8_eclass_t)::Cint end """ @@ -4205,7 +4272,8 @@ int t8_element_get_maxlevel (const t8_scheme_c *scheme, const t8_eclass_t tree_c ``` """ function t8_element_get_maxlevel(scheme, tree_class) - @ccall libt8.t8_element_get_maxlevel(scheme::Ptr{t8_scheme_c}, tree_class::t8_eclass_t)::Cint + @ccall libt8.t8_element_get_maxlevel(scheme::Ptr{t8_scheme_c}, + tree_class::t8_eclass_t)::Cint end """ @@ -4225,7 +4293,8 @@ int t8_element_get_level (const t8_scheme_c *scheme, const t8_eclass_t tree_clas ``` """ function t8_element_get_level(scheme, tree_class, element) - @ccall libt8.t8_element_get_level(scheme::Ptr{t8_scheme_c}, tree_class::t8_eclass_t, element::Ptr{t8_element_t})::Cint + @ccall libt8.t8_element_get_level(scheme::Ptr{t8_scheme_c}, tree_class::t8_eclass_t, + element::Ptr{t8_element_t})::Cint end """ @@ -4248,7 +4317,8 @@ void t8_element_copy (const t8_scheme_c *scheme, const t8_eclass_t tree_class, c ``` """ function t8_element_copy(scheme, tree_class, source, dest) - @ccall libt8.t8_element_copy(scheme::Ptr{t8_scheme_c}, tree_class::t8_eclass_t, source::Ptr{t8_element_t}, dest::Ptr{t8_element_t})::Cvoid + @ccall libt8.t8_element_copy(scheme::Ptr{t8_scheme_c}, tree_class::t8_eclass_t, + source::Ptr{t8_element_t}, dest::Ptr{t8_element_t})::Cvoid end """ @@ -4269,7 +4339,9 @@ int t8_element_compare (const t8_scheme_c *scheme, const t8_eclass_t tree_class, ``` """ function t8_element_compare(scheme, tree_class, elem1, elem2) - @ccall libt8.t8_element_compare(scheme::Ptr{t8_scheme_c}, tree_class::t8_eclass_t, elem1::Ptr{t8_element_t}, elem2::Ptr{t8_element_t})::Cint + @ccall libt8.t8_element_compare(scheme::Ptr{t8_scheme_c}, tree_class::t8_eclass_t, + elem1::Ptr{t8_element_t}, + elem2::Ptr{t8_element_t})::Cint end """ @@ -4290,7 +4362,9 @@ int t8_element_is_equal (const t8_scheme_c *scheme, const t8_eclass_t tree_class ``` """ function t8_element_is_equal(scheme, tree_class, elem1, elem2) - @ccall libt8.t8_element_is_equal(scheme::Ptr{t8_scheme_c}, tree_class::t8_eclass_t, elem1::Ptr{t8_element_t}, elem2::Ptr{t8_element_t})::Cint + @ccall libt8.t8_element_is_equal(scheme::Ptr{t8_scheme_c}, tree_class::t8_eclass_t, + elem1::Ptr{t8_element_t}, + elem2::Ptr{t8_element_t})::Cint end """ @@ -4310,7 +4384,8 @@ int element_is_refinable (const t8_scheme_c *scheme, const t8_eclass_t tree_clas ``` """ function element_is_refinable(scheme, tree_class, element) - @ccall libt8.element_is_refinable(scheme::Ptr{t8_scheme_c}, tree_class::t8_eclass_t, element::Ptr{t8_element_t})::Cint + @ccall libt8.element_is_refinable(scheme::Ptr{t8_scheme_c}, tree_class::t8_eclass_t, + element::Ptr{t8_element_t})::Cint end """ @@ -4329,13 +4404,15 @@ void t8_element_get_parent (const t8_scheme_c *scheme, const t8_eclass_t tree_cl ``` """ function t8_element_get_parent(scheme, tree_class, element, parent) - @ccall libt8.t8_element_get_parent(scheme::Ptr{t8_scheme_c}, tree_class::t8_eclass_t, element::Ptr{t8_element_t}, parent::Ptr{t8_element_t})::Cvoid + @ccall libt8.t8_element_get_parent(scheme::Ptr{t8_scheme_c}, tree_class::t8_eclass_t, + element::Ptr{t8_element_t}, + parent::Ptr{t8_element_t})::Cvoid end """ t8_element_get_num_siblings(scheme, tree_class, element) -Compute the number of siblings of an element. That is the number of Children of its parent. +Compute the number of siblings of an element. That is the number of Children of its parent. # Arguments * `scheme`:\\[in\\] The scheme of the forest. @@ -4349,7 +4426,9 @@ int t8_element_get_num_siblings (const t8_scheme_c *scheme, const t8_eclass_t tr ``` """ function t8_element_get_num_siblings(scheme, tree_class, element) - @ccall libt8.t8_element_get_num_siblings(scheme::Ptr{t8_scheme_c}, tree_class::t8_eclass_t, element::Ptr{t8_element_t})::Cint + @ccall libt8.t8_element_get_num_siblings(scheme::Ptr{t8_scheme_c}, + tree_class::t8_eclass_t, + element::Ptr{t8_element_t})::Cint end """ @@ -4369,7 +4448,9 @@ void t8_element_get_sibling (const t8_scheme_c *scheme, const t8_eclass_t tree_c ``` """ function t8_element_get_sibling(scheme, tree_class, elem, sibid, sibling) - @ccall libt8.t8_element_get_sibling(scheme::Ptr{t8_scheme_c}, tree_class::t8_eclass_t, elem::Ptr{t8_element_t}, sibid::Cint, sibling::Ptr{t8_element_t})::Cvoid + @ccall libt8.t8_element_get_sibling(scheme::Ptr{t8_scheme_c}, tree_class::t8_eclass_t, + elem::Ptr{t8_element_t}, sibid::Cint, + sibling::Ptr{t8_element_t})::Cvoid end """ @@ -4389,7 +4470,9 @@ int t8_element_get_num_corners (const t8_scheme_c *scheme, const t8_eclass_t tre ``` """ function t8_element_get_num_corners(scheme, tree_class, element) - @ccall libt8.t8_element_get_num_corners(scheme::Ptr{t8_scheme_c}, tree_class::t8_eclass_t, element::Ptr{t8_element_t})::Cint + @ccall libt8.t8_element_get_num_corners(scheme::Ptr{t8_scheme_c}, + tree_class::t8_eclass_t, + element::Ptr{t8_element_t})::Cint end """ @@ -4409,7 +4492,8 @@ int t8_element_get_num_faces (const t8_scheme_c *scheme, const t8_eclass_t tree_ ``` """ function t8_element_get_num_faces(scheme, tree_class, element) - @ccall libt8.t8_element_get_num_faces(scheme::Ptr{t8_scheme_c}, tree_class::t8_eclass_t, element::Ptr{t8_element_t})::Cint + @ccall libt8.t8_element_get_num_faces(scheme::Ptr{t8_scheme_c}, tree_class::t8_eclass_t, + element::Ptr{t8_element_t})::Cint end """ @@ -4429,7 +4513,9 @@ int t8_element_get_max_num_faces (const t8_scheme_c *scheme, const t8_eclass_t t ``` """ function t8_element_get_max_num_faces(scheme, tree_class, element) - @ccall libt8.t8_element_get_max_num_faces(scheme::Ptr{t8_scheme_c}, tree_class::t8_eclass_t, element::Ptr{t8_element_t})::Cint + @ccall libt8.t8_element_get_max_num_faces(scheme::Ptr{t8_scheme_c}, + tree_class::t8_eclass_t, + element::Ptr{t8_element_t})::Cint end """ @@ -4449,7 +4535,9 @@ int t8_element_get_num_children (const t8_scheme_c *scheme, const t8_eclass_t tr ``` """ function t8_element_get_num_children(scheme, tree_class, element) - @ccall libt8.t8_element_get_num_children(scheme::Ptr{t8_scheme_c}, tree_class::t8_eclass_t, element::Ptr{t8_element_t})::Cint + @ccall libt8.t8_element_get_num_children(scheme::Ptr{t8_scheme_c}, + tree_class::t8_eclass_t, + element::Ptr{t8_element_t})::Cint end """ @@ -4468,7 +4556,8 @@ int t8_get_max_num_children (const t8_scheme_c *scheme, const t8_eclass_t tree_c ``` """ function t8_get_max_num_children(scheme, tree_class) - @ccall libt8.t8_get_max_num_children(scheme::Ptr{t8_scheme_c}, tree_class::t8_eclass_t)::Cint + @ccall libt8.t8_get_max_num_children(scheme::Ptr{t8_scheme_c}, + tree_class::t8_eclass_t)::Cint end """ @@ -4489,7 +4578,10 @@ int t8_element_get_num_face_children (const t8_scheme_c *scheme, const t8_eclass ``` """ function t8_element_get_num_face_children(scheme, tree_class, element, face) - @ccall libt8.t8_element_get_num_face_children(scheme::Ptr{t8_scheme_c}, tree_class::t8_eclass_t, element::Ptr{t8_element_t}, face::Cint)::Cint + @ccall libt8.t8_element_get_num_face_children(scheme::Ptr{t8_scheme_c}, + tree_class::t8_eclass_t, + element::Ptr{t8_element_t}, + face::Cint)::Cint end """ @@ -4513,7 +4605,10 @@ int t8_element_get_face_corner (const t8_scheme_c *scheme, const t8_eclass_t tre ``` """ function t8_element_get_face_corner(scheme, tree_class, element, face, corner) - @ccall libt8.t8_element_get_face_corner(scheme::Ptr{t8_scheme_c}, tree_class::t8_eclass_t, element::Ptr{t8_element_t}, face::Cint, corner::Cint)::Cint + @ccall libt8.t8_element_get_face_corner(scheme::Ptr{t8_scheme_c}, + tree_class::t8_eclass_t, + element::Ptr{t8_element_t}, face::Cint, + corner::Cint)::Cint end """ @@ -4535,7 +4630,10 @@ int t8_element_get_corner_face (const t8_scheme_c *scheme, const t8_eclass_t tre ``` """ function t8_element_get_corner_face(scheme, tree_class, element, corner, face) - @ccall libt8.t8_element_get_corner_face(scheme::Ptr{t8_scheme_c}, tree_class::t8_eclass_t, element::Ptr{t8_element_t}, corner::Cint, face::Cint)::Cint + @ccall libt8.t8_element_get_corner_face(scheme::Ptr{t8_scheme_c}, + tree_class::t8_eclass_t, + element::Ptr{t8_element_t}, corner::Cint, + face::Cint)::Cint end """ @@ -4555,7 +4653,9 @@ void t8_element_get_child (const t8_scheme_c *scheme, const t8_eclass_t tree_cla ``` """ function t8_element_get_child(scheme, tree_class, element, childid, child) - @ccall libt8.t8_element_get_child(scheme::Ptr{t8_scheme_c}, tree_class::t8_eclass_t, element::Ptr{t8_element_t}, childid::Cint, child::Ptr{t8_element_t})::Cvoid + @ccall libt8.t8_element_get_child(scheme::Ptr{t8_scheme_c}, tree_class::t8_eclass_t, + element::Ptr{t8_element_t}, childid::Cint, + child::Ptr{t8_element_t})::Cvoid end """ @@ -4578,7 +4678,9 @@ void t8_element_get_children (const t8_scheme_c *scheme, const t8_eclass_t tree_ ``` """ function t8_element_get_children(scheme, tree_class, element, length, c) - @ccall libt8.t8_element_get_children(scheme::Ptr{t8_scheme_c}, tree_class::t8_eclass_t, element::Ptr{t8_element_t}, length::Cint, c::Ptr{Ptr{t8_element_t}})::Cvoid + @ccall libt8.t8_element_get_children(scheme::Ptr{t8_scheme_c}, tree_class::t8_eclass_t, + element::Ptr{t8_element_t}, length::Cint, + c::Ptr{Ptr{t8_element_t}})::Cvoid end """ @@ -4598,7 +4700,8 @@ int t8_element_get_child_id (const t8_scheme_c *scheme, const t8_eclass_t tree_c ``` """ function t8_element_get_child_id(scheme, tree_class, element) - @ccall libt8.t8_element_get_child_id(scheme::Ptr{t8_scheme_c}, tree_class::t8_eclass_t, element::Ptr{t8_element_t})::Cint + @ccall libt8.t8_element_get_child_id(scheme::Ptr{t8_scheme_c}, tree_class::t8_eclass_t, + element::Ptr{t8_element_t})::Cint end """ @@ -4619,7 +4722,9 @@ int t8_element_get_ancestor_id (const t8_scheme_c *scheme, const t8_eclass_t tre ``` """ function t8_element_get_ancestor_id(scheme, tree_class, element, level) - @ccall libt8.t8_element_get_ancestor_id(scheme::Ptr{t8_scheme_c}, tree_class::t8_eclass_t, element::Ptr{t8_element_t}, level::Cint)::Cint + @ccall libt8.t8_element_get_ancestor_id(scheme::Ptr{t8_scheme_c}, + tree_class::t8_eclass_t, + element::Ptr{t8_element_t}, level::Cint)::Cint end """ @@ -4639,7 +4744,8 @@ int t8_elements_are_family (const t8_scheme_c *scheme, const t8_eclass_t tree_cl ``` """ function t8_elements_are_family(scheme, tree_class, fam) - @ccall libt8.t8_elements_are_family(scheme::Ptr{t8_scheme_c}, tree_class::t8_eclass_t, fam::Ptr{Ptr{t8_element_t}})::Cint + @ccall libt8.t8_elements_are_family(scheme::Ptr{t8_scheme_c}, tree_class::t8_eclass_t, + fam::Ptr{Ptr{t8_element_t}})::Cint end """ @@ -4659,7 +4765,9 @@ void t8_element_get_nca (const t8_scheme_c *scheme, const t8_eclass_t tree_class ``` """ function t8_element_get_nca(scheme, tree_class, elem1, elem2, nca) - @ccall libt8.t8_element_get_nca(scheme::Ptr{t8_scheme_c}, tree_class::t8_eclass_t, elem1::Ptr{t8_element_t}, elem2::Ptr{t8_element_t}, nca::Ptr{t8_element_t})::Cvoid + @ccall libt8.t8_element_get_nca(scheme::Ptr{t8_scheme_c}, tree_class::t8_eclass_t, + elem1::Ptr{t8_element_t}, elem2::Ptr{t8_element_t}, + nca::Ptr{t8_element_t})::Cvoid end """ @@ -4680,7 +4788,10 @@ t8_element_shape_t t8_element_get_face_shape (const t8_scheme_c *scheme, const t ``` """ function t8_element_get_face_shape(scheme, tree_class, element, face) - @ccall libt8.t8_element_get_face_shape(scheme::Ptr{t8_scheme_c}, tree_class::t8_eclass_t, element::Ptr{t8_element_t}, face::Cint)::t8_element_shape_t + @ccall libt8.t8_element_get_face_shape(scheme::Ptr{t8_scheme_c}, + tree_class::t8_eclass_t, + element::Ptr{t8_element_t}, + face::Cint)::t8_element_shape_t end """ @@ -4701,8 +4812,14 @@ Given an element and a face of the element, compute all children of the element void t8_element_get_children_at_face (const t8_scheme_c *scheme, const t8_eclass_t tree_class, const t8_element_t *element, const int face, t8_element_t *children[], const int num_children, int *child_indices); ``` """ -function t8_element_get_children_at_face(scheme, tree_class, element, face, children, num_children, child_indices) - @ccall libt8.t8_element_get_children_at_face(scheme::Ptr{t8_scheme_c}, tree_class::t8_eclass_t, element::Ptr{t8_element_t}, face::Cint, children::Ptr{Ptr{t8_element_t}}, num_children::Cint, child_indices::Ptr{Cint})::Cvoid +function t8_element_get_children_at_face(scheme, tree_class, element, face, children, + num_children, child_indices) + @ccall libt8.t8_element_get_children_at_face(scheme::Ptr{t8_scheme_c}, + tree_class::t8_eclass_t, + element::Ptr{t8_element_t}, face::Cint, + children::Ptr{Ptr{t8_element_t}}, + num_children::Cint, + child_indices::Ptr{Cint})::Cvoid end """ @@ -4733,7 +4850,10 @@ int t8_element_face_get_child_face (const t8_scheme_c *scheme, const t8_eclass_t ``` """ function t8_element_face_get_child_face(scheme, tree_class, element, face, face_child) - @ccall libt8.t8_element_face_get_child_face(scheme::Ptr{t8_scheme_c}, tree_class::t8_eclass_t, element::Ptr{t8_element_t}, face::Cint, face_child::Cint)::Cint + @ccall libt8.t8_element_face_get_child_face(scheme::Ptr{t8_scheme_c}, + tree_class::t8_eclass_t, + element::Ptr{t8_element_t}, face::Cint, + face_child::Cint)::Cint end """ @@ -4758,7 +4878,10 @@ int t8_element_face_get_parent_face (const t8_scheme_c *scheme, const t8_eclass_ ``` """ function t8_element_face_get_parent_face(scheme, tree_class, element, face) - @ccall libt8.t8_element_face_get_parent_face(scheme::Ptr{t8_scheme_c}, tree_class::t8_eclass_t, element::Ptr{t8_element_t}, face::Cint)::Cint + @ccall libt8.t8_element_face_get_parent_face(scheme::Ptr{t8_scheme_c}, + tree_class::t8_eclass_t, + element::Ptr{t8_element_t}, + face::Cint)::Cint end """ @@ -4779,7 +4902,8 @@ int t8_element_get_tree_face (const t8_scheme_c *scheme, const t8_eclass_t tree_ ``` """ function t8_element_get_tree_face(scheme, tree_class, element, face) - @ccall libt8.t8_element_get_tree_face(scheme::Ptr{t8_scheme_c}, tree_class::t8_eclass_t, element::Ptr{t8_element_t}, face::Cint)::Cint + @ccall libt8.t8_element_get_tree_face(scheme::Ptr{t8_scheme_c}, tree_class::t8_eclass_t, + element::Ptr{t8_element_t}, face::Cint)::Cint end """ @@ -4807,8 +4931,13 @@ Suppose we have two trees that share a common face f. Given an element e that is void t8_element_transform_face (const t8_scheme_c *scheme, const t8_eclass_t tree_class, const t8_element_t *elem1, t8_element_t *elem2, const int orientation, const int sign, const int is_smaller_face); ``` """ -function t8_element_transform_face(scheme, tree_class, elem1, elem2, orientation, sign, is_smaller_face) - @ccall libt8.t8_element_transform_face(scheme::Ptr{t8_scheme_c}, tree_class::t8_eclass_t, elem1::Ptr{t8_element_t}, elem2::Ptr{t8_element_t}, orientation::Cint, sign::Cint, is_smaller_face::Cint)::Cvoid +function t8_element_transform_face(scheme, tree_class, elem1, elem2, orientation, sign, + is_smaller_face) + @ccall libt8.t8_element_transform_face(scheme::Ptr{t8_scheme_c}, + tree_class::t8_eclass_t, + elem1::Ptr{t8_element_t}, + elem2::Ptr{t8_element_t}, orientation::Cint, + sign::Cint, is_smaller_face::Cint)::Cvoid end """ @@ -4830,7 +4959,9 @@ int t8_element_extrude_face (const t8_scheme_c *scheme, const t8_eclass_t tree_c ``` """ function t8_element_extrude_face(scheme, tree_class, face, element, root_face) - @ccall libt8.t8_element_extrude_face(scheme::Ptr{t8_scheme_c}, tree_class::t8_eclass_t, face::Ptr{t8_element_t}, element::Ptr{t8_element_t}, root_face::Cint)::Cint + @ccall libt8.t8_element_extrude_face(scheme::Ptr{t8_scheme_c}, tree_class::t8_eclass_t, + face::Ptr{t8_element_t}, + element::Ptr{t8_element_t}, root_face::Cint)::Cint end """ @@ -4850,7 +4981,10 @@ void t8_element_get_boundary_face (const t8_scheme_c *scheme, const t8_eclass_t ``` """ function t8_element_get_boundary_face(scheme, tree_class, element, face, boundary) - @ccall libt8.t8_element_get_boundary_face(scheme::Ptr{t8_scheme_c}, tree_class::t8_eclass_t, element::Ptr{t8_element_t}, face::Cint, boundary::Ptr{t8_element_t})::Cvoid + @ccall libt8.t8_element_get_boundary_face(scheme::Ptr{t8_scheme_c}, + tree_class::t8_eclass_t, + element::Ptr{t8_element_t}, face::Cint, + boundary::Ptr{t8_element_t})::Cvoid end """ @@ -4870,8 +5004,14 @@ Construct the first descendant of an element at a given level that touches a giv void t8_element_get_first_descendant_face (const t8_scheme_c *scheme, const t8_eclass_t tree_class, const t8_element_t *element, const int face, t8_element_t *first_desc, const int level); ``` """ -function t8_element_get_first_descendant_face(scheme, tree_class, element, face, first_desc, level) - @ccall libt8.t8_element_get_first_descendant_face(scheme::Ptr{t8_scheme_c}, tree_class::t8_eclass_t, element::Ptr{t8_element_t}, face::Cint, first_desc::Ptr{t8_element_t}, level::Cint)::Cvoid +function t8_element_get_first_descendant_face(scheme, tree_class, element, face, first_desc, + level) + @ccall libt8.t8_element_get_first_descendant_face(scheme::Ptr{t8_scheme_c}, + tree_class::t8_eclass_t, + element::Ptr{t8_element_t}, + face::Cint, + first_desc::Ptr{t8_element_t}, + level::Cint)::Cvoid end """ @@ -4891,8 +5031,13 @@ Construct the last descendant of an element at a given level that touches a give void t8_element_get_last_descendant_face (const t8_scheme_c *scheme, const t8_eclass_t tree_class, const t8_element_t *element, const int face, t8_element_t *last_desc, const int level); ``` """ -function t8_element_get_last_descendant_face(scheme, tree_class, element, face, last_desc, level) - @ccall libt8.t8_element_get_last_descendant_face(scheme::Ptr{t8_scheme_c}, tree_class::t8_eclass_t, element::Ptr{t8_element_t}, face::Cint, last_desc::Ptr{t8_element_t}, level::Cint)::Cvoid +function t8_element_get_last_descendant_face(scheme, tree_class, element, face, last_desc, + level) + @ccall libt8.t8_element_get_last_descendant_face(scheme::Ptr{t8_scheme_c}, + tree_class::t8_eclass_t, + element::Ptr{t8_element_t}, face::Cint, + last_desc::Ptr{t8_element_t}, + level::Cint)::Cvoid end """ @@ -4913,7 +5058,9 @@ int t8_element_is_root_boundary (const t8_scheme_c *scheme, const t8_eclass_t tr ``` """ function t8_element_is_root_boundary(scheme, tree_class, element, face) - @ccall libt8.t8_element_is_root_boundary(scheme::Ptr{t8_scheme_c}, tree_class::t8_eclass_t, element::Ptr{t8_element_t}, face::Cint)::Cint + @ccall libt8.t8_element_is_root_boundary(scheme::Ptr{t8_scheme_c}, + tree_class::t8_eclass_t, + element::Ptr{t8_element_t}, face::Cint)::Cint end """ @@ -4935,8 +5082,13 @@ True if *neigh* is inside the root tree. False if not. In this case *neigh*'s da int t8_element_get_face_neighbor_inside (const t8_scheme_c *scheme, const t8_eclass_t tree_class, const t8_element_t *element, t8_element_t *neigh, const int face, int *neigh_face); ``` """ -function t8_element_get_face_neighbor_inside(scheme, tree_class, element, neigh, face, neigh_face) - @ccall libt8.t8_element_get_face_neighbor_inside(scheme::Ptr{t8_scheme_c}, tree_class::t8_eclass_t, element::Ptr{t8_element_t}, neigh::Ptr{t8_element_t}, face::Cint, neigh_face::Ptr{Cint})::Cint +function t8_element_get_face_neighbor_inside(scheme, tree_class, element, neigh, face, + neigh_face) + @ccall libt8.t8_element_get_face_neighbor_inside(scheme::Ptr{t8_scheme_c}, + tree_class::t8_eclass_t, + element::Ptr{t8_element_t}, + neigh::Ptr{t8_element_t}, face::Cint, + neigh_face::Ptr{Cint})::Cint end """ @@ -4956,7 +5108,8 @@ t8_element_shape_t t8_element_get_shape (const t8_scheme_c *scheme, const t8_ecl ``` """ function t8_element_get_shape(scheme, tree_class, element) - @ccall libt8.t8_element_get_shape(scheme::Ptr{t8_scheme_c}, tree_class::t8_eclass_t, element::Ptr{t8_element_t})::t8_element_shape_t + @ccall libt8.t8_element_get_shape(scheme::Ptr{t8_scheme_c}, tree_class::t8_eclass_t, + element::Ptr{t8_element_t})::t8_element_shape_t end """ @@ -4976,7 +5129,9 @@ void t8_element_set_linear_id (const t8_scheme_c *scheme, const t8_eclass_t tree ``` """ function t8_element_set_linear_id(scheme, tree_class, element, level, id) - @ccall libt8.t8_element_set_linear_id(scheme::Ptr{t8_scheme_c}, tree_class::t8_eclass_t, element::Ptr{t8_element_t}, level::Cint, id::t8_linearidx_t)::Cvoid + @ccall libt8.t8_element_set_linear_id(scheme::Ptr{t8_scheme_c}, tree_class::t8_eclass_t, + element::Ptr{t8_element_t}, level::Cint, + id::t8_linearidx_t)::Cvoid end """ @@ -4997,7 +5152,9 @@ t8_linearidx_t t8_element_get_linear_id (const t8_scheme_c *scheme, const t8_ecl ``` """ function t8_element_get_linear_id(scheme, tree_class, element, level) - @ccall libt8.t8_element_get_linear_id(scheme::Ptr{t8_scheme_c}, tree_class::t8_eclass_t, element::Ptr{t8_element_t}, level::Cint)::t8_linearidx_t + @ccall libt8.t8_element_get_linear_id(scheme::Ptr{t8_scheme_c}, tree_class::t8_eclass_t, + element::Ptr{t8_element_t}, + level::Cint)::t8_linearidx_t end """ @@ -5017,7 +5174,11 @@ void t8_element_get_first_descendant (const t8_scheme_c *scheme, const t8_eclass ``` """ function t8_element_get_first_descendant(scheme, tree_class, element, desc, level) - @ccall libt8.t8_element_get_first_descendant(scheme::Ptr{t8_scheme_c}, tree_class::t8_eclass_t, element::Ptr{t8_element_t}, desc::Ptr{t8_element_t}, level::Cint)::Cvoid + @ccall libt8.t8_element_get_first_descendant(scheme::Ptr{t8_scheme_c}, + tree_class::t8_eclass_t, + element::Ptr{t8_element_t}, + desc::Ptr{t8_element_t}, + level::Cint)::Cvoid end """ @@ -5037,7 +5198,10 @@ void t8_element_get_last_descendant (const t8_scheme_c *scheme, const t8_eclass_ ``` """ function t8_element_get_last_descendant(scheme, tree_class, element, desc, level) - @ccall libt8.t8_element_get_last_descendant(scheme::Ptr{t8_scheme_c}, tree_class::t8_eclass_t, element::Ptr{t8_element_t}, desc::Ptr{t8_element_t}, level::Cint)::Cvoid + @ccall libt8.t8_element_get_last_descendant(scheme::Ptr{t8_scheme_c}, + tree_class::t8_eclass_t, + element::Ptr{t8_element_t}, + desc::Ptr{t8_element_t}, level::Cint)::Cvoid end """ @@ -5056,7 +5220,10 @@ void t8_element_construct_successor (const t8_scheme_c *scheme, const t8_eclass_ ``` """ function t8_element_construct_successor(scheme, tree_class, elem1, elem2) - @ccall libt8.t8_element_construct_successor(scheme::Ptr{t8_scheme_c}, tree_class::t8_eclass_t, elem1::Ptr{t8_element_t}, elem2::Ptr{t8_element_t})::Cvoid + @ccall libt8.t8_element_construct_successor(scheme::Ptr{t8_scheme_c}, + tree_class::t8_eclass_t, + elem1::Ptr{t8_element_t}, + elem2::Ptr{t8_element_t})::Cvoid end """ @@ -5080,7 +5247,11 @@ void t8_element_get_vertex_reference_coords (const t8_scheme_c *scheme, const t8 ``` """ function t8_element_get_vertex_reference_coords(scheme, tree_class, element, vertex, coords) - @ccall libt8.t8_element_get_vertex_reference_coords(scheme::Ptr{t8_scheme_c}, tree_class::t8_eclass_t, element::Ptr{t8_element_t}, vertex::Cint, coords::Ptr{Cdouble})::Cvoid + @ccall libt8.t8_element_get_vertex_reference_coords(scheme::Ptr{t8_scheme_c}, + tree_class::t8_eclass_t, + element::Ptr{t8_element_t}, + vertex::Cint, + coords::Ptr{Cdouble})::Cvoid end """ @@ -5112,8 +5283,14 @@ of the point in the reference space of the element. void t8_element_get_reference_coords (const t8_scheme_c *scheme, const t8_eclass_t tree_class, const t8_element_t *element, const double *ref_coords, const size_t num_coords, double out_coords[]); ``` """ -function t8_element_get_reference_coords(scheme, tree_class, element, ref_coords, num_coords, out_coords) - @ccall libt8.t8_element_get_reference_coords(scheme::Ptr{t8_scheme_c}, tree_class::t8_eclass_t, element::Ptr{t8_element_t}, ref_coords::Ptr{Cdouble}, num_coords::Csize_t, out_coords::Ptr{Cdouble})::Cvoid +function t8_element_get_reference_coords(scheme, tree_class, element, ref_coords, + num_coords, out_coords) + @ccall libt8.t8_element_get_reference_coords(scheme::Ptr{t8_scheme_c}, + tree_class::t8_eclass_t, + element::Ptr{t8_element_t}, + ref_coords::Ptr{Cdouble}, + num_coords::Csize_t, + out_coords::Ptr{Cdouble})::Cvoid end """ @@ -5136,7 +5313,9 @@ t8_gloidx_t t8_element_count_leaves (const t8_scheme_c *scheme, const t8_eclass_ ``` """ function t8_element_count_leaves(scheme, tree_class, element, level) - @ccall libt8.t8_element_count_leaves(scheme::Ptr{t8_scheme_c}, tree_class::t8_eclass_t, element::Ptr{t8_element_t}, level::Cint)::t8_gloidx_t + @ccall libt8.t8_element_count_leaves(scheme::Ptr{t8_scheme_c}, tree_class::t8_eclass_t, + element::Ptr{t8_element_t}, + level::Cint)::t8_gloidx_t end """ @@ -5158,7 +5337,9 @@ t8_gloidx_t t8_element_count_leaves_from_root (const t8_scheme_c *scheme, const ``` """ function t8_element_count_leaves_from_root(scheme, tree_class, level) - @ccall libt8.t8_element_count_leaves_from_root(scheme::Ptr{t8_scheme_c}, tree_class::t8_eclass_t, level::Cint)::t8_gloidx_t + @ccall libt8.t8_element_count_leaves_from_root(scheme::Ptr{t8_scheme_c}, + tree_class::t8_eclass_t, + level::Cint)::t8_gloidx_t end """ @@ -5178,7 +5359,9 @@ void t8_element_to_string (const t8_scheme_c *scheme, const t8_eclass_t tree_cla ``` """ function t8_element_to_string(scheme, tree_class, element, debug_string, string_size) - @ccall libt8.t8_element_to_string(scheme::Ptr{t8_scheme_c}, tree_class::t8_eclass_t, element::Ptr{t8_element_t}, debug_string::Cstring, string_size::Cint)::Cvoid + @ccall libt8.t8_element_to_string(scheme::Ptr{t8_scheme_c}, tree_class::t8_eclass_t, + element::Ptr{t8_element_t}, debug_string::Cstring, + string_size::Cint)::Cvoid end """ @@ -5212,7 +5395,8 @@ void t8_element_new (const t8_scheme_c *scheme, const t8_eclass_t tree_class, co ``` """ function t8_element_new(scheme, tree_class, length, elems) - @ccall libt8.t8_element_new(scheme::Ptr{t8_scheme_c}, tree_class::t8_eclass_t, length::Cint, elems::Ptr{Ptr{t8_element_t}})::Cvoid + @ccall libt8.t8_element_new(scheme::Ptr{t8_scheme_c}, tree_class::t8_eclass_t, + length::Cint, elems::Ptr{Ptr{t8_element_t}})::Cvoid end """ @@ -5246,7 +5430,8 @@ void t8_element_init (const t8_scheme_c *scheme, const t8_eclass_t tree_class, c ``` """ function t8_element_init(scheme, tree_class, length, elem) - @ccall libt8.t8_element_init(scheme::Ptr{t8_scheme_c}, tree_class::t8_eclass_t, length::Cint, elem::Ptr{t8_element_t})::Cvoid + @ccall libt8.t8_element_init(scheme::Ptr{t8_scheme_c}, tree_class::t8_eclass_t, + length::Cint, elem::Ptr{t8_element_t})::Cvoid end """ @@ -5272,7 +5457,8 @@ void t8_element_deinit (const t8_scheme_c *scheme, const t8_eclass_t tree_class, ``` """ function t8_element_deinit(scheme, tree_class, length, elems) - @ccall libt8.t8_element_deinit(scheme::Ptr{t8_scheme_c}, tree_class::t8_eclass_t, length::Cint, elems::Ptr{t8_element_t})::Cvoid + @ccall libt8.t8_element_deinit(scheme::Ptr{t8_scheme_c}, tree_class::t8_eclass_t, + length::Cint, elems::Ptr{t8_element_t})::Cvoid end """ @@ -5291,7 +5477,8 @@ void t8_element_destroy (const t8_scheme_c *scheme, const t8_eclass_t tree_class ``` """ function t8_element_destroy(scheme, tree_class, length, elems) - @ccall libt8.t8_element_destroy(scheme::Ptr{t8_scheme_c}, tree_class::t8_eclass_t, length::Cint, elems::Ptr{Ptr{t8_element_t}})::Cvoid + @ccall libt8.t8_element_destroy(scheme::Ptr{t8_scheme_c}, tree_class::t8_eclass_t, + length::Cint, elems::Ptr{Ptr{t8_element_t}})::Cvoid end """ @@ -5309,7 +5496,8 @@ void t8_element_set_to_root (const t8_scheme_c *scheme, const t8_eclass_t tree_c ``` """ function t8_element_set_to_root(scheme, tree_class, element) - @ccall libt8.t8_element_set_to_root(scheme::Ptr{t8_scheme_c}, tree_class::t8_eclass_t, element::Ptr{t8_element_t})::Cvoid + @ccall libt8.t8_element_set_to_root(scheme::Ptr{t8_scheme_c}, tree_class::t8_eclass_t, + element::Ptr{t8_element_t})::Cvoid end """ @@ -5320,8 +5508,12 @@ end void t8_element_MPI_Pack (const t8_scheme_c *scheme, const t8_eclass_t tree_class, t8_element_t **const elements, const unsigned int count, void *send_buffer, const int buffer_size, int *position, sc_MPI_Comm comm); ``` """ -function t8_element_MPI_Pack(scheme, tree_class, elements, count, send_buffer, buffer_size, position, comm) - @ccall libt8.t8_element_MPI_Pack(scheme::Ptr{t8_scheme_c}, tree_class::t8_eclass_t, elements::Ptr{Ptr{t8_element_t}}, count::Cuint, send_buffer::Ptr{Cvoid}, buffer_size::Cint, position::Ptr{Cint}, comm::MPI_Comm)::Cvoid +function t8_element_MPI_Pack(scheme, tree_class, elements, count, send_buffer, buffer_size, + position, comm) + @ccall libt8.t8_element_MPI_Pack(scheme::Ptr{t8_scheme_c}, tree_class::t8_eclass_t, + elements::Ptr{Ptr{t8_element_t}}, count::Cuint, + send_buffer::Ptr{Cvoid}, buffer_size::Cint, + position::Ptr{Cint}, comm::MPI_Comm)::Cvoid end """ @@ -5333,7 +5525,9 @@ void t8_element_MPI_Pack_size (const t8_scheme_c *scheme, const t8_eclass_t tree ``` """ function t8_element_MPI_Pack_size(scheme, tree_class, count, comm, pack_size) - @ccall libt8.t8_element_MPI_Pack_size(scheme::Ptr{t8_scheme_c}, tree_class::t8_eclass_t, count::Cuint, comm::MPI_Comm, pack_size::Ptr{Cint})::Cvoid + @ccall libt8.t8_element_MPI_Pack_size(scheme::Ptr{t8_scheme_c}, tree_class::t8_eclass_t, + count::Cuint, comm::MPI_Comm, + pack_size::Ptr{Cint})::Cvoid end """ @@ -5344,8 +5538,13 @@ end void t8_element_MPI_Unpack (const t8_scheme_c *scheme, const t8_eclass_t tree_class, void *recvbuf, const int buffer_size, int *position, t8_element_t **elements, const unsigned int count, sc_MPI_Comm comm); ``` """ -function t8_element_MPI_Unpack(scheme, tree_class, recvbuf, buffer_size, position, elements, count, comm) - @ccall libt8.t8_element_MPI_Unpack(scheme::Ptr{t8_scheme_c}, tree_class::t8_eclass_t, recvbuf::Ptr{Cvoid}, buffer_size::Cint, position::Ptr{Cint}, elements::Ptr{Ptr{t8_element_t}}, count::Cuint, comm::MPI_Comm)::Cvoid +function t8_element_MPI_Unpack(scheme, tree_class, recvbuf, buffer_size, position, elements, + count, comm) + @ccall libt8.t8_element_MPI_Unpack(scheme::Ptr{t8_scheme_c}, tree_class::t8_eclass_t, + recvbuf::Ptr{Cvoid}, buffer_size::Cint, + position::Ptr{Cint}, + elements::Ptr{Ptr{t8_element_t}}, count::Cuint, + comm::MPI_Comm)::Cvoid end mutable struct t8_cmesh end @@ -5510,7 +5709,6 @@ const t8_geometry_c = t8_geometry mutable struct t8_geometry_handler end -"""This typedef holds virtual functions for the geometry handler. We need it so that we can use [`t8_geometry_handler_c`](@ref) pointers in .c files without them seeing the actual C++ code (and then not compiling) TODO: Delete this when the cmesh is a proper cpp class.""" const t8_geometry_handler_c = t8_geometry_handler """ @@ -5530,7 +5728,9 @@ void t8_geometry_evaluate (t8_cmesh_t cmesh, t8_gloidx_t gtreeid, const double * ``` """ function t8_geometry_evaluate(cmesh, gtreeid, ref_coords, num_coords, out_coords) - @ccall libt8.t8_geometry_evaluate(cmesh::t8_cmesh_t, gtreeid::t8_gloidx_t, ref_coords::Ptr{Cdouble}, num_coords::Csize_t, out_coords::Ptr{Cdouble})::Cvoid + @ccall libt8.t8_geometry_evaluate(cmesh::t8_cmesh_t, gtreeid::t8_gloidx_t, + ref_coords::Ptr{Cdouble}, num_coords::Csize_t, + out_coords::Ptr{Cdouble})::Cvoid end """ @@ -5550,7 +5750,9 @@ void t8_geometry_jacobian (t8_cmesh_t cmesh, t8_gloidx_t gtreeid, const double * ``` """ function t8_geometry_jacobian(cmesh, gtreeid, ref_coords, num_coords, jacobian) - @ccall libt8.t8_geometry_jacobian(cmesh::t8_cmesh_t, gtreeid::t8_gloidx_t, ref_coords::Ptr{Cdouble}, num_coords::Csize_t, jacobian::Ptr{Cdouble})::Cvoid + @ccall libt8.t8_geometry_jacobian(cmesh::t8_cmesh_t, gtreeid::t8_gloidx_t, + ref_coords::Ptr{Cdouble}, num_coords::Csize_t, + jacobian::Ptr{Cdouble})::Cvoid end """ @@ -5569,7 +5771,8 @@ t8_geometry_type_t t8_geometry_get_type (t8_cmesh_t cmesh, t8_gloidx_t gtreeid); ``` """ function t8_geometry_get_type(cmesh, gtreeid) - @ccall libt8.t8_geometry_get_type(cmesh::t8_cmesh_t, gtreeid::t8_gloidx_t)::t8_geometry_type_t + @ccall libt8.t8_geometry_get_type(cmesh::t8_cmesh_t, + gtreeid::t8_gloidx_t)::t8_geometry_type_t end """ @@ -5588,7 +5791,8 @@ int t8_geometry_tree_negative_volume (const t8_cmesh_t cmesh, const t8_gloidx_t ``` """ function t8_geometry_tree_negative_volume(cmesh, gtreeid) - @ccall libt8.t8_geometry_tree_negative_volume(cmesh::t8_cmesh_t, gtreeid::t8_gloidx_t)::Cint + @ccall libt8.t8_geometry_tree_negative_volume(cmesh::t8_cmesh_t, + gtreeid::t8_gloidx_t)::Cint end mutable struct t8_ctree end @@ -5756,8 +5960,11 @@ t8\\_cmesh\\_set\\_partition\\_offset, [`t8_cmesh_set_partition_uniform`](@ref) void t8_cmesh_set_partition_range (t8_cmesh_t cmesh, int set_face_knowledge, t8_gloidx_t first_local_tree, t8_gloidx_t last_local_tree); ``` """ -function t8_cmesh_set_partition_range(cmesh, set_face_knowledge, first_local_tree, last_local_tree) - @ccall libt8.t8_cmesh_set_partition_range(cmesh::t8_cmesh_t, set_face_knowledge::Cint, first_local_tree::t8_gloidx_t, last_local_tree::t8_gloidx_t)::Cvoid +function t8_cmesh_set_partition_range(cmesh, set_face_knowledge, first_local_tree, + last_local_tree) + @ccall libt8.t8_cmesh_set_partition_range(cmesh::t8_cmesh_t, set_face_knowledge::Cint, + first_local_tree::t8_gloidx_t, + last_local_tree::t8_gloidx_t)::Cvoid end """ @@ -5774,7 +5981,8 @@ void t8_cmesh_set_partition_offsets (t8_cmesh_t cmesh, t8_shmem_array_t tree_off ``` """ function t8_cmesh_set_partition_offsets(cmesh, tree_offsets) - @ccall libt8.t8_cmesh_set_partition_offsets(cmesh::t8_cmesh_t, tree_offsets::t8_shmem_array_t)::Cvoid + @ccall libt8.t8_cmesh_set_partition_offsets(cmesh::t8_cmesh_t, + tree_offsets::t8_shmem_array_t)::Cvoid end """ @@ -5792,7 +6000,8 @@ void t8_cmesh_set_partition_uniform (t8_cmesh_t cmesh, const int element_level, ``` """ function t8_cmesh_set_partition_uniform(cmesh, element_level, scheme) - @ccall libt8.t8_cmesh_set_partition_uniform(cmesh::t8_cmesh_t, element_level::Cint, scheme::Ptr{t8_scheme_c})::Cvoid + @ccall libt8.t8_cmesh_set_partition_uniform(cmesh::t8_cmesh_t, element_level::Cint, + scheme::Ptr{t8_scheme_c})::Cvoid end """ @@ -5806,7 +6015,8 @@ void t8_cmesh_set_refine (t8_cmesh_t cmesh, const int level, const t8_scheme_c * ``` """ function t8_cmesh_set_refine(cmesh, level, scheme) - @ccall libt8.t8_cmesh_set_refine(cmesh::t8_cmesh_t, level::Cint, scheme::Ptr{t8_scheme_c})::Cvoid + @ccall libt8.t8_cmesh_set_refine(cmesh::t8_cmesh_t, level::Cint, + scheme::Ptr{t8_scheme_c})::Cvoid end """ @@ -5841,7 +6051,8 @@ void t8_cmesh_set_tree_class (t8_cmesh_t cmesh, t8_gloidx_t gtree_id, t8_eclass_ ``` """ function t8_cmesh_set_tree_class(cmesh, gtree_id, tree_class) - @ccall libt8.t8_cmesh_set_tree_class(cmesh::t8_cmesh_t, gtree_id::t8_gloidx_t, tree_class::t8_eclass_t)::Cvoid + @ccall libt8.t8_cmesh_set_tree_class(cmesh::t8_cmesh_t, gtree_id::t8_gloidx_t, + tree_class::t8_eclass_t)::Cvoid end """ @@ -5869,8 +6080,11 @@ Store an attribute at a tree in a cmesh. Attributes can be arbitrary data that i void t8_cmesh_set_attribute (t8_cmesh_t cmesh, t8_gloidx_t gtree_id, int package_id, int key, void *data, size_t data_size, int data_persists); ``` """ -function t8_cmesh_set_attribute(cmesh, gtree_id, package_id, key, data, data_size, data_persists) - @ccall libt8.t8_cmesh_set_attribute(cmesh::t8_cmesh_t, gtree_id::t8_gloidx_t, package_id::Cint, key::Cint, data::Ptr{Cvoid}, data_size::Csize_t, data_persists::Cint)::Cvoid +function t8_cmesh_set_attribute(cmesh, gtree_id, package_id, key, data, data_size, + data_persists) + @ccall libt8.t8_cmesh_set_attribute(cmesh::t8_cmesh_t, gtree_id::t8_gloidx_t, + package_id::Cint, key::Cint, data::Ptr{Cvoid}, + data_size::Csize_t, data_persists::Cint)::Cvoid end """ @@ -5901,7 +6115,9 @@ void t8_cmesh_set_attribute_string (t8_cmesh_t cmesh, t8_gloidx_t gtree_id, int ``` """ function t8_cmesh_set_attribute_string(cmesh, gtree_id, package_id, key, string) - @ccall libt8.t8_cmesh_set_attribute_string(cmesh::t8_cmesh_t, gtree_id::t8_gloidx_t, package_id::Cint, key::Cint, string::Cstring)::Cvoid + @ccall libt8.t8_cmesh_set_attribute_string(cmesh::t8_cmesh_t, gtree_id::t8_gloidx_t, + package_id::Cint, key::Cint, + string::Cstring)::Cvoid end """ @@ -5937,8 +6153,14 @@ Store an array of [`t8_gloidx_t`](@ref) as an attribute at a tree in a cmesh. void t8_cmesh_set_attribute_gloidx_array (t8_cmesh_t cmesh, t8_gloidx_t gtree_id, int package_id, int key, const t8_gloidx_t *data, const size_t data_count, int data_persists); ``` """ -function t8_cmesh_set_attribute_gloidx_array(cmesh, gtree_id, package_id, key, data, data_count, data_persists) - @ccall libt8.t8_cmesh_set_attribute_gloidx_array(cmesh::t8_cmesh_t, gtree_id::t8_gloidx_t, package_id::Cint, key::Cint, data::Ptr{t8_gloidx_t}, data_count::Csize_t, data_persists::Cint)::Cvoid +function t8_cmesh_set_attribute_gloidx_array(cmesh, gtree_id, package_id, key, data, + data_count, data_persists) + @ccall libt8.t8_cmesh_set_attribute_gloidx_array(cmesh::t8_cmesh_t, + gtree_id::t8_gloidx_t, + package_id::Cint, key::Cint, + data::Ptr{t8_gloidx_t}, + data_count::Csize_t, + data_persists::Cint)::Cvoid end """ @@ -5963,7 +6185,9 @@ void t8_cmesh_set_join (t8_cmesh_t cmesh, t8_gloidx_t gtree1, t8_gloidx_t gtree2 ``` """ function t8_cmesh_set_join(cmesh, gtree1, gtree2, face1, face2, orientation) - @ccall libt8.t8_cmesh_set_join(cmesh::t8_cmesh_t, gtree1::t8_gloidx_t, gtree2::t8_gloidx_t, face1::Cint, face2::Cint, orientation::Cint)::Cvoid + @ccall libt8.t8_cmesh_set_join(cmesh::t8_cmesh_t, gtree1::t8_gloidx_t, + gtree2::t8_gloidx_t, face1::Cint, face2::Cint, + orientation::Cint)::Cvoid end """ @@ -6034,7 +6258,8 @@ t8_cmesh_t t8_cmesh_bcast (t8_cmesh_t cmesh_in, int root, sc_MPI_Comm comm); ``` """ function t8_cmesh_bcast(cmesh_in, root, comm) - @ccall libt8.t8_cmesh_bcast(cmesh_in::t8_cmesh_t, root::Cint, comm::MPI_Comm)::t8_cmesh_t + @ccall libt8.t8_cmesh_bcast(cmesh_in::t8_cmesh_t, root::Cint, + comm::MPI_Comm)::t8_cmesh_t end """ @@ -6049,7 +6274,7 @@ If no geometry is registered and cmesh is modified from another cmesh then the o If you need to use t8_cmesh_bcast, then all geometries must be registered *after* the bcast operation, not before. # Arguments -* `cmesh`:\\[in,out\\] The cmesh. +* `cmesh`:\\[in,out\\] The cmesh. Must be initialized but not committed. * `geometry`:\\[in\\] The geometry to register. ### Prototype ```c @@ -6057,7 +6282,8 @@ void t8_cmesh_register_geometry (t8_cmesh_t cmesh, t8_geometry_c *geometry); ``` """ function t8_cmesh_register_geometry(cmesh, geometry) - @ccall libt8.t8_cmesh_register_geometry(cmesh::t8_cmesh_t, geometry::Ptr{t8_geometry_c})::Cvoid + @ccall libt8.t8_cmesh_register_geometry(cmesh::t8_cmesh_t, + geometry::Ptr{t8_geometry_c})::Cvoid end """ @@ -6075,7 +6301,8 @@ void t8_cmesh_set_tree_geometry (t8_cmesh_t cmesh, t8_gloidx_t gtreeid, const t8 ``` """ function t8_cmesh_set_tree_geometry(cmesh, gtreeid, geom) - @ccall libt8.t8_cmesh_set_tree_geometry(cmesh::t8_cmesh_t, gtreeid::t8_gloidx_t, geom::Ptr{t8_geometry_c})::Cvoid + @ccall libt8.t8_cmesh_set_tree_geometry(cmesh::t8_cmesh_t, gtreeid::t8_gloidx_t, + geom::Ptr{t8_geometry_c})::Cvoid end """ @@ -6136,7 +6363,9 @@ t8_cmesh_t t8_cmesh_load_and_distribute (const char *fileprefix, int num_files, ``` """ function t8_cmesh_load_and_distribute(fileprefix, num_files, comm, mode, procs_per_node) - @ccall libt8.t8_cmesh_load_and_distribute(fileprefix::Cstring, num_files::Cint, comm::MPI_Comm, mode::t8_load_mode_t, procs_per_node::Cint)::t8_cmesh_t + @ccall libt8.t8_cmesh_load_and_distribute(fileprefix::Cstring, num_files::Cint, + comm::MPI_Comm, mode::t8_load_mode_t, + procs_per_node::Cint)::t8_cmesh_t end """ @@ -6273,7 +6502,8 @@ const t8_geometry_c * t8_cmesh_get_tree_geometry (t8_cmesh_t cmesh, t8_gloidx_t ``` """ function t8_cmesh_get_tree_geometry(cmesh, gtreeid) - @ccall libt8.t8_cmesh_get_tree_geometry(cmesh::t8_cmesh_t, gtreeid::t8_gloidx_t)::Ptr{t8_geometry_c} + @ccall libt8.t8_cmesh_get_tree_geometry(cmesh::t8_cmesh_t, + gtreeid::t8_gloidx_t)::Ptr{t8_geometry_c} end """ @@ -6292,7 +6522,8 @@ int t8_cmesh_treeid_is_local_tree (const t8_cmesh_t cmesh, const t8_locidx_t ltr ``` """ function t8_cmesh_treeid_is_local_tree(cmesh, ltreeid) - @ccall libt8.t8_cmesh_treeid_is_local_tree(cmesh::t8_cmesh_t, ltreeid::t8_locidx_t)::Cint + @ccall libt8.t8_cmesh_treeid_is_local_tree(cmesh::t8_cmesh_t, + ltreeid::t8_locidx_t)::Cint end """ @@ -6330,7 +6561,8 @@ t8_locidx_t t8_cmesh_ltreeid_to_ghostid (const t8_cmesh_t cmesh, const t8_locidx ``` """ function t8_cmesh_ltreeid_to_ghostid(cmesh, ltreeid) - @ccall libt8.t8_cmesh_ltreeid_to_ghostid(cmesh::t8_cmesh_t, ltreeid::t8_locidx_t)::t8_locidx_t + @ccall libt8.t8_cmesh_ltreeid_to_ghostid(cmesh::t8_cmesh_t, + ltreeid::t8_locidx_t)::t8_locidx_t end """ @@ -6405,7 +6637,8 @@ t8_eclass_t t8_cmesh_get_tree_class (t8_cmesh_t cmesh, t8_locidx_t ltree_id); ``` """ function t8_cmesh_get_tree_class(cmesh, ltree_id) - @ccall libt8.t8_cmesh_get_tree_class(cmesh::t8_cmesh_t, ltree_id::t8_locidx_t)::t8_eclass_t + @ccall libt8.t8_cmesh_get_tree_class(cmesh::t8_cmesh_t, + ltree_id::t8_locidx_t)::t8_eclass_t end """ @@ -6425,7 +6658,8 @@ int t8_cmesh_tree_face_is_boundary (t8_cmesh_t cmesh, t8_locidx_t ltree_id, int ``` """ function t8_cmesh_tree_face_is_boundary(cmesh, ltree_id, face) - @ccall libt8.t8_cmesh_tree_face_is_boundary(cmesh::t8_cmesh_t, ltree_id::t8_locidx_t, face::Cint)::Cint + @ccall libt8.t8_cmesh_tree_face_is_boundary(cmesh::t8_cmesh_t, ltree_id::t8_locidx_t, + face::Cint)::Cint end """ @@ -6444,7 +6678,8 @@ t8_eclass_t t8_cmesh_get_ghost_class (t8_cmesh_t cmesh, t8_locidx_t lghost_id); ``` """ function t8_cmesh_get_ghost_class(cmesh, lghost_id) - @ccall libt8.t8_cmesh_get_ghost_class(cmesh::t8_cmesh_t, lghost_id::t8_locidx_t)::t8_eclass_t + @ccall libt8.t8_cmesh_get_ghost_class(cmesh::t8_cmesh_t, + lghost_id::t8_locidx_t)::t8_eclass_t end """ @@ -6466,7 +6701,8 @@ t8_gloidx_t t8_cmesh_get_global_id (t8_cmesh_t cmesh, t8_locidx_t local_id); ``` """ function t8_cmesh_get_global_id(cmesh, local_id) - @ccall libt8.t8_cmesh_get_global_id(cmesh::t8_cmesh_t, local_id::t8_locidx_t)::t8_gloidx_t + @ccall libt8.t8_cmesh_get_global_id(cmesh::t8_cmesh_t, + local_id::t8_locidx_t)::t8_gloidx_t end """ @@ -6488,7 +6724,8 @@ t8_locidx_t t8_cmesh_get_local_id (t8_cmesh_t cmesh, t8_gloidx_t global_id); ``` """ function t8_cmesh_get_local_id(cmesh, global_id) - @ccall libt8.t8_cmesh_get_local_id(cmesh::t8_cmesh_t, global_id::t8_gloidx_t)::t8_locidx_t + @ccall libt8.t8_cmesh_get_local_id(cmesh::t8_cmesh_t, + global_id::t8_gloidx_t)::t8_locidx_t end """ @@ -6517,7 +6754,9 @@ t8_locidx_t t8_cmesh_get_face_neighbor (const t8_cmesh_t cmesh, const t8_locidx_ ``` """ function t8_cmesh_get_face_neighbor(cmesh, ltreeid, face, dual_face, orientation) - @ccall libt8.t8_cmesh_get_face_neighbor(cmesh::t8_cmesh_t, ltreeid::t8_locidx_t, face::Cint, dual_face::Ptr{Cint}, orientation::Ptr{Cint})::t8_locidx_t + @ccall libt8.t8_cmesh_get_face_neighbor(cmesh::t8_cmesh_t, ltreeid::t8_locidx_t, + face::Cint, dual_face::Ptr{Cint}, + orientation::Ptr{Cint})::t8_locidx_t end """ @@ -6537,7 +6776,9 @@ t8_eclass_t t8_cmesh_get_tree_face_neighbor_eclass (const t8_cmesh_t cmesh, cons ``` """ function t8_cmesh_get_tree_face_neighbor_eclass(cmesh, ltreeid, face) - @ccall libt8.t8_cmesh_get_tree_face_neighbor_eclass(cmesh::t8_cmesh_t, ltreeid::t8_locidx_t, face::Cint)::t8_eclass_t + @ccall libt8.t8_cmesh_get_tree_face_neighbor_eclass(cmesh::t8_cmesh_t, + ltreeid::t8_locidx_t, + face::Cint)::t8_eclass_t end """ @@ -6577,7 +6818,8 @@ double * t8_cmesh_get_tree_vertices (t8_cmesh_t cmesh, t8_locidx_t ltreeid); ``` """ function t8_cmesh_get_tree_vertices(cmesh, ltreeid) - @ccall libt8.t8_cmesh_get_tree_vertices(cmesh::t8_cmesh_t, ltreeid::t8_locidx_t)::Ptr{Cdouble} + @ccall libt8.t8_cmesh_get_tree_vertices(cmesh::t8_cmesh_t, + ltreeid::t8_locidx_t)::Ptr{Cdouble} end """ @@ -6605,7 +6847,8 @@ void * t8_cmesh_get_attribute (const t8_cmesh_t cmesh, const int package_id, con ``` """ function t8_cmesh_get_attribute(cmesh, package_id, key, ltree_id) - @ccall libt8.t8_cmesh_get_attribute(cmesh::t8_cmesh_t, package_id::Cint, key::Cint, ltree_id::t8_locidx_t)::Ptr{Cvoid} + @ccall libt8.t8_cmesh_get_attribute(cmesh::t8_cmesh_t, package_id::Cint, key::Cint, + ltree_id::t8_locidx_t)::Ptr{Cvoid} end """ @@ -6638,7 +6881,9 @@ t8_gloidx_t * t8_cmesh_get_attribute_gloidx_array (const t8_cmesh_t cmesh, const ``` """ function t8_cmesh_get_attribute_gloidx_array(cmesh, package_id, key, ltree_id, data_count) - @ccall libt8.t8_cmesh_get_attribute_gloidx_array(cmesh::t8_cmesh_t, package_id::Cint, key::Cint, ltree_id::t8_locidx_t, data_count::Csize_t)::Ptr{t8_gloidx_t} + @ccall libt8.t8_cmesh_get_attribute_gloidx_array(cmesh::t8_cmesh_t, package_id::Cint, + key::Cint, ltree_id::t8_locidx_t, + data_count::Csize_t)::Ptr{t8_gloidx_t} end """ @@ -6678,8 +6923,17 @@ Calculate the section of a uniform forest for the current rank. void t8_cmesh_uniform_bounds_equal_element_count (t8_cmesh_t cmesh, const int level, const t8_scheme_c *tree_scheme, t8_gloidx_t *first_local_tree, t8_gloidx_t *child_in_tree_begin, t8_gloidx_t *last_local_tree, t8_gloidx_t *child_in_tree_end, int8_t *first_tree_shared); ``` """ -function t8_cmesh_uniform_bounds_equal_element_count(cmesh, level, tree_scheme, first_local_tree, child_in_tree_begin, last_local_tree, child_in_tree_end, first_tree_shared) - @ccall libt8.t8_cmesh_uniform_bounds_equal_element_count(cmesh::t8_cmesh_t, level::Cint, tree_scheme::Ptr{t8_scheme_c}, first_local_tree::Ptr{t8_gloidx_t}, child_in_tree_begin::Ptr{t8_gloidx_t}, last_local_tree::Ptr{t8_gloidx_t}, child_in_tree_end::Ptr{t8_gloidx_t}, first_tree_shared::Ptr{Int8})::Cvoid +function t8_cmesh_uniform_bounds_equal_element_count(cmesh, level, tree_scheme, + first_local_tree, child_in_tree_begin, + last_local_tree, child_in_tree_end, + first_tree_shared) + @ccall libt8.t8_cmesh_uniform_bounds_equal_element_count(cmesh::t8_cmesh_t, level::Cint, + tree_scheme::Ptr{t8_scheme_c}, + first_local_tree::Ptr{t8_gloidx_t}, + child_in_tree_begin::Ptr{t8_gloidx_t}, + last_local_tree::Ptr{t8_gloidx_t}, + child_in_tree_end::Ptr{t8_gloidx_t}, + first_tree_shared::Ptr{Int8})::Cvoid end """ @@ -6690,8 +6944,21 @@ end void t8_cmesh_uniform_bounds_for_irregular_refinement (const t8_cmesh_t cmesh, const int level, const t8_scheme_c *scheme, t8_gloidx_t *first_local_tree, t8_gloidx_t *child_in_tree_begin, t8_gloidx_t *last_local_tree, t8_gloidx_t *child_in_tree_end, int8_t *first_tree_shared, sc_MPI_Comm comm); ``` """ -function t8_cmesh_uniform_bounds_for_irregular_refinement(cmesh, level, scheme, first_local_tree, child_in_tree_begin, last_local_tree, child_in_tree_end, first_tree_shared, comm) - @ccall libt8.t8_cmesh_uniform_bounds_for_irregular_refinement(cmesh::t8_cmesh_t, level::Cint, scheme::Ptr{t8_scheme_c}, first_local_tree::Ptr{t8_gloidx_t}, child_in_tree_begin::Ptr{t8_gloidx_t}, last_local_tree::Ptr{t8_gloidx_t}, child_in_tree_end::Ptr{t8_gloidx_t}, first_tree_shared::Ptr{Int8}, comm::MPI_Comm)::Cvoid +function t8_cmesh_uniform_bounds_for_irregular_refinement(cmesh, level, scheme, + first_local_tree, + child_in_tree_begin, + last_local_tree, + child_in_tree_end, + first_tree_shared, comm) + @ccall libt8.t8_cmesh_uniform_bounds_for_irregular_refinement(cmesh::t8_cmesh_t, + level::Cint, + scheme::Ptr{t8_scheme_c}, + first_local_tree::Ptr{t8_gloidx_t}, + child_in_tree_begin::Ptr{t8_gloidx_t}, + last_local_tree::Ptr{t8_gloidx_t}, + child_in_tree_end::Ptr{t8_gloidx_t}, + first_tree_shared::Ptr{Int8}, + comm::MPI_Comm)::Cvoid end """ @@ -6759,7 +7026,9 @@ void t8_cmesh_coords_axb (const double *coords_in, double *coords_out, int num_v ``` """ function t8_cmesh_coords_axb(coords_in, coords_out, num_vertices, alpha, b) - @ccall libt8.t8_cmesh_coords_axb(coords_in::Ptr{Cdouble}, coords_out::Ptr{Cdouble}, num_vertices::Cint, alpha::Cdouble, b::Ptr{Cdouble})::Cvoid + @ccall libt8.t8_cmesh_coords_axb(coords_in::Ptr{Cdouble}, coords_out::Ptr{Cdouble}, + num_vertices::Cint, alpha::Cdouble, + b::Ptr{Cdouble})::Cvoid end """ @@ -6778,7 +7047,10 @@ void t8_cmesh_translate_coordinates (const double *coords_in, double *coords_out ``` """ function t8_cmesh_translate_coordinates(coords_in, coords_out, num_vertices, translate) - @ccall libt8.t8_cmesh_translate_coordinates(coords_in::Ptr{Cdouble}, coords_out::Ptr{Cdouble}, num_vertices::Cint, translate::Ptr{Cdouble})::Cvoid + @ccall libt8.t8_cmesh_translate_coordinates(coords_in::Ptr{Cdouble}, + coords_out::Ptr{Cdouble}, + num_vertices::Cint, + translate::Ptr{Cdouble})::Cvoid end """ @@ -6791,8 +7063,12 @@ TODO: Add proper documentation void t8_cmesh_new_translate_vertices_to_attributes (const t8_locidx_t *tvertices, const double *vertices, double *attr_vertices, const int num_vertices); ``` """ -function t8_cmesh_new_translate_vertices_to_attributes(tvertices, vertices, attr_vertices, num_vertices) - @ccall libt8.t8_cmesh_new_translate_vertices_to_attributes(tvertices::Ptr{t8_locidx_t}, vertices::Ptr{Cdouble}, attr_vertices::Ptr{Cdouble}, num_vertices::Cint)::Cvoid +function t8_cmesh_new_translate_vertices_to_attributes(tvertices, vertices, attr_vertices, + num_vertices) + @ccall libt8.t8_cmesh_new_translate_vertices_to_attributes(tvertices::Ptr{t8_locidx_t}, + vertices::Ptr{Cdouble}, + attr_vertices::Ptr{Cdouble}, + num_vertices::Cint)::Cvoid end """ @@ -6823,9 +7099,124 @@ int t8_cmesh_get_local_bounding_box (const t8_cmesh_t cmesh, double bounds[6]); ``` """ function t8_cmesh_get_local_bounding_box(cmesh, bounds) - @ccall libt8.t8_cmesh_get_local_bounding_box(cmesh::t8_cmesh_t, bounds::Ptr{Cdouble})::Cint + @ccall libt8.t8_cmesh_get_local_bounding_box(cmesh::t8_cmesh_t, + bounds::Ptr{Cdouble})::Cint +end + +mutable struct t8_cmesh_boundary_condition_handler end + +"""This typedef is used for the opaque pointers to the handler. We need it so that we can use [`t8_cmesh_boundary_condition_handler_c`](@ref) pointers in .c files without them seeing the actual C++ code (and then not compiling). We have one cpp version with the correct namespace and one c version pointing to nothing. TODO: Delete this when the cmesh is a proper cpp class.""" +const t8_cmesh_boundary_condition_handler_c = t8_cmesh_boundary_condition_handler + +""" + t8_cmesh_set_boundary_conditions(cmesh, gtreeid, boundary_conditions, length) + +Applies boundary conditions to the faces of a cmesh cell. + +# Arguments +* `cmesh`:\\[in\\] The cmesh. +* `gtreeid`:\\[in\\] The global id of the tree the boundary conditions should be set for. +* `boundary_conditions`:\\[in\\] The boundary conditions to set. +* `length`:\\[in\\] The length of *boundary_conditions*. Container must have the same length as the eclass of the cell has faces. +### Prototype +```c +void t8_cmesh_set_boundary_conditions (t8_cmesh_t cmesh, t8_gloidx_t gtreeid, const char *boundary_conditions[], size_t length); +``` +""" +function t8_cmesh_set_boundary_conditions(cmesh, gtreeid, boundary_conditions, length) + @ccall libt8.t8_cmesh_set_boundary_conditions(cmesh::t8_cmesh_t, gtreeid::t8_gloidx_t, + boundary_conditions::Ptr{Cstring}, + length::Csize_t)::Cvoid +end + +""" + t8_cmesh_get_boundary_conditions(cmesh, ltreeid, boundary_conditions, length) + +Retrieves the boundary conditions of a cmesh cell. + +!!! note + + The cmesh local cell id is a different one as the tree id inside the forest. + +# Arguments +* `cmesh`:\\[in\\] The cmesh the cell lives in. +* `ltreeid`:\\[in\\] The local cmesh id of the cell. +* `boundary_conditions`:\\[out\\] The boundary conditions of the faces. +* `length`:\\[out\\] The length of *boundary_conditions*. +### Prototype +```c +void t8_cmesh_get_boundary_conditions (t8_cmesh_t cmesh, t8_locidx_t ltreeid, const char *boundary_conditions[T8_ECLASS_MAX_FACES], size_t *length); +``` +""" +function t8_cmesh_get_boundary_conditions(cmesh, ltreeid, boundary_conditions, length) + @ccall libt8.t8_cmesh_get_boundary_conditions(cmesh::t8_cmesh_t, ltreeid::t8_locidx_t, + boundary_conditions::Ptr{Cstring}, + length::Ptr{Csize_t})::Cvoid +end + +""" + t8_cmesh_get_boundary_condition(cmesh, ltreeid, face, boundary_condition) + +Retrieves the boundary condition of one face of a cmesh cell. Retrieving all boundary conditions at once via t8_cmesh_get_boundary_conditions() will be faster. + +!!! note + + The cmesh local cell id is a different one as the tree id inside the forest. + +# Arguments +* `cmesh`:\\[in\\] The cmesh the cell lives in. +* `ltreeid`:\\[in\\] The local cmesh id of the cell. +* `face`:\\[in\\] The face id of the cell. +* `boundary_condition`:\\[out\\] The boundary condition of the tree face. +### Prototype +```c +void t8_cmesh_get_boundary_condition (t8_cmesh_t cmesh, t8_locidx_t ltreeid, int face, const char **boundary_condition); +``` +""" +function t8_cmesh_get_boundary_condition(cmesh, ltreeid, face, boundary_condition) + @ccall libt8.t8_cmesh_get_boundary_condition(cmesh::t8_cmesh_t, ltreeid::t8_locidx_t, + face::Cint, + boundary_condition::Ptr{Cstring})::Cvoid +end + +""" + sc_io_read(mpifile, ptr, zcount, t, errmsg) + +### Prototype +```c +void sc_io_read (sc_MPI_File mpifile, void *ptr, size_t zcount, sc_MPI_Datatype t, const char *errmsg); +``` +""" +function sc_io_read(mpifile, ptr, zcount, t, errmsg) + @ccall libsc.sc_io_read(mpifile::MPI_File, ptr::Ptr{Cvoid}, zcount::Csize_t, t::Cint, + errmsg::Cstring)::Cvoid +end + +""" + sc_io_write(mpifile, ptr, zcount, t, errmsg) + +### Prototype +```c +void sc_io_write (sc_MPI_File mpifile, const void *ptr, size_t zcount, sc_MPI_Datatype t, const char *errmsg); +``` +""" +function sc_io_write(mpifile, ptr, zcount, t, errmsg) + @ccall libsc.sc_io_write(mpifile::MPI_File, ptr::Ptr{Cvoid}, zcount::Csize_t, t::Cint, + errmsg::Cstring)::Cvoid end +"""Typedef for quadrant coordinates.""" +const p4est_qcoord_t = Int32 + +"""Typedef for counting topological entities (trees, tree vertices).""" +const p4est_topidx_t = Int32 + +"""Typedef for processor-local indexing of quadrants and nodes.""" +const p4est_locidx_t = Int32 + +"""Typedef for globally unique indexing of quadrants.""" +const p4est_gloidx_t = Int64 + """ sc_io_error_t @@ -6979,8 +7370,9 @@ end # automatic type deduction for variadic arguments may not be what you want, please use with caution @generated function sc_io_sink_new(iotype, iomode, ioencode, va_list...) - :(@ccall(libsc.sc_io_sink_new(iotype::Cint, iomode::Cint, ioencode::Cint; $(to_c_type_pairs(va_list)...))::Ptr{sc_io_sink_t})) - end + :(@ccall(libsc.sc_io_sink_new(iotype::Cint, iomode::Cint, ioencode::Cint; + $(to_c_type_pairs(va_list)...))::Ptr{sc_io_sink_t})) +end """ sc_io_sink_destroy(sink) @@ -7035,7 +7427,8 @@ int sc_io_sink_write (sc_io_sink_t * sink, const void *data, size_t bytes_avail) ``` """ function sc_io_sink_write(sink, data, bytes_avail) - @ccall libsc.sc_io_sink_write(sink::Ptr{sc_io_sink_t}, data::Ptr{Cvoid}, bytes_avail::Csize_t)::Cint + @ccall libsc.sc_io_sink_write(sink::Ptr{sc_io_sink_t}, data::Ptr{Cvoid}, + bytes_avail::Csize_t)::Cint end """ @@ -7055,7 +7448,8 @@ int sc_io_sink_complete (sc_io_sink_t * sink, size_t *bytes_in, size_t *bytes_ou ``` """ function sc_io_sink_complete(sink, bytes_in, bytes_out) - @ccall libsc.sc_io_sink_complete(sink::Ptr{sc_io_sink_t}, bytes_in::Ptr{Csize_t}, bytes_out::Ptr{Csize_t})::Cint + @ccall libsc.sc_io_sink_complete(sink::Ptr{sc_io_sink_t}, bytes_in::Ptr{Csize_t}, + bytes_out::Ptr{Csize_t})::Cint end """ @@ -7079,8 +7473,9 @@ end # automatic type deduction for variadic arguments may not be what you want, please use with caution @generated function sc_io_source_new(iotype, ioencode, va_list...) - :(@ccall(libsc.sc_io_source_new(iotype::Cint, ioencode::Cint; $(to_c_type_pairs(va_list)...))::Ptr{sc_io_source_t})) - end + :(@ccall(libsc.sc_io_source_new(iotype::Cint, ioencode::Cint; + $(to_c_type_pairs(va_list)...))::Ptr{sc_io_source_t})) +end """ sc_io_source_destroy(source) @@ -7136,7 +7531,8 @@ int sc_io_source_read (sc_io_source_t * source, void *data, size_t bytes_avail, ``` """ function sc_io_source_read(source, data, bytes_avail, bytes_out) - @ccall libsc.sc_io_source_read(source::Ptr{sc_io_source_t}, data::Ptr{Cvoid}, bytes_avail::Csize_t, bytes_out::Ptr{Csize_t})::Cint + @ccall libsc.sc_io_source_read(source::Ptr{sc_io_source_t}, data::Ptr{Cvoid}, + bytes_avail::Csize_t, bytes_out::Ptr{Csize_t})::Cint end """ @@ -7156,7 +7552,8 @@ int sc_io_source_complete (sc_io_source_t * source, size_t *bytes_in, size_t *by ``` """ function sc_io_source_complete(source, bytes_in, bytes_out) - @ccall libsc.sc_io_source_complete(source::Ptr{sc_io_source_t}, bytes_in::Ptr{Csize_t}, bytes_out::Ptr{Csize_t})::Cint + @ccall libsc.sc_io_source_complete(source::Ptr{sc_io_source_t}, bytes_in::Ptr{Csize_t}, + bytes_out::Ptr{Csize_t})::Cint end """ @@ -7214,7 +7611,9 @@ int sc_io_source_read_mirror (sc_io_source_t * source, void *data, size_t bytes_ ``` """ function sc_io_source_read_mirror(source, data, bytes_avail, bytes_out) - @ccall libsc.sc_io_source_read_mirror(source::Ptr{sc_io_source_t}, data::Ptr{Cvoid}, bytes_avail::Csize_t, bytes_out::Ptr{Csize_t})::Cint + @ccall libsc.sc_io_source_read_mirror(source::Ptr{sc_io_source_t}, data::Ptr{Cvoid}, + bytes_avail::Csize_t, + bytes_out::Ptr{Csize_t})::Cint end """ @@ -7298,7 +7697,9 @@ void sc_io_encode_zlib (sc_array_t *data, sc_array_t *out, int zlib_compression_ ``` """ function sc_io_encode_zlib(data, out, zlib_compression_level, line_break_character) - @ccall libsc.sc_io_encode_zlib(data::Ptr{sc_array_t}, out::Ptr{sc_array_t}, zlib_compression_level::Cint, line_break_character::Cint)::Cvoid + @ccall libsc.sc_io_encode_zlib(data::Ptr{sc_array_t}, out::Ptr{sc_array_t}, + zlib_compression_level::Cint, + line_break_character::Cint)::Cvoid end """ @@ -7323,7 +7724,8 @@ int sc_io_decode_info (sc_array_t *data, size_t *original_size, char *format_cha ``` """ function sc_io_decode_info(data, original_size, format_char, re) - @ccall libsc.sc_io_decode_info(data::Ptr{sc_array_t}, original_size::Ptr{Csize_t}, format_char::Cstring, re::Ptr{Cvoid})::Cint + @ccall libsc.sc_io_decode_info(data::Ptr{sc_array_t}, original_size::Ptr{Csize_t}, + format_char::Cstring, re::Ptr{Cvoid})::Cint end """ @@ -7356,7 +7758,8 @@ int sc_io_decode (sc_array_t *data, sc_array_t *out, size_t max_original_size, v ``` """ function sc_io_decode(data, out, max_original_size, re) - @ccall libsc.sc_io_decode(data::Ptr{sc_array_t}, out::Ptr{sc_array_t}, max_original_size::Csize_t, re::Ptr{Cvoid})::Cint + @ccall libsc.sc_io_decode(data::Ptr{sc_array_t}, out::Ptr{sc_array_t}, + max_original_size::Csize_t, re::Ptr{Cvoid})::Cint end """ @@ -7376,7 +7779,8 @@ int sc_vtk_write_binary (FILE * vtkfile, char *numeric_data, size_t byte_length) ``` """ function sc_vtk_write_binary(vtkfile, numeric_data, byte_length) - @ccall libsc.sc_vtk_write_binary(vtkfile::Ptr{Libc.FILE}, numeric_data::Cstring, byte_length::Csize_t)::Cint + @ccall libsc.sc_vtk_write_binary(vtkfile::Ptr{Libc.FILE}, numeric_data::Cstring, + byte_length::Csize_t)::Cint end """ @@ -7396,7 +7800,8 @@ int sc_vtk_write_compressed (FILE * vtkfile, char *numeric_data, size_t byte_len ``` """ function sc_vtk_write_compressed(vtkfile, numeric_data, byte_length) - @ccall libsc.sc_vtk_write_compressed(vtkfile::Ptr{Libc.FILE}, numeric_data::Cstring, byte_length::Csize_t)::Cint + @ccall libsc.sc_vtk_write_compressed(vtkfile::Ptr{Libc.FILE}, numeric_data::Cstring, + byte_length::Csize_t)::Cint end """ @@ -7434,7 +7839,8 @@ void sc_fwrite (const void *ptr, size_t size, size_t nmemb, FILE * file, const c ``` """ function sc_fwrite(ptr, size, nmemb, file, errmsg) - @ccall libsc.sc_fwrite(ptr::Ptr{Cvoid}, size::Csize_t, nmemb::Csize_t, file::Ptr{Libc.FILE}, errmsg::Cstring)::Cvoid + @ccall libsc.sc_fwrite(ptr::Ptr{Cvoid}, size::Csize_t, nmemb::Csize_t, + file::Ptr{Libc.FILE}, errmsg::Cstring)::Cvoid end """ @@ -7458,7 +7864,8 @@ void sc_fread (void *ptr, size_t size, size_t nmemb, FILE * file, const char *er ``` """ function sc_fread(ptr, size, nmemb, file, errmsg) - @ccall libsc.sc_fread(ptr::Ptr{Cvoid}, size::Csize_t, nmemb::Csize_t, file::Ptr{Libc.FILE}, errmsg::Cstring)::Cvoid + @ccall libsc.sc_fread(ptr::Ptr{Cvoid}, size::Csize_t, nmemb::Csize_t, + file::Ptr{Libc.FILE}, errmsg::Cstring)::Cvoid end """ @@ -7486,7 +7893,8 @@ int sc_io_open (sc_MPI_Comm mpicomm, const char *filename, sc_io_open_mode_t amo ``` """ function sc_io_open(mpicomm, filename, amode, mpiinfo, mpifile) - @ccall libsc.sc_io_open(mpicomm::MPI_Comm, filename::Cstring, amode::sc_io_open_mode_t, mpiinfo::Cint, mpifile::Ptr{Cint})::Cint + @ccall libsc.sc_io_open(mpicomm::MPI_Comm, filename::Cstring, amode::sc_io_open_mode_t, + mpiinfo::Cint, mpifile::Ptr{Cint})::Cint end """ @@ -7498,7 +7906,8 @@ int sc_io_read_at (sc_MPI_File mpifile, sc_MPI_Offset offset, void *ptr, int cou ``` """ function sc_io_read_at(mpifile, offset, ptr, count, t, ocount) - @ccall libsc.sc_io_read_at(mpifile::MPI_File, offset::Cint, ptr::Ptr{Cvoid}, count::Cint, t::Cint, ocount::Ptr{Cint})::Cint + @ccall libsc.sc_io_read_at(mpifile::MPI_File, offset::Cint, ptr::Ptr{Cvoid}, + count::Cint, t::Cint, ocount::Ptr{Cint})::Cint end """ @@ -7510,7 +7919,8 @@ int sc_io_read_at_all (sc_MPI_File mpifile, sc_MPI_Offset offset, void *ptr, int ``` """ function sc_io_read_at_all(mpifile, offset, ptr, count, t, ocount) - @ccall libsc.sc_io_read_at_all(mpifile::MPI_File, offset::Cint, ptr::Ptr{Cvoid}, count::Cint, t::Cint, ocount::Ptr{Cint})::Cint + @ccall libsc.sc_io_read_at_all(mpifile::MPI_File, offset::Cint, ptr::Ptr{Cvoid}, + count::Cint, t::Cint, ocount::Ptr{Cint})::Cint end """ @@ -7522,7 +7932,8 @@ int sc_io_write_at (sc_MPI_File mpifile, sc_MPI_Offset offset, const void *ptr, ``` """ function sc_io_write_at(mpifile, offset, ptr, count, t, ocount) - @ccall libsc.sc_io_write_at(mpifile::MPI_File, offset::Cint, ptr::Ptr{Cvoid}, count::Cint, t::Cint, ocount::Ptr{Cint})::Cint + @ccall libsc.sc_io_write_at(mpifile::MPI_File, offset::Cint, ptr::Ptr{Cvoid}, + count::Cint, t::Cint, ocount::Ptr{Cint})::Cint end """ @@ -7534,7 +7945,8 @@ int sc_io_write_at_all (sc_MPI_File mpifile, sc_MPI_Offset offset, const void *p ``` """ function sc_io_write_at_all(mpifile, offset, ptr, count, t, ocount) - @ccall libsc.sc_io_write_at_all(mpifile::MPI_File, offset::Cint, ptr::Ptr{Cvoid}, count::Cint, t::Cint, ocount::Ptr{Cint})::Cint + @ccall libsc.sc_io_write_at_all(mpifile::MPI_File, offset::Cint, ptr::Ptr{Cvoid}, + count::Cint, t::Cint, ocount::Ptr{Cint})::Cint end """ @@ -7743,7 +8155,8 @@ static inline uint64_t p4est_partition_cut_uint64 (uint64_t global_num, int p, i ``` """ function p4est_partition_cut_uint64(global_num, p, num_procs) - @ccall libp4est.p4est_partition_cut_uint64(global_num::UInt64, p::Cint, num_procs::Cint)::UInt64 + @ccall libp4est.p4est_partition_cut_uint64(global_num::UInt64, p::Cint, + num_procs::Cint)::UInt64 end """ @@ -7755,7 +8168,8 @@ static inline p4est_gloidx_t p4est_partition_cut_gloidx (p4est_gloidx_t global_n ``` """ function p4est_partition_cut_gloidx(global_num, p, num_procs) - @ccall libp4est.p4est_partition_cut_gloidx(global_num::p4est_gloidx_t, p::Cint, num_procs::Cint)::p4est_gloidx_t + @ccall libp4est.p4est_partition_cut_gloidx(global_num::p4est_gloidx_t, p::Cint, + num_procs::Cint)::p4est_gloidx_t end """ @@ -8066,7 +8480,9 @@ void p4est_neighbor_transform_coordinates (const p4est_neighbor_transform_t * nt ``` """ function p4est_neighbor_transform_coordinates(nt, self_coords, neigh_coords) - @ccall libp4est.p4est_neighbor_transform_coordinates(nt::Ptr{p4est_neighbor_transform_t}, self_coords::Ptr{p4est_qcoord_t}, neigh_coords::Ptr{p4est_qcoord_t})::Cvoid + @ccall libp4est.p4est_neighbor_transform_coordinates(nt::Ptr{p4est_neighbor_transform_t}, + self_coords::Ptr{p4est_qcoord_t}, + neigh_coords::Ptr{p4est_qcoord_t})::Cvoid end """ @@ -8084,7 +8500,9 @@ void p4est_neighbor_transform_coordinates_reverse (const p4est_neighbor_transfor ``` """ function p4est_neighbor_transform_coordinates_reverse(nt, neigh_coords, self_coords) - @ccall libp4est.p4est_neighbor_transform_coordinates_reverse(nt::Ptr{p4est_neighbor_transform_t}, neigh_coords::Ptr{p4est_qcoord_t}, self_coords::Ptr{p4est_qcoord_t})::Cvoid + @ccall libp4est.p4est_neighbor_transform_coordinates_reverse(nt::Ptr{p4est_neighbor_transform_t}, + neigh_coords::Ptr{p4est_qcoord_t}, + self_coords::Ptr{p4est_qcoord_t})::Cvoid end """ @@ -8103,8 +8521,14 @@ Fill an array with the neighbor transforms based on a specific boundary type. Th void p4est_connectivity_get_neighbor_transforms (p4est_connectivity_t *conn, p4est_topidx_t tree_id, p4est_connect_type_t boundary_type, int boundary_index, sc_array_t *neighbor_transform_array); ``` """ -function p4est_connectivity_get_neighbor_transforms(conn, tree_id, boundary_type, boundary_index, neighbor_transform_array) - @ccall libp4est.p4est_connectivity_get_neighbor_transforms(conn::Ptr{p4est_connectivity_t}, tree_id::p4est_topidx_t, boundary_type::p4est_connect_type_t, boundary_index::Cint, neighbor_transform_array::Ptr{sc_array_t})::Cvoid +function p4est_connectivity_get_neighbor_transforms(conn, tree_id, boundary_type, + boundary_index, + neighbor_transform_array) + @ccall libp4est.p4est_connectivity_get_neighbor_transforms(conn::Ptr{p4est_connectivity_t}, + tree_id::p4est_topidx_t, + boundary_type::p4est_connect_type_t, + boundary_index::Cint, + neighbor_transform_array::Ptr{sc_array_t})::Cvoid end """ @@ -8127,8 +8551,13 @@ To uniquely identify a coordinate, this function identifies the lowest numbered void p4est_connectivity_coordinates_canonicalize (p4est_connectivity_t *conn, p4est_topidx_t treeid, const p4est_qcoord_t coords[], p4est_topidx_t *treeid_out, p4est_qcoord_t coords_out[]); ``` """ -function p4est_connectivity_coordinates_canonicalize(conn, treeid, coords, treeid_out, coords_out) - @ccall libp4est.p4est_connectivity_coordinates_canonicalize(conn::Ptr{p4est_connectivity_t}, treeid::p4est_topidx_t, coords::Ptr{p4est_qcoord_t}, treeid_out::Ptr{p4est_topidx_t}, coords_out::Ptr{p4est_qcoord_t})::Cvoid +function p4est_connectivity_coordinates_canonicalize(conn, treeid, coords, treeid_out, + coords_out) + @ccall libp4est.p4est_connectivity_coordinates_canonicalize(conn::Ptr{p4est_connectivity_t}, + treeid::p4est_topidx_t, + coords::Ptr{p4est_qcoord_t}, + treeid_out::Ptr{p4est_topidx_t}, + coords_out::Ptr{p4est_qcoord_t})::Cvoid end """ @@ -8149,7 +8578,8 @@ int p4est_connectivity_face_neighbor_face_corner (int fc, int f, int nf, int o); ``` """ function p4est_connectivity_face_neighbor_face_corner(fc, f, nf, o) - @ccall libp4est.p4est_connectivity_face_neighbor_face_corner(fc::Cint, f::Cint, nf::Cint, o::Cint)::Cint + @ccall libp4est.p4est_connectivity_face_neighbor_face_corner(fc::Cint, f::Cint, + nf::Cint, o::Cint)::Cint end """ @@ -8170,7 +8600,8 @@ int p4est_connectivity_face_neighbor_corner (int c, int f, int nf, int o); ``` """ function p4est_connectivity_face_neighbor_corner(c, f, nf, o) - @ccall libp4est.p4est_connectivity_face_neighbor_corner(c::Cint, f::Cint, nf::Cint, o::Cint)::Cint + @ccall libp4est.p4est_connectivity_face_neighbor_corner(c::Cint, f::Cint, nf::Cint, + o::Cint)::Cint end """ @@ -8191,7 +8622,10 @@ p4est_connectivity_t *p4est_connectivity_new (p4est_topidx_t num_vertices, p4est ``` """ function p4est_connectivity_new(num_vertices, num_trees, num_corners, num_ctt) - @ccall libp4est.p4est_connectivity_new(num_vertices::p4est_topidx_t, num_trees::p4est_topidx_t, num_corners::p4est_topidx_t, num_ctt::p4est_topidx_t)::Ptr{p4est_connectivity_t} + @ccall libp4est.p4est_connectivity_new(num_vertices::p4est_topidx_t, + num_trees::p4est_topidx_t, + num_corners::p4est_topidx_t, + num_ctt::p4est_topidx_t)::Ptr{p4est_connectivity_t} end """ @@ -8218,8 +8652,18 @@ The connectivity is checked for validity. p4est_connectivity_t *p4est_connectivity_new_copy (p4est_topidx_t num_vertices, p4est_topidx_t num_trees, p4est_topidx_t num_corners, const double *vertices, const p4est_topidx_t * ttv, const p4est_topidx_t * ttt, const int8_t * ttf, const p4est_topidx_t * ttc, const p4est_topidx_t * coff, const p4est_topidx_t * ctt, const int8_t * ctc); ``` """ -function p4est_connectivity_new_copy(num_vertices, num_trees, num_corners, vertices, ttv, ttt, ttf, ttc, coff, ctt, ctc) - @ccall libp4est.p4est_connectivity_new_copy(num_vertices::p4est_topidx_t, num_trees::p4est_topidx_t, num_corners::p4est_topidx_t, vertices::Ptr{Cdouble}, ttv::Ptr{p4est_topidx_t}, ttt::Ptr{p4est_topidx_t}, ttf::Ptr{Int8}, ttc::Ptr{p4est_topidx_t}, coff::Ptr{p4est_topidx_t}, ctt::Ptr{p4est_topidx_t}, ctc::Ptr{Int8})::Ptr{p4est_connectivity_t} +function p4est_connectivity_new_copy(num_vertices, num_trees, num_corners, vertices, ttv, + ttt, ttf, ttc, coff, ctt, ctc) + @ccall libp4est.p4est_connectivity_new_copy(num_vertices::p4est_topidx_t, + num_trees::p4est_topidx_t, + num_corners::p4est_topidx_t, + vertices::Ptr{Cdouble}, + ttv::Ptr{p4est_topidx_t}, + ttt::Ptr{p4est_topidx_t}, ttf::Ptr{Int8}, + ttc::Ptr{p4est_topidx_t}, + coff::Ptr{p4est_topidx_t}, + ctt::Ptr{p4est_topidx_t}, + ctc::Ptr{Int8})::Ptr{p4est_connectivity_t} end """ @@ -8238,7 +8682,8 @@ p4est_connectivity_t *p4est_connectivity_copy (p4est_connectivity_t *input, int ``` """ function p4est_connectivity_copy(input, copy_attr) - @ccall libp4est.p4est_connectivity_copy(input::Ptr{p4est_connectivity_t}, copy_attr::Cint)::Ptr{p4est_connectivity_t} + @ccall libp4est.p4est_connectivity_copy(input::Ptr{p4est_connectivity_t}, + copy_attr::Cint)::Ptr{p4est_connectivity_t} end """ @@ -8250,7 +8695,8 @@ p4est_connectivity_t *p4est_connectivity_bcast (p4est_connectivity_t * conn_in, ``` """ function p4est_connectivity_bcast(conn_in, root, comm) - @ccall libp4est.p4est_connectivity_bcast(conn_in::Ptr{p4est_connectivity_t}, root::Cint, comm::MPI_Comm)::Ptr{p4est_connectivity_t} + @ccall libp4est.p4est_connectivity_bcast(conn_in::Ptr{p4est_connectivity_t}, root::Cint, + comm::MPI_Comm)::Ptr{p4est_connectivity_t} end """ @@ -8276,7 +8722,8 @@ p4est_connectivity_shared_t *p4est_connectivity_share (p4est_connectivity_t * co ``` """ function p4est_connectivity_share(conn_in, root, comm) - @ccall libp4est.p4est_connectivity_share(conn_in::Ptr{p4est_connectivity_t}, root::Cint, comm::MPI_Comm)::Ptr{p4est_connectivity_shared_t} + @ccall libp4est.p4est_connectivity_share(conn_in::Ptr{p4est_connectivity_t}, root::Cint, + comm::MPI_Comm)::Ptr{p4est_connectivity_shared_t} end """ @@ -8288,7 +8735,9 @@ p4est_connectivity_shared_t * p4est_connectivity_mission (p4est_connectivity_t * ``` """ function p4est_connectivity_mission(conn_in, split_type, world_comm) - @ccall libp4est.p4est_connectivity_mission(conn_in::Ptr{p4est_connectivity_t}, split_type::Cint, world_comm::Cint)::Ptr{p4est_connectivity_shared_t} + @ccall libp4est.p4est_connectivity_mission(conn_in::Ptr{p4est_connectivity_t}, + split_type::Cint, + world_comm::Cint)::Ptr{p4est_connectivity_shared_t} end """ @@ -8321,7 +8770,8 @@ void p4est_connectivity_set_attr (p4est_connectivity_t * conn, size_t bytes_per_ ``` """ function p4est_connectivity_set_attr(conn, bytes_per_tree) - @ccall libp4est.p4est_connectivity_set_attr(conn::Ptr{p4est_connectivity_t}, bytes_per_tree::Csize_t)::Cvoid + @ccall libp4est.p4est_connectivity_set_attr(conn::Ptr{p4est_connectivity_t}, + bytes_per_tree::Csize_t)::Cvoid end """ @@ -8353,7 +8803,8 @@ int p4est_connectivity_is_equal (p4est_connectivity_t * conn1, p4est_connectivit ``` """ function p4est_connectivity_is_equal(conn1, conn2) - @ccall libp4est.p4est_connectivity_is_equal(conn1::Ptr{p4est_connectivity_t}, conn2::Ptr{p4est_connectivity_t})::Cint + @ccall libp4est.p4est_connectivity_is_equal(conn1::Ptr{p4est_connectivity_t}, + conn2::Ptr{p4est_connectivity_t})::Cint end """ @@ -8372,7 +8823,8 @@ int p4est_connectivity_sink (p4est_connectivity_t * conn, sc_io_sink_t * sink); ``` """ function p4est_connectivity_sink(conn, sink) - @ccall libp4est.p4est_connectivity_sink(conn::Ptr{p4est_connectivity_t}, sink::Ptr{sc_io_sink_t})::Cint + @ccall libp4est.p4est_connectivity_sink(conn::Ptr{p4est_connectivity_t}, + sink::Ptr{sc_io_sink_t})::Cint end """ @@ -8391,7 +8843,8 @@ sc_array_t *p4est_connectivity_deflate (p4est_connectivity_t * conn, p4est_conne ``` """ function p4est_connectivity_deflate(conn, code) - @ccall libp4est.p4est_connectivity_deflate(conn::Ptr{p4est_connectivity_t}, code::p4est_connectivity_encode_t)::Ptr{sc_array_t} + @ccall libp4est.p4est_connectivity_deflate(conn::Ptr{p4est_connectivity_t}, + code::p4est_connectivity_encode_t)::Ptr{sc_array_t} end """ @@ -8410,7 +8863,8 @@ int p4est_connectivity_save (const char *filename, p4est_connectivity_t * connec ``` """ function p4est_connectivity_save(filename, connectivity) - @ccall libp4est.p4est_connectivity_save(filename::Cstring, connectivity::Ptr{p4est_connectivity_t})::Cint + @ccall libp4est.p4est_connectivity_save(filename::Cstring, + connectivity::Ptr{p4est_connectivity_t})::Cint end """ @@ -8465,7 +8919,8 @@ p4est_connectivity_t *p4est_connectivity_load (const char *filename, size_t *byt ``` """ function p4est_connectivity_load(filename, bytes) - @ccall libp4est.p4est_connectivity_load(filename::Cstring, bytes::Ptr{Csize_t})::Ptr{p4est_connectivity_t} + @ccall libp4est.p4est_connectivity_load(filename::Cstring, + bytes::Ptr{Csize_t})::Ptr{p4est_connectivity_t} end """ @@ -8553,7 +9008,8 @@ p4est_connectivity_t *p4est_connectivity_new_twotrees (int l_face, int r_face, i ``` """ function p4est_connectivity_new_twotrees(l_face, r_face, orientation) - @ccall libp4est.p4est_connectivity_new_twotrees(l_face::Cint, r_face::Cint, orientation::Cint)::Ptr{p4est_connectivity_t} + @ccall libp4est.p4est_connectivity_new_twotrees(l_face::Cint, r_face::Cint, + orientation::Cint)::Ptr{p4est_connectivity_t} end """ @@ -8674,7 +9130,8 @@ p4est_connectivity_t *p4est_connectivity_new_disk (int periodic_a, int periodic_ ``` """ function p4est_connectivity_new_disk(periodic_a, periodic_b) - @ccall libp4est.p4est_connectivity_new_disk(periodic_a::Cint, periodic_b::Cint)::Ptr{p4est_connectivity_t} + @ccall libp4est.p4est_connectivity_new_disk(periodic_a::Cint, + periodic_b::Cint)::Ptr{p4est_connectivity_t} end """ @@ -8764,7 +9221,8 @@ p4est_connectivity_t *p4est_connectivity_new_brick (int mi, int ni, int periodic ``` """ function p4est_connectivity_new_brick(mi, ni, periodic_a, periodic_b) - @ccall libp4est.p4est_connectivity_new_brick(mi::Cint, ni::Cint, periodic_a::Cint, periodic_b::Cint)::Ptr{p4est_connectivity_t} + @ccall libp4est.p4est_connectivity_new_brick(mi::Cint, ni::Cint, periodic_a::Cint, + periodic_b::Cint)::Ptr{p4est_connectivity_t} end """ @@ -8801,7 +9259,8 @@ p4est_connectivity_t *p4est_connectivity_refine (p4est_connectivity_t * conn, in ``` """ function p4est_connectivity_refine(conn, num_per_dim) - @ccall libp4est.p4est_connectivity_refine(conn::Ptr{p4est_connectivity_t}, num_per_dim::Cint)::Ptr{p4est_connectivity_t} + @ccall libp4est.p4est_connectivity_refine(conn::Ptr{p4est_connectivity_t}, + num_per_dim::Cint)::Ptr{p4est_connectivity_t} end """ @@ -8819,7 +9278,8 @@ void p4est_expand_face_transform (int iface, int nface, int ftransform[]); ``` """ function p4est_expand_face_transform(iface, nface, ftransform) - @ccall libp4est.p4est_expand_face_transform(iface::Cint, nface::Cint, ftransform::Ptr{Cint})::Cvoid + @ccall libp4est.p4est_expand_face_transform(iface::Cint, nface::Cint, + ftransform::Ptr{Cint})::Cvoid end """ @@ -8843,7 +9303,9 @@ p4est_topidx_t p4est_find_face_transform (p4est_connectivity_t * connectivity, p ``` """ function p4est_find_face_transform(connectivity, itree, iface, ftransform) - @ccall libp4est.p4est_find_face_transform(connectivity::Ptr{p4est_connectivity_t}, itree::p4est_topidx_t, iface::Cint, ftransform::Ptr{Cint})::p4est_topidx_t + @ccall libp4est.p4est_find_face_transform(connectivity::Ptr{p4est_connectivity_t}, + itree::p4est_topidx_t, iface::Cint, + ftransform::Ptr{Cint})::p4est_topidx_t end """ @@ -8862,7 +9324,9 @@ void p4est_find_corner_transform (p4est_connectivity_t * connectivity, p4est_top ``` """ function p4est_find_corner_transform(connectivity, itree, icorner, ci) - @ccall libp4est.p4est_find_corner_transform(connectivity::Ptr{p4est_connectivity_t}, itree::p4est_topidx_t, icorner::Cint, ci::Ptr{p4est_corner_info_t})::Cvoid + @ccall libp4est.p4est_find_corner_transform(connectivity::Ptr{p4est_connectivity_t}, + itree::p4est_topidx_t, icorner::Cint, + ci::Ptr{p4est_corner_info_t})::Cvoid end """ @@ -8912,7 +9376,9 @@ void p4est_connectivity_permute (p4est_connectivity_t * conn, sc_array_t * perm, ``` """ function p4est_connectivity_permute(conn, perm, is_current_to_new) - @ccall libp4est.p4est_connectivity_permute(conn::Ptr{p4est_connectivity_t}, perm::Ptr{sc_array_t}, is_current_to_new::Cint)::Cvoid + @ccall libp4est.p4est_connectivity_permute(conn::Ptr{p4est_connectivity_t}, + perm::Ptr{sc_array_t}, + is_current_to_new::Cint)::Cvoid end """ @@ -8932,8 +9398,13 @@ end void p4est_connectivity_join_faces (p4est_connectivity_t * conn, p4est_topidx_t tree_left, p4est_topidx_t tree_right, int face_left, int face_right, int orientation); ``` """ -function p4est_connectivity_join_faces(conn, tree_left, tree_right, face_left, face_right, orientation) - @ccall libp4est.p4est_connectivity_join_faces(conn::Ptr{p4est_connectivity_t}, tree_left::p4est_topidx_t, tree_right::p4est_topidx_t, face_left::Cint, face_right::Cint, orientation::Cint)::Cvoid +function p4est_connectivity_join_faces(conn, tree_left, tree_right, face_left, face_right, + orientation) + @ccall libp4est.p4est_connectivity_join_faces(conn::Ptr{p4est_connectivity_t}, + tree_left::p4est_topidx_t, + tree_right::p4est_topidx_t, + face_left::Cint, face_right::Cint, + orientation::Cint)::Cvoid end """ @@ -8950,7 +9421,8 @@ int p4est_connectivity_is_equivalent (p4est_connectivity_t * conn1, p4est_connec ``` """ function p4est_connectivity_is_equivalent(conn1, conn2) - @ccall libp4est.p4est_connectivity_is_equivalent(conn1::Ptr{p4est_connectivity_t}, conn2::Ptr{p4est_connectivity_t})::Cint + @ccall libp4est.p4est_connectivity_is_equivalent(conn1::Ptr{p4est_connectivity_t}, + conn2::Ptr{p4est_connectivity_t})::Cint end """ @@ -8962,7 +9434,8 @@ static inline p4est_corner_transform_t * p4est_corner_array_index (sc_array_t * ``` """ function p4est_corner_array_index(array, it) - @ccall libp4est.p4est_corner_array_index(array::Ptr{sc_array_t}, it::Csize_t)::Ptr{p4est_corner_transform_t} + @ccall libp4est.p4est_corner_array_index(array::Ptr{sc_array_t}, + it::Csize_t)::Ptr{p4est_corner_transform_t} end """ @@ -9019,8 +9492,13 @@ This code can be called two ways. The first, when `vertex`==NULL and `tree_to_ve int p4est_connectivity_read_inp_stream (FILE * stream, p4est_topidx_t * num_vertices, p4est_topidx_t * num_trees, double *vertices, p4est_topidx_t * tree_to_vertex); ``` """ -function p4est_connectivity_read_inp_stream(stream, num_vertices, num_trees, vertices, tree_to_vertex) - @ccall libp4est.p4est_connectivity_read_inp_stream(stream::Ptr{Libc.FILE}, num_vertices::Ptr{p4est_topidx_t}, num_trees::Ptr{p4est_topidx_t}, vertices::Ptr{Cdouble}, tree_to_vertex::Ptr{p4est_topidx_t})::Cint +function p4est_connectivity_read_inp_stream(stream, num_vertices, num_trees, vertices, + tree_to_vertex) + @ccall libp4est.p4est_connectivity_read_inp_stream(stream::Ptr{Libc.FILE}, + num_vertices::Ptr{p4est_topidx_t}, + num_trees::Ptr{p4est_topidx_t}, + vertices::Ptr{Cdouble}, + tree_to_vertex::Ptr{p4est_topidx_t})::Cint end """ @@ -9397,7 +9875,9 @@ void p8est_neighbor_transform_coordinates (const p8est_neighbor_transform_t * nt ``` """ function p8est_neighbor_transform_coordinates(nt, self_coords, neigh_coords) - @ccall libp4est.p8est_neighbor_transform_coordinates(nt::Ptr{p8est_neighbor_transform_t}, self_coords::Ptr{p4est_qcoord_t}, neigh_coords::Ptr{p4est_qcoord_t})::Cvoid + @ccall libp4est.p8est_neighbor_transform_coordinates(nt::Ptr{p8est_neighbor_transform_t}, + self_coords::Ptr{p4est_qcoord_t}, + neigh_coords::Ptr{p4est_qcoord_t})::Cvoid end """ @@ -9415,7 +9895,9 @@ void p8est_neighbor_transform_coordinates_reverse (const p8est_neighbor_transfor ``` """ function p8est_neighbor_transform_coordinates_reverse(nt, neigh_coords, self_coords) - @ccall libp4est.p8est_neighbor_transform_coordinates_reverse(nt::Ptr{p8est_neighbor_transform_t}, neigh_coords::Ptr{p4est_qcoord_t}, self_coords::Ptr{p4est_qcoord_t})::Cvoid + @ccall libp4est.p8est_neighbor_transform_coordinates_reverse(nt::Ptr{p8est_neighbor_transform_t}, + neigh_coords::Ptr{p4est_qcoord_t}, + self_coords::Ptr{p4est_qcoord_t})::Cvoid end """ @@ -9434,8 +9916,14 @@ Fill an array with the neighbor transforms based on a specific boundary type. Th void p8est_connectivity_get_neighbor_transforms (p8est_connectivity_t *conn, p4est_topidx_t tree_id, p8est_connect_type_t boundary_type, int boundary_index, sc_array_t *neighbor_transform_array); ``` """ -function p8est_connectivity_get_neighbor_transforms(conn, tree_id, boundary_type, boundary_index, neighbor_transform_array) - @ccall libp4est.p8est_connectivity_get_neighbor_transforms(conn::Ptr{p8est_connectivity_t}, tree_id::p4est_topidx_t, boundary_type::p8est_connect_type_t, boundary_index::Cint, neighbor_transform_array::Ptr{sc_array_t})::Cvoid +function p8est_connectivity_get_neighbor_transforms(conn, tree_id, boundary_type, + boundary_index, + neighbor_transform_array) + @ccall libp4est.p8est_connectivity_get_neighbor_transforms(conn::Ptr{p8est_connectivity_t}, + tree_id::p4est_topidx_t, + boundary_type::p8est_connect_type_t, + boundary_index::Cint, + neighbor_transform_array::Ptr{sc_array_t})::Cvoid end """ @@ -9458,8 +9946,13 @@ To uniquely identify a coordinate, this function identifies the lowest numbered void p8est_connectivity_coordinates_canonicalize (p8est_connectivity_t *conn, p4est_topidx_t treeid, const p4est_qcoord_t coords[], p4est_topidx_t *treeid_out, p4est_qcoord_t coords_out[]); ``` """ -function p8est_connectivity_coordinates_canonicalize(conn, treeid, coords, treeid_out, coords_out) - @ccall libp4est.p8est_connectivity_coordinates_canonicalize(conn::Ptr{p8est_connectivity_t}, treeid::p4est_topidx_t, coords::Ptr{p4est_qcoord_t}, treeid_out::Ptr{p4est_topidx_t}, coords_out::Ptr{p4est_qcoord_t})::Cvoid +function p8est_connectivity_coordinates_canonicalize(conn, treeid, coords, treeid_out, + coords_out) + @ccall libp4est.p8est_connectivity_coordinates_canonicalize(conn::Ptr{p8est_connectivity_t}, + treeid::p4est_topidx_t, + coords::Ptr{p4est_qcoord_t}, + treeid_out::Ptr{p4est_topidx_t}, + coords_out::Ptr{p4est_qcoord_t})::Cvoid end """ @@ -9480,7 +9973,8 @@ int p8est_connectivity_face_neighbor_corner_set (int c, int f, int nf, int set); ``` """ function p8est_connectivity_face_neighbor_corner_set(c, f, nf, set) - @ccall libp4est.p8est_connectivity_face_neighbor_corner_set(c::Cint, f::Cint, nf::Cint, set::Cint)::Cint + @ccall libp4est.p8est_connectivity_face_neighbor_corner_set(c::Cint, f::Cint, nf::Cint, + set::Cint)::Cint end """ @@ -9501,7 +9995,8 @@ int p8est_connectivity_face_neighbor_face_corner (int fc, int f, int nf, int o); ``` """ function p8est_connectivity_face_neighbor_face_corner(fc, f, nf, o) - @ccall libp4est.p8est_connectivity_face_neighbor_face_corner(fc::Cint, f::Cint, nf::Cint, o::Cint)::Cint + @ccall libp4est.p8est_connectivity_face_neighbor_face_corner(fc::Cint, f::Cint, + nf::Cint, o::Cint)::Cint end """ @@ -9522,7 +10017,8 @@ int p8est_connectivity_face_neighbor_corner (int c, int f, int nf, int o); ``` """ function p8est_connectivity_face_neighbor_corner(c, f, nf, o) - @ccall libp4est.p8est_connectivity_face_neighbor_corner(c::Cint, f::Cint, nf::Cint, o::Cint)::Cint + @ccall libp4est.p8est_connectivity_face_neighbor_corner(c::Cint, f::Cint, nf::Cint, + o::Cint)::Cint end """ @@ -9543,7 +10039,8 @@ int p8est_connectivity_face_neighbor_face_edge (int fe, int f, int nf, int o); ``` """ function p8est_connectivity_face_neighbor_face_edge(fe, f, nf, o) - @ccall libp4est.p8est_connectivity_face_neighbor_face_edge(fe::Cint, f::Cint, nf::Cint, o::Cint)::Cint + @ccall libp4est.p8est_connectivity_face_neighbor_face_edge(fe::Cint, f::Cint, nf::Cint, + o::Cint)::Cint end """ @@ -9564,7 +10061,8 @@ int p8est_connectivity_face_neighbor_edge (int e, int f, int nf, int o); ``` """ function p8est_connectivity_face_neighbor_edge(e, f, nf, o) - @ccall libp4est.p8est_connectivity_face_neighbor_edge(e::Cint, f::Cint, nf::Cint, o::Cint)::Cint + @ccall libp4est.p8est_connectivity_face_neighbor_edge(e::Cint, f::Cint, nf::Cint, + o::Cint)::Cint end """ @@ -9604,7 +10102,8 @@ int p8est_connectivity_edge_neighbor_corner (int c, int e, int ne, int o); ``` """ function p8est_connectivity_edge_neighbor_corner(c, e, ne, o) - @ccall libp4est.p8est_connectivity_edge_neighbor_corner(c::Cint, e::Cint, ne::Cint, o::Cint)::Cint + @ccall libp4est.p8est_connectivity_edge_neighbor_corner(c::Cint, e::Cint, ne::Cint, + o::Cint)::Cint end """ @@ -9626,8 +10125,14 @@ A connectivity structure with allocated arrays. p8est_connectivity_t *p8est_connectivity_new (p4est_topidx_t num_vertices, p4est_topidx_t num_trees, p4est_topidx_t num_edges, p4est_topidx_t num_ett, p4est_topidx_t num_corners, p4est_topidx_t num_ctt); ``` """ -function p8est_connectivity_new(num_vertices, num_trees, num_edges, num_ett, num_corners, num_ctt) - @ccall libp4est.p8est_connectivity_new(num_vertices::p4est_topidx_t, num_trees::p4est_topidx_t, num_edges::p4est_topidx_t, num_ett::p4est_topidx_t, num_corners::p4est_topidx_t, num_ctt::p4est_topidx_t)::Ptr{p8est_connectivity_t} +function p8est_connectivity_new(num_vertices, num_trees, num_edges, num_ett, num_corners, + num_ctt) + @ccall libp4est.p8est_connectivity_new(num_vertices::p4est_topidx_t, + num_trees::p4est_topidx_t, + num_edges::p4est_topidx_t, + num_ett::p4est_topidx_t, + num_corners::p4est_topidx_t, + num_ctt::p4est_topidx_t)::Ptr{p8est_connectivity_t} end """ @@ -9659,8 +10164,23 @@ The connectivity is checked for validity. p8est_connectivity_t *p8est_connectivity_new_copy (p4est_topidx_t num_vertices, p4est_topidx_t num_trees, p4est_topidx_t num_edges, p4est_topidx_t num_corners, const double *vertices, const p4est_topidx_t * ttv, const p4est_topidx_t * ttt, const int8_t * ttf, const p4est_topidx_t * tte, const p4est_topidx_t * eoff, const p4est_topidx_t * ett, const int8_t * ete, const p4est_topidx_t * ttc, const p4est_topidx_t * coff, const p4est_topidx_t * ctt, const int8_t * ctc); ``` """ -function p8est_connectivity_new_copy(num_vertices, num_trees, num_edges, num_corners, vertices, ttv, ttt, ttf, tte, eoff, ett, ete, ttc, coff, ctt, ctc) - @ccall libp4est.p8est_connectivity_new_copy(num_vertices::p4est_topidx_t, num_trees::p4est_topidx_t, num_edges::p4est_topidx_t, num_corners::p4est_topidx_t, vertices::Ptr{Cdouble}, ttv::Ptr{p4est_topidx_t}, ttt::Ptr{p4est_topidx_t}, ttf::Ptr{Int8}, tte::Ptr{p4est_topidx_t}, eoff::Ptr{p4est_topidx_t}, ett::Ptr{p4est_topidx_t}, ete::Ptr{Int8}, ttc::Ptr{p4est_topidx_t}, coff::Ptr{p4est_topidx_t}, ctt::Ptr{p4est_topidx_t}, ctc::Ptr{Int8})::Ptr{p8est_connectivity_t} +function p8est_connectivity_new_copy(num_vertices, num_trees, num_edges, num_corners, + vertices, ttv, ttt, ttf, tte, eoff, ett, ete, ttc, + coff, ctt, ctc) + @ccall libp4est.p8est_connectivity_new_copy(num_vertices::p4est_topidx_t, + num_trees::p4est_topidx_t, + num_edges::p4est_topidx_t, + num_corners::p4est_topidx_t, + vertices::Ptr{Cdouble}, + ttv::Ptr{p4est_topidx_t}, + ttt::Ptr{p4est_topidx_t}, ttf::Ptr{Int8}, + tte::Ptr{p4est_topidx_t}, + eoff::Ptr{p4est_topidx_t}, + ett::Ptr{p4est_topidx_t}, ete::Ptr{Int8}, + ttc::Ptr{p4est_topidx_t}, + coff::Ptr{p4est_topidx_t}, + ctt::Ptr{p4est_topidx_t}, + ctc::Ptr{Int8})::Ptr{p8est_connectivity_t} end """ @@ -9679,7 +10199,8 @@ p8est_connectivity_t *p8est_connectivity_copy (p8est_connectivity_t *input, int ``` """ function p8est_connectivity_copy(input, copy_attr) - @ccall libp4est.p8est_connectivity_copy(input::Ptr{p8est_connectivity_t}, copy_attr::Cint)::Ptr{p8est_connectivity_t} + @ccall libp4est.p8est_connectivity_copy(input::Ptr{p8est_connectivity_t}, + copy_attr::Cint)::Ptr{p8est_connectivity_t} end """ @@ -9691,7 +10212,8 @@ p8est_connectivity_t *p8est_connectivity_bcast (p8est_connectivity_t * conn_in, ``` """ function p8est_connectivity_bcast(conn_in, root, comm) - @ccall libp4est.p8est_connectivity_bcast(conn_in::Ptr{p8est_connectivity_t}, root::Cint, comm::MPI_Comm)::Ptr{p8est_connectivity_t} + @ccall libp4est.p8est_connectivity_bcast(conn_in::Ptr{p8est_connectivity_t}, root::Cint, + comm::MPI_Comm)::Ptr{p8est_connectivity_t} end """ @@ -9717,7 +10239,8 @@ p8est_connectivity_shared_t *p8est_connectivity_share (p8est_connectivity_t * co ``` """ function p8est_connectivity_share(conn_in, root, comm) - @ccall libp4est.p8est_connectivity_share(conn_in::Ptr{p8est_connectivity_t}, root::Cint, comm::MPI_Comm)::Ptr{p8est_connectivity_shared_t} + @ccall libp4est.p8est_connectivity_share(conn_in::Ptr{p8est_connectivity_t}, root::Cint, + comm::MPI_Comm)::Ptr{p8est_connectivity_shared_t} end """ @@ -9729,7 +10252,9 @@ p8est_connectivity_shared_t * p8est_connectivity_mission (p8est_connectivity_t * ``` """ function p8est_connectivity_mission(conn_in, split_type, world_comm) - @ccall libp4est.p8est_connectivity_mission(conn_in::Ptr{p8est_connectivity_t}, split_type::Cint, world_comm::Cint)::Ptr{p8est_connectivity_shared_t} + @ccall libp4est.p8est_connectivity_mission(conn_in::Ptr{p8est_connectivity_t}, + split_type::Cint, + world_comm::Cint)::Ptr{p8est_connectivity_shared_t} end """ @@ -9762,7 +10287,8 @@ void p8est_connectivity_set_attr (p8est_connectivity_t * conn, size_t bytes_per_ ``` """ function p8est_connectivity_set_attr(conn, bytes_per_tree) - @ccall libp4est.p8est_connectivity_set_attr(conn::Ptr{p8est_connectivity_t}, bytes_per_tree::Csize_t)::Cvoid + @ccall libp4est.p8est_connectivity_set_attr(conn::Ptr{p8est_connectivity_t}, + bytes_per_tree::Csize_t)::Cvoid end """ @@ -9794,7 +10320,8 @@ int p8est_connectivity_is_equal (p8est_connectivity_t * conn1, p8est_connectivit ``` """ function p8est_connectivity_is_equal(conn1, conn2) - @ccall libp4est.p8est_connectivity_is_equal(conn1::Ptr{p8est_connectivity_t}, conn2::Ptr{p8est_connectivity_t})::Cint + @ccall libp4est.p8est_connectivity_is_equal(conn1::Ptr{p8est_connectivity_t}, + conn2::Ptr{p8est_connectivity_t})::Cint end """ @@ -9813,7 +10340,8 @@ int p8est_connectivity_sink (p8est_connectivity_t * conn, sc_io_sink_t * sink); ``` """ function p8est_connectivity_sink(conn, sink) - @ccall libp4est.p8est_connectivity_sink(conn::Ptr{p8est_connectivity_t}, sink::Ptr{sc_io_sink_t})::Cint + @ccall libp4est.p8est_connectivity_sink(conn::Ptr{p8est_connectivity_t}, + sink::Ptr{sc_io_sink_t})::Cint end """ @@ -9832,7 +10360,8 @@ sc_array_t *p8est_connectivity_deflate (p8est_connectivity_t * conn, p8est_conne ``` """ function p8est_connectivity_deflate(conn, code) - @ccall libp4est.p8est_connectivity_deflate(conn::Ptr{p8est_connectivity_t}, code::p8est_connectivity_encode_t)::Ptr{sc_array_t} + @ccall libp4est.p8est_connectivity_deflate(conn::Ptr{p8est_connectivity_t}, + code::p8est_connectivity_encode_t)::Ptr{sc_array_t} end """ @@ -9851,7 +10380,8 @@ int p8est_connectivity_save (const char *filename, p8est_connectivity_t * connec ``` """ function p8est_connectivity_save(filename, connectivity) - @ccall libp4est.p8est_connectivity_save(filename::Cstring, connectivity::Ptr{p8est_connectivity_t})::Cint + @ccall libp4est.p8est_connectivity_save(filename::Cstring, + connectivity::Ptr{p8est_connectivity_t})::Cint end """ @@ -9906,7 +10436,8 @@ p8est_connectivity_t *p8est_connectivity_load (const char *filename, size_t *byt ``` """ function p8est_connectivity_load(filename, bytes) - @ccall libp4est.p8est_connectivity_load(filename::Cstring, bytes::Ptr{Csize_t})::Ptr{p8est_connectivity_t} + @ccall libp4est.p8est_connectivity_load(filename::Cstring, + bytes::Ptr{Csize_t})::Ptr{p8est_connectivity_t} end """ @@ -9994,7 +10525,8 @@ p8est_connectivity_t *p8est_connectivity_new_twotrees (int l_face, int r_face, i ``` """ function p8est_connectivity_new_twotrees(l_face, r_face, orientation) - @ccall libp4est.p8est_connectivity_new_twotrees(l_face::Cint, r_face::Cint, orientation::Cint)::Ptr{p8est_connectivity_t} + @ccall libp4est.p8est_connectivity_new_twotrees(l_face::Cint, r_face::Cint, + orientation::Cint)::Ptr{p8est_connectivity_t} end """ @@ -10050,7 +10582,9 @@ p8est_connectivity_t *p8est_connectivity_new_brick (int m, int n, int p, int per ``` """ function p8est_connectivity_new_brick(m, n, p, periodic_a, periodic_b, periodic_c) - @ccall libp4est.p8est_connectivity_new_brick(m::Cint, n::Cint, p::Cint, periodic_a::Cint, periodic_b::Cint, periodic_c::Cint)::Ptr{p8est_connectivity_t} + @ccall libp4est.p8est_connectivity_new_brick(m::Cint, n::Cint, p::Cint, + periodic_a::Cint, periodic_b::Cint, + periodic_c::Cint)::Ptr{p8est_connectivity_t} end """ @@ -10137,7 +10671,8 @@ p8est_connectivity_t *p8est_connectivity_refine (p8est_connectivity_t * conn, in ``` """ function p8est_connectivity_refine(conn, num_per_dim) - @ccall libp4est.p8est_connectivity_refine(conn::Ptr{p8est_connectivity_t}, num_per_dim::Cint)::Ptr{p8est_connectivity_t} + @ccall libp4est.p8est_connectivity_refine(conn::Ptr{p8est_connectivity_t}, + num_per_dim::Cint)::Ptr{p8est_connectivity_t} end """ @@ -10155,7 +10690,8 @@ void p8est_expand_face_transform (int iface, int nface, int ftransform[]); ``` """ function p8est_expand_face_transform(iface, nface, ftransform) - @ccall libp4est.p8est_expand_face_transform(iface::Cint, nface::Cint, ftransform::Ptr{Cint})::Cvoid + @ccall libp4est.p8est_expand_face_transform(iface::Cint, nface::Cint, + ftransform::Ptr{Cint})::Cvoid end """ @@ -10179,7 +10715,9 @@ p4est_topidx_t p8est_find_face_transform (p8est_connectivity_t * connectivity, p ``` """ function p8est_find_face_transform(connectivity, itree, iface, ftransform) - @ccall libp4est.p8est_find_face_transform(connectivity::Ptr{p8est_connectivity_t}, itree::p4est_topidx_t, iface::Cint, ftransform::Ptr{Cint})::p4est_topidx_t + @ccall libp4est.p8est_find_face_transform(connectivity::Ptr{p8est_connectivity_t}, + itree::p4est_topidx_t, iface::Cint, + ftransform::Ptr{Cint})::p4est_topidx_t end """ @@ -10198,7 +10736,9 @@ void p8est_find_edge_transform (p8est_connectivity_t * connectivity, p4est_topid ``` """ function p8est_find_edge_transform(connectivity, itree, iedge, ei) - @ccall libp4est.p8est_find_edge_transform(connectivity::Ptr{p8est_connectivity_t}, itree::p4est_topidx_t, iedge::Cint, ei::Ptr{p8est_edge_info_t})::Cvoid + @ccall libp4est.p8est_find_edge_transform(connectivity::Ptr{p8est_connectivity_t}, + itree::p4est_topidx_t, iedge::Cint, + ei::Ptr{p8est_edge_info_t})::Cvoid end """ @@ -10217,7 +10757,9 @@ void p8est_find_corner_transform (p8est_connectivity_t * connectivity, p4est_top ``` """ function p8est_find_corner_transform(connectivity, itree, icorner, ci) - @ccall libp4est.p8est_find_corner_transform(connectivity::Ptr{p8est_connectivity_t}, itree::p4est_topidx_t, icorner::Cint, ci::Ptr{p8est_corner_info_t})::Cvoid + @ccall libp4est.p8est_find_corner_transform(connectivity::Ptr{p8est_connectivity_t}, + itree::p4est_topidx_t, icorner::Cint, + ci::Ptr{p8est_corner_info_t})::Cvoid end """ @@ -10267,7 +10809,9 @@ void p8est_connectivity_permute (p8est_connectivity_t * conn, sc_array_t * perm, ``` """ function p8est_connectivity_permute(conn, perm, is_current_to_new) - @ccall libp4est.p8est_connectivity_permute(conn::Ptr{p8est_connectivity_t}, perm::Ptr{sc_array_t}, is_current_to_new::Cint)::Cvoid + @ccall libp4est.p8est_connectivity_permute(conn::Ptr{p8est_connectivity_t}, + perm::Ptr{sc_array_t}, + is_current_to_new::Cint)::Cvoid end """ @@ -10287,8 +10831,13 @@ end void p8est_connectivity_join_faces (p8est_connectivity_t * conn, p4est_topidx_t tree_left, p4est_topidx_t tree_right, int face_left, int face_right, int orientation); ``` """ -function p8est_connectivity_join_faces(conn, tree_left, tree_right, face_left, face_right, orientation) - @ccall libp4est.p8est_connectivity_join_faces(conn::Ptr{p8est_connectivity_t}, tree_left::p4est_topidx_t, tree_right::p4est_topidx_t, face_left::Cint, face_right::Cint, orientation::Cint)::Cvoid +function p8est_connectivity_join_faces(conn, tree_left, tree_right, face_left, face_right, + orientation) + @ccall libp4est.p8est_connectivity_join_faces(conn::Ptr{p8est_connectivity_t}, + tree_left::p4est_topidx_t, + tree_right::p4est_topidx_t, + face_left::Cint, face_right::Cint, + orientation::Cint)::Cvoid end """ @@ -10305,7 +10854,8 @@ int p8est_connectivity_is_equivalent (p8est_connectivity_t * conn1, p8est_connec ``` """ function p8est_connectivity_is_equivalent(conn1, conn2) - @ccall libp4est.p8est_connectivity_is_equivalent(conn1::Ptr{p8est_connectivity_t}, conn2::Ptr{p8est_connectivity_t})::Cint + @ccall libp4est.p8est_connectivity_is_equivalent(conn1::Ptr{p8est_connectivity_t}, + conn2::Ptr{p8est_connectivity_t})::Cint end """ @@ -10317,7 +10867,8 @@ static inline p8est_edge_transform_t * p8est_edge_array_index (sc_array_t *array ``` """ function p8est_edge_array_index(array, it) - @ccall libp4est.p8est_edge_array_index(array::Ptr{sc_array_t}, it::Csize_t)::Ptr{p8est_edge_transform_t} + @ccall libp4est.p8est_edge_array_index(array::Ptr{sc_array_t}, + it::Csize_t)::Ptr{p8est_edge_transform_t} end """ @@ -10329,7 +10880,8 @@ static inline p8est_corner_transform_t * p8est_corner_array_index (sc_array_t *a ``` """ function p8est_corner_array_index(array, it) - @ccall libp4est.p8est_corner_array_index(array::Ptr{sc_array_t}, it::Csize_t)::Ptr{p8est_corner_transform_t} + @ccall libp4est.p8est_corner_array_index(array::Ptr{sc_array_t}, + it::Csize_t)::Ptr{p8est_corner_transform_t} end """ @@ -10404,8 +10956,13 @@ This code can be called two ways. The first, when `vertex`==NULL and `tree_to_ve int p8est_connectivity_read_inp_stream (FILE * stream, p4est_topidx_t * num_vertices, p4est_topidx_t * num_trees, double *vertices, p4est_topidx_t * tree_to_vertex); ``` """ -function p8est_connectivity_read_inp_stream(stream, num_vertices, num_trees, vertices, tree_to_vertex) - @ccall libp4est.p8est_connectivity_read_inp_stream(stream::Ptr{Libc.FILE}, num_vertices::Ptr{p4est_topidx_t}, num_trees::Ptr{p4est_topidx_t}, vertices::Ptr{Cdouble}, tree_to_vertex::Ptr{p4est_topidx_t})::Cint +function p8est_connectivity_read_inp_stream(stream, num_vertices, num_trees, vertices, + tree_to_vertex) + @ccall libp4est.p8est_connectivity_read_inp_stream(stream::Ptr{Libc.FILE}, + num_vertices::Ptr{p4est_topidx_t}, + num_trees::Ptr{p4est_topidx_t}, + vertices::Ptr{Cdouble}, + tree_to_vertex::Ptr{p4est_topidx_t})::Cint end """ @@ -10489,7 +11046,8 @@ void t8_cmesh_new_from_p4est (t8_cmesh_t cmesh, p4est_connectivity_t *conn, sc_M ``` """ function t8_cmesh_new_from_p4est(cmesh, conn, comm, do_partition) - @ccall libt8.t8_cmesh_new_from_p4est(cmesh::t8_cmesh_t, conn::Ptr{p4est_connectivity_t}, comm::MPI_Comm, do_partition::Cint)::Cvoid + @ccall libt8.t8_cmesh_new_from_p4est(cmesh::t8_cmesh_t, conn::Ptr{p4est_connectivity_t}, + comm::MPI_Comm, do_partition::Cint)::Cvoid end """ @@ -10501,7 +11059,8 @@ void t8_cmesh_new_from_p8est (t8_cmesh_t cmesh, p8est_connectivity_t *conn, sc_M ``` """ function t8_cmesh_new_from_p8est(cmesh, conn, comm, do_partition) - @ccall libt8.t8_cmesh_new_from_p8est(cmesh::t8_cmesh_t, conn::Ptr{p8est_connectivity_t}, comm::MPI_Comm, do_partition::Cint)::Cvoid + @ccall libt8.t8_cmesh_new_from_p8est(cmesh::t8_cmesh_t, conn::Ptr{p8est_connectivity_t}, + comm::MPI_Comm, do_partition::Cint)::Cvoid end """ @@ -10525,7 +11084,8 @@ void t8_cmesh_new_from_class (t8_cmesh_t cmesh, const t8_eclass_t eclass, sc_MPI ``` """ function t8_cmesh_new_from_class(cmesh, eclass, comm) - @ccall libt8.t8_cmesh_new_from_class(cmesh::t8_cmesh_t, eclass::t8_eclass_t, comm::MPI_Comm)::Cvoid + @ccall libt8.t8_cmesh_new_from_class(cmesh::t8_cmesh_t, eclass::t8_eclass_t, + comm::MPI_Comm)::Cvoid end """ @@ -10537,7 +11097,9 @@ void t8_cmesh_new_hypercube (t8_cmesh_t *pcmesh, const t8_eclass_t eclass, sc_MP ``` """ function t8_cmesh_new_hypercube(pcmesh, eclass, comm, do_bcast, do_partition, periodic) - @ccall libt8.t8_cmesh_new_hypercube(pcmesh::Ptr{t8_cmesh_t}, eclass::t8_eclass_t, comm::MPI_Comm, do_bcast::Cint, do_partition::Cint, periodic::Cint)::Cvoid + @ccall libt8.t8_cmesh_new_hypercube(pcmesh::Ptr{t8_cmesh_t}, eclass::t8_eclass_t, + comm::MPI_Comm, do_bcast::Cint, do_partition::Cint, + periodic::Cint)::Cvoid end """ @@ -10548,8 +11110,14 @@ end void t8_cmesh_new_hypercube_pad (t8_cmesh_t cmesh, const t8_eclass_t eclass, sc_MPI_Comm comm, const double *boundary, t8_locidx_t polygons_x, t8_locidx_t polygons_y, t8_locidx_t polygons_z, const int use_axis_aligned); ``` """ -function t8_cmesh_new_hypercube_pad(cmesh, eclass, comm, boundary, polygons_x, polygons_y, polygons_z, use_axis_aligned) - @ccall libt8.t8_cmesh_new_hypercube_pad(cmesh::t8_cmesh_t, eclass::t8_eclass_t, comm::MPI_Comm, boundary::Ptr{Cdouble}, polygons_x::t8_locidx_t, polygons_y::t8_locidx_t, polygons_z::t8_locidx_t, use_axis_aligned::Cint)::Cvoid +function t8_cmesh_new_hypercube_pad(cmesh, eclass, comm, boundary, polygons_x, polygons_y, + polygons_z, use_axis_aligned) + @ccall libt8.t8_cmesh_new_hypercube_pad(cmesh::t8_cmesh_t, eclass::t8_eclass_t, + comm::MPI_Comm, boundary::Ptr{Cdouble}, + polygons_x::t8_locidx_t, + polygons_y::t8_locidx_t, + polygons_z::t8_locidx_t, + use_axis_aligned::Cint)::Cvoid end """ @@ -10560,8 +11128,17 @@ end void t8_cmesh_new_hypercube_pad_ext (t8_cmesh_t cmesh, const t8_eclass_t eclass, sc_MPI_Comm comm, const double *boundary, t8_locidx_t polygons_x, t8_locidx_t polygons_y, t8_locidx_t polygons_z, const int periodic_x, const int periodic_y, const int periodic_z, const int use_axis_aligned, const int set_partition, t8_gloidx_t offset); ``` """ -function t8_cmesh_new_hypercube_pad_ext(cmesh, eclass, comm, boundary, polygons_x, polygons_y, polygons_z, periodic_x, periodic_y, periodic_z, use_axis_aligned, set_partition, offset) - @ccall libt8.t8_cmesh_new_hypercube_pad_ext(cmesh::t8_cmesh_t, eclass::t8_eclass_t, comm::MPI_Comm, boundary::Ptr{Cdouble}, polygons_x::t8_locidx_t, polygons_y::t8_locidx_t, polygons_z::t8_locidx_t, periodic_x::Cint, periodic_y::Cint, periodic_z::Cint, use_axis_aligned::Cint, set_partition::Cint, offset::t8_gloidx_t)::Cvoid +function t8_cmesh_new_hypercube_pad_ext(cmesh, eclass, comm, boundary, polygons_x, + polygons_y, polygons_z, periodic_x, periodic_y, + periodic_z, use_axis_aligned, set_partition, offset) + @ccall libt8.t8_cmesh_new_hypercube_pad_ext(cmesh::t8_cmesh_t, eclass::t8_eclass_t, + comm::MPI_Comm, boundary::Ptr{Cdouble}, + polygons_x::t8_locidx_t, + polygons_y::t8_locidx_t, + polygons_z::t8_locidx_t, periodic_x::Cint, + periodic_y::Cint, periodic_z::Cint, + use_axis_aligned::Cint, set_partition::Cint, + offset::t8_gloidx_t)::Cvoid end """ @@ -10573,19 +11150,34 @@ void t8_cmesh_new_hypercube_hybrid (t8_cmesh_t cmesh, sc_MPI_Comm comm, int peri ``` """ function t8_cmesh_new_hypercube_hybrid(cmesh, comm, periodic) - @ccall libt8.t8_cmesh_new_hypercube_hybrid(cmesh::t8_cmesh_t, comm::MPI_Comm, periodic::Cint)::Cvoid + @ccall libt8.t8_cmesh_new_hypercube_hybrid(cmesh::t8_cmesh_t, comm::MPI_Comm, + periodic::Cint)::Cvoid +end + +""" + t8_cmesh_new_hypercube_hybrid_ext(cmesh, comm, periodic, use_boundary_conditions) + +### Prototype +```c +void t8_cmesh_new_hypercube_hybrid_ext (t8_cmesh_t cmesh, sc_MPI_Comm comm, int periodic, int use_boundary_conditions); +``` +""" +function t8_cmesh_new_hypercube_hybrid_ext(cmesh, comm, periodic, use_boundary_conditions) + @ccall libt8.t8_cmesh_new_hypercube_hybrid_ext(cmesh::t8_cmesh_t, comm::MPI_Comm, + periodic::Cint, + use_boundary_conditions::Cint)::Cvoid end """ - t8_cmesh_new_2D_hypercube_hybrid(cmesh, comm) + t8_cmesh_new_hypercube_hybrid_2D(cmesh, comm) ### Prototype ```c -void t8_cmesh_new_2D_hypercube_hybrid (t8_cmesh_t cmesh, sc_MPI_Comm comm); +void t8_cmesh_new_hypercube_hybrid_2D (t8_cmesh_t cmesh, sc_MPI_Comm comm); ``` """ -function t8_cmesh_new_2D_hypercube_hybrid(cmesh, comm) - @ccall libt8.t8_cmesh_new_2D_hypercube_hybrid(cmesh::t8_cmesh_t, comm::MPI_Comm)::Cvoid +function t8_cmesh_new_hypercube_hybrid_2D(cmesh, comm) + @ccall libt8.t8_cmesh_new_hypercube_hybrid_2D(cmesh::t8_cmesh_t, comm::MPI_Comm)::Cvoid end """ @@ -10633,7 +11225,8 @@ void t8_cmesh_new_periodic_line_more_trees (t8_cmesh_t cmesh, sc_MPI_Comm comm); ``` """ function t8_cmesh_new_periodic_line_more_trees(cmesh, comm) - @ccall libt8.t8_cmesh_new_periodic_line_more_trees(cmesh::t8_cmesh_t, comm::MPI_Comm)::Cvoid + @ccall libt8.t8_cmesh_new_periodic_line_more_trees(cmesh::t8_cmesh_t, + comm::MPI_Comm)::Cvoid end """ @@ -10645,7 +11238,8 @@ void t8_cmesh_new_bigmesh (t8_cmesh_t cmesh, t8_eclass_t eclass, int num_trees, ``` """ function t8_cmesh_new_bigmesh(cmesh, eclass, num_trees, comm) - @ccall libt8.t8_cmesh_new_bigmesh(cmesh::t8_cmesh_t, eclass::t8_eclass_t, num_trees::Cint, comm::MPI_Comm)::Cvoid + @ccall libt8.t8_cmesh_new_bigmesh(cmesh::t8_cmesh_t, eclass::t8_eclass_t, + num_trees::Cint, comm::MPI_Comm)::Cvoid end """ @@ -10669,7 +11263,8 @@ void t8_cmesh_new_prism_cake (t8_cmesh_t cmesh, sc_MPI_Comm comm, int num_of_pri ``` """ function t8_cmesh_new_prism_cake(cmesh, comm, num_of_prisms) - @ccall libt8.t8_cmesh_new_prism_cake(cmesh::t8_cmesh_t, comm::MPI_Comm, num_of_prisms::Cint)::Cvoid + @ccall libt8.t8_cmesh_new_prism_cake(cmesh::t8_cmesh_t, comm::MPI_Comm, + num_of_prisms::Cint)::Cvoid end """ @@ -10705,7 +11300,8 @@ void t8_cmesh_new_prism_cake_funny_oriented (t8_cmesh_t cmesh, sc_MPI_Comm comm) ``` """ function t8_cmesh_new_prism_cake_funny_oriented(cmesh, comm) - @ccall libt8.t8_cmesh_new_prism_cake_funny_oriented(cmesh::t8_cmesh_t, comm::MPI_Comm)::Cvoid + @ccall libt8.t8_cmesh_new_prism_cake_funny_oriented(cmesh::t8_cmesh_t, + comm::MPI_Comm)::Cvoid end """ @@ -10729,7 +11325,9 @@ void t8_cmesh_new_brick_2d (t8_cmesh_t cmesh, t8_gloidx_t num_x, t8_gloidx_t num ``` """ function t8_cmesh_new_brick_2d(cmesh, num_x, num_y, x_periodic, y_periodic, comm) - @ccall libt8.t8_cmesh_new_brick_2d(cmesh::t8_cmesh_t, num_x::t8_gloidx_t, num_y::t8_gloidx_t, x_periodic::Cint, y_periodic::Cint, comm::MPI_Comm)::Cvoid + @ccall libt8.t8_cmesh_new_brick_2d(cmesh::t8_cmesh_t, num_x::t8_gloidx_t, + num_y::t8_gloidx_t, x_periodic::Cint, + y_periodic::Cint, comm::MPI_Comm)::Cvoid end """ @@ -10740,8 +11338,12 @@ end void t8_cmesh_new_brick_3d (t8_cmesh_t cmesh, t8_gloidx_t num_x, t8_gloidx_t num_y, t8_gloidx_t num_z, int x_periodic, int y_periodic, int z_periodic, sc_MPI_Comm comm); ``` """ -function t8_cmesh_new_brick_3d(cmesh, num_x, num_y, num_z, x_periodic, y_periodic, z_periodic, comm) - @ccall libt8.t8_cmesh_new_brick_3d(cmesh::t8_cmesh_t, num_x::t8_gloidx_t, num_y::t8_gloidx_t, num_z::t8_gloidx_t, x_periodic::Cint, y_periodic::Cint, z_periodic::Cint, comm::MPI_Comm)::Cvoid +function t8_cmesh_new_brick_3d(cmesh, num_x, num_y, num_z, x_periodic, y_periodic, + z_periodic, comm) + @ccall libt8.t8_cmesh_new_brick_3d(cmesh::t8_cmesh_t, num_x::t8_gloidx_t, + num_y::t8_gloidx_t, num_z::t8_gloidx_t, + x_periodic::Cint, y_periodic::Cint, z_periodic::Cint, + comm::MPI_Comm)::Cvoid end """ @@ -10752,8 +11354,12 @@ end void t8_cmesh_new_disjoint_bricks (t8_cmesh_t cmesh, t8_gloidx_t num_x, t8_gloidx_t num_y, t8_gloidx_t num_z, int x_periodic, int y_periodic, int z_periodic, sc_MPI_Comm comm); ``` """ -function t8_cmesh_new_disjoint_bricks(cmesh, num_x, num_y, num_z, x_periodic, y_periodic, z_periodic, comm) - @ccall libt8.t8_cmesh_new_disjoint_bricks(cmesh::t8_cmesh_t, num_x::t8_gloidx_t, num_y::t8_gloidx_t, num_z::t8_gloidx_t, x_periodic::Cint, y_periodic::Cint, z_periodic::Cint, comm::MPI_Comm)::Cvoid +function t8_cmesh_new_disjoint_bricks(cmesh, num_x, num_y, num_z, x_periodic, y_periodic, + z_periodic, comm) + @ccall libt8.t8_cmesh_new_disjoint_bricks(cmesh::t8_cmesh_t, num_x::t8_gloidx_t, + num_y::t8_gloidx_t, num_z::t8_gloidx_t, + x_periodic::Cint, y_periodic::Cint, + z_periodic::Cint, comm::MPI_Comm)::Cvoid end """ @@ -10813,7 +11419,8 @@ void t8_cmesh_new_pyramid_cake (t8_cmesh_t cmesh, sc_MPI_Comm comm, int num_of_p ``` """ function t8_cmesh_new_pyramid_cake(cmesh, comm, num_of_pyra) - @ccall libt8.t8_cmesh_new_pyramid_cake(cmesh::t8_cmesh_t, comm::MPI_Comm, num_of_pyra::Cint)::Cvoid + @ccall libt8.t8_cmesh_new_pyramid_cake(cmesh::t8_cmesh_t, comm::MPI_Comm, + num_of_pyra::Cint)::Cvoid end """ @@ -10825,7 +11432,8 @@ void t8_cmesh_new_long_brick_pyramid (t8_cmesh_t cmesh, sc_MPI_Comm comm, int nu ``` """ function t8_cmesh_new_long_brick_pyramid(cmesh, comm, num_cubes) - @ccall libt8.t8_cmesh_new_long_brick_pyramid(cmesh::t8_cmesh_t, comm::MPI_Comm, num_cubes::Cint)::Cvoid + @ccall libt8.t8_cmesh_new_long_brick_pyramid(cmesh::t8_cmesh_t, comm::MPI_Comm, + num_cubes::Cint)::Cvoid end """ @@ -10836,8 +11444,11 @@ end void t8_cmesh_new_row_of_cubes (t8_cmesh_t cmesh, t8_locidx_t num_trees, const int set_attributes, const int do_partition, sc_MPI_Comm comm, const int package_id); ``` """ -function t8_cmesh_new_row_of_cubes(cmesh, num_trees, set_attributes, do_partition, comm, package_id) - @ccall libt8.t8_cmesh_new_row_of_cubes(cmesh::t8_cmesh_t, num_trees::t8_locidx_t, set_attributes::Cint, do_partition::Cint, comm::MPI_Comm, package_id::Cint)::Cvoid +function t8_cmesh_new_row_of_cubes(cmesh, num_trees, set_attributes, do_partition, comm, + package_id) + @ccall libt8.t8_cmesh_new_row_of_cubes(cmesh::t8_cmesh_t, num_trees::t8_locidx_t, + set_attributes::Cint, do_partition::Cint, + comm::MPI_Comm, package_id::Cint)::Cvoid end """ @@ -10849,7 +11460,8 @@ void t8_cmesh_new_quadrangulated_disk (t8_cmesh_t cmesh, const double radius, sc ``` """ function t8_cmesh_new_quadrangulated_disk(cmesh, radius, comm) - @ccall libt8.t8_cmesh_new_quadrangulated_disk(cmesh::t8_cmesh_t, radius::Cdouble, comm::MPI_Comm)::Cvoid + @ccall libt8.t8_cmesh_new_quadrangulated_disk(cmesh::t8_cmesh_t, radius::Cdouble, + comm::MPI_Comm)::Cvoid end """ @@ -10861,7 +11473,9 @@ void t8_cmesh_new_triangulated_spherical_surface_octahedron (t8_cmesh_t cmesh, c ``` """ function t8_cmesh_new_triangulated_spherical_surface_octahedron(cmesh, radius, comm) - @ccall libt8.t8_cmesh_new_triangulated_spherical_surface_octahedron(cmesh::t8_cmesh_t, radius::Cdouble, comm::MPI_Comm)::Cvoid + @ccall libt8.t8_cmesh_new_triangulated_spherical_surface_octahedron(cmesh::t8_cmesh_t, + radius::Cdouble, + comm::MPI_Comm)::Cvoid end """ @@ -10873,7 +11487,9 @@ void t8_cmesh_new_triangulated_spherical_surface_icosahedron (t8_cmesh_t cmesh, ``` """ function t8_cmesh_new_triangulated_spherical_surface_icosahedron(cmesh, radius, comm) - @ccall libt8.t8_cmesh_new_triangulated_spherical_surface_icosahedron(cmesh::t8_cmesh_t, radius::Cdouble, comm::MPI_Comm)::Cvoid + @ccall libt8.t8_cmesh_new_triangulated_spherical_surface_icosahedron(cmesh::t8_cmesh_t, + radius::Cdouble, + comm::MPI_Comm)::Cvoid end """ @@ -10885,7 +11501,9 @@ void t8_cmesh_new_triangulated_spherical_surface_cube (t8_cmesh_t cmesh, const d ``` """ function t8_cmesh_new_triangulated_spherical_surface_cube(cmesh, radius, comm) - @ccall libt8.t8_cmesh_new_triangulated_spherical_surface_cube(cmesh::t8_cmesh_t, radius::Cdouble, comm::MPI_Comm)::Cvoid + @ccall libt8.t8_cmesh_new_triangulated_spherical_surface_cube(cmesh::t8_cmesh_t, + radius::Cdouble, + comm::MPI_Comm)::Cvoid end """ @@ -10897,7 +11515,9 @@ void t8_cmesh_new_quadrangulated_spherical_surface (t8_cmesh_t cmesh, const doub ``` """ function t8_cmesh_new_quadrangulated_spherical_surface(cmesh, radius, comm) - @ccall libt8.t8_cmesh_new_quadrangulated_spherical_surface(cmesh::t8_cmesh_t, radius::Cdouble, comm::MPI_Comm)::Cvoid + @ccall libt8.t8_cmesh_new_quadrangulated_spherical_surface(cmesh::t8_cmesh_t, + radius::Cdouble, + comm::MPI_Comm)::Cvoid end """ @@ -10908,8 +11528,15 @@ end void t8_cmesh_new_prismed_spherical_shell_octahedron (t8_cmesh_t cmesh, const double inner_radius, const double shell_thickness, const int num_levels, const int num_layers, sc_MPI_Comm comm); ``` """ -function t8_cmesh_new_prismed_spherical_shell_octahedron(cmesh, inner_radius, shell_thickness, num_levels, num_layers, comm) - @ccall libt8.t8_cmesh_new_prismed_spherical_shell_octahedron(cmesh::t8_cmesh_t, inner_radius::Cdouble, shell_thickness::Cdouble, num_levels::Cint, num_layers::Cint, comm::MPI_Comm)::Cvoid +function t8_cmesh_new_prismed_spherical_shell_octahedron(cmesh, inner_radius, + shell_thickness, num_levels, + num_layers, comm) + @ccall libt8.t8_cmesh_new_prismed_spherical_shell_octahedron(cmesh::t8_cmesh_t, + inner_radius::Cdouble, + shell_thickness::Cdouble, + num_levels::Cint, + num_layers::Cint, + comm::MPI_Comm)::Cvoid end """ @@ -10920,8 +11547,15 @@ end void t8_cmesh_new_prismed_spherical_shell_icosahedron (t8_cmesh_t cmesh, const double inner_radius, const double shell_thickness, const int num_levels, const int num_layers, sc_MPI_Comm comm); ``` """ -function t8_cmesh_new_prismed_spherical_shell_icosahedron(cmesh, inner_radius, shell_thickness, num_levels, num_layers, comm) - @ccall libt8.t8_cmesh_new_prismed_spherical_shell_icosahedron(cmesh::t8_cmesh_t, inner_radius::Cdouble, shell_thickness::Cdouble, num_levels::Cint, num_layers::Cint, comm::MPI_Comm)::Cvoid +function t8_cmesh_new_prismed_spherical_shell_icosahedron(cmesh, inner_radius, + shell_thickness, num_levels, + num_layers, comm) + @ccall libt8.t8_cmesh_new_prismed_spherical_shell_icosahedron(cmesh::t8_cmesh_t, + inner_radius::Cdouble, + shell_thickness::Cdouble, + num_levels::Cint, + num_layers::Cint, + comm::MPI_Comm)::Cvoid end """ @@ -10932,8 +11566,13 @@ end void t8_cmesh_new_cubed_spherical_shell (t8_cmesh_t cmesh, const double inner_radius, const double shell_thickness, const int num_trees, const int num_layers, sc_MPI_Comm comm); ``` """ -function t8_cmesh_new_cubed_spherical_shell(cmesh, inner_radius, shell_thickness, num_trees, num_layers, comm) - @ccall libt8.t8_cmesh_new_cubed_spherical_shell(cmesh::t8_cmesh_t, inner_radius::Cdouble, shell_thickness::Cdouble, num_trees::Cint, num_layers::Cint, comm::MPI_Comm)::Cvoid +function t8_cmesh_new_cubed_spherical_shell(cmesh, inner_radius, shell_thickness, num_trees, + num_layers, comm) + @ccall libt8.t8_cmesh_new_cubed_spherical_shell(cmesh::t8_cmesh_t, + inner_radius::Cdouble, + shell_thickness::Cdouble, + num_trees::Cint, num_layers::Cint, + comm::MPI_Comm)::Cvoid end """ @@ -10945,7 +11584,8 @@ void t8_cmesh_new_cubed_sphere (t8_cmesh_t cmesh, const double radius, sc_MPI_Co ``` """ function t8_cmesh_new_cubed_sphere(cmesh, radius, comm) - @ccall libt8.t8_cmesh_new_cubed_sphere(cmesh::t8_cmesh_t, radius::Cdouble, comm::MPI_Comm)::Cvoid + @ccall libt8.t8_cmesh_new_cubed_sphere(cmesh::t8_cmesh_t, radius::Cdouble, + comm::MPI_Comm)::Cvoid end """ @@ -10955,7 +11595,7 @@ Sets the face connectivity information of an un-committed cmesh based on a list !!! warning - This routine might be too expensive for very large meshes. In this case, consider to use a fully featured mesh generator. + This routine might be too expensive for very large meshes. In this case, consider to use a fully featured mesh generator. !!! note @@ -10973,8 +11613,13 @@ Sets the face connectivity information of an un-committed cmesh based on a list void t8_cmesh_set_join_by_vertices (t8_cmesh_t cmesh, const t8_gloidx_t ntrees, const t8_eclass_t *eclasses, const double *vertices, int **connectivity, const int do_both_directions); ``` """ -function t8_cmesh_set_join_by_vertices(cmesh, ntrees, eclasses, vertices, connectivity, do_both_directions) - @ccall libt8.t8_cmesh_set_join_by_vertices(cmesh::t8_cmesh_t, ntrees::t8_gloidx_t, eclasses::Ptr{t8_eclass_t}, vertices::Ptr{Cdouble}, connectivity::Ptr{Ptr{Cint}}, do_both_directions::Cint)::Cvoid +function t8_cmesh_set_join_by_vertices(cmesh, ntrees, eclasses, vertices, connectivity, + do_both_directions) + @ccall libt8.t8_cmesh_set_join_by_vertices(cmesh::t8_cmesh_t, ntrees::t8_gloidx_t, + eclasses::Ptr{t8_eclass_t}, + vertices::Ptr{Cdouble}, + connectivity::Ptr{Ptr{Cint}}, + do_both_directions::Cint)::Cvoid end """ @@ -10992,7 +11637,7 @@ Sets the face connectivity information of an un-committed cmesh based on the cme # Arguments * `cmesh`:\\[in,out\\] An uncommitted cmesh. The trees eclasses and vertices do need to be set. -* `connectivity`:\\[in,out\\] If connectivity is not NULL the variable is filled with a pointer to an allocated face connectivity array. The ownership of this array goes to the caller. This argument is mainly used for debugging and testing purposes. The dimension of *connectivity* are [ntrees,[`T8_ECLASS_MAX_FACES`](@ref),3]. For each element and each face the following is stored: neighbor\\_tree\\_id, neighbor\\_dual\\_face\\_id, orientation +* `connectivity`:\\[in,out\\] If connectivity is not NULL the variable is filled with a pointer to an allocated face connectivity array. The ownership of this array goes to the caller. This argument is mainly used for debugging and testing purposes. The dimension of *connectivity* are [ntrees,[`T8_ECLASS_MAX_FACES`](@ref),3]. For each element and each face the following is stored: neighbor\\_tree\\_id, neighbor\\_dual\\_face\\_id, orientation * `do_both_directions`:\\[in\\] Compute the connectivity from both neighboring sides. Takes much longer to compute. ### Prototype ```c @@ -11000,7 +11645,8 @@ void t8_cmesh_set_join_by_stash (t8_cmesh_t cmesh, int **connectivity, const int ``` """ function t8_cmesh_set_join_by_stash(cmesh, connectivity, do_both_directions) - @ccall libt8.t8_cmesh_set_join_by_stash(cmesh::t8_cmesh_t, connectivity::Ptr{Ptr{Cint}}, do_both_directions::Cint)::Cvoid + @ccall libt8.t8_cmesh_set_join_by_stash(cmesh::t8_cmesh_t, connectivity::Ptr{Ptr{Cint}}, + do_both_directions::Cint)::Cvoid end """ @@ -11011,8 +11657,11 @@ end void t8_cmesh_from_msh_file (t8_cmesh_t *pcmesh, const char *fileprefix, int partition, sc_MPI_Comm comm, int dim, int master, int use_cad_geometry); ``` """ -function t8_cmesh_from_msh_file(pcmesh, fileprefix, partition, comm, dim, master, use_cad_geometry) - @ccall libt8.t8_cmesh_from_msh_file(pcmesh::Ptr{t8_cmesh_t}, fileprefix::Cstring, partition::Cint, comm::MPI_Comm, dim::Cint, master::Cint, use_cad_geometry::Cint)::Cvoid +function t8_cmesh_from_msh_file(pcmesh, fileprefix, partition, comm, dim, master, + use_cad_geometry) + @ccall libt8.t8_cmesh_from_msh_file(pcmesh::Ptr{t8_cmesh_t}, fileprefix::Cstring, + partition::Cint, comm::MPI_Comm, dim::Cint, + master::Cint, use_cad_geometry::Cint)::Cvoid end mutable struct t8_cmesh_vertex_connectivity end @@ -11032,8 +11681,11 @@ const t8_cmesh_vertex_connectivity_c = Ptr{t8_cmesh_vertex_connectivity} void t8_cmesh_set_global_vertices_of_tree (const t8_cmesh_t cmesh, const t8_gloidx_t global_tree, const t8_gloidx_t *global_tree_vertices, const int num_vertices); ``` """ -function t8_cmesh_set_global_vertices_of_tree(cmesh, global_tree, global_tree_vertices, num_vertices) - @ccall libt8.t8_cmesh_set_global_vertices_of_tree(cmesh::Cint, global_tree::Cint, global_tree_vertices::Ptr{Cint}, num_vertices::Cint)::Cvoid +function t8_cmesh_set_global_vertices_of_tree(cmesh, global_tree, global_tree_vertices, + num_vertices) + @ccall libt8.t8_cmesh_set_global_vertices_of_tree(cmesh::Cint, global_tree::Cint, + global_tree_vertices::Ptr{Cint}, + num_vertices::Cint)::Cvoid end """ @@ -11069,7 +11721,8 @@ const t8_gloidx_t * t8_cmesh_get_global_vertices_of_tree (const t8_cmesh_t cmesh ``` """ function t8_cmesh_get_global_vertices_of_tree(cmesh, local_tree, num_vertices) - @ccall libt8.t8_cmesh_get_global_vertices_of_tree(cmesh::Cint, local_tree::Cint, num_vertices::Ptr{Cint})::Ptr{Cint} + @ccall libt8.t8_cmesh_get_global_vertices_of_tree(cmesh::Cint, local_tree::Cint, + num_vertices::Ptr{Cint})::Ptr{Cint} end """ @@ -11081,7 +11734,8 @@ t8_gloidx_t t8_cmesh_get_global_vertex_of_tree (const t8_cmesh_t cmesh, const t8 ``` """ function t8_cmesh_get_global_vertex_of_tree(cmesh, local_tree, local_tree_vertex) - @ccall libt8.t8_cmesh_get_global_vertex_of_tree(cmesh::Cint, local_tree::Cint, local_tree_vertex::Cint)::Cint + @ccall libt8.t8_cmesh_get_global_vertex_of_tree(cmesh::Cint, local_tree::Cint, + local_tree_vertex::Cint)::Cint end """ @@ -11141,7 +11795,8 @@ t8_element_array_t * t8_element_array_new (const t8_scheme_c *scheme, const t8_e ``` """ function t8_element_array_new(scheme, tree_class) - @ccall libt8.t8_element_array_new(scheme::Ptr{t8_scheme_c}, tree_class::t8_eclass_t)::Ptr{t8_element_array_t} + @ccall libt8.t8_element_array_new(scheme::Ptr{t8_scheme_c}, + tree_class::t8_eclass_t)::Ptr{t8_element_array_t} end """ @@ -11161,7 +11816,9 @@ t8_element_array_t * t8_element_array_new_count (const t8_scheme_c *scheme, cons ``` """ function t8_element_array_new_count(scheme, tree_class, num_elements) - @ccall libt8.t8_element_array_new_count(scheme::Ptr{t8_scheme_c}, tree_class::t8_eclass_t, num_elements::Csize_t)::Ptr{t8_element_array_t} + @ccall libt8.t8_element_array_new_count(scheme::Ptr{t8_scheme_c}, + tree_class::t8_eclass_t, + num_elements::Csize_t)::Ptr{t8_element_array_t} end """ @@ -11179,7 +11836,9 @@ void t8_element_array_init (t8_element_array_t *element_array, const t8_scheme_c ``` """ function t8_element_array_init(element_array, scheme, tree_class) - @ccall libt8.t8_element_array_init(element_array::Ptr{t8_element_array_t}, scheme::Ptr{t8_scheme_c}, tree_class::t8_eclass_t)::Cvoid + @ccall libt8.t8_element_array_init(element_array::Ptr{t8_element_array_t}, + scheme::Ptr{t8_scheme_c}, + tree_class::t8_eclass_t)::Cvoid end """ @@ -11198,7 +11857,10 @@ void t8_element_array_init_size (t8_element_array_t *element_array, const t8_sch ``` """ function t8_element_array_init_size(element_array, scheme, tree_class, num_elements) - @ccall libt8.t8_element_array_init_size(element_array::Ptr{t8_element_array_t}, scheme::Ptr{t8_scheme_c}, tree_class::t8_eclass_t, num_elements::Csize_t)::Cvoid + @ccall libt8.t8_element_array_init_size(element_array::Ptr{t8_element_array_t}, + scheme::Ptr{t8_scheme_c}, + tree_class::t8_eclass_t, + num_elements::Csize_t)::Cvoid end """ @@ -11217,7 +11879,9 @@ void t8_element_array_init_view (t8_element_array_t *view, const t8_element_arra ``` """ function t8_element_array_init_view(view, array, offset, length) - @ccall libt8.t8_element_array_init_view(view::Ptr{t8_element_array_t}, array::Ptr{t8_element_array_t}, offset::Csize_t, length::Csize_t)::Cvoid + @ccall libt8.t8_element_array_init_view(view::Ptr{t8_element_array_t}, + array::Ptr{t8_element_array_t}, offset::Csize_t, + length::Csize_t)::Cvoid end """ @@ -11237,7 +11901,11 @@ void t8_element_array_init_data (t8_element_array_t *view, const t8_element_t *b ``` """ function t8_element_array_init_data(view, base, scheme, tree_class, elem_count) - @ccall libt8.t8_element_array_init_data(view::Ptr{t8_element_array_t}, base::Ptr{t8_element_t}, scheme::Ptr{t8_scheme_c}, tree_class::t8_eclass_t, elem_count::Csize_t)::Cvoid + @ccall libt8.t8_element_array_init_data(view::Ptr{t8_element_array_t}, + base::Ptr{t8_element_t}, + scheme::Ptr{t8_scheme_c}, + tree_class::t8_eclass_t, + elem_count::Csize_t)::Cvoid end """ @@ -11257,7 +11925,11 @@ void t8_element_array_init_copy (t8_element_array_t *element_array, const t8_sch ``` """ function t8_element_array_init_copy(element_array, scheme, tree_class, data, num_elements) - @ccall libt8.t8_element_array_init_copy(element_array::Ptr{t8_element_array_t}, scheme::Ptr{t8_scheme_c}, tree_class::t8_eclass_t, data::Ptr{t8_element_t}, num_elements::Csize_t)::Cvoid + @ccall libt8.t8_element_array_init_copy(element_array::Ptr{t8_element_array_t}, + scheme::Ptr{t8_scheme_c}, + tree_class::t8_eclass_t, + data::Ptr{t8_element_t}, + num_elements::Csize_t)::Cvoid end """ @@ -11278,7 +11950,8 @@ void t8_element_array_resize (t8_element_array_t *element_array, const size_t ne ``` """ function t8_element_array_resize(element_array, new_count) - @ccall libt8.t8_element_array_resize(element_array::Ptr{t8_element_array_t}, new_count::Csize_t)::Cvoid + @ccall libt8.t8_element_array_resize(element_array::Ptr{t8_element_array_t}, + new_count::Csize_t)::Cvoid end """ @@ -11295,7 +11968,8 @@ void t8_element_array_copy (t8_element_array_t *dest, const t8_element_array_t * ``` """ function t8_element_array_copy(dest, src) - @ccall libt8.t8_element_array_copy(dest::Ptr{t8_element_array_t}, src::Ptr{t8_element_array_t})::Cvoid + @ccall libt8.t8_element_array_copy(dest::Ptr{t8_element_array_t}, + src::Ptr{t8_element_array_t})::Cvoid end """ @@ -11332,7 +12006,8 @@ t8_element_t * t8_element_array_push_count (t8_element_array_t *element_array, s ``` """ function t8_element_array_push_count(element_array, count) - @ccall libt8.t8_element_array_push_count(element_array::Ptr{t8_element_array_t}, count::Csize_t)::Ptr{t8_element_t} + @ccall libt8.t8_element_array_push_count(element_array::Ptr{t8_element_array_t}, + count::Csize_t)::Ptr{t8_element_t} end """ @@ -11351,7 +12026,8 @@ const t8_element_t * t8_element_array_index_locidx (const t8_element_array_t *el ``` """ function t8_element_array_index_locidx(element_array, index) - @ccall libt8.t8_element_array_index_locidx(element_array::Ptr{t8_element_array_t}, index::t8_locidx_t)::Ptr{t8_element_t} + @ccall libt8.t8_element_array_index_locidx(element_array::Ptr{t8_element_array_t}, + index::t8_locidx_t)::Ptr{t8_element_t} end """ @@ -11370,7 +12046,8 @@ const t8_element_t * t8_element_array_index_int (const t8_element_array_t *eleme ``` """ function t8_element_array_index_int(element_array, index) - @ccall libt8.t8_element_array_index_int(element_array::Ptr{t8_element_array_t}, index::Cint)::Ptr{t8_element_t} + @ccall libt8.t8_element_array_index_int(element_array::Ptr{t8_element_array_t}, + index::Cint)::Ptr{t8_element_t} end """ @@ -11389,7 +12066,8 @@ t8_element_t * t8_element_array_index_locidx_mutable (t8_element_array_t *elemen ``` """ function t8_element_array_index_locidx_mutable(element_array, index) - @ccall libt8.t8_element_array_index_locidx_mutable(element_array::Ptr{t8_element_array_t}, index::t8_locidx_t)::Ptr{t8_element_t} + @ccall libt8.t8_element_array_index_locidx_mutable(element_array::Ptr{t8_element_array_t}, + index::t8_locidx_t)::Ptr{t8_element_t} end """ @@ -11408,7 +12086,8 @@ t8_element_t * t8_element_array_index_int_mutable (t8_element_array_t *element_a ``` """ function t8_element_array_index_int_mutable(element_array, index) - @ccall libt8.t8_element_array_index_int_mutable(element_array::Ptr{t8_element_array_t}, index::Cint)::Ptr{t8_element_t} + @ccall libt8.t8_element_array_index_int_mutable(element_array::Ptr{t8_element_array_t}, + index::Cint)::Ptr{t8_element_t} end """ @@ -11570,7 +12249,7 @@ Search for an element in an array. # Arguments * `element_array`:\\[in\\] Array structure. -* `element`:\\[in\\] Element to be found in *element_array*. The element must have been created with the scheme used in *element_array*. +* `element`:\\[in\\] Element to be found in *element_array*. The element must have been created with the scheme used in *element_array*. # Returns If *element* was found in *element_array* then the position in the array is returned. If the element is not found, -1 is returned. ### Prototype @@ -11579,7 +12258,8 @@ t8_locidx_t t8_element_array_find (const t8_element_array_t *element_array, cons ``` """ function t8_element_array_find(element_array, element) - @ccall libt8.t8_element_array_find(element_array::Ptr{t8_element_array_t}, element::Ptr{t8_element_t})::t8_locidx_t + @ccall libt8.t8_element_array_find(element_array::Ptr{t8_element_array_t}, + element::Ptr{t8_element_t})::t8_locidx_t end """ @@ -11622,103 +12302,21 @@ function t8_element_array_truncate(element_array) @ccall libt8.t8_element_array_truncate(element_array::Ptr{t8_element_array_t})::Cvoid end -""" - t8_forest - -| Field | Note | -| :----------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| rc | Reference counter. | -| set\\_partition\\_offset | Flag indicating whether the partition range was set manually. | -| set\\_first\\_global\\_element | If set\\_partition\\_offset is true, the global ID of the first local element after partitioning. | -| set\\_level | Level to use in new construction. | -| set\\_for\\_coarsening | Change partition to allow for one round of coarsening | -| weight\\_function | Pointer to user defined element weight function. Nullptr for standard, element-based partitioning. | -| cmesh | Coarse mesh to use. | -| scheme | Scheme for element types. | -| maxlevel | The maximum allowed refinement level for elements in this forest. | -| maxlevel\\_existing | If >= 0, the maximum occurring refinement level of a forest element. | -| do\\_dup | Communicator shall be duped. | -| dimension | Dimension inferred from **cmesh**. | -| incomplete\\_trees | Flag to check whether the forest has (potential) incomplete trees. A tree is incomplete if an element has been removed from it. Once an element got removed, the flag sets to 1 (true) and stays. For a committed forest this flag is either true on all ranks or false on all ranks. | -| set\\_from | Temporarily store source forest. | -| from\\_method | Method to derive from **set_from**. | -| set\\_adapt\\_fn | refinement and coarsen function. Called when **from_method** is set to [`T8_FOREST_FROM_ADAPT`](@ref). | -| set\\_adapt\\_recursive | Flag to decide whether coarsen and refine are carried out recursive | -| set\\_balance | Flag to decide whether to forest will be balance in t8_forest_commit. See t8_forest_set_balance. If 0, no balance. If 1 balance with repartitioning, if 2 balance without repartitioning, # See also t8\\_forest\\_balance | -| do\\_ghost | If True, a ghost layer will be created when the forest is committed. | -| ghost\\_type | If a ghost layer will be created, the type of neighbors that count as ghost. | -| ghost\\_algorithm | Controls the algorithm used for ghost. 1 = balanced only. 2 = also unbalanced 3 = top-down search and unbalanced. | -| user\\_data | Pointer for arbitrary user data. # See also [`t8_forest_set_user_data`](@ref). | -| user\\_function | Pointer for arbitrary user function. # See also [`t8_forest_set_user_function`](@ref). | -| t8code\\_data | Pointer for arbitrary data that is used internally. | -| committed | t8_forest_commit called? | -| mpisize | Number of MPI processes. | -| mpirank | Number of this MPI process. | -| first\\_local\\_tree | The global index of the first local tree on this process. If first\\_local\\_tree is larger than last\\_local\\_tree then this processor/forest is empty. See https://github.com/DLR-AMR/t8code/wiki/Tree-indexing | -| last\\_local\\_tree | The global index of the last local tree on this process. -1 if this processor is empty. | -| global\\_num\\_trees | The total number of global trees. | -| trees | The array of trees. | -| ghosts | If not NULL, the ghost elements. # See also [`t8_forest_ghost`](@ref).h | -| element\\_offsets | If partitioned, for each process the global index of its first element. Since it is memory consuming, it is usually only constructed when needed and otherwise unallocated. | -| global\\_first\\_desc | If partitioned, for each process the linear id (at maxlevel) of its first element's first descendant. t8_element_set_linear_id. Stores 0 for empty processes. Since it is memory consuming, it is usually only constructed when needed and otherwise unallocated. | -| tree\\_offsets | If partitioned for each process the global index of its first local tree or -(first local tree) - 1 if the first tree on that process is shared. Since this is memory consuming we only construct it when needed. This array follows the same logic as *tree_offsets* in [`t8_cmesh_t`](@ref) | -| local\\_num\\_leaf\\_elements | Number of leaf elements on this processor. | -| global\\_num\\_leaf\\_elements | Number of leaf elements on all processors. | -| profile | If not NULL, runtimes and statistics about forest\\_commit are stored here. | -| stats | The SC profiling stats of the forest. | -| stats\\_computed | Switch indicating whether the profiling stats have been compute (1) or not (0) | -""" -# This struct is not supposed to be read and modified directly. -# Besides, there is a circular dependency with `t8_forest_t` -# leading to an error output by Julia. +mutable struct t8_forest_ghost_definition end + +"""This typedef holds virtual functions for a particular ghost definition. We need it so that we can use t8\\_ghost\\_definition\\_c pointers in .c files without them seeing the actual C++ code (and then not compiling)""" +const t8_forest_ghost_definition_c = t8_forest_ghost_definition + mutable struct t8_forest end """Opaque pointer to a forest implementation.""" const t8_forest_t = Ptr{t8_forest} -""" - t8_tree - -The t8 tree datatype - -| Field | Note | -| :---------------- | :----------------------------------------------------------------- | -| leaf\\_elements | locally stored leaf elements | -| eclass | The element class of this tree | -| first\\_desc | first local descendant | -| last\\_desc | last local descendant | -| elements\\_offset | cumulative sum over earlier trees on this processor (locals only) | -""" -struct t8_tree - leaf_elements::t8_element_array_t - eclass::t8_eclass_t - first_desc::Ptr{t8_element_t} - last_desc::Ptr{t8_element_t} - elements_offset::t8_locidx_t -end +mutable struct t8_tree end """Opaque pointer to a tree implementation.""" const t8_tree_t = Ptr{t8_tree} -""" - t8_ghost_type_t - -This type controls, which neighbors count as ghost elements. Currently, we support face-neighbors. Vertex and edge neighbors will eventually be added. - -| Enumerator | Note | -| :-------------------- | :---------------------------------------------------------------- | -| T8\\_GHOST\\_NONE | Do not create ghost layer. | -| T8\\_GHOST\\_FACES | Consider all face (codimension 1) neighbors. | -| T8\\_GHOST\\_EDGES | Consider all edge (codimension 2) and face neighbors. | -| T8\\_GHOST\\_VERTICES | Consider all vertex (codimension 3) and edge and face neighbors. | -""" -@cenum t8_ghost_type_t::UInt32 begin - T8_GHOST_NONE = 0 - T8_GHOST_FACES = 1 - T8_GHOST_EDGES = 2 - T8_GHOST_VERTICES = 3 -end - # typedef void ( * t8_generic_function_pointer ) ( void ) """ This typedef is needed as a helper construct to properly be able to define a function that returns a pointer to a void fun(void) function. @@ -11830,6 +12428,24 @@ function t8_forest_is_committed(forest) @ccall libt8.t8_forest_is_committed(forest::t8_forest_t)::Cint end +""" + t8_forest_has_incomplete_trees(forest) + +Check whether a committed forest has (potentially) incomplete trees. A tree is incomplete if an element has been removed from it. + +# Arguments +* `forest`:\\[in\\] A committed forest. +# Returns +True if *forest* has (potentially) incomplete trees, false otherwise. The result is the same on all processes. +### Prototype +```c +int t8_forest_has_incomplete_trees (const t8_forest_t forest); +``` +""" +function t8_forest_has_incomplete_trees(forest) + @ccall libt8.t8_forest_has_incomplete_trees(forest::t8_forest_t)::Cint +end + """ t8_forest_no_overlap(forest) @@ -11887,7 +12503,8 @@ void t8_forest_set_cmesh (t8_forest_t forest, t8_cmesh_t cmesh, sc_MPI_Comm comm ``` """ function t8_forest_set_cmesh(forest, cmesh, comm) - @ccall libt8.t8_forest_set_cmesh(forest::t8_forest_t, cmesh::t8_cmesh_t, comm::MPI_Comm)::Cvoid + @ccall libt8.t8_forest_set_cmesh(forest::t8_forest_t, cmesh::t8_cmesh_t, + comm::MPI_Comm)::Cvoid end """ @@ -11949,6 +12566,24 @@ function t8_forest_set_copy(forest, from) @ccall libt8.t8_forest_set_copy(forest::t8_forest_t, from::t8_forest_t)::Cvoid end +""" + t8_forest_get_set_from(forest) + +Get the forest from which a not yet committed forest is derived in t8_forest_commit. + +# Arguments +* `forest`:\\[in\\] An initialized, not committed forest. +# Returns +The source forest passed to t8_forest_set_copy, t8_forest_set_adapt, t8_forest_set_partition, or t8_forest_set_balance. NULL if none of these functions has been called with a source forest yet. +### Prototype +```c +t8_forest_t t8_forest_get_set_from (const t8_forest_t forest); +``` +""" +function t8_forest_get_set_from(forest) + @ccall libt8.t8_forest_get_set_from(forest::t8_forest_t)::t8_forest_t +end + """ t8_forest_set_adapt(forest, set_from, adapt_fn, recursive) @@ -11973,7 +12608,8 @@ void t8_forest_set_adapt (t8_forest_t forest, const t8_forest_t set_from, t8_for ``` """ function t8_forest_set_adapt(forest, set_from, adapt_fn, recursive) - @ccall libt8.t8_forest_set_adapt(forest::t8_forest_t, set_from::t8_forest_t, adapt_fn::t8_forest_adapt_t, recursive::Cint)::Cvoid + @ccall libt8.t8_forest_set_adapt(forest::t8_forest_t, set_from::t8_forest_t, + adapt_fn::t8_forest_adapt_t, recursive::Cint)::Cvoid end """ @@ -12038,7 +12674,8 @@ void t8_forest_set_user_function (t8_forest_t forest, t8_generic_function_pointe ``` """ function t8_forest_set_user_function(forest, _function) - @ccall libt8.t8_forest_set_user_function(forest::t8_forest_t, _function::t8_generic_function_pointer)::Cvoid + @ccall libt8.t8_forest_set_user_function(forest::t8_forest_t, + _function::t8_generic_function_pointer)::Cvoid end """ @@ -12085,15 +12722,52 @@ void t8_forest_set_partition (t8_forest_t forest, const t8_forest_t set_from, in ``` """ function t8_forest_set_partition(forest, set_from, set_for_coarsening) - @ccall libt8.t8_forest_set_partition(forest::t8_forest_t, set_from::t8_forest_t, set_for_coarsening::Cint)::Cvoid + @ccall libt8.t8_forest_set_partition(forest::t8_forest_t, set_from::t8_forest_t, + set_for_coarsening::Cint)::Cvoid end """ - t8_forest_set_partition_weight_function(forest, weight_callback) - -Set a user-defined weight function to guide the partitioning. + t8_forest_partition_is_set(forest, set_for_coarsening) -\\pre *weight_callback* must be free of side effects (like changing the forest, some global state, etc.), the behavior is undefined otherwise. +Query whether a forest is set to be partitioned during commit, see t8_forest_set_partition. + +# Arguments +* `forest`:\\[in\\] An initialized, not committed forest. +* `set_for_coarsening`:\\[out\\] The *set_for_coarsening* argument of t8_forest_set_partition if the forest is set to be partitioned, false otherwise. May be NULL, if the argument is not needed. +# Returns +True if the forest is set to be partitioned, false otherwise. +### Prototype +```c +int t8_forest_partition_is_set (const t8_forest_t forest, int *set_for_coarsening); +``` +""" +function t8_forest_partition_is_set(forest, set_for_coarsening) + @ccall libt8.t8_forest_partition_is_set(forest::t8_forest_t, + set_for_coarsening::Ptr{Cint})::Cint +end + +""" + t8_forest_unset_partition(forest) + +Undo t8_forest_set_partition, such that the forest is not partitioned during commit. If the forest is set to be neither adapted nor balanced, it is copied from its source forest during commit. Nothing happens if the forest is not set to be partitioned. + +# Arguments +* `forest`:\\[in,out\\] An initialized, not committed forest. +### Prototype +```c +void t8_forest_unset_partition (t8_forest_t forest); +``` +""" +function t8_forest_unset_partition(forest) + @ccall libt8.t8_forest_unset_partition(forest::t8_forest_t)::Cvoid +end + +""" + t8_forest_set_partition_weight_function(forest, weight_callback) + +Set a user-defined weight function to guide the partitioning. + +\\pre *weight_callback* must be free of side effects (like changing the forest, some global state, etc.), the behavior is undefined otherwise. !!! note @@ -12108,7 +12782,8 @@ void t8_forest_set_partition_weight_function (t8_forest_t forest, t8_weight_fcn_ ``` """ function t8_forest_set_partition_weight_function(forest, weight_callback) - @ccall libt8.t8_forest_set_partition_weight_function(forest::t8_forest_t, weight_callback::Ptr{t8_weight_fcn_t})::Cvoid + @ccall libt8.t8_forest_set_partition_weight_function(forest::t8_forest_t, + weight_callback::Ptr{t8_weight_fcn_t})::Cvoid end """ @@ -12134,7 +12809,49 @@ void t8_forest_set_balance (t8_forest_t forest, const t8_forest_t set_from, int ``` """ function t8_forest_set_balance(forest, set_from, no_repartition) - @ccall libt8.t8_forest_set_balance(forest::t8_forest_t, set_from::t8_forest_t, no_repartition::Cint)::Cvoid + @ccall libt8.t8_forest_set_balance(forest::t8_forest_t, set_from::t8_forest_t, + no_repartition::Cint)::Cvoid +end + +""" + t8_forest_balance_is_set(forest, no_repartition) + +Query whether a forest is set to be balanced during commit, see t8_forest_set_balance. + +# Arguments +* `forest`:\\[in\\] An initialized, not committed forest. +* `no_repartition`:\\[out\\] The *no_repartition* argument of t8_forest_set_balance if the forest is set to be balanced, false otherwise. May be NULL, if the argument is not needed. +# Returns +True if the forest is set to be balanced, false otherwise. +### Prototype +```c +int t8_forest_balance_is_set (const t8_forest_t forest, int *no_repartition); +``` +""" +function t8_forest_balance_is_set(forest, no_repartition) + @ccall libt8.t8_forest_balance_is_set(forest::t8_forest_t, + no_repartition::Ptr{Cint})::Cint +end + +""" + t8_ghost_type_t + +This type controls, which neighbors count as ghost elements. Currently, we support face-neighbors. Vertex and edge neighbors will eventually be added. + +| Enumerator | Note | +| :-------------------- | :---------------------------------------------------------------- | +| T8\\_GHOST\\_NONE | Do not create ghost layer. | +| T8\\_GHOST\\_FACES | Consider all face (codimension 1) neighbors. | +| T8\\_GHOST\\_EDGES | Consider all edge (codimension 2) and face neighbors. | +| T8\\_GHOST\\_VERTICES | Consider all vertex (codimension 3) and edge and face neighbors. | +| T8\\_GHOST\\_COUNT | Number of ghost types | +""" +@cenum t8_ghost_type_t::UInt32 begin + T8_GHOST_NONE = 0 + T8_GHOST_FACES = 1 + T8_GHOST_EDGES = 2 + T8_GHOST_VERTICES = 3 + T8_GHOST_COUNT = 4 end """ @@ -12152,29 +12869,63 @@ void t8_forest_set_ghost (t8_forest_t forest, int do_ghost, t8_ghost_type_t ghos ``` """ function t8_forest_set_ghost(forest, do_ghost, ghost_type) - @ccall libt8.t8_forest_set_ghost(forest::t8_forest_t, do_ghost::Cint, ghost_type::t8_ghost_type_t)::Cvoid + @ccall libt8.t8_forest_set_ghost(forest::t8_forest_t, do_ghost::Cint, + ghost_type::t8_ghost_type_t)::Cvoid end """ - t8_forest_set_ghost_ext(forest, do_ghost, ghost_type, ghost_version) + t8_forest_set_ghost_ext(forest, do_ghost, ghost_definition) -Like t8_forest_set_ghost but with the additional options to change the ghost algorithm. This is used for debugging and timing the algorithm. An application should almost always use t8_forest_set_ghost. +Set a specific ghost\\_definition for a forest. This is used when the application defines its own ghost\\_definition class. # Arguments * `forest`:\\[in\\] The forest. -* `do_ghost`:\\[in\\] If non-zero a ghost layer will be created. -* `ghost_type`:\\[in\\] Controls which neighbors count as ghost elements, currently only T8\\_GHOST\\_FACES is supported. This value is ignored if *do_ghost* = 0. -* `ghost_version`:\\[in\\] If 1, the iterative ghost algorithm for balanced forests is used. If 2, the iterative algorithm for unbalanced forests. If 3, the top-down search algorithm for unbalanced forests. -# See also -[`t8_forest_set_ghost`](@ref) +* `do_ghost`:\\[in\\] If 0 no ghost layer will be computed. +* `ghost_definition`:\\[in\\] Pointer to an object of the class ghost\\_definition or a derived class The forest takes ownership of the ghost\\_definition. Can be nullptr if the forest already owns a definition or *do_ghost* is set to 0. +### Prototype +```c +void t8_forest_set_ghost_ext (t8_forest_t forest, const int do_ghost, t8_forest_ghost_definition_c *ghost_definition); +``` +""" +function t8_forest_set_ghost_ext(forest, do_ghost, ghost_definition) + @ccall libt8.t8_forest_set_ghost_ext(forest::t8_forest_t, do_ghost::Cint, + ghost_definition::Ptr{t8_forest_ghost_definition_c})::Cvoid +end +""" + t8_forest_ghost_is_set(forest) + +Query whether a ghost layer is set to be created during commit, see t8_forest_set_ghost and t8_forest_set_ghost_ext. + +# Arguments +* `forest`:\\[in\\] An initialized, not committed forest. +# Returns +True if a ghost layer is set to be created, false otherwise. +### Prototype +```c +int t8_forest_ghost_is_set (const t8_forest_t forest); +``` +""" +function t8_forest_ghost_is_set(forest) + @ccall libt8.t8_forest_ghost_is_set(forest::t8_forest_t)::Cint +end + +""" + t8_forest_get_ghost_definition(forest) + +Get the ghost definition of a forest, see t8_forest_set_ghost_ext. The forest keeps the ownership of the ghost definition. + +# Arguments +* `forest`:\\[in\\] An initialized or committed forest. +# Returns +The ghost definition of the forest. NULL if the forest has no ghost definition. ### Prototype ```c -void t8_forest_set_ghost_ext (t8_forest_t forest, int do_ghost, t8_ghost_type_t ghost_type, int ghost_version); +t8_forest_ghost_definition_c * t8_forest_get_ghost_definition (const t8_forest_t forest); ``` """ -function t8_forest_set_ghost_ext(forest, do_ghost, ghost_type, ghost_version) - @ccall libt8.t8_forest_set_ghost_ext(forest::t8_forest_t, do_ghost::Cint, ghost_type::t8_ghost_type_t, ghost_version::Cint)::Cvoid +function t8_forest_get_ghost_definition(forest) + @ccall libt8.t8_forest_get_ghost_definition(forest::t8_forest_t)::Ptr{t8_forest_ghost_definition_c} end """ @@ -12316,7 +13067,8 @@ t8_eclass_t t8_forest_get_eclass (const t8_forest_t forest, const t8_locidx_t lt ``` """ function t8_forest_get_eclass(forest, ltreeid) - @ccall libt8.t8_forest_get_eclass(forest::t8_forest_t, ltreeid::t8_locidx_t)::t8_eclass_t + @ccall libt8.t8_forest_get_eclass(forest::t8_forest_t, + ltreeid::t8_locidx_t)::t8_eclass_t end """ @@ -12357,7 +13109,8 @@ t8_locidx_t t8_forest_get_local_id (const t8_forest_t forest, const t8_gloidx_t ``` """ function t8_forest_get_local_id(forest, gtreeid) - @ccall libt8.t8_forest_get_local_id(forest::t8_forest_t, gtreeid::t8_gloidx_t)::t8_locidx_t + @ccall libt8.t8_forest_get_local_id(forest::t8_forest_t, + gtreeid::t8_gloidx_t)::t8_locidx_t end """ @@ -12379,7 +13132,8 @@ t8_locidx_t t8_forest_get_local_or_ghost_id (const t8_forest_t forest, const t8_ ``` """ function t8_forest_get_local_or_ghost_id(forest, gtreeid) - @ccall libt8.t8_forest_get_local_or_ghost_id(forest::t8_forest_t, gtreeid::t8_gloidx_t)::t8_locidx_t + @ccall libt8.t8_forest_get_local_or_ghost_id(forest::t8_forest_t, + gtreeid::t8_gloidx_t)::t8_locidx_t end """ @@ -12405,7 +13159,8 @@ t8_locidx_t t8_forest_ltreeid_to_cmesh_ltreeid (t8_forest_t forest, t8_locidx_t ``` """ function t8_forest_ltreeid_to_cmesh_ltreeid(forest, ltreeid) - @ccall libt8.t8_forest_ltreeid_to_cmesh_ltreeid(forest::t8_forest_t, ltreeid::t8_locidx_t)::t8_locidx_t + @ccall libt8.t8_forest_ltreeid_to_cmesh_ltreeid(forest::t8_forest_t, + ltreeid::t8_locidx_t)::t8_locidx_t end """ @@ -12431,7 +13186,8 @@ t8_locidx_t t8_forest_cmesh_ltreeid_to_ltreeid (t8_forest_t forest, t8_locidx_t ``` """ function t8_forest_cmesh_ltreeid_to_ltreeid(forest, lctreeid) - @ccall libt8.t8_forest_cmesh_ltreeid_to_ltreeid(forest::t8_forest_t, lctreeid::t8_locidx_t)::t8_locidx_t + @ccall libt8.t8_forest_cmesh_ltreeid_to_ltreeid(forest::t8_forest_t, + lctreeid::t8_locidx_t)::t8_locidx_t end """ @@ -12450,7 +13206,8 @@ t8_ctree_t t8_forest_get_coarse_tree (t8_forest_t forest, t8_locidx_t ltreeid); ``` """ function t8_forest_get_coarse_tree(forest, ltreeid) - @ccall libt8.t8_forest_get_coarse_tree(forest::t8_forest_t, ltreeid::t8_locidx_t)::t8_ctree_t + @ccall libt8.t8_forest_get_coarse_tree(forest::t8_forest_t, + ltreeid::t8_locidx_t)::t8_ctree_t end """ @@ -12478,7 +13235,8 @@ int t8_forest_element_is_leaf (const t8_forest_t forest, const t8_element_t *ele ``` """ function t8_forest_element_is_leaf(forest, element, local_tree) - @ccall libt8.t8_forest_element_is_leaf(forest::t8_forest_t, element::Ptr{t8_element_t}, local_tree::t8_locidx_t)::Cint + @ccall libt8.t8_forest_element_is_leaf(forest::t8_forest_t, element::Ptr{t8_element_t}, + local_tree::t8_locidx_t)::Cint end """ @@ -12503,7 +13261,10 @@ int t8_forest_element_is_leaf_or_ghost (const t8_forest_t forest, const t8_eleme ``` """ function t8_forest_element_is_leaf_or_ghost(forest, element, local_tree, check_ghost) - @ccall libt8.t8_forest_element_is_leaf_or_ghost(forest::t8_forest_t, element::Ptr{t8_element_t}, local_tree::t8_locidx_t, check_ghost::Cint)::Cint + @ccall libt8.t8_forest_element_is_leaf_or_ghost(forest::t8_forest_t, + element::Ptr{t8_element_t}, + local_tree::t8_locidx_t, + check_ghost::Cint)::Cint end """ @@ -12527,7 +13288,9 @@ int t8_forest_leaf_face_orientation (t8_forest_t forest, const t8_locidx_t ltree ``` """ function t8_forest_leaf_face_orientation(forest, ltreeid, scheme, leaf, face) - @ccall libt8.t8_forest_leaf_face_orientation(forest::t8_forest_t, ltreeid::t8_locidx_t, scheme::Ptr{t8_scheme_c}, leaf::Ptr{t8_element_t}, face::Cint)::Cint + @ccall libt8.t8_forest_leaf_face_orientation(forest::t8_forest_t, ltreeid::t8_locidx_t, + scheme::Ptr{t8_scheme_c}, + leaf::Ptr{t8_element_t}, face::Cint)::Cint end """ @@ -12568,8 +13331,16 @@ if (num\\_neighbors > 0) { [`T8_FREE`](@ref) (pneighbor\\_leaves); [`T8_FREE`](@ void t8_forest_leaf_face_neighbors (const t8_forest_t forest, const t8_locidx_t ltreeid, const t8_element_t *leaf, const t8_element_t **pneighbor_leaves[], const int face, int *dual_faces[], int *num_neighbors, t8_locidx_t **pelement_indices, t8_eclass_t *pneigh_eclass); ``` """ -function t8_forest_leaf_face_neighbors(forest, ltreeid, leaf, pneighbor_leaves, face, dual_faces, num_neighbors, pelement_indices, pneigh_eclass) - @ccall libt8.t8_forest_leaf_face_neighbors(forest::t8_forest_t, ltreeid::t8_locidx_t, leaf::Ptr{t8_element_t}, pneighbor_leaves::Ptr{Ptr{Ptr{t8_element_t}}}, face::Cint, dual_faces::Ptr{Ptr{Cint}}, num_neighbors::Ptr{Cint}, pelement_indices::Ptr{Ptr{t8_locidx_t}}, pneigh_eclass::Ptr{t8_eclass_t})::Cvoid +function t8_forest_leaf_face_neighbors(forest, ltreeid, leaf, pneighbor_leaves, face, + dual_faces, num_neighbors, pelement_indices, + pneigh_eclass) + @ccall libt8.t8_forest_leaf_face_neighbors(forest::t8_forest_t, ltreeid::t8_locidx_t, + leaf::Ptr{t8_element_t}, + pneighbor_leaves::Ptr{Ptr{Ptr{t8_element_t}}}, + face::Cint, dual_faces::Ptr{Ptr{Cint}}, + num_neighbors::Ptr{Cint}, + pelement_indices::Ptr{Ptr{t8_locidx_t}}, + pneigh_eclass::Ptr{t8_eclass_t})::Cvoid end """ @@ -12608,8 +13379,20 @@ if (num\\_neighbors > 0) { [`T8_FREE`](@ref) (pneighbor\\_leaves); [`T8_FREE`](@ void t8_forest_leaf_face_neighbors_ext (const t8_forest_t forest, const t8_locidx_t ltreeid, const t8_element_t *leaf_or_ghost, const t8_element_t **pneighbor_leaves[], const int face, int *dual_faces[], int *num_neighbors, t8_locidx_t **pelement_indices, t8_eclass_t *pneigh_eclass, t8_gloidx_t *gneigh_tree, int *orientation); ``` """ -function t8_forest_leaf_face_neighbors_ext(forest, ltreeid, leaf_or_ghost, pneighbor_leaves, face, dual_faces, num_neighbors, pelement_indices, pneigh_eclass, gneigh_tree, orientation) - @ccall libt8.t8_forest_leaf_face_neighbors_ext(forest::t8_forest_t, ltreeid::t8_locidx_t, leaf_or_ghost::Ptr{t8_element_t}, pneighbor_leaves::Ptr{Ptr{Ptr{t8_element_t}}}, face::Cint, dual_faces::Ptr{Ptr{Cint}}, num_neighbors::Ptr{Cint}, pelement_indices::Ptr{Ptr{t8_locidx_t}}, pneigh_eclass::Ptr{t8_eclass_t}, gneigh_tree::Ptr{t8_gloidx_t}, orientation::Ptr{Cint})::Cvoid +function t8_forest_leaf_face_neighbors_ext(forest, ltreeid, leaf_or_ghost, pneighbor_leaves, + face, dual_faces, num_neighbors, + pelement_indices, pneigh_eclass, gneigh_tree, + orientation) + @ccall libt8.t8_forest_leaf_face_neighbors_ext(forest::t8_forest_t, + ltreeid::t8_locidx_t, + leaf_or_ghost::Ptr{t8_element_t}, + pneighbor_leaves::Ptr{Ptr{Ptr{t8_element_t}}}, + face::Cint, dual_faces::Ptr{Ptr{Cint}}, + num_neighbors::Ptr{Cint}, + pelement_indices::Ptr{Ptr{t8_locidx_t}}, + pneigh_eclass::Ptr{t8_eclass_t}, + gneigh_tree::Ptr{t8_gloidx_t}, + orientation::Ptr{Cint})::Cvoid end """ @@ -12634,8 +13417,13 @@ The index of the face neighbor leaf (local element or ghost). t8_locidx_t t8_forest_same_level_leaf_face_neighbor_index (const t8_forest_t forest, const t8_locidx_t element_index, const int face_index, const t8_gloidx_t global_treeid, int *dual_face); ``` """ -function t8_forest_same_level_leaf_face_neighbor_index(forest, element_index, face_index, global_treeid, dual_face) - @ccall libt8.t8_forest_same_level_leaf_face_neighbor_index(forest::t8_forest_t, element_index::t8_locidx_t, face_index::Cint, global_treeid::t8_gloidx_t, dual_face::Ptr{Cint})::t8_locidx_t +function t8_forest_same_level_leaf_face_neighbor_index(forest, element_index, face_index, + global_treeid, dual_face) + @ccall libt8.t8_forest_same_level_leaf_face_neighbor_index(forest::t8_forest_t, + element_index::t8_locidx_t, + face_index::Cint, + global_treeid::t8_gloidx_t, + dual_face::Ptr{Cint})::t8_locidx_t end """ @@ -12647,7 +13435,7 @@ Compute the subface index for a coarser neighbor !!! note - This function is designed to be called after t8_forest_leaf_face_neighbors_ext to complement its output. It is primarily intended for balanced forests, but can be used on any committed forest as long as the preconditions hold (i.e. the forest must be ''locally balanced''). + This function is designed to be called after t8_forest_leaf_face_neighbors_ext to complement its output. It is primarily intended for balanced forests, but can be used on any committed forest as long as the preconditions hold (i.e. the forest must be ''locally balanced''). # Arguments * `forest`:\\[in\\] The forest. Must be committed. @@ -12664,8 +13452,13 @@ The index of the subface of *neighbor_face* which corresponds to *face*. int t8_forest_leaf_neighbor_subface (t8_forest_t forest, t8_locidx_t ltreeid, const t8_element_t *leaf, int face, t8_eclass_t neighbor_tree_class, const t8_element_t *neighbor_leaf, int neighbor_face); ``` """ -function t8_forest_leaf_neighbor_subface(forest, ltreeid, leaf, face, neighbor_tree_class, neighbor_leaf, neighbor_face) - @ccall libt8.t8_forest_leaf_neighbor_subface(forest::t8_forest_t, ltreeid::t8_locidx_t, leaf::Ptr{t8_element_t}, face::Cint, neighbor_tree_class::t8_eclass_t, neighbor_leaf::Ptr{t8_element_t}, neighbor_face::Cint)::Cint +function t8_forest_leaf_neighbor_subface(forest, ltreeid, leaf, face, neighbor_tree_class, + neighbor_leaf, neighbor_face) + @ccall libt8.t8_forest_leaf_neighbor_subface(forest::t8_forest_t, ltreeid::t8_locidx_t, + leaf::Ptr{t8_element_t}, face::Cint, + neighbor_tree_class::t8_eclass_t, + neighbor_leaf::Ptr{t8_element_t}, + neighbor_face::Cint)::Cint end """ @@ -12686,7 +13479,8 @@ void t8_forest_ghost_exchange_data (t8_forest_t forest, sc_array_t *element_data ``` """ function t8_forest_ghost_exchange_data(forest, element_data) - @ccall libt8.t8_forest_ghost_exchange_data(forest::t8_forest_t, element_data::Ptr{sc_array_t})::Cvoid + @ccall libt8.t8_forest_ghost_exchange_data(forest::t8_forest_t, + element_data::Ptr{sc_array_t})::Cvoid end """ @@ -12712,7 +13506,8 @@ void t8_forest_partition_cmesh (t8_forest_t forest, sc_MPI_Comm comm, int set_pr ``` """ function t8_forest_partition_cmesh(forest, comm, set_profiling) - @ccall libt8.t8_forest_partition_cmesh(forest::t8_forest_t, comm::MPI_Comm, set_profiling::Cint)::Cvoid + @ccall libt8.t8_forest_partition_cmesh(forest::t8_forest_t, comm::MPI_Comm, + set_profiling::Cint)::Cvoid end """ @@ -12727,6 +13522,42 @@ function t8_forest_get_mpicomm(forest) @ccall libt8.t8_forest_get_mpicomm(forest::t8_forest_t)::MPI_Comm end +""" + t8_forest_get_mpirank(forest) + +Return the rank of this process in the mpi communicator of a forest. + +# Arguments +* `forest`:\\[in\\] The forest. +# Returns +The rank of this process in the communicator of *forest*. *forest* must be committed before calling this function. +### Prototype +```c +int t8_forest_get_mpirank (const t8_forest_t forest); +``` +""" +function t8_forest_get_mpirank(forest) + @ccall libt8.t8_forest_get_mpirank(forest::t8_forest_t)::Cint +end + +""" + t8_forest_get_mpisize(forest) + +Return the number of processes in the mpi communicator of a forest. + +# Arguments +* `forest`:\\[in\\] The forest. +# Returns +The number of processes in the communicator of *forest*. *forest* must be committed before calling this function. +### Prototype +```c +int t8_forest_get_mpisize (const t8_forest_t forest); +``` +""" +function t8_forest_get_mpisize(forest) + @ccall libt8.t8_forest_get_mpisize(forest::t8_forest_t)::Cint +end + """ t8_forest_get_first_local_tree_id(forest) @@ -12818,7 +13649,8 @@ t8_gloidx_t t8_forest_global_tree_id (const t8_forest_t forest, const t8_locidx_ ``` """ function t8_forest_global_tree_id(forest, ltreeid) - @ccall libt8.t8_forest_global_tree_id(forest::t8_forest_t, ltreeid::t8_locidx_t)::t8_gloidx_t + @ccall libt8.t8_forest_global_tree_id(forest::t8_forest_t, + ltreeid::t8_locidx_t)::t8_gloidx_t end """ @@ -12856,7 +13688,8 @@ double * t8_forest_get_tree_vertices (t8_forest_t forest, t8_locidx_t ltreeid); ``` """ function t8_forest_get_tree_vertices(forest, ltreeid) - @ccall libt8.t8_forest_get_tree_vertices(forest::t8_forest_t, ltreeid::t8_locidx_t)::Ptr{Cdouble} + @ccall libt8.t8_forest_get_tree_vertices(forest::t8_forest_t, + ltreeid::t8_locidx_t)::Ptr{Cdouble} end """ @@ -12875,7 +13708,8 @@ t8_element_array_t * t8_forest_tree_get_leaf_elements (const t8_forest_t forest, ``` """ function t8_forest_tree_get_leaf_elements(forest, ltree_id) - @ccall libt8.t8_forest_tree_get_leaf_elements(forest::t8_forest_t, ltree_id::t8_locidx_t)::Ptr{t8_element_array_t} + @ccall libt8.t8_forest_tree_get_leaf_elements(forest::t8_forest_t, + ltree_id::t8_locidx_t)::Ptr{t8_element_array_t} end """ @@ -12912,7 +13746,7 @@ Return a leaf element of the forest. # Returns A pointer to the leaf element. NULL if this element does not exist. Ghost elements are not considered as local. # See also -t8\\_forest\\_ghost\\_get\\_leaf\\_element to access ghost leaf elements. +[`t8_forest_ghost_get_leaf_element`](@ref) to access ghost leaf elements. ### Prototype ```c @@ -12920,7 +13754,8 @@ t8_element_t * t8_forest_get_leaf_element (t8_forest_t forest, t8_locidx_t lelem ``` """ function t8_forest_get_leaf_element(forest, lelement_id, ltreeid) - @ccall libt8.t8_forest_get_leaf_element(forest::t8_forest_t, lelement_id::t8_locidx_t, ltreeid::Ptr{t8_locidx_t})::Ptr{t8_element_t} + @ccall libt8.t8_forest_get_leaf_element(forest::t8_forest_t, lelement_id::t8_locidx_t, + ltreeid::Ptr{t8_locidx_t})::Ptr{t8_element_t} end """ @@ -12947,7 +13782,9 @@ const t8_element_t * t8_forest_get_leaf_element_in_tree (t8_forest_t forest, t8_ ``` """ function t8_forest_get_leaf_element_in_tree(forest, ltreeid, leid_in_tree) - @ccall libt8.t8_forest_get_leaf_element_in_tree(forest::t8_forest_t, ltreeid::t8_locidx_t, leid_in_tree::t8_locidx_t)::Ptr{t8_element_t} + @ccall libt8.t8_forest_get_leaf_element_in_tree(forest::t8_forest_t, + ltreeid::t8_locidx_t, + leid_in_tree::t8_locidx_t)::Ptr{t8_element_t} end """ @@ -12966,7 +13803,8 @@ t8_locidx_t t8_forest_get_tree_num_leaf_elements (t8_forest_t forest, t8_locidx_ ``` """ function t8_forest_get_tree_num_leaf_elements(forest, ltreeid) - @ccall libt8.t8_forest_get_tree_num_leaf_elements(forest::t8_forest_t, ltreeid::t8_locidx_t)::t8_locidx_t + @ccall libt8.t8_forest_get_tree_num_leaf_elements(forest::t8_forest_t, + ltreeid::t8_locidx_t)::t8_locidx_t end """ @@ -12989,7 +13827,8 @@ t8_locidx_t t8_forest_get_tree_element_offset (const t8_forest_t forest, const t ``` """ function t8_forest_get_tree_element_offset(forest, ltreeid) - @ccall libt8.t8_forest_get_tree_element_offset(forest::t8_forest_t, ltreeid::t8_locidx_t)::t8_locidx_t + @ccall libt8.t8_forest_get_tree_element_offset(forest::t8_forest_t, + ltreeid::t8_locidx_t)::t8_locidx_t end """ @@ -13026,7 +13865,8 @@ t8_eclass_t t8_forest_get_tree_class (const t8_forest_t forest, const t8_locidx_ ``` """ function t8_forest_get_tree_class(forest, ltreeid) - @ccall libt8.t8_forest_get_tree_class(forest::t8_forest_t, ltreeid::t8_locidx_t)::t8_eclass_t + @ccall libt8.t8_forest_get_tree_class(forest::t8_forest_t, + ltreeid::t8_locidx_t)::t8_eclass_t end """ @@ -13086,7 +13926,10 @@ t8_eclass_t t8_forest_element_neighbor_eclass (const t8_forest_t forest, const t ``` """ function t8_forest_element_neighbor_eclass(forest, ltreeid, elem, face) - @ccall libt8.t8_forest_element_neighbor_eclass(forest::t8_forest_t, ltreeid::t8_locidx_t, elem::Ptr{t8_element_t}, face::Cint)::t8_eclass_t + @ccall libt8.t8_forest_element_neighbor_eclass(forest::t8_forest_t, + ltreeid::t8_locidx_t, + elem::Ptr{t8_element_t}, + face::Cint)::t8_eclass_t end """ @@ -13109,8 +13952,13 @@ The global tree-id of the tree in which *neigh* is in. -1 if there exists no nei t8_gloidx_t t8_forest_element_face_neighbor (t8_forest_t forest, t8_locidx_t ltreeid, const t8_element_t *elem, t8_element_t *neigh, const t8_eclass_t neigh_eclass, int face, int *neigh_face); ``` """ -function t8_forest_element_face_neighbor(forest, ltreeid, elem, neigh, neigh_eclass, face, neigh_face) - @ccall libt8.t8_forest_element_face_neighbor(forest::t8_forest_t, ltreeid::t8_locidx_t, elem::Ptr{t8_element_t}, neigh::Ptr{t8_element_t}, neigh_eclass::t8_eclass_t, face::Cint, neigh_face::Ptr{Cint})::t8_gloidx_t +function t8_forest_element_face_neighbor(forest, ltreeid, elem, neigh, neigh_eclass, face, + neigh_face) + @ccall libt8.t8_forest_element_face_neighbor(forest::t8_forest_t, ltreeid::t8_locidx_t, + elem::Ptr{t8_element_t}, + neigh::Ptr{t8_element_t}, + neigh_eclass::t8_eclass_t, face::Cint, + neigh_face::Ptr{Cint})::t8_gloidx_t end """ @@ -13151,8 +13999,13 @@ Query whether a batch of points lies inside an element. For bilinearly interpola void t8_forest_element_points_inside (t8_forest_t forest, t8_locidx_t ltreeid, const t8_element_t *element, const double *points, int num_points, int *is_inside, const double tolerance); ``` """ -function t8_forest_element_points_inside(forest, ltreeid, element, points, num_points, is_inside, tolerance) - @ccall libt8.t8_forest_element_points_inside(forest::t8_forest_t, ltreeid::t8_locidx_t, element::Ptr{t8_element_t}, points::Ptr{Cdouble}, num_points::Cint, is_inside::Ptr{Cint}, tolerance::Cdouble)::Cvoid +function t8_forest_element_points_inside(forest, ltreeid, element, points, num_points, + is_inside, tolerance) + @ccall libt8.t8_forest_element_points_inside(forest::t8_forest_t, ltreeid::t8_locidx_t, + element::Ptr{t8_element_t}, + points::Ptr{Cdouble}, num_points::Cint, + is_inside::Ptr{Cint}, + tolerance::Cdouble)::Cvoid end """ @@ -13184,7 +14037,9 @@ int t8_forest_element_find_owner (t8_forest_t forest, t8_gloidx_t gtreeid, t8_el ``` """ function t8_forest_element_find_owner(forest, gtreeid, element, eclass) - @ccall libt8.t8_forest_element_find_owner(forest::t8_forest_t, gtreeid::t8_gloidx_t, element::Ptr{t8_element_t}, eclass::t8_eclass_t)::Cint + @ccall libt8.t8_forest_element_find_owner(forest::t8_forest_t, gtreeid::t8_gloidx_t, + element::Ptr{t8_element_t}, + eclass::t8_eclass_t)::Cint end """ @@ -13196,7 +14051,9 @@ t8_forest_t t8_forest_new_uniform (t8_cmesh_t cmesh, const t8_scheme_c *scheme, ``` """ function t8_forest_new_uniform(cmesh, scheme, level, do_face_ghost, comm) - @ccall libt8.t8_forest_new_uniform(cmesh::t8_cmesh_t, scheme::Ptr{t8_scheme_c}, level::Cint, do_face_ghost::Cint, comm::MPI_Comm)::t8_forest_t + @ccall libt8.t8_forest_new_uniform(cmesh::t8_cmesh_t, scheme::Ptr{t8_scheme_c}, + level::Cint, do_face_ghost::Cint, + comm::MPI_Comm)::t8_forest_t end """ @@ -13222,7 +14079,9 @@ t8_forest_t t8_forest_new_adapt (t8_forest_t forest_from, t8_forest_adapt_t adap ``` """ function t8_forest_new_adapt(forest_from, adapt_fn, recursive, do_face_ghost, user_data) - @ccall libt8.t8_forest_new_adapt(forest_from::t8_forest_t, adapt_fn::t8_forest_adapt_t, recursive::Cint, do_face_ghost::Cint, user_data::Ptr{Cvoid})::t8_forest_t + @ccall libt8.t8_forest_new_adapt(forest_from::t8_forest_t, adapt_fn::t8_forest_adapt_t, + recursive::Cint, do_face_ghost::Cint, + user_data::Ptr{Cvoid})::t8_forest_t end """ @@ -13302,8 +14161,9 @@ end # automatic type deduction for variadic arguments may not be what you want, please use with caution @generated function sc_keyvalue_newf(dummy, va_list...) - :(@ccall(libsc.sc_keyvalue_newf(dummy::Cint; $(to_c_type_pairs(va_list)...))::Ptr{sc_keyvalue_t})) - end + :(@ccall(libsc.sc_keyvalue_newf(dummy::Cint; + $(to_c_type_pairs(va_list)...))::Ptr{sc_keyvalue_t})) +end """ sc_keyvalue_destroy(kv) @@ -13337,7 +14197,8 @@ sc_keyvalue_entry_type_t sc_keyvalue_exists (sc_keyvalue_t * kv, const char *key ``` """ function sc_keyvalue_exists(kv, key) - @ccall libsc.sc_keyvalue_exists(kv::Ptr{sc_keyvalue_t}, key::Cstring)::sc_keyvalue_entry_type_t + @ccall libsc.sc_keyvalue_exists(kv::Ptr{sc_keyvalue_t}, + key::Cstring)::sc_keyvalue_entry_type_t end """ @@ -13356,7 +14217,8 @@ sc_keyvalue_entry_type_t sc_keyvalue_unset (sc_keyvalue_t * kv, const char *key) ``` """ function sc_keyvalue_unset(kv, key) - @ccall libsc.sc_keyvalue_unset(kv::Ptr{sc_keyvalue_t}, key::Cstring)::sc_keyvalue_entry_type_t + @ccall libsc.sc_keyvalue_unset(kv::Ptr{sc_keyvalue_t}, + key::Cstring)::sc_keyvalue_entry_type_t end """ @@ -13376,7 +14238,8 @@ int sc_keyvalue_get_int (sc_keyvalue_t * kv, const char *key, int dvalue); ``` """ function sc_keyvalue_get_int(kv, key, dvalue) - @ccall libsc.sc_keyvalue_get_int(kv::Ptr{sc_keyvalue_t}, key::Cstring, dvalue::Cint)::Cint + @ccall libsc.sc_keyvalue_get_int(kv::Ptr{sc_keyvalue_t}, key::Cstring, + dvalue::Cint)::Cint end """ @@ -13396,7 +14259,8 @@ double sc_keyvalue_get_double (sc_keyvalue_t * kv, const char *key, double dvalu ``` """ function sc_keyvalue_get_double(kv, key, dvalue) - @ccall libsc.sc_keyvalue_get_double(kv::Ptr{sc_keyvalue_t}, key::Cstring, dvalue::Cdouble)::Cdouble + @ccall libsc.sc_keyvalue_get_double(kv::Ptr{sc_keyvalue_t}, key::Cstring, + dvalue::Cdouble)::Cdouble end """ @@ -13416,7 +14280,8 @@ const char *sc_keyvalue_get_string (sc_keyvalue_t * kv, const char *key, const c ``` """ function sc_keyvalue_get_string(kv, key, dvalue) - @ccall libsc.sc_keyvalue_get_string(kv::Ptr{sc_keyvalue_t}, key::Cstring, dvalue::Cstring)::Cstring + @ccall libsc.sc_keyvalue_get_string(kv::Ptr{sc_keyvalue_t}, key::Cstring, + dvalue::Cstring)::Cstring end """ @@ -13436,7 +14301,8 @@ void *sc_keyvalue_get_pointer (sc_keyvalue_t * kv, const char *key, void *dvalue ``` """ function sc_keyvalue_get_pointer(kv, key, dvalue) - @ccall libsc.sc_keyvalue_get_pointer(kv::Ptr{sc_keyvalue_t}, key::Cstring, dvalue::Ptr{Cvoid})::Ptr{Cvoid} + @ccall libsc.sc_keyvalue_get_pointer(kv::Ptr{sc_keyvalue_t}, key::Cstring, + dvalue::Ptr{Cvoid})::Ptr{Cvoid} end """ @@ -13456,7 +14322,8 @@ int sc_keyvalue_get_int_check (sc_keyvalue_t * kv, const char *key, int *status) ``` """ function sc_keyvalue_get_int_check(kv, key, status) - @ccall libsc.sc_keyvalue_get_int_check(kv::Ptr{sc_keyvalue_t}, key::Cstring, status::Ptr{Cint})::Cint + @ccall libsc.sc_keyvalue_get_int_check(kv::Ptr{sc_keyvalue_t}, key::Cstring, + status::Ptr{Cint})::Cint end """ @@ -13474,7 +14341,8 @@ void sc_keyvalue_set_int (sc_keyvalue_t * kv, const char *key, int newvalue); ``` """ function sc_keyvalue_set_int(kv, key, newvalue) - @ccall libsc.sc_keyvalue_set_int(kv::Ptr{sc_keyvalue_t}, key::Cstring, newvalue::Cint)::Cvoid + @ccall libsc.sc_keyvalue_set_int(kv::Ptr{sc_keyvalue_t}, key::Cstring, + newvalue::Cint)::Cvoid end """ @@ -13492,7 +14360,8 @@ void sc_keyvalue_set_double (sc_keyvalue_t * kv, const char *key, double newvalu ``` """ function sc_keyvalue_set_double(kv, key, newvalue) - @ccall libsc.sc_keyvalue_set_double(kv::Ptr{sc_keyvalue_t}, key::Cstring, newvalue::Cdouble)::Cvoid + @ccall libsc.sc_keyvalue_set_double(kv::Ptr{sc_keyvalue_t}, key::Cstring, + newvalue::Cdouble)::Cvoid end """ @@ -13510,7 +14379,8 @@ void sc_keyvalue_set_string (sc_keyvalue_t * kv, const char *key, const char *ne ``` """ function sc_keyvalue_set_string(kv, key, newvalue) - @ccall libsc.sc_keyvalue_set_string(kv::Ptr{sc_keyvalue_t}, key::Cstring, newvalue::Cstring)::Cvoid + @ccall libsc.sc_keyvalue_set_string(kv::Ptr{sc_keyvalue_t}, key::Cstring, + newvalue::Cstring)::Cvoid end """ @@ -13528,7 +14398,8 @@ void sc_keyvalue_set_pointer (sc_keyvalue_t * kv, const char *key, void *newvalu ``` """ function sc_keyvalue_set_pointer(kv, key, newvalue) - @ccall libsc.sc_keyvalue_set_pointer(kv::Ptr{sc_keyvalue_t}, key::Cstring, newvalue::Ptr{Cvoid})::Cvoid + @ccall libsc.sc_keyvalue_set_pointer(kv::Ptr{sc_keyvalue_t}, key::Cstring, + newvalue::Ptr{Cvoid})::Cvoid end # typedef int ( * sc_keyvalue_foreach_t ) ( const char * key , const sc_keyvalue_entry_type_t type , void * entry , const void * u ) @@ -13560,7 +14431,8 @@ void sc_keyvalue_foreach (sc_keyvalue_t * kv, sc_keyvalue_foreach_t fn, void *us ``` """ function sc_keyvalue_foreach(kv, fn, user_data) - @ccall libsc.sc_keyvalue_foreach(kv::Ptr{sc_keyvalue_t}, fn::sc_keyvalue_foreach_t, user_data::Ptr{Cvoid})::Cvoid + @ccall libsc.sc_keyvalue_foreach(kv::Ptr{sc_keyvalue_t}, fn::sc_keyvalue_foreach_t, + user_data::Ptr{Cvoid})::Cvoid end """ @@ -13628,7 +14500,8 @@ void sc_stats_set1 (sc_statinfo_t * stats, double value, const char *variable); ``` """ function sc_stats_set1(stats, value, variable) - @ccall libsc.sc_stats_set1(stats::Ptr{sc_statinfo_t}, value::Cdouble, variable::Cstring)::Cvoid + @ccall libsc.sc_stats_set1(stats::Ptr{sc_statinfo_t}, value::Cdouble, + variable::Cstring)::Cvoid end """ @@ -13649,7 +14522,9 @@ void sc_stats_set1_ext (sc_statinfo_t * stats, double value, const char *variabl ``` """ function sc_stats_set1_ext(stats, value, variable, copy_variable, stats_group, stats_prio) - @ccall libsc.sc_stats_set1_ext(stats::Ptr{sc_statinfo_t}, value::Cdouble, variable::Cstring, copy_variable::Cint, stats_group::Cint, stats_prio::Cint)::Cvoid + @ccall libsc.sc_stats_set1_ext(stats::Ptr{sc_statinfo_t}, value::Cdouble, + variable::Cstring, copy_variable::Cint, + stats_group::Cint, stats_prio::Cint)::Cvoid end """ @@ -13686,7 +14561,9 @@ void sc_stats_init_ext (sc_statinfo_t * stats, const char *variable, int copy_va ``` """ function sc_stats_init_ext(stats, variable, copy_variable, stats_group, stats_prio) - @ccall libsc.sc_stats_init_ext(stats::Ptr{sc_statinfo_t}, variable::Cstring, copy_variable::Cint, stats_group::Cint, stats_prio::Cint)::Cvoid + @ccall libsc.sc_stats_init_ext(stats::Ptr{sc_statinfo_t}, variable::Cstring, + copy_variable::Cint, stats_group::Cint, + stats_prio::Cint)::Cvoid end """ @@ -13721,7 +14598,8 @@ void sc_stats_set_group_prio (sc_statinfo_t * stats, int stats_group, int stats_ ``` """ function sc_stats_set_group_prio(stats, stats_group, stats_prio) - @ccall libsc.sc_stats_set_group_prio(stats::Ptr{sc_statinfo_t}, stats_group::Cint, stats_prio::Cint)::Cvoid + @ccall libsc.sc_stats_set_group_prio(stats::Ptr{sc_statinfo_t}, stats_group::Cint, + stats_prio::Cint)::Cvoid end """ @@ -13750,7 +14628,8 @@ void sc_stats_compute (sc_MPI_Comm mpicomm, int nvars, sc_statinfo_t * stats); ``` """ function sc_stats_compute(mpicomm, nvars, stats) - @ccall libsc.sc_stats_compute(mpicomm::MPI_Comm, nvars::Cint, stats::Ptr{sc_statinfo_t})::Cvoid + @ccall libsc.sc_stats_compute(mpicomm::MPI_Comm, nvars::Cint, + stats::Ptr{sc_statinfo_t})::Cvoid end """ @@ -13762,7 +14641,8 @@ void sc_stats_compute1 (sc_MPI_Comm mpicomm, int nvars, sc_statinfo_t * stats); ``` """ function sc_stats_compute1(mpicomm, nvars, stats) - @ccall libsc.sc_stats_compute1(mpicomm::MPI_Comm, nvars::Cint, stats::Ptr{sc_statinfo_t})::Cvoid + @ccall libsc.sc_stats_compute1(mpicomm::MPI_Comm, nvars::Cint, + stats::Ptr{sc_statinfo_t})::Cvoid end """ @@ -13783,7 +14663,8 @@ void sc_stats_print (int package_id, int log_priority, int nvars, sc_statinfo_t ``` """ function sc_stats_print(package_id, log_priority, nvars, stats, full, summary) - @ccall libsc.sc_stats_print(package_id::Cint, log_priority::Cint, nvars::Cint, stats::Ptr{sc_statinfo_t}, full::Cint, summary::Cint)::Cvoid + @ccall libsc.sc_stats_print(package_id::Cint, log_priority::Cint, nvars::Cint, + stats::Ptr{sc_statinfo_t}, full::Cint, summary::Cint)::Cvoid end """ @@ -13805,8 +14686,11 @@ Print measured statistics, filter by group and/or priority. This function uses t void sc_stats_print_ext (int package_id, int log_priority, int nvars, sc_statinfo_t * stats, int stats_group, int stats_prio, int full, int summary); ``` """ -function sc_stats_print_ext(package_id, log_priority, nvars, stats, stats_group, stats_prio, full, summary) - @ccall libsc.sc_stats_print_ext(package_id::Cint, log_priority::Cint, nvars::Cint, stats::Ptr{sc_statinfo_t}, stats_group::Cint, stats_prio::Cint, full::Cint, summary::Cint)::Cvoid +function sc_stats_print_ext(package_id, log_priority, nvars, stats, stats_group, stats_prio, + full, summary) + @ccall libsc.sc_stats_print_ext(package_id::Cint, log_priority::Cint, nvars::Cint, + stats::Ptr{sc_statinfo_t}, stats_group::Cint, + stats_prio::Cint, full::Cint, summary::Cint)::Cvoid end """ @@ -13890,7 +14774,8 @@ void sc_statistics_set (sc_statistics_t * stats, const char *name, double value) ``` """ function sc_statistics_set(stats, name, value) - @ccall libsc.sc_statistics_set(stats::Ptr{sc_statistics_t}, name::Cstring, value::Cdouble)::Cvoid + @ccall libsc.sc_statistics_set(stats::Ptr{sc_statistics_t}, name::Cstring, + value::Cdouble)::Cvoid end """ @@ -13904,7 +14789,8 @@ void sc_statistics_accumulate (sc_statistics_t * stats, const char *name, double ``` """ function sc_statistics_accumulate(stats, name, value) - @ccall libsc.sc_statistics_accumulate(stats::Ptr{sc_statistics_t}, name::Cstring, value::Cdouble)::Cvoid + @ccall libsc.sc_statistics_accumulate(stats::Ptr{sc_statistics_t}, name::Cstring, + value::Cdouble)::Cvoid end """ @@ -13932,7 +14818,8 @@ void sc_statistics_print (sc_statistics_t * stats, int package_id, int log_prior ``` """ function sc_statistics_print(stats, package_id, log_priority, full, summary) - @ccall libsc.sc_statistics_print(stats::Ptr{sc_statistics_t}, package_id::Cint, log_priority::Cint, full::Cint, summary::Cint)::Cvoid + @ccall libsc.sc_statistics_print(stats::Ptr{sc_statistics_t}, package_id::Cint, + log_priority::Cint, full::Cint, summary::Cint)::Cvoid end """ @@ -13970,7 +14857,10 @@ void t8_forest_element_coordinate (t8_forest_t forest, t8_locidx_t ltree_id, con ``` """ function t8_forest_element_coordinate(forest, ltree_id, element, corner_number, coordinates) - @ccall libt8.t8_forest_element_coordinate(forest::t8_forest_t, ltree_id::t8_locidx_t, element::Ptr{t8_element_t}, corner_number::Cint, coordinates::Ptr{Cdouble})::Cvoid + @ccall libt8.t8_forest_element_coordinate(forest::t8_forest_t, ltree_id::t8_locidx_t, + element::Ptr{t8_element_t}, + corner_number::Cint, + coordinates::Ptr{Cdouble})::Cvoid end """ @@ -13991,8 +14881,15 @@ Compute the coordinates of a point inside an element inside a tree. The point is void t8_forest_element_from_ref_coords_ext (t8_forest_t forest, t8_locidx_t ltreeid, const t8_element_t *element, const double *ref_coords, const size_t num_coords, double *coords_out, const double *stretch_factors); ``` """ -function t8_forest_element_from_ref_coords_ext(forest, ltreeid, element, ref_coords, num_coords, coords_out, stretch_factors) - @ccall libt8.t8_forest_element_from_ref_coords_ext(forest::t8_forest_t, ltreeid::t8_locidx_t, element::Ptr{t8_element_t}, ref_coords::Ptr{Cdouble}, num_coords::Csize_t, coords_out::Ptr{Cdouble}, stretch_factors::Ptr{Cdouble})::Cvoid +function t8_forest_element_from_ref_coords_ext(forest, ltreeid, element, ref_coords, + num_coords, coords_out, stretch_factors) + @ccall libt8.t8_forest_element_from_ref_coords_ext(forest::t8_forest_t, + ltreeid::t8_locidx_t, + element::Ptr{t8_element_t}, + ref_coords::Ptr{Cdouble}, + num_coords::Csize_t, + coords_out::Ptr{Cdouble}, + stretch_factors::Ptr{Cdouble})::Cvoid end """ @@ -14012,8 +14909,14 @@ Compute the coordinates of a point inside an element inside a tree. The point is void t8_forest_element_from_ref_coords (t8_forest_t forest, t8_locidx_t ltreeid, const t8_element_t *element, const double *ref_coords, const size_t num_coords, double *coords_out); ``` """ -function t8_forest_element_from_ref_coords(forest, ltreeid, element, ref_coords, num_coords, coords_out) - @ccall libt8.t8_forest_element_from_ref_coords(forest::t8_forest_t, ltreeid::t8_locidx_t, element::Ptr{t8_element_t}, ref_coords::Ptr{Cdouble}, num_coords::Csize_t, coords_out::Ptr{Cdouble})::Cvoid +function t8_forest_element_from_ref_coords(forest, ltreeid, element, ref_coords, num_coords, + coords_out) + @ccall libt8.t8_forest_element_from_ref_coords(forest::t8_forest_t, + ltreeid::t8_locidx_t, + element::Ptr{t8_element_t}, + ref_coords::Ptr{Cdouble}, + num_coords::Csize_t, + coords_out::Ptr{Cdouble})::Cvoid end """ @@ -14032,7 +14935,9 @@ void t8_forest_element_centroid (t8_forest_t forest, t8_locidx_t ltreeid, const ``` """ function t8_forest_element_centroid(forest, ltreeid, element, coordinates) - @ccall libt8.t8_forest_element_centroid(forest::t8_forest_t, ltreeid::t8_locidx_t, element::Ptr{t8_element_t}, coordinates::Ptr{Cdouble})::Cvoid + @ccall libt8.t8_forest_element_centroid(forest::t8_forest_t, ltreeid::t8_locidx_t, + element::Ptr{t8_element_t}, + coordinates::Ptr{Cdouble})::Cvoid end """ @@ -14055,7 +14960,10 @@ void t8_forest_element_linear_centroid (const t8_forest_t forest, const t8_locid ``` """ function t8_forest_element_linear_centroid(forest, ltreeid, element, coordinates) - @ccall libt8.t8_forest_element_linear_centroid(forest::t8_forest_t, ltreeid::t8_locidx_t, element::Ptr{t8_element_t}, coordinates::Ptr{Cdouble})::Cvoid + @ccall libt8.t8_forest_element_linear_centroid(forest::t8_forest_t, + ltreeid::t8_locidx_t, + element::Ptr{t8_element_t}, + coordinates::Ptr{Cdouble})::Cvoid end """ @@ -14079,7 +14987,8 @@ double t8_forest_element_diam (t8_forest_t forest, t8_locidx_t ltreeid, const t8 ``` """ function t8_forest_element_diam(forest, ltreeid, element) - @ccall libt8.t8_forest_element_diam(forest::t8_forest_t, ltreeid::t8_locidx_t, element::Ptr{t8_element_t})::Cdouble + @ccall libt8.t8_forest_element_diam(forest::t8_forest_t, ltreeid::t8_locidx_t, + element::Ptr{t8_element_t})::Cdouble end """ @@ -14103,7 +15012,8 @@ double t8_forest_element_volume (t8_forest_t forest, t8_locidx_t ltreeid, const ``` """ function t8_forest_element_volume(forest, ltreeid, element) - @ccall libt8.t8_forest_element_volume(forest::t8_forest_t, ltreeid::t8_locidx_t, element::Ptr{t8_element_t})::Cdouble + @ccall libt8.t8_forest_element_volume(forest::t8_forest_t, ltreeid::t8_locidx_t, + element::Ptr{t8_element_t})::Cdouble end """ @@ -14124,7 +15034,9 @@ double t8_forest_element_face_area (t8_forest_t forest, t8_locidx_t ltreeid, con ``` """ function t8_forest_element_face_area(forest, ltreeid, element, face) - @ccall libt8.t8_forest_element_face_area(forest::t8_forest_t, ltreeid::t8_locidx_t, element::Ptr{t8_element_t}, face::Cint)::Cdouble + @ccall libt8.t8_forest_element_face_area(forest::t8_forest_t, ltreeid::t8_locidx_t, + element::Ptr{t8_element_t}, + face::Cint)::Cdouble end """ @@ -14144,7 +15056,9 @@ void t8_forest_element_face_centroid (t8_forest_t forest, t8_locidx_t ltreeid, c ``` """ function t8_forest_element_face_centroid(forest, ltreeid, element, face, centroid) - @ccall libt8.t8_forest_element_face_centroid(forest::t8_forest_t, ltreeid::t8_locidx_t, element::Ptr{t8_element_t}, face::Cint, centroid::Ptr{Cdouble})::Cvoid + @ccall libt8.t8_forest_element_face_centroid(forest::t8_forest_t, ltreeid::t8_locidx_t, + element::Ptr{t8_element_t}, face::Cint, + centroid::Ptr{Cdouble})::Cvoid end """ @@ -14164,7 +15078,31 @@ void t8_forest_element_face_normal (t8_forest_t forest, t8_locidx_t ltreeid, con ``` """ function t8_forest_element_face_normal(forest, ltreeid, element, face, normal) - @ccall libt8.t8_forest_element_face_normal(forest::t8_forest_t, ltreeid::t8_locidx_t, element::Ptr{t8_element_t}, face::Cint, normal::Ptr{Cdouble})::Cvoid + @ccall libt8.t8_forest_element_face_normal(forest::t8_forest_t, ltreeid::t8_locidx_t, + element::Ptr{t8_element_t}, face::Cint, + normal::Ptr{Cdouble})::Cvoid +end + +""" + t8_forest_leaf_is_boundary(forest, local_tree, leaf, face) + +Compute whether a given face of a given leaf in a forest lies at the domain boundary. This includes inner boundaries if the forest has deleted elements. + +# Arguments +* `forest`:\\[in\\] The forest. +* `local_tree`:\\[in\\] A local tree of *forest*. +* `leaf`:\\[in\\] A leaf element of *local_tree* in *forest*. +* `face`:\\[in\\] The face number of a face of *leaf* to check. +# Returns +True (non-zero) if face *face* of *leaf* lies at the domain boundary. +### Prototype +```c +int t8_forest_leaf_is_boundary (const t8_forest_t forest, const t8_locidx_t local_tree, const t8_element_t *leaf, const int face); +``` +""" +function t8_forest_leaf_is_boundary(forest, local_tree, leaf, face) + @ccall libt8.t8_forest_leaf_is_boundary(forest::t8_forest_t, local_tree::t8_locidx_t, + leaf::Ptr{t8_element_t}, face::Cint)::Cint end """ @@ -14374,7 +15312,8 @@ double t8_forest_profile_get_partition_time (t8_forest_t forest, int *procs_sent ``` """ function t8_forest_profile_get_partition_time(forest, procs_sent) - @ccall libt8.t8_forest_profile_get_partition_time(forest::t8_forest_t, procs_sent::Ptr{Cint})::Cdouble + @ccall libt8.t8_forest_profile_get_partition_time(forest::t8_forest_t, + procs_sent::Ptr{Cint})::Cdouble end """ @@ -14396,7 +15335,8 @@ double t8_forest_profile_get_balance_time (t8_forest_t forest, int *balance_roun ``` """ function t8_forest_profile_get_balance_time(forest, balance_rounds) - @ccall libt8.t8_forest_profile_get_balance_time(forest::t8_forest_t, balance_rounds::Ptr{Cint})::Cdouble + @ccall libt8.t8_forest_profile_get_balance_time(forest::t8_forest_t, + balance_rounds::Ptr{Cint})::Cdouble end """ @@ -14418,7 +15358,8 @@ double t8_forest_profile_get_ghost_time (t8_forest_t forest, t8_locidx_t *ghosts ``` """ function t8_forest_profile_get_ghost_time(forest, ghosts_sent) - @ccall libt8.t8_forest_profile_get_ghost_time(forest::t8_forest_t, ghosts_sent::Ptr{t8_locidx_t})::Cdouble + @ccall libt8.t8_forest_profile_get_ghost_time(forest::t8_forest_t, + ghosts_sent::Ptr{t8_locidx_t})::Cdouble end """ @@ -14532,7 +15473,7 @@ A data field for VTK output. This struct is used to store data that is written t """ struct t8_vtk_data_field_t type::t8_vtk_data_type_t - description::NTuple{8192, Cchar} + description::NTuple{1024, Cchar} data::Ptr{Cdouble} end @@ -14546,8 +15487,11 @@ Writes the pvtu header file that links to the processor local files. It is used int t8_write_pvtu (const char *filename, int num_procs, int write_tree, int write_rank, int write_level, int write_id, int num_data, t8_vtk_data_field_t *data); ``` """ -function t8_write_pvtu(filename, num_procs, write_tree, write_rank, write_level, write_id, num_data, data) - @ccall libt8.t8_write_pvtu(filename::Cstring, num_procs::Cint, write_tree::Cint, write_rank::Cint, write_level::Cint, write_id::Cint, num_data::Cint, data::Ptr{t8_vtk_data_field_t})::Cint +function t8_write_pvtu(filename, num_procs, write_tree, write_rank, write_level, write_id, + num_data, data) + @ccall libt8.t8_write_pvtu(filename::Cstring, num_procs::Cint, write_tree::Cint, + write_rank::Cint, write_level::Cint, write_id::Cint, + num_data::Cint, data::Ptr{t8_vtk_data_field_t})::Cint end """ @@ -14584,15 +15528,22 @@ Write the forest in a parallel vtu format. Extended version. See # Returns True if successful, false if not (process local). See also # See also -[`t8_forest_write_vtk`](@ref) for the standard version of this function. Writes one master .pvtu file and each process writes in its own .vtu file. If linked and not otherwise specified, the VTK API is used. If the VTK library is not linked, an ASCII file is written. This may change in accordance with *write_ghosts*, *write_curved* and *do_not_use_API*, because the export of ghosts is not yet available with the VTK API and the export of curved elements is not available with the inbuilt function to write ASCII files. The function will for example still use the VTK API to satisfy *write_curved*, even if *do_not_use_API* is set to true. Forest must be committed when calling this function. This function is collective and must be called on each process., [`t8_forest_write_vtk`](@ref) . +[`t8_forest_write_vtk`](@ref) for the standard version of this function. Writes one master .pvtu file and each process writes in its own .vtu file. If linked and not otherwise specified, the VTK API is used. If the VTK library is not linked, an ASCII file is written. This may change in accordance with *write_ghosts*, *write_curved* and *do_not_use_API*, because the export of ghosts is not yet available with the VTK API and the export of curved elements is not available with the inbuilt function to write ASCII files. The function will for example still use the VTK API to satisfy *write_curved*, even if *do_not_use_API* is set to true. Forest must be committed when calling this function. This function is collective and must be called on each process., [`t8_forest_write_vtk`](@ref) . ### Prototype ```c int t8_forest_write_vtk_ext (t8_forest_t forest, const char *fileprefix, const int write_treeid, const int write_mpirank, const int write_level, const int write_element_id, const int write_ghosts, const int write_curved, int do_not_use_API, const int num_data, t8_vtk_data_field_t *data); ``` """ -function t8_forest_write_vtk_ext(forest, fileprefix, write_treeid, write_mpirank, write_level, write_element_id, write_ghosts, write_curved, do_not_use_API, num_data, data) - @ccall libt8.t8_forest_write_vtk_ext(forest::t8_forest_t, fileprefix::Cstring, write_treeid::Cint, write_mpirank::Cint, write_level::Cint, write_element_id::Cint, write_ghosts::Cint, write_curved::Cint, do_not_use_API::Cint, num_data::Cint, data::Ptr{t8_vtk_data_field_t})::Cint +function t8_forest_write_vtk_ext(forest, fileprefix, write_treeid, write_mpirank, + write_level, write_element_id, write_ghosts, write_curved, + do_not_use_API, num_data, data) + @ccall libt8.t8_forest_write_vtk_ext(forest::t8_forest_t, fileprefix::Cstring, + write_treeid::Cint, write_mpirank::Cint, + write_level::Cint, write_element_id::Cint, + write_ghosts::Cint, write_curved::Cint, + do_not_use_API::Cint, num_data::Cint, + data::Ptr{t8_vtk_data_field_t})::Cint end """ @@ -14617,5731 +15568,2377 @@ function t8_forest_write_vtk(forest, fileprefix) @ccall libt8.t8_forest_write_vtk(forest::t8_forest_t, fileprefix::Cstring)::Cint end -# typedef int ( * t8_forest_iterate_face_fn ) ( const t8_forest_t forest , const t8_locidx_t ltreeid , const t8_element_t * element , const int face , const int is_leaf , const t8_element_array_t * leaf_elements , const t8_locidx_t tree_leaf_index , void * user_data ) """ -Callback function used in + t8_forest_get_boundary_conditions(forest, ltreeid, element, boundary_conditions, length) + +Retrieves the boundary conditions of a forest element. C version of this function. # Arguments -* `forest`:\\[in\\] The forest. -* `ltreeid`:\\[in\\] Local index of the tree containing the *element*. -* `element`:\\[in\\] The considered element. -* `face`:\\[in\\] The integer index of the considered face of *element*. -* `is_leaf`:\\[in\\] True if and only if the currently considered element is a leaf element. -* `leaf_elements`:\\[in\\] The array of leaf elements that are descendants of *element*. Sorted by linear index. -* `tree_leaf_index`:\\[in\\] Tree-local index of the first leaf. -* `user_data`:\\[in\\] Some user-defined data, as void pointer. -# Returns -Nonzero if the element may touch the face and the top-down search shall be continued, zero otherwise. -# See also -[`t8_forest_iterate_faces`](@ref). +* `forest`:\\[in\\] The forest the element lives in. +* `ltreeid`:\\[in\\] The local id of the forest tree. +* `element`:\\[in\\] The element. +* `boundary_conditions`:\\[out\\] The boundary conditions of the element. String will be nullptr if the elements face is internal; if it does not touch the trees face, since only the tree faces carry boundary conditions. All inner element faces have neighbors anyways. +* `length`:\\[out\\] The length of *boundary_conditions*. +### Prototype +```c +void t8_forest_get_boundary_conditions (t8_forest_t forest, t8_locidx_t ltreeid, const t8_element_t *element, const char *boundary_conditions[T8_ECLASS_MAX_FACES], size_t *length); +``` """ -const t8_forest_iterate_face_fn = Ptr{Cvoid} +function t8_forest_get_boundary_conditions(forest, ltreeid, element, boundary_conditions, + length) + @ccall libt8.t8_forest_get_boundary_conditions(forest::t8_forest_t, + ltreeid::t8_locidx_t, + element::Ptr{t8_element_t}, + boundary_conditions::Ptr{Cstring}, + length::Ptr{Csize_t})::Cvoid +end -# typedef int ( * t8_forest_search_fn ) ( t8_forest_t forest , const t8_locidx_t ltreeid , const t8_element_t * element , const int is_leaf , const t8_element_array_t * leaf_elements , const t8_locidx_t tree_leaf_index ) """ -A call-back function used by t8_forest_search describing a search-criterion. Is called on an element and the search criterion should be checked on that element. Return true if the search criterion is met, false otherwise. + t8_forest_get_boundary_condition(forest, ltreeid, element, face, boundary_condition) + +Retrieves the boundary condition of a face of a forest element. Retrieving all boundary conditions at once via t8_forest_get_boundary_conditions() will be faster. C version of this function. # Arguments -* `forest`:\\[in\\] the forest -* `ltreeid`:\\[in\\] the local tree id of the current tree -* `element`:\\[in\\] the element for which the search criterion is checked. -* `is_leaf`:\\[in\\] true if and only if *element* is a leaf element -* `leaf_elements`:\\[in\\] the leaf elements in *forest* that are descendants of *element* (or the element itself if *is_leaf* is true) -* `tree_leaf_index`:\\[in\\] the local index of the first leaf in *leaf_elements* -# Returns -non-zero if the search criterion is met, zero otherwise. +* `forest`:\\[in\\] The forest the element lives in. +* `ltreeid`:\\[in\\] The local id of the forest tree. +* `element`:\\[in\\] The element. +* `face`:\\[in\\] The face id of the element. +* `boundary_condition`:\\[out\\] The boundary condition of the element. Will be nullptr if the elements face is internal; if it does not touch the trees face, since only the tree faces carry boundary conditions. All inner element faces have neighbors anyways. +### Prototype +```c +void t8_forest_get_boundary_condition (t8_forest_t forest, t8_locidx_t ltreeid, const t8_element_t *element, int face, const char **boundary_condition); +``` """ -const t8_forest_search_fn = Ptr{Cvoid} +function t8_forest_get_boundary_condition(forest, ltreeid, element, face, + boundary_condition) + @ccall libt8.t8_forest_get_boundary_condition(forest::t8_forest_t, ltreeid::t8_locidx_t, + element::Ptr{t8_element_t}, face::Cint, + boundary_condition::Ptr{Cstring})::Cvoid +end -# typedef void ( * t8_forest_query_fn ) ( t8_forest_t forest , const t8_locidx_t ltreeid , const t8_element_t * element , const int is_leaf , const t8_element_array_t * leaf_elements , const t8_locidx_t tree_leaf_index , sc_array_t * queries , sc_array_t * query_indices , int * query_matches , const size_t num_active_queries ) """ -A call-back function used by t8_forest_search for queries. Is called on an element and all queries are checked on that element. All positive queries are passed further down to the children of the element up to leaf elements of the tree. The results of the check are stored in *query_matches*. + t8_forest_adapt(forest) + +Adapt a forest. # Arguments -* `forest`:\\[in\\] the forest -* `ltreeid`:\\[in\\] the local tree id of the current tree -* `element`:\\[in\\] the element for which the queries are executed -* `is_leaf`:\\[in\\] true if and only if *element* is a leaf element -* `leaf_elements`:\\[in\\] the leaf elements in *forest* that are descendants of *element* (or the element itself if *is_leaf* is true) -* `tree_leaf_index`:\\[in\\] the local index of the first leaf in *leaf_elements* -* `queries`:\\[in\\] An array of queries that are checked by the function -* `query_indices`:\\[in\\] An array of size\\_t entries, where each entry is an index of a query in *queries*. -* `query_matches`:\\[in,out\\] An array of length *num_active_queries*. If the element is not a leave must be set to true or false at the i-th index for each query, specifying whether the element 'matches' the query of the i-th query index or not. When the element is a leaf we can return before all entries are set. -* `num_active_queries`:\\[in\\] The number of currently active queries (equals the number of entries of *query_matches* and entries of *query_indices*). +* `forest`:\\[in,out\\] The forest to be adapted +### Prototype +```c +void t8_forest_adapt (t8_forest_t forest); +``` """ -const t8_forest_query_fn = Ptr{Cvoid} +function t8_forest_adapt(forest) + @ccall libt8.t8_forest_adapt(forest::t8_forest_t)::Cvoid +end -# typedef int ( * t8_forest_partition_search_fn ) ( const t8_forest_t forest , const t8_locidx_t ltreeid , const t8_element_t * element , const int pfirst , const int plast ) """ -A call-back function used by t8_forest_search_partition describing a search-criterion. Is called on an element and the search criterion should be checked on that element. Return true if the search criterion is met, false otherwise. + t8_forest_balance(forest, repartition) -# Arguments -* `forest`:\\[in\\] the forest -* `ltreeid`:\\[in\\] the local tree id of the current tree in the cmesh. Since the cmesh has to be replicated, it coincides with the global tree id. -* `element`:\\[in\\] the element for which the search criterion is checked -* `pfirst`:\\[in\\] the first processor that owns part of *element*. Guaranteed to be non-empty. -* `plast`:\\[in\\] the last processor that owns part of *element*. Guaranteed to be non-empty. -# Returns -non-zero if the search criterion is met, zero otherwise. -""" -const t8_forest_partition_search_fn = Ptr{Cvoid} +Balance the forest. -# typedef void ( * t8_forest_partition_query_fn ) ( const t8_forest_t forest , const t8_locidx_t ltreeid , const t8_element_t * element , const int pfirst , const int plast , void * queries , sc_array_t * query_indices , int * query_matches , const size_t num_active_queries ) -""" -A call-back function used by t8_forest_search_partition for queries. Is called on an element and all queries are checked on that element. All positive queries are passed further down to the children of the element. The results of the check are stored in *query_matches*. +This function adjust the forest such that it satisfies a 2:1 balance condition: The levels of neighboring elements may differ by at most one. Such a balanced forest simplifies many algorithms, making balancing an important procedure for both developers and external users. # Arguments -* `forest`:\\[in\\] the forest -* `ltreeid`:\\[in\\] the local tree id of the current tree in the cmesh. Since the cmesh has to be replicated, it coincides with the global tree id. -* `element`:\\[in\\] the element for which the query is executed -* `pfirst`:\\[in\\] the first processor that owns part of *element*. Guaranteed to be non-empty. -* `plast`:\\[in\\] the last processor that owns part of *element*. Guaranteed to be non-empty. if this is equal to *pfirst*, then the recursion will stop for *element*'s branch after this function returns. -* `queries`:\\[in\\] an array of queries that are checked by the function -* `query_indices`:\\[in\\] an array of size\\_t entries, where each entry is an index of a query in *queries*. -* `query_matches`:\\[in,out\\] an array of length *num_active_queries*. If the element is not a leaf must be set to true or false at the i-th index for each query, specifying whether the element 'matches' the query of the i-th query index or not. When the element is a leaf we can return before all entries are set. -* `num_active_queries`:\\[in\\] The number of currently active queries (equals the number of entries of *query_matches* and entries of *query_indices*). +* `forest`:\\[in,out\\] The forest to be balanced. +* `repartition`:\\[in\\] Switch deciding whether the forest is repartitioned after balancing. +### Prototype +```c +void t8_forest_balance (t8_forest_t forest, int repartition); +``` """ -const t8_forest_partition_query_fn = Ptr{Cvoid} +function t8_forest_balance(forest, repartition) + @ccall libt8.t8_forest_balance(forest::t8_forest_t, repartition::Cint)::Cvoid +end """ - t8_forest_split_array(element, leaf_elements, offsets) + t8_forest_is_balanced(forest) -Split an array of elements according to the children of a given element E. In other words for each child C of E, find the index i, j, such that all descendants of C are elements[i], ..., elements[j-1]. +Check whether the local elements of a forest are balanced. # Arguments -* `element`:\\[in\\] An element. -* `leaf_elements`:\\[in\\] An array of leaf elements of *element*. Thus, all elements must be descendants. Sorted by linear index. -* `offsets`:\\[in,out\\] On input an allocated array of *num_children_of_E* + 1 entries. On output entry i indicates the position in *leaf_elements* where the descandents of the i-th child of E start. +* `forest`:\\[in,out\\] The forest to be checked. +# Returns +1 if the local elements are balanced, 0 otherwise. ### Prototype ```c -void t8_forest_split_array (const t8_element_t *element, const t8_element_array_t *leaf_elements, size_t *offsets); +int t8_forest_is_balanced (t8_forest_t forest); ``` """ -function t8_forest_split_array(element, leaf_elements, offsets) - @ccall libt8.t8_forest_split_array(element::Ptr{t8_element_t}, leaf_elements::Ptr{t8_element_array_t}, offsets::Ptr{Csize_t})::Cvoid +function t8_forest_is_balanced(forest) + @ccall libt8.t8_forest_is_balanced(forest::t8_forest_t)::Cint end +mutable struct t8_forest_ghost end + +"""Opaque pointer to the ghost elements of a forest.""" +const t8_forest_ghost_t = Ptr{t8_forest_ghost} + """ - t8_forest_iterate_faces(forest, ltreeid, element, face, leaf_elements, tree_lindex_of_first_leaf, callback, user_data) + t8_ghost_remote_tree_t -Iterate over all leaves of an element that touch a given face of the element. Callback is called in each recursive step with element as input. leaf\\_index is only not negative if element is a leaf, in which case it indicates the index of the leaf in the leaves of the tree. If it is negative, it is - (index + 1) Top-down iteration and callback is called on each intermediate level. If it returns false, the current element is not traversed further +A local tree of this process, restricted to those leaf elements that are ghosts on the remote process *mpirank*. There is one such struct per (local tree, remote process) pair. They are stored, sorted by local tree id, in the *remote_trees* array of the corresponding t8_ghost_remote_t. Will be sent to the remote process during t8_forest_ghost_definition::communicate_ghost_elements. -!!! note +| Field | Note | +| :---------------- | :----------------------------------------------------------------------- | +| global\\_id | The global id of the (local) tree. | +| mpirank | The rank of the remote process that has these elements as ghosts. | +| elements | Copies of the leaf elements that are ghosts on *mpirank*, in SFC order. | +| element\\_indices | The tree-local index (t8_locidx_t) of each entry in *elements*. | +| eclass | The element class of the tree. | +""" +struct t8_ghost_remote_tree_t + global_id::t8_gloidx_t + mpirank::Cint + elements::t8_element_array_t + element_indices::sc_array_t + eclass::t8_eclass_t +end - *tree_lindex_of_first_leaf* is not an index in *leaf_elements*. *leaf_elements* may only be a part of the tree's leaves. +""" + t8_ghost_remote_t -# Arguments -* `forest`:\\[in\\] A committed forest. -* `ltreeid`:\\[in\\] Local index of the tree containing the *element*. -* `element`:\\[in\\] The considered element. -* `face`:\\[in\\] The integer index of the considered face of *element*. -* `leaf_elements`:\\[in\\] The array of leaf elements that are descendants of *element*. Sorted by linear index. -* `tree_lindex_of_first_leaf`:\\[in\\] Index of the first leaf of *element* in the tree's leaves. The corresponding leaf does not necessarily lie on the face of *element*. -* `callback`:\\[in\\] The callback function. -* `user_data`:\\[in\\] The user data passed to the *callback* function. -### Prototype -```c -void t8_forest_iterate_faces (const t8_forest_t forest, const t8_locidx_t ltreeid, const t8_element_t *element, const int face, const t8_element_array_t *const leaf_elements, const t8_locidx_t tree_lindex_of_first_leaf, const t8_forest_iterate_face_fn callback, void *user_data); -``` +All local leaf elements of this process that are ghosts on the remote process *remote_rank*. There is one such struct per remote process. They are stored in the *remote_ghosts* hash array of the ghost structure, hashed by *remote_rank*; the ranks themselves are listed in *remote_processes*. Will be sent to the remote process during t8_forest_ghost_definition::communicate_ghost_elements. + +| Field | Note | +| :------------- | :-------------------------------------------------------------------------------------------------------- | +| remote\\_rank | The rank of the remote process that has these elements as ghosts. | +| num\\_elements | The total number of elements over all entries in *remote_trees*. | +| remote\\_trees | The t8_ghost_remote_tree_t of each local tree that has ghosts on *remote_rank*, sorted by local tree id. | """ -function t8_forest_iterate_faces(forest, ltreeid, element, face, leaf_elements, tree_lindex_of_first_leaf, callback, user_data) - @ccall libt8.t8_forest_iterate_faces(forest::t8_forest_t, ltreeid::t8_locidx_t, element::Ptr{t8_element_t}, face::Cint, leaf_elements::Ptr{t8_element_array_t}, tree_lindex_of_first_leaf::t8_locidx_t, callback::t8_forest_iterate_face_fn, user_data::Ptr{Cvoid})::Cvoid +struct t8_ghost_remote_t + remote_rank::Cint + num_elements::t8_locidx_t + remote_trees::sc_array_t end """ - t8_forest_search(forest, search_fn, query_fn, queries) + t8_forest_ghost_num_trees(forest) -Perform a top-down search of the forest, executing a callback on each intermediate element. The search will enter each tree at least once. If the callback returns false for an element, its descendants are not further searched. To pass user data to the search\\_fn function use t8_forest_set_user_data. +Return the number of trees in a ghost. # Arguments * `forest`:\\[in\\] The forest. -* `search_fn`:\\[in\\] The callback function describing the search criterion. -* `query_fn`:\\[in\\] The query function. -* `queries`:\\[in\\] The array of queries. +# Returns +The number of trees in the forest's ghost (or 0 if ghost structure does not exist). ### Prototype ```c -void t8_forest_search (t8_forest_t forest, t8_forest_search_fn search_fn, t8_forest_query_fn query_fn, sc_array_t *queries); +t8_locidx_t t8_forest_ghost_num_trees (const t8_forest_t forest); ``` """ -function t8_forest_search(forest, search_fn, query_fn, queries) - @ccall libt8.t8_forest_search(forest::t8_forest_t, search_fn::t8_forest_search_fn, query_fn::t8_forest_query_fn, queries::Ptr{sc_array_t})::Cvoid +function t8_forest_ghost_num_trees(forest) + @ccall libt8.t8_forest_ghost_num_trees(forest::t8_forest_t)::t8_locidx_t end """ - t8_forest_iterate_replace(forest_new, forest_old, replace_fn) + t8_forest_ghost_get_tree_element_offset(forest, lghost_tree) -Given two forest where the elements in one forest are either direct children or parents of the elements in the other forest compare the two forests and for each refined element or coarsened family in the old one, call a callback function providing the local indices of the old and new elements. +Return the element offset of a ghost tree. !!! note - To pass a user pointer to *replace_fn* use t8_forest_set_user_data and t8_forest_get_user_data. + forest must be committed before calling this function. # Arguments -* `forest_new`:\\[in\\] A forest, each element is a parent or child of an element in *forest_old*. -* `forest_old`:\\[in\\] The initial forest. -* `replace_fn`:\\[in\\] A replace callback function. +* `forest`:\\[in\\] The forest with constructed ghost layer. +* `lghost_tree`:\\[in\\] A local ghost id of a ghost tree. +# Returns +The element offset of this ghost tree within the set of local ghost elements. ### Prototype ```c -void t8_forest_iterate_replace (t8_forest_t forest_new, t8_forest_t forest_old, t8_forest_replace_t replace_fn); +t8_locidx_t t8_forest_ghost_get_tree_element_offset (t8_forest_t forest, t8_locidx_t lghost_tree); ``` """ -function t8_forest_iterate_replace(forest_new, forest_old, replace_fn) - @ccall libt8.t8_forest_iterate_replace(forest_new::t8_forest_t, forest_old::t8_forest_t, replace_fn::t8_forest_replace_t)::Cvoid +function t8_forest_ghost_get_tree_element_offset(forest, lghost_tree) + @ccall libt8.t8_forest_ghost_get_tree_element_offset(forest::t8_forest_t, + lghost_tree::t8_locidx_t)::t8_locidx_t end """ - t8_forest_search_partition(forest, search_fn, query_fn, queries) + t8_forest_ghost_tree_num_leaf_elements(forest, lghost_tree) -Perform a top-down search of the global partition, executing a callback on each intermediate element. The search will enter each tree at least once. The recursion will only go down branches that are split between multiple processors. This is not a collective function. It does not communicate. The function expects the coarse mesh to be replicated. If the callback returns false for an element, its descendants are not further searched. To pass user data to **search_fn** function use t8_forest_set_user_data +Given an index in the ghost\\_tree array, return this tree's number of leaf elements # Arguments -* `forest`:\\[in\\] the forest to be searched -* `search_fn`:\\[in\\] a search callback function called on elements -* `query_fn`:\\[in\\] a query callback function called for all active queries of an element -* `queries`:\\[in,out\\] an array of queries that are checked by the function -### Prototype -```c -void t8_forest_search_partition (const t8_forest_t forest, t8_forest_partition_search_fn search_fn, t8_forest_partition_query_fn query_fn, sc_array_t *queries); -``` -""" -function t8_forest_search_partition(forest, search_fn, query_fn, queries) - @ccall libt8.t8_forest_search_partition(forest::t8_forest_t, search_fn::t8_forest_partition_search_fn, query_fn::t8_forest_partition_query_fn, queries::Ptr{sc_array_t})::Cvoid -end - -""" - t8_forest_partition(forest) - -Populate a forest with the partitioned elements of forest->set\\_from. - -# Arguments -* `forest`:\\[in,out\\] The forest. -### Prototype -```c -void t8_forest_partition (t8_forest_t forest); -``` -""" -function t8_forest_partition(forest) - @ccall libt8.t8_forest_partition(forest::t8_forest_t)::Cvoid -end - -""" - t8_forest_new_gather(forest_from, gather_rank) - -Create a new forest that gathers a given forest on one process. - -This functionality is mostly required for comparison purposes and sanity checks within the testing framework. - -# Arguments -* `forest_from`:\\[in\\] the forest that should be gathered on one rank -* `gather_rank`:\\[in\\] the rank of the process the forest will be gathered on -# Returns -The gathered forest: The same as *forest_from*, but all elements are on rank *gather_rank*. -### Prototype -```c -t8_forest_t t8_forest_new_gather (const t8_forest_t forest_from, const int gather_rank); -``` -""" -function t8_forest_new_gather(forest_from, gather_rank) - @ccall libt8.t8_forest_new_gather(forest_from::t8_forest_t, gather_rank::Cint)::t8_forest_t -end - -""" - t8_forest_set_partition_offset(forest, first_global_element) - -Manually set the partition offset of the current process. - -If set, the next partitioning of the forest will use the manually defined element offsets. - -# Arguments -* `forest`:\\[in,out\\] the considered forest -* `first_global_element`:\\[in\\] the global ID that will become the first local element -### Prototype -```c -void t8_forest_set_partition_offset (t8_forest_t forest, const t8_gloidx_t first_global_element); -``` -""" -function t8_forest_set_partition_offset(forest, first_global_element) - @ccall libt8.t8_forest_set_partition_offset(forest::t8_forest_t, first_global_element::t8_gloidx_t)::Cvoid -end - -""" - t8_forest_partition_create_offsets(forest) - -Create the element\\_offset array of a partitioned forest. - -# Arguments -* `forest`:\\[in,out\\] The forest. *forest* must be committed before calling this function. -### Prototype -```c -void t8_forest_partition_create_offsets (t8_forest_t forest); -``` -""" -function t8_forest_partition_create_offsets(forest) - @ccall libt8.t8_forest_partition_create_offsets(forest::t8_forest_t)::Cvoid -end - -""" - t8_forest_partition_next_nonempty_rank(forest, rank) - -If t8_forest_partition_create_offsets was already called, compute for a given rank the next greater rank that is not empty. - -# Arguments -* `forest`:\\[in\\] The forest. -* `rank`:\\[in\\] An MPI rank. -# Returns -A rank q > *rank* such that the forest has elements on *q*. If such a *q* does not exist, returns mpisize. -### Prototype -```c -int t8_forest_partition_next_nonempty_rank (t8_forest_t forest, int rank); -``` -""" -function t8_forest_partition_next_nonempty_rank(forest, rank) - @ccall libt8.t8_forest_partition_next_nonempty_rank(forest::t8_forest_t, rank::Cint)::Cint -end - -""" - t8_forest_partition_create_first_desc(forest) - -Create the array of global\\_first\\_descendant ids of a partitioned forest. - -# Arguments -* `forest`:\\[in,out\\] The forest. *forest* must be committed before calling this function. -### Prototype -```c -void t8_forest_partition_create_first_desc (t8_forest_t forest); -``` -""" -function t8_forest_partition_create_first_desc(forest) - @ccall libt8.t8_forest_partition_create_first_desc(forest::t8_forest_t)::Cvoid -end - -""" - t8_forest_partition_create_tree_offsets(forest) - -Create the array tree offsets of a partitioned forest. This arrays stores at position p the global id of the first tree of this process. Or if this tree is shared, it stores -(global\\_id) - 1. - -# Arguments -* `forest`:\\[in,out\\] The forest. *forest* must be committed before calling this function. -### Prototype -```c -void t8_forest_partition_create_tree_offsets (t8_forest_t forest); -``` -""" -function t8_forest_partition_create_tree_offsets(forest) - @ccall libt8.t8_forest_partition_create_tree_offsets(forest::t8_forest_t)::Cvoid -end - -""" - t8_forest_partition_data(forest_from, forest_to, data_in, data_out) - -Re-Partition an array accordingly to a partitioned forest. - -!!! note - - *data_in* has to be of size equal to the number of local elements of *forest_from* *data_out* has to be already allocated and has to be of size equal to the number of local elements of *forest_to*. - -# Arguments -* `forest_from`:\\[in\\] The forest before the partitioning step. -* `forest_to`:\\[in\\] The partitioned forest of *forest_from*. -* `data_in`:\\[in\\] A pointer to an [`sc_array_t`](@ref) holding data (one value per element) accordingly to *forest_from*. -* `data_out`:\\[in,out\\] A pointer to an already allocated [`sc_array_t`](@ref) capable of holding data accordingly to *forest_to*. -### Prototype -```c -void t8_forest_partition_data (t8_forest_t forest_from, t8_forest_t forest_to, const sc_array_t *data_in, sc_array_t *data_out); -``` -""" -function t8_forest_partition_data(forest_from, forest_to, data_in, data_out) - @ccall libt8.t8_forest_partition_data(forest_from::t8_forest_t, forest_to::t8_forest_t, data_in::Ptr{sc_array_t}, data_out::Ptr{sc_array_t})::Cvoid -end - -""" - t8_forest_partition_test_boundary_element(forest) - -Test if the last descendant of the last element of current rank has a smaller linear id than the stored first descendant of rank+1. If this is not the case, elements overlap. - -!!! note - - *forest* must be committed before calling this function. - -# Arguments -* `forest`:\\[in\\] The forest. -### Prototype -```c -void t8_forest_partition_test_boundary_element (const t8_forest_t forest); -``` -""" -function t8_forest_partition_test_boundary_element(forest) - @ccall libt8.t8_forest_partition_test_boundary_element(forest::t8_forest_t)::Cvoid -end - -""" - t8_forest_pfc_correction_offsets(forest) - -Correct the partitioning if element families are split across process boundaries. - -The default partitioning distributes the elements into equally-sized partitions. For coarsening, however, all elements of a family have to be on the same process in order to be coarsened into their parent element. This function corrects the partitioning such that no families are split across process boundaries. The price to be paid is a slight deviation from the optimal balance of elements among processors. - -# Arguments -* `forest`:\\[in,out\\] the forest. On input, it has been partitioned into equally-sized element partitions. On output, the partitioning has been adjusted such that no element families are split across the process boundaries. -### Prototype -```c -void t8_forest_pfc_correction_offsets (t8_forest_t forest); -``` -""" -function t8_forest_pfc_correction_offsets(forest) - @ccall libt8.t8_forest_pfc_correction_offsets(forest::t8_forest_t)::Cvoid -end - -# typedef int ( * t8_search_element_callback_c_wrapper ) ( t8_forest_t forest , const t8_locidx_t ltreeid , const t8_element_t * element , const int is_leaf , const t8_element_array_t * leaf_elements , const t8_locidx_t tree_leaf_index , void * user_data ) -""" -A call-back function used by t8_forest_init_search for searching elements. Is called on an element and the search criterion should be checked on that element. Return true if the search criterion is met, false otherwise. - -# Arguments -* `forest`:\\[in\\] the forest -* `ltreeid`:\\[in\\] the local tree id of the current tree in the cmesh. -* `element`:\\[in\\] the element for which the search criterion is checked -* `is_leaf`:\\[in\\] true if and only if *element* is a leaf element -* `leaf_elements`:\\[in\\] the leaf elements in *forest* -* `tree_leaf_index`:\\[in\\] the local index of the first leaf in *leaf_elements* -* `user_data`:\\[in\\] a user data pointer that can be set by the user -# Returns -non-zero if the search criterion is met, zero otherwise. -""" -const t8_search_element_callback_c_wrapper = Ptr{Cvoid} - -# typedef int ( * t8_search_queries_callback_c_wrapper ) ( t8_forest_t forest , const t8_locidx_t ltreeid , const t8_element_t * element , const int is_leaf , const t8_element_array_t * leaf_elements , const t8_locidx_t tree_leaf_index , void * queries , void * user_data ) -""" -A call-back function used by t8_forest_init_search_with_queries for searching elements and executing queries. Is called on an element and all queries are checked on that element. All positive queries are passed further down to the children of the element up to leaf elements of the tree. The results of the check are stored in *query_matches*. - -# Arguments -* `forest`:\\[in\\] the forest -* `ltreeid`:\\[in\\] the local tree id of the current tree in the cmesh. -* `element`:\\[in\\] the element for which the search criterion is checked -* `is_leaf`:\\[in\\] true if and only if *element* is a leaf element -* `leaf_elements`:\\[in\\] the leaf elements in *forest* -* `tree_leaf_index`:\\[in\\] the local index of the first leaf in *leaf_elements* -* `queries`:\\[in\\] a pointer to an array of queries -* `user_data`:\\[in\\] a user data pointer that can be set by the user -""" -const t8_search_queries_callback_c_wrapper = Ptr{Cvoid} - -# typedef void ( * t8_search_batched_queries_callback_c_wrapper ) ( t8_forest_t forest , const t8_locidx_t ltreeid , const t8_element_t * element , const int is_leaf , const t8_element_array_t * leaf_elements , const t8_locidx_t tree_leaf_index , const void * queries , const size_t * active_query_indices , int * query_matches , void * user_data ) -""" -A call-back function used by t8_forest_init_search_with_batched_queries for searching elements and executing batched queries. Is called on an element and all queries are checked on that element. All positive queries are passed further down to the children of the element up to leaf elements of the tree. The results of the check are stored in *query_matches*. - -# Arguments -* `forest`:\\[in\\] the forest -* `ltreeid`:\\[in\\] the local tree id of the current tree in the cmesh. -* `element`:\\[in\\] the element for which the search criterion is checked -* `is_leaf`:\\[in\\] true if and only if *element* is a leaf element -* `leaf_elements`:\\[in\\] the leaf elements in *forest* -* `tree_leaf_index`:\\[in\\] the local index of the first leaf in *leaf_elements* -* `queries`:\\[in\\] a pointer to an array of queries -* `active_query_indices`:\\[in\\] a pointer to an array of indices of active queries in *queries* -* `query_matches`:\\[in,out\\] a pointer to an array of length *num_active_queries*. If query\\_matches[i] is true, then the element 'matches' the query of the active query with index active\\_query\\_indices[i]. -* `user_data`:\\[in\\] a user data pointer that can be set by the user -""" -const t8_search_batched_queries_callback_c_wrapper = Ptr{Cvoid} - -mutable struct t8_forest_c_search end - -"""A wrapper around the forest search context""" -const t8_forest_search_c_wrapper = Ptr{t8_forest_c_search} - -""" - t8_forest_init_search(search, element_callback, forest) - -### Prototype -```c -void t8_forest_init_search (t8_forest_search_c_wrapper search, t8_search_element_callback_c_wrapper element_callback, const t8_forest_t forest); -``` -""" -function t8_forest_init_search(search, element_callback, forest) - @ccall libt8.t8_forest_init_search(search::t8_forest_search_c_wrapper, element_callback::t8_search_element_callback_c_wrapper, forest::t8_forest_t)::Cvoid -end - -""" - t8_forest_search_update_forest(search, forest) - -### Prototype -```c -void t8_forest_search_update_forest (t8_forest_search_c_wrapper search, const t8_forest_t forest); -``` -""" -function t8_forest_search_update_forest(search, forest) - @ccall libt8.t8_forest_search_update_forest(search::t8_forest_search_c_wrapper, forest::t8_forest_t)::Cvoid -end - -""" - t8_forest_search_update_user_data(search, udata) - -Update the user data pointer in the search context - -# Arguments -* `search`:\\[in,out\\] the search context to update -* `udata`:\\[in\\] the new user data pointer to use -### Prototype -```c -void t8_forest_search_update_user_data (t8_forest_search_c_wrapper search, void *udata); -``` -""" -function t8_forest_search_update_user_data(search, udata) - @ccall libt8.t8_forest_search_update_user_data(search::t8_forest_search_c_wrapper, udata::Ptr{Cvoid})::Cvoid -end - -""" - t8_forest_search_do_search(search) - -Perform the search - -# Arguments -* `search`:\\[in,out\\] the search context to use -### Prototype -```c -void t8_forest_search_do_search (t8_forest_search_c_wrapper search); -``` -""" -function t8_forest_search_do_search(search) - @ccall libt8.t8_forest_search_do_search(search::t8_forest_search_c_wrapper)::Cvoid -end - -""" - t8_forest_search_destroy(search) - -Destroy the search context - -# Arguments -* `search`:\\[in,out\\] the search context to destroy -### Prototype -```c -void t8_forest_search_destroy (t8_forest_search_c_wrapper search); -``` -""" -function t8_forest_search_destroy(search) - @ccall libt8.t8_forest_search_destroy(search::t8_forest_search_c_wrapper)::Cvoid -end - -mutable struct t8_forest_search_with_queries end - -"""A wrapper around the forest search with queries context""" -const t8_forest_search_with_queries_c_wrapper = Ptr{t8_forest_search_with_queries} - -""" - t8_forest_init_search_with_queries(search_with_queries, element_callback, queries_callback, queries, num_queries, forest) - -### Prototype -```c -void t8_forest_init_search_with_queries (t8_forest_search_with_queries_c_wrapper search_with_queries, t8_search_element_callback_c_wrapper element_callback, t8_search_queries_callback_c_wrapper queries_callback, void **queries, const size_t num_queries, const t8_forest_t forest); -``` -""" -function t8_forest_init_search_with_queries(search_with_queries, element_callback, queries_callback, queries, num_queries, forest) - @ccall libt8.t8_forest_init_search_with_queries(search_with_queries::t8_forest_search_with_queries_c_wrapper, element_callback::t8_search_element_callback_c_wrapper, queries_callback::t8_search_queries_callback_c_wrapper, queries::Ptr{Ptr{Cvoid}}, num_queries::Csize_t, forest::t8_forest_t)::Cvoid -end - -""" - t8_forest_search_with_queries_update_forest(search_with_queries, forest) - -### Prototype -```c -void t8_forest_search_with_queries_update_forest (t8_forest_search_with_queries_c_wrapper search_with_queries, const t8_forest_t forest); -``` -""" -function t8_forest_search_with_queries_update_forest(search_with_queries, forest) - @ccall libt8.t8_forest_search_with_queries_update_forest(search_with_queries::t8_forest_search_with_queries_c_wrapper, forest::t8_forest_t)::Cvoid -end - -""" - t8_forest_search_with_queries_update_user_data(search_with_queries, udata) - -Update the user data pointer in the search with queries context - -# Arguments -* `search_with_queries`:\\[in,out\\] the search with queries context to update -* `udata`:\\[in\\] the new user data pointer to use -### Prototype -```c -void t8_forest_search_with_queries_update_user_data (t8_forest_search_with_queries_c_wrapper search_with_queries, void *udata); -``` -""" -function t8_forest_search_with_queries_update_user_data(search_with_queries, udata) - @ccall libt8.t8_forest_search_with_queries_update_user_data(search_with_queries::t8_forest_search_with_queries_c_wrapper, udata::Ptr{Cvoid})::Cvoid -end - -""" - t8_forest_search_with_queries_update_queries(search_with_queries, queries, num_queries) - -Update the queries in the search with queries context - -# Arguments -* `search_with_queries`:\\[in,out\\] the search with queries context to update -* `queries`:\\[in\\] a pointer to an array of queries -* `num_queries`:\\[in\\] the number of queries in the array -### Prototype -```c -void t8_forest_search_with_queries_update_queries (t8_forest_search_with_queries_c_wrapper search_with_queries, void **queries, const size_t num_queries); -``` -""" -function t8_forest_search_with_queries_update_queries(search_with_queries, queries, num_queries) - @ccall libt8.t8_forest_search_with_queries_update_queries(search_with_queries::t8_forest_search_with_queries_c_wrapper, queries::Ptr{Ptr{Cvoid}}, num_queries::Csize_t)::Cvoid -end - -""" - t8_forest_search_with_queries_destroy(search) - -Destroy the search with queries context - -# Arguments -* `search`:\\[in,out\\] the search with queries context to destroy -### Prototype -```c -void t8_forest_search_with_queries_destroy (t8_forest_search_with_queries_c_wrapper search); -``` -""" -function t8_forest_search_with_queries_destroy(search) - @ccall libt8.t8_forest_search_with_queries_destroy(search::t8_forest_search_with_queries_c_wrapper)::Cvoid -end - -""" - t8_forest_search_with_queries_do_search(search) - -Perform the search with queries - -# Arguments -* `search`:\\[in,out\\] the search with queries context to use -### Prototype -```c -void t8_forest_search_with_queries_do_search (t8_forest_search_with_queries_c_wrapper search); -``` -""" -function t8_forest_search_with_queries_do_search(search) - @ccall libt8.t8_forest_search_with_queries_do_search(search::t8_forest_search_with_queries_c_wrapper)::Cvoid -end - -mutable struct t8_forest_search_with_batched_queries end - -"""A wrapper around the forest search with batched queries context""" -const t8_forest_search_with_batched_queries_c_wrapper = Ptr{t8_forest_search_with_batched_queries} - -""" - t8_forest_init_search_with_batched_queries(search_with_queries, element_callback, queries_callback, queries, num_queries, forest) - -### Prototype -```c -void t8_forest_init_search_with_batched_queries (t8_forest_search_with_batched_queries_c_wrapper search_with_queries, t8_search_element_callback_c_wrapper element_callback, t8_search_batched_queries_callback_c_wrapper queries_callback, void **queries, const size_t num_queries, const t8_forest_t forest); -``` -""" -function t8_forest_init_search_with_batched_queries(search_with_queries, element_callback, queries_callback, queries, num_queries, forest) - @ccall libt8.t8_forest_init_search_with_batched_queries(search_with_queries::t8_forest_search_with_batched_queries_c_wrapper, element_callback::t8_search_element_callback_c_wrapper, queries_callback::t8_search_batched_queries_callback_c_wrapper, queries::Ptr{Ptr{Cvoid}}, num_queries::Csize_t, forest::t8_forest_t)::Cvoid -end - -""" - t8_forest_search_with_batched_queries_update_forest(search_with_queries, forest) - -### Prototype -```c -void t8_forest_search_with_batched_queries_update_forest ( t8_forest_search_with_batched_queries_c_wrapper search_with_queries, const t8_forest_t forest); -``` -""" -function t8_forest_search_with_batched_queries_update_forest(search_with_queries, forest) - @ccall libt8.t8_forest_search_with_batched_queries_update_forest(search_with_queries::t8_forest_search_with_batched_queries_c_wrapper, forest::t8_forest_t)::Cvoid -end - -""" - t8_forest_search_with_batched_queries_update_user_data(search_with_queries, udata) - -Update the user data pointer in the search with batched queries context - -# Arguments -* `search_with_queries`:\\[in,out\\] the search with batched queries context to update -* `udata`:\\[in\\] the new user data pointer to use -### Prototype -```c -void t8_forest_search_with_batched_queries_update_user_data ( t8_forest_search_with_batched_queries_c_wrapper search_with_queries, void *udata); -``` -""" -function t8_forest_search_with_batched_queries_update_user_data(search_with_queries, udata) - @ccall libt8.t8_forest_search_with_batched_queries_update_user_data(search_with_queries::t8_forest_search_with_batched_queries_c_wrapper, udata::Ptr{Cvoid})::Cvoid -end - -""" - t8_forest_search_with_batched_queries_update_queries(search_with_queries, queries, num_queries) - -Update the queries in the search with batched queries context - -# Arguments -* `search_with_queries`:\\[in,out\\] the search with batched queries context to update -* `queries`:\\[in\\] a pointer to an array of queries -* `num_queries`:\\[in\\] the number of queries in the array -### Prototype -```c -void t8_forest_search_with_batched_queries_update_queries ( t8_forest_search_with_batched_queries_c_wrapper search_with_queries, void **queries, const size_t num_queries); -``` -""" -function t8_forest_search_with_batched_queries_update_queries(search_with_queries, queries, num_queries) - @ccall libt8.t8_forest_search_with_batched_queries_update_queries(search_with_queries::t8_forest_search_with_batched_queries_c_wrapper, queries::Ptr{Ptr{Cvoid}}, num_queries::Csize_t)::Cvoid -end - -""" - t8_forest_search_with_batched_queries_destroy(search) - -Destroy the search with batched queries context - -# Arguments -* `search`:\\[in,out\\] the search with batched queries context to destroy -### Prototype -```c -void t8_forest_search_with_batched_queries_destroy (t8_forest_search_with_batched_queries_c_wrapper search); -``` -""" -function t8_forest_search_with_batched_queries_destroy(search) - @ccall libt8.t8_forest_search_with_batched_queries_destroy(search::t8_forest_search_with_batched_queries_c_wrapper)::Cvoid -end - -""" - t8_forest_search_with_batched_queries_do_search(search) - -Perform the search with batched queries - -# Arguments -* `search`:\\[in,out\\] the search with batched queries context to use -### Prototype -```c -void t8_forest_search_with_batched_queries_do_search (t8_forest_search_with_batched_queries_c_wrapper search); -``` -""" -function t8_forest_search_with_batched_queries_do_search(search) - @ccall libt8.t8_forest_search_with_batched_queries_do_search(search::t8_forest_search_with_batched_queries_c_wrapper)::Cvoid -end - -""" - t8_geom_get_name(geom) - -Get the name of a geometry. - -# Arguments -* `geom`:\\[in\\] A geometry. -# Returns -The name of *geom*. -### Prototype -```c -const char * t8_geom_get_name (const t8_geometry_c *geom); -``` -""" -function t8_geom_get_name(geom) - @ccall libt8.t8_geom_get_name(geom::Ptr{t8_geometry_c})::Cstring -end - -""" - t8_geom_get_type(geom) - -Get the type of a geometry. - -# Arguments -* `geom`:\\[in\\] A geometry. -# Returns -The type of *geom*. -### Prototype -```c -t8_geometry_type_t t8_geom_get_type (const t8_geometry_c *geom); -``` -""" -function t8_geom_get_type(geom) - @ccall libt8.t8_geom_get_type(geom::Ptr{t8_geometry_c})::t8_geometry_type_t -end - -""" - t8_geom_compute_linear_geometry(tree_class, tree_vertices, ref_coords, num_coords, out_coords) - -### Prototype -```c -void t8_geom_compute_linear_geometry (t8_eclass_t tree_class, const double *tree_vertices, const double *ref_coords, const size_t num_coords, double *out_coords); -``` -""" -function t8_geom_compute_linear_geometry(tree_class, tree_vertices, ref_coords, num_coords, out_coords) - @ccall libt8.t8_geom_compute_linear_geometry(tree_class::Cint, tree_vertices::Ptr{Cdouble}, ref_coords::Ptr{Cdouble}, num_coords::Csize_t, out_coords::Ptr{Cdouble})::Cvoid -end - -""" - t8_geom_compute_linear_axis_aligned_geometry(tree_class, tree_vertices, ref_coords, num_coords, out_coords) - -### Prototype -```c -void t8_geom_compute_linear_axis_aligned_geometry (t8_eclass_t tree_class, const double *tree_vertices, const double *ref_coords, const size_t num_coords, double *out_coords); -``` -""" -function t8_geom_compute_linear_axis_aligned_geometry(tree_class, tree_vertices, ref_coords, num_coords, out_coords) - @ccall libt8.t8_geom_compute_linear_axis_aligned_geometry(tree_class::Cint, tree_vertices::Ptr{Cdouble}, ref_coords::Ptr{Cdouble}, num_coords::Csize_t, out_coords::Ptr{Cdouble})::Cvoid -end - -""" - t8_geom_linear_interpolation(coefficients, corner_values, corner_value_dim, interpolation_dim, evaluated_function) - -Interpolates linearly between 2, bilinearly between 4 or trilineraly between 8 points. - -# Arguments -* `coefficients`:\\[in\\] An array of size at least dim giving the coefficients used for the interpolation -* `corner_values`:\\[in\\] An array of size 2^dim * 3, giving for each corner (in zorder) of the unit square/cube its function values in space. -* `corner_value_dim`:\\[in\\] The dimension of the *corner_values*. -* `interpolation_dim`:\\[in\\] The dimension of the interpolation (1 for linear, 2 for bilinear, 3 for trilinear) -* `evaluated_function`:\\[out\\] An array of size *corner_value_dim*, on output the result of the interpolation. -### Prototype -```c -void t8_geom_linear_interpolation (const double *coefficients, const double *corner_values, int corner_value_dim, int interpolation_dim, double *evaluated_function); -``` -""" -function t8_geom_linear_interpolation(coefficients, corner_values, corner_value_dim, interpolation_dim, evaluated_function) - @ccall libt8.t8_geom_linear_interpolation(coefficients::Ptr{Cdouble}, corner_values::Ptr{Cdouble}, corner_value_dim::Cint, interpolation_dim::Cint, evaluated_function::Ptr{Cdouble})::Cvoid -end - -""" - t8_geom_triangular_interpolation(coefficients, corner_values, corner_value_dim, interpolation_dim, evaluated_function) - -Triangular interpolation between 3 points (triangle) or 4 points (tetrahedron) using cartesian coordinates. The input coefficients have to be given as coordinates in the reference triangle (interpolation\\_dim = 2) with points (0,0) (1,0) (1,1) or the reference tet (interpolation\\_dim = 3) with points (0,0,0) (1,0,0) (1,1,0) (1,1,1). - -# Arguments -* `coefficients`:\\[in\\] An array of size *interpolation_dim* giving the coefficients in the reference triangle/tet used for the interpolation -* `corner_values`:\\[in\\] An array of size 3 * *corner_value_dim* for *interpolation_dim* == 2 or 4 * *corner_value_dim* for *interpolation_dim* == 3, giving the function values of the triangle/tetrahedron for each corner (in zorder) -* `corner_value_dim`:\\[in\\] The dimension of the *corner_values*. -* `interpolation_dim`:\\[in\\] The dimension of the interpolation (2 for triangle, 3 for tetrahedron) -* `evaluated_function`:\\[out\\] An array of size *corner_value_dim*, on output the result of the interpolation. -### Prototype -```c -void t8_geom_triangular_interpolation (const double *coefficients, const double *corner_values, int corner_value_dim, int interpolation_dim, double *evaluated_function); -``` -""" -function t8_geom_triangular_interpolation(coefficients, corner_values, corner_value_dim, interpolation_dim, evaluated_function) - @ccall libt8.t8_geom_triangular_interpolation(coefficients::Ptr{Cdouble}, corner_values::Ptr{Cdouble}, corner_value_dim::Cint, interpolation_dim::Cint, evaluated_function::Ptr{Cdouble})::Cvoid -end - -""" - t8_geom_get_face_vertices(tree_class, tree_vertices, face_index, dim, face_vertices) - -### Prototype -```c -void t8_geom_get_face_vertices (t8_eclass_t tree_class, const double *tree_vertices, int face_index, int dim, double *face_vertices); -``` -""" -function t8_geom_get_face_vertices(tree_class, tree_vertices, face_index, dim, face_vertices) - @ccall libt8.t8_geom_get_face_vertices(tree_class::Cint, tree_vertices::Ptr{Cdouble}, face_index::Cint, dim::Cint, face_vertices::Ptr{Cdouble})::Cvoid -end - -""" - t8_geom_get_edge_vertices(tree_class, tree_vertices, edge_index, dim, edge_vertices) - -### Prototype -```c -void t8_geom_get_edge_vertices (t8_eclass_t tree_class, const double *tree_vertices, int edge_index, int dim, double *edge_vertices); -``` -""" -function t8_geom_get_edge_vertices(tree_class, tree_vertices, edge_index, dim, edge_vertices) - @ccall libt8.t8_geom_get_edge_vertices(tree_class::Cint, tree_vertices::Ptr{Cdouble}, edge_index::Cint, dim::Cint, edge_vertices::Ptr{Cdouble})::Cvoid -end - -""" - t8_geom_get_ref_intersection(edge_index, ref_coords, ref_intersection) - -Calculates a point of intersection in a triangular reference space. The intersection is the extension of a straight line passing through a reference point and the opposite vertex of the edge. /|\\ / | \\ o -> reference point / o \\ x -> intersection point / | \\ /\\_\\_\\_\\_x\\_\\_\\_\\_\\ - -# Arguments -* `edge_index`:\\[in\\] Index of the edge, the intersection lies on. -* `ref_coords`:\\[in\\] Array containing the coordinates of the reference point. -* `ref_intersection`:\\[out\\] Coordinates of the intersection point. -### Prototype -```c -void t8_geom_get_ref_intersection (int edge_index, const double *ref_coords, double ref_intersection[2]); -``` -""" -function t8_geom_get_ref_intersection(edge_index, ref_coords, ref_intersection) - @ccall libt8.t8_geom_get_ref_intersection(edge_index::Cint, ref_coords::Ptr{Cdouble}, ref_intersection::Ptr{Cdouble})::Cvoid -end - -""" - t8_geom_get_triangle_scaling_factor(edge_index, tree_vertices, glob_intersection, glob_ref_point) - -Calculates the scaling factor for edge displacement along a triangular tree face depending on the position of the global reference point. - -# Arguments -* `edge_index`:\\[in\\] Index of the edge, whose displacement should be scaled. -* `tree_vertices`:\\[in\\] Array with the tree vertex coordinates. -* `glob_intersection`:\\[in\\] Array containing the coordinates of the intersection point of a line drawn from the opposite vertex through the glob\\_ref\\_point onto the edge with edge\\_index. -* `glob_ref_point`:\\[in\\] Array containing the coordinates of the reference point mapped into the global space. -### Prototype -```c -double t8_geom_get_triangle_scaling_factor (int edge_index, const double *tree_vertices, const double *glob_intersection, const double *glob_ref_point); -``` -""" -function t8_geom_get_triangle_scaling_factor(edge_index, tree_vertices, glob_intersection, glob_ref_point) - @ccall libt8.t8_geom_get_triangle_scaling_factor(edge_index::Cint, tree_vertices::Ptr{Cdouble}, glob_intersection::Ptr{Cdouble}, glob_ref_point::Ptr{Cdouble})::Cdouble -end - -""" - t8_geom_get_scaling_factor_of_edge_on_face_tet(edge_index, face_index, ref_coords) - -Calculates the scaling factor for the displacement of an edge over a face of a tetrahedral element. - -# Arguments -* `edge_index`:\\[in\\] Index of the edge, whose displacement should be scaled. -* `face_index`:\\[in\\] Index of the face, the displacement should be scaled on. -* `ref_coords`:\\[in\\] Array containing the coordinates of the reference point. -# Returns -The scaling factor of the edge displacement on the face at the point of the reference coordinates. -### Prototype -```c -double t8_geom_get_scaling_factor_of_edge_on_face_tet (int edge_index, int face_index, const double *ref_coords); -``` -""" -function t8_geom_get_scaling_factor_of_edge_on_face_tet(edge_index, face_index, ref_coords) - @ccall libt8.t8_geom_get_scaling_factor_of_edge_on_face_tet(edge_index::Cint, face_index::Cint, ref_coords::Ptr{Cdouble})::Cdouble -end - -""" - t8_geom_get_tet_face_intersection(face_index, ref_coords, face_intersection) - -Calculates the face intersection of a ray passing trough the reference coordinates and the opposite vertex of that face for a tetrahedron. The coordinates of the face intersection are reference coordinates: [0,1]^3. - -# Arguments -* `face_index`:\\[in\\] Index of the face, on which the intersection should be calculated. -* `ref_coords`:\\[in\\] Array containing the coordinates of the reference point. -* `face_intersection`:\\[out\\] Three dimensional array containing the intersection point on the face in reference space. -### Prototype -```c -void t8_geom_get_tet_face_intersection (const int face_index, const double *ref_coords, double face_intersection[3]); -``` -""" -function t8_geom_get_tet_face_intersection(face_index, ref_coords, face_intersection) - @ccall libt8.t8_geom_get_tet_face_intersection(face_index::Cint, ref_coords::Ptr{Cdouble}, face_intersection::Ptr{Cdouble})::Cvoid -end - -""" - t8_geom_get_scaling_factor_of_edge_on_face_prism(edge_index, face_index, ref_coords) - -Calculates the scaling factor for the displacement of an edge over a face of a prism element. - -# Arguments -* `edge_index`:\\[in\\] Index of the edge, whose displacement should be scaled. -* `face_index`:\\[in\\] Index of the face, the displacement should be scaled on. -* `ref_coords`:\\[in\\] Array containing the coordinates of the reference point. -# Returns -The scaling factor of the edge displacement on the face at the point of the reference coordinates. -### Prototype -```c -double t8_geom_get_scaling_factor_of_edge_on_face_prism (int edge_index, int face_index, const double *ref_coords); -``` -""" -function t8_geom_get_scaling_factor_of_edge_on_face_prism(edge_index, face_index, ref_coords) - @ccall libt8.t8_geom_get_scaling_factor_of_edge_on_face_prism(edge_index::Cint, face_index::Cint, ref_coords::Ptr{Cdouble})::Cdouble -end - -""" - t8_geom_get_scaling_factor_face_through_volume_prism(face, ref_coords) - -Calculates the scaling factor for the displacement of an face through the volume of a prism element. - -# Arguments -* `face`:\\[in\\] Index of the displaced face. -* `ref_coords`:\\[in\\] Array containing the coordinates of the reference point. -# Returns -The scaling factor of the face displacement at the point of the reference coordinates inside the prism volume. -### Prototype -```c -double t8_geom_get_scaling_factor_face_through_volume_prism (const int face, const double *ref_coords); -``` -""" -function t8_geom_get_scaling_factor_face_through_volume_prism(face, ref_coords) - @ccall libt8.t8_geom_get_scaling_factor_face_through_volume_prism(face::Cint, ref_coords::Ptr{Cdouble})::Cdouble -end - -""" - t8_vertex_point_inside(vertex_coords, point, tolerance) - -Check if a point lies inside a vertex - -# Arguments -* `vertex_coords`:\\[in\\] The coordinates of the vertex -* `point`:\\[in\\] The coordinates of the point to check -* `tolerance`:\\[in\\] A double > 0 defining the tolerance -# Returns -0 if the point is outside, 1 otherwise. -### Prototype -```c -int t8_vertex_point_inside (const double vertex_coords[3], const double point[3], const double tolerance); -``` -""" -function t8_vertex_point_inside(vertex_coords, point, tolerance) - @ccall libt8.t8_vertex_point_inside(vertex_coords::Ptr{Cdouble}, point::Ptr{Cdouble}, tolerance::Cdouble)::Cint -end - -""" - t8_line_point_inside(p_0, vec, point, tolerance) - -Check if a point is inside a line that is defined by a starting point *p_0* and a vector *vec* - -# Arguments -* `p_0`:\\[in\\] Starting point of the line -* `vec`:\\[in\\] Direction of the line (not normalized) -* `point`:\\[in\\] The coordinates of the point to check -* `tolerance`:\\[in\\] A double > 0 defining the tolerance -# Returns -0 if the point is outside, 1 otherwise. -### Prototype -```c -int t8_line_point_inside (const double *p_0, const double *vec, const double *point, const double tolerance); -``` -""" -function t8_line_point_inside(p_0, vec, point, tolerance) - @ccall libt8.t8_line_point_inside(p_0::Ptr{Cdouble}, vec::Ptr{Cdouble}, point::Ptr{Cdouble}, tolerance::Cdouble)::Cint -end - -""" - t8_triangle_point_inside(p_0, v, w, point, tolerance) - -Check if a point is inside of a triangle described by a point *p_0* and two vectors *v* and *w*. - -# Arguments -* `p_0`:\\[in\\] The first vertex of a triangle -* `v`:\\[in\\] The vector from p\\_0 to p\\_1 (second vertex in the triangle) -* `w`:\\[in\\] The vector from p\\_0 to p\\_2 (third vertex in the triangle) -* `point`:\\[in\\] The coordinates of the point to check -* `tolerance`:\\[in\\] A double > 0 defining the tolerance -# Returns -0 if the point is outside, 1 otherwise. -### Prototype -```c -int t8_triangle_point_inside (const double p_0[3], const double v[3], const double w[3], const double point[3], const double tolerance); -``` -""" -function t8_triangle_point_inside(p_0, v, w, point, tolerance) - @ccall libt8.t8_triangle_point_inside(p_0::Ptr{Cdouble}, v::Ptr{Cdouble}, w::Ptr{Cdouble}, point::Ptr{Cdouble}, tolerance::Cdouble)::Cint -end - -""" - t8_plane_point_inside(point_on_face, face_normal, point) - -Check if a point lays on the inner side of a plane of a bilinearly interpolated volume element. the plane is described by a point and the normal of the face. - -# Arguments -* `point_on_face`:\\[in\\] A point on the plane -* `face_normal`:\\[in\\] The normal of the face -* `point`:\\[in\\] The point to check -# Returns -0 if the point is outside, 1 otherwise. -### Prototype -```c -int t8_plane_point_inside (const double point_on_face[3], const double face_normal[3], const double point[3]); -``` -""" -function t8_plane_point_inside(point_on_face, face_normal, point) - @ccall libt8.t8_plane_point_inside(point_on_face::Ptr{Cdouble}, face_normal::Ptr{Cdouble}, point::Ptr{Cdouble})::Cint -end - -# typedef void ( * t8_geom_analytic_fn ) ( t8_cmesh_t cmesh , t8_gloidx_t gtreeid , const double * ref_coords , const size_t num_coords , double * out_coords , const void * tree_data , const void * user_data ) -""" -Definition of an analytic geometry function. This function maps reference coordinates to physical coordinates. - -```c++ - [0,1]^\\mathrm{dim} -``` - -. - -# Arguments -* `cmesh`:\\[in\\] The cmesh. -* `gtreeid`:\\[in\\] The global tree (of the cmesh) in which the reference point is. -* `ref_coords`:\\[in\\] Array of dimension x *num_coords* many entries, specifying a point in -* `num_coords`:\\[in\\] The number of coordinates in *ref_coords*. -* `out_coords`:\\[out\\] The mapped coordinates in physical space of *ref_coords*. The length is *num_coords* * 3. -* `tree_data`:\\[in\\] The data of the current tree as loaded by a t8_geom_load_tree_data_fn. -* `user_data`:\\[in\\] The user data pointer stored in the geometry. -""" -const t8_geom_analytic_fn = Ptr{Cvoid} - -# typedef void ( * t8_geom_analytic_jacobian_fn ) ( t8_cmesh_t cmesh , t8_gloidx_t gtreeid , const double * ref_coords , const size_t num_coords , double * jacobian , const void * tree_data , const void * user_data ) -""" -Definition for the jacobian of an analytic geometry function. - -```c++ - [0,1]^\\mathrm{dim} -``` - -. - -```c++ - \\mathrm{dim} -``` - -to map. - -```c++ - \\mathrm{dim} \\cdot 3 -``` - -x *num_coords*. Indices - -```c++ - 3 \\cdot i -``` - -, - -```c++ - 3 \\cdot i+1 -``` - -, - -```c++ - 3 \\cdot i+2 -``` - -correspond to the - -```c++ - i -``` - --th column of the jacobian (Entry - -```c++ - 3 \\cdot i + j -``` - -is - -```c++ - \\frac{\\partial f_j}{\\partial x_i} -``` - -). - -# Arguments -* `cmesh`:\\[in\\] The cmesh. -* `gtreeid`:\\[in\\] The global tree (of the cmesh) in which the reference point is. -* `ref_coords`:\\[in\\] Array of tree dimension x *num_coords* many entries, specifying points in -* `num_coords`:\\[in\\] Amount of points of -* `jacobian`:\\[out\\] The jacobian at *ref_coords*. Array of size -* `tree_data`:\\[in\\] The data of the current tree as loaded by a t8_geom_load_tree_data_fn. -* `user_data`:\\[in\\] The user data pointer stored in the geometry. -""" -const t8_geom_analytic_jacobian_fn = Ptr{Cvoid} - -# typedef void ( * t8_geom_load_tree_data_fn ) ( t8_cmesh_t cmesh , t8_gloidx_t gtreeid , const void * * tree_data ) -""" -Definition for the load tree data function. - -# Arguments -* `cmesh`:\\[in\\] The cmesh. -* `gtreeid`:\\[in\\] The global tree (of the cmesh) in which the reference point is. -* `tree_data`:\\[in\\] The data of the trees. -""" -const t8_geom_load_tree_data_fn = Ptr{Cvoid} - -# typedef int ( * t8_geom_tree_negative_volume_fn ) ( ) -"""Definition for the negative volume function.""" -const t8_geom_tree_negative_volume_fn = Ptr{Cvoid} - -# typedef int ( * t8_geom_tree_compatible_fn ) ( ) -"""Definition for the tree compatible function.""" -const t8_geom_tree_compatible_fn = Ptr{Cvoid} - -""" - t8_geometry_analytic_destroy(geom) - -Destroy a geometry analytic object. - -# Arguments -* `geom`:\\[in,out\\] A pointer to a geometry object. Set to NULL on output. -### Prototype -```c -void t8_geometry_analytic_destroy (t8_geometry_c **geom); -``` -""" -function t8_geometry_analytic_destroy(geom) - @ccall libt8.t8_geometry_analytic_destroy(geom::Ptr{Ptr{t8_geometry_c}})::Cvoid -end - -""" - t8_geometry_analytic_new(name, analytical, jacobian, load_tree_data, tree_negative_volume, tree_compatible, user_data) - -Create a new analytic geometry. The geometry is viable with all tree types and uses a user-provided analytic and jacobian function. The actual mappings are done by these functions. - -# Arguments -* `name`:\\[in\\] The name to give this geometry. -* `analytical`:\\[in\\] The analytical function to use for this geometry. -* `jacobian`:\\[in\\] The jacobian of *analytical*. -* `load_tree_data`:\\[in\\] The function that is used to load a tree's data. -* `tree_negative_volume`:\\[in\\] The function that is used to compute if a trees volume is negative. -* `tree_compatible`:\\[in\\] The function that is used to check if a tree is compatible with the geometry. -* `user_data`:\\[in\\] Additional user data which the geometry can use. -# Returns -A pointer to an allocated geometry struct. -### Prototype -```c -t8_geometry_c * t8_geometry_analytic_new (const char *name, t8_geom_analytic_fn analytical, t8_geom_analytic_jacobian_fn jacobian, t8_geom_load_tree_data_fn load_tree_data, t8_geom_tree_negative_volume_fn tree_negative_volume, t8_geom_tree_compatible_fn tree_compatible, const void *user_data); -``` -""" -function t8_geometry_analytic_new(name, analytical, jacobian, load_tree_data, tree_negative_volume, tree_compatible, user_data) - @ccall libt8.t8_geometry_analytic_new(name::Cstring, analytical::t8_geom_analytic_fn, jacobian::t8_geom_analytic_jacobian_fn, load_tree_data::t8_geom_load_tree_data_fn, tree_negative_volume::t8_geom_tree_negative_volume_fn, tree_compatible::t8_geom_tree_compatible_fn, user_data::Ptr{Cvoid})::Ptr{t8_geometry_c} -end - -""" - t8_geom_load_tree_data_vertices(cmesh, gtreeid, user_data) - -Load vertex data from given tree. - -# Arguments -* `cmesh`:\\[in\\] The cmesh. -* `gtreeid`:\\[in\\] The global tree id (in the cmesh). -* `user_data`:\\[out\\] The load tree vertices. -### Prototype -```c -void t8_geom_load_tree_data_vertices (t8_cmesh_t cmesh, t8_gloidx_t gtreeid, const void **user_data); -``` -""" -function t8_geom_load_tree_data_vertices(cmesh, gtreeid, user_data) - @ccall libt8.t8_geom_load_tree_data_vertices(cmesh::t8_cmesh_t, gtreeid::t8_gloidx_t, user_data::Ptr{Ptr{Cvoid}})::Cvoid -end - -""" - t8_geometry_destroy(geom) - -Destroy a geometry object. - -# Arguments -* `geom`:\\[in,out\\] A pointer to a geometry object. Set to NULL on output. -### Prototype -```c -void t8_geometry_destroy (t8_geometry_c **geom); -``` -""" -function t8_geometry_destroy(geom) - @ccall libt8.t8_geometry_destroy(geom::Ptr{Ptr{t8_geometry_c}})::Cvoid -end - -# no prototype is found for this function at t8_geometry_examples.h:45:1, please use with caution -""" - t8_geometry_quadrangulated_disk_new() - -Create a new quadrangulated\\_disk geometry. - -# Returns -A pointer to an allocated geometry struct. -### Prototype -```c -t8_geometry_c * t8_geometry_quadrangulated_disk_new (); -``` -""" -function t8_geometry_quadrangulated_disk_new() - @ccall libt8.t8_geometry_quadrangulated_disk_new()::Ptr{t8_geometry_c} -end - -# no prototype is found for this function at t8_geometry_examples.h:51:1, please use with caution -""" - t8_geometry_triangulated_spherical_surface_new() - -Create a new triangulated\\_spherical\\_surface geometry. - -# Returns -A pointer to an allocated geometry struct. -### Prototype -```c -t8_geometry_c * t8_geometry_triangulated_spherical_surface_new (); -``` -""" -function t8_geometry_triangulated_spherical_surface_new() - @ccall libt8.t8_geometry_triangulated_spherical_surface_new()::Ptr{t8_geometry_c} -end - -# no prototype is found for this function at t8_geometry_examples.h:57:1, please use with caution -""" - t8_geometry_tessellated_spherical_surface_new() - -Create a new tessellated\\_spherical\\_surface geometry. - -# Returns -A pointer to an allocated geometry struct. -### Prototype -```c -t8_geometry_c * t8_geometry_tessellated_spherical_surface_new (); -``` -""" -function t8_geometry_tessellated_spherical_surface_new() - @ccall libt8.t8_geometry_tessellated_spherical_surface_new()::Ptr{t8_geometry_c} -end - -# no prototype is found for this function at t8_geometry_examples.h:63:1, please use with caution -""" - t8_geometry_cubed_spherical_shell_new() - -Create a new cubed\\_spherical\\_shell geometry. - -# Returns -A pointer to an allocated geometry struct. -### Prototype -```c -t8_geometry_c * t8_geometry_cubed_spherical_shell_new (); -``` -""" -function t8_geometry_cubed_spherical_shell_new() - @ccall libt8.t8_geometry_cubed_spherical_shell_new()::Ptr{t8_geometry_c} -end - -# no prototype is found for this function at t8_geometry_examples.h:69:1, please use with caution -""" - t8_geometry_prismed_spherical_shell_new() - -Create a new spherical\\_shell geometry. - -# Returns -A pointer to an allocated geometry struct. -### Prototype -```c -t8_geometry_c * t8_geometry_prismed_spherical_shell_new (); -``` -""" -function t8_geometry_prismed_spherical_shell_new() - @ccall libt8.t8_geometry_prismed_spherical_shell_new()::Ptr{t8_geometry_c} -end - -# no prototype is found for this function at t8_geometry_examples.h:75:1, please use with caution -""" - t8_geometry_cubed_sphere_new() - -Create a new cubed sphere geometry. - -# Returns -A pointer to an allocated geometry struct. -### Prototype -```c -t8_geometry_c * t8_geometry_cubed_sphere_new (); -``` -""" -function t8_geometry_cubed_sphere_new() - @ccall libt8.t8_geometry_cubed_sphere_new()::Ptr{t8_geometry_c} -end - -""" - t8_cmesh_set_tree_vertices(cmesh, gtree_id, vertices, num_vertices) - -Set the vertex coordinates of a tree in the cmesh. This is currently inefficient, since the vertices are duplicated for each tree. Eventually this function will be replaced by a more efficient one. It is not allowed to call this function after t8_cmesh_commit. The eclass of the tree has to be set before calling this function. - -# Arguments -* `cmesh`:\\[in,out\\] The cmesh to be updated. -* `gtree_id`:\\[in\\] The global number of the tree. -* `vertices`:\\[in\\] An array of 3 doubles per tree vertex. -* `num_vertices`:\\[in\\] The number of verticess in *vertices*. Must match the number of corners of the tree. -### Prototype -```c -void t8_cmesh_set_tree_vertices (t8_cmesh_t cmesh, const t8_gloidx_t gtree_id, const double *vertices, const int num_vertices); -``` -""" -function t8_cmesh_set_tree_vertices(cmesh, gtree_id, vertices, num_vertices) - @ccall libt8.t8_cmesh_set_tree_vertices(cmesh::t8_cmesh_t, gtree_id::t8_gloidx_t, vertices::Ptr{Cdouble}, num_vertices::Cint)::Cvoid -end - -# no prototype is found for this function at t8_geometry_lagrange.h:47:1, please use with caution -""" - t8_geometry_lagrange_new() - -Create a new Lagrange geometry of a given dimension. The geometry is compatible with all tree types and uses as many vertices as the number of Lagrange basis functions used for the mapping. The vertices are saved via the t8_cmesh_set_tree_vertices function. Sets the name to "t8\\_geom\\_lagrange" - -# Returns -A pointer to an allocated t8\\_geometry\\_lagrange struct, as if the t8_geometry_lagrange () constructor was called. -### Prototype -```c -t8_geometry_c * t8_geometry_lagrange_new (); -``` -""" -function t8_geometry_lagrange_new() - @ccall libt8.t8_geometry_lagrange_new()::Ptr{t8_geometry_c} -end - -""" - t8_geometry_lagrange_destroy(geom) - -Destroy a Lagrange geometry that was created with t8_geometry_lagrange_new. - -# Arguments -* `geom`:\\[in,out\\] A Lagrange geometry. Set to NULL on output. -### Prototype -```c -void t8_geometry_lagrange_destroy (t8_geometry_c **geom); -``` -""" -function t8_geometry_lagrange_destroy(geom) - @ccall libt8.t8_geometry_lagrange_destroy(geom::Ptr{Ptr{t8_geometry_c}})::Cvoid -end - -# no prototype is found for this function at t8_geometry_linear.h:45:1, please use with caution -""" - t8_geometry_linear_new() - -Create a new linear geometry. The geometry is only all tree types and as many vertices as the tree type has. The vertices are saved via the t8_cmesh_set_tree_vertices function. Sets the dimension and the name to "t8\\_geom\\_linear" - -# Returns -A pointer to an allocated t8\\_geometry\\_linear struct, as if the t8_geometry_linear () constructor was called. -### Prototype -```c -t8_geometry_c * t8_geometry_linear_new (); -``` -""" -function t8_geometry_linear_new() - @ccall libt8.t8_geometry_linear_new()::Ptr{t8_geometry_c} -end - -""" - t8_geometry_linear_destroy(geom) - -Destroy a linear geometry that was created with t8_geometry_linear_new. - -# Arguments -* `geom`:\\[in,out\\] A linear geometry. Set to NULL on output. -### Prototype -```c -void t8_geometry_linear_destroy (t8_geometry_c **geom); -``` -""" -function t8_geometry_linear_destroy(geom) - @ccall libt8.t8_geometry_linear_destroy(geom::Ptr{Ptr{t8_geometry_c}})::Cvoid -end - -# no prototype is found for this function at t8_geometry_linear_axis_aligned.h:47:1, please use with caution -""" - t8_geometry_linear_axis_aligned_new() - -Create a new linear, axis-aligned geometry of a given dimension. The geometry is only viable for line/quad/hex elements and uses two vertices (min and max coords) per tree. The vertices are saved via the t8_cmesh_set_tree_vertices function. - -# Returns -A pointer to an allocated t8\\_geometry\\_linear\\_axis\\_aligned struct, as if the t8\\_geometry\\_linear\\_axis\\_aligned () constructor was called. -### Prototype -```c -t8_geometry_c * t8_geometry_linear_axis_aligned_new (); -``` -""" -function t8_geometry_linear_axis_aligned_new() - @ccall libt8.t8_geometry_linear_axis_aligned_new()::Ptr{t8_geometry_c} -end - -""" - t8_geometry_linear_axis_aligned_destroy(geom) - -Destroy a linear, axis-aligned geometry that was created with t8_geometry_linear_axis_aligned_new. - -# Arguments -* `geom`:\\[in,out\\] A linear, axis-aligned geometry. Set to NULL on output. -### Prototype -```c -void t8_geometry_linear_axis_aligned_destroy (t8_geometry_c **geom); -``` -""" -function t8_geometry_linear_axis_aligned_destroy(geom) - @ccall libt8.t8_geometry_linear_axis_aligned_destroy(geom::Ptr{Ptr{t8_geometry_c}})::Cvoid -end - -# no prototype is found for this function at t8_geometry_zero.h:45:1, please use with caution -""" - t8_geometry_zero_new() - -Create a new zero geometry. The geometry is only all tree types and as many vertices as the tree type has. The vertices are saved via the t8_cmesh_set_tree_vertices function. Sets the dimension and the name to "t8\\_geom\\_zero\\_" - -# Returns -A pointer to an allocated t8\\_geometry\\_zero struct, as if the t8_geometry_zero () constructor was called. -### Prototype -```c -t8_geometry_c * t8_geometry_zero_new (); -``` -""" -function t8_geometry_zero_new() - @ccall libt8.t8_geometry_zero_new()::Ptr{t8_geometry_c} -end - -""" - t8_geometry_zero_destroy(geom) - -Destroy a zero geometry that was created with t8_geometry_zero_new. - -# Arguments -* `geom`:\\[in,out\\] A zero geometry. Set to NULL on output. -### Prototype -```c -void t8_geometry_zero_destroy (t8_geometry_c **geom); -``` -""" -function t8_geometry_zero_destroy(geom) - @ccall libt8.t8_geometry_zero_destroy(geom::Ptr{Ptr{t8_geometry_c}})::Cvoid -end - -# no prototype is found for this function at t8_version.h:67:1, please use with caution -""" - t8_get_package_string() - -Return the package string of t8code. This string has the format "t8 version\\_number". - -# Returns -The version string of t8code. -### Prototype -```c -const char* t8_get_package_string (); -``` -""" -function t8_get_package_string() - @ccall libt8.t8_get_package_string()::Cstring -end - -# no prototype is found for this function at t8_version.h:73:1, please use with caution -""" - t8_get_version_number() - -Return the version number of t8code as a string. - -# Returns -The version number of t8code as a string. -### Prototype -```c -const char* t8_get_version_number (); -``` -""" -function t8_get_version_number() - @ccall libt8.t8_get_version_number()::Cstring -end - -# no prototype is found for this function at t8_version.h:79:1, please use with caution -""" - t8_get_version_point_string() - -Return the version point string. - -# Returns -The version point point string. -### Prototype -```c -const char* t8_get_version_point_string (); -``` -""" -function t8_get_version_point_string() - @ccall libt8.t8_get_version_point_string()::Cstring -end - -# no prototype is found for this function at t8_version.h:85:1, please use with caution -""" - t8_get_version_major() - -Return the major version number of t8code. - -# Returns -The major version number of t8code. -### Prototype -```c -int t8_get_version_major (); -``` -""" -function t8_get_version_major() - @ccall libt8.t8_get_version_major()::Cint -end - -# no prototype is found for this function at t8_version.h:91:1, please use with caution -""" - t8_get_version_minor() - -Return the minor version number of t8code. - -# Returns -The minor version number of t8code. -### Prototype -```c -int t8_get_version_minor (); -``` -""" -function t8_get_version_minor() - @ccall libt8.t8_get_version_minor()::Cint -end - -# no prototype is found for this function at t8_version.h:97:1, please use with caution -""" - t8_get_version_patch() - -Return the patch version number of t8code. - -# Returns -The patch version number of t8code. -### Prototype -```c -int t8_get_version_patch (); -``` -""" -function t8_get_version_patch() - @ccall libt8.t8_get_version_patch()::Cint -end - -""" - getdelim(lineptr, n, delimiter, stream) - -### Prototype -```c -static ssize_t getdelim (char **lineptr, size_t *n, int delimiter, FILE *stream); -``` -""" -function getdelim(lineptr, n, delimiter, stream) - @ccall libt8.getdelim(lineptr::Ptr{Cstring}, n::Ptr{Cint}, delimiter::Cint, stream::Ptr{Cint})::Cint -end - -""" - getline(lineptr, n, stream) - -### Prototype -```c -static ssize_t getline (char **lineptr, size_t *n, FILE *stream); -``` -""" -function getline(lineptr, n, stream) - @ccall libt8.getline(lineptr::Ptr{Cstring}, n::Ptr{Cint}, stream::Ptr{Cint})::Cint -end - -""" - strsep(stringp, delim) - -Extract token from string up to a given delimiter. - -For a full description see https://linux.die.net/man/3/[`strsep`](@ref) - -### Prototype -```c -static char * strsep (char **stringp, const char *delim); -``` -""" -function strsep(stringp, delim) - @ccall libt8.strsep(stringp::Ptr{Cstring}, delim::Cstring)::Cstring -end - -""" - t8_scheme_new_default() - -### Prototype -```c -const t8_scheme_c * t8_scheme_new_default (void); -``` -""" -function t8_scheme_new_default() - @ccall libt8.t8_scheme_new_default()::Ptr{t8_scheme_c} -end - -""" - t8_eclass_scheme_is_default(scheme, eclass) - -### Prototype -```c -int t8_eclass_scheme_is_default (const t8_scheme_c *scheme, const t8_eclass_t eclass); -``` -""" -function t8_eclass_scheme_is_default(scheme, eclass) - @ccall libt8.t8_eclass_scheme_is_default(scheme::Ptr{t8_scheme_c}, eclass::t8_eclass_t)::Cint -end - -"""Type of an integer coordinate for a node of a hex element.""" -const t8_dhex_coord_t = Int32 - -""" - t8_dhex - -The data container describing a refined element in a refined tree for the hex element class. - -| Field | Note | -| :---- | :-------------------------------------------------------------------- | -| level | The refinement level of the element relative to the root at level 0. | -| x | The x integer coordinate of the anchor node. | -| y | The y integer coordinate of the anchor node. | -| z | The z integer coordinate of the anchor node. | -""" -struct t8_dhex - level::Int8 - x::t8_dhex_coord_t - y::t8_dhex_coord_t - z::t8_dhex_coord_t -end - -"""The data container describing a refined element in a refined tree for the hex element class.""" -const t8_dhex_t = t8_dhex - -""" - t8_dhex_compute_reference_coords(elem, ref_coords, num_coords, out_coords) - -Convert points in the reference space of a hex element to points in the reference space of the tree (level 0) embedded in - -```c++ - [0,1]^3 -``` - -. - -```c++ - [0,1]^3 -``` - -) - -# Arguments -* `elem`:\\[in\\] Input hex. -* `ref_coords`:\\[in\\] The reference coordinates in the hex (*num_coords* times -* `num_coords`:\\[in\\] Number of coordinates to evaluate -* `out_coords`:\\[out\\] An array of *num_coords* x 3 x double that will be filled with the reference coordinates of the points on the hex. -### Prototype -```c -void t8_dhex_compute_reference_coords (const t8_dhex_t *elem, const double *ref_coords, const size_t num_coords, double *out_coords); -``` -""" -function t8_dhex_compute_reference_coords(elem, ref_coords, num_coords, out_coords) - @ccall libt8.t8_dhex_compute_reference_coords(elem::Ptr{t8_dhex_t}, ref_coords::Ptr{Cdouble}, num_coords::Csize_t, out_coords::Ptr{Cdouble})::Cvoid -end - -"""Type of an integer coordinate for a node of a line element.""" -const t8_dline_coord_t = Int32 - -""" - t8_dline - -The data container describing a refined element in a refined tree for the line element class. - -| Field | Note | -| :---- | :-------------------------------------------------------------------- | -| x | The integer coordinate of the anchor node. | -| level | The refinement level of the element relative to the root at level 0. | -""" -struct t8_dline - x::t8_dline_coord_t - level::Int8 -end - -"""The data container describing a refined element in a refined tree for the line element class.""" -const t8_dline_t = t8_dline - -""" - t8_dvertex - -The data container describing a refined element in a refined tree for the vertex element class. - -| Field | Note | -| :---- | :-------------------------------------------------------------------- | -| level | The refinement level of the element relative to the root at level 0. | -""" -struct t8_dvertex - level::UInt8 -end - -"""The data container describing a refined element in a refined tree for the vertex element class.""" -const t8_dvertex_t = t8_dvertex - -""" - t8_dline_get_level(line) - -Compute the level of a line. - -# Arguments -* `line`:\\[in\\] Line whose level is computed. -# Returns -The level of *line*. -### Prototype -```c -int t8_dline_get_level (const t8_dline_t *line); -``` -""" -function t8_dline_get_level(line) - @ccall libt8.t8_dline_get_level(line::Ptr{t8_dline_t})::Cint -end - -""" - t8_dline_copy(line, dest) - -Copy all values from one line to another. - -# Arguments -* `line`:\\[in\\] The line to be copied. -* `dest`:\\[in,out\\] Existing line whose data will be filled with the data of *line*. -### Prototype -```c -void t8_dline_copy (const t8_dline_t *line, t8_dline_t *dest); -``` -""" -function t8_dline_copy(line, dest) - @ccall libt8.t8_dline_copy(line::Ptr{t8_dline_t}, dest::Ptr{t8_dline_t})::Cvoid -end - -""" - t8_dline_compare(line1, line2) - -Compare two elements. returns negative if line1 < line2, zero if line1 equals line2 and positive if line1 > line2. If line2 is a copy of line1 then the elements are equal. - -### Prototype -```c -int t8_dline_compare (const t8_dline_t *line1, const t8_dline_t *line2); -``` -""" -function t8_dline_compare(line1, line2) - @ccall libt8.t8_dline_compare(line1::Ptr{t8_dline_t}, line2::Ptr{t8_dline_t})::Cint -end - -""" - t8_dline_equal(line1, line2) - -Check if two elements are equal. - -# Arguments -* `line1`:\\[in\\] The first element. -* `line2`:\\[in\\] The second element. -# Returns -1 if the elements are equal, 0 if they are not equal -### Prototype -```c -int t8_dline_equal (const t8_dline_t *line1, const t8_dline_t *line2); -``` -""" -function t8_dline_equal(line1, line2) - @ccall libt8.t8_dline_equal(line1::Ptr{t8_dline_t}, line2::Ptr{t8_dline_t})::Cint -end - -""" - t8_dline_parent(line, parent) - -Compute the parent of a line. - -# Arguments -* `line`:\\[in\\] The input line. -* `parent`:\\[in,out\\] Existing line whose data will be filled with the parent data of *line*. -### Prototype -```c -void t8_dline_parent (const t8_dline_t *line, t8_dline_t *parent); -``` -""" -function t8_dline_parent(line, parent) - @ccall libt8.t8_dline_parent(line::Ptr{t8_dline_t}, parent::Ptr{t8_dline_t})::Cvoid -end - -""" - t8_dline_ancestor(line, level, ancestor) - -Compute the ancestor of a line at a given level. - -!!! note - - The line *ancestor* may point to the same line as *line*. - -# Arguments -* `line`:\\[in\\] Input line. -* `level`:\\[in\\] A smaller level than *line*. -* `ancestor`:\\[in,out\\] Existing line whose data will be filled with the data of *line*'s ancestor on level *level*. -### Prototype -```c -void t8_dline_ancestor (const t8_dline_t *line, int level, t8_dline_t *ancestor); -``` -""" -function t8_dline_ancestor(line, level, ancestor) - @ccall libt8.t8_dline_ancestor(line::Ptr{t8_dline_t}, level::Cint, ancestor::Ptr{t8_dline_t})::Cvoid -end - -""" - t8_dline_child(line, childid, child) - -Compute the childid-th child in Morton order of a line. - -# Arguments -* `line`:\\[in\\] Input Line. -* `childid`:\\[in\\] The id of the child, 0 or 1, in Morton order. -* `child`:\\[in,out\\] Existing Line whose data will be filled with the date of l's childid-th child. -### Prototype -```c -void t8_dline_child (const t8_dline_t *line, int childid, t8_dline_t *child); -``` -""" -function t8_dline_child(line, childid, child) - @ccall libt8.t8_dline_child(line::Ptr{t8_dline_t}, childid::Cint, child::Ptr{t8_dline_t})::Cvoid -end - -""" - t8_dline_face_neighbour(line, neigh, face, dual_face) - -Compute the face neighbor of a line. - -!!! note - - *line* may point to the same line as *neigh*. - -# Arguments -* `line`:\\[in\\] Input line. -* `neigh`:\\[in,out\\] Existing line whose data will be filled. -* `face`:\\[in\\] The face across which to generate the neighbor. -* `dual_face`:\\[out\\] If not NULL, the face number as seen from *neigh* is stored. -### Prototype -```c -void t8_dline_face_neighbour (const t8_dline_t *line, t8_dline_t *neigh, int face, int *dual_face); -``` -""" -function t8_dline_face_neighbour(line, neigh, face, dual_face) - @ccall libt8.t8_dline_face_neighbour(line::Ptr{t8_dline_t}, neigh::Ptr{t8_dline_t}, face::Cint, dual_face::Ptr{Cint})::Cvoid -end - -""" - t8_dline_nearest_common_ancestor(line1, line2, nca) - -Computes the nearest common ancestor of two lines in the same tree. - -!!! note - - *line1*, *line2*, *nca* may point to the same line. - -# Arguments -* `line1`:\\[in\\] First input line. -* `line2`:\\[in\\] Second input line. -* `nca`:\\[in,out\\] Existing line whose data will be filled. -### Prototype -```c -void t8_dline_nearest_common_ancestor (const t8_dline_t *line1, const t8_dline_t *line2, t8_dline_t *nca); -``` -""" -function t8_dline_nearest_common_ancestor(line1, line2, nca) - @ccall libt8.t8_dline_nearest_common_ancestor(line1::Ptr{t8_dline_t}, line2::Ptr{t8_dline_t}, nca::Ptr{t8_dline_t})::Cvoid -end - -""" - t8_dline_ancestor_id(line, level) - -Compute the position of the ancestor of this child at level *level* within its siblings. - -# Arguments -* `line`:\\[in\\] line to be considered. -* `level`:\\[in\\] level to be considered. -# Returns -Returns its child id 0 or 1. -### Prototype -```c -int t8_dline_ancestor_id (const t8_dline_t *line, int level); -``` -""" -function t8_dline_ancestor_id(line, level) - @ccall libt8.t8_dline_ancestor_id(line::Ptr{t8_dline_t}, level::Cint)::Cint -end - -""" - t8_dline_face_parent_face(line, face) - -Given a face of a line return the face number of the parent of the line that matches the line's face. Or return -1 if no face of the parent matches the face. - -# Arguments -* `line`:\\[in\\] The line. -* `face`:\\[in\\] The number of the face. -# Returns -If *face* of *line* is also a face of *line*'s parent, the face number of this face. Otherwise -1. -### Prototype -```c -int t8_dline_face_parent_face (const t8_dline_t *line, int face); -``` -""" -function t8_dline_face_parent_face(line, face) - @ccall libt8.t8_dline_face_parent_face(line::Ptr{t8_dline_t}, face::Cint)::Cint -end - -""" - t8_dline_child_id(line) - -Compute the position of the ancestor of this child at level *level* within its siblings. - -# Arguments -* `line`:\\[in\\] line to be considered. -# Returns -Returns its child id in 0,1 -### Prototype -```c -int t8_dline_child_id (const t8_dline_t *line); -``` -""" -function t8_dline_child_id(line) - @ccall libt8.t8_dline_child_id(line::Ptr{t8_dline_t})::Cint -end - -""" - t8_dline_childrenpv(line, c) - -Compute the 2 children of a line, array version. - -# Arguments -* `line`:\\[in\\] Input line. -* `c`:\\[in,out\\] Pointers to the 2 computed children in Morton order. t may point to the same quadrant as c[0]. -### Prototype -```c -void t8_dline_childrenpv (const t8_dline_t *line, t8_dline_t *c[T8_DLINE_CHILDREN]); -``` -""" -function t8_dline_childrenpv(line, c) - @ccall libt8.t8_dline_childrenpv(line::Ptr{t8_dline_t}, c::Ptr{Ptr{t8_dline_t}})::Cvoid -end - -""" - t8_dline_is_familypv(f) - -Check whether a collection of two lines is a family in Morton order. - -# Arguments -* `f`:\\[in\\] An array of two lines. -# Returns -Nonzero if *f* is a family of lines. -### Prototype -```c -int t8_dline_is_familypv (const t8_dline_t *f[]); -``` -""" -function t8_dline_is_familypv(f) - @ccall libt8.t8_dline_is_familypv(f::Ptr{Ptr{t8_dline_t}})::Cint -end - -""" - t8_dline_is_root_boundary(line, face) - -Compute whether a given line shares a given face with its root tree. - -# Arguments -* `line`:\\[in\\] The input line. -* `face`:\\[in\\] A face of *line*. -# Returns -True if *face* is a subface of the line's root element. -### Prototype -```c -int t8_dline_is_root_boundary (const t8_dline_t *line, int face); -``` -""" -function t8_dline_is_root_boundary(line, face) - @ccall libt8.t8_dline_is_root_boundary(line::Ptr{t8_dline_t}, face::Cint)::Cint -end - -""" - t8_dline_is_inside_root(line) - -Test if a line lies inside of the root line, that is the line of level 0, anchor node (0,0) - -# Arguments -* `line`:\\[in\\] Input line. -# Returns -true If *line* lies inside of the root line. -### Prototype -```c -int t8_dline_is_inside_root (const t8_dline_t *line); -``` -""" -function t8_dline_is_inside_root(line) - @ccall libt8.t8_dline_is_inside_root(line::Ptr{t8_dline_t})::Cint -end - -""" - t8_dline_init_linear_id(line, level, id) - -Initialize a line as the line with a given global id in a uniform refinement of a given level. * - -# Arguments -* `line`:\\[in,out\\] Existing line whose data will be filled. -* `id`:\\[in\\] Index to be considered. -* `level`:\\[in\\] level of uniform grid to be considered. -### Prototype -```c -void t8_dline_init_linear_id (t8_dline_t *line, int level, t8_linearidx_t id); -``` -""" -function t8_dline_init_linear_id(line, level, id) - @ccall libt8.t8_dline_init_linear_id(line::Ptr{t8_dline_t}, level::Cint, id::t8_linearidx_t)::Cvoid -end - -""" - t8_dline_successor(line, succ, level) - -Computes the successor of a line in a uniform grid of level *level*. - -# Arguments -* `line`:\\[in\\] line whose id will be computed. -* `succ`:\\[in,out\\] Existing line whose data will be filled with the data of *line*'s successor on level *level*. -* `level`:\\[in\\] level of uniform grid to be considered. -### Prototype -```c -void t8_dline_successor (const t8_dline_t *line, t8_dline_t *succ, int level); -``` -""" -function t8_dline_successor(line, succ, level) - @ccall libt8.t8_dline_successor(line::Ptr{t8_dline_t}, succ::Ptr{t8_dline_t}, level::Cint)::Cvoid -end - -""" - t8_dline_transform_face(line1, line2, orientation) - -Suppose we have two trees that share a common face f. Given a Line e that is a subface of f in one of the trees and given the orientation of the tree connection, construct the face Line of the respective tree neighbor that logically coincides with e but lies in the coordinate system of the neighbor tree. - -# Arguments -* `line1`:\\[in\\] The face element. -* `line2`:\\[in,out\\] On return the face element *line1* with respect to the coordinate system of the other tree. -* `orientation`:\\[in\\] The orientation of the tree-tree connection. 0 if vertex 0 of face 0 coincides with vertex 0 of face 1. 1 if vertex 0 of face 0 coincides with vertex 1 of face 1. -### Prototype -```c -void t8_dline_transform_face (const t8_dline_t *line1, t8_dline_t *line2, int orientation); -``` -""" -function t8_dline_transform_face(line1, line2, orientation) - @ccall libt8.t8_dline_transform_face(line1::Ptr{t8_dline_t}, line2::Ptr{t8_dline_t}, orientation::Cint)::Cvoid -end - -""" - t8_dline_extrude_face(face, root_face, line) - -Given a vertex at the boundary of a line at a root tree boundary, construct the line from it. - -# Arguments -* `face`:\\[in\\] The face element (vertex). -* `root_face`:\\[in\\] The index of the face of the tree. -* `line`:\\[out\\] The line that has *face* as face element at face *root_face* -# Returns -The face number pf *line* that coincides with *face*, thus *root_face* is returned. -### Prototype -```c -int t8_dline_extrude_face (const t8_dvertex_t *face, int root_face, t8_dline_t *line); -``` -""" -function t8_dline_extrude_face(face, root_face, line) - @ccall libt8.t8_dline_extrude_face(face::Ptr{t8_dvertex_t}, root_face::Cint, line::Ptr{t8_dline_t})::Cint -end - -""" - t8_dline_first_descendant(line, desc, level) - -Compute the first descendant of a line at a given level. This is the descendant of the line in a uniform level refinement that has the smallest id. - -# Arguments -* `line`:\\[in\\] Line whose descendant is computed. -* `desc`:\\[out\\] Existing line whose data will be filled with the data of *line*'s first descendant on level *level*. -* `level`:\\[in\\] The refinement level. Must be greater than *line*'s refinement level. -### Prototype -```c -void t8_dline_first_descendant (const t8_dline_t *line, t8_dline_t *desc, int level); -``` -""" -function t8_dline_first_descendant(line, desc, level) - @ccall libt8.t8_dline_first_descendant(line::Ptr{t8_dline_t}, desc::Ptr{t8_dline_t}, level::Cint)::Cvoid -end - -""" - t8_dline_last_descendant(line, desc, level) - -Compute the last descendant of a line at a given level. This is the descendant of the line in a uniform level refinement that has the largest id. - -# Arguments -* `line`:\\[in\\] Line whose descendant is computed. -* `desc`:\\[out\\] Existing line whose data will be filled with the data of *line*'s last descendant on level *level*. -* `level`:\\[in\\] The refinement level. Must be greater than *line*'s refinement level. -### Prototype -```c -void t8_dline_last_descendant (const t8_dline_t *line, t8_dline_t *desc, int level); -``` -""" -function t8_dline_last_descendant(line, desc, level) - @ccall libt8.t8_dline_last_descendant(line::Ptr{t8_dline_t}, desc::Ptr{t8_dline_t}, level::Cint)::Cvoid -end - -""" - t8_dline_vertex_integer_coords(line, vertex, coords) - -Compute the first or second vertex of a line. - -# Arguments -* `line`:\\[in\\] Line whose vertex is computed. -* `vertex`:\\[in\\] The number of the vertex of *line* -* `coords`:\\[out\\] The coordinates of the computed vertex -### Prototype -```c -void t8_dline_vertex_integer_coords (const t8_dline_t *line, const int vertex, int coords[]); -``` -""" -function t8_dline_vertex_integer_coords(line, vertex, coords) - @ccall libt8.t8_dline_vertex_integer_coords(line::Ptr{t8_dline_t}, vertex::Cint, coords::Ptr{Cint})::Cvoid -end - -""" - t8_dline_vertex_ref_coords(line, vertex, coordinates) - -Compute the coordinates of a vertex of a line when the tree (level 0 line) is embedded in [0,1]^1. - -# Arguments -* `line`:\\[in\\] Input line. -* `vertex`:\\[in\\] The number of the vertex. -* `coordinates`:\\[out\\] An array of 1 double that will be filled with the reference coordinates of the vertex. -### Prototype -```c -void t8_dline_vertex_ref_coords (const t8_dline_t *line, const int vertex, double coordinates[1]); -``` -""" -function t8_dline_vertex_ref_coords(line, vertex, coordinates) - @ccall libt8.t8_dline_vertex_ref_coords(line::Ptr{t8_dline_t}, vertex::Cint, coordinates::Ptr{Cdouble})::Cvoid -end - -""" - t8_dline_compute_reference_coords(line, ref_coords, num_coords, skip_coords, out_coords) - -Convert points in the reference space of a line element to points in the reference space of the tree (level 0) embedded in [0,1]^1. - -```c++ - [0,1]^1 -``` - -) - -# Arguments -* `line`:\\[in\\] Input line. -* `ref_coords`:\\[in\\] The reference coordinates in the line (*num_coords* times -* `num_coords`:\\[in\\] Number of coordinates to evaluate -* `skip_coords`:\\[in\\] Only used for batch computation of prisms. In all other cases 0. Skip coordinates in the *ref_coords* and *out_coords* array. -* `out_coords`:\\[out\\] An array of *num_coords* x 1 x double that will be filled with the reference coordinates of the points on the line. -### Prototype -```c -void t8_dline_compute_reference_coords (const t8_dline_t *line, const double *ref_coords, const size_t num_coords, const size_t skip_coords, double *out_coords); -``` -""" -function t8_dline_compute_reference_coords(line, ref_coords, num_coords, skip_coords, out_coords) - @ccall libt8.t8_dline_compute_reference_coords(line::Ptr{t8_dline_t}, ref_coords::Ptr{Cdouble}, num_coords::Csize_t, skip_coords::Csize_t, out_coords::Ptr{Cdouble})::Cvoid -end - -""" - t8_dline_linear_id(line, level) - -Computes the linear position of a line in an uniform grid. - -# Arguments -* `line`:\\[in\\] Pointer to a line element whose id will be computed. -* `level`:\\[in\\] Refinement level of the line element. -# Returns -Returns the linear position of this line on a grid. -### Prototype -```c -t8_linearidx_t t8_dline_linear_id (const t8_dline_t *line, int level); -``` -""" -function t8_dline_linear_id(line, level) - @ccall libt8.t8_dline_linear_id(line::Ptr{t8_dline_t}, level::Cint)::t8_linearidx_t -end - -""" - t8_dline_is_valid(line) - -Query whether all entries of a line are in valid ranges. - -# Arguments -* `line`:\\[in\\] line to be considered. -# Returns -True, if *line* is a valid line and it is safe to call any function in this file on *line*. False otherwise. -### Prototype -```c -int t8_dline_is_valid (const t8_dline_t *line); -``` -""" -function t8_dline_is_valid(line) - @ccall libt8.t8_dline_is_valid(line::Ptr{t8_dline_t})::Cint -end - -""" - t8_dline_init(line) - -Set default values for a line, such that it passes t8_dline_is_valid. - -# Arguments -* `line`:\\[in\\] line to be initialized -### Prototype -```c -void t8_dline_init (t8_dline_t *line); -``` -""" -function t8_dline_init(line) - @ccall libt8.t8_dline_init(line::Ptr{t8_dline_t})::Cvoid -end - -"""Type for the (integer) type of a triangular element.""" -const t8_dtri_type_t = Int8 - -"""Type of an integer coordinate for a node of a triangular element.""" -const t8_dtri_coord_t = Int32 - -""" - t8_dtri - -The data container describing a refined element in a refined tree for the triangular element class. - -| Field | Note | -| :---- | :-------------------------------------------------------------------- | -| level | The refinement level of the element relative to the root at level 0. | -| type | Type of the triangle (0 or 1). | -| x | The x integer coordinate of the anchor node. | -| y | The y integer coordinate of the anchor node. | -""" -struct t8_dtri - level::Int8 - type::t8_dtri_type_t - x::t8_dtri_coord_t - y::t8_dtri_coord_t -end - -"""The data container describing a refined element in a refined tree for the triangular element class.""" -const t8_dtri_t = t8_dtri - -"""Type of an integer coordinate for a node of a prism element.""" -const t8_dprism_coord_t = Int32 - -""" - t8_dprism - -The data container describing a refined element in a refined tree for the prism element class. - -| Field | Note | -| :---- | :------------------------------ | -| line | z coordinate + level. | -| tri | x,y coordinate + level + type. | -""" -struct t8_dprism - line::t8_dline_t - tri::t8_dtri_t -end - -"""The data container describing a refined element in a refined tree for the prism element class.""" -const t8_dprism_t = t8_dprism - -""" - t8_dprism_get_level(p) - -Compute the level of a prism. - -# Arguments -* `p`:\\[in\\] Line whose prism is computed. -# Returns -The level of *p*. -### Prototype -```c -int t8_dprism_get_level (const t8_dprism_t *p); -``` -""" -function t8_dprism_get_level(p) - @ccall libt8.t8_dprism_get_level(p::Ptr{t8_dprism_t})::Cint -end - -""" - t8_dprism_copy(p, dest) - -Copy all values from one prism to another. - -# Arguments -* `p`:\\[in\\] The prism to be copied. -* `dest`:\\[in,out\\] Existing prism whose data will be filled with the data of *p*. -### Prototype -```c -void t8_dprism_copy (const t8_dprism_t *p, t8_dprism_t *dest); -``` -""" -function t8_dprism_copy(p, dest) - @ccall libt8.t8_dprism_copy(p::Ptr{t8_dprism_t}, dest::Ptr{t8_dprism_t})::Cvoid -end - -""" - t8_dprism_compare(p1, p2) - -Compare two elements. returns negative if p1 < p2, zero if p1 equals p2 and positive if p1 > p2. If p2 is a copy of p1 then the elements are equal. - -### Prototype -```c -int t8_dprism_compare (const t8_dprism_t *p1, const t8_dprism_t *p2); -``` -""" -function t8_dprism_compare(p1, p2) - @ccall libt8.t8_dprism_compare(p1::Ptr{t8_dprism_t}, p2::Ptr{t8_dprism_t})::Cint -end - -""" - t8_dprism_equal(elem1, elem2) - -Check if two elements are equal. - -# Arguments -* `elem1`:\\[in\\] The first element. -* `elem2`:\\[in\\] The second element. -# Returns -1 if the elements are equal, 0 if they are not equal -### Prototype -```c -int t8_dprism_equal (const t8_dprism_t *elem1, const t8_dprism_t *elem2); -``` -""" -function t8_dprism_equal(elem1, elem2) - @ccall libt8.t8_dprism_equal(elem1::Ptr{t8_dprism_t}, elem2::Ptr{t8_dprism_t})::Cint -end - -""" - t8_dprism_init_linear_id(p, level, id) - -Initialize a prism as the prism with a given global id in a uniform refinement of a given level. * - -# Arguments -* `p`:\\[in,out\\] Existing prism whose data will be filled. -* `id`:\\[in\\] Index to be considered. -* `level`:\\[in\\] level of uniform grid to be considered. -### Prototype -```c -void t8_dprism_init_linear_id (t8_dprism_t *p, int level, t8_linearidx_t id); -``` -""" -function t8_dprism_init_linear_id(p, level, id) - @ccall libt8.t8_dprism_init_linear_id(p::Ptr{t8_dprism_t}, level::Cint, id::t8_linearidx_t)::Cvoid -end - -""" - t8_dprism_successor(p, succ, level) - -Computes the successor of a prism in a uniform grid of level *level*. - -# Arguments -* `p`:\\[in\\] prism whose id will be computed. -* `succ`:\\[in,out\\] Existing prism whose data will be filled with the data of *l*'s successor on level *level*. -* `level`:\\[in\\] level of uniform grid to be considered. -### Prototype -```c -void t8_dprism_successor (const t8_dprism_t *p, t8_dprism_t *succ, int level); -``` -""" -function t8_dprism_successor(p, succ, level) - @ccall libt8.t8_dprism_successor(p::Ptr{t8_dprism_t}, succ::Ptr{t8_dprism_t}, level::Cint)::Cvoid -end - -""" - t8_dprism_parent(p, parent) - -Compute the parent of a prism. - -!!! note - - *p* may point to the same prism as *parent*. - -# Arguments -* `p`:\\[in\\] Input prism. -* `parent`:\\[in,out\\] Existing prism whose data will be filled with the data of p's parent. -### Prototype -```c -void t8_dprism_parent (const t8_dprism_t *p, t8_dprism_t *parent); -``` -""" -function t8_dprism_parent(p, parent) - @ccall libt8.t8_dprism_parent(p::Ptr{t8_dprism_t}, parent::Ptr{t8_dprism_t})::Cvoid -end - -""" - t8_dprism_first_descendant(p, desc, level) - -Compute the first descendant of a prism at a given level. This is the descendant of the prism in a uniform level refinement that has the smallest id. - -# Arguments -* `p`:\\[in\\] Prism whose descendant is computed. -* `desc`:\\[out\\] Existing prism whose data will be filled with the data of *p*'s first descendant on level *level*. -* `level`:\\[in\\] The refinement level. Must be greater than *p*'s refinement level. -### Prototype -```c -void t8_dprism_first_descendant (const t8_dprism_t *p, t8_dprism_t *desc, int level); -``` -""" -function t8_dprism_first_descendant(p, desc, level) - @ccall libt8.t8_dprism_first_descendant(p::Ptr{t8_dprism_t}, desc::Ptr{t8_dprism_t}, level::Cint)::Cvoid -end - -""" - t8_dprism_child_id(p) - -Compute the position of the ancestor of this child at level *level* within its siblings. - -# Arguments -* `p`:\\[in\\] prism to be considered. -# Returns -Returns its child id in 0 - 7 -### Prototype -```c -int t8_dprism_child_id (const t8_dprism_t *p); -``` -""" -function t8_dprism_child_id(p) - @ccall libt8.t8_dprism_child_id(p::Ptr{t8_dprism_t})::Cint -end - -""" - t8_dprism_is_familypv(fam) - -Check whether a collection of eight prism is a family in Morton order. - -# Arguments -* `fam`:\\[in\\] An array of eight prism. -# Returns -Nonzero if *fam* is a family of prism. -### Prototype -```c -int t8_dprism_is_familypv (t8_dprism_t **fam); -``` -""" -function t8_dprism_is_familypv(fam) - @ccall libt8.t8_dprism_is_familypv(fam::Ptr{Ptr{t8_dprism_t}})::Cint -end - -""" - t8_dprism_nearest_common_ancestor(p1, p2, r) - -Computes the nearest common ancestor of two prisms in the same tree. - -!!! note - - *t1*, *t2*, *r* may point to the same tetrahedron. - -# Arguments -* `p1`:\\[in\\] First input tetrahedron. -* `p2`:\\[in\\] Second input tetrahedron. -* `r`:\\[in,out\\] Existing tetrahedron whose data will be filled. -### Prototype -```c -void t8_dprism_nearest_common_ancestor (const t8_dprism_t *p1, const t8_dprism_t *p2, t8_dprism_t *r); -``` -""" -function t8_dprism_nearest_common_ancestor(p1, p2, r) - @ccall libt8.t8_dprism_nearest_common_ancestor(p1::Ptr{t8_dprism_t}, p2::Ptr{t8_dprism_t}, r::Ptr{t8_dprism_t})::Cvoid -end - -""" - t8_dprism_boundary_face(p, face, boundary) - -Constructs the boundary element of a prism at a given face - -# Arguments -* `p`:\\[in\\] The input prism. -* `face`:\\[in\\] A face of *p* -* `boundary`:\\[in,out\\] The boundary element at *face* of *p* -### Prototype -```c -void t8_dprism_boundary_face (const t8_dprism_t *p, int face, t8_element_t *boundary); -``` -""" -function t8_dprism_boundary_face(p, face, boundary) - @ccall libt8.t8_dprism_boundary_face(p::Ptr{t8_dprism_t}, face::Cint, boundary::Ptr{t8_element_t})::Cvoid -end - -""" - t8_dprism_is_root_boundary(p, face) - -Compute whether a given prism shares a given face with its root tree. - -# Arguments -* `p`:\\[in\\] The input prism. -* `face`:\\[in\\] A face of *p*. -# Returns -True if *face* is a subface of the prisms's root element. -### Prototype -```c -int t8_dprism_is_root_boundary (const t8_dprism_t *p, int face); -``` -""" -function t8_dprism_is_root_boundary(p, face) - @ccall libt8.t8_dprism_is_root_boundary(p::Ptr{t8_dprism_t}, face::Cint)::Cint -end - -""" - t8_dprism_is_inside_root(p) - -Test if a prism lies inside of the root prism, that is the prism of level 0, anchor node (0,0) and type 0. - -# Arguments -* `p`:\\[in\\] Input prism. -# Returns -true If *p* lies inside of the root prism. -### Prototype -```c -int t8_dprism_is_inside_root (t8_dprism_t *p); -``` -""" -function t8_dprism_is_inside_root(p) - @ccall libt8.t8_dprism_is_inside_root(p::Ptr{t8_dprism_t})::Cint -end - -""" - t8_dprism_child(p, childid, child) - -Compute the childid-th child in Morton order of a prism. - -# Arguments -* `p`:\\[in\\] Input prism. -* `childid`:\\[in\\] The id of the child, in 0 - 7, in Morton order. -* `child`:\\[in,out\\] Existing prism whose data will be filled with the date of p's childid-th child. -### Prototype -```c -void t8_dprism_child (const t8_dprism_t *p, int childid, t8_dprism_t *child); -``` -""" -function t8_dprism_child(p, childid, child) - @ccall libt8.t8_dprism_child(p::Ptr{t8_dprism_t}, childid::Cint, child::Ptr{t8_dprism_t})::Cvoid -end - -""" - t8_dprism_face_shape(face) - -Return the shape of a face. - -# Arguments -* `face`:\\[in\\] A face id for *p*. -# Returns -The shape of *face*. -### Prototype -```c -t8_element_shape_t t8_dprism_face_shape (int face); -``` -""" -function t8_dprism_face_shape(face) - @ccall libt8.t8_dprism_face_shape(face::Cint)::t8_element_shape_t -end - -""" - t8_dprism_num_face_children(face) - -Compute the number of children at a given face. - -# Arguments -* `face`:\\[in\\] The face number -# Returns -Number of Children at *face* -### Prototype -```c -int t8_dprism_num_face_children (int face); -``` -""" -function t8_dprism_num_face_children(face) - @ccall libt8.t8_dprism_num_face_children(face::Cint)::Cint -end - -""" - t8_dprism_face_neighbour(p, face, neigh) - -Compute the face neighbor of a prism. - -!!! note - - *p* may point to the same prism as *n*. - -# Arguments -* `p`:\\[in\\] Input prism. -* `face`:\\[in\\] The face across which to generate the neighbor. -* `neigh`:\\[in,out\\] Existing prism whose data will be filled. -# Returns -The face number of *neigh* of the respective face. -### Prototype -```c -int t8_dprism_face_neighbour (const t8_dprism_t *p, int face, t8_dprism_t *neigh); -``` -""" -function t8_dprism_face_neighbour(p, face, neigh) - @ccall libt8.t8_dprism_face_neighbour(p::Ptr{t8_dprism_t}, face::Cint, neigh::Ptr{t8_dprism_t})::Cint -end - -""" - t8_dprism_get_face_corner(face, corner) - -Return the corner number of a prism corresponding to a given face corner. - -# Arguments -* `face`:\\[in\\] The face number. -* `corner`:\\[in\\] A corner of *face* -# Returns -The corner index of *p* corresponding to the *corner*-th corner of *face*. -### Prototype -```c -int t8_dprism_get_face_corner (int face, int corner); -``` -""" -function t8_dprism_get_face_corner(face, corner) - @ccall libt8.t8_dprism_get_face_corner(face::Cint, corner::Cint)::Cint -end - -""" - t8_dprism_childrenpv(p, length, c) - -Compute the children of a prism, array version. - -# Arguments -* `p`:\\[in\\] Pointers to prism element the children should be computed for. -* `length`:\\[in\\] Number of children. -* `c`:\\[in,out\\] Pointers to the computed children in Morton order. -### Prototype -```c -void t8_dprism_childrenpv (const t8_dprism_t *p, int length, t8_dprism_t *c[]); -``` -""" -function t8_dprism_childrenpv(p, length, c) - @ccall libt8.t8_dprism_childrenpv(p::Ptr{t8_dprism_t}, length::Cint, c::Ptr{Ptr{t8_dprism_t}})::Cvoid -end - -""" - t8_dprism_ancestor_id(p, level) - -Compute the position of the ancestor of this child at level *level* within its siblings. - -# Arguments -* `p`:\\[in\\] prism to be considered. -* `level`:\\[in\\] level to be considered. -# Returns -Returns its child id in 0..7 -### Prototype -```c -int t8_dprism_ancestor_id (t8_dprism_t *p, int level); -``` -""" -function t8_dprism_ancestor_id(p, level) - @ccall libt8.t8_dprism_ancestor_id(p::Ptr{t8_dprism_t}, level::Cint)::Cint -end - -""" - t8_dprism_children_at_face(p, face, children, num_children, child_indices) - -Given a prism and a face of the prism, compute all children of the prism that touch the face. - -# Arguments -* `p`:\\[in\\] The prism. -* `face`:\\[in\\] A face of *p*. -* `children`:\\[in,out\\] Allocated prism, in which the children of *p* that share a face with *face* are stored. They will be stored in order of their child\\_id. -* `num_children`:\\[in\\] The number of prisms in *children*. Must match the number of children that touch *face*. -* `child_indices`:\\[in,out\\] The indices of the children in *children*. Only filled if this is null previously. -### Prototype -```c -void t8_dprism_children_at_face (const t8_dprism_t *p, int face, t8_dprism_t **children, int num_children, int *child_indices); -``` -""" -function t8_dprism_children_at_face(p, face, children, num_children, child_indices) - @ccall libt8.t8_dprism_children_at_face(p::Ptr{t8_dprism_t}, face::Cint, children::Ptr{Ptr{t8_dprism_t}}, num_children::Cint, child_indices::Ptr{Cint})::Cvoid -end - -""" - t8_dprism_face_child_face(face) - -Given a face of a prism and a child number of a child of that face, return the face number of the child of the prism that matches the child face. - -# Arguments -* `face`:\\[in\\] The number of the face. -# Returns -The face number of the face of a child of *p* that coincides with *face_child*. -### Prototype -```c -int t8_dprism_face_child_face (int face); -``` -""" -function t8_dprism_face_child_face(face) - @ccall libt8.t8_dprism_face_child_face(face::Cint)::Cint -end - -""" - t8_dprism_face_parent_face(prism, face) - -Given a face of a prism return the face number of the parent of the prism that matches the prism's face. Or return -1 if no face of the parent matches the face. - -# Arguments -* `prism`:\\[in\\] The prism. -* `face`:\\[in\\] Then number of the face. -# Returns -If *face* of *prism* is also a face of *prism*'s parent, the face number of this face. Otherwise -1. -### Prototype -```c -int t8_dprism_face_parent_face (const t8_dprism_t *prism, int face); -``` -""" -function t8_dprism_face_parent_face(prism, face) - @ccall libt8.t8_dprism_face_parent_face(prism::Ptr{t8_dprism_t}, face::Cint)::Cint -end - -""" - t8_dprism_tree_face(face) - -Given a prism and a face of this prism. If the face lies on the tree boundary, return the face number of the tree face. If not the return value is arbitrary. - -# Arguments -* `face`:\\[in\\] The index of a face of *elem*. -# Returns -The index of the tree face that *face* is a subface of, if *face* is on a tree boundary. Any arbitrary integer if *is* not at a tree boundary. -### Prototype -```c -int t8_dprism_tree_face (int face); -``` -""" -function t8_dprism_tree_face(face) - @ccall libt8.t8_dprism_tree_face(face::Cint)::Cint -end - -""" - t8_dprism_extrude_face(face, elem, root_face) - -Given a boundary face inside a root tree's face construct the element inside the root tree that has the given face as a face. - -# Arguments -* `face`:\\[in\\] A face element. -* `elem`:\\[in,out\\] An allocated element. The entries will be filled with the data of the element that has *face* as a face and lies within the root tree. -* `root_face`:\\[in\\] The index of the face of the root tree in which *face* lies. -### Prototype -```c -void t8_dprism_extrude_face (const t8_element_t *face, t8_element_t *elem, const int root_face); -``` -""" -function t8_dprism_extrude_face(face, elem, root_face) - @ccall libt8.t8_dprism_extrude_face(face::Ptr{t8_element_t}, elem::Ptr{t8_element_t}, root_face::Cint)::Cvoid -end - -""" - t8_dprism_last_descendant(p, s, level) - -Compute the last descendant of a prism at a given level. This is the descendant of the prism in a uniform level refinement that has the largest id. - -# Arguments -* `p`:\\[in\\] Prism whose descendant is computed. -* `s`:\\[out\\] Existing prism whose data will be filled with the data of *p*'s last descendant on level *level*. -* `level`:\\[in\\] The refinement level. Must be greater than *p*'s refinement level. -### Prototype -```c -void t8_dprism_last_descendant (const t8_dprism_t *p, t8_dprism_t *s, int level); -``` -""" -function t8_dprism_last_descendant(p, s, level) - @ccall libt8.t8_dprism_last_descendant(p::Ptr{t8_dprism_t}, s::Ptr{t8_dprism_t}, level::Cint)::Cvoid -end - -""" - t8_dprism_corner_descendant(p, s, corner, level) - -Compute the descendant of a prism in a given corner. - -# Arguments -* `p`:\\[in\\] Prism whose descendant is computed. -* `s`:\\[out\\] Existing prism whose data will be filled with the data of p's descendant in *corner*. -* `corner`:\\[in\\] The corner in which the descendant should lie. -* `level`:\\[in\\] The refinement level of the descendant. Must be greater or equal to *p*'s level. -### Prototype -```c -void t8_dprism_corner_descendant (const t8_dprism_t *p, t8_dprism_t *s, int corner, int level); -``` -""" -function t8_dprism_corner_descendant(p, s, corner, level) - @ccall libt8.t8_dprism_corner_descendant(p::Ptr{t8_dprism_t}, s::Ptr{t8_dprism_t}, corner::Cint, level::Cint)::Cvoid -end - -""" - t8_dprism_vertex_integer_coords(elem, vertex, coords) - -Compute the coordinates of a vertex of a prism. - -# Arguments -* `elem`:\\[in\\] Input prism. -* `vertex`:\\[in\\] The number of the vertex. -* `coords`:\\[out\\] An array of 3 [`t8_dprism_coord_t`](@ref) that will be filled with the coordinates of the vertex. -### Prototype -```c -void t8_dprism_vertex_integer_coords (const t8_dprism_t *elem, int vertex, int coords[3]); -``` -""" -function t8_dprism_vertex_integer_coords(elem, vertex, coords) - @ccall libt8.t8_dprism_vertex_integer_coords(elem::Ptr{t8_dprism_t}, vertex::Cint, coords::Ptr{Cint})::Cvoid -end - -""" - t8_dprism_vertex_ref_coords(elem, vertex, coords) - -Compute the reference coordinates of a vertex of a prism when the tree (level 0) is embedded in - -```c++ - [0,1]^3 -``` - -. - -# Arguments -* `elem`:\\[in\\] Input prism. -* `vertex`:\\[in\\] The number of the vertex. -* `coords`:\\[out\\] An array of 3 double that will be filled with the reference coordinates of the vertex. -### Prototype -```c -void t8_dprism_vertex_ref_coords (const t8_dprism_t *elem, int vertex, double coords[3]); -``` -""" -function t8_dprism_vertex_ref_coords(elem, vertex, coords) - @ccall libt8.t8_dprism_vertex_ref_coords(elem::Ptr{t8_dprism_t}, vertex::Cint, coords::Ptr{Cdouble})::Cvoid -end - -""" - t8_dprism_compute_reference_coords(elem, ref_coords, num_coords, out_coords) - -Convert points in the reference space of a prism element to points in the reference space of the tree (level 0) embedded in - -```c++ - [0,1]^3 -``` - -. - -```c++ - [0,1]^3 -``` - -) - -# Arguments -* `elem`:\\[in\\] Pointer to the prism element. -* `ref_coords`:\\[in\\] The reference coordinates in the prism (*num_coords* times -* `num_coords`:\\[in\\] Number of coordinates to evaluate -* `out_coords`:\\[out\\] An array of *num_coords* x 3 x double that will be filled with the reference coordinates of the points on the prism. -### Prototype -```c -void t8_dprism_compute_reference_coords (const t8_dprism_t *elem, const double *ref_coords, const size_t num_coords, double *out_coords); -``` -""" -function t8_dprism_compute_reference_coords(elem, ref_coords, num_coords, out_coords) - @ccall libt8.t8_dprism_compute_reference_coords(elem::Ptr{t8_dprism_t}, ref_coords::Ptr{Cdouble}, num_coords::Csize_t, out_coords::Ptr{Cdouble})::Cvoid -end - -""" - t8_dprism_linear_id(p, level) - -Computes the linear position of a prism in an uniform grid. - -# Arguments -* `p`:\\[in\\] Prism whose id will be computed. -* `level`:\\[in\\] Refinement level of the prism. -# Returns -Returns the linear position of this prism on a grid. -### Prototype -```c -t8_linearidx_t t8_dprism_linear_id (const t8_dprism_t *p, int level); -``` -""" -function t8_dprism_linear_id(p, level) - @ccall libt8.t8_dprism_linear_id(p::Ptr{t8_dprism_t}, level::Cint)::t8_linearidx_t -end - -""" - t8_dprism_is_valid(p) - -Query whether all entries of a prism are in valid ranges. A prism is valid if and only if its triangle and line member are valid. - -# Arguments -* `p`:\\[in\\] prism to be considered. -# Returns -True, if *p* is a valid prism and it is safe to call any function in this file on *p*. False otherwise. -### Prototype -```c -int t8_dprism_is_valid (const t8_dprism_t *p); -``` -""" -function t8_dprism_is_valid(p) - @ccall libt8.t8_dprism_is_valid(p::Ptr{t8_dprism_t})::Cint -end - -"""The type of a tetrahedron designates its position relative to the surrounding cube.""" -const t8_dtet_type_t = Int8 - -"""The coordinates of a tetrahedron are integers relative to the maximum refinement.""" -const t8_dtet_coord_t = Int32 - -""" - t8_dtet - -This data type stores a tetrahedron. - -| Field | Note | -| :---- | :------------------------------------------------------------------------ | -| level | The refinement level of the tetrahedron relative to the root at level 0. | -| type | Type of the tetrahedron in 0, ..., 5. | -| x | The x integer coordinate of the anchor node. | -| y | The y integer coordinate of the anchor node. | -| z | The z integer coordinate of the anchor node. | -""" -struct t8_dtet - level::Int8 - type::t8_dtet_type_t - x::t8_dtet_coord_t - y::t8_dtet_coord_t - z::t8_dtet_coord_t -end - -"""This data type stores a tetrahedron.""" -const t8_dtet_t = t8_dtet - -"""The coordinates of a pyramid are integers relative to the maximum refinement.""" -const t8_dpyramid_coord_t = Int32 - -"""The type of pyramid in 0, ...,7. The first 6 types describe tetrahedra. Type 6 is an upward facing pyramid. Type 7 is a downward facing pyramid.""" -const t8_dpyramid_type_t = Int8 - -""" - t8_dpyramid - -This data type stores a pyramid. The coordinates, the level and the type of a pyramid are stored in the tet-struct *pyramid*. Level, at which the shape switches from tet, to pyra. -1 if not computed for a pyramid with the shape of a tet undefined, if the pyramid has the shape of a pyramid. - -| Field | Note | -| :-------------------------- | :----------------------------------------------------- | -| pyramid | Coordinates, level and type | -| switch\\_shape\\_at\\_level | Level, at which the shape switches from tet, to pyra. | -""" -struct t8_dpyramid - pyramid::t8_dtet_t - switch_shape_at_level::Int8 -end - -"""This data type stores a pyramid. The coordinates, the level and the type of a pyramid are stored in the tet-struct *pyramid*. Level, at which the shape switches from tet, to pyra. -1 if not computed for a pyramid with the shape of a tet undefined, if the pyramid has the shape of a pyramid.""" -const t8_dpyramid_t = t8_dpyramid - -""" - t8_dpyramid_init_linear_id(p, level, id) - -Initialize a pyramid as the pyramid with a given global id in a uniform refinement of a given level. * - -# Arguments -* `p`:\\[in,out\\] Existing pyramid whose data will be filled. -* `level`:\\[in\\] level of uniform grid to be considered. -* `id`:\\[in\\] Index to be considered. -### Prototype -```c -void t8_dpyramid_init_linear_id (t8_dpyramid_t *p, const int level, t8_linearidx_t id); -``` -""" -function t8_dpyramid_init_linear_id(p, level, id) - @ccall libt8.t8_dpyramid_init_linear_id(p::Ptr{t8_dpyramid_t}, level::Cint, id::t8_linearidx_t)::Cvoid -end - -""" - t8_dpyramid_get_level(p) - -Compute the level of a pyramid. - -# Arguments -* `p`:\\[in\\] Pyramid whose level is computed. -# Returns -The level of *p*. -### Prototype -```c -int t8_dpyramid_get_level (const t8_dpyramid_t *p); -``` -""" -function t8_dpyramid_get_level(p) - @ccall libt8.t8_dpyramid_get_level(p::Ptr{t8_dpyramid_t})::Cint -end - -""" - t8_dpyramid_copy(source, dest) - -Copy the data from source to dest - -# Arguments -* `source`:\\[in\\] The source-pyramid -* `dest`:\\[in,out\\] The destination -### Prototype -```c -void t8_dpyramid_copy (const t8_dpyramid_t *source, t8_dpyramid_t *dest); -``` -""" -function t8_dpyramid_copy(source, dest) - @ccall libt8.t8_dpyramid_copy(source::Ptr{t8_dpyramid_t}, dest::Ptr{t8_dpyramid_t})::Cvoid -end - -""" - t8_dpyramid_linear_id(p, level) - -Computes the linear position of a pyramid in an uniform grid. - -# Arguments -* `p`:\\[in\\] pyramid whose id will be computed. -* `level`:\\[in\\] The level on which the linear-id should be computed. -# Returns -Returns the linear position of this pyramid on a grid. -### Prototype -```c -t8_linearidx_t t8_dpyramid_linear_id (const t8_dpyramid_t *p, const int level); -``` -""" -function t8_dpyramid_linear_id(p, level) - @ccall libt8.t8_dpyramid_linear_id(p::Ptr{t8_dpyramid_t}, level::Cint)::t8_linearidx_t -end - -""" - t8_dpyramid_child(elem, child_id, child) - -Compute the child\\_id-th child in Morton order of a pyramid. - -# Arguments -* `elem`:\\[in\\] Input pyramid. -* `child_id`:\\[in,out\\] The id of the child, 0..7 in Morton order. -* `child`:\\[out\\] Existing pyramid whose data will be filled with the date of t's child\\_id-th child. -### Prototype -```c -void t8_dpyramid_child (const t8_dpyramid_t *elem, const int child_id, t8_dpyramid_t *child); -``` -""" -function t8_dpyramid_child(elem, child_id, child) - @ccall libt8.t8_dpyramid_child(elem::Ptr{t8_dpyramid_t}, child_id::Cint, child::Ptr{t8_dpyramid_t})::Cvoid -end - -""" - t8_dpyramid_children(p, c) - -Compute the children of a pyramid, array version - -# Arguments -* `p`:\\[in\\] Input pyramid -* `c`:\\[in,out\\] Pointers to the computed children in Morton order -### Prototype -```c -void t8_dpyramid_children (const t8_dpyramid_t *p, t8_dpyramid_t **c); -``` -""" -function t8_dpyramid_children(p, c) - @ccall libt8.t8_dpyramid_children(p::Ptr{t8_dpyramid_t}, c::Ptr{Ptr{t8_dpyramid_t}})::Cvoid -end - -""" - t8_dpyramid_children_at_face(p, face, children, num_children, child_indices) - -Given a pyramid and a face, compute all children touching this face - -# Arguments -* `p`:\\[in\\] Input pyramid -* `face`:\\[in\\] The face to compute the children at -* `children`:\\[in,out\\] The children of *p* at *face* -* `num_children`:\\[in\\] The number of children at this face -* `child_indices`:\\[in,out\\] An array to be filled with the local-ids of the children. -### Prototype -```c -void t8_dpyramid_children_at_face (const t8_dpyramid_t *p, const int face, t8_dpyramid_t *children[], const int num_children, int *child_indices); -``` -""" -function t8_dpyramid_children_at_face(p, face, children, num_children, child_indices) - @ccall libt8.t8_dpyramid_children_at_face(p::Ptr{t8_dpyramid_t}, face::Cint, children::Ptr{Ptr{t8_dpyramid_t}}, num_children::Cint, child_indices::Ptr{Cint})::Cvoid -end - -""" - t8_dpyramid_face_child_face(p, face, face_child) - -Given a face of a pyramid and a child number of a child of that face, return the face number of the child of the pyramid that matches the child face. - -# Arguments -* `p`:\\[in\\] Input pyramid -* `face`:\\[in\\] A face of *p* -* `face_child`:\\[in\\] A number specifying a child on the *face* -# Returns -The number of the face of the child *face_child* -### Prototype -```c -int t8_dpyramid_face_child_face (const t8_dpyramid_t *p, const int face, const int face_child); -``` -""" -function t8_dpyramid_face_child_face(p, face, face_child) - @ccall libt8.t8_dpyramid_face_child_face(p::Ptr{t8_dpyramid_t}, face::Cint, face_child::Cint)::Cint -end - -""" - t8_dpyramid_face_shape(pyra, face) - -Given the facenumber of a pyramid, return the shape of the face - -# Arguments -* `pyra`:\\[in\\] Input pyramid -* `face`:\\[in\\] The facenumber -# Returns -the shape of the face -### Prototype -```c -t8_element_shape_t t8_dpyramid_face_shape (const t8_dpyramid_t *pyra, int face); -``` -""" -function t8_dpyramid_face_shape(pyra, face) - @ccall libt8.t8_dpyramid_face_shape(pyra::Ptr{t8_dpyramid_t}, face::Cint)::t8_element_shape_t -end - -""" - t8_dpyramid_get_face_corner(pyra, face, corner) - -Returns the corner number of a pyramid given a face of a pyramid and a corner number regarding that face. - -# Arguments -* `pyra`:\\[in\\] Input pyramid -* `face`:\\[in\\] The facenumber of a face of *pyra* -* `corner`:\\[in\\] The cornernumber of a corner of *face* -# Returns -The cornernumber of *pyra* -### Prototype -```c -int t8_dpyramid_get_face_corner (const t8_dpyramid_t *pyra, int face, int corner); -``` -""" -function t8_dpyramid_get_face_corner(pyra, face, corner) - @ccall libt8.t8_dpyramid_get_face_corner(pyra::Ptr{t8_dpyramid_t}, face::Cint, corner::Cint)::Cint -end - -""" - t8_dpyramid_boundary_face(p, face, boundary) - -Given a boundary element and a facenumber of this element, compute the boundary face - -# Arguments -* `p`:\\[in\\] Input pyramid -* `face`:\\[in\\] The face number of an element -* `boundary`:\\[in,out\\] The boundary face -### Prototype -```c -void t8_dpyramid_boundary_face (const t8_dpyramid_t *p, const int face, t8_element_t *boundary); -``` -""" -function t8_dpyramid_boundary_face(p, face, boundary) - @ccall libt8.t8_dpyramid_boundary_face(p::Ptr{t8_dpyramid_t}, face::Cint, boundary::Ptr{t8_element_t})::Cvoid -end - -""" - t8_dpyramid_extrude_face(face, p, root_face) - -Given a boundary face inside the root pyramids's face construct the element inside the root pyramid that has the given face as a face. - -# Arguments -* `face`:\\[in\\] A face element. -* `p`:\\[in,out\\] An allocated element. The entries will be filled with the data of the element that has *face* as a face and lies within the root tree. -* `root_face`:\\[in\\] The index of the face of the root tree in which *face* lies. -# Returns -The face number of the face of *p* that coincides with *face*. -### Prototype -```c -int t8_dpyramid_extrude_face (const t8_element_t *face, t8_dpyramid_t *p, const int root_face); -``` -""" -function t8_dpyramid_extrude_face(face, p, root_face) - @ccall libt8.t8_dpyramid_extrude_face(face::Ptr{t8_element_t}, p::Ptr{t8_dpyramid_t}, root_face::Cint)::Cint -end - -""" - t8_dpyramid_compare(p1, p2) - -Compare two elements. returns negative if p1 < p2, zero if p1 equals p2 and positive if p1 > p2. If p2 is a copy of p1 then the elements are equal. - -# Arguments -* `p1`:\\[in\\] A pyramid -* `p2`:\\[in\\] Another pyramid -# Returns -an integer describing which pyramid is larger. -### Prototype -```c -int t8_dpyramid_compare (const t8_dpyramid_t *p1, const t8_dpyramid_t *p2); -``` -""" -function t8_dpyramid_compare(p1, p2) - @ccall libt8.t8_dpyramid_compare(p1::Ptr{t8_dpyramid_t}, p2::Ptr{t8_dpyramid_t})::Cint -end - -""" - t8_dpyramid_equal(elem1, elem2) - -Check if two elements are equal. - -# Arguments -* `elem1`:\\[in\\] The first element. -* `elem2`:\\[in\\] The second element. -# Returns -1 if the elements are equal, 0 if they are not equal -### Prototype -```c -int t8_dpyramid_equal (const t8_dpyramid_t *elem1, const t8_dpyramid_t *elem2); -``` -""" -function t8_dpyramid_equal(elem1, elem2) - @ccall libt8.t8_dpyramid_equal(elem1::Ptr{t8_dpyramid_t}, elem2::Ptr{t8_dpyramid_t})::Cint -end - -""" - t8_dpyramid_is_family(fam) - -Check whether a collection of 10 pyramids is a family in Morton order. - -# Arguments -* `fam`:\\[in\\] A collection of pyramids -# Returns -Nonzero if *fam* is a family of pyramids -### Prototype -```c -int t8_dpyramid_is_family (t8_dpyramid_t **fam); -``` -""" -function t8_dpyramid_is_family(fam) - @ccall libt8.t8_dpyramid_is_family(fam::Ptr{Ptr{t8_dpyramid_t}})::Cint -end - -""" - t8_dpyramid_is_root_boundary(p, face) - -Compute whether a given pyramid shares a given face with its root tree. - -# Arguments -* `p`:\\[in\\] The input pyramid -* `face`:\\[in\\] A face of *p* -# Returns -True, if *is* a subface of the pyramid root element. -### Prototype -```c -int t8_dpyramid_is_root_boundary (const t8_dpyramid_t *p, const int face); -``` -""" -function t8_dpyramid_is_root_boundary(p, face) - @ccall libt8.t8_dpyramid_is_root_boundary(p::Ptr{t8_dpyramid_t}, face::Cint)::Cint -end - -""" - t8_dpyramid_face_neighbor_inside(p, neigh, face, neigh_face) - -Compute the neighbor of p along a given face and the number of the dual face if the neighbor is inside the root pyramid. Return 0 if the neighbor is not inside, 1 ow. - -# Arguments -* `p`:\\[in\\] Input pyramid -* `neigh`:\\[in,out\\] The neighbor of *p* -* `face`:\\[in\\] The face of *p* along which *neigh* is computed -* `neigh_face`:\\[in,out\\] The dual face -### Prototype -```c -int t8_dpyramid_face_neighbor_inside (const t8_dpyramid_t *p, t8_dpyramid_t *neigh, const int face, int *neigh_face); -``` -""" -function t8_dpyramid_face_neighbor_inside(p, neigh, face, neigh_face) - @ccall libt8.t8_dpyramid_face_neighbor_inside(p::Ptr{t8_dpyramid_t}, neigh::Ptr{t8_dpyramid_t}, face::Cint, neigh_face::Ptr{Cint})::Cint -end - -""" - t8_dpyramid_child_id(p) - -Compute the position of the ancestor of this child at level *level* within its siblings. - -# Arguments -* `p`:\\[in\\] pyramid to be considered. -# Returns -Returns its child id in 0..9 -### Prototype -```c -int t8_dpyramid_child_id (const t8_dpyramid_t *p); -``` -""" -function t8_dpyramid_child_id(p) - @ccall libt8.t8_dpyramid_child_id(p::Ptr{t8_dpyramid_t})::Cint -end - -""" - t8_dpyramid_is_inside_root(p) - -Returns zero if p is not inside root, 1 ow - -# Arguments -* `p`:\\[in\\] Pyramid to check -# Returns -0 if p is inside root, 1, ow -### Prototype -```c -int t8_dpyramid_is_inside_root (const t8_dpyramid_t *p); -``` -""" -function t8_dpyramid_is_inside_root(p) - @ccall libt8.t8_dpyramid_is_inside_root(p::Ptr{t8_dpyramid_t})::Cint -end - -""" - t8_dpyramid_tet_boundary(p, face) - -Check, if a tet of type 0 or 3 has a common face with its pyramid-ancestor - -# Arguments -* `p`:\\[in\\] input pyramid -* `face`:\\[in\\] A face of *p*. +* `forest`:\\[in\\] The *forest*. Ghost layer must exist. +* `lghost_tree`:\\[in\\] The ghost tree id of a ghost tree. # Returns -false if they don't share a face, true otherwise +The number of ghost leaf elements of the tree. *forest* must be committed before calling this function. ### Prototype ```c -int t8_dpyramid_tet_boundary (const t8_dpyramid_t *p, const int face); +t8_locidx_t t8_forest_ghost_tree_num_leaf_elements (t8_forest_t forest, t8_locidx_t lghost_tree); ``` """ -function t8_dpyramid_tet_boundary(p, face) - @ccall libt8.t8_dpyramid_tet_boundary(p::Ptr{t8_dpyramid_t}, face::Cint)::Cint +function t8_forest_ghost_tree_num_leaf_elements(forest, lghost_tree) + @ccall libt8.t8_forest_ghost_tree_num_leaf_elements(forest::t8_forest_t, + lghost_tree::t8_locidx_t)::t8_locidx_t end """ - t8_dpyramid_tree_face(p, face) + t8_forest_ghost_get_tree_leaf_elements(forest, lghost_tree) -compute if a given element lies on the tree boundary and return the face number of the tree face. If not the return value is arbitrary +Get a pointer to the ghost leaf element array of a ghost tree. # Arguments -* `p`:\\[in\\] pyramid -* `face`:\\[in\\] a face of *p* +* `forest`:\\[in\\] The forest. Ghost layer must exist. +* `lghost_tree`:\\[in\\] The ghost tree id of a ghost tree. 0 <= *lghost_tree* < num\\_ghost\\_trees # Returns -See description -### Prototype -```c -int t8_dpyramid_tree_face (const t8_dpyramid_t *p, const int face); -``` -""" -function t8_dpyramid_tree_face(p, face) - @ccall libt8.t8_dpyramid_tree_face(p::Ptr{t8_dpyramid_t}, face::Cint)::Cint -end - -""" - t8_dpyramid_first_descendant(p, desc, level) - -Compute the first descendant of a pyramid at a given level. This is the descendant of the pyramid in a uniform level refinement that has the smallest id. - -# Arguments -* `p`:\\[in\\] pyramid whose descendant is computed. -* `desc`:\\[out\\] Existing pyramid whose data will be filled with the data of *p*'s first descendant on level *level*. -* `level`:\\[in\\] The refinement level. Must be greater than *p*'s refinement level. -### Prototype -```c -void t8_dpyramid_first_descendant (const t8_dpyramid_t *p, t8_dpyramid_t *desc, const int level); -``` -""" -function t8_dpyramid_first_descendant(p, desc, level) - @ccall libt8.t8_dpyramid_first_descendant(p::Ptr{t8_dpyramid_t}, desc::Ptr{t8_dpyramid_t}, level::Cint)::Cvoid -end - -""" - t8_dpyramid_first_descendant_face(p, face, first_desc, level) - -Construct the first descendant of a pyramid touching a given face - -# Arguments -* `p`:\\[in\\] pyramid whose descendant is computed. -* `face`:\\[in\\] The face at which the descendant is computed -* `first_desc`:\\[out\\] Existing pyramid whose data will be filled with the data of *p*'s first descendant on level *level*. -* `level`:\\[in\\] The refinement level. Must be greater than *p*'s refinement level. -### Prototype -```c -void t8_dpyramid_first_descendant_face (const t8_dpyramid_t *p, const int face, t8_dpyramid_t *first_desc, const int level); -``` -""" -function t8_dpyramid_first_descendant_face(p, face, first_desc, level) - @ccall libt8.t8_dpyramid_first_descendant_face(p::Ptr{t8_dpyramid_t}, face::Cint, first_desc::Ptr{t8_dpyramid_t}, level::Cint)::Cvoid -end - -""" - t8_dpyramid_last_descendant(p, desc, level) - -Compute the last descendant of a pyramid at a given level. This is the descendant of the pyramid in a uniform level refinement that has the largest id. - -# Arguments -* `p`:\\[in\\] pyramid whose descendant is computed. -* `desc`:\\[out\\] Existing pyramid whose data will be filled with the data of *p*'s last descendant on level *level*. -* `level`:\\[in\\] The refinement level. Must be greater than *p*'s refinement level. -### Prototype -```c -void t8_dpyramid_last_descendant (const t8_dpyramid_t *p, t8_dpyramid_t *desc, int level); -``` -""" -function t8_dpyramid_last_descendant(p, desc, level) - @ccall libt8.t8_dpyramid_last_descendant(p::Ptr{t8_dpyramid_t}, desc::Ptr{t8_dpyramid_t}, level::Cint)::Cvoid -end - -""" - t8_dpyramid_last_descendant_face(p, face, last_desc, level) - -Construct the last descendant of a pyramid touching a given face - -# Arguments -* `p`:\\[in\\] pyramid whose descendant is computed. -* `face`:\\[in\\] The face at which the descendant is computed -* `last_desc`:\\[out\\] Existing pyramid whose data will be filled with the data of *p*'s first descendant on level *level*. -* `level`:\\[in\\] The refinement level. Must be greater than *p*'s refinement level. +A pointer to the array of ghost leaf elements of the tree. *forest* must be committed before calling this function. ### Prototype ```c -void t8_dpyramid_last_descendant_face (const t8_dpyramid_t *p, const int face, t8_dpyramid_t *last_desc, const int level); +t8_element_array_t * t8_forest_ghost_get_tree_leaf_elements (const t8_forest_t forest, const t8_locidx_t lghost_tree); ``` """ -function t8_dpyramid_last_descendant_face(p, face, last_desc, level) - @ccall libt8.t8_dpyramid_last_descendant_face(p::Ptr{t8_dpyramid_t}, face::Cint, last_desc::Ptr{t8_dpyramid_t}, level::Cint)::Cvoid +function t8_forest_ghost_get_tree_leaf_elements(forest, lghost_tree) + @ccall libt8.t8_forest_ghost_get_tree_leaf_elements(forest::t8_forest_t, + lghost_tree::t8_locidx_t)::Ptr{t8_element_array_t} end """ - t8_dpyramid_compute_integer_coords(elem, vertex, coords) + t8_forest_ghost_get_ghost_treeid(forest, gtreeid) -Compute the coordinates of a vertex of a pyramid. +Given a global tree compute the ghost local tree id of it. # Arguments -* `elem`:\\[in\\] Input pyramid. -* `vertex`:\\[in\\] The number of the vertex. -* `coords`:\\[out\\] An array of 3 [`t8_dpyramid_coord_t`](@ref) that will be filled with the coordinates of the vertex. -### Prototype -```c -void t8_dpyramid_compute_integer_coords (const t8_dpyramid_t *elem, const int vertex, int coords[]); -``` -""" -function t8_dpyramid_compute_integer_coords(elem, vertex, coords) - @ccall libt8.t8_dpyramid_compute_integer_coords(elem::Ptr{t8_dpyramid_t}, vertex::Cint, coords::Ptr{Cint})::Cvoid -end - -""" - t8_dpyramid_parent(p, parent) - -Compute the parent of a given pyramid +* `forest`:\\[in\\] The forest. Ghost layer must exist. +* `gtreeid`:\\[in\\] A global tree in *forest*. +# Returns +If *gtreeid* is also a ghost tree, the index in the ghost->ghost\\_trees array of the tree. Otherwise a negative number. *forest* must be committed before calling this function. +# See also +https://github.com/DLR-AMR/t8code/wiki/Tree-indexing for more details about tree indexing. -# Arguments -* `p`:\\[in\\] Input pyramid. -* `parent`:\\[out\\] The parent of *p*. ### Prototype ```c -void t8_dpyramid_parent (const t8_dpyramid_t *p, t8_dpyramid_t *parent); +t8_locidx_t t8_forest_ghost_get_ghost_treeid (t8_forest_t forest, t8_gloidx_t gtreeid); ``` """ -function t8_dpyramid_parent(p, parent) - @ccall libt8.t8_dpyramid_parent(p::Ptr{t8_dpyramid_t}, parent::Ptr{t8_dpyramid_t})::Cvoid +function t8_forest_ghost_get_ghost_treeid(forest, gtreeid) + @ccall libt8.t8_forest_ghost_get_ghost_treeid(forest::t8_forest_t, + gtreeid::t8_gloidx_t)::t8_locidx_t end """ - t8_dpyramid_num_corners(p) + t8_forest_ghost_get_tree_class(forest, lghost_tree) -Compute the number of corners of a pyramid. If pyramid has type less than 6, it is actually a tetrahedron. +Given an index in the ghost\\_tree array, return this tree's element class. # Arguments -* `p`:\\[in\\] Input pyramid. +* `forest`:\\[in\\] A committed forest. +* `lghost_tree`:\\[in\\] The tree's local index in the ghost\\_tree array. # Returns -The number of corners of p. +The element class of the given tree. ### Prototype ```c -int t8_dpyramid_num_corners (const t8_dpyramid_t *p); +t8_eclass_t t8_forest_ghost_get_tree_class (const t8_forest_t forest, const t8_locidx_t lghost_tree); ``` """ -function t8_dpyramid_num_corners(p) - @ccall libt8.t8_dpyramid_num_corners(p::Ptr{t8_dpyramid_t})::Cint +function t8_forest_ghost_get_tree_class(forest, lghost_tree) + @ccall libt8.t8_forest_ghost_get_tree_class(forest::t8_forest_t, + lghost_tree::t8_locidx_t)::t8_eclass_t end """ - t8_dpyramid_num_children(p) + t8_forest_ghost_get_global_treeid(forest, lghost_tree) -Compute the number of children of p +Given a local ghost tree compute the global tree id of it. # Arguments -* `p`:\\[in\\] Input pyramid. +* `forest`:\\[in\\] The forest. Ghost layer must exist. +* `lghost_tree`:\\[in\\] The ghost tree id of a ghost tree. (0 <= *lghost_tree* < num\\_ghost\\_trees) # Returns -The number of children of p. -### Prototype -```c -int t8_dpyramid_num_children (const t8_dpyramid_t *p); -``` -""" -function t8_dpyramid_num_children(p) - @ccall libt8.t8_dpyramid_num_children(p::Ptr{t8_dpyramid_t})::Cint -end - -""" - t8_dpyramid_num_siblings(p) - -Compute the number of siblings of p +The global id of the local ghost tree *lghost_tree*. *forest* must be committed before calling this function. +# See also +https://github.com/DLR-AMR/t8code/wiki/Tree-indexing for more details about tree indexing. -# Arguments -* `p`:\\[in\\] Input pyramid -# Returns -The number of siblings of p. ### Prototype ```c -int t8_dpyramid_num_siblings (const t8_dpyramid_t *p); +t8_gloidx_t t8_forest_ghost_get_global_treeid (const t8_forest_t forest, const t8_locidx_t lghost_tree); ``` """ -function t8_dpyramid_num_siblings(p) - @ccall libt8.t8_dpyramid_num_siblings(p::Ptr{t8_dpyramid_t})::Cint +function t8_forest_ghost_get_global_treeid(forest, lghost_tree) + @ccall libt8.t8_forest_ghost_get_global_treeid(forest::t8_forest_t, + lghost_tree::t8_locidx_t)::t8_gloidx_t end """ - t8_dpyramid_num_faces(p) + t8_forest_ghost_get_leaf_element(forest, lghost_tree, lelement) -Return the number of faces of p +Given an index into the ghost\\_trees array and for that tree an element index, return the corresponding element. # Arguments -* `p`:\\[in\\] Input pyramid +* `forest`:\\[in\\] The *forest*. Ghost layer must exist. +* `lghost_tree`:\\[in\\] The ghost tree id of a ghost tree. +* `lelement`:\\[in\\] The local id of the ghost leaf element considered. # Returns -The number of faces of p +A pointer to the ghost leaf element. *forest* must be committed before calling this function. ### Prototype ```c -int t8_dpyramid_num_faces (const t8_dpyramid_t *p); +t8_element_t * t8_forest_ghost_get_leaf_element (t8_forest_t forest, t8_locidx_t lghost_tree, t8_locidx_t lelement); ``` """ -function t8_dpyramid_num_faces(p) - @ccall libt8.t8_dpyramid_num_faces(p::Ptr{t8_dpyramid_t})::Cint +function t8_forest_ghost_get_leaf_element(forest, lghost_tree, lelement) + @ccall libt8.t8_forest_ghost_get_leaf_element(forest::t8_forest_t, + lghost_tree::t8_locidx_t, + lelement::t8_locidx_t)::Ptr{t8_element_t} end """ - t8_dpyramid_max_num_faces(p) + t8_forest_element_is_ghost(forest, element, lghost_tree) -Return the maximal number of faces of an element p - -# Arguments -* `p`:\\[in\\] Input pyramid -# Returns -The maximal number of faces of p -### Prototype -```c -int t8_dpyramid_max_num_faces (const t8_dpyramid_t *p); -``` -""" -function t8_dpyramid_max_num_faces(p) - @ccall libt8.t8_dpyramid_max_num_faces(p::Ptr{t8_dpyramid_t})::Cint -end +Query whether a given element is a ghost of a certain tree in a forest. -""" - t8_dpyramid_face_parent_face(elem, face) +!!! note -Given a face of an element return the face number of the parent of the element that matches the element's face. Or return -1 if no face of the parent matches the face. + *forest* must be committed before calling this function. # Arguments -* `elem`:\\[in\\] Input pyramid -* `face`:\\[in\\] a face of *elem* +* `forest`:\\[in\\] The forest. +* `element`:\\[in\\] An element of a ghost tree in *forest*. +* `lghost_tree`:\\[in\\] A local ghost tree id of *forest*. (0 <= *lghost_tree* < num\\_ghost\\_trees) # Returns -the facenumber of the parent of *elem* matching *face* or -1 +True (non-zero) if and only if *element* is a ghost in *lghost_tree* of *forest*. ### Prototype ```c -int t8_dpyramid_face_parent_face (const t8_dpyramid_t *elem, const int face); +int t8_forest_element_is_ghost (const t8_forest_t forest, const t8_element_t *element, const t8_locidx_t lghost_tree); ``` """ -function t8_dpyramid_face_parent_face(elem, face) - @ccall libt8.t8_dpyramid_face_parent_face(elem::Ptr{t8_dpyramid_t}, face::Cint)::Cint +function t8_forest_element_is_ghost(forest, element, lghost_tree) + @ccall libt8.t8_forest_element_is_ghost(forest::t8_forest_t, element::Ptr{t8_element_t}, + lghost_tree::t8_locidx_t)::Cint end """ - t8_dpyramid_ancestor_id(p, level) + t8_forest_ghost_remote_first_tree(forest, remote) -Return the child-id of the ancestor of p at level level +Return the first local ghost tree of a remote rank. # Arguments -* `p`:\\[in\\] Input pyramid -* `level`:\\[in\\] The ancestor-level +* `forest`:\\[in\\] A forest with constructed ghost layer. +* `remote`:\\[in\\] A remote rank of the ghost layer in *forest*. # Returns -The child-id of the ancestor -### Prototype -```c -int t8_dpyramid_ancestor_id (const t8_dpyramid_t *p, const int level); -``` -""" -function t8_dpyramid_ancestor_id(p, level) - @ccall libt8.t8_dpyramid_ancestor_id(p::Ptr{t8_dpyramid_t}, level::Cint)::Cint -end - -""" - t8_dpyramid_ancestor(pyra, level, ancestor) - -Compute the ancestor of *pyra* at a given level - -# Arguments -* `pyra`:\\[in\\] Input pyramid -* `level`:\\[in\\] Level of the ancestor to compute -* `ancestor`:\\[in,out\\] Allocated element that will be filled with the data of the ancestor. +The ghost tree id of the first ghost tree that stores ghost elements of *remote*. ### Prototype ```c -void t8_dpyramid_ancestor (const t8_dpyramid_t *pyra, const int level, t8_dpyramid_t *ancestor); +t8_locidx_t t8_forest_ghost_remote_first_tree (t8_forest_t forest, int remote); ``` """ -function t8_dpyramid_ancestor(pyra, level, ancestor) - @ccall libt8.t8_dpyramid_ancestor(pyra::Ptr{t8_dpyramid_t}, level::Cint, ancestor::Ptr{t8_dpyramid_t})::Cvoid +function t8_forest_ghost_remote_first_tree(forest, remote) + @ccall libt8.t8_forest_ghost_remote_first_tree(forest::t8_forest_t, + remote::Cint)::t8_locidx_t end """ - t8_dpyramid_type_at_level(p, level) + t8_forest_ghost_remote_first_elem(forest, remote) -Compute the type of a pyramid at a given level. Starting from its own level, we iterate over the levels and compute the type of this level. If p is a tetrahedron, we compute it in a tetrahedral fashion up unto the last level where p is a tet and continue in a pyramidal fashion +Return the local index of the first ghost element that belongs to a given remote rank. # Arguments -* `p`:\\[in\\] Input pyramid -* `level`:\\[in\\] The level at which the type is computed +* `forest`:\\[in\\] A forest with constructed ghost layer. +* `remote`:\\[in\\] A remote rank of the ghost layer in *forest*. # Returns -The type of *p* at level *level*. +The index i in the ghost elements of the first element of rank *remote* ### Prototype ```c -int t8_dpyramid_type_at_level (const t8_dpyramid_t *p, const int level); +t8_locidx_t t8_forest_ghost_remote_first_elem (t8_forest_t forest, int remote); ``` """ -function t8_dpyramid_type_at_level(p, level) - @ccall libt8.t8_dpyramid_type_at_level(p::Ptr{t8_dpyramid_t}, level::Cint)::Cint +function t8_forest_ghost_remote_first_elem(forest, remote) + @ccall libt8.t8_forest_ghost_remote_first_elem(forest::t8_forest_t, + remote::Cint)::t8_locidx_t end """ - t8_dpyramid_shape(p) + t8_forest_ghost_ref(ghost) -Returns the shape of the pyramid (pyramid or tetrahedron) +Increase the reference count of a ghost structure. # Arguments -* `p`:\\[in\\] Input pyramid. -# Returns -The eclass of the element +* `ghost`:\\[in,out\\] On input, this ghost structure must exist with positive reference count. ### Prototype ```c -t8_element_shape_t t8_dpyramid_shape (const t8_dpyramid_t *p); +void t8_forest_ghost_ref (t8_forest_ghost_t ghost); ``` """ -function t8_dpyramid_shape(p) - @ccall libt8.t8_dpyramid_shape(p::Ptr{t8_dpyramid_t})::t8_element_shape_t +function t8_forest_ghost_ref(ghost) + @ccall libt8.t8_forest_ghost_ref(ghost::t8_forest_ghost_t)::Cvoid end """ - t8_dpyramid_successor(elem, s, level) + t8_forest_ghost_unref(pghost) -Computes the successor of a pyramid in a uniform grid of level *level*. +Decrease the reference count of a ghost structure. If the counter reaches zero, the ghost structure is destroyed. See also t8_forest_ghost_destroy, which is to be preferred when it is known that the last reference to a cmesh is deleted. # Arguments -* `elem`:\\[in\\] pyramid whose id will be computed. -* `s`:\\[in,out\\] Existing pyramid whose data will be filled with the data of *l*'s successor on level *level*. -* `level`:\\[in\\] level of uniform grid to be considered. +* `pghost`:\\[in,out\\] On input, the ghost structure pointed to must exist with positive reference count. If the reference count reaches zero, the ghost structure is destroyed and this pointer is set to NULL. Otherwise, the pointer is not changed. ### Prototype ```c -void t8_dpyramid_successor (const t8_dpyramid_t *elem, t8_dpyramid_t *s, const int level); +void t8_forest_ghost_unref (t8_forest_ghost_t *pghost); ``` """ -function t8_dpyramid_successor(elem, s, level) - @ccall libt8.t8_dpyramid_successor(elem::Ptr{t8_dpyramid_t}, s::Ptr{t8_dpyramid_t}, level::Cint)::Cvoid +function t8_forest_ghost_unref(pghost) + @ccall libt8.t8_forest_ghost_unref(pghost::Ptr{t8_forest_ghost_t})::Cvoid end """ - t8_dpyramid_vertex_reference_coords(elem, vertex, coords) - -Compute the reference coordinates of a vertex of a pyramid when the tree (level 0 triangle) is embedded in + t8_forest_ghost_destroy(pghost) -```c++ - [0,1]^3 -``` - -. +Verify that a ghost structure has only one reference left and destroy it. This function is preferred over t8_forest_ghost_unref when it is known that the last reference is to be deleted. # Arguments -* `elem`:\\[in\\] Input pyramid. -* `vertex`:\\[in\\] The number of the vertex. -* `coords`:\\[out\\] An array of 3 double that will be filled with the reference coordinates of the vertex. +* `pghost`:\\[in,out\\] This ghost structure must have a reference count of one. It can be in any state (committed or not). Then it effectively calls t8_forest_ghost_unref. ### Prototype ```c -void t8_dpyramid_vertex_reference_coords (const t8_dpyramid_t *elem, const int vertex, double coords[]); +void t8_forest_ghost_destroy (t8_forest_ghost_t *pghost); ``` """ -function t8_dpyramid_vertex_reference_coords(elem, vertex, coords) - @ccall libt8.t8_dpyramid_vertex_reference_coords(elem::Ptr{t8_dpyramid_t}, vertex::Cint, coords::Ptr{Cdouble})::Cvoid +function t8_forest_ghost_destroy(pghost) + @ccall libt8.t8_forest_ghost_destroy(pghost::Ptr{t8_forest_ghost_t})::Cvoid end """ - t8_dpyramid_compute_reference_coords(elem, ref_coords, num_coords, out_coords) - -Convert points in the reference space of a pyramid element to points in the reference space of the tree (level 0) embedded in - -```c++ - [0,1]^3 -``` + t8_forest_ghost_create(forest) -. - -```c++ - [0,1]^3 -``` - -) +Create one layer of ghost elements for a forest. This function is collective. Every process gets a ghost structure, which is empty on processes without local elements. # Arguments -* `elem`:\\[in\\] Input pyramid. -* `ref_coords`:\\[in\\] The reference coordinates in the pyramid (*num_coords* times -* `num_coords`:\\[in\\] Number of coordinates to evaluate -* `out_coords`:\\[out\\] An array of *num_coords* x 3 x double that will be filled with the reference coordinates of the points on the pyramid. -### Prototype -```c -void t8_dpyramid_compute_reference_coords (const t8_dpyramid_t *elem, const double *ref_coords, const size_t num_coords, double *out_coords); -``` -""" -function t8_dpyramid_compute_reference_coords(elem, ref_coords, num_coords, out_coords) - @ccall libt8.t8_dpyramid_compute_reference_coords(elem::Ptr{t8_dpyramid_t}, ref_coords::Ptr{Cdouble}, num_coords::Csize_t, out_coords::Ptr{Cdouble})::Cvoid -end - -""" - t8_dpyramid_nearest_common_ancestor(pyra1, pyra2, nca) - -Compute the nearest common ancestor of two elements +* `forest`:\\[in,out\\] The forest. *forest* must be committed before calling this function. +# See also +[`t8_forest_set_ghost`](@ref) -# Arguments -* `pyra1`:\\[in\\] The first pyramid -* `pyra2`:\\[in\\] The second pyramid -* `nca`:\\[in,out\\] Existing pyramid whose data will be filled with the data of *pyra1* and *pyra2* nearest common ancestor. ### Prototype ```c -void t8_dpyramid_nearest_common_ancestor (const t8_dpyramid_t *pyra1, const t8_dpyramid_t *pyra2, t8_dpyramid_t *nca); +void t8_forest_ghost_create (t8_forest_t forest); ``` """ -function t8_dpyramid_nearest_common_ancestor(pyra1, pyra2, nca) - @ccall libt8.t8_dpyramid_nearest_common_ancestor(pyra1::Ptr{t8_dpyramid_t}, pyra2::Ptr{t8_dpyramid_t}, nca::Ptr{t8_dpyramid_t})::Cvoid +function t8_forest_ghost_create(forest) + @ccall libt8.t8_forest_ghost_create(forest::t8_forest_t)::Cvoid end """ - t8_dpyramid_is_valid(p) + t8_forest_ghost_get_remote(forest, remote) -Query whether all entries of a pyramid are in valid ranges. A pyramid is valid if and only if its triangle and line member are valid. +Return the remote struct of a given remote rank. # Arguments -* `p`:\\[in\\] pyramid to be considered. +* `forest`:\\[in\\] A forest with constructed ghost layer. +* `remote`:\\[in\\] A remote rank of the ghost layer in *forest*. # Returns -True, if *p* is a valid pyramid and it is safe to call any function in this file on *p*. False otherwise. -### Prototype -```c -int t8_dpyramid_is_valid (const t8_dpyramid_t *p); -``` -""" -function t8_dpyramid_is_valid(p) - @ccall libt8.t8_dpyramid_is_valid(p::Ptr{t8_dpyramid_t})::Cint -end - -""" - t8_dtet_compute_integer_coords(elem, vertex, coordinates) - -Compute the coordinates of a vertex of a tetrahedron. - -# Arguments -* `elem`:\\[in\\] Input tetrahedron. -* `vertex`:\\[in\\] The number of the vertex. -* `coordinates`:\\[out\\] An array of 3 [`t8_dtet_coord_t`](@ref) that will be filled with the coordinates of the vertex. +The t8_ghost_remote_t of *remote*. ### Prototype ```c -void t8_dtet_compute_integer_coords (const t8_dtet_t *elem, int vertex, t8_dtet_coord_t coordinates[3]); +t8_ghost_remote_t * t8_forest_ghost_get_remote (t8_forest_t forest, int remote); ``` """ -function t8_dtet_compute_integer_coords(elem, vertex, coordinates) - @ccall libt8.t8_dtet_compute_integer_coords(elem::Ptr{t8_dtet_t}, vertex::Cint, coordinates::Ptr{t8_dtet_coord_t})::Cvoid +function t8_forest_ghost_get_remote(forest, remote) + @ccall libt8.t8_forest_ghost_get_remote(forest::t8_forest_t, + remote::Cint)::Ptr{t8_ghost_remote_t} end """ - t8_dtet_compute_vertex_ref_coords(elem, vertex, coordinates) - -Compute the coordinates of a vertex of a tetrahedron when the tree (level 0 tetrahedron) is embedded in + t8_forest_ghost_get_remotes(forest, num_remotes) -```c++ - [0,1]^3 -``` - -. +Return the array of remote ranks. # Arguments -* `elem`:\\[in\\] Input tetrahedron. -* `vertex`:\\[in\\] The number of the vertex. -* `coordinates`:\\[out\\] An array of 3 double that will be filled with the reference coordinates of the vertex. +* `forest`:\\[in\\] A forest with constructed ghost layer. +* `num_remotes`:\\[in,out\\] On output the number of remote ranks is stored here. +# Returns +The array of remote ranks in ascending order. ### Prototype ```c -void t8_dtet_compute_vertex_ref_coords (const t8_dtet_t *elem, int vertex, double coordinates[3]); +int * t8_forest_ghost_get_remotes (t8_forest_t forest, int *num_remotes); ``` """ -function t8_dtet_compute_vertex_ref_coords(elem, vertex, coordinates) - @ccall libt8.t8_dtet_compute_vertex_ref_coords(elem::Ptr{t8_dtet_t}, vertex::Cint, coordinates::Ptr{Cdouble})::Cvoid +function t8_forest_ghost_get_remotes(forest, num_remotes) + @ccall libt8.t8_forest_ghost_get_remotes(forest::t8_forest_t, + num_remotes::Ptr{Cint})::Ptr{Cint} end +# typedef int ( * t8_forest_iterate_face_fn ) ( const t8_forest_t forest , const t8_locidx_t ltreeid , const t8_element_t * element , const int face , const int is_leaf , const t8_element_array_t * leaf_elements , const t8_locidx_t tree_leaf_index , void * user_data ) """ - t8_dtet_compute_reference_coords(tet, ref_coords, num_coords, out_coords) - -Convert points in the reference space of a tet element to points in the reference space of the tree (level 0) embedded in - -```c++ - [0,1]^3 -``` - -. - -```c++ - [0,1]^3 -``` - -) +Callback function used in # Arguments -* `tet`:\\[in\\] Input tet. -* `ref_coords`:\\[in\\] The reference coordinates in the tet (*num_coords* times -* `num_coords`:\\[in\\] Number of coordinates to evaluate -* `out_coords`:\\[out\\] An array of *num_coords* x 3 x double that will be filled with the reference coordinates of the points on the tet. -### Prototype -```c -void t8_dtet_compute_reference_coords (const t8_dtet_t *tet, const double *ref_coords, const size_t num_coords, double *out_coords); -``` +* `forest`:\\[in\\] The forest. +* `ltreeid`:\\[in\\] Local index of the tree containing the *element*. +* `element`:\\[in\\] The considered element. +* `face`:\\[in\\] The integer index of the considered face of *element*. +* `is_leaf`:\\[in\\] True if and only if the currently considered element is a leaf element. +* `leaf_elements`:\\[in\\] The array of leaf elements that are descendants of *element*. Sorted by linear index. +* `tree_leaf_index`:\\[in\\] Tree-local index of the first leaf. +* `user_data`:\\[in\\] Some user-defined data, as void pointer. +# Returns +Nonzero if the element may touch the face and the top-down search shall be continued, zero otherwise. +# See also +[`t8_forest_iterate_faces`](@ref). """ -function t8_dtet_compute_reference_coords(tet, ref_coords, num_coords, out_coords) - @ccall libt8.t8_dtet_compute_reference_coords(tet::Ptr{t8_dtet_t}, ref_coords::Ptr{Cdouble}, num_coords::Csize_t, out_coords::Ptr{Cdouble})::Cvoid -end +const t8_forest_iterate_face_fn = Ptr{Cvoid} +# typedef int ( * t8_forest_search_fn ) ( t8_forest_t forest , const t8_locidx_t ltreeid , const t8_element_t * element , const int is_leaf , const t8_element_array_t * leaf_elements , const t8_locidx_t tree_leaf_index ) """ - t8_dtet_compute_all_coords(tet, coordinates) - -Compute the coordinates of the four vertices of a tetrahedron. +A call-back function used by t8_forest_search describing a search-criterion. Is called on an element and the search criterion should be checked on that element. Return true if the search criterion is met, false otherwise. # Arguments -* `tet`:\\[in\\] Input tetrahedron. -* `coordinates`:\\[out\\] An array of 4x3 [`t8_dtet_coord_t`](@ref) that will be filled with the coordinates of t's vertices. -### Prototype -```c -void t8_dtet_compute_all_coords (const t8_dtet_t *tet, t8_dtet_coord_t coordinates[4][3]); -``` +* `forest`:\\[in\\] the forest +* `ltreeid`:\\[in\\] the local tree id of the current tree +* `element`:\\[in\\] the element for which the search criterion is checked. +* `is_leaf`:\\[in\\] true if and only if *element* is a leaf element +* `leaf_elements`:\\[in\\] the leaf elements in *forest* that are descendants of *element* (or the element itself if *is_leaf* is true) +* `tree_leaf_index`:\\[in\\] the local index of the first leaf in *leaf_elements* +# Returns +non-zero if the search criterion is met, zero otherwise. """ -function t8_dtet_compute_all_coords(tet, coordinates) - @ccall libt8.t8_dtet_compute_all_coords(tet::Ptr{t8_dtet_t}, coordinates::Ptr{NTuple{3, t8_dtet_coord_t}})::Cvoid -end +const t8_forest_search_fn = Ptr{Cvoid} +# typedef void ( * t8_forest_query_fn ) ( t8_forest_t forest , const t8_locidx_t ltreeid , const t8_element_t * element , const int is_leaf , const t8_element_array_t * leaf_elements , const t8_locidx_t tree_leaf_index , sc_array_t * queries , sc_array_t * query_indices , int * query_matches , const size_t num_active_queries ) """ - t8_dtet_copy(tet, dest) - -Copy the values of one tetrahedron to another. +A call-back function used by t8_forest_search for queries. Is called on an element and all queries are checked on that element. All positive queries are passed further down to the children of the element up to leaf elements of the tree. The results of the check are stored in *query_matches*. # Arguments -* `tet`:\\[in\\] Tetrahedron whose values will be copied. -* `dest`:\\[in,out\\] Existing tetrahedron whose data will be filled with the data of *tet*. -### Prototype -```c -void t8_dtet_copy (const t8_dtet_t *tet, t8_dtet_t *dest); -``` +* `forest`:\\[in\\] the forest +* `ltreeid`:\\[in\\] the local tree id of the current tree +* `element`:\\[in\\] the element for which the queries are executed +* `is_leaf`:\\[in\\] true if and only if *element* is a leaf element +* `leaf_elements`:\\[in\\] the leaf elements in *forest* that are descendants of *element* (or the element itself if *is_leaf* is true) +* `tree_leaf_index`:\\[in\\] the local index of the first leaf in *leaf_elements* +* `queries`:\\[in\\] An array of queries that are checked by the function +* `query_indices`:\\[in\\] An array of size\\_t entries, where each entry is an index of a query in *queries*. +* `query_matches`:\\[in,out\\] An array of length *num_active_queries*. If the element is not a leave must be set to true or false at the i-th index for each query, specifying whether the element 'matches' the query of the i-th query index or not. When the element is a leaf we can return before all entries are set. +* `num_active_queries`:\\[in\\] The number of currently active queries (equals the number of entries of *query_matches* and entries of *query_indices*). """ -function t8_dtet_copy(tet, dest) - @ccall libt8.t8_dtet_copy(tet::Ptr{t8_dtet_t}, dest::Ptr{t8_dtet_t})::Cvoid -end +const t8_forest_query_fn = Ptr{Cvoid} +# typedef int ( * t8_forest_partition_search_fn ) ( const t8_forest_t forest , const t8_locidx_t ltreeid , const t8_element_t * element , const int pfirst , const int plast ) """ - t8_dtet_compare(tet1, tet2) - -Compare two tets in their linear order. +A call-back function used by t8_forest_search_partition describing a search-criterion. Is called on an element and the search criterion should be checked on that element. Return true if the search criterion is met, false otherwise. # Arguments -* `tet1`:\\[in\\] Tetrahedron one. -* `tet2`:\\[in\\] Tetrahedron two. +* `forest`:\\[in\\] the forest +* `ltreeid`:\\[in\\] the local tree id of the current tree in the cmesh. Since the cmesh has to be replicated, it coincides with the global tree id. +* `element`:\\[in\\] the element for which the search criterion is checked +* `pfirst`:\\[in\\] the first processor that owns part of *element*. Guaranteed to be non-empty. +* `plast`:\\[in\\] the last processor that owns part of *element*. Guaranteed to be non-empty. # Returns -Returns negative if tet1 < tet2, zero if tet1 = tet2, positive if tet1 > tet2 -### Prototype -```c -int t8_dtet_compare (const t8_dtet_t *tet1, const t8_dtet_t *tet2); -``` +non-zero if the search criterion is met, zero otherwise. """ -function t8_dtet_compare(tet1, tet2) - @ccall libt8.t8_dtet_compare(tet1::Ptr{t8_dtet_t}, tet2::Ptr{t8_dtet_t})::Cint -end +const t8_forest_partition_search_fn = Ptr{Cvoid} +# typedef void ( * t8_forest_partition_query_fn ) ( const t8_forest_t forest , const t8_locidx_t ltreeid , const t8_element_t * element , const int pfirst , const int plast , void * queries , sc_array_t * query_indices , int * query_matches , const size_t num_active_queries ) """ - t8_dtet_equal(tet1, tet2) - -Check if two elements are equal. +A call-back function used by t8_forest_search_partition for queries. Is called on an element and all queries are checked on that element. All positive queries are passed further down to the children of the element. The results of the check are stored in *query_matches*. # Arguments -* `tet1`:\\[in\\] The first element. -* `tet2`:\\[in\\] The second element. -# Returns -1 if the elements are equal, 0 if they are not equal -### Prototype -```c -int t8_dtet_equal (const t8_dtet_t *tet1, const t8_dtet_t *tet2); -``` +* `forest`:\\[in\\] the forest +* `ltreeid`:\\[in\\] the local tree id of the current tree in the cmesh. Since the cmesh has to be replicated, it coincides with the global tree id. +* `element`:\\[in\\] the element for which the query is executed +* `pfirst`:\\[in\\] the first processor that owns part of *element*. Guaranteed to be non-empty. +* `plast`:\\[in\\] the last processor that owns part of *element*. Guaranteed to be non-empty. if this is equal to *pfirst*, then the recursion will stop for *element*'s branch after this function returns. +* `queries`:\\[in\\] an array of queries that are checked by the function +* `query_indices`:\\[in\\] an array of size\\_t entries, where each entry is an index of a query in *queries*. +* `query_matches`:\\[in,out\\] an array of length *num_active_queries*. If the element is not a leaf must be set to true or false at the i-th index for each query, specifying whether the element 'matches' the query of the i-th query index or not. When the element is a leaf we can return before all entries are set. +* `num_active_queries`:\\[in\\] The number of currently active queries (equals the number of entries of *query_matches* and entries of *query_indices*). """ -function t8_dtet_equal(tet1, tet2) - @ccall libt8.t8_dtet_equal(tet1::Ptr{t8_dtet_t}, tet2::Ptr{t8_dtet_t})::Cint -end +const t8_forest_partition_query_fn = Ptr{Cvoid} """ - t8_dtet_parent(tet, parent) - -Compute the parent of a tetrahedron. - -!!! note + t8_forest_split_array(element, leaf_elements, offsets) - *t* may point to the same tetrahedron as *parent*. +Split an array of elements according to the children of a given element E. In other words for each child C of E, find the index i, j, such that all descendants of C are elements[i], ..., elements[j-1]. # Arguments -* `tet`:\\[in\\] Input tetrahedron. -* `parent`:\\[in,out\\] Existing tetrahedron whose data will be filled with the data of *tet*'s parent. +* `element`:\\[in\\] An element. +* `leaf_elements`:\\[in\\] An array of leaf elements of *element*. Thus, all elements must be descendants. Sorted by linear index. +* `offsets`:\\[in,out\\] On input an allocated array of *num_children_of_E* + 1 entries. On output entry i indicates the position in *leaf_elements* where the descandents of the i-th child of E start. ### Prototype ```c -void t8_dtet_parent (const t8_dtet_t *tet, t8_dtet_t *parent); +void t8_forest_split_array (const t8_element_t *element, const t8_element_array_t *leaf_elements, size_t *offsets); ``` """ -function t8_dtet_parent(tet, parent) - @ccall libt8.t8_dtet_parent(tet::Ptr{t8_dtet_t}, parent::Ptr{t8_dtet_t})::Cvoid +function t8_forest_split_array(element, leaf_elements, offsets) + @ccall libt8.t8_forest_split_array(element::Ptr{t8_element_t}, + leaf_elements::Ptr{t8_element_array_t}, + offsets::Ptr{Csize_t})::Cvoid end """ - t8_dtet_ancestor(tet, level, ancestor) + t8_forest_iterate_faces(forest, ltreeid, element, face, leaf_elements, tree_lindex_of_first_leaf, callback, user_data) -Compute the ancestor of a tetrahedron at a given level. +Iterate over all leaves of an element that touch a given face of the element. Callback is called in each recursive step with element as input. leaf\\_index is only not negative if element is a leaf, in which case it indicates the index of the leaf in the leaves of the tree. If it is negative, it is - (index + 1) Top-down iteration and callback is called on each intermediate level. If it returns false, the current element is not traversed further !!! note - The tetrahedron *ancestor* may point to the same tetrahedron as *tet*. + *tree_lindex_of_first_leaf* is not an index in *leaf_elements*. *leaf_elements* may only be a part of the tree's leaves. # Arguments -* `tet`:\\[in\\] Input tetrahedron. -* `level`:\\[in\\] A smaller level than *tet*. -* `ancestor`:\\[in,out\\] Existing tetrahedron whose data will be filled with the data of *tet*'s ancestor on level *level*. +* `forest`:\\[in\\] A committed forest. +* `ltreeid`:\\[in\\] Local index of the tree containing the *element*. +* `element`:\\[in\\] The considered element. +* `face`:\\[in\\] The integer index of the considered face of *element*. +* `leaf_elements`:\\[in\\] The array of leaf elements that are descendants of *element*. Sorted by linear index. +* `tree_lindex_of_first_leaf`:\\[in\\] Index of the first leaf of *element* in the tree's leaves. The corresponding leaf does not necessarily lie on the face of *element*. +* `callback`:\\[in\\] The callback function. +* `user_data`:\\[in\\] The user data passed to the *callback* function. ### Prototype ```c -void t8_dtet_ancestor (const t8_dtet_t *tet, int level, t8_dtet_t *ancestor); +void t8_forest_iterate_faces (const t8_forest_t forest, const t8_locidx_t ltreeid, const t8_element_t *element, const int face, const t8_element_array_t *const leaf_elements, const t8_locidx_t tree_lindex_of_first_leaf, const t8_forest_iterate_face_fn callback, void *user_data); ``` """ -function t8_dtet_ancestor(tet, level, ancestor) - @ccall libt8.t8_dtet_ancestor(tet::Ptr{t8_dtet_t}, level::Cint, ancestor::Ptr{t8_dtet_t})::Cvoid +function t8_forest_iterate_faces(forest, ltreeid, element, face, leaf_elements, + tree_lindex_of_first_leaf, callback, user_data) + @ccall libt8.t8_forest_iterate_faces(forest::t8_forest_t, ltreeid::t8_locidx_t, + element::Ptr{t8_element_t}, face::Cint, + leaf_elements::Ptr{t8_element_array_t}, + tree_lindex_of_first_leaf::t8_locidx_t, + callback::t8_forest_iterate_face_fn, + user_data::Ptr{Cvoid})::Cvoid end """ - t8_dtet_child(tet, childid, child) + t8_forest_search(forest, search_fn, query_fn, queries) -Compute the childid-th child in Morton order of a tetrahedron t. +Perform a top-down search of the forest, executing a callback on each intermediate element. The search will enter each tree at least once. If the callback returns false for an element, its descendants are not further searched. To pass user data to the search\\_fn function use t8_forest_set_user_data. # Arguments -* `tet`:\\[in\\] Input tetrahedron. -* `childid`:\\[in,out\\] The id of the child, 0..7 in Bey order. -* `child`:\\[out\\] Existing tetrahedron whose data will be filled with the date of t's childid-th child. +* `forest`:\\[in\\] The forest. +* `search_fn`:\\[in\\] The callback function describing the search criterion. +* `query_fn`:\\[in\\] The query function. +* `queries`:\\[in\\] The array of queries. ### Prototype ```c -void t8_dtet_child (const t8_dtet_t *tet, int childid, t8_dtet_t *child); +void t8_forest_search (t8_forest_t forest, t8_forest_search_fn search_fn, t8_forest_query_fn query_fn, sc_array_t *queries); ``` """ -function t8_dtet_child(tet, childid, child) - @ccall libt8.t8_dtet_child(tet::Ptr{t8_dtet_t}, childid::Cint, child::Ptr{t8_dtet_t})::Cvoid +function t8_forest_search(forest, search_fn, query_fn, queries) + @ccall libt8.t8_forest_search(forest::t8_forest_t, search_fn::t8_forest_search_fn, + query_fn::t8_forest_query_fn, + queries::Ptr{sc_array_t})::Cvoid end """ - t8_dtet_childrenpv(tet, c) + t8_forest_iterate_replace(forest_new, forest_old, replace_fn) + +Given two forest where the elements in one forest are either direct children or parents of the elements in the other forest compare the two forests and for each refined element or coarsened family in the old one, call a callback function providing the local indices of the old and new elements. + +!!! note -Compute the 8 children of a tetrahedron, array version. + To pass a user pointer to *replace_fn* use t8_forest_set_user_data and t8_forest_get_user_data. # Arguments -* `tet`:\\[in\\] Input tetrahedron. -* `c`:\\[in,out\\] Pointers to the 8 computed children in Morton order. t may point to the same quadrant as c[0]. +* `forest_new`:\\[in\\] A forest, each element is a parent or child of an element in *forest_old*. +* `forest_old`:\\[in\\] The initial forest. +* `replace_fn`:\\[in\\] A replace callback function. ### Prototype ```c -void t8_dtet_childrenpv (const t8_dtet_t *tet, t8_dtet_t *c[T8_DTET_CHILDREN]); +void t8_forest_iterate_replace (t8_forest_t forest_new, t8_forest_t forest_old, t8_forest_replace_t replace_fn); ``` """ -function t8_dtet_childrenpv(tet, c) - @ccall libt8.t8_dtet_childrenpv(tet::Ptr{t8_dtet_t}, c::Ptr{Ptr{t8_dtet_t}})::Cvoid +function t8_forest_iterate_replace(forest_new, forest_old, replace_fn) + @ccall libt8.t8_forest_iterate_replace(forest_new::t8_forest_t, forest_old::t8_forest_t, + replace_fn::t8_forest_replace_t)::Cvoid end """ - t8_dtet_is_familypv(f) + t8_forest_search_partition(forest, search_fn, query_fn, queries) -Check whether a collection of eight tetrahedra is a family in Morton order. +Perform a top-down search of the global partition, executing a callback on each intermediate element. The search will enter each tree at least once. The recursion will only go down branches that are split between multiple processors. This is not a collective function. It does not communicate. The function expects the coarse mesh to be replicated. If the callback returns false for an element, its descendants are not further searched. To pass user data to **search_fn** function use t8_forest_set_user_data # Arguments -* `f`:\\[in\\] An array of eight tetrahedra. -# Returns -Nonzero if *f* is a family of tetrahedra. +* `forest`:\\[in\\] the forest to be searched +* `search_fn`:\\[in\\] a search callback function called on elements +* `query_fn`:\\[in\\] a query callback function called for all active queries of an element +* `queries`:\\[in,out\\] an array of queries that are checked by the function ### Prototype ```c -int t8_dtet_is_familypv (const t8_dtet_t *f[]); +void t8_forest_search_partition (const t8_forest_t forest, t8_forest_partition_search_fn search_fn, t8_forest_partition_query_fn query_fn, sc_array_t *queries); ``` """ -function t8_dtet_is_familypv(f) - @ccall libt8.t8_dtet_is_familypv(f::Ptr{Ptr{t8_dtet_t}})::Cint +function t8_forest_search_partition(forest, search_fn, query_fn, queries) + @ccall libt8.t8_forest_search_partition(forest::t8_forest_t, + search_fn::t8_forest_partition_search_fn, + query_fn::t8_forest_partition_query_fn, + queries::Ptr{sc_array_t})::Cvoid end """ - t8_dtet_sibling(tet, sibid, sibling) + t8_forest_partition(forest) -Compute a specific sibling of a tetrahedron. +Populate a forest with the partitioned elements of forest->set\\_from. # Arguments -* `tet`:\\[in\\] Input tetrahedron. -* `sibling`:\\[in,out\\] Existing tetrahedron whose data will be filled with the data of sibling no. sibling\\_id of *tet*. -* `sibid`:\\[in\\] The id of the sibling computed, 0..7 in Bey order. +* `forest`:\\[in,out\\] The forest. ### Prototype ```c -void t8_dtet_sibling (const t8_dtet_t *tet, int sibid, t8_dtet_t *sibling); +void t8_forest_partition (t8_forest_t forest); ``` """ -function t8_dtet_sibling(tet, sibid, sibling) - @ccall libt8.t8_dtet_sibling(tet::Ptr{t8_dtet_t}, sibid::Cint, sibling::Ptr{t8_dtet_t})::Cvoid +function t8_forest_partition(forest) + @ccall libt8.t8_forest_partition(forest::t8_forest_t)::Cvoid end """ - t8_dtet_face_neighbour(tet, face, neigh) - -Compute the face neighbor of a tetrahedron. + t8_forest_new_gather(forest_from, gather_rank) -!!! note +Create a new forest that gathers a given forest on one process. - *tet* may point to the same tetrahedron as *neigh*. +This functionality is mostly required for comparison purposes and sanity checks within the testing framework. # Arguments -* `tet`:\\[in\\] Input tetrahedron. -* `face`:\\[in\\] The face across which to generate the neighbor. -* `neigh`:\\[in,out\\] Existing tetrahedron whose data will be filled. +* `forest_from`:\\[in\\] the forest that should be gathered on one rank +* `gather_rank`:\\[in\\] the rank of the process the forest will be gathered on +# Returns +The gathered forest: The same as *forest_from*, but all elements are on rank *gather_rank*. ### Prototype ```c -int t8_dtet_face_neighbour (const t8_dtet_t *tet, int face, t8_dtet_t *neigh); +t8_forest_t t8_forest_new_gather (const t8_forest_t forest_from, const int gather_rank); ``` """ -function t8_dtet_face_neighbour(tet, face, neigh) - @ccall libt8.t8_dtet_face_neighbour(tet::Ptr{t8_dtet_t}, face::Cint, neigh::Ptr{t8_dtet_t})::Cint +function t8_forest_new_gather(forest_from, gather_rank) + @ccall libt8.t8_forest_new_gather(forest_from::t8_forest_t, + gather_rank::Cint)::t8_forest_t end """ - t8_dtet_nearest_common_ancestor(tet1, tet2, nca) - -Computes the nearest common ancestor of two tetrahedra in the same tree. + t8_forest_set_partition_offset(forest, first_global_element) -!!! note +Manually set the partition offset of the current process. - *tet1*, *tet2*, *nca* may point to the same tetrahedron. +If set, the next partitioning of the forest will use the manually defined element offsets. # Arguments -* `tet1`:\\[in\\] First input tetrahedron. -* `tet2`:\\[in\\] Second input tetrahedron. -* `nca`:\\[in,out\\] Existing tetrahedron whose data will be filled. +* `forest`:\\[in,out\\] the considered forest +* `first_global_element`:\\[in\\] the global ID that will become the first local element ### Prototype ```c -void t8_dtet_nearest_common_ancestor (const t8_dtet_t *tet1, const t8_dtet_t *tet2, t8_dtet_t *nca); +void t8_forest_set_partition_offset (t8_forest_t forest, const t8_gloidx_t first_global_element); ``` """ -function t8_dtet_nearest_common_ancestor(tet1, tet2, nca) - @ccall libt8.t8_dtet_nearest_common_ancestor(tet1::Ptr{t8_dtet_t}, tet2::Ptr{t8_dtet_t}, nca::Ptr{t8_dtet_t})::Cvoid +function t8_forest_set_partition_offset(forest, first_global_element) + @ccall libt8.t8_forest_set_partition_offset(forest::t8_forest_t, + first_global_element::t8_gloidx_t)::Cvoid end """ - t8_dtet_children_at_face(tet, face, children, num_children, child_indices) + t8_forest_partition_create_offsets(forest) -Given a tetrahedron and a face of the tetrahedron, compute all children of the tetrahedron that touch the face. +Create the element\\_offset array of a partitioned forest. # Arguments -* `tet`:\\[in\\] The tetrahedron. -* `face`:\\[in\\] A face of *tet*. -* `children`:\\[in,out\\] Allocated tetrahedra, in which the children of *tet* that share a face with *face* are stored. They will be stored in order of their child\\_id. -* `num_children`:\\[in\\] The number of tetrahedra in *children*. Must match the number of children that touch *face*. -* `child_indices`:\\[in,out\\] The indices of the children in *children*. Only filled if this is null previously. +* `forest`:\\[in,out\\] The forest. *forest* must be committed before calling this function. ### Prototype ```c -void t8_dtet_children_at_face (const t8_dtet_t *tet, int face, t8_dtet_t *children[], int num_children, int *child_indices); +void t8_forest_partition_create_offsets (t8_forest_t forest); ``` """ -function t8_dtet_children_at_face(tet, face, children, num_children, child_indices) - @ccall libt8.t8_dtet_children_at_face(tet::Ptr{t8_dtet_t}, face::Cint, children::Ptr{Ptr{t8_dtet_t}}, num_children::Cint, child_indices::Ptr{Cint})::Cvoid +function t8_forest_partition_create_offsets(forest) + @ccall libt8.t8_forest_partition_create_offsets(forest::t8_forest_t)::Cvoid end """ - t8_dtet_face_child_face(tet, face, face_child) + t8_forest_partition_next_nonempty_rank(forest, rank) -Given a face of an tetrahedron and a child number of a child of that face, return the face number of the child of the tetrahedron that matches the child face. +If t8_forest_partition_create_offsets was already called, compute for a given rank the next greater rank that is not empty. # Arguments -* `tet`:\\[in\\] The tetrahedron. -* `face`:\\[in\\] Then number of the face. -* `face_child`:\\[in\\] The child number of a child of the face tetrahedron. +* `forest`:\\[in\\] The forest. +* `rank`:\\[in\\] An MPI rank. # Returns -The face number of the face of a child of *tetrahedron* that coincides with *face_child*. +A rank q > *rank* such that the forest has elements on *q*. If such a *q* does not exist, returns mpisize. ### Prototype ```c -int t8_dtet_face_child_face (const t8_dtet_t *tet, int face, int face_child); +int t8_forest_partition_next_nonempty_rank (t8_forest_t forest, int rank); ``` """ -function t8_dtet_face_child_face(tet, face, face_child) - @ccall libt8.t8_dtet_face_child_face(tet::Ptr{t8_dtet_t}, face::Cint, face_child::Cint)::Cint +function t8_forest_partition_next_nonempty_rank(forest, rank) + @ccall libt8.t8_forest_partition_next_nonempty_rank(forest::t8_forest_t, + rank::Cint)::Cint end """ - t8_dtet_face_parent_face(tet, face) + t8_forest_partition_create_first_desc(forest) -Given a face of an tet return the face number of the parent of the tet that matches the tet's face. Or return -1 if no face of the parent matches the face. +Create the array of global\\_first\\_descendant ids of a partitioned forest. # Arguments -* `tet`:\\[in\\] The tet. -* `face`:\\[in\\] Then number of the face. -# Returns -If *face* of *tet* is also a face of *tet*'s parent, the face number of this face. Otherwise -1. +* `forest`:\\[in,out\\] The forest. *forest* must be committed before calling this function. ### Prototype ```c -int t8_dtet_face_parent_face (const t8_dtet_t *tet, int face); +void t8_forest_partition_create_first_desc (t8_forest_t forest); ``` """ -function t8_dtet_face_parent_face(tet, face) - @ccall libt8.t8_dtet_face_parent_face(tet::Ptr{t8_dtet_t}, face::Cint)::Cint +function t8_forest_partition_create_first_desc(forest) + @ccall libt8.t8_forest_partition_create_first_desc(forest::t8_forest_t)::Cvoid end """ - t8_dtet_tree_face(tet, face) - -Given a tetrahedron and a face of this tetrahedron. If the face lies on the tree boundary, return the face number of the tree face. If not the return value is arbitrary. - -!!! note + t8_forest_partition_create_tree_offsets(forest) - For boundary tetrahedra, this function is the inverse of t8_dtet_root_face_to_face. +Create the array tree offsets of a partitioned forest. This arrays stores at position p the global id of the first tree of this process. Or if this tree is shared, it stores -(global\\_id) - 1. # Arguments -* `tet`:\\[in\\] The tetrahedron. -* `face`:\\[in\\] The index of a face of *tet*. -# Returns -The index of the tree face that *face* is a subface of, if *face* is on a tree boundary. Any arbitrary integer if *face* is not at a tree boundary. +* `forest`:\\[in,out\\] The forest. *forest* must be committed before calling this function. ### Prototype ```c -int t8_dtet_tree_face (t8_dtet_t *tet, int face); +void t8_forest_partition_create_tree_offsets (t8_forest_t forest); ``` """ -function t8_dtet_tree_face(tet, face) - @ccall libt8.t8_dtet_tree_face(tet::Ptr{t8_dtet_t}, face::Cint)::Cint +function t8_forest_partition_create_tree_offsets(forest) + @ccall libt8.t8_forest_partition_create_tree_offsets(forest::t8_forest_t)::Cvoid end """ - t8_dtet_root_face_to_face(tet, root_face) + t8_forest_partition_data(forest_from, forest_to, data_in, data_out) -Given a tetrahedron and a face of the root tetrahedron. If the tetrahedron lies on the tree boundary, return the corresponding face number of the tetrahedron. If not the return value is arbitrary. +Re-Partition an array accordingly to a partitioned forest. !!! note - For boundary tetrahedra, this function is the inverse of t8_dtet_tree_face. + *data_in* has to be of size equal to the number of local elements of *forest_from* *data_out* has to be already allocated and has to be of size equal to the number of local elements of *forest_to*. # Arguments -* `tet`:\\[in\\] The tetrahedron. -* `root_face`:\\[in\\] The index of a face of the root tetrahedron. -# Returns -The index of the face of *tet* that is a subface of *root_face*, if *tet* is on the tree boundary. Any arbitrary integer if *tet* is not at a tree boundary. +* `forest_from`:\\[in\\] The forest before the partitioning step. +* `forest_to`:\\[in\\] The partitioned forest of *forest_from*. +* `data_in`:\\[in\\] A pointer to an [`sc_array_t`](@ref) holding data (one value per element) accordingly to *forest_from*. +* `data_out`:\\[in,out\\] A pointer to an already allocated [`sc_array_t`](@ref) capable of holding data accordingly to *forest_to*. ### Prototype ```c -int t8_dtet_root_face_to_face (t8_dtet_t *tet, int root_face); +void t8_forest_partition_data (t8_forest_t forest_from, t8_forest_t forest_to, const sc_array_t *data_in, sc_array_t *data_out); ``` """ -function t8_dtet_root_face_to_face(tet, root_face) - @ccall libt8.t8_dtet_root_face_to_face(tet::Ptr{t8_dtet_t}, root_face::Cint)::Cint +function t8_forest_partition_data(forest_from, forest_to, data_in, data_out) + @ccall libt8.t8_forest_partition_data(forest_from::t8_forest_t, forest_to::t8_forest_t, + data_in::Ptr{sc_array_t}, + data_out::Ptr{sc_array_t})::Cvoid end """ - t8_dtet_is_inside_root(tet) - -Test if a tetrahedron lies inside of the root tetrahedron, that is the tetrahedron of level 0, anchor node (0,0,0) and type 0. + t8_forest_partition_test_boundary_element(forest) -# Arguments -* `tet`:\\[in\\] Input tetrahedron. -# Returns -true If *tet* lies inside of the root tetrahedron. -### Prototype -```c -int t8_dtet_is_inside_root (t8_dtet_t *tet); -``` -""" -function t8_dtet_is_inside_root(tet) - @ccall libt8.t8_dtet_is_inside_root(tet::Ptr{t8_dtet_t})::Cint -end +Test if the last descendant of the last element of current rank has a smaller linear id than the stored first descendant of rank+1. If this is not the case, elements overlap. -""" - t8_dtet_is_root_boundary(tet, face) +!!! note -Compute whether a given tetrahedron shares a given face with its root tree. + *forest* must be committed before calling this function. # Arguments -* `tet`:\\[in\\] The input tet. -* `face`:\\[in\\] A face of *tet*. -# Returns -True if *face* is a subface of the tet's root element. +* `forest`:\\[in\\] The forest. ### Prototype ```c -int t8_dtet_is_root_boundary (const t8_dtet_t *tet, int face); +void t8_forest_partition_test_boundary_element (const t8_forest_t forest); ``` """ -function t8_dtet_is_root_boundary(tet, face) - @ccall libt8.t8_dtet_is_root_boundary(tet::Ptr{t8_dtet_t}, face::Cint)::Cint +function t8_forest_partition_test_boundary_element(forest) + @ccall libt8.t8_forest_partition_test_boundary_element(forest::t8_forest_t)::Cvoid end """ - t8_dtet_is_equal(tet1, tet2) + t8_forest_pfc_correction_offsets(forest) -Test if two tetrahedra have the same coordinates, type and level. +Correct the partitioning if element families are split across process boundaries. -# Returns -true if *tet1* describes the same tetrahedron as *tet2*. +The default partitioning distributes the elements into equally-sized partitions. For coarsening, however, all elements of a family have to be on the same process in order to be coarsened into their parent element. This function corrects the partitioning such that no families are split across process boundaries. The price to be paid is a slight deviation from the optimal balance of elements among processors. + +# Arguments +* `forest`:\\[in,out\\] the forest. On input, it has been partitioned into equally-sized element partitions. On output, the partitioning has been adjusted such that no element families are split across the process boundaries. ### Prototype ```c -int t8_dtet_is_equal (const t8_dtet_t *tet1, const t8_dtet_t *tet2); +void t8_forest_pfc_correction_offsets (t8_forest_t forest); ``` """ -function t8_dtet_is_equal(tet1, tet2) - @ccall libt8.t8_dtet_is_equal(tet1::Ptr{t8_dtet_t}, tet2::Ptr{t8_dtet_t})::Cint +function t8_forest_pfc_correction_offsets(forest) + @ccall libt8.t8_forest_pfc_correction_offsets(forest::t8_forest_t)::Cvoid end +# typedef int ( * t8_search_element_callback_c_wrapper ) ( t8_forest_t forest , const t8_locidx_t ltreeid , const t8_element_t * element , const int is_leaf , const t8_element_array_t * leaf_elements , const t8_locidx_t tree_leaf_index , void * user_data ) """ - t8_dtet_is_sibling(tet1, tet2) - -Test if two tetrahedra are siblings. +A call-back function used by t8_forest_init_search for searching elements. Is called on an element and the search criterion should be checked on that element. Return true if the search criterion is met, false otherwise. # Arguments -* `tet1`:\\[in\\] First tetrahedron to be tested. -* `tet2`:\\[in\\] Second tetrahedron to be tested. +* `forest`:\\[in\\] the forest +* `ltreeid`:\\[in\\] the local tree id of the current tree in the cmesh. +* `element`:\\[in\\] the element for which the search criterion is checked +* `is_leaf`:\\[in\\] true if and only if *element* is a leaf element +* `leaf_elements`:\\[in\\] the leaf elements in *forest* +* `tree_leaf_index`:\\[in\\] the local index of the first leaf in *leaf_elements* +* `user_data`:\\[in\\] a user data pointer that can be set by the user # Returns -true if *tet1* is equal to or a sibling of *tet2*. -### Prototype -```c -int t8_dtet_is_sibling (const t8_dtet_t *tet1, const t8_dtet_t *tet2); -``` +non-zero if the search criterion is met, zero otherwise. """ -function t8_dtet_is_sibling(tet1, tet2) - @ccall libt8.t8_dtet_is_sibling(tet1::Ptr{t8_dtet_t}, tet2::Ptr{t8_dtet_t})::Cint -end +const t8_search_element_callback_c_wrapper = Ptr{Cvoid} +# typedef int ( * t8_search_queries_callback_c_wrapper ) ( t8_forest_t forest , const t8_locidx_t ltreeid , const t8_element_t * element , const int is_leaf , const t8_element_array_t * leaf_elements , const t8_locidx_t tree_leaf_index , void * queries , void * user_data ) """ - t8_dtet_is_parent(tet, child) - -Test if a tetrahedron is the parent of another tetrahedron. +A call-back function used by t8_forest_init_search_with_queries for searching elements and executing queries. Is called on an element and all queries are checked on that element. All positive queries are passed further down to the children of the element up to leaf elements of the tree. The results of the check are stored in *query_matches*. # Arguments -* `tet`:\\[in\\] tetrahedron to be tested. -* `child`:\\[in\\] Possible child tetrahedron. -# Returns -true if *tet* is the parent of *child*. -### Prototype -```c -int t8_dtet_is_parent (const t8_dtet_t *tet, const t8_dtet_t *child); -``` +* `forest`:\\[in\\] the forest +* `ltreeid`:\\[in\\] the local tree id of the current tree in the cmesh. +* `element`:\\[in\\] the element for which the search criterion is checked +* `is_leaf`:\\[in\\] true if and only if *element* is a leaf element +* `leaf_elements`:\\[in\\] the leaf elements in *forest* +* `tree_leaf_index`:\\[in\\] the local index of the first leaf in *leaf_elements* +* `queries`:\\[in\\] a pointer to an array of queries +* `user_data`:\\[in\\] a user data pointer that can be set by the user """ -function t8_dtet_is_parent(tet, child) - @ccall libt8.t8_dtet_is_parent(tet::Ptr{t8_dtet_t}, child::Ptr{t8_dtet_t})::Cint -end +const t8_search_queries_callback_c_wrapper = Ptr{Cvoid} +# typedef void ( * t8_search_batched_queries_callback_c_wrapper ) ( t8_forest_t forest , const t8_locidx_t ltreeid , const t8_element_t * element , const int is_leaf , const t8_element_array_t * leaf_elements , const t8_locidx_t tree_leaf_index , const void * queries , const size_t * active_query_indices , int * query_matches , void * user_data ) """ - t8_dtet_is_ancestor(tet, c) - -Test if a tetrahedron is an ancestor of another tetrahedron. +A call-back function used by t8_forest_init_search_with_batched_queries for searching elements and executing batched queries. Is called on an element and all queries are checked on that element. All positive queries are passed further down to the children of the element up to leaf elements of the tree. The results of the check are stored in *query_matches*. # Arguments -* `tet`:\\[in\\] tetrahedron to be tested. -* `c`:\\[in\\] Descendent tetrahedron. -# Returns -true if *tet* is equal to or an ancestor of *c*. -### Prototype -```c -int t8_dtet_is_ancestor (const t8_dtet_t *tet, const t8_dtet_t *c); -``` -""" -function t8_dtet_is_ancestor(tet, c) - @ccall libt8.t8_dtet_is_ancestor(tet::Ptr{t8_dtet_t}, c::Ptr{t8_dtet_t})::Cint -end - +* `forest`:\\[in\\] the forest +* `ltreeid`:\\[in\\] the local tree id of the current tree in the cmesh. +* `element`:\\[in\\] the element for which the search criterion is checked +* `is_leaf`:\\[in\\] true if and only if *element* is a leaf element +* `leaf_elements`:\\[in\\] the leaf elements in *forest* +* `tree_leaf_index`:\\[in\\] the local index of the first leaf in *leaf_elements* +* `queries`:\\[in\\] a pointer to an array of queries +* `active_query_indices`:\\[in\\] a pointer to an array of indices of active queries in *queries* +* `query_matches`:\\[in,out\\] a pointer to an array of length *num_active_queries*. If query\\_matches[i] is true, then the element 'matches' the query of the active query with index active\\_query\\_indices[i]. +* `user_data`:\\[in\\] a user data pointer that can be set by the user """ - t8_dtet_linear_id(tet, level) +const t8_search_batched_queries_callback_c_wrapper = Ptr{Cvoid} -Computes the linear position of a tetrahedron in a uniform grid. +mutable struct t8_forest_c_search end -!!! note +"""A wrapper around the forest search context""" +const t8_forest_search_c_wrapper = Ptr{t8_forest_c_search} - This id is not the Morton index. +""" + t8_forest_init_search(search, element_callback, forest) -# Arguments -* `tet`:\\[in\\] tetrahedron whose id will be computed. -* `level`:\\[in\\] level of uniform grid to be considered. -# Returns -Returns the linear position of this tetrahedron on a grid of level *level*. ### Prototype ```c -t8_linearidx_t t8_dtet_linear_id (const t8_dtet_t *tet, int level); +void t8_forest_init_search (t8_forest_search_c_wrapper search, t8_search_element_callback_c_wrapper element_callback, const t8_forest_t forest); ``` """ -function t8_dtet_linear_id(tet, level) - @ccall libt8.t8_dtet_linear_id(tet::Ptr{t8_dtet_t}, level::Cint)::t8_linearidx_t +function t8_forest_init_search(search, element_callback, forest) + @ccall libt8.t8_forest_init_search(search::t8_forest_search_c_wrapper, + element_callback::t8_search_element_callback_c_wrapper, + forest::t8_forest_t)::Cvoid end """ - t8_dtet_init_linear_id_with_level(tet, id, start_level, end_level, parenttype) - -Same as init\\_linear\\_id, but we only consider the subtree. Used for computing the index of a tetrahedron lying in a pyramid + t8_forest_search_update_forest(search, forest) -# Arguments -* `tet`:\\[in,out\\] Existing tet whose data will be filled -* `id`: Index to be considered -* `start_level`: The level of the root of the subtree -* `end_level`: Level of uniform grid to be considered -* `parenttype`: The type of the parent. ### Prototype ```c -void t8_dtet_init_linear_id_with_level (t8_dtet_t *tet, t8_linearidx_t id, int start_level, int end_level, t8_dtet_type_t parenttype); +void t8_forest_search_update_forest (t8_forest_search_c_wrapper search, const t8_forest_t forest); ``` """ -function t8_dtet_init_linear_id_with_level(tet, id, start_level, end_level, parenttype) - @ccall libt8.t8_dtet_init_linear_id_with_level(tet::Ptr{t8_dtet_t}, id::t8_linearidx_t, start_level::Cint, end_level::Cint, parenttype::t8_dtet_type_t)::Cvoid +function t8_forest_search_update_forest(search, forest) + @ccall libt8.t8_forest_search_update_forest(search::t8_forest_search_c_wrapper, + forest::t8_forest_t)::Cvoid end """ - t8_dtet_init_linear_id(tet, id, level) + t8_forest_search_update_user_data(search, udata) -Initialize a tetrahedron as the tetrahedron with a given global id in a uniform refinement of a given level. +Update the user data pointer in the search context # Arguments -* `tet`:\\[in,out\\] Existing tetrahedron whose data will be filled. -* `id`:\\[in\\] Index to be considered. -* `level`:\\[in\\] level of uniform grid to be considered. +* `search`:\\[in,out\\] the search context to update +* `udata`:\\[in\\] the new user data pointer to use ### Prototype ```c -void t8_dtet_init_linear_id (t8_dtet_t *tet, t8_linearidx_t id, int level); +void t8_forest_search_update_user_data (t8_forest_search_c_wrapper search, void *udata); ``` """ -function t8_dtet_init_linear_id(tet, id, level) - @ccall libt8.t8_dtet_init_linear_id(tet::Ptr{t8_dtet_t}, id::t8_linearidx_t, level::Cint)::Cvoid +function t8_forest_search_update_user_data(search, udata) + @ccall libt8.t8_forest_search_update_user_data(search::t8_forest_search_c_wrapper, + udata::Ptr{Cvoid})::Cvoid end """ - t8_dtet_init_root(tet) + t8_forest_search_do_search(search) -Initialize a tetrahedron as the root tetrahedron (type 0 at level 0) +Perform the search # Arguments -* `tet`:\\[in,out\\] Existing tetrahedron whose data will be filled. +* `search`:\\[in,out\\] the search context to use ### Prototype ```c -void t8_dtet_init_root (t8_dtet_t *tet); +void t8_forest_search_do_search (t8_forest_search_c_wrapper search); ``` """ -function t8_dtet_init_root(tet) - @ccall libt8.t8_dtet_init_root(tet::Ptr{t8_dtet_t})::Cvoid +function t8_forest_search_do_search(search) + @ccall libt8.t8_forest_search_do_search(search::t8_forest_search_c_wrapper)::Cvoid end """ - t8_dtet_successor(tet, succ, level) + t8_forest_search_destroy(search) -Computes the successor of a tetrahedron in a uniform grid of level *level*. +Destroy the search context # Arguments -* `tet`:\\[in\\] tetrahedron whose id will be computed. -* `succ`:\\[out\\] Existing tetrahedron whose data will be filled with the data of t's successor on level *level*. -* `level`:\\[in\\] level of uniform grid to be considered. +* `search`:\\[in,out\\] the search context to destroy ### Prototype ```c -void t8_dtet_successor (const t8_dtet_t *tet, t8_dtet_t *succ, int level); +void t8_forest_search_destroy (t8_forest_search_c_wrapper search); ``` """ -function t8_dtet_successor(tet, succ, level) - @ccall libt8.t8_dtet_successor(tet::Ptr{t8_dtet_t}, succ::Ptr{t8_dtet_t}, level::Cint)::Cvoid +function t8_forest_search_destroy(search) + @ccall libt8.t8_forest_search_destroy(search::t8_forest_search_c_wrapper)::Cvoid end -""" - t8_dtet_first_descendant(tet, s, level) +mutable struct t8_forest_search_with_queries end -Compute the first descendant of a tetrahedron at a given level. This is the descendant of the tetrahedron in a uniform maxlevel refinement that has the smaller id. +"""A wrapper around the forest search with queries context""" +const t8_forest_search_with_queries_c_wrapper = Ptr{t8_forest_search_with_queries} + +""" + t8_forest_init_search_with_queries(search_with_queries, element_callback, queries_callback, queries, num_queries, forest) -# Arguments -* `tet`:\\[in\\] tetrahedron whose descendant is computed. -* `level`:\\[in\\] A given level. Must be greater or equal to *tet*'s level. -* `s`:\\[out\\] Existing tetrahedron whose data will be filled with the data of t's first descendant. ### Prototype ```c -void t8_dtet_first_descendant (const t8_dtet_t *tet, t8_dtet_t *s, int level); +void t8_forest_init_search_with_queries (t8_forest_search_with_queries_c_wrapper search_with_queries, t8_search_element_callback_c_wrapper element_callback, t8_search_queries_callback_c_wrapper queries_callback, void **queries, const size_t num_queries, const t8_forest_t forest); ``` """ -function t8_dtet_first_descendant(tet, s, level) - @ccall libt8.t8_dtet_first_descendant(tet::Ptr{t8_dtet_t}, s::Ptr{t8_dtet_t}, level::Cint)::Cvoid +function t8_forest_init_search_with_queries(search_with_queries, element_callback, + queries_callback, queries, num_queries, forest) + @ccall libt8.t8_forest_init_search_with_queries(search_with_queries::t8_forest_search_with_queries_c_wrapper, + element_callback::t8_search_element_callback_c_wrapper, + queries_callback::t8_search_queries_callback_c_wrapper, + queries::Ptr{Ptr{Cvoid}}, + num_queries::Csize_t, + forest::t8_forest_t)::Cvoid end """ - t8_dtet_last_descendant(tet, s, level) - -Compute the last descendant of a tetrahedron at a given level. This is the descendant of the tetrahedron in a uniform maxlevel refinement that has the biggest id. + t8_forest_search_with_queries_update_forest(search_with_queries, forest) -# Arguments -* `tet`:\\[in\\] tetrahedron whose descendant is computed. -* `level`:\\[in\\] A given level. Must be greater or equal to *tet*'s level. -* `s`:\\[out\\] Existing tetrahedron whose data will be filled with the data of t's last descendant. ### Prototype ```c -void t8_dtet_last_descendant (const t8_dtet_t *tet, t8_dtet_t *s, int level); +void t8_forest_search_with_queries_update_forest (t8_forest_search_with_queries_c_wrapper search_with_queries, const t8_forest_t forest); ``` """ -function t8_dtet_last_descendant(tet, s, level) - @ccall libt8.t8_dtet_last_descendant(tet::Ptr{t8_dtet_t}, s::Ptr{t8_dtet_t}, level::Cint)::Cvoid +function t8_forest_search_with_queries_update_forest(search_with_queries, forest) + @ccall libt8.t8_forest_search_with_queries_update_forest(search_with_queries::t8_forest_search_with_queries_c_wrapper, + forest::t8_forest_t)::Cvoid end """ - t8_dtet_corner_descendant(tet, s, corner, level) + t8_forest_search_with_queries_update_user_data(search_with_queries, udata) -Compute the descendant of a tetrahedron in a given corner. +Update the user data pointer in the search with queries context # Arguments -* `tet`:\\[in\\] Tetrahedron whose descendant is computed. -* `s`:\\[out\\] Existing tetrahedron whose data will be filled with the data of t's descendant in *corner*. -* `corner`:\\[in\\] The corner in which the descendant should lie. -* `level`:\\[in\\] The refinement level of the descendant. Must be greater or equal to *tet*'s level. +* `search_with_queries`:\\[in,out\\] the search with queries context to update +* `udata`:\\[in\\] the new user data pointer to use ### Prototype ```c -void t8_dtet_corner_descendant (const t8_dtet_t *tet, t8_dtet_t *s, int corner, int level); +void t8_forest_search_with_queries_update_user_data (t8_forest_search_with_queries_c_wrapper search_with_queries, void *udata); ``` """ -function t8_dtet_corner_descendant(tet, s, corner, level) - @ccall libt8.t8_dtet_corner_descendant(tet::Ptr{t8_dtet_t}, s::Ptr{t8_dtet_t}, corner::Cint, level::Cint)::Cvoid +function t8_forest_search_with_queries_update_user_data(search_with_queries, udata) + @ccall libt8.t8_forest_search_with_queries_update_user_data(search_with_queries::t8_forest_search_with_queries_c_wrapper, + udata::Ptr{Cvoid})::Cvoid end """ - t8_dtet_predecessor(tet, s, level) + t8_forest_search_with_queries_update_queries(search_with_queries, queries, num_queries) -Computes the predecessor of a tetrahedron in a uniform grid of level *level*. +Update the queries in the search with queries context # Arguments -* `tet`:\\[in\\] tetrahedron whose id will be computed. -* `s`:\\[in,out\\] Existing tetrahedron whose data will be filled with the data of t's predecessor on level *level*. -* `level`:\\[in\\] level of uniform grid to be considered. +* `search_with_queries`:\\[in,out\\] the search with queries context to update +* `queries`:\\[in\\] a pointer to an array of queries +* `num_queries`:\\[in\\] the number of queries in the array ### Prototype ```c -void t8_dtet_predecessor (const t8_dtet_t *tet, t8_dtet_t *s, int level); +void t8_forest_search_with_queries_update_queries (t8_forest_search_with_queries_c_wrapper search_with_queries, void **queries, const size_t num_queries); ``` """ -function t8_dtet_predecessor(tet, s, level) - @ccall libt8.t8_dtet_predecessor(tet::Ptr{t8_dtet_t}, s::Ptr{t8_dtet_t}, level::Cint)::Cvoid +function t8_forest_search_with_queries_update_queries(search_with_queries, queries, + num_queries) + @ccall libt8.t8_forest_search_with_queries_update_queries(search_with_queries::t8_forest_search_with_queries_c_wrapper, + queries::Ptr{Ptr{Cvoid}}, + num_queries::Csize_t)::Cvoid end """ - t8_dtet_ancestor_id(tet, level) + t8_forest_search_with_queries_destroy(search) -Compute the position of the ancestor of this child at level *level* within its siblings. +Destroy the search with queries context # Arguments -* `tet`:\\[in\\] tetrahedron to be considered. -* `level`:\\[in\\] level to be considered. -# Returns -Returns its child id in 0..7 +* `search`:\\[in,out\\] the search with queries context to destroy ### Prototype ```c -int t8_dtet_ancestor_id (const t8_dtet_t *tet, int level); +void t8_forest_search_with_queries_destroy (t8_forest_search_with_queries_c_wrapper search); ``` """ -function t8_dtet_ancestor_id(tet, level) - @ccall libt8.t8_dtet_ancestor_id(tet::Ptr{t8_dtet_t}, level::Cint)::Cint +function t8_forest_search_with_queries_destroy(search) + @ccall libt8.t8_forest_search_with_queries_destroy(search::t8_forest_search_with_queries_c_wrapper)::Cvoid end """ - t8_dtet_child_id(tet) + t8_forest_search_with_queries_do_search(search) -Compute the position of the ancestor of this child at level *level* within its siblings. +Perform the search with queries # Arguments -* `tet`:\\[in\\] tetrahedron to be considered. -# Returns -Returns its child id in 0..7 +* `search`:\\[in,out\\] the search with queries context to use ### Prototype ```c -int t8_dtet_child_id (const t8_dtet_t *tet); +void t8_forest_search_with_queries_do_search (t8_forest_search_with_queries_c_wrapper search); ``` """ -function t8_dtet_child_id(tet) - @ccall libt8.t8_dtet_child_id(tet::Ptr{t8_dtet_t})::Cint +function t8_forest_search_with_queries_do_search(search) + @ccall libt8.t8_forest_search_with_queries_do_search(search::t8_forest_search_with_queries_c_wrapper)::Cvoid end -""" - t8_dtet_get_level(tet) +mutable struct t8_forest_search_with_batched_queries end -Return the level of a tetrahedron. +"""A wrapper around the forest search with batched queries context""" +const t8_forest_search_with_batched_queries_c_wrapper = Ptr{t8_forest_search_with_batched_queries} + +""" + t8_forest_init_search_with_batched_queries(search_with_queries, element_callback, queries_callback, queries, num_queries, forest) -# Arguments -* `tet`:\\[in\\] tetrahedron to be considered. -# Returns -The level of *tet*. ### Prototype ```c -int t8_dtet_get_level (const t8_dtet_t *tet); +void t8_forest_init_search_with_batched_queries (t8_forest_search_with_batched_queries_c_wrapper search_with_queries, t8_search_element_callback_c_wrapper element_callback, t8_search_batched_queries_callback_c_wrapper queries_callback, void **queries, const size_t num_queries, const t8_forest_t forest); ``` """ -function t8_dtet_get_level(tet) - @ccall libt8.t8_dtet_get_level(tet::Ptr{t8_dtet_t})::Cint +function t8_forest_init_search_with_batched_queries(search_with_queries, element_callback, + queries_callback, queries, num_queries, + forest) + @ccall libt8.t8_forest_init_search_with_batched_queries(search_with_queries::t8_forest_search_with_batched_queries_c_wrapper, + element_callback::t8_search_element_callback_c_wrapper, + queries_callback::t8_search_batched_queries_callback_c_wrapper, + queries::Ptr{Ptr{Cvoid}}, + num_queries::Csize_t, + forest::t8_forest_t)::Cvoid end """ - t8_dtet_is_valid(tet) - -Query whether all entries of a tet are in valid ranges. + t8_forest_search_with_batched_queries_update_forest(search_with_queries, forest) -# Arguments -* `tet`:\\[in\\] tet to be considered. -# Returns -True, if *tet* is a valid tet and it is safe to call any function on *tet*. False otherwise. ### Prototype ```c -int t8_dtet_is_valid (const t8_dtet_t *tet); +void t8_forest_search_with_batched_queries_update_forest ( t8_forest_search_with_batched_queries_c_wrapper search_with_queries, const t8_forest_t forest); ``` """ -function t8_dtet_is_valid(tet) - @ccall libt8.t8_dtet_is_valid(tet::Ptr{t8_dtet_t})::Cint +function t8_forest_search_with_batched_queries_update_forest(search_with_queries, forest) + @ccall libt8.t8_forest_search_with_batched_queries_update_forest(search_with_queries::t8_forest_search_with_batched_queries_c_wrapper, + forest::t8_forest_t)::Cvoid end """ - t8_dtet_init(tet) + t8_forest_search_with_batched_queries_update_user_data(search_with_queries, udata) -Set sensible default values for a tet. +Update the user data pointer in the search with batched queries context # Arguments -* `tet`:\\[in,out\\] A tet. +* `search_with_queries`:\\[in,out\\] the search with batched queries context to update +* `udata`:\\[in\\] the new user data pointer to use ### Prototype ```c -void t8_dtet_init (t8_dtet_t *tet); +void t8_forest_search_with_batched_queries_update_user_data ( t8_forest_search_with_batched_queries_c_wrapper search_with_queries, void *udata); ``` """ -function t8_dtet_init(tet) - @ccall libt8.t8_dtet_init(tet::Ptr{t8_dtet_t})::Cvoid +function t8_forest_search_with_batched_queries_update_user_data(search_with_queries, udata) + @ccall libt8.t8_forest_search_with_batched_queries_update_user_data(search_with_queries::t8_forest_search_with_batched_queries_c_wrapper, + udata::Ptr{Cvoid})::Cvoid end """ - t8_dtet_element_pack(elements, count, send_buffer, buffer_size, position, comm) + t8_forest_search_with_batched_queries_update_queries(search_with_queries, queries, num_queries) + +Update the queries in the search with batched queries context +# Arguments +* `search_with_queries`:\\[in,out\\] the search with batched queries context to update +* `queries`:\\[in\\] a pointer to an array of queries +* `num_queries`:\\[in\\] the number of queries in the array ### Prototype ```c -void t8_dtet_element_pack (t8_dtet_t **const elements, const unsigned int count, void *send_buffer, const int buffer_size, int *position, sc_MPI_Comm comm); +void t8_forest_search_with_batched_queries_update_queries ( t8_forest_search_with_batched_queries_c_wrapper search_with_queries, void **queries, const size_t num_queries); ``` """ -function t8_dtet_element_pack(elements, count, send_buffer, buffer_size, position, comm) - @ccall libt8.t8_dtet_element_pack(elements::Ptr{Ptr{t8_dtet_t}}, count::Cuint, send_buffer::Ptr{Cvoid}, buffer_size::Cint, position::Ptr{Cint}, comm::MPI_Comm)::Cvoid +function t8_forest_search_with_batched_queries_update_queries(search_with_queries, queries, + num_queries) + @ccall libt8.t8_forest_search_with_batched_queries_update_queries(search_with_queries::t8_forest_search_with_batched_queries_c_wrapper, + queries::Ptr{Ptr{Cvoid}}, + num_queries::Csize_t)::Cvoid end """ - t8_dtet_element_pack_size(count, comm, pack_size) + t8_forest_search_with_batched_queries_destroy(search) + +Destroy the search with batched queries context +# Arguments +* `search`:\\[in,out\\] the search with batched queries context to destroy ### Prototype ```c -void t8_dtet_element_pack_size (const unsigned int count, sc_MPI_Comm comm, int *pack_size); +void t8_forest_search_with_batched_queries_destroy (t8_forest_search_with_batched_queries_c_wrapper search); ``` """ -function t8_dtet_element_pack_size(count, comm, pack_size) - @ccall libt8.t8_dtet_element_pack_size(count::Cuint, comm::MPI_Comm, pack_size::Ptr{Cint})::Cvoid +function t8_forest_search_with_batched_queries_destroy(search) + @ccall libt8.t8_forest_search_with_batched_queries_destroy(search::t8_forest_search_with_batched_queries_c_wrapper)::Cvoid end """ - t8_dtet_element_unpack(recvbuf, buffer_size, position, elements, count, comm) + t8_forest_search_with_batched_queries_do_search(search) + +Perform the search with batched queries +# Arguments +* `search`:\\[in,out\\] the search with batched queries context to use ### Prototype ```c -void t8_dtet_element_unpack (void *recvbuf, const int buffer_size, int *position, t8_dtet_t **elements, const unsigned int count, sc_MPI_Comm comm); +void t8_forest_search_with_batched_queries_do_search (t8_forest_search_with_batched_queries_c_wrapper search); ``` """ -function t8_dtet_element_unpack(recvbuf, buffer_size, position, elements, count, comm) - @ccall libt8.t8_dtet_element_unpack(recvbuf::Ptr{Cvoid}, buffer_size::Cint, position::Ptr{Cint}, elements::Ptr{Ptr{t8_dtet_t}}, count::Cuint, comm::MPI_Comm)::Cvoid +function t8_forest_search_with_batched_queries_do_search(search) + @ccall libt8.t8_forest_search_with_batched_queries_do_search(search::t8_forest_search_with_batched_queries_c_wrapper)::Cvoid end """ - t8_dtri_copy(element, dest) + t8_geom_get_name(geom) -Copy the values of one triangle to another. +Get the name of a geometry. # Arguments -* `element`:\\[in\\] Triangle whose values will be copied. -* `dest`:\\[in,out\\] Existing triangle whose data will be filled with the data of *element*. +* `geom`:\\[in\\] A geometry. +# Returns +The name of *geom*. ### Prototype ```c -void t8_dtri_copy (const t8_dtri_t *element, t8_dtri_t *dest); +const char * t8_geom_get_name (const t8_geometry_c *geom); ``` """ -function t8_dtri_copy(element, dest) - @ccall libt8.t8_dtri_copy(element::Ptr{t8_dtri_t}, dest::Ptr{t8_dtri_t})::Cvoid +function t8_geom_get_name(geom) + @ccall libt8.t8_geom_get_name(geom::Ptr{t8_geometry_c})::Cstring end """ - t8_dtri_compare(element1, element2) + t8_geom_get_type(geom) -Compare two triangle in their linear order. +Get the type of a geometry. # Arguments -* `element1`:\\[in\\] Triangle one. -* `element2`:\\[in\\] Triangle two. +* `geom`:\\[in\\] A geometry. # Returns -Returns negative if tri1 < tri2, zero if tri1 = tri2, positive if tri1 > tri2 +The type of *geom*. ### Prototype ```c -int t8_dtri_compare (const t8_dtri_t *element1, const t8_dtri_t *element2); +t8_geometry_type_t t8_geom_get_type (const t8_geometry_c *geom); ``` """ -function t8_dtri_compare(element1, element2) - @ccall libt8.t8_dtri_compare(element1::Ptr{t8_dtri_t}, element2::Ptr{t8_dtri_t})::Cint +function t8_geom_get_type(geom) + @ccall libt8.t8_geom_get_type(geom::Ptr{t8_geometry_c})::t8_geometry_type_t end """ - t8_dtri_equal(element1, element2) - -Check if two elements are equal. + t8_geom_compute_linear_geometry(tree_class, tree_vertices, ref_coords, num_coords, out_coords) -# Arguments -* `element1`:\\[in\\] The first element. -* `element2`:\\[in\\] The second element. -# Returns -1 if the elements are equal, 0 if they are not equal ### Prototype ```c -int t8_dtri_equal (const t8_dtri_t *element1, const t8_dtri_t *element2); +void t8_geom_compute_linear_geometry (t8_eclass_t tree_class, const double *tree_vertices, const double *ref_coords, const size_t num_coords, double *out_coords); ``` """ -function t8_dtri_equal(element1, element2) - @ccall libt8.t8_dtri_equal(element1::Ptr{t8_dtri_t}, element2::Ptr{t8_dtri_t})::Cint +function t8_geom_compute_linear_geometry(tree_class, tree_vertices, ref_coords, num_coords, + out_coords) + @ccall libt8.t8_geom_compute_linear_geometry(tree_class::Cint, + tree_vertices::Ptr{Cdouble}, + ref_coords::Ptr{Cdouble}, + num_coords::Csize_t, + out_coords::Ptr{Cdouble})::Cvoid end """ - t8_dtri_parent(element, parent) - -Compute the parent of a triangle. - -!!! note - - *element* may point to the same triangle as *parent*. + t8_geom_compute_linear_axis_aligned_geometry(tree_class, tree_vertices, ref_coords, num_coords, out_coords) -# Arguments -* `element`:\\[in\\] Input triangle. -* `parent`:\\[in,out\\] Existing triangle whose data will be filled with the data of elem's parent. ### Prototype ```c -void t8_dtri_parent (const t8_dtri_t *element, t8_dtri_t *parent); +void t8_geom_compute_linear_axis_aligned_geometry (t8_eclass_t tree_class, const double *tree_vertices, const double *ref_coords, const size_t num_coords, double *out_coords); ``` """ -function t8_dtri_parent(element, parent) - @ccall libt8.t8_dtri_parent(element::Ptr{t8_dtri_t}, parent::Ptr{t8_dtri_t})::Cvoid +function t8_geom_compute_linear_axis_aligned_geometry(tree_class, tree_vertices, ref_coords, + num_coords, out_coords) + @ccall libt8.t8_geom_compute_linear_axis_aligned_geometry(tree_class::Cint, + tree_vertices::Ptr{Cdouble}, + ref_coords::Ptr{Cdouble}, + num_coords::Csize_t, + out_coords::Ptr{Cdouble})::Cvoid end """ - t8_dtri_ancestor(element, level, ancestor) - -Compute the ancestor of a triangle at a given level. - -!!! note + t8_geom_linear_interpolation(coefficients, corner_values, corner_value_dim, interpolation_dim, evaluated_function) - The triangle *ancestor* may point to the same triangle as *element*. +Interpolates linearly between 2, bilinearly between 4 or trilineraly between 8 points. # Arguments -* `element`:\\[in\\] Input triangle. -* `level`:\\[in\\] A smaller level than *element*. -* `ancestor`:\\[in,out\\] Existing triangle whose data will be filled with the data of *element*'s ancestor on level *level*. +* `coefficients`:\\[in\\] An array of size at least dim giving the coefficients used for the interpolation +* `corner_values`:\\[in\\] An array of size 2^dim * 3, giving for each corner (in zorder) of the unit square/cube its function values in space. +* `corner_value_dim`:\\[in\\] The dimension of the *corner_values*. +* `interpolation_dim`:\\[in\\] The dimension of the interpolation (1 for linear, 2 for bilinear, 3 for trilinear) +* `evaluated_function`:\\[out\\] An array of size *corner_value_dim*, on output the result of the interpolation. ### Prototype ```c -void t8_dtri_ancestor (const t8_dtri_t *element, int level, t8_dtri_t *ancestor); +void t8_geom_linear_interpolation (const double *coefficients, const double *corner_values, int corner_value_dim, int interpolation_dim, double *evaluated_function); ``` """ -function t8_dtri_ancestor(element, level, ancestor) - @ccall libt8.t8_dtri_ancestor(element::Ptr{t8_dtri_t}, level::Cint, ancestor::Ptr{t8_dtri_t})::Cvoid +function t8_geom_linear_interpolation(coefficients, corner_values, corner_value_dim, + interpolation_dim, evaluated_function) + @ccall libt8.t8_geom_linear_interpolation(coefficients::Ptr{Cdouble}, + corner_values::Ptr{Cdouble}, + corner_value_dim::Cint, + interpolation_dim::Cint, + evaluated_function::Ptr{Cdouble})::Cvoid end """ - t8_dtri_compute_integer_coords(element, vertex, coordinates) + t8_geom_triangular_interpolation(coefficients, corner_values, corner_value_dim, interpolation_dim, evaluated_function) -Compute the coordinates of a vertex of a triangle. +Triangular interpolation between 3 points (triangle) or 4 points (tetrahedron) using cartesian coordinates. The input coefficients have to be given as coordinates in the reference triangle (interpolation\\_dim = 2) with points (0,0) (1,0) (1,1) or the reference tet (interpolation\\_dim = 3) with points (0,0,0) (1,0,0) (1,1,0) (1,1,1). # Arguments -* `element`:\\[in\\] Input triangle. -* `vertex`:\\[in\\] The number of the vertex. -* `coordinates`:\\[out\\] An array of 2 [`t8_dtri_coord_t`](@ref) that will be filled with the coordinates of the vertex. +* `coefficients`:\\[in\\] An array of size *interpolation_dim* giving the coefficients in the reference triangle/tet used for the interpolation +* `corner_values`:\\[in\\] An array of size 3 * *corner_value_dim* for *interpolation_dim* == 2 or 4 * *corner_value_dim* for *interpolation_dim* == 3, giving the function values of the triangle/tetrahedron for each corner (in zorder) +* `corner_value_dim`:\\[in\\] The dimension of the *corner_values*. +* `interpolation_dim`:\\[in\\] The dimension of the interpolation (2 for triangle, 3 for tetrahedron) +* `evaluated_function`:\\[out\\] An array of size *corner_value_dim*, on output the result of the interpolation. ### Prototype ```c -void t8_dtri_compute_integer_coords (const t8_dtri_t *element, const int vertex, t8_dtri_coord_t coordinates[2]); +void t8_geom_triangular_interpolation (const double *coefficients, const double *corner_values, int corner_value_dim, int interpolation_dim, double *evaluated_function); ``` """ -function t8_dtri_compute_integer_coords(element, vertex, coordinates) - @ccall libt8.t8_dtri_compute_integer_coords(element::Ptr{t8_dtri_t}, vertex::Cint, coordinates::Ptr{t8_dtri_coord_t})::Cvoid +function t8_geom_triangular_interpolation(coefficients, corner_values, corner_value_dim, + interpolation_dim, evaluated_function) + @ccall libt8.t8_geom_triangular_interpolation(coefficients::Ptr{Cdouble}, + corner_values::Ptr{Cdouble}, + corner_value_dim::Cint, + interpolation_dim::Cint, + evaluated_function::Ptr{Cdouble})::Cvoid end """ - t8_dtri_compute_vertex_ref_coords(element, vertex, coordinates) - -Compute the reference coordinates of a vertex of a triangle when the tree (level 0 triangle) is embedded in - -```c++ - [0,1]^2 -``` - -. + t8_geom_get_face_vertices(tree_class, tree_vertices, face_index, dim, face_vertices) -# Arguments -* `element`:\\[in\\] Input triangle. -* `vertex`:\\[in\\] The number of the vertex. -* `coordinates`:\\[out\\] An array of 2 double that will be filled with the reference coordinates of the vertex. ### Prototype ```c -void t8_dtri_compute_vertex_ref_coords (const t8_dtri_t *element, const int vertex, double coordinates[2]); +void t8_geom_get_face_vertices (t8_eclass_t tree_class, const double *tree_vertices, int face_index, int dim, double *face_vertices); ``` """ -function t8_dtri_compute_vertex_ref_coords(element, vertex, coordinates) - @ccall libt8.t8_dtri_compute_vertex_ref_coords(element::Ptr{t8_dtri_t}, vertex::Cint, coordinates::Ptr{Cdouble})::Cvoid +function t8_geom_get_face_vertices(tree_class, tree_vertices, face_index, dim, + face_vertices) + @ccall libt8.t8_geom_get_face_vertices(tree_class::Cint, tree_vertices::Ptr{Cdouble}, + face_index::Cint, dim::Cint, + face_vertices::Ptr{Cdouble})::Cvoid end """ - t8_dtri_compute_reference_coords(element, ref_coords, num_coords, skip_coords, out_coords) - -Convert points in the reference space of a tri element to points in the reference space of the tree (level 0) embedded in - -```c++ - [0,1]^2 -``` - -. - -```c++ - [0,1]^2 -``` - -) + t8_geom_get_edge_vertices(tree_class, tree_vertices, edge_index, dim, edge_vertices) -# Arguments -* `element`:\\[in\\] Input triangle. -* `ref_coords`:\\[in\\] The reference coordinates in the triangle (*num_coords* times -* `num_coords`:\\[in\\] Number of coordinates to evaluate -* `skip_coords`:\\[in\\] Only used for batch computation of prisms. In all other cases 0. Skip coordinates in the *ref_coords* and *out_coords* array. -* `out_coords`:\\[out\\] An array of *num_coords* x 2 x double that will be filled with the reference coordinates of the points on the triangle. ### Prototype ```c -void t8_dtri_compute_reference_coords (const t8_dtri_t *element, const double *ref_coords, const size_t num_coords, const size_t skip_coords, double *out_coords); +void t8_geom_get_edge_vertices (t8_eclass_t tree_class, const double *tree_vertices, int edge_index, int dim, double *edge_vertices); ``` """ -function t8_dtri_compute_reference_coords(element, ref_coords, num_coords, skip_coords, out_coords) - @ccall libt8.t8_dtri_compute_reference_coords(element::Ptr{t8_dtri_t}, ref_coords::Ptr{Cdouble}, num_coords::Csize_t, skip_coords::Csize_t, out_coords::Ptr{Cdouble})::Cvoid +function t8_geom_get_edge_vertices(tree_class, tree_vertices, edge_index, dim, + edge_vertices) + @ccall libt8.t8_geom_get_edge_vertices(tree_class::Cint, tree_vertices::Ptr{Cdouble}, + edge_index::Cint, dim::Cint, + edge_vertices::Ptr{Cdouble})::Cvoid end """ - t8_dtri_compute_all_coords(element, coordinates) + t8_geom_get_ref_intersection(edge_index, ref_coords, ref_intersection) -Compute the coordinates of the four vertices of a triangle. +Calculates a point of intersection in a triangular reference space. The intersection is the extension of a straight line passing through a reference point and the opposite vertex of the edge. /|\\ / | \\ o -> reference point / o \\ x -> intersection point / | \\ /\\_\\_\\_\\_x\\_\\_\\_\\_\\ # Arguments -* `element`:\\[in\\] Input triangle. -* `coordinates`:\\[out\\] An array of 4x3 [`t8_dtri_coord_t`](@ref) that will be filled with the coordinates of t's vertices. +* `edge_index`:\\[in\\] Index of the edge, the intersection lies on. +* `ref_coords`:\\[in\\] Array containing the coordinates of the reference point. +* `ref_intersection`:\\[out\\] Coordinates of the intersection point. ### Prototype ```c -void t8_dtri_compute_all_coords (const t8_dtri_t *element, t8_dtri_coord_t coordinates[3][2]); +void t8_geom_get_ref_intersection (int edge_index, const double *ref_coords, double ref_intersection[2]); ``` """ -function t8_dtri_compute_all_coords(element, coordinates) - @ccall libt8.t8_dtri_compute_all_coords(element::Ptr{t8_dtri_t}, coordinates::Ptr{NTuple{2, t8_dtri_coord_t}})::Cvoid +function t8_geom_get_ref_intersection(edge_index, ref_coords, ref_intersection) + @ccall libt8.t8_geom_get_ref_intersection(edge_index::Cint, ref_coords::Ptr{Cdouble}, + ref_intersection::Ptr{Cdouble})::Cvoid end """ - t8_dtri_child(element, childid, child) + t8_geom_get_triangle_scaling_factor(edge_index, tree_vertices, glob_intersection, glob_ref_point) -Compute the childid-th child in Morton order of a triangle. +Calculates the scaling factor for edge displacement along a triangular tree face depending on the position of the global reference point. # Arguments -* `element`:\\[in\\] Input triangle. -* `childid`:\\[in,out\\] The id of the child, 0..7 in Morton order. -* `child`:\\[out\\] Existing triangle whose data will be filled with the date of t's childid-th child. +* `edge_index`:\\[in\\] Index of the edge, whose displacement should be scaled. +* `tree_vertices`:\\[in\\] Array with the tree vertex coordinates. +* `glob_intersection`:\\[in\\] Array containing the coordinates of the intersection point of a line drawn from the opposite vertex through the glob\\_ref\\_point onto the edge with edge\\_index. +* `glob_ref_point`:\\[in\\] Array containing the coordinates of the reference point mapped into the global space. ### Prototype ```c -void t8_dtri_child (const t8_dtri_t *element, int childid, t8_dtri_t *child); +double t8_geom_get_triangle_scaling_factor (int edge_index, const double *tree_vertices, const double *glob_intersection, const double *glob_ref_point); ``` """ -function t8_dtri_child(element, childid, child) - @ccall libt8.t8_dtri_child(element::Ptr{t8_dtri_t}, childid::Cint, child::Ptr{t8_dtri_t})::Cvoid +function t8_geom_get_triangle_scaling_factor(edge_index, tree_vertices, glob_intersection, + glob_ref_point) + @ccall libt8.t8_geom_get_triangle_scaling_factor(edge_index::Cint, + tree_vertices::Ptr{Cdouble}, + glob_intersection::Ptr{Cdouble}, + glob_ref_point::Ptr{Cdouble})::Cdouble end """ - t8_dtri_childrenpv(element, children) + t8_geom_get_scaling_factor_of_edge_on_face_tet(edge_index, face_index, ref_coords) -Compute the 4 children of a triangle, array version. +Calculates the scaling factor for the displacement of an edge over a face of a tetrahedral element. # Arguments -* `element`:\\[in\\] Input triangle. -* `children`:\\[in,out\\] Pointers to the 4 computed children in Morton order. t may point to the same quadrant as c[0]. +* `edge_index`:\\[in\\] Index of the edge, whose displacement should be scaled. +* `face_index`:\\[in\\] Index of the face, the displacement should be scaled on. +* `ref_coords`:\\[in\\] Array containing the coordinates of the reference point. +# Returns +The scaling factor of the edge displacement on the face at the point of the reference coordinates. ### Prototype ```c -void t8_dtri_childrenpv (const t8_dtri_t *element, t8_dtri_t *children[T8_DTRI_CHILDREN]); +double t8_geom_get_scaling_factor_of_edge_on_face_tet (int edge_index, int face_index, const double *ref_coords); ``` """ -function t8_dtri_childrenpv(element, children) - @ccall libt8.t8_dtri_childrenpv(element::Ptr{t8_dtri_t}, children::Ptr{Ptr{t8_dtri_t}})::Cvoid +function t8_geom_get_scaling_factor_of_edge_on_face_tet(edge_index, face_index, ref_coords) + @ccall libt8.t8_geom_get_scaling_factor_of_edge_on_face_tet(edge_index::Cint, + face_index::Cint, + ref_coords::Ptr{Cdouble})::Cdouble end """ - t8_dtri_is_familypv(f) + t8_geom_get_tet_face_intersection(face_index, ref_coords, face_intersection) -Check whether a collection of eight triangles is a family in Morton order. +Calculates the face intersection of a ray passing trough the reference coordinates and the opposite vertex of that face for a tetrahedron. The coordinates of the face intersection are reference coordinates: [0,1]^3. # Arguments -* `f`:\\[in\\] An array of eight triangles. -# Returns -Nonzero if *f* is a family of triangles. +* `face_index`:\\[in\\] Index of the face, on which the intersection should be calculated. +* `ref_coords`:\\[in\\] Array containing the coordinates of the reference point. +* `face_intersection`:\\[out\\] Three dimensional array containing the intersection point on the face in reference space. ### Prototype ```c -int t8_dtri_is_familypv (const t8_dtri_t *f[]); +void t8_geom_get_tet_face_intersection (const int face_index, const double *ref_coords, double face_intersection[3]); ``` """ -function t8_dtri_is_familypv(f) - @ccall libt8.t8_dtri_is_familypv(f::Ptr{Ptr{t8_dtri_t}})::Cint +function t8_geom_get_tet_face_intersection(face_index, ref_coords, face_intersection) + @ccall libt8.t8_geom_get_tet_face_intersection(face_index::Cint, + ref_coords::Ptr{Cdouble}, + face_intersection::Ptr{Cdouble})::Cvoid end """ - t8_dtri_sibling(element, sibid, sibling) + t8_geom_get_scaling_factor_of_edge_on_face_prism(edge_index, face_index, ref_coords) -Compute a specific sibling of a triangle. +Calculates the scaling factor for the displacement of an edge over a face of a prism element. # Arguments -* `element`:\\[in\\] Input triangle. -* `sibid`:\\[in\\] The id of the sibling computed, 0..7 in Bey order. -* `sibling`:\\[in,out\\] Existing triangle whose data will be filled with the data of sibling no. sibling\\_id of *element*. +* `edge_index`:\\[in\\] Index of the edge, whose displacement should be scaled. +* `face_index`:\\[in\\] Index of the face, the displacement should be scaled on. +* `ref_coords`:\\[in\\] Array containing the coordinates of the reference point. +# Returns +The scaling factor of the edge displacement on the face at the point of the reference coordinates. ### Prototype ```c -void t8_dtri_sibling (const t8_dtri_t *element, int sibid, t8_dtri_t *sibling); +double t8_geom_get_scaling_factor_of_edge_on_face_prism (int edge_index, int face_index, const double *ref_coords); ``` """ -function t8_dtri_sibling(element, sibid, sibling) - @ccall libt8.t8_dtri_sibling(element::Ptr{t8_dtri_t}, sibid::Cint, sibling::Ptr{t8_dtri_t})::Cvoid +function t8_geom_get_scaling_factor_of_edge_on_face_prism(edge_index, face_index, + ref_coords) + @ccall libt8.t8_geom_get_scaling_factor_of_edge_on_face_prism(edge_index::Cint, + face_index::Cint, + ref_coords::Ptr{Cdouble})::Cdouble end """ - t8_dtri_face_neighbour(element, face, neigh) - -Compute the face neighbor of a triangle. - -!!! note + t8_geom_get_scaling_factor_face_through_volume_prism(face, ref_coords) - *element* may point to the same triangle as *neigh*. +Calculates the scaling factor for the displacement of an face through the volume of a prism element. # Arguments -* `element`:\\[in\\] Input triangle. -* `face`:\\[in\\] The face across which to generate the neighbor. -* `neigh`:\\[in,out\\] Existing triangle whose data will be filled. +* `face`:\\[in\\] Index of the displaced face. +* `ref_coords`:\\[in\\] Array containing the coordinates of the reference point. +# Returns +The scaling factor of the face displacement at the point of the reference coordinates inside the prism volume. ### Prototype ```c -int t8_dtri_face_neighbour (const t8_dtri_t *element, int face, t8_dtri_t *neigh); +double t8_geom_get_scaling_factor_face_through_volume_prism (const int face, const double *ref_coords); ``` """ -function t8_dtri_face_neighbour(element, face, neigh) - @ccall libt8.t8_dtri_face_neighbour(element::Ptr{t8_dtri_t}, face::Cint, neigh::Ptr{t8_dtri_t})::Cint +function t8_geom_get_scaling_factor_face_through_volume_prism(face, ref_coords) + @ccall libt8.t8_geom_get_scaling_factor_face_through_volume_prism(face::Cint, + ref_coords::Ptr{Cdouble})::Cdouble end """ - t8_dtri_nearest_common_ancestor(element1, element2, nca) - -Computes the nearest common ancestor of two triangles in the same tree. - -!!! note + t8_vertex_point_inside(vertex_coords, point, tolerance) - *element1*, *element2*, *nca* may point to the same quadrant. +Check if a point lies inside a vertex # Arguments -* `element1`:\\[in\\] First input triangle. -* `element2`:\\[in\\] Second input triangle. -* `nca`:\\[in,out\\] Existing triangle whose data will be filled. +* `vertex_coords`:\\[in\\] The coordinates of the vertex +* `point`:\\[in\\] The coordinates of the point to check +* `tolerance`:\\[in\\] A double > 0 defining the tolerance +# Returns +0 if the point is outside, 1 otherwise. ### Prototype ```c -void t8_dtri_nearest_common_ancestor (const t8_dtri_t *element1, const t8_dtri_t *element2, t8_dtri_t *nca); +int t8_vertex_point_inside (const double vertex_coords[3], const double point[3], const double tolerance); ``` """ -function t8_dtri_nearest_common_ancestor(element1, element2, nca) - @ccall libt8.t8_dtri_nearest_common_ancestor(element1::Ptr{t8_dtri_t}, element2::Ptr{t8_dtri_t}, nca::Ptr{t8_dtri_t})::Cvoid +function t8_vertex_point_inside(vertex_coords, point, tolerance) + @ccall libt8.t8_vertex_point_inside(vertex_coords::Ptr{Cdouble}, point::Ptr{Cdouble}, + tolerance::Cdouble)::Cint end """ - t8_dtri_children_at_face(element, face, children, num_children, child_indices) + t8_line_point_inside(p_0, vec, point, tolerance) -Given a triangle and a face of the triangle, compute all children of the triangle that touch the face. +Check if a point is inside a line that is defined by a starting point *p_0* and a vector *vec* # Arguments -* `element`:\\[in\\] The triangle. -* `face`:\\[in\\] A face of *element*. -* `children`:\\[in,out\\] Allocated triangles, in which the children of *element* that share a face with *face* are stored. They will be stored in order of their child\\_id. -* `num_children`:\\[in\\] The number of triangles in *children*. Must match the number of children that touch *face*. -* `child_indices`:\\[in,out\\] The indices of the children in *children*. Only filled if this is null previously. +* `p_0`:\\[in\\] Starting point of the line +* `vec`:\\[in\\] Direction of the line (not normalized) +* `point`:\\[in\\] The coordinates of the point to check +* `tolerance`:\\[in\\] A double > 0 defining the tolerance +# Returns +0 if the point is outside, 1 otherwise. ### Prototype ```c -void t8_dtri_children_at_face (const t8_dtri_t *element, int face, t8_dtri_t *children[], int num_children, int *child_indices); +int t8_line_point_inside (const double *p_0, const double *vec, const double *point, const double tolerance); ``` """ -function t8_dtri_children_at_face(element, face, children, num_children, child_indices) - @ccall libt8.t8_dtri_children_at_face(element::Ptr{t8_dtri_t}, face::Cint, children::Ptr{Ptr{t8_dtri_t}}, num_children::Cint, child_indices::Ptr{Cint})::Cvoid +function t8_line_point_inside(p_0, vec, point, tolerance) + @ccall libt8.t8_line_point_inside(p_0::Ptr{Cdouble}, vec::Ptr{Cdouble}, + point::Ptr{Cdouble}, tolerance::Cdouble)::Cint end """ - t8_dtri_face_child_face(triangle, face, face_child) + t8_triangle_point_inside(p_0, v, w, point, tolerance) -Given a face of a triangle and a child number of a child of that face, return the face number of the child of the triangle that matches the child face. +Check if a point is inside of a triangle described by a point *p_0* and two vectors *v* and *w*. # Arguments -* `triangle`:\\[in\\] The triangle. -* `face`:\\[in\\] Then number of the face. -* `face_child`:\\[in\\] The child number of a child of the face triangle. +* `p_0`:\\[in\\] The first vertex of a triangle +* `v`:\\[in\\] The vector from p\\_0 to p\\_1 (second vertex in the triangle) +* `w`:\\[in\\] The vector from p\\_0 to p\\_2 (third vertex in the triangle) +* `point`:\\[in\\] The coordinates of the point to check +* `tolerance`:\\[in\\] A double > 0 defining the tolerance # Returns -The face number of the face of a child of *triangle* that coincides with *face_child*. +0 if the point is outside, 1 otherwise. ### Prototype ```c -int t8_dtri_face_child_face (const t8_dtri_t *triangle, int face, int face_child); +int t8_triangle_point_inside (const double p_0[3], const double v[3], const double w[3], const double point[3], const double tolerance); ``` """ -function t8_dtri_face_child_face(triangle, face, face_child) - @ccall libt8.t8_dtri_face_child_face(triangle::Ptr{t8_dtri_t}, face::Cint, face_child::Cint)::Cint +function t8_triangle_point_inside(p_0, v, w, point, tolerance) + @ccall libt8.t8_triangle_point_inside(p_0::Ptr{Cdouble}, v::Ptr{Cdouble}, + w::Ptr{Cdouble}, point::Ptr{Cdouble}, + tolerance::Cdouble)::Cint end """ - t8_dtri_face_parent_face(triangle, face) + t8_plane_point_inside(point_on_face, face_normal, point) -Given a face of an triangle return the face number of the parent of the triangle that matches the triangle's face. Or return -1 if no face of the parent matches the face. +Check if a point lays on the inner side of a plane of a bilinearly interpolated volume element. the plane is described by a point and the normal of the face. # Arguments -* `triangle`:\\[in\\] The triangle. -* `face`:\\[in\\] Then number of the face. +* `point_on_face`:\\[in\\] A point on the plane +* `face_normal`:\\[in\\] The normal of the face +* `point`:\\[in\\] The point to check # Returns -If *face* of *elem* is also a face of *elem*'s parent, the face number of this face. Otherwise -1. +0 if the point is outside, 1 otherwise. ### Prototype ```c -int t8_dtri_face_parent_face (const t8_dtri_t *triangle, int face); +int t8_plane_point_inside (const double point_on_face[3], const double face_normal[3], const double point[3]); ``` """ -function t8_dtri_face_parent_face(triangle, face) - @ccall libt8.t8_dtri_face_parent_face(triangle::Ptr{t8_dtri_t}, face::Cint)::Cint +function t8_plane_point_inside(point_on_face, face_normal, point) + @ccall libt8.t8_plane_point_inside(point_on_face::Ptr{Cdouble}, + face_normal::Ptr{Cdouble}, point::Ptr{Cdouble})::Cint end +# typedef void ( * t8_geom_analytic_fn ) ( t8_cmesh_t cmesh , t8_gloidx_t gtreeid , const double * ref_coords , const size_t num_coords , double * out_coords , const void * tree_data , const void * user_data ) """ - t8_dtri_tree_face(element, face) - -Given a triangle and a face of this triangle. If the face lies on the tree boundary, return the face number of the tree face. If not the return value is arbitrary. +Definition of an analytic geometry function. This function maps reference coordinates to physical coordinates. -!!! note +```c++ + [0,1]^\\mathrm{dim} +``` - For boundary triangles, this function is the inverse of t8_dtri_root_face_to_face +. # Arguments -* `element`:\\[in\\] The triangle. -* `face`:\\[in\\] The index of a face of *element*. -# Returns -The index of the tree face that *face* is a subface of, if *face* is on a tree boundary. Any arbitrary integer if *element* is not at a tree boundary. -### Prototype -```c -int t8_dtri_tree_face (t8_dtri_t *element, int face); -``` +* `cmesh`:\\[in\\] The cmesh. +* `gtreeid`:\\[in\\] The global tree (of the cmesh) in which the reference point is. +* `ref_coords`:\\[in\\] Array of dimension x *num_coords* many entries, specifying a point in +* `num_coords`:\\[in\\] The number of coordinates in *ref_coords*. +* `out_coords`:\\[out\\] The mapped coordinates in physical space of *ref_coords*. The length is *num_coords* * 3. +* `tree_data`:\\[in\\] The data of the current tree as loaded by a t8_geom_load_tree_data_fn. +* `user_data`:\\[in\\] The user data pointer stored in the geometry. """ -function t8_dtri_tree_face(element, face) - @ccall libt8.t8_dtri_tree_face(element::Ptr{t8_dtri_t}, face::Cint)::Cint -end +const t8_geom_analytic_fn = Ptr{Cvoid} +# typedef void ( * t8_geom_analytic_jacobian_fn ) ( t8_cmesh_t cmesh , t8_gloidx_t gtreeid , const double * ref_coords , const size_t num_coords , double * jacobian , const void * tree_data , const void * user_data ) """ - t8_dtri_root_face_to_face(element, root_face) +Definition for the jacobian of an analytic geometry function. + +```c++ + [0,1]^\\mathrm{dim} +``` -Given a triangle and a face of the root triangle. If the triangle lies on the tree boundary, return the corresponding face number of the triangle. If not the return value is arbitrary. +. -!!! note +```c++ + \\mathrm{dim} +``` + +to map. + +```c++ + \\mathrm{dim} \\cdot 3 +``` + +x *num_coords*. Indices + +```c++ + 3 \\cdot i +``` + +, + +```c++ + 3 \\cdot i+1 +``` + +, + +```c++ + 3 \\cdot i+2 +``` - For boundary triangles, this function is the inverse of t8_dtri_tree_face +correspond to the -# Arguments -* `element`:\\[in\\] The triangle. -* `root_face`:\\[in\\] The index of a face of the root element. -# Returns -The index of the face of *element* that is a subface of *root_face*, if *element* is on the tree boundary. Any arbitrary integer if *element* is not at a tree boundary. -### Prototype -```c -int t8_dtri_root_face_to_face (t8_dtri_t *element, int root_face); +```c++ + i ``` -""" -function t8_dtri_root_face_to_face(element, root_face) - @ccall libt8.t8_dtri_root_face_to_face(element::Ptr{t8_dtri_t}, root_face::Cint)::Cint -end -""" - t8_dtri_transform_face(trianglein, triangle2, orientation, sign, is_smaller_face) +-th column of the jacobian (Entry -Suppose we have two trees that share a common triangle f. Given a triangle e that is a subface of f in one of the trees and given the orientation of the tree connection, construct the face triangle of the respective tree neighbor that logically coincides with e but lies in the coordinate system of the neighbor tree. +```c++ + 3 \\cdot i + j +``` -!!! note +is - *trianglein* and *triangle2* may point to the same element. +```c++ + \\frac{\\partial f_j}{\\partial x_i} +``` -# Arguments -* `trianglein`:\\[in\\] The face triangle. -* `triangle2`:\\[in,out\\] On return the face triangle *triangle1* with respective to the coordinate system of the other tree. -* `orientation`:\\[in\\] The orientation of the tree-tree connection. -* `sign`:\\[in\\] Depending on the topological orientation of the two tree faces, either 0 (both faces have opposite orientation) or 1 (both faces have the same top. orientation). t8_eclass_face_orientation -* `is_smaller_face`:\\[in\\] Flag to declare whether *triangle1* belongs to the smaller face. A face f of tree T is smaller than f' of T' if either the eclass of T is smaller or if the classes are equal and f