From 67d025a8986ad4c97825981b98ab6f808ee5539d Mon Sep 17 00:00:00 2001 From: allen Date: Wed, 17 Jan 2001 12:40:06 +0000 Subject: Added directional scalar boundary conditions, see documentation.tex for details of the interface. These will be extended to the other boundary conditions. git-svn-id: http://svn.cactuscode.org/arrangements/CactusBase/Boundary/trunk@128 6a38eb6e-646e-4a02-a296-d141613ad6c4 --- doc/documentation.tex | 104 +++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 81 insertions(+), 23 deletions(-) (limited to 'doc') diff --git a/doc/documentation.tex b/doc/documentation.tex index aa1874d..c950930 100644 --- a/doc/documentation.tex +++ b/doc/documentation.tex @@ -1,5 +1,10 @@ \documentclass{article} +\parskip = 2 pt +\oddsidemargin = 0 cm +\textwidth = 16 cm +\topmargin = -1 cm +\textheight = 24 cm %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % MANPAGE like description setting for options, use as @@ -32,8 +37,6 @@ {\end{entry}} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - - \begin{document} \title{Boundary} @@ -48,9 +51,12 @@ grid functions, or groups of grid functions. Available for 1D, 2D and \section{Purpose} Allows you to apply standard boundary conditions to grid functions -or groups of grid functions, taking into account a parallel -decomposition of the grid. The routines are callable from -C or Fortran. These routines are available for 1D, 2D and 3D. +or groups of grid functions on a Cartesian grid, taking into account +a parallel decomposition of the grid. The routines are callable from +C or Fortran. These routines are available for 1D, 2D and 3D grid functions, +and there are interfaces for applying boundary conditions in individual +directions or in all directions at once. + The boundary conditions available are \begin{itemize} \item Scalar @@ -86,6 +92,17 @@ condition to the variable with the specified variable index. \item{\em goup index}: Suffix: {\tt GI} apply the boundary condition to all variable in the group with the specified group index. \end{itemize} +\item{} For the boundary conditions in individual coordinate directions, + +\begin{tabular}{ll} +{\tt dir=-1} & apply at $x=x_{max}$ \\ +{\tt dir=1} & apply at $x=x_{max}$ \\ +{\tt dir=-2} & apply at $y=y_{min}$ \\ +{\tt dir=2} & apply at $y=y_{min}$ \\ +{\tt dir=-3} & apply at $z=z_{max}$ \\ +{\tt dir=3} & apply at $z=z_{max}$ \\ +\end{tabular} + \end{itemize} \subsection{Scalar Boundary Condition} @@ -95,6 +112,8 @@ field or fields at the boundary is set to a given scalar value, for example zero. \subsubsection*{Calling from C:} + +{\bf All Coordinate Directions:} \begin{verbatim} int ierr = BndScalarVN(cGH *cctkGH, int *stencil_size, CCTK_REAL var0, char *variable_name) @@ -105,25 +124,63 @@ int ierr = BndScalarVI(cGH *cctkGH, int *stencil_size, int ierr = BndScalarGI(cGH *cctkGH, int *stencil_size, CCTK_REAL var0, int variable_index) \end{verbatim} +{\bf Individual Coordinate Directions:} +\begin{verbatim} +int ierr = BndScalarDirVN(cGH *cctkGH, int stencil, int dir, + CCTK_REAL var0, char *variable_name) +int ierr = BndScalarDirGN(cGH *cctkGH, int stencil, int dir, + CCTK_REAL var0, char *group_name) +int ierr = BndScalarDirVI(cGH *cctkGH, int stencil, int dir, + CCTK_REAL var0, int group_index) +int ierr = BndScalarDirGI(cGH *cctkGH, int stencil, int dir, + CCTK_REAL var0, int variable_index) +\end{verbatim} + \subsubsection*{Calling from Fortran:} +{\bf All Coordinate Directions:} \begin{verbatim} call BndScalarVN(ierr, cctkGH, stencil_size, var0, variable_name) call BndScalarGN(ierr, cctkGH, stencil_size, var0, group_name) call BndScalarVI(ierr, cctkGH, stencil_size, var0, variable_index) call BndScalarGI(ierr, cctkGH, stencil_size, var0, group_index) \end{verbatim} +{\bf Individual Coordinate Directions:} +\begin{verbatim} +call BndScalarDirVN(ierr, cctkGH, dir, stencil, var0, variable_name) +call BndScalarDirGN(ierr, cctkGH, dir, stencil, var0, group_name) +call BndScalarDirVI(ierr, cctkGH, dir, stencil, var0, variable_index) +call BndScalarDirGI(ierr, cctkGH, dir, stencil, var0, group_index) +\end{verbatim} where +{\tt +\begin{tabbing} +character*(*) \= variable\_name\=\kill +integer \> ierr \\ +CCTK\_POINTER \> cctkGH\\ +integer \> dir\\ +integer \> stencil\\ +integer \> stencil\_width(dim)\\ +CCTK\_REAL \> var0 \\ +character*(*) \> variable\_name\\ +character*(*) \> group\_name\\ +integer \> variable\_index\\ +integer \> group\_index\\ +\end{tabbing} +} + +\subsection*{Arguments} \begin{Lentry} -\item[{\tt integer ierr}] Return value, negative value indicates the +\item[{\tt ierr}] Return value, negative value indicates the boundary condition was not successfully applied -\item[{\tt CCTK\_POINTER cctkGH}] Grid hierarchy pointer -\item[{\tt CCTK\_REAL var0}] Scalar value to apply -\item[{\tt integer stencil\_size(dim)}] Array with dimension of the grid function, containing the stencil width to apply the boundary at -\item[{\tt character*(*) variable\_name}] Name of the variable -\item[{\tt character*(*) group\_name}] Name of the group -\item[{\tt integer variable\_index}] Variable index -\item[{\tt integer group\_index}] Group index +\item[{\tt cctkGH}] Grid hierarchy pointer +\item[{\tt var0}] Scalar value to apply +\item[{\tt dir}] Coordinate direction in which to apply boundary condition +\item[{\tt stencil\_size}] Array with dimension of the grid function, containing the stencil width to apply the boundary at +\item[{\tt variable\_name}] Name of the variable +\item[{\tt group\_name}] Name of the group +\item[{\tt variable\_index}] Variable index +\item[{\tt group\_index}] Group index \end{Lentry} @@ -230,28 +287,28 @@ Notice that this speed does not have to be 1. \subsubsection*{Calling from C:} \begin{verbatim} int ierr = BndRadiativeVN(cGH *cctkGH, int *stencil_size, - CCTK_REAL var0, CCTK_REAL v0, + CCTK_REAL speed, CCTK_REAL limit, char *variable_name, char *variable_name_past) int ierr = BndRadiativeGN(cGH *cctkGH, int *stencil_size, - CCTK_REAL var0, CCTK_REAL v0, + CCTK_REAL speed, CCTK_REAL limit, char *group_name, char *group_name_past) int ierr = BndRadiativeVI(cGH *cctkGH, int *stencil_size, - CCTK_REAL var0, CCTK_REAL v0, + CCTK_REAL speed, CCTK_REAL limit, int variable_index, int variable_index_past) int ierr = BndRadiativeGI(cGH *cctkGH, int *stencil_size, - CCTK_REAL var0, CCTK_REAL v0, + CCTK_REAL speed, CCTK_REAL limit, int group_index, int group_index_past) \end{verbatim} \subsubsection*{Calling from Fortran:} \begin{verbatim} -call BndRadiativeVN(ierr, cctkGH, stencil_size, var0, v0, +call BndRadiativeVN(ierr, cctkGH, stencil_size, speed, limit, variable_name, variable_name_past) -call BndRadiativeVN(ierr, cctkGH, stencil_size, var0, v0, +call BndRadiativeVN(ierr, cctkGH, stencil_size, speed, limit, group_name, group_name_past) -call BndRadiativeVN(ierr, cctkGH, stencil_size, var0, v0, +call BndRadiativeVN(ierr, cctkGH, stencil_size, speed, limit, variable_index, variable_index_past) -call BndRadiativeVN(ierr, cctkGH, stencil_size, var0, v0, +call BndRadiativeVN(ierr, cctkGH, stencil_size, speed, limit, group_index, group_index_past) \end{verbatim} where @@ -262,8 +319,9 @@ value {\em negative} \item[{\tt integer stencil\_size(dim)}] array of size {\tt dim} (dimension of the gridfunction). To how many points from the outer boundary to apply the boundary condition. -\item[{\tt CCTK\_REAL var0}] radation constant -\item[{\tt CCTK\_REAL v0}] radation constant +\item[{\tt CCTK\_REAL speed}] wave speed used for boundary condition ($v$). + +\item[{\tt CCTK\_REAL limit}] radation constant \item[{\tt character*(*) variable\_name}] the name of the grid function to which the boundary condition will be applied -- cgit v1.2.3