[Users] boundary conditions with Llama

Haas, Roland rhaas at illinois.edu
Tue Jun 18 08:41:13 CDT 2019


Hello Miguel,

> i now have a follow-up question... i would like to experiment with
> different boundary conditions, which i would like to implement
> myself. i had a look at LlamaWaveToy to see how it's implemented
> therein; would the following be a correct way of looping through the
> outer boundary points (assuming the boundary to be a spherical shell,
> as in LlamaWaveToy)?
> 
>    reflevel = GetRefinementLevel(cctkGH)
>    map      = MultiPatch_GetMap(cctkGH)
>    if (reflevel /= 0 .or. map == 0) return
> 
>    do j = 1, cctk_lsh(2)
>       do i = 1, cctk_lsh(1)
>          do k = cctk_lsh(3)-cctk_nghostzones(3)+1, cctk_lsh(3)
>             if (Sn(i,j,k) == -2) then
> 
>               [my BCs go here]
> 
>             end if
>          end do
>       end do
>    end do

Uhmm, probably not quite. The code should use the cctk_bbox(6) array
which has entries 0 or 1 depending on whether a face is an outer (or
symmetry) boundary or not. 

The indexing is i = 1 + 2*idir + iface where idir = 0,1,2 and iface =
0,1 (lower, upper face).

The loops are kind of inefficient as you should have the "k" loop as
the outer one (as usual). Using cctk_nghostzones(3) as the boundary
width is not quite correct as technically you should use the boundary
width returned by thorn CoordBase's GetBoundarySpecification aliased
function (see its interface.ccl).

Yours,
Roland

-- 
My email is as private as my paper mail. I therefore support encrypting
and signing email messages. Get my PGP key from http://keys.gnupg.net.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
Url : http://lists.einsteintoolkit.org/pipermail/users/attachments/20190618/b7b1a068/attachment.bin 


More information about the Users mailing list