'Assign data to the ``metric`` tensor. The metric tensor behaves in an
anomalous way when raising and lowering indices.
A fully covariant metric is the inverse transpose of the fully
contravariant metric (it is meant matrix inverse). If the metric is
symmetric, the transpose is not necessary and mixed
covariant/contravariant metrics are Kronecker deltas.'

def add_metric_data(self, metric, data):

    self._substitutions_dict_tensmul[(metric, True, True)] = data
    inverse_transpose = self.inverse_transpose_matrix(data)
    self._substitutions_dict_tensmul[(metric, False, False)] = inverse_transpose
    m = data.tomatrix()
    invt = inverse_transpose.tomatrix()
    self._substitutions_dict_tensmul[(metric, True, False)] = (m * invt)
    self._substitutions_dict_tensmul[(metric, False, True)] = (invt * m)
