# General Discussion

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

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

**Page:** 29

---

## [The impedance boundary condition in the FreeFem++](https://community.freefem.org/t/the-impedance-boundary-condition-in-the-freefem/2681)

<div class="topic-metadata">

**Author:** [@clthu](https://community.freefem.org/u/clthu)\
**Replies:** 1\
**Last updated:** [September 4, 2023, 2:25pm UTC](https://community.freefem.org/t/the-impedance-boundary-condition-in-the-freefem/2681 "2023-09-04T14:25:04Z")

</div>

Dear all, I am trying to make the impedance boundary condition in the FreeFem++ to simulate the acoustic wave. I have found it a little puzzle when I solve the linear Euler equations for (ux,uy,p,rho) and use such a bou…

---

## [Quick question about freefem output](https://community.freefem.org/t/quick-question-about-freefem-output/2683)

<div class="topic-metadata">

**Author:** [@jna1g18](https://community.freefem.org/u/jna1g18)\
**Replies:** 1\
**Last updated:** [September 4, 2023, 2:20pm UTC](https://community.freefem.org/t/quick-question-about-freefem-output/2683 "2023-09-04T14:20:49Z")

</div>

Hi all, if I have two functions defined in a FE space as follows: fespace Vh(mesh, P1); Vh u1, u2; will it be the case that array entries u1\[ \]\[ i \] and u2\[ \]\[ i \] each correspond to the same point in the mesh? I’m …

---

## [How to smooth data in the FreeFem++ (like movemean in matlab)](https://community.freefem.org/t/how-to-smooth-data-in-the-freefem-like-movemean-in-matlab/2672)

<div class="topic-metadata">

**Author:** [@clthu](https://community.freefem.org/u/clthu)\
**Replies:** 3\
**Last updated:** [September 4, 2023, 12:38pm UTC](https://community.freefem.org/t/how-to-smooth-data-in-the-freefem-like-movemean-in-matlab/2672 "2023-09-04T12:38:49Z")

</div>

Dear all, I meet this problem these days. I get some data after the simulation(NS equations) , but it isn’t so smooth (with some high frequency part in space) and I want to use some way to filter it or smooth it. Is th…

---

## [Get the weak form help](https://community.freefem.org/t/get-the-weak-form-help/2660)

<div class="topic-metadata">

**Author:** [@Robert](https://community.freefem.org/u/Robert)\
**Replies:** 25\
**Last updated:** [September 2, 2023, 12:59pm UTC](https://community.freefem.org/t/get-the-weak-form-help/2660 "2023-09-02T12:59:20Z")

</div>

Dear forum, Once again I ask for your kindness to guide me through a problem. In the figure attached (I didn’t find a better way to show the equations) there is a set of 4 equations that I am trying to solve, more preci…

---

## [A FreeFEM++ Code For Modified Weak Galerkin Finite Element Method](https://community.freefem.org/t/a-freefem-code-for-modified-weak-galerkin-finite-element-method/2666)

<div class="topic-metadata">

**Author:** [@ahbabil1983](https://community.freefem.org/u/ahbabil1983)\
**Replies:** 1\
**Last updated:** [September 1, 2023, 5:44pm UTC](https://community.freefem.org/t/a-freefem-code-for-modified-weak-galerkin-finite-element-method/2666 "2023-09-01T17:44:02Z")

</div>

Dear all, I hope you are doing very well. I want to write a FreeFEM++ code to solve the Poisson Problem -∆u=f in Ω u=g on ∂Ω using the Modified Weak Galerkin Finite Element Method mentioned in the paper: \[1\] “A modi…

---

## [Use or reference buildlayers() layers individually?](https://community.freefem.org/t/use-or-reference-buildlayers-layers-individually/2679)

<div class="topic-metadata">

**Author:** [@llober](https://community.freefem.org/u/llober)\
**Replies:** 0\
**Last updated:** [September 1, 2023, 2:57pm UTC](https://community.freefem.org/t/use-or-reference-buildlayers-layers-individually/2679 "2023-09-01T14:57:48Z")

</div>

Hi all, I’m trying to use FreeFem in my “temperature reached while drilling a hole with a drill bit” problem, that I posted a few days ago. So far, I’ve a 3D mesh build from a 2D mesh using buildlayers(), with lets say…

---

## [Change the color of triangle](https://community.freefem.org/t/change-the-color-of-triangle/2676)

<div class="topic-metadata">

**Author:** [@wby](https://community.freefem.org/u/wby)\
**Replies:** 0\
**Last updated:** [August 31, 2023, 4:18pm UTC](https://community.freefem.org/t/change-the-color-of-triangle/2676 "2023-08-31T16:18:04Z")

</div>

Dear developers, I have a quick question. How to change the color of the triangle or tetrahedron in mesh Th? Yours sincerely, Biyi

---

## [Question about section 2.18 in the documentation](https://community.freefem.org/t/question-about-section-2-18-in-the-documentation/2675)

<div class="topic-metadata">

**Author:** [@jna1g18](https://community.freefem.org/u/jna1g18)\
**Replies:** 0\
**Last updated:** [August 31, 2023, 11:39am UTC](https://community.freefem.org/t/question-about-section-2-18-in-the-documentation/2675 "2023-08-31T11:39:48Z")

</div>

Hi all, section 2.18 (Tutorial to write a transient Stokes solver in matrix form) seems like it could be quite useful to me, but it does not show the original form of the PDE problem. For me to learn properly, it would b…

---

## [Understanding FreeFem output](https://community.freefem.org/t/understanding-freefem-output/2673)

<div class="topic-metadata">

**Author:** [@larismartins](https://community.freefem.org/u/larismartins)\
**Replies:** 1\
**Last updated:** [August 30, 2023, 5:46pm UTC](https://community.freefem.org/t/understanding-freefem-output/2673 "2023-08-30T17:46:11Z")

</div>

Can someone help me understand the ouput of freefem++? when we do cout \<\< u\[\] \<\< ; it shows the values of the DoF? if I want tha value of u on a given point, do I do: fespace Vh(Th, P0); Vh xx = x, yy = y; cout \<\< …

---

## [Understanding the output of FreeFEM](https://community.freefem.org/t/understanding-the-output-of-freefem/479)

<div class="topic-metadata">

**Author:** [@kws](https://community.freefem.org/u/kws)\
**Replies:** 5\
**Last updated:** [August 30, 2023, 2:41pm UTC](https://community.freefem.org/t/understanding-the-output-of-freefem/479 "2023-08-30T14:41:27Z")

</div>

I am having some trouble understanding the output of FreeFEM and how to use it for further analysis. After solving for a solution u it is possible to save it to a file using ofstream TheFile(“some\_file\_name”); TheFile \<…

---

## [Question about PETSc](https://community.freefem.org/t/question-about-petsc/2670)

<div class="topic-metadata">

**Author:** [@jna1g18](https://community.freefem.org/u/jna1g18)\
**Replies:** 8\
**Last updated:** [August 30, 2023, 2:02pm UTC](https://community.freefem.org/t/question-about-petsc/2670 "2023-08-30T14:02:04Z")

</div>

Hi, is it possible to use PETSc while using the ‘problem’ keyword? Or is it necessary to use the ‘varf’ keyword when using PETSc? Cheers!

---

## [Problème piézoélectriques](https://community.freefem.org/t/probleme-piezoelectriques/2669)

<div class="topic-metadata">

**Author:** [@aweni](https://community.freefem.org/u/aweni)\
**Replies:** 0\
**Last updated:** [August 30, 2023, 7:06am UTC](https://community.freefem.org/t/probleme-piezoelectriques/2669 "2023-08-30T07:06:24Z")

</div>

Bonjour à tous J’ai eu a implémenter un problème de piézoélectricité en dimension…mais le résultat que j’obtienne à la sortie ne reflètent pas les résultats théorique trouver . J’ai besoin de votre aide. Merci

---

## [Calculate Thickness in MeshS](https://community.freefem.org/t/calculate-thickness-in-meshs/2668)

<div class="topic-metadata">

**Author:** [@alfat](https://community.freefem.org/u/alfat)\
**Replies:** 0\
**Last updated:** [August 30, 2023, 3:13am UTC](https://community.freefem.org/t/calculate-thickness-in-meshs/2668 "2023-08-30T03:13:19Z")

</div>

Dear FreeFEM Users! I am trying to model the crack propagation in a 3D mesh surface, but I am still confused about how to find the thickness of the mesh. Can this be calculated? Is there any mathematical reference to …

---

## [Plotting MeshL solutions,](https://community.freefem.org/t/plotting-meshl-solutions/2667)

<div class="topic-metadata">

**Author:** [@marchywka](https://community.freefem.org/u/marchywka)\
**Replies:** 0\
**Last updated:** [August 28, 2023, 11:38pm UTC](https://community.freefem.org/t/plotting-meshl-solutions/2667 "2023-08-28T23:38:37Z")

</div>

I had a hard time figuring out how to do 1D plots in ff so I decided to make that an early addition to datascope. The plugin and edp are inhere, ff\_dscope\_line.zip (23.7 KB) the code is a mess and the example not “mi…

---

## [Ideas for drilling a hole (kind of)](https://community.freefem.org/t/ideas-for-drilling-a-hole-kind-of/2663)

<div class="topic-metadata">

**Author:** [@llober](https://community.freefem.org/u/llober)\
**Replies:** 6\
**Last updated:** [August 27, 2023, 8:10pm UTC](https://community.freefem.org/t/ideas-for-drilling-a-hole-kind-of/2663 "2023-08-27T20:10:32Z")

</div>

Hi all, I’m trying to solve, more or less, the following problem with FreeFEM. I don’t need an exact solution, but an approximation of the Temperature distribution and the maximum Temperature reached in a concrete mater…

---

## [Implicit integration for elastodynamics using Newton's method](https://community.freefem.org/t/implicit-integration-for-elastodynamics-using-newtons-method/2631)

<div class="topic-metadata">

**Author:** [@rsantet](https://community.freefem.org/u/rsantet)\
**Replies:** 2\
**Last updated:** [August 27, 2023, 5:08pm UTC](https://community.freefem.org/t/implicit-integration-for-elastodynamics-using-newtons-method/2631 "2023-08-27T17:08:16Z")

</div>

Following many examples provided in the FreeFem documentation (Non-linear elasticity, Non-linear static problems, Newton Method for the Steady Navier-Stokes equation, Incompressible Navier Stokes, Steady Navier Stokes, e…

---

## [Yet another graphics interface for freefem, "datascope"](https://community.freefem.org/t/yet-another-graphics-interface-for-freefem-datascope/2665)

<div class="topic-metadata">

**Author:** [@marchywka](https://community.freefem.org/u/marchywka)\
**Replies:** 1\
**Last updated:** [August 26, 2023, 3:10pm UTC](https://community.freefem.org/t/yet-another-graphics-interface-for-freefem-datascope/2665 "2023-08-26T15:10:11Z")

</div>

This may not look too impressive but I was amazed how easy it was to create the plugin in the attached zip file. This is similar to the ffglut or medit stuff except the graphics program is freestanding and can work wit…

---

## [Error of splitmesh( )](https://community.freefem.org/t/error-of-splitmesh/2662)

<div class="topic-metadata">

**Author:** [@yongxing](https://community.freefem.org/u/yongxing)\
**Replies:** 0\
**Last updated:** [August 21, 2023, 2:13pm UTC](https://community.freefem.org/t/error-of-splitmesh/2662 "2023-08-21T14:13:18Z")

</div>

splitmesh () cannot work for a region with a hole, for example: border a1(t=0,1) {x=t; y=0 ;label=1;}; border a2(t=0,1) {x=1; y=t ;label=2;}; border a3(t=1,0) {x=t; y=1 ;label=3;}; border a4(t=1,0) {x=0; y=t ;label=4;};…

---

## [PB write error!](https://community.freefem.org/t/pb-write-error/1316)

<div class="topic-metadata">

**Author:** [@xiaojiemo](https://community.freefem.org/u/xiaojiemo)\
**Replies:** 3\
**Last updated:** [August 17, 2023, 4:04pm UTC](https://community.freefem.org/t/pb-write-error/1316 "2023-08-17T16:04:44Z")

</div>

hello,everyone, I want to output the data to a file and I wrote following code, { ofstream out(“setaf.txt”); out\<\<setaf\[\]; } savemesh(th2,“th2.msh”) the procedure exect due to “PB write error”. what’s wrong with it…

---

## [Issue of saving txt file](https://community.freefem.org/t/issue-of-saving-txt-file/2658)

<div class="topic-metadata">

**Author:** [@DongweiYe](https://community.freefem.org/u/DongweiYe)\
**Replies:** 1\
**Last updated:** [August 17, 2023, 7:19am UTC](https://community.freefem.org/t/issue-of-saving-txt-file/2658 "2023-08-17T07:19:05Z")

</div>

Hi, I am working on a steady NS equation (with low Reynolds number and fixed-point method) and trying to save the nodal result as .txt: ofstream uxfile("sample\_u\_"+j+".txt"); uxfile \<\< u\[\] \<\< endl; ofstream uyfile("sam…

---

## [Initial condition not used in parablic equation](https://community.freefem.org/t/initial-condition-not-used-in-parablic-equation/2652)

<div class="topic-metadata">

**Author:** [@Anita](https://community.freefem.org/u/Anita)\
**Replies:** 5\
**Last updated:** [August 16, 2023, 5:23pm UTC](https://community.freefem.org/t/initial-condition-not-used-in-parablic-equation/2652 "2023-08-16T17:23:22Z")

</div>

I’m still struggling with my system of equations but simplified it to 1 parabolic equation to find the issue and feal like I lost some basics. In below equation value of initial condition doesn’t influence results, look…

---

## [PETSc interpolate a function from global to local mesh](https://community.freefem.org/t/petsc-interpolate-a-function-from-global-to-local-mesh/2659)

<div class="topic-metadata">

**Author:** [@marcodeba](https://community.freefem.org/u/marcodeba)\
**Replies:** 8\
**Last updated:** [August 16, 2023, 1:30pm UTC](https://community.freefem.org/t/petsc-interpolate-a-function-from-global-to-local-mesh/2659 "2023-08-16T13:30:16Z")

</div>

Dear FreeFem users and developers, I know which is possible to “recollect” te results obtained in parallel on the tocal mesh to the global (starting) one using the mpiAllReduce(u,uS,mpiCommWorld, mpiSUM) command. Is the…

---

## [Convective term unsteady 2D NS equations](https://community.freefem.org/t/convective-term-unsteady-2d-ns-equations/2655)

<div class="topic-metadata">

**Author:** [@Erika](https://community.freefem.org/u/Erika)\
**Replies:** 1\
**Last updated:** [August 14, 2023, 3:05pm UTC](https://community.freefem.org/t/convective-term-unsteady-2d-ns-equations/2655 "2023-08-14T15:05:24Z")

</div>

Hi everyone, I am implementing unsteady 2D Navier-Stokes equations but I am having troubles with the convective term. Looking at the FreeFem documentation, I have found the built-in function convect that works pretty we…

---

## [Let the exact solution is unknown for the Poisson equation. How to compute the L2 error estimate u\_h - u\_h/2](https://community.freefem.org/t/let-the-exact-solution-is-unknown-for-the-poisson-equation-how-to-compute-the-l2-error-estimate-u-h-u-h-2/2653)

<div class="topic-metadata">

**Author:** [@RaghunathBandha](https://community.freefem.org/u/RaghunathBandha)\
**Replies:** 4\
**Last updated:** [August 14, 2023, 12:41pm UTC](https://community.freefem.org/t/let-the-exact-solution-is-unknown-for-the-poisson-equation-how-to-compute-the-l2-error-estimate-u-h-u-h-2/2653 "2023-08-14T12:41:12Z")

</div>

cout \<\< endl; cout \<\< “convergence:” \<\< endl; real r=1;real L2error; func uhold=0; for ( int log2 = 4; log2 \<= 5; log2++ ) { int m = pow ( 2.0, log2 ); border C(t=0, 2\*pi){x=cos(t); y=sin(t);} mesh Th = buildmesh…

---

## [Coefficient that varies on domain](https://community.freefem.org/t/coefficient-that-varies-on-domain/2647)

<div class="topic-metadata">

**Author:** [@larismartins](https://community.freefem.org/u/larismartins)\
**Replies:** 5\
**Last updated:** [August 10, 2023, 4:19pm UTC](https://community.freefem.org/t/coefficient-that-varies-on-domain/2647 "2023-08-10T16:19:24Z")

</div>

Hello, I’m trying to implement a coefficient value that varies depending on the area of the domain, this is the definition //parameters func real kappa() { int ni = 9, nj = 9; real r1=1./32.\*3./ni, k1=1., k3=1.; real…

---

## [Benchmark SPE10](https://community.freefem.org/t/benchmark-spe10/2648)

<div class="topic-metadata">

**Author:** [@larismartins](https://community.freefem.org/u/larismartins)\
**Replies:** 2\
**Last updated:** [August 10, 2023, 1:54am UTC](https://community.freefem.org/t/benchmark-spe10/2648 "2023-08-10T01:54:50Z")

</div>

Hi, has someone tried to solve this benchmark using FreeFem++? SPE Comparative Solution Project - dataset 2

---

## [Max number of border](https://community.freefem.org/t/max-number-of-border/2638)

<div class="topic-metadata">

**Author:** [@forgotthesemicolon](https://community.freefem.org/u/forgotthesemicolon)\
**Replies:** 6\
**Last updated:** [August 8, 2023, 11:13pm UTC](https://community.freefem.org/t/max-number-of-border/2638 "2023-08-08T23:13:42Z")

</div>

Hi everyone, I have a code with a surface composed of n quadrilaterals glued together, and because n \> 256, the number of borders is greater than 1024, so when I try to run my code, i have the following error : "Sorry …

---

## [Problems about boundary conditions in coupled eigenvalue problems](https://community.freefem.org/t/problems-about-boundary-conditions-in-coupled-eigenvalue-problems/2626)

<div class="topic-metadata">

**Author:** [@clthu](https://community.freefem.org/u/clthu)\
**Replies:** 5\
**Last updated:** [August 8, 2023, 8:55am UTC](https://community.freefem.org/t/problems-about-boundary-conditions-in-coupled-eigenvalue-problems/2626 "2023-08-08T08:55:32Z")

</div>

Dear all, I met a problem these days. I have to split my domain into 1 and 2, because different equations are solved in Th1 and Th2.( for example, q1=\[u,v,p\] for the imcompressible NS equations, while q2 = T for the th…

---

## [Negative values in solution](https://community.freefem.org/t/negative-values-in-solution/2642)

<div class="topic-metadata">

**Author:** [@Anita](https://community.freefem.org/u/Anita)\
**Replies:** 6\
**Last updated:** [August 7, 2023, 6:02pm UTC](https://community.freefem.org/t/negative-values-in-solution/2642 "2023-08-07T18:02:21Z")

</div>

I’m solving equations describing density of some physical tissues so obviously negative values have no sense in real world however I get some during calculation (and it’s getting worse with each time step). Have you fac…

---

## [Cahn-Hilliard Euler not working](https://community.freefem.org/t/cahn-hilliard-euler-not-working/2643)

<div class="topic-metadata">

**Author:** [@bATTLEGROUND](https://community.freefem.org/u/bATTLEGROUND)\
**Replies:** 9\
**Last updated:** [August 7, 2023, 11:58am UTC](https://community.freefem.org/t/cahn-hilliard-euler-not-working/2643 "2023-08-07T11:58:17Z")

</div>

Hi! I’m trying to simulate Cahn-Hilliard equation using explicit Euler scheme. However, no matter what changes I make and what parameters I choose I can’t get it to work. Can I use this scheme or does the non-linearity o…

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

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