# mesh of a right paving stone and a cube

**URL:** <https://community.freefem.org/t/mesh-of-a-right-paving-stone-and-a-cube/2394>\
**Category:** General Discussion\
**Created:** [April 13, 2023, 12:04pm UTC](https://community.freefem.org/t/mesh-of-a-right-paving-stone-and-a-cube/2394 "2023-04-13T12:04:44Z")\
**Posts on this page:** 18\
**Page:** 3

<div class="post-metadata">

**Author:** ![aweni](https://avatars.discourse-cdn.com/v4/letter/a/db5fbb/32.png) [@aweni](https://community.freefem.org/u/aweni)\
**Post date:** [May 4, 2023, 2:50pm UTC](https://community.freefem.org/t/mesh-of-a-right-paving-stone-and-a-cube/2394/41 "2023-05-04T14:50:34Z")

</div>

I currently use freefem++3.6 and with it I can generate a .txt file that I run with the gnuplot software.  
And there I see that the curve drawn decreases exponentially.

---

<div class="post-metadata">

**Author:** ![aweni](https://avatars.discourse-cdn.com/v4/letter/a/db5fbb/32.png) [@aweni](https://community.freefem.org/u/aweni)\
**Post date:** [May 4, 2023, 4:08pm UTC](https://community.freefem.org/t/mesh-of-a-right-paving-stone-and-a-cube/2394/42 "2023-05-04T16:08:36Z")

</div>

Yes, well, in my point of view.  
My theory said that Energy decreases exponentially.

---

<div class="post-metadata">

**Author:** ![aweni](https://avatars.discourse-cdn.com/v4/letter/a/db5fbb/32.png) [@aweni](https://community.freefem.org/u/aweni)\
**Post date:** [May 4, 2023, 4:44pm UTC](https://community.freefem.org/t/mesh-of-a-right-paving-stone-and-a-cube/2394/43 "2023-05-04T16:44:08Z")

</div>

Please How can i define the maximum absolute error (linifinality) for vector functions?

---

<div class="post-metadata">

**Author:** ![marchywka](https://avatars.discourse-cdn.com/v4/letter/m/ee59a6/32.png) [@marchywka](https://community.freefem.org/u/marchywka)\
**Post date:** [May 4, 2023, 5:34pm UTC](https://community.freefem.org/t/mesh-of-a-right-paving-stone-and-a-cube/2394/44 "2023-05-04T17:34:17Z")

</div>

You really need to look through more examples probably.  
I’m just curious if my solving code was right. Most of the other stuff will make  
sense on a little reflection.

Vectors can be tricky if the components have different weights or units.  
I guess just taking the max magnitude of the difference would work.

---

<div class="post-metadata">

**Author:** ![aweni](https://avatars.discourse-cdn.com/v4/letter/a/db5fbb/32.png) [@aweni](https://community.freefem.org/u/aweni)\
**Post date:** [May 4, 2023, 7:10pm UTC](https://community.freefem.org/t/mesh-of-a-right-paving-stone-and-a-cube/2394/45 "2023-05-04T19:10:18Z")

</div>

Good evening Professor.  
Good evening to all  
I did the same thing for this equation system.  
Here the solution is a vector function.  
Here is the .edp file  
I hope for your corrections and comments.  
Thanks in advance.

\begin{equation}  
\left{  
\begin{array}{lll}  
\frac{1}{\mu\_1} ~rot~ rot ~\mathbf{ A} = 0 & \mbox{in}& \Omega \times [0,T]\\  
rot ~\mathbf{ A} \wedge \mathbf{ n} = -|rot \mathbf{A}|^2\_{L^2} \mathbf{A} &\mbox{on}& \Sigma\_N \\  
\mathbf{A}=0 &\mbox{on}& \Sigma\_D  
\end{array}  
\right.  
\end{equation}  
%  
\paragraph{ }

\Omega ouvert borné de \mathbb{R}^3.  
 \mathbf{A} \in (H(rot))^3 is vector function.\  
The variationnal formulation is:

\frac{1}{\mu\_1} \displaystyle\int\_\Omega rot ~ \mathbf{A}\cdot rot~ \tilde{\mathbf{A}}~ =~ -\|rot \mathbf{A}\|^2\_{L^2} \displaystyle\int\_{\Gamma\_N} \mathbf{A} \cdot \tilde{\mathbf{A}}

[edp.edp](https://community.freefem.org/uploads/short-url/DyrqyOrXRXA1zfHUJZHaKeLTtZ.edp) (2.68 KB)

---

<div class="post-metadata">

**Author:** ![marchywka](https://avatars.discourse-cdn.com/v4/letter/m/ee59a6/32.png) [@marchywka](https://community.freefem.org/u/marchywka)\
**Post date:** [May 4, 2023, 11:00pm UTC](https://community.freefem.org/t/mesh-of-a-right-paving-stone-and-a-cube/2394/46 "2023-05-04T23:00:29Z")

</div>

I will try to look at this tomorrow but Iwas curious if this started out as soemthing  
like rot(rot(E)) - E\*conj(E) j omega J ; with J being a sheet current on the bottom  
surface? Is there a factor of i floating around and is E divergence free? Not  
sure if there are any materials properties that vary making the intergration by  
parts more complicated and if the identity to the vector laplacian has any  
benefits or drawbacks.

---

<div class="post-metadata">

**Author:** ![aweni](https://avatars.discourse-cdn.com/v4/letter/a/db5fbb/32.png) [@aweni](https://community.freefem.org/u/aweni)\
**Post date:** [May 5, 2023, 9:46am UTC](https://community.freefem.org/t/mesh-of-a-right-paving-stone-and-a-cube/2394/47 "2023-05-05T09:46:48Z")

</div>

it is an evolution of the magnetic field I took just the static case

---

<div class="post-metadata">

**Author:** ![marchywka](https://avatars.discourse-cdn.com/v4/letter/m/ee59a6/32.png) [@marchywka](https://community.freefem.org/u/marchywka)\
**Post date:** [May 5, 2023, 11:56am UTC](https://community.freefem.org/t/mesh-of-a-right-paving-stone-and-a-cube/2394/48 "2023-05-05T11:56:58Z")

</div>

As written it looks like zero is a good result which is what happens if you  
increase your grid density - I used nx=ny=nz=10.

Were you trying to get some other answer? Is the surface value fixed or something?

---

<div class="post-metadata">

**Author:** ![aweni](https://avatars.discourse-cdn.com/v4/letter/a/db5fbb/32.png) [@aweni](https://community.freefem.org/u/aweni)\
**Post date:** [May 5, 2023, 12:19pm UTC](https://community.freefem.org/t/mesh-of-a-right-paving-stone-and-a-cube/2394/49 "2023-05-05T12:19:31Z")

</div>

The value of the area is not fixed.  
I just took an example.  
Is my way of defining the error err= un1  
is correct?

---

<div class="post-metadata">

**Author:** ![marchywka](https://avatars.discourse-cdn.com/v4/letter/m/ee59a6/32.png) [@marchywka](https://community.freefem.org/u/marchywka)\
**Post date:** [May 5, 2023, 12:54pm UTC](https://community.freefem.org/t/mesh-of-a-right-paving-stone-and-a-cube/2394/50 "2023-05-05T12:54:02Z")

</div>

Error metrics are more of art than science 🙂 I guess I would  
say that I’ve had a lot of issues understanding the ways to  
deal with vector fespaces. I guess I would check some sizes,  
u.n and do some other sanity checks just to become familiar with  
the meanings of the FF code.

Still, I don’t see a forcing function or anything to prevent  
a zero solution. I guess if you do some fixed point / self consistent  
iteration maybe you could find a non-zero solution but how do  
expect to get there? If div(A)==0, AFACIT you have  
-laplacian(A)= |int3d(rot(A) dot rot(A)) A.

---

<div class="post-metadata">

**Author:** ![aweni](https://avatars.discourse-cdn.com/v4/letter/a/db5fbb/32.png) [@aweni](https://community.freefem.org/u/aweni)\
**Post date:** [May 5, 2023, 1:45pm UTC](https://community.freefem.org/t/mesh-of-a-right-paving-stone-and-a-cube/2394/51 "2023-05-05T13:45:46Z")

</div>

when I implement the evolution problem this is what I get.

where the fixed point method does not converge

– Build Nodes/DF on mesh : n.v. 24, n. elmt. 30, n b. elmt. 44  
nb of Nodes 75 nb of DoF 75 DFon=0100  
– FESpace: Nb of Nodes 75 Nb of DoF 75  
– FESpace: Nb of Nodes 24 Nb of DoF 72  
– FESpace: Nb of Nodes 24 Nb of DoF 24  
– Build Nodes/DF on mesh : n.v. 24, n. elmt. 30, n b. elmt. 44  
nb of Nodes 99 nb of DoF 465 DFon=10300  
– Solve :  
min -1.71564e-027 max 1.4276e+007  
min -0.975333 max 0.51875  
min -1.45476e+011 max -4.58353e+010  
min -4e+006 max 3.14952e+006  
min -2.90952e+013 max -9.16705e+012  
min -8e+008 max 6.29904e+008  
min -8.43568e-028 max 9.94656e-028  
0 ENERGIE 5.62035e-017 err = 7.2738e+008  
– Solve :  
min -1.18077e+009 max 1  
min -29561.6 max 26269.1  
min -9.61894e+010 max 1.45476e+011  
min -3.14952e+006 max 4e+006  
min 1.21114e+013 max 8.72856e+013  
min -1.88971e+009 max 2.4e+009  
min -1.51847e-025 max 1.7034e-025  
1 ENERGIE 1.62877e+011 err = 1.19455e+009  
– Solve :  
min -6.57424e+012 max 8.15231e+012  
min -54149.9 max 32620.1  
min -4.59652e+014 max 1.73209e+015  
min -7.54704e+006 max 1.33138e+007  
min -3.41063e+017 max 3.11247e+017  
min -3.6456e+009 max 3.82766e+009  
min -4.41425e-022 max 3.38377e-022  
2 ENERGIE 1.03994e+015 err = 8.15261e+012  
– Solve :  
min -1.64464e+015 max 8.15356e+014  
min -1.40366e+009 max 3.12579e+008  
min -2.26348e+013 max 2.95305e+013  
min -2.26779e+011 max 9.15676e+010  
min -1.08668e+020 max 2.1298e+020  
min -6.79346e+014 max 4.46508e+013  
min -7.90645e-020 max 2.31968e-020  
3 ENERGIE 3.6604e+022 err = 1.64456e+015  
– Solve :  
min -1.6437e+015 max 8.86668e+014  
min -4.29581e+010 max 1.44262e+010  
min -5.67108e+008 max 7.7429e+008  
min -5.9711e+012 max 1.91591e+012  
min -2.16891e+020 max 1.15359e+020  
min -8.98396e+015 max 2.51346e+015  
min -3.91314e-020 max 2.92578e-020  
4 ENERGIE 3.28325e+026 err = 7.13123e+013  
– Solve :  
min -1.6437e+015 max 8.86668e+014  
min -3.7694e+011 max 2.10747e+012  
min -2786.63 max 2223.46  
min -1.92009e+014 max 3.09468e+014  
min -1.15359e+020 max 2.16891e+020  
min -6.67084e+017 max 6.23891e+016  
min -2.79905e-020 max 2.92697e-020  
5 ENERGIE 6.83905e+026 err = 1.3282e+009  
– Solve :  
min -1.6437e+015 max 8.86668e+014  
min -9.88204e+011 max 5.20688e+012  
min -0.000251871 max 0.000124458  
min -6.88325e+014 max 3.39197e+014  
min -2.16891e+020 max 1.15359e+020  
min -8.66066e+016 max 9.49683e+017  
min -2.79905e-020 max 2.92697e-020  
6 ENERGIE 6.92766e+029 err = 3.44026e+006  
– Solve :  
min -1.6437e+015 max 8.86668e+014  
min -1.49139e+015 max 1.96442e+015  
min -0.00285194 max 0.0022221  
min -6.91322e+017 max 4.59869e+017  
min -1.15359e+020 max 2.16891e+020  
min -1.3653e+021 max 2.05069e+020  
min -2.79905e-020 max 2.92697e-020  
7 ENERGIE 3.5806e+030 err = 4.35546e+007  
– Solve :  
min -1.6437e+015 max 8.86668e+014  
min -2.41882e+016 max 2.9685e+016  
min -5.31298e-012 max 6.41931e-012  
min -3.45531e+014 max 5.48897e+013  
min -2.16891e+020 max 1.15359e+020  
min -6.56342e+020 max 9.8171e+021  
min -2.79905e-020 max 2.92697e-020  
8 ENERGIE 9.42146e+035 err = 63182.8  
– Solve :  
min -1.6437e+015 max 8.86668e+014  
min -1.12619e+021 max 1.38374e+021  
min -2.33956e-010 max 1.87048e-010  
min -1.28148e+017 max 4.23826e+016  
min -1.15359e+020 max 2.16891e+020  
min -5.85554e+026 max 1.16752e+026  
min -2.79905e-020 max 2.92697e-020  
9 ENERGIE 1.50944e+038 err = 1.40811e+007  
– Solve :  
min -1.6437e+015 max 8.86668e+014  
min -8.08008e+023 max 9.93891e+023  
min -4.173e-025 max 3.38333e-025  
min -9.91323e+009 max 7.49105e+009  
min -2.16891e+020 max 1.15359e+020  
min -1.06673e+029 max 1.01357e+029  
min -2.79905e-020 max 2.92697e-020  
10 ENERGIE 6.00013e+047 err = 2345.77  
– Solve :  
min -1.#IND max -1.#IND  
min 1.#INF max 1.#INF  
min -1.#IND max -1.#IND  
min -1.#INF max -1.#INF  
min -1.#IND max -1.#IND  
min -1.#IND max -1.#IND  
min -1.#IND max -1.#IND  
11 ENERGIE 1.75086e+053 err = 1.#QNAN  
-1.#IND != -1.#IND =\> Sorry error in Optimization (a) add: int2d(Th,optimize=0)(…)  
current line = 153  
Exec error : In Optimized version  
– number :1  
Exec error : In Optimized version  
– number :1  
err code 7 , mpirank 0  
FreeFem++ returned error 7

---

<div class="post-metadata">

**Author:** ![marchywka](https://avatars.discourse-cdn.com/v4/letter/m/ee59a6/32.png) [@marchywka](https://community.freefem.org/u/marchywka)\
**Post date:** [May 5, 2023, 2:01pm UTC](https://community.freefem.org/t/mesh-of-a-right-paving-stone-and-a-cube/2394/52 "2023-05-05T14:01:14Z")

</div>

did you post the code as attach?

---

<div class="post-metadata">

**Author:** ![marchywka](https://avatars.discourse-cdn.com/v4/letter/m/ee59a6/32.png) [@marchywka](https://community.freefem.org/u/marchywka)\
**Post date:** [May 5, 2023, 6:31pm UTC](https://community.freefem.org/t/mesh-of-a-right-paving-stone-and-a-cube/2394/53 "2023-05-05T18:31:40Z")

</div>

I guess if you think the solver is having problems and can’t identify a coding issue  
you can look at the equation.  
If you extend the RHS into the volume, and convert rot()rot() into a vector  
laplacian ( assuming constant divergence of A ) it looks like  
you can put in a plane wave solution ( or exponential depending on the actual  
sign ) For example, A\_y=aSin(kx) both terms end up with a k^2  
factor but the amplitude is fixed with something like 1/sqrt(int(cose^2(kx)).  
I guess if you can find a k that satisfies boundary conidtions you have  
non-zero modes…

---

<div class="post-metadata">

**Author:** ![aweni](https://avatars.discourse-cdn.com/v4/letter/a/db5fbb/32.png) [@aweni](https://community.freefem.org/u/aweni)\
**Post date:** [May 14, 2023, 12:29pm UTC](https://community.freefem.org/t/mesh-of-a-right-paving-stone-and-a-cube/2394/54 "2023-05-14T12:29:33Z")

</div>

![iimage](https://canada1.discourse-cdn.com/flex030/uploads/freefem/original/2X/3/3e39132873352019b030e7b90db78dbdf7cd3549.png)

Hello to all.  
I implemented in freefem ++ the displacement of a plate of dimension (0.1 _0.01_0.012) that I stabilized with a control so the energy decreases.  
With gnuplot I plotted the energy curve versus time from a file recorded with freefem++.  
Here is the obtained curve.  
The decay is so extreme that I wonder if there is instability or my control does not exist.

---

<div class="post-metadata">

**Author:** ![marchywka](https://avatars.discourse-cdn.com/v4/letter/m/ee59a6/32.png) [@marchywka](https://community.freefem.org/u/marchywka)\
**Post date:** [May 15, 2023, 1:00am UTC](https://community.freefem.org/t/mesh-of-a-right-paving-stone-and-a-cube/2394/55 "2023-05-15T01:00:37Z")

</div>

Is this the thing you posted before? IIRC it varied with your time step by a  
lot and I posted some alternative code that decayed more slowly  
and was more or less insensitive to the time step.

---

<div class="post-metadata">

**Author:** ![aweni](https://avatars.discourse-cdn.com/v4/letter/a/db5fbb/32.png) [@aweni](https://community.freefem.org/u/aweni)\
**Post date:** [May 15, 2023, 11:28am UTC](https://community.freefem.org/t/mesh-of-a-right-paving-stone-and-a-cube/2394/56 "2023-05-15T11:28:53Z")

</div>

Yes, when I correct, this is what I get.

min -6088.65 max 3162.48  
min -3.0201e-34 max 3.02049e-34  
t=0 E(t) 1.28526e+10  
current line = 182  
Exec error : Try to get unset x,y, …  
– number :1  
Exec error : Try to get unset x,y, …  
– number :1  
err code 8 , mpirank 0  
try getConsole C:\Users\ADMIN\Documents\dddd  
save log in : ‘C:\Users\ADMIN\Documents\dddd.log’  
wait enter ?

---

<div class="post-metadata">

**Author:** ![aweni](https://avatars.discourse-cdn.com/v4/letter/a/db5fbb/32.png) [@aweni](https://community.freefem.org/u/aweni)\
**Post date:** [May 15, 2023, 11:50am UTC](https://community.freefem.org/t/mesh-of-a-right-paving-stone-and-a-cube/2394/57 "2023-05-15T11:50:22Z")

</div>

is another work.  
if you want i can add a file.log

I don’t know why the compilation stop like this

- Square mesh : nb vertices =4 , nb triangles = 2 , nb boundary edges 4  
– Square mesh : nb vertices =4 , nb triangles = 2 , nb boundary edges 4  
– Build Nodes/DF on mesh : n.v. 8, n. elmt. 6, n b. elmt. 12  
nb of Nodes 19 nb of DoF 19 DFon=0100  
– FESpace: Nb of Nodes 19 Nb of DoF 19  
– FESpace: Nb of Nodes 8 Nb of DoF 24  
– FESpace: Nb of Nodes 8 Nb of DoF 8  
– Build Nodes/DF on mesh : n.v. 8, n. elmt. 6, n b. elmt. 12  
nb of Nodes 27 nb of DoF 137 DFon=10300  
GC: converge in 1 g=-6.25924e+10 rho= 0.100665 gamma= -0.371759  
– Solve :  
min -0.0131588 max 0.998097  
min -1.51003e-25 max 0.0205185  
min 0 max 1.00673e+08  
min -1.43024e-07 max 1.97691e-07  
min -1.11413e+07 max 2.65812e+11  
min -6088.65 max 3162.48  
min -3.0201e-34 max 3.02049e-34  
t=0 E(t) 1.28526e+10  
current line = 182  
Exec error : Try to get unset x,y, …  
– number :1  
Exec error : Try to get unset x,y, …  
– number :1  
err code 8 , mpirank 0  
try getConsole C:\Users\ADMIN\Documents\dddd

---

<div class="post-metadata">

**Author:** ![aweni](https://avatars.discourse-cdn.com/v4/letter/a/db5fbb/32.png) [@aweni](https://community.freefem.org/u/aweni)\
**Post date:** [May 16, 2023, 2:03pm UTC](https://community.freefem.org/t/mesh-of-a-right-paving-stone-and-a-cube/2394/58 "2023-05-16T14:03:07Z")

</div>

Good evening professor  
good evening to all  
Please, I would like someone to send me a code example of a 3D elasticity evolution problem.

Thank you in advance.

[3dexample.edp](https://community.freefem.org/uploads/short-url/bv9PoVqH3S4cjd4L2O8nNZTxO3P.edp) (6.45 KB)

[Previous page](https://community.freefem.org/t/mesh-of-a-right-paving-stone-and-a-cube/2394.md?page=2)
