Example #1
0
    def sundials_rhs(self, t, y, ydot):
        """
        The right hand side of the LLG equation
        """

        self.t = t

        # already synchronized when call this funciton
        # self.spin[:]=y[:]

        self.compute_effective_field(t)

        clib.compute_llg_rhs(ydot,
                             self.spin,
                             self.field,
                             self._alpha,
                             self._pins,
                             self.gamma,
                             self.mesh.n,
                             self.do_precession,
                             self.default_c
                             )

        # ydot[:] = self.dm_dt[:]

        return 0
Example #2
0
 def step_rhs(self, t, y):
     self.t = t
     self.compute_effective_field(t)
     clib.compute_llg_rhs(self.dm_dt,
                          self.spin,
                          self.field,
                          self.alpha,
                          self._pins,
                          self.gamma,
                          self.n,
                          self.do_procession,
                          self.default_c)
     return self.dm_dt
Example #3
0
File: llg.py Project: owlas/fidimag
 def step_rhs(self, t, y):
     self.t = t
     self.compute_effective_field(t)
     clib.compute_llg_rhs(self.dm_dt,
                          self.spin,
                          self.field,
                          self.alpha,
                          self._pins,
                          self.gamma,
                          self.n,
                          self.do_precession,
                          self.default_c)
     return self.dm_dt
Example #4
0
    def sundials_rhs(self, t, y, ydot):

        self.t = t

        # already synchronized when call this funciton
        # self.spin[:]=y[:]

        self.compute_effective_field(t)

        clib.compute_llg_rhs(
            ydot, self.spin, self.field, self.alpha, self._pins, self.gamma, self.n, self.do_procession, self.default_c
        )

        # ydot[:] = self.dm_dt[:]

        return 0
Example #5
0
    def sundials_rhs(self, t, y, ydot):

        self.t = t

        # already synchronized when call this funciton
        # self.spin[:]=y[:]

        self.compute_effective_field(t)

        clib.compute_llg_rhs(ydot, self.spin, self.field, self.alpha,
                             self._pins, self.gamma, self.n,
                             self.do_precession, self.default_c)

        #ydot[:] = self.dm_dt[:]

        return 0
Example #6
0
    def step_rhs(self, t, y):
        self.spin[:] = y[:]
        self.t = t

        # From the micro_driver class:
        self.compute_effective_field(t)

        clib.compute_llg_rhs(self.dm_dt,
                             self.spin,
                             self.field,
                             self.alpha,
                             self._pins,
                             self.gamma,
                             self.n,
                             self.do_precession,
                             self.default_c
                             )
        return self.dm_dt