From b39eeb69b6f95cef3d288531e6f57adfffe2d54e Mon Sep 17 00:00:00 2001 From: Angelyr Date: Tue, 28 Nov 2023 15:42:48 -0500 Subject: [PATCH 01/16] print mesh entities --- src/CMakeLists.txt | 1 + src/Omega_h_describe.cpp | 12 ++++++++++++ 2 files changed, 13 insertions(+) create mode 100644 src/Omega_h_describe.cpp diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index b78ef76f0..f0e501459 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -30,6 +30,7 @@ set(Omega_h_SOURCES Omega_h_compare.cpp Omega_h_confined.cpp Omega_h_conserve.cpp + Omega_h_describe.cpp Omega_h_dist.cpp Omega_h_eigen.cpp Omega_h_expr.cpp diff --git a/src/Omega_h_describe.cpp b/src/Omega_h_describe.cpp new file mode 100644 index 000000000..442efd45c --- /dev/null +++ b/src/Omega_h_describe.cpp @@ -0,0 +1,12 @@ +#include + + +int main(int argc, char** argv) +{ + auto lib = Omega_h::Library(&argc, &argv); + Omega_h::Mesh mesh = Omega_h::read_mesh_file(argv[1], lib.world()); + + int dim = mesh.dim(); + for(int d=0; d < mesh.dim(); d++) + printf("(Dim, Num Mesh Entities): (%d, %d)\n", dim, mesh.nents(d)); +} \ No newline at end of file From 660b36aaf0cc5486d27c5754ad421c26a284a029 Mon Sep 17 00:00:00 2001 From: Angelyr Date: Tue, 28 Nov 2023 16:43:01 -0500 Subject: [PATCH 02/16] printing more fields --- src/CMakeLists.txt | 1 + src/Omega_h_describe.cpp | 15 ++++++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index f0e501459..91a2c6f43 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -273,6 +273,7 @@ macro(osh_add_util EXE_NAME) bob_export_target(${EXE_NAME}) endmacro(osh_add_util) +osh_add_util(Omega_h_describe) osh_add_util(msh2osh) osh_add_util(osh2vtk) osh_add_util(oshdiff) diff --git a/src/Omega_h_describe.cpp b/src/Omega_h_describe.cpp index 442efd45c..4382ec6c5 100644 --- a/src/Omega_h_describe.cpp +++ b/src/Omega_h_describe.cpp @@ -8,5 +8,18 @@ int main(int argc, char** argv) int dim = mesh.dim(); for(int d=0; d < mesh.dim(); d++) - printf("(Dim, Num Mesh Entities): (%d, %d)\n", dim, mesh.nents(d)); + printf("(Dim, Num Mesh Entities): (%d, %d)\n", d, mesh.nents(d)); + + printf("nelems: %d\n", mesh.nelems()); + printf("nregions: %d\n", mesh.nregions()); + printf("nfaces: %d\n", mesh.nfaces()); + printf("nedges: %d\n", mesh.nedges()); + printf("nverts: %d\n", mesh.nverts()); + + printf("npyrams: %d\n", mesh.npyrams()); + printf("nwedges: %d\n", mesh.nwedges()); + printf("nhexs: %d\n", mesh.nhexs()); + printf("ntets: %d\n", mesh.ntets()); + printf("nquads: %d\n", mesh.nquads()); + printf("ntris: %d\n", mesh.ntris()); } \ No newline at end of file From c8a511a031dc4d6acb303c6c33d62c78a29fd04e Mon Sep 17 00:00:00 2001 From: Angelyr Date: Tue, 28 Nov 2023 18:34:13 -0500 Subject: [PATCH 03/16] printing tag name --- src/Omega_h_describe.cpp | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/Omega_h_describe.cpp b/src/Omega_h_describe.cpp index 4382ec6c5..ece46e085 100644 --- a/src/Omega_h_describe.cpp +++ b/src/Omega_h_describe.cpp @@ -6,9 +6,11 @@ int main(int argc, char** argv) auto lib = Omega_h::Library(&argc, &argv); Omega_h::Mesh mesh = Omega_h::read_mesh_file(argv[1], lib.world()); - int dim = mesh.dim(); - for(int d=0; d < mesh.dim(); d++) - printf("(Dim, Num Mesh Entities): (%d, %d)\n", d, mesh.nents(d)); + for(int dim=0; dim < mesh.dim(); dim++) + printf("(Dim, Num Mesh Entities): (%d, %d)\n", dim, mesh.nents(dim)); + + for(int dim=0; dim < mesh.dim(); dim++) + printf("(Dim, Imbalance): (%d, %d)\n", dim, mesh.imbalance(dim)); printf("nelems: %d\n", mesh.nelems()); printf("nregions: %d\n", mesh.nregions()); @@ -22,4 +24,10 @@ int main(int argc, char** argv) printf("ntets: %d\n", mesh.ntets()); printf("nquads: %d\n", mesh.nquads()); printf("ntris: %d\n", mesh.ntris()); + + for(int dim=0; dim < mesh.dim(); dim++) + for (int tag=0; tag < mesh.ntags(dim); tag++) { + auto tagbase = mesh.get_tag(dim, tag); + printf("(Dim, Tag): (%d, %s)\n", dim, tagbase->name().c_str()); + } } \ No newline at end of file From f0c5ffef21bee27b7801e02435e7ce2ab5cac9f5 Mon Sep 17 00:00:00 2001 From: Angelyr Date: Wed, 29 Nov 2023 14:37:27 -0500 Subject: [PATCH 04/16] more comments --- src/Omega_h_describe.cpp | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/src/Omega_h_describe.cpp b/src/Omega_h_describe.cpp index ece46e085..d22893f24 100644 --- a/src/Omega_h_describe.cpp +++ b/src/Omega_h_describe.cpp @@ -6,26 +6,31 @@ int main(int argc, char** argv) auto lib = Omega_h::Library(&argc, &argv); Omega_h::Mesh mesh = Omega_h::read_mesh_file(argv[1], lib.world()); + printf("\nMesh Properties:\n"); for(int dim=0; dim < mesh.dim(); dim++) printf("(Dim, Num Mesh Entities): (%d, %d)\n", dim, mesh.nents(dim)); + printf("\n"); for(int dim=0; dim < mesh.dim(); dim++) printf("(Dim, Imbalance): (%d, %d)\n", dim, mesh.imbalance(dim)); - printf("nelems: %d\n", mesh.nelems()); - printf("nregions: %d\n", mesh.nregions()); - printf("nfaces: %d\n", mesh.nfaces()); - printf("nedges: %d\n", mesh.nedges()); - printf("nverts: %d\n", mesh.nverts()); + printf("\nGeometry:\n"); + printf("Num Elems: %d\n", mesh.nelems()); + printf("Num Regions: %d\n", mesh.nregions()); + printf("Num Faces: %d\n", mesh.nfaces()); + printf("Num Edges: %d\n", mesh.nedges()); + printf("Num Verts: %d\n", mesh.nverts()); - printf("npyrams: %d\n", mesh.npyrams()); - printf("nwedges: %d\n", mesh.nwedges()); - printf("nhexs: %d\n", mesh.nhexs()); - printf("ntets: %d\n", mesh.ntets()); - printf("nquads: %d\n", mesh.nquads()); - printf("ntris: %d\n", mesh.ntris()); + printf("\nShapes:\n"); + printf("Num Pyrams: %d\n", mesh.npyrams()); + printf("Num Wedges: %d\n", mesh.nwedges()); + printf("Num Hexs: %d\n", mesh.nhexs()); + printf("Num Tets: %d\n", mesh.ntets()); + printf("Num Quads: %d\n", mesh.nquads()); + printf("Num Tris: %d\n", mesh.ntris()); - for(int dim=0; dim < mesh.dim(); dim++) + printf("\nTags:\n"); + for (int dim=0; dim < mesh.dim(); dim++) for (int tag=0; tag < mesh.ntags(dim); tag++) { auto tagbase = mesh.get_tag(dim, tag); printf("(Dim, Tag): (%d, %s)\n", dim, tagbase->name().c_str()); From 382fb8fcef214e30dd02078611448f23ec75c8e1 Mon Sep 17 00:00:00 2001 From: Angelyr Date: Wed, 29 Nov 2023 15:24:04 -0500 Subject: [PATCH 05/16] better fields --- src/Omega_h_describe.cpp | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/src/Omega_h_describe.cpp b/src/Omega_h_describe.cpp index d22893f24..93adaabc9 100644 --- a/src/Omega_h_describe.cpp +++ b/src/Omega_h_describe.cpp @@ -6,20 +6,13 @@ int main(int argc, char** argv) auto lib = Omega_h::Library(&argc, &argv); Omega_h::Mesh mesh = Omega_h::read_mesh_file(argv[1], lib.world()); - printf("\nMesh Properties:\n"); + printf("\nMesh Entity Count by Dimension: (Dim, Num Mesh Entities)\n"); for(int dim=0; dim < mesh.dim(); dim++) - printf("(Dim, Num Mesh Entities): (%d, %d)\n", dim, mesh.nents(dim)); + printf("(%d, %d)\n", dim, mesh.nents(dim)); - printf("\n"); + printf("\nImbalance by Dimension: (Dim, Imbalance)\n"); for(int dim=0; dim < mesh.dim(); dim++) - printf("(Dim, Imbalance): (%d, %d)\n", dim, mesh.imbalance(dim)); - - printf("\nGeometry:\n"); - printf("Num Elems: %d\n", mesh.nelems()); - printf("Num Regions: %d\n", mesh.nregions()); - printf("Num Faces: %d\n", mesh.nfaces()); - printf("Num Edges: %d\n", mesh.nedges()); - printf("Num Verts: %d\n", mesh.nverts()); + printf("(%d, %d)\n", dim, mesh.imbalance(dim)); printf("\nShapes:\n"); printf("Num Pyrams: %d\n", mesh.npyrams()); @@ -29,10 +22,19 @@ int main(int argc, char** argv) printf("Num Quads: %d\n", mesh.nquads()); printf("Num Tris: %d\n", mesh.ntris()); - printf("\nTags:\n"); + printf("\nTags: (Dim, Tag, Size)\n"); for (int dim=0; dim < mesh.dim(); dim++) for (int tag=0; tag < mesh.ntags(dim); tag++) { auto tagbase = mesh.get_tag(dim, tag); - printf("(Dim, Tag): (%d, %s)\n", dim, tagbase->name().c_str()); + printf("(%d, %s, ", dim, tagbase->name().c_str()); + + if (tagbase->type() == OMEGA_H_I8) + printf("%d)\n", mesh.get_tag(dim, tagbase->name())->array().size()); + if (tagbase->type() == OMEGA_H_I32) + printf("%d)\n", mesh.get_tag(dim, tagbase->name())->array().size()); + if (tagbase->type() == OMEGA_H_I64) + printf("%d)\n", mesh.get_tag(dim, tagbase->name())->array().size()); + if (tagbase->type() == OMEGA_H_F64) + printf("%d)\n", mesh.get_tag(dim, tagbase->name())->array().size()); } } \ No newline at end of file From 1cfe2545d06959d2a1c6848fc9cd72bf4234f015 Mon Sep 17 00:00:00 2001 From: Angelyr Date: Wed, 29 Nov 2023 15:28:28 -0500 Subject: [PATCH 06/16] refactor size --- src/Omega_h_describe.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Omega_h_describe.cpp b/src/Omega_h_describe.cpp index 93adaabc9..5b7feda3e 100644 --- a/src/Omega_h_describe.cpp +++ b/src/Omega_h_describe.cpp @@ -26,15 +26,15 @@ int main(int argc, char** argv) for (int dim=0; dim < mesh.dim(); dim++) for (int tag=0; tag < mesh.ntags(dim); tag++) { auto tagbase = mesh.get_tag(dim, tag); - printf("(%d, %s, ", dim, tagbase->name().c_str()); - + int size; if (tagbase->type() == OMEGA_H_I8) - printf("%d)\n", mesh.get_tag(dim, tagbase->name())->array().size()); + size = mesh.get_tag(dim, tagbase->name())->array().size(); if (tagbase->type() == OMEGA_H_I32) - printf("%d)\n", mesh.get_tag(dim, tagbase->name())->array().size()); + size = mesh.get_tag(dim, tagbase->name())->array().size(); if (tagbase->type() == OMEGA_H_I64) - printf("%d)\n", mesh.get_tag(dim, tagbase->name())->array().size()); + size = mesh.get_tag(dim, tagbase->name())->array().size(); if (tagbase->type() == OMEGA_H_F64) - printf("%d)\n", mesh.get_tag(dim, tagbase->name())->array().size()); + size = mesh.get_tag(dim, tagbase->name())->array().size(); + printf("(%d, %s, %d)\n", dim, tagbase->name().c_str(), size); } } \ No newline at end of file From 92a7449877203b6cf21b0bf6bc190f3cd899cea5 Mon Sep 17 00:00:00 2001 From: Angelyr Date: Wed, 29 Nov 2023 15:39:44 -0500 Subject: [PATCH 07/16] rename file --- src/CMakeLists.txt | 3 +-- src/{Omega_h_describe.cpp => describe.cpp} | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) rename src/{Omega_h_describe.cpp => describe.cpp} (92%) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 91a2c6f43..f10679f25 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -30,7 +30,6 @@ set(Omega_h_SOURCES Omega_h_compare.cpp Omega_h_confined.cpp Omega_h_conserve.cpp - Omega_h_describe.cpp Omega_h_dist.cpp Omega_h_eigen.cpp Omega_h_expr.cpp @@ -273,7 +272,7 @@ macro(osh_add_util EXE_NAME) bob_export_target(${EXE_NAME}) endmacro(osh_add_util) -osh_add_util(Omega_h_describe) +osh_add_util(describe) osh_add_util(msh2osh) osh_add_util(osh2vtk) osh_add_util(oshdiff) diff --git a/src/Omega_h_describe.cpp b/src/describe.cpp similarity index 92% rename from src/Omega_h_describe.cpp rename to src/describe.cpp index 5b7feda3e..3e48a92cc 100644 --- a/src/Omega_h_describe.cpp +++ b/src/describe.cpp @@ -6,7 +6,7 @@ int main(int argc, char** argv) auto lib = Omega_h::Library(&argc, &argv); Omega_h::Mesh mesh = Omega_h::read_mesh_file(argv[1], lib.world()); - printf("\nMesh Entity Count by Dimension: (Dim, Num Mesh Entities)\n"); + printf("\nMesh Entity Count by Dimension: (Dim, Entities Count)\n"); for(int dim=0; dim < mesh.dim(); dim++) printf("(%d, %d)\n", dim, mesh.nents(dim)); @@ -22,7 +22,7 @@ int main(int argc, char** argv) printf("Num Quads: %d\n", mesh.nquads()); printf("Num Tris: %d\n", mesh.ntris()); - printf("\nTags: (Dim, Tag, Size)\n"); + printf("\nTags by Dimension: (Dim, Tag, Size)\n"); for (int dim=0; dim < mesh.dim(); dim++) for (int tag=0; tag < mesh.ntags(dim); tag++) { auto tagbase = mesh.get_tag(dim, tag); From ac7d4abfc928eefa1c9030fb8d73d9ccf70882aa Mon Sep 17 00:00:00 2001 From: Angelyr Date: Thu, 30 Nov 2023 15:25:32 -0500 Subject: [PATCH 08/16] describe test --- src/CMakeLists.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index f10679f25..c5b0d4a1d 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -322,7 +322,7 @@ if(BUILD_TESTING) endif() endif() - function(test_func_impl TEST_NAME NUM_PROCS) +function(test_func_impl TEST_NAME NUM_PROCS) if (ENABLE_CTEST_MEMPOOL) set(CTEST_MEMPOOL_ARG "--osh-pool") @@ -572,6 +572,11 @@ if(BUILD_TESTING) endif() osh_add_exe(shape_test) test_basefunc(run_shape_test 1 ./shape_test) + + test_func(describe_one 1 ./describe ${CMAKE_SOURCE_DIR}/meshes/box_3d.osh) + if(Omega_h_USE_MPI) + test_func(describe_two 2 ./describe ${CMAKE_SOURCE_DIR}/meshes/box_3d_2p.osh) + endif() endif() bob_config_header("${CMAKE_CURRENT_BINARY_DIR}/Omega_h_config.h") From 1c04fc4536559b0df71620cc3683951f13e8eec5 Mon Sep 17 00:00:00 2001 From: Angelyr Date: Thu, 30 Nov 2023 15:27:59 -0500 Subject: [PATCH 09/16] size per entity --- src/describe.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/describe.cpp b/src/describe.cpp index 3e48a92cc..83f9e8790 100644 --- a/src/describe.cpp +++ b/src/describe.cpp @@ -22,7 +22,7 @@ int main(int argc, char** argv) printf("Num Quads: %d\n", mesh.nquads()); printf("Num Tris: %d\n", mesh.ntris()); - printf("\nTags by Dimension: (Dim, Tag, Size)\n"); + printf("\nTags by Dimension: (Dim, Tag, Size per Entity)\n"); for (int dim=0; dim < mesh.dim(); dim++) for (int tag=0; tag < mesh.ntags(dim); tag++) { auto tagbase = mesh.get_tag(dim, tag); @@ -35,6 +35,8 @@ int main(int argc, char** argv) size = mesh.get_tag(dim, tagbase->name())->array().size(); if (tagbase->type() == OMEGA_H_F64) size = mesh.get_tag(dim, tagbase->name())->array().size(); + + size /= mesh.nents(dim); printf("(%d, %s, %d)\n", dim, tagbase->name().c_str(), size); } } \ No newline at end of file From f6d62c7e01817df3240b794c9d9096737cc5376a Mon Sep 17 00:00:00 2001 From: Angelyr Date: Thu, 30 Nov 2023 17:34:14 -0500 Subject: [PATCH 10/16] print one comm rank at a time --- src/describe.cpp | 36 +++++++++++++++++++++++------------- 1 file changed, 23 insertions(+), 13 deletions(-) diff --git a/src/describe.cpp b/src/describe.cpp index 83f9e8790..5c8a5fea5 100644 --- a/src/describe.cpp +++ b/src/describe.cpp @@ -5,24 +5,31 @@ int main(int argc, char** argv) { auto lib = Omega_h::Library(&argc, &argv); Omega_h::Mesh mesh = Omega_h::read_mesh_file(argv[1], lib.world()); + std::ostringstream oss; - printf("\nMesh Entity Count by Dimension: (Dim, Entities Count)\n"); + #ifdef OMEGA_H_USE_MPI + int comm_rank; + MPI_Comm_rank(MPI_COMM_WORLD, &comm_rank); + oss << "\nComm Rank: " << comm_rank << "\n"; + #endif + + oss << "\nMesh Entity Count by Dimension: (Dim, Entities Count)\n"; for(int dim=0; dim < mesh.dim(); dim++) - printf("(%d, %d)\n", dim, mesh.nents(dim)); + oss << "(" << dim << ", " << mesh.nents(dim) << ")\n"; - printf("\nImbalance by Dimension: (Dim, Imbalance)\n"); + oss << "\nImbalance by Dimension: (Dim, Imbalance)\n"; for(int dim=0; dim < mesh.dim(); dim++) - printf("(%d, %d)\n", dim, mesh.imbalance(dim)); + oss << "(" << dim << ", " << mesh.imbalance(dim) << ")\n"; - printf("\nShapes:\n"); - printf("Num Pyrams: %d\n", mesh.npyrams()); - printf("Num Wedges: %d\n", mesh.nwedges()); - printf("Num Hexs: %d\n", mesh.nhexs()); - printf("Num Tets: %d\n", mesh.ntets()); - printf("Num Quads: %d\n", mesh.nquads()); - printf("Num Tris: %d\n", mesh.ntris()); + oss << "\nShapes:\n"; + oss << "Num Pyrams: " << mesh.npyrams() << "\n"; + oss << "Num Wedges: " << mesh.nwedges() << "\n"; + oss << "Num Hexs: " << mesh.nhexs() << "\n"; + oss << "Num Tets: " << mesh.ntets() << "\n"; + oss << "Num Quads: " << mesh.nquads() << "\n"; + oss << "Num Tris: " << mesh.ntris() << "\n"; - printf("\nTags by Dimension: (Dim, Tag, Size per Entity)\n"); + oss << "\nTags by Dimension: (Dim, Tag, Size per Entity)\n"; for (int dim=0; dim < mesh.dim(); dim++) for (int tag=0; tag < mesh.ntags(dim); tag++) { auto tagbase = mesh.get_tag(dim, tag); @@ -37,6 +44,9 @@ int main(int argc, char** argv) size = mesh.get_tag(dim, tagbase->name())->array().size(); size /= mesh.nents(dim); - printf("(%d, %s, %d)\n", dim, tagbase->name().c_str(), size); + oss << "(" << dim << ", " << tagbase->name().c_str() << ", " << size << ")\n"; } + + oss << "\n--------------------------------------------------------\n"; + std::cout << oss.str(); } \ No newline at end of file From 3fd509e67b9c1868778f3c77751c3fa7ad51dd7f Mon Sep 17 00:00:00 2001 From: Angelyr Date: Thu, 30 Nov 2023 17:40:31 -0500 Subject: [PATCH 11/16] test print --- .github/workflows/cmake.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 4c3649e50..331ca33fa 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -37,3 +37,7 @@ jobs: working-directory: ${{runner.workspace}}/build shell: bash run: ctest + + - name: Print + if: always() + run: cat ${{runner.workspace}}/build/Testing/Temporary/LastTest.log From aedd985c87126c61b5c9ada7786a7b31b5a82c58 Mon Sep 17 00:00:00 2001 From: Angelyr Date: Thu, 30 Nov 2023 17:56:24 -0500 Subject: [PATCH 12/16] one test --- src/CMakeLists.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index c5b0d4a1d..06dd75828 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -573,9 +573,10 @@ function(test_func_impl TEST_NAME NUM_PROCS) osh_add_exe(shape_test) test_basefunc(run_shape_test 1 ./shape_test) - test_func(describe_one 1 ./describe ${CMAKE_SOURCE_DIR}/meshes/box_3d.osh) if(Omega_h_USE_MPI) - test_func(describe_two 2 ./describe ${CMAKE_SOURCE_DIR}/meshes/box_3d_2p.osh) + test_func(describe_partitioned 2 ./describe ${CMAKE_SOURCE_DIR}/meshes/box_3d_2p.osh) + else() + test_func(describe_serial 1 ./describe ${CMAKE_SOURCE_DIR}/meshes/box_3d.osh) endif() endif() From 5ab2a22d6844b467a6a9c04507d833712f217a98 Mon Sep 17 00:00:00 2001 From: Angelyr Date: Fri, 1 Dec 2023 14:50:18 -0500 Subject: [PATCH 13/16] removed shapes --- src/describe.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/describe.cpp b/src/describe.cpp index 5c8a5fea5..bc092a30f 100644 --- a/src/describe.cpp +++ b/src/describe.cpp @@ -21,13 +21,13 @@ int main(int argc, char** argv) for(int dim=0; dim < mesh.dim(); dim++) oss << "(" << dim << ", " << mesh.imbalance(dim) << ")\n"; - oss << "\nShapes:\n"; - oss << "Num Pyrams: " << mesh.npyrams() << "\n"; - oss << "Num Wedges: " << mesh.nwedges() << "\n"; - oss << "Num Hexs: " << mesh.nhexs() << "\n"; - oss << "Num Tets: " << mesh.ntets() << "\n"; - oss << "Num Quads: " << mesh.nquads() << "\n"; - oss << "Num Tris: " << mesh.ntris() << "\n"; + // oss << "\nShapes:\n"; + // oss << "Num Pyrams: " << mesh.npyrams() << "\n"; + // oss << "Num Wedges: " << mesh.nwedges() << "\n"; + // oss << "Num Hexs: " << mesh.nhexs() << "\n"; + // oss << "Num Tets: " << mesh.ntets() << "\n"; + // oss << "Num Quads: " << mesh.nquads() << "\n"; + // oss << "Num Tris: " << mesh.ntris() << "\n"; oss << "\nTags by Dimension: (Dim, Tag, Size per Entity)\n"; for (int dim=0; dim < mesh.dim(); dim++) From d568db05889dd241611f2c8e543197c04f898fd8 Mon Sep 17 00:00:00 2001 From: Angelyr Date: Fri, 1 Dec 2023 15:08:48 -0500 Subject: [PATCH 14/16] fixed test --- src/describe.cpp | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/describe.cpp b/src/describe.cpp index bc092a30f..cfaa43efb 100644 --- a/src/describe.cpp +++ b/src/describe.cpp @@ -21,13 +21,15 @@ int main(int argc, char** argv) for(int dim=0; dim < mesh.dim(); dim++) oss << "(" << dim << ", " << mesh.imbalance(dim) << ")\n"; - // oss << "\nShapes:\n"; - // oss << "Num Pyrams: " << mesh.npyrams() << "\n"; - // oss << "Num Wedges: " << mesh.nwedges() << "\n"; - // oss << "Num Hexs: " << mesh.nhexs() << "\n"; - // oss << "Num Tets: " << mesh.ntets() << "\n"; - // oss << "Num Quads: " << mesh.nquads() << "\n"; - // oss << "Num Tris: " << mesh.ntris() << "\n"; + #if defined(OMEGA_H_USE_KOKKOS) + oss << "\nShapes:\n"; + oss << "Num Pyrams: " << mesh.npyrams() << "\n"; + oss << "Num Wedges: " << mesh.nwedges() << "\n"; + oss << "Num Hexs: " << mesh.nhexs() << "\n"; + oss << "Num Tets: " << mesh.ntets() << "\n"; + oss << "Num Quads: " << mesh.nquads() << "\n"; + oss << "Num Tris: " << mesh.ntris() << "\n"; + #endif oss << "\nTags by Dimension: (Dim, Tag, Size per Entity)\n"; for (int dim=0; dim < mesh.dim(); dim++) From ee5b76a90e1138dd969ab220b55035082ea4ec59 Mon Sep 17 00:00:00 2001 From: Angelyr Date: Fri, 1 Dec 2023 16:09:03 -0500 Subject: [PATCH 15/16] print mesh family --- src/describe.cpp | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/src/describe.cpp b/src/describe.cpp index cfaa43efb..3f699c842 100644 --- a/src/describe.cpp +++ b/src/describe.cpp @@ -1,3 +1,4 @@ +#include #include @@ -21,15 +22,9 @@ int main(int argc, char** argv) for(int dim=0; dim < mesh.dim(); dim++) oss << "(" << dim << ", " << mesh.imbalance(dim) << ")\n"; - #if defined(OMEGA_H_USE_KOKKOS) - oss << "\nShapes:\n"; - oss << "Num Pyrams: " << mesh.npyrams() << "\n"; - oss << "Num Wedges: " << mesh.nwedges() << "\n"; - oss << "Num Hexs: " << mesh.nhexs() << "\n"; - oss << "Num Tets: " << mesh.ntets() << "\n"; - oss << "Num Quads: " << mesh.nquads() << "\n"; - oss << "Num Tris: " << mesh.ntris() << "\n"; - #endif + oss << "\nMesh Family: (Dim, Family)\n"; + for(int dim=0; dim < mesh.dim(); dim++) + oss << "(" << dim << ", " << Omega_h::topological_singular_name(mesh.family(), dim) << ")\n"; oss << "\nTags by Dimension: (Dim, Tag, Size per Entity)\n"; for (int dim=0; dim < mesh.dim(); dim++) From 2ab0360d5dc3b5b595139e4b37db01b4771173e9 Mon Sep 17 00:00:00 2001 From: Angelyr Date: Fri, 1 Dec 2023 16:19:28 -0500 Subject: [PATCH 16/16] print last mesh family --- src/describe.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/describe.cpp b/src/describe.cpp index 3f699c842..242ce06e4 100644 --- a/src/describe.cpp +++ b/src/describe.cpp @@ -22,9 +22,7 @@ int main(int argc, char** argv) for(int dim=0; dim < mesh.dim(); dim++) oss << "(" << dim << ", " << mesh.imbalance(dim) << ")\n"; - oss << "\nMesh Family: (Dim, Family)\n"; - for(int dim=0; dim < mesh.dim(); dim++) - oss << "(" << dim << ", " << Omega_h::topological_singular_name(mesh.family(), dim) << ")\n"; + oss << "\nMesh Family: " << Omega_h::topological_singular_name(mesh.family(), mesh.dim()-1) << "\n"; oss << "\nTags by Dimension: (Dim, Tag, Size per Entity)\n"; for (int dim=0; dim < mesh.dim(); dim++)