# Error when using CUBIT mesh in the subduction-2d example

**URL:** <https://community.geodynamics.org/t/error-when-using-cubit-mesh-in-the-subduction-2d-example/3049>\
**Category:** PyLith\
**Created:** [July 26, 2023, 9:43am UTC](https://community.geodynamics.org/t/error-when-using-cubit-mesh-in-the-subduction-2d-example/3049 "2023-07-26T09:43:38Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![boltzmann](https://avatars.discourse-cdn.com/v4/letter/b/71c47a/32.png) [@boltzmann](https://community.geodynamics.org/u/boltzmann)\
**Post date:** [July 26, 2023, 9:43am UTC](https://community.geodynamics.org/t/error-when-using-cubit-mesh-in-the-subduction-2d-example/3049/1 "2023-07-26T09:43:38Z")

</div>

Dear community,

I got an error when trying to use the CUBIT mesh mesh\_tri.exo in the example “subduction-2d”:

_RuntimeError: Error occurred while adjusting topology to create cohesive cells for fault ‘fault\_slabtop’._  
_Error while creating fault. Fault fault\_slabtop with label value 21 does not contain any cells._  
_Check that you are using the correct label value._

The example is working fine when using the GMSH mesh mesh\_tri.msh.

Attached are the full error log, and the JSON parameter file.

I use Pylith 3.0.3 from the binaries (pylith-3.0.3-macOS-12.0-arm64) on a Mac M1 (ARM).

I simply changed MeshIOPetsc to MeshIOCubit in the configuration file, in order to use the CUBIT mesh.  
I got the error either when I use the stock CUBIT mesh given in the example (mesh\_tri.exo), or when I build a new CUBIT mesh from the journal files.

Thank you very much for any help.

[error.txt](https://community.geodynamics.org/uploads/short-url/fZDomORmGgRxICHKu0Eka5Sn3un.txt) (5.7 KB)  
[step01\_coseismic-parameters.json.txt](https://community.geodynamics.org/uploads/short-url/50QW6z5oyrD9Q5qBO2LBPYSTWdY.txt) (357.8 KB)

---

<div class="post-metadata">

**Author:** ![boltzmann](https://avatars.discourse-cdn.com/v4/letter/b/71c47a/32.png) [@boltzmann](https://community.geodynamics.org/u/boltzmann)\
**Post date:** [July 26, 2023, 9:45am UTC](https://community.geodynamics.org/t/error-when-using-cubit-mesh-in-the-subduction-2d-example/3049/2 "2023-07-26T09:45:06Z")

</div>

And here are the configuration files:

[pylithapp.cfg](https://community.geodynamics.org/uploads/short-url/zlQqznRfspn56cFwImfQYB4GGXU.cfg) (4.4 KB)  
[step01\_coseismic.cfg](https://community.geodynamics.org/uploads/short-url/nvKfktiEGfUQMx8HxEJDtLK1hgD.cfg) (3.5 KB)

---

<div class="post-metadata">

**Author:** ![baagaard](https://yyz2.discourse-cdn.com/flex036/user_avatar/community.geodynamics.org/baagaard/32/615_2.png) [@baagaard](https://community.geodynamics.org/u/baagaard)\
**Post date:** [July 26, 2023, 2:32pm UTC](https://community.geodynamics.org/t/error-when-using-cubit-mesh-in-the-subduction-2d-example/3049/3 "2023-07-26T14:32:00Z")

</div>

When switching between using a mesh from CUBIT and from Gmsh, you need to update

1. Mesh importer (MeshIOPetsc vs MeshIOCubit), as you have done
2. Filename of the mesh file, as you have done
3. Label values (Gmsh: `label_value` matches the tag of the physical group; CUBIT: `label_value` is always 1). For a fault with buried edges, you also need to adjust `edge_value` (it is analogous to `label_value`).

---

<div class="post-metadata">

**Author:** ![boltzmann](https://avatars.discourse-cdn.com/v4/letter/b/71c47a/32.png) [@boltzmann](https://community.geodynamics.org/u/boltzmann)\
**Post date:** [July 27, 2023, 7:12am UTC](https://community.geodynamics.org/t/error-when-using-cubit-mesh-in-the-subduction-2d-example/3049/4 "2023-07-27T07:12:21Z")

</div>

Dear Brad,

Thank you very much for your help, it is working now!
