tidy3d.VolumeMeshData#

class VolumeMeshData[source]#

Bases: HeatChargeMonitorData

Data associated with a VolumeMeshMonitor: stores the unstructured mesh.

Parameters:
  • attrs (dict = {}) – Dictionary storing arbitrary metadata for a Tidy3D object. This dictionary can be freely used by the user for storing data without affecting the operation of Tidy3D as it is not used internally. Note that, unlike regular Tidy3D fields, attrs are mutable. For example, the following is allowed for setting an attr obj.attrs['foo'] = bar. Also note that Tidy3D` will raise a TypeError if attrs contain objects that can not be serialized. One can check if attrs are serializable by calling obj.json().

  • monitor (VolumeMeshMonitor) – Mesh monitor associated with the data.

  • symmetry (Tuple[Literal[0, 1], Literal[0, 1], Literal[0, 1]] = (0, 0, 0)) – Symmetry of the original simulation in x, y, and z.

  • symmetry_center (Tuple[float, float, float] = (0, 0, 0)) – Symmetry center of the original simulation in x, y, and z.

  • mesh (Union[TriangularGridDataset, TetrahedralGridDataset]) – Dataset storing the mesh.

Example

>>> import tidy3d as td
>>> import numpy as np
>>> mesh_mnt = td.VolumeMeshMonitor(size=(1, 2, 3), name="mesh")
>>> tet_grid_points = td.PointDataArray(
...     [[0.0, 0.0, 0.0], [1.0, 0.0, 0.0], [0.0, 1.0, 0.0], [1.0, 1.0, 0.0], [0.0, 0.0, 1.0]],
...     dims=("index", "axis"),
... )
>>> tet_grid_cells = td.CellDataArray(
...     [[0, 1, 2, 4], [1, 2, 3, 4]],
...     dims=("cell_index", "vertex_index"),
... )
>>> tet_grid_values = td.IndexedDataArray(
...     np.zeros((tet_grid_points.shape[0],)),
...     dims=("index",),
...     name="Mesh",
... )
>>> tet_grid = td.TetrahedralGridDataset(
...     points=tet_grid_points,
...     cells=tet_grid_cells,
...     values=tet_grid_values,
... )
>>> mesh_mnt_data = td.VolumeMeshData(monitor=mesh_mnt, mesh=tet_grid) 

Attributes

field_components

Maps the field components to their associated data.

symmetry_expanded_copy

Return copy of self with symmetry applied.

attrs

Methods

field_name(val)

Gets the name of the fields to be plot.

Inherited Common Usage

monitor#
mesh#
property field_components#

Maps the field components to their associated data.

field_name(val)[source]#

Gets the name of the fields to be plot.

property symmetry_expanded_copy#

Return copy of self with symmetry applied.

__hash__()#

Hash method.