Skip to content

Commit

Permalink
export-option
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike Park authored and Mike Park committed Sep 28, 2022
1 parent 1a9e91c commit 2a122da
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/ref_oct_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,23 @@ int main(int argc, char *argv[]) {
return 0;
}

RXS(ref_args_find(argc, argv, "--box", &pos), REF_NOT_FOUND, "arg search");
if (pos != REF_EMPTY && pos + 1 < argc) {
REF_GRID ref_grid;
REF_OCT ref_oct;
REF_DBL h = 0.25;
RSS(ref_grid_create(&ref_grid, ref_mpi), "make grid");
RSS(ref_oct_create(&ref_oct), "make oct");
RSS(ref_oct_split_touching(ref_oct, ref_oct->bbox, h), "split");
RSS(ref_oct_export(ref_oct, ref_grid), "export");
RSS(ref_export_by_extension(ref_grid, argv[pos + 1]), "export");
RSS(ref_oct_free(ref_oct), "free oct");
RSS(ref_grid_free(ref_grid), "free grid");
RSS(ref_mpi_free(ref_mpi), "mpi free");
RSS(ref_mpi_stop(), "stop");
return 0;
}

RXS(ref_args_find(argc, argv, "--point", &pos), REF_NOT_FOUND, "arg search");
if (pos != REF_EMPTY && pos + 1 < argc) {
REF_OCT ref_oct;
Expand Down

0 comments on commit 2a122da

Please sign in to comment.