Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

switch p4est_destroy and p4est_connectivity_destroy in docs #120

Merged
merged 1 commit into from
Mar 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/src/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ connectivity_pw.num_trees[]
p4est = p4est_new_ext(MPI.COMM_WORLD, connectivity, 0, 0, true, 0, C_NULL, C_NULL)
p4est_pw = PointerWrapper(p4est)
p4est_pw.connectivity.num_trees[]
p4est_connectivity_destroy(connectivity)
p4est_destroy(p4est)
p4est_connectivity_destroy(connectivity)
```

You may also use the `PointerWrapper` to set variables in `struct`s. Here we
Expand All @@ -102,8 +102,8 @@ GC.@preserve data begin
# You may retrieve the data `Ref` in the callback with
# data = unsafe_pointer_to_objref(pointer(p4est_pw.user_pointer))
end
p4est_connectivity_destroy(connectivity)
p4est_destroy(p4est)
p4est_connectivity_destroy(connectivity)
```

In addition, you can use a `PointerWrapper` as an array if the underlying datastructure is an array, i.e.
Expand All @@ -116,8 +116,8 @@ connectivity = p4est_connectivity_new_periodic()
p4est = p4est_new_ext(MPI.COMM_WORLD, connectivity, 0, 0, true, 0, C_NULL, C_NULL)
p4est_pw = PointerWrapper(p4est)
p4est_pw.global_first_quadrant[2]
p4est_connectivity_destroy(connectivity)
p4est_destroy(p4est)
p4est_connectivity_destroy(connectivity)
```

### Note on MPI datatypes
Expand Down
Loading