From c01031b1ce97594a3a3fa6b4ff298b293993ad2c Mon Sep 17 00:00:00 2001 From: rideout Date: Mon, 5 May 2003 22:44:21 +0000 Subject: Support for new method of handling boundary widths for boundary conditions. Why does a symmetry boundary condition need to bother retreiving and storing faces, widths, and tables arrays...? git-svn-id: http://svn.cactuscode.org/arrangements/CactusNumerical/Cartoon2D/trunk@70 eec4d7dc-71c2-46d6-addf-10296150bf52 --- interface.ccl | 5 +++-- src/ApplyCartoon.c | 14 ++++++++++---- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/interface.ccl b/interface.ccl index 634afed..d21c7ea 100644 --- a/interface.ccl +++ b/interface.ccl @@ -9,6 +9,7 @@ INCLUDES HEADER: Cartoon2D.h in Cartoon2D.h # Function aliases: CCTK_INT FUNCTION Boundary_SelectedGVs(CCTK_POINTER IN GH, \ - CCTK_INT IN array_size, CCTK_INT OUT var_indicies, CCTK_INT OUT faces, \ - CCTK_INT OUT table_handles, CCTK_STRING IN bc_name) + CCTK_INT IN array_size, CCTK_INT ARRAY OUT var_indicies, \ + CCTK_INT ARRAY OUT faces, CCTK_INT ARRAY OUT boundary_widths, \ + CCTK_INT ARRAY OUT table_handles, CCTK_STRING IN bc_name) USES FUNCTION Boundary_SelectedGVs diff --git a/src/ApplyCartoon.c b/src/ApplyCartoon.c index 1485405..3c398df 100644 --- a/src/ApplyCartoon.c +++ b/src/ApplyCartoon.c @@ -79,20 +79,21 @@ void Cartoon_ApplyBoundaries(CCTK_ARGUMENTS); void Cartoon_ApplyBoundaries(CCTK_ARGUMENTS) { DECLARE_CCTK_ARGUMENTS; - int num_vars, *vars, *faces, *tables, err, i, gi, group_tags_table; + int num_vars, *vars, *faces, *widths, *tables, err, i, gi, group_tags_table; char tensortype[TENSORTYPE_BUFF_SIZE]; /* Allocate memory to hold selected bcs */ - num_vars = Boundary_SelectedGVs(cctkGH, 0, NULL, NULL, NULL, NULL); + num_vars = Boundary_SelectedGVs(cctkGH, 0, NULL, NULL, NULL, NULL, NULL); #ifdef DEBUG printf("Cartoon_ApplyBoundaries: num_vars is %d\n",num_vars); #endif vars = (int *) malloc(num_vars*sizeof(int)); faces = (int *) malloc(num_vars*sizeof(int)); + widths = (int *) malloc(num_vars*sizeof(int)); tables = (int *) malloc(num_vars*sizeof(int)); /* get all selected vars */ - err = Boundary_SelectedGVs(cctkGH, num_vars, vars, faces, tables, NULL); + err = Boundary_SelectedGVs(cctkGH, num_vars, vars, faces, widths, tables, NULL); if (err != num_vars) { CCTK_VWarn(1, __LINE__, __FILE__, CCTK_THORNSTRING, @@ -113,7 +114,7 @@ void Cartoon_ApplyBoundaries(CCTK_ARGUMENTS) { gi = CCTK_GroupIndexFromVarI(vars[i]); if (gi<0) { CCTK_VWarn(1, __LINE__, __FILE__, CCTK_THORNSTRING, - "Invalid variable index %d registered for a boundary " + "Invalid variable index %d selected for a boundary " "condition", gi); } if (vars[i] != CCTK_FirstVarIndexI(gi)) @@ -151,6 +152,10 @@ void Cartoon_ApplyBoundaries(CCTK_ARGUMENTS) { * specified tensortype. */ + /* What should I do with the faces, widths, or tables arrays? Why + did I bother asking for them? How does Cartoon get + e.g. boundary width information? */ + /* Call BndCartoon2DVI, passing the appropriate tensor type integer macro */ if (CCTK_Equals(tensortype, "scalar")) @@ -172,5 +177,6 @@ void Cartoon_ApplyBoundaries(CCTK_ARGUMENTS) { /* Free data */ free(vars); free(faces); + free(widths); free(tables); } -- cgit v1.2.3