Skip to content

Commit

Permalink
tests three levels of ref_oct_contains
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike Park authored and Mike Park committed Sep 10, 2022
1 parent 62ee8c4 commit 4adc1f7
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion src/ref_oct_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ int main(int argc, char *argv[]) {
RSS(ref_oct_split(ref_oct, 1), "split first child");
RSS(ref_oct_split(ref_oct, 9), "split second gen");
RSS(ref_oct_tec(ref_oct, argv[pos + 1]), "tec");
RSS(ref_oct_free(ref_oct), "search oct");
RSS(ref_oct_free(ref_oct), "free oct");
RSS(ref_mpi_free(ref_mpi), "mpi free");
RSS(ref_mpi_stop(), "stop");
return 0;
Expand Down Expand Up @@ -144,6 +144,21 @@ int main(int argc, char *argv[]) {
RSS(ref_oct_free(ref_oct), "free oct");
}

{
REF_OCT ref_oct;
REF_DBL xyz[] = {0.01, 0.01, 0.01};
REF_DBL bbox[6];
REF_INT node;

RSS(ref_oct_create(&ref_oct), "make oct");
RSS(ref_oct_split(ref_oct, 0), "split root");
RSS(ref_oct_split(ref_oct, 1), "split first child");
RSS(ref_oct_split(ref_oct, 9), "split second gen");

RSS(ref_oct_contains(ref_oct, xyz, &node, bbox), "contains oct");
REIS(17, node, "expects third level");
}

RSS(ref_mpi_free(ref_mpi), "mpi free");
RSS(ref_mpi_stop(), "stop");
return 0;
Expand Down

0 comments on commit 4adc1f7

Please sign in to comment.