[Trilinos-Users] implementing periodic boundary conditions with Epetra_Import

Jonas Thies J.Thies at rug.nl
Thu Jan 29 03:21:51 MST 2009


Hi All,

I' trying to do something like this:

compute F(u) on a periodic domain, u(0) = u(n), u(n+1)=u(1)
So I use a standard map

M1 = 1 2 3 ... n

and an overlapping map which looks like this:

M2 = n 1 2 3 ... n 1

then I create an importer:

imp = new Epetra_Import(M2,M1);

As far as I know M1=>M2 works just fine:

u2.Import(u1,*imp,Zero));

but after computing f, I want to go back

f1.Export(f2,*imp,Zero));

whereupon the values are messed up (note that the overlap is NOT on a
remote process!). If the overlapping copy is

f2 = n' 1 2 3 ...n 1'

then the result is

f1 = 1' 2 3 ... n

Is there any way to redefine the way in which duplicate indices on the
same process are treated? Any other ideas how to do this?

thanks a lot,
Jonas




More information about the Trilinos-Users mailing list