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

This class is included as part of the file PatchGrid.tz.
To use this class in a simulation, include the line "@use PatchGrid."

### 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.

### Class methods:

> - diffuse-chemicals
> - get-patch-at

`diffuse-chemicals`

> Updates the concentration of each PatchChemical being tracked in the patch grid by diffusing the chemicals according to their diffusion rates. This method is called automatically by update-concentrations.

`get-patch-at x xind (int) y yind (int) z zind (int)`

> Returns the patch object associated with the specified indices. If the indices are out of bounds, they will be "wrapped around" to the other side of the PatchToroid. = xSize. xSize), -1 ). = ySize. ySize), -1 ). = zSize. zSize), - 1 ).

Documentation created Thu Jul 3 18:18:12 2008