tidy3d.VolumeMeshData#
- class VolumeMeshData[source]#
Bases:
HeatChargeMonitorDataData associated with a
VolumeMeshMonitor: stores the unstructured mesh.- Parameters:
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
Maps the field components to their associated data.
symmetrysymmetry_centerMethods
field_name(val)Gets the name of the fields to be plot.
- monitor#
- mesh#
- property field_components#
Maps the field components to their associated data.