Skip to content

Commit

Permalink
Add region output, with all the cells, to x3d_generator.py. (#1112)
Browse files Browse the repository at this point in the history
Note: it is planned to eventually permit multiple regions/matids.
  • Loading branch information
RyanWollaeger authored Aug 18, 2021
1 parent 3c93de8 commit 6240d7e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/mesh/python/x3d_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,11 @@
np.savetxt(fname + '.bdy' + str(i + 1) + '.in',
np.unique(np.array(mesh.nodes_per_side[i]) + 1), fmt='%d')

# ------------------------------------------------------------------------------------------------ #
# -- write out the mesh region files based on matid
# -- todo: map (dictionary) matid to cell lists (this is only for X3D, so it's not a mesh task)
np.savetxt(fname + '.Reg' + str(1) + '.in', np.arange(1, mesh.num_cells + 1), fmt='%d')

# ------------------------------------------------------------------------------------------------ #
# end of x3d_generator.py
# ------------------------------------------------------------------------------------------------ #

0 comments on commit 6240d7e

Please sign in to comment.