def skyrmion_number(self): nx = self.mesh.nx ny = self.mesh.ny nz = self.mesh.nz number = clib.compute_skyrmion_number(self.spin, self._skx_number, nx, ny, nz, self.mesh.neighbours) return number
def skyrmion_number(self): nx = self.mesh.nx ny = self.mesh.ny nz = self.mesh.nz number = clib.compute_skyrmion_number( self.spin, self._skx_number, nx, ny, nz, self.mesh.neighbours) return number
def skyrmion_number(self, method='FiniteSpinChirality'): """ Calculate the skyrmion number using different methods: method :: 'FiniteSpinChirality', 'BergLuscher' which are specifically defined for discrete spin lattices. Calling this function will fill the _skx_number array with the skyrmion number density per lattice site. It is important to mention that this calculation only works for a 2D layer in the XY plane. See the corresponding C code at fidimag/atomistic/lib/util.c for a detailed documentation about the methods. """ nx = self.mesh.nx ny = self.mesh.ny nz = self.mesh.nz if method == 'FiniteSpinChirality': if self.mesh.mesh_type == 'cuboid': number = clib.compute_skyrmion_number(self.spin, self._skx_number, nx, ny, nz, self.mesh.neighbours, self.mesh.n_ngbs) else: raise ValueError('FiniteSpinChirality method only' ' defined for cuboid meshes') elif method == 'BergLuscher': number = clib.compute_skyrmion_number_BergLuscher( self.spin, self._skx_number, nx, ny, nz, self.mesh.neighbours, self.mesh.n_ngbs) else: raise ValueError('Specify a valid method') return number
def skyrmion_number(self, method='FiniteSpinChirality'): """ Calculate the skyrmion number using different methods: method :: 'FiniteSpinChirality', 'BergLuscher' which are specifically defined for discrete spin lattices. Calling this function will fill the _skx_number array with the skyrmion number density per lattice site. It is important to mention that this calculation only works for a 2D layer in the XY plane. See the corresponding C code at fidimag/atomistic/lib/util.c for a detailed documentation about the methods. """ nx = self.mesh.nx ny = self.mesh.ny nz = self.mesh.nz if method == 'FiniteSpinChirality': if self.mesh.mesh_type == 'cuboid': number = clib.compute_skyrmion_number( self.spin, self._skx_number, nx, ny, nz, self.mesh.neighbours) else: raise ValueError('FiniteSpinChirality method only' ' defined for cuboid meshes') elif method == 'BergLuscher': number = clib.compute_skyrmion_number_BergLuscher( self.spin, self._skx_number, nx, ny, nz, self.mesh.neighbours) else: raise ValueError('Specify a valid method') return number