← Back to team overview

dolfin team mailing list archive

Re: [Question #115551]: hexahedral mesh

 

On Wed, Jun 23, 2010 at 03:11:41PM -0000, Lars wrote:
> New question #115551 on DOLFIN:
> https://answers.launchpad.net/dolfin/+question/115551
>
> Hello,
> I wonder if I can create hexahedral meshes in Dolfin?
> The hexahedron is listed as one of the reference cells in the Dolfin user guide.
> But the following python snippet fails with 'RuntimeError: *** Error: Unknown cell type "hexahedron"':
>
>   from dolfin import *
>   mesh=Mesh();
>   e=MeshEditor()
>   e.open(mesh,'hexahedron',3,3)
>
> Diving into dolfin-0.9.7/dolfin/mesh/MeshEditor.cpp I find the open function:
>
>   void MeshEditor::open(Mesh& mesh, std::string type, uint tdim, uint gdim)
>   {
>   if (type == "point")
>     open(mesh, CellType::point, tdim, gdim);
>   else if (type == "interval")
>     open(mesh, CellType::interval, tdim, gdim);
>   else if (type == "triangle")
>     open(mesh, CellType::triangle, tdim, gdim);
>   else if (type == "tetrahedron")
>     open(mesh, CellType::tetrahedron, tdim, gdim);
>   else
>     error("Unknown cell type \"%s\".", type.c_str());
>   }
>
> Apparently hexahedrons and quadrilaterals are not supported.
> Can I somehow create a hexahedral mesh?
> If not, what is the purpose of the hexahedron cell type?

It's there if someone wants to go ahead and implement it.

It is essentially supported by the mesh data structure, but there is
no MeshEditor for it, no built-in hexahedral meshes, and probably
assumptions on simplex meshes in a few places.

--
Anders

Attachment: signature.asc
Description: Digital signature


Follow ups

References