Hi everyone,
I have a quick question on the Reaction class, upon which Trap is based. It appears that when assigning the subdomain, it explicitly imports the 1D subclass of VolumeSubdomain (link):
from festim.subdomain.volume_subdomain import VolumeSubdomain1D as VS1D
However, the 1D version just appears to be a copy of the the main VolumeSubdmain, but with a borders initiated (link):
class VolumeSubdomain1D(VolumeSubdomain):
"""Volume subdomain class for 1D cases.
Args:
id (int): the id of the volume subdomain
borders (list of float): the borders of the volume subdomain
material (festim.Material): the material of the volume subdomain
Attributes:
id (int): the id of the volume subdomain
borders (list of float): the borders of the volume subdomain
material (festim.Material): the material of the volume subdomain
Examples:
.. testsetup:: VolumeSubdomain1D
from festim import VolumeSubdomain1D, Material
my_mat = Material(D_0=1, E_D=1, name="test_mat")
.. testcode:: VolumeSubdomain1D
VolumeSubdomain1D(id=1, borders=[0, 1], material=my_mat)
"""
def __init__(self, id, borders, material) -> None:
super().__init__(
id,
material,
locator=lambda x: np.logical_and(x[0] >= borders[0], x[0] <= borders[1]),
)
self.borders = borders
Therefore, I’m curious if the 1D subclass is actually being used for anything?