wolffd@0: function pot = set_domain_pot(pot, domain) wolffd@0: % SET_DOMAIN_POT Change the domain of a potential (cgpot) wolffd@0: % pot = set_domain_pot(pot, domain) wolffd@0: wolffd@0: delta = domain(1) - pot.domain(1); wolffd@0: assert(all(domain == pot.domain + delta)); wolffd@0: pot.domain = pot.domain + delta; wolffd@0: pot.ddom = pot.ddom + delta; wolffd@0: pot.cdom = pot.cdom + delta; wolffd@0: cdomain = pot.cdom; wolffd@0: n = prod(pot.dsizes); wolffd@0: if(pot.subtype == 'm') wolffd@0: for i = 1: n wolffd@0: pot.mom{i} = set_domain_pot(pot.mom{i}, cdomain); wolffd@0: end wolffd@0: end wolffd@0: if(pot.subtype == 'c') wolffd@0: for i = 1: n wolffd@0: pot.can{i} = set_domain_pot(pot.can{i}, cdomain); wolffd@0: end wolffd@0: end