From cb40e3dcafbb2622a71b366e9dbffa8b7102818c Mon Sep 17 00:00:00 2001 From: Ryan Wollaeger Date: Tue, 17 Aug 2021 12:15:21 -0600 Subject: [PATCH] Add region output, with all the cells, to x3d_generator.py. 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 # ------------------------------------------------------------------------------------------------ #