Sample (Physical) Boundary Condition

David Rideout



Provides a simple linear extrapolation boundary condition, to serve as an example for people who wish to write their own physical boundary conditions.

1 Introduction

This thorn provides a linear extrapolation boundary condition in three dimensions. It is intended as an example for writing physical boundary conditions. (See the ThornGuide for CactusBase/Boundary for details on Cactus boundary conditions.) It is registered under the name LinearExtrap.

The code which actually implements the boundary condition is written in fixed form Fortran 90, in the file LinearExtrapBnd.F. This code was written by Carsten Gundlach, and is taken directly from the thorn AEIThorns/Exact. As such it illustrates a simple way to properly implement a boundary condition using Fortran code which was written long before the current boundary implementation specification.

2 Obtaining This Thorn

This thorn is provided within the CactusExamples arrangement, in the standard Cactus distribution.

3 Some Details

The LinearExtrap boundary condition registered by this thorn only works in three dimensions. The value on a boundary face is determined by fitting a straight line through the two points ’inside’ of the boundary point. For the edges and corners, two points along the diagonal are used to determine the line. In this way the thorn also provides an example of how to handle edges and corners, though only in a dimension specific way.

4 Using This Thorn

To use this thorn, simply activate it in your parameter file, select some variables for the LinearExtrap boundary condition, and be sure that ApplyBCs (as e.g. MyThorn_ApplyBCs) is scheduled at an appropriate point.

5 Parameters

6 Interfaces




7 Schedule

This section lists all the variables which are assigned storage by thorn CactusExamples/SampleBoundary. Storage can either last for the duration of the run (Always means that if this thorn is activated storage will be assigned, Conditional means that if this thorn is activated storage will be assigned for the duration of the run if some condition is met), or can be turned on for the duration of a schedule function.



Scheduled Functions



  register boundary conditions that this thorn provides


 Type: function