# General Discussion

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

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

**Page:** 46

---

## [Combine two regions in 3D](https://community.freefem.org/t/combine-two-regions-in-3d/1814)

<div class="topic-metadata">

**Author:** [@RYP](https://community.freefem.org/u/RYP)\
**Replies:** 1\
**Last updated:** [June 19, 2022, 3:03am UTC](https://community.freefem.org/t/combine-two-regions-in-3d/1814 "2022-06-19T03:03:56Z")

</div>

Hello, everyone, I have two 3D meshes called mesh1 and mesh2, they have a common border s. Now I define a new mesh by mesh = mesh1 + mesh2，so s is an internal border of mesh. I wonder how to merge two internal regions o…

---

## [Complex eigenvalues with PETSc/SLEPc](https://community.freefem.org/t/complex-eigenvalues-with-petsc-slepc/1820)

<div class="topic-metadata">

**Author:** [@slh](https://community.freefem.org/u/slh)\
**Replies:** 2\
**Last updated:** [June 18, 2022, 7:43pm UTC](https://community.freefem.org/t/complex-eigenvalues-with-petsc-slepc/1820 "2022-06-18T19:43:28Z")

</div>

Hello! I am trying to solve the generalised Laplace problem with mixed/robin boundary conditions. I ran a program on a single core but ran into issues with memory, so I tried using SLEPc and PETSc. I expect complex eig…

---

## [Error while starting simulation](https://community.freefem.org/t/error-while-starting-simulation/1818)

<div class="topic-metadata">

**Author:** [@zese](https://community.freefem.org/u/zese)\
**Replies:** 1\
**Last updated:** [June 18, 2022, 2:41pm UTC](https://community.freefem.org/t/error-while-starting-simulation/1818 "2022-06-18T14:41:16Z")

</div>

Dear all I did a simulation on a mesh with 160000 elements. then I adapted mesh and wanted to continue the simulation on 139000 element mesh but I received an error. – mesh: Nb of Triangles = 139281, Nb of Vertices 7…

---

## [Finite element method 1d](https://community.freefem.org/t/finite-element-method-1d/1210)

<div class="topic-metadata">

**Author:** [@Jamal](https://community.freefem.org/u/Jamal)\
**Replies:** 2\
**Last updated:** [June 17, 2022, 10:21pm UTC](https://community.freefem.org/t/finite-element-method-1d/1210 "2022-06-17T22:21:46Z")

</div>

Hello everyone; I’m searching for a example to solving the Poisson’s equation 1D using freefem

---

## [An error occurred in PETSc](https://community.freefem.org/t/an-error-occurred-in-petsc/1815)

<div class="topic-metadata">

**Author:** [@Qianrui](https://community.freefem.org/u/Qianrui)\
**Replies:** 1\
**Last updated:** [June 17, 2022, 3:38pm UTC](https://community.freefem.org/t/an-error-occurred-in-petsc/1815 "2022-06-17T15:38:31Z")

</div>

Hello, Professor, I wrote a small program about calculating the spatial error and convergence order, which was converted to the parallel version of PETSc. The following errors occurred. why? (I have uploaded the program …

---

## [Problem in reading gmsh file](https://community.freefem.org/t/problem-in-reading-gmsh-file/1809)

<div class="topic-metadata">

**Author:** [@zese](https://community.freefem.org/u/zese)\
**Replies:** 2\
**Last updated:** [June 17, 2022, 11:14am UTC](https://community.freefem.org/t/problem-in-reading-gmsh-file/1809 "2022-06-17T11:14:25Z")

</div>

Dear all, I want to import gmsh mesh file to the freefem++ but the boundaries labels are not recognized when I read the file. the attached you can find the \*.geo and \*.msh file as a text . I don’t understand what the pr…

---

## [Can implement Discontinuous Galerkin for divergence term?](https://community.freefem.org/t/can-implement-discontinuous-galerkin-for-divergence-term/1813)

<div class="topic-metadata">

**Author:** [@emeseron](https://community.freefem.org/u/emeseron)\
**Replies:** 0\
**Last updated:** [June 16, 2022, 2:08pm UTC](https://community.freefem.org/t/can-implement-discontinuous-galerkin-for-divergence-term/1813 "2022-06-16T14:08:38Z")

</div>

Hello everyone, I am trying to write a code where the divergence term appears in DG formulation, that is, int\_{O} p div(u) + int\_{O} {p}\[u\*n\], where O is a domain, p is pressure, u is velocity, div is divergence oper…

---

## [Flow around circular cylinder with Newton method](https://community.freefem.org/t/flow-around-circular-cylinder-with-newton-method/1808)

<div class="topic-metadata">

**Author:** [@IgorM](https://community.freefem.org/u/IgorM)\
**Replies:** 1\
**Last updated:** [June 16, 2022, 7:55am UTC](https://community.freefem.org/t/flow-around-circular-cylinder-with-newton-method/1808 "2022-06-16T07:55:09Z")

</div>

Good evening, I’m writing a code to calculate the unsteady flow around circular cylinder. As a time discretization I’m using backward Euler. To do so i calculated the following weak form: F(\\mathbf{u}^{n+1})=\\int\_\\Om…

---

## [Numerical integration](https://community.freefem.org/t/numerical-integration/1810)

<div class="topic-metadata">

**Author:** [@Qianrui](https://community.freefem.org/u/Qianrui)\
**Replies:** 2\
**Last updated:** [June 15, 2022, 1:03pm UTC](https://community.freefem.org/t/numerical-integration/1810 "2022-06-15T13:03:01Z")

</div>

Hello, what does the symbol in the red circle mean? Linear element?

---

## [Draw borders using vectors](https://community.freefem.org/t/draw-borders-using-vectors/1799)

<div class="topic-metadata">

**Author:** [@Aashish](https://community.freefem.org/u/Aashish)\
**Replies:** 5\
**Last updated:** [June 15, 2022, 12:47pm UTC](https://community.freefem.org/t/draw-borders-using-vectors/1799 "2022-06-15T12:47:21Z")

</div>

Hi Everyone, I am new at using FreeFem and could really use you help to understand the functionalities better i am working on the sample problem of electrostatics https://doc.freefem.org/models/static-problems.html#el…

---

## [How to satisfy the periodic boundary conditions of the first derivative and the second derivative at the same time](https://community.freefem.org/t/how-to-satisfy-the-periodic-boundary-conditions-of-the-first-derivative-and-the-second-derivative-at-the-same-time/1807)

<div class="topic-metadata">

**Author:** [@Qianrui](https://community.freefem.org/u/Qianrui)\
**Replies:** 0\
**Last updated:** [June 11, 2022, 12:57am UTC](https://community.freefem.org/t/how-to-satisfy-the-periodic-boundary-conditions-of-the-first-derivative-and-the-second-derivative-at-the-same-time/1807 "2022-06-11T00:57:31Z")

</div>

How to satisfy the periodic boundary conditions of the first derivative and the second derivative at the same time？ fespace Uhf(Thf,P3,periodic=\[\[1\],\[2\]\]);

---

## [Solution to Laplace equation with zero average](https://community.freefem.org/t/solution-to-laplace-equation-with-zero-average/1804)

<div class="topic-metadata">

**Author:** [@Neutrino](https://community.freefem.org/u/Neutrino)\
**Replies:** 2\
**Last updated:** [June 10, 2022, 7:48am UTC](https://community.freefem.org/t/solution-to-laplace-equation-with-zero-average/1804 "2022-06-10T07:48:37Z")

</div>

Suppose that I am looking to solve the following: \\begin{cases} -\\Delta u = f \\quad &\\text{on } \\Omega,\\\\ \\nabla u \\cdot \\textbf{n} = 0 \\quad &\\text{on } \\partial \\Omega, \\end{cases} with the additional assumption tha…

---

## [Help - matrix multiplication by number complex](https://community.freefem.org/t/help-matrix-multiplication-by-number-complex/1805)

<div class="topic-metadata">

**Author:** [@andressa](https://community.freefem.org/u/andressa)\
**Replies:** 0\
**Last updated:** [June 9, 2022, 9:54pm UTC](https://community.freefem.org/t/help-matrix-multiplication-by-number-complex/1805 "2022-06-09T21:54:23Z")

</div>

Dear, I’m working on a 3d mesh. I created a gradient function of the mass of Dirac (gdirac) and my force function would be the multiplication of gdirac by a complex value (moment). However, I can’t do this multiplicatio…

---

## [Elasticity Matrix](https://community.freefem.org/t/elasticity-matrix/1802)

<div class="topic-metadata">

**Author:** [@Stefanosv](https://community.freefem.org/u/Stefanosv)\
**Replies:** 5\
**Last updated:** [June 8, 2022, 1:27pm UTC](https://community.freefem.org/t/elasticity-matrix/1802 "2022-06-08T13:27:30Z")

</div>

Is it possible to use a matrix for the E value in Elasticity problem where the value at each cell of the matrix corresponds to the value of E of a single node of the designed mesh?

---

## [Export iso values from generated plot](https://community.freefem.org/t/export-iso-values-from-generated-plot/1790)

<div class="topic-metadata">

**Author:** [@Aashish](https://community.freefem.org/u/Aashish)\
**Replies:** 1\
**Last updated:** [June 7, 2022, 3:28pm UTC](https://community.freefem.org/t/export-iso-values-from-generated-plot/1790 "2022-06-07T15:28:04Z")

</div>

Hi, is there a way to export the data shown under iso values

---

## [What is meaning the linear elasticity problem's output in freefem](https://community.freefem.org/t/what-is-meaning-the-linear-elasticity-problems-output-in-freefem/1780)

<div class="topic-metadata">

**Author:** [@sosome](https://community.freefem.org/u/sosome)\
**Replies:** 1\
**Last updated:** [June 7, 2022, 3:24pm UTC](https://community.freefem.org/t/what-is-meaning-the-linear-elasticity-problems-output-in-freefem/1780 "2022-06-07T15:24:25Z")

</div>

I run 2d linear elasticity code provided freefem. //Parameters real Rho = 8000.; //Density real E = 210.e9; //Young modulus real Nu = 0.27; //Poisson ratio real Gravity = -9.81; //Gravity //Mesh real nn = 10; //…

---

## [Viscous Dissipation](https://community.freefem.org/t/viscous-dissipation/1788)

<div class="topic-metadata">

**Author:** [@D\_N\_Sarkar](https://community.freefem.org/u/D_N_Sarkar)\
**Replies:** 1\
**Last updated:** [June 7, 2022, 3:22pm UTC](https://community.freefem.org/t/viscous-dissipation/1788 "2022-06-07T15:22:47Z")

</div>

How to calculate viscous dissipation (due to fluid flow) in FreeFEM?

---

## [PETSC Exec error : Check BilinearOperator N M](https://community.freefem.org/t/petsc-exec-error-check-bilinearoperator-n-m/1797)

<div class="topic-metadata">

**Author:** [@Qianrui](https://community.freefem.org/u/Qianrui)\
**Replies:** 1\
**Last updated:** [June 4, 2022, 9:03am UTC](https://community.freefem.org/t/petsc-exec-error-check-bilinearoperator-n-m/1797 "2022-06-04T09:03:59Z")

</div>

Hello, teacher, what is the reason for this? – Square mesh : nb vertices =66049 , nb triangles = 131072 , nb boundary edges 1024 – Square mesh : nb vertices =1089 , nb triangles = 2048 , nb boundary edges 128 —…

---

## [Hexahedral mesh](https://community.freefem.org/t/hexahedral-mesh/1794)

<div class="topic-metadata">

**Author:** [@andressa](https://community.freefem.org/u/andressa)\
**Replies:** 1\
**Last updated:** [June 2, 2022, 9:01pm UTC](https://community.freefem.org/t/hexahedral-mesh/1794 "2022-06-02T21:01:16Z")

</div>

Dear, Can I work with hexahedral meshes in FREEFEM?

---

## [Iso value in a plot](https://community.freefem.org/t/iso-value-in-a-plot/1776)

<div class="topic-metadata">

**Author:** [@fas41](https://community.freefem.org/u/fas41)\
**Replies:** 3\
**Last updated:** [June 2, 2022, 9:12am UTC](https://community.freefem.org/t/iso-value-in-a-plot/1776 "2022-06-02T09:12:03Z")

</div>

HI Is there any way I can fix min and max of iso value in a freedom plot? Actually I want the same number representing same color in two different codes so that I can compare based on colored area, so I thought if I fi…

---

## ['dmatrix' syntax](https://community.freefem.org/t/dmatrix-syntax/1791)

<div class="topic-metadata">

**Author:** [@Flavio](https://community.freefem.org/u/Flavio)\
**Replies:** 1\
**Last updated:** [May 30, 2022, 6:15pm UTC](https://community.freefem.org/t/dmatrix-syntax/1791 "2022-05-30T18:15:36Z")

</div>

Hello, I am trying to build a matrix, called A, which consists of blocks of smaller matrices along the diagonal and near-zero elements in the off-diagonal, in FreeFem v4.11 using the syntax: dmatrix A(MatLinOp, clean=1…

---

## [ChangeNumbering](https://community.freefem.org/t/changenumbering/1771)

<div class="topic-metadata">

**Author:** [@Qianrui](https://community.freefem.org/u/Qianrui)\
**Replies:** 9\
**Last updated:** [May 28, 2022, 7:09am UTC](https://community.freefem.org/t/changenumbering/1771 "2022-05-28T07:09:58Z")

</div>

The command ChangeNumbering(A, u, inPETSc, inverse = true, exchange = true);// is because the number real\[int\] tab(10);//i=0,1,2,…,9 of FreeFem + + starts from zero, while the number of PETSc starts from one, so…

---

## [How can I control the inlet and outlet direction of the flow?](https://community.freefem.org/t/how-can-i-control-the-inlet-and-outlet-direction-of-the-flow/1228)

<div class="topic-metadata">

**Author:** [@erdo](https://community.freefem.org/u/erdo)\
**Replies:** 1\
**Last updated:** [May 27, 2022, 10:04pm UTC](https://community.freefem.org/t/how-can-i-control-the-inlet-and-outlet-direction-of-the-flow/1228 "2022-05-27T22:04:03Z")

</div>

Hello, I want to control the inlet and outlet direction of the flow. How can I set the directions as the photo that I added. Can you help me? Thank you. load "medit" //mesh Th = square(30, 30); int n = 20; border left…

---

## [Add a dot after the number](https://community.freefem.org/t/add-a-dot-after-the-number/1750)

<div class="topic-metadata">

**Author:** [@Qianrui](https://community.freefem.org/u/Qianrui)\
**Replies:** 5\
**Last updated:** [May 26, 2022, 1:16am UTC](https://community.freefem.org/t/add-a-dot-after-the-number/1750 "2022-05-26T01:16:42Z")

</div>

Add a dot after the number. Why? Some numbers are followed by a dot, others are not. In any case, it is necessary to add a dot. complex\[int\] A(2.+0i:10.0+0i); real\[int\] A(2:10); real\[int\] A(2.:10.);

---

## [Computation of flux across a surface - issue with gmsh mesh](https://community.freefem.org/t/computation-of-flux-across-a-surface-issue-with-gmsh-mesh/1775)

<div class="topic-metadata">

**Author:** [@marcodeba](https://community.freefem.org/u/marcodeba)\
**Replies:** 0\
**Last updated:** [May 24, 2022, 4:48pm UTC](https://community.freefem.org/t/computation-of-flux-across-a-surface-issue-with-gmsh-mesh/1775 "2022-05-24T16:48:50Z")

</div>

Dear FreeFem developers and users, I’m here to ask a question on something that in principle should be very simple, but that is creating me an issue. Imagine you have a toroidal geometry in which you want to compute th…

---

## [Trunc function does not work for mesh splitting](https://community.freefem.org/t/trunc-function-does-not-work-for-mesh-splitting/1772)

<div class="topic-metadata">

**Author:** [@zcwang6](https://community.freefem.org/u/zcwang6)\
**Replies:** 3\
**Last updated:** [May 24, 2022, 2:40pm UTC](https://community.freefem.org/t/trunc-function-does-not-work-for-mesh-splitting/1772 "2022-05-24T14:40:11Z")

</div>

Hello Prj, I hope you doing well. I currently try to build mesh with a interface face, which I can use it for separating design domain later. However, I find the freefem partitioning with overlapped domain works fine wit…

---

## [How to create union of domains and define functions on subdomains?](https://community.freefem.org/t/how-to-create-union-of-domains-and-define-functions-on-subdomains/1766)

<div class="topic-metadata">

**Author:** [@Jade](https://community.freefem.org/u/Jade)\
**Replies:** 9\
**Last updated:** [May 24, 2022, 1:55pm UTC](https://community.freefem.org/t/how-to-create-union-of-domains-and-define-functions-on-subdomains/1766 "2022-05-24T13:55:21Z")

</div>

I’d like to solve an PDE in a square with a source term g defined piecewisely. The function g(x,y) has one value in an union of 3 disks inside the square and and another value outside the union. I can find the all the in…

---

## [Is it necessary to put boundary condition on the varf of rhs?](https://community.freefem.org/t/is-it-necessary-to-put-boundary-condition-on-the-varf-of-rhs/1774)

<div class="topic-metadata">

**Author:** [@Jade](https://community.freefem.org/u/Jade)\
**Replies:** 2\
**Last updated:** [May 24, 2022, 12:27pm UTC](https://community.freefem.org/t/is-it-necessary-to-put-boundary-condition-on-the-varf-of-rhs/1774 "2022-05-24T12:27:14Z")

</div>

In the Documentation for the Poisson equation there are the following code snippets: 1 varf a(u,v) 2 = int2d(Th)( 3 dx(u)\*dx(v) 4 + dy(u)\*dy(v) 5 ) 6 + on(C, u=0) 7 ; 8 matrix A = a(Vh,…

---

## [Local solution on global mesh](https://community.freefem.org/t/local-solution-on-global-mesh/1773)

<div class="topic-metadata">

**Author:** [@larismartins](https://community.freefem.org/u/larismartins)\
**Replies:** 0\
**Last updated:** [May 23, 2022, 10:58pm UTC](https://community.freefem.org/t/local-solution-on-global-mesh/1773 "2022-05-23T22:58:02Z")

</div>

Hi there, can anyone help me with ploting local solution on a global mesh? This is my global mesh int globalH = 2; mesh calP = square(globalH,globalH); then, I store the nodes coordinates to build local meshes in ea…

---

## [Defining PETSc matrix for Navier-Stokes](https://community.freefem.org/t/defining-petsc-matrix-for-navier-stokes/210)

<div class="topic-metadata">

**Author:** [@david9333](https://community.freefem.org/u/david9333)\
**Replies:** 6\
**Last updated:** [May 23, 2022, 2:02am UTC](https://community.freefem.org/t/defining-petsc-matrix-for-navier-stokes/210 "2022-05-23T02:02:47Z")

</div>

Hi! I’m new to FreeFem and parallel computing. I attended the tutorial sessions of the FreeFem Days in December, when PETSc was extensively used. I am currently on a coupled Vlasov-Navier-Stokes system and I want numer…

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

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