def getTetragridM(elementNode, prefix, tetragrid):
 keysM = getKeysM(prefix)
 evaluatedDictionary = evaluate.getEvaluatedDictionaryByEvaluationKeys(elementNode, keysM)
 if (len(evaluatedDictionary.keys()) < 1):
  return tetragrid
 for row in xrange(4):
  for column in xrange(4):
   key = getKeyM(row, column, prefix)
   if (key in evaluatedDictionary):
    value = evaluatedDictionary[key]
    if ((value == None) or (value == 'None')):
     print 'Warning, value in getTetragridM in matrix is None for key for dictionary:'
     print key
     print evaluatedDictionary
    else:
     tetragrid = getIdentityTetragrid(tetragrid)
     tetragrid[row][column] = float(value)
 euclidean.removeElementsFromDictionary(elementNode.attributes, keysM)
 return tetragrid

def getTetragridM ( elementNode , prefix , tetragrid ) : keysM = getKeysM ( prefix ) evaluatedDictionary = evaluate . getEvaluatedDictionaryByEvaluationKeys ( elementNode , keysM ) if ( len ( evaluatedDictionary . keys ( ) ) < 1 ) : return tetragrid for row in xrange ( 4 ) : for column in xrange ( 4 ) : key = getKeyM ( row , column , prefix ) if ( key in evaluatedDictionary ) : value = evaluatedDictionary [ key ] if ( ( value == None ) or ( value == 'None' ) ) : print 'Warning, value in getTetragridM in matrix is None for key for dictionary:' print key print evaluatedDictionary else : tetragrid = getIdentityTetragrid ( tetragrid ) tetragrid [ row ] [ column ] = float ( value ) euclidean . removeElementsFromDictionary ( elementNode . attributes , keysM ) return tetragrid
get the tetragrid from the elementnode letter m values .