Skip to content

Commit

Permalink
Azure CI commit ref e14e13ed65693baf7884e93aa8964423af998f33
Browse files Browse the repository at this point in the history
  • Loading branch information
simpeg-bot committed Jun 6, 2023
1 parent d5e68ae commit 4857e7c
Show file tree
Hide file tree
Showing 4,798 changed files with 508,360 additions and 393,537 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@
#
# And plot the results:
#
# .. collapse:: Expand to show scripting for plot
#
fig = plt.figure(figsize=(11, 5))
ax1 = fig.add_subplot(121)
v = np.r_[np.zeros(mesh.nFx+mesh.nFy), phi_z] # create vector for plotting
Expand All @@ -44,8 +42,6 @@
# Below, we show a spy plot illustrating the sparsity and mapping
# of the operator
#
# .. collapse:: Expand to show scripting for plot
#
fig = plt.figure(figsize=(9, 9))
ax1 = fig.add_subplot(111)
ax1.spy(Azc, ms=1)
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@
#
# And plot the results,
#
# .. collapse:: Expand to show scripting for plot
#
fig = plt.figure(figsize=(11, 5))
ax1 = fig.add_subplot(121)
v = np.r_[phi_x, np.zeros(mesh.nEy)] # create vector for plotting function
Expand All @@ -41,8 +39,6 @@
# Below, we show a spy plot illustrating the sparsity and mapping
# of the operator
#
# .. collapse:: Expand to show scripting for plot
#
fig = plt.figure(figsize=(9, 9))
ax1 = fig.add_subplot(111)
ax1.spy(Axc, ms=1)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
import discretize
import matplotlib.pyplot as plt
import matplotlib.patches as patches
tree_mesh = discretize.TreeMesh([32, 32, 32])
tree_mesh.max_level
mesh = discretize.TreeMesh([32, 32, 32])
mesh.max_level
# Expected:
## 5
#
Expand All @@ -15,13 +15,13 @@
triangle = [[0.14, 0.31, 0.21], [0.32, 0.96, 0.34], [0.87, 0.23, 0.12]]
height = 0.35
levels = 5
mesh.refine_vertical_trianglular_prism(triangle, height, levels)
tree_mesh.refine_vertical_trianglular_prism(triangle, height, levels)
#
# Now lets look at the mesh.
#
v = mesh.cell_levels_by_index(np.arange(mesh.n_cells))
v = tree_mesh.cell_levels_by_index(np.arange(tree_mesh.n_cells))
fig, axs = plt.subplots(1, 3, figsize=(12,4))
mesh.plot_slice(v, ax=axs[0], normal='x', grid=True, clim=[2, 5])
mesh.plot_slice(v, ax=axs[1], normal='y', grid=True, clim=[2, 5])
mesh.plot_slice(v, ax=axs[2], normal='z', grid=True, clim=[2, 5])
tree_mesh.plot_slice(v, ax=axs[0], normal='x', grid=True, clim=[2, 5])
tree_mesh.plot_slice(v, ax=axs[1], normal='y', grid=True, clim=[2, 5])
tree_mesh.plot_slice(v, ax=axs[2], normal='z', grid=True, clim=[2, 5])
plt.show()
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@
#
# And plot the results:
#
# .. collapse:: Expand to show scripting for plot
#
fig = plt.figure(figsize=(11, 5))
ax1 = fig.add_subplot(121)
mesh.plot_image(u_e, ax=ax1, v_type="E", view='vec')
Expand All @@ -43,8 +41,6 @@
# Below, we show a spy plot illustrating the sparsity and mapping
# of the operator
#
# .. collapse:: Expand to show scripting for plot
#
fig = plt.figure(figsize=(9, 9))
ax1 = fig.add_subplot(111)
ax1.spy(Aec, ms=1)
Expand Down
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@
#
# Plot the results,
#
# .. collapse:: Expand to show scripting for plot
#
fig = plt.figure(figsize=(11, 5))
ax1 = fig.add_subplot(121)
mesh.plot_image(phi_n, ax=ax1, v_type="N")
Expand All @@ -40,8 +38,6 @@
# Below, we show a spy plot illustrating the sparsity and mapping
# of the operator
#
# .. collapse:: Expand to show scripting for plot
#
fig = plt.figure(figsize=(9, 9))
ax1 = fig.add_subplot(111)
ax1.spy(Ane, ms=1)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@
#
# Plot the property tensors.
#
# .. collapse:: Expand to show scripting for plot
#
M_list = [M_scalar, M_isotropic, M_anisotropic, M_tensor]
case_list = ['Scalar', 'Isotropic', 'Anisotropic', 'Full Tensor']
ax1 = 4*[None]
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@
#
# Spy plot for the inner product matrix and its derivative
#
# .. collapse:: Expand to show scripting for plot
#
fig = plt.figure(figsize=(15, 5))
ax1 = fig.add_axes([0.05, 0.05, 0.3, 0.85])
ax1.spy(Mf, ms=6)
Expand Down Expand Up @@ -60,8 +58,6 @@
#
# Plot the anisotropic inner product matrix and its derivative matrix,
#
# .. collapse:: Expand to show scripting for plot
#
fig = plt.figure(figsize=(15, 5))
ax1 = fig.add_axes([0.05, 0.05, 0.3, 0.8])
ax1.spy(Mf, ms=6)
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@
#
# Plot the results,
#
# .. collapse:: Expand to show scripting for plot
#
fig = plt.figure(figsize=(11, 5))
ax1 = fig.add_subplot(121)
mesh.plot_image(phi_n, ax=ax1, v_type="N")
Expand All @@ -40,8 +38,6 @@
# Below, we show a spy plot illustrating the sparsity and mapping
# of the operator
#
# .. collapse:: Expand to show scripting for plot
#
fig = plt.figure(figsize=(9, 9))
ax1 = fig.add_subplot(111)
ax1.spy(Anc, ms=1)
Expand Down
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@
#
# Plot inner product matrix and its derivative matrix
#
# .. collapse:: Expand to show scripting for plot
#
fig = plt.figure(figsize=(15, 5))
ax1 = fig.add_axes([0.05, 0.05, 0.3, 0.8])
ax1.spy(Me, ms=6)
Expand Down Expand Up @@ -59,8 +57,6 @@
#
# Plot the anisotropic inner product matrix and its derivative matrix
#
# .. collapse:: Expand to show scripting for plot
#
fig = plt.figure(figsize=(15, 5))
ax1 = fig.add_axes([0.05, 0.05, 0.3, 0.8])
ax1.spy(Me, ms=6)
Expand Down
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@
#
# Plot the original function and the gradient
#
# .. collapse:: Expand to show scripting for plot
#
fig = plt.figure(figsize=(13, 6))
ax1 = fig.add_subplot(121)
mesh.plot_image(phi, v_type="N", ax=ax1)
Expand All @@ -53,8 +51,6 @@
# the original discrete quantity :math:`\boldsymbol{\phi}` and its
# discrete gradient as well as a spy plot.
#
# .. collapse:: Expand to show scripting for plot
#
mesh = TensorMesh([[(1, 3)], [(1, 6)]])
fig = plt.figure(figsize=(12, 10))
ax1 = fig.add_subplot(121)
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,10 @@
#
# Now we plot the original scalar and the z-derivative for a slice at y = 0.
#
# .. collapse:: Expand to show scripting for plot
#
fig = plt.figure(figsize=(13, 5))
ax1 = fig.add_subplot(121)
mesh.plot_slice(phi, ax=ax1, normal='Y', slice_loc=0)
ax1.set_title("Scalar at cell centers", fontsize=14)
#
ax2 = fig.add_subplot(122)
v = np.r_[np.zeros(mesh.nFx+mesh.nFy), grad_phi_z] # Define vector for plotting fun
mesh.plot_slice(v, ax=ax2, v_type='Fz', normal='Y', slice_loc=0)
Expand All @@ -47,8 +44,6 @@
# that maps from cell centers to z-faces. To demonstrate this, we provide
# a spy plot
#
# .. collapse:: Expand to show scripting for plot
#
fig = plt.figure(figsize=(9, 9))
ax1 = fig.add_subplot(111)
ax1.spy(mesh.cell_gradient_z, ms=1)
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@
#
# Plot the original function and the gradient
#
# .. collapse:: Expand to show scripting for plot
#
fig = plt.figure(figsize=(13, 6))
ax1 = fig.add_subplot(121)
mesh.plot_image(phi, v_type="N", ax=ax1)
Expand All @@ -53,8 +51,6 @@
# the original discrete quantity :math:`\boldsymbol{\phi}` and its
# discrete gradient as well as a spy plot.
#
# .. collapse:: Expand to show scripting for plot
#
mesh = TensorMesh([[(1, 3)], [(1, 6)]])
fig = plt.figure(figsize=(12, 10))
ax1 = fig.add_subplot(121)
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,16 +1,5 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"%matplotlib inline"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand All @@ -26,7 +15,7 @@
},
"outputs": [],
"source": [
"import discretize\nimport matplotlib.pyplot as plt\n\n\ndef run(plotIt=True):\n M = discretize.TensorMesh([32, 32])\n v = discretize.utils.random_model(M.vnC, seed=789)\n v = discretize.utils.mkvc(v)\n\n O = discretize.TreeMesh([32, 32])\n\n def function(cell):\n if (\n cell.center[0] < 0.75\n and cell.center[0] > 0.25\n and cell.center[1] < 0.75\n and cell.center[1] > 0.25\n ):\n return 5\n if (\n cell.center[0] < 0.9\n and cell.center[0] > 0.1\n and cell.center[1] < 0.9\n and cell.center[1] > 0.1\n ):\n return 4\n return 3\n\n O.refine(function)\n\n P = M.getInterpolationMat(O.gridCC, \"CC\")\n\n ov = P * v\n\n if not plotIt:\n return\n\n fig, axes = plt.subplots(1, 2, figsize=(10, 5))\n\n out = M.plotImage(v, grid=True, ax=axes[0])\n cb = plt.colorbar(out[0], ax=axes[0])\n cb.set_label(\"Random Field\")\n axes[0].set_title(\"TensorMesh\")\n\n out = O.plotImage(ov, grid=True, ax=axes[1], clim=[0, 1])\n cb = plt.colorbar(out[0], ax=axes[1])\n cb.set_label(\"Random Field\")\n axes[1].set_title(\"TreeMesh\")\n\n\nif __name__ == \"__main__\":\n run()\n plt.show()"
"import discretize\nimport matplotlib.pyplot as plt\n\n\ndef run(plotIt=True):\n M = discretize.TensorMesh([32, 32])\n v = discretize.utils.random_model(M.vnC, seed=789)\n v = discretize.utils.mkvc(v)\n\n O = discretize.TreeMesh([32, 32])\n\n def function(cell):\n if (\n cell.center[0] < 0.75\n and cell.center[0] > 0.25\n and cell.center[1] < 0.75\n and cell.center[1] > 0.25\n ):\n return 5\n if (\n cell.center[0] < 0.9\n and cell.center[0] > 0.1\n and cell.center[1] < 0.9\n and cell.center[1] > 0.1\n ):\n return 4\n return 3\n\n O.refine(function)\n\n P = M.get_interpolation_matrix(O.gridCC, \"CC\")\n\n ov = P * v\n\n if not plotIt:\n return\n\n fig, axes = plt.subplots(1, 2, figsize=(10, 5))\n\n out = M.plot_image(v, grid=True, ax=axes[0])\n cb = plt.colorbar(out[0], ax=axes[0])\n cb.set_label(\"Random Field\")\n axes[0].set_title(\"TensorMesh\")\n\n out = O.plot_image(ov, grid=True, ax=axes[1], clim=[0, 1])\n cb = plt.colorbar(out[0], ax=axes[1])\n cb.set_label(\"Random Field\")\n axes[1].set_title(\"TreeMesh\")\n\n\nif __name__ == \"__main__\":\n run()\n plt.show()"
]
}
],
Expand All @@ -46,7 +35,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.8"
"version": "3.10.11"
}
},
"nbformat": 4,
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@
#
# Plot the results
#
# .. collapse:: Expand to show scripting for plot
#
fig = plt.figure(figsize=(13, 6))
ax1 = fig.add_subplot(121)
mesh.plot_image(phi, ax=ax1)
Expand All @@ -58,24 +56,19 @@
#
mesh = TensorMesh([[(1, 3)], [(1, 6)]])
mesh.set_cell_gradient_BC('dirichlet')
#
# .. collapse:: Expand to show scripting for plot
#
fig = plt.figure(figsize=(12, 10))
ax1 = fig.add_subplot(121)
mesh.plot_grid(ax=ax1)
ax1.set_title("Mapping of Gradient Operator", fontsize=14, pad=15)
ax1.plot(mesh.cell_centers[:, 0], mesh.cell_centers[:, 1], "ro", markersize=8)
for ii, loc in zip(range(mesh.nC), mesh.cell_centers):
ax1.text(loc[0] + 0.05, loc[1] + 0.02, "{0:d}".format(ii), color="r")
#
ax1.plot(mesh.faces_x[:, 0], mesh.faces_x[:, 1], "g^", markersize=8)
for ii, loc in zip(range(mesh.nFx), mesh.faces_x):
ax1.text(loc[0] + 0.05, loc[1] + 0.02, "{0:d}".format(ii), color="g")
ax1.plot(mesh.faces_y[:, 0], mesh.faces_y[:, 1], "g>", markersize=8)
for ii, loc in zip(range(mesh.nFy), mesh.faces_y):
ax1.text(loc[0] + 0.05, loc[1] + 0.02, "{0:d}".format((ii + mesh.nFx)), color="g")
#
ax1.set_xticks([])
ax1.set_yticks([])
ax1.spines['bottom'].set_color('white')
Expand All @@ -84,7 +77,6 @@
ax1.spines['right'].set_color('white')
ax1.set_xlabel('X', fontsize=16, labelpad=-5)
ax1.set_ylabel('Y', fontsize=16, labelpad=-15)
#
ax1.legend(
['Mesh', '$\mathbf{\phi}$ (centers)', '$\mathbf{u}$ (faces)'],
loc='upper right', fontsize=14
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@
#
# Then plot the matrix entries,
#
# .. collapse:: Expand to show scripting for plot
#
fig = plt.figure(figsize=(15, 5))
ax1 = fig.add_subplot(131)
ax1.imshow(sig_iso_tensor)
Expand Down Expand Up @@ -77,8 +75,6 @@
#
# Then plot the sparse representation,
#
# .. collapse:: Expand to show scripting for plot
#
fig = plt.figure(figsize=(12, 4))
ax1 = fig.add_subplot(131)
ax1.spy(M1, ms=5)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@
#
# Plot the original face-vector and its divergence
#
# .. collapse:: Expand to show scripting for plot
#
fig = plt.figure(figsize=(13, 6))
ax1 = fig.add_subplot(121)
mesh.plot_image(
Expand All @@ -56,8 +54,6 @@
# discrete divergence :math:`\boldsymbol{\phi}` as well as a
# spy plot.
#
# .. collapse:: Expand to show scripting for plot
#
mesh = TensorMesh([[(1, 6)], [(1, 3)]])
fig = plt.figure(figsize=(10, 10))
ax1 = fig.add_subplot(211)
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@
#
# And plot the results:
#
# .. collapse:: Expand to show scripting for plot
#
fig = plt.figure(figsize=(11, 5))
ax1 = fig.add_subplot(121)
v = np.r_[np.zeros(mesh.nFx+mesh.nFy), phi_z] # create vector for plotting
Expand All @@ -44,8 +42,6 @@
# Below, we show a spy plot illustrating the sparsity and mapping
# of the operator
#
# .. collapse:: Expand to show scripting for plot
#
fig = plt.figure(figsize=(9, 9))
ax1 = fig.add_subplot(111)
ax1.spy(Azc, ms=1)
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@
#
# Plot the results,
#
# .. collapse:: Expand to show scripting for plot
#
fig = plt.figure(figsize=(11, 5))
ax1 = fig.add_subplot(121)
mesh.plot_image(phi_n, ax=ax1, v_type="N")
Expand All @@ -40,8 +38,6 @@
# Below, we show a spy plot illustrating the sparsity and mapping
# of the operator
#
# .. collapse:: Expand to show scripting for plot
#
fig = plt.figure(figsize=(9, 9))
ax1 = fig.add_subplot(111)
ax1.spy(Anf, ms=1)
Expand Down
Loading

0 comments on commit 4857e7c

Please sign in to comment.