ff3d-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ff3d-users] Step function


From: Emilio Melero García
Subject: Re: [ff3d-users] Step function
Date: Thu, 14 Dec 2006 13:32:45 +0100

Hello Stephane,

Thanks for the suggestion. I had actually managed another way out for this based on defining more objects in the pov file, and i wanted to tell it now just in case someone thinks is useful.

My pov file is

merge{
cylinder {
<0, 0.25,0.25>,<5.3,0.25,0.25>, 0.41
}
cylinder {
<5.3, 0.25, 0.25>,<9,0.25,0.25>, 0.1
}
pigment { color rgb <1,0,0>}
}
cylinder{
<0,0.25,0.25>,<3.8,0.25,0.25>, 0.41
pigment { color rgb <0,1,0>}
}
cylinder{
<3.8,0.25,0.25>,<5.3,0.25,0.25>, 0.41
pigment { color rgb <0,0,1>}
}

The two bold cylinders help me to define areas of my domain, which is set in the ff3d code as the inside of the first object (label <1,0,0>),  because after defining them in the pov file I just write

function f1 = one(<0,1,0>);
function f2 = one(<0,0,1>);
function conc0=2*f1+0.5*f2;

in the ff3d code and voila!, i have a two step function to define my initial conditions. I see now that your solution Stephane is more elegant, so i will modify my code. Thank you very much.

Regarding the compilation it would be very helpful if you could compile a version for Mac OS X (i am using TIGER in an intel based MAC). I will try in the following days also and report back if i manage. My problem is that i have to compile every accesory package since i am behind a very strict firewall that blocks acces to the Fink repository, so i can not get hold of precompiled packages.

do you know if the latest version supports writing out data to a file (like the freefem++ instruction ofstream name(filename, append) )

Thank you very very much for your help!

Best regards to you and everyone

Emilio

2006/12/13, Stephane Del Pino <address@hidden>:
Le mercredi 13 décembre 2006 13:41, Emilio Melero García a écrit:
> Hello everyone!,
Hello Emilio.

> I have just recently started to use freefem3d to simulate mass diffusion
> inside a certain 3d shape. My question here is that i need to define a step
> function to set the initial conditions for the concentration. I would need
> a function that says: for x<= x1 conc(x,y,z)=3(for example), and for x>x1
> conc(x,y,z)=0. And i can not figure out a way to do it.

You can write this function using the 'one' keyword:

function conc = one(x<=x1)*3;

> I am using the distributed binary for Macintosh.
I think this release is quite old. You should try to compile a new cvs
version: lots of bugs have been fixed... If you are not able to do it, let me
know, I have to check if I have an OS-X system where I can compile ff3d...

Best regards,
Stephane.


_______________________________________________
ff3d-users mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/ff3d-users



--
###############################################
Dr. Emilio Melero García
Laboratorio de Estudios Cristalográficos, IACT
Instituto de parasitología Lopez Neyra,
P.T. Ciencias de la Salud, E-18100 Armilla,
Granada, España

Correo elec. :emilio_arroba_lec_._csic_._es
Tfno: 958181621, lab 107
###############################################
reply via email to

[Prev in Thread] Current Thread [Next in Thread]