def getTetragridC(elementNode, prefix, tetragrid):
 columnKeys = 'Pc1 Pc2 Pc3 Pc4'.replace('P', prefix).split()
 evaluatedDictionary = evaluate.getEvaluatedDictionaryByEvaluationKeys(elementNode, columnKeys)
 if (len(evaluatedDictionary.keys()) < 1):
  return tetragrid
 for (columnKeyIndex, columnKey) in enumerate(columnKeys):
  if (columnKey in evaluatedDictionary):
   value = evaluatedDictionary[columnKey]
   if ((value == None) or (value == 'None')):
    print 'Warning, value in getTetragridC in matrix is None for columnKey for dictionary:'
    print columnKey
    print evaluatedDictionary
   else:
    tetragrid = getIdentityTetragrid(tetragrid)
    for (elementIndex, element) in enumerate(value):
     tetragrid[elementIndex][columnKeyIndex] = element
 euclidean.removeElementsFromDictionary(elementNode.attributes, columnKeys)
 return tetragrid

def getTetragridC ( elementNode , prefix , tetragrid ) : columnKeys = 'Pc1 Pc2 Pc3 Pc4' . replace ( 'P' , prefix ) . split ( ) evaluatedDictionary = evaluate . getEvaluatedDictionaryByEvaluationKeys ( elementNode , columnKeys ) if ( len ( evaluatedDictionary . keys ( ) ) < 1 ) : return tetragrid for ( columnKeyIndex , columnKey ) in enumerate ( columnKeys ) : if ( columnKey in evaluatedDictionary ) : value = evaluatedDictionary [ columnKey ] if ( ( value == None ) or ( value == 'None' ) ) : print 'Warning, value in getTetragridC in matrix is None for columnKey for dictionary:' print columnKey print evaluatedDictionary else : tetragrid = getIdentityTetragrid ( tetragrid ) for ( elementIndex , element ) in enumerate ( value ) : tetragrid [ elementIndex ] [ columnKeyIndex ] = element euclidean . removeElementsFromDictionary ( elementNode . attributes , columnKeys ) return tetragrid
get the matrix tetragrid from the elementnode letter c values .