Beispiel #1
0
    def compute_field(self, t=0, spin=None):

        if spin is not None:
            m = spin
        else:
            m = self.spin

        if self.dmi_type == 'bulk':
            clib.compute_dmi_field(m,
                                   self.field,
                                   self.energy,
                                   self.D,
                                   self.neighbours,
                                   self.n)

        elif self.dmi_type == 'interfacial':

            clib.compute_dmi_field_interfacial(m,
                                               self.field,
                                               self.energy,
                                               self.D,
                                               self.neighbours,
                                               self.n,
                                               self.nneighbours,
                                               self.DMI_vector
                                               )

        return self.field * self.mu_s_inv
Beispiel #2
0
    def compute_field(self, t=0, spin=None):

        if spin is not None:
            m = spin
        else:
            m = self.spin

        if self.dmi_type == 'bulk':
            clib.compute_dmi_field(m, self.field, self.energy, self.D,
                                   self.neighbours, self.n)

        elif self.dmi_type == 'interfacial':

            clib.compute_dmi_field_interfacial(m, self.field, self.energy,
                                               self.D, self.neighbours, self.n,
                                               self.nneighbours,
                                               self.DMI_vector)

        return self.field * self.mu_s_inv
Beispiel #3
0
    def compute_field(self, t=0, spin=None):

        if spin is not None:
            m = spin
        else:
            m = self.spin

        if self.dmi_type == 'bulk':
            clib.compute_dmi_field(m,
                                   self.field,
                                   self.energy,
                                   self.D,
                                   self.neighbours,
                                   self.n)

        elif self.dmi_type == 'interfacial':

            # We will generate the Dzyaloshinskii vectors according
            # to the lattice, for the Interfacial DMI
            # TODO: Move this at the beginning so we don't compute the vectors
            # every time we update the field
            if self.mesh_type == 'hexagonal':
                self.nneighbours = 6
                # rdim = 3

            elif self.mesh_type == 'cuboid':
                self.nneighbours = 4
                # rdim = 3

            self.DMI_vector = self.compute_DMI_vectors(self.nneighbours)

            clib.compute_dmi_field_interfacial(m,
                                               self.field,
                                               self.energy,
                                               self.D,
                                               self.neighbours,
                                               self.n,
                                               self.nneighbours,
                                               self.DMI_vector
                                               )

        return self.field * self.mu_s_inv