# General Discussion

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

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

**Page:** 41

---

## [Profile memory in freefem](https://community.freefem.org/t/profile-memory-in-freefem/1092)

<div class="topic-metadata">

**Author:** [@yongxing](https://community.freefem.org/u/yongxing)\
**Replies:** 1\
**Last updated:** [October 12, 2022, 1:59pm UTC](https://community.freefem.org/t/profile-memory-in-freefem/1092 "2022-10-12T13:59:49Z")

</div>

Dear all, is there a method to print memery in FreeFem, so that we would know which lines of the code consumes the most memery? Yongxing

---

## [Unbounded domain solution of NSE](https://community.freefem.org/t/unbounded-domain-solution-of-nse/2050)

<div class="topic-metadata">

**Author:** [@gnaganlu](https://community.freefem.org/u/gnaganlu)\
**Replies:** 1\
**Last updated:** [October 10, 2022, 12:33pm UTC](https://community.freefem.org/t/unbounded-domain-solution-of-nse/2050 "2022-10-10T12:33:51Z")

</div>

I need to solve flow past obstacles on the unbounded domain at Freefem. Is it possible? How can I write? Thank you

---

## [Create unstructured mesh region with specified discretisation of one border](https://community.freefem.org/t/create-unstructured-mesh-region-with-specified-discretisation-of-one-border/2049)

<div class="topic-metadata">

**Author:** [@Flavio](https://community.freefem.org/u/Flavio)\
**Replies:** 2\
**Last updated:** [October 10, 2022, 8:40am UTC](https://community.freefem.org/t/create-unstructured-mesh-region-with-specified-discretisation-of-one-border/2049 "2022-10-10T08:40:36Z")

</div>

Hi, I am trying to mesh a 2D rectangular region with unstructured elements but I would like to specify a distribution of grid points along one border. I havve created the border and am using the buildmesh command. Howe…

---

## [Meaning of uu, vv after fespace is defined](https://community.freefem.org/t/meaning-of-uu-vv-after-fespace-is-defined/2048)

<div class="topic-metadata">

**Author:** [@baezacaljo](https://community.freefem.org/u/baezacaljo)\
**Replies:** 2\
**Last updated:** [October 10, 2022, 12:26am UTC](https://community.freefem.org/t/meaning-of-uu-vv-after-fespace-is-defined/2048 "2022-10-10T00:26:47Z")

</div>

Hello everyone. Look probably this question was already asked before, (I am pretty sure it was), But I’ve been following the tutorials, however I have a question in the theory of elasticity. The fespace is defined the…

---

## [Confused about the results](https://community.freefem.org/t/confused-about-the-results/2045)

<div class="topic-metadata">

**Author:** [@zese](https://community.freefem.org/u/zese)\
**Replies:** 4\
**Last updated:** [October 7, 2022, 7:26pm UTC](https://community.freefem.org/t/confused-about-the-results/2045 "2022-10-07T19:26:50Z")

</div>

Dear all I have written the results at inlet boundary of label 1 and 2 based on the following two methods: method (1) fespace XXXMh(th,\[P2,P2,P2,P1\]); XXXMh \[u1x,u1r,u1phi,u1p\]; XXXMh \[v1x,v1r,v1phi…

---

## [Using P2 Finite elements to calculate P0 elements](https://community.freefem.org/t/using-p2-finite-elements-to-calculate-p0-elements/2046)

<div class="topic-metadata">

**Author:** [@Stefanosv](https://community.freefem.org/u/Stefanosv)\
**Replies:** 1\
**Last updated:** [October 7, 2022, 12:38pm UTC](https://community.freefem.org/t/using-p2-finite-elements-to-calculate-p0-elements/2046 "2022-10-07T12:38:05Z")

</div>

Using the Elasticity script to calculate the displacements I want to run some optimization loops. The variable I use to check my computations is a P0 element called dc. It needs to be a P0 element so later on I can reduc…

---

## [Export fespace variable to table/matrix](https://community.freefem.org/t/export-fespace-variable-to-table-matrix/2043)

<div class="topic-metadata">

**Author:** [@Stefanosv](https://community.freefem.org/u/Stefanosv)\
**Replies:** 1\
**Last updated:** [October 7, 2022, 10:26am UTC](https://community.freefem.org/t/export-fespace-variable-to-table-matrix/2043 "2022-10-07T10:26:46Z")

</div>

I have a mesh with 200 triangles. They represent a beam the size of 2010. Can I export a fespace variable in the form of a table the size of 2010. What I mean is I want to export a variable i.e. u(i,j) where i=1-20 j=1-…

---

## [About Array Calculation](https://community.freefem.org/t/about-array-calculation/2037)

<div class="topic-metadata">

**Author:** [@Yangshen](https://community.freefem.org/u/Yangshen)\
**Replies:** 3\
**Last updated:** [October 5, 2022, 1:59pm UTC](https://community.freefem.org/t/about-array-calculation/2037 "2022-10-05T13:59:24Z")

</div>

Deal all, In my example, I want to calculate e (uu, vv) '\* D \* e (uu, vv), but an error occurs. Here’s my code // Parameters real E = 21.5; real sigma = 0.29; real gravity = -0.05; // Mesh border a(t=2, 0){x=0; y…

---

## [Implement a force-free condition](https://community.freefem.org/t/implement-a-force-free-condition/2041)

<div class="topic-metadata">

**Author:** [@zhugp123](https://community.freefem.org/u/zhugp123)\
**Replies:** 2\
**Last updated:** [October 5, 2022, 8:54am UTC](https://community.freefem.org/t/implement-a-force-free-condition/2041 "2022-10-05T08:54:42Z")

</div>

I know how to solve the diffusion-convection equation for concentration and Stokes equation in FreeFem++, but I have no idea about implementing the force-free condition to obtain U. Can anyone give me some suggestions o…

---

## [Problem in 3D discontinuous Galerkin computation](https://community.freefem.org/t/problem-in-3d-discontinuous-galerkin-computation/2015)

<div class="topic-metadata">

**Author:** [@kallol](https://community.freefem.org/u/kallol)\
**Replies:** 5\
**Last updated:** [October 4, 2022, 12:17pm UTC](https://community.freefem.org/t/problem-in-3d-discontinuous-galerkin-computation/2015 "2022-10-04T12:17:11Z")

</div>

Dear all, I am trying to compute discontinuous Galerkin method in 3D and trying to compute a discrete solution at certain time level. But when I use jump or mean in intallfaces for the previous time level solution in th…

---

## [Delete arrays or free the memory allocated to them](https://community.freefem.org/t/delete-arrays-or-free-the-memory-allocated-to-them/2035)

<div class="topic-metadata">

**Author:** [@miguelpicos](https://community.freefem.org/u/miguelpicos)\
**Replies:** 2\
**Last updated:** [October 4, 2022, 6:02am UTC](https://community.freefem.org/t/delete-arrays-or-free-the-memory-allocated-to-them/2035 "2022-10-04T06:02:03Z")

</div>

is there some funtionality like delete in C? I am working with auxiliar arrays that once I use them i would like to free the memory allocated to them. Is there any way of doing this? Thank you,

---

## [Output of the solution of a assigned point](https://community.freefem.org/t/output-of-the-solution-of-a-assigned-point/2012)

<div class="topic-metadata">

**Author:** [@SHENG](https://community.freefem.org/u/SHENG)\
**Replies:** 24\
**Last updated:** [October 2, 2022, 7:37am UTC](https://community.freefem.org/t/output-of-the-solution-of-a-assigned-point/2012 "2022-10-02T07:37:54Z")

</div>

Dear all, How can i output the solution of a assigned point in a 3D mesh at the parallel computing by loading “PETSc”? Give me some advice,please. Thank you in advance. Best, Liu

---

## [Can FF + + solve the problem of multiple physical fields? For example, a piezoelectric composite plate structure](https://community.freefem.org/t/can-ff-solve-the-problem-of-multiple-physical-fields-for-example-a-piezoelectric-composite-plate-structure/1959)

<div class="topic-metadata">

**Author:** [@Yangshen](https://community.freefem.org/u/Yangshen)\
**Replies:** 4\
**Last updated:** [October 2, 2022, 7:27am UTC](https://community.freefem.org/t/can-ff-solve-the-problem-of-multiple-physical-fields-for-example-a-piezoelectric-composite-plate-structure/1959 "2022-10-02T07:27:53Z")

</div>

Hello everyone As shown in the figure, the top layer is piezoelectric material and the bottom layer is matrix. If an electric field is applied to the piezoelectric material, I don’t know how I can push to the weak fo…

---

## [Assign different materials (composites)](https://community.freefem.org/t/assign-different-materials-composites/2002)

<div class="topic-metadata">

**Author:** [@danmo](https://community.freefem.org/u/danmo)\
**Replies:** 7\
**Last updated:** [October 2, 2022, 5:46am UTC](https://community.freefem.org/t/assign-different-materials-composites/2002 "2022-10-02T05:46:03Z")

</div>

Hi, I want to simulate a composite material made of matrix (E1) and inclusion (E2). I am not sure how to assign two different material properties and integrate over the domain. Assume a classic elasticity problem…how c…

---

## [Exporting boundary value](https://community.freefem.org/t/exporting-boundary-value/2028)

<div class="topic-metadata">

**Author:** [@zese](https://community.freefem.org/u/zese)\
**Replies:** 3\
**Last updated:** [September 30, 2022, 8:35pm UTC](https://community.freefem.org/t/exporting-boundary-value/2028 "2022-09-30T20:35:45Z")

</div>

Dear all I want to export the boundary value of velocity, exact nodes on the boundary labrle 1 and 2. I wrote the following: int Nbtriangle=th.nbe; for (int k=0; k\<Nbtriangle; k++) { int L=th.be(k).label; if (L==1 …

---

## [About extracting Stiffness Matrix](https://community.freefem.org/t/about-extracting-stiffness-matrix/2023)

<div class="topic-metadata">

**Author:** [@Yangshen](https://community.freefem.org/u/Yangshen)\
**Replies:** 8\
**Last updated:** [September 30, 2022, 9:37am UTC](https://community.freefem.org/t/about-extracting-stiffness-matrix/2023 "2022-09-30T09:37:09Z")

</div>

Dear all， I want to use FreeFEM to implement 99 lines of code in topology optimization design. Code Reference： An 89-line code for geometrically nonlinear topology optimization written in FreeFEM | SpringerLink When e…

---

## [Equation for RT element](https://community.freefem.org/t/equation-for-rt-element/2032)

<div class="topic-metadata">

**Author:** [@larismartins](https://community.freefem.org/u/larismartins)\
**Replies:** 0\
**Last updated:** [September 29, 2022, 10:46pm UTC](https://community.freefem.org/t/equation-for-rt-element/2032 "2022-09-29T22:46:18Z")

</div>

Hello How do I represent this equation on FreeFem? \\lambda\_H is a real number.

---

## [Time fractional PDE](https://community.freefem.org/t/time-fractional-pde/2003)

<div class="topic-metadata">

**Author:** [@Deepika](https://community.freefem.org/u/Deepika)\
**Replies:** 2\
**Last updated:** [September 28, 2022, 8:56am UTC](https://community.freefem.org/t/time-fractional-pde/2003 "2022-09-28T08:56:49Z")

</div>

Hello, I want to solve this problem by FreeFEM for alpha = 0.6 in a unit square domain. Kindly share your suggestions. Thanks

---

## [Sorting out memory leakage](https://community.freefem.org/t/sorting-out-memory-leakage/1745)

<div class="topic-metadata">

**Author:** [@aszaboa](https://community.freefem.org/u/aszaboa)\
**Replies:** 21\
**Last updated:** [September 27, 2022, 1:03pm UTC](https://community.freefem.org/t/sorting-out-memory-leakage/1745 "2022-09-27T13:03:18Z")

</div>

Dear FreeFem users, I am conducting a parameter study in which I call PEPSolve about a thousand times inside a double for loop. Oddly, as a computation proceeds, more and more RAM is used by the program, which is surpri…

---

## [Transpose of matrix](https://community.freefem.org/t/transpose-of-matrix/2027)

<div class="topic-metadata">

**Author:** [@Yangshen](https://community.freefem.org/u/Yangshen)\
**Replies:** 2\
**Last updated:** [September 27, 2022, 9:11am UTC](https://community.freefem.org/t/transpose-of-matrix/2027 "2022-09-27T09:11:33Z")

</div>

Dear all About the following example. https://modules.freefem.org/modules/elasticity/ After I get \[ux, uy\], I want to get \[ux, uy\] \* \[ux, uy\] '. So I entered the following code, but it didn’t seem to work. sens = \[u…

---

## [How can we print (plot,show) coordinate values to the corners of the mesh?](https://community.freefem.org/t/how-can-we-print-plot-show-coordinate-values-to-the-corners-of-the-mesh/2025)

<div class="topic-metadata">

**Author:** [@mhy622](https://community.freefem.org/u/mhy622)\
**Replies:** 2\
**Last updated:** [September 26, 2022, 5:49pm UTC](https://community.freefem.org/t/how-can-we-print-plot-show-coordinate-values-to-the-corners-of-the-mesh/2025 "2022-09-26T17:49:31Z")

</div>

Hello all, I would like to name the corners of the mesh and print something (point name or coordinates) like the image below (marked yellow). Is it possible? How can I do that? Thank you. 1 // Parameters 2 real er…

---

## [About stiffness martix](https://community.freefem.org/t/about-stiffness-martix/2022)

<div class="topic-metadata">

**Author:** [@Yangshen](https://community.freefem.org/u/Yangshen)\
**Replies:** 1\
**Last updated:** [September 24, 2022, 5:56am UTC](https://community.freefem.org/t/about-stiffness-martix/2022 "2022-09-24T05:56:40Z")

</div>

Dear all, I used the following code to extract the stiffness matrix of the grid as shown in the figure, with the left boundary fixed. The structure is relatively simple. The stiffness matrix can be pushed manually. …

---

## [Add a spatial parameter field](https://community.freefem.org/t/add-a-spatial-parameter-field/1997)

<div class="topic-metadata">

**Author:** [@mchetoui](https://community.freefem.org/u/mchetoui)\
**Replies:** 5\
**Last updated:** [September 23, 2022, 8:39am UTC](https://community.freefem.org/t/add-a-spatial-parameter-field/1997 "2022-09-23T08:39:37Z")

</div>

Hello everyone, I have to use a spatial distribution to define a parameter of my equation. For example for a 2D Darcy equation, the permeability is not constant, it is defined in a text file according to the spatial coo…

---

## [Circle resolution/approximation](https://community.freefem.org/t/circle-resolution-approximation/2017)

<div class="topic-metadata">

**Author:** [@xanfus](https://community.freefem.org/u/xanfus)\
**Replies:** 3\
**Last updated:** [September 22, 2022, 5:19am UTC](https://community.freefem.org/t/circle-resolution-approximation/2017 "2022-09-22T05:19:24Z")

</div>

My mesh is dense, but circle boundary doesn’t correspond to mesh by resolution. Can circle boundary be more round?

---

## [Problem on adding two arrays](https://community.freefem.org/t/problem-on-adding-two-arrays/2001)

<div class="topic-metadata">

**Author:** [@hezl09](https://community.freefem.org/u/hezl09)\
**Replies:** 1\
**Last updated:** [September 20, 2022, 4:01pm UTC](https://community.freefem.org/t/problem-on-adding-two-arrays/2001 "2022-09-20T16:01:42Z")

</div>

Hello everyone, I have a question on adding two arrays together, illustrating using the following code. real\[int\] vec1(2), vec2(2), vec3(2); vec1 = 1.; vec2 = 2.; vec3 = 2\*(vec1+vec2); Then the code cannot run, w…

---

## [Data from \[P2,P2\]](https://community.freefem.org/t/data-from-p2-p2/2016)

<div class="topic-metadata">

**Author:** [@Stefanosv](https://community.freefem.org/u/Stefanosv)\
**Replies:** 2\
**Last updated:** [September 20, 2022, 3:20pm UTC](https://community.freefem.org/t/data-from-p2-p2/2016 "2022-09-20T15:20:47Z")

</div>

Hello, I think I have something misunderstood about \[P2,P2\] fespaces I have the following fespace that I use on an elasticity problem fespace Vh(th, \[P2,P2\]); Vh \[ux, uy\], \[w, s\]; To extract the displacement on the …

---

## [Supply PETSc numbering for shared-memory block matrix](https://community.freefem.org/t/supply-petsc-numbering-for-shared-memory-block-matrix/486)

<div class="topic-metadata">

**Author:** [@cmd](https://community.freefem.org/u/cmd)\
**Replies:** 30\
**Last updated:** [September 19, 2022, 12:43pm UTC](https://community.freefem.org/t/supply-petsc-numbering-for-shared-memory-block-matrix/486 "2022-09-19T12:43:35Z")

</div>

Hello FreeFEM developers, I have a multiphysics problem which results in a 9x9 block matrix system. Each of these blocks is itself composed of several small sub-blocks which correspond to different meshes and physics. C…

---

## [Spline Interpolation](https://community.freefem.org/t/spline-interpolation/1948)

<div class="topic-metadata">

**Author:** [@Qianrui](https://community.freefem.org/u/Qianrui)\
**Replies:** 4\
**Last updated:** [September 17, 2022, 3:36am UTC](https://community.freefem.org/t/spline-interpolation/1948 "2022-09-17T03:36:00Z")

</div>

Hello, can freefem + + use spline interpolation？ :smiley:

---

## [About Grid Node Numbering](https://community.freefem.org/t/about-grid-node-numbering/2009)

<div class="topic-metadata">

**Author:** [@Yangshen](https://community.freefem.org/u/Yangshen)\
**Replies:** 2\
**Last updated:** [September 16, 2022, 1:11am UTC](https://community.freefem.org/t/about-grid-node-numbering/2009 "2022-09-16T01:11:53Z")

</div>

Hello everyone, Whether the node number can be displayed on the grid graph？ As shown in the figure below, the number of each node can be seen in this figure.

---

## [Switch statement from C](https://community.freefem.org/t/switch-statement-from-c/2005)

<div class="topic-metadata">

**Author:** [@miguelpicos](https://community.freefem.org/u/miguelpicos)\
**Replies:** 1\
**Last updated:** [September 14, 2022, 1:48pm UTC](https://community.freefem.org/t/switch-statement-from-c/2005 "2022-09-14T13:48:12Z")

</div>

I would like to use the switch-case statement in a FreeFEM code. As it is based on C I supose that I should be able to use it, but the compiler does not recognize the sintax. ¿Is this sintax not suported by FreeFEM? ¿Is …

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

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