# General Discussion

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

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

**Page:** 60

---

## [How to define boundary when mesh is imported from gmsh?](https://community.freefem.org/t/how-to-define-boundary-when-mesh-is-imported-from-gmsh/1054)

<div class="topic-metadata">

**Author:** [@distractor](https://community.freefem.org/u/distractor)\
**Replies:** 6\
**Last updated:** [June 23, 2021, 2:24pm UTC](https://community.freefem.org/t/how-to-define-boundary-when-mesh-is-imported-from-gmsh/1054 "2021-06-23T14:24:13Z")

</div>

Hi, I have been struggling with this question for quite a while now and it seems I am no closer to solving it than I was 14 days ago. So the issue is, I want to import the \*.msh file available HERE using the load "msh…

---

## [Strong formulation](https://community.freefem.org/t/strong-formulation/1042)

<div class="topic-metadata">

**Author:** [@paabl0\_9](https://community.freefem.org/u/paabl0_9)\
**Replies:** 1\
**Last updated:** [June 23, 2021, 12:09pm UTC](https://community.freefem.org/t/strong-formulation/1042 "2021-06-23T12:09:55Z")

</div>

Hi, i need to write this variational problem on its strong formulation. mesh Th=square(10,10); fespace Vh(Th,P1); Vh uh,vh; // func f=1; // func g=0; // problem laplace(uh,vh,solver=GMRES,tgv=1e5) = // int2d(Th)( …

---

## [Derive on a specific border for a particular calculus](https://community.freefem.org/t/derive-on-a-specific-border-for-a-particular-calculus/1051)

<div class="topic-metadata">

**Author:** [@Antonin\_a](https://community.freefem.org/u/Antonin_a)\
**Replies:** 4\
**Last updated:** [June 23, 2021, 12:00pm UTC](https://community.freefem.org/t/derive-on-a-specific-border-for-a-particular-calculus/1051 "2021-06-23T12:00:48Z")

</div>

Dear users, In order to obtain a partial reflective B.C. condition for a Helmholtz equation, I’d like to calculate the angle of incidence of a waterwave on a border. I call u the solution of the equation, and the resea…

---

## [Define a complicated function](https://community.freefem.org/t/define-a-complicated-function/1053)

<div class="topic-metadata">

**Author:** [@Aicha](https://community.freefem.org/u/Aicha)\
**Replies:** 3\
**Last updated:** [June 23, 2021, 11:46am UTC](https://community.freefem.org/t/define-a-complicated-function/1053 "2021-06-23T11:46:39Z")

</div>

Hi, how we define the following function with FF++ f(x,y,0)= 0.5 \* v0 \* (1+tanh(500 \* (R-r(x,y)))), r(x,y) \<= R , 0 if r(x,y)\>R where r(x,y)=sqrt{(x-x\_0)^2+(y-y\_0)^2} and R=\\sqrt{x\_0/pi} v0, x\_0 and y\_0 are real data …

---

## [Plot solutions functions of (x,y,t)](https://community.freefem.org/t/plot-solutions-functions-of-x-y-t/1048)

<div class="topic-metadata">

**Author:** [@Aicha](https://community.freefem.org/u/Aicha)\
**Replies:** 0\
**Last updated:** [June 18, 2021, 11:28am UTC](https://community.freefem.org/t/plot-solutions-functions-of-x-y-t/1048 "2021-06-18T11:28:17Z")

</div>

Hi! I have this example in 1D and my question is what are the changes we have to do in 2D when mesh Th = square(N,N,\[Lx,Hy\]);? Please meshL Th=segment(Nbx,\[x\*L,0.\]); int it,itsave; int Thnv = Th.nv; fespace Vh(Th,P1); …

---

## [Solving PDE on sphere using example provided by FreeFem](https://community.freefem.org/t/solving-pde-on-sphere-using-example-provided-by-freefem/1049)

<div class="topic-metadata">

**Author:** [@ejkc](https://community.freefem.org/u/ejkc)\
**Replies:** 0\
**Last updated:** [June 18, 2021, 1:16pm UTC](https://community.freefem.org/t/solving-pde-on-sphere-using-example-provided-by-freefem/1049 "2021-06-18T13:16:17Z")

</div>

Hi! I am new to freefem and a bit confused. I try to solve a pde on the sphere. In order to generate the mesh, I use one of the examples that comes with FreeFem. I then write down my weak form as in the tutorials, but i…

---

## [Broadcast fespace in MPI](https://community.freefem.org/t/broadcast-fespace-in-mpi/1041)

<div class="topic-metadata">

**Author:** [@adrienrvr](https://community.freefem.org/u/adrienrvr)\
**Replies:** 5\
**Last updated:** [June 17, 2021, 8:04am UTC](https://community.freefem.org/t/broadcast-fespace-in-mpi/1041 "2021-06-17T08:04:13Z")

</div>

Hi everybody, I would like to be able to broadcast an fespace of the processor(0) to all the other processors. However, the broadcast function does not seem to take fespace into account. I would like a single processor…

---

## [Upload with gmsh and plot mesh](https://community.freefem.org/t/upload-with-gmsh-and-plot-mesh/1044)

<div class="topic-metadata">

**Author:** [@distractor](https://community.freefem.org/u/distractor)\
**Replies:** 3\
**Last updated:** [June 17, 2021, 7:49am UTC](https://community.freefem.org/t/upload-with-gmsh-and-plot-mesh/1044 "2021-06-17T07:49:56Z")

</div>

Hi everyone, I am generating a \*.msh file with python (please see this link). The same file is then supposed to be imported in the FreeFem++ and I do that with: load "medit" load "gmsh" mesh3 Th = gmshload3("../proces…

---

## [Using mshmet and tetgreconstruction with periodic domains](https://community.freefem.org/t/using-mshmet-and-tetgreconstruction-with-periodic-domains/1043)

<div class="topic-metadata">

**Author:** [@kevinmo08](https://community.freefem.org/u/kevinmo08)\
**Replies:** 0\
**Last updated:** [June 16, 2021, 6:13pm UTC](https://community.freefem.org/t/using-mshmet-and-tetgreconstruction-with-periodic-domains/1043 "2021-06-16T18:13:44Z")

</div>

Hi all, I am trying to implement an adaptive meshing scheme using mshmet and tetgreconstruction for my 3D, periodic system. I am getting an error stating that Exec error : Periodic 3d: the both number of face is not t…

---

## [Macro ThN2O() myN2O](https://community.freefem.org/t/macro-thn2o-myn2o/1033)

<div class="topic-metadata">

**Author:** [@yongxing](https://community.freefem.org/u/yongxing)\
**Replies:** 5\
**Last updated:** [June 16, 2021, 11:58am UTC](https://community.freefem.org/t/macro-thn2o-myn2o/1033 "2021-06-16T11:58:45Z")

</div>

Dear Pierre, Following up your talk: Pierre Jolivet introduction to parallel FreeFEM part 1 - YouTube Pierre Jolivet introduction to parallel FreeFEM part 2 - YouTube fespace VhG(Thglobal, \[P2, P2, P1\]); fespace Vh(T…

---

## [Variational formulation and boundary condition](https://community.freefem.org/t/variational-formulation-and-boundary-condition/1032)

<div class="topic-metadata">

**Author:** [@Aicha](https://community.freefem.org/u/Aicha)\
**Replies:** 1\
**Last updated:** [June 16, 2021, 9:47am UTC](https://community.freefem.org/t/variational-formulation-and-boundary-condition/1032 "2021-06-16T09:47:49Z")

</div>

Hi, We consider in 2D domain : \[0,L\] x\[0,H\], the system of equations: dV/dt = D\* Delta V - dV/dx - V dU/dt= V - alpha\* U with boundary conditions x=0,L: dV/dx = 0, y=0: dV/dy=- U + V; y=H: dV/dy=0 and initial condi…

---

## [Matrix in two dimension of space](https://community.freefem.org/t/matrix-in-two-dimension-of-space/1040)

<div class="topic-metadata">

**Author:** [@Aicha](https://community.freefem.org/u/Aicha)\
**Replies:** 2\
**Last updated:** [June 16, 2021, 9:39am UTC](https://community.freefem.org/t/matrix-in-two-dimension-of-space/1040 "2021-06-16T09:39:53Z")

</div>

Hi, can anyone help in this question please i found in a code FF++ in one dimension of space the follwing instructions: int Nbx=1e4; real tau=10.; meshL Th=segment(Nbx,\[x\*L,0.\]); fespace Vh(Th,typeFE); Vh I0; Vh …

---

## [Finer mesh is not getting a better result](https://community.freefem.org/t/finer-mesh-is-not-getting-a-better-result/1034)

<div class="topic-metadata">

**Author:** [@chaimaa](https://community.freefem.org/u/chaimaa)\
**Replies:** 1\
**Last updated:** [June 16, 2021, 9:29am UTC](https://community.freefem.org/t/finer-mesh-is-not-getting-a-better-result/1034 "2021-06-16T09:29:00Z")

</div>

Hello, im currently run heat conduction analysis. i make a finer mesh, but sometime the result suddenly raise and sometime suddenly drop and specially when i use P2 mesh category . can you help me ?

---

## [Define function](https://community.freefem.org/t/define-function/1036)

<div class="topic-metadata">

**Author:** [@Aicha](https://community.freefem.org/u/Aicha)\
**Replies:** 2\
**Last updated:** [June 16, 2021, 8:04am UTC](https://community.freefem.org/t/define-function/1036 "2021-06-16T08:04:11Z")

</div>

Hi, how we define the function f(x,y,t=0)= a if |x-x\_0|^2+|y-y\_0|^2 \<= r^2 , 0 else a,x\_0 , y\_0 and r are real data. Thank you in advance

---

## [System of two equations](https://community.freefem.org/t/system-of-two-equations/1006)

<div class="topic-metadata">

**Author:** [@Aicha](https://community.freefem.org/u/Aicha)\
**Replies:** 0\
**Last updated:** [June 2, 2021, 8:51pm UTC](https://community.freefem.org/t/system-of-two-equations/1006 "2021-06-02T20:51:21Z")

</div>

Hi, i have to resolve two following equations in 2D domain : \[0,L\] x\[0,H\] dV/dt = D\* Delta V - dV/dx - V dU/dt= V(x,0,t) - U (where V is the solution of the first equation). with boundary conditions x=0,L: dV/dx = 0…

---

## [Curl computation](https://community.freefem.org/t/curl-computation/1028)

<div class="topic-metadata">

**Author:** [@Dua](https://community.freefem.org/u/Dua)\
**Replies:** 1\
**Last updated:** [June 13, 2021, 9:54am UTC](https://community.freefem.org/t/curl-computation/1028 "2021-06-13T09:54:20Z")

</div>

Hello every one, I have a problem when I want to compute Curl of my function, fespace Rh(Th, Edge03d); Rh \[lxx, lyy, lzz\]; func lx= x^2; func ly= x^2+3+y; func lz= 5.; \[lxx,lyy,lzz\]= 2\*Curl(lx,ly,lz); It gives me…

---

## [mpiAllReduce(uReduce\[\], uG\[\], mpiCommWorld, mpiSUM)](https://community.freefem.org/t/mpiallreduce-ureduce-ug-mpicommworld-mpisum/1027)

<div class="topic-metadata">

**Author:** [@yongxing](https://community.freefem.org/u/yongxing)\
**Replies:** 3\
**Last updated:** [June 11, 2021, 10:47pm UTC](https://community.freefem.org/t/mpiallreduce-ureduce-ug-mpicommworld-mpisum/1027 "2021-06-11T22:47:23Z")

</div>

Dear all, There is problem in line 3 in the following MPI code: fespace VhG(ThG, P2); //global mesh ThG VhG uG=0, uReduce=0; uReduce = u //u is a local variable defined on local mesh Th on one specifi…

---

## [buildDmesh() and combine meshes](https://community.freefem.org/t/builddmesh-and-combine-meshes/1026)

<div class="topic-metadata">

**Author:** [@yongxing](https://community.freefem.org/u/yongxing)\
**Replies:** 3\
**Last updated:** [June 11, 2021, 2:15pm UTC](https://community.freefem.org/t/builddmesh-and-combine-meshes/1026 "2021-06-11T14:15:50Z")

</div>

Dear all, It seems buildDmesh() can decompose a global mesh and distribute it to different MPI processes, but is there a similar function that can combine meshes from different processes to create a global mesh? An ini…

---

## [PETSc Example (navier-stokes-2d-SLEPc-complex.edp)](https://community.freefem.org/t/petsc-example-navier-stokes-2d-slepc-complex-edp/1021)

<div class="topic-metadata">

**Author:** [@D\_N\_Sarkar](https://community.freefem.org/u/D_N_Sarkar)\
**Replies:** 5\
**Last updated:** [June 10, 2021, 4:03pm UTC](https://community.freefem.org/t/petsc-example-navier-stokes-2d-slepc-complex-edp/1021 "2021-06-10T16:03:04Z")

</div>

Dear All, There is an example " navier-stokes-2d-SLEPc-complex.edp" available on ‘Examples’. The code is available here: FreeFem-sources/navier-stokes-2d-SLEPc-complex.edp at develop · FreeFem/FreeFem-sources · GitHub. …

---

## [Enquiry about MPI](https://community.freefem.org/t/enquiry-about-mpi/1000)

<div class="topic-metadata">

**Author:** [@ligax](https://community.freefem.org/u/ligax)\
**Replies:** 9\
**Last updated:** [June 9, 2021, 12:05pm UTC](https://community.freefem.org/t/enquiry-about-mpi/1000 "2021-06-09T12:05:04Z")

</div>

Dear all, I am new to FreeFEM and have met some problems about MPI recently. My algorithm is an iterative one, and in each iteration, there are many sub-problems that are independent with each other, hence I want to s…

---

## [Parallel fluid code](https://community.freefem.org/t/parallel-fluid-code/974)

<div class="topic-metadata">

**Author:** [@yongxing](https://community.freefem.org/u/yongxing)\
**Replies:** 10\
**Last updated:** [June 9, 2021, 10:10am UTC](https://community.freefem.org/t/parallel-fluid-code/974 "2021-06-09T10:10:41Z")

</div>

Dear all, Is there an example of parallel code for 3D NS equations? Best, Yongxing.

---

## [Optimizing the program](https://community.freefem.org/t/optimizing-the-program/1017)

<div class="topic-metadata">

**Author:** [@Jamal](https://community.freefem.org/u/Jamal)\
**Replies:** 0\
**Last updated:** [June 6, 2021, 9:18pm UTC](https://community.freefem.org/t/optimizing-the-program/1017 "2021-06-06T21:18:15Z")

</div>

hello everyone; can you help me to optimize my program . my programme try to solve an inverse problem using KMF algorithm /////////////////////////////// Programme //////////////////////////////// ////////////////// …

---

## [Savevtk high order](https://community.freefem.org/t/savevtk-high-order/1016)

<div class="topic-metadata">

**Author:** [@mrbenson](https://community.freefem.org/u/mrbenson)\
**Replies:** 0\
**Last updated:** [June 5, 2021, 10:43am UTC](https://community.freefem.org/t/savevtk-high-order/1016 "2021-06-05T10:43:52Z")

</div>

Hi, I read savevtk only supports P0 and P1, how i export a P\[2-4\] scalar field ? Thanks.

---

## [Tafel or Butler-Volmer boundary condition](https://community.freefem.org/t/tafel-or-butler-volmer-boundary-condition/997)

<div class="topic-metadata">

**Author:** [@wjfg1](https://community.freefem.org/u/wjfg1)\
**Replies:** 2\
**Last updated:** [June 4, 2021, 3:50pm UTC](https://community.freefem.org/t/tafel-or-butler-volmer-boundary-condition/997 "2021-06-04T15:50:04Z")

</div>

I have scoured the documentation and internet for examples, but cannot find one that explains how to impose a boundary condition that obeys the Tafel or Butler-Volmer equations. This occurs wherever an electrolyte is in …

---

## [Umpfack error in heat conduction problem](https://community.freefem.org/t/umpfack-error-in-heat-conduction-problem/1004)

<div class="topic-metadata">

**Author:** [@chaimaa](https://community.freefem.org/u/chaimaa)\
**Replies:** 1\
**Last updated:** [June 2, 2021, 2:52pm UTC](https://community.freefem.org/t/umpfack-error-in-heat-conduction-problem/1004 "2021-06-02T14:52:23Z")

</div>

i m trying to solve a problem of heat conduction and i use in first the umpfach solver but it give this error : Error umpfack umfpack\_di\_numeric status 1 Error umfpack\_di\_solve status 1 version de medit ffmedit.ex…

---

## [Segmentation fault in ffddm](https://community.freefem.org/t/segmentation-fault-in-ffddm/988)

<div class="topic-metadata">

**Author:** [@LazarosP](https://community.freefem.org/u/LazarosP)\
**Replies:** 2\
**Last updated:** [June 2, 2021, 4:48pm UTC](https://community.freefem.org/t/segmentation-fault-in-ffddm/988 "2021-06-02T16:48:06Z")

</div>

Hi, I have been trying to run a minimal example with mesh decomposition using ffddmbuildDmesh, but I run into a segmentation fault: Minimal example code (test.edp): load "msh3" macro dimension 3// EOM include "ffddm.i…

---

## [Transmission problem and jump conditions on the interface](https://community.freefem.org/t/transmission-problem-and-jump-conditions-on-the-interface/1005)

<div class="topic-metadata">

**Author:** [@bknassim](https://community.freefem.org/u/bknassim)\
**Replies:** 0\
**Last updated:** [June 2, 2021, 3:29pm UTC](https://community.freefem.org/t/transmission-problem-and-jump-conditions-on-the-interface/1005 "2021-06-02T15:29:31Z")

</div>

Hi all, I am interested in solving a Laplace problem in a domain made of two sub domains (transmission problem). The solution is regular in each subdomain but the jump of the trace of the solution on the interface is no…

---

## [Define a convection constant vectro!](https://community.freefem.org/t/define-a-convection-constant-vectro/1003)

<div class="topic-metadata">

**Author:** [@Kamal\_FEM](https://community.freefem.org/u/Kamal_FEM)\
**Replies:** 0\
**Last updated:** [June 1, 2021, 3:04pm UTC](https://community.freefem.org/t/define-a-convection-constant-vectro/1003 "2021-06-01T15:04:16Z")

</div>

Hi everybody, If you allow, I have a question about defining a constant advection vector for my reaction-advection-diffusion system. More precisely, I have the following program where the vector director of the directio…

---

## [Enquiry on problem definition](https://community.freefem.org/t/enquiry-on-problem-definition/1002)

<div class="topic-metadata">

**Author:** [@ligax](https://community.freefem.org/u/ligax)\
**Replies:** 0\
**Last updated:** [June 1, 2021, 2:47am UTC](https://community.freefem.org/t/enquiry-on-problem-definition/1002 "2021-06-01T02:47:03Z")

</div>

Dear all, The weak formula of my problem is here: (\\nbala u, \\nabla v) = (f, v \* Xi) - (\\nabla u0, \\nabla (v \* Xi)) , where u0, Xi is known. And u, v and u0 are in FEM space V1, while Xi is in FEM space V2 and V1 a…

---

## [How to freeze the mesh boundaries](https://community.freefem.org/t/how-to-freeze-the-mesh-boundaries/1001)

<div class="topic-metadata">

**Author:** [@ZHOUJIAXIN0814](https://community.freefem.org/u/ZHOUJIAXIN0814)\
**Replies:** 0\
**Last updated:** [June 1, 2021, 1:35am UTC](https://community.freefem.org/t/how-to-freeze-the-mesh-boundaries/1001 "2021-06-01T01:35:43Z")

</div>

Greetings! I have a question regarding the Freefem++ 2D remesher. I want to refine only part of my meshing for efficient computation. The idea is to use trunc function to divide the whole region into two parts. Then …

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

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