Skip to content

Commit

Permalink
Fix cells for mesh creation
Browse files Browse the repository at this point in the history
  • Loading branch information
santisoler committed Jan 25, 2024
1 parent 67591fc commit 2f8747f
Showing 1 changed file with 8 additions and 57 deletions.
65 changes: 8 additions & 57 deletions live/01-forward-dc-resisitivity-2d.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,14 @@
"\n",
"# Shift top to maximum topography and center of survey line\n",
"y_topo_max = np.max(topo_2d[:, -1])\n",
"mesh.origin = mesh.origin + np.r_[np.mean(end_locations), y_topo_max]"
"mesh.origin = mesh.origin + np.r_[0, y_topo_max]"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Once the tree mesh is initialized, we want to refine it close to the electrodes and around the topography"
]
},
{
Expand Down Expand Up @@ -241,62 +248,6 @@
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Once the tree mesh is initialized, we want to refine it close to the electrodes and around the topography"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# Plot the mesh\n",
"fig = plt.figure(figsize=(8, 4))\n",
"\n",
"ax1 = fig.add_axes([0.14, 0.17, 0.8, 0.7])\n",
"mesh.plot_grid(ax=ax1, linewidth=1)\n",
"ax1.grid(False)\n",
"ax1.set_xlim(-200, 200)\n",
"ax1.set_ylim(np.max(y_topo) - 200, np.max(y_topo))\n",
"ax1.set_title(\"Mesh\")\n",
"ax1.set_xlabel(\"x (m)\")\n",
"ax1.set_ylabel(\"y (m)\")\n",
"\n",
"plt.show()"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand Down

0 comments on commit 2f8747f

Please sign in to comment.