コード例 #1
0
 def FBRot(self, vec_in):
     if 'KxShift' in self.Configs:
         return chimera.fb_rot_env(np.empty_like(self.Data['vec_fb']),
                                   vec_in, *self.Args['FBDiff'])
     else:
         return chimera.fb_rot(np.empty_like(self.Data['vec_fb']), vec_in,
                               *self.Args['FBDiff'])
コード例 #2
0
 def B2G_FBRot(self):
     if 'KxShift' in self.Args:
         self.Data['EG_fb'][:,:,:,3:] = chimera.fb_rot_env(\
           self.Data['EG_fb'][:,:,:,3:],self.Data['B_fb'],*self.Args['FBDiff'])
     else:
         self.Data['EG_fb'][:,:,:,3:] = chimera.fb_rot(\
           self.Data['EG_fb'][:,:,:,3:],self.Data['B_fb'],*self.Args['FBDiff'])
コード例 #3
0
 def FBRot(self):
     if 'KxShift' in self.Args:
         self.Data['vec_fb'] = chimera.fb_rot_env(\
           np.empty_like(self.Data['vec_fb']),self.Data['vec_fb'],\
           *self.Args['FBDiff'])
     else:
         self.Data['vec_fb'] = chimera.fb_rot(\
           np.empty_like(self.Data['vec_fb']),self.Data['vec_fb'],\
           *self.Args['FBDiff'])
コード例 #4
0
 def G2B_FBRot(self):
     if 'KxShift' in self.Configs:
         self.Data['B_fb'] = chimera.fb_rot_env(
             self.Data['B_fb'], self.Data['EG_fb'][:, :, :, 3:],
             *self.Args['FBDiff'])
     else:
         self.Data['B_fb'] = chimera.fb_rot(self.Data['B_fb'],
                                            self.Data['EG_fb'][:, :, :, 3:],
                                            *self.Args['FBDiff'])
     self.Data['B_fb'] = chimera.omp_mult_vec(self.Data['B_fb'],
                                              self.Args['PoissFact'])
コード例 #5
0
    def G2B_FBRot(self):
        """
		Calculate the magnetic field from G=rot(B);

		Comments
		--------
		wrapper for the OMP-vectorized Fortran subroutines

		"""

        if 'KxShift' in self.Args:
            self.Data['B_fb'] = chimera.fb_rot_env(self.Data['B_fb'],\
              self.Data['EG_fb'][:,:,:,3:],*self.Args['FBDiff'])
        else:
            self.Data['B_fb'] = chimera.fb_rot(self.Data['B_fb'],\
              self.Data['EG_fb'][:,:,:,3:],*self.Args['FBDiff'])
        self.Data['B_fb'] = chimera.omp_mult_vec(\
          self.Data['B_fb'], self.Args['PoissFact'])