Skip to content

Commit

Permalink
provides details on failure
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike Park authored and Mike Park committed Sep 29, 2022
1 parent dd0159d commit 50a1245
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
24 changes: 23 additions & 1 deletion src/ref_oct.c
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,27 @@ REF_FCN REF_STATUS ref_oct_bbox_diag(REF_DBL *bbox, REF_DBL *diag) {
return REF_SUCCESS;
}

REF_FCN REF_STATUS ref_oct_tattle(REF_OCT ref_oct, REF_INT node) {
printf("corners %d %d %d %d %d %d %d %d\n", ref_oct_c2n(ref_oct, 0, node),
ref_oct_c2n(ref_oct, 1, node), ref_oct_c2n(ref_oct, 2, node),
ref_oct_c2n(ref_oct, 3, node), ref_oct_c2n(ref_oct, 4, node),
ref_oct_c2n(ref_oct, 5, node), ref_oct_c2n(ref_oct, 6, node),
ref_oct_c2n(ref_oct, 7, node));
printf("edges %d %d %d %d %d %d %d %d %d %d %d %d\n",
ref_oct_c2n(ref_oct, 8, node), ref_oct_c2n(ref_oct, 9, node),
ref_oct_c2n(ref_oct, 10, node), ref_oct_c2n(ref_oct, 11, node),
ref_oct_c2n(ref_oct, 12, node), ref_oct_c2n(ref_oct, 13, node),
ref_oct_c2n(ref_oct, 14, node), ref_oct_c2n(ref_oct, 15, node),
ref_oct_c2n(ref_oct, 16, node), ref_oct_c2n(ref_oct, 17, node),
ref_oct_c2n(ref_oct, 18, node), ref_oct_c2n(ref_oct, 19, node));
printf("faces %d %d %d %d %d %d center %d\n",
ref_oct_c2n(ref_oct, 20, node), ref_oct_c2n(ref_oct, 21, node),
ref_oct_c2n(ref_oct, 22, node), ref_oct_c2n(ref_oct, 23, node),
ref_oct_c2n(ref_oct, 24, node), ref_oct_c2n(ref_oct, 25, node),
ref_oct_c2n(ref_oct, 26, node));
return REF_SUCCESS;
}

REF_FCN REF_STATUS ref_oct_split(REF_OCT ref_oct, REF_INT node) {
REF_INT i;
RAS(node >= 0, "node negative");
Expand Down Expand Up @@ -630,7 +651,8 @@ REF_FCN static REF_STATUS ref_oct_export_node(REF_OCT ref_oct, REF_INT node,
for (i = 0; i < 8; i++)
RAS(REF_EMPTY != ref_oct_c2n(ref_oct, i, node), "expects to be set");
for (i = 8; i < 27; i++)
REIS(REF_EMPTY, ref_oct_c2n(ref_oct, i, node), "implement 2-1");
REIB(REF_EMPTY, ref_oct_c2n(ref_oct, i, node), "implement 2-1",
{ ref_oct_tattle(ref_oct, node); });
for (i = 0; i < 8; i++) nodes[i] = ref_oct_c2n(ref_oct, i, node);
ref_cell = ref_grid_hex(ref_grid);
RSS(ref_cell_add(ref_cell, nodes, &new_cell), "add hex");
Expand Down
1 change: 1 addition & 0 deletions src/ref_oct.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ REF_FCN REF_STATUS ref_oct_child_bbox(REF_DBL *parent_bbox, REF_INT child_index,
REF_DBL *child_bbox);
REF_FCN REF_STATUS ref_oct_bbox_diag(REF_DBL *bbox, REF_DBL *diag);

REF_FCN REF_STATUS ref_oct_tattle(REF_OCT ref_oct, REF_INT node);
REF_FCN REF_STATUS ref_oct_split(REF_OCT ref_oct, REF_INT node);
REF_FCN REF_STATUS ref_oct_split_at(REF_OCT ref_oct, REF_DBL *xyz, REF_DBL h);
REF_FCN REF_STATUS ref_oct_split_touching(REF_OCT ref_oct, REF_DBL *bbox,
Expand Down

0 comments on commit 50a1245

Please sign in to comment.