# General Discussion

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

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

**Page:** 2

---

## [Solving parallel RL circuit](https://community.freefem.org/t/solving-parallel-rl-circuit/1977)

<div class="topic-metadata">

**Author:** [@gael](https://community.freefem.org/u/gael)\
**Replies:** 2\
**Last updated:** [June 7, 2026, 8:15am UTC](https://community.freefem.org/t/solving-parallel-rl-circuit/1977 "2026-06-07T08:15:01Z")

</div>

Hi! I am a material science major so my question about electricity may be trivial: I am trying to get a graph voltage Vs current with a current loading according to a function of time. let’s say Iop = t\*1 t in sec unti…

---

## [Buildlayers : labels](https://community.freefem.org/t/buildlayers-labels/4275)

<div class="topic-metadata">

**Author:** [@chalmi](https://community.freefem.org/u/chalmi)\
**Replies:** 2\
**Last updated:** [May 27, 2026, 2:29pm UTC](https://community.freefem.org/t/buildlayers-labels/4275 "2026-05-27T14:29:26Z")

</div>

Hello, I would like to use the buildlayers command to create a 3D block from a rectangle. The rectangle is defined as follows: border Square1(t=0,1){x = -L/2 + t\*L; y = -l/2;label=1;} border Square2(t=0,1){x = L/2; y = …

---

## [Can't extract A matrix from a problem](https://community.freefem.org/t/cant-extract-a-matrix-from-a-problem/4288)

<div class="topic-metadata">

**Author:** [@oldoldman](https://community.freefem.org/u/oldoldman)\
**Replies:** 0\
**Last updated:** [May 26, 2026, 11:53am UTC](https://community.freefem.org/t/cant-extract-a-matrix-from-a-problem/4288 "2026-05-26T11:53:23Z")

</div>

Hi guys, have a look at the following script problem p(...) = ...; matrix m = p; report error Sorry no way to plot this kind of data cann’t extract A matrix and the error is totally confusing. Any suggestion?

---

## [Understanding macro\_ddm.idp vs ffddm.idp](https://community.freefem.org/t/understanding-macro-ddm-idp-vs-ffddm-idp/4274)

<div class="topic-metadata">

**Author:** [@marc2025](https://community.freefem.org/u/marc2025)\
**Replies:** 3\
**Last updated:** [May 13, 2026, 6:28am UTC](https://community.freefem.org/t/understanding-macro-ddm-idp-vs-ffddm-idp/4274 "2026-05-13T06:28:17Z")

</div>

Hello FreeFEM community, I have two semi-related questions, hopefully it’s alright that I’m asking this in one post. (I can make separate posts if that is preferred.) I’m building some code using DDM for educational pu…

---

## [Getting Problem to get good convergence rate in Proximal Discontinuous Galerkin method of Elliptic obstacle problem](https://community.freefem.org/t/getting-problem-to-get-good-convergence-rate-in-proximal-discontinuous-galerkin-method-of-elliptic-obstacle-problem/4264)

<div class="topic-metadata">

**Author:** [@Monirul25](https://community.freefem.org/u/Monirul25)\
**Replies:** 12\
**Last updated:** [May 12, 2026, 1:30pm UTC](https://community.freefem.org/t/getting-problem-to-get-good-convergence-rate-in-proximal-discontinuous-galerkin-method-of-elliptic-obstacle-problem/4264 "2026-05-12T13:30:51Z")

</div>

Respected Professors and experts, I am trying to get a good convergence rate using the Proximal Discontinuous Galerkin(PDG) method for the elliptic obstacle problem. Here is my main scheme: Data for numerical exper…

---

## [Emptymesh and the integration with its mother mesh](https://community.freefem.org/t/emptymesh-and-the-integration-with-its-mother-mesh/4273)

<div class="topic-metadata">

**Author:** [@pi.3.141](https://community.freefem.org/u/pi.3.141)\
**Replies:** 2\
**Last updated:** [May 11, 2026, 4:31pm UTC](https://community.freefem.org/t/emptymesh-and-the-integration-with-its-mother-mesh/4273 "2026-05-11T16:31:16Z")

</div>

Hello there, I am facing a strange problem when working with an emptymesh. The piece of code is the following. It computes the normal velocity on the boundary and stores it on a boundary function. mesh Th=square(10, 10…

---

## [Very weak solution](https://community.freefem.org/t/very-weak-solution/4183)

<div class="topic-metadata">

**Author:** [@pi.3.141](https://community.freefem.org/u/pi.3.141)\
**Replies:** 6\
**Last updated:** [May 10, 2026, 4:51am UTC](https://community.freefem.org/t/very-weak-solution/4183 "2026-05-10T04:51:33Z")

</div>

Dear Freefemers, I want to experiment with the very weak solution for Laplacian, like this simple problem in Omega: -\\Delta u = 0, in Omega, u in L^2(\\Delta, L^2(\\Omega)) := {u \\in L^2, \\Delta u \\in L^2} o…

---

## [Defining 2D mesh for jet stability problem](https://community.freefem.org/t/defining-2d-mesh-for-jet-stability-problem/4266)

<div class="topic-metadata">

**Author:** [@Amitkaush](https://community.freefem.org/u/Amitkaush)\
**Replies:** 0\
**Last updated:** [May 3, 2026, 7:33am UTC](https://community.freefem.org/t/defining-2d-mesh-for-jet-stability-problem/4266 "2026-05-03T07:33:10Z")

</div>

I am trying to validate my 2D local spatial stability code written in Cartesian coordinates system. I am using the results of Spatial stability of single jet to validate my code. Here is the code snippet where I am defi…

---

## [Non-isothermal log conformation viscoelastic multiphase flow](https://community.freefem.org/t/non-isothermal-log-conformation-viscoelastic-multiphase-flow/4263)

<div class="topic-metadata">

**Author:** [@rhmriaz17](https://community.freefem.org/u/rhmriaz17)\
**Replies:** 0\
**Last updated:** [April 28, 2026, 4:38pm UTC](https://community.freefem.org/t/non-isothermal-log-conformation-viscoelastic-multiphase-flow/4263 "2026-04-28T16:38:40Z")

</div>

Hello everyone, I am working on a simulation of non-isothermal viscoelastic multiphase flow, and I am trying to implement the log-conformation formulation of the Oldroyd-B model. However, I am facing errors related to s…

---

## [About Scott–Vogelius element](https://community.freefem.org/t/about-scott-vogelius-element/2000)

<div class="topic-metadata">

**Author:** [@lailai](https://community.freefem.org/u/lailai)\
**Replies:** 32\
**Last updated:** [April 28, 2026, 1:15pm UTC](https://community.freefem.org/t/about-scott-vogelius-element/2000 "2026-04-28T13:15:51Z")

</div>

Dear all, Hi, everyone! I have a question regarding the Scott–Vogelius lowest order element for Stokes flows, namely P2 element for velocity and P1dc element (piecewise linear discontinuous Galerkin) for pressure. This …

---

## [Level-set with parmmg3d](https://community.freefem.org/t/level-set-with-parmmg3d/4257)

<div class="topic-metadata">

**Author:** [@GiacomoSperoni97](https://community.freefem.org/u/GiacomoSperoni97)\
**Replies:** 6\
**Last updated:** [April 25, 2026, 7:15pm UTC](https://community.freefem.org/t/level-set-with-parmmg3d/4257 "2026-04-25T19:15:45Z")

</div>

Dear FreeFem users, I am trying to use parmmg3d from FreeFEM in level-set mode, but I am not sure whether this functionality is actually supported by the current FreeFEM interface to ParMmg. From reading the parmmg.cpp …

---

## [Question about -log\_view](https://community.freefem.org/t/question-about-log-view/4262)

<div class="topic-metadata">

**Author:** [@zxss](https://community.freefem.org/u/zxss)\
**Replies:** 1\
**Last updated:** [April 24, 2026, 3:36pm UTC](https://community.freefem.org/t/question-about-log-view/4262 "2026-04-24T15:36:32Z")

</div>

Dear all, I am now solving 3D unsteady Navier Stokes equations with moving boundaries with ALE method. In my program, for every time step, I need to solve two linear system, one is for mesh velocity and one is for fluid…

---

## [3D Crouzeix-Raviart (P1nc3d) in FreeFEM?](https://community.freefem.org/t/3d-crouzeix-raviart-p1nc3d-in-freefem/4258)

<div class="topic-metadata">

**Author:** [@PegasusZhang](https://community.freefem.org/u/PegasusZhang)\
**Replies:** 5\
**Last updated:** [April 22, 2026, 4:48pm UTC](https://community.freefem.org/t/3d-crouzeix-raviart-p1nc3d-in-freefem/4258 "2026-04-22T16:48:25Z")

</div>

Dear all, I hope this message finds you well. I am currently working on a 3D numerical simulation that requires the use of the Crouzeix-Raviart finite element (non-conforming P1) on tetrahedral meshes. I am aware that …

---

## [2D-line mesh coupling with PETSc](https://community.freefem.org/t/2d-line-mesh-coupling-with-petsc/4254)

<div class="topic-metadata">

**Author:** [@aszaboa](https://community.freefem.org/u/aszaboa)\
**Replies:** 6\
**Last updated:** [April 17, 2026, 4:28am UTC](https://community.freefem.org/t/2d-line-mesh-coupling-with-petsc/4254 "2026-04-17T04:28:25Z")

</div>

Hi everyone, I am trying to do the following. I am solving a fluid dynamics problem with FreeFEM + PETSc, and then, I would like to calculate the derivatives of the velocity field with a simple finite element projection…

---

## [Petsc with fully periodic boundary conditions](https://community.freefem.org/t/petsc-with-fully-periodic-boundary-conditions/4251)

<div class="topic-metadata">

**Author:** [@Loic](https://community.freefem.org/u/Loic)\
**Replies:** 7\
**Last updated:** [April 10, 2026, 7:27pm UTC](https://community.freefem.org/t/petsc-with-fully-periodic-boundary-conditions/4251 "2026-04-10T19:27:12Z")

</div>

Dear all, I am trying to using petsc in 3d with fully periodic boundary conditions. Here my code load "msh3" load "medit" include "getARGV.idp" load "PETSc" include "macro\_ddm.idp" macro dimension() …

---

## [Problem in defining penalty parameters locally](https://community.freefem.org/t/problem-in-defining-penalty-parameters-locally/4250)

<div class="topic-metadata">

**Author:** [@pratyay](https://community.freefem.org/u/pratyay)\
**Replies:** 1\
**Last updated:** [April 9, 2026, 8:15am UTC](https://community.freefem.org/t/problem-in-defining-penalty-parameters-locally/4250 "2026-04-09T08:15:08Z")

</div>

How to define the penalty parameter for the local Lux Friedrich flux? The value of the penalty parameter will depend on the exterior and interior edge for every edge and so it will be changed accordingly. How can we impl…

---

## [Building lower triangular matrix](https://community.freefem.org/t/building-lower-triangular-matrix/4249)

<div class="topic-metadata">

**Author:** [@gart1542](https://community.freefem.org/u/gart1542)\
**Replies:** 2\
**Last updated:** [April 8, 2026, 7:04pm UTC](https://community.freefem.org/t/building-lower-triangular-matrix/4249 "2026-04-08T19:04:04Z")

</div>

Hi all, I am trying to create a lower triangular matrix S from a given matrix A. I have the following loop to assign 0’s to the above-diagonal entries of the matrix A. When I try to run my full code, I receive a “segmen…

---

## [Questions about using convect() in an axisymmetric (z,r) formulation](https://community.freefem.org/t/questions-about-using-convect-in-an-axisymmetric-z-r-formulation/4248)

<div class="topic-metadata">

**Author:** [@Sirius](https://community.freefem.org/u/Sirius)\
**Replies:** 1\
**Last updated:** [April 3, 2026, 8:48am UTC](https://community.freefem.org/t/questions-about-using-convect-in-an-axisymmetric-z-r-formulation/4248 "2026-04-03T08:48:15Z")

</div>

Hello everyone, I am solving an axisymmetric Navier–Stokes problem in FreeFEM on the meridional plane (z,r), with the mapping x=z,y=r So i use : ‘‘‘VhF urA = convect(\[uz,ur\], -dt, ur); VhF uzA = convect(\[uz,ur\], -d…

---

## [Simplify boundary conditions](https://community.freefem.org/t/simplify-boundary-conditions/3722)

<div class="topic-metadata">

**Author:** [@zhukunw](https://community.freefem.org/u/zhukunw)\
**Replies:** 16\
**Last updated:** [March 31, 2026, 2:40pm UTC](https://community.freefem.org/t/simplify-boundary-conditions/3722 "2026-03-31T14:40:47Z")

</div>

Hi all, I am solving a convection diffusion equation on a domain made up of many short line segments. I am wondering if there’s a shortcut for setting the boundaries and conditions so that I do not have to manually do th…

---

## [About Solving Inverse Matrix](https://community.freefem.org/t/about-solving-inverse-matrix/4246)

<div class="topic-metadata">

**Author:** [@Guo.q.q](https://community.freefem.org/u/Guo.q.q)\
**Replies:** 1\
**Last updated:** [March 31, 2026, 9:14am UTC](https://community.freefem.org/t/about-solving-inverse-matrix/4246 "2026-03-31T09:14:29Z")

</div>

Dear FF users, I understand that FF primarily solves linear systems of the form Ax = b . However, my current work requires explicitly computing matrix inverses — for example, A = C^{-1} D , where both C and D are …

---

## [Getting Problem to get Superconvergence results in Hybrid Higher Order (HHO) Method in Poisson Equation](https://community.freefem.org/t/getting-problem-to-get-superconvergence-results-in-hybrid-higher-order-hho-method-in-poisson-equation/4242)

<div class="topic-metadata">

**Author:** [@Monirul25](https://community.freefem.org/u/Monirul25)\
**Replies:** 15\
**Last updated:** [March 30, 2026, 3:14pm UTC](https://community.freefem.org/t/getting-problem-to-get-superconvergence-results-in-hybrid-higher-order-hho-method-in-poisson-equation/4242 "2026-03-30T15:14:23Z")

</div>

Hello, all experts and respected professors, I am facing a problem getting superconvergence results ( Need to get (k+2) order in L^2-norm and (k+1) in reconstruction gradient using P^k polynomial approx. ) for the Poiss…

---

## [Computing scalar product using Mat object](https://community.freefem.org/t/computing-scalar-product-using-mat-object/4244)

<div class="topic-metadata">

**Author:** [@marc2025](https://community.freefem.org/u/marc2025)\
**Replies:** 4\
**Last updated:** [March 28, 2026, 6:54am UTC](https://community.freefem.org/t/computing-scalar-product-using-mat-object/4244 "2026-03-28T06:54:34Z")

</div>

Hello, I was reading this response on another post, which mentions using a Mat object to compute a scalar product. For example, given: real\[int\] v; Mat J; J(v, v); then, as the response says, “J(v, v) computes a sca…

---

## [Gradient for surface FEM](https://community.freefem.org/t/gradient-for-surface-fem/4233)

<div class="topic-metadata">

**Author:** [@yongxing](https://community.freefem.org/u/yongxing)\
**Replies:** 7\
**Last updated:** [March 14, 2026, 9:29pm UTC](https://community.freefem.org/t/gradient-for-surface-fem/4233 "2026-03-14T21:29:44Z")

</div>

Hi, There are examples of surface FEM for a scalar function, such as LapEigenBeltrami.edp, however I haven’t found an example of “expressing the gradient of a vector on a surface mesh ThS”. For a scalar u, the surface …

---

## [Removing the partition lines in 3D Paraview plots](https://community.freefem.org/t/removing-the-partition-lines-in-3d-paraview-plots/4240)

<div class="topic-metadata">

**Author:** [@AzizTakhirov](https://community.freefem.org/u/AzizTakhirov)\
**Replies:** 2\
**Last updated:** [March 13, 2026, 2:10pm UTC](https://community.freefem.org/t/removing-the-partition-lines-in-3d-paraview-plots/4240 "2026-03-13T14:10:12Z")

</div>

Dear FreeFEM community, I’m plotting the solution generated by parallel FreeFEM code in 3D. The issue I’m facing is the appearance of partition/boundary lines. In parallel FF tutorial, I learnt that using threshold in p…

---

## [Eliminate degrees of freedom using periodic fespace](https://community.freefem.org/t/eliminate-degrees-of-freedom-using-periodic-fespace/4238)

<div class="topic-metadata">

**Author:** [@yongxing](https://community.freefem.org/u/yongxing)\
**Replies:** 8\
**Last updated:** [March 10, 2026, 5:32pm UTC](https://community.freefem.org/t/eliminate-degrees-of-freedom-using-periodic-fespace/4238 "2026-03-10T17:32:55Z")

</div>

current line = 163 Assertion fail : (kkk++ \< 10) line :1141, in file lgfem.cpp Segmentation fault (core dumped) If we use the parameterised space (\\theta, \\phi) to solve PDEs on a sphere, then the boundaries at \\phi=…

---

## [Export matrix to matlab](https://community.freefem.org/t/export-matrix-to-matlab/136)

<div class="topic-metadata">

**Author:** [@vanzant](https://community.freefem.org/u/vanzant)\
**Replies:** 2\
**Last updated:** [March 9, 2026, 3:13pm UTC](https://community.freefem.org/t/export-matrix-to-matlab/136 "2026-03-09T15:13:18Z")

</div>

Dear all, from versions 4.x of FreeFem, the default format for exporting sparse matrices has changed from Morse to Hash. Is there anyway to force FreeFem to save the sparse matrices in Morse format? Or is there any ma…

---

## [Bassi-rebay mixed formulation](https://community.freefem.org/t/bassi-rebay-mixed-formulation/4237)

<div class="topic-metadata">

**Author:** [@MaximeLee](https://community.freefem.org/u/MaximeLee)\
**Replies:** 1\
**Last updated:** [March 9, 2026, 11:35am UTC](https://community.freefem.org/t/bassi-rebay-mixed-formulation/4237 "2026-03-09T11:35:07Z")

</div>

Context I want to solve the heat equation with a (Discontinuous Galerkin) Bassi-Rebay formulation. My toy problem is -\\Delta u = -4\\pi² sin(2\\pi x) \\quad \\forall x \\in \[0,1\] with homogeneous Dirichlet conditions. I am im…

---

## [Variational form vs Matrix form do not give the same results](https://community.freefem.org/t/variational-form-vs-matrix-form-do-not-give-the-same-results/4074)

<div class="topic-metadata">

**Author:** [@smail](https://community.freefem.org/u/smail)\
**Replies:** 4\
**Last updated:** [March 9, 2026, 10:16am UTC](https://community.freefem.org/t/variational-form-vs-matrix-form-do-not-give-the-same-results/4074 "2026-03-09T10:16:27Z")

</div>

I try to solve the Klein-Gordon equation (already posted by Prof. François Bouchut), but using variational form. What surprises me is that the two methods give (slightly ) different results. I think that the reason is: t…

---

## [Explanation of tgv = 0](https://community.freefem.org/t/explanation-of-tgv-0/4235)

<div class="topic-metadata">

**Author:** [@marc2025](https://community.freefem.org/u/marc2025)\
**Replies:** 4\
**Last updated:** [March 8, 2026, 7:40am UTC](https://community.freefem.org/t/explanation-of-tgv-0/4235 "2026-03-08T07:40:21Z")

</div>

Hello FreeFem community, I’ve run into a situation recently where I’m solving a nonlinear PDE; to do this, I am writing a Newton solver, e.g. solving a system J p = F. In this case, F is a vector for my residual and J i…

---

## [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…

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

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