def METHOD_NAME(self, var, matrix, RHSvector):
    self.var = var
    if hasattr(self, 'matrix'):
        self.matrix.matrix = matrix.matrix
    else:
        self.matrix = matrix
    self.RHSvector = RHSvector