Skip to content

Commit

Permalink
adds conditional twod avm test
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike Park authored and Mike Park committed Jul 21, 2021
1 parent 131e85b commit 535f022
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions src/ref_gather_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -427,8 +427,8 @@ int main(int argc, char *argv[]) {

{ /* recycle tet brick avm */
REF_GRID seq_grid = NULL, para_grid = NULL;
char seq_file[] = "ref_gather_test_seq.avm";
char para_file[] = "ref_gather_test_para.avm";
char seq_file[] = "ref_gather_test_tet_seq.avm";
char para_file[] = "ref_gather_test_tet_para.avm";
RSS(ref_fixture_tet_brick_grid(&seq_grid, ref_mpi), "set up tet");
RSS(ref_gather_by_extension(seq_grid, seq_file), "export");
RSS(ref_part_by_extension(&para_grid, ref_mpi, seq_file), "part");
Expand All @@ -441,6 +441,23 @@ int main(int argc, char *argv[]) {
}
}

RXS(ref_args_find(argc, argv, "--twod", &pos), REF_NOT_FOUND, "arg search");
if (REF_EMPTY != pos) { /* recycle twod brick avm */
REF_GRID seq_grid = NULL, para_grid = NULL;
char seq_file[] = "ref_gather_test_twod_seq.avm";
char para_file[] = "ref_gather_test_twod_para.avm";
RSS(ref_fixture_twod_brick_grid(&seq_grid, ref_mpi, 4), "set up tet");
RSS(ref_gather_by_extension(seq_grid, seq_file), "export");
RSS(ref_part_by_extension(&para_grid, ref_mpi, seq_file), "part");
RSS(ref_gather_by_extension(para_grid, para_file), "gather");
RSS(ref_grid_free(para_grid), "free");
RSS(ref_grid_free(seq_grid), "free");
if (ref_mpi_once(ref_mpi)) {
REIS(0, remove(seq_file), "test clean up");
REIS(0, remove(para_file), "test clean up");
}
}

{ /* recycle tet brick lb8.ugrid */
REF_GRID seq_grid = NULL, para_grid;
char seq_file[] = "ref_gather_test_seq.lb8.ugrid";
Expand Down

0 comments on commit 535f022

Please sign in to comment.