# \#mesh

**URL:** https://fenicsproject.discourse.group/tag/mesh/2.md

[Latest](https://fenicsproject.discourse.group/latest.md) · [Categories](https://fenicsproject.discourse.group/categories.md) · [Tags](https://fenicsproject.discourse.group/tags.md)

---

## [Mass matrix between non matching meshes](https://fenicsproject.discourse.group/t/mass-matrix-between-non-matching-meshes/19835)

<div class="topic-metadata">

**Author:** [@JanvdW](https://fenicsproject.discourse.group/u/JanvdW)\
**Replies:** 1\
**Last updated:** [September 29, 2026, 3:14am UTC](https://fenicsproject.discourse.group/t/mass-matrix-between-non-matching-meshes/19835 "2026-09-29T03:14:26Z")

</div>

Hi, I have the following setup. I have two finite element spaces, T\_h and T\_H. The mesh of T\_h is a true refinement of the mesh of T\_H. Also, T\_h uses a cg Lagrange basis of degree one, while T\_H uses a dg Legendre basi…

---

## [Algorithms for Adaptive Mesh Refinement /and/ Coarsening in FEniCS](https://fenicsproject.discourse.group/t/algorithms-for-adaptive-mesh-refinement-and-coarsening-in-fenics/19793)

<div class="topic-metadata">

**Author:** [@zaccandels](https://fenicsproject.discourse.group/u/zaccandels)\
**Replies:** 1\
**Last updated:** [September 21, 2026, 8:02pm UTC](https://fenicsproject.discourse.group/t/algorithms-for-adaptive-mesh-refinement-and-coarsening-in-fenics/19793 "2026-09-21T20:02:37Z")

</div>

Hi everyone, I’m using FEniCS 2019.1.0 to simulate a problem with a moving interface. It would be very nice to implement an algorithm for adaptive mesh refinement and coarsening. I’ve done some digging, and while I have…

---

## [Memory allocation error when reading in cell tags from a pre-defined mesh file](https://fenicsproject.discourse.group/t/memory-allocation-error-when-reading-in-cell-tags-from-a-pre-defined-mesh-file/19808)

<div class="topic-metadata">

**Author:** [@Lev](https://fenicsproject.discourse.group/u/Lev)\
**Replies:** 3\
**Last updated:** [September 9, 2026, 7:49am UTC](https://fenicsproject.discourse.group/t/memory-allocation-error-when-reading-in-cell-tags-from-a-pre-defined-mesh-file/19808 "2026-09-09T07:49:46Z")

</div>

I’m trying to load a mesh from an XDMF and H5 file (created in Gmsh) using the following code: from mpi4py import MPI # Create the MPI communicator comm = MPI.COMM\_WORLD import dolfinx # using dolfinx v0.7.2 import nu…

---

## [How to extract oriented facet connectivity from a mesh?](https://fenicsproject.discourse.group/t/how-to-extract-oriented-facet-connectivity-from-a-mesh/19797)

<div class="topic-metadata">

**Author:** [@MathPhy42](https://fenicsproject.discourse.group/u/MathPhy42)\
**Replies:** 4\
**Last updated:** [August 14, 2026, 3:22pm UTC](https://fenicsproject.discourse.group/t/how-to-extract-oriented-facet-connectivity-from-a-mesh/19797 "2026-08-14T15:22:23Z")

</div>

Hi everyone, I’m trying to extract the (oriented) connectivity array for a surface of my mesh, which can lie on the boundary or be an internal surface as well. I know you can simply get the connectivity array calling f2…

---

## [Plot of quadrilateral mesh shows triangles](https://fenicsproject.discourse.group/t/plot-of-quadrilateral-mesh-shows-triangles/19785)

<div class="topic-metadata">

**Author:** [@William\_Graham](https://fenicsproject.discourse.group/u/William_Graham)\
**Replies:** 5\
**Last updated:** [July 29, 2026, 8:19am UTC](https://fenicsproject.discourse.group/t/plot-of-quadrilateral-mesh-shows-triangles/19785 "2026-07-29T08:19:23Z")

</div>

I’m running fenics 0.11, downloaded via conda, on macOS 13.7.7. To familiarise myself with fenics, I’ve been editing the example in Chapter 1 of the tutorial. I changed the cell type to quadrilateral, but still see a m…

---

## [Parallel Mesh Generation Using mshr and Legacy FEniCS](https://fenicsproject.discourse.group/t/parallel-mesh-generation-using-mshr-and-legacy-fenics/19687)

<div class="topic-metadata">

**Author:** [@zaccandels](https://fenicsproject.discourse.group/u/zaccandels)\
**Replies:** 3\
**Last updated:** [July 6, 2026, 5:05pm UTC](https://fenicsproject.discourse.group/t/parallel-mesh-generation-using-mshr-and-legacy-fenics/19687 "2026-07-06T17:05:43Z")

</div>

Hi everyone, I’m using FEniCS 2019.1.0 with mshr. From what I understand, mshr is serial only - however, is there a way to modify meshes generated with mshr so that I can use MPI parallelization? Consider as an example…

---

## [Challenges in reproducing phase-field fracture benchmark: Unphysical crack trajectory and mesh refinement behavior](https://fenicsproject.discourse.group/t/challenges-in-reproducing-phase-field-fracture-benchmark-unphysical-crack-trajectory-and-mesh-refinement-behavior/19720)

<div class="topic-metadata">

**Author:** [@Zylora126](https://fenicsproject.discourse.group/u/Zylora126)\
**Replies:** 11\
**Last updated:** [July 1, 2026, 3:06pm UTC](https://fenicsproject.discourse.group/t/challenges-in-reproducing-phase-field-fracture-benchmark-unphysical-crack-trajectory-and-mesh-refinement-behavior/19720 "2026-07-01T15:06:57Z")

</div>

Hi, every FEniCSx uesrs. I’m implementing an adaptive phase-field fracture model in FEniCSx (dolfinx), closely following the approach in Giri et al. (2025, Finite Elements in Analysis and Design). The benchmark is a 1×1 …

---

## [Application of Periodic Boundary Conditions with Unstructured Mesh](https://fenicsproject.discourse.group/t/application-of-periodic-boundary-conditions-with-unstructured-mesh/19750)

<div class="topic-metadata">

**Author:** [@zaccandels](https://fenicsproject.discourse.group/u/zaccandels)\
**Replies:** 1\
**Last updated:** [June 29, 2026, 12:33pm UTC](https://fenicsproject.discourse.group/t/application-of-periodic-boundary-conditions-with-unstructured-mesh/19750 "2026-06-29T12:33:04Z")

</div>

Hi everyone, I’m using FEniCS 2019.1.0 to simulate the advection of a moving peak - ie, I’m solving the PDE \\frac{\\partial u}{\\partial t} + \\mathbf{a} \\cdot \\nabla u = 0 on the domain \\Omega = (0,1) \\times (0,1) with…

---

## [Importing XMDF file into workspace file](https://fenicsproject.discourse.group/t/importing-xmdf-file-into-workspace-file/19740)

<div class="topic-metadata">

**Author:** [@shivam](https://fenicsproject.discourse.group/u/shivam)\
**Replies:** 2\
**Last updated:** [June 24, 2026, 7:19pm UTC](https://fenicsproject.discourse.group/t/importing-xmdf-file-into-workspace-file/19740 "2026-06-24T19:19:25Z")

</div>

Hey y’all. I am working on an indentation model with penalty formulation. I have had a Python file which included both the generation of the mesh with Gmsh and solving the problem out, but as the project continues it was…

---

## [Possible Bug in mesh refinement](https://fenicsproject.discourse.group/t/possible-bug-in-mesh-refinement/19732)

<div class="topic-metadata">

**Author:** [@JanvdW](https://fenicsproject.discourse.group/u/JanvdW)\
**Replies:** 3\
**Last updated:** [June 11, 2026, 2:22pm UTC](https://fenicsproject.discourse.group/t/possible-bug-in-mesh-refinement/19732 "2026-06-11T14:22:45Z")

</div>

Hi, I am new to the Fenics project and dolfinx. So forgive me, if I misunderstand something. When experimenting with dolfinx for mesh refinement, I stumbled on some behavior I cannot explain to my self. Here is my cod…

---

## [Elastic solver code layout improvements and displacement at required node](https://fenicsproject.discourse.group/t/elastic-solver-code-layout-improvements-and-displacement-at-required-node/19716)

<div class="topic-metadata">

**Author:** [@alex24](https://fenicsproject.discourse.group/u/alex24)\
**Replies:** 4\
**Last updated:** [June 2, 2026, 8:06pm UTC](https://fenicsproject.discourse.group/t/elastic-solver-code-layout-improvements-and-displacement-at-required-node/19716 "2026-06-02T20:06:20Z")

</div>

Hi, I wrote the following simple code to solve for linear elasticity and to compute the maximum principal stress. The displacement elements are linear and the computed stresses are interpolated to a DG 0 space. My fi…

---

## [Conversion of .mphtxt that comsol exports to mesh usable for fenics legacy](https://fenicsproject.discourse.group/t/conversion-of-mphtxt-that-comsol-exports-to-mesh-usable-for-fenics-legacy/19705)

<div class="topic-metadata">

**Author:** [@Zubair\_Shah](https://fenicsproject.discourse.group/u/Zubair_Shah)\
**Replies:** 2\
**Last updated:** [May 16, 2026, 8:27pm UTC](https://fenicsproject.discourse.group/t/conversion-of-mphtxt-that-comsol-exports-to-mesh-usable-for-fenics-legacy/19705 "2026-05-16T20:27:07Z")

</div>

Dear All, I am trying to use a COMSOL mesh exported in .mphtxt format with legacy FEniCS. However, I am not sure how to convert this format into one that can be used in my FEniCS code. Currently, my workflow uses the X…

---

## [Can not implement a spectral element method](https://fenicsproject.discourse.group/t/can-not-implement-a-spectral-element-method/19680)

<div class="topic-metadata">

**Author:** [@mariom121](https://fenicsproject.discourse.group/u/mariom121)\
**Replies:** 1\
**Last updated:** [May 9, 2026, 1:27am UTC](https://fenicsproject.discourse.group/t/can-not-implement-a-spectral-element-method/19680 "2026-05-09T01:27:51Z")

</div>

Dear Fenics community, inspired by the post Does Fenicsx support spectral element methods? , I built an attempt to apply spectral element methods to the computation of an eigenvalue problem (specifically, the quasi-norma…

---

## [Issue with mapping mesh facets to submesh facets using sub\_topology\_to\_topology](https://fenicsproject.discourse.group/t/issue-with-mapping-mesh-facets-to-submesh-facets-using-sub-topology-to-topology/19691)

<div class="topic-metadata">

**Author:** [@rbulle1](https://fenicsproject.discourse.group/u/rbulle1)\
**Replies:** 6\
**Last updated:** [May 7, 2026, 8:03am UTC](https://fenicsproject.discourse.group/t/issue-with-mapping-mesh-facets-to-submesh-facets-using-sub-topology-to-topology/19691 "2026-05-07T08:03:31Z")

</div>

Hello! I’m trying to map a dolfinx.la.vector defined from the index\_map corresponding to the facets (codim = 1) of a mesh to another dolfinx.la.vector defined from a similar index\_map but coming from the sub\_topology of…

---

## [MPI Error: 'Invalid rank, error stack' when reading mesh](https://fenicsproject.discourse.group/t/mpi-error-invalid-rank-error-stack-when-reading-mesh/17511)

<div class="topic-metadata">

**Author:** [@mame](https://fenicsproject.discourse.group/u/mame)\
**Replies:** 5\
**Last updated:** [May 1, 2026, 7:10am UTC](https://fenicsproject.discourse.group/t/mpi-error-invalid-rank-error-stack-when-reading-mesh/17511 "2026-05-01T07:10:51Z")

</div>

Hi everyone, I am trying to get my first 3D project to work. I have this simple script to just read a mesh I created from a .geo file in Gmsh 4.13.1 (.geo file at the very end): from mpi4py import MPI import dolfinx.io…

---

## [How to implement custom quadrature rule?](https://fenicsproject.discourse.group/t/how-to-implement-custom-quadrature-rule/19628)

<div class="topic-metadata">

**Author:** [@TorchMindCipher](https://fenicsproject.discourse.group/u/TorchMindCipher)\
**Replies:** 2\
**Last updated:** [April 1, 2026, 12:25pm UTC](https://fenicsproject.discourse.group/t/how-to-implement-custom-quadrature-rule/19628 "2026-04-01T12:25:01Z")

</div>

Hello, I would like to know if it is possible and if so, how to implement a custom quadrature rule in dolfinx? I am currently working on the third medium contact method and need the Gauss-Lobatto-Legendre quadrature. I…

---

## [Second order meshes interpolation error](https://fenicsproject.discourse.group/t/second-order-meshes-interpolation-error/19544)

<div class="topic-metadata">

**Author:** [@chenyongxin](https://fenicsproject.discourse.group/u/chenyongxin)\
**Replies:** 14\
**Last updated:** [March 20, 2026, 11:30am UTC](https://fenicsproject.discourse.group/t/second-order-meshes-interpolation-error/19544 "2026-03-20T11:30:42Z")

</div>

I simulate ALE FSI problem in 3D with 2nd order meshes. In my framework, a remeshing process is needed to interpolate data from the old mesh to the new mesh in every several steps. Here a strange interpolation result is …

---

## [Mesh cannot run due to TypeError](https://fenicsproject.discourse.group/t/mesh-cannot-run-due-to-typeerror/19605)

<div class="topic-metadata">

**Author:** [@yjin6](https://fenicsproject.discourse.group/u/yjin6)\
**Replies:** 4\
**Last updated:** [March 19, 2026, 1:39am UTC](https://fenicsproject.discourse.group/t/mesh-cannot-run-due-to-typeerror/19605 "2026-03-19T01:39:10Z")

</div>

Dear all, my dolfinx.mesh cannot work even for the simplest unit interval mesh generation. Here is the code: from mpi4py import MPI import numpy as np import ufl from dolfinx import mesh comm = MPI.COMM\_WORLD nx …

---

## [Caching in Fenicsx and NFS error](https://fenicsproject.discourse.group/t/caching-in-fenicsx-and-nfs-error/19600)

<div class="topic-metadata">

**Author:** [@vysakh\_r\_nair](https://fenicsproject.discourse.group/u/vysakh_r_nair)\
**Replies:** 3\
**Last updated:** [March 13, 2026, 5:03am UTC](https://fenicsproject.discourse.group/t/caching-in-fenicsx-and-nfs-error/19600 "2026-03-13T05:03:36Z")

</div>

Hello everyone, I am running FEniCSx (dolfinx) simulations on an HPC cluster and recently encountered issues related to JIT caching and NFS load. The cluster administrators observed a large number of NFS operations orig…

---

## [Inconsistencies/ holes in mesh or "DOLFIN encountered an error." While creating a mesh](https://fenicsproject.discourse.group/t/inconsistencies-holes-in-mesh-or-dolfin-encountered-an-error-while-creating-a-mesh/19561)

<div class="topic-metadata">

**Author:** [@ehadi](https://fenicsproject.discourse.group/u/ehadi)\
**Replies:** 9\
**Last updated:** [March 4, 2026, 7:24am UTC](https://fenicsproject.discourse.group/t/inconsistencies-holes-in-mesh-or-dolfin-encountered-an-error-while-creating-a-mesh/19561 "2026-03-04T07:24:35Z")

</div>

Hi all, I am working on a 2D quad mesh into DOLFIN from two .txt files; one containing the nodal coordinates and one containing the element connectivity for 4-node quads. The mesh looks correct in ParaView when exporte…

---

## [Wrong cell area computed in parallel](https://fenicsproject.discourse.group/t/wrong-cell-area-computed-in-parallel/19556)

<div class="topic-metadata">

**Author:** [@chenyongxin](https://fenicsproject.discourse.group/u/chenyongxin)\
**Replies:** 5\
**Last updated:** [February 28, 2026, 7:40am UTC](https://fenicsproject.discourse.group/t/wrong-cell-area-computed-in-parallel/19556 "2026-02-28T07:40:09Z")

</div>

I need area of every cell in the mesh (1st and 2nd order) for the mesh quality calcultion. A DG0 function is used to store area information for every cell in the mesh. However, neither fem.form nor numpy formation works …

---

## [Merging 2d coaxial circular meshes to a 3d model](https://fenicsproject.discourse.group/t/merging-2d-coaxial-circular-meshes-to-a-3d-model/19518)

<div class="topic-metadata">

**Author:** [@BlastPhemer](https://fenicsproject.discourse.group/u/BlastPhemer)\
**Replies:** 1\
**Last updated:** [February 20, 2026, 12:04pm UTC](https://fenicsproject.discourse.group/t/merging-2d-coaxial-circular-meshes-to-a-3d-model/19518 "2026-02-20T12:04:09Z")

</div>

I have a set of 2d meshes that i read from .msh files. Each 2d mesh is z=const circle with exact number of nodes in each layer. Layers differ by the circle radius and the z-position. All the layers are coaxial and I need…

---

## [Problem with nested submeshes](https://fenicsproject.discourse.group/t/problem-with-nested-submeshes/19439)

<div class="topic-metadata">

**Author:** [@Ergonsa](https://fenicsproject.discourse.group/u/Ergonsa)\
**Replies:** 7\
**Last updated:** [February 13, 2026, 9:32am UTC](https://fenicsproject.discourse.group/t/problem-with-nested-submeshes/19439 "2026-02-13T09:32:20Z")

</div>

Hello everyone! I have been working recently in a magneto-mechanical problem in which I have several permanent magnets pointing to a solid shere (partially hollow, for BC imposition) which is sensible to magnetic stimuli…

---

## [Importing 3D mesh](https://fenicsproject.discourse.group/t/importing-3d-mesh/19341)

<div class="topic-metadata">

**Author:** [@Zeinab\_javid](https://fenicsproject.discourse.group/u/Zeinab_javid)\
**Replies:** 2\
**Last updated:** [February 5, 2026, 2:25pm UTC](https://fenicsproject.discourse.group/t/importing-3d-mesh/19341 "2026-02-05T14:25:11Z")

</div>

Hello, I have a Questions regarding import a 3D mesh into Fenics code from COMSOL I have a lattice cell and I set a Periodic Boundary conditions to this model, Now can I export the Periodic mesh into Fenics ?

---

## [Non-linear Multiphysics on subdomain error](https://fenicsproject.discourse.group/t/non-linear-multiphysics-on-subdomain-error/19360)

<div class="topic-metadata">

**Author:** [@swgoldpf](https://fenicsproject.discourse.group/u/swgoldpf)\
**Replies:** 2\
**Last updated:** [January 17, 2026, 1:56pm UTC](https://fenicsproject.discourse.group/t/non-linear-multiphysics-on-subdomain-error/19360 "2026-01-17T13:56:58Z")

</div>

Hello. I am trying to solve a coupled system of non-linear equations that define on part of mesh, following examples Multiphysics: Solving PDEs on subdomains and Coupling PDEs of multiple dimensions from FEniCS-workshop…

---

## [Computing mesh quality after updating domain.geometry.x (scaled\_jacobian should be negative but stays positive)](https://fenicsproject.discourse.group/t/computing-mesh-quality-after-updating-domain-geometry-x-scaled-jacobian-should-be-negative-but-stays-positive/18466)

<div class="topic-metadata">

**Author:** [@jialu\_gao](https://fenicsproject.discourse.group/u/jialu_gao)\
**Replies:** 5\
**Last updated:** [December 12, 2025, 2:43am UTC](https://fenicsproject.discourse.group/t/computing-mesh-quality-after-updating-domain-geometry-x-scaled-jacobian-should-be-negative-but-stays-positive/18466 "2025-12-12T02:43:29Z")

</div>

Hi all, I am trying to compute the mesh quality (scaled Jacobian) after a Lagrangian-type displacement step, where I manually modify the mesh coordinates via domain.geometry.x. Conceptually, some elements should be inve…

---

## [Mpirun performs mesh generation](https://fenicsproject.discourse.group/t/mpirun-performs-mesh-generation/18456)

<div class="topic-metadata">

**Author:** [@ZhangQi](https://fenicsproject.discourse.group/u/ZhangQi)\
**Replies:** 7\
**Last updated:** [December 10, 2025, 10:08am UTC](https://fenicsproject.discourse.group/t/mpirun-performs-mesh-generation/18456 "2025-12-10T10:08:24Z")

</div>

Hello, Dear Professor. This is a function that I wrote about generating moving meshes base on Can’t create 1D mesh in parallel, where Ulh is the numerical result of calculations on the original mesh, mesh modification wi…

---

## [Interpolation from submesh to mesh error by parallel computing?](https://fenicsproject.discourse.group/t/interpolation-from-submesh-to-mesh-error-by-parallel-computing/18452)

<div class="topic-metadata">

**Author:** [@c4t4str0ph3](https://fenicsproject.discourse.group/u/c4t4str0ph3)\
**Replies:** 4\
**Last updated:** [December 8, 2025, 7:05pm UTC](https://fenicsproject.discourse.group/t/interpolation-from-submesh-to-mesh-error-by-parallel-computing/18452 "2025-12-08T19:05:14Z")

</div>

Hello everyone, I am trying to interpolate the result from submesh 1 to mesh 0 by the method from test\_interpolation. When I run the code by a single core, like python3 test.py, everything is good. However, if I try it …

---

## [Surface element in fenics](https://fenicsproject.discourse.group/t/surface-element-in-fenics/18433)

<div class="topic-metadata">

**Author:** [@Haibo\_Ni](https://fenicsproject.discourse.group/u/Haibo_Ni)\
**Replies:** 1\
**Last updated:** [November 29, 2025, 7:20am UTC](https://fenicsproject.discourse.group/t/surface-element-in-fenics/18433 "2025-11-29T07:20:46Z")

</div>

Hi all, I would like to solve a diffusion problem on a shell-like surface mesh (3D). Does the legacy fenics or fenicsx support 3D surface elements? Any suggestions will be deeply appreciated. Thanks

---

## [How do I wrap an object around another correctly](https://fenicsproject.discourse.group/t/how-do-i-wrap-an-object-around-another-correctly/18430)

<div class="topic-metadata">

**Author:** [@iTunZ](https://fenicsproject.discourse.group/u/iTunZ)\
**Replies:** 0\
**Last updated:** [November 28, 2025, 6:35am UTC](https://fenicsproject.discourse.group/t/how-do-i-wrap-an-object-around-another-correctly/18430 "2025-11-28T06:35:47Z")

</div>

Hello guys, I am a beginner to fenicsx, and I am trying to wrap an elastic band around a circle, setting the boundary conditions for the left and right edges to meet at the top. I am either doing it wrong, or pyvista ca…

[Next page](https://fenicsproject.discourse.group/tag/mesh/2.md?match_all_tags=true&page=1&tags%5B%5D=mesh)
