# BoxRegion¶

class BoxRegion(value, xmin, xmax, ymin, ymax, zmin, zmax)

Class for representing an orthorhombic region, i.e. a rectangular box of metallic or dielectric material.

Parameters: value (float | PhysicalQuantity compatible with Volt) – The value that should be assigned to the box. Either the voltage or the dielectric constant of the region. xmin (PhysicalQuantity of type length) – The lower boundary of the box along the x-axis. xmax (PhysicalQuantity of type length) – The upper boundary of the box along the x-axis. ymin (PhysicalQuantity of type length) – The lower boundary of the box along the y-axis. ymax (PhysicalQuantity of type length) – The upper boundary of the box along the y-axis. zmin (PhysicalQuantity of type length) – The lower boundary of the box along the z-axis. zmax (PhysicalQuantity of type length) – The upper boundary of the box along the z-axis.
nlprint(stream=<_io.TextIOWrapper name='<stdout>' mode='w' encoding='UTF-8'>, header=True)

Print a string containing an ASCII description of the SpatialRegion.

Parameters: stream (Stream based object) – The io to write to. header (bool) – Option to emphasize the description as a header or not.
value()

Function for asking for the value of the box region.

Returns: The value of the box region. float | PhysicalQuantity compatible with Volt
xmax()
Returns: The maximum x-value of the box. PhysicalQuantity of type length
xmin()
Returns: The minimum x-value of the box. PhysicalQuantity of type length
ymax()
Returns: The maximum y-value of the box. PhysicalQuantity of type length
ymin()
Returns: The minimum y-value of the box. PhysicalQuantity of type length
zmax()
Returns: The maximum z-value of the box. PhysicalQuantity of type length
zmin()
Returns: The minimum z-value of the box. PhysicalQuantity of type length

## Usage Examples¶

Define a dielectric region with dielectric constant $$4 \varepsilon_0$$:

dielectric_region = BoxRegion(
4.0,
xmin=0*Angstrom, xmax=41.439*Angstrom,
ymin=0.5*Angstrom, ymax=3.57914*Angstrom,
zmin=5*Angstrom, zmax=50.4135*Angstrom
)

dielectric_boxregion.py

Define two metallic regions where the second metallic region is constructed by cloning the first:

metallic_region1 = BoxRegion(
1*Volt,
xmin=0*Angstrom, xmax=41.439*Angstrom,
ymin=0*Angstrom, ymax=0.5*Angstrom,
zmin=5*Angstrom, zmax=15.*Angstrom
)

metallic_region2 = metallic_region1(
value=-1*Volt,
ymin=10*Angstrom, ymax=12*Angstrom
)

metal_boxregion.py

## Notes¶

The following spatial regions are available: