Exemplo n.º 1
0
def promote(coarse, fine, basis):
    cot = coarse.otype
    fot = fine.otype
    tmp = gpt.lattice(fine)
    fine[:] = 0
    for i in cot.v_idx:
        for j in fot.v_idx:
            cgpt.block_promote(coarse.v_obj[i], tmp.v_obj[j],
                               basis[cot.v_n0[i]:cot.v_n1[i]], j)
        fine += tmp
Exemplo n.º 2
0
def promote(coarse, fine, basis):
    assert len(basis) > 0
    cot = coarse.otype
    fot = fine.otype
    fine.checkerboard(basis[0].checkerboard())
    tmp = gpt.lattice(fine)
    fine[:] = 0
    for i in cot.v_idx:
        for j in fot.v_idx:
            cgpt.block_promote(coarse.v_obj[i], tmp.v_obj[j],
                               basis[cot.v_n0[i]:cot.v_n1[i]], j)
        fine += tmp
    return fine
Exemplo n.º 3
0
Arquivo: map.py Projeto: krox/gpt
 def _promote(fine, coarse):
     assert fine[0].checkerboard().__name__ == basis[0].checkerboard().__name__
     cgpt.block_promote(self.obj, coarse, fine)