parameters: (self,keyword)
return_statement: return matrixUpdated
docstring: This method reads from the punch file the definition of nondiagonal structural
      matrices.
docstring_summary: This method reads from the punch file the definition of nondiagonal structural
      matrices.
docstring_tokens: This method reads from the punch file the definition of nondiagonal structural matrices .
function: def __readNonDiagonalMatrix(self,keyword):
      """
      This method reads from the punch file the definition of nondiagonal structural
      matrices.
      """
  
      matrixUpdated = False
  
      with open(self.Punch_file,'r') as punchfile:
  
        while 1:
          line = punchfile.readline()
          if not line:
            break
  
          pos = line.find(keyword)
          if pos != -1:
            while 1:
              line = punchfile.readline()
              line = line.strip('\r\n').split()
              if line[0] != '-CONT-':
                i = int(line[0])-1
                j = 0
                el = line[1:]
                ne = len(el)
              elif line[0] == '-CONT-':
                el = line[1:]
                ne = len(el)
              if keyword == 'NDK':
                self.K[i][j:j+ne] = np.array(el)
              elif keyword == 'NDM':
                self.M[i][j:j+ne] = np.array(el)
              elif keyword == 'NDC':
                self.C[i][j:j+ne] = np.array(el)
              j = j+ne
              if i+1 == self.nDof and j == self.nDof:
                matrixUpdated = True
                break
  
      return matrixUpdated
function_tokens: def __readNonDiagonalMatrix ( self , keyword ) : matrixUpdated = False with open ( self . Punch_file , 'r' ) as punchfile : while 1 : line = punchfile . readline ( ) if not line : break pos = line . find ( keyword ) if pos != - 1 : while 1 : line = punchfile . readline ( ) line = line . strip ( '\r\n' ) . split ( ) if line [ 0 ] != '-CONT-' : i = int ( line [ 0 ] ) - 1 j = 0 el = line [ 1 : ] ne = len ( el ) elif line [ 0 ] == '-CONT-' : el = line [ 1 : ] ne = len ( el ) if keyword == 'NDK' : self . K [ i ] [ j : j + ne ] = np . array ( el ) elif keyword == 'NDM' : self . M [ i ] [ j : j + ne ] = np . array ( el ) elif keyword == 'NDC' : self . C [ i ] [ j : j + ne ] = np . array ( el ) j = j + ne if i + 1 == self . nDof and j == self . nDof : matrixUpdated = True break return matrixUpdated