A class to facilitate interaction with physical boundary conditions
ProblemDomain is a class which facilitates the application of physical boundary conditions, both periodic and non-periodic. This class contains much of the functionality of the Box class, since logically the computational domain is generally a Box.Intersection with a ProblemDomain object will result in only removing regions which are outside the physical domain in non-periodic directions. Regions outside the logical computational domain in periodic directions will be treated as ghost cells which can be filled with an exchange() function or through suitable interpolation from a coarser domain.
Since ProblemDomain will contain a Box, it is a dimension dependent class, so SpaceDim must be defined as either 1, 2, or 3 when compiling.
Note that this implementation of ProblemDomain is inherently cell-centered.
NOTE: len >= 1.
NOTE: Box retval = adjCellLo(b,dir,len) is equivalent to the
following set of operations:
Box retval(b);
retval.convert(dir,ProblemDomain::CELL);
retval.setrange(dir,retval.smallEnd(dir)-len,len);
Directions are zero-based. It is an error if not 0 <= dir < SpaceDim. The neighbor of an Empty ProblemDomain is an Empty Box of the appropriate type. If dir is a periodic direction, will return an empty Box as well.
NOTE: len >= 1.
NOTE: Box retval = adjCellHi(b,dir,len) is equivalent to the
following set of operations:
Box retval(b);
retval.convert(dir,ProblemDomain::CELL);
retval.setrange(dir,retval.bigEnd(dir)+1,len);
Directions are zero-based. It is an error if not 0 <= dir < SpaceDim. The neighbor of an Empty ProblemDomain is an Empty Box of the appropriate type. If dir is a periodic direction, will return an empty Box.
This software is copyright (C) by the Lawrence Berkeley National Laboratory. Permission is granted to reproduce this software for non-commercial purposes provided that this notice is left intact.
It is acknowledged that the U.S. Government has rights to this software under Contract DE-AC03-765F00098 between the U.S. Department of Energy and the University of California.
This software is provided as a professional and academic contribution for joint exchange. Thus it is experimental, is provided ``as is'', with no warranties of any kind whatsoever, no support, no promise of updates, or printed documentation. By using this software, you acknowledge that the Lawrence Berkeley National Laboratory and Regents of the University of California shall have no liability with respect to the infringement of other copyrights by any part of this software.