Documentation ¶
Overview ¶
CUDA functionality.
Index ¶
- Constants
- Variables
- func AddAnisoExchange(Beff *data.Slice, m *data.Slice, AexX, AexY, AexZ, Msat float64)
- func AddConst(dst *data.Slice, cnst ...float32)
- func AddDMI(Beff *data.Slice, m *data.Slice, D, Msat float64)
- func AddExchange(Beff *data.Slice, m *data.Slice, Aex, Msat float64)
- func AddUniaxialAnisotropy(Beff, m *data.Slice, Kx, Ky, Kz, Msat float64)
- func AddZhangLiTorque(torque, m *data.Slice, j [3]float64, Msat float64, j_MsMap *data.Slice, ...)
- func DampingTorque(torque, m, B *data.Slice)
- func GPUCopy(in *data.Slice) *data.Slice
- func Init()
- func LLGTorque(torque, m, B *data.Slice, alpha float32)
- func LockThread()
- func Madd2(dst, src1, src2 *data.Slice, factor1, factor2 float32)
- func Madd3(dst, src1, src2, src3 *data.Slice, factor1, factor2, factor3 float32)
- func MaxAbs(in *data.Slice) float32
- func MaxVecDiff(x, y *data.Slice) float64
- func MaxVecNorm(v *data.Slice) float64
- func Memset(s *data.Slice, val ...float32)
- func NewSlice(nComp int, m *data.Mesh) *data.Slice
- func NewSynced(nComp int, m *data.Mesh) *data.Synced
- func NewUnifiedSlice(nComp int, m *data.Mesh) *data.Slice
- func Normalize(vec *data.Slice)
- func Sum(in *data.Slice) float32
- func Zero(s *data.Slice)
- type DemagConvolution
- type Heun
Constants ¶
const ( MaxBlockSize = 512 MaxGridSize = 65535 )
CUDA Launch parameters. TODO: use device properties.
const CONV_TOLERANCE = 1e-6
Maximum tolerable error on demag convolution self-test.
const DEFAULT_KERNEL_ACC = 6
Default accuracy setting for demag kernel.
const FFT_IMAG_TOLERANCE = 1e-5
Maximum tolerable imaginary/real part for demag kernel in Fourier space. Assures kernel has correct symmetry.
const REDUCE_BLOCKSIZE = C.REDUCE_BLOCKSIZE
Block size for reduce kernels.
const STENCIL_BLOCKSIZE = C.STENCIL_BLOCKSIZE_X
Variables ¶
Functions ¶
func AddAnisoExchange ¶
Add exchange field to Beff with different exchange constant for X,Y,Z direction. m must be normalized to unit length.
func AddDMI ¶
Add effective field of Dzyaloshinskii-Moriya interaction to Beff (Tesla). According to Bagdanov and Röβler, PRL 87, 3, 2001. eq.8 (out-of-plane symmetry breaking). m: normalized D: J/m²
func AddExchange ¶
Add exchange field to Beff.
func AddUniaxialAnisotropy ¶
Add uniaxial magnetocrystalline anisotropy field to Beff. m: normalized magnetization. K: anisotropy axis in J/m³
func AddZhangLiTorque ¶
func DampingTorque ¶
Only the damping term of LLGTorque, with alpha 1. Useful for relaxation.
func LLGTorque ¶
Landau-Lifshitz torque divided by gamma0:
- 1/(1+α²) [ m x B + α (m/|m|) x (m x B) ] torque in Tesla/s m normalized B in Tesla
func LockThread ¶
func LockThread()
LockCudaThread locks the current goroutine to an OS thread and sets the CUDA context for that thread. To be called by every fresh goroutine that will use CUDA.
func MaxVecDiff ¶
// Maximum of the norms of the difference between all vectors (x1,y1,z1) and (x2,y2,z2) // (dx, dy, dz) = (x1, y1, z1) - (x2, y2, z2) // max_i sqrt( dx[i]*dx[i] + dy[i]*dy[i] + dz[i]*dz[i] )
func MaxVecNorm ¶
Maximum of the norms of all vectors (x[i], y[i], z[i]).
max_i sqrt( x[i]*x[i] + y[i]*y[i] + z[i]*z[i] )
func NewUnifiedSlice ¶
Make a GPU Slice with nComp components each of size length.
Types ¶
type DemagConvolution ¶
type DemagConvolution struct {
// contains filtered or unexported fields
}
func NewConvolution ¶
func NewConvolution(mesh *data.Mesh, kernel [3][3]*data.Slice) *DemagConvolution
func NewDemag ¶
func NewDemag(mesh *data.Mesh) *DemagConvolution
Source Files ¶
- alloc.go
- conv_common.go
- conv_copypad.go
- conv_kernmul.go
- conv_selftest.go
- conv_symm.go
- copypad_wrapper.go
- copypadmul_wrapper.go
- dampingtorque_wrapper.go
- demag.go
- dmi.go
- dmi_wrapper.go
- doc.go
- exchange.go
- exchange1comp_wrapper.go
- fatbin.go
- fft3dc2r.go
- fft3dr2c.go
- fftplan.go
- heun.go
- init.go
- kernmulc_wrapper.go
- kernmulrsymm2dx_wrapper.go
- kernmulrsymm2dyz_wrapper.go
- kernmulrsymm3d_wrapper.go
- llgtorque.go
- llgtorque_wrapper.go
- madd.go
- madd2_wrapper.go
- madd3_wrapper.go
- normalize.go
- normalize_wrapper.go
- reduce.go
- reduce_config.go
- reducedot_wrapper.go
- reducemaxabs_wrapper.go
- reducemaxdiff_wrapper.go
- reducemaxvecdiff2_wrapper.go
- reducemaxvecnorm2_wrapper.go
- reducesum_wrapper.go
- rk23.go
- slice.go
- solver.go
- streampool.go
- sum.go
- uniaxialanisotropy.go
- uniaxialanisotropy_wrapper.go
- util.go
- zhangli.go
- zhangli_wrapper.go