These pages are auto-generated from self-documenting comments embedded in class files.

For more information on breve and steve, refer to the breve homepage.

PatchGrid : PatchToroid

Class Description:

PatchToroid is a subclass of PatchGrid in which the patch neighbors are initialized in a toroidal fashion, such that patches on the edge of the grid are "connected" (via neighbor relationships) to patches on the opposite edge.

Note that since PatchGrid objects can already be 3 dimensional, that a 3D toroidal PatchGrid is actually not the traditional donut shaped toroidal topology--it's the corresponding topology in 4 dimensions. Now I don't know about you, but I get a headache thinking about this stuff, so let's just agree that "toroid" is not the totally accurate term, but that it's the easiest way to describe what's going on here.

Use init-with or init-at the create a PatchToroid.

Class methods:


init-at location gridCenter (vector) with-patch-size pSize (vector) with-x-count x (int) with-y-count y (int) with-z-count z (int) with-patch-class class (string)

Creates a PatchGrid in which each Patch is a member of class and is the size pSize and in which the total grid dimensions are x by y by z.

Bear in mind that this will create a large number of objects: x * y * z. If you have an iterate method in your patch-class, then this can amount to a great deal of computation which can slow down your simulation.


Documentation created Tue May 11 10:28:37 2004