# General Discussion

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

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

**Page:** 39

---

## [Integrals on internal edges](https://community.freefem.org/t/integrals-on-internal-edges/2169)

<div class="topic-metadata">

**Author:** [@larismartins](https://community.freefem.org/u/larismartins)\
**Replies:** 1\
**Last updated:** [December 8, 2022, 3:56pm UTC](https://community.freefem.org/t/integrals-on-internal-edges/2169 "2022-12-08T15:56:07Z")

</div>

I’m trying to set up the following problem I’ve built the mesh like this border f0(t=0,1){P.x=nodes(2,0)\*t + nodes(1,0)\*(1-t);P.y=nodes(2,1)\*t + nodes(1,1)\*(1-t); label=11;}; border f1(t=0,1){P.x=nodes(0,0)\*t + no…

---

## [FreeFEM days Thursday 8 & Friday 9, December (registration open)](https://community.freefem.org/t/freefem-days-thursday-8-friday-9-december-registration-open/2090)

<div class="topic-metadata">

**Author:** [@prj](https://community.freefem.org/u/prj)\
**Replies:** 1\
**Last updated:** [December 7, 2022, 5:54pm UTC](https://community.freefem.org/t/freefem-days-thursday-8-friday-9-december-registration-open/2090 "2022-12-07T17:54:41Z")

</div>

Registration form: here.

---

## [Variational formulation involving partial derivative and complex fields](https://community.freefem.org/t/variational-formulation-involving-partial-derivative-and-complex-fields/2172)

<div class="topic-metadata">

**Author:** [@benjaminstamm](https://community.freefem.org/u/benjaminstamm)\
**Replies:** 2\
**Last updated:** [December 7, 2022, 1:24pm UTC](https://community.freefem.org/t/variational-formulation-involving-partial-derivative-and-complex-fields/2172 "2022-12-07T13:24:46Z")

</div>

Dear all, I have some issues involing complex functions in combination with gradients, i.e. dx() and dy(). I have a prepared a MWE (since I just registered, I can’t upload it as a file… sorry). int numnode = 50; me…

---

## [Solution not interpolating onto every element of the new mesh](https://community.freefem.org/t/solution-not-interpolating-onto-every-element-of-the-new-mesh/2171)

<div class="topic-metadata">

**Author:** [@jsmacd](https://community.freefem.org/u/jsmacd)\
**Replies:** 1\
**Last updated:** [December 6, 2022, 2:47am UTC](https://community.freefem.org/t/solution-not-interpolating-onto-every-element-of-the-new-mesh/2171 "2022-12-06T02:47:37Z")

</div>

In my code, I have a numerical solution that I computed inside a cube. I also have the exact solution. I want to calculate the error between the two over a subset region of the cube. To do this, I build a new mesh onto w…

---

## [Traction on the outflow boundary](https://community.freefem.org/t/traction-on-the-outflow-boundary/2167)

<div class="topic-metadata">

**Author:** [@gnaganlu](https://community.freefem.org/u/gnaganlu)\
**Replies:** 0\
**Last updated:** [December 5, 2022, 10:13am UTC](https://community.freefem.org/t/traction-on-the-outflow-boundary/2167 "2022-12-05T10:13:25Z")

</div>

I am studying about the identification of immersed obstacles in fluid flows by using a traction vector (stress vector) on the boundary as an inverse problem procedure. The domain is rectangular and the right edge is the …

---

## [Sample Navier-Stokes Solver](https://community.freefem.org/t/sample-navier-stokes-solver/2164)

<div class="topic-metadata">

**Author:** [@shaydin](https://community.freefem.org/u/shaydin)\
**Replies:** 1\
**Last updated:** [December 4, 2022, 6:32pm UTC](https://community.freefem.org/t/sample-navier-stokes-solver/2164 "2022-12-04T18:32:54Z")

</div>

Dear Friends, I want to write a sample Navier Stokes solver using Rubin-Graves type linearization technique as u^(n+1)=u^n+u. The following is my code. I have some difficulties in the starting boundary values and also i…

---

## [Raviart-Thomas implementation](https://community.freefem.org/t/raviart-thomas-implementation/2149)

<div class="topic-metadata">

**Author:** [@larismartins](https://community.freefem.org/u/larismartins)\
**Replies:** 10\
**Last updated:** [December 4, 2022, 5:30pm UTC](https://community.freefem.org/t/raviart-thomas-implementation/2149 "2022-12-04T17:30:50Z")

</div>

Hi there, I’m trying to implement the following set of equations on FreeFem++ So far I did the following macro div(u,v) ( dx(u)+dy(v) ) // load "Element\_Mixte" func RT = RT1; func PP = P0; func PPm = P1edge; for(…

---

## [Use a computed solution as boundary value](https://community.freefem.org/t/use-a-computed-solution-as-boundary-value/2158)

<div class="topic-metadata">

**Author:** [@Denis](https://community.freefem.org/u/Denis)\
**Replies:** 2\
**Last updated:** [December 2, 2022, 4:57pm UTC](https://community.freefem.org/t/use-a-computed-solution-as-boundary-value/2158 "2022-12-02T16:57:52Z")

</div>

Dear all, I am new on FreeFem. I want to compute some shape derivatives and therefore I need to Solve first a PDE with a prescribed boundary data and then I need to capture a partial derivative of the computed solution …

---

## [A question about functions using void](https://community.freefem.org/t/a-question-about-functions-using-void/2148)

<div class="topic-metadata">

**Author:** [@m31phy](https://community.freefem.org/u/m31phy)\
**Replies:** 4\
**Last updated:** [December 2, 2022, 6:57am UTC](https://community.freefem.org/t/a-question-about-functions-using-void/2148 "2022-12-02T06:57:00Z")

</div>

Dear all I have a question about functions in FreeFEM. Is it possible to use “void” type functions in FreeFEM? Because my FreeFEM scripts have become long, I want to modulize my codes for maintenance. But, when I look…

---

## [Shell element examples](https://community.freefem.org/t/shell-element-examples/368)

<div class="topic-metadata">

**Author:** [@amir90](https://community.freefem.org/u/amir90)\
**Replies:** 2\
**Last updated:** [December 2, 2022, 2:42am UTC](https://community.freefem.org/t/shell-element-examples/368 "2022-12-02T02:42:12Z")

</div>

Hello, I am looking for an FEM package able to integrate in to existing c++ code, in order to solve a thin plate structural problem. My questions are: Are shell elements implemented? If so, which property models does …

---

## [How can I import and mesh a STP file?](https://community.freefem.org/t/how-can-i-import-and-mesh-a-stp-file/2156)

<div class="topic-metadata">

**Author:** [@distractor](https://community.freefem.org/u/distractor)\
**Replies:** 1\
**Last updated:** [December 1, 2022, 10:34pm UTC](https://community.freefem.org/t/how-can-i-import-and-mesh-a-stp-file/2156 "2022-12-01T22:34:55Z")

</div>

Is there a way I can import and mesh a STP file? Thanks!

---

## [Using functions slows codes](https://community.freefem.org/t/using-functions-slows-codes/2150)

<div class="topic-metadata">

**Author:** [@miguelpicos](https://community.freefem.org/u/miguelpicos)\
**Replies:** 3\
**Last updated:** [November 30, 2022, 11:29am UTC](https://community.freefem.org/t/using-functions-slows-codes/2150 "2022-11-30T11:29:30Z")

</div>

Hello, I was working on a project and I started to use functions to make the code simpler. As the computing times started to get high, I started to optimize the code. I found that the main wastage of time was calling fu…

---

## [For loop in a varf/therm](https://community.freefem.org/t/for-loop-in-a-varf-therm/2146)

<div class="topic-metadata">

**Author:** [@mrbenson](https://community.freefem.org/u/mrbenson)\
**Replies:** 1\
**Last updated:** [November 29, 2022, 11:16am UTC](https://community.freefem.org/t/for-loop-in-a-varf-therm/2146 "2022-11-29T11:16:56Z")

</div>

Hi, I have a lot (hundred to thoundand) of boundary conditions (each one depends on some calculated array values) and want to factorize my code using a loop. Is there a way to use a for loop inside a varf/therm defini…

---

## [Load gsl.dylib fail](https://community.freefem.org/t/load-gsl-dylib-fail/2141)

<div class="topic-metadata">

**Author:** [@byb](https://community.freefem.org/u/byb)\
**Replies:** 1\
**Last updated:** [November 25, 2022, 5:57pm UTC](https://community.freefem.org/t/load-gsl-dylib-fail/2141 "2022-11-25T17:57:09Z")

</div>

Dear, I am using a mac and FreeFem 4.11 version. When I load “gsl” I receive this error message: 15 : load "gsl" Load error: gsl fail: dlerror : dlopen(/usr/local/lib/ff++/4.11/lib/gsl.dylib, 0x0002): tried: '/u…

---

## [PETSc Stokes memory issue](https://community.freefem.org/t/petsc-stokes-memory-issue/2143)

<div class="topic-metadata">

**Author:** [@agTSL](https://community.freefem.org/u/agTSL)\
**Replies:** 3\
**Last updated:** [November 25, 2022, 3:44pm UTC](https://community.freefem.org/t/petsc-stokes-memory-issue/2143 "2022-11-25T15:44:22Z")

</div>

Hello, I am trying to solve a Stokes problem with PETSc on an “large” mesh. I do freefem exemple stokes-fieldsplit-3d-PETSc.edp and the exemple here. When the mesh have 530 000 elements the use of memory is around 90%…

---

## [Saving and loading files](https://community.freefem.org/t/saving-and-loading-files/2121)

<div class="topic-metadata">

**Author:** [@galfras](https://community.freefem.org/u/galfras)\
**Replies:** 4\
**Last updated:** [November 25, 2022, 8:53am UTC](https://community.freefem.org/t/saving-and-loading-files/2121 "2022-11-25T08:53:52Z")

</div>

Hello guys! I need to save a solution and then read ir in another freefem file. I’m not sure how to do this. I am able to save the mesh and load it, but I can’t do dat with the solution. Just to clarify: problem Psiex…

---

## [Remove elements from a region](https://community.freefem.org/t/remove-elements-from-a-region/2140)

<div class="topic-metadata">

**Author:** [@agTSL](https://community.freefem.org/u/agTSL)\
**Replies:** 1\
**Last updated:** [November 24, 2022, 2:36pm UTC](https://community.freefem.org/t/remove-elements-from-a-region/2140 "2022-11-24T14:36:56Z")

</div>

Hello, I would like in a 3D mesh remove elements which are in a specific region. Regions doesn’t have commom boundary and I can not use trunc fonction with geometrical criteria. Are there a possibility with functions …

---

## [Importing 3-dimensional P2 elements](https://community.freefem.org/t/importing-3-dimensional-p2-elements/2139)

<div class="topic-metadata">

**Author:** [@danmo](https://community.freefem.org/u/danmo)\
**Replies:** 0\
**Last updated:** [November 23, 2022, 12:44pm UTC](https://community.freefem.org/t/importing-3-dimensional-p2-elements/2139 "2022-11-23T12:44:11Z")

</div>

Dear all, I want to import 3-D second-order (P2) elements to FreeFEM. I tried this using both Gmsh and SALOME but for some reason it does not work. It works perfectly fine when I import 1-st order (P1) elements but onc…

---

## [PETSc with errors depend on the number of processors](https://community.freefem.org/t/petsc-with-errors-depend-on-the-number-of-processors/2136)

<div class="topic-metadata">

**Author:** [@agTSL](https://community.freefem.org/u/agTSL)\
**Replies:** 3\
**Last updated:** [November 23, 2022, 9:17am UTC](https://community.freefem.org/t/petsc-with-errors-depend-on-the-number-of-processors/2136 "2022-11-23T09:17:29Z")

</div>

Hello, I have difficulties to use PETSc with freefem. When I run a exemple script (stokes-3d-PETSc.edp) with 4 proc everything work fine. But when I change the number of proc, 6 or 8, I have (sometime) error message, S…

---

## [Accessing residual history](https://community.freefem.org/t/accessing-residual-history/2137)

<div class="topic-metadata">

**Author:** [@aszaboa](https://community.freefem.org/u/aszaboa)\
**Replies:** 0\
**Last updated:** [November 22, 2022, 10:14pm UTC](https://community.freefem.org/t/accessing-residual-history/2137 "2022-11-22T22:14:09Z")

</div>

Dear FreeFem users, I would like to access the residual history using FreeFem-PETSc, so that can change the absolute-relative tolerance in the iteration. I have the following questions regarding this topic: KSPSetRes…

---

## [On the addition of two mesh](https://community.freefem.org/t/on-the-addition-of-two-mesh/2129)

<div class="topic-metadata">

**Author:** [@Yangshen](https://community.freefem.org/u/Yangshen)\
**Replies:** 0\
**Last updated:** [November 19, 2022, 11:59am UTC](https://community.freefem.org/t/on-the-addition-of-two-mesh/2129 "2022-11-19T11:59:07Z")

</div>

Hello everyone, I generated the following model. It is composed of two meshes, Sh3 and Th3. The code is as follows. load"msh3" load"iovtk" load"medit" mesh Sh=square(48,12,\[200x,50y\]); mesh Th=square(48,12,\[100x…

---

## [About element type](https://community.freefem.org/t/about-element-type/2127)

<div class="topic-metadata">

**Author:** [@Yangshen](https://community.freefem.org/u/Yangshen)\
**Replies:** 0\
**Last updated:** [November 18, 2022, 1:52am UTC](https://community.freefem.org/t/about-element-type/2127 "2022-11-18T01:52:07Z")

</div>

Hello,everyone. As for FreeFEM, I know that the interpolation mode of its elements is all in the form of triangles. We can also improve the accuracy by adding nodes on the edges of triangular elements. My question is, w…

---

## [About array operations](https://community.freefem.org/t/about-array-operations/2125)

<div class="topic-metadata">

**Author:** [@Yangshen](https://community.freefem.org/u/Yangshen)\
**Replies:** 2\
**Last updated:** [November 17, 2022, 1:21pm UTC](https://community.freefem.org/t/about-array-operations/2125 "2022-11-17T13:21:49Z")

</div>

Hello everyone, I want to calculate the following equation. lowmin = xval - 10\*(xmax-xmin); I want to calculate the following formula, where lowmin, xmax, and xmin are arrays of n rows and one column. But it was wrong…

---

## [Alpha underflowed! in BFGS](https://community.freefem.org/t/alpha-underflowed-in-bfgs/2124)

<div class="topic-metadata">

**Author:** [@lassounon](https://community.freefem.org/u/lassounon)\
**Replies:** 0\
**Last updated:** [November 17, 2022, 8:23am UTC](https://community.freefem.org/t/alpha-underflowed-in-bfgs/2124 "2022-11-17T08:23:04Z")

</div>

Hello everyone, I use BFGS to minimize a functional. But the program shows me every time after the results " Alpha underflowed!", I don’t understand how to fix this Freefem error. I wonder if it was myself who had to…

---

## [Singular Matrix](https://community.freefem.org/t/singular-matrix/2123)

<div class="topic-metadata">

**Author:** [@hyahoos](https://community.freefem.org/u/hyahoos)\
**Replies:** 0\
**Last updated:** [November 17, 2022, 4:43am UTC](https://community.freefem.org/t/singular-matrix/2123 "2022-11-17T04:43:12Z")

</div>

load "msh3" //////////////////////////////////////////////////////////////////////////////////// //Problem Variables //////////////////////////////////////////////////////////////////////////////////// real EI=1.2; real…

---

## [Optimal control in space-time (t,x,y) with BFGS](https://community.freefem.org/t/optimal-control-in-space-time-t-x-y-with-bfgs/2119)

<div class="topic-metadata">

**Author:** [@lassounon](https://community.freefem.org/u/lassounon)\
**Replies:** 0\
**Last updated:** [November 15, 2022, 12:14pm UTC](https://community.freefem.org/t/optimal-control-in-space-time-t-x-y-with-bfgs/2119 "2022-11-15T12:14:41Z")

</div>

Hello, I would like to know where I should call BFGS, since my optimal control for parameter (t,x,y) is it inside the time loop that I define BFGS ? Thanks

---

## [Writting an integral of a transmission/interface problem](https://community.freefem.org/t/writting-an-integral-of-a-transmission-interface-problem/2058)

<div class="topic-metadata">

**Author:** [@RodZ](https://community.freefem.org/u/RodZ)\
**Replies:** 1\
**Last updated:** [November 14, 2022, 4:56pm UTC](https://community.freefem.org/t/writting-an-integral-of-a-transmission-interface-problem/2058 "2022-11-14T16:56:59Z")

</div>

Hi everyone, I have a advection-diffusion problem with an interface, let’s say \\Omega = \\Omega\_1 \\cup \\Omega\_2, \\Gamma = \\partial \\Omega\_1 \\cap \\partial \\Omega\_2, where \[T\] = 0, \[k\\frac{\\partial T}{\\partial n}\] = 0 on \\…

---

## [Invocation of optimization algorithm](https://community.freefem.org/t/invocation-of-optimization-algorithm/2114)

<div class="topic-metadata">

**Author:** [@Yangshen](https://community.freefem.org/u/Yangshen)\
**Replies:** 2\
**Last updated:** [November 14, 2022, 9:56am UTC](https://community.freefem.org/t/invocation-of-optimization-algorithm/2114 "2022-11-14T09:56:08Z")

</div>

Hello,everyone Has anyone called the optimization algorithm in ff NLopt? I think there seems to be less information in the document. It’s better to have an example for me to learn. …

---

## [Tanatloc release](https://community.freefem.org/t/tanatloc-release/2115)

<div class="topic-metadata">

**Author:** [@simon.garnotel](https://community.freefem.org/u/simon.garnotel)\
**Replies:** 0\
**Last updated:** [November 14, 2022, 8:04am UTC](https://community.freefem.org/t/tanatloc-release/2115 "2022-11-14T08:04:58Z")

</div>

Dear FreeFEM community, We are very excited to release Tanatloc, a free & open source graphical interface for FreeFEM: https://tanatloc.com Tanatloc is available on Linux, Windows and Mac through an electron app and doc…

---

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

<div class="topic-metadata">

**Author:** [@junjie](https://community.freefem.org/u/junjie)\
**Replies:** 0\
**Last updated:** [November 10, 2022, 12:47pm UTC](https://community.freefem.org/t/stokes-equation-programming-help/2112 "2022-11-10T12:47:05Z")

</div>

Hello, I’m a new student of FreeFem++.Recently, I used this software to write stokes weak finite element program, but I encountered a problem. I don’t know how to write projection operators in the program, such as the sp…

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

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