Skip to content

Commit b1f35f7

Browse files
committed
plotted all gradients
1 parent 333a4c7 commit b1f35f7

16 files changed

+683
-250
lines changed

examples/ansys/bars_mesh.vtk

649 KB
Binary file not shown.
-898 KB
Binary file not shown.

examples/ansys/meshing_tess/tesseract_api.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ def remove_duplicate_points(
271271
) -> tuple[jnp.ndarray, jnp.ndarray]:
272272
"""Remove duplicate points from the mesh and update hex cell indices."""
273273
# TODO: remove rounding after removing duplicate points
274-
pts_coords = jnp.round(pts_coords, decimals=5)
274+
pts_coords = jnp.round(pts_coords, decimals=4)
275275
_, indices, inverse_indices = jnp.unique(
276276
pts_coords, axis=0, return_index=True, return_inverse=True
277277
)
@@ -381,9 +381,9 @@ def generate_mesh(
381381
# get largest cell size
382382
max_size = jnp.max(sizing_field)
383383

384-
Nx = int(Lx / max_size)
385-
Ny = int(Ly / max_size)
386-
Nz = int(Lz / max_size)
384+
Nx = max(int(Lx / max_size), 2)
385+
Ny = max(int(Ly / max_size), 2)
386+
Nz = max(int(Lz / max_size), 2)
387387

388388
initial_pts, initial_hex_cells = hex_grid(Lx, Ly, Lz, Nx, Ny, Nz)
389389

examples/ansys/optim_bars.ipynb

Lines changed: 283 additions & 90 deletions
Large diffs are not rendered by default.

examples/ansys/optim_grid.ipynb

Lines changed: 396 additions & 156 deletions
Large diffs are not rendered by default.

examples/ansys/rho_optim_sum_2.gif

-928 KB
Loading
332 KB
Binary file not shown.
290 KB
Binary file not shown.
305 KB
Binary file not shown.
295 KB
Binary file not shown.

0 commit comments

Comments
 (0)