Hello,
I am a newbee in the platform and I want to create a square domain with a 3 petal flower-like shape in it (I have the level set definition of this flower geometry, shared below). Then I want to create a mesh in the area between square and the flower geometry. Anyone can help me with this? Thanks in advance.
LS definition:
A=(x.^2 + y.^2 );
LS = (sqrt(A) - 0.27 -0.27.2cos(3*atan2(x,y)));
Thank you very much for the answer, exactly what I was looking for. One more thing though do you know how to procced if one just wants to mesh the outer-flower area i.e. only the red elements in the figure and make inside flower “empty” ?
Thanks. Is the region number predictable or should you extract itby getting
the region from some point in the region of interest? In the past my assumptions
about region numbers did not work out.
Thank you @prj . Another question now poped up as well. Can we distort the mesh? I mean say if the “flower” rotates towards right —numbers in level set function changes slightly say it becomes Vh ls = sqrt(A) - 0.27 - 0.27 * 2 * cos((3 * atan2(x, y))-15) — can we strech out the existing mesh to adapt this configuration without remeshing?
I went and got the file , renamed it to something like “mmgned2d”
and compiled it with “ff-c++” which I use for my custom datascope plugin
successfully. It built a shared object which ldd says links ok but
it refused to open. What do I need to do to get this to work?
I’m pretty sure it is finding the so but can’t load it due to some other issue;
I guess if it had a line number I could set a bp in gdb or if it threw but
otherwise it will take a little time to diagnose.
Thanks.
ls -al *.so
-rwxrwxr-x 1 marchywka marchywka 1689808 Sep 4 14:46 mmgnew2d.so
marchywka@happy:/home/documents/cpp/proj/freefem/forum$ FreeFem++ petals.edp
-- FreeFem++ v4.12 (Sat 20 May 2023 07:29:03 PM EDT - git no git)
file : petals.edp
Load: lg_fem lg_mesh lg_mesh3 eigenvalue
1 : verbosity=100;
2 : load "mmgnew2d"
Load error: mmgnew2d
fail:
dlerror : /home/ubuntu/dev//freefem/install/lib/ff++/4.12/lib/mmgnew2d.so: cannot open shared object file: No such file or directory
list prefix: './' '/home/ubuntu/dev//freefem/install/lib/ff++/4.12/lib/' list suffix: '' , '.so'
current line = 2
Load error : mmgnew2d
line number :2, mmgnew2d
error Load error : mmgnew2d
line number :2, mmgnew2d
code = 2 mpirank: 0
Thanks, its missing a symbol apparently but not sure if this should be fixed at
compile time or with a path change… When I make my plugin I just added
“-l readline -l pthread” can I do that here?
Also, fwiw, in my plugin most of the info goes through a macro MM_ERR that attaches
file and line to the output so you can hunt it down easily.
2 : load "mmgnew2d" test dlopen(./mmgnew2d) = 0
load error was: ./mmgnew2d: cannot open shared object file: No such file or directory
test dlopen(./mmgnew2d.so) = 0
load error was: ./mmgnew2d.so: undefined symbol: MMGS_mmgslib
test dlopen(/home/ubuntu/dev//freefem/install/lib/ff++/4.12/lib/mmgnew2d) = 0
load error was: /home/ubuntu/dev//freefem/install/lib/ff++/4.12/lib/mmgnew2d: cannot open shared object file: No such file or directory
test dlopen(/home/ubuntu/dev//freefem/install/lib/ff++/4.12/lib/mmgnew2d.so) = 0
load error was: /home/ubuntu/dev//freefem/install/lib/ff++/4.12/lib/mmgnew2d.so: cannot open shared object file: No such file or directory
Load error: mmgnew2d
I guess this is defined in a 3rdparty mmg libtary but it may not be built
in 4.12 or can I just make if from an archive lib in the build dir?
Or do I really need to get the dev branch lol?
Hi,
To be able to run the minimal example given above I have installed a VM (Ubuntu system) in my Windows machine and followed the installation guide on Installation guide . When I run the command
copy/paste the text the screenshot is difficult or impossible to read and
can’t easily be quoted anyway. This is linus, not windohs
Meanwhile, I was debating about just doing a separate build of mmg
and see if my plugin will link to that. I guess I need to look at mmg
anyway and its easier than getting dev build of ff for now.