From 62942531a4a6e170993789f7d626c19f828a2c25 Mon Sep 17 00:00:00 2001 From: Thilina Rathnayake Date: Mon, 23 Oct 2023 03:44:30 -0400 Subject: [PATCH] Add verbosity to match_periodic_faces() --- src/con-impl.h | 2 +- src/con-periodic.c | 16 +++++++++++++++- src/con.c | 2 +- 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/src/con-impl.h b/src/con-impl.h index cb57d33c..07bd8aa0 100644 --- a/src/con-impl.h +++ b/src/con-impl.h @@ -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); diff --git a/src/con-periodic.c b/src/con-periodic.c index 275a8f7f..b0c61dc8 100644 --- a/src/con-periodic.c +++ b/src/con-periodic.c @@ -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; diff --git a/src/con.c b/src/con.c index 47ee5e78..c34a918b 100644 --- a/src/con.c +++ b/src/con.c @@ -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]);