Versions in this module Expand all Collapse all v0 v0.2.0 Dec 17, 2021 v0.1.0 Nov 26, 2021 Changes in this version + const CPUMemory + const GPUMemory + const SIZEOF_FLOAT32 + const X + const Y + const Z + func Copy(dst, src *Slice) + func Downsample(In [][][][]float32, N [3]int) [][][][]float32 + func EnableGPU(free, freeHost func(unsafe.Pointer), ...) + func Index(size [3]int, ix, iy, iz int) int + func SizeOf(block [][][]float32) [3]int + type Mesh struct + Unit string + func NewMesh(N0, N1, N2 int, cellx, celly, cellz float64, pbc ...int) *Mesh + func (m *Mesh) CellSize() [3]float64 + func (m *Mesh) NCell() int + func (m *Mesh) PBC() [3]int + func (m *Mesh) PBC_code() byte + func (m *Mesh) SetPBC(nx, ny, nz int) + func (m *Mesh) Size() [3]int + func (m *Mesh) String() string + func (m *Mesh) WorldSize() [3]float64 + type Meta struct + CellSize [3]float64 + MeshUnit string + Name string + Time float64 + TimeStep float64 + Unit string + type Slice struct + func Crop(in *Slice, x1, x2, y1, y2, z1, z2 int) *Slice + func NewSlice(nComp int, size [3]int) *Slice + func NilSlice(nComp int, size [3]int) *Slice + func Resample(in *Slice, N [3]int) *Slice + func SliceFromArray(data [][]float32, size [3]int) *Slice + func SliceFromPtrs(size [3]int, memType int8, ptrs []unsafe.Pointer) *Slice + func (f *Slice) Scalars() [][][]float32 + func (f *Slice) Tensors() [][][][]float32 + func (f *Slice) Vectors() [3][][][]float32 + func (s *Slice) CPUAccess() bool + func (s *Slice) Comp(i int) *Slice + func (s *Slice) DevPtr(component int) unsafe.Pointer + func (s *Slice) Disable() + func (s *Slice) Free() + func (s *Slice) GPUAccess() bool + func (s *Slice) Get(comp, ix, iy, iz int) float64 + func (s *Slice) Host() [][]float32 + func (s *Slice) HostCopy() *Slice + func (s *Slice) Index(ix, iy, iz int) int + func (s *Slice) IsNil() bool + func (s *Slice) Len() int + func (s *Slice) MemType() int + func (s *Slice) NComp() int + func (s *Slice) Set(comp, ix, iy, iz int, value float64) + func (s *Slice) SetScalar(ix, iy, iz int, v float64) + func (s *Slice) SetVector(ix, iy, iz int, v Vector) + func (s *Slice) Size() [3]int + func (s *Slice) String() string + type Vector [3]float64 + func (a Vector) Add(b Vector) Vector + func (a Vector) Cross(b Vector) Vector + func (a Vector) Dot(b Vector) float64 + func (a Vector) MAdd(s float64, b Vector) Vector + func (a Vector) Sub(b Vector) Vector + func (v Vector) Div(a float64) Vector + func (v Vector) Len() float64 + func (v Vector) Mul(a float64) Vector + func (v Vector) X() float64 + func (v Vector) Y() float64 + func (v Vector) Z() float64