diff options
author | schnetter <schnetter@a491c6a4-70bf-4b89-8b36-d6c0cb1f094e> | 2005-09-26 00:44:12 +0000 |
---|---|---|
committer | schnetter <schnetter@a491c6a4-70bf-4b89-8b36-d6c0cb1f094e> | 2005-09-26 00:44:12 +0000 |
commit | 383661c143028379377dd778fd362e1b6585f8cc (patch) | |
tree | 91386e25675a2743794090eeb28223dc280ba7e1 /src/MaskUtils.c | |
parent | 7e93921cbc6a5e323a442a9982580e46b7813737 (diff) |
Introduce a new schedule group ADMBase_InitialGauge which is run just
after ADMBase_InitialData. This makes it possible to set up all ADM
data in these two groups, and then e.g. convert to the BSSN variables
after these groups still in the bin "initial". Various other thorns,
such as dissipation or multipatch, can now apply transformations to
the initial data in the bin "postinitial". This simplifies the
interaction between various thorns.
Change various thorns to use these two groups.
git-svn-id: http://svn.cactuscode.org/arrangements/CactusNumerical/SpaceMask/trunk@51 a491c6a4-70bf-4b89-8b36-d6c0cb1f094e
Diffstat (limited to 'src/MaskUtils.c')
-rw-r--r-- | src/MaskUtils.c | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/src/MaskUtils.c b/src/MaskUtils.c index 77350ac..2e9bf8e 100644 --- a/src/MaskUtils.c +++ b/src/MaskUtils.c @@ -415,10 +415,13 @@ SpaceMask_GetTypeBits(const char* type_name) { int i; - for (i=0; i<spacemask_registry->ntypes; ++i) + if (spacemask_registry != NULL) { - if (!strcmp(spacemask_registry->type_list[i]->name, type_name)) - return spacemask_registry->type_list[i]->bitmask; + for (i=0; i<spacemask_registry->ntypes; ++i) + { + if (!strcmp(spacemask_registry->type_list[i]->name, type_name)) + return spacemask_registry->type_list[i]->bitmask; + } } CCTK_VInfo (CCTK_THORNSTRING, "Type \"%s\" has not been registered.\n", @@ -443,17 +446,20 @@ SpaceMask_GetStateBits(const char* type_name, const char* state_name) SpaceMask_Type* type; int i, j; - for (i=0; i<spacemask_registry->ntypes; ++i) + if (spacemask_registry != NULL) { - if (!strcmp(spacemask_registry->type_list[i]->name, type_name)) + for (i=0; i<spacemask_registry->ntypes; ++i) { - type = spacemask_registry->type_list[i]; - for (j=0; j<type->nstates; ++j) + if (!strcmp(spacemask_registry->type_list[i]->name, type_name)) { - if (!strcmp(type->state_list[j]->name, state_name)) - return type->state_list[j]->bitmask; + type = spacemask_registry->type_list[i]; + for (j=0; j<type->nstates; ++j) + { + if (!strcmp(type->state_list[j]->name, state_name)) + return type->state_list[j]->bitmask; + } } - } + } } CCTK_VInfo (CCTK_THORNSTRING, |