# General Discussion

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

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

**Page:** 43

---

## [Is there any way in freefem, we can implement rotation boundary condition](https://community.freefem.org/t/is-there-any-way-in-freefem-we-can-implement-rotation-boundary-condition/1947)

<div class="topic-metadata">

**Author:** [@zcwang6](https://community.freefem.org/u/zcwang6)\
**Replies:** 6\
**Last updated:** [August 22, 2022, 12:42pm UTC](https://community.freefem.org/t/is-there-any-way-in-freefem-we-can-implement-rotation-boundary-condition/1947 "2022-08-22T12:42:16Z")

</div>

Dear FreeFem++ team, I know in the PDE, we can do on(Label,ux=0,uy=0) to apply the boundary condition to close the displacement . However, I was wondering how can we constrain a disc displacement (ux, uy) at its center w…

---

## [Get global stiffness matrix from freefem](https://community.freefem.org/t/get-global-stiffness-matrix-from-freefem/1161)

<div class="topic-metadata">

**Author:** [@distractor](https://community.freefem.org/u/distractor)\
**Replies:** 2\
**Last updated:** [August 22, 2022, 10:16am UTC](https://community.freefem.org/t/get-global-stiffness-matrix-from-freefem/1161 "2022-08-22T10:16:26Z")

</div>

Hi, So I am working on some plasticity computations in FreeFem++, and I would need to obtain the global stiffness matrix for some other calculations. I am referring to stiffness matrix of the form for a single fi…

---

## [Savevtk for meshS and hpddm](https://community.freefem.org/t/savevtk-for-meshs-and-hpddm/1949)

<div class="topic-metadata">

**Author:** [@julienG](https://community.freefem.org/u/julienG)\
**Replies:** 1\
**Last updated:** [August 20, 2022, 5:00am UTC](https://community.freefem.org/t/savevtk-for-meshs-and-hpddm/1949 "2022-08-20T05:00:02Z")

</div>

Dear all, It seems that savevtk does not work for meshS type with hpddm… See for example: macro dimension()3S// EOM macro def(u)u// EOM func Pk = P2; include “macro\_ddm.idp”; load “hpddm”; // mesh Th0 = square(…

---

## [TetGen for Adaptation using residual error indicator](https://community.freefem.org/t/tetgen-for-adaptation-using-residual-error-indicator/1751)

<div class="topic-metadata">

**Author:** [@Curiin](https://community.freefem.org/u/Curiin)\
**Replies:** 30\
**Last updated:** [August 17, 2022, 7:27pm UTC](https://community.freefem.org/t/tetgen-for-adaptation-using-residual-error-indicator/1751 "2022-08-17T19:27:37Z")

</div>

Hi everyone, I am trying to implement something similar to “Adaptation using residual error indicator” but in 3D. Since to my understanding adaptmesh does not work in 3D, I tried to use tetgreconstruction from TetGen i…

---

## [Delete and Change Boundary Labels](https://community.freefem.org/t/delete-and-change-boundary-labels/1945)

<div class="topic-metadata">

**Author:** [@Curiin](https://community.freefem.org/u/Curiin)\
**Replies:** 5\
**Last updated:** [August 17, 2022, 7:23pm UTC](https://community.freefem.org/t/delete-and-change-boundary-labels/1945 "2022-08-17T19:23:32Z")

</div>

Hi there again :slight\_smile: I have a 3D mesh which I refine using parmmg3d. After this refinement, the labels are messed up. In places where I’ve had label 1 before, it has something else and where the mesh was split …

---

## [Plot clipping ffmatlib](https://community.freefem.org/t/plot-clipping-ffmatlib/1930)

<div class="topic-metadata">

**Author:** [@Curiin](https://community.freefem.org/u/Curiin)\
**Replies:** 1\
**Last updated:** [August 17, 2022, 5:44pm UTC](https://community.freefem.org/t/plot-clipping-ffmatlib/1930 "2022-08-17T17:44:30Z")

</div>

Hi again! Sorry to be bugging you all again, but I’ve got another question, this time regarding ffmatlib. I would like to generate (and save) a plot in Matlab using ffmatlib displaying my function using colours on a 3D…

---

## [Strange behavior in the BEM solution of the Laplace equation](https://community.freefem.org/t/strange-behavior-in-the-bem-solution-of-the-laplace-equation/1938)

<div class="topic-metadata">

**Author:** [@mpanine](https://community.freefem.org/u/mpanine)\
**Replies:** 12\
**Last updated:** [August 17, 2022, 3:37pm UTC](https://community.freefem.org/t/strange-behavior-in-the-bem-solution-of-the-laplace-equation/1938 "2022-08-17T15:37:31Z")

</div>

Preface: I cannot currently attach my code as I am a new user. I will provide the code when this restriction is lifted. I am trying to use the boundary element method (BEMTool) interfaced with FreeFem to solve the 2d La…

---

## [How to write a medit ".mesh" file with tetrahedron labels and import them as a function in FF?](https://community.freefem.org/t/how-to-write-a-medit-mesh-file-with-tetrahedron-labels-and-import-them-as-a-function-in-ff/1926)

<div class="topic-metadata">

**Author:** [@Mathias-Fuchs](https://community.freefem.org/u/Mathias-Fuchs)\
**Replies:** 3\
**Last updated:** [August 10, 2022, 12:00pm UTC](https://community.freefem.org/t/how-to-write-a-medit-mesh-file-with-tetrahedron-labels-and-import-them-as-a-function-in-ff/1926 "2022-08-10T12:00:39Z")

</div>

Hello there, this seems like an obvious task to do but I can’t seem to find the obvious way to do it. I have a tetrahedron mesh which I’m happily exporting to the “.medit” file format with .mesh extension - in readable…

---

## [Mmg3d generates anisotropic meshes](https://community.freefem.org/t/mmg3d-generates-anisotropic-meshes/1932)

<div class="topic-metadata">

**Author:** [@wanglongfei](https://community.freefem.org/u/wanglongfei)\
**Replies:** 8\
**Last updated:** [August 13, 2022, 5:59am UTC](https://community.freefem.org/t/mmg3d-generates-anisotropic-meshes/1932 "2022-08-13T05:59:28Z")

</div>

Hello I’m sorry to bother you again. I generated 3D anisotropic meshes with my own metrics and mmg3d. I found that the tetrahedron segmentation speed is too fast. How does mmg3d control the number of tetrahedrons? I tri…

---

## [Second derivative of numerical solution](https://community.freefem.org/t/second-derivative-of-numerical-solution/1937)

<div class="topic-metadata">

**Author:** [@wanglongfei](https://community.freefem.org/u/wanglongfei)\
**Replies:** 11\
**Last updated:** [August 13, 2022, 5:54am UTC](https://community.freefem.org/t/second-derivative-of-numerical-solution/1937 "2022-08-13T05:54:16Z")

</div>

Hello I’m sorry to bother you. How does freeem + + calculate the Second derivative of numerical solution? Thank you very much.

---

## [Applying several BC to a boundary](https://community.freefem.org/t/applying-several-bc-to-a-boundary/1940)

<div class="topic-metadata">

**Author:** [@mahdi](https://community.freefem.org/u/mahdi)\
**Replies:** 1\
**Last updated:** [August 12, 2022, 11:53am UTC](https://community.freefem.org/t/applying-several-bc-to-a-boundary/1940 "2022-08-12T11:53:27Z")

</div>

Hi there; I wonder if anyone can help me find out how I can apply several derivatives in a boundary; in a 1D problem \\frac{\\partial \\phi}{\\partial x}=\\alpha \\frac{\\partial^2 \\phi}{\\partial x^2}=\\beta \\frac{\\partial^3…

---

## [Error while loop on Eigenvalue Problem](https://community.freefem.org/t/error-while-loop-on-eigenvalue-problem/1939)

<div class="topic-metadata">

**Author:** [@Carina](https://community.freefem.org/u/Carina)\
**Replies:** 1\
**Last updated:** [August 12, 2022, 11:38am UTC](https://community.freefem.org/t/error-while-loop-on-eigenvalue-problem/1939 "2022-08-12T11:38:31Z")

</div>

Hi there, I try to solve a Eigenvalue problem on a loop with coarser mesh on each step. It works perfectly fine with the Element “P1nc”, but when I use the Element “P3” for example, I get the error current line = 37 …

---

## [Error loading complex PETSc, SLEPc Library](https://community.freefem.org/t/error-loading-complex-petsc-slepc-library/370)

<div class="topic-metadata">

**Author:** [@meindonut](https://community.freefem.org/u/meindonut)\
**Replies:** 16\
**Last updated:** [August 11, 2022, 7:16am UTC](https://community.freefem.org/t/error-loading-complex-petsc-slepc-library/370 "2022-08-11T07:16:35Z")

</div>

Hi, i’ve installed the newest Windows binarys and im not able to run complex PETSc examples because FreeFem can’t load PETSc-complex.dll even though the file exists. I have no problems with normal PETS examples. Log: …

---

## [Error between numerical solution and exact solution](https://community.freefem.org/t/error-between-numerical-solution-and-exact-solution/1935)

<div class="topic-metadata">

**Author:** [@Qianrui](https://community.freefem.org/u/Qianrui)\
**Replies:** 2\
**Last updated:** [August 10, 2022, 3:32am UTC](https://community.freefem.org/t/error-between-numerical-solution-and-exact-solution/1935 "2022-08-10T03:32:49Z")

</div>

I calculated a one-dimensional KdV equation. Through grid refinement, i.e. the interval \[- 40,40\] was divided into 80，160，320，400 parts. However, the L2 error between the four numerical solutions obtained after refinemen…

---

## [The integral of functions defined on different meshes](https://community.freefem.org/t/the-integral-of-functions-defined-on-different-meshes/1933)

<div class="topic-metadata">

**Author:** [@Joanna](https://community.freefem.org/u/Joanna)\
**Replies:** 1\
**Last updated:** [August 8, 2022, 12:16pm UTC](https://community.freefem.org/t/the-integral-of-functions-defined-on-different-meshes/1933 "2022-08-08T12:16:22Z")

</div>

Hello, I have a small question if you could help me it would be great. I work on a problem which depends on time, and I do mesh adaptation according to a posteriori error indicators. In the variational formumation of …

---

## [Does func works on conditional clause?](https://community.freefem.org/t/does-func-works-on-conditional-clause/1934)

<div class="topic-metadata">

**Author:** [@larismartins](https://community.freefem.org/u/larismartins)\
**Replies:** 1\
**Last updated:** [August 8, 2022, 10:20am UTC](https://community.freefem.org/t/does-func-works-on-conditional-clause/1934 "2022-08-08T10:20:06Z")

</div>

Hello, I’m trying to do the following: int phiOrder = getARGV("-phiO", 1); int psiOrder = getARGV("-psiO", 1); load "Element\_P3" load "Element\_PkEdge" //polinomial order edge if(phiOrder == 0) func Pm = P0edge; if…

---

## [Two fespce combined computation](https://community.freefem.org/t/two-fespce-combined-computation/1413)

<div class="topic-metadata">

**Author:** [@xiaojiemo](https://community.freefem.org/u/xiaojiemo)\
**Replies:** 4\
**Last updated:** [August 6, 2022, 5:20pm UTC](https://community.freefem.org/t/two-fespce-combined-computation/1413 "2022-08-06T17:20:41Z")

</div>

hello,everyone, I am writing a code which includes two regions, porous region and solid particle.and each varaible need to computed separately. who can offer me such examples? Thanks

---

## [Find if a node is on a given border](https://community.freefem.org/t/find-if-a-node-is-on-a-given-border/1928)

<div class="topic-metadata">

**Author:** [@larismartins](https://community.freefem.org/u/larismartins)\
**Replies:** 4\
**Last updated:** [August 6, 2022, 2:08pm UTC](https://community.freefem.org/t/find-if-a-node-is-on-a-given-border/1928 "2022-08-06T14:08:16Z")

</div>

Hello, I’ve built a mesh using the border function border f0(t=0,1){P.x=nodes(1,0)\*t + nodes(0,0)\*(1-t);P.y=nodes(1,1)\*t + nodes(0,1)\*(1-t); label=11;}; border f1(t=0,1){P.x=nodes(2,0)\*t + nodes(1,0)\*(1-t);P.y=nodes(2…

---

## [Hat functions in product (vectorial) of fespace(s)](https://community.freefem.org/t/hat-functions-in-product-vectorial-of-fespace-s/1931)

<div class="topic-metadata">

**Author:** [@murea](https://community.freefem.org/u/murea)\
**Replies:** 0\
**Last updated:** [August 6, 2022, 12:08pm UTC](https://community.freefem.org/t/hat-functions-in-product-vectorial-of-fespace-s/1931 "2022-08-06T12:08:15Z")

</div>

Hi, mesh Th=square(2,2); fespace Wh(Th,P1b); fespace Mh(Th,P1); fespace Xh(Th,\[P1b,P1\]); If 0 \<= i \< Wh.ndof=17, and phi\_i is a hat function of Wh, then \[phi\_i,0\]=eta\_k is a hat function of Xh whre 0 \<= k \< Wh.nd…

---

## [1DKDV Galerkin finite elment method](https://community.freefem.org/t/1dkdv-galerkin-finite-elment-method/1924)

<div class="topic-metadata">

**Author:** [@Qianrui](https://community.freefem.org/u/Qianrui)\
**Replies:** 2\
**Last updated:** [August 5, 2022, 4:51am UTC](https://community.freefem.org/t/1dkdv-galerkin-finite-elment-method/1924 "2022-08-05T04:51:57Z")

</div>

Hello, I ran the following KdV program, but the error between the numerical solution and the exact solution is not quite right. The program is as follows DGKDV(n=1)07.27.edp (1.4 KB) 1dkdv mathematical model is as foll…

---

## [Applying periodic boundary conditions in computational homogenization method](https://community.freefem.org/t/applying-periodic-boundary-conditions-in-computational-homogenization-method/1251)

<div class="topic-metadata">

**Author:** [@chaimaa](https://community.freefem.org/u/chaimaa)\
**Replies:** 1\
**Last updated:** [August 3, 2022, 8:03pm UTC](https://community.freefem.org/t/applying-periodic-boundary-conditions-in-computational-homogenization-method/1251 "2022-08-03T20:03:06Z")

</div>

Hi, I want to apply this type of boundary on a cube : T= G\*x +t where the fluctuation t is periodic. It takes the same values at two homologous points on opposite faces of the boundaries of the elementary volume V, a…

---

## [Errors in determine circumference through levelset function](https://community.freefem.org/t/errors-in-determine-circumference-through-levelset-function/781)

<div class="topic-metadata">

**Author:** [@hezl09](https://community.freefem.org/u/hezl09)\
**Replies:** 3\
**Last updated:** [August 3, 2022, 1:43pm UTC](https://community.freefem.org/t/errors-in-determine-circumference-through-levelset-function/781 "2022-08-03T13:43:44Z")

</div>

Hi, can anyone help with my following question. I’m trying to get the circumference of an ellipse. I have the following mesh which have two domains. The correct circumference for my ellipse (a = 1.5, b = 1) should be c …

---

## [How to calculate energy norm in linear elasticity promblem?](https://community.freefem.org/t/how-to-calculate-energy-norm-in-linear-elasticity-promblem/1925)

<div class="topic-metadata">

**Author:** [@sosome](https://community.freefem.org/u/sosome)\
**Replies:** 1\
**Last updated:** [August 3, 2022, 12:25pm UTC](https://community.freefem.org/t/how-to-calculate-energy-norm-in-linear-elasticity-promblem/1925 "2022-08-03T12:25:22Z")

</div>

It is defined in terms of exact stress σ, computed stress σ^h, and coefficient matrix D written in Voigt notation as: //Parameters real Rho = 8000.; //Density real E = 210.e9; //Young modulus real Nu = 0.27; //Poi…

---

## [KSPMonitorSet and KSPMonitorCancel](https://community.freefem.org/t/kspmonitorset-and-kspmonitorcancel/1927)

<div class="topic-metadata">

**Author:** [@aszaboa](https://community.freefem.org/u/aszaboa)\
**Replies:** 2\
**Last updated:** [August 3, 2022, 7:42am UTC](https://community.freefem.org/t/kspmonitorset-and-kspmonitorcancel/1927 "2022-08-03T07:42:14Z")

</div>

Dear FreeFem users, I would like to try out PCSHELL and MatShell (using func in FreeFem) to accelerate the solution of my problem. Everything seems to work as I wanted except for monitoring the solution. I want to monit…

---

## [Obtaining the eigenvector from EPSSolve](https://community.freefem.org/t/obtaining-the-eigenvector-from-epssolve/1917)

<div class="topic-metadata">

**Author:** [@MAS-OUD](https://community.freefem.org/u/MAS-OUD)\
**Replies:** 6\
**Last updated:** [July 30, 2022, 10:02am UTC](https://community.freefem.org/t/obtaining-the-eigenvector-from-epssolve/1917 "2022-07-30T10:02:56Z")

</div>

I’m able to solve an eigenvalue problem using EPSSolve, but I’m having trouble obtaining the calculated eigenvector and printing it on the screen. In the following code, how could I store the computed eigenvector in my e…

---

## [Matrix ^-1 \* matrix](https://community.freefem.org/t/matrix-1-matrix/1913)

<div class="topic-metadata">

**Author:** [@murea](https://community.freefem.org/u/murea)\
**Replies:** 4\
**Last updated:** [July 29, 2022, 2:40pm UTC](https://community.freefem.org/t/matrix-1-matrix/1913 "2022-07-29T14:40:04Z")

</div>

Hallo, In order to compute the hessienne matrix for IPOPT, I want to compute BB1’ \* AA^-1 \* BB1 where matrix AA=StokesForces3(Xh,Xh,solver=sparsesolver); matrix BB1=bb1(Mh,Xh); If I try matrix HJ2; HJ2=AA^-1 \* B…

---

## [How obtain a '1D' element from a 2D element through integrating out second variable](https://community.freefem.org/t/how-obtain-a-1d-element-from-a-2d-element-through-integrating-out-second-variable/1918)

<div class="topic-metadata">

**Author:** [@Neutrino](https://community.freefem.org/u/Neutrino)\
**Replies:** 1\
**Last updated:** [July 29, 2022, 11:47am UTC](https://community.freefem.org/t/how-obtain-a-1d-element-from-a-2d-element-through-integrating-out-second-variable/1918 "2022-07-29T11:47:46Z")

</div>

Say that I have a finite element u on the square \[0,L\_1\]\\times\[0,L\_2\] and I want a new element \\widetilde{u} with the property that for each x\\in\[0,L\_1\] I have \\widetilde{u}(x,y) = \\frac{1}{L\_2}\\int\_0^{L\_2} u(x,y)dy …

---

## [Example of fractional differential based model](https://community.freefem.org/t/example-of-fractional-differential-based-model/1904)

<div class="topic-metadata">

**Author:** [@sumantkr](https://community.freefem.org/u/sumantkr)\
**Replies:** 2\
**Last updated:** [July 28, 2022, 10:15am UTC](https://community.freefem.org/t/example-of-fractional-differential-based-model/1904 "2022-07-28T10:15:57Z")

</div>

Hii Everyone, Can we solve fractional differential-based models using FreeFEM !!!

---

## [Implementing a non-constant stabilized parameter](https://community.freefem.org/t/implementing-a-non-constant-stabilized-parameter/1869)

<div class="topic-metadata">

**Author:** [@ramrebol](https://community.freefem.org/u/ramrebol)\
**Replies:** 3\
**Last updated:** [July 27, 2022, 4:09pm UTC](https://community.freefem.org/t/implementing-a-non-constant-stabilized-parameter/1869 "2022-07-27T16:09:29Z")

</div>

Hello. I’m starting with FreeFem, so sorry if my question is too simple, or if this is not the right place to ask something like this. But I haven’t found the answer in the tutorials. I’m implementing a code to solve th…

---

## [How to assign data only on the edges of a 3D mesh](https://community.freefem.org/t/how-to-assign-data-only-on-the-edges-of-a-3d-mesh/1906)

<div class="topic-metadata">

**Author:** [@zcwang6](https://community.freefem.org/u/zcwang6)\
**Replies:** 8\
**Last updated:** [July 27, 2022, 3:43pm UTC](https://community.freefem.org/t/how-to-assign-data-only-on-the-edges-of-a-3d-mesh/1906 "2022-07-27T15:43:07Z")

</div>

Dear Freefem team, I hope all of you doing great. I was wondering if there is any way I can only give a number to the points on the edges of a 3D mesh. I noticed that ,in Freefem, we can use ThS= Th.gamma to get the surf…

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

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