# General Discussion

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

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

**Page:** 33

---

## [Compute Residuals](https://community.freefem.org/t/compute-residuals/2475)

<div class="topic-metadata">

**Author:** [@sruget](https://community.freefem.org/u/sruget)\
**Replies:** 6\
**Last updated:** [May 20, 2023, 2:45pm UTC](https://community.freefem.org/t/compute-residuals/2475 "2023-05-20T14:45:29Z")

</div>

Hi everyone, I’m trying to estimate the residual error when solving a pde with solve. More precisely freefem is solving a system which looks like : find U st AU = B where A is a matrix, B a vector. I would like to compu…

---

## [Error in macro\_ddm.idp](https://community.freefem.org/t/error-in-macro-ddm-idp/2358)

<div class="topic-metadata">

**Author:** [@yhao](https://community.freefem.org/u/yhao)\
**Replies:** 3\
**Last updated:** [March 28, 2023, 4:03pm UTC](https://community.freefem.org/t/error-in-macro-ddm-idp/2358 "2023-03-28T16:03:37Z")

</div>

Dear all, I am working on a PETSc code. I met a problem when I used the sentence: build(Mesh, s, intersection, D, Pk, mpiCommWorld) It returns an error: Error line number 682, in file macro: buildOverlapEdgePeriodic…

---

## [\[PETsc\]all examples in "examples/hpddm" don't work,why?](https://community.freefem.org/t/petsc-all-examples-in-examples-hpddm-dont-work-why/2464)

<div class="topic-metadata">

**Author:** [@William](https://community.freefem.org/u/William)\
**Replies:** 1\
**Last updated:** [May 17, 2023, 11:30am UTC](https://community.freefem.org/t/petsc-all-examples-in-examples-hpddm-dont-work-why/2464 "2023-05-17T11:30:19Z")

</div>

Error line number 735, in file macro: buildOverlapEdgePeriodicRecursive in E:\\freefem++4.12\\FreeFem++\\idp\\macro\_ddm.idp, before token mpiWtime current line = 735 Compile error : line number :735, mpiWtime error Com…

---

## [Issue with solver=UMFPACK64](https://community.freefem.org/t/issue-with-solver-umfpack64/2467)

<div class="topic-metadata">

**Author:** [@89273166](https://community.freefem.org/u/89273166)\
**Replies:** 3\
**Last updated:** [May 18, 2023, 4:24pm UTC](https://community.freefem.org/t/issue-with-solver-umfpack64/2467 "2023-05-18T16:24:32Z")

</div>

In which version of FreeFem++, we can use "UMFPACK64 " as a solver. Thank you in advanced.

---

## [Code for the average function](https://community.freefem.org/t/code-for-the-average-function/2472)

<div class="topic-metadata">

**Author:** [@junjie](https://community.freefem.org/u/junjie)\
**Replies:** 0\
**Last updated:** [May 18, 2023, 12:20pm UTC](https://community.freefem.org/t/code-for-the-average-function/2472 "2023-05-18T12:20:00Z")

</div>

Hello everyone, I’m a little confused about the average function in freefem, and I’m wondering what the code behind this command is. Because I want to implement the average value defined in the picture below in freefem.I…

---

## [Calculation of discrete weak gradient](https://community.freefem.org/t/calculation-of-discrete-weak-gradient/2468)

<div class="topic-metadata">

**Author:** [@freefemuser](https://community.freefem.org/u/freefemuser)\
**Replies:** 2\
**Last updated:** [May 17, 2023, 3:23pm UTC](https://community.freefem.org/t/calculation-of-discrete-weak-gradient/2468 "2023-05-17T15:23:06Z")

</div>

We are trying to use freefem++ to address computational aspects of weak Galerkin finite element method. To do so, in the first step, we need to solve the following problem in the finite dimensional settings which reads …

---

## [Error in plotting the mesh file generated from gmsh](https://community.freefem.org/t/error-in-plotting-the-mesh-file-generated-from-gmsh/2463)

<div class="topic-metadata">

**Author:** [@pravinae](https://community.freefem.org/u/pravinae)\
**Replies:** 2\
**Last updated:** [May 17, 2023, 3:15pm UTC](https://community.freefem.org/t/error-in-plotting-the-mesh-file-generated-from-gmsh/2463 "2023-05-17T15:15:36Z")

</div>

Hello, I have created an airfoil geometry in SolidWorks and meshed it in gmsh. When I tried to plot in FreeFEM++4.12 version (Later i will solve for 3D elasticity problem), it is showing Error. Code is written below: l…

---

## [Grid Co-ordinates of Variables](https://community.freefem.org/t/grid-co-ordinates-of-variables/2470)

<div class="topic-metadata">

**Author:** [@D\_N\_Sarkar](https://community.freefem.org/u/D_N_Sarkar)\
**Replies:** 1\
**Last updated:** [May 17, 2023, 3:01pm UTC](https://community.freefem.org/t/grid-co-ordinates-of-variables/2470 "2023-05-17T15:01:27Z")

</div>

Say I have two variables: u and p. ‘u’ is discretized by P2 and ‘p’ by P1. Please see the following code: //============================================ mesh Th = square(10,10); plot(Th, wait=1); fespace femp1(Th,P1…

---

## [Error output compiling](https://community.freefem.org/t/error-output-compiling/2465)

<div class="topic-metadata">

**Author:** [@edelgado](https://community.freefem.org/u/edelgado)\
**Replies:** 2\
**Last updated:** [May 17, 2023, 2:12pm UTC](https://community.freefem.org/t/error-output-compiling/2465 "2023-05-17T14:12:37Z")

</div>

Dear FreeFem++ users, I have a quite large code, and when I compile it, I get the following error after compiling, where the line number xxx is the last line of my code: Error line number xxx , in file – unknown --, be…

---

## [Fortran and lapack](https://community.freefem.org/t/fortran-and-lapack/2469)

<div class="topic-metadata">

**Author:** [@marchywka](https://community.freefem.org/u/marchywka)\
**Replies:** 0\
**Last updated:** [May 17, 2023, 12:13pm UTC](https://community.freefem.org/t/fortran-and-lapack/2469 "2023-05-17T12:13:04Z")

</div>

I had a problem with fortran libraries for both R and FF when moving to Ubuntu 20. It looks like my FF now works by coping the old liblapack. However, there does seem to be an issue with R not sure of relevance here, …

---

## [\[PETSc\] 3D elasticity problem in which Young's modulus varies in the field](https://community.freefem.org/t/petsc-3d-elasticity-problem-in-which-youngs-modulus-varies-in-the-field/2461)

<div class="topic-metadata">

**Author:** [@Keita](https://community.freefem.org/u/Keita)\
**Replies:** 6\
**Last updated:** [May 17, 2023, 6:04am UTC](https://community.freefem.org/t/petsc-3d-elasticity-problem-in-which-youngs-modulus-varies-in-the-field/2461 "2023-05-17T06:04:15Z")

</div>

Dear FreeFem++ developers I’d like to analyze the elasticity problem in which Young’s modulus varies in the field. Dirichlet conditions were set for a 3-dimensional cube with a predefined displacement of 1.0 and 0.0 ve…

---

## [mesh of a right paving stone and a cube](https://community.freefem.org/t/mesh-of-a-right-paving-stone-and-a-cube/2394)

<div class="topic-metadata">

**Author:** [@aweni](https://community.freefem.org/u/aweni)\
**Replies:** 57\
**Last updated:** [May 16, 2023, 2:03pm UTC](https://community.freefem.org/t/mesh-of-a-right-paving-stone-and-a-cube/2394 "2023-05-16T14:03:07Z")

</div>

Hello to all I am a beginner in freefem . I am working in 3D. I would like to understand how to build and make a mesh of a cube or a right block. I have taken the code cube.idp but I did not understand much. especial…

---

## [Equations involve different mesh spaces](https://community.freefem.org/t/equations-involve-different-mesh-spaces/2453)

<div class="topic-metadata">

**Author:** [@Starivers](https://community.freefem.org/u/Starivers)\
**Replies:** 22\
**Last updated:** [May 16, 2023, 12:22pm UTC](https://community.freefem.org/t/equations-involve-different-mesh-spaces/2453 "2023-05-16T12:22:52Z")

</div>

Dear everyone: I am trying to implement Cahn-hilliard equation with dynamic boundary conditions, whose weak formula follows as: With this weak formula, I define Problem cahn(\[ u , ub , ϕ \] , \[ζ , ξ , η \] ) to sol…

---

## [Mpi use more processors but cost more time](https://community.freefem.org/t/mpi-use-more-processors-but-cost-more-time/2456)

<div class="topic-metadata">

**Author:** [@lizishuai](https://community.freefem.org/u/lizishuai)\
**Replies:** 8\
**Last updated:** [May 15, 2023, 5:58am UTC](https://community.freefem.org/t/mpi-use-more-processors-but-cost-more-time/2456 "2023-05-15T05:58:40Z")

</div>

Dear all I try to use mpi to realize program parallelism It is mainly used to reduce the program running time, but I’ve found that as the number of processors increases, the program run time increases. I can not solve …

---

## [Parallel 3D Schrodinger Eigenvalues/vectors error with Dirichlet BC](https://community.freefem.org/t/parallel-3d-schrodinger-eigenvalues-vectors-error-with-dirichlet-bc/2457)

<div class="topic-metadata">

**Author:** [@jrb](https://community.freefem.org/u/jrb)\
**Replies:** 10\
**Last updated:** [May 15, 2023, 1:07am UTC](https://community.freefem.org/t/parallel-3d-schrodinger-eigenvalues-vectors-error-with-dirichlet-bc/2457 "2023-05-15T01:07:29Z")

</div>

Hi, I’m looking to solve the 3D Schrodinger equation using SLEPc w/ FreeFEM. As part of my code testing I’ve simulated the first 4 eigenvalues/vectors for the “particle in a box” model, with a 10x10x10 box. The eigenvalu…

---

## [Strange error on FreeFem++](https://community.freefem.org/t/strange-error-on-freefem/2426)

<div class="topic-metadata">

**Author:** [@larismartins](https://community.freefem.org/u/larismartins)\
**Replies:** 5\
**Last updated:** [May 10, 2023, 11:38am UTC](https://community.freefem.org/t/strange-error-on-freefem/2426 "2023-05-10T11:38:41Z")

</div>

There is a strange behavior on FreeFem++, I’m running my code and for a mesh with h = 0.176777, that means int globalH = 2^coarseMesh; mesh calP = square(globalH,globalH); with coarseMesh = 3 it gives -- Square mes…

---

## [Coord of DoF on vectorial space](https://community.freefem.org/t/coord-of-dof-on-vectorial-space/2451)

<div class="topic-metadata">

**Author:** [@larismartins](https://community.freefem.org/u/larismartins)\
**Replies:** 2\
**Last updated:** [May 10, 2023, 9:52am UTC](https://community.freefem.org/t/coord-of-dof-on-vectorial-space/2451 "2023-05-10T09:52:35Z")

</div>

Hello, I’m trying to get the coordinates for a RT space. I’ve tried the following: mesh Th = square(1,1); fespace RTm(Th, RT1); int ndofRTmK = RTm.ndofK; real\[int\] dofPmd(ndofRTmK); for(int i=0;i\<ndofRTmK;i++){ …

---

## [Rotational boundary condition](https://community.freefem.org/t/rotational-boundary-condition/2447)

<div class="topic-metadata">

**Author:** [@Robert](https://community.freefem.org/u/Robert)\
**Replies:** 6\
**Last updated:** [May 10, 2023, 9:41am UTC](https://community.freefem.org/t/rotational-boundary-condition/2447 "2023-05-10T09:41:16Z")

</div>

Dear community, I would like to learn how to set an angular velocity as a boundary condition. Hence, I made a simple test case with a clasic problem of a flow around a cylinder and I try to set an angular velocity to th…

---

## [How to pass a string\[string\] array to a function](https://community.freefem.org/t/how-to-pass-a-string-string-array-to-a-function/2449)

<div class="topic-metadata">

**Author:** [@Christian](https://community.freefem.org/u/Christian)\
**Replies:** 3\
**Last updated:** [May 9, 2023, 1:17pm UTC](https://community.freefem.org/t/how-to-pass-a-string-string-array-to-a-function/2449 "2023-05-09T13:17:11Z")

</div>

Hello everyone, I was tring to use as input of an external funciton a string\[string\] array but for some reasons, it does not seemes to be possible. FreeFEM does not give any allert of error, but it does not give any out…

---

## [Neumann condition in stokes equation](https://community.freefem.org/t/neumann-condition-in-stokes-equation/2448)

<div class="topic-metadata">

**Author:** [@Jamal](https://community.freefem.org/u/Jamal)\
**Replies:** 1\
**Last updated:** [May 8, 2023, 8:26am UTC](https://community.freefem.org/t/neumann-condition-in-stokes-equation/2448 "2023-05-08T08:26:46Z")

</div>

Hello everyone; Can you please guide me on how to apply the Neumann boundary condition in the Stokes equation on \\Gamma\_d? \\begin{equation} \\begin{cases}-v \\Delta u+\\nabla p=0 & \\text { in } \\Omega \\ \\nabla \\cdot u=0…

---

## [Value and derivative at same boundary pt, "+on" ignored?](https://community.freefem.org/t/value-and-derivative-at-same-boundary-pt-on-ignored/2429)

<div class="topic-metadata">

**Author:** [@marchywka](https://community.freefem.org/u/marchywka)\
**Replies:** 7\
**Last updated:** [May 7, 2023, 11:47pm UTC](https://community.freefem.org/t/value-and-derivative-at-same-boundary-pt-on-ignored/2429 "2023-05-07T23:47:23Z")

</div>

Quite often it looked like some boundary conditions were ignored. So, I went back to a simple example trying to generate a sine wave in 1D starting at arbitrary phase and amplitude ( value and slope on left ). I cou…

---

## [Ffddm problem by using RT0 element](https://community.freefem.org/t/ffddm-problem-by-using-rt0-element/2427)

<div class="topic-metadata">

**Author:** [@YAOH](https://community.freefem.org/u/YAOH)\
**Replies:** 7\
**Last updated:** [May 2, 2023, 2:25pm UTC](https://community.freefem.org/t/ffddm-problem-by-using-rt0-element/2427 "2023-05-02T14:25:06Z")

</div>

Dear all, I am using ffddm to a mixed finite element problem with finite spaces \[RT0,P0\]. When I used ffddmbuildDfespace to build the local space, it showed an error: Probleme partition de l’unite : uu.linfty = 1. I …

---

## [Problem for computing eigenvalues with EPSSolve](https://community.freefem.org/t/problem-for-computing-eigenvalues-with-epssolve/2420)

<div class="topic-metadata">

**Author:** [@Loic](https://community.freefem.org/u/Loic)\
**Replies:** 33\
**Last updated:** [April 29, 2023, 12:03am UTC](https://community.freefem.org/t/problem-for-computing-eigenvalues-with-epssolve/2420 "2023-04-29T00:03:44Z")

</div>

Dear all, I am facing a problem with a generalized eigenvalues problem using EPSSolve in FreeFEM of the type MASS \\Phi = \\lambda STIFF \\Phi. EPSSolve seems to diverge . Indeed, I have to find 14 eigenvalues. However …

---

## [Trace on an internal boundary of a dc finite element](https://community.freefem.org/t/trace-on-an-internal-boundary-of-a-dc-finite-element/2421)

<div class="topic-metadata">

**Author:** [@Morgane](https://community.freefem.org/u/Morgane)\
**Replies:** 1\
**Last updated:** [April 28, 2023, 8:13am UTC](https://community.freefem.org/t/trace-on-an-internal-boundary-of-a-dc-finite-element/2421 "2023-04-28T08:13:15Z")

</div>

Dear, I would like to have access to the trace of a discontinuous finite element function on each side of an internal border of my mesh. Do you know a robust way to do this? Best Morgane

---

## [Contribution magnetostatic module](https://community.freefem.org/t/contribution-magnetostatic-module/2422)

<div class="topic-metadata">

**Author:** [@tess35](https://community.freefem.org/u/tess35)\
**Replies:** 0\
**Last updated:** [April 27, 2023, 12:23pm UTC](https://community.freefem.org/t/contribution-magnetostatic-module/2422 "2023-04-27T12:23:58Z")

</div>

Hi, I would like to notify you a contribution on the magnetostatic module, because I asked for a pull request. Also I see a problem in the last part of my contribution; The Gauss-Legendre quadrature works nice when th…

---

## [Transient 2D piezoelectric problem](https://community.freefem.org/t/transient-2d-piezoelectric-problem/2412)

<div class="topic-metadata">

**Author:** [@wab41](https://community.freefem.org/u/wab41)\
**Replies:** 7\
**Last updated:** [April 26, 2023, 7:29pm UTC](https://community.freefem.org/t/transient-2d-piezoelectric-problem/2412 "2023-04-26T19:29:24Z")

</div>

Hello All, I am currently working on trying to implement a transient piezoelectric system in 2D. I have seen static and harmonic cases done and for the most part follow the formulation and implementation. However, in th…

---

## [Non-homogeneous Dirichlet BC at a point](https://community.freefem.org/t/non-homogeneous-dirichlet-bc-at-a-point/2410)

<div class="topic-metadata">

**Author:** [@sumantkr](https://community.freefem.org/u/sumantkr)\
**Replies:** 2\
**Last updated:** [April 25, 2023, 11:17am UTC](https://community.freefem.org/t/non-homogeneous-dirichlet-bc-at-a-point/2410 "2023-04-25T11:17:08Z")

</div>

Dear All, can we impose a non-homogeneous Dirichlet boundary condition at a point in a square domain? Ex: u\_xx + u\_yy = f(x, y) over a square AB, BC, CD, and DA are four boundaries of a square. So, how to impose, u(…

---

## [Convect with periodic boundaries](https://community.freefem.org/t/convect-with-periodic-boundaries/2399)

<div class="topic-metadata">

**Author:** [@ilavi](https://community.freefem.org/u/ilavi)\
**Replies:** 4\
**Last updated:** [April 24, 2023, 1:30pm UTC](https://community.freefem.org/t/convect-with-periodic-boundaries/2399 "2023-04-24T13:30:41Z")

</div>

Hello all, I’m new here but not so new to FreeFem++. I want to implement the convect operator on a periodic function (with a periodic velocity field) in 2d. mesh Th=square(Nx,Ny,\[Lxx,Lyy\]); fespace Den(Th,P2,periodic=…

---

## [Moving phase boundary electrochemical etching](https://community.freefem.org/t/moving-phase-boundary-electrochemical-etching/2414)

<div class="topic-metadata">

**Author:** [@marchywka](https://community.freefem.org/u/marchywka)\
**Replies:** 0\
**Last updated:** [April 23, 2023, 12:31am UTC](https://community.freefem.org/t/moving-phase-boundary-electrochemical-etching/2414 "2023-04-23T00:31:19Z")

</div>

I was just curious if anyone had any particular thoughts on FF features related to this exercise. It is nominally anodic etching of a metal with a normalized/fictional Butler-Volmer equation for now. The initial equill…

---

## [Closing an output file steam - does it need to be flushed?](https://community.freefem.org/t/closing-an-output-file-steam-does-it-need-to-be-flushed/2413)

<div class="topic-metadata">

**Author:** [@marchywka](https://community.freefem.org/u/marchywka)\
**Replies:** 0\
**Last updated:** [April 22, 2023, 10:51am UTC](https://community.freefem.org/t/closing-an-output-file-steam-does-it-need-to-be-flushed/2413 "2023-04-22T10:51:41Z")

</div>

I was using this macro without the flush but the last value in the last line was missing sometimes. On a quick check, adding the flush may have fixed it. This looks like a problem with the ofstream flushing when desto…

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

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