-
Hi, I believe one could generate a 3D Raster with the latest version? I tried with the following input, but I end up with an index error 'IndexError: index 0 is out of bounds for axis 0 with size 0'
|
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
Hi @hem-28, thanks for sharing your input file. I can reproduce the error on my computer and I'll find a solution this week. I appreciate your patience. |
Beta Was this translation helpful? Give feedback.
-
Hi @hem-28, I found the issue. The raster mesh generator uses mesh_size to determine the edge length for each pixel/voxel. The default value is infinity, which produces nonsense results internally. When I set mesh_size to 5, I get this result: The input file should be as below, with the mesh_size setting indicated. You can set mesh_size to a value you prefer. I considered setting it to 1, but that is too many voxels for my computer. Let me know if you need any further assistance. <?xml version="1.0" encoding="UTF-8"?>
<input>
<material>
<fraction> 1 </fraction>
<shape> ellipsoid </shape>
<ratio_ab > 1.34 </ratio_ab >
<ratio_ac > 2.00 </ratio_ac >
<ratio_bc > 1.00 </ratio_bc >
<size>
<dist_type> norm </dist_type>
<loc> 10 </loc>
<scale> 3 </scale>
</size>
<position> <!-- x -->
<dist_type> uniform </dist_type>
<loc> 0.0 </loc>
<scale> 100.0 </scale>
</position>
<position> <!-- y -->
<dist_type> uniform </dist_type>
<loc> 0.0 </loc>
<scale> 100 </scale>
</position>
<position> <!-- z -->
<dist_type> norm </dist_type>
<loc> 50.0 </loc>
<scale> 5.0 </scale>
</position>
<name> Mat-A </name>
</material>
<material>
<fraction> 4 </fraction>
<shape> ellipsoid </shape>
<ratio_ab > 1.34 </ratio_ab >
<ratio_ac > 2.00 </ratio_ac >
<ratio_bc > 1.00 </ratio_bc >
<size>
<dist_type> norm </dist_type>
<loc> 15 </loc>
<scale> 3 </scale>
</size>
<name> Mat-B </name>
</material>
<domain>
<shape> cube </shape>
<side_length> 100 </side_length>
<corner> (0, 0, 0) </corner>
</domain>
<settings>
<directory> two_phase_3D </directory>
<verbose> True </verbose>
<filetypes>
<seeds> vtk </seeds>
<poly> txt </poly>
<tri> txt </tri>
<seeds_plot> png </seeds_plot>
<poly_plot> png </poly_plot>
<tri_plot> png </tri_plot>
<verify_plot> png </verify_plot>
</filetypes>
<mesher> raster </mesher>
<mesh_size> 5 </mesh_size> <!-- this value sets the edge length of each voxel -->
<seeds_kwargs>
<linewidths> 0.2 </linewidths>
</seeds_kwargs>
<poly_kwargs>
<linewidths> 0.2 </linewidths>
</poly_kwargs>
</settings>
</input> |
Beta Was this translation helpful? Give feedback.
-
@kip-hart Thanks for your quick solution. It worked. I tried with a mesh size of 1, that worked too. |
Beta Was this translation helpful? Give feedback.
Hi @hem-28, I found the issue. The raster mesh generator uses mesh_size to determine the edge length for each pixel/voxel. The default value is infinity, which produces nonsense results internally. When I set mesh_size to 5, I get this result:
The input file should be as below, with the mesh_size setting indicated. You can set mesh_size to a value you prefer. I considered setting it to 1, but that is too many voxels for my computer. Let me know if you need any further assistance.