Skip to content

Commit

Permalink
Ribbon meshing filename cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
jploveless committed Jul 23, 2024
1 parent 6b88d57 commit faae7cf
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 23 deletions.
4 changes: 2 additions & 2 deletions data/command/japan_command_ribbonmesh.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"mogi_file_name": "../data/mogi/japan_mogi.csv",
"n_iterations": 1,
"operators_folder": "../data/operators/",
"output_path": "../runs/0000000038",
"output_path": "../runs/0000000041",
"pickle_save": 1,
"plot_estimation_summary": 1,
"plot_input_summary": 1,
Expand All @@ -53,7 +53,7 @@
"reuse_elastic": 1,
"reuse_elastic_file": "../data/operators/japan_elastic_operators.hdf5",
"ridge_param": 0,
"run_name": "0000000038",
"run_name": "0000000041",
"sar_file_name": "",
"sar_ramp": 0,
"sar_weight": 0,
Expand Down
4 changes: 2 additions & 2 deletions data/mesh/japan_mesh_parameters_ribbonmesh.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"a_priori_slip_filename": ""
},
{
"mesh_filename": "../data/mesh/ribbon_mesh1.msh",
"mesh_filename": "../data/mesh/japan_new380_adjusted_segment_ribbonmesh_ribbonmesh1.msh",
"smoothing_weight": 1.0,
"n_eigen": 10,
"top_slip_rate_constraint": 0,
Expand All @@ -48,7 +48,7 @@
"ds_slip_constraint_weight": []
},
{
"mesh_filename": "../data/mesh/ribbon_mesh2.msh",
"mesh_filename": "../data/mesh/japan_new380_adjusted_segment_ribbonmesh_ribbonmesh2.msh",
"smoothing_weight": 1.0,
"n_eigen": 10,
"top_slip_rate_constraint": 0,
Expand Down
37 changes: 18 additions & 19 deletions notebooks/segment_meshing.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": 2,
"metadata": {
"execution": {
"iopub.execute_input": "2021-08-22T18:29:51.661926Z",
Expand Down Expand Up @@ -57,7 +57,7 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 3,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -69,7 +69,7 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": 4,
"metadata": {
"execution": {
"iopub.execute_input": "2021-08-22T18:29:53.570589Z",
Expand All @@ -85,22 +85,22 @@
"name": "stdout",
"output_type": "stream",
"text": [
"\u001b[32m2024-07-23 11:53:10.990\u001b[0m | \u001b[1mINFO \u001b[0m | \u001b[36mceleri.celeri\u001b[0m:\u001b[36mget_logger\u001b[0m:\u001b[36m6343\u001b[0m - \u001b[1mRead: ../data/command/japan_command.json\u001b[0m\n",
"\u001b[32m2024-07-23 11:53:10.991\u001b[0m | \u001b[1mINFO \u001b[0m | \u001b[36mceleri.celeri\u001b[0m:\u001b[36mget_logger\u001b[0m:\u001b[36m6344\u001b[0m - \u001b[1mRUN_NAME: 0000000038\u001b[0m\n",
"\u001b[32m2024-07-23 11:53:10.991\u001b[0m | \u001b[1mINFO \u001b[0m | \u001b[36mceleri.celeri\u001b[0m:\u001b[36mget_logger\u001b[0m:\u001b[36m6345\u001b[0m - \u001b[1mWrite log file: ../runs/0000000038/0000000038.log\u001b[0m\n",
"\u001b[32m2024-07-23 11:53:10.992\u001b[0m | \u001b[1mINFO \u001b[0m | \u001b[36mceleri.celeri\u001b[0m:\u001b[36mread_data\u001b[0m:\u001b[36m302\u001b[0m - \u001b[1mReading data files\u001b[0m\n",
"\u001b[32m2024-07-23 11:53:10.996\u001b[0m | \u001b[32m\u001b[1mSUCCESS \u001b[0m | \u001b[36mceleri.celeri\u001b[0m:\u001b[36mread_data\u001b[0m:\u001b[36m306\u001b[0m - \u001b[32m\u001b[1mRead: ../data/segment/japan_new380_adjusted_segment_ribbonmesh.csv\u001b[0m\n",
"\u001b[32m2024-07-23 11:53:10.997\u001b[0m | \u001b[32m\u001b[1mSUCCESS \u001b[0m | \u001b[36mceleri.celeri\u001b[0m:\u001b[36mread_data\u001b[0m:\u001b[36m311\u001b[0m - \u001b[32m\u001b[1mRead: ../data/block/japan_block.csv\u001b[0m\n",
"\u001b[32m2024-07-23 11:53:10.998\u001b[0m | \u001b[32m\u001b[1mSUCCESS \u001b[0m | \u001b[36mceleri.celeri\u001b[0m:\u001b[36mread_data\u001b[0m:\u001b[36m318\u001b[0m - \u001b[32m\u001b[1mRead: ../data/mesh/japan_mesh_parameters.json\u001b[0m\n",
"\u001b[32m2024-07-23 12:03:25.385\u001b[0m | \u001b[1mINFO \u001b[0m | \u001b[36mceleri.celeri\u001b[0m:\u001b[36mget_logger\u001b[0m:\u001b[36m6343\u001b[0m - \u001b[1mRead: ../data/command/japan_command.json\u001b[0m\n",
"\u001b[32m2024-07-23 12:03:25.385\u001b[0m | \u001b[1mINFO \u001b[0m | \u001b[36mceleri.celeri\u001b[0m:\u001b[36mget_logger\u001b[0m:\u001b[36m6344\u001b[0m - \u001b[1mRUN_NAME: 0000000039\u001b[0m\n",
"\u001b[32m2024-07-23 12:03:25.386\u001b[0m | \u001b[1mINFO \u001b[0m | \u001b[36mceleri.celeri\u001b[0m:\u001b[36mget_logger\u001b[0m:\u001b[36m6345\u001b[0m - \u001b[1mWrite log file: ../runs/0000000039/0000000039.log\u001b[0m\n",
"\u001b[32m2024-07-23 12:03:25.386\u001b[0m | \u001b[1mINFO \u001b[0m | \u001b[36mceleri.celeri\u001b[0m:\u001b[36mread_data\u001b[0m:\u001b[36m302\u001b[0m - \u001b[1mReading data files\u001b[0m\n",
"\u001b[32m2024-07-23 12:03:25.391\u001b[0m | \u001b[32m\u001b[1mSUCCESS \u001b[0m | \u001b[36mceleri.celeri\u001b[0m:\u001b[36mread_data\u001b[0m:\u001b[36m306\u001b[0m - \u001b[32m\u001b[1mRead: ../data/segment/japan_new380_adjusted_segment_ribbonmesh.csv\u001b[0m\n",
"\u001b[32m2024-07-23 12:03:25.393\u001b[0m | \u001b[32m\u001b[1mSUCCESS \u001b[0m | \u001b[36mceleri.celeri\u001b[0m:\u001b[36mread_data\u001b[0m:\u001b[36m311\u001b[0m - \u001b[32m\u001b[1mRead: ../data/block/japan_block.csv\u001b[0m\n",
"\u001b[32m2024-07-23 12:03:25.394\u001b[0m | \u001b[32m\u001b[1mSUCCESS \u001b[0m | \u001b[36mceleri.celeri\u001b[0m:\u001b[36mread_data\u001b[0m:\u001b[36m318\u001b[0m - \u001b[32m\u001b[1mRead: ../data/mesh/japan_mesh_parameters.json\u001b[0m\n",
"\n",
"\u001b[32m2024-07-23 11:53:11.065\u001b[0m | \u001b[32m\u001b[1mSUCCESS \u001b[0m | \u001b[36mceleri.celeri\u001b[0m:\u001b[36mread_data\u001b[0m:\u001b[36m464\u001b[0m - \u001b[32m\u001b[1mRead: ../data/mesh/nankai.msh\u001b[0m\n",
"\u001b[32m2024-07-23 12:03:25.466\u001b[0m | \u001b[32m\u001b[1mSUCCESS \u001b[0m | \u001b[36mceleri.celeri\u001b[0m:\u001b[36mread_data\u001b[0m:\u001b[36m464\u001b[0m - \u001b[32m\u001b[1mRead: ../data/mesh/nankai.msh\u001b[0m\n",
"\n",
"\u001b[32m2024-07-23 11:53:11.093\u001b[0m | \u001b[32m\u001b[1mSUCCESS \u001b[0m | \u001b[36mceleri.celeri\u001b[0m:\u001b[36mread_data\u001b[0m:\u001b[36m464\u001b[0m - \u001b[32m\u001b[1mRead: ../data/mesh/japan.msh\u001b[0m\n",
"\u001b[32m2024-07-23 12:03:25.494\u001b[0m | \u001b[32m\u001b[1mSUCCESS \u001b[0m | \u001b[36mceleri.celeri\u001b[0m:\u001b[36mread_data\u001b[0m:\u001b[36m464\u001b[0m - \u001b[32m\u001b[1mRead: ../data/mesh/japan.msh\u001b[0m\n",
"\n",
"\u001b[32m2024-07-23 11:53:11.130\u001b[0m | \u001b[32m\u001b[1mSUCCESS \u001b[0m | \u001b[36mceleri.celeri\u001b[0m:\u001b[36mread_data\u001b[0m:\u001b[36m464\u001b[0m - \u001b[32m\u001b[1mRead: ../data/mesh/sagami.msh\u001b[0m\n",
"\u001b[32m2024-07-23 11:53:11.134\u001b[0m | \u001b[32m\u001b[1mSUCCESS \u001b[0m | \u001b[36mceleri.celeri\u001b[0m:\u001b[36mread_data\u001b[0m:\u001b[36m500\u001b[0m - \u001b[32m\u001b[1mRead: ../data/station/japan_station.csv\u001b[0m\n",
"\u001b[32m2024-07-23 11:53:11.135\u001b[0m | \u001b[32m\u001b[1mSUCCESS \u001b[0m | \u001b[36mceleri.celeri\u001b[0m:\u001b[36mread_data\u001b[0m:\u001b[36m519\u001b[0m - \u001b[32m\u001b[1mRead: ../data/mogi/japan_mogi.csv\u001b[0m\n",
"\u001b[32m2024-07-23 11:53:11.136\u001b[0m | \u001b[1mINFO \u001b[0m | \u001b[36mceleri.celeri\u001b[0m:\u001b[36mread_data\u001b[0m:\u001b[36m537\u001b[0m - \u001b[1mNo sar_file_name\u001b[0m\n"
"\u001b[32m2024-07-23 12:03:25.529\u001b[0m | \u001b[32m\u001b[1mSUCCESS \u001b[0m | \u001b[36mceleri.celeri\u001b[0m:\u001b[36mread_data\u001b[0m:\u001b[36m464\u001b[0m - \u001b[32m\u001b[1mRead: ../data/mesh/sagami.msh\u001b[0m\n",
"\u001b[32m2024-07-23 12:03:25.533\u001b[0m | \u001b[32m\u001b[1mSUCCESS \u001b[0m | \u001b[36mceleri.celeri\u001b[0m:\u001b[36mread_data\u001b[0m:\u001b[36m500\u001b[0m - \u001b[32m\u001b[1mRead: ../data/station/japan_station.csv\u001b[0m\n",
"\u001b[32m2024-07-23 12:03:25.535\u001b[0m | \u001b[32m\u001b[1mSUCCESS \u001b[0m | \u001b[36mceleri.celeri\u001b[0m:\u001b[36mread_data\u001b[0m:\u001b[36m519\u001b[0m - \u001b[32m\u001b[1mRead: ../data/mogi/japan_mogi.csv\u001b[0m\n",
"\u001b[32m2024-07-23 12:03:25.536\u001b[0m | \u001b[1mINFO \u001b[0m | \u001b[36mceleri.celeri\u001b[0m:\u001b[36mread_data\u001b[0m:\u001b[36m537\u001b[0m - \u001b[1mNo sar_file_name\u001b[0m\n"
]
}
],
Expand Down Expand Up @@ -132,7 +132,7 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": 5,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -201,7 +201,6 @@
" # Use top and bottom coordinates to make a mesh\n",
" filename = mesh_dir + '/' + seg_file_stem + '_ribbonmesh' + str(i+1)\n",
" clen = 5\n",
" # ribbon_mesh(top_coords, np.flipud(bot_coords), 'ribbon_test.msh', 5)\n",
" \n",
" # Combined coordinates making a continuous perimeter loop\n",
" all_coords = np.vstack((top_coords, np.flipud(bot_coords)))\n",
Expand Down Expand Up @@ -308,7 +307,7 @@
"\n",
"# Assign all parameters to newly created meshes\n",
"for j in range(i+1):\n",
" filename = mesh_dir + '/ribbon_mesh' + str(j+1)\n",
" filename = mesh_dir + '/' + seg_file_stem + '_ribbonmesh' + str(j+1)\n",
" new_entry = {'mesh_filename': filename + '.msh'}\n",
" for key, value in mesh_default.items():\n",
" new_entry[key] = value\n",
Expand Down

0 comments on commit faae7cf

Please sign in to comment.