From 363415e780c55fbd5cd156a4ffc226b82dcabcfe Mon Sep 17 00:00:00 2001 From: Masaru Nagaso Date: Wed, 21 Feb 2024 08:54:57 -0700 Subject: [PATCH] parameters format modified --- .../MESH/nummaterial_velocity_file | 4 +- .../create_mesh_flat.ipynb | 58 +++++++++---------- .../create_mesh_topo.ipynb | 4 +- 3 files changed, 30 insertions(+), 36 deletions(-) diff --git a/EXAMPLES/Gmsh_example_CPML_MPI/MESH/nummaterial_velocity_file b/EXAMPLES/Gmsh_example_CPML_MPI/MESH/nummaterial_velocity_file index 7bc3e3a82..f4df6595c 100644 --- a/EXAMPLES/Gmsh_example_CPML_MPI/MESH/nummaterial_velocity_file +++ b/EXAMPLES/Gmsh_example_CPML_MPI/MESH/nummaterial_velocity_file @@ -1,2 +1,2 @@ -2 1 1850.d0 2400.d0 1200.d0 0 0 9999 9999 0 0 0 0 0 0 -1 1 1020.d0 1500.d0 0 0 0 9999 9999 0 0 0 0 0 0 +2 1 1850.d0 2400.d0 1200.d0 9999 9999 0 +1 2 1020.d0 1500.d0 0.d0 9999 9999 0 diff --git a/EXAMPLES/Gmsh_example_CPML_MPI/create_mesh_flat.ipynb b/EXAMPLES/Gmsh_example_CPML_MPI/create_mesh_flat.ipynb index 3d0e55708..04b8a2bf3 100644 --- a/EXAMPLES/Gmsh_example_CPML_MPI/create_mesh_flat.ipynb +++ b/EXAMPLES/Gmsh_example_CPML_MPI/create_mesh_flat.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "code", - "execution_count": 1, + "execution_count": 7, "metadata": {}, "outputs": [ { @@ -34,42 +34,36 @@ "Info : [ 90%] Meshing curve 22 (Line)\n", "Info : [100%] Meshing curve 23 (Line)\n", "Info : [100%] Meshing curve 24 (Line)\n", - "Info : Done meshing 1D (Wall 0.00349123s, CPU 0s)\n", + "Info : Done meshing 1D (Wall 0.00413646s, CPU 0.005487s)\n", "Info : Meshing 2D...\n", - "Info : [ 0%] Meshing surface 1 (Plane, Frontal-Delaunay)\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ + "Info : [ 0%] Meshing surface 1 (Plane, Frontal-Delaunay)\n", "Info : [ 0%] Blossom: 40035 internal 624 closed\n", - "Info : [ 0%] Blossom recombination completed (Wall 4.00456s, CPU 3.94816s): 13384 quads, 0 triangles, 0 invalid quads, 0 quads with Q < 0.1, avg Q = 0.814692, min Q = 0.485156\n", + "Info : [ 0%] Blossom recombination completed (Wall 1.82581s, CPU 1.82236s): 13384 quads, 0 triangles, 0 invalid quads, 0 quads with Q < 0.1, avg Q = 0.814692, min Q = 0.485156\n", "Info : [ 20%] Meshing surface 2 (Plane, Frontal-Delaunay)\n", "Info : [ 20%] Blossom: 7478 internal 488 closed\n", - "Info : [ 20%] Blossom recombination completed (Wall 0.201732s, CPU 0.202961s): 2536 quads, 0 triangles, 0 invalid quads, 0 quads with Q < 0.1, avg Q = 0.794224, min Q = 0.413601\n", + "Info : [ 20%] Blossom recombination completed (Wall 0.102926s, CPU 0.102715s): 2536 quads, 0 triangles, 0 invalid quads, 0 quads with Q < 0.1, avg Q = 0.794224, min Q = 0.413601\n", "Info : [ 30%] Meshing surface 3 (Plane, Frontal-Delaunay)\n", "Info : [ 30%] Blossom: 3898 internal 544 closed\n", - "Info : [ 30%] Blossom recombination completed (Wall 0.0859613s, CPU 0.087345s): 1368 quads, 0 triangles, 0 invalid quads, 0 quads with Q < 0.1, avg Q = 0.809861, min Q = 0.478976\n", + "Info : [ 30%] Blossom recombination completed (Wall 0.0439567s, CPU 0.04426s): 1368 quads, 0 triangles, 0 invalid quads, 0 quads with Q < 0.1, avg Q = 0.809861, min Q = 0.478976\n", "Info : [ 40%] Meshing surface 4 (Plane, Frontal-Delaunay)\n", "Info : [ 40%] Blossom: 55 internal 16 closed\n", - "Info : [ 40%] Blossom recombination completed (Wall 0.00871975s, CPU 0.008957s): 21 quads, 0 triangles, 0 invalid quads, 0 quads with Q < 0.1, avg Q = 0.686408, min Q = 0.480111\n", + "Info : [ 40%] Blossom recombination completed (Wall 0.00243801s, CPU 0.002361s): 21 quads, 0 triangles, 0 invalid quads, 0 quads with Q < 0.1, avg Q = 0.686408, min Q = 0.480111\n", "Info : [ 50%] Meshing surface 5 (Plane, Frontal-Delaunay)\n", "Info : [ 50%] Blossom: 627 internal 96 closed\n", - "Info : [ 50%] Blossom recombination completed (Wall 0.0125843s, CPU 0.012848s): 224 quads, 0 triangles, 0 invalid quads, 0 quads with Q < 0.1, avg Q = 0.808744, min Q = 0.544999\n", + "Info : [ 50%] Blossom recombination completed (Wall 0.00655669s, CPU 0.006643s): 224 quads, 0 triangles, 0 invalid quads, 0 quads with Q < 0.1, avg Q = 0.808744, min Q = 0.544999\n", "Info : [ 60%] Meshing surface 6 (Plane, Frontal-Delaunay)\n", "Info : [ 60%] Blossom: 130 internal 28 closed\n", - "Info : [ 60%] Blossom recombination completed (Wall 0.00858698s, CPU 0.008989s): 46 quads, 0 triangles, 0 invalid quads, 0 quads with Q < 0.1, avg Q = 0.764198, min Q = 0.532218\n", + "Info : [ 60%] Blossom recombination completed (Wall 0.0027912s, CPU 0.002842s): 46 quads, 0 triangles, 0 invalid quads, 0 quads with Q < 0.1, avg Q = 0.764198, min Q = 0.532218\n", "Info : [ 70%] Meshing surface 7 (Plane, Frontal-Delaunay)\n", "Info : [ 70%] Blossom: 130 internal 28 closed\n", - "Info : [ 70%] Blossom recombination completed (Wall 0.00398914s, CPU 0.004081s): 47 quads, 0 triangles, 0 invalid quads, 0 quads with Q < 0.1, avg Q = 0.715324, min Q = 0.513152\n", + "Info : [ 70%] Blossom recombination completed (Wall 0.00192447s, CPU 0.001959s): 47 quads, 0 triangles, 0 invalid quads, 0 quads with Q < 0.1, avg Q = 0.715324, min Q = 0.513152\n", "Info : [ 80%] Meshing surface 8 (Plane, Frontal-Delaunay)\n", "Info : [ 80%] Blossom: 645 internal 96 closed\n", - "Info : [ 80%] Blossom recombination completed (Wall 0.0150233s, CPU 0.015116s): 226 quads, 0 triangles, 0 invalid quads, 0 quads with Q < 0.1, avg Q = 0.80438, min Q = 0.511661\n", + "Info : [ 80%] Blossom recombination completed (Wall 0.00728874s, CPU 0.007322s): 226 quads, 0 triangles, 0 invalid quads, 0 quads with Q < 0.1, avg Q = 0.80438, min Q = 0.511661\n", "Info : [ 90%] Meshing surface 9 (Plane, Frontal-Delaunay)\n", "Info : [ 90%] Blossom: 55 internal 16 closed\n", - "Info : [ 90%] Blossom recombination completed (Wall 0.0072119s, CPU 0.007228s): 21 quads, 0 triangles, 0 invalid quads, 0 quads with Q < 0.1, avg Q = 0.686408, min Q = 0.480111\n", - "Info : Done meshing 2D (Wall 5.24303s, CPU 5.18039s)\n", + "Info : [ 90%] Blossom recombination completed (Wall 0.0021393s, CPU 0.002175s): 21 quads, 0 triangles, 0 invalid quads, 0 quads with Q < 0.1, avg Q = 0.686408, min Q = 0.480111\n", + "Info : Done meshing 2D (Wall 2.55103s, CPU 2.55146s)\n", "Info : 18174 nodes 19157 elements\n", "Info : Meshing order 2 (curvilinear on)...\n", "Info : [ 0%] Meshing curve 1 order 2\n", @@ -105,7 +99,7 @@ "Info : [100%] Meshing surface 7 order 2\n", "Info : [100%] Meshing surface 8 order 2\n", "Info : [100%] Meshing surface 9 order 2\n", - "Info : Done meshing order 2 (Wall 0.365665s, CPU 0.362499s)\n" + "Info : Done meshing order 2 (Wall 0.16061s, CPU 0.162118s)\n" ] } ], @@ -346,7 +340,7 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": 8, "metadata": {}, "outputs": [ { @@ -361,7 +355,7 @@ " Cell sets: Top, Left, Right, Bottom, M1, M2, PML_X, PML_Y, PML_XY" ] }, - "execution_count": 2, + "execution_count": 8, "metadata": {}, "output_type": "execute_result" } @@ -372,21 +366,21 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": 9, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "Time elapsed for nodes: 0.26607608795166016 seconds\n", - "Time elapsed for mesh: 0.10729503631591797 seconds\n", + "Time elapsed for nodes: 0.17705631256103516 seconds\n", + "Time elapsed for mesh: 0.0657954216003418 seconds\n", "material keys: ['M1', 'M2']\n", "cell_id_offset: 599\n", - "Time elapsed for material: 0.0733652114868164 seconds\n", - "Time elapsed for surf: 7.4610443115234375 seconds\n", - "Time elapsed for cpml: 1.2932682037353516 seconds\n", - "Time elapsed: 9.20169448852539 seconds\n" + "Time elapsed for material: 0.044806718826293945 seconds\n", + "Time elapsed for surf: 0.11626362800598145 seconds\n", + "Time elapsed for cpml: 0.00447535514831543 seconds\n", + "Time elapsed: 0.40877270698547363 seconds\n" ] } ], @@ -399,7 +393,7 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": 10, "metadata": {}, "outputs": [], "source": [ @@ -439,10 +433,10 @@ "fname = \"MESH/nummaterial_velocity_file\"\n", "\n", "# M1: subsurface\n", - "M1_params = \"2 1 1850.d0 2400.d0 1200.d0 0 0 9999 9999 0 0 0 0 0 0\"\n", + "M1_params = \"2 1 1850.d0 2400.d0 1200.d0 9999 9999 0\"\n", "\n", "# M2: water\n", - "M2_params = \"1 1 1020.d0 1500.d0 0 0 0 9999 9999 0 0 0 0 0 0\"\n", + "M2_params = \"1 2 1020.d0 1500.d0 0.d0 9999 9999 0\"\n", "\n", "with open(fname, \"w\") as f:\n", " f.write(M1_params + \"\\n\")\n", diff --git a/EXAMPLES/Gmsh_example_CPML_MPI/create_mesh_topo.ipynb b/EXAMPLES/Gmsh_example_CPML_MPI/create_mesh_topo.ipynb index 409e85908..e8b0a267c 100644 --- a/EXAMPLES/Gmsh_example_CPML_MPI/create_mesh_topo.ipynb +++ b/EXAMPLES/Gmsh_example_CPML_MPI/create_mesh_topo.ipynb @@ -466,10 +466,10 @@ "fname = \"MESH/nummaterial_velocity_file\"\n", "\n", "# M1: subsurface\n", - "M1_params = \"2 1 1850.d0 2400.d0 1200.d0 0 0 9999 9999 0 0 0 0 0 0\"\n", + "M1_params = \"2 1 1850.d0 2400.d0 1200.d0 9999 9999 0\"\n", "\n", "# M2: water\n", - "M2_params = \"1 1 1020.d0 1500.d0 0 0 0 9999 9999 0 0 0 0 0 0\"\n", + "M2_params = \"1 2 1020.d0 1500.d0 0.d0 9999 9999 0\"\n", "\n", "with open(fname, \"w\") as f:\n", " f.write(M1_params + \"\\n\")\n",