Exemple #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
Exemple #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
Exemple #3
0
Fichier : map.py Projet : krox/gpt
 def _promote(fine, coarse):
     assert fine[0].checkerboard().__name__ == basis[0].checkerboard().__name__
     cgpt.block_promote(self.obj, coarse, fine)