# General Discussion

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

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

**Page:** 36

---

## [Parallel for loop in freefem](https://community.freefem.org/t/parallel-for-loop-in-freefem/1204)

<div class="topic-metadata">

**Author:** [@distractor](https://community.freefem.org/u/distractor)\
**Replies:** 5\
**Last updated:** [March 5, 2023, 1:18pm UTC](https://community.freefem.org/t/parallel-for-loop-in-freefem/1204 "2023-03-05T13:18:35Z")

</div>

Hi, Is there any easy way to run a for loop in parallel in FreeFem++? For example the majority of code below could be run in parallel: int N = 1e6; real\[int\] a(N), b(N); // This loop could be parallel: for (int i = 0…

---

## [These guys do Dirac equation with FEM along t](https://community.freefem.org/t/these-guys-do-dirac-equation-with-fem-along-t/2311)

<div class="topic-metadata">

**Author:** [@marchywka](https://community.freefem.org/u/marchywka)\
**Replies:** 0\
**Last updated:** [March 5, 2023, 2:30am UTC](https://community.freefem.org/t/these-guys-do-dirac-equation-with-fem-along-t/2311 "2023-03-05T02:30:35Z")

</div>

Interesting simulation of Dirac equation \[1\] with FEM in all dimensions. Any particular issues encountered using one of the FEM dimensions as time? I’m not going to try a 3+1 D mesh generation but may try 2+1 …

---

## [Support for reading tetgen and gmsh mesh file formats](https://community.freefem.org/t/support-for-reading-tetgen-and-gmsh-mesh-file-formats/2308)

<div class="topic-metadata">

**Author:** [@marchywka](https://community.freefem.org/u/marchywka)\
**Replies:** 0\
**Last updated:** [March 3, 2023, 9:10am UTC](https://community.freefem.org/t/support-for-reading-tetgen-and-gmsh-mesh-file-formats/2308 "2023-03-03T09:10:28Z")

</div>

I used the example file that comes with tetgen saving the mesh as a “.mesh” file which is supposed to be a gmsh format but could not get freefem to read it. Importing into gmsh and saving as a .msh file failed too but …

---

## [How to add a circle inside a sphere?](https://community.freefem.org/t/how-to-add-a-circle-inside-a-sphere/2307)

<div class="topic-metadata">

**Author:** [@jftrabago](https://community.freefem.org/u/jftrabago)\
**Replies:** 0\
**Last updated:** [March 3, 2023, 8:31am UTC](https://community.freefem.org/t/how-to-add-a-circle-inside-a-sphere/2307 "2023-03-03T08:31:27Z")

</div>

Dear All, I want to create sphere and inside it is a circle. How do I create a mesh with this setup? For example, a sphere centered at the origin with a circle (of smaller radius) on plane xy. Many thanks!

---

## [Kelvin Helmholtz instability](https://community.freefem.org/t/kelvin-helmholtz-instability/2305)

<div class="topic-metadata">

**Author:** [@tle](https://community.freefem.org/u/tle)\
**Replies:** 1\
**Last updated:** [March 2, 2023, 8:35pm UTC](https://community.freefem.org/t/kelvin-helmholtz-instability/2305 "2023-03-02T20:35:56Z")

</div>

Hi, everyone. I want to ask if any one has tried to simulate the Kelvin Helmholtz instability? I dont know how to deal with the interface between two fluids.

---

## [Thin Layer Modelling](https://community.freefem.org/t/thin-layer-modelling/2302)

<div class="topic-metadata">

**Author:** [@alexrusu](https://community.freefem.org/u/alexrusu)\
**Replies:** 2\
**Last updated:** [March 1, 2023, 1:01pm UTC](https://community.freefem.org/t/thin-layer-modelling/2302 "2023-03-01T13:01:48Z")

</div>

Hi , I have recently started using FreeFEM for my PhD studying, but I have encountered a problem when I am trying to model very thin domains in 2D. I am trying to define a really thin rectangular shape (length 0.2 mm a…

---

## [Problem with vector fespace and result of matrix inversion](https://community.freefem.org/t/problem-with-vector-fespace-and-result-of-matrix-inversion/2296)

<div class="topic-metadata">

**Author:** [@marchywka](https://community.freefem.org/u/marchywka)\
**Replies:** 1\
**Last updated:** [March 1, 2023, 12:25pm UTC](https://community.freefem.org/t/problem-with-vector-fespace-and-result-of-matrix-inversion/2296 "2023-03-01T12:25:35Z")

</div>

I copied one of the mpi heat examples and tried to adapt it into a multi-species diffusion problem based on the syntax from other examples. I can get the A^-1 \* b to execute but using the result is huge problem. In …

---

## [Solve Coupled Partial differential equations](https://community.freefem.org/t/solve-coupled-partial-differential-equations/2295)

<div class="topic-metadata">

**Author:** [@Aud](https://community.freefem.org/u/Aud)\
**Replies:** 3\
**Last updated:** [March 1, 2023, 10:59am UTC](https://community.freefem.org/t/solve-coupled-partial-differential-equations/2295 "2023-03-01T10:59:58Z")

</div>

Hello dear community, I am new to FreeFEM. I have managed to solve single PDEs but now I would like to proceed with coupled ones. I have not yet found documentation related. can anyone help me in this regard? Thank you

---

## [PDE coupling on two meshes](https://community.freefem.org/t/pde-coupling-on-two-meshes/2299)

<div class="topic-metadata">

**Author:** [@fraphel](https://community.freefem.org/u/fraphel)\
**Replies:** 0\
**Last updated:** [March 1, 2023, 10:38am UTC](https://community.freefem.org/t/pde-coupling-on-two-meshes/2299 "2023-03-01T10:38:16Z")

</div>

Hello, I am studying the coupling of the bidomain equations (on a 2D finite element mesh ThB corresponding ) with a Laplace equation (on a 2D finite element mesh ThL). However I am faced with the following boundary cond…

---

## [Poisson equation with lagrange multiplier using PETSc](https://community.freefem.org/t/poisson-equation-with-lagrange-multiplier-using-petsc/2292)

<div class="topic-metadata">

**Author:** [@fvgt](https://community.freefem.org/u/fvgt)\
**Replies:** 5\
**Last updated:** [February 27, 2023, 1:26pm UTC](https://community.freefem.org/t/poisson-equation-with-lagrange-multiplier-using-petsc/2292 "2023-02-27T13:26:07Z")

</div>

Dear FreeFem++ users, I would like to solve a Poisson problem on a square under the constraint that the solution is zero on a disk (contained inside the square) using PETSc. To do that I use a Lagrange multiplier define…

---

## [Question about boundary condition related to vector potential](https://community.freefem.org/t/question-about-boundary-condition-related-to-vector-potential/2122)

<div class="topic-metadata">

**Author:** [@m31phy](https://community.freefem.org/u/m31phy)\
**Replies:** 9\
**Last updated:** [February 25, 2023, 3:50pm UTC](https://community.freefem.org/t/question-about-boundary-condition-related-to-vector-potential/2122 "2023-02-25T15:50:22Z")

</div>

Dear all Hi. I am trying to solve time-dependent ginzburg landau equation of 2D superconductor. When I try to solve this problem, I encounter some problem. Basically, the boundary condition for the vector potentials is…

---

## [Interesting result, not obvious earlier,](https://community.freefem.org/t/interesting-result-not-obvious-earlier/2286)

<div class="topic-metadata">

**Author:** [@marchywka](https://community.freefem.org/u/marchywka)\
**Replies:** 12\
**Last updated:** [February 25, 2023, 12:22pm UTC](https://community.freefem.org/t/interesting-result-not-obvious-earlier/2286 "2023-02-25T12:22:47Z")

</div>

As part of learning FreeFEN, I tried to model a system of several species ( called f1,f1a,f2,f2a, fgn, and fb ). The species f1,f2, and fgn are present at some uniform concentration in a liquid while f1a, f2a, and fb a…

---

## [Solve system given function instead of matrix](https://community.freefem.org/t/solve-system-given-function-instead-of-matrix/2290)

<div class="topic-metadata">

**Author:** [@BeniaminBogosel](https://community.freefem.org/u/BeniaminBogosel)\
**Replies:** 3\
**Last updated:** [February 24, 2023, 8:32pm UTC](https://community.freefem.org/t/solve-system-given-function-instead-of-matrix/2290 "2023-02-24T20:32:02Z")

</div>

Typically, when solving a classical problem like the Laplace equation, we may construct the matrix A starting from the bilinear form, build the right-hand side b and solve the system using A^(-1)\*b. When the matrix A is …

---

## [Question for parallelization in FreeFem](https://community.freefem.org/t/question-for-parallelization-in-freefem/2288)

<div class="topic-metadata">

**Author:** [@m31phy](https://community.freefem.org/u/m31phy)\
**Replies:** 5\
**Last updated:** [February 23, 2023, 7:53pm UTC](https://community.freefem.org/t/question-for-parallelization-in-freefem/2288 "2023-02-23T19:53:38Z")

</div>

Dear all I have a question related to an example of parallelization in FreeFEM++. The example is VG.edp, found in the FreeFEM example directory. When I ran the program, it seemed that each single core performed calculat…

---

## [I am on trouble with convection (advection) - diffusion problem](https://community.freefem.org/t/i-am-on-trouble-with-convection-advection-diffusion-problem/2280)

<div class="topic-metadata">

**Author:** [@ogwd](https://community.freefem.org/u/ogwd)\
**Replies:** 4\
**Last updated:** [February 23, 2023, 12:06pm UTC](https://community.freefem.org/t/i-am-on-trouble-with-convection-advection-diffusion-problem/2280 "2023-02-23T12:06:41Z")

</div>

Dear FreeFEM users, Recently, I am working on simulating diffusion - convection problem for a mechanical seal. I defined 2d-donut like domain as shown in figure below. Configurations is as follows; Inner region: rad…

---

## [Weird mesh behaviour](https://community.freefem.org/t/weird-mesh-behaviour/2126)

<div class="topic-metadata">

**Author:** [@Christian](https://community.freefem.org/u/Christian)\
**Replies:** 1\
**Last updated:** [February 23, 2023, 10:41am UTC](https://community.freefem.org/t/weird-mesh-behaviour/2126 "2023-02-23T10:41:37Z")

</div>

Hi everybody! I noticed a problem regarding the generation of the mesh inside the borders of my geometry system. i have to define a series of “chained hexagons” in order to simulate a sextant of a nuclear reactor core. …

---

## [Solve Eigenvalue problem - Segmentation Fault](https://community.freefem.org/t/solve-eigenvalue-problem-segmentation-fault/2274)

<div class="topic-metadata">

**Author:** [@Loic](https://community.freefem.org/u/Loic)\
**Replies:** 12\
**Last updated:** [February 20, 2023, 8:26am UTC](https://community.freefem.org/t/solve-eigenvalue-problem-segmentation-fault/2274 "2023-02-20T08:26:54Z")

</div>

Hello all, I am wondering how to solve such eigen value problem with FreeFEM (in which the matrices are not associated with a finite element operator). In this case the first and second matrices are spare matrices a…

---

## [Was "intall0d" intended for any purpose?](https://community.freefem.org/t/was-intall0d-intended-for-any-purpose/2271)

<div class="topic-metadata">

**Author:** [@marchywka](https://community.freefem.org/u/marchywka)\
**Replies:** 6\
**Last updated:** [February 19, 2023, 4:16pm UTC](https://community.freefem.org/t/was-intall0d-intended-for-any-purpose/2271 "2023-02-19T16:16:42Z")

</div>

I was trying to find a way to just get the matrix for a differential equation ( no integration/ bilinear form ). That is just the matrix of an expression containing various derivatives on some fespace. I found some thin…

---

## [Method of Moving Asymptotes (MMA)](https://community.freefem.org/t/method-of-moving-asymptotes-mma/2285)

<div class="topic-metadata">

**Author:** [@ydm](https://community.freefem.org/u/ydm)\
**Replies:** 4\
**Last updated:** [February 18, 2023, 1:30pm UTC](https://community.freefem.org/t/method-of-moving-asymptotes-mma/2285 "2023-02-18T13:30:01Z")

</div>

Deal all, I would like to know if there is MMA code implemented in FreeFEM? Thanks,

---

## [Symmetry compliant mesh generation](https://community.freefem.org/t/symmetry-compliant-mesh-generation/2276)

<div class="topic-metadata">

**Author:** [@avezz194](https://community.freefem.org/u/avezz194)\
**Replies:** 12\
**Last updated:** [February 15, 2023, 10:07am UTC](https://community.freefem.org/t/symmetry-compliant-mesh-generation/2276 "2023-02-15T10:07:53Z")

</div>

I need to generate a 2D mesh using triangular elements inside an hexagonal domain. I want my mesh to respect all the symmetries of the hexagon symmetry group. Is there a simple way to do that?

---

## [The equations in the "large fluid simulation" is wrong](https://community.freefem.org/t/the-equations-in-the-large-fluid-simulation-is-wrong/2275)

<div class="topic-metadata">

**Author:** [@cfdyuewu](https://community.freefem.org/u/cfdyuewu)\
**Replies:** 1\
**Last updated:** [February 11, 2023, 5:33pm UTC](https://community.freefem.org/t/the-equations-in-the-large-fluid-simulation-is-wrong/2275 "2023-02-11T17:33:33Z")

</div>

https://doc.freefem.org/tutorials/aLargeFluidProblem.html the navier-stokes is wrong, the correct form is the divergence of the product of miu\_{T} and the transpose of grad(u) is missing, it can’t be eliminated becau…

---

## [How to interpolate 3D simulation results onto a cartesian grid in Matlab?](https://community.freefem.org/t/how-to-interpolate-3d-simulation-results-onto-a-cartesian-grid-in-matlab/2278)

<div class="topic-metadata">

**Author:** [@d2reborn](https://community.freefem.org/u/d2reborn)\
**Replies:** 1\
**Last updated:** [February 14, 2023, 4:32pm UTC](https://community.freefem.org/t/how-to-interpolate-3d-simulation-results-onto-a-cartesian-grid-in-matlab/2278 "2023-02-14T16:32:18Z")

</div>

I think I can use convert\_pde\_data\_3d so no problem now. ============================================================================= Hi everyone. I am a beginner of Freefem. Now I am computing on a cubic domain and w…

---

## [Iovtk : Read function values from vtk file](https://community.freefem.org/t/iovtk-read-function-values-from-vtk-file/670)

<div class="topic-metadata">

**Author:** [@akiss](https://community.freefem.org/u/akiss)\
**Replies:** 3\
**Last updated:** [February 14, 2023, 1:08pm UTC](https://community.freefem.org/t/iovtk-read-function-values-from-vtk-file/670 "2023-02-14T13:08:09Z")

</div>

Dear all, I saved the values of a scalar field u together with the mesh Th in a .vtk file with savevtk(“u.vtk”, Th, u, dataname=“u”, order=\[1\]); Now I would like to read it in a new simulation. mesh umeshloaded=vtklo…

---

## [Boundary conditions in large fluid problem in the document](https://community.freefem.org/t/boundary-conditions-in-large-fluid-problem-in-the-document/2236)

<div class="topic-metadata">

**Author:** [@cfdyuewu](https://community.freefem.org/u/cfdyuewu)\
**Replies:** 4\
**Last updated:** [February 11, 2023, 7:34am UTC](https://community.freefem.org/t/boundary-conditions-in-large-fluid-problem-in-the-document/2236 "2023-02-11T07:34:14Z")

</div>

Hello, I am new to cfd and I just try to understand the boundary condition of the epsilon in the page large fluid problem, the link is \[large fluid problem\] (https://doc.freefem.org/tutorials/aLargeFluidProblem.html) t…

---

## [Plot() doesn't turn up on Linux RedHat 8.0](https://community.freefem.org/t/plot-doesnt-turn-up-on-linux-redhat-8-0/2244)

<div class="topic-metadata">

**Author:** [@yongxing](https://community.freefem.org/u/yongxing)\
**Replies:** 17\
**Last updated:** [February 9, 2023, 9:02am UTC](https://community.freefem.org/t/plot-doesnt-turn-up-on-linux-redhat-8-0/2244 "2023-02-09T09:02:53Z")

</div>

Hi, Just installed FreeFem++ 4.12 on a Linux Red Hat 8.0 system, and I tried different 2D and 3D examples. It is strange that plot() does NOT show up although there are no errors. Is this an issue of Linux or FreeFem i…

---

## [How to impose Robin boundary conditions for a eigenproblem](https://community.freefem.org/t/how-to-impose-robin-boundary-conditions-for-a-eigenproblem/2240)

<div class="topic-metadata">

**Author:** [@Christian](https://community.freefem.org/u/Christian)\
**Replies:** 3\
**Last updated:** [February 9, 2023, 8:57am UTC](https://community.freefem.org/t/how-to-impose-robin-boundary-conditions-for-a-eigenproblem/2240 "2023-02-09T08:57:25Z")

</div>

Hi everyone! I need to solve the diffusion neutron equaiton in a 2D geometry; In particular i want to solve the eigenproblem. Here below the mathematical description of the problem is shown: As can be seen from th…

---

## [Region based current definition](https://community.freefem.org/t/region-based-current-definition/2269)

<div class="topic-metadata">

**Author:** [@zirdi2000](https://community.freefem.org/u/zirdi2000)\
**Replies:** 3\
**Last updated:** [February 9, 2023, 8:51am UTC](https://community.freefem.org/t/region-based-current-definition/2269 "2023-02-09T08:51:32Z")

</div>

Hello, I am looking to define a current for certain regions in my mesh in a very similar example to the magnetostatics simulation. However, the code seems to only produce the current int he thicker parts of my magne…

---

## [SNES for bordered block matrix](https://community.freefem.org/t/snes-for-bordered-block-matrix/2193)

<div class="topic-metadata">

**Author:** [@cmd](https://community.freefem.org/u/cmd)\
**Replies:** 25\
**Last updated:** [February 7, 2023, 9:13pm UTC](https://community.freefem.org/t/snes-for-bordered-block-matrix/2193 "2023-02-07T21:13:59Z")

</div>

Hi everyone, I am working on solving a nonlinear problem using FreeFEM with PETSc/SNES. The linearized system solved at each Newton step results in a matrix with a bordered block structure that looks like this: Mat A =…

---

## [Real\[int\] from varf in PETSc](https://community.freefem.org/t/real-int-from-varf-in-petsc/2267)

<div class="topic-metadata">

**Author:** [@cmd](https://community.freefem.org/u/cmd)\
**Replies:** 6\
**Last updated:** [February 7, 2023, 9:32am UTC](https://community.freefem.org/t/real-int-from-varf-in-petsc/2267 "2023-02-07T09:32:27Z")

</div>

Hi FreeFEM community, I have noticed some strange behavior when I use a varf to create a real\[int\] in PETSc, and I’m not sure if this is a bug or my own misunderstanding. Please see that attached MWE (I’ve added some ex…

---

## [EDP syntax - if ( ) statements](https://community.freefem.org/t/edp-syntax-if-statements/2266)

<div class="topic-metadata">

**Author:** [@ceb](https://community.freefem.org/u/ceb)\
**Replies:** 2\
**Last updated:** [February 6, 2023, 8:55pm UTC](https://community.freefem.org/t/edp-syntax-if-statements/2266 "2023-02-06T20:55:43Z")

</div>

Thank you so much to everyone who codes/maintains this amazing software! I saw one-liner if ( ) statements in a few EDP file examples, and when I tried to use more statements between curly braces { } following the if ( …

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

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