# General Discussion

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

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

**Page:** 44

---

## [Level set "distance" / Assertion fail](https://community.freefem.org/t/level-set-distance-assertion-fail/1646)

<div class="topic-metadata">

**Author:** [@ffeppon](https://community.freefem.org/u/ffeppon)\
**Replies:** 3\
**Last updated:** [July 27, 2022, 2:30pm UTC](https://community.freefem.org/t/level-set-distance-assertion-fail/1646 "2022-07-27T14:30:48Z")

</div>

Dear developpers. I am encountering a bug when I try to apply the function “distance” to a level set function on a 3D mesh: load "medit"; load "distance"; real tclock;//For measuring time mesh3 Th=readmesh3("Th.mesh…

---

## [1D periodic boundary condition](https://community.freefem.org/t/1d-periodic-boundary-condition/1800)

<div class="topic-metadata">

**Author:** [@Qianrui](https://community.freefem.org/u/Qianrui)\
**Replies:** 10\
**Last updated:** [July 27, 2022, 2:25pm UTC](https://community.freefem.org/t/1d-periodic-boundary-condition/1800 "2022-07-27T14:25:50Z")

</div>

Hello, Professor, I used the following one-dimensional periodic boundary code, but something went wrong, load “msh3” border OX(t=-40,40){x=t;y=0;} int m=100; // grid points on x-interval \[0,1\] real h=1./m; meshL Th…

---

## [Integral Transform?](https://community.freefem.org/t/integral-transform/1915)

<div class="topic-metadata">

**Author:** [@sbreckling](https://community.freefem.org/u/sbreckling)\
**Replies:** 1\
**Last updated:** [July 27, 2022, 2:24pm UTC](https://community.freefem.org/t/integral-transform/1915 "2022-07-27T14:24:14Z")

</div>

Hello! I’m interested in using an integral transform within a problem I’m solving, and I don’t see an obvious way forward. In general, let’s say I need an operator “A” that sends a function u (in a FE space Vh) to anoth…

---

## [How to use Freefem plugin with mmap and semaphore in parallel](https://community.freefem.org/t/how-to-use-freefem-plugin-with-mmap-and-semaphore-in-parallel/1911)

<div class="topic-metadata">

**Author:** [@zcwang6](https://community.freefem.org/u/zcwang6)\
**Replies:** 2\
**Last updated:** [July 26, 2022, 12:41pm UTC](https://community.freefem.org/t/how-to-use-freefem-plugin-with-mmap-and-semaphore-in-parallel/1911 "2022-07-26T12:41:06Z")

</div>

Dear Freefem team, I was wondering if there is any example shows a way to use mmap and semaphore in freefem in parallel computing? In sequential case, the example on your web page is very useful to me. However, I have a …

---

## [Plotting issue on square mesh](https://community.freefem.org/t/plotting-issue-on-square-mesh/1897)

<div class="topic-metadata">

**Author:** [@AzizTakhirov](https://community.freefem.org/u/AzizTakhirov)\
**Replies:** 9\
**Last updated:** [July 25, 2022, 12:59pm UTC](https://community.freefem.org/t/plotting-issue-on-square-mesh/1897 "2022-07-25T12:59:43Z")

</div>

Hello, I just installed the FreeFem++ v4.11 on Linux Mint 20.3 on my new machine. I was testing the codes in the examples and encountered segfault with plotting on a square mesh. For example, this code produces segfa…

---

## [Nonconformal meshes](https://community.freefem.org/t/nonconformal-meshes/1907)

<div class="topic-metadata">

**Author:** [@liang](https://community.freefem.org/u/liang)\
**Replies:** 2\
**Last updated:** [July 24, 2022, 5:52am UTC](https://community.freefem.org/t/nonconformal-meshes/1907 "2022-07-24T05:52:33Z")

</div>

Can nonconformal meshes be used in the nonoverlapping Schwarz domain decomposition method implemented by FreeFEM++ ?

---

## [Read varlues created from FreeFem ofstream](https://community.freefem.org/t/read-varlues-created-from-freefem-ofstream/1899)

<div class="topic-metadata">

**Author:** [@Stefanosv](https://community.freefem.org/u/Stefanosv)\
**Replies:** 1\
**Last updated:** [July 23, 2022, 10:34am UTC](https://community.freefem.org/t/read-varlues-created-from-freefem-ofstream/1899 "2022-07-23T10:34:10Z")

</div>

I have calculated some values on a .edp and I want to read them on a different one. I used the following code to save them {ofstream fout("f1.txt"); fout \<\< f1 \<\< endl; } Most of the files are arrays but one of them i…

---

## [Neumann condition](https://community.freefem.org/t/neumann-condition/1903)

<div class="topic-metadata">

**Author:** [@Jamal](https://community.freefem.org/u/Jamal)\
**Replies:** 3\
**Last updated:** [July 23, 2022, 10:16am UTC](https://community.freefem.org/t/neumann-condition/1903 "2022-07-23T10:16:00Z")

</div>

Hello everyone. how to calculate the outward normal vector. Because I want to find the value of Neumann condition. When I use : Neumann= dx(Uex)\*N.x+dy(Uex)\*N.y I found Neumann= 000000 000000 … NB: Uex is the e…

---

## [The difference of macro commands](https://community.freefem.org/t/the-difference-of-macro-commands/1905)

<div class="topic-metadata">

**Author:** [@Qianrui](https://community.freefem.org/u/Qianrui)\
**Replies:** 1\
**Last updated:** [July 22, 2022, 6:17am UTC](https://community.freefem.org/t/the-difference-of-macro-commands/1905 "2022-07-22T06:17:58Z")

</div>

Hello, about macro commands, what is the difference between the following two commands? macro def(i)\[i, i#B, i#C\]// EOM // vector field definition macro init(i)\[i, i, i\]// EOM // vector field initialization …

---

## [Generate 3D PostScript out of plot](https://community.freefem.org/t/generate-3d-postscript-out-of-plot/1901)

<div class="topic-metadata">

**Author:** [@Curiin](https://community.freefem.org/u/Curiin)\
**Replies:** 4\
**Last updated:** [July 21, 2022, 3:32pm UTC](https://community.freefem.org/t/generate-3d-postscript-out-of-plot/1901 "2022-07-21T15:32:18Z")

</div>

Hi there, I’m trying to save a plot in 3D. Meaning: I have a function and when I use plot, I want to save the image that appears after I press 3 (giving me the 3D view) using postscript ps. I’ve figured out that in the…

---

## [How to access the boundary triangles](https://community.freefem.org/t/how-to-access-the-boundary-triangles/1329)

<div class="topic-metadata">

**Author:** [@Amin](https://community.freefem.org/u/Amin)\
**Replies:** 1\
**Last updated:** [July 20, 2022, 11:43am UTC](https://community.freefem.org/t/how-to-access-the-boundary-triangles/1329 "2022-07-20T11:43:53Z")

</div>

Hello, I want to access all triangles with at least one boundary vertex. And then the boundary vertices in each of these triangles need to be find. I tried the following code and got an error at the start. the followi…

---

## [Redefine mesh and fespace](https://community.freefem.org/t/redefine-mesh-and-fespace/1902)

<div class="topic-metadata">

**Author:** [@miguelpicos](https://community.freefem.org/u/miguelpicos)\
**Replies:** 4\
**Last updated:** [July 20, 2022, 10:04am UTC](https://community.freefem.org/t/redefine-mesh-and-fespace/1902 "2022-07-20T10:04:47Z")

</div>

Hello, I’m working on a problem where I have to redefine the mesh and its fespace asociated. Right now I’m rebuilding everything at every step and it works. As you may deduce this is not efficient so I would like to use…

---

## [Unit of force in Navier-stokes](https://community.freefem.org/t/unit-of-force-in-navier-stokes/1900)

<div class="topic-metadata">

**Author:** [@zese](https://community.freefem.org/u/zese)\
**Replies:** 1\
**Last updated:** [July 20, 2022, 8:57am UTC](https://community.freefem.org/t/unit-of-force-in-navier-stokes/1900 "2022-07-20T08:57:31Z")

</div>

Dear all, I have a fundamental question which may be simple. In Navier-stokes momentum equation as the following: is the unit of F hear N/m^2 for a 2D simulation? Because I have to export F from freefem++ I need to …

---

## [Trunc boolean function to keep elements](https://community.freefem.org/t/trunc-boolean-function-to-keep-elements/1896)

<div class="topic-metadata">

**Author:** [@miguelpicos](https://community.freefem.org/u/miguelpicos)\
**Replies:** 4\
**Last updated:** [July 19, 2022, 6:53am UTC](https://community.freefem.org/t/trunc-boolean-function-to-keep-elements/1896 "2022-07-19T06:53:55Z")

</div>

Hello, When you use the trunc function to keep elements from a mesh using a boolean function, you keep a element of the mesh if, at all vertices, the function is true. I need to do the oposite. I need to keep a element …

---

## [Applying Multiple Point Forces](https://community.freefem.org/t/applying-multiple-point-forces/1792)

<div class="topic-metadata">

**Author:** [@Stefanosv](https://community.freefem.org/u/Stefanosv)\
**Replies:** 8\
**Last updated:** [July 18, 2022, 12:49pm UTC](https://community.freefem.org/t/applying-multiple-point-forces/1792 "2022-07-18T12:49:00Z")

</div>

Hello, I’m a new Free Fem user and this is my first dive to programming after using MatLAB for my university. I am studying about topology optimization and I want to use the Elasticity module to extract values for Disp…

---

## [How to solve multiple problems in parallel (not domain decomposition)](https://community.freefem.org/t/how-to-solve-multiple-problems-in-parallel-not-domain-decomposition/1767)

<div class="topic-metadata">

**Author:** [@Jade](https://community.freefem.org/u/Jade)\
**Replies:** 28\
**Last updated:** [July 17, 2022, 6:20pm UTC](https://community.freefem.org/t/how-to-solve-multiple-problems-in-parallel-not-domain-decomposition/1767 "2022-07-17T18:20:03Z")

</div>

I need to solve multiple instances of the Helmholtz equation with fixed matrix but different right-hand-sides. So I find this example. I have some experience with FEM in FreeFem and MATLAB, but zero experience with para…

---

## [Eigenvectors in the vectorial case](https://community.freefem.org/t/eigenvectors-in-the-vectorial-case/1885)

<div class="topic-metadata">

**Author:** [@Alexandru](https://community.freefem.org/u/Alexandru)\
**Replies:** 3\
**Last updated:** [July 15, 2022, 3:12pm UTC](https://community.freefem.org/t/eigenvectors-in-the-vectorial-case/1885 "2022-07-15T15:12:54Z")

</div>

Dear all, In 2D elasticity, if Th is the mesh on a domain, then an eigenvector is an array in “fespace Vh(Th, \[P2,P2\])”. If nev is an integer and “Vh\[int\] eVu,eVv” is intended to store the eigenvectors the line ncev =…

---

## [Example about solving mixed finite element (PETSc)](https://community.freefem.org/t/example-about-solving-mixed-finite-element-petsc/1894)

<div class="topic-metadata">

**Author:** [@Qianrui](https://community.freefem.org/u/Qianrui)\
**Replies:** 4\
**Last updated:** [July 15, 2022, 10:42am UTC](https://community.freefem.org/t/example-about-solving-mixed-finite-element-petsc/1894 "2022-07-15T10:42:38Z")

</div>

Hello, is there any example about solving mixed finite element (PETSc)?

---

## [Mpirun and ff-mpirun works in Mac but not in Ubuntu](https://community.freefem.org/t/mpirun-and-ff-mpirun-works-in-mac-but-not-in-ubuntu/1889)

<div class="topic-metadata">

**Author:** [@Jade](https://community.freefem.org/u/Jade)\
**Replies:** 11\
**Last updated:** [July 14, 2022, 11:43am UTC](https://community.freefem.org/t/mpirun-and-ff-mpirun-works-in-mac-but-not-in-ubuntu/1889 "2022-07-14T11:43:04Z")

</div>

I have the following python code solveMPI.py to run an embarrasingly parallel job import numpy as np from mpi4py import MPI # import os import subprocess comm = MPI.COMM\_WORLD size = comm.Get\_size() def loop(rank): …

---

## [varf/SLEPc matrix definition with arbitrary numbers of equations](https://community.freefem.org/t/varf-slepc-matrix-definition-with-arbitrary-numbers-of-equations/1890)

<div class="topic-metadata">

**Author:** [@nicoloabrate](https://community.freefem.org/u/nicoloabrate)\
**Replies:** 2\
**Last updated:** [July 12, 2022, 4:08pm UTC](https://community.freefem.org/t/varf-slepc-matrix-definition-with-arbitrary-numbers-of-equations/1890 "2022-07-12T16:08:13Z")

</div>

Dear FF++ developers, I am wondering how I can define a macro or a function that takes in input the number of equations and automatically defines the variational forms and the matrices for the system solution. More spe…

---

## [Issue with Elasticity module](https://community.freefem.org/t/issue-with-elasticity-module/1887)

<div class="topic-metadata">

**Author:** [@Stefanosv](https://community.freefem.org/u/Stefanosv)\
**Replies:** 0\
**Last updated:** [July 11, 2022, 10:50am UTC](https://community.freefem.org/t/issue-with-elasticity-module/1887 "2022-07-11T10:50:06Z")

</div>

I have an issue while using the elasticity module. When I print the displacements ux and uy (called uu and vv on my code) they turn out to be the identical even though the results while ploting the displacement say other…

---

## [Error in parallelize a stabilization term](https://community.freefem.org/t/error-in-parallelize-a-stabilization-term/1874)

<div class="topic-metadata">

**Author:** [@cnfernandez](https://community.freefem.org/u/cnfernandez)\
**Replies:** 13\
**Last updated:** [July 11, 2022, 7:11am UTC](https://community.freefem.org/t/error-in-parallelize-a-stabilization-term/1874 "2022-07-11T07:11:35Z")

</div>

I’m try to parallelize the stabilization term of pressure in Boussinesq problem, because when we start the problem in 3D we need the parallelization in order to reduce the time. The problem occurs when we use 2 or more p…

---

## [Non linear elasticity equation using PETSc (SNES)](https://community.freefem.org/t/non-linear-elasticity-equation-using-petsc-snes/1886)

<div class="topic-metadata">

**Author:** [@Markov](https://community.freefem.org/u/Markov)\
**Replies:** 1\
**Last updated:** [July 10, 2022, 3:48pm UTC](https://community.freefem.org/t/non-linear-elasticity-equation-using-petsc-snes/1886 "2022-07-10T15:48:16Z")

</div>

Hello, I want to solve the non linear elasticity equation using SNES in PETSc, I’ve checked out the example that does not use PETSc and I was a little bit confused, did anyone solve this problem or a similar one using t…

---

## [Integrals of functions defined on different meshes](https://community.freefem.org/t/integrals-of-functions-defined-on-different-meshes/1883)

<div class="topic-metadata">

**Author:** [@Joanna](https://community.freefem.org/u/Joanna)\
**Replies:** 0\
**Last updated:** [July 8, 2022, 10:21am UTC](https://community.freefem.org/t/integrals-of-functions-defined-on-different-meshes/1883 "2022-07-08T10:21:28Z")

</div>

Hello, I have a small question if you could help me it would be great. I work on a problem which depends on time, and I do mesh adaptation according to a posteriori error indicators. In the variational formumation of …

---

## [Improving residual error, magnetostatic](https://community.freefem.org/t/improving-residual-error-magnetostatic/1878)

<div class="topic-metadata">

**Author:** [@tess35](https://community.freefem.org/u/tess35)\
**Replies:** 2\
**Last updated:** [July 7, 2022, 10:18pm UTC](https://community.freefem.org/t/improving-residual-error-magnetostatic/1878 "2022-07-07T22:18:15Z")

</div>

Hi everyone, I come back to the magnetostatic module (of FreeFem) and i discovered a residual error too much high for an another problem that i’m working on. An analytical formula give the field at the center o…

---

## [Bad orientation using BuildDmesh](https://community.freefem.org/t/bad-orientation-using-builddmesh/1879)

<div class="topic-metadata">

**Author:** [@slh](https://community.freefem.org/u/slh)\
**Replies:** 1\
**Last updated:** [July 7, 2022, 10:36am UTC](https://community.freefem.org/t/bad-orientation-using-builddmesh/1879 "2022-07-07T10:36:40Z")

</div>

Hi I am trying to import a mesh file (.mesh) generated in Gmsh (starting from a .step file). In the post Bad orientation, @prj proposed to use lockOrientation = false; mesh3 Th("d.mesh"); lockOrientation = true; mesh3…

---

## [Extract border from 2D mesh](https://community.freefem.org/t/extract-border-from-2d-mesh/1806)

<div class="topic-metadata">

**Author:** [@bachnguyen0106](https://community.freefem.org/u/bachnguyen0106)\
**Replies:** 5\
**Last updated:** [July 7, 2022, 7:01am UTC](https://community.freefem.org/t/extract-border-from-2d-mesh/1806 "2022-07-07T07:01:24Z")

</div>

Hi everyone, I was trying to extract the border from a 2D mesh. The only function that i could find on the FreeFem Documentation is only applied for a 3D mesh (mesh3, extractborder). I hope someone could help me on this…

---

## [Error with Nested matrix using PETSc with Local Communicator](https://community.freefem.org/t/error-with-nested-matrix-using-petsc-with-local-communicator/1848)

<div class="topic-metadata">

**Author:** [@Loic](https://community.freefem.org/u/Loic)\
**Replies:** 3\
**Last updated:** [July 6, 2022, 3:11pm UTC](https://community.freefem.org/t/error-with-nested-matrix-using-petsc-with-local-communicator/1848 "2022-07-06T15:11:09Z")

</div>

Hello all, I am using PETSc with a Local Communicator. Below I give you an example of code (random problem just to show the problem) verbosity=0; mpiComm commGlobal(mpiCommWorld,0,0); load "PETSc" load "gmsh"; macro …

---

## [How to access edge matrix in FreeFEM++?](https://community.freefem.org/t/how-to-access-edge-matrix-in-freefem/1737)

<div class="topic-metadata">

**Author:** [@jftrabago](https://community.freefem.org/u/jftrabago)\
**Replies:** 2\
**Last updated:** [July 5, 2022, 11:16pm UTC](https://community.freefem.org/t/how-to-access-edge-matrix-in-freefem/1737 "2022-07-05T23:16:18Z")

</div>

Is it possible to access the edge matrices in FreeFEM++? How does do it in FreeFEM++?

---

## [Comment définir une contrainte Infinie ou fini sur une frontière (border)?](https://community.freefem.org/t/comment-definir-une-contrainte-infinie-ou-fini-sur-une-frontiere-border/1865)

<div class="topic-metadata">

**Author:** [@Loiconga](https://community.freefem.org/u/Loiconga)\
**Replies:** 6\
**Last updated:** [July 5, 2022, 12:11pm UTC](https://community.freefem.org/t/comment-definir-une-contrainte-infinie-ou-fini-sur-une-frontiere-border/1865 "2022-07-05T12:11:51Z")

</div>

Bonjour, Je suis un nouveau utilisateur freeFem et je souhaite savoir comment on définit une contrainte infinie ou finie sur une frontière (border). Je vous remercie pour votre aide .

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

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