[cig-commits] r18019 - in seismo/2D/SPECFEM2D/trunk: DATA src/meshfem2D
carltape at geodynamics.org
carltape at geodynamics.org
Thu Mar 3 10:54:07 PST 2011
Author: carltape
Date: 2011-03-03 10:54:07 -0800 (Thu, 03 Mar 2011)
New Revision: 18019
Modified:
seismo/2D/SPECFEM2D/trunk/DATA/Par_file.in
seismo/2D/SPECFEM2D/trunk/src/meshfem2D/read_parameter_file.F90
Log:
separated internal mesh parameters from external mesh parameters in Par_file -- all Par_files in EXAMPLES will eventually need to be updated
Modified: seismo/2D/SPECFEM2D/trunk/DATA/Par_file.in
===================================================================
--- seismo/2D/SPECFEM2D/trunk/DATA/Par_file.in 2011-03-03 18:49:25 UTC (rev 18018)
+++ seismo/2D/SPECFEM2D/trunk/DATA/Par_file.in 2011-03-03 18:54:07 UTC (rev 18019)
@@ -1,29 +1,15 @@
-# title of job, and file that contains interface data
+# title of job
title = Test for M2 UPPA
-interfacesfile = ../EXAMPLES/M2_UPPA/interfaces_M2_UPPA_curved.dat
# forward or adjoint simulation
SIMULATION_TYPE = 1 # 1 = forward, 2 = adjoint + kernels
SAVE_FORWARD = .false. # save the last frame, needed for adjoint simulation
-# data concerning mesh, when generated using third-party app (more info in README)
-read_external_mesh = .false.
-mesh_file = ./DATA/Mesh_canyon/canyon_mesh_file # file containing the mesh
-nodes_coords_file = ./DATA/Mesh_canyon/canyon_nodes_coords_file # file containing the nodes coordinates
-materials_file = ./DATA/Mesh_canyon/canyon_materials_file # file containing the material number for each element
-free_surface_file = ./DATA/Mesh_canyon/canyon_free_surface_file # file containing the free surface
-absorbing_surface_file = ./DATA/Mesh_canyon/canyon_absorbing_surface_file # file containing the absorbing surface
-tangential_detection_curve_file = ./DATA/courbe_eros_nodes # file containing the curve delimiting the velocity model
-
# parameters concerning partitioning
nproc = 1 # number of processes
partitioning_method = 3 # SCOTCH = 3, ascending order (very bad idea) = 1
-# geometry of the model (origin lower-left corner = 0,0) and mesh description
-xmin = 0.d0 # abscissa of left side of the model
-xmax = 4000.d0 # abscissa of right side of the model
-nx = 80 # number of elements along X
ngnod = 9 # number of control nodes per element (4 or 9)
initialfield = .false. # use a plane wave as source or not
add_Bielak_conditions = .false. # add Bielak conditions or not if initial plane wave
@@ -35,13 +21,6 @@
freq0 = 10 # frequency for viscous attenuation
p_sv = .true. # set the type of calculation (P-SV or SH/membrane waves)
-# absorbing boundary parameters
-absorbing_conditions = .true. # absorbing boundary active or not
-absorbbottom = .true.
-absorbright = .true.
-absorbtop = .false.
-absorbleft = .true.
-
# time step parameters
nt = 1600 # total number of time steps
deltat = 1.d-3 # duration of a time step
@@ -61,7 +40,7 @@
anglerec = 0.d0 # angle to rotate components at receivers
rec_normal_to_surface = .false. # base anglerec normal to surface (external mesh and curve file needed)
-# first receiver line
+# first receiver line (repeat these 6 lines and adjust nreceiverlines accordingly)
nrec = 11 # number of receivers
xdeb = 300. # first receiver x in meters
zdeb = 2200. # first receiver z in meters
@@ -98,6 +77,42 @@
2 1 2500.d0 2700.d0 0 0 0 9999 9999 0 0 0 0 0 0
3 1 2200.d0 2500.d0 1443.375d0 0 0 9999 9999 0 0 0 0 0 0
4 1 2200.d0 2200.d0 1343.375d0 0 0 9999 9999 0 0 0 0 0 0
+
+# external mesh or not
+read_external_mesh = .false.
+
+# absorbing boundary active or not
+absorbing_conditions = .true.
+
+#-----------------------------------------------------------------------------
+# PARAMETERS FOR EXTERNAL MESHING
+
+# data concerning mesh, when generated using third-party app (more info in README)
+# (see also absorbing_conditions above)
+mesh_file = ./DATA/Mesh_canyon/canyon_mesh_file # file containing the mesh
+nodes_coords_file = ./DATA/Mesh_canyon/canyon_nodes_coords_file # file containing the nodes coordinates
+materials_file = ./DATA/Mesh_canyon/canyon_materials_file # file containing the material number for each element
+free_surface_file = ./DATA/Mesh_canyon/canyon_free_surface_file # file containing the free surface
+absorbing_surface_file = ./DATA/Mesh_canyon/canyon_absorbing_surface_file # file containing the absorbing surface
+tangential_detection_curve_file = ./DATA/courbe_eros_nodes # file containing the curve delimiting the velocity model
+
+#-----------------------------------------------------------------------------
+# PARAMETERS FOR INTERNAL MESHING
+
+# file containing interfaces for internal mesh
+interfacesfile = ../EXAMPLES/M2_UPPA/interfaces_M2_UPPA_curved.dat
+
+# geometry of the model (origin lower-left corner = 0,0) and mesh description
+xmin = 0.d0 # abscissa of left side of the model
+xmax = 4000.d0 # abscissa of right side of the model
+nx = 80 # number of elements along X
+
+# absorbing boundary parameters (see absorbing_conditions above)
+absorbbottom = .true.
+absorbright = .true.
+absorbtop = .false.
+absorbleft = .true.
+
# define the different regions of the model in the (nx,nz) spectral element mesh
nbregions = 4 # nb of regions and model number for each
1 80 1 20 1
Modified: seismo/2D/SPECFEM2D/trunk/src/meshfem2D/read_parameter_file.F90
===================================================================
--- seismo/2D/SPECFEM2D/trunk/src/meshfem2D/read_parameter_file.F90 2011-03-03 18:49:25 UTC (rev 18018)
+++ seismo/2D/SPECFEM2D/trunk/src/meshfem2D/read_parameter_file.F90 2011-03-03 18:54:07 UTC (rev 18019)
@@ -128,7 +128,6 @@
! read file names and path for output
call read_value_string(IIN,IGNORE_JUNK,title)
- call read_value_string(IIN,IGNORE_JUNK,interfacesfile)
write(*,*) 'Title of the simulation'
write(*,*) title
@@ -138,23 +137,10 @@
call read_value_integer(IIN,IGNORE_JUNK,SIMULATION_TYPE)
call read_value_logical(IIN,IGNORE_JUNK,SAVE_FORWARD)
- ! read info about external mesh
- call read_value_logical(IIN,IGNORE_JUNK,read_external_mesh)
- call read_value_string(IIN,IGNORE_JUNK,mesh_file)
- call read_value_string(IIN,IGNORE_JUNK,nodes_coords_file)
- call read_value_string(IIN,IGNORE_JUNK,materials_file)
- call read_value_string(IIN,IGNORE_JUNK,free_surface_file)
- call read_value_string(IIN,IGNORE_JUNK,absorbing_surface_file)
- call read_value_string(IIN,IGNORE_JUNK,tangential_detection_curve_file)
-
! read info about partitioning
call read_value_integer(IIN,IGNORE_JUNK,nproc)
call read_value_integer(IIN,IGNORE_JUNK,partitioning_method)
- ! read grid parameters
- call read_value_double_precision(IIN,IGNORE_JUNK,xmin)
- call read_value_double_precision(IIN,IGNORE_JUNK,xmax)
- call read_value_integer(IIN,IGNORE_JUNK,nx)
call read_value_integer(IIN,IGNORE_JUNK,ngnod)
call read_value_logical(IIN,IGNORE_JUNK,initialfield)
call read_value_logical(IIN,IGNORE_JUNK,add_Bielak_conditions)
@@ -168,13 +154,6 @@
! determine if body or surface (membrane) waves calculation
call read_value_logical(IIN,IGNORE_JUNK,p_sv)
- ! read absorbing boundaries parameters
- call read_value_logical(IIN,IGNORE_JUNK,any_abs)
- call read_value_logical(IIN,IGNORE_JUNK,absbottom)
- call read_value_logical(IIN,IGNORE_JUNK,absright)
- call read_value_logical(IIN,IGNORE_JUNK,abstop)
- call read_value_logical(IIN,IGNORE_JUNK,absleft)
-
! read time step parameters
call read_value_integer(IIN,IGNORE_JUNK,nt)
call read_value_double_precision(IIN,IGNORE_JUNK,deltat)
@@ -235,7 +214,6 @@
call read_value_logical(IIN,IGNORE_JUNK,outputgrid)
call read_value_logical(IIN,IGNORE_JUNK,OUTPUT_ENERGY)
-
! read the different material materials
call read_value_integer(IIN,IGNORE_JUNK,nb_materials)
if(nb_materials <= 0) stop 'Negative number of materials not allowed!'
@@ -270,7 +248,42 @@
permxx,permxz,permzz,kappa_s,kappa_f,kappa_fr, &
eta_f,mu_fr)
+ ! boolean defining whether internal or external mesh
+ call read_value_logical(IIN,IGNORE_JUNK,read_external_mesh)
+ ! boolean defining whether to use any absorbing boundaries
+ call read_value_logical(IIN,IGNORE_JUNK,any_abs)
+
+ !-----------------
+ ! external mesh parameters
+
+ ! read info about external mesh
+ call read_value_string(IIN,IGNORE_JUNK,mesh_file)
+ call read_value_string(IIN,IGNORE_JUNK,nodes_coords_file)
+ call read_value_string(IIN,IGNORE_JUNK,materials_file)
+ call read_value_string(IIN,IGNORE_JUNK,free_surface_file)
+ call read_value_string(IIN,IGNORE_JUNK,absorbing_surface_file)
+ call read_value_string(IIN,IGNORE_JUNK,tangential_detection_curve_file)
+
+ !-----------------
+ ! internal mesh parameters
+
+ ! interfaces file
+ call read_value_string(IIN,IGNORE_JUNK,interfacesfile)
+
+ ! read grid parameters
+ call read_value_double_precision(IIN,IGNORE_JUNK,xmin)
+ call read_value_double_precision(IIN,IGNORE_JUNK,xmax)
+ call read_value_integer(IIN,IGNORE_JUNK,nx)
+
+ ! read absorbing boundary parameters
+ call read_value_logical(IIN,IGNORE_JUNK,absbottom)
+ call read_value_logical(IIN,IGNORE_JUNK,absright)
+ call read_value_logical(IIN,IGNORE_JUNK,abstop)
+ call read_value_logical(IIN,IGNORE_JUNK,absleft)
+
+ ! note: if internal mesh, then regions will be read in by read_regions (from meshfem2D)
+
! checks input parameters
call check_parameters()
More information about the CIG-COMMITS
mailing list