Пример #1
0
    def __init__(self):
        """
        Class used to initialize the different arrays
        Size of arrays depends on the type of mesh
   
        Variables:

        x           : variable containing the x position of the nodes
        y           : variable containing the y position of the nodes 
        
        dom_size	: number of nodes in the domain
        nodes       : |id of node|y position of node|x position of node|
        neig        : |id of node|neighbor 1|neighbor 2| ...  
                      in neig : -1 = no more neighbors, -2 = wall, -3 = symetry
        """

        Input.__init__(self)

        self.x = np.linspace(0, self.Lx / 2, self.Nptsx)
        self.y = np.linspace(self.Lx / 2, self.Ly - self.Lx / 2, self.Nptsy)

        if (self.mesh_type == 'cart'):
            self.dom_size = self.Nptsx * self.Nptsy
            self.nodes = np.zeros((self.dom_size, 3))
            self.neig = np.zeros((self.dom_size, 6))
        else:
            self.dom_size = self.Nptsx * self.Nptsy + 2 * (self.Nptsx -
                                                           1) * self.ntheta
            self.nodes = np.zeros((self.dom_size, 3))
            self.neig = np.zeros((self.dom_size, 5 + self.ntheta))
Пример #2
0
 def __init__(self, id, function):
     Input.__init__(self, id, function)
Пример #3
0
 def __init__(self, id, function):
     Input.__init__(self, id, function)