Problem Description
When executing the mesh volume all
command to generate volume meshes, Volume 3 meshed successfully (automatically using the submap
scheme, generating 160820 hex elements), but Volume 5 failed with an error.
Error Details
WARNING: Volume 5 must have its meshing scheme explicitly specified;
it is not automatically mappable, submappable or sweepable.
ERROR: 1 volume did not mesh : Volume 5
The original code is as follows:
#!/usr/bin/env python
from __future__ import print_function
import cubit
cubit.init([""])
try:
from geocubitlib import boundary_definition
from geocubitlib import cubit2specfem3d
except:
import boundary_definition
import cubit2specfem3d
import os
import sys
cubit.cmd('reset')
# -------------------- -------------------- #
# cubit.cmd('view journal')
cubit.cmd('Timer Start')
cubit.cmd('clear')
cubit.cmd('Color Background white')
cubit.cmd('Color Axis Labels red')
cubit.cmd('graphics perspective off')
cubit.cmd('graphics parallel scale 303.79899')
cubit.cmd('from -2209.0335 -2399.8038 840.56353')
cubit.cmd('at 0 0 0')
cubit.cmd('up 0.15018128 0.20082845 0.96804624')
cubit.cmd('set duplicate block elements on')
# cubit.cmd('view right')
# cubit.cmd('up 0 0 1')
# cubit.cmd('view top')
# cubit.cmd('view bottom')
# cubit.cmd('view front')
cubit.cmd('view iso')
cubit.cmd('up 0 0 1')
# -------------------- -------------------- #
# -------------------- -------------------- #
elementsize = 4.0
path_folder = 'model_files_3D_20250803'
# -------------------- -------------------- #
# ---------------------------------------- ---------------------------------------- #
cubit.cmd('brick x 200 y 200 z 200')
cubit.cmd('move vol 1 x 100 y 100 z -100')
cubit.cmd('create sphere radius 3 Zpositive')
cubit.cmd('move volume 2 x 100 y 100 z -150')
# ---------------------------------------- ---------------------------------------- #
cubit.cmd('view iso')
cubit.cmd('up 0 0 1')
# -------------------- -------------------- #
cubit.cmd('color vol 1 id 4')
cubit.cmd('color vol 2 id 10')
# -------------------- -------------------- #
# -------------------- -------------------- #
cubit.cmd('imprint vol all')
cubit.cmd('volume all size ' + str(elementsize))
cubit.cmd('mesh volume all')
cubit.cmd('draw volume all')