render

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: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UnitBufCount = 1 << 6
)

Variables

View Source
var (
	NumCores = 0
)

Functions

This section is empty.

Types

type Box

type Box interface {
	Overlap(hd *io.SheetHeader) Overlap

	CellSpan() [3]int
	CellOrigin() [3]int
	CellWidth() float64
	Cells() int
	Points() int

	Vals() density.Buffer

	ProjectionAxis() (dim int, ok bool)
}

func NewBox

func NewBox(
	boxWidth float64, pts, cells int, q density.Quantity, config *io.BoxConfig,
) Box

NewBox creates a grid and a wrapper for the redering box defined by the given config file, and which lives inside a simulation box with the given width and pixel count.

type HistBox

type HistBox struct {
	Origin, Span [3]float64

	Centers []float64
	Counts  []int
}

func NewHistBox

func NewHistBox(con *io.BoxConfig, bins int) HistBox

func (*HistBox) Contains

func (box *HistBox) Contains(v geom.Vec, L float64) bool

type HistInfo

type HistInfo struct {
	Min, Max float64
	Bins     int
	Scale    string
}

type HistManager

type HistManager struct {
	// contains filtered or unexported fields
}

HistManager is a struct which manages constructing

func NewHistManager

func NewHistManager(
	files []string, boxes []HistBox, points int,
	quantity string, gridFile string,
) (*HistManager, error)

NewHistmanager creates a new HistManager.

func (*HistManager) Hist

func (man *HistManager) Hist(info *HistInfo) error

Hist uses HistManager to compute a histogram with the given properties.

func (*HistManager) HistFromFile

func (man *HistManager) HistFromFile(file string, info *HistInfo) error

HistFromFile updates the histograms of each box using only the particles in the given file.

func (*HistManager) Subsample

func (man *HistManager) Subsample(skip int)

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

func NewManager

func NewManager(
	files []string, boxes []Box, logFlag bool, q density.Quantity,
) (*Manager, error)

func (*Manager) Log

func (man *Manager) Log(flag bool)

func (*Manager) RenderCurl

func (man *Manager) RenderCurl() error

func (*Manager) RenderDensity

func (man *Manager) RenderDensity() error

func (*Manager) RenderDensityFromFile

func (man *Manager) RenderDensityFromFile(file string) error

func (*Manager) RenderVelocity

func (man *Manager) RenderVelocity() error

func (*Manager) Subsample

func (man *Manager) Subsample(subsampleLength int)

type Overlap

type Overlap interface {
	density.Interpolator

	// BufferSize calculates buffer size required to represent the
	// underlying grid.
	BufferSize() int

	// ScaleVecs converts a vector array into the overlap's code units.
	ScaleVecs(vs []geom.Vec, vcb *geom.CellBounds)

	// Add adds the contents of buf to grid where buf is the overlap grid and
	// grid is the domain grid. The domain grid is contained within the given
	// cell bounds.
	Add(buf, grid density.Buffer)
}

Directories

Path Synopsis
package geom provides routines and types for dealing with an array of geometry-related tasks.
package geom provides routines and types for dealing with an array of geometry-related tasks.

Jump to

Keyboard shortcuts

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