# General Discussion

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

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

**Page:** 12

---

## [Macro in Navier-Stokes solver](https://community.freefem.org/t/macro-in-navier-stokes-solver/3750)

<div class="topic-metadata">

**Author:** [@dominiquebodin](https://community.freefem.org/u/dominiquebodin)\
**Replies:** 2\
**Last updated:** [February 17, 2025, 7:46am UTC](https://community.freefem.org/t/macro-in-navier-stokes-solver/3750 "2025-02-17T07:46:42Z")

</div>

Hi all, Considering the example below, I have systematically a compilation error related to the macro ugradv. This macro is a copy/paste from a post published in this forum. Any idea is welcome. //Macro macro grad(u) …

---

## [Current distribution problem](https://community.freefem.org/t/current-distribution-problem/3751)

<div class="topic-metadata">

**Author:** [@Polina](https://community.freefem.org/u/Polina)\
**Replies:** 1\
**Last updated:** [February 15, 2025, 6:28pm UTC](https://community.freefem.org/t/current-distribution-problem/3751 "2025-02-15T18:28:07Z")

</div>

Hello everyone! I want to simulate the current distribution. I use the continuity equation and the Neumann boundary conditions. The current is set at the boundary as a function of potential. However, the task diverge…

---

## [Solving non linear system of equations with Newton Raphson method](https://community.freefem.org/t/solving-non-linear-system-of-equations-with-newton-raphson-method/3733)

<div class="topic-metadata">

**Author:** [@Try\_everything](https://community.freefem.org/u/Try_everything)\
**Replies:** 5\
**Last updated:** [February 15, 2025, 3:10pm UTC](https://community.freefem.org/t/solving-non-linear-system-of-equations-with-newton-raphson-method/3733 "2025-02-15T15:10:27Z")

</div>

Hi , I am trying to solve steady boussinesq approximation of governing equations of flow compromising conservation of mass, momentum, energy. I weak formulated the equation and I need to use Newton raphson method to solv…

---

## [1D mesh with a border of a 2d mesh](https://community.freefem.org/t/1d-mesh-with-a-border-of-a-2d-mesh/3748)

<div class="topic-metadata">

**Author:** [@noemielafine](https://community.freefem.org/u/noemielafine)\
**Replies:** 0\
**Last updated:** [February 14, 2025, 9:47am UTC](https://community.freefem.org/t/1d-mesh-with-a-border-of-a-2d-mesh/3748 "2025-02-14T09:47:54Z")

</div>

Hello, I would like to keep only one border of my rectangle 2d mesh and I want it to be a 1d mesh, but I dont want to recreate a independant mesh on this border because I would like the functions of the fespace of the 2d…

---

## [What is the correct way of using LinearCG?](https://community.freefem.org/t/what-is-the-correct-way-of-using-linearcg/3744)

<div class="topic-metadata">

**Author:** [@oldoldman](https://community.freefem.org/u/oldoldman)\
**Replies:** 1\
**Last updated:** [February 12, 2025, 10:47am UTC](https://community.freefem.org/t/what-is-the-correct-way-of-using-linearcg/3744 "2025-02-12T10:47:29Z")

</div>

Hi guys, I’m trying to understand LinearCG by the following script func real\[int\] A(real\[int\] i) { real\[int\] a= \[1,2,3,4\]; return a; } real\[int\] x(2); real\[int\] B=\[2,3\]; LinearCG(A,x,B); cout \<\< x \<\< endl; In my u…

---

## [Basic question about macros](https://community.freefem.org/t/basic-question-about-macros/3742)

<div class="topic-metadata">

**Author:** [@isabelbarrio](https://community.freefem.org/u/isabelbarrio)\
**Replies:** 0\
**Last updated:** [February 11, 2025, 11:12pm UTC](https://community.freefem.org/t/basic-question-about-macros/3742 "2025-02-11T23:12:56Z")

</div>

Hello, I am learning the syntax of FreeFem++ by looking at examples. I am running the following code: macro AA \[ \[1,2\],\[3,4\]\] // macro BB \[ \[1,2\],\[5,10\]\] // cout \<\< trace( AA \* BB’ + AA - BB’ ) \<\<endl; The output th…

---

## [Input Border Data from an External File in FreeFEM++](https://community.freefem.org/t/input-border-data-from-an-external-file-in-freefem/3713)

<div class="topic-metadata">

**Author:** [@Amina1727](https://community.freefem.org/u/Amina1727)\
**Replies:** 3\
**Last updated:** [February 11, 2025, 8:43pm UTC](https://community.freefem.org/t/input-border-data-from-an-external-file-in-freefem/3713 "2025-02-11T20:43:36Z")

</div>

Hello everyone, I am currently working on a project in FreeFEM++ and would like to know how to read boundary coordinates from an external file. I have a file named Data.dat that contains r and z values in a table forma…

---

## [ChangeNumbering with nested PETSc matrix returns a zero matrix](https://community.freefem.org/t/changenumbering-with-nested-petsc-matrix-returns-a-zero-matrix/3735)

<div class="topic-metadata">

**Author:** [@ffeppon](https://community.freefem.org/u/ffeppon)\
**Replies:** 10\
**Last updated:** [February 11, 2025, 9:10am UTC](https://community.freefem.org/t/changenumbering-with-nested-petsc-matrix-returns-a-zero-matrix/3735 "2025-02-11T09:10:40Z")

</div>

Dear FreeFEM community, I am encountering what looks to be a bug when using ChangeNumbering with a nested block matrix corresponding to the discretization of the stokes system. In the example attached, I create a Stoke…

---

## [Refrence for non-overlapping method in FreeFem documentation](https://community.freefem.org/t/refrence-for-non-overlapping-method-in-freefem-documentation/3739)

<div class="topic-metadata">

**Author:** [@abdobenf](https://community.freefem.org/u/abdobenf)\
**Replies:** 0\
**Last updated:** [February 9, 2025, 11:02pm UTC](https://community.freefem.org/t/refrence-for-non-overlapping-method-in-freefem-documentation/3739 "2025-02-09T23:02:54Z")

</div>

Hello, I don’t know if I can ask this here, but I’m looking on how can I reference the method shown in here https://doc.freefem.org/models/domain-decomposition.html do I reference freefem’s documentation if that’s …

---

## [To calculate the value of solution variable in the boundary](https://community.freefem.org/t/to-calculate-the-value-of-solution-variable-in-the-boundary/3736)

<div class="topic-metadata">

**Author:** [@goutham2023](https://community.freefem.org/u/goutham2023)\
**Replies:** 1\
**Last updated:** [February 9, 2025, 11:35am UTC](https://community.freefem.org/t/to-calculate-the-value-of-solution-variable-in-the-boundary/3736 "2025-02-09T11:35:12Z")

</div>

Hello everyone, I just need to know how the values of solution variables are calculated at the boundary. I used the syntax provided in the examples, but it is not working. Could you please check this and let me know? …

---

## [Schwarz algorithm in Parallel](https://community.freefem.org/t/schwarz-algorithm-in-parallel/3734)

<div class="topic-metadata">

**Author:** [@abdobenf](https://community.freefem.org/u/abdobenf)\
**Replies:** 3\
**Last updated:** [February 7, 2025, 7:02pm UTC](https://community.freefem.org/t/schwarz-algorithm-in-parallel/3734 "2025-02-07T19:02:53Z")

</div>

Hello, I’m trying to solve a problem using a non-overlapping domain decomposition, I have successfully coded it in parallel using two cores manually (I have two subdomains), is there any example to use built in tools in…

---

## [How to solve laplace equation in a square domain](https://community.freefem.org/t/how-to-solve-laplace-equation-in-a-square-domain/3577)

<div class="topic-metadata">

**Author:** [@Try\_everything](https://community.freefem.org/u/Try_everything)\
**Replies:** 2\
**Last updated:** [February 6, 2025, 4:58pm UTC](https://community.freefem.org/t/how-to-solve-laplace-equation-in-a-square-domain/3577 "2025-02-06T16:58:26Z")

</div>

I am trying to solve Laplace equation in a square domain with different boundary conditions. i am confused on doing the Neumann conditions, and type 4 conditions( 2 Dirichlet and Neumann conditions). I feel disappointed…

---

## [Effectively 1D flux boundary condition in 3D simulation](https://community.freefem.org/t/effectively-1d-flux-boundary-condition-in-3d-simulation/3723)

<div class="topic-metadata">

**Author:** [@usiu5555](https://community.freefem.org/u/usiu5555)\
**Replies:** 5\
**Last updated:** [February 6, 2025, 10:01am UTC](https://community.freefem.org/t/effectively-1d-flux-boundary-condition-in-3d-simulation/3723 "2025-02-06T10:01:35Z")

</div>

I want to model the following phenomena: two bodies with thickness d made of the same material A with the same conductivity k are separated with a very thin (delta \<\< d) plate from material B with a very high conductivi…

---

## [Print out normal vector at each edge of border elements](https://community.freefem.org/t/print-out-normal-vector-at-each-edge-of-border-elements/3728)

<div class="topic-metadata">

**Author:** [@Hemanta822](https://community.freefem.org/u/Hemanta822)\
**Replies:** 0\
**Last updated:** [February 5, 2025, 5:06pm UTC](https://community.freefem.org/t/print-out-normal-vector-at-each-edge-of-border-elements/3728 "2025-02-05T17:06:45Z")

</div>

Hi All, Is there any way to print out normal vector at each edge of the border (or boundary) elements. Please let me know. Thank you.

---

## [PETSc example (heat-TS-2d-PETSc.edp) incorrectly imlpemented?](https://community.freefem.org/t/petsc-example-heat-ts-2d-petsc-edp-incorrectly-imlpemented/3704)

<div class="topic-metadata">

**Author:** [@usiu5555](https://community.freefem.org/u/usiu5555)\
**Replies:** 12\
**Last updated:** [February 5, 2025, 6:44am UTC](https://community.freefem.org/t/petsc-example-heat-ts-2d-petsc-edp-incorrectly-imlpemented/3704 "2025-02-05T06:44:04Z")

</div>

I am working with the example. I just tried to change the boundary condition (line 24, on(1, u=0)) to a different value, and the solution does not change. It seems like something is missing, as regardless of the value s…

---

## [For boundary conditions combining roller boundary and enforced displacement](https://community.freefem.org/t/for-boundary-conditions-combining-roller-boundary-and-enforced-displacement/3698)

<div class="topic-metadata">

**Author:** [@Ayataka](https://community.freefem.org/u/Ayataka)\
**Replies:** 12\
**Last updated:** [February 4, 2025, 11:33pm UTC](https://community.freefem.org/t/for-boundary-conditions-combining-roller-boundary-and-enforced-displacement/3698 "2025-02-04T23:33:59Z")

</div>

Hi FF++'s developers and users. Suppose the boundary condition is such that one side of a square is pulled along the x-axis in the right direction for a unit length and is not enforced along the y-axis on that side. If…

---

## [Problem of calculating error order](https://community.freefem.org/t/problem-of-calculating-error-order/3727)

<div class="topic-metadata">

**Author:** [@zezi-yang](https://community.freefem.org/u/zezi-yang)\
**Replies:** 0\
**Last updated:** [February 4, 2025, 4:43pm UTC](https://community.freefem.org/t/problem-of-calculating-error-order/3727 "2025-02-04T16:43:49Z")

</div>

Hello everyone, I encountered a weird situation when calculating the error order of Time-dependent Ginzburg-Landau(TDGL) equation. In order to calculate this equation, I use BDF1 discretization in time, P1 element in sp…

---

## [To replace Gmsh](https://community.freefem.org/t/to-replace-gmsh/3716)

<div class="topic-metadata">

**Author:** [@dominiquebodin](https://community.freefem.org/u/dominiquebodin)\
**Replies:** 17\
**Last updated:** [February 4, 2025, 2:39pm UTC](https://community.freefem.org/t/to-replace-gmsh/3716 "2025-02-04T14:39:55Z")

</div>

Hi all, In FreeFEM I have problems reading meshes generated by Gmsh as soon as there are labelled surfaces (e.g. Physical Surface(“inlet”, 26) = {7};). Reading the posts in this forum, I have the feeling that no solutio…

---

## [Normal stress in a horizontal line inside of a mesh from top side only](https://community.freefem.org/t/normal-stress-in-a-horizontal-line-inside-of-a-mesh-from-top-side-only/3717)

<div class="topic-metadata">

**Author:** [@Hemanta822](https://community.freefem.org/u/Hemanta822)\
**Replies:** 2\
**Last updated:** [February 3, 2025, 6:30pm UTC](https://community.freefem.org/t/normal-stress-in-a-horizontal-line-inside-of-a-mesh-from-top-side-only/3717 "2025-02-03T18:30:16Z")

</div>

Hi All, I am solving two problems P1 and P2 in the same mesh. I want to create a horizontal line inside of a mesh and use normal stress (computed only from the top side of the horizontal line) from problem P1 and use it…

---

## [Time Fractional FreeFem++ Code of Heat equation](https://community.freefem.org/t/time-fractional-freefem-code-of-heat-equation/3721)

<div class="topic-metadata">

**Author:** [@Monirul25](https://community.freefem.org/u/Monirul25)\
**Replies:** 0\
**Last updated:** [January 31, 2025, 8:08pm UTC](https://community.freefem.org/t/time-fractional-freefem-code-of-heat-equation/3721 "2025-01-31T20:08:34Z")

</div>

Hello, dear all, i am trying time fractional of Heat equation in FreeFem++. I am very beginner to this topic. Here, is my code\> Heat\_Frac.edp (2.8 KB) Caputo fractional derivative of order \\alpha = \\frac{1}{2} …

---

## [Need to Compute Intermediate solutions of Heat equation](https://community.freefem.org/t/need-to-compute-intermediate-solutions-of-heat-equation/3720)

<div class="topic-metadata">

**Author:** [@Monirul25](https://community.freefem.org/u/Monirul25)\
**Replies:** 0\
**Last updated:** [January 31, 2025, 7:37pm UTC](https://community.freefem.org/t/need-to-compute-intermediate-solutions-of-heat-equation/3720 "2025-01-31T19:37:36Z")

</div>

Hello, all experts, i have applied backward-Euler in Time dependent Heat equation. I am getting good results also. I want to store the intermediate solutions u^{1}, u^{2},…,u^{n-1}, where u^0 is the initial solution and…

---

## [Setting of Displacement Upper Limit for Specific Boundary in Linear Elastic Analysis](https://community.freefem.org/t/setting-of-displacement-upper-limit-for-specific-boundary-in-linear-elastic-analysis/3719)

<div class="topic-metadata">

**Author:** [@Ayataka](https://community.freefem.org/u/Ayataka)\
**Replies:** 0\
**Last updated:** [January 31, 2025, 5:52am UTC](https://community.freefem.org/t/setting-of-displacement-upper-limit-for-specific-boundary-in-linear-elastic-analysis/3719 "2025-01-31T05:52:31Z")

</div>

Dear FF++ developpers and users. I am interested in setting upper displacement limits for certain boundaries for linear elastic bodies. Does anyone know how to do this? I considered adopting the penalty method, but it…

---

## [How to keep region number after 'extractborder'](https://community.freefem.org/t/how-to-keep-region-number-after-extractborder/3718)

<div class="topic-metadata">

**Author:** [@zxss](https://community.freefem.org/u/zxss)\
**Replies:** 0\
**Last updated:** [January 30, 2025, 7:52pm UTC](https://community.freefem.org/t/how-to-keep-region-number-after-extractborder/3718 "2025-01-30T19:52:48Z")

</div>

Dear all, I use the command ‘extractborder’ to remesh, but the region number changes, is there a method to keep the region number. This is my code try3.edp (1.4 KB) The initial region number is 0 1 3, but after rem…

---

## [Partial Boundary Integration](https://community.freefem.org/t/partial-boundary-integration/3711)

<div class="topic-metadata">

**Author:** [@sruget](https://community.freefem.org/u/sruget)\
**Replies:** 6\
**Last updated:** [January 29, 2025, 3:35pm UTC](https://community.freefem.org/t/partial-boundary-integration/3711 "2025-01-29T15:35:29Z")

</div>

Hello, I am trying to integrate over a portion of my domain’s boundary but I am facing some weird results. To sum up, let’s say that my domain is \[0,1\]^2, and that I want to integrate over the part (y=0, x \\in \[0.25, 0.…

---

## [Out of Memory error](https://community.freefem.org/t/out-of-memory-error/3709)

<div class="topic-metadata">

**Author:** [@Monirul25](https://community.freefem.org/u/Monirul25)\
**Replies:** 15\
**Last updated:** [January 28, 2025, 2:38pm UTC](https://community.freefem.org/t/out-of-memory-error/3709 "2025-01-28T14:38:26Z")

</div>

Hello, all experts I am getting the following error " out of Memory" to a specific FF+ code. My laptop is lenovo (intel Core i7). Does there any way to resolve this issue??. I have used " UMFPACK" solver. Thank…

---

## [Solution become unbounded](https://community.freefem.org/t/solution-become-unbounded/3710)

<div class="topic-metadata">

**Author:** [@kallol](https://community.freefem.org/u/kallol)\
**Replies:** 1\
**Last updated:** [January 27, 2025, 8:47am UTC](https://community.freefem.org/t/solution-become-unbounded/3710 "2025-01-27T08:47:06Z")

</div>

I am trying to solve wave equation in FreeFem using standard finite element. Due to the source term the approximate solution become unbounded. Can anyone tell me why is this happening? I am attaching the code here. Than…

---

## [Maxwell equation with periodic boundary condition using PETSc](https://community.freefem.org/t/maxwell-equation-with-periodic-boundary-condition-using-petsc/3708)

<div class="topic-metadata">

**Author:** [@jmorvan](https://community.freefem.org/u/jmorvan)\
**Replies:** 4\
**Last updated:** [January 24, 2025, 4:33pm UTC](https://community.freefem.org/t/maxwell-equation-with-periodic-boundary-condition-using-petsc/3708 "2025-01-24T16:33:39Z")

</div>

Hello, I’m working on a Maxwell problem with periodic boundary condition. I would like to go to parallel with my implementation, so I used the Maxwell3D\_PETSc example as a starting point. However, I’m facing some proble…

---

## [Bug with Petsc in building a local matrix with edge elements ](https://community.freefem.org/t/bug-with-petsc-in-building-a-local-matrix-with-edge-elements/3706)

<div class="topic-metadata">

**Author:** [@ctain](https://community.freefem.org/u/ctain)\
**Replies:** 4\
**Last updated:** [January 24, 2025, 3:21pm UTC](https://community.freefem.org/t/bug-with-petsc-in-building-a-local-matrix-with-edge-elements/3706 "2025-01-24T15:21:43Z")

</div>

Dear all, I encounter a bug when assembling a matrix with Nedelec elements. The problem does not show up with 4 procs but with 8 and more. Thank you for your help //================================================= l…

---

## [int1d(Th, label) on a 3D mesh](https://community.freefem.org/t/int1d-th-label-on-a-3d-mesh/1892)

<div class="topic-metadata">

**Author:** [@yongxing](https://community.freefem.org/u/yongxing)\
**Replies:** 4\
**Last updated:** [January 24, 2025, 3:25am UTC](https://community.freefem.org/t/int1d-th-label-on-a-3d-mesh/1892 "2025-01-24T03:25:39Z")

</div>

How can I compute a curve integral, which is part of a 3D mesh, such as: int1d(Th, label)(1.) where Th is a 3D mesh?

---

## [Zero boundary condition on the test space](https://community.freefem.org/t/zero-boundary-condition-on-the-test-space/3702)

<div class="topic-metadata">

**Author:** [@hthtb22](https://community.freefem.org/u/hthtb22)\
**Replies:** 3\
**Last updated:** [January 22, 2025, 4:21pm UTC](https://community.freefem.org/t/zero-boundary-condition-on-the-test-space/3702 "2025-01-22T16:21:38Z")

</div>

I try to implement the variational form where both trial and test function have zero boundary condition, i.e, u,v \\in H^1\_0(\\Omega) varf mainmatrix (u,v) = ... + on(1,2,3,4, u=0, v=0) ; The error: We expected an un…

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

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