# General Discussion

**URL:** https://community.freefem.org/c/general-discussion/7.md

[Latest](https://community.freefem.org/latest.md) · [Categories](https://community.freefem.org/categories.md)

---

## [FreeFEM extension for Visual Studio Code](https://community.freefem.org/t/freefem-extension-for-visual-studio-code/3363)

<div class="topic-metadata">

**Author:** [@phtournier](https://community.freefem.org/u/phtournier)\
**Replies:** 0\
**Last updated:** [June 28, 2024, 10:54am UTC](https://community.freefem.org/t/freefem-extension-for-visual-studio-code/3363 "2024-06-28T10:54:49Z")

</div>

An update to the FreeFEM extension for the Visual Studio Code IDE ( VS Code) has dropped ! In addition to providing syntax highlighting for your FreeFEM scripts, it now allows you to run the currently open FreeFEM .edp …

---

## [About general discussion](https://community.freefem.org/t/about-general-discussion/1450)

<div class="topic-metadata">

**Author:** [@simon.garnotel](https://community.freefem.org/u/simon.garnotel)\
**Replies:** 0\
**Last updated:** [January 24, 2022, 2:17pm UTC](https://community.freefem.org/t/about-general-discussion/1450 "2022-01-24T14:17:45Z")

</div>

Writing code To display inline code, you should write it between backticks (\`). If you want to display a code block, you should write your code between three backticks. For example: \`inline code\` will render as inlin…

---

## [About the General Discussion category](https://community.freefem.org/t/about-the-general-discussion-category/15)

<div class="topic-metadata">

**Author:** [@franck.lahaye](https://community.freefem.org/u/franck.lahaye)\
**Replies:** 1\
**Last updated:** [November 15, 2023, 4:29pm UTC](https://community.freefem.org/t/about-the-general-discussion-category/15 "2023-11-15T16:29:17Z")

</div>

Numerical simulation related discussions and news

---

## [Welcome to the FreeFEM Community](https://community.freefem.org/t/welcome-to-the-freefem-community/7)

<div class="topic-metadata">

**Author:** [@franck.lahaye](https://community.freefem.org/u/franck.lahaye)\
**Replies:** 0\
**Last updated:** [March 29, 2019, 1:39pm UTC](https://community.freefem.org/t/welcome-to-the-freefem-community/7 "2019-03-29T13:39:17Z")

</div>

Discussions are open to all, from beginners to experts and researchers to engineers. Feel free to share your problems, EDP, feature requests, or to discuss the latest advancements in numerical simulation. To create a ne…

---

## [Stochastic Stokes periodic boundary conditions in freefem crash on launch](https://community.freefem.org/t/stochastic-stokes-periodic-boundary-conditions-in-freefem-crash-on-launch/4362)

<div class="topic-metadata">

**Author:** [@Sylvia](https://community.freefem.org/u/Sylvia)\
**Replies:** 1\
**Last updated:** [September 19, 2026, 10:09am UTC](https://community.freefem.org/t/stochastic-stokes-periodic-boundary-conditions-in-freefem-crash-on-launch/4362 "2026-09-19T10:09:49Z")

</div>

Hello everyone, I am reproducing the temporal convergence rate experiment from this paper. I have removed the Dirichlet boundary conditions and added periodic boundary conditions. The program exits automatically after a…

---

## [Open zoom session of last Monday of the month](https://community.freefem.org/t/open-zoom-session-of-last-monday-of-the-month/4360)

<div class="topic-metadata">

**Author:** [@frederichecht](https://community.freefem.org/u/frederichecht)\
**Replies:** 0\
**Last updated:** [September 18, 2026, 1:41pm UTC](https://community.freefem.org/t/open-zoom-session-of-last-monday-of-the-month/4360 "2026-09-18T13:41:05Z")

</div>

On monday 28th of september 2026 The open zoom session of last monday of the month restart The meeting will be short (l less 1 hour) a 10h00 Paris Time CEST (UTC+2) Frédéric Hecht vous invite à une réunion Zoom progr…

---

## [About "convect" function](https://community.freefem.org/t/about-convect-function/4348)

<div class="topic-metadata">

**Author:** [@Nayda](https://community.freefem.org/u/Nayda)\
**Replies:** 3\
**Last updated:** [September 18, 2026, 9:51am UTC](https://community.freefem.org/t/about-convect-function/4348 "2026-09-18T09:51:49Z")

</div>

Hello. I would like to learn more about the convect function. Am I right to say this uses an explicit Euler method, together with a FEM interpolation? Where can I find, on the code, how it was implemented? Thank you! …

---

## [Weak Scalability test of 3D heat equation with hypre as a preconditioner](https://community.freefem.org/t/weak-scalability-test-of-3d-heat-equation-with-hypre-as-a-preconditioner/4356)

<div class="topic-metadata">

**Author:** [@zxss](https://community.freefem.org/u/zxss)\
**Replies:** 3\
**Last updated:** [September 10, 2026, 12:59pm UTC](https://community.freefem.org/t/weak-scalability-test-of-3d-heat-equation-with-hypre-as-a-preconditioner/4356 "2026-09-10T12:59:50Z")

</div>

Dear all, I am learning the parallel scalability, and I want to start with a 3D heat equation with hypre as its preconditioner. My program is as following which is run on hpc Aire with 1, 2, 4, 8, 16 processes. To make …

---

## [Need help understand the varf command](https://community.freefem.org/t/need-help-understand-the-varf-command/4355)

<div class="topic-metadata">

**Author:** [@EChase](https://community.freefem.org/u/EChase)\
**Replies:** 1\
**Last updated:** [September 4, 2026, 8:12am UTC](https://community.freefem.org/t/need-help-understand-the-varf-command/4355 "2026-09-04T08:12:44Z")

</div>

I am trying to use the varf command to generate a mass matrix for a cylinder, for an axisymmetric problem. I have been very successful in creating error messages, but not a working mass matrix. Could you please help id…

---

## [Deformed mesh plot displaced](https://community.freefem.org/t/deformed-mesh-plot-displaced/4354)

<div class="topic-metadata">

**Author:** [@wrg11](https://community.freefem.org/u/wrg11)\
**Replies:** 2\
**Last updated:** [September 3, 2026, 1:55pm UTC](https://community.freefem.org/t/deformed-mesh-plot-displaced/4354 "2026-09-03T13:55:49Z")

</div>

I’ve computed a solution for a solid wave in a rectangular bar. This particular case has an analytical solution, and line plots confirm that it’s been found. However, plots of the deformed mesh have unexpected creases,…

---

## [Heat equation with PETSc : How can the global solution be obtained from the solutions on the subdomains?](https://community.freefem.org/t/heat-equation-with-petsc-how-can-the-global-solution-be-obtained-from-the-solutions-on-the-subdomains/4329)

<div class="topic-metadata">

**Author:** [@chalmi](https://community.freefem.org/u/chalmi)\
**Replies:** 3\
**Last updated:** [August 31, 2026, 9:09am UTC](https://community.freefem.org/t/heat-equation-with-petsc-how-can-the-global-solution-be-obtained-from-the-solutions-on-the-subdomains/4329 "2026-08-31T09:09:23Z")

</div>

Hi FreeFem community, I am currently using PETSc to solve the transient heat equation (DMeshCreate), but at each time step I need to compute cost functionals, which require the global solution. How can I obtain the glob…

---

## [Selection of finite element spaces in plasticity computations](https://community.freefem.org/t/selection-of-finite-element-spaces-in-plasticity-computations/4347)

<div class="topic-metadata">

**Author:** [@RYP](https://community.freefem.org/u/RYP)\
**Replies:** 9\
**Last updated:** [August 29, 2026, 1:54am UTC](https://community.freefem.org/t/selection-of-finite-element-spaces-in-plasticity-computations/4347 "2026-08-29T01:54:45Z")

</div>

Hi, everyone I’m working on a plastic computation script testGauss.edp (8.5 KB) using FreeFEM. I use two finite‑element spaces"P1-P0" func Pk = P1; func PkDC = P0; The algorithm is convergent. However, when I switch…

---

## [" convect " function](https://community.freefem.org/t/convect-function/153)

<div class="topic-metadata">

**Author:** [@candy](https://community.freefem.org/u/candy)\
**Replies:** 7\
**Last updated:** [August 27, 2026, 6:57pm UTC](https://community.freefem.org/t/convect-function/153 "2026-08-27T18:57:20Z")

</div>

I want to see the implement of the function " convect ", how can I get the details.

---

## [Question about Voronoi Mesh Implementation in FreeFEM++ (2D)](https://community.freefem.org/t/question-about-voronoi-mesh-implementation-in-freefem-2d/4247)

<div class="topic-metadata">

**Author:** [@Monirul25](https://community.freefem.org/u/Monirul25)\
**Replies:** 3\
**Last updated:** [August 27, 2026, 3:16pm UTC](https://community.freefem.org/t/question-about-voronoi-mesh-implementation-in-freefem-2d/4247 "2026-08-27T15:16:23Z")

</div>

Dear FreeFEM++ Community, I hope you are doing well. I am currently working on a 2D numerical simulation and am interested in using a Voronoi-type mesh for my HHO problem. As far as I understand, FreeFEM++ primarily su…

---

## [Command for third order derivative](https://community.freefem.org/t/command-for-third-order-derivative/4057)

<div class="topic-metadata">

**Author:** [@debendra](https://community.freefem.org/u/debendra)\
**Replies:** 7\
**Last updated:** [August 27, 2026, 2:05pm UTC](https://community.freefem.org/t/command-for-third-order-derivative/4057 "2026-08-27T14:05:11Z")

</div>

// Third derivative example in FreeFem++ load “msh3” // only if you want 3D later, otherwise optional // Define mesh mesh Th = square(10, 10); // Define finite element space (need degree \>= 3 for 3rd derivatives) fe…

---

## [Error in the solve routine for dynamic loading of an axisymmetric disc](https://community.freefem.org/t/error-in-the-solve-routine-for-dynamic-loading-of-an-axisymmetric-disc/4341)

<div class="topic-metadata">

**Author:** [@EChase](https://community.freefem.org/u/EChase)\
**Replies:** 2\
**Last updated:** [August 24, 2026, 3:47pm UTC](https://community.freefem.org/t/error-in-the-solve-routine-for-dynamic-loading-of-an-axisymmetric-disc/4341 "2026-08-24T15:47:10Z")

</div>

Good morning I’m trying to build a simple model of a disc, constrained at the center, with a dynamic axial load applied at its radius. Ultimately, I’d like to use the displacement at the outer diameter as a chekc on re…

---

## [What is the purpose of O = Loc in set](https://community.freefem.org/t/what-is-the-purpose-of-o-loc-in-set/4340)

<div class="topic-metadata">

**Author:** [@kpessou](https://community.freefem.org/u/kpessou)\
**Replies:** 3\
**Last updated:** [August 17, 2026, 7:46pm UTC](https://community.freefem.org/t/what-is-the-purpose-of-o-loc-in-set/4340 "2026-08-17T19:46:02Z")

</div>

In the following code (Helmholtz-2d-PETSc-complex.edp) : What is the purpose of the argument: " O = Loc" in the command set(…)? // run with MPI: ff-mpirun -np 4 script.edp // NBPROC 4 load "PETSc-complex" …

---

## [Strange behavior with MatLoad](https://community.freefem.org/t/strange-behavior-with-matload/2270)

<div class="topic-metadata">

**Author:** [@aszaboa](https://community.freefem.org/u/aszaboa)\
**Replies:** 10\
**Last updated:** [July 28, 2026, 2:24am UTC](https://community.freefem.org/t/strange-behavior-with-matload/2270 "2026-07-28T02:24:25Z")

</div>

Dear FreeFem users, I would like to use ObjectView and MatLoad for saving the PETSc numbering solution (vectors) in binary, possible to dome post-processing in Matlab, etc. However, when I am loading the results back in…

---

## [Problem of equation solving after MatLoad](https://community.freefem.org/t/problem-of-equation-solving-after-matload/4335)

<div class="topic-metadata">

**Author:** [@RYP](https://community.freefem.org/u/RYP)\
**Replies:** 3\
**Last updated:** [July 28, 2026, 2:19am UTC](https://community.freefem.org/t/problem-of-equation-solving-after-matload/4335 "2026-07-28T02:19:51Z")

</div>

Hi, everyone I have recently been learning parallel programming with PETSc and encountered an issue regarding MatLoad. I want to use MatLoad to load a previously saved matrix and then solve a system of linear equations,…

---

## ['plotD' and 'plotDmesh' don't work](https://community.freefem.org/t/plotd-and-plotdmesh-dont-work/3602)

<div class="topic-metadata">

**Author:** [@QZH\_xia](https://community.freefem.org/u/QZH_xia)\
**Replies:** 6\
**Last updated:** [July 25, 2026, 7:36am UTC](https://community.freefem.org/t/plotd-and-plotdmesh-dont-work/3602 "2026-07-25T07:36:47Z")

</div>

Hello, I have just started learning FreeFEM and have independently compiled FreeFEM on an Ubuntu 22.04 system. When studying the code, the plot function runs normally, but the following code does not display any image w…

---

## [Anti-periodic boundary condition](https://community.freefem.org/t/anti-periodic-boundary-condition/2220)

<div class="topic-metadata">

**Author:** [@Banana](https://community.freefem.org/u/Banana)\
**Replies:** 2\
**Last updated:** [July 23, 2026, 6:21pm UTC](https://community.freefem.org/t/anti-periodic-boundary-condition/2220 "2026-07-23T18:21:44Z")

</div>

Hi, I am new to FreeFem and I know one can impose the periodic boundary condition on, say a square, by periodic=\[\[2, y\], \[4, y\], \[1, x\], \[3, x\]\] but I am wondering how to impose an “anti-periodic” boundary condition, nam…

---

## [How to load a saved PETSc matrix in FreeFEM](https://community.freefem.org/t/how-to-load-a-saved-petsc-matrix-in-freefem/4333)

<div class="topic-metadata">

**Author:** [@kpessou](https://community.freefem.org/u/kpessou)\
**Replies:** 1\
**Last updated:** [July 22, 2026, 1:49pm UTC](https://community.freefem.org/t/how-to-load-a-saved-petsc-matrix-in-freefem/4333 "2026-07-22T13:49:01Z")

</div>

I use ObjectView to export PETSc matrices in FreeFEM. Is there a simple way or function (like MatLoad) to load a previously saved matrix (.dat) back into FreeFEM?

---

## [Mesh generation for perforated Torus](https://community.freefem.org/t/mesh-generation-for-perforated-torus/4325)

<div class="topic-metadata">

**Author:** [@AlexMcSD](https://community.freefem.org/u/AlexMcSD)\
**Replies:** 4\
**Last updated:** [July 17, 2026, 2:21pm UTC](https://community.freefem.org/t/mesh-generation-for-perforated-torus/4325 "2026-07-17T14:21:24Z")

</div>

I am interested in running simulations on a perforated torus, however I am having trouble with the mesh generation. Currently, I create boundaries corresponding to a square and then another set of boundaries coming from …

---

## [Using Blender or STL files in FreeFem](https://community.freefem.org/t/using-blender-or-stl-files-in-freefem/4332)

<div class="topic-metadata">

**Author:** [@captainfreefem](https://community.freefem.org/u/captainfreefem)\
**Replies:** 0\
**Last updated:** [July 17, 2026, 4:36am UTC](https://community.freefem.org/t/using-blender-or-stl-files-in-freefem/4332 "2026-07-17T04:36:26Z")

</div>

Any ideas on using blender file format exports or CAD STL files in Freefem? Can STL files be imported into Freefem. Any ideas how to label the boundaries of the imported mesh. Documentation on the msh or mesh file spec…

---

## [Save the local matrices](https://community.freefem.org/t/save-the-local-matrices/4330)

<div class="topic-metadata">

**Author:** [@kpessou](https://community.freefem.org/u/kpessou)\
**Replies:** 0\
**Last updated:** [July 10, 2026, 11:42am UTC](https://community.freefem.org/t/save-the-local-matrices/4330 "2026-07-10T11:42:52Z")

</div>

Is there a way to display or save the local matrices (per process) to a .dat file after the distributed mesh has been created? macro dimension 2// EOM include "ffddm.idp" macro def(i)\[i, i#B\]// EOM // for d…

---

## [Weak Form of Higher order derivatives](https://community.freefem.org/t/weak-form-of-higher-order-derivatives/1190)

<div class="topic-metadata">

**Author:** [@sumantkr](https://community.freefem.org/u/sumantkr)\
**Replies:** 18\
**Last updated:** [June 28, 2026, 4:24pm UTC](https://community.freefem.org/t/weak-form-of-higher-order-derivatives/1190 "2026-06-28T16:24:44Z")

</div>

Dear all Can we write third or fourth-order derivatives in FreeFEM? However, it is showing identifiers errors while writing third-order derivatives ( like dxxx( u ) ) . Kindly suggest me in solving this issue.

---

## [Issue with Parallelization](https://community.freefem.org/t/issue-with-parallelization/4314)

<div class="topic-metadata">

**Author:** [@goutham2023](https://community.freefem.org/u/goutham2023)\
**Replies:** 10\
**Last updated:** [June 28, 2026, 5:08am UTC](https://community.freefem.org/t/issue-with-parallelization/4314 "2026-06-28T05:08:44Z")

</div>

I am currently learning parallelization in FreeFEM and started with a simple diffusion problem. The serial version works as expected, but after parallelizing it using PETSc and macro\_ddm.idp, the contour plots do not app…

---

## [ In FreeFem++, is the .sol solution file read in the order it was stored?](https://community.freefem.org/t/in-freefem-is-the-sol-solution-file-read-in-the-order-it-was-stored/4307)

<div class="topic-metadata">

**Author:** [@18888597431](https://community.freefem.org/u/18888597431)\
**Replies:** 0\
**Last updated:** [June 13, 2026, 5:19am UTC](https://community.freefem.org/t/in-freefem-is-the-sol-solution-file-read-in-the-order-it-was-stored/4307 "2026-06-13T05:19:30Z")

</div>

In FreeFem++, is the .sol solution file read in the order it was stored?

---

## [Periodic Boundary Conditions for Mixed Finite Element Spaces](https://community.freefem.org/t/periodic-boundary-conditions-for-mixed-finite-element-spaces/4289)

<div class="topic-metadata">

**Author:** [@Sylvia](https://community.freefem.org/u/Sylvia)\
**Replies:** 12\
**Last updated:** [June 12, 2026, 2:55pm UTC](https://community.freefem.org/t/periodic-boundary-conditions-for-mixed-finite-element-spaces/4289 "2026-06-12T14:55:00Z")

</div>

The difficulty with using periodic boundary conditions on separate P2 and P1 finite element spaces in FreeFem++ is the degrees of freedom (DOF) mismatch caused by inconsistent periodic node mapping across different space…

---

## [In FreeFem++, is the .sol solution file read in the order it was stored?](https://community.freefem.org/t/in-freefem-is-the-sol-solution-file-read-in-the-order-it-was-stored/4304)

<div class="topic-metadata">

**Author:** [@Sylvia](https://community.freefem.org/u/Sylvia)\
**Replies:** 1\
**Last updated:** [June 11, 2026, 9:53am UTC](https://community.freefem.org/t/in-freefem-is-the-sol-solution-file-read-in-the-order-it-was-stored/4304 "2026-06-11T09:53:02Z")

</div>

I want to save the reference solution as a .sol file and read it when calculating errors. May I ask if the data is read in the same order as it was stored?

[Next page](https://community.freefem.org/c/general-discussion/7.md?page=1)
