[Developers] patch: AEIThorns/BSSN_MoL: add new boundary option "nothing at all"
Jonathan Thornburg
jthorn at aei.mpg.de
Sat May 14 11:15:54 CDT 2005
Hi,
As of current CVS, AEIThorns/BSSN_MoL has a number of different
boundary options, all implemented via thorn Boundary. Unfortunately,
* Boundary doesn't (yet) grok multiple patches: it aborts with a level-0
error if an attempt is made to register multiple boundary conditions
for the same face of "the" grid.
* BSSN_MoL schedules code in src/Constraints.F in local mode, so it
will run once for each patch... and this code calls
Boundary_SelectGroupForBC() to register a boundary condition
I propose the enclosed patch to "fix" this behavior:
It adds a new option to BSSN_MoL::bound:
# if this next option is selected,
# this thorn completely skips all boundary processing,
# in particular it doesn't register anything with thorn Boundary
"nothing at all" :: "don't do any boundary processing at all"
and if this is selected, it skips the Boundary registration.
So far as I know, no existing code or par files are affected by this
change: the new option is *not* the default, and if not selected, the
existing behavior of this thorn is unchanged.
Are there any objections to my applying this patch?
ciao,
--
-- Jonathan Thornburg <jthorn at aei.mpg.de>
Max-Planck-Institut fuer Gravitationsphysik (Albert-Einstein-Institut),
Golm, Germany, "Old Europe" http://www.aei.mpg.de/~jthorn/home.html
"Washing one's hands of the conflict between the powerful and the
powerless means to side with the powerful, not to be neutral."
-- quote by Freire / poster by Oxfam
-------------- next part --------------
Index: param.ccl
===================================================================
RCS file: /numrelcvs/AEIThorns/BSSN_MoL/param.ccl,v
retrieving revision 1.19
diff -u -r1.19 param.ccl
--- param.ccl 29 Sep 2004 21:00:44 -0000 1.19
+++ param.ccl 14 May 2005 16:15:31 -0000
@@ -114,8 +114,14 @@
KEYWORD bound "Boundary condition to implement"
{
- "flat" :: "Flat boundary condition"
+ # if this next option is selected,
+ # this thorn completely skips all boundary processing,
+ # in particular it doesn't register anything with thorn Boundary
+ "nothing at all" :: "don't do any boundary processing at all"
+ # if any of the following options is selected,
+ # this thorn registers boundary conditions with thorn Boundary
"none" :: "No boundary condition"
+ "flat" :: "Flat boundary condition"
"static" :: "Boundaries held fixed"
"zero" :: "Zero boundary condition"
"minkowski" :: "Minkowski Dirichlet boundary condition"
Index: schedule.ccl
===================================================================
RCS file: /numrelcvs/AEIThorns/BSSN_MoL/schedule.ccl,v
retrieving revision 1.27
diff -u -r1.27 schedule.ccl
--- schedule.ccl 31 Jan 2005 14:36:58 -0000 1.27
+++ schedule.ccl 14 May 2005 16:15:31 -0000
@@ -283,6 +283,9 @@
} "Trace A removal"
}
+
+if (! CCTK_Equals(bound, "nothing at all"))
+{
####################################
### BOUNDARY TERMS THE MOL WAY ###
####################################
@@ -342,6 +345,7 @@
schedule GROUP ApplyBCs as BSSN_MoL_ApplyBCs in ADM_BSSN_PostStep after ADM_BSSN_Boundaries
{
} "Apply boundary conditions controlled by thorn Boundary"
+}
#########################################
### UPDATE THE STANDARD ADM VARIABLES ###
Index: src/Constraints.F
===================================================================
RCS file: /numrelcvs/AEIThorns/BSSN_MoL/src/Constraints.F,v
retrieving revision 1.5
diff -u -r1.5 Constraints.F
--- src/Constraints.F 8 Dec 2004 15:53:16 -0000 1.5
+++ src/Constraints.F 14 May 2005 16:15:31 -0000
@@ -89,9 +89,12 @@
#include "macro/BSMOMSTD_undefine.h"
#include "macro/BSGAMMA_undefine.h"
- ierr = Boundary_SelectGroupForBC
- $ (cctkGH, CCTK_ALL_FACES, 1, -1,
- $ "ADM_BSSN::ADM_BSSN_cons", "Flat")
- if (ierr/=0) call CCTK_WARN(0, "error trying to select Flat BC for ADM_BSSN::ADM_BSSN_cons")
+ if (.not. CCTK_Equals(bound, "nothing at all")) then
+ ierr = Boundary_SelectGroupForBC
+ $ (cctkGH, CCTK_ALL_FACES, 1, -1,
+ $ "ADM_BSSN::ADM_BSSN_cons", "Flat")
+ if (ierr/=0)
+ $ call CCTK_WARN(0, "error trying to select Flat BC for ADM_BSSN::ADM_BSSN_cons")
+ end if
end subroutine ADM_BSSN_Constraints
Index: doc/documentation.tex
===================================================================
RCS file: /numrelcvs/AEIThorns/BSSN_MoL/doc/documentation.tex,v
retrieving revision 1.19
diff -u -r1.19 documentation.tex
--- doc/documentation.tex 8 Jan 2005 19:37:31 -0000 1.19
+++ doc/documentation.tex 14 May 2005 16:15:32 -0000
@@ -585,6 +585,9 @@
({\tt staticrad}) and also a generalization of the latter to improve
the results in the case of a rotating frame ({\tt newrad}).
+There is also an option ({\tt "nothing at all"}) to skip all boundary
+processing; at present this is mainly useful for multipatch runs.
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{thebibliography}{10}
More information about the Developers
mailing list