Discussion:
[ff3d-users] Povray geometry
Denis Gueyffier
2008-01-29 13:48:30 UTC
Permalink
Hi,

I'd like to use the following geometry in FreeFem3D:
isosurface{
function{ y - sin(x*4*pi)*0.1 }
contained_by{box{<-1,-0.5,-1>,<1,1,1>}}
pigment{ color rgb<1,0,0>}
}

(see the rendered shape at
http://www.f-lohmueller.de/pov_tut/all_shapes/shapes920f.htm top of the
page)

But the pov-ray interpreter doesn't seem to handle this geometry.
Is there anyway I can define this shape inside FreemFem? or should I use a
mesh generator?

Thanks,

Denis Gueyffier
Courant Institute
Stephane Del Pino
2008-01-29 21:39:47 UTC
Permalink
Dear Denis.

It is true that ff3d's POVRay interpreter is far to be complete, but in your
case, you can define an analytic domain. Here is an example :

--------------------------
vector a = (-1,-0.5,-1);
vector b = (1,1,1);
vector n = (20,20,20);

mesh m = structured(n,a,b);

double pi = acos(-1);
domain D = domain(y<0.1*sin(4*pi*x));

mesh s = surface(D,m);
solve(u) in D by m
{
pde(u)
-div(grad(u))=1;
u = 0 on s;
u = 1 on m xmin;
}

mesh t = tetrahedrize(D,m);
save(vtk,"u",u,t);
--------------------------

Best regards,
Stéphane.
Denis Gueyffier
2008-01-31 18:35:13 UTC
Permalink
Thanks Stephane, this helps a lot.
Is there any way to get a smoother tetrahedrization of the sinusoidal
surface?
I get many sharp angles instead of a smooth surface, see
Loading Image...

Thanks,

Denis Gueyffier
Courant Institute
Post by Stephane Del Pino
Dear Denis.
It is true that ff3d's POVRay interpreter is far to be complete, but in your
--------------------------
vector a = (-1,-0.5,-1);
vector b = (1,1,1);
vector n = (20,20,20);
mesh m = structured(n,a,b);
double pi = acos(-1);
domain D = domain(y<0.1*sin(4*pi*x));
mesh s = surface(D,m);
solve(u) in D by m
{
pde(u)
-div(grad(u))=1;
u = 0 on s;
u = 1 on m xmin;
}
mesh t = tetrahedrize(D,m);
save(vtk,"u",u,t);
--------------------------
Best regards,
Stéphane.
------------------------------
_______________________________________________
ff3d-users mailing list
http://lists.nongnu.org/mailman/listinfo/ff3d-users
End of ff3d-users Digest, Vol 34, Issue 2
*****************************************
Stephane Del Pino
2008-01-31 20:08:07 UTC
Permalink
Dear Denis.

In the example I gave you, the tetrahedrized mesh is just a visualization
mesh : the computation is done using a fictitious domain method which is more
accurate with regard to the geometry approximation.

I have been working on octree-based meshes for visualization which should give
much better results, but it is not finished.

By the way, you can also solve PDE problems using unstructured grids, the mesh
being generated externally (using gmsh for instance).

Best regards,
Stéphane.

Loading...