ianhinder / Kranc

A Mathematica package for generating code for solving time dependent partial differential equations
http://kranccode.org
GNU General Public License v2.0
29 stars 10 forks source link

Call Cactus boundary conditions after every sync #54

Open eschnett opened 12 years ago

eschnett commented 12 years ago

Every time a grid function is synchronised, this is most likely done because boundary points are undefined. Synchronising along doesn't fill outer boundaries and symmetry boundaries, and thus the Cactus boundary conditions should be applied at this time as well.

Even if no Cactus outer boundary conditions are desired, then the symmetry/inter-patch boundary conditions are still needed.

This needs to happen for every grid function, for every sync, not just once per time step for the evolved variables. (And if the evolved variables never need synchronisation, they most likely also never need boundary conditions applied.)

stevenrbrandt commented 12 years ago

Let me understand, synchronizing doesn't fill in outer boundaries of refined regions?

Cheers, Steve

On Sun, Feb 26, 2012 at 11:22 AM, Erik Schnetter reply@reply.github.com wrote:

Every time a grid function is synchronised, this is most likely done because boundary points are undefined. Synchronising along doesn't fill outer boundaries and symmetry boundaries, and thus the Cactus boundary conditions should be applied at this time as well.

Even if no Cactus outer boundary conditions are desired, then the symmetry/inter-patch boundary conditions are still needed.

This needs to happen for every grid function, for every sync, not just once per time step for the evolved variables. (And if the evolved variables never need synchronisation, they most likely also never need boundary conditions applied.)


Reply to this email directly or view it on GitHub: https://github.com/ianhinder/Kranc/issues/54

eschnett commented 12 years ago

Synchronising fills the ghost zones, which include (1) inter-processor ghost zones and (2) prolongation boundaries (i.e. fine grid boundaries). It does not fill outer boundaries or symmetry boundaries. If a fine grid abuts the boundary (e.g. because it is located near the outer boundary or near a symmetry boundary), then synchronisation will not fill these fine grid boundaries either.

-erik

On Tue, Feb 28, 2012 at 7:22 AM, Steven R. Brandt reply@reply.github.com wrote:

Let me understand, synchronizing doesn't fill in outer boundaries of refined regions?

Cheers, Steve

On Sun, Feb 26, 2012 at 11:22 AM, Erik Schnetter reply@reply.github.com wrote:

Every time a grid function is synchronised, this is most likely done because boundary points are undefined. Synchronising along doesn't fill outer boundaries and symmetry boundaries, and thus the Cactus boundary conditions should be applied at this time as well.

Even if no Cactus outer boundary conditions are desired, then the symmetry/inter-patch boundary conditions are still needed.

This needs to happen for every grid function, for every sync, not just once per time step for the evolved variables. (And if the evolved variables never need synchronisation, they most likely also never need boundary conditions applied.)


Reply to this email directly or view it on GitHub: https://github.com/ianhinder/Kranc/issues/54


Reply to this email directly or view it on GitHub: https://github.com/ianhinder/Kranc/issues/54#issuecomment-4214628

Erik Schnetter schnetter@gmail.com http://www.perimeterinstitute.ca/personal/eschnetter/

ianhinder commented 12 years ago

As I understand this issue, the aim is to have sync and boundaries as part of the same operation at the Kranc level. So the logic which determined when one occurs should apply to the other as well. This should simplify some things.

As an aside, if you specify Schedule -> Automatic for a calculation, then this calculation is performed in its own group in MoL_PseudoEvolution. If the calculation is not performed Everywhere, boundary conditions are applied. This is the only way to compute analysis quantities and have them prolongated - you cannot use the ANALYSIS timebin for this. So all analysis quantities should be scheduled as Schedule -> Automatic.