# General Discussion

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

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

**Page:** 24

---

## [Boundary conditions in eigenvalue problem](https://community.freefem.org/t/boundary-conditions-in-eigenvalue-problem/2629)

<div class="topic-metadata">

**Author:** [@maximefio](https://community.freefem.org/u/maximefio)\
**Replies:** 15\
**Last updated:** [February 10, 2024, 10:53am UTC](https://community.freefem.org/t/boundary-conditions-in-eigenvalue-problem/2629 "2024-02-10T10:53:32Z")

</div>

Hello, I am currently doing a 1 dimensional linear stabiity solver (for fluid mechanics). To do so I solve an eigenvalue problem as AX = lambda BX where A and B are terms from the linearized Navier-Stokes equations and …

---

## [How to create eigenvector for an eigen value in MATLAB](https://community.freefem.org/t/how-to-create-eigenvector-for-an-eigen-value-in-matlab/2936)

<div class="topic-metadata">

**Author:** [@Amitkaush](https://community.freefem.org/u/Amitkaush)\
**Replies:** 2\
**Last updated:** [February 9, 2024, 4:50pm UTC](https://community.freefem.org/t/how-to-create-eigenvector-for-an-eigen-value-in-matlab/2936 "2024-02-09T16:50:53Z")

</div>

I am new to FreeFem and am trying to plot eigenvector for v in matlab. the freefem++ code is: real Mj=0.9; // mach number complex I = 1i; real ga=1.4; //gamma real M2=(1/(gaMjMj)); real Re; cout\<\<“Enter Reynold…

---

## [Label at end points in meshL](https://community.freefem.org/t/label-at-end-points-in-meshl/2952)

<div class="topic-metadata">

**Author:** [@Amitkaush](https://community.freefem.org/u/Amitkaush)\
**Replies:** 0\
**Last updated:** [February 9, 2024, 9:11am UTC](https://community.freefem.org/t/label-at-end-points-in-meshl/2952 "2024-02-09T09:11:30Z")

</div>

how to define label on the end points real ymin = -1.; real ymax = 1.; border yline(t=ymin,ymax){x=0.;y=t;} int np = 1000; meshL Th=buildmeshL(yline(np));

---

## [Error occurs in UMFPACK solver 3D problem](https://community.freefem.org/t/error-occurs-in-umfpack-solver-3d-problem/2949)

<div class="topic-metadata">

**Author:** [@sumantkr](https://community.freefem.org/u/sumantkr)\
**Replies:** 2\
**Last updated:** [February 8, 2024, 4:51pm UTC](https://community.freefem.org/t/error-occurs-in-umfpack-solver-3d-problem/2949 "2024-02-08T16:51:19Z")

</div>

Hello everyone!!! While handling the denser meshing style in the 3D domain, the solver “UMFPACK” is failing. error is error umpfack umfpack\_di\_numeric" status -1 error umfpack\_di\_solve status -3 Also, suggest suitab…

---

## [Error loading SLEPc](https://community.freefem.org/t/error-loading-slepc/2948)

<div class="topic-metadata">

**Author:** [@Amitkaush](https://community.freefem.org/u/Amitkaush)\
**Replies:** 1\
**Last updated:** [February 8, 2024, 11:02am UTC](https://community.freefem.org/t/error-loading-slepc/2948 "2024-02-08T11:02:21Z")

</div>

I am using 4.13 version of freefem and on loading SLEPc i am getting this error (base) amit@amit:~/my-project/freefem\_matlab\_octave\_plot-public/release-v2.0/demos$ FreeFem++ i2d.edp – FreeFem++ v4.13 (Fri 07 Jul 2023 1…

---

## [Problem with C-H +Stokes + viscosity coupling](https://community.freefem.org/t/problem-with-c-h-stokes-viscosity-coupling/2633)

<div class="topic-metadata">

**Author:** [@bATTLEGROUND](https://community.freefem.org/u/bATTLEGROUND)\
**Replies:** 4\
**Last updated:** [February 8, 2024, 5:42am UTC](https://community.freefem.org/t/problem-with-c-h-stokes-viscosity-coupling/2633 "2024-02-08T05:42:03Z")

</div>

Hi! I’m trying to simulate the mixing of two liquids of different viscosities using Cahn-Hilliard and Stokes equations. Due to the non-linear nature of C-H equation I’m using Newton iterations. If the viscosity ratio (la…

---

## [What is the implementation inside buildmesh?](https://community.freefem.org/t/what-is-the-implementation-inside-buildmesh/2944)

<div class="topic-metadata">

**Author:** [@NSEasy](https://community.freefem.org/u/NSEasy)\
**Replies:** 0\
**Last updated:** [February 7, 2024, 6:39pm UTC](https://community.freefem.org/t/what-is-the-implementation-inside-buildmesh/2944 "2024-02-07T18:39:51Z")

</div>

My question is rather simple. I am trying to verify results between FreeFEM and another FEM package. In order to do this, I would need to make a similar enough mesh with gmsh, or similar. What meshing algorithm is used b…

---

## [Bondary conditions from label vector](https://community.freefem.org/t/bondary-conditions-from-label-vector/2943)

<div class="topic-metadata">

**Author:** [@larismartins](https://community.freefem.org/u/larismartins)\
**Replies:** 0\
**Last updated:** [February 7, 2024, 5:26pm UTC](https://community.freefem.org/t/bondary-conditions-from-label-vector/2943 "2024-02-07T17:26:01Z")

</div>

Hello everyone, is it possible to set boundary conditions from a vector os labels? for exemple, I have a vectoor label = \[1,2\]; and I want to ser boundary conditions on the boundarys from this vector, like + on(labe…

---

## [Toy Maxwell equation code](https://community.freefem.org/t/toy-maxwell-equation-code/2937)

<div class="topic-metadata">

**Author:** [@Alexei](https://community.freefem.org/u/Alexei)\
**Replies:** 0\
**Last updated:** [February 7, 2024, 11:12am UTC](https://community.freefem.org/t/toy-maxwell-equation-code/2937 "2024-02-07T11:12:58Z")

</div>

Hi, I made a FreeFem code to test a toy 2D MaxWell equation model which is proposed as a benchmark in the presentation by Monique Dauge & Martin Costabel ( https://perso.univ-rennes1.fr/monique.dauge/publis/MaxwellMD.pd…

---

## [Creating a hexagon mesh](https://community.freefem.org/t/creating-a-hexagon-mesh/2809)

<div class="topic-metadata">

**Author:** [@AugustinCarteron](https://community.freefem.org/u/AugustinCarteron)\
**Replies:** 10\
**Last updated:** [December 18, 2023, 3:25pm UTC](https://community.freefem.org/t/creating-a-hexagon-mesh/2809 "2023-12-18T15:25:40Z")

</div>

Hello community freefem, i need help creating a hexagon mesh with a certain number of nodes. I have tried by setting the coordinates of my 6 points, but then i only have 6 nodes (one at each point) but i would like 50 n…

---

## [Distance map from boundary](https://community.freefem.org/t/distance-map-from-boundary/2342)

<div class="topic-metadata">

**Author:** [@akiss](https://community.freefem.org/u/akiss)\
**Replies:** 3\
**Last updated:** [February 6, 2024, 4:27pm UTC](https://community.freefem.org/t/distance-map-from-boundary/2342 "2024-02-06T16:27:39Z")

</div>

Hello! Given a mesh defined in FreeFem (in 2D for the moment), I would be interested by a distance map to a part of its boundary as a finite element field on it. For instance, if I have a square mesh with label 1 for t…

---

## [Output .csv file not created](https://community.freefem.org/t/output-csv-file-not-created/2931)

<div class="topic-metadata">

**Author:** [@Amitkaush](https://community.freefem.org/u/Amitkaush)\
**Replies:** 1\
**Last updated:** [February 5, 2024, 9:21am UTC](https://community.freefem.org/t/output-csv-file-not-created/2931 "2024-02-05T09:21:03Z")

</div>

i2d.edp (2.7 KB) While executing the file output files A1.csv and B1.csv are not created. load “medit” load “msh3” int df=1; int n=10; border interval(t=0., df){x=t;y=0;z=0;}; meshL Th= buildmeshL(interval(n)); f…

---

## [Error while loading msh3](https://community.freefem.org/t/error-while-loading-msh3/2930)

<div class="topic-metadata">

**Author:** [@Amitkaush](https://community.freefem.org/u/Amitkaush)\
**Replies:** 2\
**Last updated:** [February 4, 2024, 6:19pm UTC](https://community.freefem.org/t/error-while-loading-msh3/2930 "2024-02-04T18:19:55Z")

</div>

i am new to freefem++ while trying to load msh3 file to create a 1d mesh , I am getting this error (base) amit@amit:~/my-project$ FreeFem++ i2d.edp – FreeFem++ v4.9 ( - git no git) Load: lg\_fem lg\_mesh lg\_mesh3 eigenv…

---

## [Temporal hydrodynamic stability](https://community.freefem.org/t/temporal-hydrodynamic-stability/2929)

<div class="topic-metadata">

**Author:** [@Amitkaush](https://community.freefem.org/u/Amitkaush)\
**Replies:** 0\
**Last updated:** [February 3, 2024, 5:39pm UTC](https://community.freefem.org/t/temporal-hydrodynamic-stability/2929 "2024-02-03T17:39:15Z")

</div>

Here is the code to calculate temporal hydrodynamic stability for couette flow real Mj=0.9; // mach number complex I = 1i; real ga=1.4; //gamma real M2=(1/(gaMjMj)); real Re; cout\<\<“Enter Reynold’s number”\<\<endl; …

---

## [How to create 1d mesh](https://community.freefem.org/t/how-to-create-1d-mesh/2926)

<div class="topic-metadata">

**Author:** [@Amitkaush](https://community.freefem.org/u/Amitkaush)\
**Replies:** 6\
**Last updated:** [February 3, 2024, 11:08am UTC](https://community.freefem.org/t/how-to-create-1d-mesh/2926 "2024-02-03T11:08:33Z")

</div>

i want to solve a 1d heat equation. how to create 1d mesh?

---

## [Homogeneous neumann boundary condition in hydrodynamic stability](https://community.freefem.org/t/homogeneous-neumann-boundary-condition-in-hydrodynamic-stability/2927)

<div class="topic-metadata">

**Author:** [@Amitkaush](https://community.freefem.org/u/Amitkaush)\
**Replies:** 0\
**Last updated:** [February 2, 2024, 3:58pm UTC](https://community.freefem.org/t/homogeneous-neumann-boundary-condition-in-hydrodynamic-stability/2927 "2024-02-02T15:58:48Z")

</div>

I am new to FreeFem++. I am trying to solve for temporal hydodynamic stability of viscous incompressible navier stokes equation for Couette flow. I have homogeneous neumann boundary condition on pressure on the wall. …

---

## [Assign interface labels based on adjacent triangle regions](https://community.freefem.org/t/assign-interface-labels-based-on-adjacent-triangle-regions/2924)

<div class="topic-metadata">

**Author:** [@mhg](https://community.freefem.org/u/mhg)\
**Replies:** 0\
**Last updated:** [February 2, 2024, 2:11pm UTC](https://community.freefem.org/t/assign-interface-labels-based-on-adjacent-triangle-regions/2924 "2024-02-02T14:11:22Z")

</div>

Maybe this is helpful for anyone: int nn=6; border C01(t=0, 1){x=t; y=0; label=4;} border C02(t=0, 1){x=1; y=t; label=1;} border C03(t=0, 1){x=1-t; y=1; label=1;} border C04(t=0, 1){x=0; y=1-t; label=1;} border C05(t=0,…

---

## [How do we implement the symmetry condition?](https://community.freefem.org/t/how-do-we-implement-the-symmetry-condition/2910)

<div class="topic-metadata">

**Author:** [@Jack](https://community.freefem.org/u/Jack)\
**Replies:** 2\
**Last updated:** [February 2, 2024, 1:59pm UTC](https://community.freefem.org/t/how-do-we-implement-the-symmetry-condition/2910 "2024-02-02T13:59:33Z")

</div>

Hello, everyone, I would like to ask a question. I solve the Stokes equation in a channel, the boundary conditions are as follows There is a symmetry condition on the bottom boundary, how to implement this boundary…

---

## [Modify a freefem code](https://community.freefem.org/t/modify-a-freefem-code/2916)

<div class="topic-metadata">

**Author:** [@septimus51](https://community.freefem.org/u/septimus51)\
**Replies:** 2\
**Last updated:** [January 30, 2024, 10:43pm UTC](https://community.freefem.org/t/modify-a-freefem-code/2916 "2024-01-30T22:43:02Z")

</div>

Hello, I want to upgrade my code to obtain the velocity and pressure for several points that are independent of the mapping, but I don’t know how to do that. Can someone help me figure it out? Here is my code: // -\*- C+…

---

## [Computing divergence/gradient under parallelization](https://community.freefem.org/t/computing-divergence-gradient-under-parallelization/2915)

<div class="topic-metadata">

**Author:** [@yhao](https://community.freefem.org/u/yhao)\
**Replies:** 9\
**Last updated:** [January 31, 2024, 9:13pm UTC](https://community.freefem.org/t/computing-divergence-gradient-under-parallelization/2915 "2024-01-31T21:13:27Z")

</div>

Hi, I have a question regarding computing gradient when the domain is decomposed and paralleled. I solved a solid mechanics problem and got the corresponding u which is the displacement solution. I want to compute dx(u1…

---

## [The curvature of a three-dimensional surface asks for help](https://community.freefem.org/t/the-curvature-of-a-three-dimensional-surface-asks-for-help/2912)

<div class="topic-metadata">

**Author:** [@Tan](https://community.freefem.org/u/Tan)\
**Replies:** 1\
**Last updated:** [January 31, 2024, 9:40am UTC](https://community.freefem.org/t/the-curvature-of-a-three-dimensional-surface-asks-for-help/2912 "2024-01-31T09:40:06Z")

</div>

I wonder how to find the curvature of a surface in 3D? I have only seen the way to solve curves in 2D cases in the documentation, and it is wrong for me to apply it to 3D to solve the curvature of the surface, can you br…

---

## [Complete newbie looking for help: Solving PDE for mass transport influenced binding numerically](https://community.freefem.org/t/complete-newbie-looking-for-help-solving-pde-for-mass-transport-influenced-binding-numerically/2884)

<div class="topic-metadata">

**Author:** [@marman](https://community.freefem.org/u/marman)\
**Replies:** 9\
**Last updated:** [January 25, 2024, 7:45pm UTC](https://community.freefem.org/t/complete-newbie-looking-for-help-solving-pde-for-mass-transport-influenced-binding-numerically/2884 "2024-01-25T19:45:24Z")

</div>

I am a biochemist by profession and not very experienced in working with programming codes. I am currently trying to develop a model to describe the mass transport and antigen binding of a biosensor. This involves a flo…

---

## [How to define a function with three cases?](https://community.freefem.org/t/how-to-define-a-function-with-three-cases/2906)

<div class="topic-metadata">

**Author:** [@RaghunathBandha](https://community.freefem.org/u/RaghunathBandha)\
**Replies:** 1\
**Last updated:** [January 25, 2024, 5:54pm UTC](https://community.freefem.org/t/how-to-define-a-function-with-three-cases/2906 "2024-01-25T17:54:32Z")

</div>

Let f(x,y)=0 for (x,y)=(0,0) and f(x,y)=x^2/(x^2+y^2) for x^2\>y^2 and f(x,y)=y^2/(x^2+y^2) for x^2\<y^2. How to do this.

---

## [How to find polar angle made by the line by joining the given point in cartesian plane with origin. I want a unique angle which will be from \[0,2\*pi)](https://community.freefem.org/t/how-to-find-polar-angle-made-by-the-line-by-joining-the-given-point-in-cartesian-plane-with-origin-i-want-a-unique-angle-which-will-be-from-0-2-pi/2899)

<div class="topic-metadata">

**Author:** [@RaghunathBandha](https://community.freefem.org/u/RaghunathBandha)\
**Replies:** 3\
**Last updated:** [January 25, 2024, 5:52pm UTC](https://community.freefem.org/t/how-to-find-polar-angle-made-by-the-line-by-joining-the-given-point-in-cartesian-plane-with-origin-i-want-a-unique-angle-which-will-be-from-0-2-pi/2899 "2024-01-25T17:52:33Z")

</div>

Except (0,0), if I enter any point on coordinate axes I am not getting the correct answer. For example If I enter (1,-0.01) I should get an angle close to 2pi. On (1,0), I should get pi/2. For (-1,0), (0,-1) I should ge…

---

## [Solution u is known but still I am getting an error for H1 norm due to dx(u) term. Why?](https://community.freefem.org/t/solution-u-is-known-but-still-i-am-getting-an-error-for-h1-norm-due-to-dx-u-term-why/2907)

<div class="topic-metadata">

**Author:** [@RaghunathBandha](https://community.freefem.org/u/RaghunathBandha)\
**Replies:** 1\
**Last updated:** [January 25, 2024, 1:26pm UTC](https://community.freefem.org/t/solution-u-is-known-but-still-i-am-getting-an-error-for-h1-norm-due-to-dx-u-term-why/2907 "2024-01-25T13:26:45Z")

</div>

exampleofdisk.edp (1.4 KB)

---

## [Algebraic System of Equations](https://community.freefem.org/t/algebraic-system-of-equations/2904)

<div class="topic-metadata">

**Author:** [@karligor](https://community.freefem.org/u/karligor)\
**Replies:** 0\
**Last updated:** [January 24, 2024, 8:22pm UTC](https://community.freefem.org/t/algebraic-system-of-equations/2904 "2024-01-24T20:22:39Z")

</div>

Hello dear colleagues. I hope someone can help me. I am solving a linear parabolic PDE on two variables, say, u1(x,t) and u2(x,t). Then, for each node i want to calculate new quantities that depend on the values of u1 …

---

## [Best method for saving an array for post-processing](https://community.freefem.org/t/best-method-for-saving-an-array-for-post-processing/2901)

<div class="topic-metadata">

**Author:** [@jna1g18](https://community.freefem.org/u/jna1g18)\
**Replies:** 1\
**Last updated:** [January 22, 2024, 4:12pm UTC](https://community.freefem.org/t/best-method-for-saving-an-array-for-post-processing/2901 "2024-01-22T16:12:20Z")

</div>

Hi all, could someone outline the best way to save an array of values resulting from a simulation for post-processing? I’m currently saving the array as a .txt file and then simply copy and pasting them into Python where…

---

## [Can/How FREEFEM deal with friction between two 3D object](https://community.freefem.org/t/can-how-freefem-deal-with-friction-between-two-3d-object/2900)

<div class="topic-metadata">

**Author:** [@qinz](https://community.freefem.org/u/qinz)\
**Replies:** 0\
**Last updated:** [January 22, 2024, 7:28am UTC](https://community.freefem.org/t/can-how-freefem-deal-with-friction-between-two-3d-object/2900 "2024-01-22T07:28:34Z")

</div>

Can FreeFEM deal with the friction force and energy loss between two contacted 3D object, is there some example or document?

---

## [Crossed mesh on a square](https://community.freefem.org/t/crossed-mesh-on-a-square/2897)

<div class="topic-metadata">

**Author:** [@fotkara](https://community.freefem.org/u/fotkara)\
**Replies:** 2\
**Last updated:** [January 21, 2024, 7:32am UTC](https://community.freefem.org/t/crossed-mesh-on-a-square/2897 "2024-01-21T07:32:01Z")

</div>

Hello. I would like to do some calculations on the unit square using crossed meshes. Is there a simple way to create a crossed mesh on a unit square? I would also like to globally refine a mesh such that the old mesh …

---

## [Eigenmode issue for same matrix](https://community.freefem.org/t/eigenmode-issue-for-same-matrix/2891)

<div class="topic-metadata">

**Author:** [@PaulGomezz](https://community.freefem.org/u/PaulGomezz)\
**Replies:** 2\
**Last updated:** [January 19, 2024, 6:57pm UTC](https://community.freefem.org/t/eigenmode-issue-for-same-matrix/2891 "2024-01-19T18:57:40Z")

</div>

Hello, I am facing an issue with my eigenmodes. I am attempting to solve a problem in a general case, which requires the use of complex numbers in my matrix. However, for the basic case, I only need real numbers. The cod…

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

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