User: rhaas Date: 2012/01/24 02:26 PM
Modified: /trunk/ interface.ccl, param.ccl /trunk/src/ SetMask.c
Log: support named spherical surfaces
File Changes:
Directory: /trunk/src/ ======================
File [modified]: SetMask.c Delta lines: +2 -1 =================================================================== --- trunk/src/SetMask.c 2011-10-25 18:45:25 UTC (rev 113) +++ trunk/src/SetMask.c 2012-01-24 20:26:51 UTC (rev 114) @@ -1,6 +1,7 @@ #include "cctk.h" #include "cctk_Arguments.h" #include "cctk_Parameters.h" +#include "cctk_Functions.h"
#include "loopcontrol.h" #include "HydroBase.h" @@ -16,7 +17,7 @@
for (int smi = 0; smi < 10; smi++) { - CCTK_INT sfi = SetMask_SurfaceIndex[smi]; + CCTK_INT sfi = sf_IdFromName(SetMask_SurfaceIndex[smi], SetMask_SurfaceName[smi]); if (sfi >= 0 && sf_active[sfi] && sf_valid[sfi] >= 0) { #pragma omp parallel
Directory: /trunk/ ==================
File [modified]: interface.ccl Delta lines: +5 -0 =================================================================== --- trunk/interface.ccl 2011-10-25 18:45:25 UTC (rev 113) +++ trunk/interface.ccl 2012-01-24 20:26:51 UTC (rev 114) @@ -5,3 +5,8 @@ inherits: HydroBase SphericalSurface
USES INCLUDE: HydroBase.h + +# translate SphericalSurface name into ID +CCTK_INT \ +FUNCTION sf_IdFromName (CCTK_INT IN id, CCTK_POINTER_TO_CONST IN name) +USES FUNCTION sf_IdFromName
File [modified]: param.ccl Delta lines: +5 -0 =================================================================== --- trunk/param.ccl 2011-10-25 18:45:25 UTC (rev 113) +++ trunk/param.ccl 2012-01-24 20:26:51 UTC (rev 114) @@ -14,6 +14,11 @@ -1:* :: "-1 to disable (default), >=0 for index" } -1
+CCTK_String SetMask_SurfaceName[10] "Name of spherical surface to use to set mask" STEERABLE=always +{ + ".*":: "emtpy to use SetMask_SurfaceIndex, any other string to use" +} "" + CCTK_REAL SetMask_RadiusFactor[10] "Factor to modify radius of surface for mask" STEERABLE=always { 0:* :: "Some positive factor, default: 1"
commits@lists.einsteintoolkit.org