next up previous contents
Next: Parameters Up: Boundary Previous: Old interface   Contents


Appendix: Symmetry and non-local boundary conditions

An additional aliased function is provided to allow one to retrieve a list of grid variables which are selected for any particular boundary condition, or the entire list of selected grid variables (regardless of selected boundary condition). This is needed to write a thorn which provides a symmetry boundary condition, or a non-local boundary condition, as either of these need to schedule a routine in the BoundaryConditions schedule group to execute their condition on the list of selected variablespart12. (A symmetry boundary condition will need the entire list of selected variables, while the non-local physical condition will only need the list of variables which request that particular boundary condition.)

int Boundary_SelectedGVs(CCTK_POINTER cctkGH, 
                         CCTK_INT array_size,
                         CCTK_POINTER var_indices,
                         CCTK_POINTER faces,
                         CCTK_POINTER boundary_widths,
                         CCTK_POINTER table_handles,
                         CCTK_STRING bc_name)

cctkGH 		 pointer to the grid hierarchy

array_size size of arrays pointed to by the next three arguments
var_indices array of integers into which the selected variables' grid variable indices will be placed
faces array of integers into which the faces specification for each selected grid variable will be placed
boundary_widths array of integers which holds the boundary_width parameter for each selected GV
table_handles array of integers into which the table handle for each selected grid variable will be placed
bc_name name of boundary condition
This function places a list of up to array_size grid variable indices, sorted as described in section A1.3.1, into the array var_indices. The corresponding (up to array_size) faces specifications, boundary widths, and table handles are placed into the arrays faces, boundary_widths, and table_handles, respectively. (If the list contains $n<$array_size elements, then only $n$ elements are placed into the arrays var_indices, faces, boundary_widths, and table_handles.) To retrieve a list of all selected grid variables (for all boundary conditions), pass a null pointer for bc_name. The return value is the number elements of the requested list, so Boundary_SelectedGVs can be called first with var_indices equal to zero to determine how much memory to allocate for the arrays var_indices, faces, boundary_widths, and table_handles.

A non-local boundary condition must register a null pointer as its providing function in
Boundary_RegisterPhysicalBC, so that its name exists in the database of available boundary conditions, yet no extra routine is called when Boundary_ApplyPhysicalBCs is executed.


next up previous contents
Next: Parameters Up: Boundary Previous: Old interface   Contents