# General Discussion

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

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

**Page:** 37

---

## [Trying to just get the matrix for operations in an fespace](https://community.freefem.org/t/trying-to-just-get-the-matrix-for-operations-in-an-fespace/2264)

<div class="topic-metadata">

**Author:** [@marchywka](https://community.freefem.org/u/marchywka)\
**Replies:** 0\
**Last updated:** [February 6, 2023, 9:32am UTC](https://community.freefem.org/t/trying-to-just-get-the-matrix-for-operations-in-an-fespace/2264 "2023-02-06T09:32:29Z")

</div>

from the documentation it looks like its possible to add customized finite element types but just as a learning exercise, and I even had a specific usage in mind, is it possible to dump the calculation of simple things…

---

## [Varf including finite element function that is solution of different PDE in parallel computing using PETSc](https://community.freefem.org/t/varf-including-finite-element-function-that-is-solution-of-different-pde-in-parallel-computing-using-petsc/2259)

<div class="topic-metadata">

**Author:** [@Keita](https://community.freefem.org/u/Keita)\
**Replies:** 5\
**Last updated:** [February 6, 2023, 7:18am UTC](https://community.freefem.org/t/varf-including-finite-element-function-that-is-solution-of-different-pde-in-parallel-computing-using-petsc/2259 "2023-02-06T07:18:03Z")

</div>

Hi FreeFem++ developers! Thank you very much for makingFF. I’d like to perform the 3D topology optimization, where the 3D elasticity problem and reaction-diffusion equation (RDE) are included, using PETSc. There, the …

---

## [Umfpack Out of memory issue when inverting a matrix](https://community.freefem.org/t/umfpack-out-of-memory-issue-when-inverting-a-matrix/2260)

<div class="topic-metadata">

**Author:** [@zirdi2000](https://community.freefem.org/u/zirdi2000)\
**Replies:** 4\
**Last updated:** [February 3, 2023, 10:51am UTC](https://community.freefem.org/t/umfpack-out-of-memory-issue-when-inverting-a-matrix/2260 "2023-02-03T10:51:20Z")

</div>

Hello, I am having an issue stating: Error Umfpack -1 : out\_of\_memory -1 : out\_of\_memory As can be seen in the screenshot. My simulation is adapted from the 3D magnetostatics example except I am using a much more …

---

## [Is There anyway to substrcipt the elements of an fespace?](https://community.freefem.org/t/is-there-anyway-to-substrcipt-the-elements-of-an-fespace/2258)

<div class="topic-metadata">

**Author:** [@marchywka](https://community.freefem.org/u/marchywka)\
**Replies:** 4\
**Last updated:** [February 2, 2023, 8:47pm UTC](https://community.freefem.org/t/is-there-anyway-to-substrcipt-the-elements-of-an-fespace/2258 "2023-02-02T20:47:54Z")

</div>

I the attached file, I’m trying to set the value of “d” or “dodo” such that it has one value above and another below y=.95 . Actually what I want is for any vertex closest to the top to have one value different from …

---

## [Linked list in FreeFEM](https://community.freefem.org/t/linked-list-in-freefem/2262)

<div class="topic-metadata">

**Author:** [@miguelpicos](https://community.freefem.org/u/miguelpicos)\
**Replies:** 0\
**Last updated:** [February 2, 2023, 10:04am UTC](https://community.freefem.org/t/linked-list-in-freefem/2262 "2023-02-02T10:04:49Z")

</div>

Hello, I was working on a project and I got to a point where the best solution is to use linked lists. ¿Is there some implementation of this data structure in FreeFEM? Thank you, Miguel.

---

## [Error in sparsesolver or UMFPACK](https://community.freefem.org/t/error-in-sparsesolver-or-umfpack/596)

<div class="topic-metadata">

**Author:** [@GalinaY](https://community.freefem.org/u/GalinaY)\
**Replies:** 4\
**Last updated:** [February 1, 2023, 3:07pm UTC](https://community.freefem.org/t/error-in-sparsesolver-or-umfpack/596 "2023-02-01T15:07:02Z")

</div>

Hello, I am trying to solve a system of poroelasticity using P2 elements and sparsesolver. Number of mesh elements - 43936, number of mesh nodes- 21974. The output I am getting is : Error umpfack umfpack\_di\_numeric s…

---

## [General issue with semantics of "fespace"](https://community.freefem.org/t/general-issue-with-semantics-of-fespace/2257)

<div class="topic-metadata">

**Author:** [@marchywka](https://community.freefem.org/u/marchywka)\
**Replies:** 0\
**Last updated:** [January 31, 2023, 12:47pm UTC](https://community.freefem.org/t/general-issue-with-semantics-of-fespace/2257 "2023-01-31T12:47:31Z")

</div>

I’m trying to do a 2D diffusion problem with an adaptive mesh. Looking at the attache example, exbigns.edp (4.0 KB) it looks like the fespaces all change automatically if the mesh is redefined or adapted. This exampl…

---

## [Read/write 3D solution](https://community.freefem.org/t/read-write-3d-solution/2256)

<div class="topic-metadata">

**Author:** [@jsmacd](https://community.freefem.org/u/jsmacd)\
**Replies:** 1\
**Last updated:** [January 31, 2023, 8:25am UTC](https://community.freefem.org/t/read-write-3d-solution/2256 "2023-01-31T08:25:18Z")

</div>

Is there a special way to read and write a solution in 3d? I am able to save and read my meshes correctly. Also, I can see that I have a saved solution. But when I try to read my solution: I get the error error operato…

---

## [Explanation of Magnetostatic Variational Form](https://community.freefem.org/t/explanation-of-magnetostatic-variational-form/2254)

<div class="topic-metadata">

**Author:** [@zirdi2000](https://community.freefem.org/u/zirdi2000)\
**Replies:** 2\
**Last updated:** [January 30, 2023, 8:37pm UTC](https://community.freefem.org/t/explanation-of-magnetostatic-variational-form/2254 "2023-01-30T20:37:37Z")

</div>

Hello, I was wondering if anyone could explain to me or send any relevant resources to help me understand the variational formulation formula in the FreeFEM magneto static example In particular, I am interested in the …

---

## [Trying to connect 2 plates with a rod failing in tetgen](https://community.freefem.org/t/trying-to-connect-2-plates-with-a-rod-failing-in-tetgen/2253)

<div class="topic-metadata">

**Author:** [@marchywka](https://community.freefem.org/u/marchywka)\
**Replies:** 5\
**Last updated:** [January 30, 2023, 3:44pm UTC](https://community.freefem.org/t/trying-to-connect-2-plates-with-a-rod-failing-in-tetgen/2253 "2023-01-30T15:44:53Z")

</div>

I can post the code but maybe someone can suggest a sample that does what I need. I have a 3d cube that contains two plates ( a parallel plate capacitor ). I want to connect the plates with a rod running between them …

---

## [Savevtk() after load "PETSc"](https://community.freefem.org/t/savevtk-after-load-petsc/2249)

<div class="topic-metadata">

**Author:** [@cmd](https://community.freefem.org/u/cmd)\
**Replies:** 3\
**Last updated:** [January 27, 2023, 4:35pm UTC](https://community.freefem.org/t/savevtk-after-load-petsc/2249 "2023-01-27T16:35:28Z")

</div>

Hello FreeFEM community, After adding load "PETSc" to a script, the functionality of savevtk is overloaded to support parallel I/O (.pvd/.pvtu files). If I have assembled the global mesh/solution on one process, is it …

---

## [Segfault when plotting FE function](https://community.freefem.org/t/segfault-when-plotting-fe-function/2222)

<div class="topic-metadata">

**Author:** [@Eloi](https://community.freefem.org/u/Eloi)\
**Replies:** 7\
**Last updated:** [January 27, 2023, 11:49am UTC](https://community.freefem.org/t/segfault-when-plotting-fe-function/2222 "2023-01-27T11:49:15Z")

</div>

Hello, I used FreeFem for a while and today when I tried to run a simple script which involved plotting a function, it segfaulted. Here is the code : int npoints = 100; // Number of points on the circonference of the d…

---

## [Save Boundary Condition](https://community.freefem.org/t/save-boundary-condition/2246)

<div class="topic-metadata">

**Author:** [@galfras](https://community.freefem.org/u/galfras)\
**Replies:** 4\
**Last updated:** [January 27, 2023, 9:24am UTC](https://community.freefem.org/t/save-boundary-condition/2246 "2023-01-27T09:24:16Z")

</div>

Hello! I’m working with several files, and the solution I obtain in one of them I need to use ir as the boundary condtion in the other. Is there a way to save and read the boundary condition in a .txt? I know I can save…

---

## [Piecewise function to eliminate singularity but singularity still causing problem](https://community.freefem.org/t/piecewise-function-to-eliminate-singularity-but-singularity-still-causing-problem/2235)

<div class="topic-metadata">

**Author:** [@jsmacd](https://community.freefem.org/u/jsmacd)\
**Replies:** 4\
**Last updated:** [January 25, 2023, 9:15pm UTC](https://community.freefem.org/t/piecewise-function-to-eliminate-singularity-but-singularity-still-causing-problem/2235 "2023-01-25T21:15:12Z")

</div>

Dear community, I am trying to eliminate a singularity within a cube by replacing the function with the singularity with a piecewise function that has no singularity. However, I’m getting some funky errors including an …

---

## [FEM inization in 3D and time,](https://community.freefem.org/t/fem-inization-in-3d-and-time/2248)

<div class="topic-metadata">

**Author:** [@marchywka](https://community.freefem.org/u/marchywka)\
**Replies:** 0\
**Last updated:** [January 25, 2023, 5:53pm UTC](https://community.freefem.org/t/fem-inization-in-3d-and-time/2248 "2023-01-25T17:53:12Z")

</div>

I was browsing the literature on weak formulations and came across this\[1\] which seems to doe FEM along time which has crossed my mind before. Any facility for doing 3 spatial plus time with FF? Is it practical? Thanks…

---

## [Segmentation fault due to fill=false option in plots](https://community.freefem.org/t/segmentation-fault-due-to-fill-false-option-in-plots/1348)

<div class="topic-metadata">

**Author:** [@julienG](https://community.freefem.org/u/julienG)\
**Replies:** 4\
**Last updated:** [January 25, 2023, 5:39pm UTC](https://community.freefem.org/t/segmentation-fault-due-to-fill-false-option-in-plots/1348 "2023-01-25T17:39:18Z")

</div>

Dear all I think I spotted an error in the plot command when using the option fill=false. My FreeFem is the latest version installed from the develop branch, on Ubuntu 20.04. I tested this on two different machines. Doe…

---

## ["plot of array with wrong number of components (!= 2 or 3) "](https://community.freefem.org/t/plot-of-array-with-wrong-number-of-components-2-or-3/2245)

<div class="topic-metadata">

**Author:** [@marchywka](https://community.freefem.org/u/marchywka)\
**Replies:** 2\
**Last updated:** [January 25, 2023, 5:35pm UTC](https://community.freefem.org/t/plot-of-array-with-wrong-number-of-components-2-or-3/2245 "2023-01-25T17:35:35Z")

</div>

I keep trying to copy these examples with plot and except for very simple things they end up making errors. I can’t see the difference betwneen my code and the file I copied it from. The excerpt below is from the exam…

---

## [Now it looks like I can load the mpi code ok even without mpirun](https://community.freefem.org/t/now-it-looks-like-i-can-load-the-mpi-code-ok-even-without-mpirun/2243)

<div class="topic-metadata">

**Author:** [@marchywka](https://community.freefem.org/u/marchywka)\
**Replies:** 1\
**Last updated:** [January 24, 2023, 11:10pm UTC](https://community.freefem.org/t/now-it-looks-like-i-can-load-the-mpi-code-ok-even-without-mpirun/2243 "2023-01-24T23:10:18Z")

</div>

Curious now though if there is an incompatibility between the mpi that comes with the ff petsc and openmpi. It looks like my original concern was sensible- ff was passing a list of strings without a count and without a…

---

## [Dirichlet boundary function not defined over entire face](https://community.freefem.org/t/dirichlet-boundary-function-not-defined-over-entire-face/2226)

<div class="topic-metadata">

**Author:** [@jsmacd](https://community.freefem.org/u/jsmacd)\
**Replies:** 5\
**Last updated:** [January 24, 2023, 7:33pm UTC](https://community.freefem.org/t/dirichlet-boundary-function-not-defined-over-entire-face/2226 "2023-01-24T19:33:08Z")

</div>

I am trying to impose Dirichlet boundary conditions along the faces of a cube built with the cube command. On faces 5 and 6 there is a single point where the function defining the boundary condition is not defined. It se…

---

## [Compilation error in code " err code 6 , mpirank 0 " application of boundary conditions](https://community.freefem.org/t/compilation-error-in-code-err-code-6-mpirank-0-application-of-boundary-conditions/2228)

<div class="topic-metadata">

**Author:** [@chaimaa](https://community.freefem.org/u/chaimaa)\
**Replies:** 6\
**Last updated:** [January 23, 2023, 8:50pm UTC](https://community.freefem.org/t/compilation-error-in-code-err-code-6-mpirank-0-application-of-boundary-conditions/2228 "2023-01-23T20:50:12Z")

</div>

hi, I get this error when I apply periodic boundary conditions. Can any one help me please ! current line = 133 Assertion fail : (im-\>second == kv) line :250, in file lgmesh3.cpp Assertion fail : (im-\>second == kv) …

---

## [Cycling the movement of border and mesh](https://community.freefem.org/t/cycling-the-movement-of-border-and-mesh/2242)

<div class="topic-metadata">

**Author:** [@le-tn](https://community.freefem.org/u/le-tn)\
**Replies:** 1\
**Last updated:** [January 23, 2023, 11:52am UTC](https://community.freefem.org/t/cycling-the-movement-of-border-and-mesh/2242 "2023-01-23T11:52:56Z")

</div>

Hi, I am a new user of Freefem and need to cycle movement of border and mesh following displacement for an elastoplasticity problem. I first tried a lengthy procedure with movemesh but it does not include border movement…

---

## ["make check" fails on all the mpi tests](https://community.freefem.org/t/make-check-fails-on-all-the-mpi-tests/2241)

<div class="topic-metadata">

**Author:** [@marchywka](https://community.freefem.org/u/marchywka)\
**Replies:** 5\
**Last updated:** [January 23, 2023, 11:02am UTC](https://community.freefem.org/t/make-check-fails-on-all-the-mpi-tests/2241 "2023-01-23T11:02:58Z")

</div>

here is one example with the shared objects listed at the bottom. I don’t think this has ever worked right I just didn’t need it for initial testing. Thanks. cat advection-TS-2d-PETSc.edp.log ‘/home/ubuntu/dev/freefe…

---

## [Needed to set OMPI\_ARGV unused value to load PETSc](https://community.freefem.org/t/needed-to-set-ompi-argv-unused-value-to-load-petsc/2239)

<div class="topic-metadata">

**Author:** [@marchywka](https://community.freefem.org/u/marchywka)\
**Replies:** 3\
**Last updated:** [January 22, 2023, 5:40pm UTC](https://community.freefem.org/t/needed-to-set-ompi-argv-unused-value-to-load-petsc/2239 "2023-01-22T17:40:47Z")

</div>

After about a week of playing around I had to look at the MIP initialization. It seems that the arg list is pass to PETSc and then to MPI which eventually passes arg\[1\] to someone expecting a null terminated parameter…

---

## [Matrix Inversion no solver](https://community.freefem.org/t/matrix-inversion-no-solver/2238)

<div class="topic-metadata">

**Author:** [@themathsdude](https://community.freefem.org/u/themathsdude)\
**Replies:** 3\
**Last updated:** [January 22, 2023, 2:39pm UTC](https://community.freefem.org/t/matrix-inversion-no-solver/2238 "2023-01-22T14:39:29Z")

</div>

Hello everyone, I want to solve a linear system. I have a vandermonde matrix in a linear system. I figured out i should solve it with real\[int\] sol = A^-1 \* b as suggested in the documentation, but i get the following e…

---

## [Indicator function of a rectangle](https://community.freefem.org/t/indicator-function-of-a-rectangle/2233)

<div class="topic-metadata">

**Author:** [@luca.liverotti](https://community.freefem.org/u/luca.liverotti)\
**Replies:** 1\
**Last updated:** [January 21, 2023, 4:41pm UTC](https://community.freefem.org/t/indicator-function-of-a-rectangle/2233 "2023-01-21T16:41:57Z")

</div>

Hi everyone! I tried to implement the indicator function of a rectangle Q as follows // Q = \[xq1,xq2\] x \[yq1,yq2\], xq1\<xq2, yq1\<yq2 func real chiQ(real xq1,real xq2,real yq1,real yq2){ if(x\>=xq1 & x\<=xq2 & y\>=yq1 & y\<…

---

## [Convect error: Fatal error in Convect (R2) operator: loop =\> velocity too high ? or NaN](https://community.freefem.org/t/convect-error-fatal-error-in-convect-r2-operator-loop-velocity-too-high-or-nan/2232)

<div class="topic-metadata">

**Author:** [@mahdi](https://community.freefem.org/u/mahdi)\
**Replies:** 1\
**Last updated:** [January 21, 2023, 4:35pm UTC](https://community.freefem.org/t/convect-error-fatal-error-in-convect-r2-operator-loop-velocity-too-high-or-nan/2232 "2023-01-21T16:35:40Z")

</div>

Hi there; I am trying to solve a 2D advection problem, where the “p1dc” velocity fields (u, v) are computed from an algorithm and then I apply: MaxU=max(abs(u\[ \].max),abs(v\[ \].max)); timeStep=CourantNo\*(Th.hmin)/(Max…

---

## [What is the relationship between this code and libmesh?](https://community.freefem.org/t/what-is-the-relationship-between-this-code-and-libmesh/2231)

<div class="topic-metadata">

**Author:** [@marchywka](https://community.freefem.org/u/marchywka)\
**Replies:** 3\
**Last updated:** [January 20, 2023, 2:58pm UTC](https://community.freefem.org/t/what-is-the-relationship-between-this-code-and-libmesh/2231 "2023-01-20T14:58:36Z")

</div>

I had to get the complex petsc to install which was quite a task and I noticed libmesh is contained in the 3rd party stuff. I had played with this before to learn some FEM and thought it was an alrternative that I may …

---

## [Cycling movemesh](https://community.freefem.org/t/cycling-movemesh/2230)

<div class="topic-metadata">

**Author:** [@le-tn](https://community.freefem.org/u/le-tn)\
**Replies:** 0\
**Last updated:** [January 19, 2023, 5:17pm UTC](https://community.freefem.org/t/cycling-movemesh/2230 "2023-01-19T17:17:05Z")

</div>

I am new to Freefem and have trouble cycling movemesh. My script is equivalent to (structure is the same, formulas are wrong): /\* iterated rho is the driving parameter \*/ mesh Th = buildmesh( left(60) + bottom(60) + ri…

---

## [2d integral over one triangle element](https://community.freefem.org/t/2d-integral-over-one-triangle-element/963)

<div class="topic-metadata">

**Author:** [@Sharon](https://community.freefem.org/u/Sharon)\
**Replies:** 2\
**Last updated:** [May 6, 2021, 3:44pm UTC](https://community.freefem.org/t/2d-integral-over-one-triangle-element/963 "2021-05-06T15:44:04Z")

</div>

Hi, I am a question about using int2d to calculate integral over one element(triangle). I have a mesh Th, how could I find integral only over Th\[0\]( the first triangle element) ? Any help is appreciated.

---

## [Writing to file appears to get wrong values,](https://community.freefem.org/t/writing-to-file-appears-to-get-wrong-values/2224)

<div class="topic-metadata">

**Author:** [@marchywka](https://community.freefem.org/u/marchywka)\
**Replies:** 6\
**Last updated:** [January 19, 2023, 12:10am UTC](https://community.freefem.org/t/writing-to-file-appears-to-get-wrong-values/2224 "2023-01-19T00:10:33Z")

</div>

So I realized that Stokes does not work and I needed vStokes to solve my 2 cubes in the wind example ( drafting a semi truck lol ). The plot looks plausible and I wanted to explore in R. However, all the velocity and p…

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

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