diff options
author | Ian Hinder <ian.hinder@aei.mpg.de> | 2010-12-06 17:12:31 +0100 |
---|---|---|
committer | Ian Hinder <ian.hinder@aei.mpg.de> | 2010-12-06 20:36:42 +0100 |
commit | 3b7c2193b41cebf8ebb8ba3586928ace23ee720c (patch) | |
tree | 149dce1a0b3572a20773c232fee909bde74b5a71 /Auxiliary/Cactus/KrancNumericalTools | |
parent | a41bfbe853bf083bdc27f46a88e2a09252d0925d (diff) | |
parent | 8fe31b346679148fcea5d47d3508fcd2c7c8d75c (diff) |
Merge master into vector
Diffstat (limited to 'Auxiliary/Cactus/KrancNumericalTools')
-rw-r--r-- | Auxiliary/Cactus/KrancNumericalTools/GenericFD/src/GenericFD.c | 19 | ||||
-rw-r--r-- | Auxiliary/Cactus/KrancNumericalTools/GenericFD/src/GenericFD.h | 3 |
2 files changed, 22 insertions, 0 deletions
diff --git a/Auxiliary/Cactus/KrancNumericalTools/GenericFD/src/GenericFD.c b/Auxiliary/Cactus/KrancNumericalTools/GenericFD/src/GenericFD.c index ba83b89..9084f65 100644 --- a/Auxiliary/Cactus/KrancNumericalTools/GenericFD/src/GenericFD.c +++ b/Auxiliary/Cactus/KrancNumericalTools/GenericFD/src/GenericFD.c @@ -503,3 +503,22 @@ void GenericFD_PenaltyPrim2Char(cGH const * restrict const cctkGH, int const dir return; } + +void GenericFD_AssertGroupStorage(cGH const * restrict const cctkGH, const char *calc, + int ngroups, const char *group_names[ngroups]) +{ + for (int i = 0; i < ngroups; i++) + { + int result = CCTK_QueryGroupStorage(cctkGH, group_names[i]); + if (result == 0) + { + CCTK_VWarn(CCTK_WARN_ABORT, __LINE__, __FILE__, CCTK_THORNSTRING, + "Error in %s: Group \"%s\" does not have storage", calc, group_names[i]); + } + else if (result < 0) + { + CCTK_VWarn(CCTK_WARN_ABORT, __LINE__, __FILE__, CCTK_THORNSTRING, + "Error in %s: Invalid group name \"%s\"", calc, group_names[i]); + } + } +} diff --git a/Auxiliary/Cactus/KrancNumericalTools/GenericFD/src/GenericFD.h b/Auxiliary/Cactus/KrancNumericalTools/GenericFD/src/GenericFD.h index 7d8a13d..d9ead13 100644 --- a/Auxiliary/Cactus/KrancNumericalTools/GenericFD/src/GenericFD.h +++ b/Auxiliary/Cactus/KrancNumericalTools/GenericFD/src/GenericFD.h @@ -708,6 +708,9 @@ void GenericFD_GetBoundaryInfo(cGH const * restrict cctkGH, int * restrict is_physbnd, int * restrict is_ipbnd); +void GenericFD_AssertGroupStorage(cGH const * restrict const cctkGH, const char *calc, + int ngroups, const char *group_names[]); + #if 0 /* Finite differencing near boundaries */ |