Skip to content

Commit fee12c3

Browse files
committed
cleanup
1 parent ba7c0c8 commit fee12c3

1 file changed

Lines changed: 0 additions & 117 deletions

File tree

simpeg_drivers/plate_simulation/models/parametric.py

Lines changed: 0 additions & 117 deletions
Original file line numberDiff line numberDiff line change
@@ -47,123 +47,6 @@ def mask(self, mesh: Octree) -> np.ndarray:
4747
"""
4848

4949

50-
# class Plate(Parametric):
51-
# """
52-
# Define a rotated rectangular block in 3D space
53-
#
54-
# :param params: Parameters describing the plate.
55-
# :param surface: Surface object representing the plate.
56-
# """
57-
#
58-
# def __init__(
59-
# self,
60-
# params: PlateOptions,
61-
# workspace: Workspace | None = None,
62-
# ):
63-
# self.params = params
64-
# self._workspace = workspace
65-
# super().__init__(self._create_surface())
66-
#
67-
# def _create_surface(self) -> Surface:
68-
# """
69-
# Create a surface object from a plate object.
70-
#
71-
# :param workspace: Workspace object to create the surface in.
72-
# :param out_group: Output group to store the surface.
73-
# """
74-
# with fetch_active_workspace(self.workspace) as ws:
75-
# surface = Surface.create(
76-
# ws,
77-
# vertices=self.vertices,
78-
# cells=self.triangles,
79-
# name=self.params.name,
80-
# )
81-
#
82-
# return surface
83-
#
84-
# @property
85-
# def surface(self):
86-
# """
87-
# A surface object representing the plate.
88-
# """
89-
# return self._surface
90-
#
91-
# @property
92-
# def triangles(self) -> np.ndarray:
93-
# """Triangulation of the block."""
94-
# return np.vstack(
95-
# [
96-
# [0, 2, 1],
97-
# [1, 2, 3],
98-
# [0, 1, 4],
99-
# [4, 1, 5],
100-
# [1, 3, 5],
101-
# [5, 3, 7],
102-
# [2, 6, 3],
103-
# [3, 6, 7],
104-
# [0, 4, 2],
105-
# [2, 4, 6],
106-
# [4, 5, 6],
107-
# [6, 5, 7],
108-
# ]
109-
# )
110-
#
111-
# @property
112-
# def vertices(self) -> np.ndarray:
113-
# """Vertices for triangulation of a rectangular prism in 3D space."""
114-
#
115-
# u_1 = self.params.geometry.origin[0] - (
116-
# self.params.geometry.strike_length / 2.0
117-
# )
118-
# u_2 = self.params.geometry.origin[0] + (
119-
# self.params.geometry.strike_length / 2.0
120-
# )
121-
# v_1 = self.params.geometry.origin[1] - (self.params.geometry.dip_length / 2.0)
122-
# v_2 = self.params.geometry.origin[1] + (self.params.geometry.dip_length / 2.0)
123-
# w_1 = self.params.geometry.origin[2] - (self.params.geometry.width / 2.0)
124-
# w_2 = self.params.geometry.origin[2] + (self.params.geometry.width / 2.0)
125-
#
126-
# vertices = np.array(
127-
# [
128-
# [u_1, v_1, w_1],
129-
# [u_2, v_1, w_1],
130-
# [u_1, v_2, w_1],
131-
# [u_2, v_2, w_1],
132-
# [u_1, v_1, w_2],
133-
# [u_2, v_1, w_2],
134-
# [u_1, v_2, w_2],
135-
# [u_2, v_2, w_2],
136-
# ]
137-
# )
138-
#
139-
# return self._rotate(vertices)
140-
#
141-
# @property
142-
# def workspace(self) -> Workspace:
143-
# if self._workspace is None:
144-
# self._workspace = Workspace()
145-
#
146-
# return self._workspace
147-
#
148-
# def _rotate(self, vertices: np.ndarray) -> np.ndarray:
149-
# """Rotate vertices and adjust for reference point."""
150-
# theta = -1 * self.params.geometry.direction
151-
# phi = -1 * self.params.geometry.dip
152-
# rotated_vertices = rotate_xyz(vertices, self.params.geometry.origin, theta, phi)
153-
#
154-
# return rotated_vertices
155-
#
156-
# def mask(self, mesh: Octree) -> np.ndarray:
157-
# rotations = [
158-
# z_rotation_matrix(np.deg2rad(self.params.geometry.direction)),
159-
# x_rotation_matrix(np.deg2rad(self.params.geometry.dip)),
160-
# ]
161-
# rotated_centers = rotate_points(
162-
# mesh.centroids, origin=self.params.geometry.origin, rotations=rotations
163-
# )
164-
# return inside_plate(rotated_centers, self.params.geometry)
165-
166-
16750
class Body(Parametric):
16851
"""
16952
Represents a closed surface in the model.

0 commit comments

Comments
 (0)