Skip to main content
6 of 8
added 77 characters in body
Stratus
  • 3k
  • 13
  • 25

How to generate a mesh with quadrilateral elements?

I have the following code that generates a finite element mesh:

Needs["NDSolve`FEM`"]       
order = 2;
mesh = ToElementMesh[
DiscretizeGraphics[
GraphicsComplex[{{0, 4}, {5, 4}, {5, 0}, {8, 0}, {8, 8}, {0, 8}}, 
Polygon[{1, 2, 3, 4, 5, 6}]]], "MeshElementType" -> QuadElement, 
"MeshOrder" -> order, "NodeReordering" -> True]
mesh["Wireframe"]

I'm indicating that the element type i want is a quadrilateral type ("MeshElementType" -> QuadElement), but it still creates a mesh of triangles. Can i change this?

Related paper: https://onlinelibrary.wiley.com/doi/full/10.1002/cae.21958

enter image description here

Stratus
  • 3k
  • 13
  • 25