Documentation ¶
Index ¶
Constants ¶
View Source
const ( Cubic InterpolatorType = iota Linear Particle UnitType = iota Tetra )
Variables ¶
This section is empty.
Functions ¶
func Loop ¶
func Loop(snap int, objs []Object, buf *Buffer, skip int, it InterpolatorType, pts, workers int) error
Loop iterates over all the tetrahedra or all the points in the simulation box. A lot of tricks are used to minimize the number of operations done.
TODO: restructure so there are fewer function arguments here.
Types ¶
type InterpolatorType ¶
type InterpolatorType int
InterpolatorType is the type of interpolation used during the iteration.
type Object ¶
type Object interface { // Transform does a coordinate transformation on a slice of vectors such // that they are all . Transform(vecs []rgeom.Vec, tw float64) // Contains returns true if a point is contained inside the Object. Contains(x, y, z float64) bool // IntersectBox returns true if a box intersects the Object. This function // is allowed to be slow. IntersectBox(origin, span [3]float64, tw float64) bool // ThreadCopy copies enough of the object's internal state to a new instance // of that object so that both Objects can maintain calls to Use*foo* // simultaneously. ThreadCopy(id, threads int) Object // ThreadMerge combines the data from a group of objects into the reciever. // The reciever will _not_ be in the object list, but its initial data // should be combined likewise. ThreadMerge(objs []Object) // UsePoint supplies a point to the object. UsePoint(x, y, z float64) // UseTetra supplies a tetrahedron to the object. UseTetra(t *geom.Tetra) // Params returns miscellaneous parameters. Params() Params }
An object which will be passed to Loop(). It must be less than half the size of the simulation box (because delaing with larger objects is a nightmare).
type Params ¶
type Params struct { // UsesTetra is true if tetrahedra should be iterated over and false if // points should be iterated over. UsesTetra bool }
Params
type Sphere ¶
type Sphere struct {
// contains filtered or unexported fields
}
func (*Sphere) IntersectBox ¶
Click to show internal directories.
Click to hide internal directories.