Skip to content

Commit

Permalink
Add verbosity to match_periodic_faces()
Browse files Browse the repository at this point in the history
  • Loading branch information
thilinarmtb committed Oct 23, 2023
1 parent 870ea3f commit 6294253
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/con-impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ int send_back(Mesh mesh, struct comm *c, buffer *bfr);
int find_unique_vertices(Mesh mesh, struct comm *c, scalar tol, int verbose,
buffer *bfr);

int match_periodic_faces(Mesh mesh, struct comm *c, buffer *bfr);
int match_periodic_faces(Mesh mesh, struct comm *c, int verbose, buffer *bfr);

int element_check(Mesh mesh, struct comm *c, buffer *bfr);

Expand Down
16 changes: 15 additions & 1 deletion src/con-periodic.c
Original file line number Diff line number Diff line change
Expand Up @@ -266,19 +266,33 @@ static int setPeriodicFaceCoordinates(Mesh mesh, struct comm *c, buffer *buf) {
return 0;
}

int match_periodic_faces(Mesh mesh, struct comm *c, buffer *bfr) {
int match_periodic_faces(Mesh mesh, struct comm *c, int verbose, buffer *bfr) {
const char *functions[6] = {
"set_periodic_face_coords ", "gather_matching_periodic_faces",
"find_connected_periodic_faces ", "renumber_periodic_vertices ",
"compress_periodic_vertices ", "send_back "};

parrsb_print(c, verbose, "\t\t%s ...", functions[0]);
setPeriodicFaceCoordinates(mesh, c, bfr);

parrsb_print(c, verbose, "\t\t%s ...", functions[1]);
gatherMatchingPeriodicFaces(mesh, c);

struct array matched;
array_init(struct mpair_t, &matched, 10);
matched.n = 0;

parrsb_print(c, verbose, "\t\t%s ...", functions[2]);
findConnectedPeriodicFaces(mesh, &matched);

parrsb_print(c, verbose, "\t\t%s ...", functions[3]);
renumberPeriodicVertices(mesh, c, &matched, bfr);
array_free(&matched);

parrsb_print(c, verbose, "\t\t%s ...", functions[4]);
compressPeriodicVertices(mesh, c, bfr);

parrsb_print(c, verbose, "\t\t%s ...", functions[5]);
send_back(mesh, c, bfr);

return 0;
Expand Down
2 changes: 1 addition & 1 deletion src/con.c
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ int parrsb_conn_mesh(long long *vtx, double *coord, uint nelt, unsigned ndim,

parrsb_print(&c, verbose - 1, "\t%s ...", name[6]);
parrsb_barrier(&c), t = comm_time();
match_periodic_faces(mesh, &c, &bfr);
match_periodic_faces(mesh, &c, verbose - 1, &bfr);
duration[6] = comm_time() - t;

parrsb_print(&c, verbose - 1, "\t%s ...", name[7]);
Expand Down

0 comments on commit 6294253

Please sign in to comment.