Documentation ¶
Index ¶
- Constants
- type DensityField
- type Field
- type ForceField
- type PressureField
- type SPHField
- func (p *SPHField) AlignWithGrid(mGrid grid.Grid)
- func (p *SPHField) BoundaryParticles(colliders []*mesh.Mesh) []float32
- func (p *SPHField) Curl(i int, field TensorField) []float32
- func (p *SPHField) D0() float32
- func (p *SPHField) Density(i int)
- func (p *SPHField) DensityF(pos vector.Vec, positions []float32) float32
- func (p *SPHField) Div(i int, field TensorField) float32
- func (p *SPHField) Field() *SPHField
- func (p *SPHField) GetFields() map[string]Field
- func (p *SPHField) GetKernelLength() float32
- func (p *SPHField) GetSampler() *lsh.HashSampler
- func (p *SPHField) GetTensorFields() map[string]TensorField
- func (p *SPHField) Gradient(i int, field Field) []float32
- func (p *SPHField) Interpolate(position []float32, field Field) float32
- func (p *SPHField) Kernel() kernel.Kernel
- func (p *SPHField) Laplacian(i int, field Field) float32
- func (p *SPHField) LaplacianForce(i int, field TensorField) []float32
- func (p *SPHField) Mass() float32
- func (p *SPHField) NN()
- type ScalarField
- type TensorField
- type Vector3Field
- type VelocityField
Constants ¶
View Source
const SAMPLES = 150
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DensityField ¶
type DensityField struct {
Ref model.ParticleArray
}
func (DensityField) Set ¶
func (p DensityField) Set(x float32, i int)
func (DensityField) Value ¶
func (p DensityField) Value(i int) float32
type ForceField ¶
type ForceField struct {
Ref model.ParticleArray
}
func (ForceField) Set ¶
func (p ForceField) Set(x []float32, i int)
func (ForceField) Value ¶
func (p ForceField) Value(i int) []float32
type PressureField ¶
type PressureField struct {
Ref model.ParticleArray
}
func (PressureField) Set ¶
func (p PressureField) Set(x float32, i int)
func (PressureField) Value ¶
func (p PressureField) Value(i int) float32
type SPHField ¶
type SPHField struct { Particles model.ParticleArray // contains filtered or unexported fields }
Manage SPH Field and Particle Field interactions
func InitSPH ¶
func InitSPH(parts model.ParticleArray, ref *lsh.HashSampler, kern kernel.Kernel, basis int) SPHField
func (*SPHField) AlignWithGrid ¶
func (*SPHField) BoundaryParticles ¶
func (*SPHField) Curl ¶
func (p *SPHField) Curl(i int, field TensorField) []float32
Curl computes non-symmetric curl
func (*SPHField) Density ¶
Density -- Computes density field for SPH Field - Boundary particle contribute to infinite density
func (*SPHField) Div ¶
func (p *SPHField) Div(i int, field TensorField) float32
Computes the Divergence of a tensor field
func (*SPHField) GetKernelLength ¶
func (*SPHField) GetSampler ¶
func (p *SPHField) GetSampler() *lsh.HashSampler
func (*SPHField) GetTensorFields ¶
func (p *SPHField) GetTensorFields() map[string]TensorField
func (*SPHField) Interpolate ¶
nterpolates a scalar field given a position giving a continuous field
func (*SPHField) Laplacian ¶
Computes a laplacian value at the particle i for the given scalar field
func (*SPHField) LaplacianForce ¶
func (p *SPHField) LaplacianForce(i int, field TensorField) []float32
Computes a laplacian value at the particle i for the given scalar field
type ScalarField ¶
type ScalarField struct {
Values []float32
}
func (ScalarField) Set ¶
func (p ScalarField) Set(x float32, i int)
func (ScalarField) Value ¶
func (p ScalarField) Value(i int) float32
type TensorField ¶
type Vector3Field ¶
type Vector3Field struct {
Values [][3]float32
}
Vector 3 Field implements Tensor Field Interface
func (Vector3Field) Set ¶
func (p Vector3Field) Set(x []float32, i int)
func (Vector3Field) Value ¶
func (p Vector3Field) Value(i int) []float32
type VelocityField ¶
type VelocityField struct {
Ref model.ParticleArray
}
func (VelocityField) Set ¶
func (p VelocityField) Set(x []float32, i int)
func (VelocityField) Value ¶
func (p VelocityField) Value(i int) []float32
Click to show internal directories.
Click to hide internal directories.