# SphereRegion¶

class SphereRegion(value, center, radius)

Class for representing a spherical region of metallic or dielectric material.

Parameters: value (float | PhysicalQuantity compatible with Volt) – The value that should be assigned to the sphere. Either the voltage or the dielectric constant of the region. center (PhysicalQuantity of type length) – Vector to the center of the sphere. radius (PhysicalQuantity of type length) – Radius of the sphere.
center()
Returns: The vector to the center of the sphere. PhysicalQuantity of type length
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.
radius()
Returns: The radius of the sphere. PhysicalQuantity of type length
value()

Function for asking for the value of the box region.

Returns: The value of the box region. float | PhysicalQuantity compatible with Volt

## Usage Examples¶

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

dielectric_region = SphereRegion(
value=4.0,
center=[1.0, 2.0 ,3.0]*Angstrom
)


dielectric_sphereregion.py

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

metallic_region1 = SphereRegion(
value=1.0*Volt,
center=[1.0, 2.0 ,3.0]*Angstrom
)

metallic_region2 = metallic_region1(
value=-1*Volt,

metal_sphereregion.py