Esempio n. 1
0
 def get_num_cells(self):
     solution = IO()
     solution.path = self.path
     solution.file_prefix = self.file_prefix
     solution.frame = 0
     solution.read_aux = False
     solution.read_petsc()
     self.__setattr__('num_cells',solution.x.centers.size)
     return self
Esempio n. 2
0
 def _PlotFrame(self,frame):
     solution = IO()
     solution.path = self.path
     solution.file_prefix = self.file_prefix
     solution.frame = frame
     solution.read_aux = True
     solution.read_petsc()
     if solution.num_dim==1:
         self.PlotQ1D(solution)
     if solution.num_dim==2:
         self.PlotQ2D(solution)
Esempio n. 3
0
 def PlotFrames(self):
     solution = IO()
     solution.path = self.path
     solution.file_prefix = self.file_prefix
     for frame in self.plot_frames:
         solution.frame = frame
         solution.read_aux = True
         solution.read_petsc()
         if solution.num_dim==1:
             self.PlotQ1D(solution)
         if solution.num_dim==2:
             self.PlotQ2D(solution)
Esempio n. 4
0
 def post_frame_calc(self,frame):
     solution = IO()
     solution.path = self.path
     solution.file_prefix = self.file_prefix
     solution.frame = frame
     solution.read_aux = True
     solution.read_petsc()
     if solution.num_dim==1:
         self.QuadField1D(solution,self.quad)
         self.EMEnergy(solution)
     elif solution.num_dim==2:
         self.QuadField2D(solution,self.quad)
Esempio n. 5
0
    def get_num_dim(self):
        solution = IO()
        solution.path = self.path
        solution.file_prefix = self.file_prefix
        solution.frame = 50
        solution.read_aux = True
        solution.read_petsc()
        self.__setattr__('num_dim',solution.num_dim)
        if self.num_dim==1:
            self.RefIndex1D(solution)
        if self.num_dim==2:
            self.RefIndex2D(solution)

        self.__setattr__('cmax',self.co/self.n.min())
        self.__setattr__('cmin',self.co/self.n.max())

        return self