# General Discussion

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

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

**Page:** 45

---

## [Equation with Finite Element Spaces to calculate Internal Forces](https://community.freefem.org/t/equation-with-finite-element-spaces-to-calculate-internal-forces/1876)

<div class="topic-metadata">

**Author:** [@Stefanosv](https://community.freefem.org/u/Stefanosv)\
**Replies:** 0\
**Last updated:** [July 5, 2022, 9:40am UTC](https://community.freefem.org/t/equation-with-finite-element-spaces-to-calculate-internal-forces/1876 "2022-07-05T09:40:39Z")

</div>

I’ve been trying to calculate the internal forces each node gets after solving the mesh with the elasticity code provided at the tutorials. I have calculated the stiffness matrix and want to use the equation F= K\*U to ca…

---

## [Mshmet and mmg3d](https://community.freefem.org/t/mshmet-and-mmg3d/1851)

<div class="topic-metadata">

**Author:** [@wanglongfei](https://community.freefem.org/u/wanglongfei)\
**Replies:** 9\
**Last updated:** [July 4, 2022, 11:33am UTC](https://community.freefem.org/t/mshmet-and-mmg3d/1851 "2022-07-04T11:33:53Z")

</div>

Hello Sorry to bother you . In freefem++, mshmet is used to generate metric matrix, and then mmg3d is used to generate three-dimensional meshes of various anisotropy. Can we use our own metric matrix and mmg3d to genera…

---

## [How to deal with the boundary conditions of 1D discontinuous finite element?](https://community.freefem.org/t/how-to-deal-with-the-boundary-conditions-of-1d-discontinuous-finite-element/1871)

<div class="topic-metadata">

**Author:** [@Qianrui](https://community.freefem.org/u/Qianrui)\
**Replies:** 0\
**Last updated:** [July 3, 2022, 11:58am UTC](https://community.freefem.org/t/how-to-deal-with-the-boundary-conditions-of-1d-discontinuous-finite-element/1871 "2022-07-03T11:58:56Z")

</div>

How to deal with the boundary conditions of 1D discontinuous finite element? problem KDV(u1,v)=int1d(Thf)(u1v/dt)-int1d(Thf)(u0v/dt) +int1d(Thf)(dx(u1)\*dxx(v)) -intallBE(Thf)(jump(dxx(u1)v) -intallBE(Thf)(jump(dx(u1)d…

---

## [Implementation process of mixed finite element method](https://community.freefem.org/t/implementation-process-of-mixed-finite-element-method/1866)

<div class="topic-metadata">

**Author:** [@Qianrui](https://community.freefem.org/u/Qianrui)\
**Replies:** 0\
**Last updated:** [July 2, 2022, 8:08am UTC](https://community.freefem.org/t/implementation-process-of-mixed-finite-element-method/1866 "2022-07-02T08:08:40Z")

</div>

Hello, I am using mixed finite element method to solve a PDE. Theoretically， the following two equations are obtained, in which there are two unknown quantities u, p, A \* u+B \* p=b1; C \* p+D \* u=b2; How does freefem+…

---

## [Stokes equation](https://community.freefem.org/t/stokes-equation/1855)

<div class="topic-metadata">

**Author:** [@Jamal](https://community.freefem.org/u/Jamal)\
**Replies:** 1\
**Last updated:** [July 1, 2022, 9:33pm UTC](https://community.freefem.org/t/stokes-equation/1855 "2022-07-01T21:33:58Z")

</div>

Hello everyone; I am looking for an example to solve the Stokes equation with the Neumann condition. In the examples folder I just find the Dirichlet condition.

---

## [I use DMplex for reading GMSH meshes, how to save in Freefem format?](https://community.freefem.org/t/i-use-dmplex-for-reading-gmsh-meshes-how-to-save-in-freefem-format/1861)

<div class="topic-metadata">

**Author:** [@felric](https://community.freefem.org/u/felric)\
**Replies:** 5\
**Last updated:** [July 1, 2022, 5:45pm UTC](https://community.freefem.org/t/i-use-dmplex-for-reading-gmsh-meshes-how-to-save-in-freefem-format/1861 "2022-07-01T17:45:55Z")

</div>

Dear sir, I need to import a GMSH mesh comprising some physical volumes/surfaces. Following your suggestion, I tried to use DMplex instead of standard freefem mesh loader, as often suggested by you. Now, after some ef…

---

## [Questions about nonlinear problem with mixed boundary condition](https://community.freefem.org/t/questions-about-nonlinear-problem-with-mixed-boundary-condition/1862)

<div class="topic-metadata">

**Author:** [@m31phy](https://community.freefem.org/u/m31phy)\
**Replies:** 0\
**Last updated:** [June 30, 2022, 9:32pm UTC](https://community.freefem.org/t/questions-about-nonlinear-problem-with-mixed-boundary-condition/1862 "2022-06-30T21:32:22Z")

</div>

Hello all users I have a question about making a FreeFEM code for my problem. To be specific, as a simple nonlinear problem, I tried to solve the following differential equations. F’‘(x) + F(x) - F(x)^3 =0, F(0) =0, F…

---

## [Variational form of mixed finite element](https://community.freefem.org/t/variational-form-of-mixed-finite-element/1860)

<div class="topic-metadata">

**Author:** [@Qianrui](https://community.freefem.org/u/Qianrui)\
**Replies:** 0\
**Last updated:** [June 30, 2022, 8:37am UTC](https://community.freefem.org/t/variational-form-of-mixed-finite-element/1860 "2022-06-30T08:37:08Z")

</div>

The mixed variational problem is as follows. There are two known quantities. I did the following variational, but they all reported errors. Why？ Utt + △U+L(p)=0; p=L(U); ((U\_n+1 - 2\*U\_n + U\_n-1)/dt^2 , v)+ (▽(U\_n+1 + …

---

## [The solution would be unstable,dxx(v)](https://community.freefem.org/t/the-solution-would-be-unstable-dxx-v/1857)

<div class="topic-metadata">

**Author:** [@Qianrui](https://community.freefem.org/u/Qianrui)\
**Replies:** 0\
**Last updated:** [June 29, 2022, 11:57am UTC](https://community.freefem.org/t/the-solution-would-be-unstable-dxx-v/1857 "2022-06-29T11:57:30Z")

</div>

Hello everyone, I tried to write a small code about KdV. Because there is dxx (v), I used P3 finite element method, but the solution would be unstable. Why? KDV(n=1)exact.edp (1.2 KB)

---

## [Error while calculating stiffness matrix](https://community.freefem.org/t/error-while-calculating-stiffness-matrix/1856)

<div class="topic-metadata">

**Author:** [@Stefanosv](https://community.freefem.org/u/Stefanosv)\
**Replies:** 0\
**Last updated:** [June 29, 2022, 12:55am UTC](https://community.freefem.org/t/error-while-calculating-stiffness-matrix/1856 "2022-06-29T00:55:42Z")

</div>

I’ve been studying this documentation about calculating the stiffness matrix. When I use the boundary restrictions of my mesh I get an error saying: We expected an unknown u=... of the problem current line = 59 I ha…

---

## [FETI-method in FreeFEM](https://community.freefem.org/t/feti-method-in-freefem/1854)

<div class="topic-metadata">

**Author:** [@Pechi](https://community.freefem.org/u/Pechi)\
**Replies:** 1\
**Last updated:** [June 28, 2022, 7:54am UTC](https://community.freefem.org/t/feti-method-in-freefem/1854 "2022-06-28T07:54:50Z")

</div>

Hi everyone, I changed some things up in my code and all of a sudden, my Dirichlet conditions aren’t working anymore. I receive the message “We expected an unknown u=… of the problem”. Can please someone tell me what i…

---

## [Periodic boundary conditions with PETSc and vectorial FEspace](https://community.freefem.org/t/periodic-boundary-conditions-with-petsc-and-vectorial-fespace/1849)

<div class="topic-metadata">

**Author:** [@AzizTakhirov](https://community.freefem.org/u/AzizTakhirov)\
**Replies:** 3\
**Last updated:** [June 27, 2022, 12:37am UTC](https://community.freefem.org/t/periodic-boundary-conditions-with-petsc-and-vectorial-fespace/1849 "2022-06-27T00:37:50Z")

</div>

Hello, I’m trying to figure out the correct syntax for generating the matrices with periodic boundary conditions with PETSc and vectorial FEspace, such as in the case of Stokes equations with periodic boundary conditio…

---

## [Periodic boundary conditions in a composed domain](https://community.freefem.org/t/periodic-boundary-conditions-in-a-composed-domain/1605)

<div class="topic-metadata">

**Author:** [@Jacoban90](https://community.freefem.org/u/Jacoban90)\
**Replies:** 2\
**Last updated:** [June 26, 2022, 5:28pm UTC](https://community.freefem.org/t/periodic-boundary-conditions-in-a-composed-domain/1605 "2022-06-26T17:28:57Z")

</div>

Hello everyone, I’m trying to define periodic boundary conditions on a cubic domain decomposed in two regions. In the paralell faces(labels \[1,2\], \[3,4\], \[5,6\]) were imposed identical boudary conditions. In the interfac…

---

## [KdV (1D) using Freefem++](https://community.freefem.org/t/kdv-1d-using-freefem/1120)

<div class="topic-metadata">

**Author:** [@Pitagoras1](https://community.freefem.org/u/Pitagoras1)\
**Replies:** 1\
**Last updated:** [June 26, 2022, 12:32pm UTC](https://community.freefem.org/t/kdv-1d-using-freefem/1120 "2022-06-26T12:32:40Z")

</div>

Hi, Could anyone tell me where I can find some results programmed in Freefem++ for KdV in 1D? Best regards.

---

## [Create three variational formulation with mixed finite element](https://community.freefem.org/t/create-three-variational-formulation-with-mixed-finite-element/1850)

<div class="topic-metadata">

**Author:** [@Qianrui](https://community.freefem.org/u/Qianrui)\
**Replies:** 0\
**Last updated:** [June 26, 2022, 5:32am UTC](https://community.freefem.org/t/create-three-variational-formulation-with-mixed-finite-element/1850 "2022-06-26T05:32:18Z")

</div>

Hello, can the mixed finite element be written in the form of variation(the command varf Possion(u,v) )？

---

## [Crouzeix-Raviart FE of degree 3](https://community.freefem.org/t/crouzeix-raviart-fe-of-degree-3/1747)

<div class="topic-metadata">

**Author:** [@Carina](https://community.freefem.org/u/Carina)\
**Replies:** 8\
**Last updated:** [June 25, 2022, 6:22pm UTC](https://community.freefem.org/t/crouzeix-raviart-fe-of-degree-3/1747 "2022-06-25T18:22:51Z")

</div>

Hello there, I am trying to implement a new finite element, Crouzeix-Raviart of degree 3 in dimension 2. But I actually don’t speak C++, so I kind of tried to combine P3 and P1nc (Crouzeix-Raviart of degree 1) and chang…

---

## [Random number generation](https://community.freefem.org/t/random-number-generation/1835)

<div class="topic-metadata">

**Author:** [@lucassfernandez](https://community.freefem.org/u/lucassfernandez)\
**Replies:** 1\
**Last updated:** [June 24, 2022, 7:14pm UTC](https://community.freefem.org/t/random-number-generation/1835 "2022-06-24T19:14:29Z")

</div>

Hi, folks! I need to generate some random real values. I know that FreeFEM is equipped with the functions randreal1, randreal2, randreal3, randres53, for generating random real numbers between 0 and 1. \[1\] Please, t…

---

## [Execution error on creating border](https://community.freefem.org/t/execution-error-on-creating-border/1847)

<div class="topic-metadata">

**Author:** [@Aashish](https://community.freefem.org/u/Aashish)\
**Replies:** 0\
**Last updated:** [June 24, 2022, 11:20am UTC](https://community.freefem.org/t/execution-error-on-creating-border/1847 "2022-06-24T11:20:45Z")

</div>

Hi , I am trying to build borders using vectors below is my sample code When i plot the borders everything looks exactly the way i wanted but on building mesh i get error current line = 94 Exec error : Error points …

---

## [Differing Eigenfunctions in Single Core and PETSc](https://community.freefem.org/t/differing-eigenfunctions-in-single-core-and-petsc/1844)

<div class="topic-metadata">

**Author:** [@slh](https://community.freefem.org/u/slh)\
**Replies:** 7\
**Last updated:** [June 23, 2022, 2:45pm UTC](https://community.freefem.org/t/differing-eigenfunctions-in-single-core-and-petsc/1844 "2022-06-23T14:45:03Z")

</div>

Hello! I am using PETSc / SLEPc to compute an eigenvalue problem. Comparing the results in parallel with a single process with a code in single core, I get the same eigenvalues and matrices, but the eigenfunctions differ…

---

## [Error using restrict() with -np 1](https://community.freefem.org/t/error-using-restrict-with-np-1/1845)

<div class="topic-metadata">

**Author:** [@aszaboa](https://community.freefem.org/u/aszaboa)\
**Replies:** 2\
**Last updated:** [June 23, 2022, 12:48pm UTC](https://community.freefem.org/t/error-using-restrict-with-np-1/1845 "2022-06-23T12:48:18Z")

</div>

Dear FreeFem users, I found that using FreeFem the parallel capabilities of FreeFem, but running with np=1, when I save and load both a distributed and a non-distributed mesh, the command restrict() throws an error. The…

---

## [Import exports from ffmatlib](https://community.freefem.org/t/import-exports-from-ffmatlib/1843)

<div class="topic-metadata">

**Author:** [@Stefanosv](https://community.freefem.org/u/Stefanosv)\
**Replies:** 0\
**Last updated:** [June 23, 2022, 10:20am UTC](https://community.freefem.org/t/import-exports-from-ffmatlib/1843 "2022-06-23T10:20:53Z")

</div>

I have some txt files that have been exported with the command ffSaveData from ffmatlib. Is there any way to use the .txt file to import data to a different script?

---

## [Simple cube under compression (elastic regime)](https://community.freefem.org/t/simple-cube-under-compression-elastic-regime/1831)

<div class="topic-metadata">

**Author:** [@baezacaljo](https://community.freefem.org/u/baezacaljo)\
**Replies:** 2\
**Last updated:** [June 22, 2022, 2:52pm UTC](https://community.freefem.org/t/simple-cube-under-compression-elastic-regime/1831 "2022-06-22T14:52:40Z")

</div>

Hello dear all. Let me tell you that today I started looking at freefem. I am fluid dynamic guy (before I was working with openFoam). Basically I am quite new into solids. Look I installed freefem on windows (my boss u…

---

## [Results from ".idp" macro](https://community.freefem.org/t/results-from-idp-macro/1837)

<div class="topic-metadata">

**Author:** [@Stefanosv](https://community.freefem.org/u/Stefanosv)\
**Replies:** 0\
**Last updated:** [June 22, 2022, 11:22am UTC](https://community.freefem.org/t/results-from-idp-macro/1837 "2022-06-22T11:22:43Z")

</div>

I have placed the code of the system of elasticity of a 2D beam as a macro inside an .idp file so it can be called from a different .edp file. My question is how can I export the values I want from the .idp file on the .…

---

## [Reassembling distributed mesh](https://community.freefem.org/t/reassembling-distributed-mesh/1250)

<div class="topic-metadata">

**Author:** [@aszaboa](https://community.freefem.org/u/aszaboa)\
**Replies:** 14\
**Last updated:** [June 22, 2022, 5:55am UTC](https://community.freefem.org/t/reassembling-distributed-mesh/1250 "2022-06-22T05:55:24Z")

</div>

Dear FreeFem users, I would like to perform mesh adaptation in parallel, then reassemble the distributed mesh into a global one. Is there a convenient high-level macro or an example which demonstrates this? Thanks And…

---

## [Methods to exporting data to Octave/Matlab](https://community.freefem.org/t/methods-to-exporting-data-to-octave-matlab/1833)

<div class="topic-metadata">

**Author:** [@JRocha](https://community.freefem.org/u/JRocha)\
**Replies:** 0\
**Last updated:** [June 21, 2022, 5:53pm UTC](https://community.freefem.org/t/methods-to-exporting-data-to-octave-matlab/1833 "2022-06-21T17:53:24Z")

</div>

Hello all, I am new to FreeFem++ and I hope anyone here could give some help. I am trying to export the data from FreeFem++ however I am not able to replicate the results in Octave. Probably due to the way I am trying …

---

## [Solve NS on a referece domain (convection terms)](https://community.freefem.org/t/solve-ns-on-a-referece-domain-convection-terms/1828)

<div class="topic-metadata">

**Author:** [@DongweiYe](https://community.freefem.org/u/DongweiYe)\
**Replies:** 1\
**Last updated:** [June 20, 2022, 4:35pm UTC](https://community.freefem.org/t/solve-ns-on-a-referece-domain-convection-terms/1828 "2022-06-20T16:35:15Z")

</div>

Hi everyone, I am trying to solve 2D Navier stokes equations on a reference domain through a mapping function T. It works well with all the terms in the weak formulations (by multiplying deformation gradient F and jacob…

---

## [How to use interpolate operator to define problem](https://community.freefem.org/t/how-to-use-interpolate-operator-to-define-problem/1826)

<div class="topic-metadata">

**Author:** [@hanweiwei](https://community.freefem.org/u/hanweiwei)\
**Replies:** 0\
**Last updated:** [June 20, 2022, 7:49am UTC](https://community.freefem.org/t/how-to-use-interpolate-operator-to-define-problem/1826 "2022-06-20T07:49:40Z")

</div>

Now, we need to difine bilinear form like this: ((id - I\_{h})\\nable p\_h,(id - I\_{h})\\nable q\_h) p\_h , q\_h \\in fespace(Th,P2) I\_{h} is interpolate operator to fespace(Th,P1); define problem as follows: mesh Th = squar…

---

## [Laplace equation and back](https://community.freefem.org/t/laplace-equation-and-back/1825)

<div class="topic-metadata">

**Author:** [@Stalone](https://community.freefem.org/u/Stalone)\
**Replies:** 0\
**Last updated:** [June 20, 2022, 7:35am UTC](https://community.freefem.org/t/laplace-equation-and-back/1825 "2022-06-20T07:35:46Z")

</div>

Hello everyone, I am trying to implement Laplace equation for a capacitor on which the initial voltage is applied to only a small part of the electrodes. To see if everything is right, I am doing the following: first, i…

---

## [3D mesh from surface meshes](https://community.freefem.org/t/3d-mesh-from-surface-meshes/1795)

<div class="topic-metadata">

**Author:** [@felric](https://community.freefem.org/u/felric)\
**Replies:** 4\
**Last updated:** [June 19, 2022, 3:15pm UTC](https://community.freefem.org/t/3d-mesh-from-surface-meshes/1795 "2022-06-19T15:15:39Z")

</div>

Dear sir, I need to simulate a complex 3D region. I was able to produce the surface mesh, but I don’t know how to create 3D mesh (e.g. tetrahedrons) from it. I tried tetgen (tetg) but it fails when the edge contains a…

---

## [Internal Forces at Elasticity Problem](https://community.freefem.org/t/internal-forces-at-elasticity-problem/1811)

<div class="topic-metadata">

**Author:** [@Stefanosv](https://community.freefem.org/u/Stefanosv)\
**Replies:** 1\
**Last updated:** [June 19, 2022, 11:17am UTC](https://community.freefem.org/t/internal-forces-at-elasticity-problem/1811 "2022-06-19T11:17:12Z")

</div>

Hello, I have the following code written with the many help of Frédéric Hecht. Other than calculating the deformation, I need to calculate the internal forces that are applied to each node of the mesh. How would you su…

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

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