kernel

package
v0.0.0-...-ddc071b Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2023 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const PI = 3.141592653589

Variables

This section is empty.

Functions

This section is empty.

Types

type Cubic

type Cubic struct {
	A  float32
	B  float32 //01D
	C  float32 //O2D
	H1 float32 //Ref Smooth
	H_ float32 //Ref Smooth
	H2 float32
	H3 float32
	H4 float32
	H5 float32
}

func Build_Kernel

func Build_Kernel(h float32) Cubic

Spiky Cubic Kernel with Std Guassian in the Normal Function

func (Cubic) F

func (K Cubic) F(x float32) float32

**------------------Standard----------------------//

func (Cubic) Grad

func (K Cubic) Grad(x float32, dir V.Vec) V.Vec

Grad finds the kernel gradient

func (Cubic) H

func (K Cubic) H() float32

func (Cubic) H0

func (K Cubic) H0() float32

func (Cubic) O1D

func (K Cubic) O1D(x float32) float32

O1D - 1st order Differential

func (Cubic) O2D

func (K Cubic) O2D(x float32) float32

O2D - Returns 2nd Order Differential

func (Cubic) W0

func (K Cubic) W0() float32

type Kernel

type Kernel interface {
	F(x float32) float32
	O1D(x float32) float32
	O2D(x float32) float32
	H() float32  //Adpative Smoothing Length
	H0() float32 //Adaptive Smoothing Length
	Grad(x float32, dir V.Vec) V.Vec
	W0() float32
}

Jump to

Keyboard shortcuts

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