# General Discussion

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

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

**Page:** 52

---

## [Retrieve exact FF plot, and not export data](https://community.freefem.org/t/retrieve-exact-ff-plot-and-not-export-data/1462)

<div class="topic-metadata">

**Author:** [@Neutrino](https://community.freefem.org/u/Neutrino)\
**Replies:** 1\
**Last updated:** [January 31, 2022, 4:04pm UTC](https://community.freefem.org/t/retrieve-exact-ff-plot-and-not-export-data/1462 "2022-01-31T16:04:39Z")

</div>

Hi there! I wanted to ask whether one can export the FF plot as is, with the displayed isovalues. The reason I’m asking this is because when using ffmatlib after exporting the data, the plot generated by Octave is …

---

## [Issue in plotting data with two components (Stokes problem)](https://community.freefem.org/t/issue-in-plotting-data-with-two-components-stokes-problem/1457)

<div class="topic-metadata">

**Author:** [@Loic](https://community.freefem.org/u/Loic)\
**Replies:** 2\
**Last updated:** [January 28, 2022, 3:34pm UTC](https://community.freefem.org/t/issue-in-plotting-data-with-two-components-stokes-problem/1457 "2022-01-28T15:34:31Z")

</div>

Hello all, I am solving the Stokes problem in 2D (with the two component u and v). Thus I define the FE space for velocity as: fespace VhK(ThK, \[P2, P2\]); and I build a FE array PhiK to store the velocity computed (I…

---

## [Thermoelasticity - Free FEM](https://community.freefem.org/t/thermoelasticity-free-fem/1456)

<div class="topic-metadata">

**Author:** [@amir](https://community.freefem.org/u/amir)\
**Replies:** 1\
**Last updated:** [January 28, 2022, 3:26pm UTC](https://community.freefem.org/t/thermoelasticity-free-fem/1456 "2022-01-28T15:26:24Z")

</div>

Hi, How can I write the code of the following equation?? epsilon is strain, and T hat is weight function.

---

## [Brachistochrone in Freefem](https://community.freefem.org/t/brachistochrone-in-freefem/1453)

<div class="topic-metadata">

**Author:** [@renordgren](https://community.freefem.org/u/renordgren)\
**Replies:** 1\
**Last updated:** [January 28, 2022, 11:19am UTC](https://community.freefem.org/t/brachistochrone-in-freefem/1453 "2022-01-28T11:19:12Z")

</div>

I have an interest in simple constrained and unconstrained optimization problems. The path of fastest descent between two points for a bead sliding on a wire in a gravity field can be solved in Freefem. I have attached m…

---

## [Savegmsh ? seems not to work](https://community.freefem.org/t/savegmsh-seems-not-to-work/1455)

<div class="topic-metadata">

**Author:** [@david.fabre](https://community.freefem.org/u/david.fabre)\
**Replies:** 1\
**Last updated:** [January 28, 2022, 6:15am UTC](https://community.freefem.org/t/savegmsh-seems-not-to-work/1455 "2022-01-28T06:15:37Z")

</div>

Hello all ! I was asked by a collegue to export a mesh generated by FreeFem++ in a format readable by Fenics. I first thought about using gmsh format. There is a command “savegmsh” documented in the manual but it does…

---

## [Initial guess for a PETSc solver](https://community.freefem.org/t/initial-guess-for-a-petsc-solver/1213)

<div class="topic-metadata">

**Author:** [@yongxing](https://community.freefem.org/u/yongxing)\
**Replies:** 9\
**Last updated:** [January 25, 2022, 9:27pm UTC](https://community.freefem.org/t/initial-guess-for-a-petsc-solver/1213 "2022-01-25T21:27:10Z")

</div>

Dear all, When we use a PETSc solver for a linear system Ax=b, such as set(A, sparams = "-ksp\_monitor -ksp\_type fgmres -ksp\_converged\_reason -ksp\_atol 1.e-20 -ksp\_rtol 1.0e-8 -ksp\_max\_it 500 -pc\_type fieldsplit -pc\_fie…

---

## [Error using dxx(u) with meshL](https://community.freefem.org/t/error-using-dxx-u-with-meshl/1448)

<div class="topic-metadata">

**Author:** [@renordgren](https://community.freefem.org/u/renordgren)\
**Replies:** 1\
**Last updated:** [January 25, 2022, 3:56pm UTC](https://community.freefem.org/t/error-using-dxx-u-with-meshl/1448 "2022-01-25T15:56:54Z")

</div>

When I use the dxx(u) operator on a meshL function u, I get the following error: Assertion fail : (0) line :245, in file …/femlib/P012\_3dCurve.cpp My code: load “msh3” // needed for using meshL command int nx = 10; …

---

## [Thermoelasticity and Free FEM](https://community.freefem.org/t/thermoelasticity-and-free-fem/1452)

<div class="topic-metadata">

**Author:** [@amir](https://community.freefem.org/u/amir)\
**Replies:** 2\
**Last updated:** [January 25, 2022, 4:03pm UTC](https://community.freefem.org/t/thermoelasticity-and-free-fem/1452 "2022-01-25T16:03:10Z")

</div>

Dear friends, I have a problem in coding to solve a system of thermoelastic equations. I have written for first equation in my code as follows. problem thel1(\[u,v,T\],\[uh,vh,Tbar\])= int2d(TD)(lambda\*div(u,v)\*div(uh,…

---

## [Apply force at a single node](https://community.freefem.org/t/apply-force-at-a-single-node/909)

<div class="topic-metadata">

**Author:** [@jmorvan](https://community.freefem.org/u/jmorvan)\
**Replies:** 8\
**Last updated:** [January 25, 2022, 3:50pm UTC](https://community.freefem.org/t/apply-force-at-a-single-node/909 "2022-01-25T15:50:39Z")

</div>

Hello everyone! I’m a new freefem user. I would like to know if is it possible to apply a force at only one node instead of a whole border of the mesh in a 2D elasticity problem. Thanks!

---

## [An example of PETSc on Windows](https://community.freefem.org/t/an-example-of-petsc-on-windows/1447)

<div class="topic-metadata">

**Author:** [@Qianrui](https://community.freefem.org/u/Qianrui)\
**Replies:** 1\
**Last updated:** [January 19, 2022, 7:32pm UTC](https://community.freefem.org/t/an-example-of-petsc-on-windows/1447 "2022-01-19T19:32:11Z")

</div>

Hello everyone, I ran an example of PETSc on Windows, load “PETSc” macro dimension()2// EOM include “macro\_ddm.idp” macro grad(u)\[dx(u), dy(u)\]// EOM load “Element\_P3” func Pk = P3; border upper(t=0, pi) { x=co…

---

## [Defining by parts properties](https://community.freefem.org/t/defining-by-parts-properties/1446)

<div class="topic-metadata">

**Author:** [@RaMattoso](https://community.freefem.org/u/RaMattoso)\
**Replies:** 3\
**Last updated:** [January 18, 2022, 9:39pm UTC](https://community.freefem.org/t/defining-by-parts-properties/1446 "2022-01-18T21:39:51Z")

</div>

Hello fellows! I need to define different properties values for three or more regions in my domain. Following the FreeFem documentation, I was able to build the mesh in a way that this regions are known. Searching in …

---

## [Matrix formation to store time history](https://community.freefem.org/t/matrix-formation-to-store-time-history/1444)

<div class="topic-metadata">

**Author:** [@zese](https://community.freefem.org/u/zese)\
**Replies:** 0\
**Last updated:** [January 18, 2022, 8:19am UTC](https://community.freefem.org/t/matrix-formation-to-store-time-history/1444 "2022-01-18T08:19:04Z")

</div>

Dear all I have an iterative process in which for a time period I have to store velocity and pressure field in every time step and then I have a huge matrix having all the information of velocity and pressure to solve t…

---

## [Parallel implementation of a problem with multiple right hand sides](https://community.freefem.org/t/parallel-implementation-of-a-problem-with-multiple-right-hand-sides/1441)

<div class="topic-metadata">

**Author:** [@Jeet](https://community.freefem.org/u/Jeet)\
**Replies:** 7\
**Last updated:** [January 17, 2022, 4:13pm UTC](https://community.freefem.org/t/parallel-implementation-of-a-problem-with-multiple-right-hand-sides/1441 "2022-01-17T16:13:35Z")

</div>

Dear FreeFEM developers, I am attempting to resolve a linear system (for a matrix K) with multiple right hand sides using HPC. My approach is to solve the problem for each right hand side on each processor using an ite…

---

## [Parallelization of Heat Transfer problem with Lagrange Multipliers](https://community.freefem.org/t/parallelization-of-heat-transfer-problem-with-lagrange-multipliers/1439)

<div class="topic-metadata">

**Author:** [@Oliver](https://community.freefem.org/u/Oliver)\
**Replies:** 2\
**Last updated:** [January 17, 2022, 1:00pm UTC](https://community.freefem.org/t/parallelization-of-heat-transfer-problem-with-lagrange-multipliers/1439 "2022-01-17T13:00:10Z")

</div>

Dear All, Can someone please help me writing a parallel version of my heat transfer problem with Lagrange Multipliers? The sequential script works fine, but due to the requirement of large FE-Models, I need to solve it …

---

## [Multiply a Finite Element function by a vector of scalar functions](https://community.freefem.org/t/multiply-a-finite-element-function-by-a-vector-of-scalar-functions/1430)

<div class="topic-metadata">

**Author:** [@Loic](https://community.freefem.org/u/Loic)\
**Replies:** 1\
**Last updated:** [January 17, 2022, 8:27am UTC](https://community.freefem.org/t/multiply-a-finite-element-function-by-a-vector-of-scalar-functions/1430 "2022-01-17T08:27:54Z")

</div>

Hello all, I would like multiply a FE function pp by a vector of scalar functions, like this: fespace VHK0(THK,P0); //useful to locate bubble of the coarse element fespace PhK(ThK, P1); func wbarre=\[1,x,y\]; varf vPi…

---

## [How to force writing output files in real-time?](https://community.freefem.org/t/how-to-force-writing-output-files-in-real-time/1435)

<div class="topic-metadata">

**Author:** [@david.fabre](https://community.freefem.org/u/david.fabre)\
**Replies:** 3\
**Last updated:** [January 16, 2022, 9:49pm UTC](https://community.freefem.org/t/how-to-force-writing-output-files-in-real-time/1435 "2022-01-16T21:49:01Z")

</div>

Hello all ! One simple question. I use communication files to check the status of freefem programs from Matlab. For this I want to write in such communication files in real-time. I can see that it is usually not the cas…

---

## [Finding the maximum of a function on the mesh](https://community.freefem.org/t/finding-the-maximum-of-a-function-on-the-mesh/1438)

<div class="topic-metadata">

**Author:** [@romaingrvl](https://community.freefem.org/u/romaingrvl)\
**Replies:** 1\
**Last updated:** [January 16, 2022, 2:45pm UTC](https://community.freefem.org/t/finding-the-maximum-of-a-function-on-the-mesh/1438 "2022-01-16T14:45:25Z")

</div>

Hello to all of you FreeFem users, After solving my system of PDE, I would like to compute the maximum value of my solution and the corresponding coordinates in my domain. I found on another thread that I can do “u\[\].m…

---

## [Output velocity in txt form with PETSc (transfer values from one mesh to another)](https://community.freefem.org/t/output-velocity-in-txt-form-with-petsc-transfer-values-from-one-mesh-to-another/1174)

<div class="topic-metadata">

**Author:** [@yhao](https://community.freefem.org/u/yhao)\
**Replies:** 7\
**Last updated:** [January 15, 2022, 3:06am UTC](https://community.freefem.org/t/output-velocity-in-txt-form-with-petsc-transfer-values-from-one-mesh-to-another/1174 "2022-01-15T03:06:51Z")

</div>

Dear all, I am running a Navier-stokes 2d problem with PETSc. Now I need to export velocity \[ux, uy\] in .txt format. I have followed the video (\[Paraview Tutorial 4\] How to display node and elements data in Paraview - Y…

---

## [How do I add passive tracers to the Navier Stokes equations](https://community.freefem.org/t/how-do-i-add-passive-tracers-to-the-navier-stokes-equations/1433)

<div class="topic-metadata">

**Author:** [@huiprobable](https://community.freefem.org/u/huiprobable)\
**Replies:** 1\
**Last updated:** [January 14, 2022, 10:01pm UTC](https://community.freefem.org/t/how-do-i-add-passive-tracers-to-the-navier-stokes-equations/1433 "2022-01-14T22:01:04Z")

</div>

I see examples solving Navier Stokes or Stokes equations, and I would like to add passive tracers into the fluid. But I can’t find such examples on the passive tracers and the plots of them. Naively, I think I can defin…

---

## [How can I deform the Vh together with Th, with movemesh](https://community.freefem.org/t/how-can-i-deform-the-vh-together-with-th-with-movemesh/1432)

<div class="topic-metadata">

**Author:** [@huiprobable](https://community.freefem.org/u/huiprobable)\
**Replies:** 1\
**Last updated:** [January 14, 2022, 9:44pm UTC](https://community.freefem.org/t/how-can-i-deform-the-vh-together-with-th-with-movemesh/1432 "2022-01-14T21:44:43Z")

</div>

Assume we have a 2D elastic object represented by a mesh Th, we solve for elasticity equations obtaining displacement u, v, as a fespace object Vh(Th, P2). Then we move the mesh Th according to the displacement, to get T…

---

## [Boundary Edge extremities](https://community.freefem.org/t/boundary-edge-extremities/1428)

<div class="topic-metadata">

**Author:** [@Loic](https://community.freefem.org/u/Loic)\
**Replies:** 6\
**Last updated:** [January 13, 2022, 3:02pm UTC](https://community.freefem.org/t/boundary-edge-extremities/1428 "2022-01-13T15:02:41Z")

</div>

Hello all, I would like to know how to have access to edge extremities (x1,y1) and (x2,y2) when we calculate for example: int1d(ThK)(u\*((x - x1)\*(x2 - x1) + (y - y1)\*(y2 - y1))/( (x2 - x1)^2 + (y2 – y1)^2 )) The prob…

---

## [Convergence varying for Newtons Method](https://community.freefem.org/t/convergence-varying-for-newtons-method/1406)

<div class="topic-metadata">

**Author:** [@sumantkr](https://community.freefem.org/u/sumantkr)\
**Replies:** 2\
**Last updated:** [January 13, 2022, 8:40am UTC](https://community.freefem.org/t/convergence-varying-for-newtons-method/1406 "2022-01-13T08:40:24Z")

</div>

Dear All, Anyone has working experience with the NS method mentioned in the ( Navier-Stokes). My solution is not converging for this approach.

---

## [Refine different regions with adaptmesh](https://community.freefem.org/t/refine-different-regions-with-adaptmesh/1404)

<div class="topic-metadata">

**Author:** [@ruffi92](https://community.freefem.org/u/ruffi92)\
**Replies:** 5\
**Last updated:** [January 12, 2022, 7:37am UTC](https://community.freefem.org/t/refine-different-regions-with-adaptmesh/1404 "2022-01-12T07:37:28Z")

</div>

Hi to all, i have the following mesh and variational problem: //Rectangle \[0 2\] x \[-1 0\] border b(t=0,1) {x=t; y=-1; label=1;}; border c(t=1,2) {x=t; y=-1; label=2;}; border d(t=-1,0) {x=2; y=t; label=3;}; border e…

---

## [Number of vertices on a boundary](https://community.freefem.org/t/number-of-vertices-on-a-boundary/1415)

<div class="topic-metadata">

**Author:** [@Markov](https://community.freefem.org/u/Markov)\
**Replies:** 3\
**Last updated:** [January 12, 2022, 1:07am UTC](https://community.freefem.org/t/number-of-vertices-on-a-boundary/1415 "2022-01-12T01:07:49Z")

</div>

Is there a direct way to calculate the number of boundary vertices? I know that for instance Th.nv gives the total number of vertices in the domain so I was wondering if there is a similar way to do it on boundary faces,…

---

## [FFT inside integral](https://community.freefem.org/t/fft-inside-integral/1424)

<div class="topic-metadata">

**Author:** [@Pepe](https://community.freefem.org/u/Pepe)\
**Replies:** 4\
**Last updated:** [January 11, 2022, 12:12pm UTC](https://community.freefem.org/t/fft-inside-integral/1424 "2022-01-11T12:12:00Z")

</div>

When we consider the unit square \[0,1\]^2. We can compute the FFT of a P1 function u by using dfft(u\[ \], nx, -1). I would like to know if it is somehow possible to use this trick inside an integral so to express somethin…

---

## [Copy variables between different meshes with PETSc](https://community.freefem.org/t/copy-variables-between-different-meshes-with-petsc/390)

<div class="topic-metadata">

**Author:** [@tak](https://community.freefem.org/u/tak)\
**Replies:** 14\
**Last updated:** [January 11, 2022, 8:52am UTC](https://community.freefem.org/t/copy-variables-between-different-meshes-with-petsc/390 "2022-01-11T08:52:03Z")

</div>

Dear Sir or Madam, I would like to use different 2 meshes with PETSc. Additionally, variables want to be copied from each other. However, as shown following codes, the direct copy, such as “v=u”, does not work. Would…

---

## [Umpfack errors with periodic boundary and slightly large mesh in 3D problem](https://community.freefem.org/t/umpfack-errors-with-periodic-boundary-and-slightly-large-mesh-in-3d-problem/295)

<div class="topic-metadata">

**Author:** [@caprilo](https://community.freefem.org/u/caprilo)\
**Replies:** 3\
**Last updated:** [January 7, 2022, 8:01am UTC](https://community.freefem.org/t/umpfack-errors-with-periodic-boundary-and-slightly-large-mesh-in-3d-problem/295 "2022-01-07T08:01:10Z")

</div>

I’m solving a 3D heat problem. This is a minimal working version of the code: load "msh3"; func T0 = x \< .5; int p = 10; mesh3 dominio = cube(p, p, p); fespace Vh(dominio, P2, periodic = \[ \[1, x, z\], \[3, x, z\], \[2…

---

## [Discrete matrices are not strictly symmetric](https://community.freefem.org/t/discrete-matrices-are-not-strictly-symmetric/1411)

<div class="topic-metadata">

**Author:** [@wby](https://community.freefem.org/u/wby)\
**Replies:** 15\
**Last updated:** [January 6, 2022, 4:19pm UTC](https://community.freefem.org/t/discrete-matrices-are-not-strictly-symmetric/1411 "2022-01-06T16:19:23Z")

</div>

Dear all, Hi! Recently, I found that discrete matrices are not strictly symmetric, but in theory it should be symmetric. How can I get the strictly symmetric one? varf a(\[uu,vv\],\[w,s\])= int2d(Th)( 2mu(dx(uu)dx(w)+dy(…

---

## [Problem when using pow on an integer](https://community.freefem.org/t/problem-when-using-pow-on-an-integer/1408)

<div class="topic-metadata">

**Author:** [@romaingrvl](https://community.freefem.org/u/romaingrvl)\
**Replies:** 5\
**Last updated:** [January 6, 2022, 9:03am UTC](https://community.freefem.org/t/problem-when-using-pow-on-an-integer/1408 "2022-01-06T09:03:13Z")

</div>

Hello, I found a little glitch with the native function pow when it is used on an integer. I derive my equations to be solved with Mathematica because they are rather lenghty and it converts the formal expressions into …

---

## [Influence of different initial values on convergence order（in time)](https://community.freefem.org/t/influence-of-different-initial-values-on-convergence-order-in-time/1414)

<div class="topic-metadata">

**Author:** [@Qianrui](https://community.freefem.org/u/Qianrui)\
**Replies:** 0\
**Last updated:** [January 6, 2022, 11:02am UTC](https://community.freefem.org/t/influence-of-different-initial-values-on-convergence-order-in-time/1414 "2022-01-06T11:02:12Z")

</div>

In the numerical simulation, two different initial values are selected. Using the first initial value, the convergence order can reach the second order（in time) in theory, but the other initial value has only one order（i…

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

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