Skip to content

Commit

Permalink
size per entity
Browse files Browse the repository at this point in the history
  • Loading branch information
Angelyr committed Nov 30, 2023
1 parent ac7d4ab commit 1c04fc4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/describe.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -35,6 +35,8 @@ int main(int argc, char** argv)
size = mesh.get_tag<Omega_h::I64>(dim, tagbase->name())->array().size();
if (tagbase->type() == OMEGA_H_F64)
size = mesh.get_tag<Omega_h::Real>(dim, tagbase->name())->array().size();

size /= mesh.nents(dim);
printf("(%d, %s, %d)\n", dim, tagbase->name().c_str(), size);
}
}

0 comments on commit 1c04fc4

Please sign in to comment.