diff options
-rw-r--r-- | src/Boundary.c | 32 |
1 files changed, 21 insertions, 11 deletions
diff --git a/src/Boundary.c b/src/Boundary.c index 3c73a03..3006faf 100644 --- a/src/Boundary.c +++ b/src/Boundary.c @@ -192,7 +192,8 @@ CCTK_INT Bdry_Boundary_RegisterPhysicalBC(CCTK_POINTER GH, if (!theGH) /* This is the first valid GH passed to a Boundary routine */ { theGH = GH; - } else if (GH != theGH) + } + else if (GH != theGH) { CCTK_VWarn(0, __LINE__, __FILE__, CCTK_THORNSTRING, "New GH passed to Boundary_RegisterPhysicalBC. " @@ -236,7 +237,8 @@ CCTK_INT Bdry_Boundary_RegisterPhysicalBC(CCTK_POINTER GH, "There already exists a physical boundary condition " "registered under the name \"%s\"", bc_name); retval = -2; - } else + } + else { /* Add boundary condition to table */ if (Util_TableSetFnPointer(physbc_table_handle, fn_pointer, bc_name)<0) @@ -322,7 +324,8 @@ CCTK_INT Bdry_Boundary_SelectVarForBC(CCTK_POINTER GH, CCTK_VWarn(1, __LINE__, __FILE__, CCTK_THORNSTRING, "Invalid variable name"); retval = -11; - } else + } + else { retval = Bdry_Boundary_SelectVarForBCI(GH, faces, width, table_handle, var_index, bc_name); @@ -413,7 +416,8 @@ CCTK_INT Bdry_Boundary_SelectVarForBCI(CCTK_POINTER GH, if (!theGH) /* This is the first valid GH passed to a Boundary routine */ { theGH = GH; - } else if (GH != theGH) + } + else if (GH != theGH) { CCTK_VWarn(0, __LINE__, __FILE__, CCTK_THORNSTRING, "New GH passed to Boundary_SelectVarForBCI. " @@ -707,12 +711,13 @@ CCTK_INT Bdry_Boundary_SelectGroupForBC(CCTK_POINTER GH, /* get group index */ gi = CCTK_GroupIndex(group_name); - if (!gi) + if (gi<0) { CCTK_VWarn(1, __LINE__, __FILE__, CCTK_THORNSTRING, "Invalid group name %s\n", group_name); retval = -6; - } else + } + else { /* call Bdry_Boundary_SelectGroupForBCI() */ retval = Bdry_Boundary_SelectGroupForBCI(GH, faces, width, table_handle, gi, @@ -884,7 +889,8 @@ CCTK_INT Bdry_Boundary_SelectedGVs(CCTK_POINTER GH, if (!theGH) /* This is the first valid GH passed to a Boundary routine */ { theGH = GH; - } else if (GH != theGH) + } + else if (GH != theGH) { CCTK_VWarn(0, __LINE__, __FILE__, CCTK_THORNSTRING, "New GH passed to Boundary_SelectedGVs. " @@ -1168,16 +1174,20 @@ static int entry_greater_than(struct BCVAR *new, struct BCVAR *current) if (new->table > current->table) { retval = 1; - } else if (new->table < current->table) + } + else if (new->table < current->table) { retval = 0; - } else if (new->var > current->var) + } + else if (new->var > current->var) { retval = 2; - } else if (new->var < current->var) + } + else if (new->var < current->var) { retval = 0; - } else + } + else { CCTK_VWarn(1, __LINE__, __FILE__, CCTK_THORNSTRING, "%s has already been selected for this boundary condition!", |