From 6240d7e7d9ff042c53485082ab372e6ee493703c Mon Sep 17 00:00:00 2001 From: Ryan Thomas Wollaeger Date: Tue, 17 Aug 2021 18:49:39 -0600 Subject: [PATCH] Add region output, with all the cells, to x3d_generator.py. (#1112) Note: it is planned to eventually permit multiple regions/matids. --- src/mesh/python/x3d_generator.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/mesh/python/x3d_generator.py b/src/mesh/python/x3d_generator.py index fb8869eba..1344b510a 100755 --- a/src/mesh/python/x3d_generator.py +++ b/src/mesh/python/x3d_generator.py @@ -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 # ------------------------------------------------------------------------------------------------ #