density

package
v0.0.0-...-b5d641a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 23, 2023 License: MIT Imports: 3 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NilBuffer = &scalarBuffer{[]float64{}}

Functions

This section is empty.

Types

type Buffer

type Buffer interface {
	// Array Management
	Slice(low, high int)
	Length() int
	Clear()

	// Getters and Setters
	Quantity() Quantity
	SetGridLocation(g *geom.GridLocation)
	SetVectors(vecs []geom.Vec) bool

	// Buffer Retrieval
	CountBuffer() (num []int, ok bool)
	ScalarBuffer() (vals []float64, ok bool)
	VectorBuffer() (vals [][3]float64, ok bool)
	FinalizedScalarBuffer() (vals []float32, ok bool)
	FinalizedVectorBuffer() (xs, ys, zs []float32, ok bool)
}

func NewBuffer

func NewBuffer(q Quantity, len, wlen int, g *geom.GridLocation) Buffer

func WrapperDensityBuffer

func WrapperDensityBuffer(rhos []float64) Buffer

type Interpolator

type Interpolator interface {
	Interpolate(
		buf Buffer, xs, vs []geom.Vec,
		ptVal float64, weights Buffer,
		low, high, jump int,
	)

	// The bounding box around the box being written to.
	DomainCellBounds() *geom.CellBounds
	// The bounding box around the box being written from.
	BufferCellBounds() *geom.CellBounds

	Cells() int
}

func MonteCarlo

func MonteCarlo(
	segWidth int64,
	points, cells int,
	skip int64,
	unitBufs [][]geom.Vec,
	subIntr Interpolator,
) Interpolator

type Quantity

type Quantity int64
const (
	Density Quantity = iota
	DensityGradient
	Velocity
	VelocityDivergence
	VelocityCurl
	EndQuantity
)

func QuantityFromString

func QuantityFromString(str string) (q Quantity, ok bool)

func (Quantity) CanProject

func (q Quantity) CanProject() bool

func (Quantity) RequiresVelocity

func (q Quantity) RequiresVelocity() bool

func (Quantity) String

func (q Quantity) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL