# How to Load Prism (Wedge) Elements in Gridap.jl?

**URL:** <https://discourse.julialang.org/t/how-to-load-prism-wedge-elements-in-gridap-jl/119938>\
**Category:** General Usage\
**Tags:** question, gridap\
**Created:** [September 27, 2024, 5:30am UTC](https://discourse.julialang.org/t/how-to-load-prism-wedge-elements-in-gridap-jl/119938 "2024-09-27T05:30:15Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Skadi](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/skadi/32/49239_2.png) [@Skadi](https://discourse.julialang.org/u/Skadi)\
**Post date:** [September 27, 2024, 5:30am UTC](https://discourse.julialang.org/t/how-to-load-prism-wedge-elements-in-gridap-jl/119938/1 "2024-09-27T05:30:15Z")

</div>

Hello,  
I am working on solving PDEs using [Gridap.jl](https://github.com/gridap/Gridap.jl), specifically on a 3D mesh with **6-node prism (wedge) elements**. I converted my original mesh(with node coordinates and connectivity matrix) to a `.msh` file and tried to load the mesh using the [GridapGmsh.jl](https://github.com/gridap/GridapGmsh.jl) interface as follows:

```julia
using Gridap
using GridapGmsh

model=GmshDiscreteModel("mesh/prism_mesh_simple_3d.msh")

```

However, I encountered the following error:

```julia
Info : Reading 'mesh/prism_mesh_simple_3d.msh'...
Info : 57275 nodes
Info : [0%] Creating discrete volume 1
Info : 90004 elements
Info : Done reading 'mesh/prism_mesh_simple_3d.msh'
ERROR: Unsupported element. Prism 6, elemType: 6
Stacktrace:
  [1] error(s::String)
    @ Base .\error.jl:35
  [2] _polytope_from_etype(gmsh::Module, etype::Int32)
    @ GridapGmsh C:\Users\q1009\.julia\packages\GridapGmsh\ZGvkt\src\GmshDiscreteModels.jl:458
  [3] _lagrangian_reffe_from_etype(gmsh::Module, etype::Int32)
    @ GridapGmsh C:\Users\q1009\.julia\packages\GridapGmsh\ZGvkt\src\GmshDiscreteModels.jl:464
  [4] _reffe_from_etype
    @ C:\Users\q1009\.julia\packages\GridapGmsh\ZGvkt\src\GmshDiscreteModels.jl:438 [inlined]
  [5] _get_lnode_to_glnode(gmsh::Module, etype::Int32)
    @ GridapGmsh C:\Users\q1009\.julia\packages\GridapGmsh\ZGvkt\src\GmshDiscreteModels.jl:509
  [6] _setup_etype_to_lnode_to_glnode(elemTypes::Vector{Int32}, gmsh::Module)
    @ GridapGmsh C:\Users\q1009\.julia\packages\GridapGmsh\ZGvkt\src\GmshDiscreteModels.jl:492
  [7] _setup_connectivity(gmsh::Module, d::Int64, node_to_vertex::UnitRange{Int64}, orient_if_simplex::Bool)
    @ GridapGmsh C:\Users\q1009\.julia\packages\GridapGmsh\ZGvkt\src\GmshDiscreteModels.jl:276
  [8] _setup_grid(gmsh::Module, Dc::Int64, Dp::Int64, node_to_coords::Vector{…}, node_to_vertex::UnitRange{…}; has_affine_map::Nothing)
    @ GridapGmsh C:\Users\q1009\.julia\packages\GridapGmsh\ZGvkt\src\GmshDiscreteModels.jl:89
  [9] GmshDiscreteModel(gmsh::Module; has_affine_map::Nothing)
    @ GridapGmsh C:\Users\q1009\.julia\packages\GridapGmsh\ZGvkt\src\GmshDiscreteModels.jl:36
 [10] GmshDiscreteModel
    @ C:\Users\q1009\.julia\packages\GridapGmsh\ZGvkt\src\GmshDiscreteModels.jl:30 [inlined]
 [11] GmshDiscreteModel(mshfile::String; renumber::Bool, has_affine_map::Nothing)
    @ GridapGmsh C:\Users\q1009\.julia\packages\GridapGmsh\ZGvkt\src\GmshDiscreteModels.jl:25
 [12] GmshDiscreteModel(mshfile::String)
    @ GridapGmsh C:\Users\q1009\.julia\packages\GridapGmsh\ZGvkt\src\GmshDiscreteModels.jl:12
 [13] top-level scope
    @ d:\StudyLocal\code\ferrite\0918\GaN_gridap_base\scripts\GaN_sim.jl:48
Some type information was truncated. Use `show(err)` to see complete types.

```

It seems that prism elements (etype: 6) are unsupported in GridapGmsh, which raises the error. I would like to know if **Gridap.jl supports solving PDEs on prism (wedge) elements** and **how to properly load this type of grid**. Is there a workaround, such as **manually constructing the grid** in Gridap, or another approach I should consider?
