# General Discussion

**URL:** https://community.freefem.org/c/general-discussion/7.md?page=2

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

**Page:** 3

---

## [Storage of sparse matrices and value of tgv](https://community.freefem.org/t/storage-of-sparse-matrices-and-value-of-tgv/4234)

<div class="topic-metadata">

**Author:** [@RdMl](https://community.freefem.org/u/RdMl)\
**Replies:** 2\
**Last updated:** [March 4, 2026, 5:21pm UTC](https://community.freefem.org/t/storage-of-sparse-matrices-and-value-of-tgv/4234 "2026-03-04T17:21:34Z")

</div>

Bonjour à ce qui liront, J’ai observé que : tgv \>=0 et tgv= -2, -20 ==\> impression à l’écran et dans un fichier au format COO tgv = -1,-10 ==\> impression à l’écran et dans un fichier au format CSR Est-ce le comportem…

---

## [Movemesh23 and move solution for visualisation](https://community.freefem.org/t/movemesh23-and-move-solution-for-visualisation/4211)

<div class="topic-metadata">

**Author:** [@yongxing](https://community.freefem.org/u/yongxing)\
**Replies:** 6\
**Last updated:** [March 3, 2026, 2:53pm UTC](https://community.freefem.org/t/movemesh23-and-move-solution-for-visualisation/4211 "2026-03-03T14:53:45Z")

</div>

For a parameterised sphere, if we solve a problem in the parameter space, for example (0, 2pi) x (0, pi) we can use movemesh23() to generate the mesh of a sphere quickly, my question is: how can we move the solution t…

---

## [PCD preconditioned](https://community.freefem.org/t/pcd-preconditioned/4222)

<div class="topic-metadata">

**Author:** [@zxss](https://community.freefem.org/u/zxss)\
**Replies:** 4\
**Last updated:** [March 2, 2026, 10:47am UTC](https://community.freefem.org/t/pcd-preconditioned/4222 "2026-03-02T10:47:46Z")

</div>

Dear all, I am new to preconditioners, I learnt from the oseen-2d-PETSc.edp the pressure convection diffusion preconditioner. And I have modified it to solve an unsteady Navier-Stokes equation with semi-implicit scheme …

---

## [Error transconjugate of complex\[int, int\]](https://community.freefem.org/t/error-transconjugate-of-complex-int-int/4229)

<div class="topic-metadata">

**Author:** [@mayeulchvne](https://community.freefem.org/u/mayeulchvne)\
**Replies:** 3\
**Last updated:** [February 28, 2026, 6:02am UTC](https://community.freefem.org/t/error-transconjugate-of-complex-int-int/4229 "2026-02-28T06:02:52Z")

</div>

Hello everyone, On my installation of the 4.15 version, the operator ‘ of transposition and conjugation seems to not work on complex\[int, int\]. However it is doing the correct operation on sparse matrices. See the code …

---

## [Is it possible to set PCD preconditioner within schurPreconditioner](https://community.freefem.org/t/is-it-possible-to-set-pcd-preconditioner-within-schurpreconditioner/4230)

<div class="topic-metadata">

**Author:** [@zxss](https://community.freefem.org/u/zxss)\
**Replies:** 3\
**Last updated:** [February 27, 2026, 7:35pm UTC](https://community.freefem.org/t/is-it-possible-to-set-pcd-preconditioner-within-schurpreconditioner/4230 "2026-02-27T19:35:38Z")

</div>

Dear FreeFEM developers, I learnt that I can set a mAL preconditioned within schurPreconditioner from this very impressive article Augmented Lagrangian preconditioner for large-scale hydrodynamic stability analysis - S…

---

## [Integration on a part of the boundary](https://community.freefem.org/t/integration-on-a-part-of-the-boundary/4231)

<div class="topic-metadata">

**Author:** [@lucassfernandez](https://community.freefem.org/u/lucassfernandez)\
**Replies:** 2\
**Last updated:** [February 27, 2026, 5:23pm UTC](https://community.freefem.org/t/integration-on-a-part-of-the-boundary/4231 "2026-02-27T17:23:00Z")

</div>

Suppose I have constructed a circular geometric domain by joining n subarcs, which are labeled from 1 to 10. Now, I need to compute a boundary integral, but only on the arcs from 1 to 9. Can I create a vector of labels …

---

## [Trouble defining region id numbers on a 3D mesh](https://community.freefem.org/t/trouble-defining-region-id-numbers-on-a-3d-mesh/4223)

<div class="topic-metadata">

**Author:** [@EChase](https://community.freefem.org/u/EChase)\
**Replies:** 2\
**Last updated:** [February 25, 2026, 4:40pm UTC](https://community.freefem.org/t/trouble-defining-region-id-numbers-on-a-3d-mesh/4223 "2026-02-25T16:40:12Z")

</div>

Hello everyone, I am stumped and could use some assistance. I cannot understand how to define the regions for assigning boundary conditions for a 3D mesh of a cylinder. The mesh is created as follows: load “msh3” lo…

---

## [Phase shifted periodic BC](https://community.freefem.org/t/phase-shifted-periodic-bc/4224)

<div class="topic-metadata">

**Author:** [@Khaldrogo](https://community.freefem.org/u/Khaldrogo)\
**Replies:** 3\
**Last updated:** [February 23, 2026, 9:36pm UTC](https://community.freefem.org/t/phase-shifted-periodic-bc/4224 "2026-02-23T21:36:24Z")

</div>

I am relatively new to freefem++. I am just wondering if there’s a way to implement a phase shifted ‘periodic’ bc? say instead of: int\[int\] labPeriodic = \[1, 3\]; macro Pk()\[P2, P2, P1\], periodic=\[\[labPeriodic\[0\],rcoord…

---

## [Why mass lumping fails in 3d?](https://community.freefem.org/t/why-mass-lumping-fails-in-3d/4217)

<div class="topic-metadata">

**Author:** [@abdobenf](https://community.freefem.org/u/abdobenf)\
**Replies:** 6\
**Last updated:** [February 12, 2026, 10:18am UTC](https://community.freefem.org/t/why-mass-lumping-fails-in-3d/4217 "2026-02-12T10:18:13Z")

</div>

Hello, I’m testing mass lumping in 3d for DMP but it seems to not have an effect. heres the code : // Small 3D heat equation example (implicit Euler) // PARAM -wg -ns load "msh3" verbosity = 0; // Mesh and time para…

---

## [On the precision issue of converting “real-type data to strings](https://community.freefem.org/t/on-the-precision-issue-of-converting-real-type-data-to-strings/4214)

<div class="topic-metadata">

**Author:** [@RYP](https://community.freefem.org/u/RYP)\
**Replies:** 0\
**Last updated:** [February 5, 2026, 9:28am UTC](https://community.freefem.org/t/on-the-precision-issue-of-converting-real-type-data-to-strings/4214 "2026-02-05T09:28:02Z")

</div>

Hello!everyone, I’d like to manually specify the precision to be retained when converting real-type data to string data. For example： string s = 20.0e6; cout \<\< s \<\< endl; The output is 2e+07. I’d like to get an outp…

---

## [A question about Pure Convection solved by Discontinuous-Galerkin FEM](https://community.freefem.org/t/a-question-about-pure-convection-solved-by-discontinuous-galerkin-fem/4213)

<div class="topic-metadata">

**Author:** [@ZZM](https://community.freefem.org/u/ZZM)\
**Replies:** 1\
**Last updated:** [February 4, 2026, 8:26pm UTC](https://community.freefem.org/t/a-question-about-pure-convection-solved-by-discontinuous-galerkin-fem/4213 "2026-02-04T20:26:53Z")

</div>

The code in documentation is: problem Adual(cc, w) = int2d(Th)( (cc/dt+(v1\*dx(cc)+v2\*dy(cc)))\*w ) + intalledges(Th)( (1-nTonEdge)\*w\*(al\*abs(n)-n/2)\*jump(cc) ) - int2d(Th)( …

---

## [White spots in the plot](https://community.freefem.org/t/white-spots-in-the-plot/4207)

<div class="topic-metadata">

**Author:** [@llober](https://community.freefem.org/u/llober)\
**Replies:** 0\
**Last updated:** [February 2, 2026, 8:29pm UTC](https://community.freefem.org/t/white-spots-in-the-plot/4207 "2026-02-02T20:29:59Z")

</div>

Hi all, What are the “white spots” in this plot? Thanks, Lluis

---

## [Radial Return Mapping Algorithm for Plasticity](https://community.freefem.org/t/radial-return-mapping-algorithm-for-plasticity/4190)

<div class="topic-metadata">

**Author:** [@sws](https://community.freefem.org/u/sws)\
**Replies:** 3\
**Last updated:** [February 2, 2026, 4:59pm UTC](https://community.freefem.org/t/radial-return-mapping-algorithm-for-plasticity/4190 "2026-02-02T16:59:03Z")

</div>

Hi guys, I am currently working on building my own model of radial return mapping algorithm for plasticity of a beam, but encountered some issue (which I don’t know why, the values just doesn’t match with the one I got f…

---

## [Adapting the mAL preconditioner to stokes-fieldsplit-2d](https://community.freefem.org/t/adapting-the-mal-preconditioner-to-stokes-fieldsplit-2d/4041)

<div class="topic-metadata">

**Author:** [@AzizTakhirov](https://community.freefem.org/u/AzizTakhirov)\
**Replies:** 3\
**Last updated:** [January 29, 2026, 4:28pm UTC](https://community.freefem.org/t/adapting-the-mal-preconditioner-to-stokes-fieldsplit-2d/4041 "2026-01-29T16:28:21Z")

</div>

Hello, I want to adapt the implementation of the mAL-preconditioner explained at https://github.com/prj-/moulin2019al to solving the 2D Stokes problem (stokes-fieldsplit-2d-PETSc.edp). load “PETSc” macro trueRestrict…

---

## [Solver for unsteady N-S equation](https://community.freefem.org/t/solver-for-unsteady-n-s-equation/3351)

<div class="topic-metadata">

**Author:** [@quentin](https://community.freefem.org/u/quentin)\
**Replies:** 33\
**Last updated:** [January 29, 2026, 3:12pm UTC](https://community.freefem.org/t/solver-for-unsteady-n-s-equation/3351 "2026-01-29T15:12:13Z")

</div>

Hi everyone, This post is out of such reason: I am not familiar with solvers/preconditioners and it may take some time for me to harness them. As the mesh scale grows, the computation gets slower. Are there easy adjust…

---

## [Periodic Neumann Boundary Conditions (2D Channel)](https://community.freefem.org/t/periodic-neumann-boundary-conditions-2d-channel/2855)

<div class="topic-metadata">

**Author:** [@C98](https://community.freefem.org/u/C98)\
**Replies:** 6\
**Last updated:** [January 29, 2026, 2:06am UTC](https://community.freefem.org/t/periodic-neumann-boundary-conditions-2d-channel/2855 "2026-01-29T02:06:21Z")

</div>

Hi, I am new to FreeFem++, and I am trying to simulate the unsteady Navier-Stokes equations in a 2D channel \[0,1\]\\times\[0,1\] with some periodic boundary conditions. I denote the tangential velocity by u\_1, the normal vel…

---

## [Product of two integrals on a boundary](https://community.freefem.org/t/product-of-two-integrals-on-a-boundary/4205)

<div class="topic-metadata">

**Author:** [@jna1g18](https://community.freefem.org/u/jna1g18)\
**Replies:** 0\
**Last updated:** [January 28, 2026, 3:35pm UTC](https://community.freefem.org/t/product-of-two-integrals-on-a-boundary/4205 "2026-01-28T15:35:02Z")

</div>

Hi all, is there a standard way to incorporate a product of two integrals over a 1D boundary into the weak formulation? One integral contains the unknown being solved for and the other contains a test function. For examp…

---

## [Multiplying two integral on FE](https://community.freefem.org/t/multiplying-two-integral-on-fe/1420)

<div class="topic-metadata">

**Author:** [@KastoueMee](https://community.freefem.org/u/KastoueMee)\
**Replies:** 2\
**Last updated:** [January 28, 2026, 3:16pm UTC](https://community.freefem.org/t/multiplying-two-integral-on-fe/1420 "2026-01-28T15:16:57Z")

</div>

Hi, I brand new to Freefem and I don’t manage to code this variational problem : Where Q=(0,1)^2 and (e\_1,e\_2) is the canonical basis of R^2. I have an error while integrating w\_i over Q. Here is my code : int k=8…

---

## [Error reading Gmsh mesh in FreeFem++](https://community.freefem.org/t/error-reading-gmsh-mesh-in-freefem/1416)

<div class="topic-metadata">

**Author:** [@lukas](https://community.freefem.org/u/lukas)\
**Replies:** 5\
**Last updated:** [January 28, 2026, 10:28am UTC](https://community.freefem.org/t/error-reading-gmsh-mesh-in-freefem/1416 "2026-01-28T10:28:21Z")

</div>

Hi ! I have an error reading a Gmesh mesh in Freefem++ #FreeFem++ script: load “gmsh” mesh Th = gmshload(“mesh.msh”); #FreeFem++ output: Element of type 5 is not considered in Freefem++ #Gmsh .geo script: Point(1…

---

## [Is --oversubscribe a default when run ff-mpirun](https://community.freefem.org/t/is-oversubscribe-a-default-when-run-ff-mpirun/4204)

<div class="topic-metadata">

**Author:** [@zxss](https://community.freefem.org/u/zxss)\
**Replies:** 1\
**Last updated:** [January 27, 2026, 8:40pm UTC](https://community.freefem.org/t/is-oversubscribe-a-default-when-run-ff-mpirun/4204 "2026-01-27T20:40:28Z")

</div>

Hi, I find that every time I run ff-mpirun, it always has --oversubscribe even when I choose only 1 processor, shows as So is --oversubscribe a default here?

---

## [Basic question about 'convect'](https://community.freefem.org/t/basic-question-about-convect/4202)

<div class="topic-metadata">

**Author:** [@jna1g18](https://community.freefem.org/u/jna1g18)\
**Replies:** 2\
**Last updated:** [January 27, 2026, 9:42am UTC](https://community.freefem.org/t/basic-question-about-convect/4202 "2026-01-27T09:42:42Z")

</div>

Hi all, I simply need to know if I’m using the convect function in the correct way. Is the following correct: where ‘n-1’ denotes the result at the previous timestep. Many thanks.

---

## [Error with matrix addition in PETSc](https://community.freefem.org/t/error-with-matrix-addition-in-petsc/4200)

<div class="topic-metadata">

**Author:** [@mayeulchvne](https://community.freefem.org/u/mayeulchvne)\
**Replies:** 6\
**Last updated:** [January 26, 2026, 3:29pm UTC](https://community.freefem.org/t/error-with-matrix-addition-in-petsc/4200 "2026-01-26T15:29:41Z")

</div>

Dear Freefem community, I have an issue with the addition of two matrices of type Mat. I read in the Forum that it should work since v4.9, however I receive the following error message : Bmat = Amat + Tmat2; error oper…

---

## [FALLBACK (log once): Fallback to SW vertex for line stipple](https://community.freefem.org/t/fallback-log-once-fallback-to-sw-vertex-for-line-stipple/4201)

<div class="topic-metadata">

**Author:** [@zxss](https://community.freefem.org/u/zxss)\
**Replies:** 1\
**Last updated:** [January 25, 2026, 4:18am UTC](https://community.freefem.org/t/fallback-log-once-fallback-to-sw-vertex-for-line-stipple/4201 "2026-01-25T04:18:19Z")

</div>

Dear all, I am solving a 3D NS equation, 3D flow around a cylinder\_312.edp (2.6 KB) I solve it directly with UMFPACK and encounter the following tip has anyone met such situation. I don’t understand what does it m…

---

## [Wrong with the PETSc](https://community.freefem.org/t/wrong-with-the-petsc/4195)

<div class="topic-metadata">

**Author:** [@ZZM](https://community.freefem.org/u/ZZM)\
**Replies:** 3\
**Last updated:** [January 21, 2026, 2:58pm UTC](https://community.freefem.org/t/wrong-with-the-petsc/4195 "2026-01-21T14:58:42Z")

</div>

I want to test PETSc and parallelization, so test the code: load "PETSc" macro dimension()2// EOM include "macro\_ddm.idp" macro grad(u)\[dx(u), dy(u)\]// EOM func Pk = P1; border upper(t=0, pi) { x=cos(t); y=sin(t);…

---

## [How to implement the function like the "adj" function or how to find its source code](https://community.freefem.org/t/how-to-implement-the-function-like-the-adj-function-or-how-to-find-its-source-code/4187)

<div class="topic-metadata">

**Author:** [@MatrixVector](https://community.freefem.org/u/MatrixVector)\
**Replies:** 2\
**Last updated:** [January 14, 2026, 3:25am UTC](https://community.freefem.org/t/how-to-implement-the-function-like-the-adj-function-or-how-to-find-its-source-code/4187 "2026-01-14T03:25:38Z")

</div>

The “adj“ function in mesh connectivity is very useful, which can find the adjacent triangle of the triangle k by edge e using only one statement “Th\[k\].adj(e)”. I’m doing a FEM analysis work using Python rather than Fr…

---

## [Is it possible to modify the elements in the PETSc matrix in parallel computation](https://community.freefem.org/t/is-it-possible-to-modify-the-elements-in-the-petsc-matrix-in-parallel-computation/4186)

<div class="topic-metadata">

**Author:** [@MatrixVector](https://community.freefem.org/u/MatrixVector)\
**Replies:** 3\
**Last updated:** [January 13, 2026, 5:56am UTC](https://community.freefem.org/t/is-it-possible-to-modify-the-elements-in-the-petsc-matrix-in-parallel-computation/4186 "2026-01-13T05:56:21Z")

</div>

When using DDM and PETSc to solving a large problem with multiple parallel processors, the matrix “A“ is usually transferred from FreeFem++ to PETSc, like Apetsc = A; set(Apetsc, sparams = “-pc\_type hypre -ksp\_type bcgs…

---

## [Distance function (Topology Optimization)](https://community.freefem.org/t/distance-function-topology-optimization/4184)

<div class="topic-metadata">

**Author:** [@HMasson](https://community.freefem.org/u/HMasson)\
**Replies:** 0\
**Last updated:** [January 12, 2026, 3:22pm UTC](https://community.freefem.org/t/distance-function-topology-optimization/4184 "2026-01-12T15:22:30Z")

</div>

Hello, I’m using the distance function (from : load “distance”) to compute the distance field to the contour of a shape defined via a surface. Now my shape is defined via a P0 density field. I would like to compute th…

---

## [Neumann BC and P1, P2 FE](https://community.freefem.org/t/neumann-bc-and-p1-p2-fe/4175)

<div class="topic-metadata">

**Author:** [@pi.3.141](https://community.freefem.org/u/pi.3.141)\
**Replies:** 2\
**Last updated:** [January 12, 2026, 5:16am UTC](https://community.freefem.org/t/neumann-bc-and-p1-p2-fe/4175 "2026-01-12T05:16:49Z")

</div>

Hello Freefemers, Testing the solver for Laplace equation with Neumann BC in 3d (in a cube). I observe a strange behavior: while the solution is perfect (error~10^-14) when using P2 FE, it is incorrect (error~10^0) whe…

---

## [schurPreconditioner & schurList](https://community.freefem.org/t/schurpreconditioner-schurlist/4162)

<div class="topic-metadata">

**Author:** [@yongxing](https://community.freefem.org/u/yongxing)\
**Replies:** 14\
**Last updated:** [January 7, 2026, 3:57am UTC](https://community.freefem.org/t/schurpreconditioner-schurlist/4162 "2026-01-07T03:57:02Z")

</div>

It seems very hard to get the the parameters schurPreconditioner and schurList correct for a PETSc block preconditioner. For a block matrix like: Is the following syntax correct for prameters schurPreconditioner and s…

---

## [Regions creation issue + using regions question](https://community.freefem.org/t/regions-creation-issue-using-regions-question/4163)

<div class="topic-metadata">

**Author:** [@Frederik](https://community.freefem.org/u/Frederik)\
**Replies:** 5\
**Last updated:** [January 6, 2026, 9:20am UTC](https://community.freefem.org/t/regions-creation-issue-using-regions-question/4163 "2026-01-06T09:20:44Z")

</div>

Hi. I’m starting to use FreeFem and I’ve been trying to model using the freefem mesh generator. I’ve got two questions/issues: A.I’m running into issues with the geometry/mesh definitions when having multiple regio…

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

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