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.
pgpP_pR40MZgH.pgp
Description: OpenPGP digital signature
_______________________________________________ Users mailing list [email protected] http://lists.einsteintoolkit.org/mailman/listinfo/users
