On Tue, 31 Oct 2006, David Domenech wrote:
As I read on this discuss list you've talked about create arbitrary shapes
by using the material-function subclass.

Could you give me any hint to use that class??

I'm trying to do a parabolic horn. But I don't have any idea what kind of
arguments must I pass to that subclass
and how to define a 2D structure with it. May I have to create a geometric
object and define on it a material-function??

Suppose we've defined a Scheme function f that takes a position p and returns (f p) the dielectric constant at the point p. For example, a simple sinusoidal oscillation 2+sin(x) in epsilon is given by:

(define (f p) (+ 2 (sin (vector3-x p))))

Then you could create a block of this material by e.g.

(make block (center 0) (size 1 2 3)
        (material (make material-function (epsilon-func f))))

Or you could fill all space with this material by setting it to the default material:

(set! default-material (make material-function (epsilon-func f)))

In your case, for a parabolic horn you'll be using an "if" statement in your function to select between two materials, I'm guessing.

Steven

_______________________________________________
meep-discuss mailing list
[email protected]
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss

Reply via email to