Skip to content

Commit

Permalink
Adding a bunch of meshes for experiments and Nankai interpolation. Ne…
Browse files Browse the repository at this point in the history
…ed to clean this up
  • Loading branch information
brendanjmeade committed Mar 14, 2023
1 parent 7a6db91 commit 51fa946
Show file tree
Hide file tree
Showing 15 changed files with 851,342 additions and 225 deletions.
307 changes: 307 additions & 0 deletions cascadia_interpolate.ipynb

Large diffs are not rendered by default.

Binary file added data/cascadia_118k.msh
Binary file not shown.
356,510 changes: 356,510 additions & 0 deletions data/cascadia_bane_test.msh

Large diffs are not rendered by default.

246,727 changes: 246,727 additions & 0 deletions data/cascadia_dense_60k.msh

Large diffs are not rendered by default.

246,727 changes: 246,727 additions & 0 deletions data/cascadia_dense_60k_original.msh

Large diffs are not rendered by default.

10 changes: 10 additions & 0 deletions data/nankai_high_resolution_mesh_parameters.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[
{
"mesh_filename": "./data/nankai_very_very_dense.msh",
"smoothing_weight": 1e14,
"top_slip_rate_constraint": 1,
"bot_slip_rate_constraint": 1,
"side_slip_rate_constraint": 1,
"a_priori_slip_filename": ""
}
]
10 changes: 10 additions & 0 deletions data/nankai_low_resolution_mesh_parameters.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[
{
"mesh_filename": "./data/nankai.msh",
"smoothing_weight": 1e14,
"top_slip_rate_constraint": 1,
"bot_slip_rate_constraint": 1,
"side_slip_rate_constraint": 1,
"a_priori_slip_filename": ""
}
]
5 changes: 4 additions & 1 deletion data/nankai_mesh_parameters.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
[
{
"mesh_filename": "./nankai.msh",
"mesh_filename": "./data/nankai_very_very_dense.msh",
"smoothing_weight": 1e14,
"top_slip_rate_constraint": 1,
"bot_slip_rate_constraint": 1,
"side_slip_rate_constraint": 1,
"top_slip_rate_weight": 1,
"bot_slip_rate_weight": 1,
"side_slip_rate_weight": 1,
"a_priori_slip_filename": ""
}
]
13 changes: 13 additions & 0 deletions data/western_north_america_mesh_parameters_118k.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[
{
"mesh_filename": "./data/cascadia_118k.msh",
"smoothing_weight": 1e14,
"top_slip_rate_constraint": 1,
"bot_slip_rate_constraint": 1,
"side_slip_rate_constraint": 1,
"top_slip_rate_weight": 1,
"bot_slip_rate_weight": 1,
"side_slip_rate_weight": 1,
"a_priori_slip_filename": ""
}
]
13 changes: 13 additions & 0 deletions data/western_north_america_mesh_parameters_60k.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[
{
"mesh_filename": "./data/cascadia_dense_60k.msh",
"smoothing_weight": 1e14,
"top_slip_rate_constraint": 1,
"bot_slip_rate_constraint": 1,
"side_slip_rate_constraint": 1,
"top_slip_rate_weight": 1,
"bot_slip_rate_weight": 1,
"side_slip_rate_weight": 1,
"a_priori_slip_filename": ""
}
]
13 changes: 13 additions & 0 deletions data/western_north_america_mesh_parameters_bane_test.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[
{
"mesh_filename": "./data/cascadia_bane_test.msh",
"smoothing_weight": 1e14,
"top_slip_rate_constraint": 1,
"bot_slip_rate_constraint": 1,
"side_slip_rate_constraint": 1,
"top_slip_rate_weight": 1,
"bot_slip_rate_weight": 1,
"side_slip_rate_weight": 1,
"a_priori_slip_filename": ""
}
]
369 changes: 369 additions & 0 deletions nankai_interpolate.ipynb

Large diffs are not rendered by default.

15 changes: 8 additions & 7 deletions skies/skies.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@
KM2M = 1.0e3
DYNECM_TO_NM = 1e-7 # dynes centimeters to Newton meters
SHEAR_MODULUS = 3e10 # Shear modulus (Pa)
MINIMUM_EVENT_MOMENT_MAGNITUDE = 7.0
MAXIMUM_EVENT_MOMENT_MAGNITUDE = 9.0
MINIMUM_EVENT_MOMENT_MAGNITUDE = 8.0
MAXIMUM_EVENT_MOMENT_MAGNITUDE = 8.1


def create_output_folder(base_runs_folder, output_path):
Expand Down Expand Up @@ -1548,11 +1548,12 @@ def write_vtk_file(mesh, cell_data, cell_data_label, vtk_file_name):
"""
See: https://github.com/nschloe/meshio
"""
points = mesh.meshio_object.points.tolist()
cells = [("triangle", mesh.meshio_object.cells[2].data.tolist())]
cell_data = {cell_data_label: [cell_data.tolist()]}
vtk_mesh = meshio.Mesh(points, cells, cell_data=cell_data)
vtk_mesh.write(vtk_file_name, file_format="vtk")
pass
# points = mesh.meshio_object.points.tolist()
# cells = [("triangle", mesh.meshio_object.cells[2].data.tolist())]
# cell_data = {cell_data_label: [cell_data.tolist()]}
# vtk_mesh = meshio.Mesh(points, cells, cell_data=cell_data)
# vtk_mesh.write(vtk_file_name, file_format="vtk")


def get_vtk_file_name(run_folder, mesh_parameters_file_name, mesh_index, event_index):
Expand Down
Loading

0 comments on commit 51fa946

Please sign in to comment.