# General Discussion

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

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

**Page:** 64

---

## [Compute matrix scalar product without creating new variable](https://community.freefem.org/t/compute-matrix-scalar-product-without-creating-new-variable/831)

<div class="topic-metadata">

**Author:** [@BeniaminBogosel](https://community.freefem.org/u/BeniaminBogosel)\
**Replies:** 0\
**Last updated:** [March 4, 2021, 12:50pm UTC](https://community.freefem.org/t/compute-matrix-scalar-product-without-creating-new-variable/831 "2021-03-04T12:50:48Z")

</div>

Hello, Is it possible to compute a matrix scalar product in FreeFEM without creating an additional real\[int\] variable? I would like to evaluate quantities like int2d(Th)(grad(u)'\*grad(u)) using the matrix formulation …

---

## [Control at the boundary](https://community.freefem.org/t/control-at-the-boundary/824)

<div class="topic-metadata">

**Author:** [@zese](https://community.freefem.org/u/zese)\
**Replies:** 2\
**Last updated:** [March 1, 2021, 6:05pm UTC](https://community.freefem.org/t/control-at-the-boundary/824 "2021-03-01T18:05:06Z")

</div>

Dear Friends I want to compute a gradient at the boundary but I dont know how. because the comment On() is used just for boundary condition while solving an equation. I already wrote the equation befor but there was no …

---

## [Question about how to program to realize some functions in freefem++?](https://community.freefem.org/t/question-about-how-to-program-to-realize-some-functions-in-freefem/826)

<div class="topic-metadata">

**Author:** [@Duzi100](https://community.freefem.org/u/Duzi100)\
**Replies:** 2\
**Last updated:** [March 1, 2021, 10:51am UTC](https://community.freefem.org/t/question-about-how-to-program-to-realize-some-functions-in-freefem/826 "2021-03-01T10:51:36Z")

</div>

Dear Friends I’m a green hand in using Freefem++, and I sincerely hope get some help form you guys. There is my question. How to realize the definition and call of functions with parameter input and output. Just like…

---

## [Combining periodic and non periodic boundary conditions](https://community.freefem.org/t/combining-periodic-and-non-periodic-boundary-conditions/805)

<div class="topic-metadata">

**Author:** [@Alex](https://community.freefem.org/u/Alex)\
**Replies:** 8\
**Last updated:** [March 1, 2021, 9:31am UTC](https://community.freefem.org/t/combining-periodic-and-non-periodic-boundary-conditions/805 "2021-03-01T09:31:25Z")

</div>

Hello, Is there a way to combine periodic and non-periodic boundary conditions in the same problem in FreeFEM++? Particularly, I am interested in modeling Navier-Stokes equations with periodic boundary conditions for ve…

---

## [Material Properties are assigned to 0](https://community.freefem.org/t/material-properties-are-assigned-to-0/827)

<div class="topic-metadata">

**Author:** [@Mik](https://community.freefem.org/u/Mik)\
**Replies:** 1\
**Last updated:** [March 1, 2021, 9:10am UTC](https://community.freefem.org/t/material-properties-are-assigned-to-0/827 "2021-03-01T09:10:32Z")

</div>

Dear Community, In my thermal problem, I am assigning the material property to 0 at a certain section of my mesh in order to not have any influence of this section in my computation. My code and results everything is pe…

---

## [Some questions about using PETSc to solve 3D elasticity problems](https://community.freefem.org/t/some-questions-about-using-petsc-to-solve-3d-elasticity-problems/825)

<div class="topic-metadata">

**Author:** [@zcwang6](https://community.freefem.org/u/zcwang6)\
**Replies:** 10\
**Last updated:** [February 25, 2021, 9:26pm UTC](https://community.freefem.org/t/some-questions-about-using-petsc-to-solve-3d-elasticity-problems/825 "2021-02-25T21:26:11Z")

</div>

Hey FreeFem++ team, as you suggest in our last discussion https://community.freefem.org/t/iteration-solver-and-direct-solver-results-are-huge-different-with-some-meshes/797/14, I decided to add nullspace to apply the rig…

---

## [Creating a surface inside a Volume](https://community.freefem.org/t/creating-a-surface-inside-a-volume/761)

<div class="topic-metadata">

**Author:** [@Mik](https://community.freefem.org/u/Mik)\
**Replies:** 2\
**Last updated:** [February 25, 2021, 7:49am UTC](https://community.freefem.org/t/creating-a-surface-inside-a-volume/761 "2021-02-25T07:49:55Z")

</div>

Dear Community, I would like to know if we can create a surface inside a volume to impose some conditions on it such as an adiabatic one. !\[Capture|690x294\] I have attached an image to illustrate. So for the 1st iterat…

---

## [Export solution](https://community.freefem.org/t/export-solution/822)

<div class="topic-metadata">

**Author:** [@Emma87](https://community.freefem.org/u/Emma87)\
**Replies:** 3\
**Last updated:** [February 23, 2021, 6:12pm UTC](https://community.freefem.org/t/export-solution/822 "2021-02-23T18:12:26Z")

</div>

Dear FreeFem community! I would like to know if there is an example to save a 2D solution for 1D, considering a unit square domain, and wanting to save for example the solution on the axis Y = 0.5

---

## [Coupled problem - square variable](https://community.freefem.org/t/coupled-problem-square-variable/812)

<div class="topic-metadata">

**Author:** [@Lisa](https://community.freefem.org/u/Lisa)\
**Replies:** 1\
**Last updated:** [February 23, 2021, 11:07am UTC](https://community.freefem.org/t/coupled-problem-square-variable/812 "2021-02-23T11:07:59Z")

</div>

Hello erevyone, I am contacting you to try to get some answers about a problem related to a squared variable. Indeed, I put here my simplified program with simple constants A, B, C etc and the variable c1 and the test …

---

## [Changing lables](https://community.freefem.org/t/changing-lables/811)

<div class="topic-metadata">

**Author:** [@nia](https://community.freefem.org/u/nia)\
**Replies:** 2\
**Last updated:** [February 23, 2021, 10:34am UTC](https://community.freefem.org/t/changing-lables/811 "2021-02-23T10:34:01Z")

</div>

Hello, I have physical surfaces and volumes from my gmsh mesh imported in freefem. how can I change these labels and check them to see if those are all imported? thanks.

---

## [Defining electrical properties for different regions from gmsh](https://community.freefem.org/t/defining-electrical-properties-for-different-regions-from-gmsh/807)

<div class="topic-metadata">

**Author:** [@nia](https://community.freefem.org/u/nia)\
**Replies:** 2\
**Last updated:** [February 23, 2021, 10:33am UTC](https://community.freefem.org/t/defining-electrical-properties-for-different-regions-from-gmsh/807 "2021-02-23T10:33:04Z")

</div>

Hello colleagues I have imported a 3D mesh from gmsh with different physical volumes inside it in freefem, all are imported in one mesh. I need to define different epsilon on each region. I can get my physical volumes …

---

## [Ffmatlib.idp import error](https://community.freefem.org/t/ffmatlib-idp-import-error/823)

<div class="topic-metadata">

**Author:** [@sumantkr](https://community.freefem.org/u/sumantkr)\
**Replies:** 0\
**Last updated:** [February 23, 2021, 5:48am UTC](https://community.freefem.org/t/ffmatlib-idp-import-error/823 "2021-02-23T05:48:40Z")

</div>

I am getting error in importing ffmatlib.idp . Kindly comment me to figure it out. Also, I am trying to save the solution for T over the entire domain \[0,1\]\*\[0,1\]. by: ofstream ff1("T\_domain.dat"); for(int i = 0; i\<…

---

## [Customise BAMG mesh generator](https://community.freefem.org/t/customise-bamg-mesh-generator/819)

<div class="topic-metadata">

**Author:** [@Zheyan-Z](https://community.freefem.org/u/Zheyan-Z)\
**Replies:** 0\
**Last updated:** [February 19, 2021, 10:28am UTC](https://community.freefem.org/t/customise-bamg-mesh-generator/819 "2021-02-19T10:28:50Z")

</div>

My research is on error estimation and mesh adaptation (-h). Currently I can only find adaptmesh() API which I have limited control. I have read the paper ‘An approximation of anisotropic metrics from higher order interp…

---

## [Scalar equation in PETSc block matrix system](https://community.freefem.org/t/scalar-equation-in-petsc-block-matrix-system/796)

<div class="topic-metadata">

**Author:** [@aszaboa](https://community.freefem.org/u/aszaboa)\
**Replies:** 6\
**Last updated:** [February 18, 2021, 5:32pm UTC](https://community.freefem.org/t/scalar-equation-in-petsc-block-matrix-system/796 "2021-02-18T17:32:30Z")

</div>

Dear FreeFem community! I would like to solve a nonlinear problem using FreeFem and PETSc. The problem consists of 3 \[P2,P2,P1\] equations and a scalar equation that sets the value of one of the vectorial functions at a…

---

## [Parameters for macro\_ddm.idp](https://community.freefem.org/t/parameters-for-macro-ddm-idp/813)

<div class="topic-metadata">

**Author:** [@Jeet](https://community.freefem.org/u/Jeet)\
**Replies:** 2\
**Last updated:** [February 16, 2021, 10:32pm UTC](https://community.freefem.org/t/parameters-for-macro-ddm-idp/813 "2021-02-16T22:32:00Z")

</div>

Hi FreeFem developers! I use FreeFem to implement shape optimization for nonlinear mechanics and I am trying make the entire solver parallel. To begin with, I started with the example elasticity-3d\_PETSc.edp from FreeFe…

---

## [Pixel values on freefem](https://community.freefem.org/t/pixel-values-on-freefem/808)

<div class="topic-metadata">

**Author:** [@mnnn](https://community.freefem.org/u/mnnn)\
**Replies:** 0\
**Last updated:** [February 15, 2021, 6:08pm UTC](https://community.freefem.org/t/pixel-values-on-freefem/808 "2021-02-15T18:08:07Z")

</div>

Hello , i have an image where i have created internal borders, now i want to loop over the image and assign parameter values according to pixel values. Is there any way to do this on Freefem?

---

## [Matrix plus and multiplication](https://community.freefem.org/t/matrix-plus-and-multiplication/806)

<div class="topic-metadata">

**Author:** [@yongxing](https://community.freefem.org/u/yongxing)\
**Replies:** 3\
**Last updated:** [February 14, 2021, 8:47pm UTC](https://community.freefem.org/t/matrix-plus-and-multiplication/806 "2021-02-14T20:47:55Z")

</div>

Dear FreeFEM users, If I create two marices from my variation forms, say matrix A and B, can I do the operation A+B or A\*B? Actually, I have tried and it seems I was allowed to do so. However, I am not sure whether it …

---

## [Problem with subdomains](https://community.freefem.org/t/problem-with-subdomains/799)

<div class="topic-metadata">

**Author:** [@faya](https://community.freefem.org/u/faya)\
**Replies:** 1\
**Last updated:** [February 12, 2021, 12:59pm UTC](https://community.freefem.org/t/problem-with-subdomains/799 "2021-02-12T12:59:12Z")

</div>

Hi everyone. Im novice in freefem and i need some help. I want to define a complicate domain. this domain is in the following picture. The code i choose is “”"int NbNoeuds = 120; real kAir=1; real kObjet=10; /…

---

## [Iteration solver and direct solver results are huge different with some meshes](https://community.freefem.org/t/iteration-solver-and-direct-solver-results-are-huge-different-with-some-meshes/797)

<div class="topic-metadata">

**Author:** [@zcwang6](https://community.freefem.org/u/zcwang6)\
**Replies:** 13\
**Last updated:** [February 11, 2021, 8:09pm UTC](https://community.freefem.org/t/iteration-solver-and-direct-solver-results-are-huge-different-with-some-meshes/797 "2021-02-11T20:09:36Z")

</div>

Hey FreeFem team, I recently debugged my code and found that, with a mesh generated by gmsh, the results from the direct solver and iteration solver under ffddm are totally different; I believe this problem is coming fro…

---

## [Forcing the value of the integral of the solution](https://community.freefem.org/t/forcing-the-value-of-the-integral-of-the-solution/794)

<div class="topic-metadata">

**Author:** [@LeonardoDipilato](https://community.freefem.org/u/LeonardoDipilato)\
**Replies:** 1\
**Last updated:** [February 11, 2021, 6:55am UTC](https://community.freefem.org/t/forcing-the-value-of-the-integral-of-the-solution/794 "2021-02-11T06:55:46Z")

</div>

I’m trying to simulate -lapl(u)=0 over a square, with a zero dirichlet condition on the sides of the square. However, I would also like to force the value of the integral over the whole domain of u to be equal to Q, but…

---

## [Download FF++ for Mac](https://community.freefem.org/t/download-ff-for-mac/795)

<div class="topic-metadata">

**Author:** [@mordechaiy](https://community.freefem.org/u/mordechaiy)\
**Replies:** 0\
**Last updated:** [February 10, 2021, 11:24pm UTC](https://community.freefem.org/t/download-ff-for-mac/795 "2021-02-10T23:24:32Z")

</div>

Dear FF++ users, I tried to download the latest version of FF++ 4.8 for Mac from the FF++ homepage but unfortunately it doesn’t allow to install FF++. Can anyone please explain me how can I install the latest version …

---

## [Define a function and plot its min](https://community.freefem.org/t/define-a-function-and-plot-its-min/793)

<div class="topic-metadata">

**Author:** [@Aicha](https://community.freefem.org/u/Aicha)\
**Replies:** 0\
**Last updated:** [February 10, 2021, 4:50pm UTC](https://community.freefem.org/t/define-a-function-and-plot-its-min/793 "2021-02-10T16:50:24Z")

</div>

Hi, i want to plot with FF++, the following function min\_{mu \> 0} (D \* mu^3 \* exp(mu \* tau)}{(mu+sigma)\*exp(mu \* tau)-a \* b \* w0) the data are: real tau=1, w0=1.0, sigma=1.0, D=0.001, a=0, b=2 then i try to do this: …

---

## [Solving Steklov problem for the bilaplacian](https://community.freefem.org/t/solving-steklov-problem-for-the-bilaplacian/792)

<div class="topic-metadata">

**Author:** [@BeniaminBogosel](https://community.freefem.org/u/BeniaminBogosel)\
**Replies:** 0\
**Last updated:** [February 10, 2021, 1:27pm UTC](https://community.freefem.org/t/solving-steklov-problem-for-the-bilaplacian/792 "2021-02-10T13:27:49Z")

</div>

Hello, I was wondering if it is possible to solve the following problem in FreeFEM in the space The variational formulation is I tried using Morley elements to try and solve this in 2D, but I get an error when …

---

## [Regions and Boundaries](https://community.freefem.org/t/regions-and-boundaries/789)

<div class="topic-metadata">

**Author:** [@Xaxou](https://community.freefem.org/u/Xaxou)\
**Replies:** 4\
**Last updated:** [February 9, 2021, 3:28pm UTC](https://community.freefem.org/t/regions-and-boundaries/789 "2021-02-09T15:28:10Z")

</div>

Hi there! I’m trying to model some cylinders thanks to FreeFem++. I did following: 0/ Define some constant values 1/ Define borders border S1(parametre=0,2pi){ x=rinfinicos(parametre); y=rinfinisin(parametre); label=…

---

## [Mixed Neumann-Dirichlet boundary conditions in 3d](https://community.freefem.org/t/mixed-neumann-dirichlet-boundary-conditions-in-3d/457)

<div class="topic-metadata">

**Author:** [@Mathias-Fuchs](https://community.freefem.org/u/Mathias-Fuchs)\
**Replies:** 2\
**Last updated:** [February 9, 2021, 11:51am UTC](https://community.freefem.org/t/mixed-neumann-dirichlet-boundary-conditions-in-3d/457 "2021-02-09T11:51:59Z")

</div>

Hello FF! I’m trying to distill from the example Laplace3d.edp the simplest example for applying mixed Neumann-Dirichlet boundary conditions to a general tetrahedral mesh, and to solve \\Delta u = 0 in the interior (stea…

---

## [Which mesh/coordinate is used to compute dx(du) after moving mesh](https://community.freefem.org/t/which-mesh-coordinate-is-used-to-compute-dx-du-after-moving-mesh/788)

<div class="topic-metadata">

**Author:** [@yongxing](https://community.freefem.org/u/yongxing)\
**Replies:** 2\
**Last updated:** [February 8, 2021, 10:03pm UTC](https://community.freefem.org/t/which-mesh-coordinate-is-used-to-compute-dx-du-after-moving-mesh/788 "2021-02-08T22:03:36Z")

</div>

Hi, I am a bit confused with the following dxd(u) – based upon which mesh the derivative is calculated? Tho=Th; fespace Vh(Th,P2); fespace Vho(Tho,P2); Vh u; Vho uo; … Tho=Th; uo=u; Th=movemesh (Th, …); dxd(u)…

---

## [Changing computational domain](https://community.freefem.org/t/changing-computational-domain/784)

<div class="topic-metadata">

**Author:** [@zese](https://community.freefem.org/u/zese)\
**Replies:** 1\
**Last updated:** [February 6, 2021, 4:36pm UTC](https://community.freefem.org/t/changing-computational-domain/784 "2021-02-06T16:36:45Z")

</div>

Dear all I want to start my calculation with a larger domain (TH) and then decrease it based on the for example the magnitude of velocity and continue the simulation just for the domain that velocity is great (Th2) and …

---

## [Behaviour of reffacelow and labeldown in the buildlayers command](https://community.freefem.org/t/behaviour-of-reffacelow-and-labeldown-in-the-buildlayers-command/786)

<div class="topic-metadata">

**Author:** [@Mathias-Fuchs](https://community.freefem.org/u/Mathias-Fuchs)\
**Replies:** 0\
**Last updated:** [February 5, 2021, 6:57pm UTC](https://community.freefem.org/t/behaviour-of-reffacelow-and-labeldown-in-the-buildlayers-command/786 "2021-02-05T18:57:31Z")

</div>

Hello, I needed to build a simple tent-like mesh3, by extruding a triangle along the z-axis using the buildlayers command. The tet mesh as such is fine but I need to set the labels of the vertices and triangles at the b…

---

## [Gmsh for 2D and 3D meshes, multi domains](https://community.freefem.org/t/gmsh-for-2d-and-3d-meshes-multi-domains/782)

<div class="topic-metadata">

**Author:** [@sahar](https://community.freefem.org/u/sahar)\
**Replies:** 0\
**Last updated:** [February 5, 2021, 12:26pm UTC](https://community.freefem.org/t/gmsh-for-2d-and-3d-meshes-multi-domains/782 "2021-02-05T12:26:29Z")

</div>

Hello, I need to make mesh including 2D and 3D structures. I have defined my geometry by points and lines, but when I import the 2D simple mesh in freefem, I see the bad orientation error, it is being fixed when I do a …

---

## [ALE method oscillating cylinder](https://community.freefem.org/t/ale-method-oscillating-cylinder/767)

<div class="topic-metadata">

**Author:** [@tundo](https://community.freefem.org/u/tundo)\
**Replies:** 2\
**Last updated:** [February 4, 2021, 8:52am UTC](https://community.freefem.org/t/ale-method-oscillating-cylinder/767 "2021-02-04T08:52:04Z")

</div>

Good evening everyone, this is the code I wrote to study a cylinder that oscillates with an imposed motion in a direction perpendicular to the asymptotic flow. I have developed an ALE method. I put a dimensionless ampli…

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

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