![]() ![]() ![]() ![]() Next: Schedule groups Up: The generic boundary interface Previous: Boundary condition registration Contents Boundary condition selectionTo select a grid variable to have a boundary condition applied to it, use one of the following aliased functions: Boundary_SelectVarForBC(CCTK_POINTER cctkGH, CCTK_INT faces, CCTK_INT boundary_width, CCTK_INT table_handle, CCTK_STRING var_name, CCTK_STRING bc_name) Boundary_SelectVarForBCI(CCTK_POINTER cctkGH, CCTK_INT faces, CCTK_INT boundary_width, CCTK_INT table_handle, CCTK_INT var_index, CCTK_STRING bc_name) Boundary_SelectGroupForBC(CCTK_POINTER cctkGH, CCTK_INT faces, CCTK_INT boundary_width, CCTK_INT table_handle, CCTK_STRING group_name, CCTK_STRING bc_name) Boundary_SelectGroupForBCI(CCTK_POINTER cctkGH, CCTK_INT faces, CCTK_INT boundary_width, CCTK_INT table_handle, CCTK_INT group_index, CCTK_STRING bc_name)where cctkGH pointer to the grid hierarchy Each of these functions returns 0 for success, or a negative error code if something went wrong.
Each of these functions takes a faces specification, a boundary width, and a table handle as additional arguments. The faces specification is a single integer which identifies a set of faces to which to apply the boundary condition. See section A1.3.4 for details. The boundary width is the thickness, in grid points, of the boundaries.
The table handle identifies a table which
holds extra arguments for the particular boundary condition that is
requested.
For example, if a negative value is passed for the boundary width, then the
boundary condition will look in this table for a In some cases the table handle is required, so the boundary condition, when it is called within the BoundaryConditions schedule group (see section A1.3.3), will return an error code. However, in most cases it is optional. If one uses an invalid table handle here (such as -1), commonly used default values will be assumed for all arguments (besides the explicit faces specification and boundary widths). Note that you, the user, will be creating the table, so you may choose whatever options (such as case sensitivity) you like. The case of the keys for which the boundary conditions implemented in this thorn search are as given in the documentation, which is currently all capitals. To be safe you may choose to create case-insensitive tables, however case sensitive tables are slightly faster. The name of the boundary condition must match that with which the boundary condition providing function was registered. These names are case insensitive. See section A1.4 for a list of boundary conditions provided by thorn Boundary.
![]() ![]() ![]() ![]() Next: Schedule groups Up: The generic boundary interface Previous: Boundary condition registration Contents |