diff --git a/CUBIT_GEOCUBIT/examples/homogeneous_halfspace/make_mesh.sh b/CUBIT_GEOCUBIT/examples/homogeneous_halfspace/make_mesh.sh index 421f5ea9b..f1d522169 100755 --- a/CUBIT_GEOCUBIT/examples/homogeneous_halfspace/make_mesh.sh +++ b/CUBIT_GEOCUBIT/examples/homogeneous_halfspace/make_mesh.sh @@ -16,4 +16,4 @@ GEOCUBIT.py --build_volume --mesh --cfg=homogeneous_halfspace.cfg GEOCUBIT.py --collect --meshfiles=MESH_GEOCUBIT/mesh_vol_0.e --export2SPECFEM3D --SEMoutput=MESH -cp nummaterial_velocity_file.elastic_halfspace MESH/nummaterial_velocity_file \ No newline at end of file +cp nummaterial_velocity_file.elastic_halfspace MESH/nummaterial_velocity_file diff --git a/CUBIT_GEOCUBIT/examples/homogeneous_halfspace_hex27/make_mesh_hex27.sh b/CUBIT_GEOCUBIT/examples/homogeneous_halfspace_hex27/make_mesh_hex27.sh index eff96c699..4f459fa39 100755 --- a/CUBIT_GEOCUBIT/examples/homogeneous_halfspace_hex27/make_mesh_hex27.sh +++ b/CUBIT_GEOCUBIT/examples/homogeneous_halfspace_hex27/make_mesh_hex27.sh @@ -16,4 +16,4 @@ GEOCUBIT.py --build_volume --mesh --cfg=homogeneous_halfspace.cfg GEOCUBIT.py --collect --meshfiles=MESH_GEOCUBIT/mesh_vol_0.e --export2SPECFEM3D --SEMoutput=MESH --hex27 -cp nummaterial_velocity_file.elastic_halfspace MESH/nummaterial_velocity_file \ No newline at end of file +cp nummaterial_velocity_file.elastic_halfspace MESH/nummaterial_velocity_file diff --git a/CUBIT_GEOCUBIT/examples/layered_halfspace/make_mesh_notripling.sh b/CUBIT_GEOCUBIT/examples/layered_halfspace/make_mesh_notripling.sh index d08277d90..305ec55f0 100755 --- a/CUBIT_GEOCUBIT/examples/layered_halfspace/make_mesh_notripling.sh +++ b/CUBIT_GEOCUBIT/examples/layered_halfspace/make_mesh_notripling.sh @@ -16,4 +16,4 @@ GEOCUBIT.py --build_volume --mesh --cfg='./notripling/layered_halfspace_notripling.cfg' GEOCUBIT.py --collect --meshfiles=MESH_GEOCUBIT/mesh_vol_0.e --export2SPECFEM3D --SEMoutput=MESH -cp nummaterial_velocity_file.notripling MESH/nummaterial_velocity_file \ No newline at end of file +cp nummaterial_velocity_file.notripling MESH/nummaterial_velocity_file diff --git a/CUBIT_GEOCUBIT/examples/layered_halfspace/make_mesh_tripling.sh b/CUBIT_GEOCUBIT/examples/layered_halfspace/make_mesh_tripling.sh index 006ca1457..4a2a991fb 100755 --- a/CUBIT_GEOCUBIT/examples/layered_halfspace/make_mesh_tripling.sh +++ b/CUBIT_GEOCUBIT/examples/layered_halfspace/make_mesh_tripling.sh @@ -16,4 +16,4 @@ GEOCUBIT.py --build_volume --mesh --cfg='./notripling/layered_halfspace_tripling.cfg' GEOCUBIT.py --collect --meshfiles=MESH_GEOCUBIT/mesh_vol_0.e --export2SPECFEM3D --SEMoutput=MESH -cp nummaterial_velocity_file.tripling MESH/nummaterial_velocity_file \ No newline at end of file +cp nummaterial_velocity_file.tripling MESH/nummaterial_velocity_file diff --git a/CUBIT_GEOCUBIT/examples/tomographic_model/tomography/create_tomography_model_file.sh b/CUBIT_GEOCUBIT/examples/tomographic_model/tomography/create_tomography_model_file.sh index 6e1364237..62021ad23 100644 --- a/CUBIT_GEOCUBIT/examples/tomographic_model/tomography/create_tomography_model_file.sh +++ b/CUBIT_GEOCUBIT/examples/tomographic_model/tomography/create_tomography_model_file.sh @@ -1,21 +1,21 @@ #!/bin/sh -# creates a simple, formatted tomography model with a constant velocity gradient +# creates a simple, formatted tomography model with a constant velocity gradient # for a block model with dimensions 134000 x 134000 x 60000 # origin points ORIG_X=0. -ORIG_Y=0. -ORIG_Z=0. +ORIG_Y=0. +ORIG_Z=0. # end points -END_X=134000. -END_Y=134000. +END_X=134000. +END_Y=134000. END_Z=-60000. # depth in negative z-direction # spacing of given tomography points -SPACING_X=2000. -SPACING_Y=2000. +SPACING_X=2000. +SPACING_Y=2000. SPACING_Z=-2000. # number of cell increments @@ -24,11 +24,11 @@ NY=68 NZ=31 # min/max values -VP_MIN=2500. -VP_MAX=8500. +VP_MIN=2500. +VP_MAX=8500. VS_MIN=1500. -VS_MAX=7500. -RHO_MIN=1500. +VS_MAX=7500. +RHO_MIN=1500. RHO_MAX=1500. diff --git a/CUBIT_GEOCUBIT/geocubitlib/save_fault_nodes_elements.py b/CUBIT_GEOCUBIT/geocubitlib/save_fault_nodes_elements.py new file mode 100644 index 000000000..5abab5ca4 --- /dev/null +++ b/CUBIT_GEOCUBIT/geocubitlib/save_fault_nodes_elements.py @@ -0,0 +1,117 @@ +#!python +# Opening fault cracks +# Input : surface up and down. +import cubit + +class fault_input: + def __init__(self,id,surface_u,surface_d): + self.id = id + self.surface_u = surface_u + self.surface_d = surface_d + self.name = 'MESH/fault_file_'+str(id)+'.dat' + + quads_Aup,quads_Adp = save_cracks(self.name,self.surface_u,self.surface_d) + #Unpacking list. + quads_Au=unpack_list(quads_Aup) + quads_Ad=unpack_list(quads_Adp) + + print 'len(Au):',len(quads_Au) + print 'len(Ad):',len(quads_Ad) + + if not (len(quads_Au)==len(quads_Ad)): + print 'Number of elements for each fauld side up and down do not concide' + sys.exit('goodbye') + + save_elements_nodes(self.name,quads_Au,quads_Ad) + + +def save_cracks(name,list_surface_up,list_surface_down): + quads_fault_up = [] + quads_fault_down = [] + for surface in list_surface_up : + quads_fault = cubit.get_surface_quads(surface) + quads_fault_up.append(quads_fault) + for surface in list_surface_down : + quads_fault = cubit.get_surface_quads(surface) + quads_fault_down.append(quads_fault) + # TO DO : stop python properly in case fault nodes at both sides + # do not match. + # if len(quads_fault_u) != len(quads_fault_d): stop + # + # SAVING FAULT ELEMENTS AND NODES + return quads_fault_up,quads_fault_down + +def unpack_list(fault_list): + list_fault = [] + for i in range(0,len(fault_list)): + el=list(fault_list[i]) + for j in el: + list_fault.append(j) + return list_fault + +def save_elements_nodes(name,quads_fault_u,quads_fault_d): + fault_file = open(name,'w') + txt ='' + list_hex=cubit.parse_cubit_list('hex','all') + txt='%10i %10i\n' % (len(quads_fault_u),len(quads_fault_d)) + fault_file.write(txt) + + dic_quads_fault_u = dict(zip(quads_fault_u,quads_fault_u)) + dic_quads_fault_d = dict(zip(quads_fault_d,quads_fault_d)) + + # FAULT SIDE DOWN + # fault_file.write('upsurface') + for h in list_hex: + faces = cubit.get_sub_elements('hex',h,2) + for f in faces: + if dic_quads_fault_d.has_key(f): + cubit.silent_cmd('group "nf" add Node in face '+str(f)) + group1 = cubit.get_id_from_name("nf") + nodes = cubit.get_group_nodes(group1) + cubit.silent_cmd('del group '+ str(group1)) +# nodes=cubit.get_connectivity('Face',f) +# print 'h,fault nodes side down :',h,nodes[0],nodes[1],nodes[2],nodes[3] +# txt='%10i %10i %10i %10i %10i\n' % (h,nodes[0],\ +# nodes[1],nodes[2],nodes[3]) + ngnod2d = len(nodes) + if ngnod2d == 9: +#kangchen added txt='%10i %10i %10i %10i %10i\n' % (h,nodes[0],\ +# nodes[1],nodes[2],nodes[3]) + txt='%10i %10i %10i %10i %10i %10i %10i %10i %10i %10i\n' % (h,nodes[0],\ + nodes[1],nodes[2],nodes[3],nodes[4],nodes[5],nodes[6],nodes[7],nodes[8]) + else: + txt='%10i %10i %10i %10i %10i \n' % (h,nodes[0],\ + nodes[1],nodes[2],nodes[3]) + + + + + fault_file.write(txt) + + # FAULT SIDE UP + # fault_file.write('downsurface') + for h in list_hex: + faces = cubit.get_sub_elements('hex',h,2) + for f in faces: + if dic_quads_fault_u.has_key(f): + cubit.silent_cmd('group "nf" add Node in face '+str(f)) + group1 = cubit.get_id_from_name("nf") + nodes = cubit.get_group_nodes(group1) + cubit.cmd('del group '+ str(group1)) + ngnod2d=len(nodes) + if ngnod2d == 9: +# nodes=cubit.get_connectivity('Face',f) +# print 'h,fault nodes side up :',h,nodes[0],nodes[1],nodes[2],nodes[3] +#kangchen added txt='%10i %10i %10i %10i %10i\n' % (h,nodes[0],\ +# nodes[1],nodes[2],nodes[3]) + txt='%10i %10i %10i %10i %10i %10i %10i %10i %10i %10i\n' % (h,nodes[0],\ + nodes[1],nodes[2],nodes[3],nodes[4],nodes[5],nodes[6],nodes[7],nodes[8]) + else: + txt='%10i %10i %10i %10i %10i \n' % (h,nodes[0],\ + nodes[1],nodes[2],nodes[3]) + + + + fault_file.write(txt) + + fault_file.close() diff --git a/EXAMPLES/BENCHMARK_CLAERBOUT_ADJOINT/ACOUSTIC/DATA/Par_file b/EXAMPLES/BENCHMARK_CLAERBOUT_ADJOINT/ACOUSTIC/DATA/Par_file index 96037d393..a775d2c6e 100644 --- a/EXAMPLES/BENCHMARK_CLAERBOUT_ADJOINT/ACOUSTIC/DATA/Par_file +++ b/EXAMPLES/BENCHMARK_CLAERBOUT_ADJOINT/ACOUSTIC/DATA/Par_file @@ -119,10 +119,12 @@ USE_FORCE_POINT_SOURCE = .false. # to represent a (tilted) FORCESOLUTION force point source or a CMTSOLUTION moment-tensor source. USE_RICKER_TIME_FUNCTION = .false. -# decide if we save displacement, velocity and/or acceleration in forward runs (they can be set to true simultaneously) +# decide if we save displacement, velocity, acceleration and/or pressure in forward runs (they can be set to true simultaneously) +# currently pressure seismograms are implemented in acoustic (i.e. fluid) elements only SAVE_SEISMOGRAMS_DISPLACEMENT = .true. SAVE_SEISMOGRAMS_VELOCITY = .true. SAVE_SEISMOGRAMS_ACCELERATION = .true. +SAVE_SEISMOGRAMS_PRESSURE = .false. # currently implemented in acoustic (i.e. fluid) elements only # save seismograms in binary or ASCII format (binary is smaller but may not be portable between machines) USE_BINARY_FOR_SEISMOGRAMS = .false. @@ -137,6 +139,49 @@ WRITE_SEISMOGRAMS_BY_MASTER = .false. # to avoid overloading shared non-local file systems such as LUSTRE or GPFS for instance SAVE_ALL_SEISMOS_IN_ONE_FILE = .false. +# use a trick to increase accuracy of pressure seismograms in fluid (acoustic) elements: +# use the second derivative of the source for the source time function instead of the source itself, +# and then record -potential_acoustic() as pressure seismograms instead of -potential_dot_dot_acoustic(); +# this is mathematically equivalent, but numerically significantly more accurate because in the explicit +# Newmark time scheme acceleration is accurate at zeroth order while displacement is accurate at second order, +# thus in fluid elements potential_dot_dot_acoustic() is accurate at zeroth order while potential_acoustic() +# is accurate at second order and thus contains significantly less numerical noise. +USE_TRICK_FOR_BETTER_PRESSURE = .false. + +# +# source encoding +# +# determines source encoding factor +/-1 depending on sign of moment tensor +# (see e.g. Krebs et al., 2009. Fast full-wavefield seismic inversion using encoded sources, Geophysics, 74 (6), WCC177-WCC188.) +USE_SOURCE_ENCODING = .false. + +# +# total energy calculation +# +# to plot total energy curves, for instance to monitor how CPML absorbing layers behave; +# should be turned OFF in most cases because expensive +OUTPUT_ENERGY = .false. +# every how many time steps we compute energy (which is expensive to compute) +NTSTEP_BETWEEN_OUTPUT_ENERGY = 10 + +# +# adjoint kernel outputs +# +# this parameter must be set to .true. to compute anisotropic kernels +# in crust and mantle (related to the 21 Cij in geographical coordinates) +# default is .false. to compute isotropic kernels (related to alpha and beta) +ANISOTROPIC_KL = .false. + +# compute transverse isotropic kernels (alpha_v,alpha_h,beta_v,beta_h,eta,rho) +# rather than fully anisotropic kernels in case ANISOTROPIC_KL is set to .true. +SAVE_TRANSVERSE_KL = .false. + +# outputs approximate Hessian for preconditioning +APPROXIMATE_HESS_KL = .false. + +# save Moho mesh and compute Moho boundary kernels +SAVE_MOHO_MESH = .false. + # print source time function PRINT_SOURCE_TIME_FUNCTION = .false. diff --git a/EXAMPLES/BENCHMARK_CLAERBOUT_ADJOINT/ELASTIC/DATA/Par_file b/EXAMPLES/BENCHMARK_CLAERBOUT_ADJOINT/ELASTIC/DATA/Par_file index 6e891ae87..91b846c40 100644 --- a/EXAMPLES/BENCHMARK_CLAERBOUT_ADJOINT/ELASTIC/DATA/Par_file +++ b/EXAMPLES/BENCHMARK_CLAERBOUT_ADJOINT/ELASTIC/DATA/Par_file @@ -119,10 +119,12 @@ USE_FORCE_POINT_SOURCE = .false. # to represent a (tilted) FORCESOLUTION force point source or a CMTSOLUTION moment-tensor source. USE_RICKER_TIME_FUNCTION = .false. -# decide if we save displacement, velocity and/or acceleration in forward runs (they can be set to true simultaneously) +# decide if we save displacement, velocity, acceleration and/or pressure in forward runs (they can be set to true simultaneously) +# currently pressure seismograms are implemented in acoustic (i.e. fluid) elements only SAVE_SEISMOGRAMS_DISPLACEMENT = .true. SAVE_SEISMOGRAMS_VELOCITY = .true. SAVE_SEISMOGRAMS_ACCELERATION = .true. +SAVE_SEISMOGRAMS_PRESSURE = .false. # currently implemented in acoustic (i.e. fluid) elements only # save seismograms in binary or ASCII format (binary is smaller but may not be portable between machines) USE_BINARY_FOR_SEISMOGRAMS = .false. @@ -137,6 +139,49 @@ WRITE_SEISMOGRAMS_BY_MASTER = .false. # to avoid overloading shared non-local file systems such as LUSTRE or GPFS for instance SAVE_ALL_SEISMOS_IN_ONE_FILE = .false. +# use a trick to increase accuracy of pressure seismograms in fluid (acoustic) elements: +# use the second derivative of the source for the source time function instead of the source itself, +# and then record -potential_acoustic() as pressure seismograms instead of -potential_dot_dot_acoustic(); +# this is mathematically equivalent, but numerically significantly more accurate because in the explicit +# Newmark time scheme acceleration is accurate at zeroth order while displacement is accurate at second order, +# thus in fluid elements potential_dot_dot_acoustic() is accurate at zeroth order while potential_acoustic() +# is accurate at second order and thus contains significantly less numerical noise. +USE_TRICK_FOR_BETTER_PRESSURE = .false. + +# +# source encoding +# +# determines source encoding factor +/-1 depending on sign of moment tensor +# (see e.g. Krebs et al., 2009. Fast full-wavefield seismic inversion using encoded sources, Geophysics, 74 (6), WCC177-WCC188.) +USE_SOURCE_ENCODING = .false. + +# +# total energy calculation +# +# to plot total energy curves, for instance to monitor how CPML absorbing layers behave; +# should be turned OFF in most cases because expensive +OUTPUT_ENERGY = .false. +# every how many time steps we compute energy (which is expensive to compute) +NTSTEP_BETWEEN_OUTPUT_ENERGY = 10 + +# +# adjoint kernel outputs +# +# this parameter must be set to .true. to compute anisotropic kernels +# in crust and mantle (related to the 21 Cij in geographical coordinates) +# default is .false. to compute isotropic kernels (related to alpha and beta) +ANISOTROPIC_KL = .false. + +# compute transverse isotropic kernels (alpha_v,alpha_h,beta_v,beta_h,eta,rho) +# rather than fully anisotropic kernels in case ANISOTROPIC_KL is set to .true. +SAVE_TRANSVERSE_KL = .false. + +# outputs approximate Hessian for preconditioning +APPROXIMATE_HESS_KL = .false. + +# save Moho mesh and compute Moho boundary kernels +SAVE_MOHO_MESH = .false. + # print source time function PRINT_SOURCE_TIME_FUNCTION = .false. diff --git a/EXAMPLES/CPML_examples/homogeneous_halfspace_HEX8_acoustic_absorbing_CPML_5sides/DATA/Par_file b/EXAMPLES/CPML_examples/homogeneous_halfspace_HEX8_acoustic_absorbing_CPML_5sides/DATA/Par_file index 317f1a07d..c6b65e577 100644 --- a/EXAMPLES/CPML_examples/homogeneous_halfspace_HEX8_acoustic_absorbing_CPML_5sides/DATA/Par_file +++ b/EXAMPLES/CPML_examples/homogeneous_halfspace_HEX8_acoustic_absorbing_CPML_5sides/DATA/Par_file @@ -119,10 +119,12 @@ USE_FORCE_POINT_SOURCE = .false. # to represent a (tilted) FORCESOLUTION force point source or a CMTSOLUTION moment-tensor source. USE_RICKER_TIME_FUNCTION = .false. -# decide if we save displacement, velocity and/or acceleration in forward runs (they can be set to true simultaneously) +# decide if we save displacement, velocity, acceleration and/or pressure in forward runs (they can be set to true simultaneously) +# currently pressure seismograms are implemented in acoustic (i.e. fluid) elements only SAVE_SEISMOGRAMS_DISPLACEMENT = .true. SAVE_SEISMOGRAMS_VELOCITY = .true. SAVE_SEISMOGRAMS_ACCELERATION = .true. +SAVE_SEISMOGRAMS_PRESSURE = .false. # currently implemented in acoustic (i.e. fluid) elements only # save seismograms in binary or ASCII format (binary is smaller but may not be portable between machines) USE_BINARY_FOR_SEISMOGRAMS = .false. @@ -137,6 +139,49 @@ WRITE_SEISMOGRAMS_BY_MASTER = .false. # to avoid overloading shared non-local file systems such as LUSTRE or GPFS for instance SAVE_ALL_SEISMOS_IN_ONE_FILE = .false. +# use a trick to increase accuracy of pressure seismograms in fluid (acoustic) elements: +# use the second derivative of the source for the source time function instead of the source itself, +# and then record -potential_acoustic() as pressure seismograms instead of -potential_dot_dot_acoustic(); +# this is mathematically equivalent, but numerically significantly more accurate because in the explicit +# Newmark time scheme acceleration is accurate at zeroth order while displacement is accurate at second order, +# thus in fluid elements potential_dot_dot_acoustic() is accurate at zeroth order while potential_acoustic() +# is accurate at second order and thus contains significantly less numerical noise. +USE_TRICK_FOR_BETTER_PRESSURE = .false. + +# +# source encoding +# +# determines source encoding factor +/-1 depending on sign of moment tensor +# (see e.g. Krebs et al., 2009. Fast full-wavefield seismic inversion using encoded sources, Geophysics, 74 (6), WCC177-WCC188.) +USE_SOURCE_ENCODING = .false. + +# +# total energy calculation +# +# to plot total energy curves, for instance to monitor how CPML absorbing layers behave; +# should be turned OFF in most cases because expensive +OUTPUT_ENERGY = .false. +# every how many time steps we compute energy (which is expensive to compute) +NTSTEP_BETWEEN_OUTPUT_ENERGY = 10 + +# +# adjoint kernel outputs +# +# this parameter must be set to .true. to compute anisotropic kernels +# in crust and mantle (related to the 21 Cij in geographical coordinates) +# default is .false. to compute isotropic kernels (related to alpha and beta) +ANISOTROPIC_KL = .false. + +# compute transverse isotropic kernels (alpha_v,alpha_h,beta_v,beta_h,eta,rho) +# rather than fully anisotropic kernels in case ANISOTROPIC_KL is set to .true. +SAVE_TRANSVERSE_KL = .false. + +# outputs approximate Hessian for preconditioning +APPROXIMATE_HESS_KL = .false. + +# save Moho mesh and compute Moho boundary kernels +SAVE_MOHO_MESH = .false. + # print source time function PRINT_SOURCE_TIME_FUNCTION = .false. diff --git a/EXAMPLES/CPML_examples/homogeneous_halfspace_HEX8_acoustic_absorbing_CPML_6sides/DATA/Par_file b/EXAMPLES/CPML_examples/homogeneous_halfspace_HEX8_acoustic_absorbing_CPML_6sides/DATA/Par_file index ea49f227e..8886884dc 100644 --- a/EXAMPLES/CPML_examples/homogeneous_halfspace_HEX8_acoustic_absorbing_CPML_6sides/DATA/Par_file +++ b/EXAMPLES/CPML_examples/homogeneous_halfspace_HEX8_acoustic_absorbing_CPML_6sides/DATA/Par_file @@ -119,10 +119,12 @@ USE_FORCE_POINT_SOURCE = .false. # to represent a (tilted) FORCESOLUTION force point source or a CMTSOLUTION moment-tensor source. USE_RICKER_TIME_FUNCTION = .false. -# decide if we save displacement, velocity and/or acceleration in forward runs (they can be set to true simultaneously) +# decide if we save displacement, velocity, acceleration and/or pressure in forward runs (they can be set to true simultaneously) +# currently pressure seismograms are implemented in acoustic (i.e. fluid) elements only SAVE_SEISMOGRAMS_DISPLACEMENT = .true. SAVE_SEISMOGRAMS_VELOCITY = .true. SAVE_SEISMOGRAMS_ACCELERATION = .true. +SAVE_SEISMOGRAMS_PRESSURE = .false. # currently implemented in acoustic (i.e. fluid) elements only # save seismograms in binary or ASCII format (binary is smaller but may not be portable between machines) USE_BINARY_FOR_SEISMOGRAMS = .false. @@ -137,6 +139,49 @@ WRITE_SEISMOGRAMS_BY_MASTER = .false. # to avoid overloading shared non-local file systems such as LUSTRE or GPFS for instance SAVE_ALL_SEISMOS_IN_ONE_FILE = .false. +# use a trick to increase accuracy of pressure seismograms in fluid (acoustic) elements: +# use the second derivative of the source for the source time function instead of the source itself, +# and then record -potential_acoustic() as pressure seismograms instead of -potential_dot_dot_acoustic(); +# this is mathematically equivalent, but numerically significantly more accurate because in the explicit +# Newmark time scheme acceleration is accurate at zeroth order while displacement is accurate at second order, +# thus in fluid elements potential_dot_dot_acoustic() is accurate at zeroth order while potential_acoustic() +# is accurate at second order and thus contains significantly less numerical noise. +USE_TRICK_FOR_BETTER_PRESSURE = .false. + +# +# source encoding +# +# determines source encoding factor +/-1 depending on sign of moment tensor +# (see e.g. Krebs et al., 2009. Fast full-wavefield seismic inversion using encoded sources, Geophysics, 74 (6), WCC177-WCC188.) +USE_SOURCE_ENCODING = .false. + +# +# total energy calculation +# +# to plot total energy curves, for instance to monitor how CPML absorbing layers behave; +# should be turned OFF in most cases because expensive +OUTPUT_ENERGY = .false. +# every how many time steps we compute energy (which is expensive to compute) +NTSTEP_BETWEEN_OUTPUT_ENERGY = 10 + +# +# adjoint kernel outputs +# +# this parameter must be set to .true. to compute anisotropic kernels +# in crust and mantle (related to the 21 Cij in geographical coordinates) +# default is .false. to compute isotropic kernels (related to alpha and beta) +ANISOTROPIC_KL = .false. + +# compute transverse isotropic kernels (alpha_v,alpha_h,beta_v,beta_h,eta,rho) +# rather than fully anisotropic kernels in case ANISOTROPIC_KL is set to .true. +SAVE_TRANSVERSE_KL = .false. + +# outputs approximate Hessian for preconditioning +APPROXIMATE_HESS_KL = .false. + +# save Moho mesh and compute Moho boundary kernels +SAVE_MOHO_MESH = .false. + # print source time function PRINT_SOURCE_TIME_FUNCTION = .false. diff --git a/EXAMPLES/CPML_examples/homogeneous_halfspace_HEX8_acoustic_elastic_absorbing_CPML_5sides/DATA/Par_file b/EXAMPLES/CPML_examples/homogeneous_halfspace_HEX8_acoustic_elastic_absorbing_CPML_5sides/DATA/Par_file index 4cf8a9788..081024119 100644 --- a/EXAMPLES/CPML_examples/homogeneous_halfspace_HEX8_acoustic_elastic_absorbing_CPML_5sides/DATA/Par_file +++ b/EXAMPLES/CPML_examples/homogeneous_halfspace_HEX8_acoustic_elastic_absorbing_CPML_5sides/DATA/Par_file @@ -119,10 +119,12 @@ USE_FORCE_POINT_SOURCE = .false. # to represent a (tilted) FORCESOLUTION force point source or a CMTSOLUTION moment-tensor source. USE_RICKER_TIME_FUNCTION = .false. -# decide if we save displacement, velocity and/or acceleration in forward runs (they can be set to true simultaneously) +# decide if we save displacement, velocity, acceleration and/or pressure in forward runs (they can be set to true simultaneously) +# currently pressure seismograms are implemented in acoustic (i.e. fluid) elements only SAVE_SEISMOGRAMS_DISPLACEMENT = .true. SAVE_SEISMOGRAMS_VELOCITY = .true. SAVE_SEISMOGRAMS_ACCELERATION = .true. +SAVE_SEISMOGRAMS_PRESSURE = .false. # currently implemented in acoustic (i.e. fluid) elements only # save seismograms in binary or ASCII format (binary is smaller but may not be portable between machines) USE_BINARY_FOR_SEISMOGRAMS = .false. @@ -137,6 +139,49 @@ WRITE_SEISMOGRAMS_BY_MASTER = .false. # to avoid overloading shared non-local file systems such as LUSTRE or GPFS for instance SAVE_ALL_SEISMOS_IN_ONE_FILE = .false. +# use a trick to increase accuracy of pressure seismograms in fluid (acoustic) elements: +# use the second derivative of the source for the source time function instead of the source itself, +# and then record -potential_acoustic() as pressure seismograms instead of -potential_dot_dot_acoustic(); +# this is mathematically equivalent, but numerically significantly more accurate because in the explicit +# Newmark time scheme acceleration is accurate at zeroth order while displacement is accurate at second order, +# thus in fluid elements potential_dot_dot_acoustic() is accurate at zeroth order while potential_acoustic() +# is accurate at second order and thus contains significantly less numerical noise. +USE_TRICK_FOR_BETTER_PRESSURE = .false. + +# +# source encoding +# +# determines source encoding factor +/-1 depending on sign of moment tensor +# (see e.g. Krebs et al., 2009. Fast full-wavefield seismic inversion using encoded sources, Geophysics, 74 (6), WCC177-WCC188.) +USE_SOURCE_ENCODING = .false. + +# +# total energy calculation +# +# to plot total energy curves, for instance to monitor how CPML absorbing layers behave; +# should be turned OFF in most cases because expensive +OUTPUT_ENERGY = .false. +# every how many time steps we compute energy (which is expensive to compute) +NTSTEP_BETWEEN_OUTPUT_ENERGY = 10 + +# +# adjoint kernel outputs +# +# this parameter must be set to .true. to compute anisotropic kernels +# in crust and mantle (related to the 21 Cij in geographical coordinates) +# default is .false. to compute isotropic kernels (related to alpha and beta) +ANISOTROPIC_KL = .false. + +# compute transverse isotropic kernels (alpha_v,alpha_h,beta_v,beta_h,eta,rho) +# rather than fully anisotropic kernels in case ANISOTROPIC_KL is set to .true. +SAVE_TRANSVERSE_KL = .false. + +# outputs approximate Hessian for preconditioning +APPROXIMATE_HESS_KL = .false. + +# save Moho mesh and compute Moho boundary kernels +SAVE_MOHO_MESH = .false. + # print source time function PRINT_SOURCE_TIME_FUNCTION = .false. diff --git a/EXAMPLES/CPML_examples/homogeneous_halfspace_HEX8_acoustic_elastic_absorbing_CPML_6sides/DATA/Par_file b/EXAMPLES/CPML_examples/homogeneous_halfspace_HEX8_acoustic_elastic_absorbing_CPML_6sides/DATA/Par_file index ea49f227e..8886884dc 100644 --- a/EXAMPLES/CPML_examples/homogeneous_halfspace_HEX8_acoustic_elastic_absorbing_CPML_6sides/DATA/Par_file +++ b/EXAMPLES/CPML_examples/homogeneous_halfspace_HEX8_acoustic_elastic_absorbing_CPML_6sides/DATA/Par_file @@ -119,10 +119,12 @@ USE_FORCE_POINT_SOURCE = .false. # to represent a (tilted) FORCESOLUTION force point source or a CMTSOLUTION moment-tensor source. USE_RICKER_TIME_FUNCTION = .false. -# decide if we save displacement, velocity and/or acceleration in forward runs (they can be set to true simultaneously) +# decide if we save displacement, velocity, acceleration and/or pressure in forward runs (they can be set to true simultaneously) +# currently pressure seismograms are implemented in acoustic (i.e. fluid) elements only SAVE_SEISMOGRAMS_DISPLACEMENT = .true. SAVE_SEISMOGRAMS_VELOCITY = .true. SAVE_SEISMOGRAMS_ACCELERATION = .true. +SAVE_SEISMOGRAMS_PRESSURE = .false. # currently implemented in acoustic (i.e. fluid) elements only # save seismograms in binary or ASCII format (binary is smaller but may not be portable between machines) USE_BINARY_FOR_SEISMOGRAMS = .false. @@ -137,6 +139,49 @@ WRITE_SEISMOGRAMS_BY_MASTER = .false. # to avoid overloading shared non-local file systems such as LUSTRE or GPFS for instance SAVE_ALL_SEISMOS_IN_ONE_FILE = .false. +# use a trick to increase accuracy of pressure seismograms in fluid (acoustic) elements: +# use the second derivative of the source for the source time function instead of the source itself, +# and then record -potential_acoustic() as pressure seismograms instead of -potential_dot_dot_acoustic(); +# this is mathematically equivalent, but numerically significantly more accurate because in the explicit +# Newmark time scheme acceleration is accurate at zeroth order while displacement is accurate at second order, +# thus in fluid elements potential_dot_dot_acoustic() is accurate at zeroth order while potential_acoustic() +# is accurate at second order and thus contains significantly less numerical noise. +USE_TRICK_FOR_BETTER_PRESSURE = .false. + +# +# source encoding +# +# determines source encoding factor +/-1 depending on sign of moment tensor +# (see e.g. Krebs et al., 2009. Fast full-wavefield seismic inversion using encoded sources, Geophysics, 74 (6), WCC177-WCC188.) +USE_SOURCE_ENCODING = .false. + +# +# total energy calculation +# +# to plot total energy curves, for instance to monitor how CPML absorbing layers behave; +# should be turned OFF in most cases because expensive +OUTPUT_ENERGY = .false. +# every how many time steps we compute energy (which is expensive to compute) +NTSTEP_BETWEEN_OUTPUT_ENERGY = 10 + +# +# adjoint kernel outputs +# +# this parameter must be set to .true. to compute anisotropic kernels +# in crust and mantle (related to the 21 Cij in geographical coordinates) +# default is .false. to compute isotropic kernels (related to alpha and beta) +ANISOTROPIC_KL = .false. + +# compute transverse isotropic kernels (alpha_v,alpha_h,beta_v,beta_h,eta,rho) +# rather than fully anisotropic kernels in case ANISOTROPIC_KL is set to .true. +SAVE_TRANSVERSE_KL = .false. + +# outputs approximate Hessian for preconditioning +APPROXIMATE_HESS_KL = .false. + +# save Moho mesh and compute Moho boundary kernels +SAVE_MOHO_MESH = .false. + # print source time function PRINT_SOURCE_TIME_FUNCTION = .false. diff --git a/EXAMPLES/CPML_examples/homogeneous_halfspace_HEX8_elastic_absorbing_CPML_5sides/DATA/Par_file b/EXAMPLES/CPML_examples/homogeneous_halfspace_HEX8_elastic_absorbing_CPML_5sides/DATA/Par_file index 317f1a07d..c6b65e577 100644 --- a/EXAMPLES/CPML_examples/homogeneous_halfspace_HEX8_elastic_absorbing_CPML_5sides/DATA/Par_file +++ b/EXAMPLES/CPML_examples/homogeneous_halfspace_HEX8_elastic_absorbing_CPML_5sides/DATA/Par_file @@ -119,10 +119,12 @@ USE_FORCE_POINT_SOURCE = .false. # to represent a (tilted) FORCESOLUTION force point source or a CMTSOLUTION moment-tensor source. USE_RICKER_TIME_FUNCTION = .false. -# decide if we save displacement, velocity and/or acceleration in forward runs (they can be set to true simultaneously) +# decide if we save displacement, velocity, acceleration and/or pressure in forward runs (they can be set to true simultaneously) +# currently pressure seismograms are implemented in acoustic (i.e. fluid) elements only SAVE_SEISMOGRAMS_DISPLACEMENT = .true. SAVE_SEISMOGRAMS_VELOCITY = .true. SAVE_SEISMOGRAMS_ACCELERATION = .true. +SAVE_SEISMOGRAMS_PRESSURE = .false. # currently implemented in acoustic (i.e. fluid) elements only # save seismograms in binary or ASCII format (binary is smaller but may not be portable between machines) USE_BINARY_FOR_SEISMOGRAMS = .false. @@ -137,6 +139,49 @@ WRITE_SEISMOGRAMS_BY_MASTER = .false. # to avoid overloading shared non-local file systems such as LUSTRE or GPFS for instance SAVE_ALL_SEISMOS_IN_ONE_FILE = .false. +# use a trick to increase accuracy of pressure seismograms in fluid (acoustic) elements: +# use the second derivative of the source for the source time function instead of the source itself, +# and then record -potential_acoustic() as pressure seismograms instead of -potential_dot_dot_acoustic(); +# this is mathematically equivalent, but numerically significantly more accurate because in the explicit +# Newmark time scheme acceleration is accurate at zeroth order while displacement is accurate at second order, +# thus in fluid elements potential_dot_dot_acoustic() is accurate at zeroth order while potential_acoustic() +# is accurate at second order and thus contains significantly less numerical noise. +USE_TRICK_FOR_BETTER_PRESSURE = .false. + +# +# source encoding +# +# determines source encoding factor +/-1 depending on sign of moment tensor +# (see e.g. Krebs et al., 2009. Fast full-wavefield seismic inversion using encoded sources, Geophysics, 74 (6), WCC177-WCC188.) +USE_SOURCE_ENCODING = .false. + +# +# total energy calculation +# +# to plot total energy curves, for instance to monitor how CPML absorbing layers behave; +# should be turned OFF in most cases because expensive +OUTPUT_ENERGY = .false. +# every how many time steps we compute energy (which is expensive to compute) +NTSTEP_BETWEEN_OUTPUT_ENERGY = 10 + +# +# adjoint kernel outputs +# +# this parameter must be set to .true. to compute anisotropic kernels +# in crust and mantle (related to the 21 Cij in geographical coordinates) +# default is .false. to compute isotropic kernels (related to alpha and beta) +ANISOTROPIC_KL = .false. + +# compute transverse isotropic kernels (alpha_v,alpha_h,beta_v,beta_h,eta,rho) +# rather than fully anisotropic kernels in case ANISOTROPIC_KL is set to .true. +SAVE_TRANSVERSE_KL = .false. + +# outputs approximate Hessian for preconditioning +APPROXIMATE_HESS_KL = .false. + +# save Moho mesh and compute Moho boundary kernels +SAVE_MOHO_MESH = .false. + # print source time function PRINT_SOURCE_TIME_FUNCTION = .false. diff --git a/EXAMPLES/CPML_examples/homogeneous_halfspace_HEX8_elastic_absorbing_CPML_6sides/DATA/Par_file b/EXAMPLES/CPML_examples/homogeneous_halfspace_HEX8_elastic_absorbing_CPML_6sides/DATA/Par_file index 5236a5d94..de6b409ae 100644 --- a/EXAMPLES/CPML_examples/homogeneous_halfspace_HEX8_elastic_absorbing_CPML_6sides/DATA/Par_file +++ b/EXAMPLES/CPML_examples/homogeneous_halfspace_HEX8_elastic_absorbing_CPML_6sides/DATA/Par_file @@ -119,10 +119,12 @@ USE_FORCE_POINT_SOURCE = .false. # to represent a (tilted) FORCESOLUTION force point source or a CMTSOLUTION moment-tensor source. USE_RICKER_TIME_FUNCTION = .false. -# decide if we save displacement, velocity and/or acceleration in forward runs (they can be set to true simultaneously) +# decide if we save displacement, velocity, acceleration and/or pressure in forward runs (they can be set to true simultaneously) +# currently pressure seismograms are implemented in acoustic (i.e. fluid) elements only SAVE_SEISMOGRAMS_DISPLACEMENT = .true. SAVE_SEISMOGRAMS_VELOCITY = .true. SAVE_SEISMOGRAMS_ACCELERATION = .true. +SAVE_SEISMOGRAMS_PRESSURE = .false. # currently implemented in acoustic (i.e. fluid) elements only # save seismograms in binary or ASCII format (binary is smaller but may not be portable between machines) USE_BINARY_FOR_SEISMOGRAMS = .false. @@ -137,6 +139,49 @@ WRITE_SEISMOGRAMS_BY_MASTER = .false. # to avoid overloading shared non-local file systems such as LUSTRE or GPFS for instance SAVE_ALL_SEISMOS_IN_ONE_FILE = .false. +# use a trick to increase accuracy of pressure seismograms in fluid (acoustic) elements: +# use the second derivative of the source for the source time function instead of the source itself, +# and then record -potential_acoustic() as pressure seismograms instead of -potential_dot_dot_acoustic(); +# this is mathematically equivalent, but numerically significantly more accurate because in the explicit +# Newmark time scheme acceleration is accurate at zeroth order while displacement is accurate at second order, +# thus in fluid elements potential_dot_dot_acoustic() is accurate at zeroth order while potential_acoustic() +# is accurate at second order and thus contains significantly less numerical noise. +USE_TRICK_FOR_BETTER_PRESSURE = .false. + +# +# source encoding +# +# determines source encoding factor +/-1 depending on sign of moment tensor +# (see e.g. Krebs et al., 2009. Fast full-wavefield seismic inversion using encoded sources, Geophysics, 74 (6), WCC177-WCC188.) +USE_SOURCE_ENCODING = .false. + +# +# total energy calculation +# +# to plot total energy curves, for instance to monitor how CPML absorbing layers behave; +# should be turned OFF in most cases because expensive +OUTPUT_ENERGY = .false. +# every how many time steps we compute energy (which is expensive to compute) +NTSTEP_BETWEEN_OUTPUT_ENERGY = 10 + +# +# adjoint kernel outputs +# +# this parameter must be set to .true. to compute anisotropic kernels +# in crust and mantle (related to the 21 Cij in geographical coordinates) +# default is .false. to compute isotropic kernels (related to alpha and beta) +ANISOTROPIC_KL = .false. + +# compute transverse isotropic kernels (alpha_v,alpha_h,beta_v,beta_h,eta,rho) +# rather than fully anisotropic kernels in case ANISOTROPIC_KL is set to .true. +SAVE_TRANSVERSE_KL = .false. + +# outputs approximate Hessian for preconditioning +APPROXIMATE_HESS_KL = .false. + +# save Moho mesh and compute Moho boundary kernels +SAVE_MOHO_MESH = .false. + # print source time function PRINT_SOURCE_TIME_FUNCTION = .false. diff --git a/EXAMPLES/DSM_FOR_SPECFEM3D/example_bigger_PYROPE/DATA/Par_file b/EXAMPLES/DSM_FOR_SPECFEM3D/example_bigger_PYROPE/DATA/Par_file index 9436bf039..10e17f453 100755 --- a/EXAMPLES/DSM_FOR_SPECFEM3D/example_bigger_PYROPE/DATA/Par_file +++ b/EXAMPLES/DSM_FOR_SPECFEM3D/example_bigger_PYROPE/DATA/Par_file @@ -119,10 +119,12 @@ USE_FORCE_POINT_SOURCE = .false. # to represent a (tilted) FORCESOLUTION force point source or a CMTSOLUTION moment-tensor source. USE_RICKER_TIME_FUNCTION = .false. -# decide if we save displacement, velocity and/or acceleration in forward runs (they can be set to true simultaneously) +# decide if we save displacement, velocity, acceleration and/or pressure in forward runs (they can be set to true simultaneously) +# currently pressure seismograms are implemented in acoustic (i.e. fluid) elements only SAVE_SEISMOGRAMS_DISPLACEMENT = .true. SAVE_SEISMOGRAMS_VELOCITY = .true. SAVE_SEISMOGRAMS_ACCELERATION = .true. +SAVE_SEISMOGRAMS_PRESSURE = .false. # currently implemented in acoustic (i.e. fluid) elements only # save seismograms in binary or ASCII format (binary is smaller but may not be portable between machines) USE_BINARY_FOR_SEISMOGRAMS = .false. @@ -137,6 +139,49 @@ WRITE_SEISMOGRAMS_BY_MASTER = .false. # to avoid overloading shared non-local file systems such as LUSTRE or GPFS for instance SAVE_ALL_SEISMOS_IN_ONE_FILE = .false. +# use a trick to increase accuracy of pressure seismograms in fluid (acoustic) elements: +# use the second derivative of the source for the source time function instead of the source itself, +# and then record -potential_acoustic() as pressure seismograms instead of -potential_dot_dot_acoustic(); +# this is mathematically equivalent, but numerically significantly more accurate because in the explicit +# Newmark time scheme acceleration is accurate at zeroth order while displacement is accurate at second order, +# thus in fluid elements potential_dot_dot_acoustic() is accurate at zeroth order while potential_acoustic() +# is accurate at second order and thus contains significantly less numerical noise. +USE_TRICK_FOR_BETTER_PRESSURE = .false. + +# +# source encoding +# +# determines source encoding factor +/-1 depending on sign of moment tensor +# (see e.g. Krebs et al., 2009. Fast full-wavefield seismic inversion using encoded sources, Geophysics, 74 (6), WCC177-WCC188.) +USE_SOURCE_ENCODING = .false. + +# +# total energy calculation +# +# to plot total energy curves, for instance to monitor how CPML absorbing layers behave; +# should be turned OFF in most cases because expensive +OUTPUT_ENERGY = .false. +# every how many time steps we compute energy (which is expensive to compute) +NTSTEP_BETWEEN_OUTPUT_ENERGY = 10 + +# +# adjoint kernel outputs +# +# this parameter must be set to .true. to compute anisotropic kernels +# in crust and mantle (related to the 21 Cij in geographical coordinates) +# default is .false. to compute isotropic kernels (related to alpha and beta) +ANISOTROPIC_KL = .false. + +# compute transverse isotropic kernels (alpha_v,alpha_h,beta_v,beta_h,eta,rho) +# rather than fully anisotropic kernels in case ANISOTROPIC_KL is set to .true. +SAVE_TRANSVERSE_KL = .false. + +# outputs approximate Hessian for preconditioning +APPROXIMATE_HESS_KL = .false. + +# save Moho mesh and compute Moho boundary kernels +SAVE_MOHO_MESH = .false. + # print source time function PRINT_SOURCE_TIME_FUNCTION = .false. diff --git a/EXAMPLES/DSM_FOR_SPECFEM3D/example_bigger_PYROPE/Other_scripts/idris_ada_compute_tract_ev5.sh b/EXAMPLES/DSM_FOR_SPECFEM3D/example_bigger_PYROPE/Other_scripts/idris_ada_compute_tract_ev5.sh index 2232c2b3f..4310207bf 100755 --- a/EXAMPLES/DSM_FOR_SPECFEM3D/example_bigger_PYROPE/Other_scripts/idris_ada_compute_tract_ev5.sh +++ b/EXAMPLES/DSM_FOR_SPECFEM3D/example_bigger_PYROPE/Other_scripts/idris_ada_compute_tract_ev5.sh @@ -85,9 +85,9 @@ # @ class = archive # @ queue -# loading setup fonctions +# loading setup fonctions -# loading setup fonctions +# loading setup fonctions SHELL_DSM=/smphome/rech/ubv/rubv002/progs/shells_specfem3D_hybrid declare -i NPROC NPROC_MINUS_ONE @@ -98,13 +98,13 @@ NPROC=12 # MPI COMMAND MPIRUN=poe -# ENTER OPTION FOR MPIRUN +# ENTER OPTION FOR MPIRUN OPTION= # do not change NPROC_MINUS_ONE="$NPROC-1" -# log file for output +# log file for output flog_file=$(pwd)/log.benchmark BIN_DSM=/smphome/rech/ubv/rubv002/progs/DSM_FOR_SPECFEM3D/bin/ @@ -118,14 +118,14 @@ export MP_DEBUG_TIMEOUT_SECONDS=84000 -case ${LOADL_STEP_NAME} in +case ${LOADL_STEP_NAME} in #============ Step 1 commands ============ #======= Sequential preprocessing ======== sequential_setup ) set -x cd $TMPDIR - printenv | sort + printenv | sort # on recupere les datas cp ${LOADL_STEP_INITDIR}/input.data.tar.bz2 . tar -jxvf input.data.tar.bz2 @@ -241,14 +241,14 @@ case ${LOADL_STEP_NAME} in move_output_wihtout_change - + # on ecrit les resumtats mfput XMIN.tar.bz2 EV5/. - + mfput XMAX.tar.bz2 EV5/. - + mfput YMIN.tar.bz2 EV5/. - + mfput YMAX.tar.bz2 EV5/. mfput ZMIN.tar.bz2 EV5/. diff --git a/EXAMPLES/DSM_FOR_SPECFEM3D/example_simple_small/DATA/Par_file b/EXAMPLES/DSM_FOR_SPECFEM3D/example_simple_small/DATA/Par_file index 65876b022..445ef08c0 100644 --- a/EXAMPLES/DSM_FOR_SPECFEM3D/example_simple_small/DATA/Par_file +++ b/EXAMPLES/DSM_FOR_SPECFEM3D/example_simple_small/DATA/Par_file @@ -119,10 +119,12 @@ USE_FORCE_POINT_SOURCE = .false. # to represent a (tilted) FORCESOLUTION force point source or a CMTSOLUTION moment-tensor source. USE_RICKER_TIME_FUNCTION = .false. -# decide if we save displacement, velocity and/or acceleration in forward runs (they can be set to true simultaneously) +# decide if we save displacement, velocity, acceleration and/or pressure in forward runs (they can be set to true simultaneously) +# currently pressure seismograms are implemented in acoustic (i.e. fluid) elements only SAVE_SEISMOGRAMS_DISPLACEMENT = .true. SAVE_SEISMOGRAMS_VELOCITY = .true. SAVE_SEISMOGRAMS_ACCELERATION = .true. +SAVE_SEISMOGRAMS_PRESSURE = .false. # currently implemented in acoustic (i.e. fluid) elements only # save seismograms in binary or ASCII format (binary is smaller but may not be portable between machines) USE_BINARY_FOR_SEISMOGRAMS = .false. @@ -137,6 +139,49 @@ WRITE_SEISMOGRAMS_BY_MASTER = .false. # to avoid overloading shared non-local file systems such as LUSTRE or GPFS for instance SAVE_ALL_SEISMOS_IN_ONE_FILE = .false. +# use a trick to increase accuracy of pressure seismograms in fluid (acoustic) elements: +# use the second derivative of the source for the source time function instead of the source itself, +# and then record -potential_acoustic() as pressure seismograms instead of -potential_dot_dot_acoustic(); +# this is mathematically equivalent, but numerically significantly more accurate because in the explicit +# Newmark time scheme acceleration is accurate at zeroth order while displacement is accurate at second order, +# thus in fluid elements potential_dot_dot_acoustic() is accurate at zeroth order while potential_acoustic() +# is accurate at second order and thus contains significantly less numerical noise. +USE_TRICK_FOR_BETTER_PRESSURE = .false. + +# +# source encoding +# +# determines source encoding factor +/-1 depending on sign of moment tensor +# (see e.g. Krebs et al., 2009. Fast full-wavefield seismic inversion using encoded sources, Geophysics, 74 (6), WCC177-WCC188.) +USE_SOURCE_ENCODING = .false. + +# +# total energy calculation +# +# to plot total energy curves, for instance to monitor how CPML absorbing layers behave; +# should be turned OFF in most cases because expensive +OUTPUT_ENERGY = .false. +# every how many time steps we compute energy (which is expensive to compute) +NTSTEP_BETWEEN_OUTPUT_ENERGY = 10 + +# +# adjoint kernel outputs +# +# this parameter must be set to .true. to compute anisotropic kernels +# in crust and mantle (related to the 21 Cij in geographical coordinates) +# default is .false. to compute isotropic kernels (related to alpha and beta) +ANISOTROPIC_KL = .false. + +# compute transverse isotropic kernels (alpha_v,alpha_h,beta_v,beta_h,eta,rho) +# rather than fully anisotropic kernels in case ANISOTROPIC_KL is set to .true. +SAVE_TRANSVERSE_KL = .false. + +# outputs approximate Hessian for preconditioning +APPROXIMATE_HESS_KL = .false. + +# save Moho mesh and compute Moho boundary kernels +SAVE_MOHO_MESH = .false. + # print source time function PRINT_SOURCE_TIME_FUNCTION = .false. diff --git a/EXAMPLES/DSM_FOR_SPECFEM3D/example_simple_small/MESH3VTU.sh b/EXAMPLES/DSM_FOR_SPECFEM3D/example_simple_small/MESH3VTU.sh index 978f89196..bf1a0967f 100755 --- a/EXAMPLES/DSM_FOR_SPECFEM3D/example_simple_small/MESH3VTU.sh +++ b/EXAMPLES/DSM_FOR_SPECFEM3D/example_simple_small/MESH3VTU.sh @@ -13,7 +13,7 @@ it=0 while [ "$it" -le "$itmax" ] ; do - if [ "$it" -lt 1000000 ]; then + if [ "$it" -lt 1000000 ]; then FICHIER=$PREFIX${it} fi; diff --git a/EXAMPLES/DSM_FOR_SPECFEM3D/example_simple_small/Other_scripts/batch_run_benchmark_all_process_only_SPECFEM3D.sh b/EXAMPLES/DSM_FOR_SPECFEM3D/example_simple_small/Other_scripts/batch_run_benchmark_all_process_only_SPECFEM3D.sh index e23aa2b87..f149275f5 100755 --- a/EXAMPLES/DSM_FOR_SPECFEM3D/example_simple_small/Other_scripts/batch_run_benchmark_all_process_only_SPECFEM3D.sh +++ b/EXAMPLES/DSM_FOR_SPECFEM3D/example_simple_small/Other_scripts/batch_run_benchmark_all_process_only_SPECFEM3D.sh @@ -1,15 +1,15 @@ #!/bin/bash -# ------------ BACTH AND SPECIFIC CLUSTER DIRECTIVES ------ +# ------------ BACTH AND SPECIFIC CLUSTER DIRECTIVES ------ #MSUB -r run_benchmark #MSUB -n 24 -#MSUB -x +#MSUB -x #MSUB -T 10800 #MSUB -q standard #MSUB -o run_benchmark.o -#MSUB -e run_benchmark.e +#MSUB -e run_benchmark.e # set -x # cd $BRIDGE_MSUB_PWD @@ -19,15 +19,15 @@ #OAR -l nodes=1,walltime=2:00:00 #OAR -p cluster ##OAR -q development -#OAR -O bench_hy.%jobid%.out +#OAR -O bench_hy.%jobid%.out #OAR -E bench_hy.%jobid%.err -## Chargement des modules module load ... +## Chargement des modules module load ... #module load intel/13.0 #module load openmpi/intel/1.6.3 #module list -#echo ${OAR_NODEFILE} +#echo ${OAR_NODEFILE} #CPUS=$(wc -l ${OAR_NODEFILE} | awk '{print $1}') #echo $CPUS @@ -36,16 +36,16 @@ # # # BENCHMARK FOR HYBRID DSM/SPECFEM3D METHOD -# +# # INPUTS : # # 1/ input directory : ./input_dsm -# containts +# containts # -- Double_para.txt # -- FrqsMpi.txt # -- iasp91 # -- iasp91_dsm -# -- st +# -- st # # 2/ input file : parfile_for_benchmark # @@ -55,12 +55,12 @@ # -- Par_file # -- STATIONS # -- CMTSOLUTION -# # -# the script runs : -# -# 1/ MESHER -# 2/ DSM to compute tractions on the chunk boundary +# +# the script runs : +# +# 1/ MESHER +# 2/ DSM to compute tractions on the chunk boundary # 3/ SCHOTCH + CREATE DATABASE FOR SPECFEM3D # 4/ ADD DSM TRACTION TO THE SPECFEM3D DATABASE # 5/ RUN SPECFEM3D @@ -68,12 +68,12 @@ # # # -# Vadim Monteiller April 2013. -# -# reference : +# Vadim Monteiller April 2013. +# +# reference : # "A hybrid method to compute short-period synthetic seismograms of teleseismic body waves in a 3-D regional model" # Monteiller, V; Chevrot, S; Komatitsch, D; Fuji, N -# GEOPHYSICAL JOURNAL INTERNATIONAL Volume:192 Issue:1 Pages:230-247 DOI:10.1093/gji/ggs006 Published: JAN 2013 +# GEOPHYSICAL JOURNAL INTERNATIONAL Volume:192 Issue:1 Pages:230-247 DOI:10.1093/gji/ggs006 Published: JAN 2013 # ##################################################################################################################### @@ -89,10 +89,10 @@ NPROC=24 CPUS=24 # Here i set the number of cores for SPEC3D computation is 12 too. -# MPIRUN COMMAND +# MPIRUN COMMAND MPIRUN="mpirun" -# ENTER OPTION FOR MPIRUN +# ENTER OPTION FOR MPIRUN OPTION=" -np "${NPROC} OPTION_SIMU=" -np "${CPUS} #OPTION=" -np "${CPUS}" -machinefile "${OAR_NODEFILE}" -bysocket -bind-to-core" @@ -101,21 +101,21 @@ OPTION_SIMU=" -np "${CPUS} # do not change NPROC_MINUS_ONE="$NPROC-1" -# log file for output +# log file for output flog_file=$(pwd)/log.benchmark # choose the movie PREFIX_MOVIE=velocity_Z_it -# directory where SPECFEM3D writes outputs +# directory where SPECFEM3D writes outputs IN_MOVIE=$(pwd)/OUTPUT_FILES/DATABASES_MPI/ -# output movie directory +# output movie directory OUT_MOVIE=$(pwd)/movie -#------- input files creation +#------- input files creation # you must write the absolute path for : xcreate_input -# you must edit and complete : parfile_for_benchmark +# you must edit and complete : parfile_for_benchmark $HOME_SPECFEM3D/utils/DSM_FOR_SPECFEM3D/bin/xcreate_inputs_files<> $flog_file # # ------------------------ FROM HERE DO NOT CHANGE ANYTHING -------------------- -# ----- load script and path --- +# ----- load script and path --- source params.in source $SCRIPTS/scripts_specfem3D.sh if [ $CHOICE -eq 1 ] @@ -174,7 +174,7 @@ run_create_tractions_for_specfem echo $(date) >> $flog_file -# 5 / --------------- run simulation +# 5 / --------------- run simulation echo "" >> $flog_file echo " simulation" >> $flog_file echo $(date) >> $flog_file diff --git a/EXAMPLES/DSM_FOR_SPECFEM3D/example_simple_small/Other_scripts/batch_run_movie.sh b/EXAMPLES/DSM_FOR_SPECFEM3D/example_simple_small/Other_scripts/batch_run_movie.sh index 3ee41ed8c..96c8b2541 100755 --- a/EXAMPLES/DSM_FOR_SPECFEM3D/example_simple_small/Other_scripts/batch_run_movie.sh +++ b/EXAMPLES/DSM_FOR_SPECFEM3D/example_simple_small/Other_scripts/batch_run_movie.sh @@ -1,15 +1,15 @@ #!/bin/bash -# ------------ BACTH AND SPECIFIC CLUSTER DIRECTIVES ------ +# ------------ BACTH AND SPECIFIC CLUSTER DIRECTIVES ------ #MSUB -r run_benchmark #MSUB -n 24 -#MSUB -x +#MSUB -x #MSUB -T 10800 #MSUB -q standard #MSUB -o run_benchmark.o -#MSUB -e run_benchmark.e +#MSUB -e run_benchmark.e # set -x # cd $BRIDGE_MSUB_PWD @@ -19,15 +19,15 @@ #OAR -l nodes=1,walltime=2:00:00 #OAR -p cluster ##OAR -q development -#OAR -O bench_hy.%jobid%.out +#OAR -O bench_hy.%jobid%.out #OAR -E bench_hy.%jobid%.err -## Chargement des modules module load ... +## Chargement des modules module load ... #module load intel/13.0 #module load openmpi/intel/1.6.3 #module list -#echo ${OAR_NODEFILE} +#echo ${OAR_NODEFILE} #CPUS=$(wc -l ${OAR_NODEFILE} | awk '{print $1}') #echo $CPUS @@ -36,16 +36,16 @@ # # # BENCHMARK FOR HYBRID DSM/SPECFEM3D METHOD -# +# # INPUTS : # # 1/ input directory : ./input_dsm -# containts +# containts # -- Double_para.txt # -- FrqsMpi.txt # -- iasp91 # -- iasp91_dsm -# -- st +# -- st # # 2/ input file : parfile_for_benchmark # @@ -55,12 +55,12 @@ # -- Par_file # -- STATIONS # -- CMTSOLUTION -# # -# the script runs : -# -# 1/ MESHER -# 2/ DSM to compute tractions on the chunk boundary +# +# the script runs : +# +# 1/ MESHER +# 2/ DSM to compute tractions on the chunk boundary # 3/ SCHOTCH + CREATE DATABASE FOR SPECFEM3D # 4/ ADD DSM TRACTION TO THE SPECFEM3D DATABASE # 5/ RUN SPECFEM3D @@ -68,12 +68,12 @@ # # # -# Vadim Monteiller April 2013. -# -# reference : +# Vadim Monteiller April 2013. +# +# reference : # "A hybrid method to compute short-period synthetic seismograms of teleseismic body waves in a 3-D regional model" # Monteiller, V; Chevrot, S; Komatitsch, D; Fuji, N -# GEOPHYSICAL JOURNAL INTERNATIONAL Volume:192 Issue:1 Pages:230-247 DOI:10.1093/gji/ggs006 Published: JAN 2013 +# GEOPHYSICAL JOURNAL INTERNATIONAL Volume:192 Issue:1 Pages:230-247 DOI:10.1093/gji/ggs006 Published: JAN 2013 # ##################################################################################################################### @@ -88,10 +88,10 @@ declare -i NPROC NPROC_MINUS_ONE CPUS NPROC=24 CPUS=24 -# MPIRUN COMMAND +# MPIRUN COMMAND MPIRUN="mpirun" -# ENTER OPTION FOR MPIRUN +# ENTER OPTION FOR MPIRUN OPTION=" -n "${CPUS} OPTION_SIMU=" -np "${CPUS} #OPTION=" -np "${CPUS}" -machinefile "${OAR_NODEFILE}" -bysocket -bind-to-core" @@ -100,20 +100,20 @@ OPTION_SIMU=" -np "${CPUS} # do not change NPROC_MINUS_ONE="$NPROC-1" -# log file for output +# log file for output flog_file=$(pwd)/log.benchmark # choose the movie PREFIX_MOVIE=velocity_Y_it -# directory where SPECFEM3D writes outputs +# directory where SPECFEM3D writes outputs IN_MOVIE=$(pwd)/OUTPUT_FILES/DATABASES_MPI/ -# output movie directory +# output movie directory OUT_MOVIE=$(pwd)/movie -# ----- load script and path --- +# ----- load script and path --- source params.in source $SCRIPTS/scripts_specfem3D.sh source $SCRIPTS/scripts_dsm.sh @@ -125,9 +125,9 @@ echo "" >> $flog_file echo " MAKE movie" >> $flog_file echo $(date) >> $flog_file -create_movie $PREFIX_MOVIE $IN_MOVIE $OUT_MOVIE 25 8500 +create_movie $PREFIX_MOVIE $IN_MOVIE $OUT_MOVIE 25 8500 # to do chane 25 and 8500 echo $(date) >> $flog_file - + diff --git a/EXAMPLES/DSM_FOR_SPECFEM3D/example_simple_small/batch_run_benchmark_all_process.sh b/EXAMPLES/DSM_FOR_SPECFEM3D/example_simple_small/batch_run_benchmark_all_process.sh index 7a3acec25..7d11b45fc 100755 --- a/EXAMPLES/DSM_FOR_SPECFEM3D/example_simple_small/batch_run_benchmark_all_process.sh +++ b/EXAMPLES/DSM_FOR_SPECFEM3D/example_simple_small/batch_run_benchmark_all_process.sh @@ -1,17 +1,17 @@ #!/bin/bash -# ------------ BACTH AND SPECIFIC CLUSTER DIRECTIVES ------ +# ------------ BACTH AND SPECIFIC CLUSTER DIRECTIVES ------ -#MSUB -r Benchmark_SPECFEM3D_DSM_HEX27_32p # Nom du job +#MSUB -r Benchmark_SPECFEM3D_DSM_HEX27_32p # Nom du job #MSUB -n 32 #MSUB -N 2 #MSUB -T 5400 #MSUB -q standard #MSUB -e Benchmark_SPECFEM3D_DSM_HEX27_32p_run.e #MSUB -o Benchmark_SPECFEM3D_DSM_HEX27_32p_run.o -#MSUB -A ra2410 - +#MSUB -A ra2410 + set -x cd ${BRIDGE_MSUB_PWD} @@ -20,16 +20,16 @@ cd ${BRIDGE_MSUB_PWD} # # # BENCHMARK FOR HYBRID DSM/SPECFEM3D METHOD -# +# # INPUTS : # # 1/ input directory : ./input_dsm -# containts +# containts # -- Double_para.txt # -- FrqsMpi.txt # -- iasp91 # -- iasp91_dsm -# -- st +# -- st # # 2/ input file : parfile_for_benchmark # @@ -39,24 +39,24 @@ cd ${BRIDGE_MSUB_PWD} # -- Par_file # -- STATIONS # -- CMTSOLUTION -# # -# The script runs : -# -# 1/ MESHER -# 2/ DSM to compute tractions on the chunk boundary +# +# The script runs : +# +# 1/ MESHER +# 2/ DSM to compute tractions on the chunk boundary # 3/ SCHOTCH + CREATE DATABASE FOR SPECFEM3D # 4/ ADD DSM TRACTION TO THE SPECFEM3D DATABASE # 5/ RUN SPECFEM3D # 6/ MAKE MOVIE # # -# Vadim Monteiller April 2013. -# -# reference : +# Vadim Monteiller April 2013. +# +# reference : # "A hybrid method to compute short-period synthetic seismograms of teleseismic body waves in a 3-D regional model" # Monteiller, V; Chevrot, S; Komatitsch, D; Fuji, N -# GEOPHYSICAL JOURNAL INTERNATIONAL Volume:192 Issue:1 Pages:230-247 DOI:10.1093/gji/ggs006 Published: JAN 2013 +# GEOPHYSICAL JOURNAL INTERNATIONAL Volume:192 Issue:1 Pages:230-247 DOI:10.1093/gji/ggs006 Published: JAN 2013 # ##################################################################################################################### # @@ -69,12 +69,12 @@ declare -i NPROC NPROC_MINUS_ONE CPUS CHOICE MIDDLE NPROC=32 CPUS=32 -# MPIRUN COMMAND +# MPIRUN COMMAND MPIRUN=ccc_mprun -# ENTER OPTION FOR MPIRUN +# ENTER OPTION FOR MPIRUN OPTION= - + ###OPTION=" -np "${NPROC} ###OPTION_SIMU=" -np "${CPUS} ###OPTION=" -np "${CPUS}" -machinefile "${OAR_NODEFILE}" -bysocket -bind-to-core" @@ -83,7 +83,7 @@ OPTION= # do not change NPROC_MINUS_ONE="$NPROC-1" -# log file for output +# log file for output flog_file=$(pwd)/log.benchmark # Define the home of specfem3d @@ -92,15 +92,15 @@ HOME_SPECFEM3D=/ccc/scratch/cont003/gen7165/durochtc/Codes/SPECFEM3Ds/specfem3d # choose the movie PREFIX_MOVIE=velocity_Z_it -# directory where SPECFEM3D writes outputs +# directory where SPECFEM3D writes outputs IN_MOVIE=$(pwd)/OUTPUT_FILES/DATABASES_MPI/ -# output movie directory +# output movie directory OUT_MOVIE=$(pwd)/movie/ -#------- input files creation +#------- input files creation # you must write the absolute path for : xcreate_input -# you must edit and complete : parfile_for_benchmark +# you must edit and complete : parfile_for_benchmark ${HOME_SPECFEM3D}/utils/DSM_FOR_SPECFEM3D/bin/xcreate_inputs_files< $flog_file # # ------------------------ FROM HERE DO NOT CHANGE ANYTHING -------------------- -# ----- load script and path --- +# ----- load script and path --- source params.in source $SCRIPTS/scripts_specfem3D.sh ###echo '!!!!!!!!!!!!!!!!!! SHELLS STEP2 : fin de lecture scripts_specfem3D.sh !!!!!!!!!!!!!!!!' @@ -155,11 +155,11 @@ mv input_dsm_for_read_xmax $IN_DSM/inputIASP.infTra_stxmax mv input_dsm_for_read_ymin $IN_DSM/inputIASP.infTra_stymin mv input_dsm_for_read_ymax $IN_DSM/inputIASP.infTra_stymax mv input_dsm_for_read_zmin $IN_DSM/inputIASP.infTra_stzmin -# copy model file +# copy model file cp $IN_DSM/iasp91 $MESH/. -## open the log file +## open the log file echo >> $flog_file echo " BENCHMARK RUN " >> $flog_file echo >> $flog_file @@ -221,9 +221,9 @@ echo $(date) >> $flog_file ###echo "" >> $flog_file ###echo " MAKE movie" >> $flog_file ###echo $(date) >> $flog_file -###create_movie $PREFIX_MOVIE $IN_MOVIE $OUT_MOVIE 25 8500 +###create_movie $PREFIX_MOVIE $IN_MOVIE $OUT_MOVIE 25 8500 #### to do chane 25 and 8500 ###echo $(date) >> $flog_file - + diff --git a/EXAMPLES/DSM_FOR_SPECFEM3D/example_simple_small/mesh2vtu.pl b/EXAMPLES/DSM_FOR_SPECFEM3D/example_simple_small/mesh2vtu.pl index db6d9f848..74d2ce27c 100755 --- a/EXAMPLES/DSM_FOR_SPECFEM3D/example_simple_small/mesh2vtu.pl +++ b/EXAMPLES/DSM_FOR_SPECFEM3D/example_simple_small/mesh2vtu.pl @@ -32,7 +32,7 @@ sub Usage { This is a wrapper around mesh2vtu Brian Savage 6/26/2004 - + END exit(-1); } diff --git a/EXAMPLES/Mount_StHelens/DATA/Par_file b/EXAMPLES/Mount_StHelens/DATA/Par_file index c1080158a..fe2c2d2f6 100644 --- a/EXAMPLES/Mount_StHelens/DATA/Par_file +++ b/EXAMPLES/Mount_StHelens/DATA/Par_file @@ -119,10 +119,12 @@ USE_FORCE_POINT_SOURCE = .false. # to represent a (tilted) FORCESOLUTION force point source or a CMTSOLUTION moment-tensor source. USE_RICKER_TIME_FUNCTION = .false. -# decide if we save displacement, velocity and/or acceleration in forward runs (they can be set to true simultaneously) +# decide if we save displacement, velocity, acceleration and/or pressure in forward runs (they can be set to true simultaneously) +# currently pressure seismograms are implemented in acoustic (i.e. fluid) elements only SAVE_SEISMOGRAMS_DISPLACEMENT = .true. SAVE_SEISMOGRAMS_VELOCITY = .true. SAVE_SEISMOGRAMS_ACCELERATION = .true. +SAVE_SEISMOGRAMS_PRESSURE = .false. # currently implemented in acoustic (i.e. fluid) elements only # save seismograms in binary or ASCII format (binary is smaller but may not be portable between machines) USE_BINARY_FOR_SEISMOGRAMS = .false. @@ -137,6 +139,49 @@ WRITE_SEISMOGRAMS_BY_MASTER = .false. # to avoid overloading shared non-local file systems such as LUSTRE or GPFS for instance SAVE_ALL_SEISMOS_IN_ONE_FILE = .false. +# use a trick to increase accuracy of pressure seismograms in fluid (acoustic) elements: +# use the second derivative of the source for the source time function instead of the source itself, +# and then record -potential_acoustic() as pressure seismograms instead of -potential_dot_dot_acoustic(); +# this is mathematically equivalent, but numerically significantly more accurate because in the explicit +# Newmark time scheme acceleration is accurate at zeroth order while displacement is accurate at second order, +# thus in fluid elements potential_dot_dot_acoustic() is accurate at zeroth order while potential_acoustic() +# is accurate at second order and thus contains significantly less numerical noise. +USE_TRICK_FOR_BETTER_PRESSURE = .false. + +# +# source encoding +# +# determines source encoding factor +/-1 depending on sign of moment tensor +# (see e.g. Krebs et al., 2009. Fast full-wavefield seismic inversion using encoded sources, Geophysics, 74 (6), WCC177-WCC188.) +USE_SOURCE_ENCODING = .false. + +# +# total energy calculation +# +# to plot total energy curves, for instance to monitor how CPML absorbing layers behave; +# should be turned OFF in most cases because expensive +OUTPUT_ENERGY = .false. +# every how many time steps we compute energy (which is expensive to compute) +NTSTEP_BETWEEN_OUTPUT_ENERGY = 10 + +# +# adjoint kernel outputs +# +# this parameter must be set to .true. to compute anisotropic kernels +# in crust and mantle (related to the 21 Cij in geographical coordinates) +# default is .false. to compute isotropic kernels (related to alpha and beta) +ANISOTROPIC_KL = .false. + +# compute transverse isotropic kernels (alpha_v,alpha_h,beta_v,beta_h,eta,rho) +# rather than fully anisotropic kernels in case ANISOTROPIC_KL is set to .true. +SAVE_TRANSVERSE_KL = .false. + +# outputs approximate Hessian for preconditioning +APPROXIMATE_HESS_KL = .false. + +# save Moho mesh and compute Moho boundary kernels +SAVE_MOHO_MESH = .false. + # print source time function PRINT_SOURCE_TIME_FUNCTION = .false. diff --git a/EXAMPLES/change_paths_parfiles.sh b/EXAMPLES/change_paths_parfiles.sh index 277ee4238..1ce3f1086 100755 --- a/EXAMPLES/change_paths_parfiles.sh +++ b/EXAMPLES/change_paths_parfiles.sh @@ -4,12 +4,12 @@ par_files=`find . -iname \*Par_file\* -exec ls -1 {} \; | grep -v Mesh_Par_file for f in $par_files; do echo $f - sed -i 's/\(TOMOGRAPHY_PATH\s*=\s*\)\.\(\.\/DATA\)/\1\2/' $f - sed -i 's/\(LOCAL_PATH\s*=\s*\)\.\(\.\/OUTPUT\)/\1\2/' $f + sed -i 's/\(TOMOGRAPHY_PATH\s*=\s*\)\.\(\.\/DATA\)/\1\2/' $f + sed -i 's/\(LOCAL_PATH\s*=\s*\)\.\(\.\/OUTPUT\)/\1\2/' $f done mesh_par_files=`find . -iname \*Mesh_Par_file\* -exec ls -1 {} \;` for f in $mesh_par_files; do - sed -i 's/\(LOCAL_PATH\s*=\s*\)\.\(\.\/OUTPUT\)/\1\2/' $f + sed -i 's/\(LOCAL_PATH\s*=\s*\)\.\(\.\/OUTPUT\)/\1\2/' $f done diff --git a/EXAMPLES/fault_examples/splay_faults/DATA/Par_file b/EXAMPLES/fault_examples/splay_faults/DATA/Par_file index 102ea46e5..3c096a914 100644 --- a/EXAMPLES/fault_examples/splay_faults/DATA/Par_file +++ b/EXAMPLES/fault_examples/splay_faults/DATA/Par_file @@ -119,10 +119,12 @@ USE_FORCE_POINT_SOURCE = .false. # to represent a (tilted) FORCESOLUTION force point source or a CMTSOLUTION moment-tensor source. USE_RICKER_TIME_FUNCTION = .false. -# decide if we save displacement, velocity and/or acceleration in forward runs (they can be set to true simultaneously) +# decide if we save displacement, velocity, acceleration and/or pressure in forward runs (they can be set to true simultaneously) +# currently pressure seismograms are implemented in acoustic (i.e. fluid) elements only SAVE_SEISMOGRAMS_DISPLACEMENT = .true. SAVE_SEISMOGRAMS_VELOCITY = .true. SAVE_SEISMOGRAMS_ACCELERATION = .true. +SAVE_SEISMOGRAMS_PRESSURE = .false. # currently implemented in acoustic (i.e. fluid) elements only # save seismograms in binary or ASCII format (binary is smaller but may not be portable between machines) USE_BINARY_FOR_SEISMOGRAMS = .false. @@ -137,6 +139,49 @@ WRITE_SEISMOGRAMS_BY_MASTER = .false. # to avoid overloading shared non-local file systems such as LUSTRE or GPFS for instance SAVE_ALL_SEISMOS_IN_ONE_FILE = .false. +# use a trick to increase accuracy of pressure seismograms in fluid (acoustic) elements: +# use the second derivative of the source for the source time function instead of the source itself, +# and then record -potential_acoustic() as pressure seismograms instead of -potential_dot_dot_acoustic(); +# this is mathematically equivalent, but numerically significantly more accurate because in the explicit +# Newmark time scheme acceleration is accurate at zeroth order while displacement is accurate at second order, +# thus in fluid elements potential_dot_dot_acoustic() is accurate at zeroth order while potential_acoustic() +# is accurate at second order and thus contains significantly less numerical noise. +USE_TRICK_FOR_BETTER_PRESSURE = .false. + +# +# source encoding +# +# determines source encoding factor +/-1 depending on sign of moment tensor +# (see e.g. Krebs et al., 2009. Fast full-wavefield seismic inversion using encoded sources, Geophysics, 74 (6), WCC177-WCC188.) +USE_SOURCE_ENCODING = .false. + +# +# total energy calculation +# +# to plot total energy curves, for instance to monitor how CPML absorbing layers behave; +# should be turned OFF in most cases because expensive +OUTPUT_ENERGY = .false. +# every how many time steps we compute energy (which is expensive to compute) +NTSTEP_BETWEEN_OUTPUT_ENERGY = 10 + +# +# adjoint kernel outputs +# +# this parameter must be set to .true. to compute anisotropic kernels +# in crust and mantle (related to the 21 Cij in geographical coordinates) +# default is .false. to compute isotropic kernels (related to alpha and beta) +ANISOTROPIC_KL = .false. + +# compute transverse isotropic kernels (alpha_v,alpha_h,beta_v,beta_h,eta,rho) +# rather than fully anisotropic kernels in case ANISOTROPIC_KL is set to .true. +SAVE_TRANSVERSE_KL = .false. + +# outputs approximate Hessian for preconditioning +APPROXIMATE_HESS_KL = .false. + +# save Moho mesh and compute Moho boundary kernels +SAVE_MOHO_MESH = .false. + # print source time function PRINT_SOURCE_TIME_FUNCTION = .false. diff --git a/EXAMPLES/fault_examples/tpv102/DATA/Par_file b/EXAMPLES/fault_examples/tpv102/DATA/Par_file index 83e431d31..04471d0f5 100644 --- a/EXAMPLES/fault_examples/tpv102/DATA/Par_file +++ b/EXAMPLES/fault_examples/tpv102/DATA/Par_file @@ -119,10 +119,12 @@ USE_FORCE_POINT_SOURCE = .false. # to represent a (tilted) FORCESOLUTION force point source or a CMTSOLUTION moment-tensor source. USE_RICKER_TIME_FUNCTION = .false. -# decide if we save displacement, velocity and/or acceleration in forward runs (they can be set to true simultaneously) +# decide if we save displacement, velocity, acceleration and/or pressure in forward runs (they can be set to true simultaneously) +# currently pressure seismograms are implemented in acoustic (i.e. fluid) elements only SAVE_SEISMOGRAMS_DISPLACEMENT = .true. SAVE_SEISMOGRAMS_VELOCITY = .true. SAVE_SEISMOGRAMS_ACCELERATION = .true. +SAVE_SEISMOGRAMS_PRESSURE = .false. # currently implemented in acoustic (i.e. fluid) elements only # save seismograms in binary or ASCII format (binary is smaller but may not be portable between machines) USE_BINARY_FOR_SEISMOGRAMS = .false. @@ -137,6 +139,49 @@ WRITE_SEISMOGRAMS_BY_MASTER = .false. # to avoid overloading shared non-local file systems such as LUSTRE or GPFS for instance SAVE_ALL_SEISMOS_IN_ONE_FILE = .false. +# use a trick to increase accuracy of pressure seismograms in fluid (acoustic) elements: +# use the second derivative of the source for the source time function instead of the source itself, +# and then record -potential_acoustic() as pressure seismograms instead of -potential_dot_dot_acoustic(); +# this is mathematically equivalent, but numerically significantly more accurate because in the explicit +# Newmark time scheme acceleration is accurate at zeroth order while displacement is accurate at second order, +# thus in fluid elements potential_dot_dot_acoustic() is accurate at zeroth order while potential_acoustic() +# is accurate at second order and thus contains significantly less numerical noise. +USE_TRICK_FOR_BETTER_PRESSURE = .false. + +# +# source encoding +# +# determines source encoding factor +/-1 depending on sign of moment tensor +# (see e.g. Krebs et al., 2009. Fast full-wavefield seismic inversion using encoded sources, Geophysics, 74 (6), WCC177-WCC188.) +USE_SOURCE_ENCODING = .false. + +# +# total energy calculation +# +# to plot total energy curves, for instance to monitor how CPML absorbing layers behave; +# should be turned OFF in most cases because expensive +OUTPUT_ENERGY = .false. +# every how many time steps we compute energy (which is expensive to compute) +NTSTEP_BETWEEN_OUTPUT_ENERGY = 10 + +# +# adjoint kernel outputs +# +# this parameter must be set to .true. to compute anisotropic kernels +# in crust and mantle (related to the 21 Cij in geographical coordinates) +# default is .false. to compute isotropic kernels (related to alpha and beta) +ANISOTROPIC_KL = .false. + +# compute transverse isotropic kernels (alpha_v,alpha_h,beta_v,beta_h,eta,rho) +# rather than fully anisotropic kernels in case ANISOTROPIC_KL is set to .true. +SAVE_TRANSVERSE_KL = .false. + +# outputs approximate Hessian for preconditioning +APPROXIMATE_HESS_KL = .false. + +# save Moho mesh and compute Moho boundary kernels +SAVE_MOHO_MESH = .false. + # print source time function PRINT_SOURCE_TIME_FUNCTION = .false. diff --git a/EXAMPLES/fault_examples/tpv103/DATA/Par_file b/EXAMPLES/fault_examples/tpv103/DATA/Par_file index 83e431d31..04471d0f5 100644 --- a/EXAMPLES/fault_examples/tpv103/DATA/Par_file +++ b/EXAMPLES/fault_examples/tpv103/DATA/Par_file @@ -119,10 +119,12 @@ USE_FORCE_POINT_SOURCE = .false. # to represent a (tilted) FORCESOLUTION force point source or a CMTSOLUTION moment-tensor source. USE_RICKER_TIME_FUNCTION = .false. -# decide if we save displacement, velocity and/or acceleration in forward runs (they can be set to true simultaneously) +# decide if we save displacement, velocity, acceleration and/or pressure in forward runs (they can be set to true simultaneously) +# currently pressure seismograms are implemented in acoustic (i.e. fluid) elements only SAVE_SEISMOGRAMS_DISPLACEMENT = .true. SAVE_SEISMOGRAMS_VELOCITY = .true. SAVE_SEISMOGRAMS_ACCELERATION = .true. +SAVE_SEISMOGRAMS_PRESSURE = .false. # currently implemented in acoustic (i.e. fluid) elements only # save seismograms in binary or ASCII format (binary is smaller but may not be portable between machines) USE_BINARY_FOR_SEISMOGRAMS = .false. @@ -137,6 +139,49 @@ WRITE_SEISMOGRAMS_BY_MASTER = .false. # to avoid overloading shared non-local file systems such as LUSTRE or GPFS for instance SAVE_ALL_SEISMOS_IN_ONE_FILE = .false. +# use a trick to increase accuracy of pressure seismograms in fluid (acoustic) elements: +# use the second derivative of the source for the source time function instead of the source itself, +# and then record -potential_acoustic() as pressure seismograms instead of -potential_dot_dot_acoustic(); +# this is mathematically equivalent, but numerically significantly more accurate because in the explicit +# Newmark time scheme acceleration is accurate at zeroth order while displacement is accurate at second order, +# thus in fluid elements potential_dot_dot_acoustic() is accurate at zeroth order while potential_acoustic() +# is accurate at second order and thus contains significantly less numerical noise. +USE_TRICK_FOR_BETTER_PRESSURE = .false. + +# +# source encoding +# +# determines source encoding factor +/-1 depending on sign of moment tensor +# (see e.g. Krebs et al., 2009. Fast full-wavefield seismic inversion using encoded sources, Geophysics, 74 (6), WCC177-WCC188.) +USE_SOURCE_ENCODING = .false. + +# +# total energy calculation +# +# to plot total energy curves, for instance to monitor how CPML absorbing layers behave; +# should be turned OFF in most cases because expensive +OUTPUT_ENERGY = .false. +# every how many time steps we compute energy (which is expensive to compute) +NTSTEP_BETWEEN_OUTPUT_ENERGY = 10 + +# +# adjoint kernel outputs +# +# this parameter must be set to .true. to compute anisotropic kernels +# in crust and mantle (related to the 21 Cij in geographical coordinates) +# default is .false. to compute isotropic kernels (related to alpha and beta) +ANISOTROPIC_KL = .false. + +# compute transverse isotropic kernels (alpha_v,alpha_h,beta_v,beta_h,eta,rho) +# rather than fully anisotropic kernels in case ANISOTROPIC_KL is set to .true. +SAVE_TRANSVERSE_KL = .false. + +# outputs approximate Hessian for preconditioning +APPROXIMATE_HESS_KL = .false. + +# save Moho mesh and compute Moho boundary kernels +SAVE_MOHO_MESH = .false. + # print source time function PRINT_SOURCE_TIME_FUNCTION = .false. diff --git a/EXAMPLES/fault_examples/tpv15/DATA/Par_file b/EXAMPLES/fault_examples/tpv15/DATA/Par_file index 18953e923..b5587efa6 100644 --- a/EXAMPLES/fault_examples/tpv15/DATA/Par_file +++ b/EXAMPLES/fault_examples/tpv15/DATA/Par_file @@ -119,10 +119,12 @@ USE_FORCE_POINT_SOURCE = .false. # to represent a (tilted) FORCESOLUTION force point source or a CMTSOLUTION moment-tensor source. USE_RICKER_TIME_FUNCTION = .false. -# decide if we save displacement, velocity and/or acceleration in forward runs (they can be set to true simultaneously) +# decide if we save displacement, velocity, acceleration and/or pressure in forward runs (they can be set to true simultaneously) +# currently pressure seismograms are implemented in acoustic (i.e. fluid) elements only SAVE_SEISMOGRAMS_DISPLACEMENT = .true. SAVE_SEISMOGRAMS_VELOCITY = .true. SAVE_SEISMOGRAMS_ACCELERATION = .true. +SAVE_SEISMOGRAMS_PRESSURE = .false. # currently implemented in acoustic (i.e. fluid) elements only # save seismograms in binary or ASCII format (binary is smaller but may not be portable between machines) USE_BINARY_FOR_SEISMOGRAMS = .false. @@ -137,6 +139,49 @@ WRITE_SEISMOGRAMS_BY_MASTER = .false. # to avoid overloading shared non-local file systems such as LUSTRE or GPFS for instance SAVE_ALL_SEISMOS_IN_ONE_FILE = .false. +# use a trick to increase accuracy of pressure seismograms in fluid (acoustic) elements: +# use the second derivative of the source for the source time function instead of the source itself, +# and then record -potential_acoustic() as pressure seismograms instead of -potential_dot_dot_acoustic(); +# this is mathematically equivalent, but numerically significantly more accurate because in the explicit +# Newmark time scheme acceleration is accurate at zeroth order while displacement is accurate at second order, +# thus in fluid elements potential_dot_dot_acoustic() is accurate at zeroth order while potential_acoustic() +# is accurate at second order and thus contains significantly less numerical noise. +USE_TRICK_FOR_BETTER_PRESSURE = .false. + +# +# source encoding +# +# determines source encoding factor +/-1 depending on sign of moment tensor +# (see e.g. Krebs et al., 2009. Fast full-wavefield seismic inversion using encoded sources, Geophysics, 74 (6), WCC177-WCC188.) +USE_SOURCE_ENCODING = .false. + +# +# total energy calculation +# +# to plot total energy curves, for instance to monitor how CPML absorbing layers behave; +# should be turned OFF in most cases because expensive +OUTPUT_ENERGY = .false. +# every how many time steps we compute energy (which is expensive to compute) +NTSTEP_BETWEEN_OUTPUT_ENERGY = 10 + +# +# adjoint kernel outputs +# +# this parameter must be set to .true. to compute anisotropic kernels +# in crust and mantle (related to the 21 Cij in geographical coordinates) +# default is .false. to compute isotropic kernels (related to alpha and beta) +ANISOTROPIC_KL = .false. + +# compute transverse isotropic kernels (alpha_v,alpha_h,beta_v,beta_h,eta,rho) +# rather than fully anisotropic kernels in case ANISOTROPIC_KL is set to .true. +SAVE_TRANSVERSE_KL = .false. + +# outputs approximate Hessian for preconditioning +APPROXIMATE_HESS_KL = .false. + +# save Moho mesh and compute Moho boundary kernels +SAVE_MOHO_MESH = .false. + # print source time function PRINT_SOURCE_TIME_FUNCTION = .false. diff --git a/EXAMPLES/fault_examples/tpv16/DATA/Par_file b/EXAMPLES/fault_examples/tpv16/DATA/Par_file index bd86af687..451cc58b4 100644 --- a/EXAMPLES/fault_examples/tpv16/DATA/Par_file +++ b/EXAMPLES/fault_examples/tpv16/DATA/Par_file @@ -119,10 +119,12 @@ USE_FORCE_POINT_SOURCE = .false. # to represent a (tilted) FORCESOLUTION force point source or a CMTSOLUTION moment-tensor source. USE_RICKER_TIME_FUNCTION = .false. -# decide if we save displacement, velocity and/or acceleration in forward runs (they can be set to true simultaneously) +# decide if we save displacement, velocity, acceleration and/or pressure in forward runs (they can be set to true simultaneously) +# currently pressure seismograms are implemented in acoustic (i.e. fluid) elements only SAVE_SEISMOGRAMS_DISPLACEMENT = .true. SAVE_SEISMOGRAMS_VELOCITY = .true. SAVE_SEISMOGRAMS_ACCELERATION = .true. +SAVE_SEISMOGRAMS_PRESSURE = .false. # currently implemented in acoustic (i.e. fluid) elements only # save seismograms in binary or ASCII format (binary is smaller but may not be portable between machines) USE_BINARY_FOR_SEISMOGRAMS = .false. @@ -137,6 +139,49 @@ WRITE_SEISMOGRAMS_BY_MASTER = .false. # to avoid overloading shared non-local file systems such as LUSTRE or GPFS for instance SAVE_ALL_SEISMOS_IN_ONE_FILE = .false. +# use a trick to increase accuracy of pressure seismograms in fluid (acoustic) elements: +# use the second derivative of the source for the source time function instead of the source itself, +# and then record -potential_acoustic() as pressure seismograms instead of -potential_dot_dot_acoustic(); +# this is mathematically equivalent, but numerically significantly more accurate because in the explicit +# Newmark time scheme acceleration is accurate at zeroth order while displacement is accurate at second order, +# thus in fluid elements potential_dot_dot_acoustic() is accurate at zeroth order while potential_acoustic() +# is accurate at second order and thus contains significantly less numerical noise. +USE_TRICK_FOR_BETTER_PRESSURE = .false. + +# +# source encoding +# +# determines source encoding factor +/-1 depending on sign of moment tensor +# (see e.g. Krebs et al., 2009. Fast full-wavefield seismic inversion using encoded sources, Geophysics, 74 (6), WCC177-WCC188.) +USE_SOURCE_ENCODING = .false. + +# +# total energy calculation +# +# to plot total energy curves, for instance to monitor how CPML absorbing layers behave; +# should be turned OFF in most cases because expensive +OUTPUT_ENERGY = .false. +# every how many time steps we compute energy (which is expensive to compute) +NTSTEP_BETWEEN_OUTPUT_ENERGY = 10 + +# +# adjoint kernel outputs +# +# this parameter must be set to .true. to compute anisotropic kernels +# in crust and mantle (related to the 21 Cij in geographical coordinates) +# default is .false. to compute isotropic kernels (related to alpha and beta) +ANISOTROPIC_KL = .false. + +# compute transverse isotropic kernels (alpha_v,alpha_h,beta_v,beta_h,eta,rho) +# rather than fully anisotropic kernels in case ANISOTROPIC_KL is set to .true. +SAVE_TRANSVERSE_KL = .false. + +# outputs approximate Hessian for preconditioning +APPROXIMATE_HESS_KL = .false. + +# save Moho mesh and compute Moho boundary kernels +SAVE_MOHO_MESH = .false. + # print source time function PRINT_SOURCE_TIME_FUNCTION = .false. diff --git a/EXAMPLES/fault_examples/tpv5/DATA/Par_file b/EXAMPLES/fault_examples/tpv5/DATA/Par_file index 7cc0fa3d6..b61a62712 100644 --- a/EXAMPLES/fault_examples/tpv5/DATA/Par_file +++ b/EXAMPLES/fault_examples/tpv5/DATA/Par_file @@ -119,10 +119,12 @@ USE_FORCE_POINT_SOURCE = .false. # to represent a (tilted) FORCESOLUTION force point source or a CMTSOLUTION moment-tensor source. USE_RICKER_TIME_FUNCTION = .false. -# decide if we save displacement, velocity and/or acceleration in forward runs (they can be set to true simultaneously) +# decide if we save displacement, velocity, acceleration and/or pressure in forward runs (they can be set to true simultaneously) +# currently pressure seismograms are implemented in acoustic (i.e. fluid) elements only SAVE_SEISMOGRAMS_DISPLACEMENT = .true. SAVE_SEISMOGRAMS_VELOCITY = .true. SAVE_SEISMOGRAMS_ACCELERATION = .true. +SAVE_SEISMOGRAMS_PRESSURE = .false. # currently implemented in acoustic (i.e. fluid) elements only # save seismograms in binary or ASCII format (binary is smaller but may not be portable between machines) USE_BINARY_FOR_SEISMOGRAMS = .false. @@ -137,6 +139,49 @@ WRITE_SEISMOGRAMS_BY_MASTER = .false. # to avoid overloading shared non-local file systems such as LUSTRE or GPFS for instance SAVE_ALL_SEISMOS_IN_ONE_FILE = .false. +# use a trick to increase accuracy of pressure seismograms in fluid (acoustic) elements: +# use the second derivative of the source for the source time function instead of the source itself, +# and then record -potential_acoustic() as pressure seismograms instead of -potential_dot_dot_acoustic(); +# this is mathematically equivalent, but numerically significantly more accurate because in the explicit +# Newmark time scheme acceleration is accurate at zeroth order while displacement is accurate at second order, +# thus in fluid elements potential_dot_dot_acoustic() is accurate at zeroth order while potential_acoustic() +# is accurate at second order and thus contains significantly less numerical noise. +USE_TRICK_FOR_BETTER_PRESSURE = .false. + +# +# source encoding +# +# determines source encoding factor +/-1 depending on sign of moment tensor +# (see e.g. Krebs et al., 2009. Fast full-wavefield seismic inversion using encoded sources, Geophysics, 74 (6), WCC177-WCC188.) +USE_SOURCE_ENCODING = .false. + +# +# total energy calculation +# +# to plot total energy curves, for instance to monitor how CPML absorbing layers behave; +# should be turned OFF in most cases because expensive +OUTPUT_ENERGY = .false. +# every how many time steps we compute energy (which is expensive to compute) +NTSTEP_BETWEEN_OUTPUT_ENERGY = 10 + +# +# adjoint kernel outputs +# +# this parameter must be set to .true. to compute anisotropic kernels +# in crust and mantle (related to the 21 Cij in geographical coordinates) +# default is .false. to compute isotropic kernels (related to alpha and beta) +ANISOTROPIC_KL = .false. + +# compute transverse isotropic kernels (alpha_v,alpha_h,beta_v,beta_h,eta,rho) +# rather than fully anisotropic kernels in case ANISOTROPIC_KL is set to .true. +SAVE_TRANSVERSE_KL = .false. + +# outputs approximate Hessian for preconditioning +APPROXIMATE_HESS_KL = .false. + +# save Moho mesh and compute Moho boundary kernels +SAVE_MOHO_MESH = .false. + # print source time function PRINT_SOURCE_TIME_FUNCTION = .false. diff --git a/EXAMPLES/homogeneous_acoustic/DATA/Par_file b/EXAMPLES/homogeneous_acoustic/DATA/Par_file index aafe6c15c..d8518409c 100644 --- a/EXAMPLES/homogeneous_acoustic/DATA/Par_file +++ b/EXAMPLES/homogeneous_acoustic/DATA/Par_file @@ -119,10 +119,12 @@ USE_FORCE_POINT_SOURCE = .false. # to represent a (tilted) FORCESOLUTION force point source or a CMTSOLUTION moment-tensor source. USE_RICKER_TIME_FUNCTION = .false. -# decide if we save displacement, velocity and/or acceleration in forward runs (they can be set to true simultaneously) +# decide if we save displacement, velocity, acceleration and/or pressure in forward runs (they can be set to true simultaneously) +# currently pressure seismograms are implemented in acoustic (i.e. fluid) elements only SAVE_SEISMOGRAMS_DISPLACEMENT = .true. SAVE_SEISMOGRAMS_VELOCITY = .true. SAVE_SEISMOGRAMS_ACCELERATION = .true. +SAVE_SEISMOGRAMS_PRESSURE = .false. # currently implemented in acoustic (i.e. fluid) elements only # save seismograms in binary or ASCII format (binary is smaller but may not be portable between machines) USE_BINARY_FOR_SEISMOGRAMS = .false. @@ -137,6 +139,49 @@ WRITE_SEISMOGRAMS_BY_MASTER = .false. # to avoid overloading shared non-local file systems such as LUSTRE or GPFS for instance SAVE_ALL_SEISMOS_IN_ONE_FILE = .false. +# use a trick to increase accuracy of pressure seismograms in fluid (acoustic) elements: +# use the second derivative of the source for the source time function instead of the source itself, +# and then record -potential_acoustic() as pressure seismograms instead of -potential_dot_dot_acoustic(); +# this is mathematically equivalent, but numerically significantly more accurate because in the explicit +# Newmark time scheme acceleration is accurate at zeroth order while displacement is accurate at second order, +# thus in fluid elements potential_dot_dot_acoustic() is accurate at zeroth order while potential_acoustic() +# is accurate at second order and thus contains significantly less numerical noise. +USE_TRICK_FOR_BETTER_PRESSURE = .false. + +# +# source encoding +# +# determines source encoding factor +/-1 depending on sign of moment tensor +# (see e.g. Krebs et al., 2009. Fast full-wavefield seismic inversion using encoded sources, Geophysics, 74 (6), WCC177-WCC188.) +USE_SOURCE_ENCODING = .false. + +# +# total energy calculation +# +# to plot total energy curves, for instance to monitor how CPML absorbing layers behave; +# should be turned OFF in most cases because expensive +OUTPUT_ENERGY = .false. +# every how many time steps we compute energy (which is expensive to compute) +NTSTEP_BETWEEN_OUTPUT_ENERGY = 10 + +# +# adjoint kernel outputs +# +# this parameter must be set to .true. to compute anisotropic kernels +# in crust and mantle (related to the 21 Cij in geographical coordinates) +# default is .false. to compute isotropic kernels (related to alpha and beta) +ANISOTROPIC_KL = .false. + +# compute transverse isotropic kernels (alpha_v,alpha_h,beta_v,beta_h,eta,rho) +# rather than fully anisotropic kernels in case ANISOTROPIC_KL is set to .true. +SAVE_TRANSVERSE_KL = .false. + +# outputs approximate Hessian for preconditioning +APPROXIMATE_HESS_KL = .false. + +# save Moho mesh and compute Moho boundary kernels +SAVE_MOHO_MESH = .false. + # print source time function PRINT_SOURCE_TIME_FUNCTION = .false. diff --git a/EXAMPLES/homogeneous_acoustic/create_adjoint_sources.sh b/EXAMPLES/homogeneous_acoustic/create_adjoint_sources.sh index 38e0ce59a..e30c8d258 100755 --- a/EXAMPLES/homogeneous_acoustic/create_adjoint_sources.sh +++ b/EXAMPLES/homogeneous_acoustic/create_adjoint_sources.sh @@ -23,7 +23,7 @@ if [ ! -e $sta.BXZ.semd.adj ]; then echo "error creating adjoint sources, please rename .semd.adj .adj *semd.adj -# uses Z-component source for all +# uses Z-component source for all # (acoustic adjoint sources are read from component 1 -> BXX.adj) cp $sta.BXZ.adj $sta.BXX.adj cp $sta.BXZ.adj $sta.BXY.adj diff --git a/EXAMPLES/homogeneous_halfspace_HEX27_elastic_no_absorbing/DATA/Par_file b/EXAMPLES/homogeneous_halfspace_HEX27_elastic_no_absorbing/DATA/Par_file index a389c82f2..c00ff98bd 100644 --- a/EXAMPLES/homogeneous_halfspace_HEX27_elastic_no_absorbing/DATA/Par_file +++ b/EXAMPLES/homogeneous_halfspace_HEX27_elastic_no_absorbing/DATA/Par_file @@ -119,10 +119,12 @@ USE_FORCE_POINT_SOURCE = .false. # to represent a (tilted) FORCESOLUTION force point source or a CMTSOLUTION moment-tensor source. USE_RICKER_TIME_FUNCTION = .false. -# decide if we save displacement, velocity and/or acceleration in forward runs (they can be set to true simultaneously) +# decide if we save displacement, velocity, acceleration and/or pressure in forward runs (they can be set to true simultaneously) +# currently pressure seismograms are implemented in acoustic (i.e. fluid) elements only SAVE_SEISMOGRAMS_DISPLACEMENT = .true. SAVE_SEISMOGRAMS_VELOCITY = .true. SAVE_SEISMOGRAMS_ACCELERATION = .true. +SAVE_SEISMOGRAMS_PRESSURE = .false. # currently implemented in acoustic (i.e. fluid) elements only # save seismograms in binary or ASCII format (binary is smaller but may not be portable between machines) USE_BINARY_FOR_SEISMOGRAMS = .false. @@ -137,6 +139,49 @@ WRITE_SEISMOGRAMS_BY_MASTER = .false. # to avoid overloading shared non-local file systems such as LUSTRE or GPFS for instance SAVE_ALL_SEISMOS_IN_ONE_FILE = .false. +# use a trick to increase accuracy of pressure seismograms in fluid (acoustic) elements: +# use the second derivative of the source for the source time function instead of the source itself, +# and then record -potential_acoustic() as pressure seismograms instead of -potential_dot_dot_acoustic(); +# this is mathematically equivalent, but numerically significantly more accurate because in the explicit +# Newmark time scheme acceleration is accurate at zeroth order while displacement is accurate at second order, +# thus in fluid elements potential_dot_dot_acoustic() is accurate at zeroth order while potential_acoustic() +# is accurate at second order and thus contains significantly less numerical noise. +USE_TRICK_FOR_BETTER_PRESSURE = .false. + +# +# source encoding +# +# determines source encoding factor +/-1 depending on sign of moment tensor +# (see e.g. Krebs et al., 2009. Fast full-wavefield seismic inversion using encoded sources, Geophysics, 74 (6), WCC177-WCC188.) +USE_SOURCE_ENCODING = .false. + +# +# total energy calculation +# +# to plot total energy curves, for instance to monitor how CPML absorbing layers behave; +# should be turned OFF in most cases because expensive +OUTPUT_ENERGY = .false. +# every how many time steps we compute energy (which is expensive to compute) +NTSTEP_BETWEEN_OUTPUT_ENERGY = 10 + +# +# adjoint kernel outputs +# +# this parameter must be set to .true. to compute anisotropic kernels +# in crust and mantle (related to the 21 Cij in geographical coordinates) +# default is .false. to compute isotropic kernels (related to alpha and beta) +ANISOTROPIC_KL = .false. + +# compute transverse isotropic kernels (alpha_v,alpha_h,beta_v,beta_h,eta,rho) +# rather than fully anisotropic kernels in case ANISOTROPIC_KL is set to .true. +SAVE_TRANSVERSE_KL = .false. + +# outputs approximate Hessian for preconditioning +APPROXIMATE_HESS_KL = .false. + +# save Moho mesh and compute Moho boundary kernels +SAVE_MOHO_MESH = .false. + # print source time function PRINT_SOURCE_TIME_FUNCTION = .false. diff --git a/EXAMPLES/homogeneous_halfspace_HEX8_elastic_absorbing_Stacey_5sides/DATA/Par_file b/EXAMPLES/homogeneous_halfspace_HEX8_elastic_absorbing_Stacey_5sides/DATA/Par_file index 4487dc6b0..fc222861a 100644 --- a/EXAMPLES/homogeneous_halfspace_HEX8_elastic_absorbing_Stacey_5sides/DATA/Par_file +++ b/EXAMPLES/homogeneous_halfspace_HEX8_elastic_absorbing_Stacey_5sides/DATA/Par_file @@ -119,10 +119,12 @@ USE_FORCE_POINT_SOURCE = .false. # to represent a (tilted) FORCESOLUTION force point source or a CMTSOLUTION moment-tensor source. USE_RICKER_TIME_FUNCTION = .false. -# decide if we save displacement, velocity and/or acceleration in forward runs (they can be set to true simultaneously) +# decide if we save displacement, velocity, acceleration and/or pressure in forward runs (they can be set to true simultaneously) +# currently pressure seismograms are implemented in acoustic (i.e. fluid) elements only SAVE_SEISMOGRAMS_DISPLACEMENT = .true. -SAVE_SEISMOGRAMS_VELOCITY = .true. -SAVE_SEISMOGRAMS_ACCELERATION = .true. +SAVE_SEISMOGRAMS_VELOCITY = .false. +SAVE_SEISMOGRAMS_ACCELERATION = .false. +SAVE_SEISMOGRAMS_PRESSURE = .false. # currently implemented in acoustic (i.e. fluid) elements only # save seismograms in binary or ASCII format (binary is smaller but may not be portable between machines) USE_BINARY_FOR_SEISMOGRAMS = .false. @@ -137,6 +139,49 @@ WRITE_SEISMOGRAMS_BY_MASTER = .false. # to avoid overloading shared non-local file systems such as LUSTRE or GPFS for instance SAVE_ALL_SEISMOS_IN_ONE_FILE = .false. +# use a trick to increase accuracy of pressure seismograms in fluid (acoustic) elements: +# use the second derivative of the source for the source time function instead of the source itself, +# and then record -potential_acoustic() as pressure seismograms instead of -potential_dot_dot_acoustic(); +# this is mathematically equivalent, but numerically significantly more accurate because in the explicit +# Newmark time scheme acceleration is accurate at zeroth order while displacement is accurate at second order, +# thus in fluid elements potential_dot_dot_acoustic() is accurate at zeroth order while potential_acoustic() +# is accurate at second order and thus contains significantly less numerical noise. +USE_TRICK_FOR_BETTER_PRESSURE = .false. + +# +# source encoding +# +# determines source encoding factor +/-1 depending on sign of moment tensor +# (see e.g. Krebs et al., 2009. Fast full-wavefield seismic inversion using encoded sources, Geophysics, 74 (6), WCC177-WCC188.) +USE_SOURCE_ENCODING = .false. + +# +# total energy calculation +# +# to plot total energy curves, for instance to monitor how CPML absorbing layers behave; +# should be turned OFF in most cases because expensive +OUTPUT_ENERGY = .false. +# every how many time steps we compute energy (which is expensive to compute) +NTSTEP_BETWEEN_OUTPUT_ENERGY = 10 + +# +# adjoint kernel outputs +# +# this parameter must be set to .true. to compute anisotropic kernels +# in crust and mantle (related to the 21 Cij in geographical coordinates) +# default is .false. to compute isotropic kernels (related to alpha and beta) +ANISOTROPIC_KL = .false. + +# compute transverse isotropic kernels (alpha_v,alpha_h,beta_v,beta_h,eta,rho) +# rather than fully anisotropic kernels in case ANISOTROPIC_KL is set to .true. +SAVE_TRANSVERSE_KL = .false. + +# outputs approximate Hessian for preconditioning +APPROXIMATE_HESS_KL = .false. + +# save Moho mesh and compute Moho boundary kernels +SAVE_MOHO_MESH = .false. + # print source time function PRINT_SOURCE_TIME_FUNCTION = .false. diff --git a/EXAMPLES/homogeneous_halfspace_HEX8_elastic_absorbing_Stacey_5sides/create_alpha_kernel_vtk.sh b/EXAMPLES/homogeneous_halfspace_HEX8_elastic_absorbing_Stacey_5sides/create_alpha_kernel_vtk.sh index 3d5c3ad6f..1482ccf46 100755 --- a/EXAMPLES/homogeneous_halfspace_HEX8_elastic_absorbing_Stacey_5sides/create_alpha_kernel_vtk.sh +++ b/EXAMPLES/homogeneous_halfspace_HEX8_elastic_absorbing_Stacey_5sides/create_alpha_kernel_vtk.sh @@ -11,7 +11,7 @@ if [ ! -e OUTPUT_FILES/DATABASES_MPI/proc000000_alpha_kernel.bin ]; then echo "p # creates kernel as vtk-file cd bin.xcombine/ -./xcombine_vol_data 0 3 alpha_kernel ../OUTPUT_FILES/DATABASES_MPI/ ../OUTPUT_FILES/ 1 +./xcombine_vol_data 0 3 alpha_kernel ../OUTPUT_FILES/DATABASES_MPI/ ../OUTPUT_FILES/ 1 cd ../ echo diff --git a/EXAMPLES/homogeneous_halfspace_HEX8_elastic_absorbing_Stacey_5sides/make_mesh.sh b/EXAMPLES/homogeneous_halfspace_HEX8_elastic_absorbing_Stacey_5sides/make_mesh.sh index fb4f58506..d1fbfe002 100755 --- a/EXAMPLES/homogeneous_halfspace_HEX8_elastic_absorbing_Stacey_5sides/make_mesh.sh +++ b/EXAMPLES/homogeneous_halfspace_HEX8_elastic_absorbing_Stacey_5sides/make_mesh.sh @@ -2,4 +2,4 @@ GEOCUBIT.py --build_volume --mesh --cfg=homogeneous_halfspace.cfg GEOCUBIT.py --collect --meshfiles=MESH_GEOCUBIT/mesh_vol_0.e --export2SPECFEM3D --SEMoutput=MESH -cp MESH-default/nummaterial_velocity_file MESH/ \ No newline at end of file +cp MESH-default/nummaterial_velocity_file MESH/ diff --git a/EXAMPLES/homogeneous_halfspace_HEX8_elastic_no_absorbing/DATA/Par_file b/EXAMPLES/homogeneous_halfspace_HEX8_elastic_no_absorbing/DATA/Par_file index d8e01e229..074a0a97b 100644 --- a/EXAMPLES/homogeneous_halfspace_HEX8_elastic_no_absorbing/DATA/Par_file +++ b/EXAMPLES/homogeneous_halfspace_HEX8_elastic_no_absorbing/DATA/Par_file @@ -119,10 +119,12 @@ USE_FORCE_POINT_SOURCE = .false. # to represent a (tilted) FORCESOLUTION force point source or a CMTSOLUTION moment-tensor source. USE_RICKER_TIME_FUNCTION = .false. -# decide if we save displacement, velocity and/or acceleration in forward runs (they can be set to true simultaneously) +# decide if we save displacement, velocity, acceleration and/or pressure in forward runs (they can be set to true simultaneously) +# currently pressure seismograms are implemented in acoustic (i.e. fluid) elements only SAVE_SEISMOGRAMS_DISPLACEMENT = .true. SAVE_SEISMOGRAMS_VELOCITY = .true. SAVE_SEISMOGRAMS_ACCELERATION = .true. +SAVE_SEISMOGRAMS_PRESSURE = .false. # currently implemented in acoustic (i.e. fluid) elements only # save seismograms in binary or ASCII format (binary is smaller but may not be portable between machines) USE_BINARY_FOR_SEISMOGRAMS = .false. @@ -137,6 +139,49 @@ WRITE_SEISMOGRAMS_BY_MASTER = .false. # to avoid overloading shared non-local file systems such as LUSTRE or GPFS for instance SAVE_ALL_SEISMOS_IN_ONE_FILE = .false. +# use a trick to increase accuracy of pressure seismograms in fluid (acoustic) elements: +# use the second derivative of the source for the source time function instead of the source itself, +# and then record -potential_acoustic() as pressure seismograms instead of -potential_dot_dot_acoustic(); +# this is mathematically equivalent, but numerically significantly more accurate because in the explicit +# Newmark time scheme acceleration is accurate at zeroth order while displacement is accurate at second order, +# thus in fluid elements potential_dot_dot_acoustic() is accurate at zeroth order while potential_acoustic() +# is accurate at second order and thus contains significantly less numerical noise. +USE_TRICK_FOR_BETTER_PRESSURE = .false. + +# +# source encoding +# +# determines source encoding factor +/-1 depending on sign of moment tensor +# (see e.g. Krebs et al., 2009. Fast full-wavefield seismic inversion using encoded sources, Geophysics, 74 (6), WCC177-WCC188.) +USE_SOURCE_ENCODING = .false. + +# +# total energy calculation +# +# to plot total energy curves, for instance to monitor how CPML absorbing layers behave; +# should be turned OFF in most cases because expensive +OUTPUT_ENERGY = .false. +# every how many time steps we compute energy (which is expensive to compute) +NTSTEP_BETWEEN_OUTPUT_ENERGY = 10 + +# +# adjoint kernel outputs +# +# this parameter must be set to .true. to compute anisotropic kernels +# in crust and mantle (related to the 21 Cij in geographical coordinates) +# default is .false. to compute isotropic kernels (related to alpha and beta) +ANISOTROPIC_KL = .false. + +# compute transverse isotropic kernels (alpha_v,alpha_h,beta_v,beta_h,eta,rho) +# rather than fully anisotropic kernels in case ANISOTROPIC_KL is set to .true. +SAVE_TRANSVERSE_KL = .false. + +# outputs approximate Hessian for preconditioning +APPROXIMATE_HESS_KL = .false. + +# save Moho mesh and compute Moho boundary kernels +SAVE_MOHO_MESH = .false. + # print source time function PRINT_SOURCE_TIME_FUNCTION = .false. diff --git a/EXAMPLES/homogeneous_poroelastic/DATA/Par_file b/EXAMPLES/homogeneous_poroelastic/DATA/Par_file index f1bb02513..95917c6a0 100644 --- a/EXAMPLES/homogeneous_poroelastic/DATA/Par_file +++ b/EXAMPLES/homogeneous_poroelastic/DATA/Par_file @@ -119,10 +119,12 @@ USE_FORCE_POINT_SOURCE = .false. # to represent a (tilted) FORCESOLUTION force point source or a CMTSOLUTION moment-tensor source. USE_RICKER_TIME_FUNCTION = .false. -# decide if we save displacement, velocity and/or acceleration in forward runs (they can be set to true simultaneously) +# decide if we save displacement, velocity, acceleration and/or pressure in forward runs (they can be set to true simultaneously) +# currently pressure seismograms are implemented in acoustic (i.e. fluid) elements only SAVE_SEISMOGRAMS_DISPLACEMENT = .true. SAVE_SEISMOGRAMS_VELOCITY = .true. SAVE_SEISMOGRAMS_ACCELERATION = .true. +SAVE_SEISMOGRAMS_PRESSURE = .false. # currently implemented in acoustic (i.e. fluid) elements only # save seismograms in binary or ASCII format (binary is smaller but may not be portable between machines) USE_BINARY_FOR_SEISMOGRAMS = .false. @@ -137,6 +139,49 @@ WRITE_SEISMOGRAMS_BY_MASTER = .false. # to avoid overloading shared non-local file systems such as LUSTRE or GPFS for instance SAVE_ALL_SEISMOS_IN_ONE_FILE = .false. +# use a trick to increase accuracy of pressure seismograms in fluid (acoustic) elements: +# use the second derivative of the source for the source time function instead of the source itself, +# and then record -potential_acoustic() as pressure seismograms instead of -potential_dot_dot_acoustic(); +# this is mathematically equivalent, but numerically significantly more accurate because in the explicit +# Newmark time scheme acceleration is accurate at zeroth order while displacement is accurate at second order, +# thus in fluid elements potential_dot_dot_acoustic() is accurate at zeroth order while potential_acoustic() +# is accurate at second order and thus contains significantly less numerical noise. +USE_TRICK_FOR_BETTER_PRESSURE = .false. + +# +# source encoding +# +# determines source encoding factor +/-1 depending on sign of moment tensor +# (see e.g. Krebs et al., 2009. Fast full-wavefield seismic inversion using encoded sources, Geophysics, 74 (6), WCC177-WCC188.) +USE_SOURCE_ENCODING = .false. + +# +# total energy calculation +# +# to plot total energy curves, for instance to monitor how CPML absorbing layers behave; +# should be turned OFF in most cases because expensive +OUTPUT_ENERGY = .false. +# every how many time steps we compute energy (which is expensive to compute) +NTSTEP_BETWEEN_OUTPUT_ENERGY = 10 + +# +# adjoint kernel outputs +# +# this parameter must be set to .true. to compute anisotropic kernels +# in crust and mantle (related to the 21 Cij in geographical coordinates) +# default is .false. to compute isotropic kernels (related to alpha and beta) +ANISOTROPIC_KL = .false. + +# compute transverse isotropic kernels (alpha_v,alpha_h,beta_v,beta_h,eta,rho) +# rather than fully anisotropic kernels in case ANISOTROPIC_KL is set to .true. +SAVE_TRANSVERSE_KL = .false. + +# outputs approximate Hessian for preconditioning +APPROXIMATE_HESS_KL = .false. + +# save Moho mesh and compute Moho boundary kernels +SAVE_MOHO_MESH = .false. + # print source time function PRINT_SOURCE_TIME_FUNCTION = .false. diff --git a/EXAMPLES/layered_halfspace/DATA/Par_file b/EXAMPLES/layered_halfspace/DATA/Par_file index 9fb011fb9..2cf3bfe42 100644 --- a/EXAMPLES/layered_halfspace/DATA/Par_file +++ b/EXAMPLES/layered_halfspace/DATA/Par_file @@ -119,10 +119,12 @@ USE_FORCE_POINT_SOURCE = .false. # to represent a (tilted) FORCESOLUTION force point source or a CMTSOLUTION moment-tensor source. USE_RICKER_TIME_FUNCTION = .false. -# decide if we save displacement, velocity and/or acceleration in forward runs (they can be set to true simultaneously) +# decide if we save displacement, velocity, acceleration and/or pressure in forward runs (they can be set to true simultaneously) +# currently pressure seismograms are implemented in acoustic (i.e. fluid) elements only SAVE_SEISMOGRAMS_DISPLACEMENT = .true. SAVE_SEISMOGRAMS_VELOCITY = .true. SAVE_SEISMOGRAMS_ACCELERATION = .true. +SAVE_SEISMOGRAMS_PRESSURE = .false. # currently implemented in acoustic (i.e. fluid) elements only # save seismograms in binary or ASCII format (binary is smaller but may not be portable between machines) USE_BINARY_FOR_SEISMOGRAMS = .false. @@ -137,6 +139,49 @@ WRITE_SEISMOGRAMS_BY_MASTER = .false. # to avoid overloading shared non-local file systems such as LUSTRE or GPFS for instance SAVE_ALL_SEISMOS_IN_ONE_FILE = .false. +# use a trick to increase accuracy of pressure seismograms in fluid (acoustic) elements: +# use the second derivative of the source for the source time function instead of the source itself, +# and then record -potential_acoustic() as pressure seismograms instead of -potential_dot_dot_acoustic(); +# this is mathematically equivalent, but numerically significantly more accurate because in the explicit +# Newmark time scheme acceleration is accurate at zeroth order while displacement is accurate at second order, +# thus in fluid elements potential_dot_dot_acoustic() is accurate at zeroth order while potential_acoustic() +# is accurate at second order and thus contains significantly less numerical noise. +USE_TRICK_FOR_BETTER_PRESSURE = .false. + +# +# source encoding +# +# determines source encoding factor +/-1 depending on sign of moment tensor +# (see e.g. Krebs et al., 2009. Fast full-wavefield seismic inversion using encoded sources, Geophysics, 74 (6), WCC177-WCC188.) +USE_SOURCE_ENCODING = .false. + +# +# total energy calculation +# +# to plot total energy curves, for instance to monitor how CPML absorbing layers behave; +# should be turned OFF in most cases because expensive +OUTPUT_ENERGY = .false. +# every how many time steps we compute energy (which is expensive to compute) +NTSTEP_BETWEEN_OUTPUT_ENERGY = 10 + +# +# adjoint kernel outputs +# +# this parameter must be set to .true. to compute anisotropic kernels +# in crust and mantle (related to the 21 Cij in geographical coordinates) +# default is .false. to compute isotropic kernels (related to alpha and beta) +ANISOTROPIC_KL = .false. + +# compute transverse isotropic kernels (alpha_v,alpha_h,beta_v,beta_h,eta,rho) +# rather than fully anisotropic kernels in case ANISOTROPIC_KL is set to .true. +SAVE_TRANSVERSE_KL = .false. + +# outputs approximate Hessian for preconditioning +APPROXIMATE_HESS_KL = .false. + +# save Moho mesh and compute Moho boundary kernels +SAVE_MOHO_MESH = .false. + # print source time function PRINT_SOURCE_TIME_FUNCTION = .false. diff --git a/EXAMPLES/layered_halfspace/VALIDATION_3D_SEM_SIMPLER_LAYER_SOURCE_DEPTH/REF_SEIS/Ux_file_Ycste_0031.txt b/EXAMPLES/layered_halfspace/VALIDATION_3D_SEM_SIMPLER_LAYER_SOURCE_DEPTH/REF_SEIS/Ux_file_Ycste_0031.txt index 15b5d39a7..1ac221399 100644 --- a/EXAMPLES/layered_halfspace/VALIDATION_3D_SEM_SIMPLER_LAYER_SOURCE_DEPTH/REF_SEIS/Ux_file_Ycste_0031.txt +++ b/EXAMPLES/layered_halfspace/VALIDATION_3D_SEM_SIMPLER_LAYER_SOURCE_DEPTH/REF_SEIS/Ux_file_Ycste_0031.txt @@ -1,4 +1,4 @@ - 0.000000 0.000000 + 0.000000 0.000000 6.4999998E-02 -1.0362742E-40 0.1300000 3.8805286E-37 0.1950000 6.1099051E-35 @@ -738,13 +738,13 @@ 47.90500 -3.9212941E-04 47.97000 -1.5082990E-04 48.03500 1.1105163E-04 - 48.10000 0.000000 - 48.16500 0.000000 - 48.23000 0.000000 - 48.29500 0.000000 - 48.36000 0.000000 - 48.42500 0.000000 - 48.49000 0.000000 - 48.55500 0.000000 - 48.62000 0.000000 - 48.68500 0.000000 + 48.10000 0.000000 + 48.16500 0.000000 + 48.23000 0.000000 + 48.29500 0.000000 + 48.36000 0.000000 + 48.42500 0.000000 + 48.49000 0.000000 + 48.55500 0.000000 + 48.62000 0.000000 + 48.68500 0.000000 diff --git a/EXAMPLES/layered_halfspace/VALIDATION_3D_SEM_SIMPLER_LAYER_SOURCE_DEPTH/REF_SEIS/Ux_file_Ycste_0055.txt b/EXAMPLES/layered_halfspace/VALIDATION_3D_SEM_SIMPLER_LAYER_SOURCE_DEPTH/REF_SEIS/Ux_file_Ycste_0055.txt index 531bee43d..de04eead5 100644 --- a/EXAMPLES/layered_halfspace/VALIDATION_3D_SEM_SIMPLER_LAYER_SOURCE_DEPTH/REF_SEIS/Ux_file_Ycste_0055.txt +++ b/EXAMPLES/layered_halfspace/VALIDATION_3D_SEM_SIMPLER_LAYER_SOURCE_DEPTH/REF_SEIS/Ux_file_Ycste_0055.txt @@ -738,13 +738,13 @@ 47.90500 -6.9539412E-04 47.97000 -5.0692208E-04 48.03500 -3.1740149E-04 - 48.10000 0.000000 - 48.16500 0.000000 - 48.23000 0.000000 - 48.29500 0.000000 - 48.36000 0.000000 - 48.42500 0.000000 - 48.49000 0.000000 - 48.55500 0.000000 - 48.62000 0.000000 - 48.68500 0.000000 + 48.10000 0.000000 + 48.16500 0.000000 + 48.23000 0.000000 + 48.29500 0.000000 + 48.36000 0.000000 + 48.42500 0.000000 + 48.49000 0.000000 + 48.55500 0.000000 + 48.62000 0.000000 + 48.68500 0.000000 diff --git a/EXAMPLES/layered_halfspace/VALIDATION_3D_SEM_SIMPLER_LAYER_SOURCE_DEPTH/REF_SEIS/Uz_file_Ycste_0031.txt b/EXAMPLES/layered_halfspace/VALIDATION_3D_SEM_SIMPLER_LAYER_SOURCE_DEPTH/REF_SEIS/Uz_file_Ycste_0031.txt index 85a231e14..2b76dd2ee 100644 --- a/EXAMPLES/layered_halfspace/VALIDATION_3D_SEM_SIMPLER_LAYER_SOURCE_DEPTH/REF_SEIS/Uz_file_Ycste_0031.txt +++ b/EXAMPLES/layered_halfspace/VALIDATION_3D_SEM_SIMPLER_LAYER_SOURCE_DEPTH/REF_SEIS/Uz_file_Ycste_0031.txt @@ -1,4 +1,4 @@ - 0.000000 0.000000 + 0.000000 0.000000 6.4999998E-02 3.9763245E-41 0.1300000 4.3865929E-37 0.1950000 1.0930112E-34 @@ -738,13 +738,13 @@ 47.90500 1.0361698E-03 47.97000 9.9232653E-04 48.03500 8.9776132E-04 - 48.10000 0.000000 - 48.16500 0.000000 - 48.23000 0.000000 - 48.29500 0.000000 - 48.36000 0.000000 - 48.42500 0.000000 - 48.49000 0.000000 - 48.55500 0.000000 - 48.62000 0.000000 - 48.68500 0.000000 + 48.10000 0.000000 + 48.16500 0.000000 + 48.23000 0.000000 + 48.29500 0.000000 + 48.36000 0.000000 + 48.42500 0.000000 + 48.49000 0.000000 + 48.55500 0.000000 + 48.62000 0.000000 + 48.68500 0.000000 diff --git a/EXAMPLES/layered_halfspace/VALIDATION_3D_SEM_SIMPLER_LAYER_SOURCE_DEPTH/REF_SEIS/Uz_file_Ycste_0055.txt b/EXAMPLES/layered_halfspace/VALIDATION_3D_SEM_SIMPLER_LAYER_SOURCE_DEPTH/REF_SEIS/Uz_file_Ycste_0055.txt index cdfa17684..359c8f9e8 100644 --- a/EXAMPLES/layered_halfspace/VALIDATION_3D_SEM_SIMPLER_LAYER_SOURCE_DEPTH/REF_SEIS/Uz_file_Ycste_0055.txt +++ b/EXAMPLES/layered_halfspace/VALIDATION_3D_SEM_SIMPLER_LAYER_SOURCE_DEPTH/REF_SEIS/Uz_file_Ycste_0055.txt @@ -738,13 +738,13 @@ 47.90500 -1.8044504E-04 47.97000 -1.4804730E-04 48.03500 -1.1949555E-04 - 48.10000 0.000000 - 48.16500 0.000000 - 48.23000 0.000000 - 48.29500 0.000000 - 48.36000 0.000000 - 48.42500 0.000000 - 48.49000 0.000000 - 48.55500 0.000000 - 48.62000 0.000000 - 48.68500 0.000000 + 48.10000 0.000000 + 48.16500 0.000000 + 48.23000 0.000000 + 48.29500 0.000000 + 48.36000 0.000000 + 48.42500 0.000000 + 48.49000 0.000000 + 48.55500 0.000000 + 48.62000 0.000000 + 48.68500 0.000000 diff --git a/EXAMPLES/layered_halfspace/make_mesh.sh b/EXAMPLES/layered_halfspace/make_mesh.sh index 2105eea3c..8d8ec8429 100755 --- a/EXAMPLES/layered_halfspace/make_mesh.sh +++ b/EXAMPLES/layered_halfspace/make_mesh.sh @@ -17,4 +17,4 @@ GEOCUBIT.py --build_volume --mesh --cfg=layered_halfspace_notripling.cfg #GEOCUBIT.py --build_volume --mesh --cfg=layered_halfspace_tripling.cfg GEOCUBIT.py --collect --meshfiles=MESH_GEOCUBIT/mesh_vol_0.e --export2SPECFEM3D --SEMoutput=MESH -cp nummaterial_velocity_file.reference MESH/nummaterial_velocity_file \ No newline at end of file +cp nummaterial_velocity_file.reference MESH/nummaterial_velocity_file diff --git a/EXAMPLES/layered_halfspace/run_this_example.sh b/EXAMPLES/layered_halfspace/run_this_example.sh index a1302b899..584907729 100755 --- a/EXAMPLES/layered_halfspace/run_this_example.sh +++ b/EXAMPLES/layered_halfspace/run_this_example.sh @@ -38,9 +38,9 @@ cd $currentdir # links executables cd bin/ rm -f ./x* -ln -s ../../../bin/xdecompose_mesh -ln -s ../../../bin/xgenerate_databases -ln -s ../../../bin/xspecfem3D +ln -s ../../../bin/xdecompose_mesh +ln -s ../../../bin/xgenerate_databases +ln -s ../../../bin/xspecfem3D cd ../ # stores setup diff --git a/EXAMPLES/meshfem3D_examples/many_interfaces/DATA/Par_file b/EXAMPLES/meshfem3D_examples/many_interfaces/DATA/Par_file index 0482783db..8ab16c8b6 100644 --- a/EXAMPLES/meshfem3D_examples/many_interfaces/DATA/Par_file +++ b/EXAMPLES/meshfem3D_examples/many_interfaces/DATA/Par_file @@ -119,10 +119,12 @@ USE_FORCE_POINT_SOURCE = .false. # to represent a (tilted) FORCESOLUTION force point source or a CMTSOLUTION moment-tensor source. USE_RICKER_TIME_FUNCTION = .false. -# decide if we save displacement, velocity and/or acceleration in forward runs (they can be set to true simultaneously) +# decide if we save displacement, velocity, acceleration and/or pressure in forward runs (they can be set to true simultaneously) +# currently pressure seismograms are implemented in acoustic (i.e. fluid) elements only SAVE_SEISMOGRAMS_DISPLACEMENT = .true. SAVE_SEISMOGRAMS_VELOCITY = .true. SAVE_SEISMOGRAMS_ACCELERATION = .true. +SAVE_SEISMOGRAMS_PRESSURE = .false. # currently implemented in acoustic (i.e. fluid) elements only # save seismograms in binary or ASCII format (binary is smaller but may not be portable between machines) USE_BINARY_FOR_SEISMOGRAMS = .false. @@ -137,6 +139,49 @@ WRITE_SEISMOGRAMS_BY_MASTER = .false. # to avoid overloading shared non-local file systems such as LUSTRE or GPFS for instance SAVE_ALL_SEISMOS_IN_ONE_FILE = .false. +# use a trick to increase accuracy of pressure seismograms in fluid (acoustic) elements: +# use the second derivative of the source for the source time function instead of the source itself, +# and then record -potential_acoustic() as pressure seismograms instead of -potential_dot_dot_acoustic(); +# this is mathematically equivalent, but numerically significantly more accurate because in the explicit +# Newmark time scheme acceleration is accurate at zeroth order while displacement is accurate at second order, +# thus in fluid elements potential_dot_dot_acoustic() is accurate at zeroth order while potential_acoustic() +# is accurate at second order and thus contains significantly less numerical noise. +USE_TRICK_FOR_BETTER_PRESSURE = .false. + +# +# source encoding +# +# determines source encoding factor +/-1 depending on sign of moment tensor +# (see e.g. Krebs et al., 2009. Fast full-wavefield seismic inversion using encoded sources, Geophysics, 74 (6), WCC177-WCC188.) +USE_SOURCE_ENCODING = .false. + +# +# total energy calculation +# +# to plot total energy curves, for instance to monitor how CPML absorbing layers behave; +# should be turned OFF in most cases because expensive +OUTPUT_ENERGY = .false. +# every how many time steps we compute energy (which is expensive to compute) +NTSTEP_BETWEEN_OUTPUT_ENERGY = 10 + +# +# adjoint kernel outputs +# +# this parameter must be set to .true. to compute anisotropic kernels +# in crust and mantle (related to the 21 Cij in geographical coordinates) +# default is .false. to compute isotropic kernels (related to alpha and beta) +ANISOTROPIC_KL = .false. + +# compute transverse isotropic kernels (alpha_v,alpha_h,beta_v,beta_h,eta,rho) +# rather than fully anisotropic kernels in case ANISOTROPIC_KL is set to .true. +SAVE_TRANSVERSE_KL = .false. + +# outputs approximate Hessian for preconditioning +APPROXIMATE_HESS_KL = .false. + +# save Moho mesh and compute Moho boundary kernels +SAVE_MOHO_MESH = .false. + # print source time function PRINT_SOURCE_TIME_FUNCTION = .false. diff --git a/EXAMPLES/meshfem3D_examples/sep_bathymetry/DATA/Par_file b/EXAMPLES/meshfem3D_examples/sep_bathymetry/DATA/Par_file index 38fe4f10f..c8c9f19f1 100644 --- a/EXAMPLES/meshfem3D_examples/sep_bathymetry/DATA/Par_file +++ b/EXAMPLES/meshfem3D_examples/sep_bathymetry/DATA/Par_file @@ -119,10 +119,12 @@ USE_FORCE_POINT_SOURCE = .true. # to represent a (tilted) FORCESOLUTION force point source or a CMTSOLUTION moment-tensor source. USE_RICKER_TIME_FUNCTION = .true. -# decide if we save displacement, velocity and/or acceleration in forward runs (they can be set to true simultaneously) +# decide if we save displacement, velocity, acceleration and/or pressure in forward runs (they can be set to true simultaneously) +# currently pressure seismograms are implemented in acoustic (i.e. fluid) elements only SAVE_SEISMOGRAMS_DISPLACEMENT = .true. SAVE_SEISMOGRAMS_VELOCITY = .true. SAVE_SEISMOGRAMS_ACCELERATION = .true. +SAVE_SEISMOGRAMS_PRESSURE = .false. # currently implemented in acoustic (i.e. fluid) elements only # save seismograms in binary or ASCII format (binary is smaller but may not be portable between machines) USE_BINARY_FOR_SEISMOGRAMS = .false. @@ -137,6 +139,49 @@ WRITE_SEISMOGRAMS_BY_MASTER = .false. # to avoid overloading shared non-local file systems such as LUSTRE or GPFS for instance SAVE_ALL_SEISMOS_IN_ONE_FILE = .false. +# use a trick to increase accuracy of pressure seismograms in fluid (acoustic) elements: +# use the second derivative of the source for the source time function instead of the source itself, +# and then record -potential_acoustic() as pressure seismograms instead of -potential_dot_dot_acoustic(); +# this is mathematically equivalent, but numerically significantly more accurate because in the explicit +# Newmark time scheme acceleration is accurate at zeroth order while displacement is accurate at second order, +# thus in fluid elements potential_dot_dot_acoustic() is accurate at zeroth order while potential_acoustic() +# is accurate at second order and thus contains significantly less numerical noise. +USE_TRICK_FOR_BETTER_PRESSURE = .false. + +# +# source encoding +# +# determines source encoding factor +/-1 depending on sign of moment tensor +# (see e.g. Krebs et al., 2009. Fast full-wavefield seismic inversion using encoded sources, Geophysics, 74 (6), WCC177-WCC188.) +USE_SOURCE_ENCODING = .false. + +# +# total energy calculation +# +# to plot total energy curves, for instance to monitor how CPML absorbing layers behave; +# should be turned OFF in most cases because expensive +OUTPUT_ENERGY = .false. +# every how many time steps we compute energy (which is expensive to compute) +NTSTEP_BETWEEN_OUTPUT_ENERGY = 10 + +# +# adjoint kernel outputs +# +# this parameter must be set to .true. to compute anisotropic kernels +# in crust and mantle (related to the 21 Cij in geographical coordinates) +# default is .false. to compute isotropic kernels (related to alpha and beta) +ANISOTROPIC_KL = .false. + +# compute transverse isotropic kernels (alpha_v,alpha_h,beta_v,beta_h,eta,rho) +# rather than fully anisotropic kernels in case ANISOTROPIC_KL is set to .true. +SAVE_TRANSVERSE_KL = .false. + +# outputs approximate Hessian for preconditioning +APPROXIMATE_HESS_KL = .false. + +# save Moho mesh and compute Moho boundary kernels +SAVE_MOHO_MESH = .false. + # print source time function PRINT_SOURCE_TIME_FUNCTION = .false. diff --git a/EXAMPLES/meshfem3D_examples/simple_model/DATA/Par_file b/EXAMPLES/meshfem3D_examples/simple_model/DATA/Par_file index 26474ebe4..52985fd18 100644 --- a/EXAMPLES/meshfem3D_examples/simple_model/DATA/Par_file +++ b/EXAMPLES/meshfem3D_examples/simple_model/DATA/Par_file @@ -119,10 +119,12 @@ USE_FORCE_POINT_SOURCE = .false. # to represent a (tilted) FORCESOLUTION force point source or a CMTSOLUTION moment-tensor source. USE_RICKER_TIME_FUNCTION = .false. -# decide if we save displacement, velocity and/or acceleration in forward runs (they can be set to true simultaneously) +# decide if we save displacement, velocity, acceleration and/or pressure in forward runs (they can be set to true simultaneously) +# currently pressure seismograms are implemented in acoustic (i.e. fluid) elements only SAVE_SEISMOGRAMS_DISPLACEMENT = .true. SAVE_SEISMOGRAMS_VELOCITY = .true. SAVE_SEISMOGRAMS_ACCELERATION = .true. +SAVE_SEISMOGRAMS_PRESSURE = .false. # currently implemented in acoustic (i.e. fluid) elements only # save seismograms in binary or ASCII format (binary is smaller but may not be portable between machines) USE_BINARY_FOR_SEISMOGRAMS = .false. @@ -137,6 +139,49 @@ WRITE_SEISMOGRAMS_BY_MASTER = .false. # to avoid overloading shared non-local file systems such as LUSTRE or GPFS for instance SAVE_ALL_SEISMOS_IN_ONE_FILE = .false. +# use a trick to increase accuracy of pressure seismograms in fluid (acoustic) elements: +# use the second derivative of the source for the source time function instead of the source itself, +# and then record -potential_acoustic() as pressure seismograms instead of -potential_dot_dot_acoustic(); +# this is mathematically equivalent, but numerically significantly more accurate because in the explicit +# Newmark time scheme acceleration is accurate at zeroth order while displacement is accurate at second order, +# thus in fluid elements potential_dot_dot_acoustic() is accurate at zeroth order while potential_acoustic() +# is accurate at second order and thus contains significantly less numerical noise. +USE_TRICK_FOR_BETTER_PRESSURE = .false. + +# +# source encoding +# +# determines source encoding factor +/-1 depending on sign of moment tensor +# (see e.g. Krebs et al., 2009. Fast full-wavefield seismic inversion using encoded sources, Geophysics, 74 (6), WCC177-WCC188.) +USE_SOURCE_ENCODING = .false. + +# +# total energy calculation +# +# to plot total energy curves, for instance to monitor how CPML absorbing layers behave; +# should be turned OFF in most cases because expensive +OUTPUT_ENERGY = .false. +# every how many time steps we compute energy (which is expensive to compute) +NTSTEP_BETWEEN_OUTPUT_ENERGY = 10 + +# +# adjoint kernel outputs +# +# this parameter must be set to .true. to compute anisotropic kernels +# in crust and mantle (related to the 21 Cij in geographical coordinates) +# default is .false. to compute isotropic kernels (related to alpha and beta) +ANISOTROPIC_KL = .false. + +# compute transverse isotropic kernels (alpha_v,alpha_h,beta_v,beta_h,eta,rho) +# rather than fully anisotropic kernels in case ANISOTROPIC_KL is set to .true. +SAVE_TRANSVERSE_KL = .false. + +# outputs approximate Hessian for preconditioning +APPROXIMATE_HESS_KL = .false. + +# save Moho mesh and compute Moho boundary kernels +SAVE_MOHO_MESH = .false. + # print source time function PRINT_SOURCE_TIME_FUNCTION = .false. diff --git a/EXAMPLES/meshfem3D_examples/socal1D/DATA/Par_file b/EXAMPLES/meshfem3D_examples/socal1D/DATA/Par_file index 59eee8e64..18a334a0a 100644 --- a/EXAMPLES/meshfem3D_examples/socal1D/DATA/Par_file +++ b/EXAMPLES/meshfem3D_examples/socal1D/DATA/Par_file @@ -119,10 +119,12 @@ USE_FORCE_POINT_SOURCE = .false. # to represent a (tilted) FORCESOLUTION force point source or a CMTSOLUTION moment-tensor source. USE_RICKER_TIME_FUNCTION = .false. -# decide if we save displacement, velocity and/or acceleration in forward runs (they can be set to true simultaneously) +# decide if we save displacement, velocity, acceleration and/or pressure in forward runs (they can be set to true simultaneously) +# currently pressure seismograms are implemented in acoustic (i.e. fluid) elements only SAVE_SEISMOGRAMS_DISPLACEMENT = .true. SAVE_SEISMOGRAMS_VELOCITY = .true. SAVE_SEISMOGRAMS_ACCELERATION = .true. +SAVE_SEISMOGRAMS_PRESSURE = .false. # currently implemented in acoustic (i.e. fluid) elements only # save seismograms in binary or ASCII format (binary is smaller but may not be portable between machines) USE_BINARY_FOR_SEISMOGRAMS = .false. @@ -137,6 +139,49 @@ WRITE_SEISMOGRAMS_BY_MASTER = .false. # to avoid overloading shared non-local file systems such as LUSTRE or GPFS for instance SAVE_ALL_SEISMOS_IN_ONE_FILE = .false. +# use a trick to increase accuracy of pressure seismograms in fluid (acoustic) elements: +# use the second derivative of the source for the source time function instead of the source itself, +# and then record -potential_acoustic() as pressure seismograms instead of -potential_dot_dot_acoustic(); +# this is mathematically equivalent, but numerically significantly more accurate because in the explicit +# Newmark time scheme acceleration is accurate at zeroth order while displacement is accurate at second order, +# thus in fluid elements potential_dot_dot_acoustic() is accurate at zeroth order while potential_acoustic() +# is accurate at second order and thus contains significantly less numerical noise. +USE_TRICK_FOR_BETTER_PRESSURE = .false. + +# +# source encoding +# +# determines source encoding factor +/-1 depending on sign of moment tensor +# (see e.g. Krebs et al., 2009. Fast full-wavefield seismic inversion using encoded sources, Geophysics, 74 (6), WCC177-WCC188.) +USE_SOURCE_ENCODING = .false. + +# +# total energy calculation +# +# to plot total energy curves, for instance to monitor how CPML absorbing layers behave; +# should be turned OFF in most cases because expensive +OUTPUT_ENERGY = .false. +# every how many time steps we compute energy (which is expensive to compute) +NTSTEP_BETWEEN_OUTPUT_ENERGY = 10 + +# +# adjoint kernel outputs +# +# this parameter must be set to .true. to compute anisotropic kernels +# in crust and mantle (related to the 21 Cij in geographical coordinates) +# default is .false. to compute isotropic kernels (related to alpha and beta) +ANISOTROPIC_KL = .false. + +# compute transverse isotropic kernels (alpha_v,alpha_h,beta_v,beta_h,eta,rho) +# rather than fully anisotropic kernels in case ANISOTROPIC_KL is set to .true. +SAVE_TRANSVERSE_KL = .false. + +# outputs approximate Hessian for preconditioning +APPROXIMATE_HESS_KL = .false. + +# save Moho mesh and compute Moho boundary kernels +SAVE_MOHO_MESH = .false. + # print source time function PRINT_SOURCE_TIME_FUNCTION = .false. diff --git a/EXAMPLES/meshfem3D_examples/socal1D/example_utm/Par_file_utm b/EXAMPLES/meshfem3D_examples/socal1D/example_utm/Par_file_utm index 9f9def647..64a9aaa8e 100644 --- a/EXAMPLES/meshfem3D_examples/socal1D/example_utm/Par_file_utm +++ b/EXAMPLES/meshfem3D_examples/socal1D/example_utm/Par_file_utm @@ -119,10 +119,12 @@ USE_FORCE_POINT_SOURCE = .false. # to represent a (tilted) FORCESOLUTION force point source or a CMTSOLUTION moment-tensor source. USE_RICKER_TIME_FUNCTION = .false. -# decide if we save displacement, velocity and/or acceleration in forward runs (they can be set to true simultaneously) +# decide if we save displacement, velocity, acceleration and/or pressure in forward runs (they can be set to true simultaneously) +# currently pressure seismograms are implemented in acoustic (i.e. fluid) elements only SAVE_SEISMOGRAMS_DISPLACEMENT = .true. SAVE_SEISMOGRAMS_VELOCITY = .true. SAVE_SEISMOGRAMS_ACCELERATION = .true. +SAVE_SEISMOGRAMS_PRESSURE = .false. # currently implemented in acoustic (i.e. fluid) elements only # save seismograms in binary or ASCII format (binary is smaller but may not be portable between machines) USE_BINARY_FOR_SEISMOGRAMS = .false. @@ -137,6 +139,49 @@ WRITE_SEISMOGRAMS_BY_MASTER = .false. # to avoid overloading shared non-local file systems such as LUSTRE or GPFS for instance SAVE_ALL_SEISMOS_IN_ONE_FILE = .false. +# use a trick to increase accuracy of pressure seismograms in fluid (acoustic) elements: +# use the second derivative of the source for the source time function instead of the source itself, +# and then record -potential_acoustic() as pressure seismograms instead of -potential_dot_dot_acoustic(); +# this is mathematically equivalent, but numerically significantly more accurate because in the explicit +# Newmark time scheme acceleration is accurate at zeroth order while displacement is accurate at second order, +# thus in fluid elements potential_dot_dot_acoustic() is accurate at zeroth order while potential_acoustic() +# is accurate at second order and thus contains significantly less numerical noise. +USE_TRICK_FOR_BETTER_PRESSURE = .false. + +# +# source encoding +# +# determines source encoding factor +/-1 depending on sign of moment tensor +# (see e.g. Krebs et al., 2009. Fast full-wavefield seismic inversion using encoded sources, Geophysics, 74 (6), WCC177-WCC188.) +USE_SOURCE_ENCODING = .false. + +# +# total energy calculation +# +# to plot total energy curves, for instance to monitor how CPML absorbing layers behave; +# should be turned OFF in most cases because expensive +OUTPUT_ENERGY = .false. +# every how many time steps we compute energy (which is expensive to compute) +NTSTEP_BETWEEN_OUTPUT_ENERGY = 10 + +# +# adjoint kernel outputs +# +# this parameter must be set to .true. to compute anisotropic kernels +# in crust and mantle (related to the 21 Cij in geographical coordinates) +# default is .false. to compute isotropic kernels (related to alpha and beta) +ANISOTROPIC_KL = .false. + +# compute transverse isotropic kernels (alpha_v,alpha_h,beta_v,beta_h,eta,rho) +# rather than fully anisotropic kernels in case ANISOTROPIC_KL is set to .true. +SAVE_TRANSVERSE_KL = .false. + +# outputs approximate Hessian for preconditioning +APPROXIMATE_HESS_KL = .false. + +# save Moho mesh and compute Moho boundary kernels +SAVE_MOHO_MESH = .false. + # print source time function PRINT_SOURCE_TIME_FUNCTION = .false. diff --git a/EXAMPLES/noise_tomography/DATA/Par_file_step1 b/EXAMPLES/noise_tomography/DATA/Par_file_step1 index 532d3586c..3260233e7 100644 --- a/EXAMPLES/noise_tomography/DATA/Par_file_step1 +++ b/EXAMPLES/noise_tomography/DATA/Par_file_step1 @@ -119,10 +119,12 @@ USE_FORCE_POINT_SOURCE = .false. # to represent a (tilted) FORCESOLUTION force point source or a CMTSOLUTION moment-tensor source. USE_RICKER_TIME_FUNCTION = .false. -# decide if we save displacement, velocity and/or acceleration in forward runs (they can be set to true simultaneously) +# decide if we save displacement, velocity, acceleration and/or pressure in forward runs (they can be set to true simultaneously) +# currently pressure seismograms are implemented in acoustic (i.e. fluid) elements only SAVE_SEISMOGRAMS_DISPLACEMENT = .true. SAVE_SEISMOGRAMS_VELOCITY = .true. SAVE_SEISMOGRAMS_ACCELERATION = .true. +SAVE_SEISMOGRAMS_PRESSURE = .false. # currently implemented in acoustic (i.e. fluid) elements only # save seismograms in binary or ASCII format (binary is smaller but may not be portable between machines) USE_BINARY_FOR_SEISMOGRAMS = .false. @@ -137,6 +139,49 @@ WRITE_SEISMOGRAMS_BY_MASTER = .false. # to avoid overloading shared non-local file systems such as LUSTRE or GPFS for instance SAVE_ALL_SEISMOS_IN_ONE_FILE = .false. +# use a trick to increase accuracy of pressure seismograms in fluid (acoustic) elements: +# use the second derivative of the source for the source time function instead of the source itself, +# and then record -potential_acoustic() as pressure seismograms instead of -potential_dot_dot_acoustic(); +# this is mathematically equivalent, but numerically significantly more accurate because in the explicit +# Newmark time scheme acceleration is accurate at zeroth order while displacement is accurate at second order, +# thus in fluid elements potential_dot_dot_acoustic() is accurate at zeroth order while potential_acoustic() +# is accurate at second order and thus contains significantly less numerical noise. +USE_TRICK_FOR_BETTER_PRESSURE = .false. + +# +# source encoding +# +# determines source encoding factor +/-1 depending on sign of moment tensor +# (see e.g. Krebs et al., 2009. Fast full-wavefield seismic inversion using encoded sources, Geophysics, 74 (6), WCC177-WCC188.) +USE_SOURCE_ENCODING = .false. + +# +# total energy calculation +# +# to plot total energy curves, for instance to monitor how CPML absorbing layers behave; +# should be turned OFF in most cases because expensive +OUTPUT_ENERGY = .false. +# every how many time steps we compute energy (which is expensive to compute) +NTSTEP_BETWEEN_OUTPUT_ENERGY = 10 + +# +# adjoint kernel outputs +# +# this parameter must be set to .true. to compute anisotropic kernels +# in crust and mantle (related to the 21 Cij in geographical coordinates) +# default is .false. to compute isotropic kernels (related to alpha and beta) +ANISOTROPIC_KL = .false. + +# compute transverse isotropic kernels (alpha_v,alpha_h,beta_v,beta_h,eta,rho) +# rather than fully anisotropic kernels in case ANISOTROPIC_KL is set to .true. +SAVE_TRANSVERSE_KL = .false. + +# outputs approximate Hessian for preconditioning +APPROXIMATE_HESS_KL = .false. + +# save Moho mesh and compute Moho boundary kernels +SAVE_MOHO_MESH = .false. + # print source time function PRINT_SOURCE_TIME_FUNCTION = .false. diff --git a/EXAMPLES/noise_tomography/DATA/Par_file_step2 b/EXAMPLES/noise_tomography/DATA/Par_file_step2 index 163433e62..300de8e25 100644 --- a/EXAMPLES/noise_tomography/DATA/Par_file_step2 +++ b/EXAMPLES/noise_tomography/DATA/Par_file_step2 @@ -119,10 +119,12 @@ USE_FORCE_POINT_SOURCE = .false. # to represent a (tilted) FORCESOLUTION force point source or a CMTSOLUTION moment-tensor source. USE_RICKER_TIME_FUNCTION = .false. -# decide if we save displacement, velocity and/or acceleration in forward runs (they can be set to true simultaneously) +# decide if we save displacement, velocity, acceleration and/or pressure in forward runs (they can be set to true simultaneously) +# currently pressure seismograms are implemented in acoustic (i.e. fluid) elements only SAVE_SEISMOGRAMS_DISPLACEMENT = .true. SAVE_SEISMOGRAMS_VELOCITY = .true. SAVE_SEISMOGRAMS_ACCELERATION = .true. +SAVE_SEISMOGRAMS_PRESSURE = .false. # currently implemented in acoustic (i.e. fluid) elements only # save seismograms in binary or ASCII format (binary is smaller but may not be portable between machines) USE_BINARY_FOR_SEISMOGRAMS = .false. @@ -137,6 +139,49 @@ WRITE_SEISMOGRAMS_BY_MASTER = .false. # to avoid overloading shared non-local file systems such as LUSTRE or GPFS for instance SAVE_ALL_SEISMOS_IN_ONE_FILE = .false. +# use a trick to increase accuracy of pressure seismograms in fluid (acoustic) elements: +# use the second derivative of the source for the source time function instead of the source itself, +# and then record -potential_acoustic() as pressure seismograms instead of -potential_dot_dot_acoustic(); +# this is mathematically equivalent, but numerically significantly more accurate because in the explicit +# Newmark time scheme acceleration is accurate at zeroth order while displacement is accurate at second order, +# thus in fluid elements potential_dot_dot_acoustic() is accurate at zeroth order while potential_acoustic() +# is accurate at second order and thus contains significantly less numerical noise. +USE_TRICK_FOR_BETTER_PRESSURE = .false. + +# +# source encoding +# +# determines source encoding factor +/-1 depending on sign of moment tensor +# (see e.g. Krebs et al., 2009. Fast full-wavefield seismic inversion using encoded sources, Geophysics, 74 (6), WCC177-WCC188.) +USE_SOURCE_ENCODING = .false. + +# +# total energy calculation +# +# to plot total energy curves, for instance to monitor how CPML absorbing layers behave; +# should be turned OFF in most cases because expensive +OUTPUT_ENERGY = .false. +# every how many time steps we compute energy (which is expensive to compute) +NTSTEP_BETWEEN_OUTPUT_ENERGY = 10 + +# +# adjoint kernel outputs +# +# this parameter must be set to .true. to compute anisotropic kernels +# in crust and mantle (related to the 21 Cij in geographical coordinates) +# default is .false. to compute isotropic kernels (related to alpha and beta) +ANISOTROPIC_KL = .false. + +# compute transverse isotropic kernels (alpha_v,alpha_h,beta_v,beta_h,eta,rho) +# rather than fully anisotropic kernels in case ANISOTROPIC_KL is set to .true. +SAVE_TRANSVERSE_KL = .false. + +# outputs approximate Hessian for preconditioning +APPROXIMATE_HESS_KL = .false. + +# save Moho mesh and compute Moho boundary kernels +SAVE_MOHO_MESH = .false. + # print source time function PRINT_SOURCE_TIME_FUNCTION = .false. diff --git a/EXAMPLES/noise_tomography/DATA/Par_file_step3 b/EXAMPLES/noise_tomography/DATA/Par_file_step3 index 83d2d93f2..480e80a43 100644 --- a/EXAMPLES/noise_tomography/DATA/Par_file_step3 +++ b/EXAMPLES/noise_tomography/DATA/Par_file_step3 @@ -119,10 +119,12 @@ USE_FORCE_POINT_SOURCE = .false. # to represent a (tilted) FORCESOLUTION force point source or a CMTSOLUTION moment-tensor source. USE_RICKER_TIME_FUNCTION = .false. -# decide if we save displacement, velocity and/or acceleration in forward runs (they can be set to true simultaneously) +# decide if we save displacement, velocity, acceleration and/or pressure in forward runs (they can be set to true simultaneously) +# currently pressure seismograms are implemented in acoustic (i.e. fluid) elements only SAVE_SEISMOGRAMS_DISPLACEMENT = .true. SAVE_SEISMOGRAMS_VELOCITY = .true. SAVE_SEISMOGRAMS_ACCELERATION = .true. +SAVE_SEISMOGRAMS_PRESSURE = .false. # currently implemented in acoustic (i.e. fluid) elements only # save seismograms in binary or ASCII format (binary is smaller but may not be portable between machines) USE_BINARY_FOR_SEISMOGRAMS = .false. @@ -137,6 +139,49 @@ WRITE_SEISMOGRAMS_BY_MASTER = .false. # to avoid overloading shared non-local file systems such as LUSTRE or GPFS for instance SAVE_ALL_SEISMOS_IN_ONE_FILE = .false. +# use a trick to increase accuracy of pressure seismograms in fluid (acoustic) elements: +# use the second derivative of the source for the source time function instead of the source itself, +# and then record -potential_acoustic() as pressure seismograms instead of -potential_dot_dot_acoustic(); +# this is mathematically equivalent, but numerically significantly more accurate because in the explicit +# Newmark time scheme acceleration is accurate at zeroth order while displacement is accurate at second order, +# thus in fluid elements potential_dot_dot_acoustic() is accurate at zeroth order while potential_acoustic() +# is accurate at second order and thus contains significantly less numerical noise. +USE_TRICK_FOR_BETTER_PRESSURE = .false. + +# +# source encoding +# +# determines source encoding factor +/-1 depending on sign of moment tensor +# (see e.g. Krebs et al., 2009. Fast full-wavefield seismic inversion using encoded sources, Geophysics, 74 (6), WCC177-WCC188.) +USE_SOURCE_ENCODING = .false. + +# +# total energy calculation +# +# to plot total energy curves, for instance to monitor how CPML absorbing layers behave; +# should be turned OFF in most cases because expensive +OUTPUT_ENERGY = .false. +# every how many time steps we compute energy (which is expensive to compute) +NTSTEP_BETWEEN_OUTPUT_ENERGY = 10 + +# +# adjoint kernel outputs +# +# this parameter must be set to .true. to compute anisotropic kernels +# in crust and mantle (related to the 21 Cij in geographical coordinates) +# default is .false. to compute isotropic kernels (related to alpha and beta) +ANISOTROPIC_KL = .false. + +# compute transverse isotropic kernels (alpha_v,alpha_h,beta_v,beta_h,eta,rho) +# rather than fully anisotropic kernels in case ANISOTROPIC_KL is set to .true. +SAVE_TRANSVERSE_KL = .false. + +# outputs approximate Hessian for preconditioning +APPROXIMATE_HESS_KL = .false. + +# save Moho mesh and compute Moho boundary kernels +SAVE_MOHO_MESH = .false. + # print source time function PRINT_SOURCE_TIME_FUNCTION = .false. diff --git a/EXAMPLES/process_DATA_Par_files_to_update_their_format_when_new_parameters_are_added.bash b/EXAMPLES/process_DATA_Par_files_to_update_their_format_when_new_parameters_are_added.bash new file mode 100755 index 000000000..0ee43aaea --- /dev/null +++ b/EXAMPLES/process_DATA_Par_files_to_update_their_format_when_new_parameters_are_added.bash @@ -0,0 +1,57 @@ +#!/bin/bash + +## Dimitri Komatitsch, CNRS, Marseille, France, February 2015: +## add new parameters (i.e. a default value for each of them) +## to the end of an existing Par_file in order to update it to the new format. + +cat << EOF >> Par_file + +SAVE_SEISMOGRAMS_PRESSURE = .false. # currently implemented in acoustic (i.e. fluid) elements only + +# use a trick to increase accuracy of pressure seismograms in fluid (acoustic) elements: +# use the second derivative of the source for the source time function instead of the source itself, +# and then record -potential_acoustic() as pressure seismograms instead of -potential_dot_dot_acoustic(); +# this is mathematically equivalent, but numerically significantly more accurate because in the explicit +# Newmark time scheme acceleration is accurate at zeroth order while displacement is accurate at second order, +# thus in fluid elements potential_dot_dot_acoustic() is accurate at zeroth order while potential_acoustic() +# is accurate at second order and thus contains significantly less numerical noise. +USE_TRICK_FOR_BETTER_PRESSURE = .false. + +# +# source encoding +# +# determines source encoding factor +/-1 depending on sign of moment tensor +# (see e.g. Krebs et al., 2009. Fast full-wavefield seismic inversion using encoded sources, Geophysics, 74 (6), WCC177-WCC188.) +USE_SOURCE_ENCODING = .false. + +# +# total energy calculation +# +# to plot total energy curves, for instance to monitor how CPML absorbing layers behave; +# should be turned OFF in most cases because expensive +OUTPUT_ENERGY = .false. +# every how many time steps we compute energy (which is expensive to compute) +NTSTEP_BETWEEN_OUTPUT_ENERGY = 10 + +# +# adjoint kernel outputs +# +# this parameter must be set to .true. to compute anisotropic kernels +# in crust and mantle (related to the 21 Cij in geographical coordinates) +# default is .false. to compute isotropic kernels (related to alpha and beta) +ANISOTROPIC_KL = .false. + +# compute transverse isotropic kernels (alpha_v,alpha_h,beta_v,beta_h,eta,rho) +# rather than fully anisotropic kernels in case ANISOTROPIC_KL is set to .true. +SAVE_TRANSVERSE_KL = .false. + +# outputs approximate Hessian for preconditioning +APPROXIMATE_HESS_KL = .false. + +# save Moho mesh and compute Moho boundary kernels +SAVE_MOHO_MESH = .false. + +EOF + +echo "Your existing Par_file has been updated to the new format by adding default values for the missing parameters at the end of your file" + diff --git a/EXAMPLES/tomographic_model/DATA/Par_file b/EXAMPLES/tomographic_model/DATA/Par_file index aae50bd67..024c4524b 100644 --- a/EXAMPLES/tomographic_model/DATA/Par_file +++ b/EXAMPLES/tomographic_model/DATA/Par_file @@ -119,10 +119,12 @@ USE_FORCE_POINT_SOURCE = .false. # to represent a (tilted) FORCESOLUTION force point source or a CMTSOLUTION moment-tensor source. USE_RICKER_TIME_FUNCTION = .false. -# decide if we save displacement, velocity and/or acceleration in forward runs (they can be set to true simultaneously) +# decide if we save displacement, velocity, acceleration and/or pressure in forward runs (they can be set to true simultaneously) +# currently pressure seismograms are implemented in acoustic (i.e. fluid) elements only SAVE_SEISMOGRAMS_DISPLACEMENT = .true. SAVE_SEISMOGRAMS_VELOCITY = .true. SAVE_SEISMOGRAMS_ACCELERATION = .true. +SAVE_SEISMOGRAMS_PRESSURE = .false. # currently implemented in acoustic (i.e. fluid) elements only # save seismograms in binary or ASCII format (binary is smaller but may not be portable between machines) USE_BINARY_FOR_SEISMOGRAMS = .false. @@ -137,6 +139,49 @@ WRITE_SEISMOGRAMS_BY_MASTER = .false. # to avoid overloading shared non-local file systems such as LUSTRE or GPFS for instance SAVE_ALL_SEISMOS_IN_ONE_FILE = .false. +# use a trick to increase accuracy of pressure seismograms in fluid (acoustic) elements: +# use the second derivative of the source for the source time function instead of the source itself, +# and then record -potential_acoustic() as pressure seismograms instead of -potential_dot_dot_acoustic(); +# this is mathematically equivalent, but numerically significantly more accurate because in the explicit +# Newmark time scheme acceleration is accurate at zeroth order while displacement is accurate at second order, +# thus in fluid elements potential_dot_dot_acoustic() is accurate at zeroth order while potential_acoustic() +# is accurate at second order and thus contains significantly less numerical noise. +USE_TRICK_FOR_BETTER_PRESSURE = .false. + +# +# source encoding +# +# determines source encoding factor +/-1 depending on sign of moment tensor +# (see e.g. Krebs et al., 2009. Fast full-wavefield seismic inversion using encoded sources, Geophysics, 74 (6), WCC177-WCC188.) +USE_SOURCE_ENCODING = .false. + +# +# total energy calculation +# +# to plot total energy curves, for instance to monitor how CPML absorbing layers behave; +# should be turned OFF in most cases because expensive +OUTPUT_ENERGY = .false. +# every how many time steps we compute energy (which is expensive to compute) +NTSTEP_BETWEEN_OUTPUT_ENERGY = 10 + +# +# adjoint kernel outputs +# +# this parameter must be set to .true. to compute anisotropic kernels +# in crust and mantle (related to the 21 Cij in geographical coordinates) +# default is .false. to compute isotropic kernels (related to alpha and beta) +ANISOTROPIC_KL = .false. + +# compute transverse isotropic kernels (alpha_v,alpha_h,beta_v,beta_h,eta,rho) +# rather than fully anisotropic kernels in case ANISOTROPIC_KL is set to .true. +SAVE_TRANSVERSE_KL = .false. + +# outputs approximate Hessian for preconditioning +APPROXIMATE_HESS_KL = .false. + +# save Moho mesh and compute Moho boundary kernels +SAVE_MOHO_MESH = .false. + # print source time function PRINT_SOURCE_TIME_FUNCTION = .false. diff --git a/EXAMPLES/tomographic_model/create_tomography_model_file.sh b/EXAMPLES/tomographic_model/create_tomography_model_file.sh index 45ebd3477..3bf603163 100755 --- a/EXAMPLES/tomographic_model/create_tomography_model_file.sh +++ b/EXAMPLES/tomographic_model/create_tomography_model_file.sh @@ -1,21 +1,21 @@ #!/bin/sh -# creates a simple, formatted tomography model with a constant velocity gradient +# creates a simple, formatted tomography model with a constant velocity gradient # for a block model with dimensions 134000 x 134000 x 60000 # origin points ORIG_X=0. -ORIG_Y=0. -ORIG_Z=0. +ORIG_Y=0. +ORIG_Z=0. # end points -END_X=134000. -END_Y=134000. +END_X=134000. +END_Y=134000. END_Z=-60000. # depth in negative z-direction # spacing of given tomography points -SPACING_X=2000. -SPACING_Y=2000. +SPACING_X=2000. +SPACING_Y=2000. SPACING_Z=-2000. # number of cell increments @@ -24,11 +24,11 @@ NY=68 NZ=31 # min/max values -VP_MIN=2500. -VP_MAX=8500. +VP_MIN=2500. +VP_MAX=8500. VS_MIN=1500. -VS_MAX=7500. -RHO_MIN=1500. +VS_MAX=7500. +RHO_MIN=1500. RHO_MAX=1500. diff --git a/EXAMPLES/view_all_run_this_example_scripts_to_modify_them.csh b/EXAMPLES/view_all_run_this_example_scripts_to_modify_them.csh index 26ebb77b2..b32c290c5 100755 --- a/EXAMPLES/view_all_run_this_example_scripts_to_modify_them.csh +++ b/EXAMPLES/view_all_run_this_example_scripts_to_modify_them.csh @@ -2,5 +2,5 @@ # this list of files is obtained using: find . -iname run_this_example.sh -exec ls -1 {} \; -vi ./homogeneous_halfspace_HEX8_elastic_absorbing_Stacey_5sides/run_this_example.sh ./meshfem3D_examples/simple_model/run_this_example.sh ./meshfem3D_examples/many_interfaces/run_this_example.sh ./meshfem3D_examples/sep_bathymetry/run_this_example.sh ./meshfem3D_examples/socal1D/run_this_example.sh ./layered_halfspace/run_this_example.sh ./tomographic_model/run_this_example.sh ./waterlayered_halfspace/run_this_example.sh ./homogeneous_halfspace_HEX8_elastic_no_absorbing/run_this_example.sh ./Mount_StHelens/run_this_example.sh ./CPML_examples/homogeneous_halfspace_HEX8_acoustic_elastic_absorbing_CPML_5sides/run_this_example.sh ./CPML_examples/homogeneous_halfspace_HEX8_acoustic_absorbing_CPML_5sides/run_this_example.sh ./CPML_examples/homogeneous_halfspace_HEX8_acoustic_elastic_absorbing_CPML_6sides/run_this_example.sh ./CPML_examples/homogeneous_halfspace_HEX8_elastic_absorbing_CPML_5sides/run_this_example.sh ./CPML_examples/homogeneous_halfspace_HEX8_acoustic_absorbing_CPML_6sides/run_this_example.sh ./CPML_examples/homogeneous_halfspace_HEX8_elastic_absorbing_CPML_6sides/run_this_example.sh +vi ./homogeneous_halfspace_HEX8_elastic_absorbing_Stacey_5sides/run_this_example.sh ./meshfem3D_examples/simple_model/run_this_example.sh ./meshfem3D_examples/many_interfaces/run_this_example.sh ./meshfem3D_examples/sep_bathymetry/run_this_example.sh ./meshfem3D_examples/socal1D/run_this_example.sh ./layered_halfspace/run_this_example.sh ./tomographic_model/run_this_example.sh ./waterlayered_halfspace/run_this_example.sh ./homogeneous_halfspace_HEX8_elastic_no_absorbing/run_this_example.sh ./Mount_StHelens/run_this_example.sh ./CPML_examples/homogeneous_halfspace_HEX8_acoustic_elastic_absorbing_CPML_5sides/run_this_example.sh ./CPML_examples/homogeneous_halfspace_HEX8_acoustic_absorbing_CPML_5sides/run_this_example.sh ./CPML_examples/homogeneous_halfspace_HEX8_acoustic_elastic_absorbing_CPML_6sides/run_this_example.sh ./CPML_examples/homogeneous_halfspace_HEX8_elastic_absorbing_CPML_5sides/run_this_example.sh ./CPML_examples/homogeneous_halfspace_HEX8_acoustic_absorbing_CPML_6sides/run_this_example.sh ./CPML_examples/homogeneous_halfspace_HEX8_elastic_absorbing_CPML_6sides/run_this_example.sh diff --git a/EXAMPLES/waterlayered_halfspace/DATA/Par_file b/EXAMPLES/waterlayered_halfspace/DATA/Par_file index bcf5bc3e1..19731b59e 100644 --- a/EXAMPLES/waterlayered_halfspace/DATA/Par_file +++ b/EXAMPLES/waterlayered_halfspace/DATA/Par_file @@ -119,10 +119,12 @@ USE_FORCE_POINT_SOURCE = .false. # to represent a (tilted) FORCESOLUTION force point source or a CMTSOLUTION moment-tensor source. USE_RICKER_TIME_FUNCTION = .false. -# decide if we save displacement, velocity and/or acceleration in forward runs (they can be set to true simultaneously) +# decide if we save displacement, velocity, acceleration and/or pressure in forward runs (they can be set to true simultaneously) +# currently pressure seismograms are implemented in acoustic (i.e. fluid) elements only SAVE_SEISMOGRAMS_DISPLACEMENT = .true. SAVE_SEISMOGRAMS_VELOCITY = .true. SAVE_SEISMOGRAMS_ACCELERATION = .true. +SAVE_SEISMOGRAMS_PRESSURE = .false. # currently implemented in acoustic (i.e. fluid) elements only # save seismograms in binary or ASCII format (binary is smaller but may not be portable between machines) USE_BINARY_FOR_SEISMOGRAMS = .false. @@ -137,6 +139,49 @@ WRITE_SEISMOGRAMS_BY_MASTER = .false. # to avoid overloading shared non-local file systems such as LUSTRE or GPFS for instance SAVE_ALL_SEISMOS_IN_ONE_FILE = .false. +# use a trick to increase accuracy of pressure seismograms in fluid (acoustic) elements: +# use the second derivative of the source for the source time function instead of the source itself, +# and then record -potential_acoustic() as pressure seismograms instead of -potential_dot_dot_acoustic(); +# this is mathematically equivalent, but numerically significantly more accurate because in the explicit +# Newmark time scheme acceleration is accurate at zeroth order while displacement is accurate at second order, +# thus in fluid elements potential_dot_dot_acoustic() is accurate at zeroth order while potential_acoustic() +# is accurate at second order and thus contains significantly less numerical noise. +USE_TRICK_FOR_BETTER_PRESSURE = .false. + +# +# source encoding +# +# determines source encoding factor +/-1 depending on sign of moment tensor +# (see e.g. Krebs et al., 2009. Fast full-wavefield seismic inversion using encoded sources, Geophysics, 74 (6), WCC177-WCC188.) +USE_SOURCE_ENCODING = .false. + +# +# total energy calculation +# +# to plot total energy curves, for instance to monitor how CPML absorbing layers behave; +# should be turned OFF in most cases because expensive +OUTPUT_ENERGY = .false. +# every how many time steps we compute energy (which is expensive to compute) +NTSTEP_BETWEEN_OUTPUT_ENERGY = 10 + +# +# adjoint kernel outputs +# +# this parameter must be set to .true. to compute anisotropic kernels +# in crust and mantle (related to the 21 Cij in geographical coordinates) +# default is .false. to compute isotropic kernels (related to alpha and beta) +ANISOTROPIC_KL = .false. + +# compute transverse isotropic kernels (alpha_v,alpha_h,beta_v,beta_h,eta,rho) +# rather than fully anisotropic kernels in case ANISOTROPIC_KL is set to .true. +SAVE_TRANSVERSE_KL = .false. + +# outputs approximate Hessian for preconditioning +APPROXIMATE_HESS_KL = .false. + +# save Moho mesh and compute Moho boundary kernels +SAVE_MOHO_MESH = .false. + # print source time function PRINT_SOURCE_TIME_FUNCTION = .false. diff --git a/EXAMPLES/waterlayered_halfspace/make_mesh_waterlayer.sh b/EXAMPLES/waterlayered_halfspace/make_mesh_waterlayer.sh index 500ee7f2c..c9cb0ae87 100755 --- a/EXAMPLES/waterlayered_halfspace/make_mesh_waterlayer.sh +++ b/EXAMPLES/waterlayered_halfspace/make_mesh_waterlayer.sh @@ -16,4 +16,4 @@ GEOCUBIT.py --build_volume --mesh --cfg=waterlayer_only.cfg GEOCUBIT.py --collect --meshfiles=MESH_GEOCUBIT/mesh_vol_0.e --export2SPECFEM3D --SEMoutput=MESH -cp MESH/nummaterial_velocity_file.reference MESH/nummaterial_velocity_file \ No newline at end of file +cp MESH/nummaterial_velocity_file.reference MESH/nummaterial_velocity_file diff --git a/Makefile.in b/Makefile.in index 3772af06c..f6cd8a9e6 100644 --- a/Makefile.in +++ b/Makefile.in @@ -220,6 +220,7 @@ SUBDIRS = \ decompose_mesh \ generate_databases \ meshfem3D \ + postprocess \ shared \ specfem3D \ tomography \ @@ -243,6 +244,8 @@ all: default \ xconvolve_source_timefunction \ xcreate_movie_shakemap_AVS_DX_GMT \ xmodel_update \ + xclip_sem \ + xcombine_sem \ xsmooth_sem \ xsum_kernels \ xsum_preconditioned_kernels \ @@ -322,9 +325,13 @@ help: @echo " xconvert_skewness_to_angle" @echo " xmultiply_CUBIT_Abaqus_mesh_by_1000" @echo "" + @echo "- postprocessing tools: [make postprocess]" + @echo " xclip_sem" + @echo " xcombine_sem" + @echo " xsmooth_sem" + @echo "" @echo "- tomography tools: [make tomography]" @echo " xmodel_update" - @echo " xsmooth_sem" @echo " xsum_kernels" @echo " xsum_preconditioned_kernels" @echo "" @@ -344,6 +351,8 @@ help: create_movie_shakemap_AVS_DX_GMT xcreate_movie_shakemap_AVS_DX_GMT \ combine_vol_data xcombine_vol_data \ combine_surf_data xcombine_surf_data \ + clip_sem xclip_sem \ + combine_sem xcombine_sem \ smooth_sem xsmooth_sem \ sum_kernels xsum_kernels \ sum_preconditioned_kernels xsum_preconditioned_kernels \ diff --git a/doc/GJI_2011_paper_about_the_code/compile_LaTeX_paper.sh b/doc/GJI_2011_paper_about_the_code/compile_LaTeX_paper.sh index 4132d25e7..595327e43 100755 --- a/doc/GJI_2011_paper_about_the_code/compile_LaTeX_paper.sh +++ b/doc/GJI_2011_paper_about_the_code/compile_LaTeX_paper.sh @@ -15,11 +15,11 @@ /bin/rm -rf *.tit > /dev/null /bin/rm -rf *.spl > /dev/null - pdflatex paper_GJI_2011_about_the_code - bibtex paper_GJI_2011_about_the_code - pdflatex paper_GJI_2011_about_the_code - pdflatex paper_GJI_2011_about_the_code - pdflatex paper_GJI_2011_about_the_code + pdflatex paper_GJI_2011_about_the_code + bibtex paper_GJI_2011_about_the_code + pdflatex paper_GJI_2011_about_the_code + pdflatex paper_GJI_2011_about_the_code + pdflatex paper_GJI_2011_about_the_code /bin/rm -rf *.dvi > /dev/null /bin/rm -rf *.log > /dev/null diff --git a/doc/USER_MANUAL/manual_SPECFEM3D_Cartesian.tex b/doc/USER_MANUAL/manual_SPECFEM3D_Cartesian.tex index 7100cf2f4..ada2ad0fb 100644 --- a/doc/USER_MANUAL/manual_SPECFEM3D_Cartesian.tex +++ b/doc/USER_MANUAL/manual_SPECFEM3D_Cartesian.tex @@ -130,10 +130,12 @@ \section*{Authors} Kangchen Bai, Piero Basini, C\'eline Blitz, +Alexis Bottero, Ebru Bozda\u{g}, Emanuele Casarotti, Joseph Charles, Min Chen, +Paul Cristini, Percy Galvez, Dominik G\"oddeke, Vala Hj\"orleifsd\'ottir, @@ -166,6 +168,7 @@ \section*{Authors} Jeroen Tromp, Jean-Pierre Vilotte, Zhinan Xie, +Chang-Hua Zhang, Hejun Zhu.\\ diff --git a/flags.guess b/flags.guess index ace5e1f1b..b4194a9f5 100644 --- a/flags.guess +++ b/flags.guess @@ -98,7 +98,7 @@ case $my_FC in # # GNU gfortran # - DEF_FFLAGS="-std=f2003 -fimplicit-none -frange-check -fmax-errors=10 -pedantic -pedantic-errors -Waliasing -Wampersand -Wcharacter-truncation -Wline-truncation -Wsurprising -Wno-tabs -Wunderflow -ffpe-trap=invalid,zero,overflow" # -mcmodel=medium + DEF_FFLAGS="-std=f2003 -fimplicit-none -frange-check -fmax-errors=10 -pedantic -pedantic-errors -Waliasing -Wampersand -Wcharacter-truncation -Wline-truncation -Wsurprising -Wno-tabs -Wunderflow -ffpe-trap=invalid,zero,overflow -Wunused -Werror" # -mcmodel=medium OPT_FFLAGS="-O2" DEBUG_FFLAGS="-g -O0 -ggdb -fbacktrace -fbounds-check" ;; diff --git a/list_for_Zhinan_for_SPECFEM3D_PMLs.txt b/list_for_Zhinan_for_SPECFEM3D_PMLs.txt index 71c9465e3..51f52896d 100644 --- a/list_for_Zhinan_for_SPECFEM3D_PMLs.txt +++ b/list_for_Zhinan_for_SPECFEM3D_PMLs.txt @@ -1,4 +1,62 @@ + Bug in xgeneratedatabes with C-PML? #273 +Open +m8hpw opened this Issue on Oct 20, 2014 ? 2 comments + +When I use generate_databases on the mesh I made, an error "C-PML error: distance to C-PML/mesh interface is bigger than thickness of C-PML layer". But I think it is a bug. Indeed, + +In subroutine pml_set_local_dampingcoeff(myrank,xstore,ystore,zstore) of pml_set_local_dampingcoeff.f90 +! gets abscissa of current grid point along the damping profile +abscissa_in_PML_x = xstore(iglob) - xoriginright +! determines distance to C-PML/mesh interface +dist = abscissa_in_PML_x / CPML_width_x +! gets damping profile at the C-PML element's GLL point +d_x = pml_damping_profile_l(myrank,iglob,dist,vp,CPML_width_x) + +So dist is a ratio of two distances that should be between 0 and 1. + +But in definition of pml_damping_profile_l in pml_set_local_dampingcoeff.f90 +distance is considered as an absolute distance. +! checks coordinates of C-PML points and thickness of C-PML layer +if( delta < dist ) then +print,'C-PML point ',iglob +print,'distance to C-PML/mesh interface ',dist +print*,'C-PML thickness ',delta +call exit_mpi(myrank,'C-PML error: distance to C-PML/mesh interface is bigger than thickness of C-PML layer') +endif + +That is why I got an error. I changed if (delta < dist) into if (dist 1.0). The code is now running. But I do not yet check if the PML layer is still effective. + +M8hpw + + +komatits commented on Oct 27, 2014: + +Dear Zhinan, + +Could you maybe have a look when you have time? (since I think that part of the code was written by you). It seems that in one of the routines the distance ("dist") is relative but is used as absolute in another routine; if so the bug is likely easy to fix. Thank you, + +Best regards, Dimitri. + +... +Dimitri Komatitsch komatits added bug question labels on Oct 27, 2014 +Dimitri Komatitsch +Owner +komatits commented on Oct 27, 2014 + +Dear Dimitri, + +I will commit the code in the next two weeks, for sure. And fix that bug soon. + +Thank you so much. + +Best regards, + +Zhinan. + + +===================================================================================== + Subject: Re: PML Date: Thu, 22 Jan 2015 17:02:21 +0100 From: Dimitri Komatitsch diff --git a/run_this_example.sh b/run_this_example.sh index 81bd47343..6a263a0f5 100755 --- a/run_this_example.sh +++ b/run_this_example.sh @@ -24,7 +24,8 @@ cp DATA/CMTSOLUTION OUTPUT_FILES/ cp DATA/STATIONS OUTPUT_FILES/ # get the number of processors, ignoring comments in the Par_file -NPROC=`grep ^NPROC DATA/Par_file | grep -v -E '^[[:space:]]*#' | cut -d = -f 2` +NPROC=`grep ^NPROC DATA/Par_file | grep -v -E '^[[:space:]]*#' | cut -d = -f 2 | cut -d \# -f 1` +echo "The simulation will run on NPROC = " $NPROC " MPI tasks" # decomposes mesh using the pre-saved mesh files in MESH-default echo diff --git a/setup/constants.h.in b/setup/constants.h.in index fc11b8c7b..1e4a7ccd6 100644 --- a/setup/constants.h.in +++ b/setup/constants.h.in @@ -45,6 +45,14 @@ !----------- parameters that can be changed by the user ----------- +!! DK DK added this temporarily here to make SPECFEM3D and SPECFEM3D_GLOBE much more similar +!! DK DK in terms of the structure of their main time iteration loop; these are future features +!! DK DK that are missing in this code but implemented in the other and that could thus be cut and pasted one day + logical, parameter :: UNDO_ATTENUATION = .false. + logical, parameter :: EXACT_UNDOING_TO_DISK = .false. + integer, parameter :: IFILE_FOR_EXACT_UNDOING = 244 + logical, parameter :: VTK_MODE = .false. + ! set to .false. if running on a Beowulf-type machine with local disks ! set to .true. if running on a shared-memory machine with common file system ! if running on a Beowulf, also modify name of nodes in filter_machine_file.f90 @@ -124,18 +132,6 @@ real(kind=CUSTOM_REAL), parameter :: A_over_4 = 0.25_CUSTOM_REAL * A real(kind=CUSTOM_REAL), parameter :: B_over_2 = 0.50_CUSTOM_REAL * B -!!----------------------------------------------------------- -!! -!! total energy calculation -!! -!!----------------------------------------------------------- - -! to plot total energy curves, for instance to monitor how CPML absorbing layers behave; -! should be turned OFF in most cases - logical, parameter :: OUTPUT_ENERGY = .false. ! .true. - integer, parameter :: IOUT_ENERGY = 937 ! file number for the energy file - integer, parameter :: NTSTEP_BETWEEN_OUTPUT_ENERGY = 10 ! how often we compute energy (which is expensive to compute) - !!----------------------------------------------------------- !! !! Roland_Sylvain gravity calculations @@ -179,6 +175,9 @@ integer, parameter :: EXTERNAL_CODE_IS_AXISEM = 2 integer, parameter :: EXTERNAL_CODE_IS_FK = 3 +! Big storage version of coupling with DSM (will always set to .false. after the light storage version will be validated) + logical, parameter :: old_DSM_coupling_from_Vadim = .true. + ! some old tests (currently unstable; do not remove them though, we might fix this one day) integer, parameter :: IIN_veloc_dsm = 51, IIN_tract_dsm = 52, Ntime_step_dsm = 100 @@ -213,6 +212,8 @@ !! C-PML absorbing boundary conditions !! !!----------------------------------------------------------- + +! power (exponent) used for the PML damping profile real(kind=CUSTOM_REAL), parameter :: NPOWER = 1._CUSTOM_REAL ! C-PML theoretical reflection coefficient @@ -235,30 +236,15 @@ !!----------------------------------------------------------- ! paths for inputs and outputs files - character(len=*), parameter :: IN_DATA_FILES_PATH = './DATA/' - character(len=*), parameter :: MF_IN_DATA_FILES_PATH = './DATA/meshfem3D_files/' - character(len=*), parameter :: OUTPUT_FILES_PATH_BASE = './OUTPUT_FILES/' - -! --------------------------------------------------------------------------------------- -! LQY -- Following 3 variables stays here temporarily, -! we need to move them to Par_file at a proper time -! --------------------------------------------------------------------------------------- -! save moho mesh and compute Moho boundary kernels - logical, parameter :: SAVE_MOHO_MESH = .false. - -! outputs approximate hessian for preconditioning - logical, parameter :: APPROXIMATE_HESS_KL = .false. - -! number of steps to save the state variables in the forward simulation, -! to be used in the backward reconstruction in the presence of attenuation - integer, parameter :: NSTEP_Q_SAVE = 50 ! depending on stability of reconstruction, up to 200 + character(len=*), parameter :: IN_DATA_FILES = './DATA/' + character(len=*), parameter :: MF_IN_DATA_FILES = './DATA/meshfem3D_files/' + character(len=*), parameter :: OUTPUT_FILES_BASE = './OUTPUT_FILES/' +! !------------------------------------------------------ -! Nicolas Legoff -- Variables that should be read/computed elsewhere. -! Temporarily declared here. -!------------------------------------------------------ +! -! no lagrange interpolation on seismograms (we take the value on one NGLL point) +! no Lagrange interpolation for seismograms (we then take the value at the closest NGLL point, which is less accurate but faster) logical, parameter :: FASTER_RECEIVERS_POINTS_ONLY = .false. ! use this t0 as earliest starting time rather than the automatically calculated one @@ -281,7 +267,7 @@ !!----------------------------------------------------------- !! -!! image outputs +!! image output !! !!----------------------------------------------------------- @@ -307,7 +293,7 @@ !!----------------------------------------------------------- !! -!! mesh optimization +!! mesh coloring for GPUs (not needed any more, obsolete) !! !!----------------------------------------------------------- @@ -325,21 +311,6 @@ ! postprocess the colors to balance them if Droux (1993) algorithm is not used logical, parameter :: BALANCE_COLORS_SIMPLE_ALGO = .false. -!!----------------------------------------------------------- -!! -!! adjoint kernel outputs -!! -!!----------------------------------------------------------- - -! this parameter must be set to .true. to compute anisotropic kernels -! in crust and mantle (related to the 21 Cij in geographical coordinates) -! default is .false. to compute isotropic kernels (related to alpha and beta) - logical, parameter :: ANISOTROPIC_KL = .false. - -! compute transverse isotropic kernels (alpha_v,alpha_h,beta_v,beta_h,eta,rho) -! rather than fully anisotropic kernels in case ANISOTROPIC_KL is set to .true. - logical, parameter :: SAVE_TRANSVERSE_KL = .false. - !------------------------------------------------------ !----------- do not modify anything below ------------- !------------------------------------------------------ @@ -447,6 +418,9 @@ ! flag for projection from latitude/longitude to UTM, and back integer, parameter :: ILONGLAT2UTM = 0, IUTM2LONGLAT = 1 +! for total energy calculation + integer, parameter :: IOUT_ENERGY = 937 ! file number for the energy file + !!----------------------------------------------------------- !! !! APPROXIMATE_OCEAN_LOAD load approximation diff --git a/src/auxiliaries/combine_vol_data.f90 b/src/auxiliaries/combine_vol_data.f90 index 1af2b6303..1a77ad52e 100644 --- a/src/auxiliaries/combine_vol_data.f90 +++ b/src/auxiliaries/combine_vol_data.f90 @@ -91,8 +91,8 @@ program combine_vol_data character(len=MAX_STRING_LEN) :: prname, prname_lp character(len=MAX_STRING_LEN*2) :: mesh_file,local_data_file character(len=MAX_STRING_LEN) :: data_array_name - logical :: HIGH_RESOLUTION_MESH - integer :: ires + logical :: HIGH_RESOLUTION_MESH,BROADCAST_AFTER_READ + integer :: ires,myrank ! Variables to read ADIOS files integer :: sizeprocs @@ -112,10 +112,9 @@ program combine_vol_data print * ! needs local_path for mesh files - call read_parameter_file() - - ! gets adios parameters in Par_file - call read_adios_parameters() + myrank = 0 + BROADCAST_AFTER_READ = .false. + call read_parameter_file(myrank,BROADCAST_AFTER_READ) ! reads in arguments do i = 1, command_argument_count() diff --git a/src/auxiliaries/combine_vol_data_adios_stubs.f90 b/src/auxiliaries/combine_vol_data_adios_stubs.f90 index fcf6efb69..8f7455c30 100644 --- a/src/auxiliaries/combine_vol_data_adios_stubs.f90 +++ b/src/auxiliaries/combine_vol_data_adios_stubs.f90 @@ -40,7 +40,6 @@ end subroutine print_usage_adios subroutine read_args_adios(arg, MAX_NUM_NODES, node_list, num_node, & var_name, value_file_name, mesh_file_name, & outdir, ires) - use unused_mod ! Arguments character(len=*) :: arg(:) integer :: MAX_NUM_NODES @@ -49,6 +48,8 @@ subroutine read_args_adios(arg, MAX_NUM_NODES, node_list, num_node, & character(len=*) :: var_name, value_file_name, mesh_file_name, & outdir + integer(kind=4) :: unused_i4 + unused_i4 = len_trim(arg(1)) unused_i4 = MAX_NUM_NODES unused_i4 = node_list(1) @@ -66,11 +67,14 @@ end subroutine read_args_adios !============================================================================= subroutine init_adios(value_file_name, mesh_file_name, & value_handle, mesh_handle) - use unused_mod + ! Parameters character(len=*) :: value_file_name, mesh_file_name integer(kind=8) :: value_handle, mesh_handle + integer(kind=4) :: unused_i4 + integer(kind=8) :: unused_i8 + unused_i4 = len_trim(value_file_name) unused_i4 = len_trim(mesh_file_name) unused_i8 = value_handle @@ -82,10 +86,12 @@ end subroutine init_adios !============================================================================= subroutine clean_adios(value_handle, mesh_handle) - use unused_mod + ! Parameters integer(kind=8) :: value_handle, mesh_handle + integer(kind=8) :: unused_i8 + unused_i8 = value_handle unused_i8 = mesh_handle @@ -96,12 +102,15 @@ end subroutine clean_adios !============================================================================= subroutine read_scalars_adios_mesh(mesh_handle, iproc, NGLOB_AB, NSPEC_AB, & ibool_offset, x_global_offset) - use unused_mod + ! Parameters integer(kind=8) :: mesh_handle integer :: iproc integer :: NGLOB_AB, NSPEC_AB, ibool_offset, x_global_offset + integer(kind=4) :: unused_i4 + integer(kind=8) :: unused_i8 + unused_i8 = mesh_handle unused_i4 = iproc unused_i4 = NGLOB_AB @@ -116,12 +125,15 @@ end subroutine read_scalars_adios_mesh !============================================================================= subroutine read_ibool_adios_mesh(mesh_handle, ibool_offset, & NGLLX, NGLLY, NGLLZ, NSPEC_AB, ibool) - use unused_mod + ! Parameters integer(kind=8) :: mesh_handle integer :: ibool_offset, NGLLX, NGLLY, NGLLZ, NSPEC_AB integer, dimension(:,:,:,:) :: ibool + integer(kind=4) :: unused_i4 + integer(kind=8) :: unused_i8 + unused_i8 = mesh_handle unused_i4 = ibool_offset unused_i4 = NGLLX @@ -137,13 +149,18 @@ end subroutine read_ibool_adios_mesh !============================================================================= subroutine read_coordinates_adios_mesh(mesh_handle, x_global_offset, & NGLOB_AB, xstore, ystore, zstore) - use unused_mod + use constants + ! Parameters integer(kind=8) :: mesh_handle integer :: x_global_offset, NGLOB_AB real(kind=CUSTOM_REAL),dimension(:) :: xstore, ystore, zstore + integer(kind=4) :: unused_i4 + integer(kind=8) :: unused_i8 + real(kind=CUSTOM_REAL) :: unused_cr + unused_i8 = mesh_handle unused_i4 = x_global_offset unused_i4 = NGLOB_AB @@ -158,13 +175,17 @@ end subroutine read_coordinates_adios_mesh !============================================================================= subroutine read_double_values_adios(value_handle, var_name, ibool_offset, & NSPEC_AB, dat) - use unused_mod + ! Parameters integer(kind=8) :: value_handle character(len=*) :: var_name integer :: ibool_offset, NSPEC_AB double precision, dimension(:,:,:,:) :: dat + integer(kind=4) :: unused_i4 + integer(kind=8) :: unused_i8 + double precision :: unused_dp + unused_i8 = value_handle unused_i4 = len_trim(var_name) unused_i4 = ibool_offset @@ -178,13 +199,17 @@ end subroutine read_double_values_adios !============================================================================= subroutine read_float_values_adios(value_handle, var_name, ibool_offset, & NSPEC_AB, dat) - use unused_mod + ! Parameters integer(kind=8) :: value_handle character(len=*) :: var_name integer :: ibool_offset, NSPEC_AB real, dimension(:,:,:,:) :: dat + integer(kind=4) :: unused_i4 + integer(kind=8) :: unused_i8 + double precision :: unused_dp + unused_i8 = value_handle unused_i4 = len_trim(var_name) unused_i4 = ibool_offset diff --git a/src/auxiliaries/create_movie_shakemap_AVS_DX_GMT.f90 b/src/auxiliaries/create_movie_shakemap_AVS_DX_GMT.f90 index 738f2741b..68ab99dad 100644 --- a/src/auxiliaries/create_movie_shakemap_AVS_DX_GMT.f90 +++ b/src/auxiliaries/create_movie_shakemap_AVS_DX_GMT.f90 @@ -31,6 +31,9 @@ !--- of the velocity vector) in AVS, OpenDX or GMT format ! +!! DK DK put this because I do not know how to fix the rules.mk dependencies + include "../shared/serial.f90" + program create_movie_shakemap use constants @@ -97,7 +100,8 @@ program create_movie_shakemap ! order of points representing the 2D square element integer,dimension(NGNOD2D_FOUR_CORNERS_AVS_DX),parameter :: iorder = (/1,3,2,4/) - integer :: NSPEC_SURFACE_EXT_MESH + integer :: NSPEC_SURFACE_EXT_MESH,myrank + logical :: BROADCAST_AFTER_READ ! ************** PROGRAM STARTS HERE ************** @@ -110,13 +114,15 @@ program create_movie_shakemap print * ! read the parameter file - call read_parameter_file() + myrank = 0 + BROADCAST_AFTER_READ = .false. + call read_parameter_file(myrank,BROADCAST_AFTER_READ) ! only one global array for movie data, but stored for all surfaces defined ! in file 'surface_from_mesher.h' - open(unit=IIN,file=trim(OUTPUT_FILES_PATH)//'surface_from_mesher.h',status='old',action='read',iostat=ier) + open(unit=IIN,file=trim(OUTPUT_FILES)//'surface_from_mesher.h',status='old',action='read',iostat=ier) if (ier /= 0) then - print*,'error opening file: ',trim(OUTPUT_FILES_PATH)//'surface_from_mesher.h' + print*,'error opening file: ',trim(OUTPUT_FILES)//'surface_from_mesher.h' print* print*,'please run xgenerate_databases or xspecfem3D first to create this file, exiting now...' stop 'error opening moviedata header file' @@ -310,10 +316,10 @@ program create_movie_shakemap else write(outputname,"('/moviedata',i6.6)") it endif - open(unit=IOUT,file=trim(OUTPUT_FILES_PATH)//trim(outputname),status='old', & + open(unit=IOUT,file=trim(OUTPUT_FILES)//trim(outputname),status='old', & action='read',form='unformatted',iostat=ier) if (ier /= 0) then - print*,'error: ',trim(OUTPUT_FILES_PATH)//trim(outputname) + print*,'error: ',trim(OUTPUT_FILES)//trim(outputname) stop 'error opening moviedata file' endif @@ -615,15 +621,15 @@ program create_movie_shakemap if (USE_OPENDX) then write(outputname,"('/DX_shaking_map.dx')") - open(unit=11,file=trim(OUTPUT_FILES_PATH)//outputname,status='unknown') + open(unit=11,file=trim(OUTPUT_FILES)//outputname,status='unknown') write(11,*) 'object 1 class array type float rank 1 shape 3 items ',nglob,' data follows' else if (USE_AVS) then write(outputname,"('/AVS_shaking_map.inp')") - open(unit=11,file=trim(OUTPUT_FILES_PATH)//outputname,status='unknown') + open(unit=11,file=trim(OUTPUT_FILES)//outputname,status='unknown') write(11,*) nglob,' ',nspectot_AVS_max,' 1 0 0' else if (USE_GMT) then write(outputname,"('/gmt_shaking_map.xyz')") - open(unit=11,file=trim(OUTPUT_FILES_PATH)//outputname,status='unknown') + open(unit=11,file=trim(OUTPUT_FILES)//outputname,status='unknown') else stop 'wrong output format selected' endif @@ -632,15 +638,15 @@ program create_movie_shakemap if (USE_OPENDX) then write(outputname,"('/DX_movie_',i6.6,'.dx')") ivalue - open(unit=11,file=trim(OUTPUT_FILES_PATH)//outputname,status='unknown') + open(unit=11,file=trim(OUTPUT_FILES)//outputname,status='unknown') write(11,*) 'object 1 class array type float rank 1 shape 3 items ',nglob,' data follows' else if (USE_AVS) then write(outputname,"('/AVS_movie_',i6.6,'.inp')") ivalue - open(unit=11,file=trim(OUTPUT_FILES_PATH)//outputname,status='unknown') + open(unit=11,file=trim(OUTPUT_FILES)//outputname,status='unknown') write(11,*) nglob,' ',nspectot_AVS_max,' 1 0 0' else if (USE_GMT) then write(outputname,"('/gmt_movie_',i6.6,'.xyz')") ivalue - open(unit=11,file=trim(OUTPUT_FILES_PATH)//outputname,status='unknown') + open(unit=11,file=trim(OUTPUT_FILES)//outputname,status='unknown') else stop 'wrong output format selected' endif @@ -769,9 +775,9 @@ program create_movie_shakemap print * print *,'done creating movie or shaking map' print * - if (USE_OPENDX) print *, 'DX files are stored in ', trim(OUTPUT_FILES_PATH), '/DX_*.dx' - if (USE_AVS) print *, 'AVS files are stored in ', trim(OUTPUT_FILES_PATH), '/AVS_*.inp' - if (USE_GMT) print *, 'GMT files are stored in ', trim(OUTPUT_FILES_PATH), '/gmt_*.xyz' + if (USE_OPENDX) print *, 'DX files are stored in ', trim(OUTPUT_FILES), '/DX_*.dx' + if (USE_AVS) print *, 'AVS files are stored in ', trim(OUTPUT_FILES), '/AVS_*.inp' + if (USE_GMT) print *, 'GMT files are stored in ', trim(OUTPUT_FILES), '/gmt_*.xyz' print * deallocate(store_val_x) diff --git a/src/auxiliaries/detect_duplicates_stations_file.f90 b/src/auxiliaries/detect_duplicates_stations_file.f90 new file mode 100644 index 000000000..8eec7eb53 --- /dev/null +++ b/src/auxiliaries/detect_duplicates_stations_file.f90 @@ -0,0 +1,117 @@ + + program detect_duplicates_stations_file + +! Author: Dimitri Komatitsch, University of Pau and INRIA, France, around 2009. + +! This Fortran code also checks if two stations have the same latitude and longitude even if they do not have the same name +! (this can happen in STATIONS files: the same station appearing twice but under different names, +! in particular when the network name is different even if the station name itself is the same). +! +! Otherwise if the station appears twice but with the same name a simple Unix command such as: +! +! sort STATIONS | uniq +! +! should remove multiples. + + use constants + + implicit none + +! input station file to filter + character(len=150), parameter :: STATIONS_FILE = '../../DATA/STATIONS' +! character(len=150), parameter :: STATIONS_FILE = 'STATIONS_all_20June2008' +! character(len=150), parameter :: STATIONS_FILE = 'STATIONS_SUBSET_35' +! character(len=150), parameter :: STATIONS_FILE = 'STATIONS_FULL_758' + + integer :: irec,irec2,nrec,ios + + character(len=MAX_LENGTH_STATION_NAME), dimension(:), allocatable :: station_name + character(len=MAX_LENGTH_NETWORK_NAME), dimension(:), allocatable :: network_name + + logical, dimension(:), allocatable :: is_a_duplicate + + double precision, dimension(:), allocatable :: stlat,stlon,stele,stbur + + character(len=150) :: dummystring + +! read the number of receivers + open(unit=IIN,file=STATIONS_FILE,iostat=ios,status='old',action='read') + nrec = 0 + do while(ios == 0) + read(IIN,"(a)",iostat=ios) dummystring + if(ios == 0) nrec = nrec + 1 + enddo + close(IIN) + + print * + print *,'the input station file contains ',nrec,' stations' + print * + + allocate(stlat(nrec)) + allocate(stlon(nrec)) + allocate(stele(nrec)) + allocate(stbur(nrec)) + allocate(station_name(nrec)) + allocate(network_name(nrec)) + allocate(is_a_duplicate(nrec)) + + is_a_duplicate(:) = .false. + + open(unit=IIN,file=STATIONS_FILE,status='old',action='read') +! loop on all the stations to read station information + do irec = 1,nrec + read(IIN,*) station_name(irec),network_name(irec),stlat(irec),stlon(irec),stele(irec),stbur(irec) + enddo +! close receiver file + close(IIN) + +! look for duplicates in the station file in terms of station name + do irec = 1,nrec-1 + if(is_a_duplicate(irec)) cycle + do irec2 = irec+1,nrec + if(is_a_duplicate(irec2)) cycle + if(station_name(irec) == station_name(irec2) .and. network_name(irec) == network_name(irec2)) then + print *, & + network_name(irec2)(1:len_trim(network_name(irec2))),'.',station_name(irec2)(1:len_trim(station_name(irec2))), & + ' is a duplicate of ',& + network_name(irec)(1:len_trim(network_name(irec))),'.',station_name(irec)(1:len_trim(station_name(irec))), & + ' (same name)' + is_a_duplicate(irec2) = .true. + endif + enddo + enddo + + print * + +! look for duplicates in the station file in terms of position + do irec = 1,nrec-1 + if(is_a_duplicate(irec)) cycle + do irec2 = irec+1,nrec + if(is_a_duplicate(irec2)) cycle + if(stlat(irec) == stlat(irec2) .and. stlon(irec) == stlon(irec2)) then + print *, & + network_name(irec2)(1:len_trim(network_name(irec2))),'.',station_name(irec2)(1:len_trim(station_name(irec2))), & + ' is a duplicate of ', & + network_name(irec)(1:len_trim(network_name(irec))),'.',station_name(irec)(1:len_trim(station_name(irec))), & + ' (same lat/long)' + is_a_duplicate(irec2) = .true. + endif + enddo + enddo + + print * + print *,'found and removed a total of ',count(is_a_duplicate),' duplicates' + print * + +! write the new filtered station file + open(unit=IOUT,file=STATIONS_FILE(1:len_trim(STATIONS_FILE))//'_cleaned',status='unknown',action='write') +! loop on all the stations to write station information + do irec = 1,nrec + if(.not. is_a_duplicate(irec)) write(IOUT,*) trim(station_name(irec)),' ', & + trim(network_name(irec)),' ',sngl(stlat(irec)),' ',sngl(stlon(irec)),' ',sngl(stele(irec)),' ',sngl(stbur(irec)) + enddo +! close receiver file + close(IOUT) + + end program detect_duplicates_stations_file + diff --git a/src/auxiliaries/rules.mk b/src/auxiliaries/rules.mk index 5f2c8b17a..14f3731f8 100644 --- a/src/auxiliaries/rules.mk +++ b/src/auxiliaries/rules.mk @@ -35,6 +35,7 @@ auxiliaries_TARGETS = \ $E/xcombine_surf_data \ $E/xcombine_vol_data \ $E/xconvolve_source_timefunction \ + $E/xdetect_duplicates_stations_file \ $E/xcreate_movie_shakemap_AVS_DX_GMT \ $(EMPTY_MACRO) @@ -42,6 +43,7 @@ auxiliaries_OBJECTS = \ $O/combine_surf_data.aux.o \ $O/combine_vol_data.aux.o \ $O/convolve_source_timefunction.aux.o \ + $O/detect_duplicates_stations_file.aux.o \ $O/create_movie_shakemap_AVS_DX_GMT.aux.o \ $(EMPTY_MACRO) @@ -97,7 +99,6 @@ combine_vol_data_auxiliaries_SHARED_OBJECTS = \ $O/read_parameter_file.shared.o \ $O/read_value_parameters.shared.o \ $O/param_reader.cc.o \ - $O/unused_mod.shared_module.o \ $O/write_c_binary.cc.o \ $(EMPTY_MACRO) @@ -148,6 +149,9 @@ aux: $(auxiliaries_TARGETS) convolve_source_timefunction: xconvolve_source_timefunction xconvolve_source_timefunction: $E/xconvolve_source_timefunction +detect_duplicates_stations_file: xdetect_duplicates_stations_file +xdetect_duplicates_stations_file: $E/xdetect_duplicates_stations_file + combine_surf_data: xcombine_surf_data xcombine_surf_data: $E/xcombine_surf_data @@ -161,6 +165,9 @@ xcreate_movie_shakemap_AVS_DX_GMT: $E/xcreate_movie_shakemap_AVS_DX_GMT $E/xconvolve_source_timefunction: $O/convolve_source_timefunction.aux.o $O/shared_par.shared_module.o ${FCCOMPILE_CHECK} -o ${E}/xconvolve_source_timefunction $O/convolve_source_timefunction.aux.o $O/shared_par.shared_module.o +$E/xdetect_duplicates_stations_file: $O/detect_duplicates_stations_file.aux.o $O/shared_par.shared_module.o + ${FCCOMPILE_CHECK} -o ${E}/xdetect_duplicates_stations_file $O/detect_duplicates_stations_file.aux.o $O/shared_par.shared_module.o + $E/xcombine_surf_data: $(combine_surf_data_auxiliaries_OBJECTS) $(combine_surf_data_auxiliaries_SHARED_OBJECTS) ${FCLINK} -o $@ $+ @@ -180,7 +187,7 @@ $E/xcreate_movie_shakemap_AVS_DX_GMT: $(create_movie_shakemap_AVS_DX_GMT_auxilia ### # combine_vol_data -$O/combine_vol_data_adios_stubs.aux_noadios.o: $O/unused_mod.shared_module.o $O/adios_manager_stubs.shared_noadios.o +$O/combine_vol_data_adios_stubs.aux_noadios.o: $O/adios_manager_stubs.shared_noadios.o ifeq ($(ADIOS),yes) $O/combine_vol_data.aux.o: $O/combine_vol_data_impl.aux.o $O/combine_vol_data_adios_impl.aux_adios.o $O/adios_helpers.shared_adios.o: \ diff --git a/src/check_mesh_quality_CUBIT_Abaqus/check_mesh_quality_CUBIT_Abaqus.f90 b/src/check_mesh_quality_CUBIT_Abaqus/check_mesh_quality_CUBIT_Abaqus.f90 index 4c337f922..0fd47f909 100644 --- a/src/check_mesh_quality_CUBIT_Abaqus/check_mesh_quality_CUBIT_Abaqus.f90 +++ b/src/check_mesh_quality_CUBIT_Abaqus/check_mesh_quality_CUBIT_Abaqus.f90 @@ -56,7 +56,7 @@ program check_mesh_quality_CUBIT_Abaqus ! ( block ids: 1 2 3) volumes only ! (optional: uncheck 'Export Using Cubit IDs' to have element IDs in increasing order) character(len=*), parameter :: cubit_mesh_file = 'examples/layered_halfspace/layered_halfspace_mesh.inp' - integer, parameter :: NPOIN = 76819 ! number of nodes + integer, parameter :: NGLOB = 76819 ! number of nodes integer, parameter :: NSPEC = 70200 ! number of elements (only volumes, i.e. block ids 1,2,3 ) integer, parameter :: NGNOD = 8 ! hexahedral elements logical, parameter :: IGNORE_OTHER_HEADERS = .false. @@ -65,7 +65,7 @@ program check_mesh_quality_CUBIT_Abaqus !------------------------------------------------------------------------------------------------ - double precision, dimension(NPOIN) :: x,y,z + double precision, dimension(NGLOB) :: x,y,z integer, dimension(NGNOD,NSPEC) :: ibool @@ -146,7 +146,7 @@ program check_mesh_quality_CUBIT_Abaqus ! read the mesh print * print *,'start reading the CUBIT file: ',cubit_mesh_file(1:len_trim(cubit_mesh_file)) - print *,' number of points: ',NPOIN + print *,' number of points: ',NGLOB print *,' number of elements: ',NSPEC print * @@ -171,7 +171,7 @@ program check_mesh_quality_CUBIT_Abaqus x(:) = 0.d0 y(:) = 0.d0 z(:) = 0.d0 - do i = 1,NPOIN + do i = 1,NGLOB ! reads in text line read(10,'(a)',iostat=ier) line @@ -201,7 +201,7 @@ program check_mesh_quality_CUBIT_Abaqus stop 'error read points from current line' endif ! checks if out-of-range - if (iread < 1 .or. iread > NPOIN) then + if (iread < 1 .or. iread > NGLOB) then print *,'error at i,iread = ',i,iread stop 'wrong ID input for a point' endif @@ -221,7 +221,7 @@ program check_mesh_quality_CUBIT_Abaqus read(10,'(a)',iostat=ier) line if (line(1:1) /= "*") then print*,' new line: ',trim(line) - print*,' not a header line, check the number of points NPOIN specified' + print*,' not a header line, check the number of points NGLOB specified' stop 'error reading elements' endif @@ -234,56 +234,7 @@ program check_mesh_quality_CUBIT_Abaqus do i = 1,NSPEC ! reads in element connectivity - if (NGNOD == 4) then - - ! quadrangles - - !! DK DK ignore other headers for 2D mesh of Eros with fractures, which has multiple material sets - if (IGNORE_OTHER_HEADERS .and. cubit_mesh_file == 'eros_complexe_2d_regolite_fractures_modifie_in_meters.inp' & - .and. i == 5709) read(10,*) - - if (IGNORE_OTHER_HEADERS .and. cubit_mesh_file == 'REGOLITE_only_no_fractures_2D_in_meters.inp' & - .and. i == 28429) read(10,*) - - ! reads in line - read(10,'(a)',iostat=ier) line - if (ier /= 0) then - print *,'error read:',iread - stop 'error read elements line' - endif - - ! checks if line is a comment line (starts with *), and reads until it finds a non-comment line - do while (line(1:1) == "*") - ! skips comment line and goes to next line - print*,' comment: ',trim(line) - read(10,'(a)',iostat=ier) line - if (ier /= 0) then - print *,'error read:',i - stop 'error read non-comment elements line' - endif - enddo - - ! gets element connection nodes - read(line,*,iostat=ier) iread,n1,n2,n3,n4 - - ! checks - if (ier /= 0) then - print *,'error read:',iread - stop 'error read elements' - endif - ! requires that elements are in increasing order - if (iread /= i) then - print *,'error at i,iread = ',i,iread - stop 'wrong input ID for an element' - endif - - ! stores element nodes - ibool(1,iread) = n1 - ibool(2,iread) = n2 - ibool(3,iread) = n3 - ibool(4,iread) = n4 - - else if (NGNOD == 8) then + if (NGNOD == 8) then ! hexahedra @@ -372,13 +323,8 @@ program check_mesh_quality_CUBIT_Abaqus if (mod(ispec,100000) == 0) print *,'processed ',ispec,' elements out of ',NSPEC - if (NGNOD == 4) then - call create_mesh_quality_data_2D(x,y,z,ibool,ispec,NSPEC,NPOIN,NGNOD,VP_MAX,delta_t, & - equiangle_skewness,edge_aspect_ratio,diagonal_aspect_ratio,stability,distmin,distmax) - else - call create_mesh_quality_data_3D(x,y,z,ibool,ispec,NSPEC,NPOIN,NGNOD,VP_MAX,delta_t, & + call create_mesh_quality_data_3D(x,y,z,ibool,ispec,NSPEC,NGLOB,VP_MAX,delta_t, & equiangle_skewness,edge_aspect_ratio,diagonal_aspect_ratio,stability,distmin,distmax) - endif ! store element number in which the edge of minimum or maximum length is located if (distmin < distance_min) ispec_min_edge_length = ispec @@ -433,14 +379,8 @@ program check_mesh_quality_CUBIT_Abaqus print *,'computed using VP_MAX = ',VP_MAX ! print *,'min stability = ',stability_min -! max stability CFL value is different in 2D and in 3D - if (NGNOD == 8) then - max_CFL_stability_limit = 0.48d0 - else if (NGNOD == 4) then - max_CFL_stability_limit = 0.68d0 - else - stop 'NGNOD must be 4 or 8' - endif +! max stability CFL value + max_CFL_stability_limit = 0.48d0 if (stability_max >= max_CFL_stability_limit) then print *,'*********************************************' @@ -464,13 +404,8 @@ program check_mesh_quality_CUBIT_Abaqus ! loop on all the elements do ispec = 1,NSPEC - if (NGNOD == 4) then - call create_mesh_quality_data_2D(x,y,z,ibool,ispec,NSPEC,NPOIN,NGNOD,VP_MAX,delta_t, & - equiangle_skewness,edge_aspect_ratio,diagonal_aspect_ratio,stability,distmin,distmax) - else - call create_mesh_quality_data_3D(x,y,z,ibool,ispec,NSPEC,NPOIN,NGNOD,VP_MAX,delta_t, & + call create_mesh_quality_data_3D(x,y,z,ibool,ispec,NSPEC,NGLOB,VP_MAX,delta_t, & equiangle_skewness,edge_aspect_ratio,diagonal_aspect_ratio,stability,distmin,distmax) - endif ! store skewness in histogram iclass = int(equiangle_skewness * dble(NCLASS)) @@ -552,13 +487,8 @@ program check_mesh_quality_CUBIT_Abaqus do ispec = 1,NSPEC - if (NGNOD == 4) then - call create_mesh_quality_data_2D(x,y,z,ibool,ispec,NSPEC,NPOIN,NGNOD,VP_MAX,delta_t, & + call create_mesh_quality_data_3D(x,y,z,ibool,ispec,NSPEC,NGLOB,VP_MAX,delta_t, & equiangle_skewness,edge_aspect_ratio,diagonal_aspect_ratio,stability,distmin,distmax) - else - call create_mesh_quality_data_3D(x,y,z,ibool,ispec,NSPEC,NPOIN,NGNOD,VP_MAX,delta_t, & - equiangle_skewness,edge_aspect_ratio,diagonal_aspect_ratio,stability,distmin,distmax) - endif ! check if element belongs to requested skewness range if (equiangle_skewness >= skewness_AVS_DX_min .and. equiangle_skewness <= skewness_AVS_DX_max) & @@ -584,10 +514,10 @@ program check_mesh_quality_CUBIT_Abaqus ! ************* generate points ****************** ! write OpenDX header - write(11,*) 'object 1 class array type float rank 1 shape 3 items ',NPOIN,' data follows' + write(11,*) 'object 1 class array type float rank 1 shape 3 items ',NGLOB,' data follows' ! write all the points - do i = 1,NPOIN + do i = 1,NGLOB write(11,*) sngl(x(i)),sngl(y(i)),sngl(z(i)) enddo @@ -606,13 +536,8 @@ program check_mesh_quality_CUBIT_Abaqus do ispec = ispec_begin,ispec_end - if (NGNOD == 4) then - call create_mesh_quality_data_2D(x,y,z,ibool,ispec,NSPEC,NPOIN,NGNOD,VP_MAX,delta_t, & + call create_mesh_quality_data_3D(x,y,z,ibool,ispec,NSPEC,NGLOB,VP_MAX,delta_t, & equiangle_skewness,edge_aspect_ratio,diagonal_aspect_ratio,stability,distmin,distmax) - else - call create_mesh_quality_data_3D(x,y,z,ibool,ispec,NSPEC,NPOIN,NGNOD,VP_MAX,delta_t, & - equiangle_skewness,edge_aspect_ratio,diagonal_aspect_ratio,stability,distmin,distmax) - endif ! check if element needs to be output if (iformat == 2 .or. (iformat == 1 .and. & @@ -620,14 +545,9 @@ program check_mesh_quality_CUBIT_Abaqus ! point order in OpenDX in 2D is 1,4,2,3 *not* 1,2,3,4 as in AVS ! point order in OpenDX in 3D is 4,1,8,5,3,2,7,6, *not* 1,2,3,4,5,6,7,8 as in AVS ! in the case of OpenDX, node numbers start at zero - if (NGNOD == 4) then - write(11,"(i9,1x,i9,1x,i9,1x,i9,1x,i9,1x,i9,1x,i9,1x,i9)") & - ibool(1,ispec)-1, ibool(4,ispec)-1, ibool(2,ispec)-1, ibool(3,ispec)-1 - else - write(11,"(i9,1x,i9,1x,i9,1x,i9,1x,i9,1x,i9,1x,i9,1x,i9)") & + write(11,"(i9,1x,i9,1x,i9,1x,i9,1x,i9,1x,i9,1x,i9,1x,i9)") & ibool(4,ispec)-1, ibool(1,ispec)-1, ibool(8,ispec)-1, ibool(5,ispec)-1, & ibool(3,ispec)-1, ibool(2,ispec)-1, ibool(7,ispec)-1, ibool(6,ispec)-1 - endif if (iformat == 1) print *,'element ',ispec,' belongs to the range and has skewness = ',sngl(equiangle_skewness) endif @@ -636,24 +556,15 @@ program check_mesh_quality_CUBIT_Abaqus ! ************* generate element data values ****************** ! output OpenDX header for data - if (NGNOD == 4) then - write(11,*) 'attribute "element type" string "quads"' - else - write(11,*) 'attribute "element type" string "cubes"' - endif + write(11,*) 'attribute "element type" string "cubes"' write(11,*) 'attribute "ref" string "positions"' write(11,*) 'object 3 class array type float rank 0 items ',ntotspecAVS_DX,' data follows' ! loop on all the elements do ispec = ispec_begin,ispec_end - if (NGNOD == 4) then - call create_mesh_quality_data_2D(x,y,z,ibool,ispec,NSPEC,NPOIN,NGNOD,VP_MAX,delta_t, & - equiangle_skewness,edge_aspect_ratio,diagonal_aspect_ratio,stability,distmin,distmax) - else - call create_mesh_quality_data_3D(x,y,z,ibool,ispec,NSPEC,NPOIN,NGNOD,VP_MAX,delta_t, & + call create_mesh_quality_data_3D(x,y,z,ibool,ispec,NSPEC,NGLOB,VP_MAX,delta_t, & equiangle_skewness,edge_aspect_ratio,diagonal_aspect_ratio,stability,distmin,distmax) - endif ! check if element needs to be output if (iformat == 2 .or. (iformat == 1 .and. & @@ -683,16 +594,18 @@ end program check_mesh_quality_CUBIT_Abaqus ! create mesh quality data for a given 3D spectral element - subroutine create_mesh_quality_data_3D(x,y,z,ibool,ispec,NSPEC,NPOIN,NGNOD,VP_MAX,delta_t, & + subroutine create_mesh_quality_data_3D(x,y,z,ibool,ispec,NSPEC,NGLOB,VP_MAX,delta_t, & equiangle_skewness,edge_aspect_ratio,diagonal_aspect_ratio,stability,distmin,distmax) use constants implicit none - integer :: iface,icorner,ispec,NSPEC,NPOIN,NGNOD,i + integer, parameter :: NGNOD = 8 ! hexahedral elements - double precision, dimension(NPOIN) :: x,y,z + integer :: iface,icorner,ispec,NSPEC,NGLOB,i + + double precision, dimension(NGLOB) :: x,y,z integer, dimension(NGNOD,NSPEC) :: ibool @@ -839,131 +752,3 @@ subroutine create_mesh_quality_data_3D(x,y,z,ibool,ispec,NSPEC,NPOIN,NGNOD,VP_MA end subroutine create_mesh_quality_data_3D -! -!===================================================================== -! - -! create mesh quality data for a given 2D spectral element - - subroutine create_mesh_quality_data_2D(x,y,z,ibool,ispec,NSPEC,NPOIN,NGNOD,VP_MAX,delta_t, & - equiangle_skewness,edge_aspect_ratio,diagonal_aspect_ratio,stability,distmin,distmax) - - use constants - - implicit none - - integer :: icorner,ispec,NSPEC,NPOIN,NGNOD,i - - double precision, dimension(NPOIN) :: x,y,z - - integer, dimension(NGNOD,NSPEC) :: ibool - - double precision, dimension(NGNOD) :: xelm,yelm,zelm - - double precision vectorA_x,vectorA_y,vectorA_z - double precision vectorB_x,vectorB_y,vectorB_z - double precision norm_A,norm_B,angle_vectors - double precision distmin,distmax,dist,dist1,dist2 - double precision equiangle_skewness,edge_aspect_ratio,diagonal_aspect_ratio - -! for stability - double precision :: stability,VP_MAX,delta_t - -! maximum polynomial degree for which we can compute the stability condition - integer, parameter :: NGLL_MAX_STABILITY = 15 - double precision, dimension(NGLL_MAX_STABILITY) :: percent_GLL - -! topology of faces of cube for skewness -! only one face in 2D - integer faces_topo(6) - -! store the corners of this element for the skewness routine - do i = 1,NGNOD - xelm(i) = x(ibool(i,ispec)) - yelm(i) = y(ibool(i,ispec)) - zelm(i) = z(ibool(i,ispec)) - enddo - -! define percentage of smallest distance between GLL points for NGLL points -! percentages were computed by calling the GLL points routine for each degree - percent_GLL(2) = 100.d0 - percent_GLL(3) = 50.d0 - percent_GLL(4) = 27.639320225002102d0 - percent_GLL(5) = 17.267316464601141d0 - percent_GLL(6) = 11.747233803526763d0 - percent_GLL(7) = 8.4888051860716516d0 - percent_GLL(8) = 6.4129925745196719d0 - percent_GLL(9) = 5.0121002294269914d0 - percent_GLL(10) = 4.0233045916770571d0 - percent_GLL(11) = 3.2999284795970416d0 - percent_GLL(12) = 2.7550363888558858d0 - percent_GLL(13) = 2.3345076678918053d0 - percent_GLL(14) = 2.0032477366369594d0 - percent_GLL(15) = 1.7377036748080721d0 - -! convert to real percentage - percent_GLL(:) = percent_GLL(:) / 100.d0 - -! check that the degree is not above the threshold for list of percentages - if (NGLLX > NGLL_MAX_STABILITY) stop 'degree too high to compute stability value' - -! define topology of faces of cube for skewness - -! only one face in 2D - faces_topo(1) = 1 - faces_topo(2) = 2 - faces_topo(3) = 3 - faces_topo(4) = 4 - -! define wraparound for angles for skewness calculation - faces_topo(5) = faces_topo(1) - faces_topo(6) = faces_topo(2) - -! compute equiangle skewness (as defined in Fluent/Gambit manual) -! and compute edge aspect ratio using the corners of the element - distmin = + HUGEVAL - distmax = - HUGEVAL - equiangle_skewness = - HUGEVAL - - do icorner = 1,4 - -! first vector of angle - vectorA_x = xelm(faces_topo(icorner)) - xelm(faces_topo(icorner+1)) - vectorA_y = yelm(faces_topo(icorner)) - yelm(faces_topo(icorner+1)) - vectorA_z = zelm(faces_topo(icorner)) - zelm(faces_topo(icorner+1)) - -! second vector of angle - vectorB_x = xelm(faces_topo(icorner+2)) - xelm(faces_topo(icorner+1)) - vectorB_y = yelm(faces_topo(icorner+2)) - yelm(faces_topo(icorner+1)) - vectorB_z = zelm(faces_topo(icorner+2)) - zelm(faces_topo(icorner+1)) - -! norm of vectors A and B - norm_A = sqrt(vectorA_x**2 + vectorA_y**2 + vectorA_z**2) - norm_B = sqrt(vectorB_x**2 + vectorB_y**2 + vectorB_z**2) - -! angle formed by the two vectors - angle_vectors = dacos((vectorA_x*vectorB_x + vectorA_y*vectorB_y + vectorA_z*vectorB_z) / (norm_A * norm_B)) - -! compute equiangle skewness - equiangle_skewness = max(equiangle_skewness,dabs(2.d0 * angle_vectors - PI) / PI) - -! compute min and max size of an edge - dist = sqrt(vectorA_x**2 + vectorA_y**2 + vectorA_z**2) - - distmin = min(distmin,dist) - distmax = max(distmax,dist) - - enddo - -! compute edge aspect ratio - edge_aspect_ratio = distmax / distmin - - stability = delta_t * VP_MAX / (distmin * percent_GLL(NGLLX)) - -! compute diagonal aspect ratio - dist1 = sqrt((xelm(1) - xelm(3))**2 + (yelm(1) - yelm(3))**2 + (zelm(1) - zelm(3))**2) - dist2 = sqrt((xelm(2) - xelm(4))**2 + (yelm(2) - yelm(4))**2 + (zelm(2) - zelm(4))**2) - diagonal_aspect_ratio = max(dist1,dist2) / min(dist1,dist2) - - end subroutine create_mesh_quality_data_2D - diff --git a/src/check_mesh_quality_CUBIT_Abaqus/rules.mk b/src/check_mesh_quality_CUBIT_Abaqus/rules.mk index 4c3a82e29..24a8d375c 100644 --- a/src/check_mesh_quality_CUBIT_Abaqus/rules.mk +++ b/src/check_mesh_quality_CUBIT_Abaqus/rules.mk @@ -45,7 +45,6 @@ check_mesh_quality_CUBIT_Abaqus_TARGETS = \ check_mesh_quality_CUBIT_Abaqus_OBJECTS = \ $O/check_mesh_quality_CUBIT_Abaqus.check.o \ $O/convert_skewness_to_angle.check.o \ - $O/unused_mod.shared_module.o \ $O/multiply_CUBIT_Abaqus_mesh_by_1000.check.o \ $(EMPTY_MACRO) @@ -89,7 +88,7 @@ $E/xmultiply_CUBIT_Abaqus_mesh_by_1000: $O/multiply_CUBIT_Abaqus_mesh_by_1000.ch #### rule to build each .o file below #### -$O/%.check.o: $S/%.f90 $O/shared_par.shared_module.o $O/unused_mod.shared_module.o +$O/%.check.o: $S/%.f90 $O/shared_par.shared_module.o ${FCCOMPILE_CHECK} ${FCFLAGS_f90} -c -o $@ $< diff --git a/src/cuda/check_fields_cuda.cu b/src/cuda/check_fields_cuda.cu index 9e363ce1a..57863c1b5 100644 --- a/src/cuda/check_fields_cuda.cu +++ b/src/cuda/check_fields_cuda.cu @@ -100,7 +100,7 @@ void exit_on_cuda_error(char* kernel_name) { #else myrank = 0; #endif - sprintf(filename,OUTPUT_FILES_PATH"/error_message_%06d.txt",myrank); + sprintf(filename,OUTPUT_FILES"/error_message_%06d.txt",myrank); fp = fopen(filename,"a+"); if (fp != NULL){ fprintf(fp,"Error after %s: %s\n", kernel_name, cudaGetErrorString(err)); @@ -131,7 +131,7 @@ void exit_on_error(char* info) { #else myrank = 0; #endif - sprintf(filename,OUTPUT_FILES_PATH"/error_message_%06d.txt",myrank); + sprintf(filename,OUTPUT_FILES"/error_message_%06d.txt",myrank); fp = fopen(filename,"a+"); if (fp != NULL){ fprintf(fp,"ERROR: %s\n",info); @@ -164,7 +164,7 @@ void print_CUDA_error_if_any(cudaError_t err, int num) { #else myrank = 0; #endif - sprintf(filename,OUTPUT_FILES_PATH"/error_message_%06d.txt",myrank); + sprintf(filename,OUTPUT_FILES"/error_message_%06d.txt",myrank); fp = fopen(filename,"a+"); if (fp != NULL){ fprintf(fp,"\nCUDA error !!!!! <%s> !!!!! \nat CUDA call error code: # %d\n",cudaGetErrorString(err),num); @@ -312,12 +312,12 @@ void output_free_memory(int myrank,char* info_str) { do_output_info = 0; if (myrank == 0){ do_output_info = 1; - sprintf(filename,OUTPUT_FILES_PATH"/gpu_device_mem_usage.txt"); + sprintf(filename,OUTPUT_FILES"/gpu_device_mem_usage.txt"); } // debugging if (DEBUG){ do_output_info = 1; - sprintf(filename,OUTPUT_FILES_PATH"/gpu_device_mem_usage_proc_%06d.txt",myrank); + sprintf(filename,OUTPUT_FILES"/gpu_device_mem_usage_proc_%06d.txt",myrank); } // outputs to file diff --git a/src/cuda/initialize_cuda.cu b/src/cuda/initialize_cuda.cu index d7b0ea0a3..c58a83905 100644 --- a/src/cuda/initialize_cuda.cu +++ b/src/cuda/initialize_cuda.cu @@ -169,12 +169,12 @@ void FC_FUNC_(initialize_cuda_device, do_output_info = 0; if (myrank == 0){ do_output_info = 1; - sprintf(filename,OUTPUT_FILES_PATH"/gpu_device_info.txt"); + sprintf(filename,OUTPUT_FILES"/gpu_device_info.txt"); } // debugging if (DEBUG){ do_output_info = 1; - sprintf(filename,OUTPUT_FILES_PATH"/gpu_device_info_proc_%06d.txt",myrank); + sprintf(filename,OUTPUT_FILES"/gpu_device_info_proc_%06d.txt",myrank); } // output to file diff --git a/src/cuda/mesh_constants_cuda.h b/src/cuda/mesh_constants_cuda.h index bfc4ccb66..1e786e184 100644 --- a/src/cuda/mesh_constants_cuda.h +++ b/src/cuda/mesh_constants_cuda.h @@ -122,7 +122,7 @@ /* ----------------------------------------------------------------------------------------------- */ // Output paths, see setup/constants.h -#define OUTPUT_FILES_PATH "./OUTPUT_FILES/" +#define OUTPUT_FILES "./OUTPUT_FILES/" /* ----------------------------------------------------------------------------------------------- */ diff --git a/src/decompose_mesh/decompose_mesh.F90 b/src/decompose_mesh/decompose_mesh.F90 index 4c90c2402..7f29e3b9b 100644 --- a/src/decompose_mesh/decompose_mesh.F90 +++ b/src/decompose_mesh/decompose_mesh.F90 @@ -40,7 +40,7 @@ module decompose_mesh use shared_parameters - use part_decompose_mesh,only: long,MAX_STRING_LEN,ACOUSTIC_LOAD,SAVE_MOHO_MESH,nfaces,NGNOD_EIGHT_CORNERS, & + use part_decompose_mesh,only: long,MAX_STRING_LEN,ACOUSTIC_LOAD,nfaces,NGNOD_EIGHT_CORNERS, & write_interfaces_database,write_moho_surface_database,write_glob2loc_nodes_database, & write_material_props_database,write_boundaries_database, & write_partition_database,write_cpml_database, & @@ -1096,6 +1096,7 @@ subroutine write_mesh_databases() if (ier /= 0) stop 'Error allocating array my_nb_interfaces' if (COUPLE_WITH_EXTERNAL_CODE) open(124,file='Numglob2loc_elmn.txt') + !! To verify for NOBU version ==> all about 'Numglob2loc_elmn.txt' is unchanged at the moment ! writes out Database file for each partition do ipart = 0, nparts-1 diff --git a/src/decompose_mesh/fault_scotch.f90 b/src/decompose_mesh/fault_scotch.f90 index 75136b29c..b135f3cb0 100644 --- a/src/decompose_mesh/fault_scotch.f90 +++ b/src/decompose_mesh/fault_scotch.f90 @@ -28,7 +28,7 @@ module fault_scotch use constants,only: MAX_STRING_LEN - + use shared_parameters,only: NGNOD2D implicit none private @@ -124,8 +124,8 @@ subroutine read_single_fault_file(f,ifault,localpath_name) f%nspec = nspec_side1 allocate(f%ispec1(f%nspec)) allocate(f%ispec2(f%nspec)) - allocate(f%inodes1(4,f%nspec)) - allocate(f%inodes2(4,f%nspec)) + allocate(f%inodes1(NGNOD2D,f%nspec)) + allocate(f%inodes2(NGNOD2D,f%nspec)) do e=1,f%nspec read(101,*) f%ispec1(e),f%inodes1(:,e) enddo @@ -197,13 +197,13 @@ subroutine close_fault_single(f,nodes_coords,nnodes) logical :: found_it do i = 1,f%nspec - do k2=1,4 + do k2=1,NGNOD2D iglob2 = f%inodes2(k2,i) found_it = .false. xyz_2 = nodes_coords(:,iglob2) do j = 1,f%nspec - do k1=1,4 + do k1=1,NGNOD2D iglob1 = f%inodes1(k1,j) xyz_1 = nodes_coords(:,iglob1) xyz = xyz_2-xyz_1 @@ -479,7 +479,7 @@ subroutine write_fault_database(IIN_database, iproc, nelmnts, glob2loc_elmnts, & integer :: i,j,k,iflt,e integer :: nspec_fault_1,nspec_fault_2 - integer :: loc_nodes(4),inodes(4) + integer :: loc_nodes(NGNOD2D),inodes(NGNOD2D) do iflt=1,size(faults) @@ -504,7 +504,7 @@ subroutine write_fault_database(IIN_database, iproc, nelmnts, glob2loc_elmnts, & e = faults(iflt)%ispec1(i) if (part(e-1) == iproc) then inodes = faults(iflt)%inodes1(:,i) - do k=1,4 + do k=1,NGNOD2D do j = glob2loc_nodes_nparts(inodes(k)-1), glob2loc_nodes_nparts(inodes(k))-1 if (glob2loc_nodes_parts(j) == iproc) then loc_nodes(k) = glob2loc_nodes(j) + 1 @@ -520,7 +520,7 @@ subroutine write_fault_database(IIN_database, iproc, nelmnts, glob2loc_elmnts, & e = faults(iflt)%ispec2(i) if (part(e-1) == iproc) then inodes = faults(iflt)%inodes2(:,i) - do k=1,4 + do k=1,NGNOD2D do j = glob2loc_nodes_nparts(inodes(k)-1), glob2loc_nodes_nparts(inodes(k))-1 if (glob2loc_nodes_parts(j) == iproc) then loc_nodes(k) = glob2loc_nodes(j)+1 diff --git a/src/decompose_mesh/part_decompose_mesh.f90 b/src/decompose_mesh/part_decompose_mesh.f90 index 2a8a3ea1a..cce6090b6 100644 --- a/src/decompose_mesh/part_decompose_mesh.f90 +++ b/src/decompose_mesh/part_decompose_mesh.f90 @@ -27,7 +27,7 @@ module part_decompose_mesh - use constants,only: MAX_STRING_LEN,NGNOD2D_FOUR_CORNERS,NGNOD_EIGHT_CORNERS,SAVE_MOHO_MESH + use constants,only: MAX_STRING_LEN,NGNOD2D_FOUR_CORNERS,NGNOD_EIGHT_CORNERS implicit none @@ -797,7 +797,7 @@ subroutine write_partition_database(IIN_database, iproc, nspec_local, nspec, elm write(IIN_database) glob2loc_elmnts(i)+1,num_modele(1,i+1),num_modele(2,i+1),(loc_nodes(k)+1, k=0,NGNOD-1) ! writes out to file Numglob2loc_elmn.txt - if (COUPLE_WITH_EXTERNAL_CODE) write(124,*) i+1,glob2loc_elmnts(i)+1,iproc + if (COUPLE_WITH_EXTERNAL_CODE) write(124,*) i+1,glob2loc_elmnts(i)+1,iproc !! To verify for NOBU version endif enddo endif diff --git a/src/decompose_mesh/program_decompose_mesh.f90 b/src/decompose_mesh/program_decompose_mesh.f90 index 1394ceba8..8934e8f06 100644 --- a/src/decompose_mesh/program_decompose_mesh.f90 +++ b/src/decompose_mesh/program_decompose_mesh.f90 @@ -37,7 +37,8 @@ program pre_meshfem3D implicit none - integer :: i + integer :: i,myrank + logical :: BROADCAST_AFTER_READ character(len=MAX_STRING_LEN) :: arg(3) ! check usage @@ -60,10 +61,9 @@ program pre_meshfem3D outputpath_name = arg(3) ! needs local_path for mesh files - call read_parameter_file() - - ! gets adios parameters in Par_file - call read_adios_parameters() + myrank = 0 + BROADCAST_AFTER_READ = .false. + call read_parameter_file(myrank,BROADCAST_AFTER_READ) ! checks adios parameters if (ADIOS_FOR_DATABASES) then diff --git a/src/decompose_mesh/rules.mk b/src/decompose_mesh/rules.mk index f13c5c43a..fa77bf3da 100644 --- a/src/decompose_mesh/rules.mk +++ b/src/decompose_mesh/rules.mk @@ -80,8 +80,8 @@ xscotch: $E/xscotch ${SCOTCH_DIR}/include/scotchf.h: xscotch # rules for the pure Fortran version -$E/xdecompose_mesh: ${SCOTCH_DIR}/include/scotchf.h $(decompose_mesh_SHARED_OBJECTS) $(decompose_mesh_OBJECTS) - ${FCLINK} -o $E/xdecompose_mesh $(decompose_mesh_SHARED_OBJECTS) $(decompose_mesh_OBJECTS) $(SCOTCH_LIBS) +$E/xdecompose_mesh: ${SCOTCH_DIR}/include/scotchf.h $(decompose_mesh_SHARED_OBJECTS) $(decompose_mesh_OBJECTS) $(COND_MPI_OBJECTS) + ${FCLINK} -o $E/xdecompose_mesh $(decompose_mesh_SHARED_OBJECTS) $(decompose_mesh_OBJECTS) $(SCOTCH_LIBS) $(COND_MPI_OBJECTS) # scotch $E/xscotch: @@ -100,8 +100,8 @@ endif ### Module dependencies ### -$O/decompose_mesh.dec.o: $O/part_decompose_mesh.dec.o $O/fault_scotch.dec.o ${SCOTCH_DIR}/include/scotchf.h $O/shared_par.shared_module.o -$O/program_decompose_mesh.dec.o: $O/decompose_mesh.dec.o $O/shared_par.shared_module.o +$O/decompose_mesh.dec.o: $O/part_decompose_mesh.dec.o $O/fault_scotch.dec.o ${SCOTCH_DIR}/include/scotchf.h $O/shared_par.shared_module.o $(COND_MPI_OBJECTS) +$O/program_decompose_mesh.dec.o: $O/decompose_mesh.dec.o $O/shared_par.shared_module.o $(COND_MPI_OBJECTS) ####################################### diff --git a/src/decompose_mesh/scotch_5.1.12b/doc/CeCILL-C_V1-fr.txt b/src/decompose_mesh/scotch_5.1.12b/doc/CeCILL-C_V1-fr.txt deleted file mode 100644 index 4fa44ba74..000000000 --- a/src/decompose_mesh/scotch_5.1.12b/doc/CeCILL-C_V1-fr.txt +++ /dev/null @@ -1,521 +0,0 @@ - -CONTRAT DE LICENCE DE LOGICIEL LIBRE CeCILL-C - - - Avertissement - -Ce contrat est une licence de logiciel libre issue d'une concertation -entre ses auteurs afin que le respect de deux grands principes préside à -sa rédaction: - - * d'une part, le respect des principes de diffusion des logiciels - libres: accès au code source, droits étendus conférés aux - utilisateurs, - * d'autre part, la désignation d'un droit applicable, le droit - français, auquel elle est conforme, tant au regard du droit de la - responsabilité civile que du droit de la propriété intellectuelle - et de la protection qu'il offre aux auteurs et titulaires des - droits patrimoniaux sur un logiciel. - -Les auteurs de la licence CeCILL-C (pour Ce[a] C[nrs] I[nria] L[ogiciel] -L[ibre]) sont: - -Commissariat à l'Energie Atomique - CEA, établissement public de -recherche à caractère scientifique, technique et industriel, dont le -siège est situé 25 rue Leblanc, immeuble Le Ponant D, 75015 Paris. - -Centre National de la Recherche Scientifique - CNRS, établissement -public à caractère scientifique et technologique, dont le siège est -situé 3 rue Michel-Ange, 75794 Paris cedex 16. - -Institut National de Recherche en Informatique et en Automatique - -INRIA, établissement public à caractère scientifique et technologique, -dont le siège est situé Domaine de Voluceau, Rocquencourt, BP 105, 78153 -Le Chesnay cedex. - - - Préambule - -Ce contrat est une licence de logiciel libre dont l'objectif est de -conférer aux utilisateurs la liberté de modifier et de réutiliser le -logiciel régi par cette licence. - -L'exercice de cette liberté est assorti d'une obligation de remettre à -la disposition de la communauté les modifications apportées au code -source du logiciel afin de contribuer à son évolution. - -L'accessibilité au code source et les droits de copie, de modification -et de redistribution qui découlent de ce contrat ont pour contrepartie -de n'offrir aux utilisateurs qu'une garantie limitée et de ne faire -peser sur l'auteur du logiciel, le titulaire des droits patrimoniaux et -les concédants successifs qu'une responsabilité restreinte. - -A cet égard l'attention de l'utilisateur est attirée sur les risques -associés au chargement, à l'utilisation, à la modification et/ou au -développement et à la reproduction du logiciel par l'utilisateur étant -donné sa spécificité de logiciel libre, qui peut le rendre complexe à -manipuler et qui le réserve donc à des développeurs ou des -professionnels avertis possédant des connaissances informatiques -approfondies. Les utilisateurs sont donc invités à charger et tester -l'adéquation du logiciel à leurs besoins dans des conditions permettant -d'assurer la sécurité de leurs systèmes et/ou de leurs données et, plus -généralement, à l'utiliser et l'exploiter dans les mêmes conditions de -sécurité. Ce contrat peut être reproduit et diffusé librement, sous -réserve de le conserver en l'état, sans ajout ni suppression de clauses. - -Ce contrat est susceptible de s'appliquer à tout logiciel dont le -titulaire des droits patrimoniaux décide de soumettre l'exploitation aux -dispositions qu'il contient. - - - Article 1 - DEFINITIONS - -Dans ce contrat, les termes suivants, lorsqu'ils seront écrits avec une -lettre capitale, auront la signification suivante: - -Contrat: désigne le présent contrat de licence, ses éventuelles versions -postérieures et annexes. - -Logiciel: désigne le logiciel sous sa forme de Code Objet et/ou de Code -Source et le cas échéant sa documentation, dans leur état au moment de -l'acceptation du Contrat par le Licencié. - -Logiciel Initial: désigne le Logiciel sous sa forme de Code Source et -éventuellement de Code Objet et le cas échéant sa documentation, dans -leur état au moment de leur première diffusion sous les termes du Contrat. - -Logiciel Modifié: désigne le Logiciel modifié par au moins une -Contribution Intégrée. - -Code Source: désigne l'ensemble des instructions et des lignes de -programme du Logiciel et auquel l'accès est nécessaire en vue de -modifier le Logiciel. - -Code Objet: désigne les fichiers binaires issus de la compilation du -Code Source. - -Titulaire: désigne le ou les détenteurs des droits patrimoniaux d'auteur -sur le Logiciel Initial. - -Licencié: désigne le ou les utilisateurs du Logiciel ayant accepté le -Contrat. - -Contributeur: désigne le Licencié auteur d'au moins une Contribution -Intégrée. - -Concédant: désigne le Titulaire ou toute personne physique ou morale -distribuant le Logiciel sous le Contrat. - -Contribution Intégrée: désigne l'ensemble des modifications, -corrections, traductions, adaptations et/ou nouvelles fonctionnalités -intégrées dans le Code Source par tout Contributeur. - -Module Lié: désigne un ensemble de fichiers sources y compris leur -documentation qui, sans modification du Code Source, permet de réaliser -des fonctionnalités ou services supplémentaires à ceux fournis par le -Logiciel. - -Logiciel Dérivé: désigne toute combinaison du Logiciel, modifié ou non, -et d'un Module Lié. - -Parties: désigne collectivement le Licencié et le Concédant. - -Ces termes s'entendent au singulier comme au pluriel. - - - Article 2 - OBJET - -Le Contrat a pour objet la concession par le Concédant au Licencié d'une -licence non exclusive, cessible et mondiale du Logiciel telle que -définie ci-après à l'article 5 pour toute la durée de protection des droits -portant sur ce Logiciel. - - - Article 3 - ACCEPTATION - -3.1 L'acceptation par le Licencié des termes du Contrat est réputée -acquise du fait du premier des faits suivants: - - * (i) le chargement du Logiciel par tout moyen notamment par - téléchargement à partir d'un serveur distant ou par chargement à - partir d'un support physique; - * (ii) le premier exercice par le Licencié de l'un quelconque des - droits concédés par le Contrat. - -3.2 Un exemplaire du Contrat, contenant notamment un avertissement -relatif aux spécificités du Logiciel, à la restriction de garantie et à -la limitation à un usage par des utilisateurs expérimentés a été mis à -disposition du Licencié préalablement à son acceptation telle que -définie à l'article 3.1 ci dessus et le Licencié reconnaît en avoir pris -connaissance. - - - Article 4 - ENTREE EN VIGUEUR ET DUREE - - - 4.1 ENTREE EN VIGUEUR - -Le Contrat entre en vigueur à la date de son acceptation par le Licencié -telle que définie en 3.1. - - - 4.2 DUREE - -Le Contrat produira ses effets pendant toute la durée légale de -protection des droits patrimoniaux portant sur le Logiciel. - - - Article 5 - ETENDUE DES DROITS CONCEDES - -Le Concédant concède au Licencié, qui accepte, les droits suivants sur -le Logiciel pour toutes destinations et pour la durée du Contrat dans -les conditions ci-après détaillées. - -Par ailleurs, si le Concédant détient ou venait à détenir un ou -plusieurs brevets d'invention protégeant tout ou partie des -fonctionnalités du Logiciel ou de ses composants, il s'engage à ne pas -opposer les éventuels droits conférés par ces brevets aux Licenciés -successifs qui utiliseraient, exploiteraient ou modifieraient le -Logiciel. En cas de cession de ces brevets, le Concédant s'engage à -faire reprendre les obligations du présent alinéa aux cessionnaires. - - - 5.1 DROIT D'UTILISATION - -Le Licencié est autorisé à utiliser le Logiciel, sans restriction quant -aux domaines d'application, étant ci-après précisé que cela comporte: - - 1. la reproduction permanente ou provisoire du Logiciel en tout ou - partie par tout moyen et sous toute forme. - - 2. le chargement, l'affichage, l'exécution, ou le stockage du - Logiciel sur tout support. - - 3. la possibilité d'en observer, d'en étudier, ou d'en tester le - fonctionnement afin de déterminer les idées et principes qui sont - à la base de n'importe quel élément de ce Logiciel; et ceci, - lorsque le Licencié effectue toute opération de chargement, - d'affichage, d'exécution, de transmission ou de stockage du - Logiciel qu'il est en droit d'effectuer en vertu du Contrat. - - - 5.2 DROIT DE MODIFICATION - -Le droit de modification comporte le droit de traduire, d'adapter, -d'arranger ou d'apporter toute autre modification au Logiciel et le -droit de reproduire le logiciel en résultant. Il comprend en particulier -le droit de créer un Logiciel Dérivé. - -Le Licencié est autorisé à apporter toute modification au Logiciel sous -réserve de mentionner, de façon explicite, son nom en tant qu'auteur de -cette modification et la date de création de celle-ci. - - - 5.3 DROIT DE DISTRIBUTION - -Le droit de distribution comporte notamment le droit de diffuser, de -transmettre et de communiquer le Logiciel au public sur tout support et -par tout moyen ainsi que le droit de mettre sur le marché à titre -onéreux ou gratuit, un ou des exemplaires du Logiciel par tout procédé. - -Le Licencié est autorisé à distribuer des copies du Logiciel, modifié ou -non, à des tiers dans les conditions ci-après détaillées. - - - 5.3.1 DISTRIBUTION DU LOGICIEL SANS MODIFICATION - -Le Licencié est autorisé à distribuer des copies conformes du Logiciel, -sous forme de Code Source ou de Code Objet, à condition que cette -distribution respecte les dispositions du Contrat dans leur totalité et -soit accompagnée: - - 1. d'un exemplaire du Contrat, - - 2. d'un avertissement relatif à la restriction de garantie et de - responsabilité du Concédant telle que prévue aux articles 8 - et 9, - -et que, dans le cas où seul le Code Objet du Logiciel est redistribué, -le Licencié permette un accès effectif au Code Source complet du -Logiciel pendant au moins toute la durée de sa distribution du Logiciel, -étant entendu que le coût additionnel d'acquisition du Code Source ne -devra pas excéder le simple coût de transfert des données. - - - 5.3.2 DISTRIBUTION DU LOGICIEL MODIFIE - -Lorsque le Licencié apporte une Contribution Intégrée au Logiciel, les -conditions de distribution du Logiciel Modifié en résultant sont alors -soumises à l'intégralité des dispositions du Contrat. - -Le Licencié est autorisé à distribuer le Logiciel Modifié sous forme de -code source ou de code objet, à condition que cette distribution -respecte les dispositions du Contrat dans leur totalité et soit -accompagnée: - - 1. d'un exemplaire du Contrat, - - 2. d'un avertissement relatif à la restriction de garantie et de - responsabilité du Concédant telle que prévue aux articles 8 - et 9, - -et que, dans le cas où seul le code objet du Logiciel Modifié est -redistribué, le Licencié permette un accès effectif à son code source -complet pendant au moins toute la durée de sa distribution du Logiciel -Modifié, étant entendu que le coût additionnel d'acquisition du code -source ne devra pas excéder le simple coût de transfert des données. - - - 5.3.3 DISTRIBUTION DU LOGICIEL DERIVE - -Lorsque le Licencié crée un Logiciel Dérivé, ce Logiciel Dérivé peut -être distribué sous un contrat de licence autre que le présent Contrat à -condition de respecter les obligations de mention des droits sur le -Logiciel telles que définies à l'article 6.4. Dans le cas où la création du -Logiciel Dérivé a nécessité une modification du Code Source le licencié -s'engage à ce que: - - 1. le Logiciel Modifié correspondant à cette modification soit régi - par le présent Contrat, - 2. les Contributions Intégrées dont le Logiciel Modifié résulte - soient clairement identifiées et documentées, - 3. le Licencié permette un accès effectif au code source du Logiciel - Modifié, pendant au moins toute la durée de la distribution du - Logiciel Dérivé, de telle sorte que ces modifications puissent - être reprises dans une version ultérieure du Logiciel, étant - entendu que le coût additionnel d'acquisition du code source du - Logiciel Modifié ne devra pas excéder le simple coût du transfert - des données. - - - 5.3.4 COMPATIBILITE AVEC LA LICENCE CeCILL - -Lorsqu'un Logiciel Modifié contient une Contribution Intégrée soumise au -contrat de licence CeCILL, ou lorsqu'un Logiciel Dérivé contient un -Module Lié soumis au contrat de licence CeCILL, les stipulations prévues -au troisième item de l'article 6.4 sont facultatives. - - - Article 6 - PROPRIETE INTELLECTUELLE - - - 6.1 SUR LE LOGICIEL INITIAL - -Le Titulaire est détenteur des droits patrimoniaux sur le Logiciel -Initial. Toute utilisation du Logiciel Initial est soumise au respect -des conditions dans lesquelles le Titulaire a choisi de diffuser son -oeuvre et nul autre n'a la faculté de modifier les conditions de -diffusion de ce Logiciel Initial. - -Le Titulaire s'engage à ce que le Logiciel Initial reste au moins régi -par le Contrat et ce, pour la durée visée à l'article 4.2. - - - 6.2 SUR LES CONTRIBUTIONS INTEGREES - -Le Licencié qui a développé une Contribution Intégrée est titulaire sur -celle-ci des droits de propriété intellectuelle dans les conditions -définies par la législation applicable. - - - 6.3 SUR LES MODULES LIES - -Le Licencié qui a développé un Module Lié est titulaire sur celui-ci des -droits de propriété intellectuelle dans les conditions définies par la -législation applicable et reste libre du choix du contrat régissant sa -diffusion dans les conditions définies à l'article 5.3.3. - - - 6.4 MENTIONS DES DROITS - -Le Licencié s'engage expressément: - - 1. à ne pas supprimer ou modifier de quelque manière que ce soit les - mentions de propriété intellectuelle apposées sur le Logiciel; - - 2. à reproduire à l'identique lesdites mentions de propriété - intellectuelle sur les copies du Logiciel modifié ou non; - - 3. à faire en sorte que l'utilisation du Logiciel, ses mentions de - propriété intellectuelle et le fait qu'il est régi par le Contrat - soient indiqués dans un texte facilement accessible notamment - depuis l'interface de tout Logiciel Dérivé. - -Le Licencié s'engage à ne pas porter atteinte, directement ou -indirectement, aux droits de propriété intellectuelle du Titulaire et/ou -des Contributeurs sur le Logiciel et à prendre, le cas échéant, à -l'égard de son personnel toutes les mesures nécessaires pour assurer le -respect des dits droits de propriété intellectuelle du Titulaire et/ou -des Contributeurs. - - - Article 7 - SERVICES ASSOCIES - -7.1 Le Contrat n'oblige en aucun cas le Concédant à la réalisation de -prestations d'assistance technique ou de maintenance du Logiciel. - -Cependant le Concédant reste libre de proposer ce type de services. Les -termes et conditions d'une telle assistance technique et/ou d'une telle -maintenance seront alors déterminés dans un acte séparé. Ces actes de -maintenance et/ou assistance technique n'engageront que la seule -responsabilité du Concédant qui les propose. - -7.2 De même, tout Concédant est libre de proposer, sous sa seule -responsabilité, à ses licenciés une garantie, qui n'engagera que lui, -lors de la redistribution du Logiciel et/ou du Logiciel Modifié et ce, -dans les conditions qu'il souhaite. Cette garantie et les modalités -financières de son application feront l'objet d'un acte séparé entre le -Concédant et le Licencié. - - - Article 8 - RESPONSABILITE - -8.1 Sous réserve des dispositions de l'article 8.2, le Licencié a la -faculté, sous réserve de prouver la faute du Concédant concerné, de -solliciter la réparation du préjudice direct qu'il subirait du fait du -Logiciel et dont il apportera la preuve. - -8.2 La responsabilité du Concédant est limitée aux engagements pris en -application du Contrat et ne saurait être engagée en raison notamment: -(i) des dommages dus à l'inexécution, totale ou partielle, de ses -obligations par le Licencié, (ii) des dommages directs ou indirects -découlant de l'utilisation ou des performances du Logiciel subis par le -Licencié et (iii) plus généralement d'un quelconque dommage indirect. En -particulier, les Parties conviennent expressément que tout préjudice -financier ou commercial (par exemple perte de données, perte de -bénéfices, perte d'exploitation, perte de clientèle ou de commandes, -manque à gagner, trouble commercial quelconque) ou toute action dirigée -contre le Licencié par un tiers, constitue un dommage indirect et -n'ouvre pas droit à réparation par le Concédant. - - - Article 9 - GARANTIE - -9.1 Le Licencié reconnaît que l'état actuel des connaissances -scientifiques et techniques au moment de la mise en circulation du -Logiciel ne permet pas d'en tester et d'en vérifier toutes les -utilisations ni de détecter l'existence d'éventuels défauts. L'attention -du Licencié a été attirée sur ce point sur les risques associés au -chargement, à l'utilisation, la modification et/ou au développement et à -la reproduction du Logiciel qui sont réservés à des utilisateurs avertis. - -Il relève de la responsabilité du Licencié de contrôler, par tous -moyens, l'adéquation du produit à ses besoins, son bon fonctionnement et -de s'assurer qu'il ne causera pas de dommages aux personnes et aux biens. - -9.2 Le Concédant déclare de bonne foi être en droit de concéder -l'ensemble des droits attachés au Logiciel (comprenant notamment les -droits visés à l'article 5). - -9.3 Le Licencié reconnaît que le Logiciel est fourni "en l'état" par le -Concédant sans autre garantie, expresse ou tacite, que celle prévue à -l'article 9.2 et notamment sans aucune garantie sur sa valeur commerciale, -son caractère sécurisé, innovant ou pertinent. - -En particulier, le Concédant ne garantit pas que le Logiciel est exempt -d'erreur, qu'il fonctionnera sans interruption, qu'il sera compatible -avec l'équipement du Licencié et sa configuration logicielle ni qu'il -remplira les besoins du Licencié. - -9.4 Le Concédant ne garantit pas, de manière expresse ou tacite, que le -Logiciel ne porte pas atteinte à un quelconque droit de propriété -intellectuelle d'un tiers portant sur un brevet, un logiciel ou sur tout -autre droit de propriété. Ainsi, le Concédant exclut toute garantie au -profit du Licencié contre les actions en contrefaçon qui pourraient être -diligentées au titre de l'utilisation, de la modification, et de la -redistribution du Logiciel. Néanmoins, si de telles actions sont -exercées contre le Licencié, le Concédant lui apportera son aide -technique et juridique pour sa défense. Cette aide technique et -juridique est déterminée au cas par cas entre le Concédant concerné et -le Licencié dans le cadre d'un protocole d'accord. Le Concédant dégage -toute responsabilité quant à l'utilisation de la dénomination du -Logiciel par le Licencié. Aucune garantie n'est apportée quant à -l'existence de droits antérieurs sur le nom du Logiciel et sur -l'existence d'une marque. - - - Article 10 - RESILIATION - -10.1 En cas de manquement par le Licencié aux obligations mises à sa -charge par le Contrat, le Concédant pourra résilier de plein droit le -Contrat trente (30) jours après notification adressée au Licencié et -restée sans effet. - -10.2 Le Licencié dont le Contrat est résilié n'est plus autorisé à -utiliser, modifier ou distribuer le Logiciel. Cependant, toutes les -licences qu'il aura concédées antérieurement à la résiliation du Contrat -resteront valides sous réserve qu'elles aient été effectuées en -conformité avec le Contrat. - - - Article 11 - DISPOSITIONS DIVERSES - - - 11.1 CAUSE EXTERIEURE - -Aucune des Parties ne sera responsable d'un retard ou d'une défaillance -d'exécution du Contrat qui serait dû à un cas de force majeure, un cas -fortuit ou une cause extérieure, telle que, notamment, le mauvais -fonctionnement ou les interruptions du réseau électrique ou de -télécommunication, la paralysie du réseau liée à une attaque -informatique, l'intervention des autorités gouvernementales, les -catastrophes naturelles, les dégâts des eaux, les tremblements de terre, -le feu, les explosions, les grèves et les conflits sociaux, l'état de -guerre... - -11.2 Le fait, par l'une ou l'autre des Parties, d'omettre en une ou -plusieurs occasions de se prévaloir d'une ou plusieurs dispositions du -Contrat, ne pourra en aucun cas impliquer renonciation par la Partie -intéressée à s'en prévaloir ultérieurement. - -11.3 Le Contrat annule et remplace toute convention antérieure, écrite -ou orale, entre les Parties sur le même objet et constitue l'accord -entier entre les Parties sur cet objet. Aucune addition ou modification -aux termes du Contrat n'aura d'effet à l'égard des Parties à moins -d'être faite par écrit et signée par leurs représentants dûment habilités. - -11.4 Dans l'hypothèse où une ou plusieurs des dispositions du Contrat -s'avèrerait contraire à une loi ou à un texte applicable, existants ou -futurs, cette loi ou ce texte prévaudrait, et les Parties feraient les -amendements nécessaires pour se conformer à cette loi ou à ce texte. -Toutes les autres dispositions resteront en vigueur. De même, la -nullité, pour quelque raison que ce soit, d'une des dispositions du -Contrat ne saurait entraîner la nullité de l'ensemble du Contrat. - - - 11.5 LANGUE - -Le Contrat est rédigé en langue française et en langue anglaise, ces -deux versions faisant également foi. - - - Article 12 - NOUVELLES VERSIONS DU CONTRAT - -12.1 Toute personne est autorisée à copier et distribuer des copies de -ce Contrat. - -12.2 Afin d'en préserver la cohérence, le texte du Contrat est protégé -et ne peut être modifié que par les auteurs de la licence, lesquels se -réservent le droit de publier périodiquement des mises à jour ou de -nouvelles versions du Contrat, qui posséderont chacune un numéro -distinct. Ces versions ultérieures seront susceptibles de prendre en -compte de nouvelles problématiques rencontrées par les logiciels libres. - -12.3 Tout Logiciel diffusé sous une version donnée du Contrat ne pourra -faire l'objet d'une diffusion ultérieure que sous la même version du -Contrat ou une version postérieure. - - - Article 13 - LOI APPLICABLE ET COMPETENCE TERRITORIALE - -13.1 Le Contrat est régi par la loi française. Les Parties conviennent -de tenter de régler à l'amiable les différends ou litiges qui -viendraient à se produire par suite ou à l'occasion du Contrat. - -13.2 A défaut d'accord amiable dans un délai de deux (2) mois à compter -de leur survenance et sauf situation relevant d'une procédure d'urgence, -les différends ou litiges seront portés par la Partie la plus diligente -devant les Tribunaux compétents de Paris. - - -Version 1.0 du 2006-09-05. diff --git a/src/decompose_mesh/scotch_5.1.12b/doc/CeCILL-C_V1-en.txt b/src/decompose_mesh/scotch_5.1.12b/doc/Licence_CeCILL-C_V1-en.txt similarity index 99% rename from src/decompose_mesh/scotch_5.1.12b/doc/CeCILL-C_V1-en.txt rename to src/decompose_mesh/scotch_5.1.12b/doc/Licence_CeCILL-C_V1-en.txt index 3d2a81914..260afdc45 100644 --- a/src/decompose_mesh/scotch_5.1.12b/doc/CeCILL-C_V1-en.txt +++ b/src/decompose_mesh/scotch_5.1.12b/doc/Licence_CeCILL-C_V1-en.txt @@ -19,7 +19,7 @@ the two main principles guiding its drafting: The authors of the CeCILL-C (for Ce[a] C[nrs] I[nria] L[ogiciel] L[ibre]) license are: -Commissariat à l'Energie Atomique - CEA, a public scientific, technical +Commissariat a l'Energie Atomique - CEA, a public scientific, technical and industrial research establishment, having its principal place of business at 25 rue Leblanc, immeuble Le Ponant D, 75015 Paris, France. @@ -122,7 +122,7 @@ These expressions may be used both in singular and plural form. The purpose of the Agreement is the grant by the Licensor to the Licensee of a non-exclusive, transferable and worldwide license for the Software as set forth in Article 5 hereinafter for the whole term of the -protection granted by the rights over said Software. +protection granted by the rights over said Software. Article 3 - ACCEPTANCE @@ -268,7 +268,7 @@ When the Licensee creates Derivative Software, this Derivative Software may be distributed under a license agreement other than this Agreement, subject to compliance with the requirement to include a notice concerning the rights over the Software as defined in Article 6.4. -In the event the creation of the Derivative Software required modification +In the event the creation of the Derivative Software required modification of the Source Code, the Licensee undertakes that: 1. the resulting Modified Software will be governed by this Agreement, @@ -338,7 +338,7 @@ The Licensee expressly undertakes: The Licensee undertakes not to directly or indirectly infringe the intellectual property rights of the Holder and/or Contributors on the -Software and to take, where applicable, vis-à-vis its staff, any and all +Software and to take, where applicable, vis-a-vis its staff, any and all measures required to ensure respect of said intellectual property rights of the Holder and/or Contributors. diff --git a/src/decompose_mesh/scotch_5.1.12b/doc/Licence_CeCILL-C_V1-fr.txt b/src/decompose_mesh/scotch_5.1.12b/doc/Licence_CeCILL-C_V1-fr.txt new file mode 100644 index 000000000..ec37d1c1e --- /dev/null +++ b/src/decompose_mesh/scotch_5.1.12b/doc/Licence_CeCILL-C_V1-fr.txt @@ -0,0 +1,521 @@ + +CONTRAT DE LICENCE DE LOGICIEL LIBRE CeCILL-C + + + Avertissement + +Ce contrat est une licence de logiciel libre issue d'une concertation +entre ses auteurs afin que le respect de deux grands principes preside a +sa redaction: + + * d'une part, le respect des principes de diffusion des logiciels + libres: acces au code source, droits etendus conferes aux + utilisateurs, + * d'autre part, la designation d'un droit applicable, le droit + francais, auquel elle est conforme, tant au regard du droit de la + responsabilite civile que du droit de la propriete intellectuelle + et de la protection qu'il offre aux auteurs et titulaires des + droits patrimoniaux sur un logiciel. + +Les auteurs de la licence CeCILL-C (pour Ce[a] C[nrs] I[nria] L[ogiciel] +L[ibre]) sont: + +Commissariat a l'Energie Atomique - CEA, etablissement public de +recherche a caractere scientifique, technique et industriel, dont le +siege est situe 25 rue Leblanc, immeuble Le Ponant D, 75015 Paris. + +Centre National de la Recherche Scientifique - CNRS, etablissement +public a caractere scientifique et technologique, dont le siege est +situe 3 rue Michel-Ange, 75794 Paris cedex 16. + +Institut National de Recherche en Informatique et en Automatique - +INRIA, etablissement public a caractere scientifique et technologique, +dont le siege est situe Domaine de Voluceau, Rocquencourt, BP 105, 78153 +Le Chesnay cedex. + + + Preambule + +Ce contrat est une licence de logiciel libre dont l'objectif est de +conferer aux utilisateurs la liberte de modifier et de reutiliser le +logiciel regi par cette licence. + +L'exercice de cette liberte est assorti d'une obligation de remettre a +la disposition de la communaute les modifications apportees au code +source du logiciel afin de contribuer a son evolution. + +L'accessibilite au code source et les droits de copie, de modification +et de redistribution qui decoulent de ce contrat ont pour contrepartie +de n'offrir aux utilisateurs qu'une garantie limitee et de ne faire +peser sur l'auteur du logiciel, le titulaire des droits patrimoniaux et +les concedants successifs qu'une responsabilite restreinte. + +A cet egard l'attention de l'utilisateur est attiree sur les risques +associes au chargement, a l'utilisation, a la modification et/ou au +developpement et a la reproduction du logiciel par l'utilisateur etant +donne sa specificite de logiciel libre, qui peut le rendre complexe a +manipuler et qui le reserve donc a des developpeurs ou des +professionnels avertis possedant des connaissances informatiques +approfondies. Les utilisateurs sont donc invites a charger et tester +l'adequation du logiciel a leurs besoins dans des conditions permettant +d'assurer la securite de leurs systemes et/ou de leurs donnees et, plus +generalement, a l'utiliser et l'exploiter dans les memes conditions de +securite. Ce contrat peut etre reproduit et diffuse librement, sous +reserve de le conserver en l'etat, sans ajout ni suppression de clauses. + +Ce contrat est susceptible de s'appliquer a tout logiciel dont le +titulaire des droits patrimoniaux decide de soumettre l'exploitation aux +dispositions qu'il contient. + + + Article 1 - DEFINITIONS + +Dans ce contrat, les termes suivants, lorsqu'ils seront ecrits avec une +lettre capitale, auront la signification suivante: + +Contrat: designe le present contrat de licence, ses eventuelles versions +posterieures et annexes. + +Logiciel: designe le logiciel sous sa forme de Code Objet et/ou de Code +Source et le cas echeant sa documentation, dans leur etat au moment de +l'acceptation du Contrat par le Licencie. + +Logiciel Initial: designe le Logiciel sous sa forme de Code Source et +eventuellement de Code Objet et le cas echeant sa documentation, dans +leur etat au moment de leur premiere diffusion sous les termes du Contrat. + +Logiciel Modifie: designe le Logiciel modifie par au moins une +Contribution Integree. + +Code Source: designe l'ensemble des instructions et des lignes de +programme du Logiciel et auquel l'acces est necessaire en vue de +modifier le Logiciel. + +Code Objet: designe les fichiers binaires issus de la compilation du +Code Source. + +Titulaire: designe le ou les detenteurs des droits patrimoniaux d'auteur +sur le Logiciel Initial. + +Licencie: designe le ou les utilisateurs du Logiciel ayant accepte le +Contrat. + +Contributeur: designe le Licencie auteur d'au moins une Contribution +Integree. + +Concedant: designe le Titulaire ou toute personne physique ou morale +distribuant le Logiciel sous le Contrat. + +Contribution Integree: designe l'ensemble des modifications, +corrections, traductions, adaptations et/ou nouvelles fonctionnalites +integrees dans le Code Source par tout Contributeur. + +Module Lie: designe un ensemble de fichiers sources y compris leur +documentation qui, sans modification du Code Source, permet de realiser +des fonctionnalites ou services supplementaires a ceux fournis par le +Logiciel. + +Logiciel Derive: designe toute combinaison du Logiciel, modifie ou non, +et d'un Module Lie. + +Parties: designe collectivement le Licencie et le Concedant. + +Ces termes s'entendent au singulier comme au pluriel. + + + Article 2 - OBJET + +Le Contrat a pour objet la concession par le Concedant au Licencie d'une +licence non exclusive, cessible et mondiale du Logiciel telle que +definie ci-apres a l'article 5 pour toute la duree de protection des droits +portant sur ce Logiciel. + + + Article 3 - ACCEPTATION + +3.1 L'acceptation par le Licencie des termes du Contrat est reputee +acquise du fait du premier des faits suivants: + + * (i) le chargement du Logiciel par tout moyen notamment par + telechargement a partir d'un serveur distant ou par chargement a + partir d'un support physique; + * (ii) le premier exercice par le Licencie de l'un quelconque des + droits concedes par le Contrat. + +3.2 Un exemplaire du Contrat, contenant notamment un avertissement +relatif aux specificites du Logiciel, a la restriction de garantie et a +la limitation a un usage par des utilisateurs experimentes a ete mis a +disposition du Licencie prealablement a son acceptation telle que +definie a l'article 3.1 ci dessus et le Licencie reconnait en avoir pris +connaissance. + + + Article 4 - ENTREE EN VIGUEUR ET DUREE + + + 4.1 ENTREE EN VIGUEUR + +Le Contrat entre en vigueur a la date de son acceptation par le Licencie +telle que definie en 3.1. + + + 4.2 DUREE + +Le Contrat produira ses effets pendant toute la duree legale de +protection des droits patrimoniaux portant sur le Logiciel. + + + Article 5 - ETENDUE DES DROITS CONCEDES + +Le Concedant concede au Licencie, qui accepte, les droits suivants sur +le Logiciel pour toutes destinations et pour la duree du Contrat dans +les conditions ci-apres detaillees. + +Par ailleurs, si le Concedant detient ou venait a detenir un ou +plusieurs brevets d'invention protegeant tout ou partie des +fonctionnalites du Logiciel ou de ses composants, il s'engage a ne pas +opposer les eventuels droits conferes par ces brevets aux Licencies +successifs qui utiliseraient, exploiteraient ou modifieraient le +Logiciel. En cas de cession de ces brevets, le Concedant s'engage a +faire reprendre les obligations du present alinea aux cessionnaires. + + + 5.1 DROIT D'UTILISATION + +Le Licencie est autorise a utiliser le Logiciel, sans restriction quant +aux domaines d'application, etant ci-apres precise que cela comporte: + + 1. la reproduction permanente ou provisoire du Logiciel en tout ou + partie par tout moyen et sous toute forme. + + 2. le chargement, l'affichage, l'execution, ou le stockage du + Logiciel sur tout support. + + 3. la possibilite d'en observer, d'en etudier, ou d'en tester le + fonctionnement afin de determiner les idees et principes qui sont + a la base de n'importe quel element de ce Logiciel; et ceci, + lorsque le Licencie effectue toute operation de chargement, + d'affichage, d'execution, de transmission ou de stockage du + Logiciel qu'il est en droit d'effectuer en vertu du Contrat. + + + 5.2 DROIT DE MODIFICATION + +Le droit de modification comporte le droit de traduire, d'adapter, +d'arranger ou d'apporter toute autre modification au Logiciel et le +droit de reproduire le logiciel en resultant. Il comprend en particulier +le droit de creer un Logiciel Derive. + +Le Licencie est autorise a apporter toute modification au Logiciel sous +reserve de mentionner, de facon explicite, son nom en tant qu'auteur de +cette modification et la date de creation de celle-ci. + + + 5.3 DROIT DE DISTRIBUTION + +Le droit de distribution comporte notamment le droit de diffuser, de +transmettre et de communiquer le Logiciel au public sur tout support et +par tout moyen ainsi que le droit de mettre sur le marche a titre +onereux ou gratuit, un ou des exemplaires du Logiciel par tout procede. + +Le Licencie est autorise a distribuer des copies du Logiciel, modifie ou +non, a des tiers dans les conditions ci-apres detaillees. + + + 5.3.1 DISTRIBUTION DU LOGICIEL SANS MODIFICATION + +Le Licencie est autorise a distribuer des copies conformes du Logiciel, +sous forme de Code Source ou de Code Objet, a condition que cette +distribution respecte les dispositions du Contrat dans leur totalite et +soit accompagnee: + + 1. d'un exemplaire du Contrat, + + 2. d'un avertissement relatif a la restriction de garantie et de + responsabilite du Concedant telle que prevue aux articles 8 + et 9, + +et que, dans le cas ou seul le Code Objet du Logiciel est redistribue, +le Licencie permette un acces effectif au Code Source complet du +Logiciel pendant au moins toute la duree de sa distribution du Logiciel, +etant entendu que le cout additionnel d'acquisition du Code Source ne +devra pas exceder le simple cout de transfert des donnees. + + + 5.3.2 DISTRIBUTION DU LOGICIEL MODIFIE + +Lorsque le Licencie apporte une Contribution Integree au Logiciel, les +conditions de distribution du Logiciel Modifie en resultant sont alors +soumises a l'integralite des dispositions du Contrat. + +Le Licencie est autorise a distribuer le Logiciel Modifie sous forme de +code source ou de code objet, a condition que cette distribution +respecte les dispositions du Contrat dans leur totalite et soit +accompagnee: + + 1. d'un exemplaire du Contrat, + + 2. d'un avertissement relatif a la restriction de garantie et de + responsabilite du Concedant telle que prevue aux articles 8 + et 9, + +et que, dans le cas ou seul le code objet du Logiciel Modifie est +redistribue, le Licencie permette un acces effectif a son code source +complet pendant au moins toute la duree de sa distribution du Logiciel +Modifie, etant entendu que le cout additionnel d'acquisition du code +source ne devra pas exceder le simple cout de transfert des donnees. + + + 5.3.3 DISTRIBUTION DU LOGICIEL DERIVE + +Lorsque le Licencie cree un Logiciel Derive, ce Logiciel Derive peut +etre distribue sous un contrat de licence autre que le present Contrat a +condition de respecter les obligations de mention des droits sur le +Logiciel telles que definies a l'article 6.4. Dans le cas ou la creation du +Logiciel Derive a necessite une modification du Code Source le licencie +s'engage a ce que: + + 1. le Logiciel Modifie correspondant a cette modification soit regi + par le present Contrat, + 2. les Contributions Integrees dont le Logiciel Modifie resulte + soient clairement identifiees et documentees, + 3. le Licencie permette un acces effectif au code source du Logiciel + Modifie, pendant au moins toute la duree de la distribution du + Logiciel Derive, de telle sorte que ces modifications puissent + etre reprises dans une version ulterieure du Logiciel, etant + entendu que le cout additionnel d'acquisition du code source du + Logiciel Modifie ne devra pas exceder le simple cout du transfert + des donnees. + + + 5.3.4 COMPATIBILITE AVEC LA LICENCE CeCILL + +Lorsqu'un Logiciel Modifie contient une Contribution Integree soumise au +contrat de licence CeCILL, ou lorsqu'un Logiciel Derive contient un +Module Lie soumis au contrat de licence CeCILL, les stipulations prevues +au troisieme item de l'article 6.4 sont facultatives. + + + Article 6 - PROPRIETE INTELLECTUELLE + + + 6.1 SUR LE LOGICIEL INITIAL + +Le Titulaire est detenteur des droits patrimoniaux sur le Logiciel +Initial. Toute utilisation du Logiciel Initial est soumise au respect +des conditions dans lesquelles le Titulaire a choisi de diffuser son +oeuvre et nul autre n'a la faculte de modifier les conditions de +diffusion de ce Logiciel Initial. + +Le Titulaire s'engage a ce que le Logiciel Initial reste au moins regi +par le Contrat et ce, pour la duree visee a l'article 4.2. + + + 6.2 SUR LES CONTRIBUTIONS INTEGREES + +Le Licencie qui a developpe une Contribution Integree est titulaire sur +celle-ci des droits de propriete intellectuelle dans les conditions +definies par la legislation applicable. + + + 6.3 SUR LES MODULES LIES + +Le Licencie qui a developpe un Module Lie est titulaire sur celui-ci des +droits de propriete intellectuelle dans les conditions definies par la +legislation applicable et reste libre du choix du contrat regissant sa +diffusion dans les conditions definies a l'article 5.3.3. + + + 6.4 MENTIONS DES DROITS + +Le Licencie s'engage expressement: + + 1. a ne pas supprimer ou modifier de quelque maniere que ce soit les + mentions de propriete intellectuelle apposees sur le Logiciel; + + 2. a reproduire a l'identique lesdites mentions de propriete + intellectuelle sur les copies du Logiciel modifie ou non; + + 3. a faire en sorte que l'utilisation du Logiciel, ses mentions de + propriete intellectuelle et le fait qu'il est regi par le Contrat + soient indiques dans un texte facilement accessible notamment + depuis l'interface de tout Logiciel Derive. + +Le Licencie s'engage a ne pas porter atteinte, directement ou +indirectement, aux droits de propriete intellectuelle du Titulaire et/ou +des Contributeurs sur le Logiciel et a prendre, le cas echeant, a +l'egard de son personnel toutes les mesures necessaires pour assurer le +respect des dits droits de propriete intellectuelle du Titulaire et/ou +des Contributeurs. + + + Article 7 - SERVICES ASSOCIES + +7.1 Le Contrat n'oblige en aucun cas le Concedant a la realisation de +prestations d'assistance technique ou de maintenance du Logiciel. + +Cependant le Concedant reste libre de proposer ce type de services. Les +termes et conditions d'une telle assistance technique et/ou d'une telle +maintenance seront alors determines dans un acte separe. Ces actes de +maintenance et/ou assistance technique n'engageront que la seule +responsabilite du Concedant qui les propose. + +7.2 De meme, tout Concedant est libre de proposer, sous sa seule +responsabilite, a ses licencies une garantie, qui n'engagera que lui, +lors de la redistribution du Logiciel et/ou du Logiciel Modifie et ce, +dans les conditions qu'il souhaite. Cette garantie et les modalites +financieres de son application feront l'objet d'un acte separe entre le +Concedant et le Licencie. + + + Article 8 - RESPONSABILITE + +8.1 Sous reserve des dispositions de l'article 8.2, le Licencie a la +faculte, sous reserve de prouver la faute du Concedant concerne, de +solliciter la reparation du prejudice direct qu'il subirait du fait du +Logiciel et dont il apportera la preuve. + +8.2 La responsabilite du Concedant est limitee aux engagements pris en +application du Contrat et ne saurait etre engagee en raison notamment: +(i) des dommages dus a l'inexecution, totale ou partielle, de ses +obligations par le Licencie, (ii) des dommages directs ou indirects +decoulant de l'utilisation ou des performances du Logiciel subis par le +Licencie et (iii) plus generalement d'un quelconque dommage indirect. En +particulier, les Parties conviennent expressement que tout prejudice +financier ou commercial (par exemple perte de donnees, perte de +benefices, perte d'exploitation, perte de clientele ou de commandes, +manque a gagner, trouble commercial quelconque) ou toute action dirigee +contre le Licencie par un tiers, constitue un dommage indirect et +n'ouvre pas droit a reparation par le Concedant. + + + Article 9 - GARANTIE + +9.1 Le Licencie reconnait que l'etat actuel des connaissances +scientifiques et techniques au moment de la mise en circulation du +Logiciel ne permet pas d'en tester et d'en verifier toutes les +utilisations ni de detecter l'existence d'eventuels defauts. L'attention +du Licencie a ete attiree sur ce point sur les risques associes au +chargement, a l'utilisation, la modification et/ou au developpement et a +la reproduction du Logiciel qui sont reserves a des utilisateurs avertis. + +Il releve de la responsabilite du Licencie de controler, par tous +moyens, l'adequation du produit a ses besoins, son bon fonctionnement et +de s'assurer qu'il ne causera pas de dommages aux personnes et aux biens. + +9.2 Le Concedant declare de bonne foi etre en droit de conceder +l'ensemble des droits attaches au Logiciel (comprenant notamment les +droits vises a l'article 5). + +9.3 Le Licencie reconnait que le Logiciel est fourni "en l'etat" par le +Concedant sans autre garantie, expresse ou tacite, que celle prevue a +l'article 9.2 et notamment sans aucune garantie sur sa valeur commerciale, +son caractere securise, innovant ou pertinent. + +En particulier, le Concedant ne garantit pas que le Logiciel est exempt +d'erreur, qu'il fonctionnera sans interruption, qu'il sera compatible +avec l'equipement du Licencie et sa configuration logicielle ni qu'il +remplira les besoins du Licencie. + +9.4 Le Concedant ne garantit pas, de maniere expresse ou tacite, que le +Logiciel ne porte pas atteinte a un quelconque droit de propriete +intellectuelle d'un tiers portant sur un brevet, un logiciel ou sur tout +autre droit de propriete. Ainsi, le Concedant exclut toute garantie au +profit du Licencie contre les actions en contrefacon qui pourraient etre +diligentees au titre de l'utilisation, de la modification, et de la +redistribution du Logiciel. Neanmoins, si de telles actions sont +exercees contre le Licencie, le Concedant lui apportera son aide +technique et juridique pour sa defense. Cette aide technique et +juridique est determinee au cas par cas entre le Concedant concerne et +le Licencie dans le cadre d'un protocole d'accord. Le Concedant degage +toute responsabilite quant a l'utilisation de la denomination du +Logiciel par le Licencie. Aucune garantie n'est apportee quant a +l'existence de droits anterieurs sur le nom du Logiciel et sur +l'existence d'une marque. + + + Article 10 - RESILIATION + +10.1 En cas de manquement par le Licencie aux obligations mises a sa +charge par le Contrat, le Concedant pourra resilier de plein droit le +Contrat trente (30) jours apres notification adressee au Licencie et +restee sans effet. + +10.2 Le Licencie dont le Contrat est resilie n'est plus autorise a +utiliser, modifier ou distribuer le Logiciel. Cependant, toutes les +licences qu'il aura concedees anterieurement a la resiliation du Contrat +resteront valides sous reserve qu'elles aient ete effectuees en +conformite avec le Contrat. + + + Article 11 - DISPOSITIONS DIVERSES + + + 11.1 CAUSE EXTERIEURE + +Aucune des Parties ne sera responsable d'un retard ou d'une defaillance +d'execution du Contrat qui serait du a un cas de force majeure, un cas +fortuit ou une cause exterieure, telle que, notamment, le mauvais +fonctionnement ou les interruptions du reseau electrique ou de +telecommunication, la paralysie du reseau liee a une attaque +informatique, l'intervention des autorites gouvernementales, les +catastrophes naturelles, les degats des eaux, les tremblements de terre, +le feu, les explosions, les greves et les conflits sociaux, l'etat de +guerre... + +11.2 Le fait, par l'une ou l'autre des Parties, d'omettre en une ou +plusieurs occasions de se prevaloir d'une ou plusieurs dispositions du +Contrat, ne pourra en aucun cas impliquer renonciation par la Partie +interessee a s'en prevaloir ulterieurement. + +11.3 Le Contrat annule et remplace toute convention anterieure, ecrite +ou orale, entre les Parties sur le meme objet et constitue l'accord +entier entre les Parties sur cet objet. Aucune addition ou modification +aux termes du Contrat n'aura d'effet a l'egard des Parties a moins +d'etre faite par ecrit et signee par leurs representants dument habilites. + +11.4 Dans l'hypothese ou une ou plusieurs des dispositions du Contrat +s'avererait contraire a une loi ou a un texte applicable, existants ou +futurs, cette loi ou ce texte prevaudrait, et les Parties feraient les +amendements necessaires pour se conformer a cette loi ou a ce texte. +Toutes les autres dispositions resteront en vigueur. De meme, la +nullite, pour quelque raison que ce soit, d'une des dispositions du +Contrat ne saurait entrainer la nullite de l'ensemble du Contrat. + + + 11.5 LANGUE + +Le Contrat est redige en langue francaise et en langue anglaise, ces +deux versions faisant egalement foi. + + + Article 12 - NOUVELLES VERSIONS DU CONTRAT + +12.1 Toute personne est autorisee a copier et distribuer des copies de +ce Contrat. + +12.2 Afin d'en preserver la coherence, le texte du Contrat est protege +et ne peut etre modifie que par les auteurs de la licence, lesquels se +reservent le droit de publier periodiquement des mises a jour ou de +nouvelles versions du Contrat, qui possederont chacune un numero +distinct. Ces versions ulterieures seront susceptibles de prendre en +compte de nouvelles problematiques rencontrees par les logiciels libres. + +12.3 Tout Logiciel diffuse sous une version donnee du Contrat ne pourra +faire l'objet d'une diffusion ulterieure que sous la meme version du +Contrat ou une version posterieure. + + + Article 13 - LOI APPLICABLE ET COMPETENCE TERRITORIALE + +13.1 Le Contrat est regi par la loi francaise. Les Parties conviennent +de tenter de regler a l'amiable les differends ou litiges qui +viendraient a se produire par suite ou a l'occasion du Contrat. + +13.2 A defaut d'accord amiable dans un delai de deux (2) mois a compter +de leur survenance et sauf situation relevant d'une procedure d'urgence, +les differends ou litiges seront portes par la Partie la plus diligente +devant les Tribunaux competents de Paris. + + +Version 1.0 du 2006-09-05. diff --git a/src/decompose_mesh/scotch_5.1.12b/examples/scotch_example_2.f90 b/src/decompose_mesh/scotch_5.1.12b/examples/scotch_example_2.f90 index edc9868c6..313c92679 100644 --- a/src/decompose_mesh/scotch_5.1.12b/examples/scotch_example_2.f90 +++ b/src/decompose_mesh/scotch_5.1.12b/examples/scotch_example_2.f90 @@ -56,13 +56,13 @@ PROGRAM Scotch_test if (ierr /= 0) then write(6,*) 'Scotch error : cannot initialize graph' STOP - end if + endif call ScotchFgraphInit ( Scotchgraph(1), ierr ) if (ierr /= 0) then write(6,*) 'Scotch error : cannot initialize strat' STOP - end if + endif open(10,iostat=ierr,file="bump.grf") @@ -75,7 +75,7 @@ PROGRAM Scotch_test if (ierr /= 0) then write(6,*) 'Scotch error : cannot load graph' STOP - end if + endif close(10) @@ -97,7 +97,7 @@ PROGRAM Scotch_test if (ierr /= 0) then write(6,*) 'ERROR Scotch : Invalid check' STOP - end if + endif open (10,iostat=ierr,file="test.grf") @@ -108,7 +108,7 @@ PROGRAM Scotch_test if (ierr /= 0) then write(6,*) 'ERROR Scotch : Invalid save ' STOP - end if + endif close(10) @@ -119,7 +119,7 @@ PROGRAM Scotch_test write(6,*) 'ERROR Scotch : Cannot initialize partitioning& &strategy' STOP - end if + endif allocate(part(1:vertnbr + 1)) @@ -128,11 +128,11 @@ PROGRAM Scotch_test if (ierr /= 0) then write(6,*) 'ERROR Scotch : Cannot partition graph' STOP - end if + endif do i=1,vertnbr + 1 write(10,*) i,part(i) - end do + enddo call ScotchFgraphExit ( Scotchgraph(1) ) diff --git a/src/decompose_mesh/scotch_5.1.12b/src/Make.inc/mingw32/README.txt b/src/decompose_mesh/scotch_5.1.12b/src/Make.inc/mingw32/README.txt index dcaced41e..bea0f34a7 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/Make.inc/mingw32/README.txt +++ b/src/decompose_mesh/scotch_5.1.12b/src/Make.inc/mingw32/README.txt @@ -1,5 +1,5 @@ These three script files can be used to create a Windows DLL from the -PT-Scotch library on a MinGW32 system. They are intended to be called +PT-Scotch library on a MinGW32 system. They are intended to be called directly from the src/Make.inc/mingw32 directory and produce results in the lib directory. diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/arch.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/arch.c index 02f222776..a970e5959 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/arch.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/arch.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/arch.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/arch.h index ab8388116..64783d700 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/arch.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/arch.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ @@ -224,7 +224,7 @@ int archDomMpiType (const Arch * const, MPI_Datatyp #endif /* SCOTCH_DEBUG_ARCH2 */ #ifdef SCOTCH_PTSCOTCH -#define ARCHCLASSBLOCK(s,n,f) { s, f, \ +#define ARCHCLASSBLOCK(s,n,f) { s, f, \ arch##n##ArchLoad, \ arch##n##ArchSave, \ arch##n##ArchFree, \ @@ -240,7 +240,7 @@ int archDomMpiType (const Arch * const, MPI_Datatyp arch##n##DomMpiType, \ sizeof (Arch##n##Dom) } #else /* SCOTCH_PTSCOTCH */ -#define ARCHCLASSBLOCK(s,n,f) { s, f, \ +#define ARCHCLASSBLOCK(s,n,f) { s, f, \ arch##n##ArchLoad, \ arch##n##ArchSave, \ arch##n##ArchFree, \ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/arch_build.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/arch_build.c index 9f0a32c80..7e0ddeb63 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/arch_build.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/arch_build.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ @@ -343,7 +343,7 @@ const Strat * const mapstrat) /*+ Bipartitioning strategy if (memAllocGroup ((void **) (void *) &termverttab, (size_t) (termdomnbr * sizeof (ArchDecoTermVert)), &termdisttab, (size_t) (((termdomnbr * (termdomnbr - 1)) / 2) * sizeof (Anum)), - &disttax, (size_t) (tgtgrafptr->vertnbr * sizeof (ArchBuildDistElem)), + &disttax, (size_t) (tgtgrafptr->vertnbr * sizeof (ArchBuildDistElem)), &queutab, (size_t) (tgtgrafptr->vertnbr * sizeof (ArchBuildQueuElem)), NULL) == NULL) { errorPrint ("archBuild: out of memory (2)"); mapExit (&mappdat); diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/arch_build.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/arch_build.h index 9767537ca..7cc9d3b22 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/arch_build.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/arch_build.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/arch_cmplt.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/arch_cmplt.c index 785a7a021..4bccb00a6 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/arch_cmplt.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/arch_cmplt.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ @@ -181,7 +181,7 @@ const ArchDomNum domnum) ** elements in the complete domain. */ -Anum +Anum archCmpltDomSize ( const ArchCmplt * const archptr, const ArchCmpltDom * const domptr) @@ -194,7 +194,7 @@ const ArchCmpltDom * const domptr) ** subdomains. */ -Anum +Anum archCmpltDomDist ( const ArchCmplt * const archptr, const ArchCmpltDom * const dom0ptr, diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/arch_cmplt.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/arch_cmplt.h index f9cf4f7d2..24d9b570f 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/arch_cmplt.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/arch_cmplt.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/arch_cmpltw.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/arch_cmpltw.c index 44eb1f2d9..bb25b9c5b 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/arch_cmpltw.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/arch_cmpltw.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ @@ -140,7 +140,7 @@ ArchCmpltw * restrict const archptr) } intSort2asc2 (archptr->velotab, archptr->vertnbr); /* Sort load array by both keys to be portable across sorting implementations */ - + archCmpltwArchBuild3 (archptr->velotab, vesotab, archptr->vertnbr, archptr->velosum); memFree (vesotab); @@ -336,7 +336,7 @@ const ArchCmpltwDom * const domptr) /* This function returns the terminal domain associated ** with the given terminal number in the architecture. -** +** ** It returns: ** - 0 : if label is valid and domain has been updated. ** - 1 : if label is invalid. @@ -377,7 +377,7 @@ const ArchDomNum domnum) ** elements in the complete domain. */ -Anum +Anum archCmpltwDomSize ( const ArchCmpltw * const archptr, const ArchCmpltwDom * const domptr) @@ -389,7 +389,7 @@ const ArchCmpltwDom * const domptr) ** the complete domain. */ -Anum +Anum archCmpltwDomWght ( const ArchCmpltw * const archptr, const ArchCmpltwDom * const domptr) @@ -402,7 +402,7 @@ const ArchCmpltwDom * const domptr) ** subdomains. */ -Anum +Anum archCmpltwDomDist ( const ArchCmpltw * const archptr, const ArchCmpltwDom * const dom0ptr, diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/arch_cmpltw.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/arch_cmpltw.h index 11844d432..f74475d12 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/arch_cmpltw.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/arch_cmpltw.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/arch_deco.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/arch_deco.c index 6bff38a46..a5ff92c8a 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/arch_deco.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/arch_deco.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ @@ -299,8 +299,8 @@ FILE * restrict const stream) INT domvertwght; if ((intLoad (stream, &domvertlabl) != 1) || - (intLoad (stream, &domvertsize) != 1) || - (intLoad (stream, &domvertwght) != 1)) { + (intLoad (stream, &domvertsize) != 1) || + (intLoad (stream, &domvertwght) != 1)) { errorPrint ("archDecoArchLoad: bad input (4)"); archDecoArchFree (archptr); return (1); diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/arch_deco.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/arch_deco.h index 047f4f657..5168a8173 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/arch_deco.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/arch_deco.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/arch_hcub.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/arch_hcub.c index 2ef857ce9..a491ce55f 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/arch_hcub.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/arch_hcub.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ @@ -177,7 +177,7 @@ const ArchDomNum domnum) ** elements in the hypercube domain. */ -Anum +Anum archHcubDomSize ( const ArchHcub * const archptr, const ArchHcubDom * const domptr) diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/arch_hcub.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/arch_hcub.h index bf45ea6b6..4e69cb03f 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/arch_hcub.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/arch_hcub.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/arch_mesh.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/arch_mesh.c index 4d055954d..4bfc25feb 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/arch_mesh.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/arch_mesh.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ @@ -189,7 +189,7 @@ const ArchDomNum domnum) ** elements in the rectangular domain. */ -Anum +Anum archMesh2DomSize ( const ArchMesh2 * const archptr, const ArchMesh2Dom * const domptr) @@ -204,7 +204,7 @@ const ArchMesh2Dom * const domptr) ** the centers of the domains). */ -Anum +Anum archMesh2DomDist ( const ArchMesh2 * const archptr, const ArchMesh2Dom * const dom0ptr, @@ -527,7 +527,7 @@ const ArchDomNum domnum) ** elements in the cubic domain. */ -Anum +Anum archMesh3DomSize ( const ArchMesh3 * const archptr, const ArchMesh3Dom * const domptr) @@ -542,7 +542,7 @@ const ArchMesh3Dom * const domptr) ** distance between the centers of the domains). */ -Anum +Anum archMesh3DomDist ( const ArchMesh3 * const archptr, const ArchMesh3Dom * const dom0ptr, diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/arch_mesh.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/arch_mesh.h index b14e9033d..304856071 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/arch_mesh.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/arch_mesh.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/arch_tleaf.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/arch_tleaf.c index fee6c8f03..6f11d97da 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/arch_tleaf.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/arch_tleaf.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ @@ -257,7 +257,7 @@ const ArchDomNum domnnum) ** elements in the subtree domain. */ -Anum +Anum archTleafDomSize ( const ArchTleaf * const archptr, const ArchTleafDom * const domnptr) @@ -277,7 +277,7 @@ const ArchTleafDom * const domnptr) ** subdomains. */ -Anum +Anum archTleafDomDist ( const ArchTleaf * const archptr, const ArchTleafDom * const dom0ptr, diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/arch_tleaf.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/arch_tleaf.h index b9407140b..45193df64 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/arch_tleaf.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/arch_tleaf.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/arch_torus.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/arch_torus.c index 2fe77ee70..47c8dc479 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/arch_torus.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/arch_torus.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ @@ -183,7 +183,7 @@ const ArchDomNum domnum) ** elements in the rectangular domain. */ -Anum +Anum archTorus2DomSize ( const ArchTorus2 * const archptr, const ArchTorus2Dom * const domptr) @@ -198,7 +198,7 @@ const ArchTorus2Dom * const domptr) ** the centers of the domains). */ -Anum +Anum archTorus2DomDist ( const ArchTorus2 * const archptr, const ArchTorus2Dom * const dom0ptr, @@ -466,7 +466,7 @@ const ArchDomNum domnum) ** elements in the cubic domain. */ -Anum +Anum archTorus3DomSize ( const ArchTorus3 * const archptr, const ArchTorus3Dom * const domptr) @@ -481,7 +481,7 @@ const ArchTorus3Dom * const domptr) ** distance between the centers of the domains). */ -Anum +Anum archTorus3DomDist ( const ArchTorus3 * const archptr, const ArchTorus3Dom * const dom0ptr, diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/arch_torus.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/arch_torus.h index d0fa2dfe1..84ceae3f1 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/arch_torus.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/arch_torus.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/arch_vcmplt.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/arch_vcmplt.c index 3d97dfed4..811625a2a 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/arch_vcmplt.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/arch_vcmplt.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ @@ -122,7 +122,7 @@ const ArchDomNum domnum) ** elements in the domain. */ -Anum +Anum archVcmpltDomSize ( const ArchVcmplt * const archptr, const ArchVcmpltDom * const domptr) @@ -134,7 +134,7 @@ const ArchVcmpltDom * const domptr) ** distance between two subdomains. */ -Anum +Anum archVcmpltDomDist ( const ArchVcmplt * const archptr, const ArchVcmpltDom * const dom0ptr, diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/arch_vcmplt.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/arch_vcmplt.h index deec37014..0fdc310d1 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/arch_vcmplt.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/arch_vcmplt.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/arch_vhcub.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/arch_vhcub.c index edd1e6b8e..69aceca63 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/arch_vhcub.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/arch_vhcub.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ @@ -111,7 +111,7 @@ const ArchDomNum domnum) ** elements in the domain. */ -Anum +Anum archVhcubDomSize ( const ArchVhcub * const archptr, const ArchVhcubDom * const domptr) @@ -123,7 +123,7 @@ const ArchVhcubDom * const domptr) ** distance between two subdomains. */ -Anum +Anum archVhcubDomDist ( const ArchVhcub * const archptr, const ArchVhcubDom * const dom0ptr, diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/arch_vhcub.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/arch_vhcub.h index 2954b740e..25779a1b5 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/arch_vhcub.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/arch_vhcub.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bdgraph.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bdgraph.c index 164c9c71f..12d368a66 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bdgraph.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bdgraph.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ @@ -95,11 +95,11 @@ const ArchDom domsubtab[]) /* Subdomains actgrafptr->veexglbsum = 0; actgrafptr->partgsttax = NULL; /* Do not allocate frontier arrays yet */ actgrafptr->fronloctab = NULL; - + bdgraphInit2 (actgrafptr, domdist, domwght0, domwght1); /* TODO: Compute external gains */ - + #ifdef SCOTCH_DEBUG_BDGRAPH2 if (bdgraphCheck (actgrafptr) != 0) { errorPrint ("bdgraphInit: inconsistent graph data"); @@ -130,7 +130,7 @@ const Anum domwght1) actgrafptr->commglbload = 0; actgrafptr->commglbloadextn0 = 0; actgrafptr->commglbgainextn = 0; - actgrafptr->commglbgainextn0 = 0; + actgrafptr->commglbgainextn0 = 0; actgrafptr->domdist = domdist; actgrafptr->domwght[0] = domwght0; actgrafptr->domwght[1] = domwght1; diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bdgraph.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bdgraph.h index 84d6dbfa0..b64a2ff2d 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bdgraph.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bdgraph.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ @@ -88,7 +88,7 @@ typedef struct BdgraphStore_ { Gnum fronlocnbr; /*+ Number of local frontier vertices +*/ Gnum fronglbnbr; /*+ Number of frontier vertices +*/ Gnum complocload0; /*+ Local load in part 0 +*/ - Gnum compglbload0; /*+ Load in part 0 +*/ + Gnum compglbload0; /*+ Load in part 0 +*/ Gnum compglbload0dlt; /*+ Difference from the average +*/ Gnum complocsize0; /*+ Number of local vertices in part 0 +*/ Gnum compglbsize0; /*+ Number of global vertices in part 0 +*/ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bdgraph_bipart_bd.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bdgraph_bipart_bd.c index 5036b96cb..4b7427a94 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bdgraph_bipart_bd.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bdgraph_bipart_bd.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ @@ -393,11 +393,11 @@ const BdgraphBipartBdParam * const paraptr) /*+ Method parameters +*/ orgvertlocnum = orggrafptr->s.baseval; orgprocsidnum = 0; orgprocsidtab = orggrafptr->s.procsidtab; - orgprocsidval = orgprocsidtab[orgprocsidnum ++]; + orgprocsidval = orgprocsidtab[orgprocsidnum ++]; while (1) { /* Scan all vertices which have foreign neighbors */ while (orgprocsidval < 0) { orgvertlocnum -= (Gnum) orgprocsidval; - orgprocsidval = orgprocsidtab[orgprocsidnum ++]; + orgprocsidval = orgprocsidtab[orgprocsidnum ++]; } if (flagVal (orgflagloctab, orgvertlocnum) == 0) { /* If vertex not already processed */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bdgraph_bipart_bd.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bdgraph_bipart_bd.h index f7f7c85d1..e7b0bb79a 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bdgraph_bipart_bd.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bdgraph_bipart_bd.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bdgraph_bipart_df.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bdgraph_bipart_df.c index 0a08645f5..465738feb 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bdgraph_bipart_df.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bdgraph_bipart_df.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bdgraph_bipart_df.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bdgraph_bipart_df.h index e76bbc1e2..1520dee9c 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bdgraph_bipart_df.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bdgraph_bipart_df.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bdgraph_bipart_ex.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bdgraph_bipart_ex.c index 07b7af09f..b781aadc3 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bdgraph_bipart_ex.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bdgraph_bipart_ex.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ @@ -397,12 +397,12 @@ const BdgraphBipartExParam * restrict const paraptr) /*+ Method parameters +*/ vertlocnum = grafptr->s.baseval; procsidnbr = grafptr->s.procsidnbr; procsidnum = 0; - procsidval = procsidtab[procsidnum ++]; + procsidval = procsidtab[procsidnum ++]; while (1) { /* Scan all vertices which have foreign neighbors */ while (procsidval < 0) { vertlocnum -= (Gnum) procsidval; - procsidval = procsidtab[procsidnum ++]; + procsidval = procsidtab[procsidnum ++]; } if (flagVal (flagloctab, vertlocnum) == 0) { /* If vertex not already processed */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bdgraph_bipart_ex.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bdgraph_bipart_ex.h index a60ef21e1..35984dad2 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bdgraph_bipart_ex.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bdgraph_bipart_ex.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bdgraph_bipart_ml.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bdgraph_bipart_ml.c index e6cd28bdc..b3fdcd686 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bdgraph_bipart_ml.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bdgraph_bipart_ml.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ @@ -121,13 +121,13 @@ const BdgraphBipartMlParam * const paraptr) /*+ Method parameters coarmulttax = *coarmultptr; for (coarvertlocnum = coargrafptr->s.baseval; coarvertlocnum < coargrafptr->s.vertlocnnd; coarvertlocnum++) { - Gnum finevertnum0; /* First multinode vertex */ + Gnum finevertnum0; /* First multinode vertex */ Gnum finevertnum1; /* Second multinode vertex */ finevertnum0 = coarmulttax[coarvertlocnum].vertglbnum[0]; finevertnum1 = coarmulttax[coarvertlocnum].vertglbnum[1]; coarveexloctax[coarvertlocnum] = (finevertnum0 != finevertnum1) - ? finegrafptr->veexloctax[finevertnum0] + finegrafptr->veexloctax[finevertnum1] + ? finegrafptr->veexloctax[finevertnum0] + finegrafptr->veexloctax[finevertnum1] : finegrafptr->veexloctax[finevertnum0]; } } @@ -416,7 +416,7 @@ const DgraphCoarsenMulti * restrict const coarmulttax) /*+ Multinode array +*/ if (fineveloloctax != NULL) { Gnum veloval; - veloval = fineveloloctax[finevertlocnum]; + veloval = fineveloloctax[finevertlocnum]; finecomplocload1 += veloval & (- coarpartmsk); } if (fineveexloctax != NULL) { @@ -550,12 +550,12 @@ const DgraphCoarsenMulti * restrict const coarmulttax) /*+ Multinode array +*/ vsnddattab[vsndidxtab[4 * procngbnum + partval] ++] = vertglbend; /* Pack vertex in proper sub-array */ } - if (MPI_Alltoallv (vsnddattab, vsndcnttab, vsnddsptab, GNUM_MPI, + if (MPI_Alltoallv (vsnddattab, vsndcnttab, vsnddsptab, GNUM_MPI, vrcvdattab, vrcvcnttab, vrcvdsptab, GNUM_MPI, finegrafptr->s.proccomm) != MPI_SUCCESS) { errorPrint ("bdgraphBipartMlUncoarsen: communication error (5)"); return (1); } - + for (procnum = 0; procnum < fineprocglbnbr; ++ procnum) { /* Update local ones from the buffer for receiving data */ Gnum vrcvidxnum; Gnum vrcvidxnnd; @@ -637,7 +637,7 @@ const DgraphCoarsenMulti * restrict const coarmulttax) /*+ Multinode array +*/ Gnum veexval; veexval = fineveexloctax[finevertlocnum]; - finecommlocloadextn += veexval; + finecommlocloadextn += veexval; finecommlocgainextn -= veexval; } } @@ -655,7 +655,7 @@ const DgraphCoarsenMulti * restrict const coarmulttax) /*+ Multinode array +*/ errorPrint ("bdgraphBipartMlUncoarsen: cannot perform halo exchange"); return (1); } - + finecommlocloadintn = 0; fineedlolocval = 1; /* Assume edges are not weighted */ for (finefronlocnum = 0; finefronlocnum < finefronlocnbr; finefronlocnum ++) { @@ -666,7 +666,7 @@ const DgraphCoarsenMulti * restrict const coarmulttax) /*+ Multinode array +*/ finevertlocnum = finefronloctab[finefronlocnum]; partval = finepartgsttax[finevertlocnum]; - for (fineedgelocnum = finevertloctax[finevertlocnum], commcut = 0; + for (fineedgelocnum = finevertloctax[finevertlocnum], commcut = 0; fineedgelocnum < finevendloctax[finevertlocnum]; fineedgelocnum ++) { Gnum partdlt; @@ -684,7 +684,7 @@ const DgraphCoarsenMulti * restrict const coarmulttax) /*+ Multinode array +*/ memFree (vrcvcnttab); finegrafptr->fronlocnbr = finefronlocnbr; - finegrafptr->complocsize0 = finegrafptr->s.vertlocnbr - finecomplocsize1; + finegrafptr->complocsize0 = finegrafptr->s.vertlocnbr - finecomplocsize1; finegrafptr->complocload0 = (fineveloloctax == NULL) ? finegrafptr->complocsize0 : (finegrafptr->s.velolocsum - finecomplocload1); reduloctab[0] = finegrafptr->complocload0; diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bdgraph_bipart_ml.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bdgraph_bipart_ml.h index e7fa47c10..2c8ef29a1 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bdgraph_bipart_ml.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bdgraph_bipart_ml.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bdgraph_bipart_sq.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bdgraph_bipart_sq.c index e9a17978a..69ce10ad2 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bdgraph_bipart_sq.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bdgraph_bipart_sq.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ @@ -247,7 +247,7 @@ const BdgraphBipartSqParam * const paraptr) /*+ Method parameters +*/ return (1); } - complocsize1 = + complocsize1 = complocload1 = 0; for (vertlocnum = dgrfptr->s.baseval, fronlocnbr = 0; vertlocnum < dgrfptr->s.vertlocnnd; vertlocnum ++) { @@ -266,7 +266,7 @@ const BdgraphBipartSqParam * const paraptr) /*+ Method parameters +*/ complocload1 += (-partval1) & veloval; /* Superscalar update */ } for (edgelocnum = dgrfptr->s.vertloctax[vertlocnum], commcut = 0; - edgelocnum < dgrfptr->s.vendloctax[vertlocnum]; edgelocnum ++) { /* Build local frontier */ + edgelocnum < dgrfptr->s.vendloctax[vertlocnum]; edgelocnum ++) { /* Build local frontier */ int partend; int partdlt; @@ -279,12 +279,12 @@ const BdgraphBipartSqParam * const paraptr) /*+ Method parameters +*/ } dgrfptr->complocsize0 = dgrfptr->s.vertlocnbr - complocsize1; dgrfptr->fronlocnbr = fronlocnbr; - if (dgrfptr->s.veloloctax != NULL) + if (dgrfptr->s.veloloctax != NULL) dgrfptr->complocload0 = dgrfptr->s.velolocsum - complocload1; - - else + + else dgrfptr->complocload0 = dgrfptr->complocsize0; - + bgraphExit (&cgrfdat); #ifdef SCOTCH_DEBUG_BDGRAPH2 diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bdgraph_bipart_sq.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bdgraph_bipart_sq.h index 104cd38b1..a327e8c5e 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bdgraph_bipart_sq.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bdgraph_bipart_sq.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bdgraph_bipart_st.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bdgraph_bipart_st.c index 7f9ef25a1..be32d7da7 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bdgraph_bipart_st.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bdgraph_bipart_st.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ @@ -314,7 +314,7 @@ const Strat * restrict const strat) /*+ Bipartitioning strategy if ((o == 0) || (o2 == 0)) { /* If at least one method did bipartition */ Gnum compglbload0; - int b0; + int b0; int b1; compglbload0 = grafptr->compglbload0avg + savetab[0].compglbload0dlt; @@ -358,7 +358,7 @@ const Strat * restrict const strat) /*+ Bipartitioning strategy #endif /* SCOTCH_DEBUG_BDGRAPH1 */ #ifdef SCOTCH_DEBUG_BDGRAPH2 proccommold = grafptr->s.proccomm; /* Create new communicator to isolate method communications */ - MPI_Comm_dup (proccommold, &grafptr->s.proccomm); + MPI_Comm_dup (proccommold, &grafptr->s.proccomm); #endif /* SCOTCH_DEBUG_BDGRAPH2 */ o = (strat->tabl->methtab[strat->data.method.meth].func (grafptr, (void *) &strat->data.method.data)); #ifdef SCOTCH_DEBUG_BDGRAPH2 diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bdgraph_bipart_zr.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bdgraph_bipart_zr.c index 692ac4c16..96a73a5d7 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bdgraph_bipart_zr.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bdgraph_bipart_zr.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bdgraph_bipart_zr.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bdgraph_bipart_zr.h index 1648896b4..f5f1a0ec9 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bdgraph_bipart_zr.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bdgraph_bipart_zr.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bdgraph_check.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bdgraph_check.c index aa6dbc66a..7539fe7cc 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bdgraph_check.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bdgraph_check.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ @@ -304,7 +304,7 @@ const Bdgraph * restrict const grafptr) errorPrint ("bdgraphCheck: invalid global communication loads"); cheklocval |= 32; } - + if (grafptr->commglbgainextn != reduglbtab[4]) { errorPrint ("bdgraphCheck: invalid global communication gains"); cheklocval |= 64; diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bdgraph_gather_all.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bdgraph_gather_all.c index 32518a974..40cde20fc 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bdgraph_gather_all.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bdgraph_gather_all.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ @@ -134,7 +134,7 @@ Bgraph * restrict cgrfptr) /* Centralized graph */ } else { cgrfptr->parttax -= cgrfptr->s.baseval; - + if (dgrfptr->veexloctax != NULL) { if ((cgrfptr->veextax = (Gnum *) memAlloc (cgrfptr->s.vertnbr * sizeof (Gnum))) == NULL) { errorPrint ("bdgraphGatherAll: out of memory (3)"); @@ -180,12 +180,12 @@ Bgraph * restrict cgrfptr) /* Centralized graph */ cgrfptr->compload0min = dgrfptr->compglbload0min; /* Set constant fields of the centralized graph as those of the distibuted graph */ cgrfptr->compload0max = dgrfptr->compglbload0max; cgrfptr->compload0avg = dgrfptr->compglbload0avg; - cgrfptr->commloadextn0 = dgrfptr->commglbloadextn0; + cgrfptr->commloadextn0 = dgrfptr->commglbloadextn0; cgrfptr->commgainextn0 = dgrfptr->commglbgainextn0; - cgrfptr->domdist = dgrfptr->domdist; - cgrfptr->domwght[0] = dgrfptr->domwght[0]; - cgrfptr->domwght[1] = dgrfptr->domwght[1]; - cgrfptr->levlnum = dgrfptr->levlnum; + cgrfptr->domdist = dgrfptr->domdist; + cgrfptr->domwght[0] = dgrfptr->domwght[0]; + cgrfptr->domwght[1] = dgrfptr->domwght[1]; + cgrfptr->levlnum = dgrfptr->levlnum; if (dgrfptr->partgsttax == NULL) { /* If distributed graph does not have a part array yet */ bgraphZero (cgrfptr); @@ -198,7 +198,7 @@ Bgraph * restrict cgrfptr) /* Centralized graph */ errorPrint ("bdgraphGatherAll: communication error (4)"); return (1); } - + if (dgrfptr->veexloctax != NULL) { if (commAllgatherv (dgrfptr->veexloctax + dgrfptr->s.baseval, dgrfptr->s.vertlocnbr, GNUM_MPI, /* Get veextax of distributed graph */ cgrfptr->veextax, dgrfptr->s.proccnttab, dgrfptr->s.procdsptab, GNUM_MPI, dgrfptr->s.proccomm) != MPI_SUCCESS) { @@ -243,7 +243,7 @@ Bgraph * restrict cgrfptr) /* Centralized graph */ cgrfptr->compsize0 = dgrfptr->compglbsize0; cgrfptr->commload = dgrfptr->commglbload; cgrfptr->commgainextn = dgrfptr->commglbgainextn; - cgrfptr->commgainextn0 = dgrfptr->commglbgainextn0; + cgrfptr->commgainextn0 = dgrfptr->commglbgainextn0; cgrfptr->fronnbr = dgrfptr->fronglbnbr; #ifdef SCOTCH_DEBUG_BDGRAPH2 diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bdgraph_store.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bdgraph_store.c index 99c72de5f..ffa0a2cbe 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bdgraph_store.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bdgraph_store.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bgraph.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bgraph.c index d9ab77184..6a0b069fd 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bgraph.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bgraph.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ @@ -190,7 +190,7 @@ const ArchDom domsub[]) /*+ Subdomains + Gnum commgainextn0; /* External communication gain */ Gnum * restrict veextax; /* External gain array */ Gnum veexflagval; /* Flag set if external array useful */ - + tgtarchptr = &mapptr->archdat; /* Get target architecture */ if ((veextax = (Gnum *) memAlloc (actgrafptr->s.vertnbr * sizeof (Gnum))) == NULL) { diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bgraph.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bgraph.h index f50a0902f..cee40b8c0 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bgraph.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bgraph.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bgraph_bipart_bd.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bgraph_bipart_bd.c index 1f283edc3..207bbd81b 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bgraph_bipart_bd.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bgraph_bipart_bd.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bgraph_bipart_bd.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bgraph_bipart_bd.h index 5d3c76830..fc73f34fd 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bgraph_bipart_bd.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bgraph_bipart_bd.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bgraph_bipart_df.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bgraph_bipart_df.c index 9f600bd49..b9af18938 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bgraph_bipart_df.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bgraph_bipart_df.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bgraph_bipart_df.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bgraph_bipart_df.h index 3ff9b84cc..66397b174 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bgraph_bipart_df.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bgraph_bipart_df.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bgraph_bipart_ex.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bgraph_bipart_ex.c index 90307f2ee..5d9fa9b4e 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bgraph_bipart_ex.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bgraph_bipart_ex.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bgraph_bipart_ex.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bgraph_bipart_ex.h index bb8459731..2e55b237d 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bgraph_bipart_ex.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bgraph_bipart_ex.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bgraph_bipart_fm.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bgraph_bipart_fm.c index 4b05667e2..b1c87e50c 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bgraph_bipart_fm.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bgraph_bipart_fm.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ @@ -240,7 +240,7 @@ const BgraphBipartFmParam * const paraptr) /*+ Method parameters +*/ hashtab = hashtmp; } else - return (1); + return (1); memset (hashtab, ~0, hashsiz * sizeof (BgraphBipartFmVertex)); /* Set all vertex numbers to ~0 */ domdist = grafptr->domdist; @@ -525,7 +525,7 @@ const BgraphBipartFmParam * const paraptr) /*+ Method parameters +*/ compload0dltbst = compload0dlt; /* Forget backtracking */ commgainextnbst = commgainextn; swapvalbst = swapval; - savenbr = 0; + savenbr = 0; mswpnum ++; } } diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bgraph_bipart_fm.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bgraph_bipart_fm.h index 8a17a80a5..d45384876 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bgraph_bipart_fm.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bgraph_bipart_fm.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bgraph_bipart_gg.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bgraph_bipart_gg.c index ccb4537aa..b25af014f 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bgraph_bipart_gg.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bgraph_bipart_gg.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bgraph_bipart_gg.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bgraph_bipart_gg.h index 7077e3a67..e17adb869 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bgraph_bipart_gg.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bgraph_bipart_gg.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bgraph_bipart_gp.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bgraph_bipart_gp.c index 07a89d304..63bfd5b16 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bgraph_bipart_gp.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bgraph_bipart_gp.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bgraph_bipart_gp.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bgraph_bipart_gp.h index 9018e6398..a874c31ad 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bgraph_bipart_gp.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bgraph_bipart_gp.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bgraph_bipart_ml.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bgraph_bipart_ml.c index b7fe5f270..4d803c27b 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bgraph_bipart_ml.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bgraph_bipart_ml.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ @@ -226,7 +226,7 @@ const GraphCoarsenMulti * const coarmulttax) /*+ Pointer to multinode array coarvertnum = coarfrontab[coarfronnum]; finevertnum0 = coarmulttax[coarvertnum].vertnum[0]; finevertnum1 = coarmulttax[coarvertnum].vertnum[1]; - + if (finevertnum0 != finevertnum1) { /* If multinode si made of two distinct vertices */ GraphPart coarpartval; Gnum fineedgenum; diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bgraph_bipart_ml.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bgraph_bipart_ml.h index ebc184301..992c7e7c3 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bgraph_bipart_ml.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bgraph_bipart_ml.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bgraph_bipart_st.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bgraph_bipart_st.c index c0de18a96..1479d89ec 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bgraph_bipart_st.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bgraph_bipart_st.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ @@ -317,7 +317,7 @@ const Strat * restrict const strat) /*+ Bipartitioning strategy if ((o == 0) || (o2 == 0)) { /* If at least one method did bipartition */ Gnum compload0; - int b0; + int b0; int b1; compload0 = grafptr->compload0avg + savetab[0].compload0dlt; diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bgraph_bipart_st.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bgraph_bipart_st.h index 0ec8970c5..78e254bfc 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bgraph_bipart_st.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bgraph_bipart_st.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bgraph_bipart_zr.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bgraph_bipart_zr.c index 10b64ee97..de3d8184b 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bgraph_bipart_zr.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bgraph_bipart_zr.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bgraph_bipart_zr.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bgraph_bipart_zr.h index acc12a305..d3285c2e9 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bgraph_bipart_zr.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bgraph_bipart_zr.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bgraph_check.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bgraph_check.c index b594de37d..dce8e6717 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bgraph_check.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bgraph_check.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bgraph_store.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bgraph_store.c index d97c4a494..c5a47769a 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bgraph_store.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/bgraph_store.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/comm.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/comm.c index 2e47a89c5..127447242 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/comm.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/comm.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/comm.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/comm.h index 326d8937b..271fcd540 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/comm.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/comm.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/common.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/common.h index cb5e841cc..86fa0bbc7 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/common.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/common.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ @@ -288,7 +288,7 @@ void stringSubst (char * const, const char * cons void nu pl; \ void nl pl \ { nu pc; } \ -void FORTRAN4(nl,_) pl \ +void FORTRAN4(nl,_) pl \ { nu pc; } \ void FORTRAN4(nl,__) pl \ { nu pc; } \ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/common_file.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/common_file.c index 6a8b26100..0cc0a1abd 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/common_file.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/common_file.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/common_file.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/common_file.h index ca716eeeb..4a92fcfd7 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/common_file.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/common_file.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/common_file_compress.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/common_file_compress.c index c4dd2ba99..775092c8d 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/common_file_compress.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/common_file_compress.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/common_file_compress.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/common_file_compress.h index 162f241d8..aed594b54 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/common_file_compress.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/common_file_compress.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/common_file_uncompress.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/common_file_uncompress.c index 8e621eb7e..bf2b86aeb 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/common_file_uncompress.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/common_file_uncompress.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/common_integer.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/common_integer.c index 368603c66..3f6de79f1 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/common_integer.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/common_integer.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/common_memory.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/common_memory.c index 88804fb3e..5e8f59964 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/common_memory.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/common_memory.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/common_sort.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/common_sort.c index eddcdf8f3..228f5f19d 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/common_sort.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/common_sort.c @@ -48,10 +48,10 @@ typedef struct log(MAX_THRESH)). Since total_elements has type size_t, we get as upper bound for log (total_elements): bits per byte (CHAR_BIT) * sizeof(size_t). */ -#define STACK_SIZE (CHAR_BIT * sizeof (INT)) -#define PUSH(low, high) ((void) ((top->lo = (low)), (top->hi = (high)), ++top)) -#define POP(low, high) ((void) (--top, (low = top->lo), (high = top->hi))) -#define STACK_NOT_EMPTY (stack < top) +#define STACK_SIZE (CHAR_BIT * sizeof (INT)) +#define PUSH(low, high) ((void) ((top->lo = (low)), (top->hi = (high)), ++top)) +#define POP(low, high) ((void) (--top, (low = top->lo), (high = top->hi))) +#define STACK_NOT_EMPTY (stack < top) #endif /* MAX_THRESH */ @@ -111,56 +111,56 @@ const INT total_elems) /*+ Number of entries to sort char *left_ptr; char *right_ptr; - /* Select median value from among LO, MID, and HI. Rearrange - LO and HI so the three values are sorted. This lowers the - probability of picking a pathological pivot value and - skips a comparison for both the LEFT_PTR and RIGHT_PTR in - the while loops. */ - - char *mid = lo + INTSORTSIZE * ((hi - lo) / INTSORTSIZE >> 1); - - if (INTSORTCMP ((void *) mid, (void *) lo)) - INTSORTSWAP (mid, lo); - if (INTSORTCMP ((void *) hi, (void *) mid)) - INTSORTSWAP (mid, hi); - else - goto jump_over; - if (INTSORTCMP ((void *) mid, (void *) lo)) - INTSORTSWAP (mid, lo); - jump_over:; - - left_ptr = lo + INTSORTSIZE; - right_ptr = hi - INTSORTSIZE; - - /* Here's the famous ``collapse the walls'' section of quicksort. - Gotta like those tight inner loops! They are the main reason - that this algorithm runs much faster than others. */ - do - { - while (INTSORTCMP ((void *) left_ptr, (void *) mid)) - left_ptr += INTSORTSIZE; - - while (INTSORTCMP ((void *) mid, (void *) right_ptr)) - right_ptr -= INTSORTSIZE; - - if (left_ptr < right_ptr) - { - INTSORTSWAP (left_ptr, right_ptr); - if (mid == left_ptr) - mid = right_ptr; - else if (mid == right_ptr) - mid = left_ptr; - left_ptr += INTSORTSIZE; - right_ptr -= INTSORTSIZE; - } - else if (left_ptr == right_ptr) - { - left_ptr += INTSORTSIZE; - right_ptr -= INTSORTSIZE; - break; - } - } - while (left_ptr <= right_ptr); + /* Select median value from among LO, MID, and HI. Rearrange + LO and HI so the three values are sorted. This lowers the + probability of picking a pathological pivot value and + skips a comparison for both the LEFT_PTR and RIGHT_PTR in + the while loops. */ + + char *mid = lo + INTSORTSIZE * ((hi - lo) / INTSORTSIZE >> 1); + + if (INTSORTCMP ((void *) mid, (void *) lo)) + INTSORTSWAP (mid, lo); + if (INTSORTCMP ((void *) hi, (void *) mid)) + INTSORTSWAP (mid, hi); + else + goto jump_over; + if (INTSORTCMP ((void *) mid, (void *) lo)) + INTSORTSWAP (mid, lo); + jump_over:; + + left_ptr = lo + INTSORTSIZE; + right_ptr = hi - INTSORTSIZE; + + /* Here's the famous ``collapse the walls'' section of quicksort. + Gotta like those tight inner loops! They are the main reason + that this algorithm runs much faster than others. */ + do + { + while (INTSORTCMP ((void *) left_ptr, (void *) mid)) + left_ptr += INTSORTSIZE; + + while (INTSORTCMP ((void *) mid, (void *) right_ptr)) + right_ptr -= INTSORTSIZE; + + if (left_ptr < right_ptr) + { + INTSORTSWAP (left_ptr, right_ptr); + if (mid == left_ptr) + mid = right_ptr; + else if (mid == right_ptr) + mid = left_ptr; + left_ptr += INTSORTSIZE; + right_ptr -= INTSORTSIZE; + } + else if (left_ptr == right_ptr) + { + left_ptr += INTSORTSIZE; + right_ptr -= INTSORTSIZE; + break; + } + } + while (left_ptr <= right_ptr); /* Set up pointers for next iteration. First determine whether left and right partitions are below the threshold size. If so, @@ -170,24 +170,24 @@ const INT total_elems) /*+ Number of entries to sort if ((size_t) (right_ptr - lo) <= max_thresh) { if ((size_t) (hi - left_ptr) <= max_thresh) - /* Ignore both small partitions. */ + /* Ignore both small partitions. */ POP (lo, hi); else - /* Ignore small left partition. */ + /* Ignore small left partition. */ lo = left_ptr; } else if ((size_t) (hi - left_ptr) <= max_thresh) - /* Ignore small right partition. */ + /* Ignore small right partition. */ hi = right_ptr; else if ((right_ptr - lo) > (hi - left_ptr)) { - /* Push larger left partition indices. */ + /* Push larger left partition indices. */ PUSH (lo, right_ptr); lo = left_ptr; } else { - /* Push larger right partition indices. */ + /* Push larger right partition indices. */ PUSH (left_ptr, hi); hi = right_ptr; } @@ -224,17 +224,17 @@ const INT total_elems) /*+ Number of entries to sort run_ptr = base_ptr + INTSORTSIZE; while ((run_ptr += INTSORTSIZE) <= end_ptr) { - tmp_ptr = run_ptr - INTSORTSIZE; - while (INTSORTCMP ((void *) run_ptr, (void *) tmp_ptr)) - tmp_ptr -= INTSORTSIZE; + tmp_ptr = run_ptr - INTSORTSIZE; + while (INTSORTCMP ((void *) run_ptr, (void *) tmp_ptr)) + tmp_ptr -= INTSORTSIZE; - tmp_ptr += INTSORTSIZE; + tmp_ptr += INTSORTSIZE; if (tmp_ptr != run_ptr) { char *trav; - trav = run_ptr + INTSORTSIZE; - while (--trav >= run_ptr) + trav = run_ptr + INTSORTSIZE; + while (--trav >= run_ptr) { char c = *trav; char *hi, *lo; diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/common_string.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/common_string.c index f1e02e6fd..e378ca613 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/common_string.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/common_string.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/common_stub.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/common_stub.c index 35e7e057d..fe9b742de 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/common_stub.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/common_stub.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph.c index b30b06cc2..0e69dc082 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ @@ -117,19 +117,19 @@ Dgraph * restrict const grafptr) memFree (grafptr->vertloctax + grafptr->baseval); if ((grafptr->flagval & DGRAPHVERTGROUP) == 0) { /* If vertex arrays not grouped */ if (grafptr->vendloctax != (grafptr->vertloctax + 1)) - memFree (grafptr->vendloctax + grafptr->baseval); + memFree (grafptr->vendloctax + grafptr->baseval); if (grafptr->veloloctax != NULL) - memFree (grafptr->veloloctax + grafptr->baseval); + memFree (grafptr->veloloctax + grafptr->baseval); if (grafptr->vnumloctax != NULL) memFree (grafptr->vnumloctax + grafptr->baseval); if (grafptr->vlblloctax != NULL) - memFree (grafptr->vlblloctax + grafptr->baseval); + memFree (grafptr->vlblloctax + grafptr->baseval); } if (grafptr->edgeloctax != NULL) memFree (grafptr->edgeloctax + grafptr->baseval); if ((grafptr->flagval & DGRAPHEDGEGROUP) == 0) { /* If edge arrays not grouped */ if (grafptr->edloloctax != NULL) - memFree (grafptr->edloloctax + grafptr->baseval); + memFree (grafptr->edloloctax + grafptr->baseval); } } if ((grafptr->flagval & DGRAPHFREEPSID) != 0) { /* If process send arrays must be freed */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph.h index d6437f3dc..ff0658bee 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_allreduce.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_allreduce.c index fd2d7ae70..650762919 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_allreduce.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_allreduce.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_allreduce.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_allreduce.h index 3424e5bbd..1990f6797 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_allreduce.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_allreduce.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_band.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_band.c index 4b54b1dbc..e61bea5ec 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_band.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_band.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ @@ -901,7 +901,7 @@ Gnum * const bandvertlocancptr) /*+ Pointer to flag set i Gnum edgelocnnd; for (bandvertlocnum = bandgrafptr->baseval; /* For all vertices that do not belong to the last level */ - bandvertlocnum < bandvertlvlnum; bandvertlocnum ++) { + bandvertlocnum < bandvertlvlnum; bandvertlocnum ++) { Gnum vertlocnum; Gnum bandedgelocnum; diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_build.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_build.c index 455ab13da..e209d039a 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_build.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_build.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_build.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_build.h index a151afc1b..d0e741e23 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_build.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_build.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_build_grid3d.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_build_grid3d.c index e616fb5a1..bb1e8ce55 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_build_grid3d.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_build_grid3d.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_build_grid3d.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_build_grid3d.h index 438bbdba2..780acd3f8 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_build_grid3d.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_build_grid3d.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_build_hcub.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_build_hcub.c index 35622ccb7..721a4e300 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_build_hcub.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_build_hcub.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_check.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_check.c index c1865c622..03cdf0ddc 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_check.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_check.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_coarsen.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_coarsen.c index fd83fa007..d5112c798 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_coarsen.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_coarsen.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ @@ -850,7 +850,7 @@ DgraphCoarsenData * restrict const coarptr) coargrafptr->edgeloctax -= coargrafptr->baseval; coargrafptr->edloloctax = memRealloc (coaredloloctax + coargrafptr->baseval, coargrafptr->edgelocnbr * sizeof (Gnum)); coargrafptr->edloloctax -= coargrafptr->baseval; - + reduloctab[0] = coargrafptr->vertlocnbr; /* Get maximum over all processes */ reduloctab[1] = coargrafptr->edgelocnbr; reduloctab[2] = coardegrlocmax; /* Get local maximum degree */ @@ -963,7 +963,7 @@ const double coarrat) /*+ Maximum contraction ratio dgraphMatchExit (&matedat); - vertsndnbr = + vertsndnbr = edgesndnbr = 0; for (procnum = 0; procnum < finegrafptr->procglbnbr; procnum ++) { vertsndnbr += matedat.c.dcntloctab[procnum].vertsndnbr; @@ -978,7 +978,7 @@ const double coarrat) /*+ Maximum contraction ratio return (2); } - vertrcvnbr = + vertrcvnbr = edgercvnbr = 0; coargrafptr->procdsptab[0] = finegrafptr->baseval; /* Build vertex-to-process array */ for (procnum = 0; procnum < finegrafptr->procglbnbr; procnum ++) { diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_coarsen.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_coarsen.h index c21a901a3..c479c2649 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_coarsen.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_coarsen.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_coarsen_edge.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_coarsen_edge.c index 988074ff0..f34a618cd 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_coarsen_edge.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_coarsen_edge.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_fold.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_fold.c index 9f26cdbb6..e665e7002 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_fold.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_fold.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ @@ -629,7 +629,7 @@ MPI_Datatype vertinfotype) return (1); } #endif /* SCOTCH_DEBUG_DGRAPH2 */ - + for (procngbnum = 0, procngbmax = fldvertadjnbr; /* Initialize search accelerator */ procngbmax - procngbnum > 1; ) { int procngbmed; diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_fold.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_fold.h index 721d49856..23cabf558 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_fold.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_fold.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_fold_comm.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_fold_comm.c index 56a26e0df..1ec574b70 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_fold_comm.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_fold_comm.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_fold_comm.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_fold_comm.h index e75749e0f..ff362e100 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_fold_comm.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_fold_comm.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_fold_dup.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_fold_dup.c index 25d294c3a..bbcb91b75 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_fold_dup.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_fold_dup.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_fold_dup.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_fold_dup.h index dbebf9192..500d81c41 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_fold_dup.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_fold_dup.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_gather.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_gather.c index dde54a7e7..65c041df2 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_gather.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_gather.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_gather_all.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_gather_all.c index 489c1bcbc..c48b035af 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_gather_all.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_gather_all.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_ghst.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_ghst.c index 3fd5dcfa3..76d2e34d4 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_ghst.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_ghst.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_ghst.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_ghst.h index d9af268ee..7db19ab2c 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_ghst.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_ghst.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_halo.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_halo.c index 8f1af7b42..1efcb5e6b 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_halo.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_halo.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_halo.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_halo.h index dab001efd..4068c7db9 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_halo.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_halo.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_halo_fill.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_halo_fill.c index 70e34303d..32372e3e5 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_halo_fill.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_halo_fill.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_induce.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_induce.c index 654597605..ace72740a 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_induce.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_induce.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ @@ -306,7 +306,7 @@ Dgraph * restrict const indgrafptr) int dgraphInducePart ( Dgraph * restrict const orggrafptr, /* Pointer to original distributed graph */ -const GraphPart * restrict const orgpartgsttax, /* Based array of local vertex partition flags */ +const GraphPart * restrict const orgpartgsttax, /* Based array of local vertex partition flags */ const Gnum indvertnbr, /* Number of local vertices in selected part */ const GraphPart indpartval, Dgraph * restrict const indgrafptr) @@ -420,7 +420,7 @@ Dgraph * restrict const indgrafptr) memSet (orgindxgsttax, ~0, orggrafptr->vertlocnbr * sizeof (Gnum)); /* Preset index array */ orgindxgsttax -= orggrafptr->baseval; - for (indvertlocnum = orggrafptr->baseval, indvertglbnum = indgrafptr->procdsptab[indgrafptr->proclocnum], + for (indvertlocnum = orggrafptr->baseval, indvertglbnum = indgrafptr->procdsptab[indgrafptr->proclocnum], indedgelocmax = 0, orgvertlocnum = orggrafptr->baseval; /* Fill index array while recomputing tighter upper bound on arcs */ orgvertlocnum < orggrafptr->vertlocnnd; orgvertlocnum ++) { if (orgpartgsttax[orgvertlocnum] == indpartval) { diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_io_load.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_io_load.c index 447695beb..c2ec12a45 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_io_load.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_io_load.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_io_load.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_io_load.h index 565381f3a..3ad2308cc 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_io_load.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_io_load.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_io_save.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_io_save.c index 1745fcfef..b59e1e3ed 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_io_save.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_io_save.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_match.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_match.c index e6c88b451..c9b69c337 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_match.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_match.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_match.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_match.h index c24043b12..4f773ef98 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_match.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_match.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_match_check.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_match_check.c index 291316bfe..3ecbf27c1 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_match_check.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_match_check.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_match_scan.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_match_scan.c index f2079266a..b817ec94d 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_match_scan.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_match_scan.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_match_sync_coll.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_match_sync_coll.c index ba9dcf64a..3d195bd23 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_match_sync_coll.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_match_sync_coll.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_match_sync_ptop.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_match_sync_ptop.c index 54d5e612a..e416e7f20 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_match_sync_ptop.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_match_sync_ptop.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_scatter.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_scatter.c index ad4290fff..8746b6698 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_scatter.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_scatter.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_view.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_view.c index a92f7360e..540843805 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_view.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_view.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ @@ -97,68 +97,68 @@ FILE * const stream) MPI_Barrier (proccomm); if (procngbnbr == proclocnum) { fprintf (stream, "Process %d:\n", - proclocnum); + proclocnum); fprintf (stream, " vertglbnbr: " GNUMSTRING "\n vertgstnbr: " GNUMSTRING "\n vertgstnnd: " GNUMSTRING "\n vertlocnbr: " GNUMSTRING "\n vertlocnnd: " GNUMSTRING "\n", - (Gnum) grafptr->vertglbnbr, - (Gnum) grafptr->vertgstnbr, - (Gnum) grafptr->vertgstnnd, - (Gnum) grafptr->vertlocnbr, - (Gnum) grafptr->vertlocnnd); + (Gnum) grafptr->vertglbnbr, + (Gnum) grafptr->vertgstnbr, + (Gnum) grafptr->vertgstnnd, + (Gnum) grafptr->vertlocnbr, + (Gnum) grafptr->vertlocnnd); fprintf (stream, " vertloctax:"); if (grafptr->vendloctax == grafptr->vertloctax + 1) { - for (vertlocnum = grafptr->baseval; vertlocnum <= grafptr->vertlocnnd; vertlocnum ++)/**/ - fprintf (stream, " " GNUMSTRING, - (Gnum) grafptr->vertloctax[vertlocnum]); - fprintf (stream, " x\n vendloctax: = vertloctax + 1"); + for (vertlocnum = grafptr->baseval; vertlocnum <= grafptr->vertlocnnd; vertlocnum ++)/**/ + fprintf (stream, " " GNUMSTRING, + (Gnum) grafptr->vertloctax[vertlocnum]); + fprintf (stream, " x\n vendloctax: = vertloctax + 1"); } else { - for (vertlocnum = grafptr->baseval; vertlocnum < grafptr->vertlocnnd; vertlocnum ++) - fprintf (stream, " " GNUMSTRING, - (Gnum) grafptr->vertloctax[vertlocnum]); - fprintf (stream, " vendloctax: x"); - for (vertlocnum = grafptr->baseval; vertlocnum < grafptr->vertlocnnd; vertlocnum ++) - fprintf (stream, " " GNUMSTRING, - (Gnum) grafptr->vendloctax[vertlocnum]); + for (vertlocnum = grafptr->baseval; vertlocnum < grafptr->vertlocnnd; vertlocnum ++) + fprintf (stream, " " GNUMSTRING, + (Gnum) grafptr->vertloctax[vertlocnum]); + fprintf (stream, " vendloctax: x"); + for (vertlocnum = grafptr->baseval; vertlocnum < grafptr->vertlocnnd; vertlocnum ++) + fprintf (stream, " " GNUMSTRING, + (Gnum) grafptr->vendloctax[vertlocnum]); } fprintf (stream, "\n edgeglbnbr: " GNUMSTRING "\n edgelocnbr: " GNUMSTRING "\n", - (Gnum) grafptr->edgeglbnbr, - (Gnum) grafptr->edgelocnbr); + (Gnum) grafptr->edgeglbnbr, + (Gnum) grafptr->edgelocnbr); fprintf (stream, " edgeloctax:"); for (edgelocnum = grafptr->baseval, edgelocptr = grafptr->edgeloctax; - edgelocnum < grafptr->edgelocnbr + grafptr->baseval; - edgelocnum ++, edgelocptr ++) - fprintf (stream, " " GNUMSTRING, - (Gnum) *edgelocptr); + edgelocnum < grafptr->edgelocnbr + grafptr->baseval; + edgelocnum ++, edgelocptr ++) + fprintf (stream, " " GNUMSTRING, + (Gnum) *edgelocptr); if ((grafptr->flagval & DGRAPHHASEDGEGST) != 0) { - fprintf (stream, "\n edgegsttax:"); - for (edgelocnum = grafptr->baseval, edgelocptr = grafptr->edgegsttax; - edgelocnum < grafptr->edgelocnbr + grafptr->baseval; - edgelocnum ++, edgelocptr ++) - fprintf (stream, " " GNUMSTRING, - (Gnum) *edgelocptr); + fprintf (stream, "\n edgegsttax:"); + for (edgelocnum = grafptr->baseval, edgelocptr = grafptr->edgegsttax; + edgelocnum < grafptr->edgelocnbr + grafptr->baseval; + edgelocnum ++, edgelocptr ++) + fprintf (stream, " " GNUMSTRING, + (Gnum) *edgelocptr); } fprintf (stream, "\n procdsptab:"); for (procngbnum = 0; procngbnum <= procglbnbr ; procngbnum ++) - fprintf (stream, " " GNUMSTRING, - (Gnum) grafptr->procdsptab[procngbnum]); + fprintf (stream, " " GNUMSTRING, + (Gnum) grafptr->procdsptab[procngbnum]); fprintf (stream, "\n procngbnbr: %d", - grafptr->procngbnbr); + grafptr->procngbnbr); fprintf (stream, "\n procngbtab:"); for (procngbnum = 0; procngbnum < grafptr->procngbnbr; procngbnum ++) - fprintf (stream, " %d", - grafptr->procngbtab[procngbnum]); + fprintf (stream, " %d", + grafptr->procngbtab[procngbnum]); fprintf (stream, "\n procrcvtab:"); for (procngbnum = 0; procngbnum < grafptr->procglbnbr; procngbnum ++) - fprintf (stream, " %d", - grafptr->procrcvtab[procngbnum]); + fprintf (stream, " %d", + grafptr->procrcvtab[procngbnum]); fprintf (stream, "\n procsndnbr: %d", - grafptr->procsndnbr); + grafptr->procsndnbr); fprintf (stream, "\n procsndtab:"); for (procngbnum = 0; procngbnum < grafptr->procglbnbr; procngbnum ++) - fprintf (stream, " %d", - grafptr->procsndtab[procngbnum]); + fprintf (stream, " %d", + grafptr->procsndtab[procngbnum]); fprintf (stream, "\n degrglbmax: " GNUMSTRING, - (Gnum) grafptr->degrglbmax); + (Gnum) grafptr->degrglbmax); fprintf (stream, "\n"); fflush (stream); /* Flush data */ } diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dmapping.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dmapping.c index 4aa5834d7..74dacf517 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dmapping.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dmapping.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dmapping.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dmapping.h index 66c9d323a..354963d84 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dmapping.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dmapping.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dmapping_io.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dmapping_io.c index a36ea7cde..0c357b078 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dmapping_io.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dmapping_io.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dorder.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dorder.c index b6a8c03a0..ab0169525 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dorder.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dorder.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ @@ -189,7 +189,7 @@ Dorder * const ordeptr) /* This routine gives back a new distributed ** column block slot in the same ordering -** structure as the given column block. +** structure as the given column block. ** It returns: ** - !NULL : new column block. ** - NULL : on error. @@ -217,7 +217,7 @@ MPI_Comm proccomm) /* Communicator sharing the bl reduloctab[0] = 2; /* Indicate error without doubt */ } else { - reduloctab[0] = 0; + reduloctab[0] = 0; if (proclocnum == 0) { /* If root of sub-tree */ reduloctab[0] = 1; /* Indicate it is the root */ reduloctab[1] = ordeptr->proclocnum; /* Broadcast global rank of block root */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dorder.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dorder.h index 559eb51dd..06f09aee9 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dorder.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dorder.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dorder_gather.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dorder_gather.c index 148fa1cc2..0d6f6dd1f 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dorder_gather.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dorder_gather.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dorder_gather.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dorder_gather.h index 4dea65c7f..8c55384e5 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dorder_gather.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dorder_gather.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dorder_io.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dorder_io.c index c6a04bac3..87142ed31 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dorder_io.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dorder_io.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dorder_io_block.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dorder_io_block.c index 7f32fcb7e..ada9ed4e0 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dorder_io_block.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dorder_io_block.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dorder_io_tree.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dorder_io_tree.c index 92a7c66e8..8079c06e9 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dorder_io_tree.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dorder_io_tree.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dorder_perm.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dorder_perm.c index 9ca58e3de..4e7c5b116 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dorder_perm.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dorder_perm.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dorder_perm.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dorder_perm.h index bb4f19dc0..7bd9a427f 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dorder_perm.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dorder_perm.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dorder_tree_dist.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dorder_tree_dist.c index 8160dbb7e..ae38e3b08 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dorder_tree_dist.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dorder_tree_dist.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dummysizes.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dummysizes.c index ed64be100..0fff3cf63 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dummysizes.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/dummysizes.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/gain.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/gain.c index 4b05e2e49..83567d855 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/gain.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/gain.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/gain.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/gain.h index a94d85a4d..32f5c8c3e 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/gain.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/gain.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/geom.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/geom.c index ab3330836..040201bd8 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/geom.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/geom.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/geom.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/geom.h index c94516d97..a8a95c045 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/geom.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/geom.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/graph.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/graph.c index 77ca2f62a..95944d67a 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/graph.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/graph.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/graph.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/graph.h index 3b4b86ac5..1a4ee6936 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/graph.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/graph.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/graph_base.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/graph_base.c index dc57e8326..621d64060 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/graph_base.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/graph_base.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/graph_check.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/graph_check.c index e0723493a..fb9701bd6 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/graph_check.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/graph_check.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/graph_coarsen.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/graph_coarsen.c index 4dc703724..6adf395f9 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/graph_coarsen.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/graph_coarsen.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ @@ -176,7 +176,7 @@ const GraphCoarsenType coartype) /*+ Edge matching type &coargrafptr->verttax, (size_t) ((coarvertnbr + 1) * sizeof (Gnum)), &coargrafptr->velotax, (size_t) (coarvertnbr * sizeof (Gnum)), &coarmulttax, (size_t) (coarvertnbr * sizeof (GraphCoarsenMulti)), - &coargrafptr->edgetax, (size_t) (finegrafptr->edgenbr * sizeof (Gnum)), /* Pre-allocate space for edge arrays */ + &coargrafptr->edgetax, (size_t) (finegrafptr->edgenbr * sizeof (Gnum)), /* Pre-allocate space for edge arrays */ &coargrafptr->edlotax, (size_t) (finegrafptr->edgenbr * sizeof (Gnum)), &coarhashtab, (size_t) (coarhashnbr * sizeof (GraphCoarsenHash)), NULL) == NULL) { errorPrint ("graphCoarsen: out of memory (2)"); /* Allocate coarser graph structure */ @@ -527,7 +527,7 @@ const Gnum coarvelomax) /* Maximum vertex weight allow finequeutailval = 0; finequeutab[0] = finegrafptr->baseval + intRandVal (finegrafptr->vertnbr); /* Start from random vertex */ finecoartax[finequeutab[0]] = -2; /* Set vertex as enqueued */ - + for (finepermnum = finegrafptr->baseval; finequeutailval < finegrafptr->vertnbr; ) { if (finequeutailval < finequeuheadval) { /* If vertices remain in queue */ Gnum finevertbst; /* Best vertex found till now */ @@ -691,7 +691,7 @@ const Gnum coarvelomax) /* Maximum vertex weight allow finequeutailval = 0; finequeutab[0] = finegrafptr->baseval + intRandVal (finegrafptr->vertnbr); /* Start from random vertex */ finecoartax[finequeutab[0]] = -2; /* Set vertex as enqueued */ - + for (finepermnum = finegrafptr->baseval; finequeutailval < finegrafptr->vertnbr; ) { if (finequeutailval < finequeuheadval) { /* If vertices remain in queue */ Gnum finevertbst; /* Best vertex found till now */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/graph_coarsen.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/graph_coarsen.h index feff613e0..87480463d 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/graph_coarsen.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/graph_coarsen.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/graph_coarsen_edge.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/graph_coarsen_edge.c index df7334b5a..5901984f3 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/graph_coarsen_edge.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/graph_coarsen_edge.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/graph_induce.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/graph_induce.c index 8d22b0398..f42062a3d 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/graph_induce.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/graph_induce.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/graph_induce.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/graph_induce.h index eee653710..53460dc04 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/graph_induce.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/graph_induce.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/graph_io.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/graph_io.c index 8eaf7b7e7..565fbada9 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/graph_io.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/graph_io.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/graph_io.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/graph_io.h index 3dd89e6bc..a34428d24 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/graph_io.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/graph_io.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/graph_io_chac.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/graph_io_chac.c index 0ca7e757f..f19deefef 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/graph_io_chac.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/graph_io_chac.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/graph_io_habo.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/graph_io_habo.c index 121f6d3c2..533698dbf 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/graph_io_habo.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/graph_io_habo.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/graph_io_habo.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/graph_io_habo.h index f259936bd..7c0268b9c 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/graph_io_habo.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/graph_io_habo.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/graph_io_mmkt.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/graph_io_mmkt.c index 9fe27708a..39eff2439 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/graph_io_mmkt.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/graph_io_mmkt.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/graph_io_mmkt.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/graph_io_mmkt.h index 2479bbcc1..9334782fc 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/graph_io_mmkt.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/graph_io_mmkt.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/graph_io_scot.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/graph_io_scot.c index 2f05b92ec..c7b7c4f73 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/graph_io_scot.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/graph_io_scot.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/graph_io_scot.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/graph_io_scot.h index a62a1187d..616de9f69 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/graph_io_scot.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/graph_io_scot.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/graph_list.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/graph_list.c index f948b69bd..75c5f18e9 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/graph_list.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/graph_list.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/graph_list.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/graph_list.h index c5b4eee8e..e4250d777 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/graph_list.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/graph_list.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hall_order_hd.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hall_order_hd.c index dd0fcd3df..e95bc80dd 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hall_order_hd.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hall_order_hd.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ @@ -86,7 +86,7 @@ /** All 3 sets are disjoint, Ve and V1 can be empty **/ /** **/ /** Modifications w.r.t. previous version : **/ -/** **/ +/** **/ /** New Input: **/ /** --------- **/ /** nbelts : integer holding size of Ve **/ @@ -384,9 +384,9 @@ Gnum * restrict w) /* Flag array memSet (last + 1, 0, n * sizeof (Gnum)); memSet (head + 1, 0, n * sizeof (Gnum)); - + if (nbelts == 0) { /* Patch 8/12/03 */ - memSet (elen + 1, 0, n * sizeof (Gnum)); + memSet (elen + 1, 0, n * sizeof (Gnum)); for (i = 1; i <= n; i ++) { nv[i] = 1; w[i] = 1; diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hall_order_hd.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hall_order_hd.h index 0d5e9c726..ae59d7c46 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hall_order_hd.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hall_order_hd.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hall_order_hf.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hall_order_hf.c index 4d2d70659..5ae7fcd49 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hall_order_hf.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hall_order_hf.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ @@ -86,7 +86,7 @@ /** All 3 sets are disjoint, Ve and V1 can be empty **/ /** **/ /** Modifications w.r.t. previous version : **/ -/** **/ +/** **/ /** New Input: **/ /** --------- **/ /** nbelts : integer holding size of Ve **/ @@ -163,10 +163,10 @@ Gnum * restrict next /* [] */, /* Linked list structure Gnum * restrict w /* [] */, /* Flag array */ Gnum * restrict head /* [] */) /* Linked list structure */ { - Gnum hash, pend, hmod, lenj, dmax, wflg, dext, psrc, pdst, - wnvi, e, i, j, k, p, degme, x, nelme, nreal, lastd, nleft, + Gnum hash, pend, hmod, lenj, dmax, wflg, dext, psrc, pdst, + wnvi, e, i, j, k, p, degme, x, nelme, nreal, lastd, nleft, ilast, jlast, inext, jnext, n2, p1, nvpiv, p2, p3, me = 0, nbflag, ln, - we, pj, pn, mindeg, elenme, slenme, maxmem, newmem, wf3, wf4, + we, pj, pn, mindeg, elenme, slenme, maxmem, newmem, wf3, wf4, deg, eln, mem, nel, pme, pas, nvi, nvj, pme1, pme2, knt1, knt2, knt3; float rmf, rmf1; @@ -421,7 +421,7 @@ Gnum * restrict head /* [] */) /* Linked list structure memSet (last + 1, 0, n * sizeof (Gnum)); if (nbelts == 0) { /* Patch 8/12/03 */ - memSet (elen + 1, 0, n * sizeof (Gnum)); + memSet (elen + 1, 0, n * sizeof (Gnum)); for (i = 1; i <= n; i ++) { nv[i] = 1; w[i] = 1; @@ -915,7 +915,7 @@ Gnum * restrict head /* [] */) /* Linked list structure deg = degree[i]; rmf1 = (float) deg * (float) (deg - 1 + (2 * degme)) - (float) wf[i]; degree[i] = nleft - nvi; - deg = degree[i]; + deg = degree[i]; rmf = (float) deg * (float) (deg - 1) - (float) (degme - nvi) * (float) (degme - nvi - 1); rmf = MIN (rmf, rmf1); } diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hall_order_hf.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hall_order_hf.h index 75f1eae99..895cf56b2 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hall_order_hf.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hall_order_hf.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hall_order_hx.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hall_order_hx.c index e3a6de188..3abea05d8 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hall_order_hx.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hall_order_hx.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ @@ -147,7 +147,7 @@ const float fillrat) } } #endif /* SCOTCH_DEBUG_ORDER2 */ - + for (i = baseval, cblknbr = 0, rootnum = ~0; /* Assume no root found yet */ i < vnohnnd; i ++) { if (nvartax[i] != 0) { /* If principal variable */ @@ -267,7 +267,7 @@ const float fillrat) if ((peritab[i] < baseval) || (peritab[i] >= vnohnnd)) { errorPrint ("hallOrderHxBuild: permutation out of bounds"); return (1); - } + } if (permtax[peritab[i]] != ~0) { errorPrint ("hallOrderHxBuild: duplicate permutation index"); return (1); diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hall_order_hx.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hall_order_hx.h index 1374c280d..777744461 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hall_order_hx.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hall_order_hx.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hdgraph.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hdgraph.c index 6bc23594f..8c59ab778 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hdgraph.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hdgraph.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hdgraph.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hdgraph.h index c888fd878..a82a19a97 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hdgraph.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hdgraph.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hdgraph_check.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hdgraph_check.c index 099c9dfcd..d8b2bb394 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hdgraph_check.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hdgraph_check.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hdgraph_fold.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hdgraph_fold.c index ccd0123aa..70c8c0e0e 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hdgraph_fold.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hdgraph_fold.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ @@ -88,7 +88,7 @@ Hdgraph * restrict const fldgrafptr) fldprocglbnbr = (orggrafptr->s.procglbnbr + 1) / 2; if (partval == 1) { fldproclocnum = orggrafptr->s.proclocnum - fldprocglbnbr; - fldprocglbnbr = orggrafptr->s.procglbnbr - fldprocglbnbr; + fldprocglbnbr = orggrafptr->s.procglbnbr - fldprocglbnbr; } else fldproclocnum = orggrafptr->s.proclocnum; @@ -146,7 +146,7 @@ MPI_Comm fldproccomm) /* Pre-computed communicator * fldprocglbnbr = (orggrafptr->s.procglbnbr + 1) / 2; if (partval == 1) { fldproclocnum = orggrafptr->s.proclocnum - fldprocglbnbr; - fldprocglbnbr = orggrafptr->s.procglbnbr - fldprocglbnbr; + fldprocglbnbr = orggrafptr->s.procglbnbr - fldprocglbnbr; } else fldproclocnum = orggrafptr->s.proclocnum; diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hdgraph_fold.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hdgraph_fold.h index 1eff11895..41280793d 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hdgraph_fold.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hdgraph_fold.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hdgraph_gather.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hdgraph_gather.c index 8561621a9..cb13dbe30 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hdgraph_gather.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hdgraph_gather.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hdgraph_induce.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hdgraph_induce.c index ca2660ac0..4dee151bc 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hdgraph_induce.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hdgraph_induce.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hdgraph_order_nd.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hdgraph_order_nd.c index d26afa0af..f106d30a7 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hdgraph_order_nd.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hdgraph_order_nd.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hdgraph_order_nd.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hdgraph_order_nd.h index 11b236eb9..3fb8c39aa 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hdgraph_order_nd.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hdgraph_order_nd.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hdgraph_order_si.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hdgraph_order_si.c index 1d8d11a60..13e6ebac1 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hdgraph_order_si.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hdgraph_order_si.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hdgraph_order_si.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hdgraph_order_si.h index c0972fe72..9763786bd 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hdgraph_order_si.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hdgraph_order_si.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hdgraph_order_sq.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hdgraph_order_sq.c index eb6351e85..0ed9efb48 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hdgraph_order_sq.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hdgraph_order_sq.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hdgraph_order_sq.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hdgraph_order_sq.h index a909e2eb0..5f24adfb2 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hdgraph_order_sq.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hdgraph_order_sq.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hdgraph_order_st.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hdgraph_order_st.c index b03c09ee6..e6b27bfd4 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hdgraph_order_st.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hdgraph_order_st.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hdgraph_order_st.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hdgraph_order_st.h index 06eb60733..eace024d2 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hdgraph_order_st.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hdgraph_order_st.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hgraph.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hgraph.c index a773d4651..347f7c246 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hgraph.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hgraph.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hgraph.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hgraph.h index 72bf03850..9536933e2 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hgraph.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hgraph.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hgraph_check.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hgraph_check.c index 7b6934316..46aa7df1c 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hgraph_check.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hgraph_check.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hgraph_induce.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hgraph_induce.c index f664dd3f6..64bfd4a95 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hgraph_induce.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hgraph_induce.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hgraph_induce.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hgraph_induce.h index cdc5cbd8c..7f1ce7d40 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hgraph_induce.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hgraph_induce.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hgraph_induce_edge.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hgraph_induce_edge.c index bc5516eb9..f0a8006cf 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hgraph_induce_edge.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hgraph_induce_edge.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hgraph_order_bl.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hgraph_order_bl.c index d509ea018..18fdce118 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hgraph_order_bl.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hgraph_order_bl.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ @@ -96,7 +96,7 @@ const HgraphOrderBlParam * restrict const paraptr) if (cblkptr->cblktab == NULL) { /* If single column block */ if (cblkptr->vnodnbr < (2 * paraptr->cblkmin)) /* If block cannot be split */ - return (0); + return (0); cblknbr = cblkptr->vnodnbr / paraptr->cblkmin; /* Get new number of blocks */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hgraph_order_bl.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hgraph_order_bl.h index 42060d939..d6bb45798 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hgraph_order_bl.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hgraph_order_bl.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hgraph_order_cp.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hgraph_order_cp.c index e2567be34..ab374f658 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hgraph_order_cp.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hgraph_order_cp.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hgraph_order_cp.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hgraph_order_cp.h index df2a5a767..1e5ea9c75 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hgraph_order_cp.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hgraph_order_cp.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hgraph_order_gp.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hgraph_order_gp.c index e36cf6fd1..7f1f34624 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hgraph_order_gp.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hgraph_order_gp.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hgraph_order_gp.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hgraph_order_gp.h index ae6c4e3a2..9f334c47b 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hgraph_order_gp.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hgraph_order_gp.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hgraph_order_hd.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hgraph_order_hd.c index 79852a7fb..1e971560c 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hgraph_order_hd.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hgraph_order_hd.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hgraph_order_hd.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hgraph_order_hd.h index 423190c66..6e5897dc5 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hgraph_order_hd.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hgraph_order_hd.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hgraph_order_hf.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hgraph_order_hf.c index 01d2ed5af..912a42c11 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hgraph_order_hf.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hgraph_order_hf.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hgraph_order_hf.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hgraph_order_hf.h index 7024eb3e4..cc20021af 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hgraph_order_hf.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hgraph_order_hf.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hgraph_order_hx.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hgraph_order_hx.c index 9efdfa2d0..f37527186 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hgraph_order_hx.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hgraph_order_hx.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hgraph_order_hx.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hgraph_order_hx.h index c7b4d8a19..5f04c6ebf 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hgraph_order_hx.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hgraph_order_hx.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hgraph_order_nd.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hgraph_order_nd.c index c66c47bba..bd5440dc6 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hgraph_order_nd.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hgraph_order_nd.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hgraph_order_nd.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hgraph_order_nd.h index b0442b32d..976325a95 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hgraph_order_nd.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hgraph_order_nd.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hgraph_order_si.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hgraph_order_si.c index 9dc4abcff..deae847d9 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hgraph_order_si.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hgraph_order_si.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hgraph_order_si.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hgraph_order_si.h index bc1b62c31..8f51ab0eb 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hgraph_order_si.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hgraph_order_si.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hgraph_order_st.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hgraph_order_st.c index 9cc330d3d..47375e39e 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hgraph_order_st.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hgraph_order_st.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hgraph_order_st.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hgraph_order_st.h index e632967be..6f4c267bf 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hgraph_order_st.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hgraph_order_st.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hmesh.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hmesh.c index a749580e5..706de2302 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hmesh.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hmesh.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hmesh.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hmesh.h index 8f5081cab..d32701323 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hmesh.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hmesh.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hmesh_check.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hmesh_check.c index fc4679fa2..ffbc579d3 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hmesh_check.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hmesh_check.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ @@ -79,7 +79,7 @@ const Hmesh * const meshptr) errorPrint ("hmeshCheck: invalid halo node numbers"); return (1); } - + if (meshCheck (&meshptr->m) != 0) { errorPrint ("hmeshCheck: invalid non-halo mesh structure"); return (1); diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hmesh_hgraph.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hmesh_hgraph.c index 5a1c22afa..f2d1f9eb7 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hmesh_hgraph.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hmesh_hgraph.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hmesh_hgraph.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hmesh_hgraph.h index 5cc02eaa3..8ea549d33 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hmesh_hgraph.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hmesh_hgraph.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hmesh_induce.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hmesh_induce.c index d1ed7e5ab..26e5fdc53 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hmesh_induce.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hmesh_induce.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hmesh_induce.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hmesh_induce.h index 616a4afe9..4feebf876 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hmesh_induce.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hmesh_induce.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hmesh_mesh.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hmesh_mesh.c index f527e4844..5fb327b14 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hmesh_mesh.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hmesh_mesh.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hmesh_order_bl.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hmesh_order_bl.c index f023bf2f7..4a6bc9b66 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hmesh_order_bl.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hmesh_order_bl.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ @@ -95,7 +95,7 @@ const HmeshOrderBlParam * restrict const paraptr) if (cblkptr->cblktab == NULL) { /* If single column block */ if (cblkptr->vnodnbr < (2 * paraptr->cblkmin)) /* If block cannot be split */ - return (0); + return (0); cblknbr = cblkptr->vnodnbr / paraptr->cblkmin; /* Get new number of blocks */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hmesh_order_bl.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hmesh_order_bl.h index 30c38c824..9958bff24 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hmesh_order_bl.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hmesh_order_bl.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hmesh_order_cp.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hmesh_order_cp.c index c9d2fe605..00fa07cd8 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hmesh_order_cp.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hmesh_order_cp.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hmesh_order_cp.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hmesh_order_cp.h index 758833e8e..a6653f32b 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hmesh_order_cp.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hmesh_order_cp.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hmesh_order_gp.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hmesh_order_gp.c index be2b9477b..ab67ffed9 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hmesh_order_gp.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hmesh_order_gp.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hmesh_order_gp.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hmesh_order_gp.h index 2d3c190be..ef49146ac 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hmesh_order_gp.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hmesh_order_gp.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hmesh_order_gr.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hmesh_order_gr.c index fe5009734..a5db46985 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hmesh_order_gr.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hmesh_order_gr.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hmesh_order_gr.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hmesh_order_gr.h index 764e142e5..c5374332f 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hmesh_order_gr.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hmesh_order_gr.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hmesh_order_hd.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hmesh_order_hd.c index 9897fac44..8cbe5e663 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hmesh_order_hd.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hmesh_order_hd.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hmesh_order_hd.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hmesh_order_hd.h index a2437643e..2d373ccb5 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hmesh_order_hd.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hmesh_order_hd.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hmesh_order_hf.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hmesh_order_hf.c index ca99b2976..b6726eb6c 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hmesh_order_hf.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hmesh_order_hf.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hmesh_order_hf.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hmesh_order_hf.h index 1cd13cc9e..162873a82 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hmesh_order_hf.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hmesh_order_hf.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hmesh_order_hx.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hmesh_order_hx.c index f300144b2..cd5e70c5f 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hmesh_order_hx.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hmesh_order_hx.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hmesh_order_hx.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hmesh_order_hx.h index 3fd5f70b1..657074000 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hmesh_order_hx.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hmesh_order_hx.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hmesh_order_nd.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hmesh_order_nd.c index 1a093a588..59014649a 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hmesh_order_nd.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hmesh_order_nd.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hmesh_order_nd.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hmesh_order_nd.h index b97df51c8..ab408201f 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hmesh_order_nd.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hmesh_order_nd.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hmesh_order_si.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hmesh_order_si.c index e8f5058bf..40fedec94 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hmesh_order_si.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hmesh_order_si.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hmesh_order_si.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hmesh_order_si.h index ce1963fbf..15b9a3048 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hmesh_order_si.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hmesh_order_si.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hmesh_order_st.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hmesh_order_st.c index ca7329d50..c2955c296 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hmesh_order_st.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hmesh_order_st.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hmesh_order_st.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hmesh_order_st.h index 1cfac1cfc..e91528d2d 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hmesh_order_st.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/hmesh_order_st.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/kdgraph.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/kdgraph.c index 09bbdd8d2..1e31034bb 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/kdgraph.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/kdgraph.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ @@ -40,7 +40,7 @@ /** mapper. **/ /** This module handles the k-way active **/ /** distributed graph and save data struct- **/ -/** ure handling routines. **/ +/** ure handling routines. **/ /** **/ /** DATES : # Version 5.1 : from : 31 mar 2008 **/ /** to 01 jul 2008 **/ @@ -84,7 +84,7 @@ Dmapping * restrict const dmapptr) /* Mapping */ /* ArchDom domfrst; /\* First, largest domain *\/ */ /* Gnum domfrstload; /\* Load of first domain *\/ */ /* Anum termnum; */ - + actgrafptr->s = *srcgrafptr; /* Clone source graph */ actgrafptr->s.flagval &= ~DGRAPHFREEALL; actgrafptr->levlnum = 0; @@ -118,7 +118,7 @@ Dmapping * restrict const dmapptr) /* Mapping */ } /* This routine frees the contents -** of the given active graph +** of the given active graph ** It returns: ** - VOID : in all cases. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/kdgraph.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/kdgraph.h index 541df5a5d..f4e341bab 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/kdgraph.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/kdgraph.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/kdgraph_map_rb.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/kdgraph_map_rb.c index fe44e7ac9..548bdb9b4 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/kdgraph_map_rb.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/kdgraph_map_rb.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ @@ -37,7 +37,7 @@ /** Francois PELLEGRINI **/ /** **/ /** FUNCTION : This module performs the Dual Recursive **/ -/** Bipartitioning mapping algorithm **/ +/** Bipartitioning mapping algorithm **/ /** in parallel. **/ /** **/ /** DATES : # Version 5.1 : from : 16 apr 2008 **/ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/kdgraph_map_rb.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/kdgraph_map_rb.h index 43094c70f..bc4458599 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/kdgraph_map_rb.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/kdgraph_map_rb.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ @@ -34,7 +34,7 @@ /** NAME : kdgraph_map_rb.h **/ /** **/ /** AUTHOR : Francois PELLEGRINI **/ -/** Jun-Ho HER **/ +/** Jun-Ho HER **/ /** **/ /** FUNCTION : These lines are the data declaration **/ /** for the Parallel Dual Recursive **/ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/kdgraph_map_rb_map.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/kdgraph_map_rb_map.c index 427881ea4..56290c388 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/kdgraph_map_rb_map.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/kdgraph_map_rb_map.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ @@ -36,7 +36,7 @@ /** AUTHOR : Jun-Ho HER **/ /** **/ /** FUNCTION : This module performs the Dual Recursive **/ -/** Bipartitioning mapping algorithm **/ +/** Bipartitioning mapping algorithm **/ /** in parallel for non-complete graphs. **/ /** **/ /** DATES : # Version 5.1 : from : 24 jun 2008 **/ @@ -68,7 +68,7 @@ /* */ /*****************************/ -int +int kdgraphMapRbMap ( Kdgraph * restrict const grafptr, Kdmapping * restrict const mappptr, diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/kdgraph_map_rb_map.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/kdgraph_map_rb_map.h index 8b9cdaf84..1326e2281 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/kdgraph_map_rb_map.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/kdgraph_map_rb_map.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/kdgraph_map_rb_part.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/kdgraph_map_rb_part.c index 3583a6f60..6ed269b33 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/kdgraph_map_rb_part.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/kdgraph_map_rb_part.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ @@ -36,7 +36,7 @@ /** AUTHOR : Francois PELLEGRINI **/ /** **/ /** FUNCTION : This module performs the Dual Recursive **/ -/** Bipartitioning mapping algorithm **/ +/** Bipartitioning mapping algorithm **/ /** in parallel. It does so for complete **/ /** graph architectures, hence performing **/ /** plain graph partitioning, which **/ @@ -325,7 +325,7 @@ KdgraphMapRbPartGraph * restrict const fldgrafptr) return (o); } -/* This routine performs the Dual Recursive +/* This routine performs the Dual Recursive ** Bipartitioning mapping in parallel. ** It returns: ** - 0 : if the mapping could be computed. @@ -333,7 +333,7 @@ KdgraphMapRbPartGraph * restrict const fldgrafptr) */ static -int +int kdgraphMapRbPart2 ( KdgraphMapRbPartGraph * restrict const grafptr, const KdgraphMapRbPartData * restrict const dataptr) @@ -364,7 +364,7 @@ const KdgraphMapRbPartData * restrict const dataptr) errorPrint ("kdgraphMapRbPart2: cannot compute ghost edge array"); return (1); } - + o = bdgraphInit (&actgrafdat, &grafptr->data.dgrfdat, NULL, &mappptr->archdat, domsubtab); /* Create active graph */ actgrafdat.levlnum = grafptr->levlnum; /* Initial level of bipartition graph is DRB recursion level */ @@ -395,7 +395,7 @@ const KdgraphMapRbPartData * restrict const dataptr) return (o); } -int +int kdgraphMapRbPart ( Kdgraph * restrict const grafptr, Kdmapping * restrict const mappptr, diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/kdgraph_map_rb_part.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/kdgraph_map_rb_part.h index 4142b3661..e27f75e1c 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/kdgraph_map_rb_part.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/kdgraph_map_rb_part.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/kgraph.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/kgraph.c index cab3457e6..025bb533c 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/kgraph.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/kgraph.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/kgraph.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/kgraph.h index 345091a36..b119bf85e 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/kgraph.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/kgraph.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/kgraph_check.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/kgraph_check.c index aeb60a201..5c20a3e71 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/kgraph_check.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/kgraph_check.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ @@ -90,7 +90,7 @@ const Kgraph * restrict const grafptr) memSet (flagtax, ~0, grafptr->s.vertnbr * sizeof (Gnum)); flagtax -= grafptr->s.baseval; - if ((grafptr->m.domnmax <= 0) || (grafptr->m.domnnbr <= 0) || (grafptr->m.domnnbr > grafptr->m.domnmax)) { + if ((grafptr->m.domnmax <= 0) || (grafptr->m.domnnbr <= 0) || (grafptr->m.domnnbr > grafptr->m.domnmax)) { errorPrint ("kgraphCheck: invalid number of domains"); return (1); } diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/kgraph_map_ml.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/kgraph_map_ml.c index da4d0ae30..538a89f0f 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/kgraph_map_ml.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/kgraph_map_ml.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ @@ -195,7 +195,7 @@ const GraphCoarsenMulti * restrict const coarmulttax) /*+ Multinode array +*/ coarvertnum = coarfrontab[coarfronnum]; finevertnum0 = coarmulttax[coarvertnum].vertnum[0]; finevertnum1 = coarmulttax[coarvertnum].vertnum[1]; - + if (finevertnum0 != finevertnum1) { /* If multinode si made of two distinct vertices */ Anum coarpartval; Gnum fineedgenum; @@ -267,7 +267,7 @@ const KgraphMapMlParam * const paraptr) if (kgraphMapMlCoarsen (grafptr, &coargrafdat, &coarmulttax, paraptr) == 0) { if (((o = kgraphMapMl2 (&coargrafdat, paraptr)) == 0) && ((o = kgraphMapMlUncoarsen (grafptr, &coargrafdat, coarmulttax)) == 0) && - ((o = kgraphMapSt (grafptr, paraptr->stratasc)) != 0)) /* Apply ascending strategy */ + ((o = kgraphMapSt (grafptr, paraptr->stratasc)) != 0)) /* Apply ascending strategy */ errorPrint ("kgraphMapMl2: cannot apply ascending strategy"); kgraphExit (&coargrafdat); } diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/kgraph_map_ml.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/kgraph_map_ml.h index 05d5cc9f7..84259e122 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/kgraph_map_ml.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/kgraph_map_ml.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/kgraph_map_rb.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/kgraph_map_rb.c index d3ee3c7b7..a49d9913b 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/kgraph_map_rb.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/kgraph_map_rb.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/kgraph_map_rb.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/kgraph_map_rb.h index c26aa733f..8e7cf2621 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/kgraph_map_rb.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/kgraph_map_rb.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/kgraph_map_rb_map.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/kgraph_map_rb_map.c index 19aee4990..330827c47 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/kgraph_map_rb_map.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/kgraph_map_rb_map.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ @@ -129,9 +129,9 @@ const KgraphMapRbParam * restrict const paraptr) else poolptr->grafptr = &grafptr->s; /* We will need top-level graph data */ - poolptr->linktab[0].prev = + poolptr->linktab[0].prev = poolptr->linktab[0].next = - poolptr->linktab[1].prev = + poolptr->linktab[1].prev = poolptr->linktab[1].next = &kgraphmaprbmappooldummy; poolptr->pooltab[0] = &poolptr->linktab[0]; poolptr->pooltab[1] = (paraptr->flagjobtie != 0) ? &poolptr->linktab[0] : &poolptr->linktab[1]; @@ -350,7 +350,7 @@ const GraphPart partval) topverttax = poolptr->grafptr->verttax; /* Point to top-level graph arrays */ topvendtax = poolptr->grafptr->vendtax; topedgetax = poolptr->grafptr->edgetax; - + prioold = joboldptr->prioval; if (joboldptr->grafdat.vertnbr < poolptr->grafptr->vertnbr) { /* If subgraph is not top graph */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/kgraph_map_rb_map.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/kgraph_map_rb_map.h index e4f7e3b54..9808cd79c 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/kgraph_map_rb_map.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/kgraph_map_rb_map.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/kgraph_map_rb_part.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/kgraph_map_rb_part.c index 2b5c01ce2..e1dfebb43 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/kgraph_map_rb_part.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/kgraph_map_rb_part.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/kgraph_map_rb_part.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/kgraph_map_rb_part.h index b4af46413..a1d32f4a1 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/kgraph_map_rb_part.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/kgraph_map_rb_part.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/kgraph_map_st.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/kgraph_map_st.c index 0676f222a..b1d791306 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/kgraph_map_st.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/kgraph_map_st.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/kgraph_map_st.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/kgraph_map_st.h index 837c12eb5..ecec44cb3 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/kgraph_map_st.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/kgraph_map_st.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/last_resort/parser_ll.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/last_resort/parser_ll.c index b406c51d9..0edce3c92 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/last_resort/parser_ll.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/last_resort/parser_ll.c @@ -53,7 +53,7 @@ #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, - * if you want the limit (max/min) macros for int types. + * if you want the limit (max/min) macros for int types. */ #ifndef __STDC_LIMIT_MACROS #define __STDC_LIMIT_MACROS 1 @@ -70,7 +70,7 @@ typedef uint32_t flex_uint32_t; typedef signed char flex_int8_t; typedef short int flex_int16_t; typedef int flex_int32_t; -typedef unsigned char flex_uint8_t; +typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; typedef unsigned int flex_uint32_t; #endif /* ! C99 */ @@ -111,15 +111,15 @@ typedef unsigned int flex_uint32_t; /* The "const" storage-class-modifier is valid. */ #define YY_USE_CONST -#else /* ! __cplusplus */ +#else /* ! __cplusplus */ /* C99 requires __STDC__ to be defined as 1. */ #if defined (__STDC__) #define YY_USE_CONST -#endif /* defined (__STDC__) */ -#endif /* ! __cplusplus */ +#endif /* defined (__STDC__) */ +#endif /* ! __cplusplus */ #ifdef YY_USE_CONST #define yyconst const @@ -181,20 +181,20 @@ extern FILE *scotchyyin, *scotchyyout; #define EOB_ACT_LAST_MATCH 2 #define YY_LESS_LINENO(n) - + /* Return all but the first "n" matched characters back to the input stream. */ #define yyless(n) \ - do \ - { \ - /* Undo effects of setting up scotchyytext. */ \ + do \ + { \ + /* Undo effects of setting up scotchyytext. */ \ int yyless_macro_arg = (n); \ YY_LESS_LINENO(yyless_macro_arg);\ - *yy_cp = (yy_hold_char); \ - YY_RESTORE_YY_MORE_OFFSET \ - (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ - YY_DO_BEFORE_ACTION; /* set up scotchyytext again */ \ - } \ - while ( 0 ) + *yy_cp = (yy_hold_char); \ + YY_RESTORE_YY_MORE_OFFSET \ + (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ + YY_DO_BEFORE_ACTION; /* set up scotchyytext again */ \ + } \ + while ( 0 ) #define unput(c) yyunput( c, (yytext_ptr) ) @@ -206,66 +206,66 @@ typedef size_t yy_size_t; #ifndef YY_STRUCT_YY_BUFFER_STATE #define YY_STRUCT_YY_BUFFER_STATE struct yy_buffer_state - { - FILE *yy_input_file; - - char *yy_ch_buf; /* input buffer */ - char *yy_buf_pos; /* current position in input buffer */ - - /* Size of input buffer in bytes, not including room for EOB - * characters. - */ - yy_size_t yy_buf_size; - - /* Number of characters read into yy_ch_buf, not including EOB - * characters. - */ - int yy_n_chars; - - /* Whether we "own" the buffer - i.e., we know we created it, - * and can realloc() it to grow it, and should free() it to - * delete it. - */ - int yy_is_our_buffer; - - /* Whether this is an "interactive" input source; if so, and - * if we're using stdio for input, then we want to use getc() - * instead of fread(), to make sure we stop fetching input after - * each newline. - */ - int yy_is_interactive; - - /* Whether we're considered to be at the beginning of a line. - * If so, '^' rules will be active on the next match, otherwise - * not. - */ - int yy_at_bol; + { + FILE *yy_input_file; + + char *yy_ch_buf; /* input buffer */ + char *yy_buf_pos; /* current position in input buffer */ + + /* Size of input buffer in bytes, not including room for EOB + * characters. + */ + yy_size_t yy_buf_size; + + /* Number of characters read into yy_ch_buf, not including EOB + * characters. + */ + int yy_n_chars; + + /* Whether we "own" the buffer - i.e., we know we created it, + * and can realloc() it to grow it, and should free() it to + * delete it. + */ + int yy_is_our_buffer; + + /* Whether this is an "interactive" input source; if so, and + * if we're using stdio for input, then we want to use getc() + * instead of fread(), to make sure we stop fetching input after + * each newline. + */ + int yy_is_interactive; + + /* Whether we're considered to be at the beginning of a line. + * If so, '^' rules will be active on the next match, otherwise + * not. + */ + int yy_at_bol; int yy_bs_lineno; /**< The line count. */ int yy_bs_column; /**< The column count. */ - - /* Whether to try to fill the input buffer when we reach the - * end of it. - */ - int yy_fill_buffer; - int yy_buffer_status; + /* Whether to try to fill the input buffer when we reach the + * end of it. + */ + int yy_fill_buffer; + + int yy_buffer_status; #define YY_BUFFER_NEW 0 #define YY_BUFFER_NORMAL 1 - /* When an EOF's been seen but there's still some text to process - * then we mark the buffer as YY_EOF_PENDING, to indicate that we - * shouldn't try reading from the input source any more. We might - * still have a bunch of tokens to match, though, because of - * possible backing-up. - * - * When we actually see the EOF, we change the status to "new" - * (via scotchyyrestart()), so that the user can continue scanning by - * just pointing scotchyyin at a new input file. - */ + /* When an EOF's been seen but there's still some text to process + * then we mark the buffer as YY_EOF_PENDING, to indicate that we + * shouldn't try reading from the input source any more. We might + * still have a bunch of tokens to match, though, because of + * possible backing-up. + * + * When we actually see the EOF, we change the status to "new" + * (via scotchyyrestart()), so that the user can continue scanning by + * just pointing scotchyyin at a new input file. + */ #define YY_BUFFER_EOF_PENDING 2 - }; + }; #endif /* !YY_STRUCT_YY_BUFFER_STATE */ /* Stack of input buffers. */ @@ -290,13 +290,13 @@ static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */ /* yy_hold_char holds the character lost when scotchyytext is formed. */ static char yy_hold_char; -static int yy_n_chars; /* number of characters read into yy_ch_buf */ +static int yy_n_chars; /* number of characters read into yy_ch_buf */ int scotchyyleng; /* Points to current character in buffer. */ static char *yy_c_buf_p = (char *) 0; -static int yy_init = 0; /* whether we need to initialize */ -static int yy_start = 0; /* start state number */ +static int yy_init = 0; /* whether we need to initialize */ +static int yy_start = 0; /* start state number */ /* Flag which is used to allow scotchyywrap()'s to do buffer switches * instead of setting up a fresh scotchyyin. A bit of a hack ... @@ -328,24 +328,24 @@ void scotchyyfree (void * ); #define yy_new_buffer scotchyy_create_buffer #define yy_set_interactive(is_interactive) \ - { \ - if ( ! YY_CURRENT_BUFFER ){ \ + { \ + if ( ! YY_CURRENT_BUFFER ){ \ scotchyyensure_buffer_stack (); \ - YY_CURRENT_BUFFER_LVALUE = \ + YY_CURRENT_BUFFER_LVALUE = \ scotchyy_create_buffer(scotchyyin,YY_BUF_SIZE ); \ - } \ - YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ - } + } \ + YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ + } #define yy_set_bol(at_bol) \ - { \ - if ( ! YY_CURRENT_BUFFER ){\ + { \ + if ( ! YY_CURRENT_BUFFER ){\ scotchyyensure_buffer_stack (); \ - YY_CURRENT_BUFFER_LVALUE = \ + YY_CURRENT_BUFFER_LVALUE = \ scotchyy_create_buffer(scotchyyin,YY_BUF_SIZE ); \ - } \ - YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ - } + } \ + YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ + } #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) @@ -373,21 +373,21 @@ static void yy_fatal_error (yyconst char msg[] ); * corresponding action - sets up scotchyytext. */ #define YY_DO_BEFORE_ACTION \ - (yytext_ptr) = yy_bp; \ - scotchyyleng = (size_t) (yy_cp - yy_bp); \ - (yy_hold_char) = *yy_cp; \ - *yy_cp = '\0'; \ - (yy_c_buf_p) = yy_cp; + (yytext_ptr) = yy_bp; \ + scotchyyleng = (size_t) (yy_cp - yy_bp); \ + (yy_hold_char) = *yy_cp; \ + *yy_cp = '\0'; \ + (yy_c_buf_p) = yy_cp; #define YY_NUM_RULES 13 #define YY_END_OF_BUFFER 14 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info - { - flex_int32_t yy_verify; - flex_int32_t yy_nxt; - }; + { + flex_int32_t yy_verify; + flex_int32_t yy_nxt; + }; static yyconst flex_int16_t yy_accept[56] = { 0, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, @@ -505,13 +505,13 @@ char *scotchyytext; ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -522,7 +522,7 @@ char *scotchyytext; ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ @@ -673,7 +673,7 @@ extern int scotchyywrap (void ); #endif static void yyunput (int c,char *buf_ptr ); - + #ifndef yytext_ptr static void yy_flex_strncpy (char *,yyconst char *,int ); #endif @@ -710,33 +710,33 @@ static int input (void ); */ #ifndef YY_INPUT #define YY_INPUT(buf,result,max_size) \ - if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ - { \ - int c = '*'; \ - unsigned n; \ - for ( n = 0; n < max_size && \ - (c = getc( scotchyyin )) != EOF && c != '\n'; ++n ) \ - buf[n] = (char) c; \ - if ( c == '\n' ) \ - buf[n++] = (char) c; \ - if ( c == EOF && ferror( scotchyyin ) ) \ - YY_FATAL_ERROR( "input in flex scanner failed" ); \ - result = n; \ - } \ - else \ - { \ - errno=0; \ - while ( (result = fread(buf, 1, max_size, scotchyyin))==0 && ferror(scotchyyin)) \ - { \ - if( errno != EINTR) \ - { \ - YY_FATAL_ERROR( "input in flex scanner failed" ); \ - break; \ - } \ - errno=0; \ - clearerr(scotchyyin); \ - } \ - }\ + if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ + { \ + int c = '*'; \ + unsigned n; \ + for ( n = 0; n < max_size && \ + (c = getc( scotchyyin )) != EOF && c != '\n'; ++n ) \ + buf[n] = (char) c; \ + if ( c == '\n' ) \ + buf[n++] = (char) c; \ + if ( c == EOF && ferror( scotchyyin ) ) \ + YY_FATAL_ERROR( "input in flex scanner failed" ); \ + result = n; \ + } \ + else \ + { \ + errno=0; \ + while ( (result = fread(buf, 1, max_size, scotchyyin))==0 && ferror(scotchyyin)) \ + { \ + if( errno != EINTR) \ + { \ + YY_FATAL_ERROR( "input in flex scanner failed" ); \ + break; \ + } \ + errno=0; \ + clearerr(scotchyyin); \ + } \ + }\ \ #endif @@ -785,100 +785,100 @@ extern int scotchyylex (void); #endif #define YY_RULE_SETUP \ - YY_USER_ACTION + YY_USER_ACTION /** The main scanner function which does all the work. */ YY_DECL { - register yy_state_type yy_current_state; - register char *yy_cp, *yy_bp; - register int yy_act; - + register yy_state_type yy_current_state; + register char *yy_cp, *yy_bp; + register int yy_act; + #line 121 "parser_ll.l" #line 801 "lex.yy.c" - if ( !(yy_init) ) - { - (yy_init) = 1; + if ( !(yy_init) ) + { + (yy_init) = 1; #ifdef YY_USER_INIT - YY_USER_INIT; + YY_USER_INIT; #endif - if ( ! (yy_start) ) - (yy_start) = 1; /* first start state */ + if ( ! (yy_start) ) + (yy_start) = 1; /* first start state */ - if ( ! scotchyyin ) - scotchyyin = stdin; + if ( ! scotchyyin ) + scotchyyin = stdin; - if ( ! scotchyyout ) - scotchyyout = stdout; + if ( ! scotchyyout ) + scotchyyout = stdout; - if ( ! YY_CURRENT_BUFFER ) { - scotchyyensure_buffer_stack (); - YY_CURRENT_BUFFER_LVALUE = - scotchyy_create_buffer(scotchyyin,YY_BUF_SIZE ); - } + if ( ! YY_CURRENT_BUFFER ) { + scotchyyensure_buffer_stack (); + YY_CURRENT_BUFFER_LVALUE = + scotchyy_create_buffer(scotchyyin,YY_BUF_SIZE ); + } - scotchyy_load_buffer_state( ); - } + scotchyy_load_buffer_state( ); + } - while ( 1 ) /* loops until end-of-file is reached */ - { - yy_cp = (yy_c_buf_p); + while ( 1 ) /* loops until end-of-file is reached */ + { + yy_cp = (yy_c_buf_p); - /* Support of scotchyytext. */ - *yy_cp = (yy_hold_char); + /* Support of scotchyytext. */ + *yy_cp = (yy_hold_char); - /* yy_bp points to the position in yy_ch_buf of the start of - * the current run. - */ - yy_bp = yy_cp; + /* yy_bp points to the position in yy_ch_buf of the start of + * the current run. + */ + yy_bp = yy_cp; - yy_current_state = (yy_start); + yy_current_state = (yy_start); yy_match: - do - { - register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; - if ( yy_accept[yy_current_state] ) - { - (yy_last_accepting_state) = yy_current_state; - (yy_last_accepting_cpos) = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 56 ) - yy_c = yy_meta[(unsigned int) yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - ++yy_cp; - } - while ( yy_base[yy_current_state] != 69 ); + do + { + register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; + if ( yy_accept[yy_current_state] ) + { + (yy_last_accepting_state) = yy_current_state; + (yy_last_accepting_cpos) = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 56 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + ++yy_cp; + } + while ( yy_base[yy_current_state] != 69 ); yy_find_action: - yy_act = yy_accept[yy_current_state]; - if ( yy_act == 0 ) - { /* have to back up */ - yy_cp = (yy_last_accepting_cpos); - yy_current_state = (yy_last_accepting_state); - yy_act = yy_accept[yy_current_state]; - } - - YY_DO_BEFORE_ACTION; - -do_action: /* This label is used only to access EOF actions. */ - - switch ( yy_act ) - { /* beginning of action switch */ - case 0: /* must back up */ - /* undo the effects of YY_DO_BEFORE_ACTION */ - *yy_cp = (yy_hold_char); - yy_cp = (yy_last_accepting_cpos); - yy_current_state = (yy_last_accepting_state); - goto yy_find_action; + yy_act = yy_accept[yy_current_state]; + if ( yy_act == 0 ) + { /* have to back up */ + yy_cp = (yy_last_accepting_cpos); + yy_current_state = (yy_last_accepting_state); + yy_act = yy_accept[yy_current_state]; + } + + YY_DO_BEFORE_ACTION; + +do_action: /* This label is used only to access EOF actions. */ + + switch ( yy_act ) + { /* beginning of action switch */ + case 0: /* must back up */ + /* undo the effects of YY_DO_BEFORE_ACTION */ + *yy_cp = (yy_hold_char); + yy_cp = (yy_last_accepting_cpos); + yy_current_state = (yy_last_accepting_state); + goto yy_find_action; case 1: YY_RULE_SETUP @@ -888,7 +888,7 @@ YY_RULE_SETUP yylval.STRING[PARSERSTRINGLEN - 1] = '\0'; return (METHODNAME); } - YY_BREAK + YY_BREAK case 2: YY_RULE_SETUP #line 128 "parser_ll.l" @@ -897,7 +897,7 @@ YY_RULE_SETUP yylval.STRING[PARSERSTRINGLEN - 1] = '\0'; return (PARAMNAME); } - YY_BREAK + YY_BREAK case 3: YY_RULE_SETUP #line 134 "parser_ll.l" @@ -905,7 +905,7 @@ YY_RULE_SETUP yylval.CASEVAL = scotchyytext[0]; return (VALCASE); } - YY_BREAK + YY_BREAK case 4: YY_RULE_SETUP #line 139 "parser_ll.l" @@ -913,7 +913,7 @@ YY_RULE_SETUP yylval.DOUBLE = atof (scotchyytext); return (VALDOUBLE); } - YY_BREAK + YY_BREAK case 5: YY_RULE_SETUP #line 144 "parser_ll.l" @@ -921,7 +921,7 @@ YY_RULE_SETUP yylval.INTEGER = (INT) atol (scotchyytext); return (VALINT); } - YY_BREAK + YY_BREAK case 6: YY_RULE_SETUP #line 148 "parser_ll.l" @@ -929,7 +929,7 @@ YY_RULE_SETUP yylval.INTEGER = (INT) atof (scotchyytext); /* FLOAT is put after so that INTEGER can be matched */ return (VALINT); } - YY_BREAK + YY_BREAK case 7: /* rule 7 can match eol */ YY_RULE_SETUP @@ -940,7 +940,7 @@ YY_RULE_SETUP yylval.STRING[PARSERSTRINGLEN - 1] = '\0'; return (VALSTRING); } - YY_BREAK + YY_BREAK case 8: YY_RULE_SETUP #line 160 "parser_ll.l" @@ -948,7 +948,7 @@ YY_RULE_SETUP yylval.INTEGER = (INT) atol (scotchyytext); return (VALINT); } - YY_BREAK + YY_BREAK case 9: YY_RULE_SETUP #line 164 "parser_ll.l" @@ -956,7 +956,7 @@ YY_RULE_SETUP yylval.DOUBLE = atof (scotchyytext); return (VALDOUBLE); } - YY_BREAK + YY_BREAK case 10: YY_RULE_SETUP #line 168 "parser_ll.l" @@ -965,23 +965,23 @@ YY_RULE_SETUP yylval.STRING[PARSERSTRINGLEN - 1] = '\0'; return (PARAMNAME); } - YY_BREAK + YY_BREAK case 11: /* rule 11 can match eol */ YY_RULE_SETUP #line 174 "parser_ll.l" ; - YY_BREAK + YY_BREAK case 12: YY_RULE_SETUP #line 175 "parser_ll.l" return (scotchyytext[0]); - YY_BREAK + YY_BREAK case 13: YY_RULE_SETUP #line 177 "parser_ll.l" ECHO; - YY_BREAK + YY_BREAK #line 986 "lex.yy.c" case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(lstrat): @@ -991,368 +991,368 @@ case YY_STATE_EOF(lparamdouble): case YY_STATE_EOF(lparamint): case YY_STATE_EOF(lparamstring): case YY_STATE_EOF(ltest): - yyterminate(); - - case YY_END_OF_BUFFER: - { - /* Amount of text matched not including the EOB char. */ - int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1; - - /* Undo the effects of YY_DO_BEFORE_ACTION. */ - *yy_cp = (yy_hold_char); - YY_RESTORE_YY_MORE_OFFSET - - if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) - { - /* We're scanning a new file or input source. It's - * possible that this happened because the user - * just pointed scotchyyin at a new source and called - * scotchyylex(). If so, then we have to assure - * consistency between YY_CURRENT_BUFFER and our - * globals. Here is the right place to do so, because - * this is the first action (other than possibly a - * back-up) that will match for the new input source. - */ - (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; - YY_CURRENT_BUFFER_LVALUE->yy_input_file = scotchyyin; - YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; - } - - /* Note that here we test for yy_c_buf_p "<=" to the position - * of the first EOB in the buffer, since yy_c_buf_p will - * already have been incremented past the NUL character - * (since all states make transitions on EOB to the - * end-of-buffer state). Contrast this with the test - * in input(). - */ - if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) - { /* This was really a NUL. */ - yy_state_type yy_next_state; - - (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state( ); - - /* Okay, we're now positioned to make the NUL - * transition. We couldn't have - * yy_get_previous_state() go ahead and do it - * for us because it doesn't know how to deal - * with the possibility of jamming (and we don't - * want to build jamming into it because then it - * will run more slowly). - */ - - yy_next_state = yy_try_NUL_trans( yy_current_state ); - - yy_bp = (yytext_ptr) + YY_MORE_ADJ; - - if ( yy_next_state ) - { - /* Consume the NUL. */ - yy_cp = ++(yy_c_buf_p); - yy_current_state = yy_next_state; - goto yy_match; - } - - else - { - yy_cp = (yy_c_buf_p); - goto yy_find_action; - } - } - - else switch ( yy_get_next_buffer( ) ) - { - case EOB_ACT_END_OF_FILE: - { - (yy_did_buffer_switch_on_eof) = 0; - - if ( scotchyywrap( ) ) - { - /* Note: because we've taken care in - * yy_get_next_buffer() to have set up - * scotchyytext, we can now set up - * yy_c_buf_p so that if some total - * hoser (like flex itself) wants to - * call the scanner after we return the - * YY_NULL, it'll still work - another - * YY_NULL will get returned. - */ - (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ; - - yy_act = YY_STATE_EOF(YY_START); - goto do_action; - } - - else - { - if ( ! (yy_did_buffer_switch_on_eof) ) - YY_NEW_FILE; - } - break; - } - - case EOB_ACT_CONTINUE_SCAN: - (yy_c_buf_p) = - (yytext_ptr) + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state( ); - - yy_cp = (yy_c_buf_p); - yy_bp = (yytext_ptr) + YY_MORE_ADJ; - goto yy_match; - - case EOB_ACT_LAST_MATCH: - (yy_c_buf_p) = - &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)]; - - yy_current_state = yy_get_previous_state( ); - - yy_cp = (yy_c_buf_p); - yy_bp = (yytext_ptr) + YY_MORE_ADJ; - goto yy_find_action; - } - break; - } - - default: - YY_FATAL_ERROR( - "fatal flex scanner internal error--no action found" ); - } /* end of action switch */ - } /* end of scanning one token */ + yyterminate(); + + case YY_END_OF_BUFFER: + { + /* Amount of text matched not including the EOB char. */ + int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1; + + /* Undo the effects of YY_DO_BEFORE_ACTION. */ + *yy_cp = (yy_hold_char); + YY_RESTORE_YY_MORE_OFFSET + + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) + { + /* We're scanning a new file or input source. It's + * possible that this happened because the user + * just pointed scotchyyin at a new source and called + * scotchyylex(). If so, then we have to assure + * consistency between YY_CURRENT_BUFFER and our + * globals. Here is the right place to do so, because + * this is the first action (other than possibly a + * back-up) that will match for the new input source. + */ + (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + YY_CURRENT_BUFFER_LVALUE->yy_input_file = scotchyyin; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; + } + + /* Note that here we test for yy_c_buf_p "<=" to the position + * of the first EOB in the buffer, since yy_c_buf_p will + * already have been incremented past the NUL character + * (since all states make transitions on EOB to the + * end-of-buffer state). Contrast this with the test + * in input(). + */ + if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) + { /* This was really a NUL. */ + yy_state_type yy_next_state; + + (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state( ); + + /* Okay, we're now positioned to make the NUL + * transition. We couldn't have + * yy_get_previous_state() go ahead and do it + * for us because it doesn't know how to deal + * with the possibility of jamming (and we don't + * want to build jamming into it because then it + * will run more slowly). + */ + + yy_next_state = yy_try_NUL_trans( yy_current_state ); + + yy_bp = (yytext_ptr) + YY_MORE_ADJ; + + if ( yy_next_state ) + { + /* Consume the NUL. */ + yy_cp = ++(yy_c_buf_p); + yy_current_state = yy_next_state; + goto yy_match; + } + + else + { + yy_cp = (yy_c_buf_p); + goto yy_find_action; + } + } + + else switch ( yy_get_next_buffer( ) ) + { + case EOB_ACT_END_OF_FILE: + { + (yy_did_buffer_switch_on_eof) = 0; + + if ( scotchyywrap( ) ) + { + /* Note: because we've taken care in + * yy_get_next_buffer() to have set up + * scotchyytext, we can now set up + * yy_c_buf_p so that if some total + * hoser (like flex itself) wants to + * call the scanner after we return the + * YY_NULL, it'll still work - another + * YY_NULL will get returned. + */ + (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ; + + yy_act = YY_STATE_EOF(YY_START); + goto do_action; + } + + else + { + if ( ! (yy_did_buffer_switch_on_eof) ) + YY_NEW_FILE; + } + break; + } + + case EOB_ACT_CONTINUE_SCAN: + (yy_c_buf_p) = + (yytext_ptr) + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state( ); + + yy_cp = (yy_c_buf_p); + yy_bp = (yytext_ptr) + YY_MORE_ADJ; + goto yy_match; + + case EOB_ACT_LAST_MATCH: + (yy_c_buf_p) = + &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)]; + + yy_current_state = yy_get_previous_state( ); + + yy_cp = (yy_c_buf_p); + yy_bp = (yytext_ptr) + YY_MORE_ADJ; + goto yy_find_action; + } + break; + } + + default: + YY_FATAL_ERROR( + "fatal flex scanner internal error--no action found" ); + } /* end of action switch */ + } /* end of scanning one token */ } /* end of scotchyylex */ /* yy_get_next_buffer - try to read in a new buffer * * Returns a code representing an action: - * EOB_ACT_LAST_MATCH - - * EOB_ACT_CONTINUE_SCAN - continue scanning from current position - * EOB_ACT_END_OF_FILE - end of file + * EOB_ACT_LAST_MATCH - + * EOB_ACT_CONTINUE_SCAN - continue scanning from current position + * EOB_ACT_END_OF_FILE - end of file */ static int yy_get_next_buffer (void) { - register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; - register char *source = (yytext_ptr); - register int number_to_move, i; - int ret_val; - - if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) - YY_FATAL_ERROR( - "fatal flex scanner internal error--end of buffer missed" ); - - if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) - { /* Don't try to fill the buffer, so this is an EOF. */ - if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 ) - { - /* We matched a single character, the EOB, so - * treat this as a final EOF. - */ - return EOB_ACT_END_OF_FILE; - } - - else - { - /* We matched some text prior to the EOB, first - * process it. - */ - return EOB_ACT_LAST_MATCH; - } - } - - /* Try to read more data. */ - - /* First move last chars to start of buffer. */ - number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1; - - for ( i = 0; i < number_to_move; ++i ) - *(dest++) = *(source++); - - if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) - /* don't do the read, it's not guaranteed to return an EOF, - * just force an EOF - */ - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0; - - else - { - int num_to_read = - YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; - - while ( num_to_read <= 0 ) - { /* Not enough room in the buffer - grow it. */ - - /* just a shorter name for the current buffer */ - YY_BUFFER_STATE b = YY_CURRENT_BUFFER; - - int yy_c_buf_p_offset = - (int) ((yy_c_buf_p) - b->yy_ch_buf); - - if ( b->yy_is_our_buffer ) - { - int new_size = b->yy_buf_size * 2; - - if ( new_size <= 0 ) - b->yy_buf_size += b->yy_buf_size / 8; - else - b->yy_buf_size *= 2; - - b->yy_ch_buf = (char *) - /* Include room in for 2 EOB chars. */ - scotchyyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ); - } - else - /* Can't grow it, we don't own it. */ - b->yy_ch_buf = 0; - - if ( ! b->yy_ch_buf ) - YY_FATAL_ERROR( - "fatal error - scanner input buffer overflow" ); - - (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset]; - - num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - - number_to_move - 1; - - } - - if ( num_to_read > YY_READ_BUF_SIZE ) - num_to_read = YY_READ_BUF_SIZE; - - /* Read in more data. */ - YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), - (yy_n_chars), (size_t) num_to_read ); - - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); - } - - if ( (yy_n_chars) == 0 ) - { - if ( number_to_move == YY_MORE_ADJ ) - { - ret_val = EOB_ACT_END_OF_FILE; - scotchyyrestart(scotchyyin ); - } - - else - { - ret_val = EOB_ACT_LAST_MATCH; - YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = - YY_BUFFER_EOF_PENDING; - } - } - - else - ret_val = EOB_ACT_CONTINUE_SCAN; - - if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { - /* Extend the array by 50%, plus the number we really need. */ - yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1); - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) scotchyyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ); - if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) - YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); - } - - (yy_n_chars) += number_to_move; - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR; - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR; - - (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; + register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; + register char *source = (yytext_ptr); + register int number_to_move, i; + int ret_val; + + if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) + YY_FATAL_ERROR( + "fatal flex scanner internal error--end of buffer missed" ); + + if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) + { /* Don't try to fill the buffer, so this is an EOF. */ + if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 ) + { + /* We matched a single character, the EOB, so + * treat this as a final EOF. + */ + return EOB_ACT_END_OF_FILE; + } + + else + { + /* We matched some text prior to the EOB, first + * process it. + */ + return EOB_ACT_LAST_MATCH; + } + } + + /* Try to read more data. */ + + /* First move last chars to start of buffer. */ + number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1; + + for ( i = 0; i < number_to_move; ++i ) + *(dest++) = *(source++); + + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) + /* don't do the read, it's not guaranteed to return an EOF, + * just force an EOF + */ + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0; + + else + { + int num_to_read = + YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; + + while ( num_to_read <= 0 ) + { /* Not enough room in the buffer - grow it. */ + + /* just a shorter name for the current buffer */ + YY_BUFFER_STATE b = YY_CURRENT_BUFFER; + + int yy_c_buf_p_offset = + (int) ((yy_c_buf_p) - b->yy_ch_buf); + + if ( b->yy_is_our_buffer ) + { + int new_size = b->yy_buf_size * 2; + + if ( new_size <= 0 ) + b->yy_buf_size += b->yy_buf_size / 8; + else + b->yy_buf_size *= 2; + + b->yy_ch_buf = (char *) + /* Include room in for 2 EOB chars. */ + scotchyyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ); + } + else + /* Can't grow it, we don't own it. */ + b->yy_ch_buf = 0; + + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( + "fatal error - scanner input buffer overflow" ); - return ret_val; + (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset]; + + num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - + number_to_move - 1; + + } + + if ( num_to_read > YY_READ_BUF_SIZE ) + num_to_read = YY_READ_BUF_SIZE; + + /* Read in more data. */ + YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), + (yy_n_chars), (size_t) num_to_read ); + + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); + } + + if ( (yy_n_chars) == 0 ) + { + if ( number_to_move == YY_MORE_ADJ ) + { + ret_val = EOB_ACT_END_OF_FILE; + scotchyyrestart(scotchyyin ); + } + + else + { + ret_val = EOB_ACT_LAST_MATCH; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = + YY_BUFFER_EOF_PENDING; + } + } + + else + ret_val = EOB_ACT_CONTINUE_SCAN; + + if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { + /* Extend the array by 50%, plus the number we really need. */ + yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1); + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) scotchyyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ); + if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); + } + + (yy_n_chars) += number_to_move; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR; + + (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; + + return ret_val; } /* yy_get_previous_state - get the state just before the EOB char was reached */ static yy_state_type yy_get_previous_state (void) { - register yy_state_type yy_current_state; - register char *yy_cp; - - yy_current_state = (yy_start); - - for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) - { - register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); - if ( yy_accept[yy_current_state] ) - { - (yy_last_accepting_state) = yy_current_state; - (yy_last_accepting_cpos) = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 56 ) - yy_c = yy_meta[(unsigned int) yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - } - - return yy_current_state; + register yy_state_type yy_current_state; + register char *yy_cp; + + yy_current_state = (yy_start); + + for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) + { + register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); + if ( yy_accept[yy_current_state] ) + { + (yy_last_accepting_state) = yy_current_state; + (yy_last_accepting_cpos) = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 56 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + } + + return yy_current_state; } /* yy_try_NUL_trans - try to make a transition on the NUL character * * synopsis - * next_state = yy_try_NUL_trans( current_state ); + * next_state = yy_try_NUL_trans( current_state ); */ static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state ) { - register int yy_is_jam; - register char *yy_cp = (yy_c_buf_p); - - register YY_CHAR yy_c = 1; - if ( yy_accept[yy_current_state] ) - { - (yy_last_accepting_state) = yy_current_state; - (yy_last_accepting_cpos) = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 56 ) - yy_c = yy_meta[(unsigned int) yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - yy_is_jam = (yy_current_state == 55); - - return yy_is_jam ? 0 : yy_current_state; + register int yy_is_jam; + register char *yy_cp = (yy_c_buf_p); + + register YY_CHAR yy_c = 1; + if ( yy_accept[yy_current_state] ) + { + (yy_last_accepting_state) = yy_current_state; + (yy_last_accepting_cpos) = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 56 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + yy_is_jam = (yy_current_state == 55); + + return yy_is_jam ? 0 : yy_current_state; } static void yyunput (int c, register char * yy_bp ) { - register char *yy_cp; - + register char *yy_cp; + yy_cp = (yy_c_buf_p); - /* undo effects of setting up scotchyytext */ - *yy_cp = (yy_hold_char); + /* undo effects of setting up scotchyytext */ + *yy_cp = (yy_hold_char); - if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) - { /* need to shift things up to make room */ - /* +2 for EOB chars. */ - register int number_to_move = (yy_n_chars) + 2; - register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ - YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; - register char *source = - &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]; + if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) + { /* need to shift things up to make room */ + /* +2 for EOB chars. */ + register int number_to_move = (yy_n_chars) + 2; + register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ + YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; + register char *source = + &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]; - while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) - *--dest = *--source; + while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) + *--dest = *--source; - yy_cp += (int) (dest - source); - yy_bp += (int) (dest - source); - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = - (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size; + yy_cp += (int) (dest - source); + yy_bp += (int) (dest - source); + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = + (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size; - if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) - YY_FATAL_ERROR( "flex scanner push-back overflow" ); - } + if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) + YY_FATAL_ERROR( "flex scanner push-back overflow" ); + } - *--yy_cp = (char) c; + *--yy_cp = (char) c; - (yytext_ptr) = yy_bp; - (yy_hold_char) = *yy_cp; - (yy_c_buf_p) = yy_cp; + (yytext_ptr) = yy_bp; + (yy_hold_char) = *yy_cp; + (yy_c_buf_p) = yy_cp; } #ifndef YY_NO_INPUT @@ -1363,186 +1363,186 @@ static int yy_get_next_buffer (void) #endif { - int c; - - *(yy_c_buf_p) = (yy_hold_char); - - if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR ) - { - /* yy_c_buf_p now points to the character we want to return. - * If this occurs *before* the EOB characters, then it's a - * valid NUL; if not, then we've hit the end of the buffer. - */ - if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) - /* This was really a NUL. */ - *(yy_c_buf_p) = '\0'; - - else - { /* need more input */ - int offset = (yy_c_buf_p) - (yytext_ptr); - ++(yy_c_buf_p); - - switch ( yy_get_next_buffer( ) ) - { - case EOB_ACT_LAST_MATCH: - /* This happens because yy_g_n_b() - * sees that we've accumulated a - * token and flags that we need to - * try matching the token before - * proceeding. But for input(), - * there's no matching to consider. - * So convert the EOB_ACT_LAST_MATCH - * to EOB_ACT_END_OF_FILE. - */ - - /* Reset buffer status. */ - scotchyyrestart(scotchyyin ); - - /*FALLTHROUGH*/ - - case EOB_ACT_END_OF_FILE: - { - if ( scotchyywrap( ) ) - return EOF; - - if ( ! (yy_did_buffer_switch_on_eof) ) - YY_NEW_FILE; + int c; + + *(yy_c_buf_p) = (yy_hold_char); + + if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR ) + { + /* yy_c_buf_p now points to the character we want to return. + * If this occurs *before* the EOB characters, then it's a + * valid NUL; if not, then we've hit the end of the buffer. + */ + if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) + /* This was really a NUL. */ + *(yy_c_buf_p) = '\0'; + + else + { /* need more input */ + int offset = (yy_c_buf_p) - (yytext_ptr); + ++(yy_c_buf_p); + + switch ( yy_get_next_buffer( ) ) + { + case EOB_ACT_LAST_MATCH: + /* This happens because yy_g_n_b() + * sees that we've accumulated a + * token and flags that we need to + * try matching the token before + * proceeding. But for input(), + * there's no matching to consider. + * So convert the EOB_ACT_LAST_MATCH + * to EOB_ACT_END_OF_FILE. + */ + + /* Reset buffer status. */ + scotchyyrestart(scotchyyin ); + + /*FALLTHROUGH*/ + + case EOB_ACT_END_OF_FILE: + { + if ( scotchyywrap( ) ) + return EOF; + + if ( ! (yy_did_buffer_switch_on_eof) ) + YY_NEW_FILE; #ifdef __cplusplus - return yyinput(); + return yyinput(); #else - return input(); + return input(); #endif - } + } - case EOB_ACT_CONTINUE_SCAN: - (yy_c_buf_p) = (yytext_ptr) + offset; - break; - } - } - } + case EOB_ACT_CONTINUE_SCAN: + (yy_c_buf_p) = (yytext_ptr) + offset; + break; + } + } + } - c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */ - *(yy_c_buf_p) = '\0'; /* preserve scotchyytext */ - (yy_hold_char) = *++(yy_c_buf_p); + c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */ + *(yy_c_buf_p) = '\0'; /* preserve scotchyytext */ + (yy_hold_char) = *++(yy_c_buf_p); - return c; + return c; } -#endif /* ifndef YY_NO_INPUT */ +#endif /* ifndef YY_NO_INPUT */ /** Immediately switch to a different input stream. * @param input_file A readable stream. - * + * * @note This function does not reset the start condition to @c INITIAL . */ void scotchyyrestart (FILE * input_file ) { - - if ( ! YY_CURRENT_BUFFER ){ + + if ( ! YY_CURRENT_BUFFER ){ scotchyyensure_buffer_stack (); - YY_CURRENT_BUFFER_LVALUE = + YY_CURRENT_BUFFER_LVALUE = scotchyy_create_buffer(scotchyyin,YY_BUF_SIZE ); - } + } - scotchyy_init_buffer(YY_CURRENT_BUFFER,input_file ); - scotchyy_load_buffer_state( ); + scotchyy_init_buffer(YY_CURRENT_BUFFER,input_file ); + scotchyy_load_buffer_state( ); } /** Switch to a different input buffer. * @param new_buffer The new input buffer. - * + * */ void scotchyy_switch_to_buffer (YY_BUFFER_STATE new_buffer ) { - - /* TODO. We should be able to replace this entire function body - * with - * scotchyypop_buffer_state(); - * scotchyypush_buffer_state(new_buffer); + + /* TODO. We should be able to replace this entire function body + * with + * scotchyypop_buffer_state(); + * scotchyypush_buffer_state(new_buffer); */ - scotchyyensure_buffer_stack (); - if ( YY_CURRENT_BUFFER == new_buffer ) - return; - - if ( YY_CURRENT_BUFFER ) - { - /* Flush out information for old buffer. */ - *(yy_c_buf_p) = (yy_hold_char); - YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); - } - - YY_CURRENT_BUFFER_LVALUE = new_buffer; - scotchyy_load_buffer_state( ); - - /* We don't actually know whether we did this switch during - * EOF (scotchyywrap()) processing, but the only time this flag - * is looked at is after scotchyywrap() is called, so it's safe - * to go ahead and always set it. - */ - (yy_did_buffer_switch_on_eof) = 1; + scotchyyensure_buffer_stack (); + if ( YY_CURRENT_BUFFER == new_buffer ) + return; + + if ( YY_CURRENT_BUFFER ) + { + /* Flush out information for old buffer. */ + *(yy_c_buf_p) = (yy_hold_char); + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); + } + + YY_CURRENT_BUFFER_LVALUE = new_buffer; + scotchyy_load_buffer_state( ); + + /* We don't actually know whether we did this switch during + * EOF (scotchyywrap()) processing, but the only time this flag + * is looked at is after scotchyywrap() is called, so it's safe + * to go ahead and always set it. + */ + (yy_did_buffer_switch_on_eof) = 1; } static void scotchyy_load_buffer_state (void) { - (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; - (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; - scotchyyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; - (yy_hold_char) = *(yy_c_buf_p); + (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; + scotchyyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; + (yy_hold_char) = *(yy_c_buf_p); } /** Allocate and initialize an input buffer state. * @param file A readable stream. * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. - * + * * @return the allocated buffer state. */ YY_BUFFER_STATE scotchyy_create_buffer (FILE * file, int size ) { - YY_BUFFER_STATE b; - - b = (YY_BUFFER_STATE) scotchyyalloc(sizeof( struct yy_buffer_state ) ); - if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in scotchyy_create_buffer()" ); + YY_BUFFER_STATE b; + + b = (YY_BUFFER_STATE) scotchyyalloc(sizeof( struct yy_buffer_state ) ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in scotchyy_create_buffer()" ); - b->yy_buf_size = size; + b->yy_buf_size = size; - /* yy_ch_buf has to be 2 characters longer than the size given because - * we need to put in 2 end-of-buffer characters. - */ - b->yy_ch_buf = (char *) scotchyyalloc(b->yy_buf_size + 2 ); - if ( ! b->yy_ch_buf ) - YY_FATAL_ERROR( "out of dynamic memory in scotchyy_create_buffer()" ); + /* yy_ch_buf has to be 2 characters longer than the size given because + * we need to put in 2 end-of-buffer characters. + */ + b->yy_ch_buf = (char *) scotchyyalloc(b->yy_buf_size + 2 ); + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in scotchyy_create_buffer()" ); - b->yy_is_our_buffer = 1; + b->yy_is_our_buffer = 1; - scotchyy_init_buffer(b,file ); + scotchyy_init_buffer(b,file ); - return b; + return b; } /** Destroy the buffer. * @param b a buffer created with scotchyy_create_buffer() - * + * */ void scotchyy_delete_buffer (YY_BUFFER_STATE b ) { - - if ( ! b ) - return; - if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ - YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; + if ( ! b ) + return; + + if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ + YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; - if ( b->yy_is_our_buffer ) - scotchyyfree((void *) b->yy_ch_buf ); + if ( b->yy_is_our_buffer ) + scotchyyfree((void *) b->yy_ch_buf ); - scotchyyfree((void *) b ); + scotchyyfree((void *) b ); } #ifndef __cplusplus extern int isatty (int ); #endif /* __cplusplus */ - + /* Initializes or reinitializes a buffer. * This function is sometimes called more than once on the same buffer, * such as during a scotchyyrestart() or at EOF. @@ -1550,12 +1550,12 @@ extern int isatty (int ); static void scotchyy_init_buffer (YY_BUFFER_STATE b, FILE * file ) { - int oerrno = errno; - - scotchyy_flush_buffer(b ); + int oerrno = errno; + + scotchyy_flush_buffer(b ); - b->yy_input_file = file; - b->yy_fill_buffer = 1; + b->yy_input_file = file; + b->yy_fill_buffer = 1; /* If b is the current buffer, then scotchyy_init_buffer was _probably_ * called from scotchyyrestart() or through yy_get_next_buffer. @@ -1567,87 +1567,87 @@ extern int isatty (int ); } b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; - - errno = oerrno; + + errno = oerrno; } /** Discard all buffered characters. On the next scan, YY_INPUT will be called. * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. - * + * */ void scotchyy_flush_buffer (YY_BUFFER_STATE b ) { - if ( ! b ) - return; + if ( ! b ) + return; - b->yy_n_chars = 0; + b->yy_n_chars = 0; - /* We always need two end-of-buffer characters. The first causes - * a transition to the end-of-buffer state. The second causes - * a jam in that state. - */ - b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; - b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; + /* We always need two end-of-buffer characters. The first causes + * a transition to the end-of-buffer state. The second causes + * a jam in that state. + */ + b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; + b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; - b->yy_buf_pos = &b->yy_ch_buf[0]; + b->yy_buf_pos = &b->yy_ch_buf[0]; - b->yy_at_bol = 1; - b->yy_buffer_status = YY_BUFFER_NEW; + b->yy_at_bol = 1; + b->yy_buffer_status = YY_BUFFER_NEW; - if ( b == YY_CURRENT_BUFFER ) - scotchyy_load_buffer_state( ); + if ( b == YY_CURRENT_BUFFER ) + scotchyy_load_buffer_state( ); } /** Pushes the new state onto the stack. The new state becomes * the current state. This function will allocate the stack * if necessary. * @param new_buffer The new state. - * + * */ void scotchyypush_buffer_state (YY_BUFFER_STATE new_buffer ) { - if (new_buffer == NULL) - return; - - scotchyyensure_buffer_stack(); - - /* This block is copied from scotchyy_switch_to_buffer. */ - if ( YY_CURRENT_BUFFER ) - { - /* Flush out information for old buffer. */ - *(yy_c_buf_p) = (yy_hold_char); - YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); - } - - /* Only push if top exists. Otherwise, replace top. */ - if (YY_CURRENT_BUFFER) - (yy_buffer_stack_top)++; - YY_CURRENT_BUFFER_LVALUE = new_buffer; - - /* copied from scotchyy_switch_to_buffer. */ - scotchyy_load_buffer_state( ); - (yy_did_buffer_switch_on_eof) = 1; + if (new_buffer == NULL) + return; + + scotchyyensure_buffer_stack(); + + /* This block is copied from scotchyy_switch_to_buffer. */ + if ( YY_CURRENT_BUFFER ) + { + /* Flush out information for old buffer. */ + *(yy_c_buf_p) = (yy_hold_char); + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); + } + + /* Only push if top exists. Otherwise, replace top. */ + if (YY_CURRENT_BUFFER) + (yy_buffer_stack_top)++; + YY_CURRENT_BUFFER_LVALUE = new_buffer; + + /* copied from scotchyy_switch_to_buffer. */ + scotchyy_load_buffer_state( ); + (yy_did_buffer_switch_on_eof) = 1; } /** Removes and deletes the top of the stack, if present. * The next element becomes the new top. - * + * */ void scotchyypop_buffer_state (void) { - if (!YY_CURRENT_BUFFER) - return; - - scotchyy_delete_buffer(YY_CURRENT_BUFFER ); - YY_CURRENT_BUFFER_LVALUE = NULL; - if ((yy_buffer_stack_top) > 0) - --(yy_buffer_stack_top); - - if (YY_CURRENT_BUFFER) { - scotchyy_load_buffer_state( ); - (yy_did_buffer_switch_on_eof) = 1; - } + if (!YY_CURRENT_BUFFER) + return; + + scotchyy_delete_buffer(YY_CURRENT_BUFFER ); + YY_CURRENT_BUFFER_LVALUE = NULL; + if ((yy_buffer_stack_top) > 0) + --(yy_buffer_stack_top); + + if (YY_CURRENT_BUFFER) { + scotchyy_load_buffer_state( ); + (yy_did_buffer_switch_on_eof) = 1; + } } /* Allocates the stack if it does not exist. @@ -1655,131 +1655,131 @@ void scotchyypop_buffer_state (void) */ static void scotchyyensure_buffer_stack (void) { - int num_to_alloc; - - if (!(yy_buffer_stack)) { + int num_to_alloc; + + if (!(yy_buffer_stack)) { - /* First allocation is just for 2 elements, since we don't know if this - * scanner will even need a stack. We use 2 instead of 1 to avoid an - * immediate realloc on the next call. + /* First allocation is just for 2 elements, since we don't know if this + * scanner will even need a stack. We use 2 instead of 1 to avoid an + * immediate realloc on the next call. */ - num_to_alloc = 1; - (yy_buffer_stack) = (struct yy_buffer_state**)scotchyyalloc - (num_to_alloc * sizeof(struct yy_buffer_state*) - ); - if ( ! (yy_buffer_stack) ) - YY_FATAL_ERROR( "out of dynamic memory in scotchyyensure_buffer_stack()" ); - - memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); - - (yy_buffer_stack_max) = num_to_alloc; - (yy_buffer_stack_top) = 0; - return; - } - - if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){ - - /* Increase the buffer to prepare for a possible push. */ - int grow_size = 8 /* arbitrary grow size */; - - num_to_alloc = (yy_buffer_stack_max) + grow_size; - (yy_buffer_stack) = (struct yy_buffer_state**)scotchyyrealloc - ((yy_buffer_stack), - num_to_alloc * sizeof(struct yy_buffer_state*) - ); - if ( ! (yy_buffer_stack) ) - YY_FATAL_ERROR( "out of dynamic memory in scotchyyensure_buffer_stack()" ); - - /* zero only the new slots.*/ - memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*)); - (yy_buffer_stack_max) = num_to_alloc; - } + num_to_alloc = 1; + (yy_buffer_stack) = (struct yy_buffer_state**)scotchyyalloc + (num_to_alloc * sizeof(struct yy_buffer_state*) + ); + if ( ! (yy_buffer_stack) ) + YY_FATAL_ERROR( "out of dynamic memory in scotchyyensure_buffer_stack()" ); + + memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); + + (yy_buffer_stack_max) = num_to_alloc; + (yy_buffer_stack_top) = 0; + return; + } + + if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){ + + /* Increase the buffer to prepare for a possible push. */ + int grow_size = 8 /* arbitrary grow size */; + + num_to_alloc = (yy_buffer_stack_max) + grow_size; + (yy_buffer_stack) = (struct yy_buffer_state**)scotchyyrealloc + ((yy_buffer_stack), + num_to_alloc * sizeof(struct yy_buffer_state*) + ); + if ( ! (yy_buffer_stack) ) + YY_FATAL_ERROR( "out of dynamic memory in scotchyyensure_buffer_stack()" ); + + /* zero only the new slots.*/ + memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*)); + (yy_buffer_stack_max) = num_to_alloc; + } } /** Setup the input buffer state to scan directly from a user-specified character buffer. * @param base the character buffer * @param size the size in bytes of the character buffer - * - * @return the newly allocated buffer state object. + * + * @return the newly allocated buffer state object. */ YY_BUFFER_STATE scotchyy_scan_buffer (char * base, yy_size_t size ) { - YY_BUFFER_STATE b; - - if ( size < 2 || - base[size-2] != YY_END_OF_BUFFER_CHAR || - base[size-1] != YY_END_OF_BUFFER_CHAR ) - /* They forgot to leave room for the EOB's. */ - return 0; - - b = (YY_BUFFER_STATE) scotchyyalloc(sizeof( struct yy_buffer_state ) ); - if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in scotchyy_scan_buffer()" ); - - b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ - b->yy_buf_pos = b->yy_ch_buf = base; - b->yy_is_our_buffer = 0; - b->yy_input_file = 0; - b->yy_n_chars = b->yy_buf_size; - b->yy_is_interactive = 0; - b->yy_at_bol = 1; - b->yy_fill_buffer = 0; - b->yy_buffer_status = YY_BUFFER_NEW; - - scotchyy_switch_to_buffer(b ); - - return b; + YY_BUFFER_STATE b; + + if ( size < 2 || + base[size-2] != YY_END_OF_BUFFER_CHAR || + base[size-1] != YY_END_OF_BUFFER_CHAR ) + /* They forgot to leave room for the EOB's. */ + return 0; + + b = (YY_BUFFER_STATE) scotchyyalloc(sizeof( struct yy_buffer_state ) ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in scotchyy_scan_buffer()" ); + + b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ + b->yy_buf_pos = b->yy_ch_buf = base; + b->yy_is_our_buffer = 0; + b->yy_input_file = 0; + b->yy_n_chars = b->yy_buf_size; + b->yy_is_interactive = 0; + b->yy_at_bol = 1; + b->yy_fill_buffer = 0; + b->yy_buffer_status = YY_BUFFER_NEW; + + scotchyy_switch_to_buffer(b ); + + return b; } /** Setup the input buffer state to scan a string. The next call to scotchyylex() will * scan from a @e copy of @a str. * @param yystr a NUL-terminated string to scan - * + * * @return the newly allocated buffer state object. * @note If you want to scan bytes that may contain NUL values, then use * scotchyy_scan_bytes() instead. */ YY_BUFFER_STATE scotchyy_scan_string (yyconst char * yystr ) { - - return scotchyy_scan_bytes(yystr,strlen(yystr) ); + + return scotchyy_scan_bytes(yystr,strlen(yystr) ); } /** Setup the input buffer state to scan the given bytes. The next call to scotchyylex() will * scan from a @e copy of @a bytes. * @param bytes the byte buffer to scan * @param len the number of bytes in the buffer pointed to by @a bytes. - * + * * @return the newly allocated buffer state object. */ YY_BUFFER_STATE scotchyy_scan_bytes (yyconst char * yybytes, int _yybytes_len ) { - YY_BUFFER_STATE b; - char *buf; - yy_size_t n; - int i; - - /* Get memory for full buffer, including space for trailing EOB's. */ - n = _yybytes_len + 2; - buf = (char *) scotchyyalloc(n ); - if ( ! buf ) - YY_FATAL_ERROR( "out of dynamic memory in scotchyy_scan_bytes()" ); - - for ( i = 0; i < _yybytes_len; ++i ) - buf[i] = yybytes[i]; - - buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; - - b = scotchyy_scan_buffer(buf,n ); - if ( ! b ) - YY_FATAL_ERROR( "bad buffer in scotchyy_scan_bytes()" ); - - /* It's okay to grow etc. this buffer, and we should throw it - * away when we're done. - */ - b->yy_is_our_buffer = 1; - - return b; + YY_BUFFER_STATE b; + char *buf; + yy_size_t n; + int i; + + /* Get memory for full buffer, including space for trailing EOB's. */ + n = _yybytes_len + 2; + buf = (char *) scotchyyalloc(n ); + if ( ! buf ) + YY_FATAL_ERROR( "out of dynamic memory in scotchyy_scan_bytes()" ); + + for ( i = 0; i < _yybytes_len; ++i ) + buf[i] = yybytes[i]; + + buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; + + b = scotchyy_scan_buffer(buf,n ); + if ( ! b ) + YY_FATAL_ERROR( "bad buffer in scotchyy_scan_bytes()" ); + + /* It's okay to grow etc. this buffer, and we should throw it + * away when we're done. + */ + b->yy_is_our_buffer = 1; + + return b; } #ifndef YY_EXIT_FAILURE @@ -1788,40 +1788,40 @@ YY_BUFFER_STATE scotchyy_scan_bytes (yyconst char * yybytes, int _yybytes_len static void yy_fatal_error (yyconst char* msg ) { - (void) fprintf( stderr, "%s\n", msg ); - exit( YY_EXIT_FAILURE ); + (void) fprintf( stderr, "%s\n", msg ); + exit( YY_EXIT_FAILURE ); } /* Redefine yyless() so it works in section 3 code. */ #undef yyless #define yyless(n) \ - do \ - { \ - /* Undo effects of setting up scotchyytext. */ \ + do \ + { \ + /* Undo effects of setting up scotchyytext. */ \ int yyless_macro_arg = (n); \ YY_LESS_LINENO(yyless_macro_arg);\ - scotchyytext[scotchyyleng] = (yy_hold_char); \ - (yy_c_buf_p) = scotchyytext + yyless_macro_arg; \ - (yy_hold_char) = *(yy_c_buf_p); \ - *(yy_c_buf_p) = '\0'; \ - scotchyyleng = yyless_macro_arg; \ - } \ - while ( 0 ) + scotchyytext[scotchyyleng] = (yy_hold_char); \ + (yy_c_buf_p) = scotchyytext + yyless_macro_arg; \ + (yy_hold_char) = *(yy_c_buf_p); \ + *(yy_c_buf_p) = '\0'; \ + scotchyyleng = yyless_macro_arg; \ + } \ + while ( 0 ) /* Accessor methods (get/set functions) to struct members. */ /** Get the current line number. - * + * */ int scotchyyget_lineno (void) { - + return scotchyylineno; } /** Get the input stream. - * + * */ FILE *scotchyyget_in (void) { @@ -1829,7 +1829,7 @@ FILE *scotchyyget_in (void) } /** Get the output stream. - * + * */ FILE *scotchyyget_out (void) { @@ -1837,7 +1837,7 @@ FILE *scotchyyget_out (void) } /** Get the length of the current token. - * + * */ int scotchyyget_leng (void) { @@ -1845,7 +1845,7 @@ int scotchyyget_leng (void) } /** Get the current token. - * + * */ char *scotchyyget_text (void) @@ -1855,18 +1855,18 @@ char *scotchyyget_text (void) /** Set the current line number. * @param line_number - * + * */ void scotchyyset_lineno (int line_number ) { - + scotchyylineno = line_number; } /** Set the input stream. This does not discard the current * input buffer. * @param in_str A readable stream. - * + * * @see scotchyy_switch_to_buffer */ void scotchyyset_in (FILE * in_str ) @@ -1920,17 +1920,17 @@ static int yy_init_globals (void) /* scotchyylex_destroy is for both reentrant and non-reentrant scanners. */ int scotchyylex_destroy (void) { - + /* Pop the buffer stack, destroying each element. */ - while(YY_CURRENT_BUFFER){ - scotchyy_delete_buffer(YY_CURRENT_BUFFER ); - YY_CURRENT_BUFFER_LVALUE = NULL; - scotchyypop_buffer_state(); - } + while(YY_CURRENT_BUFFER){ + scotchyy_delete_buffer(YY_CURRENT_BUFFER ); + YY_CURRENT_BUFFER_LVALUE = NULL; + scotchyypop_buffer_state(); + } - /* Destroy the stack itself. */ - scotchyyfree((yy_buffer_stack) ); - (yy_buffer_stack) = NULL; + /* Destroy the stack itself. */ + scotchyyfree((yy_buffer_stack) ); + (yy_buffer_stack) = NULL; /* Reset the globals. This is important in a non-reentrant scanner so the next time * scotchyylex() is called, initialization will occur. */ @@ -1946,43 +1946,43 @@ int scotchyylex_destroy (void) #ifndef yytext_ptr static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ) { - register int i; - for ( i = 0; i < n; ++i ) - s1[i] = s2[i]; + register int i; + for ( i = 0; i < n; ++i ) + s1[i] = s2[i]; } #endif #ifdef YY_NEED_STRLEN static int yy_flex_strlen (yyconst char * s ) { - register int n; - for ( n = 0; s[n]; ++n ) - ; + register int n; + for ( n = 0; s[n]; ++n ) + ; - return n; + return n; } #endif void *scotchyyalloc (yy_size_t size ) { - return (void *) malloc( size ); + return (void *) malloc( size ); } void *scotchyyrealloc (void * ptr, yy_size_t size ) { - /* The cast to (char *) in the following accommodates both - * implementations that use char* generic pointers, and those - * that use void* generic pointers. It works with the latter - * because both ANSI C and C++ allow castless assignment from - * any pointer type to void*, and deal with argument conversions - * as though doing an assignment. - */ - return (void *) realloc( (char *) ptr, size ); + /* The cast to (char *) in the following accommodates both + * implementations that use char* generic pointers, and those + * that use void* generic pointers. It works with the latter + * because both ANSI C and C++ allow castless assignment from + * any pointer type to void*, and deal with argument conversions + * as though doing an assignment. + */ + return (void *) realloc( (char *) ptr, size ); } void scotchyyfree (void * ptr ) { - free( (char *) ptr ); /* see scotchyyrealloc() for (char *) cast */ + free( (char *) ptr ); /* see scotchyyrealloc() for (char *) cast */ } #define YYTABLES_NAME "yytables" diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/last_resort/parser_ly.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/last_resort/parser_ly.h index 601850d48..dce3cba02 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/last_resort/parser_ly.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/last_resort/parser_ly.h @@ -1,20 +1,20 @@ /* A Bison parser, made by GNU Bison 2.4.2. */ /* Skeleton interface for Bison's Yacc-like parsers in C - + Copyright (C) 1984, 1989-1990, 2000-2006, 2009-2010 Free Software Foundation, Inc. - + This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with this program. If not, see . */ @@ -27,7 +27,7 @@ special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. - + This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/last_resort/parser_yy.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/last_resort/parser_yy.c index 5e5cd0f7a..4b4137e94 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/last_resort/parser_yy.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/last_resort/parser_yy.c @@ -1,20 +1,20 @@ /* A Bison parser, made by GNU Bison 2.4.2. */ /* Skeleton implementation for Bison's Yacc-like parsers in C - + Copyright (C) 1984, 1989-1990, 2000-2006, 2009-2010 Free Software Foundation, Inc. - + This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with this program. If not, see . */ @@ -27,7 +27,7 @@ special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. - + This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ @@ -87,13 +87,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -104,7 +104,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ @@ -385,7 +385,7 @@ YYID (yyi) # endif # if (defined __cplusplus && ! defined _STDLIB_H \ && ! ((defined YYMALLOC || defined malloc) \ - && (defined YYFREE || defined free))) + && (defined YYFREE || defined free))) # include /* INFRINGES ON USER NAME SPACE */ # ifndef _STDLIB_H # define _STDLIB_H 1 @@ -411,7 +411,7 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */ #if (! defined yyoverflow \ && (! defined __cplusplus \ - || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) + || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) /* A type that is properly aligned for any stack member. */ union yyalloc @@ -436,13 +436,13 @@ union yyalloc # define YYCOPY(To, From, Count) \ __builtin_memcpy (To, From, (Count) * sizeof (*(From))) # else -# define YYCOPY(To, From, Count) \ - do \ - { \ - YYSIZE_T yyi; \ - for (yyi = 0; yyi < (Count); yyi++) \ - (To)[yyi] = (From)[yyi]; \ - } \ +# define YYCOPY(To, From, Count) \ + do \ + { \ + YYSIZE_T yyi; \ + for (yyi = 0; yyi < (Count); yyi++) \ + (To)[yyi] = (From)[yyi]; \ + } \ while (YYID (0)) # endif # endif @@ -452,15 +452,15 @@ union yyalloc elements in the stack, and YYPTR gives the new location of the stack. Advance YYPTR to a properly aligned location for the next stack. */ -# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ - do \ - { \ - YYSIZE_T yynewbytes; \ - YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ - Stack = &yyptr->Stack_alloc; \ - yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ - yyptr += yynewbytes / sizeof (*yyptr); \ - } \ +# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ + do \ + { \ + YYSIZE_T yynewbytes; \ + YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ + Stack = &yyptr->Stack_alloc; \ + yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ + yyptr += yynewbytes / sizeof (*yyptr); \ + } \ while (YYID (0)) #endif @@ -483,7 +483,7 @@ union yyalloc #define YYUNDEFTOK 2 #define YYMAXUTOK 266 -#define YYTRANSLATE(YYX) \ +#define YYTRANSLATE(YYX) \ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ @@ -716,14 +716,14 @@ static const yytype_uint8 yystos[] = 6, 7, 8, 49, 50, 33, 15, 33 }; -#define yyerrok (yyerrstatus = 0) -#define yyclearin (yychar = YYEMPTY) -#define YYEMPTY (-2) -#define YYEOF 0 +#define yyerrok (yyerrstatus = 0) +#define yyclearin (yychar = YYEMPTY) +#define YYEMPTY (-2) +#define YYEOF 0 -#define YYACCEPT goto yyacceptlab -#define YYABORT goto yyabortlab -#define YYERROR goto yyerrorlab +#define YYACCEPT goto yyacceptlab +#define YYABORT goto yyabortlab +#define YYERROR goto yyerrorlab /* Like YYERROR except do call yyerror. This remains here temporarily @@ -733,7 +733,7 @@ static const yytype_uint8 yystos[] = in Bison 2.4.2's NEWS entry, where a plan to phase it out is discussed. */ -#define YYFAIL goto yyerrlab +#define YYFAIL goto yyerrlab #if defined YYFAIL /* This is here to suppress warnings from the GCC cpp's -Wunused-macros. Normally we don't worry about that warning, but @@ -743,26 +743,26 @@ static const yytype_uint8 yystos[] = #define YYRECOVERING() (!!yyerrstatus) -#define YYBACKUP(Token, Value) \ -do \ - if (yychar == YYEMPTY && yylen == 1) \ - { \ - yychar = (Token); \ - yylval = (Value); \ - yytoken = YYTRANSLATE (yychar); \ - YYPOPSTACK (1); \ - goto yybackup; \ - } \ - else \ - { \ +#define YYBACKUP(Token, Value) \ +do \ + if (yychar == YYEMPTY && yylen == 1) \ + { \ + yychar = (Token); \ + yylval = (Value); \ + yytoken = YYTRANSLATE (yychar); \ + YYPOPSTACK (1); \ + goto yybackup; \ + } \ + else \ + { \ yyerror (YY_("syntax error: cannot back up")); \ - YYERROR; \ - } \ + YYERROR; \ + } \ while (YYID (0)) -#define YYTERROR 1 -#define YYERRCODE 256 +#define YYTERROR 1 +#define YYERRCODE 256 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. @@ -771,22 +771,22 @@ while (YYID (0)) #define YYRHSLOC(Rhs, K) ((Rhs)[K]) #ifndef YYLLOC_DEFAULT -# define YYLLOC_DEFAULT(Current, Rhs, N) \ - do \ +# define YYLLOC_DEFAULT(Current, Rhs, N) \ + do \ if (YYID (N)) \ - { \ - (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ - (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ - (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ - (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ - } \ - else \ - { \ - (Current).first_line = (Current).last_line = \ - YYRHSLOC (Rhs, 0).last_line; \ - (Current).first_column = (Current).last_column = \ - YYRHSLOC (Rhs, 0).last_column; \ - } \ + { \ + (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ + (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ + (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ + (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ + } \ + else \ + { \ + (Current).first_line = (Current).last_line = \ + YYRHSLOC (Rhs, 0).last_line; \ + (Current).first_column = (Current).last_column = \ + YYRHSLOC (Rhs, 0).last_column; \ + } \ while (YYID (0)) #endif @@ -797,10 +797,10 @@ while (YYID (0)) #ifndef YY_LOCATION_PRINT # if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL -# define YY_LOCATION_PRINT(File, Loc) \ - fprintf (File, "%d.%d-%d.%d", \ - (Loc).first_line, (Loc).first_column, \ - (Loc).last_line, (Loc).last_column) +# define YY_LOCATION_PRINT(File, Loc) \ + fprintf (File, "%d.%d-%d.%d", \ + (Loc).first_line, (Loc).first_column, \ + (Loc).last_line, (Loc).last_column) # else # define YY_LOCATION_PRINT(File, Loc) ((void) 0) # endif @@ -823,21 +823,21 @@ while (YYID (0)) # define YYFPRINTF fprintf # endif -# define YYDPRINTF(Args) \ -do { \ - if (yydebug) \ - YYFPRINTF Args; \ +# define YYDPRINTF(Args) \ +do { \ + if (yydebug) \ + YYFPRINTF Args; \ } while (YYID (0)) -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ -do { \ - if (yydebug) \ - { \ - YYFPRINTF (stderr, "%s ", Title); \ - yy_symbol_print (stderr, \ - Type, Value); \ - YYFPRINTF (stderr, "\n"); \ - } \ +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ +do { \ + if (yydebug) \ + { \ + YYFPRINTF (stderr, "%s ", Title); \ + yy_symbol_print (stderr, \ + Type, Value); \ + YYFPRINTF (stderr, "\n"); \ + } \ } while (YYID (0)) @@ -869,7 +869,7 @@ yy_symbol_value_print (yyoutput, yytype, yyvaluep) switch (yytype) { default: - break; + break; } } @@ -924,10 +924,10 @@ yy_stack_print (yybottom, yytop) YYFPRINTF (stderr, "\n"); } -# define YY_STACK_PRINT(Bottom, Top) \ -do { \ - if (yydebug) \ - yy_stack_print ((Bottom), (Top)); \ +# define YY_STACK_PRINT(Bottom, Top) \ +do { \ + if (yydebug) \ + yy_stack_print ((Bottom), (Top)); \ } while (YYID (0)) @@ -950,21 +950,21 @@ yy_reduce_print (yyvsp, yyrule) int yyi; unsigned long int yylno = yyrline[yyrule]; YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", - yyrule - 1, yylno); + yyrule - 1, yylno); /* The symbols being reduced. */ for (yyi = 0; yyi < yynrhs; yyi++) { YYFPRINTF (stderr, " $%d = ", yyi + 1); yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], - &(yyvsp[(yyi + 1) - (yynrhs)]) - ); + &(yyvsp[(yyi + 1) - (yynrhs)]) + ); YYFPRINTF (stderr, "\n"); } } -# define YY_REDUCE_PRINT(Rule) \ -do { \ - if (yydebug) \ +# define YY_REDUCE_PRINT(Rule) \ +do { \ + if (yydebug) \ yy_reduce_print (yyvsp, Rule); \ } while (YYID (0)) @@ -980,7 +980,7 @@ int yydebug; /* YYINITDEPTH -- initial size of the parser's stacks. */ -#ifndef YYINITDEPTH +#ifndef YYINITDEPTH # define YYINITDEPTH 200 #endif @@ -995,7 +995,7 @@ int yydebug; # define YYMAXDEPTH 10000 #endif - + #if YYERROR_VERBOSE @@ -1067,27 +1067,27 @@ yytnamerr (char *yyres, const char *yystr) char const *yyp = yystr; for (;;) - switch (*++yyp) - { - case '\'': - case ',': - goto do_not_strip_quotes; - - case '\\': - if (*++yyp != '\\') - goto do_not_strip_quotes; - /* Fall through. */ - default: - if (yyres) - yyres[yyn] = *yyp; - yyn++; - break; - - case '"': - if (yyres) - yyres[yyn] = '\0'; - return yyn; - } + switch (*++yyp) + { + case '\'': + case ',': + goto do_not_strip_quotes; + + case '\\': + if (*++yyp != '\\') + goto do_not_strip_quotes; + /* Fall through. */ + default: + if (yyres) + yyres[yyn] = *yyp; + yyn++; + break; + + case '"': + if (yyres) + yyres[yyn] = '\0'; + return yyn; + } do_not_strip_quotes: ; } @@ -1125,7 +1125,7 @@ yysyntax_error (char *yyresult, int yystate, int yychar) # if 0 /* This is so xgettext sees the translatable formats that are - constructed on the fly. */ + constructed on the fly. */ YY_("syntax error, unexpected %s"); YY_("syntax error, unexpected %s, expecting %s"); YY_("syntax error, unexpected %s, expecting %s or %s"); @@ -1138,13 +1138,13 @@ yysyntax_error (char *yyresult, int yystate, int yychar) static char const yyexpecting[] = ", expecting %s"; static char const yyor[] = " or %s"; char yyformat[sizeof yyunexpected - + sizeof yyexpecting - 1 - + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2) - * (sizeof yyor - 1))]; + + sizeof yyexpecting - 1 + + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2) + * (sizeof yyor - 1))]; char const *yyprefix = yyexpecting; /* Start YYX at -YYN if negative to avoid negative indexes in - YYCHECK. */ + YYCHECK. */ int yyxbegin = yyn < 0 ? -yyn : 0; /* Stay within bounds of both yycheck and yytname. */ @@ -1156,22 +1156,22 @@ yysyntax_error (char *yyresult, int yystate, int yychar) yyfmt = yystpcpy (yyformat, yyunexpected); for (yyx = yyxbegin; yyx < yyxend; ++yyx) - if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) - { - if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) - { - yycount = 1; - yysize = yysize0; - yyformat[sizeof yyunexpected - 1] = '\0'; - break; - } - yyarg[yycount++] = yytname[yyx]; - yysize1 = yysize + yytnamerr (0, yytname[yyx]); - yysize_overflow |= (yysize1 < yysize); - yysize = yysize1; - yyfmt = yystpcpy (yyfmt, yyprefix); - yyprefix = yyor; - } + if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) + { + if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) + { + yycount = 1; + yysize = yysize0; + yyformat[sizeof yyunexpected - 1] = '\0'; + break; + } + yyarg[yycount++] = yytname[yyx]; + yysize1 = yysize + yytnamerr (0, yytname[yyx]); + yysize_overflow |= (yysize1 < yysize); + yysize = yysize1; + yyfmt = yystpcpy (yyfmt, yyprefix); + yyprefix = yyor; + } yyf = YY_(yyformat); yysize1 = yysize + yystrlen (yyf); @@ -1179,34 +1179,34 @@ yysyntax_error (char *yyresult, int yystate, int yychar) yysize = yysize1; if (yysize_overflow) - return YYSIZE_MAXIMUM; + return YYSIZE_MAXIMUM; if (yyresult) - { - /* Avoid sprintf, as that infringes on the user's name space. - Don't have undefined behavior even if the translation - produced a string with the wrong number of "%s"s. */ - char *yyp = yyresult; - int yyi = 0; - while ((*yyp = *yyf) != '\0') - { - if (*yyp == '%' && yyf[1] == 's' && yyi < yycount) - { - yyp += yytnamerr (yyp, yyarg[yyi++]); - yyf += 2; - } - else - { - yyp++; - yyf++; - } - } - } + { + /* Avoid sprintf, as that infringes on the user's name space. + Don't have undefined behavior even if the translation + produced a string with the wrong number of "%s"s. */ + char *yyp = yyresult; + int yyi = 0; + while ((*yyp = *yyf) != '\0') + { + if (*yyp == '%' && yyf[1] == 's' && yyi < yycount) + { + yyp += yytnamerr (yyp, yyarg[yyi++]); + yyf += 2; + } + else + { + yyp++; + yyf++; + } + } + } return yysize; } } #endif /* YYERROR_VERBOSE */ - + /*-----------------------------------------------. | Release the memory associated to this symbol. | @@ -1235,7 +1235,7 @@ yydestruct (yymsg, yytype, yyvaluep) { default: - break; + break; } } @@ -1377,23 +1377,23 @@ yyparse () #ifdef yyoverflow { - /* Give user a chance to reallocate the stack. Use copies of - these so that the &'s don't force the real ones into - memory. */ - YYSTYPE *yyvs1 = yyvs; - yytype_int16 *yyss1 = yyss; - - /* Each stack pointer address is followed by the size of the - data in use in that stack, in bytes. This used to be a - conditional around just the two extra args, but that might - be undefined if yyoverflow is a macro. */ - yyoverflow (YY_("memory exhausted"), - &yyss1, yysize * sizeof (*yyssp), - &yyvs1, yysize * sizeof (*yyvsp), - &yystacksize); - - yyss = yyss1; - yyvs = yyvs1; + /* Give user a chance to reallocate the stack. Use copies of + these so that the &'s don't force the real ones into + memory. */ + YYSTYPE *yyvs1 = yyvs; + yytype_int16 *yyss1 = yyss; + + /* Each stack pointer address is followed by the size of the + data in use in that stack, in bytes. This used to be a + conditional around just the two extra args, but that might + be undefined if yyoverflow is a macro. */ + yyoverflow (YY_("memory exhausted"), + &yyss1, yysize * sizeof (*yyssp), + &yyvs1, yysize * sizeof (*yyvsp), + &yystacksize); + + yyss = yyss1; + yyvs = yyvs1; } #else /* no yyoverflow */ # ifndef YYSTACK_RELOCATE @@ -1401,22 +1401,22 @@ yyparse () # else /* Extend the stack our own way. */ if (YYMAXDEPTH <= yystacksize) - goto yyexhaustedlab; + goto yyexhaustedlab; yystacksize *= 2; if (YYMAXDEPTH < yystacksize) - yystacksize = YYMAXDEPTH; + yystacksize = YYMAXDEPTH; { - yytype_int16 *yyss1 = yyss; - union yyalloc *yyptr = - (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); - if (! yyptr) - goto yyexhaustedlab; - YYSTACK_RELOCATE (yyss_alloc, yyss); - YYSTACK_RELOCATE (yyvs_alloc, yyvs); + yytype_int16 *yyss1 = yyss; + union yyalloc *yyptr = + (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); + if (! yyptr) + goto yyexhaustedlab; + YYSTACK_RELOCATE (yyss_alloc, yyss); + YYSTACK_RELOCATE (yyvs_alloc, yyvs); # undef YYSTACK_RELOCATE - if (yyss1 != yyssa) - YYSTACK_FREE (yyss1); + if (yyss1 != yyssa) + YYSTACK_FREE (yyss1); } # endif #endif /* no yyoverflow */ @@ -1425,10 +1425,10 @@ yyparse () yyvsp = yyvs + yysize - 1; YYDPRINTF ((stderr, "Stack size increased to %lu\n", - (unsigned long int) yystacksize)); + (unsigned long int) yystacksize)); if (yyss + yystacksize - 1 <= yyssp) - YYABORT; + YYABORT; } YYDPRINTF ((stderr, "Entering state %d\n", yystate)); @@ -1480,7 +1480,7 @@ yyparse () if (yyn <= 0) { if (yyn == 0 || yyn == YYTABLE_NINF) - goto yyerrlab; + goto yyerrlab; yyn = -yyn; goto yyreduce; } @@ -2307,35 +2307,35 @@ yyparse () yyerror (YY_("syntax error")); #else { - YYSIZE_T yysize = yysyntax_error (0, yystate, yychar); - if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM) - { - YYSIZE_T yyalloc = 2 * yysize; - if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM)) - yyalloc = YYSTACK_ALLOC_MAXIMUM; - if (yymsg != yymsgbuf) - YYSTACK_FREE (yymsg); - yymsg = (char *) YYSTACK_ALLOC (yyalloc); - if (yymsg) - yymsg_alloc = yyalloc; - else - { - yymsg = yymsgbuf; - yymsg_alloc = sizeof yymsgbuf; - } - } - - if (0 < yysize && yysize <= yymsg_alloc) - { - (void) yysyntax_error (yymsg, yystate, yychar); - yyerror (yymsg); - } - else - { - yyerror (YY_("syntax error")); - if (yysize != 0) - goto yyexhaustedlab; - } + YYSIZE_T yysize = yysyntax_error (0, yystate, yychar); + if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM) + { + YYSIZE_T yyalloc = 2 * yysize; + if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM)) + yyalloc = YYSTACK_ALLOC_MAXIMUM; + if (yymsg != yymsgbuf) + YYSTACK_FREE (yymsg); + yymsg = (char *) YYSTACK_ALLOC (yyalloc); + if (yymsg) + yymsg_alloc = yyalloc; + else + { + yymsg = yymsgbuf; + yymsg_alloc = sizeof yymsgbuf; + } + } + + if (0 < yysize && yysize <= yymsg_alloc) + { + (void) yysyntax_error (yymsg, yystate, yychar); + yyerror (yymsg); + } + else + { + yyerror (YY_("syntax error")); + if (yysize != 0) + goto yyexhaustedlab; + } } #endif } @@ -2345,20 +2345,20 @@ yyparse () if (yyerrstatus == 3) { /* If just tried and failed to reuse lookahead token after an - error, discard it. */ + error, discard it. */ if (yychar <= YYEOF) - { - /* Return failure if at end of input. */ - if (yychar == YYEOF) - YYABORT; - } + { + /* Return failure if at end of input. */ + if (yychar == YYEOF) + YYABORT; + } else - { - yydestruct ("Error: discarding", - yytoken, &yylval); - yychar = YYEMPTY; - } + { + yydestruct ("Error: discarding", + yytoken, &yylval); + yychar = YYEMPTY; + } } /* Else will try to reuse lookahead token after shifting the error @@ -2390,29 +2390,29 @@ yyparse () | yyerrlab1 -- common code for both syntax error and YYERROR. | `-------------------------------------------------------------*/ yyerrlab1: - yyerrstatus = 3; /* Each real token shifted decrements this. */ + yyerrstatus = 3; /* Each real token shifted decrements this. */ for (;;) { yyn = yypact[yystate]; if (yyn != YYPACT_NINF) - { - yyn += YYTERROR; - if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) - { - yyn = yytable[yyn]; - if (0 < yyn) - break; - } - } + { + yyn += YYTERROR; + if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) + { + yyn = yytable[yyn]; + if (0 < yyn) + break; + } + } /* Pop the current state because it cannot handle the error token. */ if (yyssp == yyss) - YYABORT; + YYABORT; yydestruct ("Error: popping", - yystos[yystate], yyvsp); + yystos[yystate], yyvsp); YYPOPSTACK (1); yystate = *yyssp; YY_STACK_PRINT (yyss, yyssp); @@ -2455,7 +2455,7 @@ yyparse () yyreturn: if (yychar != YYEMPTY) yydestruct ("Cleanup: discarding lookahead", - yytoken, &yylval); + yytoken, &yylval); /* Do not reclaim the symbols of the rule which action triggered this YYABORT or YYACCEPT. */ YYPOPSTACK (yylen); @@ -2463,7 +2463,7 @@ yyparse () while (yyssp != yyss) { yydestruct ("Cleanup: popping", - yystos[*yyssp], yyvsp); + yystos[*yyssp], yyvsp); YYPOPSTACK (1); } #ifndef yyoverflow diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library.h index 595e7973a..cafd9c99a 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_arch.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_arch.c index 6ced34b6a..42ae939f5 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_arch.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_arch.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_arch_build.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_arch_build.c index 518942357..ef2627e40 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_arch_build.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_arch_build.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_arch_build_f.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_arch_build_f.c index 265ad3a96..d350eb602 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_arch_build_f.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_arch_build_f.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_arch_f.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_arch_f.c index 61ddb224a..a7a7bfee7 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_arch_f.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_arch_f.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph.c index 5cb4c88c1..e48811c79 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_build.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_build.c index ca857b1bc..9490a1de8 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_build.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_build.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ @@ -108,7 +108,7 @@ Gnum * const edloloctab) /* Local edge load array (if a } srcgrafptr = (Dgraph *) grafptr; /* Use structure as source graph */ - + vertloctax = (Gnum *) vertloctab - baseval; vendloctax = ((vendloctab == NULL) || (vendloctab == vertloctab + 1)) ? vertloctax + 1 : (Gnum *) vendloctab - baseval; veloloctax = ((veloloctab == NULL) || (veloloctab == vertloctab)) ? NULL : (Gnum *) veloloctab - baseval; diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_build_f.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_build_f.c index 5d3c33198..26f820c13 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_build_f.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_build_f.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_build_grid3d.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_build_grid3d.c index 58dae9e9a..54883610d 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_build_grid3d.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_build_grid3d.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_build_grid3d_f.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_build_grid3d_f.c index 73e7c57e7..8c84a56cd 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_build_grid3d_f.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_build_grid3d_f.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_check.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_check.c index ecf52c1eb..6ef699ccb 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_check.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_check.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_check_f.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_check_f.c index 4b0e6b280..49b3b3253 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_check_f.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_check_f.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_coarsen.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_coarsen.c index eff01c264..e42cf017d 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_coarsen.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_coarsen.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_coarsen_f.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_coarsen_f.c index a5ea7831f..3760e506e 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_coarsen_f.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_coarsen_f.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_f.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_f.c index b86789aa9..e20503197 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_f.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_f.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_gather.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_gather.c index d10d94a70..016eeb654 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_gather.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_gather.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_gather_f.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_gather_f.c index d2599fc53..d583583fc 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_gather_f.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_gather_f.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_halo.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_halo.c index 364eae0a4..abf65278e 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_halo.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_halo.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_halo_f.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_halo_f.c index b58ab4949..95a5dcc8f 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_halo_f.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_halo_f.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_io_load.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_io_load.c index fc20dcaf5..024e51754 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_io_load.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_io_load.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_io_load_f.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_io_load_f.c index c4817acbd..fe82931e1 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_io_load_f.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_io_load_f.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_io_save.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_io_save.c index 5d69af62e..4b83612d0 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_io_save.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_io_save.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_io_save_f.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_io_save_f.c index 479bf710e..6ddeed0bc 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_io_save_f.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_io_save_f.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_map.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_map.c index 5eb198a10..9cd908094 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_map.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_map.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_map_f.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_map_f.c index 05bdf2681..56bdf411f 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_map_f.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_map_f.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_map_view.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_map_view.c index b860a5e55..7488076b2 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_map_view.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_map_view.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_map_view_f.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_map_view_f.c index 66af5ecd5..cd7bf6d15 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_map_view_f.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_map_view_f.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_order.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_order.c index 3d3b0f7df..3c957d4f7 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_order.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_order.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_order_f.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_order_f.c index f51cb0b66..ad8f1c5fd 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_order_f.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_order_f.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_order_gather.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_order_gather.c index d50d0e267..2b82234cb 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_order_gather.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_order_gather.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_order_gather_f.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_order_gather_f.c index 2f84af403..5b06319c2 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_order_gather_f.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_order_gather_f.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_order_io.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_order_io.c index 938d9f325..3607eb57a 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_order_io.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_order_io.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_order_io_block.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_order_io_block.c index 9e3bd1868..2c3c792a8 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_order_io_block.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_order_io_block.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_order_io_block_f.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_order_io_block_f.c index 6e34a9778..d937a67fd 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_order_io_block_f.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_order_io_block_f.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_order_io_f.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_order_io_f.c index 7365f701b..618ddce12 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_order_io_f.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_order_io_f.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_order_perm.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_order_perm.c index a42dcef15..ab3b724eb 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_order_perm.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_order_perm.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_order_perm_f.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_order_perm_f.c index 32aee6f69..217f627e8 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_order_perm_f.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_order_perm_f.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_order_tree_dist.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_order_tree_dist.c index bbd6e6f84..5a3c7bd34 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_order_tree_dist.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_order_tree_dist.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_order_tree_dist_f.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_order_tree_dist_f.c index 30c140bfc..1817da6cc 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_order_tree_dist_f.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_order_tree_dist_f.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_scatter.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_scatter.c index fc4cf4e16..bbd37157c 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_scatter.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_scatter.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_scatter_f.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_scatter_f.c index 4c27e52dc..9f9982fbc 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_scatter_f.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_scatter_f.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_stat.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_stat.c index ad77aca59..2730a5352 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_stat.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_stat.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_stat.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_stat.h index 9a9cec464..3590e5cf0 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_stat.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_stat.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_stat_f.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_stat_f.c index 64e937e23..9d0bd39b6 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_stat_f.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dgraph_stat_f.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dmapping.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dmapping.c index 5e43811ca..2b3e8c406 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dmapping.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dmapping.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dmapping.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dmapping.h index 623819d83..f0e25a228 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dmapping.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dmapping.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dorder.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dorder.c index 767932b97..4b8a74364 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dorder.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_dorder.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_error.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_error.c index 16930e7a1..e6592f96e 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_error.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_error.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_error_exit.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_error_exit.c index 245af98c6..e62e68906 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_error_exit.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_error_exit.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_geom.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_geom.c index b71bc87e2..cad081da9 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_geom.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_geom.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_geom_f.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_geom_f.c index c61249ad8..181c3daad 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_geom_f.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_geom_f.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_graph.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_graph.c index 0533b4f09..b75c8dcdc 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_graph.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_graph.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_graph_base.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_graph_base.c index ef8033777..ad3f830ff 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_graph_base.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_graph_base.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_graph_base_f.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_graph_base_f.c index 23aaf7553..860c682d6 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_graph_base_f.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_graph_base_f.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_graph_check.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_graph_check.c index 49a5a87c6..6ce69ad3f 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_graph_check.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_graph_check.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_graph_check_f.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_graph_check_f.c index 91f73dbc7..4a8a61550 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_graph_check_f.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_graph_check_f.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_graph_coarsen.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_graph_coarsen.c index 120263230..ecd8c780e 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_graph_coarsen.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_graph_coarsen.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_graph_coarsen_f.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_graph_coarsen_f.c index 57f943360..6aa9cd376 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_graph_coarsen_f.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_graph_coarsen_f.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_graph_f.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_graph_f.c index 76d49cab8..bee35964e 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_graph_f.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_graph_f.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_graph_io_chac.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_graph_io_chac.c index 9396dbdb9..71a7d32b5 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_graph_io_chac.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_graph_io_chac.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_graph_io_chac_f.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_graph_io_chac_f.c index c03a37d54..e6a928228 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_graph_io_chac_f.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_graph_io_chac_f.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_graph_io_habo.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_graph_io_habo.c index 1e4057d3f..e42d485b8 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_graph_io_habo.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_graph_io_habo.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_graph_io_habo_f.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_graph_io_habo_f.c index f5935224f..3cf82f985 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_graph_io_habo_f.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_graph_io_habo_f.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_graph_io_mmkt.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_graph_io_mmkt.c index d07379be4..c59f06025 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_graph_io_mmkt.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_graph_io_mmkt.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_graph_io_mmkt_f.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_graph_io_mmkt_f.c index 82870c4ee..7ebb15605 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_graph_io_mmkt_f.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_graph_io_mmkt_f.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_graph_io_scot.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_graph_io_scot.c index 55db2fac2..47708b6ff 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_graph_io_scot.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_graph_io_scot.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_graph_io_scot_f.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_graph_io_scot_f.c index 2b1b4db45..16740c152 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_graph_io_scot_f.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_graph_io_scot_f.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_graph_map.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_graph_map.c index 781fe723d..ab983b8ea 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_graph_map.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_graph_map.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_graph_map_f.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_graph_map_f.c index 348809326..86e717b18 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_graph_map_f.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_graph_map_f.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_graph_map_view.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_graph_map_view.c index bf4c2ad08..1b95d99ca 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_graph_map_view.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_graph_map_view.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ @@ -355,7 +355,7 @@ FILE * const stream) } /*+ This routine computes the pseudo-diameter of -*** the given part. +*** the given part. *** It returns: *** - 0 : on success. *** - !0 : on error. diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_graph_map_view.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_graph_map_view.h index 07ac65690..5c13d0568 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_graph_map_view.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_graph_map_view.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_graph_map_view_f.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_graph_map_view_f.c index e8abdeaca..d837abc3b 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_graph_map_view_f.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_graph_map_view_f.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_graph_order.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_graph_order.c index 1aec7693c..436679f4d 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_graph_order.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_graph_order.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ @@ -339,7 +339,7 @@ SCOTCH_Strat * const stratptr) /*+ Ordering strategy peritax[halonum --] = vertnum; } #ifdef SCOTCH_DEBUG_LIBRARY2 - if (halonum != (listnbr + srcgrafptr->baseval - 1)) { + if (halonum != (listnbr + srcgrafptr->baseval - 1)) { errorPrint ("SCOTCH_graphOrderComputeList: internal error"); return (1); } diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_graph_order_f.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_graph_order_f.c index fe2faacc0..b91dc4a87 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_graph_order_f.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_graph_order_f.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_mapping.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_mapping.c index a464566ac..ea4ef3334 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_mapping.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_mapping.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_mapping.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_mapping.h index 7822bc3ee..c6644426c 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_mapping.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_mapping.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_mesh.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_mesh.c index 8df3c56d6..d0e66040a 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_mesh.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_mesh.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_mesh_f.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_mesh_f.c index 036e8bb0d..b35052275 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_mesh_f.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_mesh_f.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_mesh_graph.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_mesh_graph.c index b06dc8e2f..418250421 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_mesh_graph.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_mesh_graph.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_mesh_graph_f.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_mesh_graph_f.c index c32f61677..91d421b16 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_mesh_graph_f.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_mesh_graph_f.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_mesh_io_habo.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_mesh_io_habo.c index 6fddc6e3e..b40f88210 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_mesh_io_habo.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_mesh_io_habo.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_mesh_io_habo_f.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_mesh_io_habo_f.c index 22903c4c7..dd3c35928 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_mesh_io_habo_f.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_mesh_io_habo_f.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_mesh_io_scot.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_mesh_io_scot.c index 22ca601de..a5ce17a74 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_mesh_io_scot.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_mesh_io_scot.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_mesh_io_scot_f.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_mesh_io_scot_f.c index bd87a8e9d..03a04cc62 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_mesh_io_scot_f.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_mesh_io_scot_f.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_mesh_order.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_mesh_order.c index b3f75b40b..3e608d42a 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_mesh_order.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_mesh_order.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_mesh_order_f.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_mesh_order_f.c index b61391336..ece665605 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_mesh_order_f.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_mesh_order_f.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_order.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_order.c index bcb94baa9..589e9828d 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_order.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_order.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_order.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_order.h index 3e2a813a1..83cf2a537 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_order.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_order.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_parser.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_parser.c index 93fc130af..11792091e 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_parser.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_parser.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_parser_f.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_parser_f.c index 34a68b5ef..5a1122986 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_parser_f.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_parser_f.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_random.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_random.c index fba6e245f..8a7a5a43a 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_random.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_random.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_random_f.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_random_f.c index f71417120..f19767379 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_random_f.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_random_f.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_strat.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_strat.c index a470adbf9..44763f25d 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_strat.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_strat.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_version.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_version.c index 9147f9a7e..cdb4dfbd6 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_version.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_version.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_version_f.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_version_f.c index a16d0d7ec..667fa680e 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_version_f.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/library_version_f.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/libraryf.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/libraryf.h index 5e620ee1d..8465f2ccc 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/libraryf.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/libraryf.h @@ -8,13 +8,13 @@ !* use, modify and/or redistribute the software under the terms of the !* CeCILL-C license as circulated by CEA, CNRS and INRIA at the following !* URL: "http://www.cecill.info". -!* +!* !* As a counterpart to the access to the source code and rights to copy, !* modify and redistribute granted by the license, users are provided !* only with a limited warranty and the software's author, the holder of !* the economic rights, and the successive licensors have only limited !* liability. -!* +!* !* In this respect, the user's attention is drawn to the risks associated !* with loading, using, modifying and/or developing or reproducing the !* software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ !* their requirements in conditions enabling the security of their !* systems and/or data to be ensured and, more generally, to use and !* operate it in the same conditions as regards security. -!* +!* !* The fact that you are presently reading this means that you have had !* knowledge of the CeCILL-C license and that you accept its terms. !* diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/mapping.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/mapping.c index ec44d7fca..ff6a5096a 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/mapping.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/mapping.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/mapping.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/mapping.h index 708bf61a3..9f65c8a73 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/mapping.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/mapping.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/mapping_io.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/mapping_io.c index 941ca153b..71a0f0786 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/mapping_io.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/mapping_io.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/mapping_io.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/mapping_io.h index e5412a722..a2e1729c5 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/mapping_io.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/mapping_io.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/mesh.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/mesh.c index 829ece449..51c848f19 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/mesh.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/mesh.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/mesh.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/mesh.h index fceb882cc..b86b2ca94 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/mesh.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/mesh.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/mesh_check.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/mesh_check.c index 95b13e2c3..9642f6f11 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/mesh_check.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/mesh_check.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/mesh_coarsen.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/mesh_coarsen.c index 1b84eaac6..0c0fbf508 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/mesh_coarsen.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/mesh_coarsen.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/mesh_coarsen.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/mesh_coarsen.h index 3226dd445..503cdbed6 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/mesh_coarsen.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/mesh_coarsen.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/mesh_graph.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/mesh_graph.c index a1be7bf9a..d0deedd2a 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/mesh_graph.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/mesh_graph.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/mesh_graph.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/mesh_graph.h index 3043c7a47..d98527b8f 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/mesh_graph.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/mesh_graph.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/mesh_induce_sepa.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/mesh_induce_sepa.c index 7d6e7a2f5..d124031e4 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/mesh_induce_sepa.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/mesh_induce_sepa.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ @@ -267,7 +267,7 @@ Mesh * restrict const indmeshptr) /* Pointer to induced submesh indedgetax[indedgenum ++] = orgindxtax[orgvnodend]; /* Add node to element edge sub-array */ - for (hashnum = (orgindxtax[orgvnodend] * MESHINDUCESEPAHASHPRIME) & hashmsk; + for (hashnum = (orgindxtax[orgvnodend] * MESHINDUCESEPAHASHPRIME) & hashmsk; hashtab[hashnum].orgvelmnum == orgvelmnum; hashnum = (hashnum + 1) & hashmsk) ; hashtab[hashnum].orgvelmnum = orgvelmnum; /* Add vertex to hash table */ hashtab[hashnum].indvnodnum = orgindxtax[orgvnodend]; diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/mesh_induce_sepa.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/mesh_induce_sepa.h index f98edaecb..1b4103dee 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/mesh_induce_sepa.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/mesh_induce_sepa.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/mesh_io.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/mesh_io.c index 132bdb909..f2639e0ac 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/mesh_io.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/mesh_io.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/mesh_io.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/mesh_io.h index 2475024eb..cd9659ca8 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/mesh_io.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/mesh_io.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/mesh_io_habo.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/mesh_io_habo.c index c2455afa0..413410bcf 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/mesh_io_habo.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/mesh_io_habo.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/mesh_io_scot.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/mesh_io_scot.c index 8e2852887..acf423a16 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/mesh_io_scot.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/mesh_io_scot.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/module.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/module.h index eebbd96ee..fbc06acae 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/module.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/module.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ @@ -143,7 +143,7 @@ #define fileCompressType _SCOTCHfileCompressType #define fileUncompress _SCOTCHfileUncompress #define fileUncompressType _SCOTCHfileUncompressType -#define fileNameDistExpand _SCOTCHfileNameDistExpand +#define fileNameDistExpand _SCOTCHfileNameDistExpand #define intLoad _SCOTCHintLoad #define intSave _SCOTCHintSave diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/order.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/order.c index a37016a6e..bfcabd23e 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/order.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/order.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ @@ -263,7 +263,7 @@ Gnum cbfanum) /* Current number of ancestor cbfanum = cblanum; /* Separator becomes most recent ancestor of parts */ cblknum = 1; /* Only scan the two parts, not the separator */ } - + for ( ; cblknum >= 0; cblknum --) { orderTree2 (treetax, cblaptr, &cblkptr->cblktab[cblknum], cbfanum); #ifdef SCOTCH_DEBUG_ORDER2 diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/order.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/order.h index 167ffc90f..8ef4c1bf6 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/order.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/order.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/order_check.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/order_check.c index 045c995f1..41398aabf 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/order_check.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/order_check.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ @@ -143,7 +143,7 @@ const Order * restrict const ordeptr) errorPrint ("orderCheck: invalid index"); memFree (permtab); return (1); - } + } if (permtax[ordeptr->peritab[vertnum]] != ~0) { /* If index already used */ errorPrint ("orderCheck: duplicate index"); memFree (permtab); diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/order_io.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/order_io.c index e10bc533d..67032c169 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/order_io.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/order_io.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/parser.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/parser.c index 2e8abb7a5..db4ee4e71 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/parser.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/parser.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/parser.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/parser.h index 7572b140b..e1ebf2e82 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/parser.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/parser.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/parser_ll.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/parser_ll.h index 4b14324fd..2b6288376 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/parser_ll.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/parser_ll.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/parser_yy.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/parser_yy.h index d574187cb..000fdd945 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/parser_yy.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/parser_yy.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vdgraph.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vdgraph.c index a175cd417..601ab504f 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vdgraph.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vdgraph.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vdgraph.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vdgraph.h index 78f25fd9e..6542b16ec 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vdgraph.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vdgraph.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vdgraph_check.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vdgraph_check.c index dacf52978..e4c682a49 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vdgraph_check.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vdgraph_check.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vdgraph_gather_all.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vdgraph_gather_all.c index 3be32cacf..e5dca9530 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vdgraph_gather_all.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vdgraph_gather_all.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vdgraph_separate_bd.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vdgraph_separate_bd.c index e5a4fb2ef..3efab74ce 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vdgraph_separate_bd.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vdgraph_separate_bd.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vdgraph_separate_bd.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vdgraph_separate_bd.h index 5ed218f1a..6fe7a02cf 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vdgraph_separate_bd.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vdgraph_separate_bd.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vdgraph_separate_df.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vdgraph_separate_df.c index 6c97f0002..ddc0d3f9a 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vdgraph_separate_df.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vdgraph_separate_df.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ @@ -113,7 +113,7 @@ const VdgraphSeparateDfParam * const paraptr) /*+ Method parameters +*/ reduloctab[0] = grafptr->s.vendloctax[grafptr->s.vertlocnnd - 2] - grafptr->s.vertloctax[grafptr->s.vertlocnnd - 2] - (grafptr->s.procglbnbr - 1); reduloctab[1] = grafptr->s.vendloctax[grafptr->s.vertlocnnd - 1] - grafptr->s.vertloctax[grafptr->s.vertlocnnd - 1] - (grafptr->s.procglbnbr - 1); if (grafptr->s.veloloctax == NULL) - reduloctab[2] = + reduloctab[2] = reduloctab[3] = 1; else { reduloctab[2] = grafptr->s.veloloctax[grafptr->s.vertlocnnd - 2]; diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vdgraph_separate_df.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vdgraph_separate_df.h index 4c430ae03..8c9ed0664 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vdgraph_separate_df.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vdgraph_separate_df.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vdgraph_separate_ml.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vdgraph_separate_ml.c index db4fdc563..c63822cc7 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vdgraph_separate_ml.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vdgraph_separate_ml.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ @@ -164,7 +164,7 @@ const MPI_Datatype * const typedat) /* MPI datatype ; not used if ((in[3] < inout[3]) || /* Select best partition */ ((in[3] == inout[3]) && ((in[4] < inout[4]) || - ((in[4] == inout[4]) && (in[1] < inout[1]))))) { + ((in[4] == inout[4]) && (in[1] < inout[1]))))) { inout[1] = in[1]; inout[2] = in[2]; inout[3] = in[3]; @@ -447,7 +447,7 @@ const DgraphCoarsenMulti * restrict const coarmulttax) /*+ Multinode array +*/ finegrafptr->complocsize[0] = finegrafptr->complocsize[1] = finegrafptr->complocsize[2] = 0; - + #ifdef SCOTCH_DEBUG_VDGRAPH2 memSet (finegrafptr->partgsttax + finegrafptr->s.baseval, 3, finegrafptr->s.vertgstnbr * sizeof (GraphPart)); /* Mark all vertices as unvisited */ #endif /* SCOTCH_DEBUG_VDGRAPH2 */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vdgraph_separate_ml.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vdgraph_separate_ml.h index 6da245d37..f524ee6d9 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vdgraph_separate_ml.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vdgraph_separate_ml.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vdgraph_separate_sq.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vdgraph_separate_sq.c index 79476ada2..c99fb6818 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vdgraph_separate_sq.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vdgraph_separate_sq.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ @@ -226,8 +226,8 @@ const VdgraphSeparateSqParam * const paraptr) /*+ Method parameters +*/ return (1); } - complocsize1 = - complocload1 = + complocsize1 = + complocload1 = complocload2 = 0; for (vertlocnum = dgrfptr->s.baseval, fronlocnbr = 0; vertlocnum < dgrfptr->s.vertlocnnd; vertlocnum ++) { diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vdgraph_separate_sq.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vdgraph_separate_sq.h index e62f7251b..ef9652689 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vdgraph_separate_sq.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vdgraph_separate_sq.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vdgraph_separate_st.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vdgraph_separate_st.c index d398e7c0d..f454d9fb7 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vdgraph_separate_st.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vdgraph_separate_st.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ @@ -322,7 +322,7 @@ const Strat * restrict const strat) /*+ Separation strategy #endif /* SCOTCH_DEBUG_VDGRAPH1 */ #ifdef SCOTCH_DEBUG_VDGRAPH2 proccommold = grafptr->s.proccomm; /* Create new communicator to isolate method communications */ - MPI_Comm_dup (proccommold, &grafptr->s.proccomm); + MPI_Comm_dup (proccommold, &grafptr->s.proccomm); #endif /* SCOTCH_DEBUG_VDGRAPH2 */ o = strat->tabl->methtab[strat->data.method.meth].func (grafptr, (void *) &strat->data.method.data); #ifdef SCOTCH_DEBUG_VDGRAPH2 diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vdgraph_separate_st.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vdgraph_separate_st.h index 5981a82ed..9a569578a 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vdgraph_separate_st.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vdgraph_separate_st.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vdgraph_separate_zr.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vdgraph_separate_zr.c index 8d3fac00d..d2376de05 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vdgraph_separate_zr.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vdgraph_separate_zr.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vdgraph_separate_zr.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vdgraph_separate_zr.h index 304bf4676..7edb7c6d8 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vdgraph_separate_zr.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vdgraph_separate_zr.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vdgraph_store.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vdgraph_store.c index 473518e11..b046731d2 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vdgraph_store.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vdgraph_store.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vgraph.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vgraph.c index 121ae2026..a9f98f1ab 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vgraph.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vgraph.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vgraph.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vgraph.h index 88b858712..4da685ee9 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vgraph.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vgraph.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vgraph_check.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vgraph_check.c index b97c69bc7..ed7442281 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vgraph_check.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vgraph_check.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vgraph_separate_bd.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vgraph_separate_bd.c index 69d31ada6..20f320a3b 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vgraph_separate_bd.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vgraph_separate_bd.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vgraph_separate_bd.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vgraph_separate_bd.h index e2028b2b0..d1beda0ef 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vgraph_separate_bd.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vgraph_separate_bd.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vgraph_separate_es.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vgraph_separate_es.c index 03564ecf0..d5b64d3c6 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vgraph_separate_es.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vgraph_separate_es.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ @@ -611,7 +611,7 @@ const VgraphSeparateEsParam * const paraptr) /*+ Method parameters +*/ actpartend = grafptr->parttax[actvertend]; if (actpartend != actpartval) { Gnum bipedgenum; - + #ifdef SCOTCH_DEBUG_VGRAPH2 if (actvnumtax[actvertend] == ~0) { errorPrint ("vgraphSeparateEs: internal error (1)"); diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vgraph_separate_es.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vgraph_separate_es.h index deb545317..dd8da34de 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vgraph_separate_es.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vgraph_separate_es.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vgraph_separate_fm.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vgraph_separate_fm.c index 3f4e48a0e..aa6a80674 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vgraph_separate_fm.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vgraph_separate_fm.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ @@ -218,7 +218,7 @@ const VgraphSeparateFmParam * const paraptr) /*+ Method parameters +*/ memSet (hashtab, ~0, hashsiz * sizeof (VgraphSeparateFmVertex)); /* Set all vertex numbers to ~0 */ for (fronnum = 0, hashnbr = grafptr->fronnbr; /* Set initial gains */ - fronnum < hashnbr; fronnum ++) { + fronnum < hashnbr; fronnum ++) { Gnum vertnum; Gnum hashnum; diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vgraph_separate_fm.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vgraph_separate_fm.h index 30c7addef..d7cf6923d 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vgraph_separate_fm.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vgraph_separate_fm.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vgraph_separate_gg.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vgraph_separate_gg.c index c746c7fcf..136636de6 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vgraph_separate_gg.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vgraph_separate_gg.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ @@ -176,7 +176,7 @@ const VgraphSeparateGgParam * const paraptr) /*+ Method parameters +*/ gainTablDel (tablptr, (GainLink *) vexxptr); /* Remove vertex from table */ vexxptr->gainlink.next = VGRAPHSEPAGGSTATEPART1; /* Put vertex in part 1 */ compload2 += vexxptr->compgain2; /* Update partition parameters */ - comploaddlt -= vexxptr->compgain2 + 2 * veloval; + comploaddlt -= vexxptr->compgain2 + 2 * veloval; sepaptr = NULL; /* No separator vertices to relink yet */ for (edgenum = grafptr->s.verttax[vertnum]; /* (Re-)link neighbor vertices */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vgraph_separate_gg.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vgraph_separate_gg.h index 622d02abf..8cb01b296 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vgraph_separate_gg.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vgraph_separate_gg.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vgraph_separate_gp.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vgraph_separate_gp.c index 6b802e490..089589697 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vgraph_separate_gp.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vgraph_separate_gp.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vgraph_separate_gp.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vgraph_separate_gp.h index 83883a567..c7394b206 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vgraph_separate_gp.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vgraph_separate_gp.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vgraph_separate_ml.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vgraph_separate_ml.c index 2cc73aa16..482162ffd 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vgraph_separate_ml.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vgraph_separate_ml.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vgraph_separate_ml.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vgraph_separate_ml.h index a2677390a..2c8529049 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vgraph_separate_ml.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vgraph_separate_ml.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vgraph_separate_st.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vgraph_separate_st.c index 4c54420c9..20dd3c144 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vgraph_separate_st.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vgraph_separate_st.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vgraph_separate_st.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vgraph_separate_st.h index 60c5c815c..3eee3dac3 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vgraph_separate_st.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vgraph_separate_st.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vgraph_separate_th.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vgraph_separate_th.c index c3f53d4e5..ae14a41a0 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vgraph_separate_th.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vgraph_separate_th.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vgraph_separate_th.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vgraph_separate_th.h index 19740b1d3..1edc836e3 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vgraph_separate_th.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vgraph_separate_th.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vgraph_separate_vw.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vgraph_separate_vw.c index 51a9a2cfe..5285ce683 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vgraph_separate_vw.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vgraph_separate_vw.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vgraph_separate_vw.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vgraph_separate_vw.h index 6685c72d4..07276bbfd 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vgraph_separate_vw.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vgraph_separate_vw.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vgraph_separate_zr.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vgraph_separate_zr.c index 7d365d81d..66d174f8d 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vgraph_separate_zr.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vgraph_separate_zr.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vgraph_separate_zr.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vgraph_separate_zr.h index 099f9f51d..47bf7bdf1 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vgraph_separate_zr.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vgraph_separate_zr.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vgraph_store.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vgraph_store.c index f9ea2fed5..6d3fc5257 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vgraph_store.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vgraph_store.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vmesh.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vmesh.c index a12a99f9a..932a263c3 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vmesh.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vmesh.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vmesh.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vmesh.h index 4d1e8d526..e479dc39c 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vmesh.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vmesh.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vmesh_check.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vmesh_check.c index befedd837..5049e6eac 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vmesh_check.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vmesh_check.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vmesh_separate_fm.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vmesh_separate_fm.c index 6008f93d4..1ec1f99da 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vmesh_separate_fm.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vmesh_separate_fm.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ @@ -931,7 +931,7 @@ const VmeshSeparateFmParam * restrict const paraptr) /*+ Method parameters +* while (savenbr > 0) { /* Delete exceeding moves */ Gnum hertnum; - + hertnum = movetab[-- savenbr].hertnum; /* Get vertex hash number */ if (hertnum >= 0) { /* If vertex is element */ helmtab[hertnum].vertpart = movetab[savenbr].data.elem.vertpart; diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vmesh_separate_fm.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vmesh_separate_fm.h index e2598330e..5eb7d5ab0 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vmesh_separate_fm.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vmesh_separate_fm.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vmesh_separate_gg.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vmesh_separate_gg.c index 6f7ae38c0..bad56c565 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vmesh_separate_gg.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vmesh_separate_gg.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ @@ -212,7 +212,7 @@ const VmeshSeparateGgParam * restrict const paraptr) /*+ Method parameters +* gainTablDel (tablptr, (GainLink *) velxptr); /* Remove element from table */ velxptr->gainlink.next = VMESHSEPAGGSTATEPART1; /* Move element to part 1 */ ncmpload2 += velxptr->ncmpgain2; /* Update partition parameters */ - ncmploaddlt += velxptr->ncmpgaindlt; + ncmploaddlt += velxptr->ncmpgaindlt; sepaptr = NULL; /* No frontier elements to relink yet */ for (eelmnum = meshptr->m.verttax[velmnum]; /* For all neighbor node vertices */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vmesh_separate_gg.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vmesh_separate_gg.h index 9fb3cbf30..f94919ebc 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vmesh_separate_gg.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vmesh_separate_gg.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vmesh_separate_gr.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vmesh_separate_gr.c index 4b7ef6c4e..96062ed2c 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vmesh_separate_gr.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vmesh_separate_gr.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vmesh_separate_gr.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vmesh_separate_gr.h index 0b45e1388..cc00d0b56 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vmesh_separate_gr.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vmesh_separate_gr.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vmesh_separate_ml.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vmesh_separate_ml.c index 8f274ff0d..a1a629698 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vmesh_separate_ml.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vmesh_separate_ml.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vmesh_separate_ml.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vmesh_separate_ml.h index 1c635ab95..24b089bee 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vmesh_separate_ml.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vmesh_separate_ml.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vmesh_separate_st.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vmesh_separate_st.c index 365e4e9ee..9c2314a05 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vmesh_separate_st.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vmesh_separate_st.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vmesh_separate_st.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vmesh_separate_st.h index 27d5dff3c..49421a04d 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vmesh_separate_st.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vmesh_separate_st.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vmesh_separate_zr.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vmesh_separate_zr.c index 359bf4216..06ced02ed 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vmesh_separate_zr.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vmesh_separate_zr.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vmesh_separate_zr.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vmesh_separate_zr.h index ae061a678..b2117cf37 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vmesh_separate_zr.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vmesh_separate_zr.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vmesh_store.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vmesh_store.c index f16f77c67..a91728aed 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vmesh_store.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/vmesh_store.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotchmetis/metis.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotchmetis/metis.h index baae1ebb3..6cb37bd12 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotchmetis/metis.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotchmetis/metis.h @@ -19,13 +19,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -36,7 +36,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotchmetis/metis_graph_order.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotchmetis/metis_graph_order.c index a7d34e8e3..8f7a6c437 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotchmetis/metis_graph_order.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotchmetis/metis_graph_order.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotchmetis/metis_graph_order_f.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotchmetis/metis_graph_order_f.c index a570f02a1..3e30f61d0 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotchmetis/metis_graph_order_f.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotchmetis/metis_graph_order_f.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotchmetis/metis_graph_part.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotchmetis/metis_graph_part.c index dc74f2e01..10f357d6f 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotchmetis/metis_graph_part.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotchmetis/metis_graph_part.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotchmetis/metis_graph_part_f.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotchmetis/metis_graph_part_f.c index 7fac8249a..ab7f7d77b 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotchmetis/metis_graph_part_f.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotchmetis/metis_graph_part_f.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotchmetis/parmetis.h b/src/decompose_mesh/scotch_5.1.12b/src/libscotchmetis/parmetis.h index e34535809..4a43f0d1d 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotchmetis/parmetis.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotchmetis/parmetis.h @@ -19,13 +19,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -36,7 +36,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotchmetis/parmetis_dgraph_order.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotchmetis/parmetis_dgraph_order.c index 01918127f..4624259bb 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotchmetis/parmetis_dgraph_order.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotchmetis/parmetis_dgraph_order.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ @@ -171,7 +171,7 @@ MPI_Comm * comm) SCOTCH_Num cblknum; memSet (sepaglbtab, ~0, cblkglbnbr * sizeof (SCOTCH_Num) * 3); - + for (rootnum = -1, cblknum = 0; cblknum < cblkglbnbr; cblknum ++) { SCOTCH_Num fathnum; diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotchmetis/parmetis_dgraph_order_f.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotchmetis/parmetis_dgraph_order_f.c index 40dba17de..4304ffacb 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotchmetis/parmetis_dgraph_order_f.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotchmetis/parmetis_dgraph_order_f.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotchmetis/parmetis_dgraph_part.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotchmetis/parmetis_dgraph_part.c index 5f51feb1b..ca00386c2 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotchmetis/parmetis_dgraph_part.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotchmetis/parmetis_dgraph_part.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotchmetis/parmetis_dgraph_part_f.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotchmetis/parmetis_dgraph_part_f.c index a31449615..f05340103 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/libscotchmetis/parmetis_dgraph_part_f.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotchmetis/parmetis_dgraph_part_f.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ @@ -73,7 +73,7 @@ int * const xadj, \ int * const adjncy, \ int * const vwgt, \ int * const adjwgt, \ -const int * const wgtflag, \ +const int * const wgtflag, \ const int * const numflag, \ const int * const ncon, \ const int * const nparts, \ @@ -99,7 +99,7 @@ int * const xadj, \ int * const adjncy, \ int * const vwgt, \ int * const adjwgt, \ -const int * const wgtflag, \ +const int * const wgtflag, \ const int * const numflag, \ const int * const ndims, \ const float * const xyz, \ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/scotch/acpl.c b/src/decompose_mesh/scotch_5.1.12b/src/scotch/acpl.c index 24589ce1d..f68945579 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/scotch/acpl.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/scotch/acpl.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/scotch/acpl.h b/src/decompose_mesh/scotch_5.1.12b/src/scotch/acpl.h index 8676183a8..250be358f 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/scotch/acpl.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/scotch/acpl.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/scotch/amk_ccc.c b/src/decompose_mesh/scotch_5.1.12b/src/scotch/amk_ccc.c index 299976c05..bfa51b8f8 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/scotch/amk_ccc.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/scotch/amk_ccc.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/scotch/amk_ccc.h b/src/decompose_mesh/scotch_5.1.12b/src/scotch/amk_ccc.h index 00d66b3e5..fae7f4018 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/scotch/amk_ccc.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/scotch/amk_ccc.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/scotch/amk_fft2.c b/src/decompose_mesh/scotch_5.1.12b/src/scotch/amk_fft2.c index fb5b8cc29..926b4525e 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/scotch/amk_fft2.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/scotch/amk_fft2.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/scotch/amk_fft2.h b/src/decompose_mesh/scotch_5.1.12b/src/scotch/amk_fft2.h index fe8d1173a..f8af39b56 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/scotch/amk_fft2.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/scotch/amk_fft2.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/scotch/amk_grf.c b/src/decompose_mesh/scotch_5.1.12b/src/scotch/amk_grf.c index 5c01c6dfb..12335e261 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/scotch/amk_grf.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/scotch/amk_grf.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/scotch/amk_grf.h b/src/decompose_mesh/scotch_5.1.12b/src/scotch/amk_grf.h index 86840d9bf..922678d8a 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/scotch/amk_grf.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/scotch/amk_grf.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/scotch/amk_hy.c b/src/decompose_mesh/scotch_5.1.12b/src/scotch/amk_hy.c index 4d7a6e29c..8709485ce 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/scotch/amk_hy.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/scotch/amk_hy.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/scotch/amk_hy.h b/src/decompose_mesh/scotch_5.1.12b/src/scotch/amk_hy.h index b5c41bb48..11c79a726 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/scotch/amk_hy.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/scotch/amk_hy.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/scotch/amk_m2.c b/src/decompose_mesh/scotch_5.1.12b/src/scotch/amk_m2.c index 41b9a2a11..cfa59ca0d 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/scotch/amk_m2.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/scotch/amk_m2.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/scotch/amk_m2.h b/src/decompose_mesh/scotch_5.1.12b/src/scotch/amk_m2.h index b148a70ad..d44ca263b 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/scotch/amk_m2.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/scotch/amk_m2.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/scotch/amk_p2.c b/src/decompose_mesh/scotch_5.1.12b/src/scotch/amk_p2.c index eb671025b..3e4f6398c 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/scotch/amk_p2.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/scotch/amk_p2.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/scotch/amk_p2.h b/src/decompose_mesh/scotch_5.1.12b/src/scotch/amk_p2.h index 8be8ecc58..ee5ef20e9 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/scotch/amk_p2.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/scotch/amk_p2.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/scotch/atst.c b/src/decompose_mesh/scotch_5.1.12b/src/scotch/atst.c index b7a0f1cff..c20c7e00b 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/scotch/atst.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/scotch/atst.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/scotch/atst.h b/src/decompose_mesh/scotch_5.1.12b/src/scotch/atst.h index 2644d0604..9c048511d 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/scotch/atst.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/scotch/atst.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/scotch/dggath.c b/src/decompose_mesh/scotch_5.1.12b/src/scotch/dggath.c index 1a8918cee..38358aeee 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/scotch/dggath.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/scotch/dggath.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/scotch/dggath.h b/src/decompose_mesh/scotch_5.1.12b/src/scotch/dggath.h index e0bb56149..b582faf3b 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/scotch/dggath.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/scotch/dggath.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/scotch/dgmap.c b/src/decompose_mesh/scotch_5.1.12b/src/scotch/dgmap.c index 28cdf9cf7..c7c15f8d1 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/scotch/dgmap.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/scotch/dgmap.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/scotch/dgmap.h b/src/decompose_mesh/scotch_5.1.12b/src/scotch/dgmap.h index cce370c9b..72c5d7e1b 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/scotch/dgmap.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/scotch/dgmap.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/scotch/dgord.c b/src/decompose_mesh/scotch_5.1.12b/src/scotch/dgord.c index 480b776d4..bee118a62 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/scotch/dgord.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/scotch/dgord.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/scotch/dgord.h b/src/decompose_mesh/scotch_5.1.12b/src/scotch/dgord.h index 6ef69bda8..4c72ce542 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/scotch/dgord.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/scotch/dgord.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/scotch/dgscat.c b/src/decompose_mesh/scotch_5.1.12b/src/scotch/dgscat.c index 86c062411..40e61145a 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/scotch/dgscat.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/scotch/dgscat.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/scotch/dgscat.h b/src/decompose_mesh/scotch_5.1.12b/src/scotch/dgscat.h index 48e77f485..b3dbf608b 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/scotch/dgscat.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/scotch/dgscat.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/scotch/dgtst.c b/src/decompose_mesh/scotch_5.1.12b/src/scotch/dgtst.c index 22795f53c..20ca62714 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/scotch/dgtst.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/scotch/dgtst.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/scotch/dgtst.h b/src/decompose_mesh/scotch_5.1.12b/src/scotch/dgtst.h index 3f43e2b15..f4fff7449 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/scotch/dgtst.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/scotch/dgtst.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/scotch/gbase.c b/src/decompose_mesh/scotch_5.1.12b/src/scotch/gbase.c index d67c6f372..590f80440 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/scotch/gbase.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/scotch/gbase.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/scotch/gbase.h b/src/decompose_mesh/scotch_5.1.12b/src/scotch/gbase.h index 05b3e569b..e3d76d615 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/scotch/gbase.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/scotch/gbase.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/scotch/gcv.c b/src/decompose_mesh/scotch_5.1.12b/src/scotch/gcv.c index 61bab8d3b..734dd6f29 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/scotch/gcv.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/scotch/gcv.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/scotch/gcv.h b/src/decompose_mesh/scotch_5.1.12b/src/scotch/gcv.h index 73fe2d7c0..d27ac42d1 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/scotch/gcv.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/scotch/gcv.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/scotch/gmap.c b/src/decompose_mesh/scotch_5.1.12b/src/scotch/gmap.c index a64865699..96f30e697 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/scotch/gmap.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/scotch/gmap.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/scotch/gmap.h b/src/decompose_mesh/scotch_5.1.12b/src/scotch/gmap.h index 78e287504..2821c4707 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/scotch/gmap.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/scotch/gmap.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/scotch/gmk_hy.c b/src/decompose_mesh/scotch_5.1.12b/src/scotch/gmk_hy.c index fd1b4c546..4ae0fba80 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/scotch/gmk_hy.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/scotch/gmk_hy.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/scotch/gmk_hy.h b/src/decompose_mesh/scotch_5.1.12b/src/scotch/gmk_hy.h index 4b41b7a18..7ee63f962 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/scotch/gmk_hy.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/scotch/gmk_hy.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/scotch/gmk_m2.c b/src/decompose_mesh/scotch_5.1.12b/src/scotch/gmk_m2.c index 250e43c9d..c47a54f14 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/scotch/gmk_m2.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/scotch/gmk_m2.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/scotch/gmk_m2.h b/src/decompose_mesh/scotch_5.1.12b/src/scotch/gmk_m2.h index 41f150af0..7c4f06278 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/scotch/gmk_m2.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/scotch/gmk_m2.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/scotch/gmk_m3.c b/src/decompose_mesh/scotch_5.1.12b/src/scotch/gmk_m3.c index 441ce01a0..581601390 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/scotch/gmk_m3.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/scotch/gmk_m3.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/scotch/gmk_m3.h b/src/decompose_mesh/scotch_5.1.12b/src/scotch/gmk_m3.h index d93180ded..872a18160 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/scotch/gmk_m3.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/scotch/gmk_m3.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/scotch/gmk_msh.c b/src/decompose_mesh/scotch_5.1.12b/src/scotch/gmk_msh.c index 9738d00bd..2a6702b30 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/scotch/gmk_msh.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/scotch/gmk_msh.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/scotch/gmk_msh.h b/src/decompose_mesh/scotch_5.1.12b/src/scotch/gmk_msh.h index 255674345..cd9fb61b3 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/scotch/gmk_msh.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/scotch/gmk_msh.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/scotch/gmk_ub2.c b/src/decompose_mesh/scotch_5.1.12b/src/scotch/gmk_ub2.c index 56799901a..f096c689b 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/scotch/gmk_ub2.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/scotch/gmk_ub2.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/scotch/gmk_ub2.h b/src/decompose_mesh/scotch_5.1.12b/src/scotch/gmk_ub2.h index fac1412a4..5e437ac63 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/scotch/gmk_ub2.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/scotch/gmk_ub2.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/scotch/gmtst.c b/src/decompose_mesh/scotch_5.1.12b/src/scotch/gmtst.c index d1ae1ce62..96e86fab4 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/scotch/gmtst.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/scotch/gmtst.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/scotch/gmtst.h b/src/decompose_mesh/scotch_5.1.12b/src/scotch/gmtst.h index f805d1ca8..ed67c6b4d 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/scotch/gmtst.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/scotch/gmtst.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/scotch/gord.c b/src/decompose_mesh/scotch_5.1.12b/src/scotch/gord.c index 962710e37..7e82c1693 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/scotch/gord.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/scotch/gord.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/scotch/gord.h b/src/decompose_mesh/scotch_5.1.12b/src/scotch/gord.h index 9e849e0e0..c1622d21d 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/scotch/gord.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/scotch/gord.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/scotch/gotst.c b/src/decompose_mesh/scotch_5.1.12b/src/scotch/gotst.c index 279f457db..0d0f10145 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/scotch/gotst.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/scotch/gotst.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/scotch/gotst.h b/src/decompose_mesh/scotch_5.1.12b/src/scotch/gotst.h index 3538b48b3..43e18f903 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/scotch/gotst.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/scotch/gotst.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/scotch/gout_c.c b/src/decompose_mesh/scotch_5.1.12b/src/scotch/gout_c.c index 65362924d..92622a787 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/scotch/gout_c.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/scotch/gout_c.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/scotch/gout_c.h b/src/decompose_mesh/scotch_5.1.12b/src/scotch/gout_c.h index 5775f5690..cf0373e8a 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/scotch/gout_c.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/scotch/gout_c.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/scotch/gout_o.c b/src/decompose_mesh/scotch_5.1.12b/src/scotch/gout_o.c index a4388e3a5..117d04a5f 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/scotch/gout_o.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/scotch/gout_o.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/scotch/gout_o.h b/src/decompose_mesh/scotch_5.1.12b/src/scotch/gout_o.h index ce1f39395..8857af87c 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/scotch/gout_o.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/scotch/gout_o.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/scotch/gscat.c b/src/decompose_mesh/scotch_5.1.12b/src/scotch/gscat.c index 1c442af85..e2244e3f1 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/scotch/gscat.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/scotch/gscat.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/scotch/gscat.h b/src/decompose_mesh/scotch_5.1.12b/src/scotch/gscat.h index 61c0262f2..e3ce7c0b9 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/scotch/gscat.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/scotch/gscat.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/scotch/gtst.c b/src/decompose_mesh/scotch_5.1.12b/src/scotch/gtst.c index 598c74dc9..807e2ef7a 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/scotch/gtst.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/scotch/gtst.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/scotch/gtst.h b/src/decompose_mesh/scotch_5.1.12b/src/scotch/gtst.h index 873e904a9..512da2dba 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/scotch/gtst.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/scotch/gtst.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/scotch/mcv.c b/src/decompose_mesh/scotch_5.1.12b/src/scotch/mcv.c index fd3b0b468..3ad98d742 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/scotch/mcv.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/scotch/mcv.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/scotch/mcv.h b/src/decompose_mesh/scotch_5.1.12b/src/scotch/mcv.h index d2c133623..785f66ba3 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/scotch/mcv.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/scotch/mcv.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/scotch/mmk_m2.c b/src/decompose_mesh/scotch_5.1.12b/src/scotch/mmk_m2.c index a4cc969f8..aa81c4a63 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/scotch/mmk_m2.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/scotch/mmk_m2.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/scotch/mmk_m2.h b/src/decompose_mesh/scotch_5.1.12b/src/scotch/mmk_m2.h index 747de9caf..b0cbd2dbd 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/scotch/mmk_m2.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/scotch/mmk_m2.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/scotch/mmk_m3.c b/src/decompose_mesh/scotch_5.1.12b/src/scotch/mmk_m3.c index 3db228b25..dc394951c 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/scotch/mmk_m3.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/scotch/mmk_m3.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/scotch/mmk_m3.h b/src/decompose_mesh/scotch_5.1.12b/src/scotch/mmk_m3.h index d4a6ef414..d718b5647 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/scotch/mmk_m3.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/scotch/mmk_m3.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/scotch/mord.c b/src/decompose_mesh/scotch_5.1.12b/src/scotch/mord.c index 9a11289b2..6f6a94ffe 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/scotch/mord.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/scotch/mord.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/scotch/mord.h b/src/decompose_mesh/scotch_5.1.12b/src/scotch/mord.h index 7540ca723..24cd996db 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/scotch/mord.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/scotch/mord.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/scotch/mtst.c b/src/decompose_mesh/scotch_5.1.12b/src/scotch/mtst.c index 3163aa503..ff4e4aec3 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/scotch/mtst.c +++ b/src/decompose_mesh/scotch_5.1.12b/src/scotch/mtst.c @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/decompose_mesh/scotch_5.1.12b/src/scotch/mtst.h b/src/decompose_mesh/scotch_5.1.12b/src/scotch/mtst.h index e0145b48a..f055bd3ae 100644 --- a/src/decompose_mesh/scotch_5.1.12b/src/scotch/mtst.h +++ b/src/decompose_mesh/scotch_5.1.12b/src/scotch/mtst.h @@ -8,13 +8,13 @@ ** use, modify and/or redistribute the software under the terms of the ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following ** URL: "http://www.cecill.info". -** +** ** As a counterpart to the access to the source code and rights to copy, ** modify and redistribute granted by the license, users are provided ** only with a limited warranty and the software's author, the holder of ** the economic rights, and the successive licensors have only limited ** liability. -** +** ** In this respect, the user's attention is drawn to the risks associated ** with loading, using, modifying and/or developing or reproducing the ** software by the user in light of its specific status of free software, @@ -25,7 +25,7 @@ ** their requirements in conditions enabling the security of their ** systems and/or data to be ensured and, more generally, to use and ** operate it in the same conditions as regards security. -** +** ** The fact that you are presently reading this means that you have had ** knowledge of the CeCILL-C license and that you accept its terms. */ diff --git a/src/generate_databases/finalize_databases.f90 b/src/generate_databases/finalize_databases.f90 index 955a9109a..4b53f79e7 100644 --- a/src/generate_databases/finalize_databases.f90 +++ b/src/generate_databases/finalize_databases.f90 @@ -108,7 +108,6 @@ subroutine finalize_databases ! copy number of elements and points in an include file for the solver if (myrank == 0) then - call save_header_file(NSPEC_AB,NGLOB_AB,NPROC, & ATTENUATION,ANISOTROPY,NSTEP,DT,STACEY_INSTEAD_OF_FREE_SURFACE, & SIMULATION_TYPE,max_memory_size,nfaces_surface_glob_ext_mesh) diff --git a/src/generate_databases/generate_databases.f90 b/src/generate_databases/generate_databases.f90 index 1993b8f37..2159687d7 100644 --- a/src/generate_databases/generate_databases.f90 +++ b/src/generate_databases/generate_databases.f90 @@ -203,7 +203,7 @@ subroutine generate_databases ! open main output file, only written to by process 0 if (myrank == 0 .and. IMAIN /= ISTANDARD_OUTPUT) & - open(unit=IMAIN,file=trim(OUTPUT_FILES_PATH)//'/output_mesher.txt',status='unknown') + open(unit=IMAIN,file=trim(OUTPUT_FILES)//'/output_mesher.txt',status='unknown') ! get MPI starting time time_start = wtime() @@ -264,12 +264,14 @@ subroutine gd_read_parameters ! reads and checks user input parameters use generate_databases_par + implicit none -! reads Par_file - call read_parameter_file() + logical :: BROADCAST_AFTER_READ - call read_adios_parameters() +! reads Par_file + BROADCAST_AFTER_READ = .true. + call read_parameter_file(myrank,BROADCAST_AFTER_READ) ! check that the code is running with the requested nb of processes if (sizeprocs /= NPROC) then diff --git a/src/generate_databases/generate_databases_adios_stubs.f90 b/src/generate_databases/generate_databases_adios_stubs.f90 index 56989ec6b..31e58fbfd 100644 --- a/src/generate_databases/generate_databases_adios_stubs.f90 +++ b/src/generate_databases/generate_databases_adios_stubs.f90 @@ -41,7 +41,6 @@ subroutine model_gll_adios(myrank,nspec,LOCAL_PATH) use constants, only: MAX_STRING_LEN - use unused_mod use adios_manager_mod implicit none @@ -49,6 +48,8 @@ subroutine model_gll_adios(myrank,nspec,LOCAL_PATH) integer, intent(in) :: myrank,nspec character(len=MAX_STRING_LEN) :: LOCAL_PATH + integer(kind=4) :: unused_i4 + unused_i4 = myrank unused_i4 = nspec unused_i4 = len_trim(LOCAL_PATH) @@ -65,7 +66,6 @@ module model_ipati_adios_mod subroutine model_ipati_adios(myrank,nspec,LOCAL_PATH) use constants, only: MAX_STRING_LEN - use unused_mod use adios_manager_mod implicit none @@ -73,6 +73,8 @@ subroutine model_ipati_adios(myrank,nspec,LOCAL_PATH) integer, intent(in) :: myrank,nspec character(len=MAX_STRING_LEN), intent(in) :: LOCAL_PATH + integer(kind=4) :: unused_i4 + unused_i4 = myrank unused_i4 = nspec unused_i4 = len_trim(LOCAL_PATH) @@ -82,7 +84,6 @@ end subroutine model_ipati_adios subroutine model_ipati_water_adios(myrank,nspec,LOCAL_PATH) use constants, only: MAX_STRING_LEN - use unused_mod use adios_manager_mod implicit none @@ -90,6 +91,8 @@ subroutine model_ipati_water_adios(myrank,nspec,LOCAL_PATH) integer, intent(in) :: myrank,nspec character(len=MAX_STRING_LEN), intent(in) :: LOCAL_PATH + integer(kind=4) :: unused_i4 + unused_i4 = myrank unused_i4 = nspec unused_i4 = len_trim(LOCAL_PATH) @@ -100,7 +103,6 @@ end subroutine model_ipati_water_adios subroutine read_model_vp_rho_adios(myrank, nspec, LOCAL_PATH, & rho_read, vp_read) use constants, only: MAX_STRING_LEN - use unused_mod use adios_manager_mod implicit none @@ -109,6 +111,9 @@ subroutine read_model_vp_rho_adios(myrank, nspec, LOCAL_PATH, & character(len=MAX_STRING_LEN), intent(in) :: LOCAL_PATH real, dimension(:,:,:,:), intent(inout) :: vp_read,rho_read + integer(kind=4) :: unused_i4 + real :: unused_r + unused_i4 = myrank unused_i4 = nspec unused_i4 = len_trim(LOCAL_PATH) @@ -143,7 +148,6 @@ subroutine save_arrays_solver_ext_mesh_adios(nspec, nglob, & ibool_interfaces_ext_mesh, & SAVE_MESH_FILES,ANISOTROPY) - use unused_mod use adios_manager_mod use generate_databases_par, only: NGLLX,NGLLY,NGLLZ @@ -160,6 +164,9 @@ subroutine save_arrays_solver_ext_mesh_adios(nspec, nglob, & logical :: SAVE_MESH_FILES logical :: ANISOTROPY + integer(kind=4) :: unused_i4 + logical :: unused_l + unused_i4 = nglob unused_l = APPROXIMATE_OCEAN_LOAD unused_i4 = ibool(1,1,1,1) diff --git a/src/generate_databases/generate_databases_par.f90 b/src/generate_databases/generate_databases_par.f90 index 57816c26e..7cf6a2260 100644 --- a/src/generate_databases/generate_databases_par.f90 +++ b/src/generate_databases/generate_databases_par.f90 @@ -34,7 +34,7 @@ module generate_databases_par ZERO,ONE,TWO,FOUR_THIRDS,PI,HUGEVAL,GAUSSALPHA,GAUSSBETA, & SMALLVAL_TOL,TINYVAL,HUGEVAL,R_EARTH, & MAX_STRING_LEN,ATTENUATION_COMP_MAXIMUM, & - MINIMUM_THICKNESS_3D_OCEANS,RHO_APPROXIMATE_OCEAN_LOAD,SAVE_MOHO_MESH, & + MINIMUM_THICKNESS_3D_OCEANS,RHO_APPROXIMATE_OCEAN_LOAD, & CPML_X_ONLY,CPML_Y_ONLY,CPML_Z_ONLY, & CPML_XY_ONLY,CPML_XZ_ONLY,CPML_YZ_ONLY,CPML_XYZ, & NPOWER,CPML_Rcoef, & @@ -42,7 +42,7 @@ module generate_databases_par IMODEL_SALTON_TROUGH,IMODEL_TOMO,IMODEL_USER_EXTERNAL,IMODEL_IPATI,IMODEL_IPATI_WATER, & IMODEL_1D_PREM_PB,IMODEL_SEP, & IDOMAIN_ACOUSTIC,IDOMAIN_ELASTIC,IDOMAIN_POROELASTIC, & - OUTPUT_FILES_PATH,NX_TOPO_FILE,NY_TOPO_FILE, & + OUTPUT_FILES,NX_TOPO_FILE,NY_TOPO_FILE, & USE_MESH_COLORING_GPU,MAX_NUMBER_OF_COLORS, & ADIOS_TRANSPORT_METHOD diff --git a/src/generate_databases/model_external_values.f90 b/src/generate_databases/model_external_values.f90 index 296f18342..d09c1c01f 100644 --- a/src/generate_databases/model_external_values.f90 +++ b/src/generate_databases/model_external_values.f90 @@ -140,7 +140,7 @@ subroutine read_external_model_coupling() integer i,cc double precision aa,bb - filename = IN_DATA_FILES_PATH(1:len_trim(IN_DATA_FILES_PATH))//'/coeff_poly_deg12' + filename = IN_DATA_FILES(1:len_trim(IN_DATA_FILES))//'/coeff_poly_deg12' open(27,file=trim(filename)) read(27,*) ndeg_poly allocate(smooth_vp(0:ndeg_poly),smooth_vs(0:ndeg_poly)) @@ -151,7 +151,7 @@ subroutine read_external_model_coupling() !write(*,*) a,b enddo - filename = IN_DATA_FILES_PATH(1:len_trim(IN_DATA_FILES_PATH))//'/model_1D.in' + filename = IN_DATA_FILES(1:len_trim(IN_DATA_FILES))//'/model_1D.in' open(27,file=trim(filename)) read(27,*) nlayer,ncoeff allocate(vpv_1D(nlayer,ncoeff)) diff --git a/src/generate_databases/model_tomography.f90 b/src/generate_databases/model_tomography.f90 index 94624e0ce..1686cd084 100644 --- a/src/generate_databases/model_tomography.f90 +++ b/src/generate_databases/model_tomography.f90 @@ -180,8 +180,8 @@ subroutine init_tomography_files() !! WANGYI test for the benchmark of hybrid DSM-SPECFEM3D coupling if (COUPLE_WITH_EXTERNAL_CODE) then - write(*,*) 'iundef',iundef ! add by WANGYI for test - write(*,*) 'tomo_filename',tomo_filename ! add by WANGYI for test + write(*,*) 'iundef', iundef ! add by WANGYI for test + write(*,*) 'tomo_filename', tomo_filename ! add by WANGYI for test endif ! opens file for reading diff --git a/src/generate_databases/parse_sep.c b/src/generate_databases/parse_sep.c index 18321f1e4..c58bfd912 100644 --- a/src/generate_databases/parse_sep.c +++ b/src/generate_databases/parse_sep.c @@ -1,17 +1,30 @@ /* - * Copyright [2014] [Matthieu Lefebvre] - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + !===================================================================== + ! + ! S p e c f e m 3 D V e r s i o n 3 . 0 + ! --------------------------------------- + ! + ! Main historical authors: Dimitri Komatitsch and Jeroen Tromp + ! Princeton University, USA + ! and CNRS / University of Marseille, France + ! (there are currently many more authors!) + ! (c) Princeton University and CNRS / University of Marseille, July 2012 + ! + ! This program is free software; you can redistribute it and/or modify + ! it under the terms of the GNU General Public License as published by + ! the Free Software Foundation; either version 2 of the License, or + ! (at your option) any later version. + ! + ! This program is distributed in the hope that it will be useful, + ! but WITHOUT ANY WARRANTY; without even the implied warranty of + ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + ! GNU General Public License for more details. + ! + ! You should have received a copy of the GNU General Public License along + ! with this program; if not, write to the Free Software Foundation, Inc., + ! 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + ! + !===================================================================== */ /*****************************************************************************/ diff --git a/src/generate_databases/rules.mk b/src/generate_databases/rules.mk index 1d4db814a..31f747f17 100644 --- a/src/generate_databases/rules.mk +++ b/src/generate_databases/rules.mk @@ -92,7 +92,6 @@ generate_databases_SHARED_OBJECTS = \ $O/shared_par.shared_module.o \ $O/check_mesh_resolution.shared.o \ $O/create_name_database.shared.o \ - $O/create_serial_name_database.shared.o \ $O/define_derivation_matrices.shared.o \ $O/detect_surface.shared.o \ $O/exit_mpi.shared.o \ @@ -114,7 +113,6 @@ generate_databases_SHARED_OBJECTS = \ $O/recompute_jacobian.shared.o \ $O/save_header_file.shared.o \ $O/sort_array_coordinates.shared.o \ - $O/unused_mod.shared_module.o \ $O/utm_geo.shared.o \ $O/write_VTK_data.shared.o \ $(EMPTY_MACRO) @@ -238,7 +236,7 @@ else $O/get_model.gen.o: $O/generate_databases_par.gen.o $O/model_ipati_adios.gen_adios.o endif -$O/generate_databases_adios_stubs.gen_noadios.o: $O/generate_databases_par.gen.o $O/unused_mod.shared_module.o $(adios_generate_databases_PRESTUBS) +$O/generate_databases_adios_stubs.gen_noadios.o: $O/generate_databases_par.gen.o $(adios_generate_databases_PRESTUBS) $O/adios_helpers.shared_adios.o: \ $O/adios_helpers_definitions.shared_adios_module.o \ diff --git a/src/generate_databases/save_arrays_solver.f90 b/src/generate_databases/save_arrays_solver.f90 index 9c9d64b2d..41918d100 100644 --- a/src/generate_databases/save_arrays_solver.f90 +++ b/src/generate_databases/save_arrays_solver.f90 @@ -319,16 +319,6 @@ subroutine save_arrays_solver_ext_mesh(nspec,nglob,APPROXIMATE_OCEAN_LOAD,ibool, ! stores arrays in binary files if (SAVE_MESH_FILES .or. COUPLE_WITH_EXTERNAL_CODE) then call save_arrays_solver_files(nspec,nglob,ibool) - - ! debug: saves 1. MPI interface - !if (num_interfaces_ext_mesh >= 1) then - ! filename = prname(1:len_trim(prname))//'MPI_1_points' - ! call write_VTK_data_points(nglob, & - ! xstore_dummy,ystore_dummy,zstore_dummy, & - ! ibool_interfaces_ext_mesh_dummy(1:nibool_interfaces_ext_mesh(1),1), & - ! nibool_interfaces_ext_mesh(1), & - ! filename) - !endif endif ! cleanup @@ -581,19 +571,6 @@ subroutine save_arrays_solver_files(nspec,nglob,ibool) write(IOUT) ispec_is_elastic close(IOUT) - !endif - - !! Don't delete this comment for the moment - !! - !! saves 1. MPI interface - !! - !!if (num_interfaces_ext_mesh >= 1) then - !! filename = prname(1:len_trim(prname))//'MPI_1_points' - !! call write_VTK_data_points(nglob, xstore_dummy,ystore_dummy,zstore_dummy, & - !! ibool_interfaces_ext_mesh_dummy(1:nibool_interfaces_ext_mesh(1),1), & - !! nibool_interfaces_ext_mesh(1), filename) - !!endif - endif ! if (COUPLE_WITH_EXTERNAL_CODE) !! CD CD diff --git a/src/inverse_problem/program01_add_model_iso.f90 b/src/inverse_problem/program01_add_model_iso.f90 index 10570b707..063236ef0 100644 --- a/src/inverse_problem/program01_add_model_iso.f90 +++ b/src/inverse_problem/program01_add_model_iso.f90 @@ -209,16 +209,16 @@ subroutine initialize() implicit none + logical :: BROADCAST_AFTER_READ + ! initialize the MPI communicator and start the NPROCTOT MPI processes call init_mpi() call world_size(sizeprocs) call world_rank(myrank) ! reads the parameter file - call read_parameter_file() - - ! reads ADIOS flags - call read_adios_parameters() + BROADCAST_AFTER_READ = .true. + call read_parameter_file(myrank,BROADCAST_AFTER_READ) if (ADIOS_ENABLED) stop 'Flag ADIOS_ENABLED not supported yet for xadd_model, please rerun program...' diff --git a/src/inverse_problem/program02_model_update.f90 b/src/inverse_problem/program02_model_update.f90 index 9edd8db72..e359ac5a6 100644 --- a/src/inverse_problem/program02_model_update.f90 +++ b/src/inverse_problem/program02_model_update.f90 @@ -28,7 +28,7 @@ program model_update use specfem_par,only: kappastore,mustore !,ibool - use specfem_par,only: NPROC,OUTPUT_FILES_PATH,LOCAL_PATH + use specfem_par,only: NPROC,OUTPUT_FILES,LOCAL_PATH use specfem_par_elastic,only: rho_vp,rho_vs use inverse_problem_model_iso @@ -89,26 +89,26 @@ program model_update ! default input/output directories ! directory where the summed and smoothed input kernels are linked - if (OUTPUT_FILES_PATH(len_trim(OUTPUT_FILES_PATH):len_trim(OUTPUT_FILES_PATH)) /= '/') then - INPUT_KERNELS_DIR = trim(OUTPUT_FILES_PATH)//'/'//trim(INPUT_KERNELS_DIR_NAME) + if (OUTPUT_FILES(len_trim(OUTPUT_FILES):len_trim(OUTPUT_FILES)) /= '/') then + INPUT_KERNELS_DIR = trim(OUTPUT_FILES)//'/'//trim(INPUT_KERNELS_DIR_NAME) else - INPUT_KERNELS_DIR = trim(OUTPUT_FILES_PATH)//trim(INPUT_KERNELS_DIR_NAME) + INPUT_KERNELS_DIR = trim(OUTPUT_FILES)//trim(INPUT_KERNELS_DIR_NAME) endif ! directory where the mesh files for the NEW model will be written - if (OUTPUT_FILES_PATH(len_trim(OUTPUT_FILES_PATH):len_trim(OUTPUT_FILES_PATH)) /= '/') then - OUTPUT_MODEL_DIR = trim(OUTPUT_FILES_PATH)//'/'//trim(LOCAL_PATH_NEW_NAME) + if (OUTPUT_FILES(len_trim(OUTPUT_FILES):len_trim(OUTPUT_FILES)) /= '/') then + OUTPUT_MODEL_DIR = trim(OUTPUT_FILES)//'/'//trim(LOCAL_PATH_NEW_NAME) else - OUTPUT_MODEL_DIR = trim(OUTPUT_FILES_PATH)//trim(LOCAL_PATH_NEW_NAME) + OUTPUT_MODEL_DIR = trim(OUTPUT_FILES)//trim(LOCAL_PATH_NEW_NAME) endif ! directory where the output files of model_update will be written PRINT_STATISTICS_FILES = .true. - if (OUTPUT_FILES_PATH(len_trim(OUTPUT_FILES_PATH):len_trim(OUTPUT_FILES_PATH)) /= '/') then - OUTPUT_STATISTICS_DIR = trim(OUTPUT_FILES_PATH)//'/'//trim(OUTPUT_STATISTICS_DIR_NAME) + if (OUTPUT_FILES(len_trim(OUTPUT_FILES):len_trim(OUTPUT_FILES)) /= '/') then + OUTPUT_STATISTICS_DIR = trim(OUTPUT_FILES)//'/'//trim(OUTPUT_STATISTICS_DIR_NAME) else - OUTPUT_STATISTICS_DIR = trim(OUTPUT_FILES_PATH)//trim(OUTPUT_STATISTICS_DIR_NAME) + OUTPUT_STATISTICS_DIR = trim(OUTPUT_FILES)//trim(OUTPUT_STATISTICS_DIR_NAME) endif ! reads in parameters needed @@ -569,16 +569,16 @@ subroutine initialize() implicit none + logical :: BROADCAST_AFTER_READ + ! initialize the MPI communicator and start the NPROCTOT MPI processes call init_mpi() call world_size(sizeprocs) call world_rank(myrank) ! reads the parameter file - call read_parameter_file() - - ! reads ADIOS flags - call read_adios_parameters() + BROADCAST_AFTER_READ = .true. + call read_parameter_file(myrank,BROADCAST_AFTER_READ) if (ADIOS_ENABLED) stop 'Flag ADIOS_ENABLED set to .true. not supported yet for xmodel_update, please rerun program...' diff --git a/src/inverse_problem/program03_smooth_sem.f90 b/src/inverse_problem/program03_smooth_sem.f90 index aa218ddb4..fcc1bba3d 100644 --- a/src/inverse_problem/program03_smooth_sem.f90 +++ b/src/inverse_problem/program03_smooth_sem.f90 @@ -110,6 +110,8 @@ program smooth_sem real(kind=CUSTOM_REAL) :: y_min_glob,y_max_glob real(kind=CUSTOM_REAL) :: z_min_glob,z_max_glob + logical :: BROADCAST_AFTER_READ + ! initialize the MPI communicator and start the NPROCTOT MPI processes call init_mpi() call world_size(sizeprocs) @@ -185,10 +187,8 @@ program smooth_sem endif ! reads the parameter file - call read_parameter_file() - - ! reads ADIOS flags - call read_adios_parameters() + BROADCAST_AFTER_READ = .true. + call read_parameter_file(myrank,BROADCAST_AFTER_READ) if (ADIOS_ENABLED) stop 'Flag ADIOS_ENABLED not supported yet for smoothing, please rerun program...' diff --git a/src/inverse_problem/program04_sum_kernels.f90 b/src/inverse_problem/program04_sum_kernels.f90 index 3c2f7ba26..796873c7e 100644 --- a/src/inverse_problem/program04_sum_kernels.f90 +++ b/src/inverse_problem/program04_sum_kernels.f90 @@ -62,12 +62,34 @@ program sum_kernels integer :: nker integer :: ier + logical :: BROADCAST_AFTER_READ + ! ============ program starts here ===================== + ! initialize the MPI communicator and start the NPROCTOT MPI processes call init_mpi() call world_size(sizeprocs) call world_rank(myrank) + ! needs local_path for mesh files + BROADCAST_AFTER_READ = .true. + call read_parameter_file(myrank,BROADCAST_AFTER_READ) + + ! checks if number of MPI process as specified + if (sizeprocs /= NPROC) then + if (myrank == 0) then + print*,'' + print*,'Error: run xsum_kernels with the same number of MPI processes ' + print*,' as specified in Par_file by NPROC when slices were created' + print*,'' + print*,'for example: mpirun -np ',NPROC,' ./xsum_kernels ...' + print*,'' + endif + call synchronize_all() + stop 'Error total number of slices' + endif + call synchronize_all() + if (myrank==0) then write(*,*) 'sum_kernels:' write(*,*) @@ -95,22 +117,6 @@ program sum_kernels write(*,*) endif - ! needs local_path for mesh files - call read_parameter_file() - - ! checks if number of MPI process as specified - if (sizeprocs /= NPROC) then - if (myrank == 0) then - print*,'' - print*,'Error: run xsum_kernels with the same number of MPI processes ' - print*,' as specified in Par_file by NPROC when slices were created' - print*,'' - print*,'for example: mpirun -np ',NPROC,' ./xsum_kernels ...' - print*,'' - endif - call synchronize_all() - stop 'Error total number of slices' - endif call synchronize_all() ! reads mesh file diff --git a/src/inverse_problem/program05_sum_preconditioned_kernels.f90 b/src/inverse_problem/program05_sum_preconditioned_kernels.f90 index 7b54c4d96..739bf8651 100644 --- a/src/inverse_problem/program05_sum_preconditioned_kernels.f90 +++ b/src/inverse_problem/program05_sum_preconditioned_kernels.f90 @@ -66,12 +66,34 @@ program sum_preconditioned_kernels integer :: nker integer :: ier + logical :: BROADCAST_AFTER_READ + ! ============ program starts here ===================== + ! initialize the MPI communicator and start the NPROCTOT MPI processes call init_mpi() call world_size(sizeprocs) call world_rank(myrank) + ! needs local_path for mesh files + BROADCAST_AFTER_READ = .true. + call read_parameter_file(myrank,BROADCAST_AFTER_READ) + + ! checks if number of MPI process as specified + if (sizeprocs /= NPROC) then + if (myrank == 0) then + print*,'' + print*,'Error: run xsum_kernels with the same number of MPI processes ' + print*,' as specified in Par_file by NPROC when slices were created' + print*,'' + print*,'for example: mpirun -np ',NPROC,' ./xsum_kernels ...' + print*,'' + endif + call synchronize_all() + stop 'Error total number of slices' + endif + call synchronize_all() + if (myrank==0) then write(*,*) 'sum_preconditioned_kernels:' write(*,*) @@ -99,22 +121,6 @@ program sum_preconditioned_kernels write(*,*) endif - ! needs local_path for mesh files - call read_parameter_file() - - ! checks if number of MPI process as specified - if (sizeprocs /= NPROC) then - if (myrank == 0) then - print*,'' - print*,'Error: run xsum_kernels with the same number of MPI processes ' - print*,' as specified in Par_file by NPROC when slices were created' - print*,'' - print*,'for example: mpirun -np ',NPROC,' ./xsum_kernels ...' - print*,'' - endif - call synchronize_all() - stop 'Error total number of slices' - endif call synchronize_all() ! reads mesh file diff --git a/src/inverse_problem/project_tomo_grid_mod.f90 b/src/inverse_problem/project_tomo_grid_mod.f90 new file mode 100644 index 000000000..73754121c --- /dev/null +++ b/src/inverse_problem/project_tomo_grid_mod.f90 @@ -0,0 +1,4958 @@ + +! Below are my projection routines. These routines are working, I used them for the submitted GJI paper on inversion. +! I did some changes: to avoid projections artifacts +! I am minimizing the number of projections SEM mesh <-> tomo grid. So now I process like this (-> means projection) : + +! 1/ model SEM -> model TOMO : this model is used for BFGS and regularisation term. +! 2/ gradient SEM -> gradient TOMO : used by BFGS + +! 3/ Computing BFGS perturbation in tomo gird and then project it back in SEM mesh. + +! 4/ Update model in SEM mesh. + +! Previously I updated the model in TOMO grid and then project back the model in SEM mesh. +! I think it is better to update the model directly in SEM mesh because I found that the model projection SEM->TOMO->SEM->TOMO... +! generate some artifacts in model. (The result is not identical but it should be). +! Projecting only the perturbation form TOMO->SEM reduce the magnitudes of artifacts +! because perturbations are generaly small. Projecting the model TOMO->SEM generate bigger artifacts. + +! So, you can see in the attached file the way I am doing the projections now: + +! interpole_one_field + project_one_field : the two routines are used to project SEM->TOMO +! project_sem_interp : the routine used for projection TOMO->SEM + +! I am working for integrating thoses routines in the current devel version of specfem in the directory ./inverse_problem +! created by Dimitri for this purpose, but I need some time (probably a few months). +! Since you want to perform inversion as soon as possible, +! probably the temporary solution is that you update your projection subroutines to use mine. + +! Vadim Monteiller (March 2015). + +module project_tomo_grid_mod + + + use specfem_par + implicit none + include 'mpif.h' + include 'precision.h' + integer :: ier + integer :: nx,ny,nz,nnx,nny,nnz,ngrid_local + double precision, parameter :: R_EARTH=6371000.d0 + ! real array for data + real(kind=CUSTOM_REAL),dimension(:,:,:,:),allocatable :: dat + real(kind=CUSTOM_REAL),dimension(:,:,:),allocatable :: vol_data,data_glob + real(kind=CUSTOM_REAL),dimension(:,:,:),allocatable :: data_tomo1,data_tomo2,data_tomo3,data_tomo4,data_tomo + real(kind=CUSTOM_REAL),dimension(:,:,:),allocatable :: rho_grid,kappa_grid,mu_grid,alpha_grid,beta_grid + real(kind=CUSTOM_REAL),dimension(:,:,:),allocatable :: rho_grid_prior,alpha_grid_prior,beta_grid_prior + integer, allocatable :: indice(:,:,:),indice_glob(:,:,:) + integer, allocatable :: indice_grille_i(:,:,:,:),indice_grille_j(:,:,:,:),indice_grille_k(:,:,:,:) + integer, allocatable :: indice_grille_i1(:,:,:,:),indice_grille_j1(:,:,:,:),indice_grille_k1(:,:,:,:) + integer, allocatable :: indice_spec(:),ni(:) + double precision, allocatable :: xstore_tomo_grid(:,:,:),xstore_tomo_grid_interp_tri(:,:,:) + double precision, allocatable :: ystore_tomo_grid(:,:,:),ystore_tomo_grid_interp_tri(:,:,:),work_array(:,:,:) + double precision, allocatable :: zstore_tomo_grid(:,:,:),zstore_tomo_grid_interp_tri(:,:,:),profondeur_tomo_grid(:,:,:) + double precision, allocatable :: x_grid_gll(:,:,:,:), y_grid_gll(:,:,:,:),z_grid_gll(:,:,:,:) + double precision, allocatable :: wk_reduce(:,:,:,:) + real(kind=CUSTOM_REAL), allocatable :: valeur_integration1(:,:,:,:),valeur_integration2(:,:,:,:),valeur_integration(:,:,:,:) + real(kind=CUSTOM_REAL), allocatable :: valeur_integration3(:,:,:,:),valeur_integration4(:,:,:,:) + real(kind=CUSTOM_REAL), allocatable :: volume_integration(:,:,:,:),valeur_int_glob(:,:,:,:) + real(kind=CUSTOM_REAL), allocatable :: sum_grad_alpha_kl(:,:,:,:),sum_grad_beta_kl(:,:,:,:) + integer, allocatable :: indice_integration(:,:,:,:),indice_int_glob(:,:,:,:),indice_grid(:,:,:) + double precision xmin,xmax,ymin,ymax,zmin,zmax + ! 3D shape functions and their derivatives + double precision shape3D(NGNOD,NGLLX,NGLLY,NGLLZ) + double precision dershape3D(NDIM,NGNOD,NGLLX,NGLLY,NGLLZ) + double precision valeur_fonction(NGLLX,NGLLY,NGLLZ) + double precision xgll(NGLLX,NGLLY,NGLLZ),ygll(NGLLX,NGLLY,NGLLZ),zgll(NGLLX,NGLLY,NGLLZ) + double precision,dimension(NGNOD) :: xstore_local, ystore_local, zstore_local + double precision,dimension(NGNOD) :: xstore_local_int, ystore_local_int, zstore_local_int + + double precision xmin_local,xmax_local,ymin_local,ymax_local,zmin_local,zmax_local + double precision r_bot,r_cur,depth_box,pmin,pmax,px,py,pz,HLAGRANGE,valeur + double precision xi,ksi,eta,gamma,ratio_eta,ratio_xi,ksimin,ksimax,etamin,etamax + double precision volume,volume_cellule + double precision start, finish + real(kind=CUSTOM_REAL) hx,hy,hz + + !! debug + integer i666 + character(len=10) debug_file + + contains + + subroutine setup_tomo_grid() + + + + real(kind=CUSTOM_REAL) xmins,xmaxs,ymins,ymaxs,zmins,zmaxs + + + ! verifier que ce numero n'est pas deja utilise + open(10,file='Par_for_projection_in_grid_tomo.par') + read(10,*) depth_box + read(10,*) nx,ny,nz + close(10) + + ! integration grid + allocate(indice(nx,ny,nz)) + allocate(indice_glob(nx,ny,nz)) + allocate(vol_data(nx,ny,nz)) + + ! integration grid GLL points + allocate(xstore_tomo_grid(nx,ny,nz)) + allocate(ystore_tomo_grid(nx,ny,nz)) + allocate(zstore_tomo_grid(nx,ny,nz)) + allocate(xstore_tomo_grid_interp_tri(nx+1,ny+1,nz+1)) + allocate(ystore_tomo_grid_interp_tri(nx+1,ny+1,nz+1)) + allocate(zstore_tomo_grid_interp_tri(nx+1,ny+1,nz+1)) + allocate(profondeur_tomo_grid(nx,ny,nz)) + allocate(work_array(nx,ny,nz)) + allocate(data_glob(nx+1,ny+1,nz+1)) + + + !! ces tableaux doivent etres distribues pour gagner de la memoire. + !! il faut compter le nombre de points que chaque tranche mpi a dans la grille + !allocate(valeur_integration(NGLLX,NGLLY,NGLLZ,nx*ny*nz)) + !allocate(valeur_integration1(NGLLX,NGLLY,NGLLZ,nx*ny*nz)) + !allocate(valeur_integration2(NGLLX,NGLLY,NGLLZ,nx*ny*nz)) + !allocate(valeur_integration3(NGLLX,NGLLY,NGLLZ,nx*ny*nz)) + !allocate(valeur_integration4(NGLLX,NGLLY,NGLLZ,nx*ny*nz)) + !allocate(volume_integration(NGLLX,NGLLY,NGLLZ,nx*ny*nz)) + !allocate(indice_integration(NGLLX,NGLLY,NGLLZ,nx*ny*nz)) + !allocate(valeur_int_glob(NGLLX,NGLLY,NGLLZ,nx*ny*nz)) + !allocate(indice_int_glob(NGLLX,NGLLY,NGLLZ,nx*ny*nz)) + + + ! model + allocate(rho_grid(nx,ny,nz),kappa_grid(nx,ny,nz),mu_grid(nx,ny,nz)) + allocate(alpha_grid(nx,ny,nz),beta_grid(nx,ny,nz)) + allocate(rho_grid_prior(nx,ny,nz),alpha_grid_prior(nx,ny,nz),beta_grid_prior(nx,ny,nz)) + + ! data projected onto tomographic grid + allocate(data_tomo(nx,ny,nz)) + !allocate(data_tomo1(nx,ny,nz)) + !allocate(data_tomo2(nx,ny,nz)) + !allocate(data_tomo3(nx,ny,nz)) + !allocate(data_tomo4(nx,ny,nz)) + + allocate(indice_spec(nx*ny*nz)) + indice_spec(:)=0 + allocate(indice_grid(3,1000,nspec_ab)) + indice_grid(:,:,:)=0 + allocate(ni(nspec_ab)) + ni(:)=0 + + !allocate(x_grid_gll(NGLLX,NGLLY,NGLLZ,nx*ny*nz)) + !allocate(y_grid_gll(NGLLX,NGLLY,NGLLZ,nx*ny*nz)) + !allocate(z_grid_gll(NGLLX,NGLLY,NGLLZ,nx*ny*nz)) + !allocate(wk_reduce(NGLLX,NGLLY,NGLLZ,nx*ny*nz)) + + allocate(dat(NGLLX,NGLLY,NGLLZ,NSPEC_AB),stat=ier) + if( ier /= 0 ) stop 'error allocating dat array' + allocate(indice_grille_i(NGLLX,NGLLY,NGLLZ,NSPEC_AB),stat=ier) + if( ier /= 0 ) stop 'error allocating indice array' + allocate(indice_grille_j(NGLLX,NGLLY,NGLLZ,NSPEC_AB),stat=ier) + if( ier /= 0 ) stop 'error allocating indice array' + allocate(indice_grille_k(NGLLX,NGLLY,NGLLZ,NSPEC_AB),stat=ier) + if( ier /= 0 ) stop 'error allocating indice array' + allocate(indice_grille_i1(NGLLX,NGLLY,NGLLZ,NSPEC_AB),stat=ier) + if( ier /= 0 ) stop 'error allocating indice array' + allocate(indice_grille_j1(NGLLX,NGLLY,NGLLZ,NSPEC_AB),stat=ier) + if( ier /= 0 ) stop 'error allocating indice array' + allocate(indice_grille_k1(NGLLX,NGLLY,NGLLZ,NSPEC_AB),stat=ier) + if( ier /= 0 ) stop 'error allocating indice array' + + allocate(sum_grad_alpha_kl(NGLLX,NGLLY,NGLLZ,NSPEC_AB),stat=ier) + if( ier /= 0 ) stop 'error allocating indice array' + allocate(sum_grad_beta_kl(NGLLX,NGLLY,NGLLZ,NSPEC_AB),stat=ier) + if( ier /= 0 ) stop 'error allocating indice array' + + r_bot= R_EARTH - depth_box + + ! on ajoute 1 pour le nombre de "piquets" + nnx = nx + 1 + nny = ny + 1 + nnz = nz + 1 + + call mpi_allreduce(minval(xstore(:)), xmins, 1, CUSTOM_MPI_TYPE, MPI_MIN, MPI_COMM_WORLD,ier) + call mpi_allreduce(maxval(xstore(:)), xmaxs, 1, CUSTOM_MPI_TYPE, MPI_MAX, MPI_COMM_WORLD,ier) + call mpi_allreduce(minval(ystore(:)), ymins, 1, CUSTOM_MPI_TYPE, MPI_MIN, MPI_COMM_WORLD,ier) + call mpi_allreduce(maxval(ystore(:)), ymaxs, 1, CUSTOM_MPI_TYPE, MPI_MAX, MPI_COMM_WORLD,ier) + call mpi_allreduce(minval(zstore(:)), zmins, 1, CUSTOM_MPI_TYPE, MPI_MIN, MPI_COMM_WORLD,ier) + call mpi_allreduce(maxval(zstore(:)), zmaxs, 1, CUSTOM_MPI_TYPE, MPI_MAX, MPI_COMM_WORLD,ier) + + ! casting pour se mettre dans le "bon" type + xmin=xmins + xmax=xmaxs + ymin=ymins + ymax=ymaxs + zmin=zmins + zmax=zmaxs + +!!$ ! weight GLL quadrature +!!$ call zwgljd(xigll,wxgll,NGLLX,GAUSSALPHA,GAUSSBETA) +!!$ call zwgljd(yigll,wygll,NGLLY,GAUSSALPHA,GAUSSBETA) +!!$ call zwgljd(zigll,wzgll,NGLLZ,GAUSSALPHA,GAUSSBETA) + ! fonction shape + call get_shape3D(0,shape3D,dershape3D,xigll,yigll,zigll) + + ! create cartesain tomo grid for inversion + if (.not. COUPLING_WITH_DSM) then + call create_box_grid_projection() + if (myrank==0) write(*,*) ' box grid' + else ! chunk domain + call create_chunk_grid_projection() + if (myrank==0) write(*,*) ' chunk grid' + endif + call check_projection_grid() + end subroutine setup_tomo_grid + +!################################################################################################### + + subroutine project_tomo_grid(dat_to_project,ires) + implicit none + integer ispec,ires,ix,iy,iz + integer i,j,k,igll,jgll,kgll + integer imin,imax,jmin,jmax,kmin,kmax + integer index_cellule,ierr,np + double precision ANGULAR_WIDTH_ETA_RAD,ANGULAR_WIDTH_XI_RAD,deg2rad + double precision, parameter :: R_EARTH=6371000.d0 + double precision profondeur_courante + double precision rx,ry,rz + double precision x,y,z,x_centred,y_centred,z_centred + double precision x0,x1,y0,y1,p0,p1,p,volume,volume_cellule + real(kind=CUSTOM_REAL) dat_to_project(NGLLX,NGLLY,NGLLZ,NSPEC_AB) + integer :: iii,jjj,kkk + + + ! il faut definir dat (ie grad ou modele) + write(debug_file,'(a3,i4.4)') 'dbp',myrank + open(666,file=trim(debug_file)) + deg2rad = 3.141592653589793d0/180.d0 + + ! initialization + !! DEBUG + !dat_to_project(:,:,:,:) = 10._CUSTOM_REAL + !! + data_tomo(:,:,:)=0._CUSTOM_REAL + vol_data(:,:,:)=0._CUSTOM_REAL + indice(:,:,:)=0 + indice_glob(:,:,:)=0 + indice_int_glob(:,:,:,:)=0 + valeur_int_glob(:,:,:,:)=0._CUSTOM_REAL + valeur_integration(:,:,:,:) = 0._CUSTOM_REAL + volume_integration(:,:,:,:) = 1._CUSTOM_REAL + indice_integration(:,:,:,:) = 0 + indice_grille_i(:,:,:,:)=0 + indice_grille_j(:,:,:,:)=0 + indice_grille_k(:,:,:,:)=0 + + wk_reduce(:,:,:,:)=0.d0 + xstore_tomo_grid(:,:,:)=0.d0 + ystore_tomo_grid(:,:,:)=0.d0 + zstore_tomo_grid(:,:,:)=0.d0 + profondeur_tomo_grid(:,:,:)=0.d0 + +!======== on se met dans la sphere cubique et on definit le pas des grilles + + ANGULAR_WIDTH_XI_RAD = 2.d0* dasin(dabs(xmin*1.0000)/R_EARTH) + ANGULAR_WIDTH_ETA_RAD = 2.d0* dasin(dabs(ymin*1.0000)/R_EARTH) + + hx = ANGULAR_WIDTH_XI_RAD / (nx) + hy = ANGULAR_WIDTH_ETA_RAD / (ny) + hz = (r_earth-r_bot) / (nz) + + if (myrank==0) then + !print *, 'Total number of points: ', np + !print *, 'domain :' + !print *, 'Xmin, Xmax :', xmin,xmax + !print *, 'Ymin, Ymax :', ymin,ymax + !print *, 'Zmin, Zmax :', zmin,zmax + !print *, ' ' + !print *, 'angular width xi : ',ANGULAR_WIDTH_XI_RAD/deg2rad + !print *, 'angular width eta : ',ANGULAR_WIDTH_ETA_RAD/deg2rad + !print *, 'hx , hy, hz : ' , hx/deg2rad, hy/deg2rad, hz/1000. + + ! informations relatives a la grille + open(10,file='grille.par') + write(10,*) nx,ny,nz + write(10,*) ANGULAR_WIDTH_XI_RAD, ANGULAR_WIDTH_ETA_RAD + write(10,*) r_earth,r_bot,hz + write(10,*) + close(10) + endif + + if (myrank==0) call cpu_time(start) + !================================== 1/ interpolation grille tomographique ========================================= + !write(666,*) 'nb el spectraux :' ,NSPEC_AB + do ispec = 1, NSPEC_AB !===== boucle element ispec + + xmin_local = HUGEVAL + xmax_local = -HUGEVAL + ymin_local = HUGEVAL + ymax_local = -HUGEVAL + zmin_local = HUGEVAL + zmax_local = -HUGEVAL + + !======================= Sommets de l'element ============ +!1 + xstore_local(1)=xstore(ibool(1,1,1,ispec)) + ystore_local(1)=ystore(ibool(1,1,1,ispec)) + zstore_local(1)=zstore(ibool(1,1,1,ispec)) +!2 + xstore_local(2)=xstore(ibool(NGLLX,1,1,ispec)) + ystore_local(2)=ystore(ibool(NGLLX,1,1,ispec)) + zstore_local(2)=zstore(ibool(NGLLX,1,1,ispec)) +!3 + xstore_local(3)=xstore(ibool(NGLLX,NGLLY,1,ispec)) + ystore_local(3)=ystore(ibool(NGLLX,NGLLY,1,ispec)) + zstore_local(3)=zstore(ibool(NGLLX,NGLLY,1,ispec)) +!4 + xstore_local(4)=xstore(ibool(1,NGLLY,1,ispec)) + ystore_local(4)=ystore(ibool(1,NGLLY,1,ispec)) + zstore_local(4)=zstore(ibool(1,NGLLY,1,ispec)) +!5 + xstore_local(5)=xstore(ibool(1,1,NGLLZ,ispec)) + ystore_local(5)=ystore(ibool(1,1,NGLLZ,ispec)) + zstore_local(5)=zstore(ibool(1,1,NGLLZ,ispec)) +!6 + xstore_local(6)=xstore(ibool(NGLLX,1,NGLLZ,ispec)) + ystore_local(6)=ystore(ibool(NGLLX,1,NGLLZ,ispec)) + zstore_local(6)=zstore(ibool(NGLLX,1,NGLLZ,ispec)) +!7 + xstore_local(7)=xstore(ibool(NGLLX,NGLLY,NGLLZ,ispec)) + ystore_local(7)=ystore(ibool(NGLLX,NGLLY,NGLLZ,ispec)) + zstore_local(7)=zstore(ibool(NGLLX,NGLLY,NGLLZ,ispec)) +!8 + xstore_local(8)=xstore(ibool(1,NGLLY,NGLLZ,ispec)) + ystore_local(8)=ystore(ibool(1,NGLLY,NGLLZ,ispec)) + zstore_local(8)=zstore(ibool(1,NGLLY,NGLLZ,ispec)) + !write(*,*) zstore_local + !=============== on cherche le pave circonscrit a l'element en se basant sur les point GLL + do iz=1,NGLLZ + do iy=1,NGLLY + do ix=1,NGLLX + xmin_local=min(xmin_local,xstore(ibool(ix,iy,iz,ispec))) + xmax_local=max(xmin_local,xstore(ibool(ix,iy,iz,ispec))) + ymin_local=min(ymin_local,ystore(ibool(ix,iy,iz,ispec))) + ymax_local=max(ymin_local,ystore(ibool(ix,iy,iz,ispec))) + zmin_local=min(zmin_local,zstore(ibool(ix,iy,iz,ispec))) + zmax_local=max(zmax_local,zstore(ibool(ix,iy,iz,ispec))) + enddo + enddo + enddo + + ! =========== calcul du rayon min et max correspondant au pave + call rayon_min_max(R_EARTH-zmax,xmin_local,xmax_local,ymin_local,ymax_local,zmin_local,zmax_local,pmin,pmax) + + ! indice sur grille fine d'integration (sphere cubique) !! ajout de +/-2 pour deborder sur l'element adjacent + kmin = 1+ floor((pmin-r_bot)/(r_earth-r_bot)*(nnz-1) ) !- 2 + kmax = 1+ floor((pmax-r_bot)/(r_earth-r_bot)*(nnz-1) ) !+ 2 + + call ksi_eta_min_max(R_EARTH-zmax,xmin_local,xmax_local,ymin_local,ymax_local,zmin_local,zmax_local,& + ksimin,ksimax,etamin,etamax) + + ! indice sur grille fine d'integration (sphere cubique) + imin = floor(1. + (NNX - 1) * (ksimin + 0.5d0 * ANGULAR_WIDTH_XI_RAD) / ANGULAR_WIDTH_XI_RAD) !- 2 + jmin = floor(1. + (NNY - 1) * (etamin + 0.5d0 * ANGULAR_WIDTH_ETA_RAD) / ANGULAR_WIDTH_ETA_RAD) !- 2 + + ! indice sur grille fine d'integration (sphere cubique) + imax = floor(1. + (NNX - 1) * (ksimax + 0.5d0 * ANGULAR_WIDTH_XI_RAD) / ANGULAR_WIDTH_XI_RAD) !+ 2 + jmax = floor(1. + (NNY - 1) * (etamax + 0.5d0 * ANGULAR_WIDTH_ETA_RAD) / ANGULAR_WIDTH_ETA_RAD) !+ 2 + !write(666,*) ksimax , ANGULAR_WIDTH_XI_RAD , ((ksimax + 0.5d0 * ANGULAR_WIDTH_XI_RAD) / ANGULAR_WIDTH_XI_RAD) + + imin=max(imin,1) + imax=min(imax,nx) + jmin=max(jmin,1) + jmax=min(jmax,ny) + kmin=max(kmin,1) + kmax=min(kmax,nz) + + !================calcul de la valeur du noyau au centre de chaque cellule de la grille tomo + !write(666,*) 'imin ', imin,ksimin + !write(666,*) 'imax ', imax,ksimax,nx-1 + !write(666,*) xmin_local,xmax_local,ymin_local,ymax_local,zmin_local,zmax_local + !write(666,*) 'jmin ', jmin + !write(666,*) 'jmax ', jmax + !write(666,*) 'kmin ', kmin + !write(666,*) 'kmax ', kmax + + do k=kmin,kmax + + z_centred = r_bot + (k-0.5d0)*hz ! valeur au centre de la cellule (sphere cubique) + profondeur_courante = R_EARTH - z_centred + !write(*,*) R_EARTH, z_centred, profondeur_courante + do j=jmin,jmax + + ratio_eta = (dble(j)-0.5d0) / dble(NY) + y_centred = 2.d0*ratio_eta-1 + y_centred = tan((ANGULAR_WIDTH_ETA_RAD/2.d0) * y_centred) + + + do i=imin,imax + + index_cellule = i + (j-1)*(nnx-1) + (k-1)*(nnx-1)*(nny-1) + + ratio_xi = (dble(i)-0.5d0) / dble(NX) + x_centred = 2.d0*ratio_xi-1 + x_centred = tan((ANGULAR_WIDTH_XI_RAD/2.d0) * x_centred) +!!$ write(*,*) i,j,k +!!$ write(*,*) ratio_xi,dble(NX) +!!$ write(*,*) ANGULAR_WIDTH_XI_RAD/2.d0 +!!$ write(*,*) i, 2.d0*ratio_xi-1,x +!!$ write(*,*) i,j,k +!!$ write(*,*) ratio_eta,dble(NY) +!!$ write(*,*) ANGULAR_WIDTH_ETA_RAD/2.d0 +!!$ write(*,*) j, 2.d0*ratio_eta-1,y + + + ! on repasse en cartesien pour travailler dans le repere SEM + px = x_centred*z_centred + py = y_centred*z_centred + pz = -(R_EARTH - z_centred/dsqrt(1.d0 + y_centred**2 + x_centred**2) - zmax) +!!$ write(*,*) px/1000.,py/1000.,pz/1000. +!!$ read(*,*) jjj + ! on cherche le xix, eta et gamma du point central qui est px,py,pz + call Find_xix_eta_gamma(xstore_local,ystore_local,zstore_local,xi,eta,gamma,px,py,pz) + + ! on regarde si on est bien dans l'element ispec pour faire la correspondance SEM <=> tomo + if (dabs(xi)<=1.05d0.and.dabs(eta)<=1.05d0.and.dabs(gamma)<=1.05d0) then + +!!$ do kgll = 1,NGLLZ +!!$ do jgll = 1,NGLLY +!!$ do igll = 1,NGLLX +!!$ +!!$ indice_grille_i(igll,jgll,kgll,ispec) = i +!!$ indice_grille_j(igll,jgll,kgll,ispec) = j +!!$ indice_grille_k(igll,jgll,kgll,ispec) = k +!!$ +!!$ enddo +!!$ enddo +!!$ enddo + !write(666,*) 'found ',i,j,k + !write(666,*) + !if (j==ny) write(*,*) 'py ',py/1000. + !if (i==nx) write(*,*) 'px ',px/1000. + indice(i,j,k)=1 ! on a bien visite la cellule de la grille + xstore_tomo_grid(i,j,k)=px + ystore_tomo_grid(i,j,k)=py + zstore_tomo_grid(i,j,k)=pz + profondeur_tomo_grid(i,j,k)=profondeur_courante +!!$ IF (dabs(gamma)>1.) THEN +!!$ write(*,*) +!!$ write(*,'(3f12.3,4x,4i8)') px/1000.,py/1000.,pz/1000.,i,j,k,ispec +!!$ do jjj=1,8 +!!$ write(*,'(3f12.3)') xstore_local(jjj)/1000.,ystore_local(jjj)/1000.,zstore_local(jjj)/1000. +!!$ enddo +!!$ endif +!!$ read(*,*) jjj + else + !write(666,*) xi,eta,gamma + !write(666,*) px,py,pz + !write(666,*) 'not found ',i,j,k + + !do i666=1,8 + ! write(666,*)xstore_local(i666),ystore_local(i666),zstore_local(i666) + !enddo + !write(666,*) + endif + + ! == calcul des 8 sommets de la cellule d'integration ===================== + ! 1 + rx=1.d0;ry=1.d0;rz=1.d0 + + pz = r_bot + (dble(k)-rz)*hz + + ratio_eta = (dble(j)-ry) / dble(NY) + y = 2.d0*ratio_eta-1;y = tan((ANGULAR_WIDTH_ETA_RAD/2.d0) * y) + + ratio_xi = (dble(i)-rx) / dble(NX) + x = 2.d0*ratio_xi-1;x = tan((ANGULAR_WIDTH_XI_RAD/2.d0) * x) + + px = x*pz; py = y*pz + pz = -(R_EARTH - pz/dsqrt(1.d0 + y*y + x*x) - zmax) + + + + xstore_local_int(1) = px + ystore_local_int(1) = py + zstore_local_int(1) = pz + + ! 2 + rx=0.d0;ry=1.d0;rz=1.d0 + + pz = r_bot + (dble(k)-rz)*hz + + ratio_eta = (dble(j)-ry) / dble(NY) + y = 2.d0*ratio_eta-1;y = tan((ANGULAR_WIDTH_ETA_RAD/2.d0) * y) + + ratio_xi = (dble(i)-rx) / dble(NX) + x = 2.d0*ratio_xi-1;x = tan((ANGULAR_WIDTH_XI_RAD/2.d0) * x) + + px = x*pz; py = y*pz + pz = -(R_EARTH - pz/dsqrt(1.d0 + y*y + x*x) - zmax) + + + + xstore_local_int(2) = px + ystore_local_int(2) = py + zstore_local_int(2) = pz + + ! 3 + rx=0.d0;ry=0.d0;rz=1.d0 + + pz = r_bot + (dble(k)-rz)*hz + + ratio_eta = (dble(j)-ry) / dble(NY) + y = 2.d0*ratio_eta-1;y = tan((ANGULAR_WIDTH_ETA_RAD/2.d0) * y) + + ratio_xi = (dble(i)-rx) / dble(NX) + x = 2.d0*ratio_xi-1;x = tan((ANGULAR_WIDTH_XI_RAD/2.d0) * x) + + px = x*pz; py = y*pz + pz = -(R_EARTH - pz/dsqrt(1.d0 + y*y + x*x) - zmax) + + + + xstore_local_int(3) = px + ystore_local_int(3) = py + zstore_local_int(3) = pz + + + ! 4 + rx=1.d0;ry=0.d0;rz=1.d0 + + pz = r_bot + (dble(k)-rz)*hz + + ratio_eta = (dble(j)-ry) / dble(NY) + y = 2.d0*ratio_eta-1;y = tan((ANGULAR_WIDTH_ETA_RAD/2.d0) * y) + + ratio_xi = (dble(i)-rx) / dble(NX) + x = 2.d0*ratio_xi-1;x = tan((ANGULAR_WIDTH_XI_RAD/2.d0) * x) + + px = x*pz; py = y*pz + pz = -(R_EARTH - pz/dsqrt(1.d0 + y*y + x*x) - zmax) + + + + xstore_local_int(4) = px + ystore_local_int(4) = py + zstore_local_int(4) = pz + + ! 5 + rx=1.d0;ry=1.d0;rz=0.d0 + + pz = r_bot + (dble(k)-rz)*hz + + ratio_eta = (dble(j)-ry) / dble(NY) + y = 2.d0*ratio_eta-1;y = tan((ANGULAR_WIDTH_ETA_RAD/2.d0) * y) + + ratio_xi = (dble(i)-rx) / dble(NX) + x = 2.d0*ratio_xi-1;x = tan((ANGULAR_WIDTH_XI_RAD/2.d0) * x) + + px = x*pz; py = y*pz + pz = -(R_EARTH - pz/dsqrt(1.d0 + y*y + x*x) - zmax) + + + + xstore_local_int(5) = px + ystore_local_int(5) = py + zstore_local_int(5) = pz + + + + ! 6 + rx=0.d0;ry=1.d0;rz=0.d0 + + pz = r_bot + (dble(k)-rz)*hz + + ratio_eta = (dble(j)-ry) / dble(NY) + y = 2.d0*ratio_eta-1;y = tan((ANGULAR_WIDTH_ETA_RAD/2.d0) * y) + + ratio_xi = (dble(i)-rx) / dble(NX) + x = 2.d0*ratio_xi-1;x = tan((ANGULAR_WIDTH_XI_RAD/2.d0) * x) + + px = x*pz; py = y*pz + pz = -(R_EARTH - pz/dsqrt(1.d0 + y*y + x*x) - zmax) + + + + xstore_local_int(6) = px + ystore_local_int(6) = py + zstore_local_int(6) = pz + + ! 7 + rx=0.d0;ry=0.d0;rz=0.d0 + + pz = r_bot + (dble(k)-rz)*hz + + ratio_eta = (dble(j)-ry) / dble(NY) + y = 2.d0*ratio_eta-1;y = tan((ANGULAR_WIDTH_ETA_RAD/2.d0) * y) + + ratio_xi = (dble(i)-rx) / dble(NX) + x = 2.d0*ratio_xi-1;x = tan((ANGULAR_WIDTH_XI_RAD/2.d0) * x) + + px = x*pz; py = y*pz + pz = -(R_EARTH - pz/dsqrt(1.d0 + y*y + x*x) - zmax) + + + + xstore_local_int(7) = px + ystore_local_int(7) = py + zstore_local_int(7) = pz + + + ! 8 + rx=1.d0;ry=0.d0;rz=0.d0 + + pz = r_bot + (dble(k)-rz)*hz + + ratio_eta = (dble(j)-ry) / dble(NY) + y = 2.d0*ratio_eta-1;y = tan((ANGULAR_WIDTH_ETA_RAD/2.d0) * y) + + ratio_xi = (dble(i)-rx) / dble(NX) + x = 2.d0*ratio_xi-1;x = tan((ANGULAR_WIDTH_XI_RAD/2.d0) * x) + + px = x*pz; py = y*pz + pz = -(R_EARTH - pz/dsqrt(1.d0 + y*y + x*x) - zmax) + + + + xstore_local_int(8) = px + ystore_local_int(8) = py + zstore_local_int(8) = pz + + ! ========== calcul des points GLL + call calcule_point_gll(xgll,ygll,zgll,xstore_local_int,ystore_local_int,zstore_local_int,shape3D) + + ! ========== interpolation de la fonction dat aux points GLL + do kgll = 1,NGLLZ + do jgll = 1,NGLLY + do igll = 1,NGLLX + + + + px = xgll(igll,jgll,kgll) + py = ygll(igll,jgll,kgll) + pz = zgll(igll,jgll,kgll) + + call Find_xix_eta_gamma(xstore_local,ystore_local,zstore_local,xi,eta,gamma,px,py,pz) + + if (dabs(xi)<=1.05d0.and.dabs(eta)<=1.05d0.and.dabs(gamma)<=1.05d0) then + + call interpolation_valeur(valeur,px,py,pz,dat_to_project,xstore_local,ystore_local,zstore_local,& + ispec,NSPEC_AB,xigll,yigll,zigll) + valeur_integration(igll,jgll,kgll,index_cellule)=valeur + indice_integration(igll,jgll,kgll,index_cellule)=1 + !if (xi > 1.) then +!!$ if (i==18 .and. j==21 .and. k==13) then +!!$ write(*,*) igll,jgll,kgll,index_cellule +!!$ write(*,*) xi,eta,gamma +!!$ write(*,*) px/1000.,py/1000.,pz/1000. +!!$ do i666=1,8 +!!$ write(*,*)xstore_local(i666)/1000.,ystore_local(i666)/1000.,zstore_local(i666)/1000. +!!$ enddo +!!$ write(*,*) +!!$ write(*,*) '----- > : ', valeur +!!$ do kkk=1,5 +!!$ do jjj=1,5 +!!$ do iii=1,5 +!!$ write(*,*) iii,jjj,kkk,ispec,dat_to_project(iii,jjj,kkk,ispec) +!!$ enddo +!!$ enddo +!!$ enddo +!!$ write(*,*) '------------------------------------------' + +!!$ read(*,*) jjj +!!$ endif + else + !write(666,*) xi,eta,gamma + !do i666=1,8 + ! write(666,*)xstore_local(i666),ystore_local(i666),zstore_local(i666) + !enddo + !write(666,*) + + + endif + + enddo + enddo + enddo + ! ========================= on cherche les points GLL qui sont dans la cellule de la grille tomo + call calcule_point_gll(xgll,ygll,zgll,xstore_local,ystore_local,zstore_local,shape3D) + do kgll = 1,NGLLZ + do jgll = 1,NGLLY + do igll = 1,NGLLX + + + + px = xgll(igll,jgll,kgll) + py = ygll(igll,jgll,kgll) + pz = zgll(igll,jgll,kgll) + call Find_xix_eta_gamma(xstore_local_int,ystore_local_int,zstore_local_int,xi,eta,gamma,px,py,pz) + + if (dabs(xi)<=1.05d0.and.dabs(eta)<=1.05d0.and.dabs(gamma)<=1.05d0) then + + indice_grille_i(igll,jgll,kgll,ispec) = i + indice_grille_i1(igll,jgll,kgll,ispec)= i + + indice_grille_j(igll,jgll,kgll,ispec) = j + indice_grille_j1(igll,jgll,kgll,ispec)= j + + indice_grille_k(igll,jgll,kgll,ispec) = k + indice_grille_k1(igll,jgll,kgll,ispec)= k + + if (xi > 0. ) then + if (i1) indice_grille_i1(igll,jgll,kgll,ispec) = i-1 + endif + + if (eta > 0. ) then + if (j1) indice_grille_j1(igll,jgll,kgll,ispec) = j-1 + endif + + if (gamma > 0. ) then + if (k1) indice_grille_k1(igll,jgll,kgll,ispec) = k-1 + endif + + endif + + enddo + enddo + enddo + ! =========================================================== + + + enddo + enddo + enddo + + enddo !==== boucle ispec + if (myrank==0) then + call cpu_time(finish) + write(*,*) 'time // proj 0: ', finish-start + call cpu_time(start) + endif + !! === verif des correspondances (gll,ispec) -> tomo + do ispec=1,nspec_ab + do kgll = 1,NGLLZ + do jgll = 1,NGLLY + do igll = 1,NGLLX + + !! patch ad hoc pour effet de bords + if (indice_grille_i(igll,jgll,kgll,ispec)==0 .and. igll==1) then + indice_grille_i(igll,jgll,kgll,ispec)=indice_grille_i(igll+1,jgll,kgll,ispec) + indice_grille_j(igll,jgll,kgll,ispec)=indice_grille_j(igll+1,jgll,kgll,ispec) + indice_grille_k(igll,jgll,kgll,ispec)=indice_grille_k(igll+1,jgll,kgll,ispec) + endif + + if (indice_grille_i(igll,jgll,kgll,ispec)==0 .and. igll==5) then + indice_grille_i(igll,jgll,kgll,ispec)=indice_grille_i(igll-1,jgll,kgll,ispec) + indice_grille_j(igll,jgll,kgll,ispec)=indice_grille_j(igll-1,jgll,kgll,ispec) + indice_grille_k(igll,jgll,kgll,ispec)=indice_grille_k(igll-1,jgll,kgll,ispec) + endif + + + if (indice_grille_i(igll,jgll,kgll,ispec)==0 .and. jgll==1) then + indice_grille_i(igll,jgll,kgll,ispec)=indice_grille_i(igll,jgll+1,kgll,ispec) + indice_grille_j(igll,jgll,kgll,ispec)=indice_grille_j(igll,jgll+1,kgll,ispec) + indice_grille_k(igll,jgll,kgll,ispec)=indice_grille_k(igll,jgll+1,kgll,ispec) + endif + + + if (indice_grille_i(igll,jgll,kgll,ispec)==0 .and. jgll==5) then + indice_grille_i(igll,jgll,kgll,ispec)=indice_grille_i(igll,jgll-1,kgll,ispec) + indice_grille_j(igll,jgll,kgll,ispec)=indice_grille_j(igll,jgll-1,kgll,ispec) + indice_grille_k(igll,jgll,kgll,ispec)=indice_grille_k(igll,jgll-1,kgll,ispec) + endif + + if (indice_grille_i(igll,jgll,kgll,ispec)==0 .and. kgll==1) then + indice_grille_i(igll,jgll,kgll,ispec)=indice_grille_i(igll,jgll,kgll+1,ispec) + indice_grille_j(igll,jgll,kgll,ispec)=indice_grille_j(igll,jgll,kgll+1,ispec) + indice_grille_k(igll,jgll,kgll,ispec)=indice_grille_k(igll,jgll,kgll+1,ispec) + endif + + + if (indice_grille_i(igll,jgll,kgll,ispec)==0 .and. kgll==5) then + indice_grille_i(igll,jgll,kgll,ispec)=indice_grille_i(igll,jgll,kgll-1,ispec) + indice_grille_j(igll,jgll,kgll,ispec)=indice_grille_j(igll,jgll,kgll-1,ispec) + indice_grille_k(igll,jgll,kgll,ispec)=indice_grille_k(igll,jgll,kgll-1,ispec) + endif + + + if (indice_grille_i(igll,jgll,kgll,ispec)==0 .and. jgll==1 .and. kgll==1) then + indice_grille_i(igll,jgll,kgll,ispec)=indice_grille_i(igll,jgll+1,kgll+1,ispec) + indice_grille_j(igll,jgll,kgll,ispec)=indice_grille_j(igll,jgll+1,kgll+1,ispec) + indice_grille_k(igll,jgll,kgll,ispec)=indice_grille_k(igll,jgll+1,kgll+1,ispec) + endif + + + if (indice_grille_i(igll,jgll,kgll,ispec)==0 .and. jgll==5 .and. kgll==5) then + indice_grille_i(igll,jgll,kgll,ispec)=indice_grille_i(igll,jgll-1,kgll-1,ispec) + indice_grille_j(igll,jgll,kgll,ispec)=indice_grille_j(igll,jgll-1,kgll-1,ispec) + indice_grille_k(igll,jgll,kgll,ispec)=indice_grille_k(igll,jgll-1,kgll-1,ispec) + endif + + if (indice_grille_i(igll,jgll,kgll,ispec)==0 .and. igll==1 .and. jgll==1) then + indice_grille_i(igll,jgll,kgll,ispec)=indice_grille_i(igll+1,jgll+1,kgll,ispec) + indice_grille_j(igll,jgll,kgll,ispec)=indice_grille_j(igll+1,jgll+1,kgll,ispec) + indice_grille_k(igll,jgll,kgll,ispec)=indice_grille_k(igll+1,jgll+1,kgll,ispec) + endif + + + if (indice_grille_i(igll,jgll,kgll,ispec)==0 .and. igll==5 .and. jgll==5) then + indice_grille_i(igll,jgll,kgll,ispec)=indice_grille_i(igll-1,jgll-1,kgll,ispec) + indice_grille_j(igll,jgll,kgll,ispec)=indice_grille_j(igll-1,jgll-1,kgll,ispec) + indice_grille_k(igll,jgll,kgll,ispec)=indice_grille_k(igll-1,jgll-1,kgll,ispec) + endif + + + write(666,'(3i2,i6,3i5)') igll,jgll,kgll,ispec,& + indice_grille_i(igll,jgll,kgll,ispec),& + indice_grille_j(igll,jgll,kgll,ispec),& + indice_grille_k(igll,jgll,kgll,ispec) + + enddo + enddo + enddo + enddo + if (myrank==0) then + call cpu_time(finish) + write(*,*) 'time // proj : ', finish-start + endif + call mpi_reduce(valeur_integration,valeur_int_glob,NGLLX*NGLLY*NGLLZ*(nnx-1)*(nny-1)*(nnz-1),CUSTOM_MPI_TYPE, MPI_SUM,0,MPI_COMM_WORLD,ier) + call mpi_reduce(indice_integration,indice_int_glob,NGLLX*NGLLY*NGLLZ*(nnx-1)*(nny-1)*(nnz-1),MPI_INTEGER, MPI_SUM,0,MPI_COMM_WORLD,ier) + call mpi_reduce(indice,indice_glob,(nnx-1)*(nny-1)*(nnz-1),MPI_INTEGER ,MPI_SUM,0, MPI_COMM_WORLD, ierr) + + call mpi_reduce(xstore_tomo_grid,work_array,(nnx-1)*(nny-1)*(nnz-1),MPI_DOUBLE_PRECISION ,MPI_SUM,0, MPI_COMM_WORLD, ierr) + xstore_tomo_grid(:,:,:)=work_array(:,:,:) + + call mpi_reduce(ystore_tomo_grid,work_array,(nnx-1)*(nny-1)*(nnz-1),MPI_DOUBLE_PRECISION ,MPI_SUM,0, MPI_COMM_WORLD, ierr) + ystore_tomo_grid(:,:,:)=work_array(:,:,:) + + call mpi_reduce(zstore_tomo_grid,work_array,(nnx-1)*(nny-1)*(nnz-1),MPI_DOUBLE_PRECISION ,MPI_SUM,0, MPI_COMM_WORLD, ierr) + zstore_tomo_grid(:,:,:)=work_array(:,:,:) + + call mpi_reduce(profondeur_tomo_grid,work_array,(nnx-1)*(nny-1)*(nnz-1),MPI_DOUBLE_PRECISION ,MPI_SUM,0, MPI_COMM_WORLD, ierr) + profondeur_tomo_grid(:,:,:)=work_array(:,:,:) + + indice(:,:,:) = indice_glob(:,:,:) + indice_integration(:,:,:,:) = indice_int_glob(:,:,:,:) + valeur_integration(:,:,:,:) = valeur_int_glob(:,:,:,:) + +!================== 2/ projection sur grille tomo ===================================== + +!================== 2/ projection sur grille tomo ===================================== + + if (myrank==0) then !======================== myrank=0 + call cpu_time(start) + index_cellule=0 + do k=1,nnz-1 + do j=1,nny-1 + do i=1,nnx-1 + index_cellule=index_cellule+1 + + if (indice(i,j,k)/=0) then + xstore_tomo_grid(i,j,k) = xstore_tomo_grid(i,j,k) / real(indice(i,j,k),8) + ystore_tomo_grid(i,j,k) = ystore_tomo_grid(i,j,k) / real(indice(i,j,k),8) + zstore_tomo_grid(i,j,k) = zstore_tomo_grid(i,j,k) / real(indice(i,j,k),8) + !write(*,*) profondeur_tomo_grid(i,j,k) ,profondeur_tomo_grid(i,j,k) / real(indice(i,j,k),8) + profondeur_tomo_grid(i,j,k) = profondeur_tomo_grid(i,j,k) / real(indice(i,j,k),8) + else + write(*,*) 'point oublie :' ,i,j,k + endif + + + !! on reagarde si les points on ete visites et combien de fois? + do kgll=1,NGLLZ + do jgll=1,NGLLY + do igll=1,NGLLX + + if (indice_integration(igll,jgll,kgll,index_cellule) == 0) then !! le point n'a pas ete visite + !write(666,*) 'point oublie :',igll,jgll,kgll,i,j,k,index_cellule + !write(667,*) i,j,k + !! chercher le point le plus proche qui est a ete visite + ! premier patch : devrait marcher pour mon cas cartesien + if (kgll==1 .and. indice_integration(igll,jgll,kgll+1,index_cellule) > 0) then + valeur_integration(igll,jgll,kgll,index_cellule) = valeur_integration(igll,jgll,kgll+1,index_cellule) /& + real(indice_integration(igll,jgll,kgll+1,index_cellule),CUSTOM_REAL) + endif + else ! le point a ete visite "indice_integration" fois +!!$ if (j==21 .and. k==13) then +!!$ write(*,*) i,valeur_integration(igll,jgll,kgll,index_cellule) +!!$ endif + valeur_integration(igll,jgll,kgll,index_cellule) = valeur_integration(igll,jgll,kgll,index_cellule)/& + real(indice_integration(igll,jgll,kgll,index_cellule),CUSTOM_REAL) + ! on divise par indice pour avoir la valeur moyenne car on a fait un MPI_SUM + endif + + enddo + enddo + enddo +!!$ if (j==21 .and. k==13) then +!!$ write(*,*) +!!$ read(*,*) jjj +!!$ endif + enddo + enddo + enddo + + + !===== boucle grille tomo : verifier qu'on fait exactement la meme boucle que precedemment + np=0 + do k=1,nnz-1 ! grille integration (sphere cubique) + + + p0= r_bot + (k-1)*hz + p1= r_bot + k*hz + + do j=2,nny ! grille integration (sphere cubique) + + + ratio_eta = (dble(j-2)) / dble(NY) + y0 = 2.d0*ratio_eta-1 + y0 = tan((ANGULAR_WIDTH_ETA_RAD/2.d0) * y0) + + ratio_eta = (dble(j-1)) / dble(NY) + y1 = 2.d0*ratio_eta-1 + y1 = tan((ANGULAR_WIDTH_ETA_RAD/2.d0) * y1) + + + do i=2,nnx ! grille integration (sphere cubique) + + index_cellule=i-1+(j-2)*(nnx-1)+(k-1)*(nnx-1)*(nny-1) + + ratio_xi = (dble(i-2)) / dble(NX) + x0 = 2.d0*ratio_xi-1 + x0 = tan((ANGULAR_WIDTH_XI_RAD/2.d0) * x0) + + ratio_xi = (dble(i-1)) / dble(NX) + x1 = 2.d0*ratio_xi-1 + x1 = tan((ANGULAR_WIDTH_XI_RAD/2.d0) * x1) + + !===== calcul des 8 sommets de la cellule d'integration dans le repere cartesien SEM + + ! 1 + x=x0;y=y0;p=p0 + xstore_local(1) = x*p + ystore_local(1) = y*p + zstore_local(1) = -(R_EARTH - p/dsqrt(1.d0 + y*y + x*x) - zmax) + + ! 2 + x=x1;y=y0;p=p0 + xstore_local(2) = x*p + ystore_local(2) = y*p + zstore_local(2) = -(R_EARTH - p/dsqrt(1.d0 + y*y + x*x) - zmax) + + ! 3 + x=x1;y=y1;p=p0 + xstore_local(3) = x*p + ystore_local(3) = y*p + zstore_local(3) = -(R_EARTH - p/dsqrt(1.d0 + y*y + x*x) - zmax) + + ! 4 + x=x0;y=y1;p=p0 + xstore_local(4) = x*p + ystore_local(4) = y*p + zstore_local(4) = -(R_EARTH - p/dsqrt(1.d0 + y*y + x*x) - zmax) + + ! 5 + x=x0;y=y0;p=p1 + xstore_local(5) = x*p + ystore_local(5) = y*p + zstore_local(5) = -(R_EARTH - p/dsqrt(1.d0 + y*y + x*x) - zmax) + + ! 6 + x=x1;y=y0;p=p1 + xstore_local(6) = x*p + ystore_local(6) = y*p + zstore_local(6) = -(R_EARTH - p/dsqrt(1.d0 + y*y + x*x) - zmax) + + ! 7 + x=x1;y=y1;p=p1 + xstore_local(7) = x*p + ystore_local(7) = y*p + zstore_local(7) = -(R_EARTH - p/dsqrt(1.d0 + y*y + x*x) - zmax) + + + ! 8 + x=x0;y=y1;p=p1 + xstore_local(8) = x*p + ystore_local(8) = y*p + zstore_local(8) = -(R_EARTH - p/dsqrt(1.d0 + y*y + x*x) - zmax) + ! === calcul de l'integrale de volume + call compute_volume_int(volume,xstore_local,ystore_local,zstore_local,wxgll,wygll,wzgll,& + shape3D,dershape3D,valeur_integration,index_cellule,(nnx-1)*(nny-1)*(nnz-1)) +!!$ write(*,*) +!!$ do i666=1,8 +!!$ write(*,*) xstore_local(i666),ystore_local(i666),zstore_local(i666) +!!$ enddo +!!$ write(*,*) +!!$ write(*,*) xstore_tomo_grid(i-1,j-1,k),ystore_tomo_grid(i-1,j-1,k), zstore_tomo_grid(i-1,j-1,k) +!!$ write(*,*) +!!$ read(*,*) jjj + if (ires==1) then + ! === si on veut faire juste la projection du modele, on ne doit pas normaliser par + ! === le volume de la cellule, on prend plutot la valeur moyenne. + call compute_volume_int(volume_cellule,xstore_local,ystore_local,zstore_local,wxgll,wygll,wzgll,& + shape3D,dershape3D,volume_integration,index_cellule,(nnx-1)*(nny-1)*(nnz-1)) + volume=volume/volume_cellule + endif + + if (indice(i-1,j-1,k)==0) then + ! on a oublie le point i,j,k + np=np+1 + !write(30,*) i,j,k + else + !zscaling(k) = zscaling(k) + volume*vol_data(i-1,j-1,k) + data_tomo(i-1,j-1,k) = volume !data_tomo(i_tomo,j_tomo,k_tomo) + volume*vol_data(i-1,j-1,k) + !zscaling_tomo(k_tomo) = zscaling_tomo(k_tomo) + volume*vol_data(i-1,j-1,k) + endif + + enddo + enddo + + enddo + call cpu_time(finish) + write(*,*) 'time seq. ',finish-start +!! pour debbug + open(667,file='profondeur.bin',access='direct',recl=8*nx*ny*nz) + write(667,rec=1) profondeur_tomo_grid + close(667) + + open(667,file='valeur_int.bin',access='direct',recl=CUSTOM_REAL*NGLLX*NGLLY*NGLLZ*nx*ny*nz) + write(667,rec=1) valeur_integration + close(667) + + open(667,file='xsem.bin',access='direct',recl=CUSTOM_REAL*NGLOB_AB) + write(667,rec=1) xstore + close(667) + + open(667,file='ysem.bin',access='direct',recl=CUSTOM_REAL*NGLOB_AB) + write(667,rec=1) ystore + close(667) + + open(667,file='zsem.bin',access='direct',recl=CUSTOM_REAL*NGLOB_AB) + write(667,rec=1) zstore + close(667) + + open(667,file='xtomo.bin',access='direct',recl=8*nx*ny*nz) + write(667,rec=1) xstore_tomo_grid + close(667) + + open(667,file='ytomo.bin',access='direct',recl=8*nx*ny*nz) + write(667,rec=1) ystore_tomo_grid + close(667) + + open(667,file='ztomo.bin',access='direct',recl=8*nx*ny*nz) + write(667,rec=1) zstore_tomo_grid + close(667) + + open(667,file='ibool.bin',access='direct',recl=4*NGLLX*NGLLY*NGLLZ*NSPEC_AB) + write(667,rec=1) ibool + close(667) + + open(667,file='indicei.bin',access='direct',recl=4*NGLLX*NGLLY*NGLLZ*NSPEC_AB) + write(667,rec=1) indice_grille_i + close(667) + + open(667,file='indicej.bin',access='direct',recl=4*NGLLX*NGLLY*NGLLZ*NSPEC_AB) + write(667,rec=1) indice_grille_j + close(667) + + open(667,file='indicek.bin',access='direct',recl=4*NGLLX*NGLLY*NGLLZ*NSPEC_AB) + write(667,rec=1) indice_grille_k + close(667) + + endif + call mpi_bcast(data_tomo,nx*ny*nz,CUSTOM_MPI_TYPE,0,MPI_COMM_WORLD,ier) + call mpi_bcast(profondeur_tomo_grid,nx*ny*nz,MPI_DOUBLE_PRECISION,0,MPI_COMM_WORLD,ier) + close(666) + +end subroutine project_tomo_grid + + +subroutine interpolation_valeur(valeur,x,y,z,dat,xstore_local,ystore_local,zstore_local,& + ispec,NSPEC_AB,xigll,yigll,zigll) + implicit none + include "constants.h" + integer NSPEC_AB,ispec + real(kind=CUSTOM_REAL) dat(NGLLX,NGLLY,NGLLZ,NSPEC_AB) + double precision xstore_local(NGNOD),ystore_local(NGNOD),zstore_local(NGNOD) + double precision x,y,z,valeur + double precision xi,eta,gamma,hlagrange + double precision :: hxir(NGLLX),hetar(NGLLY),hgammar(NGLLZ) + double precision :: hpxir(NGLLX),hpetar(NGLLY),hpgammar(NGLLZ) + double precision, dimension(NGLLX) :: xigll!,wxgll + double precision, dimension(NGLLY) :: yigll!,wygll + double precision, dimension(NGLLZ) :: zigll!,wzgll + integer igll,jgll,kgll + + call Find_xix_eta_gamma(xstore_local,ystore_local,zstore_local,xi,eta,gamma,x,y,z) + + + call lagrange_any(xi,NGLLX,xigll,hxir,hpxir) + call lagrange_any(eta,NGLLY,yigll,hetar,hpetar) + call lagrange_any(gamma,NGLLZ,zigll,hgammar,hpgammar) + + valeur=0.d0 + + do kgll = 1,NGLLZ + do jgll = 1,NGLLY + do igll = 1,NGLLX + + ! ploynome de lagrange + hlagrange = hxir(igll)*hetar(jgll)*hgammar(kgll) + + ! interpolation de la valeur + valeur = valeur + dble(dat(igll,jgll,kgll,ispec))*hlagrange + + enddo + enddo + enddo + + +end subroutine interpolation_valeur +!============================================================= +subroutine calcule_point_gll(xstore,ystore,zstore,xelm,yelm,zelm,shape3D) + implicit none + + include "constants.h" + double precision xmesh,ymesh,zmesh + double precision shape3D(NGNOD,NGLLX,NGLLY,NGLLZ) + double precision xelm(NGNOD),yelm(NGNOD),zelm(NGNOD) + double precision xstore(NGLLX,NGLLY,NGLLZ) + double precision ystore(NGLLX,NGLLY,NGLLZ) + double precision zstore(NGLLX,NGLLY,NGLLZ) + integer i,j,k,ia + + do k=1,NGLLZ + do j=1,NGLLY + do i=1,NGLLX + + xmesh = ZERO + ymesh = ZERO + zmesh = ZERO + do ia=1,NGNOD + xmesh = xmesh + shape3D(ia,i,j,k)*xelm(ia) + ymesh = ymesh + shape3D(ia,i,j,k)*yelm(ia) + zmesh = zmesh + shape3D(ia,i,j,k)*zelm(ia) + enddo + + xstore(i,j,k) = xmesh + ystore(i,j,k) = ymesh + zstore(i,j,k) = zmesh + + enddo + enddo + enddo + + +end subroutine calcule_point_gll +!============================================================= +subroutine compute_volume_int(volume,xelm,yelm,zelm,wxgll,wygll,wzgll,shape3D,dershape3D,valeur_integration,index_cellule,NBCELL) + implicit none + + include "constants.h" + integer NBCELL,index_cellule + +! Gauss-Lobatto-Legendre points of integration + double precision wxgll(NGLLX) + double precision wygll(NGLLY) + double precision wzgll(NGLLZ) + +! 3D shape functions and their derivatives + double precision shape3D(NGNOD,NGLLX,NGLLY,NGLLZ) + double precision dershape3D(NDIM,NGNOD,NGLLX,NGLLY,NGLLZ) + real(kind=CUSTOM_REAL) valeur_integration(NGLLX,NGLLY,NGLLZ,NBCELL) +! + double precision xelm(NGNOD), yelm(NGNOD), zelm(NGNOD) +! double precision xstore_local(NGLLX,NGLLY,NGLLZ) !!! faire passer ces tableaux en parametre et surtout changer leur nom. +! double precision ystore_local(NGLLX,NGLLY,NGLLZ) +! double precision zstore_local(NGLLX,NGLLY,NGLLZ) + + integer i,j,k,ia + double precision xxi,xeta,xgamma,yxi,yeta,ygamma,zxi,zeta,zgamma + double precision xmesh,ymesh,zmesh + double precision xix,xiy,xiz,etax,etay,etaz,gammax,gammay,gammaz + double precision jacobian,weight,volume + integer jjj + ! CALCUL DU VOLUME ------ + volume=0.d0 + + do k=1,NGLLZ + do j=1,NGLLY + do i=1,NGLLX + + weight = wxgll(i)*wygll(j)*wzgll(k) + + xxi = ZERO + xeta = ZERO + xgamma = ZERO + yxi = ZERO + yeta = ZERO + ygamma = ZERO + zxi = ZERO + zeta = ZERO + zgamma = ZERO + xmesh = ZERO + ymesh = ZERO + zmesh = ZERO + + do ia=1,NGNOD + xxi = xxi + dershape3D(1,ia,i,j,k)*xelm(ia) + xeta = xeta + dershape3D(2,ia,i,j,k)*xelm(ia) + xgamma = xgamma + dershape3D(3,ia,i,j,k)*xelm(ia) + yxi = yxi + dershape3D(1,ia,i,j,k)*yelm(ia) + yeta = yeta + dershape3D(2,ia,i,j,k)*yelm(ia) + ygamma = ygamma + dershape3D(3,ia,i,j,k)*yelm(ia) + zxi = zxi + dershape3D(1,ia,i,j,k)*zelm(ia) + zeta = zeta + dershape3D(2,ia,i,j,k)*zelm(ia) + zgamma = zgamma + dershape3D(3,ia,i,j,k)*zelm(ia) + xmesh = xmesh + shape3D(ia,i,j,k)*xelm(ia) + ymesh = ymesh + shape3D(ia,i,j,k)*yelm(ia) + zmesh = zmesh + shape3D(ia,i,j,k)*zelm(ia) + enddo + ! GLL points +! xstore_local(i,j,k)=xmesh +! ystore_local(i,j,k)=ymesh +! zstore_local(i,j,k)=zmesh + ! + jacobian = xxi*(yeta*zgamma-ygamma*zeta) - & + xeta*(yxi*zgamma-ygamma*zxi) + & + xgamma*(yxi*zeta-yeta*zxi) + +! can ignore negative jacobian in mesher if needed when debugging code + if(jacobian <= ZERO) then + write(*,*) xelm + write(*,*) yelm + write(*,*) zelm + call exit_MPI(0,'Warning 3D Jacobian undefined in compute_volume_int') + endif +! invert the relation (Fletcher p. 50 vol. 2) + xix = (yeta*zgamma-ygamma*zeta) / jacobian + xiy = (xgamma*zeta-xeta*zgamma) / jacobian + xiz = (xeta*ygamma-xgamma*yeta) / jacobian + etax = (ygamma*zxi-yxi*zgamma) / jacobian + etay = (xxi*zgamma-xgamma*zxi) / jacobian + etaz = (xgamma*yxi-xxi*ygamma) / jacobian + gammax = (yxi*zeta-yeta*zxi) / jacobian + gammay = (xeta*zxi-xxi*zeta) / jacobian + gammaz = (xxi*yeta-xeta*yxi) / jacobian + +! compute and store the jacobian for the solver + jacobian = 1. / (xix*(etay*gammaz-etaz*gammay) & + -xiy*(etax*gammaz-etaz*gammax) & + +xiz*(etax*gammay-etay*gammax)) + + volume = volume + weight * jacobian * valeur_integration(i,j,k,index_cellule) + !write(*,*) valeur_integration(i,j,k,index_cellule) + !read(*,*) jjj + enddo + enddo + enddo + +end subroutine compute_volume_int + +!============================================================= + + subroutine radius_comp(rbot,x0,y0,z0,p) + implicit none + double precision rbot,x,y,z,x0,y0,z0,p + x=x0 + y=y0 + z=z0 + p = sqrt(x*x + y*y + (z+rbot)*(z+rbot)) + end subroutine radius_comp + + subroutine rayon_min_max(rbot,xmin,xmax,ymin,ymax,zmin,zmax,pmin,pmax) + + implicit none + include 'constants.h' + double precision rbot,xmin,xmax,ymin,ymax,zmin,zmax,pmin,pmax + double precision x,y,z,p + + pmax=TINYVAL + pmin=HUGEVAL + +! 1 + x=xmin + y=ymin + z=zmin + p = sqrt(x*x + y*y + (z+rbot)*(z+rbot)) + pmin=min(p,pmin) + pmax=max(p,pmax) + +! 2 + x=xmax + y=ymin + z=zmin + p = sqrt(x*x + y*y + (z+rbot)*(z+rbot)) + pmin=min(p,pmin) + pmax=max(p,pmax) + +! 3 + x=xmax + y=ymax + z=zmin + p = sqrt(x*x + y*y + (z+rbot)*(z+rbot)) + pmin=min(p,pmin) + pmax=max(p,pmax) + +! 4 + x=xmin + y=ymax + z=zmin + p = sqrt(x*x + y*y + (z+rbot)*(z+rbot)) + pmin=min(p,pmin) + pmax=max(p,pmax) + +! 5 + x=xmin + y=ymin + z=zmax + p = sqrt(x*x + y*y + (z+rbot)*(z+rbot)) + pmin=min(p,pmin) + pmax=max(p,pmax) + +! 6 + x=xmax + y=ymin + z=zmax + p = sqrt(x*x + y*y + (z+rbot)*(z+rbot)) + pmin=min(p,pmin) + pmax=max(p,pmax) + +! 7 + x=xmax + y=ymax + z=zmax + p = sqrt(x*x + y*y + (z+rbot)*(z+rbot)) + pmin=min(p,pmin) + pmax=max(p,pmax) + +! 8 + x=xmin + y=ymax + z=zmax + p = sqrt(x*x + y*y + (z+rbot)*(z+rbot)) + pmin=min(p,pmin) + pmax=max(p,pmax) + + + + end subroutine rayon_min_max + + + + + +subroutine Find_xix_eta_gamma(xstore,ystore,zstore,xi,eta,gamma,x_target,y_target,z_target) + implicit none + double precision xstore(8),ystore(8),zstore(8),xi,eta,gamma,x,y,z + double precision x_target,y_target,z_target + double precision dist,distmin + double precision xix,xiy,xiz,etax,etay,etaz,gammax,gammay,gammaz + double precision dx,dy,dz,final_distance,dxi,deta,dgamma + integer i,k0,iter + + ! initial geuss : sommet le plus proche + distmin = 1.d20 + do i = 1, 8 + dist = (x_target - xstore(i))**2 + (y_target - ystore(i))**2 + (z_target - zstore(i))**2 + if (dist < distmin) then + distmin = dist + k0 = i + endif + enddo + + k0=7 + x=xstore(k0) + y=ystore(k0) + z=zstore(k0) + xi=1. ! xigll(ix_initial_guess(irec)) !!!!!!!!!!!!! pb ici + eta=1. ! yigll(iy_initial_guess(irec)) + gamma=1.! zigll(iz_initial_guess(irec)) + ! + if (myrank==0) then + !write(*,*) + !write(*,'(a13,2x,3f20.5)') 'first guess :',x,y,z + !write(*,'(a7,2x,3f20.5)') 'target ',x_target,y_target,z_target + endif + do iter=1,6 + + ! recompute jacobian for the new point + call recompute_jacobian(xstore,ystore,zstore,xi,eta,gamma,x,y,z, & + xix,xiy,xiz,etax,etay,etaz,gammax,gammay,gammaz) + ! compute distance to target location + dx = - (x - x_target) + dy = - (y - y_target) + dz = - (z - z_target) + !if (myrank==0) write(*,'(6f20.5)') x,y,z,dx,dy,dz + ! compute increments + ! + dxi = xix*dx + xiy*dy + xiz*dz + deta = etax*dx + etay*dy + etaz*dz + dgamma = gammax*dx + gammay*dy + gammaz*dz + ! update values + xi = xi + dxi + eta = eta + deta + gamma = gamma + dgamma + + + enddo + ! compute final coordinates of point found + call recompute_jacobian(xstore,ystore,zstore,xi,eta,gamma,x,y,z, & + xix,xiy,xiz,etax,etay,etaz,gammax,gammay,gammaz) + + ! compute final distance between asked and found (converted to km) + final_distance = dsqrt((x_target-x)**2 + & + (y_target-y)**2 + (z_target-z)**2) + !if (dabs(xi)<1.d0.and.dabs(eta)<1.d0.and.dabs(gamma)<1.d0) then + !write(*,*) 'dist :',final_distance,xi,eta,gamma + !write(*,*) x/1000,y/1000,z/1000 + !write(*,*) xi,eta,gamma + !write(*,*) + !endif +end subroutine Find_xix_eta_gamma + + + + + + subroutine recompute_jacobian(xelm,yelm,zelm,xi,eta,gamma,x,y,z, & + xix,xiy,xiz,etax,etay,etaz,gammax,gammay,gammaz) + + implicit none + + !include "constants.h" + integer, parameter :: NGNOD=8,NDIM=3 + double precision x,y,z,xix,xiy,xiz,etax,etay,etaz,gammax,gammay,gammaz + double precision xi,eta,gamma,jacobian + +! coordinates of the control points + double precision xelm(NGNOD),yelm(NGNOD),zelm(NGNOD) + +! 3D shape functions and their derivatives at receiver + double precision shape3D(NGNOD) + double precision dershape3D(NDIM,NGNOD) + + double precision xxi,yxi,zxi + double precision xeta,yeta,zeta + double precision xgamma,ygamma,zgamma + double precision ra1,ra2,rb1,rb2,rc1,rc2 + + integer ia + +! for 8-node element + double precision, parameter :: ONE_EIGHTH = 0.125d0 + double precision, parameter :: one=1.d0, zero=0.d0 +! recompute jacobian for any (xi,eta,gamma) point, not necessarily a GLL point + +! check that the parameter file is correct + if(NGNOD /= 8) stop 'elements should have 8 control nodes' + +! *** +! *** create the 3D shape functions and the Jacobian for an 8-node element +! *** + +!--- case of an 8-node 3D element (Dhatt-Touzot p. 115) + + ra1 = one + xi + ra2 = one - xi + + rb1 = one + eta + rb2 = one - eta + + rc1 = one + gamma + rc2 = one - gamma + + shape3D(1) = ONE_EIGHTH*ra2*rb2*rc2 + shape3D(2) = ONE_EIGHTH*ra1*rb2*rc2 + shape3D(3) = ONE_EIGHTH*ra1*rb1*rc2 + shape3D(4) = ONE_EIGHTH*ra2*rb1*rc2 + shape3D(5) = ONE_EIGHTH*ra2*rb2*rc1 + shape3D(6) = ONE_EIGHTH*ra1*rb2*rc1 + shape3D(7) = ONE_EIGHTH*ra1*rb1*rc1 + shape3D(8) = ONE_EIGHTH*ra2*rb1*rc1 + + dershape3D(1,1) = - ONE_EIGHTH*rb2*rc2 + dershape3D(1,2) = ONE_EIGHTH*rb2*rc2 + dershape3D(1,3) = ONE_EIGHTH*rb1*rc2 + dershape3D(1,4) = - ONE_EIGHTH*rb1*rc2 + dershape3D(1,5) = - ONE_EIGHTH*rb2*rc1 + dershape3D(1,6) = ONE_EIGHTH*rb2*rc1 + dershape3D(1,7) = ONE_EIGHTH*rb1*rc1 + dershape3D(1,8) = - ONE_EIGHTH*rb1*rc1 + + dershape3D(2,1) = - ONE_EIGHTH*ra2*rc2 + dershape3D(2,2) = - ONE_EIGHTH*ra1*rc2 + dershape3D(2,3) = ONE_EIGHTH*ra1*rc2 + dershape3D(2,4) = ONE_EIGHTH*ra2*rc2 + dershape3D(2,5) = - ONE_EIGHTH*ra2*rc1 + dershape3D(2,6) = - ONE_EIGHTH*ra1*rc1 + dershape3D(2,7) = ONE_EIGHTH*ra1*rc1 + dershape3D(2,8) = ONE_EIGHTH*ra2*rc1 + + dershape3D(3,1) = - ONE_EIGHTH*ra2*rb2 + dershape3D(3,2) = - ONE_EIGHTH*ra1*rb2 + dershape3D(3,3) = - ONE_EIGHTH*ra1*rb1 + dershape3D(3,4) = - ONE_EIGHTH*ra2*rb1 + dershape3D(3,5) = ONE_EIGHTH*ra2*rb2 + dershape3D(3,6) = ONE_EIGHTH*ra1*rb2 + dershape3D(3,7) = ONE_EIGHTH*ra1*rb1 + dershape3D(3,8) = ONE_EIGHTH*ra2*rb1 + +! compute coordinates and jacobian matrix + x=ZERO + y=ZERO + z=ZERO + xxi=ZERO + xeta=ZERO + xgamma=ZERO + yxi=ZERO + yeta=ZERO + ygamma=ZERO + zxi=ZERO + zeta=ZERO + zgamma=ZERO + + do ia=1,NGNOD + x=x+shape3D(ia)*xelm(ia) + y=y+shape3D(ia)*yelm(ia) + z=z+shape3D(ia)*zelm(ia) + + xxi=xxi+dershape3D(1,ia)*xelm(ia) + xeta=xeta+dershape3D(2,ia)*xelm(ia) + xgamma=xgamma+dershape3D(3,ia)*xelm(ia) + yxi=yxi+dershape3D(1,ia)*yelm(ia) + yeta=yeta+dershape3D(2,ia)*yelm(ia) + ygamma=ygamma+dershape3D(3,ia)*yelm(ia) + zxi=zxi+dershape3D(1,ia)*zelm(ia) + zeta=zeta+dershape3D(2,ia)*zelm(ia) + zgamma=zgamma+dershape3D(3,ia)*zelm(ia) + enddo + + jacobian = xxi*(yeta*zgamma-ygamma*zeta) - xeta*(yxi*zgamma-ygamma*zxi) + xgamma*(yxi*zeta-yeta*zxi) + + if(jacobian <= ZERO) then + !if (myrank==0) then + !write(*,*) myrank + !write(*,'(3f20.5)') x,y,z + !write(*,'(3f20.5)') xi,eta,gamma + !write(*,'(8f20.5)') xelm + !write(*,'(8f20.5)') yelm + !write(*,'(8f20.5)') zelm + !endif + stop '3D Jacobian undefined in recompute jacobian' + !endif + endif +! invert the relation (Fletcher p. 50 vol. 2) + xix=(yeta*zgamma-ygamma*zeta)/jacobian + xiy=(xgamma*zeta-xeta*zgamma)/jacobian + xiz=(xeta*ygamma-xgamma*yeta)/jacobian + etax=(ygamma*zxi-yxi*zgamma)/jacobian + etay=(xxi*zgamma-xgamma*zxi)/jacobian + etaz=(xgamma*yxi-xxi*ygamma)/jacobian + gammax=(yxi*zeta-yeta*zxi)/jacobian + gammay=(xeta*zxi-xxi*zeta)/jacobian + gammaz=(xxi*yeta-xeta*yxi)/jacobian + + end subroutine recompute_jacobian + + subroutine inv_mapping_sph_cub(x0,y0,z0,ksi,eta,rbot) + implicit none + double precision x0,y0,z0,x,y,z,rbot + double precision ksi,eta + x=x0 + y=y0 + z=rbot+z0 + ksi=datan2(x,z) + eta=datan2(y,z) + end subroutine inv_mapping_sph_cub + + + + subroutine ksi_eta_min_max(rbot,xmin,xmax,ymin,ymax,zmin,zmax,ksimin,ksimax,etamin,etamax) + implicit none + include 'constants.h' + double precision rbot,xmin,xmax,ymin,ymax,zmin,zmax,ksimin,ksimax,etamin,etamax + double precision p,x,y,z + + ksimax=-HUGEVAL + ksimin=HUGEVAL + etamin=HUGEVAL + etamax=-HUGEVAL + +! 1 + x=xmin + y=ymin + z=zmin+rbot + ksimin=min(datan2(x,z),ksimin) + ksimax=max(datan2(x,z),ksimax) + etamin=min(datan2(y,z),etamin) + etamax=max(datan2(y,z),etamax) + + +! 2 + x=xmax + y=ymin + z=zmin+rbot + ksimin=min(datan2(x,z),ksimin) + ksimax=max(datan2(x,z),ksimax) + etamin=min(datan2(y,z),etamin) + etamax=max(datan2(y,z),etamax) + + +! 3 + x=xmax + y=ymax + z=zmin+rbot + ksimin=min(datan2(x,z),ksimin) + ksimax=max(datan2(x,z),ksimax) + etamin=min(datan2(y,z),etamin) + etamax=max(datan2(y,z),etamax) + +! 4 + x=xmin + y=ymax + z=zmin+rbot + ksimin=min(datan2(x,z),ksimin) + ksimax=max(datan2(x,z),ksimax) + etamin=min(datan2(y,z),etamin) + etamax=max(datan2(y,z),etamax) + + +! 5 + x=xmin + y=ymin + z=zmax+rbot + ksimin=min(datan2(x,z),ksimin) + ksimax=max(datan2(x,z),ksimax) + etamin=min(datan2(y,z),etamin) + etamax=max(datan2(y,z),etamax) + + +! 6 + x=xmax + y=ymin + z=zmax+rbot + ksimin=min(datan2(x,z),ksimin) + ksimax=max(datan2(x,z),ksimax) + etamin=min(datan2(y,z),etamin) + etamax=max(datan2(y,z),etamax) + + +! 7 + x=xmax + y=ymax + z=zmax+rbot + ksimin=min(datan2(x,z),ksimin) + ksimax=max(datan2(x,z),ksimax) + etamin=min(datan2(y,z),etamin) + etamax=max(datan2(y,z),etamax) + + +! 8 + x=xmin + y=ymax + z=zmax+rbot + ksimin=min(datan2(x,z),ksimin) + ksimax=max(datan2(x,z),ksimax) + etamin=min(datan2(y,z),etamin) + etamax=max(datan2(y,z),etamax) + + + + + end subroutine ksi_eta_min_max + + + subroutine project_sem_interp(data_in_tomo_grid,data_in_sem_grid) + implicit none + real(kind=CUSTOM_REAL) data_in_tomo_grid(nx,ny,nz),data_in_sem_grid(NGLLX,NGLLY,NGLLZ,NSPEC_AB) + integer ispec, i,j,k,i1,j1,k1,igll,jgll,kgll + + real(kind=CUSTOM_REAL) f1,f2,f3,f4,f5,f6,f7,f8 + real(kind=CUSTOM_REAL) x1,x2,x3,x4,x5,x6,x7,x8 + real(kind=CUSTOM_REAL) y1,y2,y3,y4,y5,y6,y7,y8 + real(kind=CUSTOM_REAL) z1,z2,z3,z4,z5,z6,z7,z8 + real(kind=CUSTOM_REAL) x,y,z,f + + data_glob(1:nx,1:ny,1:nz)=data_in_tomo_grid(:,:,:) + + data_glob(nx+1,1:ny,1:nz)=data_in_tomo_grid(nx,:,:) + data_glob(1:nx,ny+1,1:nz)=data_in_tomo_grid(:,ny,:) + data_glob(1:nx,1:ny,nz+1)=data_in_tomo_grid(:,:,nz) + + data_glob(nx+1,ny+1,1:nz)=data_in_tomo_grid(nx,ny,:) + data_glob(nx+1,1:ny,nz+1)=data_in_tomo_grid(nx,:,nz) + data_glob(1:nx,ny+1,nz+1)=data_in_tomo_grid(:,ny,nz) + + data_glob(nx+1,ny+1,nz+1)=data_in_tomo_grid(nx,ny,nz) + + + do ispec = 1, NSPEC_AB + do kgll = 1,NGLLZ + do jgll = 1,NGLLY + do igll = 1,NGLLX + + i = indice_grille_i(igll,jgll,kgll,ispec) + j = indice_grille_j(igll,jgll,kgll,ispec) + k = indice_grille_k(igll,jgll,kgll,ispec) + + i1 = indice_grille_i1(igll,jgll,kgll,ispec) + j1 = indice_grille_j1(igll,jgll,kgll,ispec) + k1 = indice_grille_k1(igll,jgll,kgll,ispec) + + x= xstore(ibool(igll,jgll,kgll,ispec)) + y= ystore(ibool(igll,jgll,kgll,ispec)) + z= zstore(ibool(igll,jgll,kgll,ispec)) + + x1=xstore_tomo_grid_interp_tri(i,j,k) !xstore_tomo_grid(i,j,k)-0.5*hx + y1=ystore_tomo_grid_interp_tri(i,j,k) !ystore_tomo_grid(i,j,k)-0.5*hy + z1=zstore_tomo_grid_interp_tri(i,j,k) !zstore_tomo_grid(i,j,k)-0.5*hz + + x2=xstore_tomo_grid_interp_tri(i1,j,k) !xstore_tomo_grid(i1,j,k)-0.5*hx + y2=ystore_tomo_grid_interp_tri(i1,j,k) !ystore_tomo_grid(i1,j,k)-0.5*hy + z2=zstore_tomo_grid_interp_tri(i1,j,k) !zstore_tomo_grid(i1,j,k)-0.5*hz + +!!$ if (x>=50000.) then +!!$ write(*,*) i,i1 +!!$ write(*,*) x1,x,x2 +!!$ write(*,*) '---------------' +!!$ endif +!!$ if (x-x1 < 0. ) then +!!$ write(*,*) x1,x,x2 +!!$ write(*,*) i,j,k +!!$ write(*,*) i1,j1,k1 +!!$ write(*,*) '---------------' +!!$ endif + x3=xstore_tomo_grid_interp_tri(i1,j1,k) !xstore_tomo_grid(i1,j1,k)-0.5*hx + y3=ystore_tomo_grid_interp_tri(i1,j1,k) !ystore_tomo_grid(i1,j1,k)-0.5*hy + z3=zstore_tomo_grid_interp_tri(i1,j1,k) !zstore_tomo_grid(i1,j1,k)-0.5*hz + + x4=xstore_tomo_grid_interp_tri(i,j1,k) !xstore_tomo_grid(i,j1,k)-0.5*hx + y4=ystore_tomo_grid_interp_tri(i,j1,k) !ystore_tomo_grid(i,j1,k)-0.5*hy + z4=zstore_tomo_grid_interp_tri(i,j1,k) !zstore_tomo_grid(i,j1,k)-0.5*hz + + x5=xstore_tomo_grid_interp_tri(i,j,k1) !xstore_tomo_grid(i,j,k1)-0.5*hx + y5=ystore_tomo_grid_interp_tri(i,j,k1) !ystore_tomo_grid(i,j,k1)-0.5*hy + z5=zstore_tomo_grid_interp_tri(i,j,k1) !zstore_tomo_grid(i,j,k1)-0.5*hz + + x6=xstore_tomo_grid_interp_tri(i1,j,k1) !xstore_tomo_grid(i1,j,k1)-0.5*hx + y6=ystore_tomo_grid_interp_tri(i1,j,k1) !ystore_tomo_grid(i1,j,k1)-0.5*hy + z6=zstore_tomo_grid_interp_tri(i1,j,k1) !zstore_tomo_grid(i1,j,k1)-0.5*hz + + x7=xstore_tomo_grid_interp_tri(i1,j1,k1) !xstore_tomo_grid(i1,j1,k1)-0.5*hx + y7=ystore_tomo_grid_interp_tri(i1,j1,k1) !ystore_tomo_grid(i1,j1,k1)-0.5*hy + z7=zstore_tomo_grid_interp_tri(i1,j1,k1) !zstore_tomo_grid(i1,j1,k1)-0.5*hz + + x8=xstore_tomo_grid_interp_tri(i,j1,k1) !xstore_tomo_grid(i,j1,k1)-0.5*hx + y8=ystore_tomo_grid_interp_tri(i,j1,k1) !ystore_tomo_grid(i,j1,k1)-0.5*hy + z8=zstore_tomo_grid_interp_tri(i,j1,k1) !zstore_tomo_grid(i,j1,k1)-0.5*hz + + f1=data_glob(i,j,k) !data_in_tomo_grid(i,j,k) + f2=data_glob(i1,j,k) !data_in_tomo_grid(i1,j,k) + f3=data_glob(i1,j1,k) !data_in_tomo_grid(i1,j1,k) + f4=data_glob(i,j1,k) !data_in_tomo_grid(i,j1,k) + f5=data_glob(i,j,k1) !data_in_tomo_grid(i,j,k1) + f6=data_glob(i1,j,k1) !data_in_tomo_grid(i1,j,k1) + f7=data_glob(i1,j1,k1) !data_in_tomo_grid(i1,j1,k1) + f8=data_glob(i,j1,k1) !data_in_tomo_grid(i,j1,k1) +!!$ if (myrank==1) then +!!$ write(*,*) i,j,k +!!$ write(*,*) i1,j1,k1 +!!$ write(*,*) x1,x2 +!!$ write(*,*) y1,y2 +!!$ write(*,*) z1,z2 +!!$ write(*,*) x,y,z +!!$ write(*,*) '-------------' +!!$ endif + ! interpolation tri-lineaire: + call interpoll3d_tri(& + x1,x2,x3,x4,x5,x6,x7,x8,& + y1,y2,y3,y4,y5,y6,y7,y8,& + z1,z2,z3,z4,z5,z6,z7,z8,& + f1,f2,f2,f4,f5,f6,f7,f8,& + x,y,z,f) + + data_in_sem_grid(igll,jgll,kgll,ispec) = f + + enddo + enddo + enddo + enddo + + + end subroutine project_sem_interp + + subroutine project_sem(data_in_tomo_grid,data_in_sem_grid) + implicit none + real(kind=CUSTOM_REAL) data_in_tomo_grid(nx,ny,nz),data_in_sem_grid(NGLLX,NGLLY,NGLLZ,NSPEC_AB) + integer ispec, i,j,k,i1,j1,k1,igll,jgll,kgll + + real(kind=CUSTOM_REAL) f1,f2,f3,f4,f5,f6,f7,f8 + real(kind=CUSTOM_REAL) x1,x2,x3,x4,x5,x6,x7,x8 + real(kind=CUSTOM_REAL) y1,y2,y3,y4,y5,y6,y7,y8 + real(kind=CUSTOM_REAL) z1,z2,z3,z4,z5,z6,z7,z8 + real(kind=CUSTOM_REAL) x,y,z,f + + do ispec = 1, NSPEC_AB + do kgll = 1,NGLLZ + do jgll = 1,NGLLY + do igll = 1,NGLLX + + i = indice_grille_i(igll,jgll,kgll,ispec) + j = indice_grille_j(igll,jgll,kgll,ispec) + k = indice_grille_k(igll,jgll,kgll,ispec) + + data_in_sem_grid(igll,jgll,kgll,ispec)=data_in_tomo_grid(i,j,k) + enddo + enddo + enddo + enddo + end subroutine project_sem + + subroutine interpoll3d_tri(& + x1,x2,x3,x4,x5,x6,x7,x8,& + y1,y2,y3,y4,y5,y6,y7,y8,& + z1,z2,z3,z4,z5,z6,z7,z8,& + f1,f2,f3,f4,f5,f6,f7,f8,& + x,y,z,f) + !! todo utiliser les 8 sommets pour faire une interpolation de type gll + implicit none + real(kind=CUSTOM_REAL) f1,f2,f3,f4,f5,f6,f7,f8 + real(kind=CUSTOM_REAL) x1,x2,x3,x4,x5,x6,x7,x8 + real(kind=CUSTOM_REAL) y1,y2,y3,y4,y5,y6,y7,y8 + real(kind=CUSTOM_REAL) z1,z2,z3,z4,z5,z6,z7,z8 + real(kind=CUSTOM_REAL) x,y,z,f + real(kind=CUSTOM_REAL) t,u,w + + if (x1==x2) then + t=0. + else + t=(x-x1)/(x2-x1) + endif + + if (y1==y3) then + u=0. + else + u=(y-y1)/(y3-y1) + endif + + if (z1==z5) then + w=0. + else + w=(z-z1)/(z5-z1) + endif + + !! check for debbuging +1000 format(a21,4f30.15) + !if (t < -0.01) write(*,1000) 'warning interpol t<0',t,x1,x,x2 + !if (u < -0.01) write(*,1000) 'warning interpol u<0',u,y1,y,y3 + !if (w < -0.01) write(*,1000) 'warning interpol w<0',w,z1,z,z5 + !if (t > 1.01) write(*,1000) 'warning interpol t>1',t,x1,x,x2 + !if (u > 1.01) write(*,1000) 'warning interpol u>1',u,y1,y,y3 + !if (w > 1.01) write(*,1000) 'warning interpol w>1',w,z1,z,z5 + + f= (1.d0-t) * (1.d0-u) * (1.d0-w)* f1+& + t * (1.d0-u) * (1.d0-w)* f2+& + t * u * (1.d0-w)* f3+& + (1.d0-t) * u * (1.d0-w)* f4+& + (1.d0-t) * (1.d0-u) * w * f5+& + t * (1.d0-u) * w * f6+& + t * u * w * f7+& + (1.d0-t) * u * w * f8 + + + end subroutine interpoll3d_tri + + + subroutine write_mod(model_to_write,iteration,name_data) + + implicit none + real(kind=CUSTOM_REAL) model_to_write(nx,ny,nz) + character(len=5) name_data + character(len=100) name_file + integer iteration + + write(name_file,'(a4,a5,a1,i5.5)') 'mod_',name_data(1:5),'.',iteration + open(27,file=trim(name_file),access='direct',recl=CUSTOM_REAL*nx*ny*nz) + write(27,rec=1) model_to_write + close(27) + + end subroutine write_mod + + subroutine read_mod(model_to_write,iteration,name_data) + + implicit none + real(kind=CUSTOM_REAL) model_to_write(nx,ny,nz) + character(len=5) name_data + character(len=100) name_file + integer iteration + + write(name_file,'(a4,a5,a1,i5.5)') 'mod_',name_data(1:5),'.',iteration + open(27,file=trim(name_file),access='direct',recl=CUSTOM_REAL*nx*ny*nz) + read(27,rec=1) model_to_write + close(27) + + end subroutine read_mod + + + subroutine write_kl(model_to_write,i_source,iteration,name_data,nsrc) + + implicit none + real(kind=CUSTOM_REAL) model_to_write(nx,ny,nz) + character(len=5) name_data + character(len=100) name_file + integer i_source,iteration,nsrc + + !write(name_file,'(a4,a5,a1,i5.5,a1,i5.5)') 'grad_',name_data(1:5),'_',iteration,'_',i_source + write(name_file,'(a4,a5,a1,i5.5)') 'grad',name_data(1:5),'.',iteration + open(27,file=trim(name_file),access='direct',recl=CUSTOM_REAL*nx*ny*nz) + write(27,rec=1) model_to_write(:,:,:) + close(27) + + end subroutine write_kl + + + subroutine read_kl(model_to_write,i_source,iteration,name_data) + + implicit none + real(kind=CUSTOM_REAL) model_to_write(nx,ny,nz) + character(len=5) name_data + character(len=100) name_file + integer i_source,iteration + + !write(name_file,'(a4,a5,a1,i5.5,a1,i5.5)') 'grad_',name_data(1:5),'_',iteration,'_',i_source + write(name_file,'(a4,a5,a1,i5.5)') 'grad',name_data(1:5),'.',iteration + open(27,file=trim(name_file),access='direct',recl=CUSTOM_REAL*nx*ny*nz) + read(27,rec=1) model_to_write + close(27) + + end subroutine read_kl + + + + + + + + subroutine project_tomo_grid_4(dat_to_project1,dat_to_project2,dat_to_project3,dat_to_project4,ires) + + integer ispec,ires,ix,iy,iz + integer i,j,k,igll,jgll,kgll + integer imin,imax,jmin,jmax,kmin,kmax + integer index_cellule,ierr,np + double precision ANGULAR_WIDTH_ETA_RAD,ANGULAR_WIDTH_XI_RAD,deg2rad + double precision, parameter :: R_EARTH=6371000.d0 + double precision profondeur_courante + double precision rx,ry,rz + double precision x,y,z,x_centred,y_centred,z_centred + double precision x0,x1,y0,y1,p0,p1,p,volume_cellule + double precision volume1,volume2,volume3,volume4 + real(kind=CUSTOM_REAL) dat_to_project1(NGLLX,NGLLY,NGLLZ,NSPEC_AB) + real(kind=CUSTOM_REAL) dat_to_project2(NGLLX,NGLLY,NGLLZ,NSPEC_AB) + real(kind=CUSTOM_REAL) dat_to_project3(NGLLX,NGLLY,NGLLZ,NSPEC_AB) + real(kind=CUSTOM_REAL) dat_to_project4(NGLLX,NGLLY,NGLLZ,NSPEC_AB) + integer :: iii,jjj,kkk + + + ! il faut definir dat (ie grad ou modele) + !write(debug_file,'(a3,i4.4)') 'dbp',myrank + !open(666,file=trim(debug_file)) + deg2rad = 3.141592653589793d0/180.d0 + + ! initialization + !! DEBUG + !dat_to_project(:,:,:,:) = 10._CUSTOM_REAL + !! + data_tomo1(:,:,:)=0._CUSTOM_REAL + data_tomo2(:,:,:)=0._CUSTOM_REAL + data_tomo3(:,:,:)=0._CUSTOM_REAL + data_tomo4(:,:,:)=0._CUSTOM_REAL + + vol_data(:,:,:)=0._CUSTOM_REAL + indice(:,:,:)=0 + indice_glob(:,:,:)=0 + indice_int_glob(:,:,:,:)=0 + valeur_int_glob(:,:,:,:)=0._CUSTOM_REAL + + valeur_integration1(:,:,:,:) = 0._CUSTOM_REAL + valeur_integration2(:,:,:,:) = 0._CUSTOM_REAL + valeur_integration3(:,:,:,:) = 0._CUSTOM_REAL + valeur_integration4(:,:,:,:) = 0._CUSTOM_REAL + + volume_integration(:,:,:,:) = 1._CUSTOM_REAL + indice_integration(:,:,:,:) = 0 + indice_grille_i(:,:,:,:)=0 + indice_grille_j(:,:,:,:)=0 + indice_grille_k(:,:,:,:)=0 + + xstore_tomo_grid(:,:,:)=0.d0 + ystore_tomo_grid(:,:,:)=0.d0 + zstore_tomo_grid(:,:,:)=0.d0 + profondeur_tomo_grid(:,:,:)=0.d0 + +!======== on se met dans la sphere cubique et on definit le pas des grilles + + ANGULAR_WIDTH_XI_RAD = 2.d0* dasin(dabs(xmin*1.00001)/R_EARTH) + ANGULAR_WIDTH_ETA_RAD = 2.d0* dasin(dabs(ymin*1.00001)/R_EARTH) + + hx = ANGULAR_WIDTH_XI_RAD / (nx) + hy = ANGULAR_WIDTH_ETA_RAD / (ny) + hz = (r_earth-r_bot) / (nz) + + if (myrank==0) then + !print *, 'Total number of points: ', np + !print *, 'domain :' + !print *, 'Xmin, Xmax :', xmin,xmax + !print *, 'Ymin, Ymax :', ymin,ymax + !print *, 'Zmin, Zmax :', zmin,zmax + !print *, ' ' + !print *, 'angular width xi : ',ANGULAR_WIDTH_XI_RAD/deg2rad + !print *, 'angular width eta : ',ANGULAR_WIDTH_ETA_RAD/deg2rad + !print *, 'hx , hy, hz : ' , hx/deg2rad, hy/deg2rad, hz/1000. + + ! informations relatives a la grille + open(10,file='grille.par') + write(10,*) nx,ny,nz + write(10,*) ANGULAR_WIDTH_XI_RAD, ANGULAR_WIDTH_ETA_RAD + write(10,*) r_earth,r_bot,hz + write(10,*) + close(10) + endif + + if (myrank==0) call cpu_time(start) + !================================== 1/ interpolation grille tomographique ========================================= + !write(666,*) 'nb el spectraux :' ,NSPEC_AB + do ispec = 1, NSPEC_AB !===== boucle element ispec + + xmin_local = HUGEVAL + xmax_local = -HUGEVAL + ymin_local = HUGEVAL + ymax_local = -HUGEVAL + zmin_local = HUGEVAL + zmax_local = -HUGEVAL + + !======================= Sommets de l'element ============ +!1 + xstore_local(1)=xstore(ibool(1,1,1,ispec)) + ystore_local(1)=ystore(ibool(1,1,1,ispec)) + zstore_local(1)=zstore(ibool(1,1,1,ispec)) +!2 + xstore_local(2)=xstore(ibool(NGLLX,1,1,ispec)) + ystore_local(2)=ystore(ibool(NGLLX,1,1,ispec)) + zstore_local(2)=zstore(ibool(NGLLX,1,1,ispec)) +!3 + xstore_local(3)=xstore(ibool(NGLLX,NGLLY,1,ispec)) + ystore_local(3)=ystore(ibool(NGLLX,NGLLY,1,ispec)) + zstore_local(3)=zstore(ibool(NGLLX,NGLLY,1,ispec)) +!4 + xstore_local(4)=xstore(ibool(1,NGLLY,1,ispec)) + ystore_local(4)=ystore(ibool(1,NGLLY,1,ispec)) + zstore_local(4)=zstore(ibool(1,NGLLY,1,ispec)) +!5 + xstore_local(5)=xstore(ibool(1,1,NGLLZ,ispec)) + ystore_local(5)=ystore(ibool(1,1,NGLLZ,ispec)) + zstore_local(5)=zstore(ibool(1,1,NGLLZ,ispec)) +!6 + xstore_local(6)=xstore(ibool(NGLLX,1,NGLLZ,ispec)) + ystore_local(6)=ystore(ibool(NGLLX,1,NGLLZ,ispec)) + zstore_local(6)=zstore(ibool(NGLLX,1,NGLLZ,ispec)) +!7 + xstore_local(7)=xstore(ibool(NGLLX,NGLLY,NGLLZ,ispec)) + ystore_local(7)=ystore(ibool(NGLLX,NGLLY,NGLLZ,ispec)) + zstore_local(7)=zstore(ibool(NGLLX,NGLLY,NGLLZ,ispec)) +!8 + xstore_local(8)=xstore(ibool(1,NGLLY,NGLLZ,ispec)) + ystore_local(8)=ystore(ibool(1,NGLLY,NGLLZ,ispec)) + zstore_local(8)=zstore(ibool(1,NGLLY,NGLLZ,ispec)) + !write(*,*) zstore_local + !=============== on cherche le pave circonscrit a l'element en se basant sur les point GLL + do iz=1,NGLLZ + do iy=1,NGLLY + do ix=1,NGLLX + xmin_local=min(xmin_local,xstore(ibool(ix,iy,iz,ispec))) + xmax_local=max(xmin_local,xstore(ibool(ix,iy,iz,ispec))) + ymin_local=min(ymin_local,ystore(ibool(ix,iy,iz,ispec))) + ymax_local=max(ymin_local,ystore(ibool(ix,iy,iz,ispec))) + zmin_local=min(zmin_local,zstore(ibool(ix,iy,iz,ispec))) + zmax_local=max(zmax_local,zstore(ibool(ix,iy,iz,ispec))) + enddo + enddo + enddo + + ! =========== calcul du rayon min et max correspondant au pave + call rayon_min_max(R_EARTH-zmax,xmin_local,xmax_local,ymin_local,ymax_local,zmin_local,zmax_local,pmin,pmax) + + ! indice sur grille fine d'integration (sphere cubique) !! ajout de +/-2 pour deborder sur l'element adjacent + kmin = 1+ floor((pmin-r_bot)/(r_earth-r_bot)*(nnz-1) ) !- 2 + kmax = 1+ floor((pmax-r_bot)/(r_earth-r_bot)*(nnz-1) ) !+ 2 + + call ksi_eta_min_max(R_EARTH-zmax,xmin_local,xmax_local,ymin_local,ymax_local,zmin_local,zmax_local,& + ksimin,ksimax,etamin,etamax) + + ! indice sur grille fine d'integration (sphere cubique) + imin = floor(1. + (NNX - 1) * (ksimin + 0.5d0 * ANGULAR_WIDTH_XI_RAD) / ANGULAR_WIDTH_XI_RAD) !- 2 + jmin = floor(1. + (NNY - 1) * (etamin + 0.5d0 * ANGULAR_WIDTH_ETA_RAD) / ANGULAR_WIDTH_ETA_RAD) !- 2 + + ! indice sur grille fine d'integration (sphere cubique) + imax = floor(1. + (NNX - 1) * (ksimax + 0.5d0 * ANGULAR_WIDTH_XI_RAD) / ANGULAR_WIDTH_XI_RAD) !+ 2 + jmax = floor(1. + (NNY - 1) * (etamax + 0.5d0 * ANGULAR_WIDTH_ETA_RAD) / ANGULAR_WIDTH_ETA_RAD) !+ 2 + !write(666,*) ksimax , ANGULAR_WIDTH_XI_RAD , ((ksimax + 0.5d0 * ANGULAR_WIDTH_XI_RAD) / ANGULAR_WIDTH_XI_RAD) + + imin=max(imin,1) + imax=min(imax,nx) + jmin=max(jmin,1) + jmax=min(jmax,ny) + kmin=max(kmin,1) + kmax=min(kmax,nz) + + !================calcul de la valeur du noyau au centre de chaque cellule de la grille tomo + + do k=kmin,kmax + + z_centred = r_bot + (k-0.5d0)*hz ! valeur au centre de la cellule (sphere cubique) + profondeur_courante = R_EARTH - z_centred + !write(*,*) R_EARTH, z_centred, profondeur_courante + do j=jmin,jmax + + ratio_eta = (dble(j)-0.5d0) / dble(NY) + y_centred = 2.d0*ratio_eta-1 + y_centred = tan((ANGULAR_WIDTH_ETA_RAD/2.d0) * y_centred) + + + do i=imin,imax + + index_cellule = i + (j-1)*(nnx-1) + (k-1)*(nnx-1)*(nny-1) + + ratio_xi = (dble(i)-0.5d0) / dble(NX) + x_centred = 2.d0*ratio_xi-1 + x_centred = tan((ANGULAR_WIDTH_XI_RAD/2.d0) * x_centred) + + + ! on repasse en cartesien pour travailler dans le repere SEM + px = x_centred*z_centred + py = y_centred*z_centred + pz = -(R_EARTH - z_centred/dsqrt(1.d0 + y_centred**2 + x_centred**2) - zmax) + + ! on cherche le xix, eta et gamma du point central qui est px,py,pz + call Find_xix_eta_gamma(xstore_local,ystore_local,zstore_local,xi,eta,gamma,px,py,pz) + + ! on regarde si on est bien dans l'element ispec pour faire la correspondance SEM <=> tomo + if (dabs(xi)<=1.05d0.and.dabs(eta)<=1.05d0.and.dabs(gamma)<=1.05d0) then + + + indice(i,j,k)=1 ! on a bien visite la cellule de la grille + xstore_tomo_grid(i,j,k)=px + ystore_tomo_grid(i,j,k)=py + zstore_tomo_grid(i,j,k)=pz + profondeur_tomo_grid(i,j,k)=profondeur_courante + + else + + endif + + ! == calcul des 8 sommets de la cellule d'integration ===================== + ! 1 + rx=1.d0;ry=1.d0;rz=1.d0 + + pz = r_bot + (dble(k)-rz)*hz + + ratio_eta = (dble(j)-ry) / dble(NY) + y = 2.d0*ratio_eta-1;y = tan((ANGULAR_WIDTH_ETA_RAD/2.d0) * y) + + ratio_xi = (dble(i)-rx) / dble(NX) + x = 2.d0*ratio_xi-1;x = tan((ANGULAR_WIDTH_XI_RAD/2.d0) * x) + + px = x*pz; py = y*pz + pz = -(R_EARTH - pz/dsqrt(1.d0 + y*y + x*x) - zmax) + + + + xstore_local_int(1) = px + ystore_local_int(1) = py + zstore_local_int(1) = pz + + ! 2 + rx=0.d0;ry=1.d0;rz=1.d0 + + pz = r_bot + (dble(k)-rz)*hz + + ratio_eta = (dble(j)-ry) / dble(NY) + y = 2.d0*ratio_eta-1;y = tan((ANGULAR_WIDTH_ETA_RAD/2.d0) * y) + + ratio_xi = (dble(i)-rx) / dble(NX) + x = 2.d0*ratio_xi-1;x = tan((ANGULAR_WIDTH_XI_RAD/2.d0) * x) + + px = x*pz; py = y*pz + pz = -(R_EARTH - pz/dsqrt(1.d0 + y*y + x*x) - zmax) + + + + xstore_local_int(2) = px + ystore_local_int(2) = py + zstore_local_int(2) = pz + + ! 3 + rx=0.d0;ry=0.d0;rz=1.d0 + + pz = r_bot + (dble(k)-rz)*hz + + ratio_eta = (dble(j)-ry) / dble(NY) + y = 2.d0*ratio_eta-1;y = tan((ANGULAR_WIDTH_ETA_RAD/2.d0) * y) + + ratio_xi = (dble(i)-rx) / dble(NX) + x = 2.d0*ratio_xi-1;x = tan((ANGULAR_WIDTH_XI_RAD/2.d0) * x) + + px = x*pz; py = y*pz + pz = -(R_EARTH - pz/dsqrt(1.d0 + y*y + x*x) - zmax) + + + + xstore_local_int(3) = px + ystore_local_int(3) = py + zstore_local_int(3) = pz + + + ! 4 + rx=1.d0;ry=0.d0;rz=1.d0 + + pz = r_bot + (dble(k)-rz)*hz + + ratio_eta = (dble(j)-ry) / dble(NY) + y = 2.d0*ratio_eta-1;y = tan((ANGULAR_WIDTH_ETA_RAD/2.d0) * y) + + ratio_xi = (dble(i)-rx) / dble(NX) + x = 2.d0*ratio_xi-1;x = tan((ANGULAR_WIDTH_XI_RAD/2.d0) * x) + + px = x*pz; py = y*pz + pz = -(R_EARTH - pz/dsqrt(1.d0 + y*y + x*x) - zmax) + + + + xstore_local_int(4) = px + ystore_local_int(4) = py + zstore_local_int(4) = pz + + ! 5 + rx=1.d0;ry=1.d0;rz=0.d0 + + pz = r_bot + (dble(k)-rz)*hz + + ratio_eta = (dble(j)-ry) / dble(NY) + y = 2.d0*ratio_eta-1;y = tan((ANGULAR_WIDTH_ETA_RAD/2.d0) * y) + + ratio_xi = (dble(i)-rx) / dble(NX) + x = 2.d0*ratio_xi-1;x = tan((ANGULAR_WIDTH_XI_RAD/2.d0) * x) + + px = x*pz; py = y*pz + pz = -(R_EARTH - pz/dsqrt(1.d0 + y*y + x*x) - zmax) + + + + xstore_local_int(5) = px + ystore_local_int(5) = py + zstore_local_int(5) = pz + + + + ! 6 + rx=0.d0;ry=1.d0;rz=0.d0 + + pz = r_bot + (dble(k)-rz)*hz + + ratio_eta = (dble(j)-ry) / dble(NY) + y = 2.d0*ratio_eta-1;y = tan((ANGULAR_WIDTH_ETA_RAD/2.d0) * y) + + ratio_xi = (dble(i)-rx) / dble(NX) + x = 2.d0*ratio_xi-1;x = tan((ANGULAR_WIDTH_XI_RAD/2.d0) * x) + + px = x*pz; py = y*pz + pz = -(R_EARTH - pz/dsqrt(1.d0 + y*y + x*x) - zmax) + + + + xstore_local_int(6) = px + ystore_local_int(6) = py + zstore_local_int(6) = pz + + ! 7 + rx=0.d0;ry=0.d0;rz=0.d0 + + pz = r_bot + (dble(k)-rz)*hz + + ratio_eta = (dble(j)-ry) / dble(NY) + y = 2.d0*ratio_eta-1;y = tan((ANGULAR_WIDTH_ETA_RAD/2.d0) * y) + + ratio_xi = (dble(i)-rx) / dble(NX) + x = 2.d0*ratio_xi-1;x = tan((ANGULAR_WIDTH_XI_RAD/2.d0) * x) + + px = x*pz; py = y*pz + pz = -(R_EARTH - pz/dsqrt(1.d0 + y*y + x*x) - zmax) + + + + xstore_local_int(7) = px + ystore_local_int(7) = py + zstore_local_int(7) = pz + + + ! 8 + rx=1.d0;ry=0.d0;rz=0.d0 + + pz = r_bot + (dble(k)-rz)*hz + + ratio_eta = (dble(j)-ry) / dble(NY) + y = 2.d0*ratio_eta-1;y = tan((ANGULAR_WIDTH_ETA_RAD/2.d0) * y) + + ratio_xi = (dble(i)-rx) / dble(NX) + x = 2.d0*ratio_xi-1;x = tan((ANGULAR_WIDTH_XI_RAD/2.d0) * x) + + px = x*pz; py = y*pz + pz = -(R_EARTH - pz/dsqrt(1.d0 + y*y + x*x) - zmax) + + + + xstore_local_int(8) = px + ystore_local_int(8) = py + zstore_local_int(8) = pz + + ! ========== calcul des points GLL + call calcule_point_gll(xgll,ygll,zgll,xstore_local_int,ystore_local_int,zstore_local_int,shape3D) + + ! ========== interpolation de la fonciton dat aux points GLL + do kgll = 1,NGLLZ + do jgll = 1,NGLLY + do igll = 1,NGLLX + + + + px = xgll(igll,jgll,kgll) + py = ygll(igll,jgll,kgll) + pz = zgll(igll,jgll,kgll) + + call Find_xix_eta_gamma(xstore_local,ystore_local,zstore_local,xi,eta,gamma,px,py,pz) + + if (dabs(xi)<=1.05d0.and.dabs(eta)<=1.05d0.and.dabs(gamma)<=1.05d0) then + + call interpolation_valeur(valeur,px,py,pz,dat_to_project1,xstore_local,ystore_local,zstore_local,& + ispec,NSPEC_AB,xigll,yigll,zigll) + valeur_integration1(igll,jgll,kgll,index_cellule)=valeur + + + call interpolation_valeur(valeur,px,py,pz,dat_to_project2,xstore_local,ystore_local,zstore_local,& + ispec,NSPEC_AB,xigll,yigll,zigll) + valeur_integration2(igll,jgll,kgll,index_cellule)=valeur + + call interpolation_valeur(valeur,px,py,pz,dat_to_project3,xstore_local,ystore_local,zstore_local,& + ispec,NSPEC_AB,xigll,yigll,zigll) + valeur_integration3(igll,jgll,kgll,index_cellule)=valeur + + + call interpolation_valeur(valeur,px,py,pz,dat_to_project4,xstore_local,ystore_local,zstore_local,& + ispec,NSPEC_AB,xigll,yigll,zigll) + valeur_integration4(igll,jgll,kgll,index_cellule)=valeur + + indice_integration(igll,jgll,kgll,index_cellule)=1 + + else + + + endif + + enddo + enddo + enddo + + + ! ========================= on cherche les points GLL qui sont dans la cellule de la grille tomo + call calcule_point_gll(xgll,ygll,zgll,xstore_local,ystore_local,zstore_local,shape3D) + do kgll = 1,NGLLZ + do jgll = 1,NGLLY + do igll = 1,NGLLX + + + + px = xgll(igll,jgll,kgll) + py = ygll(igll,jgll,kgll) + pz = zgll(igll,jgll,kgll) + call Find_xix_eta_gamma(xstore_local_int,ystore_local_int,zstore_local_int,xi,eta,gamma,px,py,pz) + + if (dabs(xi)<=1.05d0.and.dabs(eta)<=1.05d0.and.dabs(gamma)<=1.05d0) then + + indice_grille_i(igll,jgll,kgll,ispec) = i + indice_grille_i1(igll,jgll,kgll,ispec)= i + + indice_grille_j(igll,jgll,kgll,ispec) = j + indice_grille_j1(igll,jgll,kgll,ispec)= j + + indice_grille_k(igll,jgll,kgll,ispec) = k + indice_grille_k1(igll,jgll,kgll,ispec)= k + + if (xi > 0. ) then + if (i1) indice_grille_i1(igll,jgll,kgll,ispec) = i-1 + endif + + if (eta > 0. ) then + if (j1) indice_grille_j1(igll,jgll,kgll,ispec) = j-1 + endif + + if (gamma > 0. ) then + if (k1) indice_grille_k1(igll,jgll,kgll,ispec) = k-1 + endif + + endif + + enddo + enddo + enddo + + ! =========================================================== + + + enddo + enddo + enddo + + enddo !==== boucle ispec + + + if (myrank==0) then + call cpu_time(finish) + write(*,*) 'time // proj 0: ', finish-start + call cpu_time(start) + endif + !! === verif des correspondances (gll,ispec) -> tomo + do ispec=1,nspec_ab + do kgll = 1,NGLLZ + do jgll = 1,NGLLY + do igll = 1,NGLLX + + !! patch ad hoc pour effet de bords + if (indice_grille_i(igll,jgll,kgll,ispec)==0 .and. igll==1) then + indice_grille_i(igll,jgll,kgll,ispec)=indice_grille_i(igll+1,jgll,kgll,ispec) + indice_grille_j(igll,jgll,kgll,ispec)=indice_grille_j(igll+1,jgll,kgll,ispec) + indice_grille_k(igll,jgll,kgll,ispec)=indice_grille_k(igll+1,jgll,kgll,ispec) + endif + + if (indice_grille_i(igll,jgll,kgll,ispec)==0 .and. igll==5) then + indice_grille_i(igll,jgll,kgll,ispec)=indice_grille_i(igll-1,jgll,kgll,ispec) + indice_grille_j(igll,jgll,kgll,ispec)=indice_grille_j(igll-1,jgll,kgll,ispec) + indice_grille_k(igll,jgll,kgll,ispec)=indice_grille_k(igll-1,jgll,kgll,ispec) + endif + + + if (indice_grille_i(igll,jgll,kgll,ispec)==0 .and. jgll==1) then + indice_grille_i(igll,jgll,kgll,ispec)=indice_grille_i(igll,jgll+1,kgll,ispec) + indice_grille_j(igll,jgll,kgll,ispec)=indice_grille_j(igll,jgll+1,kgll,ispec) + indice_grille_k(igll,jgll,kgll,ispec)=indice_grille_k(igll,jgll+1,kgll,ispec) + endif + + + if (indice_grille_i(igll,jgll,kgll,ispec)==0 .and. jgll==5) then + indice_grille_i(igll,jgll,kgll,ispec)=indice_grille_i(igll,jgll-1,kgll,ispec) + indice_grille_j(igll,jgll,kgll,ispec)=indice_grille_j(igll,jgll-1,kgll,ispec) + indice_grille_k(igll,jgll,kgll,ispec)=indice_grille_k(igll,jgll-1,kgll,ispec) + endif + + if (indice_grille_i(igll,jgll,kgll,ispec)==0 .and. kgll==1) then + indice_grille_i(igll,jgll,kgll,ispec)=indice_grille_i(igll,jgll,kgll+1,ispec) + indice_grille_j(igll,jgll,kgll,ispec)=indice_grille_j(igll,jgll,kgll+1,ispec) + indice_grille_k(igll,jgll,kgll,ispec)=indice_grille_k(igll,jgll,kgll+1,ispec) + endif + + + if (indice_grille_i(igll,jgll,kgll,ispec)==0 .and. kgll==5) then + indice_grille_i(igll,jgll,kgll,ispec)=indice_grille_i(igll,jgll,kgll-1,ispec) + indice_grille_j(igll,jgll,kgll,ispec)=indice_grille_j(igll,jgll,kgll-1,ispec) + indice_grille_k(igll,jgll,kgll,ispec)=indice_grille_k(igll,jgll,kgll-1,ispec) + endif + + + if (indice_grille_i(igll,jgll,kgll,ispec)==0 .and. jgll==1 .and. kgll==1) then + indice_grille_i(igll,jgll,kgll,ispec)=indice_grille_i(igll,jgll+1,kgll+1,ispec) + indice_grille_j(igll,jgll,kgll,ispec)=indice_grille_j(igll,jgll+1,kgll+1,ispec) + indice_grille_k(igll,jgll,kgll,ispec)=indice_grille_k(igll,jgll+1,kgll+1,ispec) + endif + + + if (indice_grille_i(igll,jgll,kgll,ispec)==0 .and. jgll==5 .and. kgll==5) then + indice_grille_i(igll,jgll,kgll,ispec)=indice_grille_i(igll,jgll-1,kgll-1,ispec) + indice_grille_j(igll,jgll,kgll,ispec)=indice_grille_j(igll,jgll-1,kgll-1,ispec) + indice_grille_k(igll,jgll,kgll,ispec)=indice_grille_k(igll,jgll-1,kgll-1,ispec) + endif + + if (indice_grille_i(igll,jgll,kgll,ispec)==0 .and. igll==1 .and. jgll==1) then + indice_grille_i(igll,jgll,kgll,ispec)=indice_grille_i(igll+1,jgll+1,kgll,ispec) + indice_grille_j(igll,jgll,kgll,ispec)=indice_grille_j(igll+1,jgll+1,kgll,ispec) + indice_grille_k(igll,jgll,kgll,ispec)=indice_grille_k(igll+1,jgll+1,kgll,ispec) + endif + + + if (indice_grille_i(igll,jgll,kgll,ispec)==0 .and. igll==5 .and. jgll==5) then + indice_grille_i(igll,jgll,kgll,ispec)=indice_grille_i(igll-1,jgll-1,kgll,ispec) + indice_grille_j(igll,jgll,kgll,ispec)=indice_grille_j(igll-1,jgll-1,kgll,ispec) + indice_grille_k(igll,jgll,kgll,ispec)=indice_grille_k(igll-1,jgll-1,kgll,ispec) + endif + + + + enddo + enddo + enddo + enddo + if (myrank==0) then + call cpu_time(finish) + write(*,*) 'time // proj : ', finish-start + endif + + valeur_int_glob(:,:,:,:)=0._CUSTOM_REAL + call mpi_reduce(valeur_integration1,valeur_int_glob,NGLLX*NGLLY*NGLLZ*(nnx-1)*(nny-1)*(nnz-1),CUSTOM_MPI_TYPE, MPI_SUM,0,MPI_COMM_WORLD,ier) + valeur_integration1(:,:,:,:) = valeur_int_glob(:,:,:,:) + + valeur_int_glob(:,:,:,:)=0._CUSTOM_REAL + call mpi_reduce(valeur_integration2,valeur_int_glob,NGLLX*NGLLY*NGLLZ*(nnx-1)*(nny-1)*(nnz-1),CUSTOM_MPI_TYPE, MPI_SUM,0,MPI_COMM_WORLD,ier) + valeur_integration2(:,:,:,:) = valeur_int_glob(:,:,:,:) + + valeur_int_glob(:,:,:,:)=0._CUSTOM_REAL + call mpi_reduce(valeur_integration3,valeur_int_glob,NGLLX*NGLLY*NGLLZ*(nnx-1)*(nny-1)*(nnz-1),CUSTOM_MPI_TYPE, MPI_SUM,0,MPI_COMM_WORLD,ier) + valeur_integration3(:,:,:,:) = valeur_int_glob(:,:,:,:) + + valeur_int_glob(:,:,:,:)=0._CUSTOM_REAL + call mpi_reduce(valeur_integration4,valeur_int_glob,NGLLX*NGLLY*NGLLZ*(nnx-1)*(nny-1)*(nnz-1),CUSTOM_MPI_TYPE, MPI_SUM,0,MPI_COMM_WORLD,ier) + valeur_integration4(:,:,:,:) = valeur_int_glob(:,:,:,:) + + call mpi_reduce(indice_integration,indice_int_glob,NGLLX*NGLLY*NGLLZ*(nnx-1)*(nny-1)*(nnz-1),MPI_INTEGER, MPI_SUM,0,MPI_COMM_WORLD,ier) + call mpi_reduce(indice,indice_glob,(nnx-1)*(nny-1)*(nnz-1),MPI_INTEGER ,MPI_SUM,0, MPI_COMM_WORLD, ierr) + + call mpi_reduce(xstore_tomo_grid,work_array,(nnx-1)*(nny-1)*(nnz-1),MPI_DOUBLE_PRECISION ,MPI_SUM,0, MPI_COMM_WORLD, ierr) + xstore_tomo_grid(:,:,:)=work_array(:,:,:) + + call mpi_reduce(ystore_tomo_grid,work_array,(nnx-1)*(nny-1)*(nnz-1),MPI_DOUBLE_PRECISION ,MPI_SUM,0, MPI_COMM_WORLD, ierr) + ystore_tomo_grid(:,:,:)=work_array(:,:,:) + + call mpi_reduce(zstore_tomo_grid,work_array,(nnx-1)*(nny-1)*(nnz-1),MPI_DOUBLE_PRECISION ,MPI_SUM,0, MPI_COMM_WORLD, ierr) + zstore_tomo_grid(:,:,:)=work_array(:,:,:) + + call mpi_reduce( profondeur_tomo_grid,work_array,(nnx-1)*(nny-1)*(nnz-1),MPI_DOUBLE_PRECISION ,MPI_SUM,0, MPI_COMM_WORLD, ierr) + profondeur_tomo_grid(:,:,:)=work_array(:,:,:) + + indice(:,:,:) = indice_glob(:,:,:) + indice_integration(:,:,:,:) = indice_int_glob(:,:,:,:) + + +!================== 2/ projection sur grille tomo ===================================== + + if (myrank==0) then !======================== myrank=0 + call cpu_time(start) + index_cellule=0 + do k=1,nnz-1 + do j=1,nny-1 + do i=1,nnx-1 + index_cellule=index_cellule+1 + + if (indice(i,j,k)/=0) then + xstore_tomo_grid(i,j,k) = xstore_tomo_grid(i,j,k) / real(indice(i,j,k),8) + ystore_tomo_grid(i,j,k) = ystore_tomo_grid(i,j,k) / real(indice(i,j,k),8) + zstore_tomo_grid(i,j,k) = zstore_tomo_grid(i,j,k) / real(indice(i,j,k),8) + profondeur_tomo_grid(i,j,k) = profondeur_tomo_grid(i,j,k) / real(indice(i,j,k),8) + else + write(*,*) 'point oublie :' ,i,j,k + endif + + + !! on reagarde si les points on ete visites et combien de fois? + do kgll=1,NGLLZ + do jgll=1,NGLLY + do igll=1,NGLLX + + if (indice_integration(igll,jgll,kgll,index_cellule) == 0) then !! le point n'a pas ete visite + + !! chercher le point le plus proche qui est a ete visite + ! premier patch : devrait marcher pour mon cas cartesien + if (kgll==1 .and. indice_integration(igll,jgll,kgll+1,index_cellule) > 0) then + + valeur_integration1(igll,jgll,kgll,index_cellule) = valeur_integration1(igll,jgll,kgll+1,index_cellule) /& + real(indice_integration(igll,jgll,kgll+1,index_cellule),CUSTOM_REAL) + valeur_integration2(igll,jgll,kgll,index_cellule) = valeur_integration2(igll,jgll,kgll+1,index_cellule) /& + real(indice_integration(igll,jgll,kgll+1,index_cellule),CUSTOM_REAL) + valeur_integration3(igll,jgll,kgll,index_cellule) = valeur_integration3(igll,jgll,kgll+1,index_cellule) /& + real(indice_integration(igll,jgll,kgll+1,index_cellule),CUSTOM_REAL) + valeur_integration4(igll,jgll,kgll,index_cellule) = valeur_integration4(igll,jgll,kgll+1,index_cellule) /& + real(indice_integration(igll,jgll,kgll+1,index_cellule),CUSTOM_REAL) + + endif + else ! le point a ete visite "indice_integration" fois +!!$ ! on divise par indice pour avoir la valeur moyenne car on a fait un MPI_SUM + + valeur_integration1(igll,jgll,kgll,index_cellule) = valeur_integration1(igll,jgll,kgll,index_cellule)/& + real(indice_integration(igll,jgll,kgll,index_cellule),CUSTOM_REAL) + valeur_integration2(igll,jgll,kgll,index_cellule) = valeur_integration2(igll,jgll,kgll,index_cellule)/& + real(indice_integration(igll,jgll,kgll,index_cellule),CUSTOM_REAL) + valeur_integration3(igll,jgll,kgll,index_cellule) = valeur_integration3(igll,jgll,kgll,index_cellule)/& + real(indice_integration(igll,jgll,kgll,index_cellule),CUSTOM_REAL) + valeur_integration4(igll,jgll,kgll,index_cellule) = valeur_integration4(igll,jgll,kgll,index_cellule)/& + real(indice_integration(igll,jgll,kgll,index_cellule),CUSTOM_REAL) + + endif + + enddo + enddo + enddo + enddo + enddo + enddo + + + !===== boucle grille tomo : verifier qu'on fait exactement la meme boucle que precedemment + np=0 + do k=1,nnz-1 ! grille integration (sphere cubique) + + + p0= r_bot + (k-1)*hz + p1= r_bot + k*hz + + do j=2,nny ! grille integration (sphere cubique) + + + ratio_eta = (dble(j-2)) / dble(NY) + y0 = 2.d0*ratio_eta-1 + y0 = tan((ANGULAR_WIDTH_ETA_RAD/2.d0) * y0) + + ratio_eta = (dble(j-1)) / dble(NY) + y1 = 2.d0*ratio_eta-1 + y1 = tan((ANGULAR_WIDTH_ETA_RAD/2.d0) * y1) + + + do i=2,nnx ! grille integration (sphere cubique) + + index_cellule=i-1+(j-2)*(nnx-1)+(k-1)*(nnx-1)*(nny-1) + + ratio_xi = (dble(i-2)) / dble(NX) + x0 = 2.d0*ratio_xi-1 + x0 = tan((ANGULAR_WIDTH_XI_RAD/2.d0) * x0) + + ratio_xi = (dble(i-1)) / dble(NX) + x1 = 2.d0*ratio_xi-1 + x1 = tan((ANGULAR_WIDTH_XI_RAD/2.d0) * x1) + + !===== calcul des 8 sommets de la cellule d'integration dans le repere cartesien SEM + + ! 1 + x=x0;y=y0;p=p0 + xstore_local(1) = x*p + ystore_local(1) = y*p + zstore_local(1) = -(R_EARTH - p/dsqrt(1.d0 + y*y + x*x) - zmax) + + ! 2 + x=x1;y=y0;p=p0 + xstore_local(2) = x*p + ystore_local(2) = y*p + zstore_local(2) = -(R_EARTH - p/dsqrt(1.d0 + y*y + x*x) - zmax) + + ! 3 + x=x1;y=y1;p=p0 + xstore_local(3) = x*p + ystore_local(3) = y*p + zstore_local(3) = -(R_EARTH - p/dsqrt(1.d0 + y*y + x*x) - zmax) + + ! 4 + x=x0;y=y1;p=p0 + xstore_local(4) = x*p + ystore_local(4) = y*p + zstore_local(4) = -(R_EARTH - p/dsqrt(1.d0 + y*y + x*x) - zmax) + + ! 5 + x=x0;y=y0;p=p1 + xstore_local(5) = x*p + ystore_local(5) = y*p + zstore_local(5) = -(R_EARTH - p/dsqrt(1.d0 + y*y + x*x) - zmax) + + ! 6 + x=x1;y=y0;p=p1 + xstore_local(6) = x*p + ystore_local(6) = y*p + zstore_local(6) = -(R_EARTH - p/dsqrt(1.d0 + y*y + x*x) - zmax) + + ! 7 + x=x1;y=y1;p=p1 + xstore_local(7) = x*p + ystore_local(7) = y*p + zstore_local(7) = -(R_EARTH - p/dsqrt(1.d0 + y*y + x*x) - zmax) + + + ! 8 + x=x0;y=y1;p=p1 + xstore_local(8) = x*p + ystore_local(8) = y*p + zstore_local(8) = -(R_EARTH - p/dsqrt(1.d0 + y*y + x*x) - zmax) + + ! === calcul de l'integrale de volume + call compute_volume_int(volume1,xstore_local,ystore_local,zstore_local,wxgll,wygll,wzgll,& + shape3D,dershape3D,valeur_integration1,index_cellule,(nnx-1)*(nny-1)*(nnz-1)) + + call compute_volume_int(volume2,xstore_local,ystore_local,zstore_local,wxgll,wygll,wzgll,& + shape3D,dershape3D,valeur_integration2,index_cellule,(nnx-1)*(nny-1)*(nnz-1)) + + call compute_volume_int(volume3,xstore_local,ystore_local,zstore_local,wxgll,wygll,wzgll,& + shape3D,dershape3D,valeur_integration3,index_cellule,(nnx-1)*(nny-1)*(nnz-1)) + + call compute_volume_int(volume4,xstore_local,ystore_local,zstore_local,wxgll,wygll,wzgll,& + shape3D,dershape3D,valeur_integration4,index_cellule,(nnx-1)*(nny-1)*(nnz-1)) + + if (ires==1) then + ! === si on veut faire juste la projection du modele, on ne doit pas normaliser par + ! === le volume de la cellule, on prend plutot la valeur moyenne. + call compute_volume_int(volume_cellule,xstore_local,ystore_local,zstore_local,wxgll,wygll,wzgll,& + shape3D,dershape3D,volume_integration,index_cellule,(nnx-1)*(nny-1)*(nnz-1)) + volume1=volume1/volume_cellule + volume2=volume2/volume_cellule + volume3=volume3/volume_cellule + volume4=volume4/volume_cellule + endif + + if (indice(i-1,j-1,k)==0) then + ! on a oublie le point i,j,k + np=np+1 + !write(30,*) i,j,k + else + + data_tomo1(i-1,j-1,k) = volume1 + data_tomo2(i-1,j-1,k) = volume2 + data_tomo3(i-1,j-1,k) = volume3 + data_tomo4(i-1,j-1,k) = volume4 + + endif + + enddo + enddo + + enddo + call cpu_time(finish) + write(*,*) 'time seq. ',finish-start + !! DEBUG + + !! + endif + call mpi_bcast(data_tomo1,nx*ny*nz,CUSTOM_MPI_TYPE,0,MPI_COMM_WORLD,ier) + call mpi_bcast(data_tomo2,nx*ny*nz,CUSTOM_MPI_TYPE,0,MPI_COMM_WORLD,ier) + call mpi_bcast(data_tomo3,nx*ny*nz,CUSTOM_MPI_TYPE,0,MPI_COMM_WORLD,ier) + call mpi_bcast(data_tomo4,nx*ny*nz,CUSTOM_MPI_TYPE,0,MPI_COMM_WORLD,ier) + call mpi_bcast(profondeur_tomo_grid,nx*ny*nz,MPI_DOUBLE_PRECISION,0,MPI_COMM_WORLD,ier) + + + end subroutine project_tomo_grid_4 + + + + + + + + + + subroutine project_tomo_grid_2(dat_to_project1,dat_to_project2,ires) + + integer ispec,ires,ix,iy,iz + integer i,j,k,igll,jgll,kgll + integer imin,imax,jmin,jmax,kmin,kmax + integer index_cellule,ierr,np + double precision ANGULAR_WIDTH_ETA_RAD,ANGULAR_WIDTH_XI_RAD,deg2rad + double precision, parameter :: R_EARTH=6371000.d0 + double precision profondeur_courante + double precision rx,ry,rz + double precision x,y,z,x_centred,y_centred,z_centred + double precision x0,x1,y0,y1,p0,p1,p,volume_cellule + double precision volume1,volume2,volume3,volume4 + real(kind=CUSTOM_REAL) dat_to_project1(NGLLX,NGLLY,NGLLZ,NSPEC_AB) + real(kind=CUSTOM_REAL) dat_to_project2(NGLLX,NGLLY,NGLLZ,NSPEC_AB) + !real(kind=CUSTOM_REAL) dat_to_project3(NGLLX,NGLLY,NGLLZ,NSPEC_AB) + !real(kind=CUSTOM_REAL) dat_to_project4(NGLLX,NGLLY,NGLLZ,NSPEC_AB) + integer :: iii,jjj,kkk + + + ! il faut definir dat (ie grad ou modele) + !write(debug_file,'(a3,i4.4)') 'dbp',myrank + !open(666,file=trim(debug_file)) + deg2rad = 3.141592653589793d0/180.d0 + + ! initialization + !! DEBUG + !dat_to_project(:,:,:,:) = 10._CUSTOM_REAL + !! + data_tomo1(:,:,:)=0._CUSTOM_REAL + data_tomo2(:,:,:)=0._CUSTOM_REAL + data_tomo3(:,:,:)=0._CUSTOM_REAL + data_tomo4(:,:,:)=0._CUSTOM_REAL + + vol_data(:,:,:)=0._CUSTOM_REAL + indice(:,:,:)=0 + indice_glob(:,:,:)=0 + indice_int_glob(:,:,:,:)=0 + valeur_int_glob(:,:,:,:)=0._CUSTOM_REAL + + valeur_integration1(:,:,:,:) = 0._CUSTOM_REAL + valeur_integration2(:,:,:,:) = 0._CUSTOM_REAL + valeur_integration3(:,:,:,:) = 0._CUSTOM_REAL + valeur_integration4(:,:,:,:) = 0._CUSTOM_REAL + + volume_integration(:,:,:,:) = 1._CUSTOM_REAL + indice_integration(:,:,:,:) = 0 + indice_grille_i(:,:,:,:)=0 + indice_grille_j(:,:,:,:)=0 + indice_grille_k(:,:,:,:)=0 + + xstore_tomo_grid(:,:,:)=0.d0 + ystore_tomo_grid(:,:,:)=0.d0 + zstore_tomo_grid(:,:,:)=0.d0 + profondeur_tomo_grid(:,:,:)=0.d0 + +!======== on se met dans la sphere cubique et on definit le pas des grilles + + ANGULAR_WIDTH_XI_RAD = 2.d0* dasin(dabs(xmin*1.00001)/R_EARTH) + ANGULAR_WIDTH_ETA_RAD = 2.d0* dasin(dabs(ymin*1.00001)/R_EARTH) + + hx = ANGULAR_WIDTH_XI_RAD / (nx) + hy = ANGULAR_WIDTH_ETA_RAD / (ny) + hz = (r_earth-r_bot) / (nz) + + if (myrank==0) then + !print *, 'Total number of points: ', np + !print *, 'domain :' + !print *, 'Xmin, Xmax :', xmin,xmax + !print *, 'Ymin, Ymax :', ymin,ymax + !print *, 'Zmin, Zmax :', zmin,zmax + !print *, ' ' + !print *, 'angular width xi : ',ANGULAR_WIDTH_XI_RAD/deg2rad + !print *, 'angular width eta : ',ANGULAR_WIDTH_ETA_RAD/deg2rad + !print *, 'hx , hy, hz : ' , hx/deg2rad, hy/deg2rad, hz/1000. + + ! informations relatives a la grille + open(10,file='grille.par') + write(10,*) nx,ny,nz + write(10,*) ANGULAR_WIDTH_XI_RAD, ANGULAR_WIDTH_ETA_RAD + write(10,*) r_earth,r_bot,hz + write(10,*) + close(10) + endif + + if (myrank==0) call cpu_time(start) + !================================== 1/ interpolation grille tomographique ========================================= + !write(666,*) 'nb el spectraux :' ,NSPEC_AB + do ispec = 1, NSPEC_AB !===== boucle element ispec + + xmin_local = HUGEVAL + xmax_local = -HUGEVAL + ymin_local = HUGEVAL + ymax_local = -HUGEVAL + zmin_local = HUGEVAL + zmax_local = -HUGEVAL + + !======================= Sommets de l'element ============ +!1 + xstore_local(1)=xstore(ibool(1,1,1,ispec)) + ystore_local(1)=ystore(ibool(1,1,1,ispec)) + zstore_local(1)=zstore(ibool(1,1,1,ispec)) +!2 + xstore_local(2)=xstore(ibool(NGLLX,1,1,ispec)) + ystore_local(2)=ystore(ibool(NGLLX,1,1,ispec)) + zstore_local(2)=zstore(ibool(NGLLX,1,1,ispec)) +!3 + xstore_local(3)=xstore(ibool(NGLLX,NGLLY,1,ispec)) + ystore_local(3)=ystore(ibool(NGLLX,NGLLY,1,ispec)) + zstore_local(3)=zstore(ibool(NGLLX,NGLLY,1,ispec)) +!4 + xstore_local(4)=xstore(ibool(1,NGLLY,1,ispec)) + ystore_local(4)=ystore(ibool(1,NGLLY,1,ispec)) + zstore_local(4)=zstore(ibool(1,NGLLY,1,ispec)) +!5 + xstore_local(5)=xstore(ibool(1,1,NGLLZ,ispec)) + ystore_local(5)=ystore(ibool(1,1,NGLLZ,ispec)) + zstore_local(5)=zstore(ibool(1,1,NGLLZ,ispec)) +!6 + xstore_local(6)=xstore(ibool(NGLLX,1,NGLLZ,ispec)) + ystore_local(6)=ystore(ibool(NGLLX,1,NGLLZ,ispec)) + zstore_local(6)=zstore(ibool(NGLLX,1,NGLLZ,ispec)) +!7 + xstore_local(7)=xstore(ibool(NGLLX,NGLLY,NGLLZ,ispec)) + ystore_local(7)=ystore(ibool(NGLLX,NGLLY,NGLLZ,ispec)) + zstore_local(7)=zstore(ibool(NGLLX,NGLLY,NGLLZ,ispec)) +!8 + xstore_local(8)=xstore(ibool(1,NGLLY,NGLLZ,ispec)) + ystore_local(8)=ystore(ibool(1,NGLLY,NGLLZ,ispec)) + zstore_local(8)=zstore(ibool(1,NGLLY,NGLLZ,ispec)) + !write(*,*) zstore_local + !=============== on cherche le pave circonscrit a l'element en se basant sur les point GLL + do iz=1,NGLLZ + do iy=1,NGLLY + do ix=1,NGLLX + xmin_local=min(xmin_local,xstore(ibool(ix,iy,iz,ispec))) + xmax_local=max(xmin_local,xstore(ibool(ix,iy,iz,ispec))) + ymin_local=min(ymin_local,ystore(ibool(ix,iy,iz,ispec))) + ymax_local=max(ymin_local,ystore(ibool(ix,iy,iz,ispec))) + zmin_local=min(zmin_local,zstore(ibool(ix,iy,iz,ispec))) + zmax_local=max(zmax_local,zstore(ibool(ix,iy,iz,ispec))) + enddo + enddo + enddo + + ! =========== calcul du rayon min et max correspondant au pave + call rayon_min_max(R_EARTH-zmax,xmin_local,xmax_local,ymin_local,ymax_local,zmin_local,zmax_local,pmin,pmax) + + ! indice sur grille fine d'integration (sphere cubique) !! ajout de +/-2 pour deborder sur l'element adjacent + kmin = 1+ floor((pmin-r_bot)/(r_earth-r_bot)*(nnz-1) ) !- 2 + kmax = 1+ floor((pmax-r_bot)/(r_earth-r_bot)*(nnz-1) ) !+ 2 + + call ksi_eta_min_max(R_EARTH-zmax,xmin_local,xmax_local,ymin_local,ymax_local,zmin_local,zmax_local,& + ksimin,ksimax,etamin,etamax) + + ! indice sur grille fine d'integration (sphere cubique) + imin = floor(1. + (NNX - 1) * (ksimin + 0.5d0 * ANGULAR_WIDTH_XI_RAD) / ANGULAR_WIDTH_XI_RAD) !- 2 + jmin = floor(1. + (NNY - 1) * (etamin + 0.5d0 * ANGULAR_WIDTH_ETA_RAD) / ANGULAR_WIDTH_ETA_RAD) !- 2 + + ! indice sur grille fine d'integration (sphere cubique) + imax = floor(1. + (NNX - 1) * (ksimax + 0.5d0 * ANGULAR_WIDTH_XI_RAD) / ANGULAR_WIDTH_XI_RAD) !+ 2 + jmax = floor(1. + (NNY - 1) * (etamax + 0.5d0 * ANGULAR_WIDTH_ETA_RAD) / ANGULAR_WIDTH_ETA_RAD) !+ 2 + !write(666,*) ksimax , ANGULAR_WIDTH_XI_RAD , ((ksimax + 0.5d0 * ANGULAR_WIDTH_XI_RAD) / ANGULAR_WIDTH_XI_RAD) + + imin=max(imin,1) + imax=min(imax,nx) + jmin=max(jmin,1) + jmax=min(jmax,ny) + kmin=max(kmin,1) + kmax=min(kmax,nz) + + !================calcul de la valeur du noyau au centre de chaque cellule de la grille tomo + + do k=kmin,kmax + + z_centred = r_bot + (k-0.5d0)*hz ! valeur au centre de la cellule (sphere cubique) + profondeur_courante = R_EARTH - z_centred + !write(*,*) R_EARTH, z_centred, profondeur_courante + do j=jmin,jmax + + ratio_eta = (dble(j)-0.5d0) / dble(NY) + y_centred = 2.d0*ratio_eta-1 + y_centred = tan((ANGULAR_WIDTH_ETA_RAD/2.d0) * y_centred) + + + do i=imin,imax + + index_cellule = i + (j-1)*(nnx-1) + (k-1)*(nnx-1)*(nny-1) + + ratio_xi = (dble(i)-0.5d0) / dble(NX) + x_centred = 2.d0*ratio_xi-1 + x_centred = tan((ANGULAR_WIDTH_XI_RAD/2.d0) * x_centred) + + + ! on repasse en cartesien pour travailler dans le repere SEM + px = x_centred*z_centred + py = y_centred*z_centred + pz = -(R_EARTH - z_centred/dsqrt(1.d0 + y_centred**2 + x_centred**2) - zmax) + + ! on cherche le xix, eta et gamma du point central qui est px,py,pz + call Find_xix_eta_gamma(xstore_local,ystore_local,zstore_local,xi,eta,gamma,px,py,pz) + + ! on regarde si on est bien dans l'element ispec pour faire la correspondance SEM <=> tomo + if (dabs(xi)<=1.05d0.and.dabs(eta)<=1.05d0.and.dabs(gamma)<=1.05d0) then + + + indice(i,j,k)=1 ! on a bien visite la cellule de la grille + xstore_tomo_grid(i,j,k)=px + ystore_tomo_grid(i,j,k)=py + zstore_tomo_grid(i,j,k)=pz + profondeur_tomo_grid(i,j,k)=profondeur_courante + + else + + endif + + ! == calcul des 8 sommets de la cellule d'integration ===================== + ! 1 + rx=1.d0;ry=1.d0;rz=1.d0 + + pz = r_bot + (dble(k)-rz)*hz + + ratio_eta = (dble(j)-ry) / dble(NY) + y = 2.d0*ratio_eta-1;y = tan((ANGULAR_WIDTH_ETA_RAD/2.d0) * y) + + ratio_xi = (dble(i)-rx) / dble(NX) + x = 2.d0*ratio_xi-1;x = tan((ANGULAR_WIDTH_XI_RAD/2.d0) * x) + + px = x*pz; py = y*pz + pz = -(R_EARTH - pz/dsqrt(1.d0 + y*y + x*x) - zmax) + + + + xstore_local_int(1) = px + ystore_local_int(1) = py + zstore_local_int(1) = pz + + ! 2 + rx=0.d0;ry=1.d0;rz=1.d0 + + pz = r_bot + (dble(k)-rz)*hz + + ratio_eta = (dble(j)-ry) / dble(NY) + y = 2.d0*ratio_eta-1;y = tan((ANGULAR_WIDTH_ETA_RAD/2.d0) * y) + + ratio_xi = (dble(i)-rx) / dble(NX) + x = 2.d0*ratio_xi-1;x = tan((ANGULAR_WIDTH_XI_RAD/2.d0) * x) + + px = x*pz; py = y*pz + pz = -(R_EARTH - pz/dsqrt(1.d0 + y*y + x*x) - zmax) + + + + xstore_local_int(2) = px + ystore_local_int(2) = py + zstore_local_int(2) = pz + + ! 3 + rx=0.d0;ry=0.d0;rz=1.d0 + + pz = r_bot + (dble(k)-rz)*hz + + ratio_eta = (dble(j)-ry) / dble(NY) + y = 2.d0*ratio_eta-1;y = tan((ANGULAR_WIDTH_ETA_RAD/2.d0) * y) + + ratio_xi = (dble(i)-rx) / dble(NX) + x = 2.d0*ratio_xi-1;x = tan((ANGULAR_WIDTH_XI_RAD/2.d0) * x) + + px = x*pz; py = y*pz + pz = -(R_EARTH - pz/dsqrt(1.d0 + y*y + x*x) - zmax) + + + + xstore_local_int(3) = px + ystore_local_int(3) = py + zstore_local_int(3) = pz + + + ! 4 + rx=1.d0;ry=0.d0;rz=1.d0 + + pz = r_bot + (dble(k)-rz)*hz + + ratio_eta = (dble(j)-ry) / dble(NY) + y = 2.d0*ratio_eta-1;y = tan((ANGULAR_WIDTH_ETA_RAD/2.d0) * y) + + ratio_xi = (dble(i)-rx) / dble(NX) + x = 2.d0*ratio_xi-1;x = tan((ANGULAR_WIDTH_XI_RAD/2.d0) * x) + + px = x*pz; py = y*pz + pz = -(R_EARTH - pz/dsqrt(1.d0 + y*y + x*x) - zmax) + + + + xstore_local_int(4) = px + ystore_local_int(4) = py + zstore_local_int(4) = pz + + ! 5 + rx=1.d0;ry=1.d0;rz=0.d0 + + pz = r_bot + (dble(k)-rz)*hz + + ratio_eta = (dble(j)-ry) / dble(NY) + y = 2.d0*ratio_eta-1;y = tan((ANGULAR_WIDTH_ETA_RAD/2.d0) * y) + + ratio_xi = (dble(i)-rx) / dble(NX) + x = 2.d0*ratio_xi-1;x = tan((ANGULAR_WIDTH_XI_RAD/2.d0) * x) + + px = x*pz; py = y*pz + pz = -(R_EARTH - pz/dsqrt(1.d0 + y*y + x*x) - zmax) + + + + xstore_local_int(5) = px + ystore_local_int(5) = py + zstore_local_int(5) = pz + + + + ! 6 + rx=0.d0;ry=1.d0;rz=0.d0 + + pz = r_bot + (dble(k)-rz)*hz + + ratio_eta = (dble(j)-ry) / dble(NY) + y = 2.d0*ratio_eta-1;y = tan((ANGULAR_WIDTH_ETA_RAD/2.d0) * y) + + ratio_xi = (dble(i)-rx) / dble(NX) + x = 2.d0*ratio_xi-1;x = tan((ANGULAR_WIDTH_XI_RAD/2.d0) * x) + + px = x*pz; py = y*pz + pz = -(R_EARTH - pz/dsqrt(1.d0 + y*y + x*x) - zmax) + + + + xstore_local_int(6) = px + ystore_local_int(6) = py + zstore_local_int(6) = pz + + ! 7 + rx=0.d0;ry=0.d0;rz=0.d0 + + pz = r_bot + (dble(k)-rz)*hz + + ratio_eta = (dble(j)-ry) / dble(NY) + y = 2.d0*ratio_eta-1;y = tan((ANGULAR_WIDTH_ETA_RAD/2.d0) * y) + + ratio_xi = (dble(i)-rx) / dble(NX) + x = 2.d0*ratio_xi-1;x = tan((ANGULAR_WIDTH_XI_RAD/2.d0) * x) + + px = x*pz; py = y*pz + pz = -(R_EARTH - pz/dsqrt(1.d0 + y*y + x*x) - zmax) + + + + xstore_local_int(7) = px + ystore_local_int(7) = py + zstore_local_int(7) = pz + + + ! 8 + rx=1.d0;ry=0.d0;rz=0.d0 + + pz = r_bot + (dble(k)-rz)*hz + + ratio_eta = (dble(j)-ry) / dble(NY) + y = 2.d0*ratio_eta-1;y = tan((ANGULAR_WIDTH_ETA_RAD/2.d0) * y) + + ratio_xi = (dble(i)-rx) / dble(NX) + x = 2.d0*ratio_xi-1;x = tan((ANGULAR_WIDTH_XI_RAD/2.d0) * x) + + px = x*pz; py = y*pz + pz = -(R_EARTH - pz/dsqrt(1.d0 + y*y + x*x) - zmax) + + + + xstore_local_int(8) = px + ystore_local_int(8) = py + zstore_local_int(8) = pz + + ! ========== calcul des points GLL + call calcule_point_gll(xgll,ygll,zgll,xstore_local_int,ystore_local_int,zstore_local_int,shape3D) + + ! ========== interpolation de la fonciton dat aux points GLL + do kgll = 1,NGLLZ + do jgll = 1,NGLLY + do igll = 1,NGLLX + + + + px = xgll(igll,jgll,kgll) + py = ygll(igll,jgll,kgll) + pz = zgll(igll,jgll,kgll) + + call Find_xix_eta_gamma(xstore_local,ystore_local,zstore_local,xi,eta,gamma,px,py,pz) + + if (dabs(xi)<=1.05d0.and.dabs(eta)<=1.05d0.and.dabs(gamma)<=1.05d0) then + + call interpolation_valeur(valeur,px,py,pz,dat_to_project1,xstore_local,ystore_local,zstore_local,& + ispec,NSPEC_AB,xigll,yigll,zigll) + valeur_integration1(igll,jgll,kgll,index_cellule)=valeur + + + call interpolation_valeur(valeur,px,py,pz,dat_to_project2,xstore_local,ystore_local,zstore_local,& + ispec,NSPEC_AB,xigll,yigll,zigll) + valeur_integration2(igll,jgll,kgll,index_cellule)=valeur + + !call interpolation_valeur(valeur,px,py,pz,dat_to_project3,xstore_local,ystore_local,zstore_local,& + ! ispec,NSPEC_AB,xigll,yigll,zigll) + !valeur_integration3(igll,jgll,kgll,index_cellule)=valeur + + + !call interpolation_valeur(valeur,px,py,pz,dat_to_project4,xstore_local,ystore_local,zstore_local,& + ! ispec,NSPEC_AB,xigll,yigll,zigll) + !valeur_integration4(igll,jgll,kgll,index_cellule)=valeur + + indice_integration(igll,jgll,kgll,index_cellule)=1 + + else + + + endif + + enddo + enddo + enddo + + + ! ========================= on cherche les points GLL qui sont dans la cellule de la grille tomo + call calcule_point_gll(xgll,ygll,zgll,xstore_local,ystore_local,zstore_local,shape3D) + do kgll = 1,NGLLZ + do jgll = 1,NGLLY + do igll = 1,NGLLX + + + + px = xgll(igll,jgll,kgll) + py = ygll(igll,jgll,kgll) + pz = zgll(igll,jgll,kgll) + call Find_xix_eta_gamma(xstore_local_int,ystore_local_int,zstore_local_int,xi,eta,gamma,px,py,pz) + + if (dabs(xi)<=1.05d0.and.dabs(eta)<=1.05d0.and.dabs(gamma)<=1.05d0) then + + indice_grille_i(igll,jgll,kgll,ispec) = i + indice_grille_i1(igll,jgll,kgll,ispec)= i + + indice_grille_j(igll,jgll,kgll,ispec) = j + indice_grille_j1(igll,jgll,kgll,ispec)= j + + indice_grille_k(igll,jgll,kgll,ispec) = k + indice_grille_k1(igll,jgll,kgll,ispec)= k + + if (xi > 0. ) then + if (i1) indice_grille_i1(igll,jgll,kgll,ispec) = i-1 + endif + + if (eta > 0. ) then + if (j1) indice_grille_j1(igll,jgll,kgll,ispec) = j-1 + endif + + if (gamma > 0. ) then + if (k1) indice_grille_k1(igll,jgll,kgll,ispec) = k-1 + endif + + endif + + enddo + enddo + enddo + + ! =========================================================== + + + enddo + enddo + enddo + + enddo !==== boucle ispec + + + if (myrank==0) then + call cpu_time(finish) + write(*,*) 'time // proj 0: ', finish-start + call cpu_time(start) + endif + !! === verif des correspondances (gll,ispec) -> tomo + do ispec=1,nspec_ab + do kgll = 1,NGLLZ + do jgll = 1,NGLLY + do igll = 1,NGLLX + + !! patch ad hoc pour effet de bords + if (indice_grille_i(igll,jgll,kgll,ispec)==0 .and. igll==1) then + indice_grille_i(igll,jgll,kgll,ispec)=indice_grille_i(igll+1,jgll,kgll,ispec) + indice_grille_j(igll,jgll,kgll,ispec)=indice_grille_j(igll+1,jgll,kgll,ispec) + indice_grille_k(igll,jgll,kgll,ispec)=indice_grille_k(igll+1,jgll,kgll,ispec) + endif + + if (indice_grille_i(igll,jgll,kgll,ispec)==0 .and. igll==5) then + indice_grille_i(igll,jgll,kgll,ispec)=indice_grille_i(igll-1,jgll,kgll,ispec) + indice_grille_j(igll,jgll,kgll,ispec)=indice_grille_j(igll-1,jgll,kgll,ispec) + indice_grille_k(igll,jgll,kgll,ispec)=indice_grille_k(igll-1,jgll,kgll,ispec) + endif + + + if (indice_grille_i(igll,jgll,kgll,ispec)==0 .and. jgll==1) then + indice_grille_i(igll,jgll,kgll,ispec)=indice_grille_i(igll,jgll+1,kgll,ispec) + indice_grille_j(igll,jgll,kgll,ispec)=indice_grille_j(igll,jgll+1,kgll,ispec) + indice_grille_k(igll,jgll,kgll,ispec)=indice_grille_k(igll,jgll+1,kgll,ispec) + endif + + + if (indice_grille_i(igll,jgll,kgll,ispec)==0 .and. jgll==5) then + indice_grille_i(igll,jgll,kgll,ispec)=indice_grille_i(igll,jgll-1,kgll,ispec) + indice_grille_j(igll,jgll,kgll,ispec)=indice_grille_j(igll,jgll-1,kgll,ispec) + indice_grille_k(igll,jgll,kgll,ispec)=indice_grille_k(igll,jgll-1,kgll,ispec) + endif + + if (indice_grille_i(igll,jgll,kgll,ispec)==0 .and. kgll==1) then + indice_grille_i(igll,jgll,kgll,ispec)=indice_grille_i(igll,jgll,kgll+1,ispec) + indice_grille_j(igll,jgll,kgll,ispec)=indice_grille_j(igll,jgll,kgll+1,ispec) + indice_grille_k(igll,jgll,kgll,ispec)=indice_grille_k(igll,jgll,kgll+1,ispec) + endif + + + if (indice_grille_i(igll,jgll,kgll,ispec)==0 .and. kgll==5) then + indice_grille_i(igll,jgll,kgll,ispec)=indice_grille_i(igll,jgll,kgll-1,ispec) + indice_grille_j(igll,jgll,kgll,ispec)=indice_grille_j(igll,jgll,kgll-1,ispec) + indice_grille_k(igll,jgll,kgll,ispec)=indice_grille_k(igll,jgll,kgll-1,ispec) + endif + + + if (indice_grille_i(igll,jgll,kgll,ispec)==0 .and. jgll==1 .and. kgll==1) then + indice_grille_i(igll,jgll,kgll,ispec)=indice_grille_i(igll,jgll+1,kgll+1,ispec) + indice_grille_j(igll,jgll,kgll,ispec)=indice_grille_j(igll,jgll+1,kgll+1,ispec) + indice_grille_k(igll,jgll,kgll,ispec)=indice_grille_k(igll,jgll+1,kgll+1,ispec) + endif + + + if (indice_grille_i(igll,jgll,kgll,ispec)==0 .and. jgll==5 .and. kgll==5) then + indice_grille_i(igll,jgll,kgll,ispec)=indice_grille_i(igll,jgll-1,kgll-1,ispec) + indice_grille_j(igll,jgll,kgll,ispec)=indice_grille_j(igll,jgll-1,kgll-1,ispec) + indice_grille_k(igll,jgll,kgll,ispec)=indice_grille_k(igll,jgll-1,kgll-1,ispec) + endif + + if (indice_grille_i(igll,jgll,kgll,ispec)==0 .and. igll==1 .and. jgll==1) then + indice_grille_i(igll,jgll,kgll,ispec)=indice_grille_i(igll+1,jgll+1,kgll,ispec) + indice_grille_j(igll,jgll,kgll,ispec)=indice_grille_j(igll+1,jgll+1,kgll,ispec) + indice_grille_k(igll,jgll,kgll,ispec)=indice_grille_k(igll+1,jgll+1,kgll,ispec) + endif + + + if (indice_grille_i(igll,jgll,kgll,ispec)==0 .and. igll==5 .and. jgll==5) then + indice_grille_i(igll,jgll,kgll,ispec)=indice_grille_i(igll-1,jgll-1,kgll,ispec) + indice_grille_j(igll,jgll,kgll,ispec)=indice_grille_j(igll-1,jgll-1,kgll,ispec) + indice_grille_k(igll,jgll,kgll,ispec)=indice_grille_k(igll-1,jgll-1,kgll,ispec) + endif + + + + enddo + enddo + enddo + enddo + if (myrank==0) then + call cpu_time(finish) + write(*,*) 'time // proj : ', finish-start + endif + + valeur_int_glob(:,:,:,:)=0._CUSTOM_REAL + call mpi_reduce(valeur_integration1,valeur_int_glob,NGLLX*NGLLY*NGLLZ*(nnx-1)*(nny-1)*(nnz-1),CUSTOM_MPI_TYPE, MPI_SUM,0,MPI_COMM_WORLD,ier) + valeur_integration1(:,:,:,:) = valeur_int_glob(:,:,:,:) + + valeur_int_glob(:,:,:,:)=0._CUSTOM_REAL + call mpi_reduce(valeur_integration2,valeur_int_glob,NGLLX*NGLLY*NGLLZ*(nnx-1)*(nny-1)*(nnz-1),CUSTOM_MPI_TYPE, MPI_SUM,0,MPI_COMM_WORLD,ier) + valeur_integration2(:,:,:,:) = valeur_int_glob(:,:,:,:) + + !valeur_int_glob(:,:,:,:)=0._CUSTOM_REAL + !call mpi_reduce(valeur_integration3,valeur_int_glob,NGLLX*NGLLY*NGLLZ*(nnx-1)*(nny-1)*(nnz-1),CUSTOM_MPI_TYPE, MPI_SUM,0,MPI_COMM_WORLD,ier) + !valeur_integration3(:,:,:,:) = valeur_int_glob(:,:,:,:) + + !valeur_int_glob(:,:,:,:)=0._CUSTOM_REAL + !call mpi_reduce(valeur_integration4,valeur_int_glob,NGLLX*NGLLY*NGLLZ*(nnx-1)*(nny-1)*(nnz-1),CUSTOM_MPI_TYPE, MPI_SUM,0,MPI_COMM_WORLD,ier) + !valeur_integration4(:,:,:,:) = valeur_int_glob(:,:,:,:) + + call mpi_reduce(indice_integration,indice_int_glob,NGLLX*NGLLY*NGLLZ*(nnx-1)*(nny-1)*(nnz-1),MPI_INTEGER, MPI_SUM,0,MPI_COMM_WORLD,ier) + call mpi_reduce(indice,indice_glob,(nnx-1)*(nny-1)*(nnz-1),MPI_INTEGER ,MPI_SUM,0, MPI_COMM_WORLD, ierr) + + call mpi_reduce(xstore_tomo_grid,work_array,(nnx-1)*(nny-1)*(nnz-1),MPI_DOUBLE_PRECISION ,MPI_SUM,0, MPI_COMM_WORLD, ierr) + xstore_tomo_grid(:,:,:)=work_array(:,:,:) + + call mpi_reduce(ystore_tomo_grid,work_array,(nnx-1)*(nny-1)*(nnz-1),MPI_DOUBLE_PRECISION ,MPI_SUM,0, MPI_COMM_WORLD, ierr) + ystore_tomo_grid(:,:,:)=work_array(:,:,:) + + call mpi_reduce(zstore_tomo_grid,work_array,(nnx-1)*(nny-1)*(nnz-1),MPI_DOUBLE_PRECISION ,MPI_SUM,0, MPI_COMM_WORLD, ierr) + zstore_tomo_grid(:,:,:)=work_array(:,:,:) + + call mpi_reduce( profondeur_tomo_grid,work_array,(nnx-1)*(nny-1)*(nnz-1),MPI_DOUBLE_PRECISION ,MPI_SUM,0, MPI_COMM_WORLD, ierr) + profondeur_tomo_grid(:,:,:)=work_array(:,:,:) + + indice(:,:,:) = indice_glob(:,:,:) + indice_integration(:,:,:,:) = indice_int_glob(:,:,:,:) + + +!================== 2/ projection sur grille tomo ===================================== + + if (myrank==0) then !======================== myrank=0 + call cpu_time(start) + index_cellule=0 + do k=1,nnz-1 + do j=1,nny-1 + do i=1,nnx-1 + index_cellule=index_cellule+1 + + if (indice(i,j,k)/=0) then + xstore_tomo_grid(i,j,k) = xstore_tomo_grid(i,j,k) / real(indice(i,j,k),8) + ystore_tomo_grid(i,j,k) = ystore_tomo_grid(i,j,k) / real(indice(i,j,k),8) + zstore_tomo_grid(i,j,k) = zstore_tomo_grid(i,j,k) / real(indice(i,j,k),8) + profondeur_tomo_grid(i,j,k) = profondeur_tomo_grid(i,j,k) / real(indice(i,j,k),8) + else + write(*,*) 'point oublie :' ,i,j,k + endif + + + !! on reagarde si les points on ete visites et combien de fois? + do kgll=1,NGLLZ + do jgll=1,NGLLY + do igll=1,NGLLX + + if (indice_integration(igll,jgll,kgll,index_cellule) == 0) then !! le point n'a pas ete visite + + !! chercher le point le plus proche qui est a ete visite + ! premier patch : devrait marcher pour mon cas cartesien + if (kgll==1 .and. indice_integration(igll,jgll,kgll+1,index_cellule) > 0) then + + valeur_integration1(igll,jgll,kgll,index_cellule) = valeur_integration1(igll,jgll,kgll+1,index_cellule) /& + real(indice_integration(igll,jgll,kgll+1,index_cellule),CUSTOM_REAL) + valeur_integration2(igll,jgll,kgll,index_cellule) = valeur_integration2(igll,jgll,kgll+1,index_cellule) /& + real(indice_integration(igll,jgll,kgll+1,index_cellule),CUSTOM_REAL) + ! valeur_integration3(igll,jgll,kgll,index_cellule) = valeur_integration3(igll,jgll,kgll+1,index_cellule) /& + ! real(indice_integration(igll,jgll,kgll+1,index_cellule),CUSTOM_REAL) + ! valeur_integration4(igll,jgll,kgll,index_cellule) = valeur_integration4(igll,jgll,kgll+1,index_cellule) /& + ! real(indice_integration(igll,jgll,kgll+1,index_cellule),CUSTOM_REAL) + + endif + else ! le point a ete visite "indice_integration" fois +!!$ ! on divise par indice pour avoir la valeur moyenne car on a fait un MPI_SUM + + valeur_integration1(igll,jgll,kgll,index_cellule) = valeur_integration1(igll,jgll,kgll,index_cellule)/& + real(indice_integration(igll,jgll,kgll,index_cellule),CUSTOM_REAL) + valeur_integration2(igll,jgll,kgll,index_cellule) = valeur_integration2(igll,jgll,kgll,index_cellule)/& + real(indice_integration(igll,jgll,kgll,index_cellule),CUSTOM_REAL) + !valeur_integration3(igll,jgll,kgll,index_cellule) = valeur_integration3(igll,jgll,kgll,index_cellule)/& + ! real(indice_integration(igll,jgll,kgll,index_cellule),CUSTOM_REAL) + !valeur_integration4(igll,jgll,kgll,index_cellule) = valeur_integration4(igll,jgll,kgll,index_cellule)/& + ! real(indice_integration(igll,jgll,kgll,index_cellule),CUSTOM_REAL) + + endif + + enddo + enddo + enddo + enddo + enddo + enddo + + + !===== boucle grille tomo : verifier qu'on fait exactement la meme boucle que precedemment + np=0 + do k=1,nnz-1 ! grille integration (sphere cubique) + + + p0= r_bot + (k-1)*hz + p1= r_bot + k*hz + + do j=2,nny ! grille integration (sphere cubique) + + + ratio_eta = (dble(j-2)) / dble(NY) + y0 = 2.d0*ratio_eta-1 + y0 = tan((ANGULAR_WIDTH_ETA_RAD/2.d0) * y0) + + ratio_eta = (dble(j-1)) / dble(NY) + y1 = 2.d0*ratio_eta-1 + y1 = tan((ANGULAR_WIDTH_ETA_RAD/2.d0) * y1) + + + do i=2,nnx ! grille integration (sphere cubique) + + index_cellule=i-1+(j-2)*(nnx-1)+(k-1)*(nnx-1)*(nny-1) + + ratio_xi = (dble(i-2)) / dble(NX) + x0 = 2.d0*ratio_xi-1 + x0 = tan((ANGULAR_WIDTH_XI_RAD/2.d0) * x0) + + ratio_xi = (dble(i-1)) / dble(NX) + x1 = 2.d0*ratio_xi-1 + x1 = tan((ANGULAR_WIDTH_XI_RAD/2.d0) * x1) + + !===== calcul des 8 sommets de la cellule d'integration dans le repere cartesien SEM + + ! 1 + x=x0;y=y0;p=p0 + xstore_local(1) = x*p + ystore_local(1) = y*p + zstore_local(1) = -(R_EARTH - p/dsqrt(1.d0 + y*y + x*x) - zmax) + + ! 2 + x=x1;y=y0;p=p0 + xstore_local(2) = x*p + ystore_local(2) = y*p + zstore_local(2) = -(R_EARTH - p/dsqrt(1.d0 + y*y + x*x) - zmax) + + ! 3 + x=x1;y=y1;p=p0 + xstore_local(3) = x*p + ystore_local(3) = y*p + zstore_local(3) = -(R_EARTH - p/dsqrt(1.d0 + y*y + x*x) - zmax) + + ! 4 + x=x0;y=y1;p=p0 + xstore_local(4) = x*p + ystore_local(4) = y*p + zstore_local(4) = -(R_EARTH - p/dsqrt(1.d0 + y*y + x*x) - zmax) + + ! 5 + x=x0;y=y0;p=p1 + xstore_local(5) = x*p + ystore_local(5) = y*p + zstore_local(5) = -(R_EARTH - p/dsqrt(1.d0 + y*y + x*x) - zmax) + + ! 6 + x=x1;y=y0;p=p1 + xstore_local(6) = x*p + ystore_local(6) = y*p + zstore_local(6) = -(R_EARTH - p/dsqrt(1.d0 + y*y + x*x) - zmax) + + ! 7 + x=x1;y=y1;p=p1 + xstore_local(7) = x*p + ystore_local(7) = y*p + zstore_local(7) = -(R_EARTH - p/dsqrt(1.d0 + y*y + x*x) - zmax) + + + ! 8 + x=x0;y=y1;p=p1 + xstore_local(8) = x*p + ystore_local(8) = y*p + zstore_local(8) = -(R_EARTH - p/dsqrt(1.d0 + y*y + x*x) - zmax) + + ! === calcul de l'integrale de volume + call compute_volume_int(volume1,xstore_local,ystore_local,zstore_local,wxgll,wygll,wzgll,& + shape3D,dershape3D,valeur_integration1,index_cellule,(nnx-1)*(nny-1)*(nnz-1)) + + call compute_volume_int(volume2,xstore_local,ystore_local,zstore_local,wxgll,wygll,wzgll,& + shape3D,dershape3D,valeur_integration2,index_cellule,(nnx-1)*(nny-1)*(nnz-1)) + + !call compute_volume_int(volume3,xstore_local,ystore_local,zstore_local,wxgll,wygll,wzgll,& + ! shape3D,dershape3D,valeur_integration3,index_cellule,(nnx-1)*(nny-1)*(nnz-1)) + + !call compute_volume_int(volume4,xstore_local,ystore_local,zstore_local,wxgll,wygll,wzgll,& + ! shape3D,dershape3D,valeur_integration4,index_cellule,(nnx-1)*(nny-1)*(nnz-1)) + + if (ires==1) then + ! === si on veut faire juste la projection du modele, on ne doit pas normaliser par + ! === le volume de la cellule, on prend plutot la valeur moyenne. + call compute_volume_int(volume_cellule,xstore_local,ystore_local,zstore_local,wxgll,wygll,wzgll,& + shape3D,dershape3D,volume_integration,index_cellule,(nnx-1)*(nny-1)*(nnz-1)) + volume1=volume1/volume_cellule + volume2=volume2/volume_cellule + !volume3=volume3/volume_cellule + !volume4=volume4/volume_cellule + endif + + if (indice(i-1,j-1,k)==0) then + ! on a oublie le point i,j,k + np=np+1 + !write(30,*) i,j,k + else + + data_tomo1(i-1,j-1,k) = volume1 + data_tomo2(i-1,j-1,k) = volume2 + !data_tomo3(i-1,j-1,k) = volume3 + !data_tomo4(i-1,j-1,k) = volume4 + + endif + + enddo + enddo + + enddo + call cpu_time(finish) + write(*,*) 'time seq. ',finish-start + + endif + call mpi_bcast(data_tomo1,nx*ny*nz,CUSTOM_MPI_TYPE,0,MPI_COMM_WORLD,ier) + call mpi_bcast(data_tomo2,nx*ny*nz,CUSTOM_MPI_TYPE,0,MPI_COMM_WORLD,ier) + !call mpi_bcast(data_tomo3,nx*ny*nz,CUSTOM_MPI_TYPE,0,MPI_COMM_WORLD,ier) + !call mpi_bcast(data_tomo4,nx*ny*nz,CUSTOM_MPI_TYPE,0,MPI_COMM_WORLD,ier) + call mpi_bcast(profondeur_tomo_grid,nx*ny*nz,MPI_DOUBLE_PRECISION,0,MPI_COMM_WORLD,ier) + + + end subroutine project_tomo_grid_2 + + + + + + + subroutine create_box_grid_projection() + implicit none + + integer ispec,ix,iy,iz,igrid_local + integer imin,imax,jmin,jmax,kmin,kmax + integer i,j,k,igll,jgll,kgll + integer index_grid,ierr + double precision x_center,y_center,z_center + integer ii,jj,kk + + + indice_grille_i(:,:,:,:)=0 + indice_grille_j(:,:,:,:)=0 + indice_grille_k(:,:,:,:)=0 + indice_grille_i1(:,:,:,:)=0 + indice_grille_j1(:,:,:,:)=0 + indice_grille_k1(:,:,:,:)=0 + indice(:,:,:)=0 + indice_glob(:,:,:)=0 + + xstore_tomo_grid(:,:,:)=0.d0 + ystore_tomo_grid(:,:,:)=0.d0 + zstore_tomo_grid(:,:,:)=0.d0 + profondeur_tomo_grid(:,:,:)=0.d0 + volume_integration(:,:,:,:)=1._CUSTOM_REAL + + hx = (xmax - xmin) / (nx) + hy = (ymax - ymin) / (ny) + hz = (zmax - zmin) / (nz) + + if (myrank==0) then + write(*,*) + write(*,*) xmin,xmax + write(*,*) ymin,ymax + write(*,*) zmin,zmax + write(*,*) nx,ny,nz + write(*,*) hx,hy,hz + write(*,*) + endif + + !! define interp tri grid (tomo -> SEM) + + do k=1,nz+1 + do j=1,ny+1 + do i=1,nx+1 + + xstore_tomo_grid_interp_tri(i,j,k) = xmin + (i-1)*hx + ystore_tomo_grid_interp_tri(i,j,k) = ymin + (j-1)*hy + zstore_tomo_grid_interp_tri(i,j,k) = zmin + (k-1)*hz + + enddo + enddo + enddo + + do ispec = 1, NSPEC_AB !===== boucle element ispec + + ni(ispec)=0 + + xmin_local = HUGEVAL + xmax_local = -HUGEVAL + ymin_local = HUGEVAL + ymax_local = -HUGEVAL + zmin_local = HUGEVAL + zmax_local = -HUGEVAL + +!======================= Sommets de l'element ============ +!1 + xstore_local(1)=xstore(ibool(1,1,1,ispec)) + ystore_local(1)=ystore(ibool(1,1,1,ispec)) + zstore_local(1)=zstore(ibool(1,1,1,ispec)) +!2 + xstore_local(2)=xstore(ibool(NGLLX,1,1,ispec)) + ystore_local(2)=ystore(ibool(NGLLX,1,1,ispec)) + zstore_local(2)=zstore(ibool(NGLLX,1,1,ispec)) +!3 + xstore_local(3)=xstore(ibool(NGLLX,NGLLY,1,ispec)) + ystore_local(3)=ystore(ibool(NGLLX,NGLLY,1,ispec)) + zstore_local(3)=zstore(ibool(NGLLX,NGLLY,1,ispec)) +!4 + xstore_local(4)=xstore(ibool(1,NGLLY,1,ispec)) + ystore_local(4)=ystore(ibool(1,NGLLY,1,ispec)) + zstore_local(4)=zstore(ibool(1,NGLLY,1,ispec)) +!5 + xstore_local(5)=xstore(ibool(1,1,NGLLZ,ispec)) + ystore_local(5)=ystore(ibool(1,1,NGLLZ,ispec)) + zstore_local(5)=zstore(ibool(1,1,NGLLZ,ispec)) +!6 + xstore_local(6)=xstore(ibool(NGLLX,1,NGLLZ,ispec)) + ystore_local(6)=ystore(ibool(NGLLX,1,NGLLZ,ispec)) + zstore_local(6)=zstore(ibool(NGLLX,1,NGLLZ,ispec)) +!7 + xstore_local(7)=xstore(ibool(NGLLX,NGLLY,NGLLZ,ispec)) + ystore_local(7)=ystore(ibool(NGLLX,NGLLY,NGLLZ,ispec)) + zstore_local(7)=zstore(ibool(NGLLX,NGLLY,NGLLZ,ispec)) +!8 + xstore_local(8)=xstore(ibool(1,NGLLY,NGLLZ,ispec)) + ystore_local(8)=ystore(ibool(1,NGLLY,NGLLZ,ispec)) + zstore_local(8)=zstore(ibool(1,NGLLY,NGLLZ,ispec)) + +!=============== on cherche le pave circonscrit a l'element en se basant sur les point GLL + + do iz=1,NGLLZ + do iy=1,NGLLY + do ix=1,NGLLX + xmin_local=min(xmin_local,xstore(ibool(ix,iy,iz,ispec))) + xmax_local=max(xmin_local,xstore(ibool(ix,iy,iz,ispec))) + ymin_local=min(ymin_local,ystore(ibool(ix,iy,iz,ispec))) + ymax_local=max(ymin_local,ystore(ibool(ix,iy,iz,ispec))) + zmin_local=min(zmin_local,zstore(ibool(ix,iy,iz,ispec))) + zmax_local=max(zmax_local,zstore(ibool(ix,iy,iz,ispec))) + enddo + enddo + enddo + + +! =========== calcul des indices min et max de la grille tomo correspondant au pave + + kmin = MAX(1,floor((zmin_local - zmin) / hz) +1) + kmax= MIN(NZ,floor((zmax_local - zmin) / hz) +1) + + jmin= MAX(1,floor((ymin_local - ymin) / hy) +1) + jmax= MIN(NY,floor((ymax_local - ymin) / hy) +1) + + imin= MAX(1,floor((xmin_local - xmin) / hx) +1) + imax= MIN(NX,floor((xmax_local - xmin) / hx) +1) +!!$ if (myrank==0) then +!!$ write(*,*) ymin_local, ymin + (jmin+0.5)*hy, ymin + (jmax+0.5)*hy,ymax_local +!!$ endif +!ymin_local,ymax_local,jmin,jmax,hy,ny!ispec,imin,imax,jmin,jmax,kmin,kmax + do k = kmin, kmax + z_center = zmin + (k-0.5)*hz + do j = jmin, jmax + y_center = ymin + (j-0.5)*hy + !if (myrank==0) write(*,*) j,y_center,jmin,jmax + do i = imin, imax + x_center = xmin + (i-0.5)*hx + + index_grid = i + (j-1)*nx + (k-1)*nx*ny ! cell ijk + + ! 8 corners + xstore_local_int(1)= xmin + (i-1)*hx + ystore_local_int(1)= ymin + (j-1)*hy + zstore_local_int(1)= zmin + (k-1)*hz + + xstore_local_int(2)= xmin + (i )*hx + ystore_local_int(2)= ymin + (j-1)*hy + zstore_local_int(2)= zmin + (k-1)*hz + + xstore_local_int(3)= xmin + (i )*hx + ystore_local_int(3)= ymin + (j )*hy + zstore_local_int(3)= zmin + (k-1)*hz + + xstore_local_int(4)= xmin + (i-1)*hx + ystore_local_int(4)= ymin + (j )*hy + zstore_local_int(4)= zmin + (k-1)*hz + + xstore_local_int(5)= xmin + (i-1)*hx + ystore_local_int(5)= ymin + (j-1)*hy + zstore_local_int(5)= zmin + (k )*hz + + xstore_local_int(6)= xmin + (i )*hx + ystore_local_int(6)= ymin + (j-1)*hy + zstore_local_int(6)= zmin + (k )*hz + + xstore_local_int(7)= xmin + (i )*hx + ystore_local_int(7)= ymin + (j )*hy + zstore_local_int(7)= zmin + (k )*hz + + xstore_local_int(8)= xmin + (i-1)*hx + ystore_local_int(8)= ymin + (j )*hy + zstore_local_int(8)= zmin + (k )*hz + + + + ! ========== compute GLL points + ! compute xix, eta et gamma for the central point central x_center,y_center,z_center + call Find_xix_eta_gamma(xstore_local,ystore_local,zstore_local,xi,eta,gamma,x_center,y_center,z_center) + + ! are we inside ispec? + if (dabs(xi)<=1.05d0.and.dabs(eta)<=1.05d0.and.dabs(gamma)<=1.05d0) then + indice(i,j,k)=1 ! on a bien visite la cellule de la grille + xstore_tomo_grid(i,j,k) = x_center + ystore_tomo_grid(i,j,k) = y_center + zstore_tomo_grid(i,j,k) = z_center + profondeur_tomo_grid(i,j,k) = abs(zmax - z_center) + indice_spec(index_grid)=ispec !! correspondance cellule_tomo <-> elemements + ! la cellule index_cellule est cencee appartenir a ispec et tous ces pts gll aussi. + ni(ispec)=ni(ispec)+1 + indice_grid(1,ni(ispec),ispec)=i + indice_grid(2,ni(ispec),ispec)=j + indice_grid(3,ni(ispec),ispec)=k + + ! on calcule les points gll de la cellule : +! call calcule_point_gll(xgll,ygll,zgll,xstore_local_int,ystore_local_int,zstore_local_int,shape3D) +! do kgll = 1,NGLLZ +! do jgll = 1,NGLLY +! do igll = 1,NGLLX + !indice_integration(igll,jgll,kgll,index_grid)=1 + !x_grid_gll(igll,jgll,kgll,index_grid) = xgll(igll,jgll,kgll) + !y_grid_gll(igll,jgll,kgll,index_grid) = ygll(igll,jgll,kgll) + !z_grid_gll(igll,jgll,kgll,index_grid) = zgll(igll,jgll,kgll) +!!$ if (igll==3 .and. jgll==3 .and. kgll==3 .and. i==75 .and. j==78 ) then +!!$ write(*,*) myrank,xgll(igll,jgll,kgll) , ygll(igll,jgll,kgll), zgll(igll,jgll,kgll) +!!$ endif +! enddo +! enddo +! enddo + + + +! else + !write(*,*) xi,eta,gamma,x_center,y_center, z_center +! endif + + ! ========================= on cherche les points GLL qui sont dans la cellule de la grille tomo + call calcule_point_gll(xgll,ygll,zgll,xstore_local,ystore_local,zstore_local,shape3D) + do kgll = 1,NGLLZ + do jgll = 1,NGLLY + do igll = 1,NGLLX + + ! on peut eliminer calcule_point_gll + ! et faire ca : + !px=xstore(ibool(igll,jgll,kgll,ispec)) + !py=ystore(ibool(igll,jgll,kgll,ispec)) + !pz=zstore(ibool(igll,jgll,kgll,ispec)) + + px = xgll(igll,jgll,kgll) + py = ygll(igll,jgll,kgll) + pz = zgll(igll,jgll,kgll) + + indice_grille_i(igll,jgll,kgll,ispec) = floor((px - xmin) / hx) +1 + indice_grille_j(igll,jgll,kgll,ispec) = floor((py - ymin) / hy) +1 + indice_grille_k(igll,jgll,kgll,ispec) = floor((pz - zmin) / hz) +1 + + if (indice_grille_i(igll,jgll,kgll,ispec) < 1) indice_grille_i(igll,jgll,kgll,ispec)=1 + if (indice_grille_j(igll,jgll,kgll,ispec) < 1) indice_grille_j(igll,jgll,kgll,ispec)=1 + if (indice_grille_k(igll,jgll,kgll,ispec) < 1) indice_grille_k(igll,jgll,kgll,ispec)=1 + + indice_grille_i1(igll,jgll,kgll,ispec) = indice_grille_i(igll,jgll,kgll,ispec) + 1 + indice_grille_j1(igll,jgll,kgll,ispec) = indice_grille_j(igll,jgll,kgll,ispec) + 1 + indice_grille_k1(igll,jgll,kgll,ispec) = indice_grille_k(igll,jgll,kgll,ispec) + 1 + + if (indice_grille_i1(igll,jgll,kgll,ispec) > nx+1) indice_grille_i1(igll,jgll,kgll,ispec)=nx+1 + if (indice_grille_j1(igll,jgll,kgll,ispec) > ny+1) indice_grille_j1(igll,jgll,kgll,ispec)=ny+1 + if (indice_grille_k1(igll,jgll,kgll,ispec) > nz+1) indice_grille_k1(igll,jgll,kgll,ispec)=nz+1 + + + if (indice_grille_i(igll,jgll,kgll,ispec) > nx) indice_grille_i(igll,jgll,kgll,ispec)=nx + if (indice_grille_j(igll,jgll,kgll,ispec) > ny) indice_grille_j(igll,jgll,kgll,ispec)=ny + if (indice_grille_k(igll,jgll,kgll,ispec) > nz) indice_grille_k(igll,jgll,kgll,ispec)=nz + +!!$ if (px >= xmax) then +!!$ ii=indice_grille_i(igll,jgll,kgll,ispec) +!!$ jj=indice_grille_j(igll,jgll,kgll,ispec) +!!$ kk=indice_grille_k(igll,jgll,kgll,ispec) +!!$ write(*,*) myrank,ii,jj,kk +!!$ write(*,*) myrank, px, xstore_tomo_grid(ii,jj,kk) +!!$ stop +!!$ endif +!!$ if (myrank==0) then +!!$ write(*,*) px,py,pz +!!$ ii=indice_grille_i(igll,jgll,kgll,ispec) +!!$ jj=indice_grille_j(igll,jgll,kgll,ispec) +!!$ kk=indice_grille_k(igll,jgll,kgll,ispec) +!!$ WRITE(*,*) II,JJ,KK +!!$ write(*,*) xstore_tomo_grid(ii,jj,kk),ystore_tomo_grid(ii,jj,kk),zstore_tomo_grid(ii,jj,kk) +!!$ ii=indice_grille_i1(igll,jgll,kgll,ispec) +!!$ jj=indice_grille_j1(igll,jgll,kgll,ispec) +!!$ kk=indice_grille_k1(igll,jgll,kgll,ispec) +!!$ WRITE(*,*) II,JJ,KK +!!$ write(*,*) xstore_tomo_grid(ii,jj,kk),ystore_tomo_grid(ii,jj,kk),zstore_tomo_grid(ii,jj,kk) +!!$ write(*,*) '-------------------------------------' +!!$ endif +!!$ call Find_xix_eta_gamma(xstore_local_int,ystore_local_int,zstore_local_int,xi,eta,gamma,px,py,pz) +!!$ if (dabs(xi)<=1.05d0.and.dabs(eta)<=1.05d0.and.dabs(gamma)<=1.05d0) then +!!$ +!!$ indice_grille_i(igll,jgll,kgll,ispec) = i +!!$ indice_grille_i1(igll,jgll,kgll,ispec)= i +!!$ +!!$ indice_grille_j(igll,jgll,kgll,ispec) = j +!!$ indice_grille_j1(igll,jgll,kgll,ispec)= j +!!$ +!!$ indice_grille_k(igll,jgll,kgll,ispec) = k +!!$ indice_grille_k1(igll,jgll,kgll,ispec)= k + + ! je laisse ca mais je ne suis pas encore sur de son utilite +!!$ if (xi > 0. ) then +!!$ if (i1) indice_grille_i1(igll,jgll,kgll,ispec) = i-1 +!!$ endif +!!$ +!!$ if (eta > 0. ) then +!!$ if (j1) indice_grille_j1(igll,jgll,kgll,ispec) = j-1 +!!$ endif +!!$ +!!$ if (gamma > 0. ) then +!!$ if (k1) indice_grille_k1(igll,jgll,kgll,ispec) = k-1 +!!$ endif + + +!!$ endif + enddo + enddo + enddo + endif + + enddo + enddo + enddo + + + + enddo + + ! allocation des tableaux locaux + ngrid_local=sum(ni(:)) + allocate(indice_integration(NGLLX,NGLLY,NGLLZ,ngrid_local)) + allocate(valeur_integration(NGLLX,NGLLY,NGLLZ,ngrid_local)) + allocate(volume_integration(NGLLX,NGLLY,NGLLZ,ngrid_local)) + allocate(x_grid_gll(NGLLX,NGLLY,NGLLZ,ngrid_local)) + allocate(y_grid_gll(NGLLX,NGLLY,NGLLZ,ngrid_local)) + allocate(z_grid_gll(NGLLX,NGLLY,NGLLZ,ngrid_local)) + + index_grid=0 + do ispec=1,nspec_ab ! loop on spectral elements + do igrid_local=1,ni(ispec) ! loop on grid cells instide ispec + index_grid=index_grid+1 + ! cell index + i= indice_grid(1,igrid_local,ispec) + j= indice_grid(2,igrid_local,ispec) + k= indice_grid(3,igrid_local,ispec) + + + !8 corners + xstore_local_int(1)= xmin + (i-1)*hx + ystore_local_int(1)= ymin + (j-1)*hy + zstore_local_int(1)= zmin + (k-1)*hz + + xstore_local_int(2)= xmin + (i )*hx + ystore_local_int(2)= ymin + (j-1)*hy + zstore_local_int(2)= zmin + (k-1)*hz + + xstore_local_int(3)= xmin + (i )*hx + ystore_local_int(3)= ymin + (j )*hy + zstore_local_int(3)= zmin + (k-1)*hz + + xstore_local_int(4)= xmin + (i-1)*hx + ystore_local_int(4)= ymin + (j )*hy + zstore_local_int(4)= zmin + (k-1)*hz + + xstore_local_int(5)= xmin + (i-1)*hx + ystore_local_int(5)= ymin + (j-1)*hy + zstore_local_int(5)= zmin + (k )*hz + + xstore_local_int(6)= xmin + (i )*hx + ystore_local_int(6)= ymin + (j-1)*hy + zstore_local_int(6)= zmin + (k )*hz + + xstore_local_int(7)= xmin + (i )*hx + ystore_local_int(7)= ymin + (j )*hy + zstore_local_int(7)= zmin + (k )*hz + + xstore_local_int(8)= xmin + (i-1)*hx + ystore_local_int(8)= ymin + (j )*hy + zstore_local_int(8)= zmin + (k )*hz + + ! compute gll points of cell : + call calcule_point_gll(xgll,ygll,zgll,xstore_local_int,ystore_local_int,zstore_local_int,shape3D) + do kgll = 1,NGLLZ + do jgll = 1,NGLLY + do igll = 1,NGLLX + !index_grid = index_grid + 1 + indice_integration(igll,jgll,kgll,index_grid) = 1 + x_grid_gll(igll,jgll,kgll,index_grid) = xgll(igll,jgll,kgll) + y_grid_gll(igll,jgll,kgll,index_grid) = ygll(igll,jgll,kgll) + z_grid_gll(igll,jgll,kgll,index_grid) = zgll(igll,jgll,kgll) + enddo + enddo + enddo + + enddo + enddo + + ! mpi comm + call mpi_reduce(indice,indice_glob,(nnx-1)*(nny-1)*(nnz-1),MPI_INTEGER ,MPI_SUM,0, MPI_COMM_WORLD, ierr) + indice(:,:,:) = indice_glob(:,:,:) + call mpi_bcast(indice,(nnx-1)*(nny-1)*(nnz-1),MPI_INTEGER,0, MPI_COMM_WORLD, ierr) + + call mpi_reduce(xstore_tomo_grid,work_array,(nnx-1)*(nny-1)*(nnz-1),MPI_DOUBLE_PRECISION ,MPI_SUM,0, MPI_COMM_WORLD, ierr) + xstore_tomo_grid(:,:,:)=work_array(:,:,:) + + + call mpi_reduce(ystore_tomo_grid,work_array,(nnx-1)*(nny-1)*(nnz-1),MPI_DOUBLE_PRECISION ,MPI_SUM,0, MPI_COMM_WORLD, ierr) + ystore_tomo_grid(:,:,:)=work_array(:,:,:) + + + call mpi_reduce(zstore_tomo_grid,work_array,(nnx-1)*(nny-1)*(nnz-1),MPI_DOUBLE_PRECISION ,MPI_SUM,0, MPI_COMM_WORLD, ierr) + zstore_tomo_grid(:,:,:)=work_array(:,:,:) + + + call mpi_reduce(profondeur_tomo_grid,work_array,(nnx-1)*(nny-1)*(nnz-1),MPI_DOUBLE_PRECISION ,MPI_SUM,0, MPI_COMM_WORLD, ierr) + profondeur_tomo_grid(:,:,:)=work_array(:,:,:) + + + ! ces tableaux deviennent locaux : + !call mpi_reduce(indice_integration,indice_int_glob,NGLLX*NGLLY*NGLLZ*(nnx-1)*(nny-1)*(nnz-1),MPI_INTEGER, MPI_SUM,0,MPI_COMM_WORLD,ier) + !indice_integration(:,:,:,:) = indice_int_glob(:,:,:,:) + + !call mpi_reduce(x_grid_gll,wk_reduce,NGLLX*NGLLY*NGLLZ*(nnx-1)*(nny-1)*(nnz-1),MPI_DOUBLE_PRECISION ,MPI_SUM,0, MPI_COMM_WORLD, ierr) + !x_grid_gll(:,:,:,:)=wk_reduce(:,:,:,:) + !call mpi_bcast(x_grid_gll,NGLLX*NGLLY*NGLLZ*(nnx-1)*(nny-1)*(nnz-1),MPI_DOUBLE_PRECISION,0, MPI_COMM_WORLD, ierr) + + !call mpi_reduce(y_grid_gll,wk_reduce,NGLLX*NGLLY*NGLLZ*(nnx-1)*(nny-1)*(nnz-1),MPI_DOUBLE_PRECISION ,MPI_SUM,0, MPI_COMM_WORLD, ierr) + !y_grid_gll(:,:,:,:)=wk_reduce(:,:,:,:) + !call mpi_bcast(y_grid_gll,NGLLX*NGLLY*NGLLZ*(nnx-1)*(nny-1)*(nnz-1),MPI_DOUBLE_PRECISION,0, MPI_COMM_WORLD, ierr) + + !call mpi_reduce(z_grid_gll,wk_reduce,NGLLX*NGLLY*NGLLZ*(nnx-1)*(nny-1)*(nnz-1),MPI_DOUBLE_PRECISION ,MPI_SUM,0, MPI_COMM_WORLD, ierr) + !z_grid_gll(:,:,:,:)=wk_reduce(:,:,:,:) + !call mpi_bcast(z_grid_gll,NGLLX*NGLLY*NGLLZ*(nnx-1)*(nny-1)*(nnz-1),MPI_DOUBLE_PRECISION,0, MPI_COMM_WORLD, ierr) + + + + !write(*,*) 'MAX VALUE NI : ', myrank, maxval(ni) + end subroutine create_box_grid_projection + + + subroutine check_projection_grid() + implicit none + integer i,j,k + integer igll,jgll,kgll + integer ierr + !integer index_cellule + if (myrank==0) then + !index_cellule=0 + do k=1,nnz-1 + do j=1,nny-1 + do i=1,nnx-1 + !index_cellule=index_cellule+1 + if (indice(i,j,k)==0) then + write(*,*) 'Warnning forget cell :',i,j,k,& + xstore_tomo_grid(i,j,k),ystore_tomo_grid(i,j,k),zstore_tomo_grid(i,j,k) + else + xstore_tomo_grid(i,j,k) = xstore_tomo_grid(i,j,k) / real(indice(i,j,k),8) + ystore_tomo_grid(i,j,k) = ystore_tomo_grid(i,j,k) / real(indice(i,j,k),8) + zstore_tomo_grid(i,j,k) = zstore_tomo_grid(i,j,k) / real(indice(i,j,k),8) + profondeur_tomo_grid(i,j,k) = profondeur_tomo_grid(i,j,k) / real(indice(i,j,k),8) + + endif + +!!$ do kgll=1,NGLLZ +!!$ do jgll=1,NGLLY +!!$ do igll=1,NGLLX +!!$ +!!$ if (indice_integration(igll,jgll,kgll,index_cellule)==0) then +!!$ write(*,*) 'Warnning forget gll point ', igll,jgll,kgll,i,j,k +!!$ else +!!$ +!!$ x_grid_gll(igll,jgll,kgll,index_cellule) = x_grid_gll(igll,jgll,kgll,index_cellule) & +!!$ / real(indice_integration(igll,jgll,kgll,index_cellule),8) +!!$ +!!$ y_grid_gll(igll,jgll,kgll,index_cellule) = y_grid_gll(igll,jgll,kgll,index_cellule) & +!!$ / real(indice_integration(igll,jgll,kgll,index_cellule),8) +!!$ +!!$ z_grid_gll(igll,jgll,kgll,index_cellule) = z_grid_gll(igll,jgll,kgll,index_cellule) & +!!$ / real(indice_integration(igll,jgll,kgll,index_cellule),8) +!!$ +!!$ +!!$ +!!$ +!!$ endif +!!$ +!!$ enddo +!!$ enddo +!!$ enddo + + enddo + enddo + enddo + endif + call mpi_bcast(xstore_tomo_grid,(nnx-1)*(nny-1)*(nnz-1),MPI_DOUBLE_PRECISION ,0, MPI_COMM_WORLD, ierr) + call mpi_bcast(ystore_tomo_grid,(nnx-1)*(nny-1)*(nnz-1),MPI_DOUBLE_PRECISION ,0, MPI_COMM_WORLD, ierr) + call mpi_bcast(zstore_tomo_grid,(nnx-1)*(nny-1)*(nnz-1),MPI_DOUBLE_PRECISION ,0, MPI_COMM_WORLD, ierr) + call mpi_bcast(profondeur_tomo_grid,nx*ny*nz,MPI_DOUBLE_PRECISION,0,MPI_COMM_WORLD,ier) + if (myrank == 0 ) write(*,*) 'tomo grid checked ' + end subroutine check_projection_grid + + + + subroutine interpole_one_field(dat_to_project) + implicit none + integer ispec,ires,i,j,k,icell,index_grid + integer igll,jgll,kgll + real(kind=CUSTOM_REAL) dat_to_project(NGLLX,NGLLY,NGLLZ,NSPEC_AB) + + valeur_integration(:,:,:,:)=0._CUSTOM_REAL + indice_integration(:,:,:,:)=0 + + !write(*,*) 'in interpole ' + index_grid=0 + do ispec=1,NSPEC_AB ! loop on spectral elements + + !======================= Sommets de l'element ============ +!1 + xstore_local(1)=xstore(ibool(1,1,1,ispec)) + ystore_local(1)=ystore(ibool(1,1,1,ispec)) + zstore_local(1)=zstore(ibool(1,1,1,ispec)) +!2 + xstore_local(2)=xstore(ibool(NGLLX,1,1,ispec)) + ystore_local(2)=ystore(ibool(NGLLX,1,1,ispec)) + zstore_local(2)=zstore(ibool(NGLLX,1,1,ispec)) +!3 + xstore_local(3)=xstore(ibool(NGLLX,NGLLY,1,ispec)) + ystore_local(3)=ystore(ibool(NGLLX,NGLLY,1,ispec)) + zstore_local(3)=zstore(ibool(NGLLX,NGLLY,1,ispec)) +!4 + xstore_local(4)=xstore(ibool(1,NGLLY,1,ispec)) + ystore_local(4)=ystore(ibool(1,NGLLY,1,ispec)) + zstore_local(4)=zstore(ibool(1,NGLLY,1,ispec)) +!5 + xstore_local(5)=xstore(ibool(1,1,NGLLZ,ispec)) + ystore_local(5)=ystore(ibool(1,1,NGLLZ,ispec)) + zstore_local(5)=zstore(ibool(1,1,NGLLZ,ispec)) +!6 + xstore_local(6)=xstore(ibool(NGLLX,1,NGLLZ,ispec)) + ystore_local(6)=ystore(ibool(NGLLX,1,NGLLZ,ispec)) + zstore_local(6)=zstore(ibool(NGLLX,1,NGLLZ,ispec)) +!7 + xstore_local(7)=xstore(ibool(NGLLX,NGLLY,NGLLZ,ispec)) + ystore_local(7)=ystore(ibool(NGLLX,NGLLY,NGLLZ,ispec)) + zstore_local(7)=zstore(ibool(NGLLX,NGLLY,NGLLZ,ispec)) +!8 + xstore_local(8)=xstore(ibool(1,NGLLY,NGLLZ,ispec)) + ystore_local(8)=ystore(ibool(1,NGLLY,NGLLZ,ispec)) + zstore_local(8)=zstore(ibool(1,NGLLY,NGLLZ,ispec)) + + + + do icell=1,ni(ispec) ! loop on tomo cells + index_grid=index_grid+1 + i=indice_grid(1,icell,ispec) + j=indice_grid(2,icell,ispec) + k=indice_grid(3,icell,ispec) + + !index_grid=i+nx*(j-1)+nx*ny*(k-1) ! il faut verifier que index_grid a vu toute la grille + + do kgll=1,NGLLZ + do jgll=1,NGLLY + do igll=1,NGLLX + !index_grid=index_grid+1 + px=x_grid_gll(igll,jgll,kgll,index_grid) + py=y_grid_gll(igll,jgll,kgll,index_grid) + pz=z_grid_gll(igll,jgll,kgll,index_grid) + +!!$ if (igll==3 .and. jgll==3 .and. kgll==3 .and. i==75 .and. j==78 ) then +!!$ +!!$ write(*,*)'----------------------------------------------',myrank +!!$ write(*,*) xstore_local(1),xstore_local(7) +!!$ write(*,*) ystore_local(1),ystore_local(7) +!!$ write(*,*) zstore_local(1),zstore_local(7) +!!$ write(*,*) +!!$ +!!$ write(*,'(3f15.5)') px,py,pz +!!$ write(*,*) valeur +!!$ endif + +! if (myrank==0) then +! write(*,*) '-> ',myrank,px,py,pz +! write(*,*) '-> ', igll,jgll,kgll,index_grid,i,j,k +! write(*,*) +! endif + call interpolation_valeur(valeur,px,py,pz,dat_to_project,xstore_local,ystore_local,zstore_local,& + ispec,NSPEC_AB,xigll,yigll,zigll) + + valeur_integration(igll,jgll,kgll,index_grid)=valeur + indice_integration(igll,jgll,kgll,index_grid)=1 + !if (i==1 .And. j==1) then + ! write(*,*) myrank, k,index_grid,valeur + ! write(*,*) dat_to_project(1,1,1,ispec) + !endif + enddo + enddo + enddo + + + enddo + enddo + + ! mpi comm + !valeur_int_glob(:,:,:,:)=0._CUSTOM_REAL + !call mpi_reduce(valeur_integration,valeur_int_glob,NGLLX*NGLLY*NGLLZ*(nnx-1)*(nny-1)*(nnz-1),CUSTOM_MPI_TYPE, MPI_SUM,0,MPI_COMM_WORLD,ier) + !valeur_integration(:,:,:,:)=valeur_int_glob(:,:,:,:) + !call mpi_reduce(indice_integration,indice_int_glob,NGLLX*NGLLY*NGLLZ*(nnx-1)*(nny-1)*(nnz-1),MPI_INTEGER, MPI_SUM,0,MPI_COMM_WORLD,ier) + !indice_integration(:,:,:,:)=indice_int_glob(:,:,:,:) +!!$ if (myrank==0) then +!!$ open(155,file='debug_vel.bin',access='direct',recl=4*nx*ny*nz) +!!$ write(155,rec=1) valeur_integration(3,3,3,:) +!!$ close(155) +!!$ stop +!!$ endif + end subroutine interpole_one_field + + + subroutine project_one_field(ires) + + implicit none + integer ires,iii + integer ispec,icell,i,j,k,index_cellule + integer igll,jgll,kgll + volume_integration(:,:,:,:)=1._CUSTOM_REAL + !valeur_integration(:,:,:,:)=0._CUSTOM_REAL + data_tomo(:,:,:)=0. + !if (myrank==0) then !======================== myrank=0 + index_cellule=0 + do ispec=1,nspec_ab + !write(*,*) myrank, ni(ispec) + do icell=1,ni(ispec) + index_cellule=index_cellule+1 + i=indice_grid(1,icell,ispec) + j=indice_grid(2,icell,ispec) + k=indice_grid(3,icell,ispec) + !do k=1,nz + !do j=1,ny + !do i=1,nx + !index_cellule=index_cellule+1 + + + !do kgll=1,NGLLZ + !do jgll=1,NGLLY + !do igll=1,NGLLX + + ! if(indice_integration(igll,jgll,kgll,index_cellule)==0) then + ! write(*,*) 'Warning , not found gll : ', igll,jgll,kgll,i,j,k + ! else + ! valeur_integration(igll,jgll,kgll,index_cellule) = & + ! valeur_integration(igll,jgll,kgll,index_cellule) /& + ! real(indice_integration(igll,jgll,kgll,index_cellule),CUSTOM_REAL) + !endif + + !enddo + !enddo + !enddo + + xstore_local(1)=x_grid_gll(1,1,1,index_cellule) + ystore_local(1)=y_grid_gll(1,1,1,index_cellule) + zstore_local(1)=z_grid_gll(1,1,1,index_cellule) + + xstore_local(2)=x_grid_gll(NGLLX,1,1,index_cellule) + ystore_local(2)=y_grid_gll(NGLLX,1,1,index_cellule) + zstore_local(2)=z_grid_gll(NGLLX,1,1,index_cellule) + + xstore_local(3)=x_grid_gll(NGLLX,NGLLY,1,index_cellule) + ystore_local(3)=y_grid_gll(NGLLX,NGLLY,1,index_cellule) + zstore_local(3)=z_grid_gll(NGLLX,NGLLY,1,index_cellule) + + xstore_local(4)=x_grid_gll(1,NGLLY,1,index_cellule) + ystore_local(4)=y_grid_gll(1,NGLLY,1,index_cellule) + zstore_local(4)=z_grid_gll(1,NGLLY,1,index_cellule) + + xstore_local(5)=x_grid_gll(1,1,NGLLZ,index_cellule) + ystore_local(5)=y_grid_gll(1,1,NGLLZ,index_cellule) + zstore_local(5)=z_grid_gll(1,1,NGLLZ,index_cellule) + + xstore_local(6)=x_grid_gll(NGLLX,1,NGLLZ,index_cellule) + ystore_local(6)=y_grid_gll(NGLLX,1,NGLLZ,index_cellule) + zstore_local(6)=z_grid_gll(NGLLX,1,NGLLZ,index_cellule) + + xstore_local(7)=x_grid_gll(NGLLX,NGLLY,NGLLZ,index_cellule) + ystore_local(7)=y_grid_gll(NGLLX,NGLLY,NGLLZ,index_cellule) + zstore_local(7)=z_grid_gll(NGLLX,NGLLY,NGLLZ,index_cellule) + + xstore_local(8)=x_grid_gll(1,NGLLY,NGLLZ,index_cellule) + ystore_local(8)=y_grid_gll(1,NGLLY,NGLLZ,index_cellule) + zstore_local(8)=z_grid_gll(1,NGLLY,NGLLZ,index_cellule) + + ! volumic integral + call compute_volume_int(volume,xstore_local,ystore_local,zstore_local,wxgll,wygll,wzgll,& + shape3D,dershape3D,valeur_integration,index_cellule,ngrid_local) +!!$ if (myrank==1) then +!!$ write(*,*) +!!$ write(*,*) valeur_integration(:,:,:,index_cellule) +!!$ do iii=1,8 +!!$ write(*,'(3f20.5)') xstore_local(iii),ystore_local(iii),zstore_local(iii) +!!$ enddo +!!$ !write(*,*) ystore_local(1),ystore_local(7) +!!$ !write(*,*) zstore_local(1),zstore_local(7) +!!$ write(*,*) index_cellule +!!$ write(*,*) volume +!!$ endif + if (ires==1) then ! le volume de la cellule ne change pas, on peut le stocker + call compute_volume_int(volume_cellule,xstore_local,ystore_local,zstore_local,wxgll,wygll,wzgll,& + shape3D,dershape3D,volume_integration,index_cellule,ngrid_local) + volume=volume/volume_cellule ! divide by volume to retrieve the mean value + endif + + data_tomo(i,j,k) = volume + !if (i==1 .and. j==1) then + ! write(*,*) myrank,index_cellule,volume + ! write(*,*) xstore_local + ! write(*,*) ystore_local + ! write(*,*) zstore_local + ! write(*,*) valeur_integration(:,:,:,index_cellule) + ! write(*,*) + !endif + enddo + enddo + + !endif + vol_data(:,:,:)=0._CUSTOM_REAL + call mpi_reduce(data_tomo,vol_data,(nnx-1)*(nny-1)*(nnz-1),CUSTOM_MPI_TYPE, MPI_SUM,0,MPI_COMM_WORLD,ier) + if (myrank==0) then + do k=1,nz + do j=1,ny + do i=1,nx + data_tomo(i,j,k)=vol_data(i,j,k)/real(indice(i,j,k),CUSTOM_REAL) + + enddo + enddo + !write(*,*) k,data_tomo(1,1,k),vol_data(1,1,k),indice(1,1,k) + enddo + endif + call mpi_bcast(data_tomo,nx*ny*nz,CUSTOM_MPI_TYPE,0,MPI_COMM_WORLD,ier) + + end subroutine project_one_field + + + + + + subroutine create_chunk_grid_projection() + implicit none + + integer ispec,ix,iy,iz,igrid_local + integer imin,imax,jmin,jmax,kmin,kmax + integer i,j,k,igll,jgll,kgll,ijkgll + integer ii,jj,kk + integer index_grid,ierr + double precision x_center,y_center,z_center + double precision ANGULAR_WIDTH_ETA_RAD,ANGULAR_WIDTH_XI_RAD,deg2rad + double precision rx,ry,rz + double precision profondeur_courante + double precision, parameter :: R_EARTH=6371000.d0 + double precision xc,yc,zc,pcx,pcy,pcz,pxgll,pygll,pzgll + double precision ksi00,eta00,pmr00 + + deg2rad = 3.141592653589793d0/180.d0 + + indice_grille_i(:,:,:,:)=0 + indice_grille_j(:,:,:,:)=0 + indice_grille_k(:,:,:,:)=0 + indice_grille_i1(:,:,:,:)=0 + indice_grille_j1(:,:,:,:)=0 + indice_grille_k1(:,:,:,:)=0 + indice(:,:,:)=0 + indice_glob(:,:,:)=0 + + xstore_tomo_grid(:,:,:)=0.d0 + ystore_tomo_grid(:,:,:)=0.d0 + zstore_tomo_grid(:,:,:)=0.d0 + profondeur_tomo_grid(:,:,:)=0.d0 + volume_integration(:,:,:,:)=1._CUSTOM_REAL + + +!======== on se met dans la sphere cubique et on definit le pas des grilles + + ANGULAR_WIDTH_XI_RAD = 2.d0* dasin(dabs(xmin*1.0000d0)/R_EARTH) + ANGULAR_WIDTH_ETA_RAD = 2.d0* dasin(dabs(ymin*1.0000d0)/R_EARTH) + + hx = ANGULAR_WIDTH_XI_RAD / (nx) + hy = ANGULAR_WIDTH_ETA_RAD / (ny) + hz = (r_earth-r_bot) / (nz) + + + if (myrank==0) then + write(*,*) + write(*,*) xmin,xmax + write(*,*) ymin,ymax + write(*,*) zmin,zmax + write(*,*) nx,ny,nz + write(*,*) hx,hy,hz + write(*,*) + endif + !! define interp tri grid (tomo -> SEM) + do k=1,nz+1 + do j=1,ny+1 + do i=1,nx+1 + rx=1.d0;ry=1.d0;rz=1.d0 + pcz = r_bot + (dble(k)-rz)*hz + ratio_eta = (dble(j)-ry) / dble(NY) + yc = 2.d0*ratio_eta-1;yc = tan((ANGULAR_WIDTH_ETA_RAD/2.d0) * yc) + ratio_xi = (dble(i)-rx) / dble(NX) + xc = 2.d0*ratio_xi-1;xc = tan((ANGULAR_WIDTH_XI_RAD/2.d0) * xc) + pcx = xc*pcz; pcy = yc*pcz + pcz = -(R_EARTH - pcz/dsqrt(1.d0 + yc*yc + xc*xc) - zmax) + xstore_tomo_grid_interp_tri(i,j,k)=pcx + ystore_tomo_grid_interp_tri(i,j,k)=pcy + zstore_tomo_grid_interp_tri(i,j,k)=pcz + enddo + enddo + enddo + + do ispec = 1, NSPEC_AB !===== boucle element ispec + + ni(ispec)=0 + + xmin_local = HUGEVAL + xmax_local = -HUGEVAL + ymin_local = HUGEVAL + ymax_local = -HUGEVAL + zmin_local = HUGEVAL + zmax_local = -HUGEVAL + + !======================= Sommets de l'element ============ + !1 + xstore_local(1)=xstore(ibool(1,1,1,ispec)) + ystore_local(1)=ystore(ibool(1,1,1,ispec)) + zstore_local(1)=zstore(ibool(1,1,1,ispec)) + !2 + xstore_local(2)=xstore(ibool(NGLLX,1,1,ispec)) + ystore_local(2)=ystore(ibool(NGLLX,1,1,ispec)) + zstore_local(2)=zstore(ibool(NGLLX,1,1,ispec)) + !3 + xstore_local(3)=xstore(ibool(NGLLX,NGLLY,1,ispec)) + ystore_local(3)=ystore(ibool(NGLLX,NGLLY,1,ispec)) + zstore_local(3)=zstore(ibool(NGLLX,NGLLY,1,ispec)) + !4 + xstore_local(4)=xstore(ibool(1,NGLLY,1,ispec)) + ystore_local(4)=ystore(ibool(1,NGLLY,1,ispec)) + zstore_local(4)=zstore(ibool(1,NGLLY,1,ispec)) + !5 + xstore_local(5)=xstore(ibool(1,1,NGLLZ,ispec)) + ystore_local(5)=ystore(ibool(1,1,NGLLZ,ispec)) + zstore_local(5)=zstore(ibool(1,1,NGLLZ,ispec)) + !6 + xstore_local(6)=xstore(ibool(NGLLX,1,NGLLZ,ispec)) + ystore_local(6)=ystore(ibool(NGLLX,1,NGLLZ,ispec)) + zstore_local(6)=zstore(ibool(NGLLX,1,NGLLZ,ispec)) + !7 + xstore_local(7)=xstore(ibool(NGLLX,NGLLY,NGLLZ,ispec)) + ystore_local(7)=ystore(ibool(NGLLX,NGLLY,NGLLZ,ispec)) + zstore_local(7)=zstore(ibool(NGLLX,NGLLY,NGLLZ,ispec)) + !8 + xstore_local(8)=xstore(ibool(1,NGLLY,NGLLZ,ispec)) + ystore_local(8)=ystore(ibool(1,NGLLY,NGLLZ,ispec)) + zstore_local(8)=zstore(ibool(1,NGLLY,NGLLZ,ispec)) + + !=============== on cherche le pave circonscrit a l'element en se basant sur les point GLL + + do iz=1,NGLLZ + do iy=1,NGLLY + do ix=1,NGLLX + xmin_local=min(xmin_local,xstore(ibool(ix,iy,iz,ispec))) + xmax_local=max(xmin_local,xstore(ibool(ix,iy,iz,ispec))) + ymin_local=min(ymin_local,ystore(ibool(ix,iy,iz,ispec))) + ymax_local=max(ymin_local,ystore(ibool(ix,iy,iz,ispec))) + zmin_local=min(zmin_local,zstore(ibool(ix,iy,iz,ispec))) + zmax_local=max(zmax_local,zstore(ibool(ix,iy,iz,ispec))) + enddo + enddo + enddo + + ! =========== calcul du rayon min et max correspondant au pave + call rayon_min_max(R_EARTH-zmax,xmin_local,xmax_local,ymin_local,ymax_local,zmin_local,zmax_local,pmin,pmax) + + ! =========== calcul des indices min et max de la grille tomo correspondant au pave + ! indice sur grille fine d'integration (sphere cubique) !! ajout de +/-2 pour deborder sur l'element adjacent + kmin = 1+ floor((pmin-r_bot)/(r_earth-r_bot)*(nnz-1) ) !- 2 + kmax = 1+ floor((pmax-r_bot)/(r_earth-r_bot)*(nnz-1) ) !+ 2 + + call ksi_eta_min_max(R_EARTH-zmax,xmin_local,xmax_local,ymin_local,ymax_local,zmin_local,zmax_local,& + ksimin,ksimax,etamin,etamax) + + ! indice sur grille fine d'integration (sphere cubique) + !imin = floor(1. + (NNX - 1) * (ksimin + 0.5d0 * ANGULAR_WIDTH_XI_RAD) / ANGULAR_WIDTH_XI_RAD) !- 2 + !jmin = floor(1. + (NNY - 1) * (etamin + 0.5d0 * ANGULAR_WIDTH_ETA_RAD) / ANGULAR_WIDTH_ETA_RAD) !- 2 + + imin = 1+ floor( 0.5*(NNX - 1) * (1. + 2.*ksimin / ANGULAR_WIDTH_XI_RAD )) + jmin = 1+ floor( 0.5*(NNY - 1) * (1. + 2.*etamin / ANGULAR_WIDTH_ETA_RAD)) + + ! indice sur grille fine d'integration (sphere cubique) + !imax = floor(1. + (NNX - 1) * (ksimax + 0.5d0 * ANGULAR_WIDTH_XI_RAD) / ANGULAR_WIDTH_XI_RAD) !+ 2 + !jmax = floor(1. + (NNY - 1) * (etamax + 0.5d0 * ANGULAR_WIDTH_ETA_RAD) / ANGULAR_WIDTH_ETA_RAD) !+ 2 + + imax = 1+ floor( 0.5*(NNX - 1) * (1. + 2.*ksimax / ANGULAR_WIDTH_XI_RAD )) + jmax = 1+ floor( 0.5*(NNY - 1) * (1. + 2.*etamax / ANGULAR_WIDTH_ETA_RAD)) + + imin=max(imin,1) + imax=min(imax,nx) + jmin=max(jmin,1) + jmax=min(jmax,ny) + kmin=max(kmin,1) + kmax=min(kmax,nz) + + do k = kmin, kmax + pz = r_bot + (k-0.5d0)*hz ! valeur au centre de la cellule (sphere cubique) + profondeur_courante = R_EARTH - pz + + do j = jmin, jmax + ratio_eta = (dble(j)-0.5d0) / dble(NY) + py = 2.d0*ratio_eta-1 + py = tan((ANGULAR_WIDTH_ETA_RAD/2.d0) * py) + !if (myrank==0) write(*,*) ratio_eta,py + do i = imin, imax + ratio_xi = (dble(i)-0.5d0) / dble(NX) + px = 2.d0*ratio_xi-1 + px = tan((ANGULAR_WIDTH_XI_RAD/2.d0) * px) + !if (myrank==0) write(*,'(3f30.6)') px,py,pz + ! on repasse en cartesien pour travailler dans le repere SEM + x_center = px*pz + y_center = py*pz + z_center = -(R_EARTH - pz/dsqrt(1.d0 + py**2 + px**2) - zmax) + !if (myrank==0) write(*,*) x_center,y_center,z_center + !if (myrank==0) & + !write(*,'(a10,i4,3f30.6,3i4)')'------->:',ispec,x_center,y_center,z_center,& + !i,j,k + + index_grid = i + (j-1)*nx + (k-1)*nx*ny ! cell ijk + + ! 8 corners + rx=1.d0;ry=1.d0;rz=1.d0 + pcz = r_bot + (dble(k)-rz)*hz + ratio_eta = (dble(j)-ry) / dble(NY) + yc = 2.d0*ratio_eta-1;yc = tan((ANGULAR_WIDTH_ETA_RAD/2.d0) * yc) + ratio_xi = (dble(i)-rx) / dble(NX) + xc = 2.d0*ratio_xi-1;xc = tan((ANGULAR_WIDTH_XI_RAD/2.d0) * xc) + pcx = xc*pcz; pcy = yc*pcz + pcz = -(R_EARTH - pcz/dsqrt(1.d0 + yc*yc + xc*xc) - zmax) + xstore_local_int(1) = pcx + ystore_local_int(1) = pcy + zstore_local_int(1) = pcz + !if (myrank==0) then + !write(*,*) + ! write(*,*) pcx,pcy,pcz + ! write(*,*) + !endif + + rx=0.d0;ry=1.d0;rz=1.d0 + pcz = r_bot + (dble(k)-rz)*hz + ratio_eta = (dble(j)-ry) / dble(NY) + yc = 2.d0*ratio_eta-1;yc = tan((ANGULAR_WIDTH_ETA_RAD/2.d0) * yc) + ratio_xi = (dble(i)-rx) / dble(NX) + xc = 2.d0*ratio_xi-1;xc = tan((ANGULAR_WIDTH_XI_RAD/2.d0) * xc) + pcx = xc*pcz; pcy = yc*pcz + pcz = -(R_EARTH - pcz/dsqrt(1.d0 + yc*yc + xc*xc) - zmax) + xstore_local_int(2) = pcx + ystore_local_int(2) = pcy + zstore_local_int(2) = pcz + + rx=0.d0;ry=0.d0;rz=1.d0 + pcz = r_bot + (dble(k)-rz)*hz + ratio_eta = (dble(j)-ry) / dble(NY) + yc = 2.d0*ratio_eta-1;yc = tan((ANGULAR_WIDTH_ETA_RAD/2.d0) * yc) + ratio_xi = (dble(i)-rx) / dble(NX) + xc = 2.d0*ratio_xi-1;xc = tan((ANGULAR_WIDTH_XI_RAD/2.d0) * xc) + pcx = xc*pcz; pcy = yc*pcz + pcz = -(R_EARTH - pcz/dsqrt(1.d0 + yc*yc + xc*xc) - zmax) + xstore_local_int(3) = pcx + ystore_local_int(3) = pcy + zstore_local_int(3) = pcz + + rx=1.d0;ry=0.d0;rz=1.d0 + pcz = r_bot + (dble(k)-rz)*hz + ratio_eta = (dble(j)-ry) / dble(NY) + yc = 2.d0*ratio_eta-1;yc = tan((ANGULAR_WIDTH_ETA_RAD/2.d0) * yc) + ratio_xi = (dble(i)-rx) / dble(NX) + xc = 2.d0*ratio_xi-1;xc = tan((ANGULAR_WIDTH_XI_RAD/2.d0) * xc) + pcx = xc*pcz; pcy = yc*pcz + pcz = -(R_EARTH - pcz/dsqrt(1.d0 + yc*yc + xc*xc) - zmax) + xstore_local_int(4) = pcx + ystore_local_int(4) = pcy + zstore_local_int(4) = pcz + + rx=1.d0;ry=1.d0;rz=0.d0 + pcz = r_bot + (dble(k)-rz)*hz + ratio_eta = (dble(j)-ry) / dble(NY) + yc = 2.d0*ratio_eta-1;yc = tan((ANGULAR_WIDTH_ETA_RAD/2.d0) * yc) + ratio_xi = (dble(i)-rx) / dble(NX) + xc = 2.d0*ratio_xi-1;xc = tan((ANGULAR_WIDTH_XI_RAD/2.d0) * xc) + pcx = xc*pcz; pcy = yc*pcz + pcz = -(R_EARTH - pcz/dsqrt(1.d0 + yc*yc + xc*xc) - zmax) + xstore_local_int(5) = pcx + ystore_local_int(5) = pcy + zstore_local_int(5) = pcz + + rx=0.d0;ry=1.d0;rz=0.d0 + pcz = r_bot + (dble(k)-rz)*hz + ratio_eta = (dble(j)-ry) / dble(NY) + yc = 2.d0*ratio_eta-1;yc = tan((ANGULAR_WIDTH_ETA_RAD/2.d0) * yc) + ratio_xi = (dble(i)-rx) / dble(NX) + xc = 2.d0*ratio_xi-1;xc = tan((ANGULAR_WIDTH_XI_RAD/2.d0) * xc) + pcx = xc*pcz; pcy = yc*pcz + pcz = -(R_EARTH - pcz/dsqrt(1.d0 + yc*yc + xc*xc) - zmax) + xstore_local_int(6) = pcx + ystore_local_int(6) = pcy + zstore_local_int(6) = pcz + + + rx=0.d0;ry=0.d0;rz=0.d0 + pcz = r_bot + (dble(k)-rz)*hz + ratio_eta = (dble(j)-ry) / dble(NY) + yc = 2.d0*ratio_eta-1;yc = tan((ANGULAR_WIDTH_ETA_RAD/2.d0) * yc) + ratio_xi = (dble(i)-rx) / dble(NX) + xc = 2.d0*ratio_xi-1;xc = tan((ANGULAR_WIDTH_XI_RAD/2.d0) * xc) + pcx = xc*pcz; pcy = yc*pcz + pcz = -(R_EARTH - pcz/dsqrt(1.d0 + yc*yc + xc*xc) - zmax) + xstore_local_int(7) = pcx + ystore_local_int(7) = pcy + zstore_local_int(7) = pcz + + rx=1.d0;ry=0.d0;rz=0.d0 + pcz = r_bot + (dble(k)-rz)*hz + ratio_eta = (dble(j)-ry) / dble(NY) + yc = 2.d0*ratio_eta-1;yc = tan((ANGULAR_WIDTH_ETA_RAD/2.d0) * yc) + ratio_xi = (dble(i)-rx) / dble(NX) + xc = 2.d0*ratio_xi-1;xc = tan((ANGULAR_WIDTH_XI_RAD/2.d0) * xc) + pcx = xc*pcz; pcy = yc*pcz + pcz = -(R_EARTH - pcz/dsqrt(1.d0 + yc*yc + xc*xc) - zmax) + xstore_local_int(8) = pcx + ystore_local_int(8) = pcy + zstore_local_int(8) = pcz + + !if (myrank==0) then + ! write(*,*) '-----------------' + ! write(*,*) xstore_local_int + ! write(*,*) + ! write(*,*) ystore_local_int + ! write(*,*) + ! write(*,*) zstore_local_int + ! write(*,*) + ! write(*,*) x_center,y_center,z_center + !endif + ! ========== compute GLL points + ! compute xix, eta et gamma for the central point central x_center,y_center,z_center + !if (myrank==0) write(*,'(a10,i4,3f30.6)')'------->:',ispec,x_center,y_center,z_center + + call Find_xix_eta_gamma(xstore_local,ystore_local,zstore_local,xi,eta,gamma,x_center,y_center,z_center) +!!$ !! for debbug +!!$ xstore_tomo_grid(i,j,k) = x_center +!!$ ystore_tomo_grid(i,j,k) = y_center +!!$ zstore_tomo_grid(i,j,k) = z_center + ! are we inside ispec? + if (dabs(xi)<=1.05d0.and.dabs(eta)<=1.05d0.and.dabs(gamma)<=1.05d0) then + indice(i,j,k)=1 ! on a bien visite la cellule de la grille + xstore_tomo_grid(i,j,k) = x_center + ystore_tomo_grid(i,j,k) = y_center + zstore_tomo_grid(i,j,k) = z_center + profondeur_tomo_grid(i,j,k) = profondeur_courante !abs(zmax - z_center) + indice_spec(index_grid)=ispec !! correspondance cellule_tomo <-> elemements + ! la cellule index_cellule est cencee appartenir a ispec et tous ces pts gll aussi. + ni(ispec)=ni(ispec)+1 + indice_grid(1,ni(ispec),ispec)=i + indice_grid(2,ni(ispec),ispec)=j + indice_grid(3,ni(ispec),ispec)=k + + ! on calcule les points gll de la cellule : +!!$ call calcule_point_gll(xgll,ygll,zgll,xstore_local_int,ystore_local_int,zstore_local_int,shape3D) +!!$ do kgll = 1,NGLLZ +!!$ do jgll = 1,NGLLY +!!$ do igll = 1,NGLLX +!!$ indice_integration(igll,jgll,kgll,index_grid)=1 +!!$ x_grid_gll(igll,jgll,kgll,index_grid) = xgll(igll,jgll,kgll) +!!$ y_grid_gll(igll,jgll,kgll,index_grid) = ygll(igll,jgll,kgll) +!!$ z_grid_gll(igll,jgll,kgll,index_grid) = zgll(igll,jgll,kgll) +!!$ if (igll==3 .and. jgll==3 .and. kgll==3 .and. i==75 .and. j==78 ) then +!!$ write(*,*) myrank,xgll(igll,jgll,kgll) , ygll(igll,jgll,kgll), zgll(igll,jgll,kgll) +!!$ endif +!!$ enddo +!!$ enddo +!!$ enddo + + + ! else + !write(*,*) xi,eta,gamma,x_center,y_center, z_center + ! endif + + ! ========================= on cherche les points GLL de ispec qui sont dans la cellule de la grille tomo + call calcule_point_gll(xgll,ygll,zgll,xstore_local,ystore_local,zstore_local,shape3D) + !if (myrank==0) write(*,'(a10,i4,3f30.6)')'------->:',ispec,xstore_local(7),ystore_local(7),zstore_local(7) + ijkgll=0 + do kgll = 1,NGLLZ + do jgll = 1,NGLLY + do igll = 1,NGLLX + + ijkgll=ijkgll+1 + + pxgll = xgll(igll,jgll,kgll) + pygll = ygll(igll,jgll,kgll) + pzgll = zgll(igll,jgll,kgll) + + !if (myrank==0) then + !write(*,'(a10,i4,3f30.6)') '------->:',myrank,px,py,pz + ! write(*,'(i4,3f30.6)') ijkgll,xgll(igll,jgll,kgll),ygll(igll,jgll,kgll),zgll(igll,jgll,kgll) + + !endif + + !call Find_xix_eta_gamma(xstore_local_int,ystore_local_int,zstore_local_int,xi,eta,gamma,pxgll,pygll,pzgll) + !if (dabs(xi)<=1.05d0.and.dabs(eta)<=1.05d0.and.dabs(gamma)<=1.05d0) then + + !! inverser la formule du mapping de la sphere cubique + call inv_mapping_sph_cub(pxgll,pygll,pzgll,ksi00,eta00,R_EARTH-zmax) + call radius_comp(R_EARTH-zmax, pxgll,pygll,pzgll,pmr00) + ii = 1+ floor( 0.5*(NNX - 1) * (1. + 2.*ksi00 / ANGULAR_WIDTH_XI_RAD )) + jj = 1+ floor( 0.5*(NNY - 1) * (1. + 2.*eta00 / ANGULAR_WIDTH_ETA_RAD)) + kk = 1+ floor((pmr00-r_bot)/(r_earth-r_bot)*(nnz-1) ) + + !write(*,*) ii,jj,kk + + indice_grille_i(igll,jgll,kgll,ispec) = ii + indice_grille_i1(igll,jgll,kgll,ispec)= ii+1 + + indice_grille_j(igll,jgll,kgll,ispec) = jj + indice_grille_j1(igll,jgll,kgll,ispec)= jj+1 + + indice_grille_k(igll,jgll,kgll,ispec) = kk + indice_grille_k1(igll,jgll,kgll,ispec)= kk+1 + + if (indice_grille_i(igll,jgll,kgll,ispec) < 1) indice_grille_i(igll,jgll,kgll,ispec)=1 + if (indice_grille_j(igll,jgll,kgll,ispec) < 1) indice_grille_j(igll,jgll,kgll,ispec)=1 + if (indice_grille_k(igll,jgll,kgll,ispec) < 1) indice_grille_k(igll,jgll,kgll,ispec)=1 + + indice_grille_i1(igll,jgll,kgll,ispec) = indice_grille_i(igll,jgll,kgll,ispec) + 1 + indice_grille_j1(igll,jgll,kgll,ispec) = indice_grille_j(igll,jgll,kgll,ispec) + 1 + indice_grille_k1(igll,jgll,kgll,ispec) = indice_grille_k(igll,jgll,kgll,ispec) + 1 + + if (indice_grille_i1(igll,jgll,kgll,ispec) > nx+1) indice_grille_i1(igll,jgll,kgll,ispec)=nx+1 + if (indice_grille_j1(igll,jgll,kgll,ispec) > ny+1) indice_grille_j1(igll,jgll,kgll,ispec)=ny+1 + if (indice_grille_k1(igll,jgll,kgll,ispec) > nz+1) indice_grille_k1(igll,jgll,kgll,ispec)=nz+1 + + + if (indice_grille_i(igll,jgll,kgll,ispec) > nx) indice_grille_i(igll,jgll,kgll,ispec)=nx + if (indice_grille_j(igll,jgll,kgll,ispec) > ny) indice_grille_j(igll,jgll,kgll,ispec)=ny + if (indice_grille_k(igll,jgll,kgll,ispec) > nz) indice_grille_k(igll,jgll,kgll,ispec)=nz + + ! check debbug + !if (myrank==10) then + ! ii=indice_grille_i(igll,jgll,kgll,ispec) + ! jj=indice_grille_j(igll,jgll,kgll,ispec) + ! kk=indice_grille_k(igll,jgll,kgll,ispec) + ! write(*,*) ksi00*180/3.14,ANGULAR_WIDTH_XI_RAD*180/3.14 + ! write(*,*) eta00*180/3.14,ANGULAR_WIDTH_ETA_RAD*180/3.14 + ! write(*,*) pmr00,r_bot,pmr00-r_bot + ! write(*,*) ii,jj,kk + ! write(*,*) xstore_tomo_grid_interp_tri(ii,jj,kk),xstore_tomo_grid_interp_tri(ii+1,jj,kk) + ! write(*,*) xstore_tomo_grid_interp_tri(ii,jj+1,kk),xstore_tomo_grid_interp_tri(ii+1,jj+1,kk) + ! write(*,*) xstore_tomo_grid_interp_tri(ii,jj,kk+1),xstore_tomo_grid_interp_tri(ii+1,jj,kk+1) + ! write(*,*) xstore_tomo_grid_interp_tri(ii,jj+1,kk+1),xstore_tomo_grid_interp_tri(ii+1,jj+1,kk+1) + ! write(*,*) pxgll + ! write(*,*) + ! write(*,*) ystore_tomo_grid_interp_tri(ii,jj,kk),ystore_tomo_grid_interp_tri(ii,jj+1,kk) + ! write(*,*) ystore_tomo_grid_interp_tri(ii+1,jj,kk),ystore_tomo_grid_interp_tri(ii+1,jj+1,kk) + ! write(*,*) ystore_tomo_grid_interp_tri(ii,jj,kk+1),ystore_tomo_grid_interp_tri(ii,jj+1,kk+1) + ! write(*,*) ystore_tomo_grid_interp_tri(ii+1,jj,kk+1),ystore_tomo_grid_interp_tri(ii+1,jj+1,kk+1) + ! write(*,*) pygll + ! write(*,*) + ! write(*,*) zstore_tomo_grid_interp_tri(ii,jj,kk),zstore_tomo_grid_interp_tri(ii,jj+1,kk) + ! write(*,*) zstore_tomo_grid_interp_tri(ii+1,jj,kk),zstore_tomo_grid_interp_tri(ii+1,jj+1,kk) + ! write(*,*) zstore_tomo_grid_interp_tri(ii,jj,kk+1),zstore_tomo_grid_interp_tri(ii,jj+1,kk+1) + ! write(*,*) zstore_tomo_grid_interp_tri(ii+1,jj,kk+1),zstore_tomo_grid_interp_tri(ii+1,jj+1,kk+1) + ! write(*,*) pzgll + + ! write(*,*) '-----' + !endif + ! je laisse ca mais je ne suis pas encore sur de son utilite +!!$ if (xi > 0. ) then +!!$ if (i1) indice_grille_i1(igll,jgll,kgll,ispec) = i-1 +!!$ endif +!!$ +!!$ if (eta > 0. ) then +!!$ if (j1) indice_grille_j1(igll,jgll,kgll,ispec) = j-1 +!!$ endif +!!$ +!!$ if (gamma > 0. ) then +!!$ if (k1) indice_grille_k1(igll,jgll,kgll,ispec) = k-1 +!!$ endif + + + !endif + enddo + enddo + enddo + + endif + enddo + enddo + enddo + + enddo + + ! allocation des tableaux locaux + ngrid_local=sum(ni(:)) + allocate(indice_integration(NGLLX,NGLLY,NGLLZ,ngrid_local)) + allocate(valeur_integration(NGLLX,NGLLY,NGLLZ,ngrid_local)) + allocate(volume_integration(NGLLX,NGLLY,NGLLZ,ngrid_local)) + allocate(x_grid_gll(NGLLX,NGLLY,NGLLZ,ngrid_local)) + allocate(y_grid_gll(NGLLX,NGLLY,NGLLZ,ngrid_local)) + allocate(z_grid_gll(NGLLX,NGLLY,NGLLZ,ngrid_local)) + + + index_grid=0 + do ispec=1,nspec_ab ! loop on spectral elements + do igrid_local=1,ni(ispec) ! loop on grid cells instide ispec + index_grid=index_grid+1 + ! cell index + i= indice_grid(1,igrid_local,ispec) + j= indice_grid(2,igrid_local,ispec) + k= indice_grid(3,igrid_local,ispec) + + + ! 8 corners + rx=1.d0;ry=1.d0;rz=1.d0 + pcz = r_bot + (dble(k)-rz)*hz + ratio_eta = (dble(j)-ry) / dble(NY) + yc = 2.d0*ratio_eta-1;yc = tan((ANGULAR_WIDTH_ETA_RAD/2.d0) * yc) + ratio_xi = (dble(i)-rx) / dble(NX) + xc = 2.d0*ratio_xi-1;xc = tan((ANGULAR_WIDTH_XI_RAD/2.d0) * xc) + pcx = xc*pcz; pcy = yc*pcz + pcz = -(R_EARTH - pcz/dsqrt(1.d0 + yc*yc + xc*xc) - zmax) + xstore_local_int(1) = pcx + ystore_local_int(1) = pcy + zstore_local_int(1) = pcz + + + rx=0.d0;ry=1.d0;rz=1.d0 + pcz = r_bot + (dble(k)-rz)*hz + ratio_eta = (dble(j)-ry) / dble(NY) + yc = 2.d0*ratio_eta-1;yc = tan((ANGULAR_WIDTH_ETA_RAD/2.d0) * yc) + ratio_xi = (dble(i)-rx) / dble(NX) + xc = 2.d0*ratio_xi-1;xc = tan((ANGULAR_WIDTH_XI_RAD/2.d0) * xc) + pcx = xc*pcz; pcy = yc*pcz + pcz = -(R_EARTH - pcz/dsqrt(1.d0 + yc*yc + xc*xc) - zmax) + xstore_local_int(2) = pcx + ystore_local_int(2) = pcy + zstore_local_int(2) = pcz + + rx=0.d0;ry=0.d0;rz=1.d0 + pcz = r_bot + (dble(k)-rz)*hz + ratio_eta = (dble(j)-ry) / dble(NY) + yc = 2.d0*ratio_eta-1;yc = tan((ANGULAR_WIDTH_ETA_RAD/2.d0) * yc) + ratio_xi = (dble(i)-rx) / dble(NX) + xc = 2.d0*ratio_xi-1;xc = tan((ANGULAR_WIDTH_XI_RAD/2.d0) * xc) + pcx = xc*pcz; pcy = yc*pcz + pcz = -(R_EARTH - pcz/dsqrt(1.d0 + yc*yc + xc*xc) - zmax) + xstore_local_int(3) = pcx + ystore_local_int(3) = pcy + zstore_local_int(3) = pcz + + rx=1.d0;ry=0.d0;rz=1.d0 + pcz = r_bot + (dble(k)-rz)*hz + ratio_eta = (dble(j)-ry) / dble(NY) + yc = 2.d0*ratio_eta-1;yc = tan((ANGULAR_WIDTH_ETA_RAD/2.d0) * yc) + ratio_xi = (dble(i)-rx) / dble(NX) + xc = 2.d0*ratio_xi-1;xc = tan((ANGULAR_WIDTH_XI_RAD/2.d0) * xc) + pcx = xc*pcz; pcy = yc*pcz + pcz = -(R_EARTH - pcz/dsqrt(1.d0 + yc*yc + xc*xc) - zmax) + xstore_local_int(4) = pcx + ystore_local_int(4) = pcy + zstore_local_int(4) = pcz + + rx=1.d0;ry=1.d0;rz=0.d0 + pcz = r_bot + (dble(k)-rz)*hz + ratio_eta = (dble(j)-ry) / dble(NY) + yc = 2.d0*ratio_eta-1;yc = tan((ANGULAR_WIDTH_ETA_RAD/2.d0) * yc) + ratio_xi = (dble(i)-rx) / dble(NX) + xc = 2.d0*ratio_xi-1;xc = tan((ANGULAR_WIDTH_XI_RAD/2.d0) * xc) + pcx = xc*pcz; pcy = yc*pcz + pcz = -(R_EARTH - pcz/dsqrt(1.d0 + yc*yc + xc*xc) - zmax) + xstore_local_int(5) = pcx + ystore_local_int(5) = pcy + zstore_local_int(5) = pcz + + rx=0.d0;ry=1.d0;rz=0.d0 + pcz = r_bot + (dble(k)-rz)*hz + ratio_eta = (dble(j)-ry) / dble(NY) + yc = 2.d0*ratio_eta-1;yc = tan((ANGULAR_WIDTH_ETA_RAD/2.d0) * yc) + ratio_xi = (dble(i)-rx) / dble(NX) + xc = 2.d0*ratio_xi-1;xc = tan((ANGULAR_WIDTH_XI_RAD/2.d0) * xc) + pcx = xc*pcz; pcy = yc*pcz + pcz = -(R_EARTH - pcz/dsqrt(1.d0 + yc*yc + xc*xc) - zmax) + xstore_local_int(6) = pcx + ystore_local_int(6) = pcy + zstore_local_int(6) = pcz + + + rx=0.d0;ry=0.d0;rz=0.d0 + pcz = r_bot + (dble(k)-rz)*hz + ratio_eta = (dble(j)-ry) / dble(NY) + yc = 2.d0*ratio_eta-1;yc = tan((ANGULAR_WIDTH_ETA_RAD/2.d0) * yc) + ratio_xi = (dble(i)-rx) / dble(NX) + xc = 2.d0*ratio_xi-1;xc = tan((ANGULAR_WIDTH_XI_RAD/2.d0) * xc) + pcx = xc*pcz; pcy = yc*pcz + pcz = -(R_EARTH - pcz/dsqrt(1.d0 + yc*yc + xc*xc) - zmax) + xstore_local_int(7) = pcx + ystore_local_int(7) = pcy + zstore_local_int(7) = pcz + + + rx=1.d0;ry=0.d0;rz=0.d0 + pcz = r_bot + (dble(k)-rz)*hz + ratio_eta = (dble(j)-ry) / dble(NY) + yc = 2.d0*ratio_eta-1;yc = tan((ANGULAR_WIDTH_ETA_RAD/2.d0) * yc) + ratio_xi = (dble(i)-rx) / dble(NX) + xc = 2.d0*ratio_xi-1;xc = tan((ANGULAR_WIDTH_XI_RAD/2.d0) * xc) + pcx = xc*pcz; pcy = yc*pcz + pcz = -(R_EARTH - pcz/dsqrt(1.d0 + yc*yc + xc*xc) - zmax) + xstore_local_int(8) = pcx + ystore_local_int(8) = pcy + zstore_local_int(8) = pcz + + ! compute gll points of cell : + call calcule_point_gll(xgll,ygll,zgll,xstore_local_int,ystore_local_int,zstore_local_int,shape3D) + do kgll = 1,NGLLZ + do jgll = 1,NGLLY + do igll = 1,NGLLX + !index_grid = index_grid + 1 + indice_integration(igll,jgll,kgll,index_grid) = 1 + x_grid_gll(igll,jgll,kgll,index_grid) = xgll(igll,jgll,kgll) + y_grid_gll(igll,jgll,kgll,index_grid) = ygll(igll,jgll,kgll) + z_grid_gll(igll,jgll,kgll,index_grid) = zgll(igll,jgll,kgll) + enddo + enddo + enddo + + enddo + enddo + + ! mpi comm + call mpi_reduce(indice,indice_glob,(nnx-1)*(nny-1)*(nnz-1),MPI_INTEGER ,MPI_SUM,0, MPI_COMM_WORLD, ierr) + indice(:,:,:) = indice_glob(:,:,:) + call mpi_bcast(indice,(nnx-1)*(nny-1)*(nnz-1),MPI_INTEGER,0, MPI_COMM_WORLD, ierr) + + call mpi_reduce(xstore_tomo_grid,work_array,(nnx-1)*(nny-1)*(nnz-1),MPI_DOUBLE_PRECISION ,MPI_SUM,0, MPI_COMM_WORLD, ierr) + xstore_tomo_grid(:,:,:)=work_array(:,:,:) + + call mpi_reduce(ystore_tomo_grid,work_array,(nnx-1)*(nny-1)*(nnz-1),MPI_DOUBLE_PRECISION ,MPI_SUM,0, MPI_COMM_WORLD, ierr) + ystore_tomo_grid(:,:,:)=work_array(:,:,:) + + call mpi_reduce(zstore_tomo_grid,work_array,(nnx-1)*(nny-1)*(nnz-1),MPI_DOUBLE_PRECISION ,MPI_SUM,0, MPI_COMM_WORLD, ierr) + zstore_tomo_grid(:,:,:)=work_array(:,:,:) + + call mpi_reduce(profondeur_tomo_grid,work_array,(nnx-1)*(nny-1)*(nnz-1),MPI_DOUBLE_PRECISION ,MPI_SUM,0, MPI_COMM_WORLD, ierr) + profondeur_tomo_grid(:,:,:)=work_array(:,:,:) + call mpi_bcast(profondeur_tomo_grid,nx*ny*nz,MPI_DOUBLE_PRECISION,0,MPI_COMM_WORLD,ier) + +!!$ call mpi_reduce(indice_integration,indice_int_glob,NGLLX*NGLLY*NGLLZ*(nnx-1)*(nny-1)*(nnz-1),MPI_INTEGER, MPI_SUM,0,MPI_COMM_WORLD,ier) +!!$ indice_integration(:,:,:,:) = indice_int_glob(:,:,:,:) +!!$ +!!$ call mpi_reduce(x_grid_gll,wk_reduce,NGLLX*NGLLY*NGLLZ*(nnx-1)*(nny-1)*(nnz-1),MPI_DOUBLE_PRECISION ,MPI_SUM,0, MPI_COMM_WORLD, ierr) +!!$ x_grid_gll(:,:,:,:)=wk_reduce(:,:,:,:) +!!$ call mpi_bcast(x_grid_gll,NGLLX*NGLLY*NGLLZ*(nnx-1)*(nny-1)*(nnz-1),MPI_DOUBLE_PRECISION,0, MPI_COMM_WORLD, ierr) +!!$ +!!$ call mpi_reduce(y_grid_gll,wk_reduce,NGLLX*NGLLY*NGLLZ*(nnx-1)*(nny-1)*(nnz-1),MPI_DOUBLE_PRECISION ,MPI_SUM,0, MPI_COMM_WORLD, ierr) +!!$ y_grid_gll(:,:,:,:)=wk_reduce(:,:,:,:) +!!$ call mpi_bcast(y_grid_gll,NGLLX*NGLLY*NGLLZ*(nnx-1)*(nny-1)*(nnz-1),MPI_DOUBLE_PRECISION,0, MPI_COMM_WORLD, ierr) +!!$ +!!$ call mpi_reduce(z_grid_gll,wk_reduce,NGLLX*NGLLY*NGLLZ*(nnx-1)*(nny-1)*(nnz-1),MPI_DOUBLE_PRECISION ,MPI_SUM,0, MPI_COMM_WORLD, ierr) +!!$ z_grid_gll(:,:,:,:)=wk_reduce(:,:,:,:) +!!$ call mpi_bcast(z_grid_gll,NGLLX*NGLLY*NGLLZ*(nnx-1)*(nny-1)*(nnz-1),MPI_DOUBLE_PRECISION,0, MPI_COMM_WORLD, ierr) + + !write(*,*) 'MAX VALUE NI : ', myrank, maxval(ni) + end subroutine create_chunk_grid_projection + + + +end module project_tomo_grid_mod + diff --git a/src/inverse_problem/rules.mk b/src/inverse_problem/rules.mk index 519a18985..c4feab0ee 100644 --- a/src/inverse_problem/rules.mk +++ b/src/inverse_problem/rules.mk @@ -130,7 +130,6 @@ xprogram01_add_model_SHARED_OBJECTS = \ $O/param_reader.cc.o \ $O/read_parameter_file.shared.o \ $O/read_value_parameters.shared.o \ - $O/unused_mod.shared_module.o \ $(EMPTY_MACRO) ## @@ -177,7 +176,6 @@ xprogram02_model_update_SHARED_OBJECTS = \ $O/param_reader.cc.o \ $O/read_parameter_file.shared.o \ $O/read_value_parameters.shared.o \ - $O/unused_mod.shared_module.o \ $O/write_VTK_data.shared.o \ $(EMPTY_MACRO) @@ -239,7 +237,6 @@ xprogram03_smooth_sem_SHARED_OBJECTS = \ $O/param_reader.cc.o \ $O/read_parameter_file.shared.o \ $O/read_value_parameters.shared.o \ - $O/unused_mod.shared_module.o \ $O/write_VTK_data.shared.o \ $(EMPTY_MACRO) @@ -263,7 +260,6 @@ xprogram04_sum_kernels_SHARED_OBJECTS = \ $O/param_reader.cc.o \ $O/read_parameter_file.shared.o \ $O/read_value_parameters.shared.o \ - $O/unused_mod.shared_module.o \ $(EMPTY_MACRO) ${E}/xprogram04_sum_kernels: $(xprogram04_sum_kernels_OBJECTS) $(xprogram04_sum_kernels_SHARED_OBJECTS) $(COND_MPI_OBJECTS) diff --git a/src/meshfem3D/check_mesh_quality.f90 b/src/meshfem3D/check_mesh_quality.f90 index efebff5a6..15700a618 100644 --- a/src/meshfem3D/check_mesh_quality.f90 +++ b/src/meshfem3D/check_mesh_quality.f90 @@ -287,7 +287,7 @@ subroutine check_mesh_quality(myrank,VP_MAX,NGLOB,NSPEC,x,y,z,ibool, & write(IMAIN,*) 'histogram of skewness (0. good - 1. bad):' write(IMAIN,*) total_percent = 0. - open(unit=14,file=OUTPUT_FILES_PATH(1:len_trim(OUTPUT_FILES_PATH))//'mesh_quality_histogram.txt',status='unknown') + open(unit=14,file=OUTPUT_FILES(1:len_trim(OUTPUT_FILES))//'mesh_quality_histogram.txt',status='unknown') do iclass = 0,NCLASS-1 current_percent = 100.*dble(classes_skewnessMPI(iclass))/dble(NSPEC_ALL_SLICES) total_percent = total_percent + current_percent @@ -298,7 +298,7 @@ subroutine check_mesh_quality(myrank,VP_MAX,NGLOB,NSPEC,x,y,z,ibool, & close(14) ! create script for Gnuplot histogram file - open(unit=14,file=OUTPUT_FILES_PATH(1:len_trim(OUTPUT_FILES_PATH))// & + open(unit=14,file=OUTPUT_FILES(1:len_trim(OUTPUT_FILES))// & 'plot_mesh_quality_histogram.gnu',status='unknown') write(14,*) 'set term x11' write(14,*) '#set term gif' diff --git a/src/meshfem3D/meshfem3D.f90 b/src/meshfem3D/meshfem3D.f90 index 85dec0a11..d7f9c7988 100644 --- a/src/meshfem3D/meshfem3D.f90 +++ b/src/meshfem3D/meshfem3D.f90 @@ -343,6 +343,8 @@ subroutine meshfem3D ! second dimension : #rho #vp #vs #Q_flag #anisotropy_flag #domain_id double precision , dimension(:,:), pointer :: material_properties + logical :: BROADCAST_AFTER_READ + ! ************** PROGRAM STARTS HERE ************** ! sizeprocs returns number of processes started (should be equal to NPROC). @@ -354,9 +356,9 @@ subroutine meshfem3D ! open main output file, only written to by process 0 if (myrank == 0 .and. IMAIN /= ISTANDARD_OUTPUT) then - open(unit=IMAIN,file=trim(OUTPUT_FILES_PATH)//'/output_meshfem3D.txt',status='unknown',iostat=ier) + open(unit=IMAIN,file=trim(OUTPUT_FILES)//'/output_meshfem3D.txt',status='unknown',iostat=ier) if (ier /= 0) then - print*,'Error could not open output file :',trim(OUTPUT_FILES_PATH)//'/output_meshfem3D.txt' + print*,'Error could not open output file :',trim(OUTPUT_FILES)//'/output_meshfem3D.txt' stop 'Error opening output file' endif endif @@ -374,9 +376,8 @@ subroutine meshfem3D endif ! read the parameter file (DATA/Par_file) - call read_parameter_file() - - call read_adios_parameters() + BROADCAST_AFTER_READ = .true. + call read_parameter_file(myrank,BROADCAST_AFTER_READ) ! if meshing a chunk of the Earth, call a specific internal mesher designed specifically for that if (COUPLE_WITH_EXTERNAL_CODE .and. MESH_A_CHUNK_OF_THE_EARTH) then @@ -428,14 +429,14 @@ subroutine meshfem3D ! get interface data from external file to count the spectral elements along Z if (myrank == 0) then - write(IMAIN,*) 'Reading interface data from file ',trim(MF_IN_DATA_FILES_PATH)//trim(INTERFACES_FILE), & + write(IMAIN,*) 'Reading interface data from file ',trim(MF_IN_DATA_FILES)//trim(INTERFACES_FILE), & ' to count the spectral elements' call flush_IMAIN() endif - open(unit=IIN,file=trim(MF_IN_DATA_FILES_PATH)//trim(INTERFACES_FILE),status='old',iostat=ier) + open(unit=IIN,file=trim(MF_IN_DATA_FILES)//trim(INTERFACES_FILE),status='old',iostat=ier) if (ier /= 0) then - print*,'Error opening interface file: ',trim(MF_IN_DATA_FILES_PATH)//trim(INTERFACES_FILE) + print*,'Error opening interface file: ',trim(MF_IN_DATA_FILES)//trim(INTERFACES_FILE) stop 'Error opening interface file' endif @@ -661,11 +662,11 @@ subroutine meshfem3D if (myrank == 0) then write(IMAIN,*) - write(IMAIN,*) 'Reading interface data from file ',trim(MF_IN_DATA_FILES_PATH)//trim(INTERFACES_FILE) + write(IMAIN,*) 'Reading interface data from file ',trim(MF_IN_DATA_FILES)//trim(INTERFACES_FILE) write(IMAIN,*) endif - open(unit=IIN,file=trim(MF_IN_DATA_FILES_PATH)//trim(INTERFACES_FILE),status='old',iostat=ier) + open(unit=IIN,file=trim(MF_IN_DATA_FILES)//trim(INTERFACES_FILE),status='old',iostat=ier) if (ier /= 0) stop 'Error opening interfaces file' allocate(interface_bottom(max_npx_interface,max_npy_interface),stat=ier) @@ -696,7 +697,7 @@ subroutine meshfem3D !npoints_interface_top = npx_interface_top * npy_interface ! loop on all the points describing this interface - open(unit=45,file=trim(MF_IN_DATA_FILES_PATH)//trim(interface_top_file),status='old',iostat=ier) + open(unit=45,file=trim(MF_IN_DATA_FILES)//trim(interface_top_file),status='old',iostat=ier) if (ier /= 0) stop 'Error opening interface_top file' do iy=1,npy_interface_top do ix=1,npx_interface_top diff --git a/src/meshfem3D/meshfem3D_adios_stubs.f90 b/src/meshfem3D/meshfem3D_adios_stubs.f90 index c9f05cd4e..b5d140d96 100644 --- a/src/meshfem3D/meshfem3D_adios_stubs.f90 +++ b/src/meshfem3D/meshfem3D_adios_stubs.f90 @@ -44,7 +44,6 @@ subroutine save_databases_adios(LOCAL_PATH, myrank, sizeprocs, & NMATERIALS,material_properties) use constants - use unused_mod use adios_manager_mod implicit none @@ -69,6 +68,10 @@ subroutine save_databases_adios(LOCAL_PATH, myrank, sizeprocs, & integer :: NMATERIALS double precision, dimension(NMATERIALS,7) :: material_properties + integer(kind=4) :: unused_i4 + logical :: unused_l + double precision :: unused_dp + unused_i4 = len_trim(LOCAL_PATH) unused_i4 = myrank unused_i4 = sizeprocs diff --git a/src/meshfem3D/read_value_mesh_parameters.f90 b/src/meshfem3D/read_value_mesh_parameters.f90 index af0371312..39835462a 100644 --- a/src/meshfem3D/read_value_mesh_parameters.f90 +++ b/src/meshfem3D/read_value_mesh_parameters.f90 @@ -246,16 +246,16 @@ end subroutine read_next_line subroutine open_parameter_file_mesh - use constants, only: IIN,MF_IN_DATA_FILES_PATH + use constants, only: IIN,MF_IN_DATA_FILES implicit none integer :: ier - open(unit=IIN,file=MF_IN_DATA_FILES_PATH(1:len_trim(MF_IN_DATA_FILES_PATH)) & + open(unit=IIN,file=MF_IN_DATA_FILES(1:len_trim(MF_IN_DATA_FILES)) & //'Mesh_Par_file',status='old',action='read',iostat=ier) if (ier /= 0) then - print*,'error opening file: ',MF_IN_DATA_FILES_PATH(1:len_trim(MF_IN_DATA_FILES_PATH)) + print*,'error opening file: ',MF_IN_DATA_FILES(1:len_trim(MF_IN_DATA_FILES)) print* print*,'please check your file path and run-directory.' stop 'error opening Mesh_Par_file' diff --git a/src/meshfem3D/rules.mk b/src/meshfem3D/rules.mk index 77fb59fee..8aef21dc0 100644 --- a/src/meshfem3D/rules.mk +++ b/src/meshfem3D/rules.mk @@ -82,7 +82,6 @@ meshfem3D_SHARED_OBJECTS = \ $O/read_value_parameters.shared.o \ $O/safe_alloc_mod.shared.o \ $O/sort_array_coordinates.shared.o \ - $O/unused_mod.shared_module.o \ $O/utm_geo.shared.o \ $(EMPTY_MACRO) @@ -145,7 +144,7 @@ $E/xmeshfem3D: $(XMESHFEM_OBJECTS) $O/meshfem3D.mesh.o: $O/create_regions_mesh.mesh.o $O/read_mesh_parameter_file.mesh.o ## adios -$O/meshfem3D_adios_stubs.mesh_noadios.o: $O/shared_par.shared_module.o $O/unused_mod.shared_module.o $O/adios_manager_stubs.shared_noadios.o +$O/meshfem3D_adios_stubs.mesh_noadios.o: $O/shared_par.shared_module.o $O/adios_manager_stubs.shared_noadios.o $O/save_databases_adios.mesh_adios.o: $O/safe_alloc_mod.shared.o $(adios_meshfem3D_PREOBJECTS) $O/create_regions_mesh.mesh.o: $(adios_meshfem3D_PREOBJECTS) diff --git a/src/postprocess/clip_sem.f90 b/src/postprocess/clip_sem.f90 new file mode 100644 index 000000000..5e50863e6 --- /dev/null +++ b/src/postprocess/clip_sem.f90 @@ -0,0 +1,199 @@ +!===================================================================== +! +! S p e c f e m 3 D V e r s i o n 3 . 0 +! --------------------------------------- +! +! Main historical authors: Dimitri Komatitsch and Jeroen Tromp +! Princeton University, USA +! and CNRS / University of Marseille, France +! (there are currently many more authors!) +! (c) Princeton University and CNRS / University of Marseille, July 2012 +! +! This program is free software; you can redistribute it and/or modify +! it under the terms of the GNU General Public License as published by +! the Free Software Foundation; either version 2 of the License, or +! (at your option) any later version. +! +! This program is distributed in the hope that it will be useful, +! but WITHOUT ANY WARRANTY; without even the implied warranty of +! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +! GNU General Public License for more details. +! +! You should have received a copy of the GNU General Public License along +! with this program; if not, write to the Free Software Foundation, Inc., +! 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +! +!===================================================================== + +! XCLIP_SEM +! +! USAGE +! mpirun -np NPROC bin/xclip_sem MIN_VAL MAX_VAL KERNEL_NAMES INPUT_FILE OUTPUT_DIR +! +! +! COMMAND LINE ARGUMENTS +! MIN_VAL - threshold below which array values are clipped +! MAX_VAL - threshold above which array values are clipped +! KERNEL_NAMES - one or more material parameter names separated by commas +! INPUT_DIR - directory from which arrays are read +! OUTPUT_DIR - directory to which clipped array are written +! +! +! DESCRIPTION +! For each name in KERNEL_NAMES, reads kernels from INPUT_DIR, applies +! thresholds, and writes the resulting clipped kernels to OUTPUT_DIR. +! +! KERNEL_NAMES is comma-delimited list of material names, +! e.g. 'reg1_alpha_kernel,reg1_beta_kernel,reg1_rho_kernel' +! +! Files written to OUTPUT_DIR have the suffix 'clip' appended, +! e.g. proc***alpha_kernel.bin becomes proc***alpha_kernel_clip.bin +! +! This program's primary use case is to clip kernels. It can be used though on +! any scalar field of dimension (NGLLX,NGLLY,NGLLZ,NSPEC). +! +! This is a parrallel program -- it must be invoked with mpirun or other +! appropriate utility. Operations are performed in embarassingly-parallel +! fashion. + + +program clip_sem + + use postprocess_par,only: MAX_STRING_LEN,IIN,IOUT, & + myrank,sizeprocs,NGLOB,NSPEC,NGLLX,NGLLY,NGLLZ,CUSTOM_REAL, & + MAX_KERNEL_NAMES + + use shared_parameters + + implicit none + + character(len=MAX_STRING_LEN) :: input_dir,output_dir,filename + character(len=MAX_STRING_LEN) :: arg(5) + integer :: ier, iker,nker,i,j,k,ispec + + character(len=MAX_STRING_LEN) :: kernel_names(MAX_KERNEL_NAMES) + character(len=MAX_STRING_LEN) :: kernel_names_comma_delimited, kernel_name + + real(kind=CUSTOM_REAL), dimension(:,:,:,:), allocatable :: sem_array + + double precision :: min_val, max_val + + logical :: BROADCAST_AFTER_READ + + ! ============ program starts here ===================== + + call init_mpi() + call world_size(sizeprocs) + call world_rank(myrank) + + ! parse command line arguments + do i = 1, 5 + call get_command_argument(i,arg(i), status=ier) + if (i <= 1 .and. trim(arg(i)) == '') then + if (myrank == 0) then + print *, 'USAGE: mpirun -np NPROC bin/xclip_sem MIN_VAL MAX_VAL KERNEL_NAMES INPUT_FILE OUTPUT_DIR' + print *, '' + stop 'Please check command line arguments' + endif + endif + enddo + + read(arg(1),*) min_val + read(arg(2),*) max_val + read(arg(3),'(a)') kernel_names_comma_delimited + read(arg(4),'(a)') input_dir + read(arg(5),'(a)') output_dir + + call parse_kernel_names(kernel_names_comma_delimited,kernel_names,nker) + + ! print status update + if (myrank==0) then + write(*,*) 'Running XCLIP_SEM' + write(*,*) + endif + call synchronize_all() + + ! read simulation parameters + BROADCAST_AFTER_READ = .true. + call read_parameter_file(myrank,BROADCAST_AFTER_READ) + + ! checks number of MPI processes + if (sizeprocs /= NPROC) then + if (myrank == 0) then + print*,'' + print*,'Expected number of MPI processes: ', NPROC + print*,'Actual number of MPI processes: ', sizeprocs + print*,'' + endif + call synchronize_all() + stop 'Error wrong number of MPI processes' + endif + call synchronize_all() + + ! read mesh dimensions + write(filename,'(a,i6.6,a)') trim(LOCAL_PATH)//'/proc',myrank,'_'//'external_mesh.bin' + open(unit=27,file=trim(filename),& + status='old',action='read',form='unformatted',iostat=ier) + if (ier /= 0) then + print*,'Error: could not open external mesh file ' + print*,'path: ',trim(filename) + stop 'Error reading external mesh file' + endif + + read(27) NSPEC + read(27) NGLOB + close(27) + call synchronize_all() + + allocate(sem_array(NGLLX,NGLLY,NGLLZ,NSPEC)) + + ! clip kernels + do iker=1,nker + + kernel_name = trim(kernel_names(iker)) + write(filename,'(a,i6.6,a)') trim(input_dir)//'/proc',myrank,'_'//trim(kernel_name)//'.bin' + + ! read array + open(IIN,file=trim(filename),status='old',form='unformatted',action='read',iostat=ier) + if (ier /= 0) then + write(*,*) ' file not found: ',trim(filename) + stop 'File not found' + endif + read(IIN) sem_array + close(IIN) + + if (myrank==0) write(*,*) 'clipping array: ',trim(kernel_names(iker)) + + ! apply thresholds + do ispec=1,NSPEC + do k=1,NGLLZ + do j=1,NGLLY + do i=1,NGLLX + if (sem_array(i,j,k,ispec) < min_val) sem_array(i,j,k,ispec) = min_val + if (sem_array(i,j,k,ispec) > max_val) sem_array(i,j,k,ispec) = max_val + enddo + enddo + enddo + enddo + + ! write clipped array + kernel_name = trim(kernel_names(iker))//'_clip' + write(filename,'(a,i6.6,a)') trim(input_dir)//'/proc',myrank,'_'//trim(kernel_name)//'.bin' + + open(IOUT,file=trim(filename),status='unknown',form='unformatted',action='write',iostat=ier) + if (ier /= 0) then + write(*,*) ' error opening file: ',trim(filename) + stop 'Error opening file' + endif + write(IOUT) sem_array + close(IOUT) + + enddo + + + if (myrank==0) write(*,*) 'done clipping all arrays, see directory: ', trim(output_dir) + deallocate(sem_array) + call finalize_mpi() + +end program clip_sem + diff --git a/src/postprocess/combine_sem.f90 b/src/postprocess/combine_sem.f90 new file mode 100644 index 000000000..c32889d22 --- /dev/null +++ b/src/postprocess/combine_sem.f90 @@ -0,0 +1,249 @@ +!===================================================================== +! +! S p e c f e m 3 D V e r s i o n 3 . 0 +! --------------------------------------- +! +! Main historical authors: Dimitri Komatitsch and Jeroen Tromp +! Princeton University, USA +! and CNRS / University of Marseille, France +! (there are currently many more authors!) +! (c) Princeton University and CNRS / University of Marseille, July 2012 +! +! This program is free software; you can redistribute it and/or modify +! it under the terms of the GNU General Public License as published by +! the Free Software Foundation; either version 2 of the License, or +! (at your option) any later version. +! +! This program is distributed in the hope that it will be useful, +! but WITHOUT ANY WARRANTY; without even the implied warranty of +! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +! GNU General Public License for more details. +! +! You should have received a copy of the GNU General Public License along +! with this program; if not, write to the Free Software Foundation, Inc., +! 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +! +!===================================================================== + +! XCOMBINE_SEM +! +! USAGE +! mpirun -np NPROC bin/xcombine_sem KERNEL_NAMES INPUT_FILE OUTPUT_DIR +! +! +! COMMAND LINE ARGUMENTS +! KERNEL_NAMES - one or more material parameter names separated by commas +! INPUT_FILE - text file containing list of kernel directories +! OUTPUT_PATH - directory to which summed kernels are written +! +! +! DESCRIPTION +! For each name in KERNEL_NAMES, sums kernels from directories specified in +! INPUT_FILE. Writes the resulting sums to OUTPUT_DIR. +! +! INPUT_FILE is a text file containing a list of absolute or relative paths to +! kernel direcotires, one directoy per line. +! +! KERNEL_NAMES is comma-delimited list of kernel names, +! e.g.'alpha_kernel,beta_kernel,rho_kernel'. +! +! This program's primary use case is to clip kernels. It can be used though on +! any scalar field of dimension (NGLLX,NGLLY,NGLLZ,NSPEC). +! +! This is a parrallel program -- it must be invoked with mpirun or other +! appropriate utility. Operations are performed in embarassingly-parallel +! fashion. + + +program combine_sem + + use postprocess_par,only: MAX_STRING_LEN,MAX_KERNEL_PATHS,IIN, & + myrank,sizeprocs,NGLOB,NSPEC + + use shared_parameters + + implicit none + + character(len=MAX_STRING_LEN) :: kernel_paths(MAX_KERNEL_PATHS), kernel_names(MAX_KERNEL_PATHS), & + kernel_names_comma_delimited + character(len=MAX_STRING_LEN) :: sline,prname_lp,output_dir,input_file + character(len=MAX_STRING_LEN) :: arg(3) + integer :: npath,nker + integer :: i,ier,iker + + logical :: BROADCAST_AFTER_READ + + ! ============ program starts here ===================== + + ! initialize the MPI communicator and start the NPROCTOT MPI processes + call init_mpi() + call world_size(sizeprocs) + call world_rank(myrank) + + ! parse command line arguments + do i = 1, 3 + call get_command_argument(i,arg(i), status=ier) + if (i <= 1 .and. trim(arg(i)) == '') then + if (myrank == 0) then + print *, 'USAGE: mpirun -np NPROC bin/xcombine_sem KERNEL_NAMES INPUT_FILE OUTPUT_DIR' + print *, '' + stop 'Please check command line arguments' + endif + endif + enddo + + read(arg(1),'(a)') kernel_names_comma_delimited + read(arg(2),'(a)') input_file + read(arg(3),'(a)') output_dir + + ! parse names from KERNEL_NAMES + call parse_kernel_names(kernel_names_comma_delimited,kernel_names,nker) + + ! parse paths from INPUT_FILE + npath=0 + open(unit = IIN, file = trim(input_file), status = 'old',iostat = ier) + if (ier /= 0) then + print *,'Error opening ',trim(input_file), myrank + stop 1 + endif + do while (1 == 1) + read(IIN,'(a)',iostat=ier) sline + if (ier /= 0) exit + npath = npath+1 + if (npath > MAX_KERNEL_PATHS) stop 'Error number of paths exceeds MAX_KERNEL_PATHS' + kernel_paths(npath) = sline + enddo + close(IIN) + if (myrank == 0) then + write(*,*) ' ',npath,' events' + write(*,*) + endif + + ! print status update + if (myrank==0) then + write(*,*) 'Running COMBINE_SEM' + write(*,*) + endif + call synchronize_all() + + ! read simulation parameters + BROADCAST_AFTER_READ = .true. + call read_parameter_file(myrank,BROADCAST_AFTER_READ) + + ! checks number of MPI processes + if (sizeprocs /= NPROC) then + if (myrank == 0) then + print*,'' + print*,'Expected number of MPI processes: ', NPROC + print*,'Actual number of MPI processes: ', sizeprocs + print*,'' + endif + call synchronize_all() + stop 'Error wrong number of MPI processes' + endif + call synchronize_all() + + ! read mesh dimensions + write(prname_lp,'(a,i6.6,a)') trim(LOCAL_PATH)//'/proc',myrank,'_'//'external_mesh.bin' + open(unit=27,file=trim(prname_lp),& + status='old',action='read',form='unformatted',iostat=ier) + if (ier /= 0) then + print*,'Error: could not open database ' + print*,'path: ',trim(prname_lp) + stop 'Error reading external mesh file' + endif + read(27) NSPEC + read(27) NGLOB + close(27) + call synchronize_all() + + ! sum kernels + if (myrank == 0) then + print*,'summing kernels in: ' + print*,kernel_paths(1:npath) + print* + endif + + do iker=1,nker + call combine_sem_array(kernel_names(iker),kernel_paths,output_dir,npath) + enddo + + + if (myrank==0) write(*,*) 'done writing all arrays, see directory: ', output_dir + call finalize_mpi() + +end program combine_sem + +! +!------------------------------------------------------------------------------------------------- +! + +subroutine combine_sem_array(kernel_name,kernel_paths,output_dir,npath) + + use postprocess_par + + implicit none + + character(len=MAX_STRING_LEN) :: kernel_name,kernel_paths(MAX_KERNEL_PATHS) + character(len=MAX_STRING_LEN) :: output_dir + integer :: npath + + ! local parameters + character(len=MAX_STRING_LEN*2) :: filename + real(kind=CUSTOM_REAL), dimension(:,:,:,:),allocatable :: array,sum_arrays + double precision :: norm,norm_sum + integer :: iker,ier + + allocate(array(NGLLX,NGLLY,NGLLZ,NSPEC), & + sum_arrays(NGLLX,NGLLY,NGLLZ,NSPEC),stat=ier) + if (ier /= 0) stop 'Error allocating array' + + ! loop over kernel paths + sum_arrays = 0._CUSTOM_REAL + do iker = 1, npath + if (myrank==0) then + write(*,*) 'reading in array for: ',trim(kernel_name) + write(*,*) ' ',iker, ' out of ', npath + endif + + ! read array + array = 0._CUSTOM_REAL + write(filename,'(a,i6.6,a)') trim(kernel_paths(iker)) //'/proc',myrank,'_'//trim(kernel_name)//'.bin' + open(IIN,file=trim(filename),status='old',form='unformatted',action='read',iostat=ier) + if (ier /= 0) then + write(*,*) ' array not found: ',trim(filename) + stop 'Error array file not found' + endif + read(IIN) array + close(IIN) + + ! print array information + norm = sum( array * array ) + call sum_all_dp(norm, norm_sum) + if (myrank == 0) then + print*,' norm array: ',sqrt(norm_sum) + print* + endif + + ! keep track of sum + sum_arrays = sum_arrays + array + + enddo + + ! write sum + if (myrank==0) write(*,*) 'writing sum: ',trim(kernel_name) + write(filename,'(a,i6.6,a)') trim(output_dir)//'/'//'proc',myrank,'_'//trim(kernel_name)//'.bin' + open(IOUT,file=trim(filename),form='unformatted',status='unknown',action='write',iostat=ier) + if (ier /= 0) then + write(*,*) 'Error array not written:',trim(filename) + stop 'Error array write' + endif + write(IOUT) sum_arrays + close(IOUT) + + if (myrank==0) write(*,*) + deallocate(array,sum_arrays) + +end subroutine combine_sem_array + + diff --git a/src/postprocess/parse_kernel_names.f90 b/src/postprocess/parse_kernel_names.f90 new file mode 100644 index 000000000..3c3a53c94 --- /dev/null +++ b/src/postprocess/parse_kernel_names.f90 @@ -0,0 +1,130 @@ +!===================================================================== +! +! S p e c f e m 3 D V e r s i o n 3 . 0 +! --------------------------------------- +! +! Main historical authors: Dimitri Komatitsch and Jeroen Tromp +! Princeton University, USA +! and CNRS / University of Marseille, France +! (there are currently many more authors!) +! (c) Princeton University and CNRS / University of Marseille, July 2012 +! +! This program is free software; you can redistribute it and/or modify +! it under the terms of the GNU General Public License as published by +! the Free Software Foundation; either version 2 of the License, or +! (at your option) any later version. +! +! This program is distributed in the hope that it will be useful, +! but WITHOUT ANY WARRANTY; without even the implied warranty of +! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +! GNU General Public License for more details. +! +! You should have received a copy of the GNU General Public License along +! with this program; if not, write to the Free Software Foundation, Inc., +! 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +! +!===================================================================== + + +subroutine parse_kernel_names(kernel_names_comma_delimited,kernel_names,nker) + + use postprocess_par,only: MAX_STRING_LEN, MAX_KERNEL_NAMES + + implicit none + + character,parameter :: delimiter = ',' + character(len=MAX_STRING_LEN) :: kernel_names_comma_delimited, kernel_names(MAX_KERNEL_NAMES) + integer :: iker, nker + + iker = 1 + call strtok(kernel_names_comma_delimited, delimiter, kernel_names(iker)) + do while (kernel_names(iker) /= char(0)) + iker = iker + 1 + call strtok(char(0), delimiter, kernel_names(iker)) + enddo + nker = iker-1 + +end subroutine + + +! +!------------------------------------------------------------------------------------------------- +! + +! The following utility function was modified from http://fortranwiki.org/fortran/show/strtok +! +subroutine strtok (source_string, delimiter, token) + +! @(#) Tokenize a string in a similar manner to C routine strtok(3c). +! +! Usage: First call STRTOK() with the string to tokenize as SOURCE_STRING, +! and the delimiter list used to tokenize SOURCE_STRING in delimiter. +! +! then, if the returned value is not equal to char(0), keep calling until it is +! with SOURCE_STRING set to char(0). +! +! STRTOK will return a token on each call until the entire line is processed, +! which it signals by returning char(0). +! +! Input: source_string = Source string to tokenize. +! delimiter = delimiter string. Used to determine the beginning/end of each token in a string. +! +! Output: strtok() +! +! LIMITATIONS: +! can not be called with a different string until current string is totally processed, even from different procedures + + use postprocess_par,only: MAX_STRING_LEN + +! PARAMETERS: + character(len=MAX_STRING_LEN), intent(in) :: source_string + character(len=1), intent(in) :: delimiter + character(len=MAX_STRING_LEN), intent(out) :: token + +! SAVED VALUES: + character(len=MAX_STRING_LEN),save :: saved_string + integer,save :: isaved_start ! points to beginning of unprocessed data + integer,save :: isource_len ! length of original input string + +! LOCAL VALUES: + integer :: ibegin ! beginning of token to return + integer :: ifinish ! end of token to return + + ! initialize stored copy of input string and pointer into input string on first call + if (source_string(1:1) /= char(0)) then + isaved_start = 1 ! beginning of unprocessed data + saved_string = source_string ! save input string from first call in series + isource_len = LEN(saved_string) ! length of input string from first call + endif + + ibegin = isaved_start + + do + if ( (ibegin <= isource_len) .AND. (index(delimiter,saved_string(ibegin:ibegin)) /= 0)) then + ibegin = ibegin + 1 + else + exit + endif + enddo + + if (ibegin > isource_len) then + token = char(0) + RETURN + endif + + ifinish = ibegin + + do + if ((ifinish <= isource_len) .AND. (index(delimiter,saved_string(ifinish:ifinish)) == 0)) then + ifinish = ifinish + 1 + else + exit + endif + enddo + + !strtok = "["//saved_string(ibegin:ifinish-1)//"]" + token = saved_string(ibegin:ifinish-1) + isaved_start = ifinish + +end subroutine strtok + diff --git a/src/shared/unused_mod.f90 b/src/postprocess/postprocess_par.f90 similarity index 71% rename from src/shared/unused_mod.f90 rename to src/postprocess/postprocess_par.f90 index 41480ba84..44fe7cc99 100644 --- a/src/shared/unused_mod.f90 +++ b/src/postprocess/postprocess_par.f90 @@ -25,19 +25,27 @@ ! !===================================================================== -module unused_mod - use constants, only: CUSTOM_REAL +module postprocess_par + + use constants,only: CUSTOM_REAL,MAX_STRING_LEN,IIN,IOUT, & + NGLLX,NGLLY,NGLLZ,NGLLSQUARE,NDIM, & + FOUR_THIRDS,R_EARTH_KM,GAUSSALPHA,GAUSSBETA,PI,TWO_PI implicit none - private :: CUSTOM_REAL + integer,parameter :: MAX_KERNEL_NAMES = 255 + integer,parameter :: MAX_KERNEL_PATHS = 65535 + + ! mesh size + integer :: NSPEC, NGLOB + + ! volume + real(kind=CUSTOM_REAL), dimension(:),allocatable :: x, y, z + integer, dimension(:,:,:,:),allocatable :: ibool + + ! mpi process + integer :: myrank,sizeprocs - integer(kind=4) :: unused_i4 - integer(kind=8) :: unused_i8 - real :: unused_r - double precision :: unused_dp - real(kind=CUSTOM_REAL) :: unused_cr - logical :: unused_l +end module postprocess_par -end module unused_mod diff --git a/src/postprocess/rules.mk b/src/postprocess/rules.mk new file mode 100644 index 000000000..0a3cb7f32 --- /dev/null +++ b/src/postprocess/rules.mk @@ -0,0 +1,175 @@ +#===================================================================== +# +# S p e c f e m 3 D V e r s i o n 3 . 0 +# --------------------------------------- +# +# Main historical authors: Dimitri Komatitsch and Jeroen Tromp +# Princeton University, USA +# and CNRS / University of Marseille, France +# (there are currently many more authors!) +# (c) Princeton University and CNRS / University of Marseille, July 2012 +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# +#===================================================================== + +## compilation directories +S := ${S_TOP}/src/postprocess +$(postprocess_OBJECTS): S := ${S_TOP}/src/postprocess + +####################################### + +postprocess_MODULES = \ + $(FC_MODDIR)/postprocess_par.$(FC_MODEXT) \ + $(EMPTY_MACRO) + +postprocess_TARGETS = \ + $E/xclip_sem \ + $E/xcombine_sem \ + $E/xsmooth_sem \ + $(EMPTY_MACRO) + +postprocess_OBJECTS = \ + $(xclip_sem_OBJECTS) \ + $(xcombine_sem_OBJECTS) \ + $(xsmooth_sem_OBJECTS) \ + $(EMPTY_MACRO) + +postprocess_SHARED_OBJECTS = \ + $(xclip_sem_SHARED_OBJECTS) \ + $(xcombine_sem_SHARED_OBJECTS) \ + $(xsmooth_sem_SHARED_OBJECTS) \ + $(EMPTY_MACRO) + +#### +#### rules for executables +#### + +.PHONY: postprocess + + +postprocess: $(postprocess_TARGETS) + + +### single targets + +clip_sem: xclip_sem +xclip_sem: $E/xclip_sem + +combine_sem: xcombine_sem +xcombine_sem: $E/xcombine_sem + +smooth_sem: xsmooth_sem +xsmooth_sem: $E/xsmooth_sem + + + +####################################### + +#### +#### rules for each program follow +#### + +####################################### + + +## +## xclip_sem +## +xclip_sem_OBJECTS = \ + $O/postprocess_par.postprocess_module.o \ + $O/parse_kernel_names.postprocess.o \ + $O/clip_sem.postprocess.o \ + $(EMPTY_MACRO) + +xclip_sem_SHARED_OBJECTS = \ + $O/shared_par.shared_module.o \ + $O/param_reader.cc.o \ + $O/read_parameter_file.shared.o \ + $O/read_value_parameters.shared.o \ + $(EMPTY_MACRO) + +${E}/xclip_sem: $(xclip_sem_OBJECTS) $(xclip_sem_SHARED_OBJECTS) $(COND_MPI_OBJECTS) + ${FCLINK} -o $@ $+ $(MPILIBS) + + +## +## xcombine_sem +## +xcombine_sem_OBJECTS = \ + $O/postprocess_par.postprocess_module.o \ + $O/parse_kernel_names.postprocess.o \ + $O/combine_sem.postprocess.o \ + $(EMPTY_MACRO) + +xcombine_sem_SHARED_OBJECTS = \ + $O/shared_par.shared_module.o \ + $O/param_reader.cc.o \ + $O/read_parameter_file.shared.o \ + $O/read_value_parameters.shared.o \ + $(EMPTY_MACRO) + +${E}/xcombine_sem: $(xcombine_sem_OBJECTS) $(xcombine_sem_SHARED_OBJECTS) $(COND_MPI_OBJECTS) + ${FCLINK} -o $@ $+ $(MPILIBS) + + +## +## xsmooth_sem +## +xsmooth_sem_OBJECTS = \ + $O/postprocess_par.postprocess_module.o \ + $O/parse_kernel_names.postprocess.o \ + $O/smooth_sem.postprocess.o \ + $(EMPTY_MACRO) + +xsmooth_sem_SHARED_OBJECTS = \ + $O/specfem3D_par.spec.o \ + $O/pml_par.spec.o \ + $O/read_mesh_databases.spec.o \ + $O/shared_par.shared_module.o \ + $O/check_mesh_resolution.shared.o \ + $O/create_name_database.shared.o \ + $O/exit_mpi.shared.o \ + $O/gll_library.shared.o \ + $O/param_reader.cc.o \ + $O/read_parameter_file.shared.o \ + $O/read_value_parameters.shared.o \ + $O/write_VTK_data.shared.o \ + $(EMPTY_MACRO) + +# extra dependencies +$O/smooth_sem.postprocess.o: $O/specfem3D_par.spec.o $O/postprocess_par.postprocess_module.o + +${E}/xsmooth_sem: $(xsmooth_sem_OBJECTS) $(xsmooth_sem_SHARED_OBJECTS) $(COND_MPI_OBJECTS) + ${FCLINK} -o $@ $+ $(MPILIBS) + + +####################################### + +### +### Module dependencies +### +$O/postprocess_par.postprocess_module.o: $O/shared_par.shared_module.o + +#### +#### rule for each .o file below +#### + +$O/%.postprocess_module.o: $S/%.f90 ${SETUP}/constants_tomography.h $O/shared_par.shared_module.o + ${FCCOMPILE_CHECK} ${FCFLAGS_f90} -c -o $@ $< + +$O/%.postprocess.o: $S/%.f90 ${SETUP}/constants_tomography.h $O/postprocess_par.postprocess_module.o + ${FCCOMPILE_CHECK} ${FCFLAGS_f90} -c -o $@ $< + diff --git a/src/tomography/smooth_sem.f90 b/src/postprocess/smooth_sem.f90 similarity index 87% rename from src/tomography/smooth_sem.f90 rename to src/postprocess/smooth_sem.f90 index aa218ddb4..8273c8d6c 100644 --- a/src/tomography/smooth_sem.f90 +++ b/src/postprocess/smooth_sem.f90 @@ -25,42 +25,40 @@ ! !===================================================================== -! this program can be used for smoothing a kernel, -! where it smooths files with a given input kernel name: +! XSMOOTH_SEM ! -! compile with: +! USAGE +! mpirun -np NPROC bin/xsmooth_sem SIGMA_H SIGMA_V KERNEL_NAME INPUT_DIR OUPUT_DIR ! -! make xsmooth_sem ! -! Usage: -! mpirun -np nprocs ./xsmooth_sem sigma_h sigma_v kernel_file_name scratch_file_dir output_dir -! e.g. -! mpirun -np 8 ./xsmooth_sem 100 20 alpha_kernel DATABASES_MPI/ OUTPUT_SUM/ +! COMMAND LINE ARGUMENTS +! SIGMA_H - horizontal smoothing radius +! SIGMA_V - vertical smoothing radius +! KERNEL_NAME - kernel name, e.g. alpha_kernel +! INPUT_DIR - directory from which kernels are read +! OUTPUT_DIR - directory to which smoothed kernels are written ! -! where: -! sigma_h - gaussian width for horizontal smoothing -! sigma_v - gaussian width for vertical smoothing -! kernel_file_name - takes file with this kernel name, -! e.g. "alpha_kernel" -! scratch_file_dir - directory containing kernel files, -! e.g. proc***_alpha_kernel.bin -! output_dir - directory for outputting files, -! e.g. proc***_alpha_kernel_smooth.bin -! outputs: -! puts the resulting, smoothed kernel files into the output_dir directory, -! with a file ending "proc***_kernel_smooth.bin" +! DESCRIPTION +! Smooths kernels by convolution with a Gaussian. Writes the resulting +! smoothed kernels to OUTPUT_DIR. +! +! Files written to OUTPUT_DIR have the suffix 'smooth' appended, +! e.g. proc***alpha_kernel.bin becomes proc***alpha_kernel_smooth.bin +! +! This program's primary use case is to smooth kernels. It can be used though on +! any scalar field of dimension (NGLLX,NGLLY,NGLLZ,NSPEC). +! +! This is a parrallel program -- it must be invoked with mpirun or other +! appropriate utility. Operations are performed in embarassingly-parallel +! fashion. -program smooth_sem -! this is the embarassingly-parallel program that smooths any specfem function (primarily the kernels) -! that has the dimension of (NGLLX,NGLLY,NGLLZ,NSPEC) -! -! NOTE: smoothing can be different in vertical & horizontal directions; mesh is in Cartesian geometry. -! algorithm uses vertical as Z, horizontal as X/Y direction +program smooth_sem - use constants,only: CUSTOM_REAL,NGLLX,NGLLY,NGLLZ,NDIM,NGLLSQUARE, & + use postprocess_par,only: CUSTOM_REAL,NGLLX,NGLLY,NGLLZ,NDIM,NGLLSQUARE, & MAX_STRING_LEN,IIN,IOUT, & - GAUSSALPHA,GAUSSBETA,PI,TWO_PI + GAUSSALPHA,GAUSSBETA,PI,TWO_PI, & + MAX_KERNEL_NAMES use specfem_par use specfem_par_elastic,only: ELASTIC_SIMULATION,ispec_is_elastic,rho_vp,rho_vs,min_resolved_period @@ -83,10 +81,15 @@ program smooth_sem integer :: node_list(MAX_NODE_LIST) character(len=MAX_STRING_LEN) :: arg(5) - character(len=MAX_STRING_LEN) :: filename, indir, outdir + character(len=MAX_STRING_LEN) :: kernel_name, input_dir, output_dir character(len=MAX_STRING_LEN) :: prname_lp character(len=MAX_STRING_LEN*2) :: local_data_file + + character(len=MAX_STRING_LEN) :: kernel_names(MAX_KERNEL_NAMES) + character(len=MAX_STRING_LEN) :: kernel_names_comma_delimited + integer :: nker + ! smoothing parameters character(len=MAX_STRING_LEN*2) :: ks_file @@ -110,46 +113,48 @@ program smooth_sem real(kind=CUSTOM_REAL) :: y_min_glob,y_max_glob real(kind=CUSTOM_REAL) :: z_min_glob,z_max_glob - ! initialize the MPI communicator and start the NPROCTOT MPI processes + logical :: BROADCAST_AFTER_READ + call init_mpi() call world_size(sizeprocs) call world_rank(myrank) - if (myrank == 0) print*,"smooth_sem:" + if (myrank == 0) print*,"Running SMOOTH_SEM" call synchronize_all() - ! reads arguments + ! parse command line arguments do i = 1, 5 call get_command_argument(i,arg(i)) if (i <= 5 .and. trim(arg(i)) == '') then if (myrank == 0) then - print *, 'Usage: ' - print *, ' xsmooth_data sigma_h sigma_v kernel_file_name input_dir/ output_dir/' - print * - print *, 'with ' - print *, ' sigma_h - gaussian width for horizontal smoothing' - print *, ' sigma_v - gaussian width for vertical smoothing' - print * - print *, ' possible kernel_file_names are: ' - print *, ' alpha_kernel, beta_kernel, .., rho_vp, rho_vs, kappastore, mustore, etc.' - print * - print *, ' that are stored in the local directory as real(kind=CUSTOM_REAL) filename(NGLLX,NGLLY,NGLLZ,NSPEC_AB) ' - print *, ' in filename.bin' - print * - print *, ' files have been collected in input_dir/, smooth output mesh file goes to output_dir/ ' - print * + print *, 'USAGE: mpirun -np NPROC bin/xsmooth_sem SIGMA_H SIGMA_V KERNEL_NAME INPUT_DIR OUPUT_DIR' endif call synchronize_all() - stop ' Reenter command line options' + stop ' Please check command line arguments' endif enddo - ! gets arguments read(arg(1),*) sigma_h read(arg(2),*) sigma_v - filename = arg(3) - indir= arg(4) - outdir = arg(5) + kernel_names_comma_delimited = arg(3) + input_dir= arg(4) + output_dir = arg(5) + + ! parse kernel names + call parse_kernel_names(kernel_names_comma_delimited,kernel_names,nker) + if ((myrank == 0) .and. (nker > 1)) then + if (myrank == 0) print * + if (myrank == 0) print *, 'Multiple kernel names supplied' + if (myrank == 0) print * + if (myrank == 0) print *, 'The machinery for reading multiple names from the command line' + if (myrank == 0) print *, 'is in place, but the smoothing routines themselves have not yet been' + if (myrank == 0) print *, 'modified to work on multiple arrays.' + if (myrank == 0) print * + if (myrank == 0) print *, 'Smoothing only first name in list: ', kernel_names(1) + if (myrank == 0) print * + endif + call synchronize_all() + kernel_name = trim(kernel_names(1)) ! initializes lengths sigma_h2 = 2.0 * sigma_h ** 2 ! factor two for gaussian distribution with standard variance sigma @@ -175,20 +180,18 @@ program smooth_sem ! user output if (myrank == 0) then - print*,"defaults:" + print*,"command line arguments:" print*," smoothing sigma_h , sigma_v : ",sigma_h,sigma_v ! scalelength: approximately S ~ sigma * sqrt(8.0) for a gaussian smoothing print*," smoothing scalelengths horizontal, vertical: ",sigma_h*sqrt(8.0),sigma_v*sqrt(8.0) - print*," input dir : ",trim(indir) - print*," output dir: ",trim(outdir) + print*," input dir : ",trim(input_dir) + print*," output dir: ",trim(output_dir) print* endif ! reads the parameter file - call read_parameter_file() - - ! reads ADIOS flags - call read_adios_parameters() + BROADCAST_AFTER_READ = .true. + call read_parameter_file(myrank,BROADCAST_AFTER_READ) if (ADIOS_ENABLED) stop 'Flag ADIOS_ENABLED not supported yet for smoothing, please rerun program...' @@ -472,8 +475,8 @@ program smooth_sem deallocate(ibool) ! data file - write(prname,'(a,i6.6,a)') trim(indir)//'proc',iproc,'_' - local_data_file = trim(prname) // trim(filename) // '.bin' + write(prname,'(a,i6.6,a)') trim(input_dir)//'proc',iproc,'_' + local_data_file = trim(prname) // trim(kernel_name) // '.bin' open(unit = IIN,file = trim(local_data_file),status='old',action='read',form ='unformatted',iostat=ier) if (ier /= 0) then @@ -577,7 +580,7 @@ program smooth_sem ! file output ! smoothed kernel file name - write(ks_file,'(a,i6.6,a)') trim(outdir)//'/proc',myrank,'_'//trim(filename)//'_smooth.bin' + write(ks_file,'(a,i6.6,a)') trim(output_dir)//'/proc',myrank,'_'//trim(kernel_name)//'_smooth.bin' open(IOUT,file=trim(ks_file),status='unknown',form='unformatted',iostat=ier) if (ier /= 0) stop 'Error opening smoothed kernel file' @@ -671,3 +674,4 @@ subroutine get_distance_vec(dist_h,dist_v,x0,y0,z0,x1,y1,z1) end subroutine get_distance_vec + diff --git a/src/shared/create_serial_name_database.f90 b/src/shared/create_serial_name_database.f90 deleted file mode 100644 index 25668ad8f..000000000 --- a/src/shared/create_serial_name_database.f90 +++ /dev/null @@ -1,86 +0,0 @@ -!===================================================================== -! -! S p e c f e m 3 D V e r s i o n 3 . 0 -! --------------------------------------- -! -! Main historical authors: Dimitri Komatitsch and Jeroen Tromp -! Princeton University, USA -! and CNRS / University of Marseille, France -! (there are currently many more authors!) -! (c) Princeton University and CNRS / University of Marseille, July 2012 -! -! This program is free software; you can redistribute it and/or modify -! it under the terms of the GNU General Public License as published by -! the Free Software Foundation; either version 2 of the License, or -! (at your option) any later version. -! -! This program is distributed in the hope that it will be useful, -! but WITHOUT ANY WARRANTY; without even the implied warranty of -! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -! GNU General Public License for more details. -! -! You should have received a copy of the GNU General Public License along -! with this program; if not, write to the Free Software Foundation, Inc., -! 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -! -!===================================================================== - - subroutine create_serial_name_database(prname,iproc,LOCAL_PATH,NPROC,OUTPUT_FILES) - -! create name of the database for serial codes (AVS_DX and codes to check buffers) - - use constants - - implicit none - - integer iproc,NPROC - -! name of the database file - character(len=MAX_STRING_LEN) :: prname,procname,LOCAL_PATH,clean_LOCAL_PATH,serial_prefix,OUTPUT_FILES - - integer iprocloop,nproc_max_loop - integer, dimension(:), allocatable :: num_active_proc - integer ier - nproc_max_loop = NPROC-1 - -! create the name for the database of the current slide and region - write(procname,"('/proc',i6.6,'_')") iproc - -! on a Beowulf-type machine, path on frontend can be different from local paths - if (.not. LOCAL_PATH_IS_ALSO_GLOBAL) then - -! allocate array for active processors - allocate(num_active_proc(0:nproc_max_loop),stat=ier) - if (ier /= 0) stop 'error allocating array num_active_proc' - -! read filtered file with name of active machines - open(unit=48,file=trim(OUTPUT_FILES)//'/filtered_machines.txt',status='old',action='read') - do iprocloop = 0,nproc_max_loop - read(48,*) num_active_proc(iprocloop) - enddo - close(48) - -! create the serial prefix pointing to the correct machine - write(serial_prefix,"('/auto/scratch_n',i6.6,'/')") num_active_proc(iproc) - -! suppress everything until the last "/" to define the base name of local path -! this is system dependent since it assumes the disks are mounted -! as on our Beowulf (Unix and NFS) - clean_LOCAL_PATH = LOCAL_PATH(index(LOCAL_PATH,'/',.true.)+1:len_trim(LOCAL_PATH)) - -! create full name with path - prname = serial_prefix(1:len_trim(serial_prefix)) // clean_LOCAL_PATH(1:len_trim(clean_LOCAL_PATH)) // procname - -! deallocate array - deallocate(num_active_proc) - -! on shared-memory machines, global path is the same as local path - else - -! create full name with path - prname = LOCAL_PATH(1:len_trim(LOCAL_PATH)) // procname - - endif - - end subroutine create_serial_name_database - diff --git a/src/shared/exit_mpi.f90 b/src/shared/exit_mpi.f90 index 29721fec6..4965efc91 100644 --- a/src/shared/exit_mpi.f90 +++ b/src/shared/exit_mpi.f90 @@ -47,7 +47,7 @@ subroutine exit_MPI(myrank,error_msg) ! write error message to file write(outputname,"('/error_message',i6.6,'.txt')") myrank - open(unit=IERROR,file=trim(OUTPUT_FILES_PATH)//outputname,status='unknown') + open(unit=IERROR,file=trim(OUTPUT_FILES)//outputname,status='unknown') write(IERROR,*) error_msg(1:len(error_msg)) write(IERROR,*) 'Error detected, aborting MPI... proc ',myrank close(IERROR) diff --git a/src/shared/get_cmt.f90 b/src/shared/get_cmt.f90 index 30663f350..75cbc3228 100644 --- a/src/shared/get_cmt.f90 +++ b/src/shared/get_cmt.f90 @@ -28,7 +28,7 @@ subroutine get_cmt(yr,jda,ho,mi,sec,tshift_cmt,hdur,lat,long,depth,moment_tensor,& DT,NSOURCES,min_tshift_cmt_original) - use constants,only: IIN,IN_DATA_FILES_PATH,MAX_STRING_LEN,mygroup + use constants,only: IIN,IN_DATA_FILES,MAX_STRING_LEN,mygroup use shared_parameters,only: NUMBER_OF_SIMULTANEOUS_RUNS implicit none @@ -63,7 +63,7 @@ subroutine get_cmt(yr,jda,ho,mi,sec,tshift_cmt,hdur,lat,long,depth,moment_tensor ! !---- read hypocenter info ! - CMTSOLUTION = IN_DATA_FILES_PATH(1:len_trim(IN_DATA_FILES_PATH))//'CMTSOLUTION' + CMTSOLUTION = IN_DATA_FILES(1:len_trim(IN_DATA_FILES))//'CMTSOLUTION' ! see if we are running several independent runs in parallel ! if so, add the right directory for that run (group numbers start at zero, but directory names start at run0001, thus we add one) ! a negative value for "mygroup" is a convention that indicates that groups (i.e. sub-communicators, one per run) are off @@ -409,7 +409,7 @@ double precision function get_cmt_scalar_moment(Mxx,Myy,Mzz,Mxy,Mxz,Myz) scalar_moment = Mxx**2 + Myy**2 + Mzz**2 + 2.d0 * Mxy**2 + 2.d0 * Mxz**2 + 2.d0 * Myz**2 ! adds 1/2 to be coherent with double couple or point sources - scalar_moment = dsqrt(scalar_moment/2.0d0) + scalar_moment = dsqrt(0.5d0*scalar_moment) ! scale factor for the moment tensor ! @@ -460,7 +460,8 @@ double precision function get_cmt_moment_magnitude(Mxx,Myy,Mzz,Mxy,Mxz,Myz) ! for converting from scalar moment M0 to moment magnitude. (..)" ! see: http://earthquake.usgs.gov/aboutus/docs/020204mag_policy.php - Mw = 2.d0/3.d0 * log10( M0 ) - 10.7 + Mw = 2.d0/3.d0 * log10( max(M0,tiny(M0)) ) - 10.7 + ! this is to ensure M0>0.0 inorder to avoid arithmatic error. ! return value get_cmt_moment_magnitude = Mw diff --git a/src/shared/get_force.f90 b/src/shared/get_force.f90 index 6ca5f5c48..cb64c02d5 100644 --- a/src/shared/get_force.f90 +++ b/src/shared/get_force.f90 @@ -28,7 +28,7 @@ subroutine get_force(tshift_force,hdur,lat,long,depth,NSOURCES,min_tshift_force_original,factor_force_source, & comp_dir_vect_source_E,comp_dir_vect_source_N,comp_dir_vect_source_Z_UP) - use constants,only: IIN,IN_DATA_FILES_PATH,MAX_STRING_LEN,TINYVAL,mygroup + use constants,only: IIN,IN_DATA_FILES,MAX_STRING_LEN,TINYVAL,mygroup use shared_parameters,only: NUMBER_OF_SIMULTANEOUS_RUNS implicit none @@ -67,7 +67,7 @@ subroutine get_force(tshift_force,hdur,lat,long,depth,NSOURCES,min_tshift_force_ ! !---- read info ! - FORCESOLUTION = IN_DATA_FILES_PATH(1:len_trim(IN_DATA_FILES_PATH))//'FORCESOLUTION' + FORCESOLUTION = IN_DATA_FILES(1:len_trim(IN_DATA_FILES))//'FORCESOLUTION' ! see if we are running several independent runs in parallel ! if so, add the right directory for that run (group numbers start at zero, but directory names start at run0001, thus we add one) ! a negative value for "mygroup" is a convention that indicates that groups (i.e. sub-communicators, one per run) are off diff --git a/src/shared/parallel.f90 b/src/shared/parallel.f90 index fe5894de0..fe62f66ff 100644 --- a/src/shared/parallel.f90 +++ b/src/shared/parallel.f90 @@ -390,6 +390,79 @@ subroutine bcast_all_r_for_database(buffer, countval) end subroutine bcast_all_r_for_database +! +!---- broadcast using MPI_COMM_WORLD +! + + subroutine bcast_all_singlei_world(buffer) + + use my_mpi + + implicit none + + integer :: buffer + + integer :: ier + + call MPI_BCAST(buffer,1,MPI_INTEGER,0,MPI_COMM_WORLD,ier) + + end subroutine bcast_all_singlei_world + +! +!---- +! + + subroutine bcast_all_singlel_world(buffer) + + use my_mpi + + implicit none + + logical :: buffer + + integer :: ier + + call MPI_BCAST(buffer,1,MPI_LOGICAL,0,MPI_COMM_WORLD,ier) + + end subroutine bcast_all_singlel_world + +! +!---- +! + + subroutine bcast_all_singledp_world(buffer) + + use my_mpi + + implicit none + + double precision :: buffer + + integer :: ier + + call MPI_BCAST(buffer,1,MPI_DOUBLE_PRECISION,0,MPI_COMM_WORLD,ier) + + end subroutine bcast_all_singledp_world + +! +!---- +! + + subroutine bcast_all_string_world(buffer) + + use my_mpi + use constants,only: MAX_STRING_LEN + + implicit none + + character(len=MAX_STRING_LEN) :: buffer + + integer :: ier + + call MPI_BCAST(buffer,MAX_STRING_LEN,MPI_CHARACTER,0,MPI_COMM_WORLD,ier) + + end subroutine bcast_all_string_world + ! !---- ! @@ -550,7 +623,17 @@ subroutine init_mpi() ! we need to make sure that NUMBER_OF_SIMULTANEOUS_RUNS and BROADCAST_SAME_MESH_AND_MODEL are read before calling world_split() ! thus read the parameter file call MPI_COMM_RANK(MPI_COMM_WORLD,myrank,ier) - if (myrank == 0) call read_parameter_file() + if (myrank == 0) then + call open_parameter_file_from_master_only(ier) + ! we need to make sure that NUMBER_OF_SIMULTANEOUS_RUNS and BROADCAST_SAME_MESH_AND_MODEL are read + call read_value_integer(NUMBER_OF_SIMULTANEOUS_RUNS, 'NUMBER_OF_SIMULTANEOUS_RUNS', ier) + if (ier /= 0) stop 'Error reading Par_file parameter NUMBER_OF_SIMULTANEOUS_RUNS' + call read_value_logical(BROADCAST_SAME_MESH_AND_MODEL, 'BROADCAST_SAME_MESH_AND_MODEL', ier) + if (ier /= 0) stop 'Error reading Par_file parameter BROADCAST_SAME_MESH_AND_MODEL' + ! close parameter file + call close_parameter_file() + endif + ! broadcast parameters read from master to all processes my_local_mpi_comm_world = MPI_COMM_WORLD call bcast_all_singlei(NUMBER_OF_SIMULTANEOUS_RUNS) @@ -1363,7 +1446,7 @@ end subroutine world_duplicate subroutine world_split() use my_mpi - use constants,only: MAX_STRING_LEN,OUTPUT_FILES_PATH, & + use constants,only: MAX_STRING_LEN,OUTPUT_FILES, & IMAIN,ISTANDARD_OUTPUT,mygroup,I_should_read_the_database use shared_parameters,only: NUMBER_OF_SIMULTANEOUS_RUNS,BROADCAST_SAME_MESH_AND_MODEL @@ -1409,7 +1492,7 @@ subroutine world_split() ! add the right directory for that run (group numbers start at zero, but directory names start at run0001, thus we add one) write(path_to_add,"('run',i4.4,'/')") mygroup + 1 - OUTPUT_FILES_PATH = path_to_add(1:len_trim(path_to_add))//OUTPUT_FILES_PATH(1:len_trim(OUTPUT_FILES_PATH)) + OUTPUT_FILES = path_to_add(1:len_trim(path_to_add))//OUTPUT_FILES(1:len_trim(OUTPUT_FILES)) !--- create a subcommunicator to broadcast the identical mesh and model databases if needed if (BROADCAST_SAME_MESH_AND_MODEL) then diff --git a/src/shared/param_reader.c b/src/shared/param_reader.c index 3103a264a..06bcb5237 100644 --- a/src/shared/param_reader.c +++ b/src/shared/param_reader.c @@ -56,7 +56,9 @@ by Dennis McRitchie (Princeton University, USA) #include #include +#ifndef LINE_MAX #define LINE_MAX 255 +#endif /* * Mac OS X's gcc does not support strnlen and strndup. @@ -99,7 +101,7 @@ FC_FUNC_(param_open,PARAM_OPEN)(char * filename, int * length, int * ierr) fncopy[blank - fncopy] = '\0'; } if ((fid = fopen(fncopy, "r")) == NULL) { - printf("Can't open '%s'\n", fncopy); +// DK DK purposely suppressed this printf("Can't open '%s'\n", fncopy); *ierr = 1; return; } @@ -125,6 +127,7 @@ FC_FUNC_(param_read,PARAM_READ)(char * string_read, int * string_read_len, char regmatch_t parameter[3]; char * keyword; char * value; + size_t value_len; // Trim the keyword name we're looking for. namecopy = strndup(name, *name_len); @@ -151,7 +154,7 @@ FC_FUNC_(param_read,PARAM_READ)(char * string_read, int * string_read_len, char } // Position the open file to the beginning. if (fseek(fid, 0, SEEK_SET) != 0) { - printf("Can't seek to begining of parameter file\n"); + printf("Can't seek to beginning of parameter file\n"); *ierr = 1; regfree(&compiled_pattern); return; @@ -191,7 +194,10 @@ FC_FUNC_(param_read,PARAM_READ)(char * string_read, int * string_read_len, char value = strndup(line+parameter[2].rm_so, parameter[2].rm_eo-parameter[2].rm_so); // Clear out the return string with blanks, copy the value into it, and return. memset(string_read, ' ', *string_read_len); - strncpy(string_read, value, strlen(value)); + value_len = strlen(value); + if (value_len > (size_t)*string_read_len) + value_len = *string_read_len; + strncpy(string_read, value, value_len); free(value); free(namecopy); *ierr = 0; diff --git a/src/shared/read_parameter_file.f90 b/src/shared/read_parameter_file.f90 index f0c906f31..2b9b454da 100644 --- a/src/shared/read_parameter_file.f90 +++ b/src/shared/read_parameter_file.f90 @@ -25,7 +25,7 @@ ! !===================================================================== - subroutine read_parameter_file() + subroutine read_parameter_file(myrank,BROADCAST_AFTER_READ) use constants @@ -33,6 +33,9 @@ subroutine read_parameter_file() implicit none + integer, intent(in) :: myrank + logical, intent(in) :: BROADCAST_AFTER_READ + ! local variables integer :: icounter,isource,idummy,ier integer :: nproc_eta_old,nproc_xi_old @@ -46,20 +49,24 @@ subroutine read_parameter_file() !logical :: sep_dir_exists integer :: i,irange +! read from a single processor (the master) and then use MPI to broadcast to others +! to avoid an I/O bottleneck in the case of very large runs + if(myrank == 0) then + ! opens file Par_file call open_parameter_file(ier) ! total number of processors call read_value_integer(NPROC, 'NPROC', ier) if (ier /= 0) then - ! checks if it's using an old Par_file format + ! checks if it uses an old Par_file format call read_value_integer(nproc_eta_old, 'NPROC_ETA', ier) if (ier /= 0) then print*,'please specify the number of processes in Par_file as:' print*,'NPROC = ' return endif - ! checks if it's using an old Par_file format + ! checks if it uses an old Par_file format call read_value_integer(nproc_xi_old, 'NPROC_XI', ier) if (ier /= 0) then print*,'please specify the number of processes in Par_file as:' @@ -104,8 +111,12 @@ subroutine read_parameter_file() if (ier /= 0) stop 'Error reading Par_file parameter FULL_ATTENUATION_SOLID' call read_value_logical(ANISOTROPY, 'ANISOTROPY', ier) if (ier /= 0) stop 'Error reading Par_file parameter ANISOTROPY' + call read_value_logical(GRAVITY, 'GRAVITY', ier) + if (ier /= 0) stop 'Error reading Par_file parameter GRAVITY' + call read_value_string(TOMOGRAPHY_PATH, 'TOMOGRAPHY_PATH', ier) if (ier /= 0) stop 'Error reading Par_file parameter TOMOGRAPHY_PATH' + call read_value_logical(USE_OLSEN_ATTENUATION, 'USE_OLSEN_ATTENUATION', ier) if (ier /= 0) stop 'Error reading Par_file parameter USE_OLSEN_ATTENUATION' call read_value_double_precision(OLSEN_ATTENUATION_RATIO, 'OLSEN_ATTENUATION_RATIO', ier) @@ -157,8 +168,20 @@ subroutine read_parameter_file() if (ier /= 0) stop 'Error reading Par_file parameter SAVE_SEISMOGRAMS_VELOCITY' call read_value_logical(SAVE_SEISMOGRAMS_ACCELERATION, 'SAVE_SEISMOGRAMS_ACCELERATION', ier) if (ier /= 0) stop 'Error reading Par_file parameter SAVE_SEISMOGRAMS_ACCELERATION' - if(.not. SAVE_SEISMOGRAMS_DISPLACEMENT .and. .not. SAVE_SEISMOGRAMS_VELOCITY .and. .not. SAVE_SEISMOGRAMS_ACCELERATION) & - stop 'Error: at least one of SAVE_SEISMOGRAMS_DISPLACEMENT SAVE_SEISMOGRAMS_VELOCITY SAVE_SEISMOGRAMS_ACCELERATION must be true' + call read_value_logical(SAVE_SEISMOGRAMS_PRESSURE, 'SAVE_SEISMOGRAMS_PRESSURE', ier) + if (ier /= 0) stop 'Error reading Par_file parameter SAVE_SEISMOGRAMS_PRESSURE' + + if(.not. SAVE_SEISMOGRAMS_DISPLACEMENT .and. .not. SAVE_SEISMOGRAMS_VELOCITY .and. & + .not. SAVE_SEISMOGRAMS_ACCELERATION .and. .not. SAVE_SEISMOGRAMS_PRESSURE) & + stop 'Error: at least one of SAVE_SEISMOGRAMS_DISPLACEMENT SAVE_SEISMOGRAMS_VELOCITY SAVE_SEISMOGRAMS_ACCELERATION & + &SAVE_SEISMOGRAMS_PRESSURE must be true' + +! this could be implemented in the future if needed, see comments in the source code around the USE_TRICK_FOR_BETTER_PRESSURE +! option (use a "grep" command to find them) to see how this could/should be done + if(USE_TRICK_FOR_BETTER_PRESSURE .and. (SAVE_SEISMOGRAMS_DISPLACEMENT .or. SAVE_SEISMOGRAMS_VELOCITY .or. & + SAVE_SEISMOGRAMS_ACCELERATION)) stop 'USE_TRICK_FOR_BETTER_PRESSURE is currently incompatible with & + &SAVE_SEISMOGRAMS_DISPLACEMENT .or. SAVE_SEISMOGRAMS_VELOCITY .or. SAVE_SEISMOGRAMS_ACCELERATION, & + &only SAVE_SEISMOGRAMS_PRESSURE can be used' call read_value_logical(USE_BINARY_FOR_SEISMOGRAMS, 'USE_BINARY_FOR_SEISMOGRAMS', ier) if (ier /= 0) stop 'Error reading Par_file parameter USE_BINARY_FOR_SEISMOGRAMS' @@ -172,6 +195,30 @@ subroutine read_parameter_file() call read_value_logical(SAVE_ALL_SEISMOS_IN_ONE_FILE, 'SAVE_ALL_SEISMOS_IN_ONE_FILE', ier) if (ier /= 0) stop 'Error reading Par_file parameter SAVE_ALL_SEISMOS_IN_ONE_FILE' + call read_value_logical(USE_TRICK_FOR_BETTER_PRESSURE, 'USE_TRICK_FOR_BETTER_PRESSURE', ier) + if (ier /= 0) stop 'Error reading Par_file parameter USE_TRICK_FOR_BETTER_PRESSURE' + + call read_value_logical(USE_SOURCE_ENCODING, 'USE_SOURCE_ENCODING', ier) + if (ier /= 0) stop 'Error reading Par_file parameter USE_SOURCE_ENCODING' + + call read_value_logical(OUTPUT_ENERGY, 'OUTPUT_ENERGY', ier) + if (ier /= 0) stop 'Error reading Par_file parameter OUTPUT_ENERGY' + + call read_value_integer(NTSTEP_BETWEEN_OUTPUT_ENERGY, 'NTSTEP_BETWEEN_OUTPUT_ENERGY', ier) + if (ier /= 0) stop 'Error reading Par_file parameter NTSTEP_BETWEEN_OUTPUT_ENERGY' + + call read_value_logical(ANISOTROPIC_KL, 'ANISOTROPIC_KL', ier) + if (ier /= 0) stop 'Error reading Par_file parameter ANISOTROPIC_KL' + + call read_value_logical(SAVE_TRANSVERSE_KL, 'SAVE_TRANSVERSE_KL', ier) + if (ier /= 0) stop 'Error reading Par_file parameter SAVE_TRANSVERSE_KL' + + call read_value_logical(APPROXIMATE_HESS_KL, 'APPROXIMATE_HESS_KL', ier) + if (ier /= 0) stop 'Error reading Par_file parameter APPROXIMATE_HESS_KL' + + call read_value_logical(SAVE_MOHO_MESH, 'SAVE_MOHO_MESH', ier) + if (ier /= 0) stop 'Error reading Par_file parameter SAVE_MOHO_MESH' + call read_value_logical(PRINT_SOURCE_TIME_FUNCTION, 'PRINT_SOURCE_TIME_FUNCTION', ier) if (ier /= 0) stop 'Error reading Par_file parameter PRINT_SOURCE_TIME_FUNCTION' @@ -191,9 +238,6 @@ subroutine read_parameter_file() call read_value_logical(BROADCAST_SAME_MESH_AND_MODEL, 'BROADCAST_SAME_MESH_AND_MODEL', ier) if (ier /= 0) stop 'Error reading Par_file parameter BROADCAST_SAME_MESH_AND_MODEL' - ! close parameter file - call close_parameter_file() - ! check the type of external code to couple with, if any if (COUPLE_WITH_EXTERNAL_CODE) then if (EXTERNAL_CODE_TYPE /= EXTERNAL_CODE_IS_DSM .and. & @@ -251,7 +295,7 @@ subroutine read_parameter_file() if (USE_FORCE_POINT_SOURCE) then ! compute the total number of sources in the FORCESOLUTION file ! there are NLINES_PER_FORCESOLUTION_SOURCE lines per source in that file - FORCESOLUTION = IN_DATA_FILES_PATH(1:len_trim(IN_DATA_FILES_PATH))//'FORCESOLUTION' + FORCESOLUTION = IN_DATA_FILES(1:len_trim(IN_DATA_FILES))//'FORCESOLUTION' ! see if we are running several independent runs in parallel ! if so, add the right directory for that run (group numbers start at zero, but directory names start at run0001, thus we add one) ! a negative value for "mygroup" is a convention that indicates that groups (i.e. sub-communicators, one per run) are off @@ -279,7 +323,7 @@ subroutine read_parameter_file() else ! compute the total number of sources in the CMTSOLUTION file ! there are NLINES_PER_CMTSOLUTION_SOURCE lines per source in that file - CMTSOLUTION = IN_DATA_FILES_PATH(1:len_trim(IN_DATA_FILES_PATH))//'CMTSOLUTION' + CMTSOLUTION = IN_DATA_FILES(1:len_trim(IN_DATA_FILES))//'CMTSOLUTION' ! see if we are running several independent runs in parallel ! if so, add the right directory for that run (group numbers start at zero, but directory names start at run0001, thus we add one) ! a negative value for "mygroup" is a convention that indicates that groups (i.e. sub-communicators, one per run) are off @@ -407,38 +451,13 @@ subroutine read_parameter_file() stop 'Error for PML, please set STACEY_ABSORBING_CONDITIONS and STACEY_INSTEAD_OF_FREE_SURFACE to .false. in Par_file' endif - end subroutine read_parameter_file - -! -!------------------------------------------------------------------------------------------------- -! - - subroutine read_gpu_mode(GPU_MODE,GRAVITY) - - implicit none - - logical,intent(out) :: GPU_MODE - logical,intent(out) :: GRAVITY - - ! local parameters - integer :: ier - - ! initializes flags - GPU_MODE = .false. - GRAVITY = .false. - - ! opens file Par_file - call open_parameter_file(ier) +!! DK DK added this for now (March 2013) +!! DK DK we will soon add it + if (PML_CONDITIONS .and. (SAVE_FORWARD .or. SIMULATION_TYPE==3)) stop 'PML_CONDITIONS is still under test for adjoint simulation' call read_value_logical(GPU_MODE, 'GPU_MODE', ier) - call read_value_logical(GRAVITY, 'GRAVITY', ier) - - ! close parameter file - call close_parameter_file() - - end subroutine read_gpu_mode + if (ier /= 0) stop 'Error reading Par_file parameter GPU_MODE' -!=============================================================================== !> Read ADIOS related flags from the Par_file !! \param ADIOS_ENABLED Main flag to decide if ADIOS is used. If setted to !! false no other parameter is taken into account. @@ -452,40 +471,110 @@ end subroutine read_gpu_mode !! adios !! \author MPBL -subroutine read_adios_parameters() - - use shared_parameters,only: NUMBER_OF_SIMULTANEOUS_RUNS,BROADCAST_SAME_MESH_AND_MODEL - - use shared_input_parameters - - implicit none - - ! local parameters - integer :: ier - - ! initialize flags to false - ADIOS_ENABLED = .false. - ADIOS_FOR_DATABASES = .false. - ADIOS_FOR_MESH = .false. - ADIOS_FOR_FORWARD_ARRAYS = .false. - ADIOS_FOR_KERNELS = .false. - - ! opens file Par_file - call open_parameter_file(ier) call read_value_logical(ADIOS_ENABLED, 'ADIOS_ENABLED', ier) - - if (ier == 0 .and. ADIOS_ENABLED) then - call read_value_logical(ADIOS_FOR_DATABASES, 'ADIOS_FOR_DATABASES', ier) - call read_value_logical(ADIOS_FOR_MESH, 'ADIOS_FOR_MESH', ier) - call read_value_logical(ADIOS_FOR_FORWARD_ARRAYS, 'ADIOS_FOR_FORWARD_ARRAYS', ier) - call read_value_logical(ADIOS_FOR_KERNELS, 'ADIOS_FOR_KERNELS', ier) - endif - - call close_parameter_file() + if (ier /= 0) stop 'Error reading Par_file parameter ADIOS_ENABLED' + call read_value_logical(ADIOS_FOR_DATABASES, 'ADIOS_FOR_DATABASES', ier) + if (ier /= 0) stop 'Error reading Par_file parameter ADIOS_FOR_DATABASES' + call read_value_logical(ADIOS_FOR_MESH, 'ADIOS_FOR_MESH', ier) + if (ier /= 0) stop 'Error reading Par_file parameter ADIOS_FOR_MESH' + call read_value_logical(ADIOS_FOR_FORWARD_ARRAYS, 'ADIOS_FOR_FORWARD_ARRAYS', ier) + if (ier /= 0) stop 'Error reading Par_file parameter ADIOS_FOR_FORWARD_ARRAYS' + call read_value_logical(ADIOS_FOR_KERNELS, 'ADIOS_FOR_KERNELS', ier) + if (ier /= 0) stop 'Error reading Par_file parameter ADIOS_FOR_KERNELS' ! safety check if (NUMBER_OF_SIMULTANEOUS_RUNS > 1 .and. BROADCAST_SAME_MESH_AND_MODEL .and. ADIOS_ENABLED) & stop 'Error ADIOS not yet supported by option BROADCAST_SAME_MESH_AND_MODEL' -end subroutine read_adios_parameters + ! close parameter file + call close_parameter_file() + + endif ! of if(myrank == 0) then + +! read from a single processor (the master) and then use MPI to broadcast to others +! to avoid an I/O bottleneck in the case of very large runs + if(BROADCAST_AFTER_READ) then + + call bcast_all_singlei_world(NPROC) + call bcast_all_singlei_world(SIMULATION_TYPE) + call bcast_all_singlei_world(NOISE_TOMOGRAPHY) + call bcast_all_singlel_world(SAVE_FORWARD) + call bcast_all_singlei_world(UTM_PROJECTION_ZONE) + call bcast_all_singlel_world(SUPPRESS_UTM_PROJECTION) + call bcast_all_singlei_world(NSTEP) + call bcast_all_singledp_world(DT) + call bcast_all_singlei_world(NGNOD) + call bcast_all_string_world(MODEL) + call bcast_all_string_world(SEP_MODEL_DIRECTORY) + call bcast_all_singlel_world(APPROXIMATE_OCEAN_LOAD) + call bcast_all_singlel_world(TOPOGRAPHY) + call bcast_all_singlel_world(ATTENUATION) + call bcast_all_singlel_world(FULL_ATTENUATION_SOLID) + call bcast_all_singlel_world(ANISOTROPY) + call bcast_all_singlel_world(GRAVITY) + call bcast_all_string_world(TOMOGRAPHY_PATH) + call bcast_all_singlel_world(USE_OLSEN_ATTENUATION) + call bcast_all_singledp_world(OLSEN_ATTENUATION_RATIO) + call bcast_all_singlel_world(PML_CONDITIONS) + call bcast_all_singlel_world(PML_INSTEAD_OF_FREE_SURFACE) + call bcast_all_singledp_world(f0_FOR_PML) + call bcast_all_singlel_world(STACEY_ABSORBING_CONDITIONS) + call bcast_all_singlel_world(STACEY_INSTEAD_OF_FREE_SURFACE) + call bcast_all_singlel_world(CREATE_SHAKEMAP) + call bcast_all_singlel_world(MOVIE_SURFACE) + call bcast_all_singlei_world(MOVIE_TYPE) + call bcast_all_singlel_world(MOVIE_VOLUME) + call bcast_all_singlel_world(SAVE_DISPLACEMENT) + call bcast_all_singlel_world(USE_HIGHRES_FOR_MOVIES) + call bcast_all_singlei_world(NTSTEP_BETWEEN_FRAMES) + call bcast_all_singledp_world(HDUR_MOVIE) + call bcast_all_singlel_world(SAVE_MESH_FILES) + call bcast_all_string_world(LOCAL_PATH) + call bcast_all_singlei_world(NTSTEP_BETWEEN_OUTPUT_INFO) + call bcast_all_singlei_world(NTSTEP_BETWEEN_OUTPUT_SEISMOS) + call bcast_all_singlei_world(NTSTEP_BETWEEN_READ_ADJSRC) + call bcast_all_singlel_world(USE_FORCE_POINT_SOURCE) + call bcast_all_singlel_world(USE_RICKER_TIME_FUNCTION) + call bcast_all_singlel_world(SAVE_SEISMOGRAMS_DISPLACEMENT) + call bcast_all_singlel_world(SAVE_SEISMOGRAMS_VELOCITY) + call bcast_all_singlel_world(SAVE_SEISMOGRAMS_ACCELERATION) + call bcast_all_singlel_world(SAVE_SEISMOGRAMS_PRESSURE) + call bcast_all_singlel_world(USE_BINARY_FOR_SEISMOGRAMS) + call bcast_all_singlel_world(SU_FORMAT) + call bcast_all_singlel_world(WRITE_SEISMOGRAMS_BY_MASTER) + call bcast_all_singlel_world(SAVE_ALL_SEISMOS_IN_ONE_FILE) + call bcast_all_singlel_world(USE_TRICK_FOR_BETTER_PRESSURE) + call bcast_all_singlel_world(USE_SOURCE_ENCODING) + call bcast_all_singlel_world(OUTPUT_ENERGY) + call bcast_all_singlei_world(NTSTEP_BETWEEN_OUTPUT_ENERGY) + call bcast_all_singlel_world(ANISOTROPIC_KL) + call bcast_all_singlel_world(SAVE_TRANSVERSE_KL) + call bcast_all_singlel_world(APPROXIMATE_HESS_KL) + call bcast_all_singlel_world(SAVE_MOHO_MESH) + call bcast_all_singlel_world(PRINT_SOURCE_TIME_FUNCTION) + call bcast_all_singlel_world(COUPLE_WITH_EXTERNAL_CODE) + call bcast_all_singlei_world(EXTERNAL_CODE_TYPE) + call bcast_all_string_world(TRACTION_PATH) + call bcast_all_singlel_world(MESH_A_CHUNK_OF_THE_EARTH) + call bcast_all_singlei_world(NUMBER_OF_SIMULTANEOUS_RUNS) + call bcast_all_singlel_world(BROADCAST_SAME_MESH_AND_MODEL) + call bcast_all_singlel_world(GPU_MODE) + call bcast_all_singlel_world(ADIOS_ENABLED) + call bcast_all_singlel_world(ADIOS_FOR_DATABASES) + call bcast_all_singlel_world(ADIOS_FOR_MESH) + call bcast_all_singlel_world(ADIOS_FOR_FORWARD_ARRAYS) + call bcast_all_singlel_world(ADIOS_FOR_KERNELS) + +! broadcast all parameters computed from others + + call bcast_all_singlei_world(IMODEL) + call bcast_all_singlei_world(NGNOD2D) + call bcast_all_singlei_world(NSOURCES) + call bcast_all_singledp_world(minval_hdur) + call bcast_all_string_world(FORCESOLUTION) + call bcast_all_string_world(CMTSOLUTION) + + endif ! of if(BROADCAST_AFTER_READ) then + + end subroutine read_parameter_file diff --git a/src/shared/read_value_parameters.f90 b/src/shared/read_value_parameters.f90 index 89561afcf..b43b425c9 100644 --- a/src/shared/read_value_parameters.f90 +++ b/src/shared/read_value_parameters.f90 @@ -97,11 +97,63 @@ subroutine read_value_string(value_to_read, name, ier) end subroutine read_value_string +!-------------------- + + subroutine open_parameter_file_from_master_only(ier) + + use constants, only: MAX_STRING_LEN,IN_DATA_FILES + + implicit none + + integer :: ier + character(len=MAX_STRING_LEN) :: filename_main,filename_run0001 + logical :: exists_main_Par_file,exists_run0001_Par_file + + filename_main = IN_DATA_FILES(1:len_trim(IN_DATA_FILES))//'Par_file' + +! also see if we are running several independent runs in parallel +! to do so, add the right directory for that run for the master process only here + filename_run0001 = 'run0001/'//filename_main(1:len_trim(filename_main)) + + call param_open(filename_main, len(filename_main), ier) + if (ier == 0) then + exists_main_Par_file = .true. + call close_parameter_file() + else + exists_main_Par_file = .false. + endif + + call param_open(filename_run0001, len(filename_run0001), ier) + if (ier == 0) then + exists_run0001_Par_file = .true. + call close_parameter_file() + else + exists_run0001_Par_file = .false. + endif + + if (exists_main_Par_file .and. exists_run0001_Par_file) then + print * + print *,'cannot have both DATA/Par_file and run0001/DATA/Par_file present, please remove one of them' + stop 'error: two different copies of the Par_file' + endif + + call param_open(filename_main, len(filename_main), ier) + if (ier /= 0) then + call param_open(filename_run0001, len(filename_run0001), ier) + if (ier /= 0) then + print * + print *,'opening file failed, please check your file path and run-directory.' + stop 'error opening Par_file' + endif + endif + + end subroutine open_parameter_file_from_master_only + !-------------------- subroutine open_parameter_file(ier) - use constants, only: MAX_STRING_LEN,IN_DATA_FILES_PATH,mygroup + use constants, only: MAX_STRING_LEN,IN_DATA_FILES,mygroup use shared_parameters, only: NUMBER_OF_SIMULTANEOUS_RUNS implicit none @@ -109,7 +161,7 @@ subroutine open_parameter_file(ier) integer :: ier character(len=MAX_STRING_LEN) :: filename,path_to_add - filename = IN_DATA_FILES_PATH(1:len_trim(IN_DATA_FILES_PATH))//'Par_file' + filename = IN_DATA_FILES(1:len_trim(IN_DATA_FILES))//'Par_file' ! see if we are running several independent runs in parallel ! if so, add the right directory for that run (group numbers start at zero, but directory names start at run0001, thus we add one) ! a negative value for "mygroup" is a convention that indicates that groups (i.e. sub-communicators, one per run) are off diff --git a/src/shared/rules.mk b/src/shared/rules.mk index ce3b8c7a1..20a5282d4 100644 --- a/src/shared/rules.mk +++ b/src/shared/rules.mk @@ -41,7 +41,6 @@ shared_OBJECTS = \ $O/check_mesh_resolution.shared.o \ $O/shared_par.shared_module.o \ $O/create_name_database.shared.o \ - $O/create_serial_name_database.shared.o \ $O/define_derivation_matrices.shared.o \ $O/detect_surface.shared.o \ $O/exit_mpi.shared.o \ @@ -67,7 +66,6 @@ shared_OBJECTS = \ $O/safe_alloc_mod.shared.o \ $O/save_header_file.shared.o \ $O/sort_array_coordinates.shared.o \ - $O/unused_mod.shared_module.o \ $O/utm_geo.shared.o \ $O/write_c_binary.cc.o \ $O/write_VTK_data.shared.o \ @@ -80,7 +78,6 @@ shared_MODULES = \ $(FC_MODDIR)/shared_input_parameters.$(FC_MODEXT) \ $(FC_MODDIR)/shared_compute_parameters.$(FC_MODEXT) \ $(FC_MODDIR)/shared_parameters.$(FC_MODEXT) \ - $(FC_MODDIR)/unused_mod.$(FC_MODEXT) \ $(EMPTY_MACRO) @@ -132,8 +129,6 @@ endif #### rule for each .o file below #### -$O/unused_mod.shared_module.o: $O/shared_par.shared_module.o - ## ## shared ## @@ -141,10 +136,10 @@ $O/unused_mod.shared_module.o: $O/shared_par.shared_module.o $O/%.shared_module.o: $S/%.f90 ${SETUP}/constants.h ${FCCOMPILE_CHECK} ${FCFLAGS_f90} -c -o $@ $< -$O/%.shared.o: $S/%.f90 $O/shared_par.shared_module.o $O/unused_mod.shared_module.o +$O/%.shared.o: $S/%.f90 $O/shared_par.shared_module.o ${FCCOMPILE_CHECK} ${FCFLAGS_f90} -c -o $@ $< -$O/%.shared.o: $S/%.F90 $O/shared_par.shared_module.o $O/unused_mod.shared_module.o +$O/%.shared.o: $S/%.F90 $O/shared_par.shared_module.o ${FCCOMPILE_CHECK} ${FCFLAGS_f90} -c -o $@ $< $O/%.sharedmpi.o: $S/%.f90 ${SETUP}/constants.h $O/shared_par.shared_module.o diff --git a/src/shared/save_header_file.f90 b/src/shared/save_header_file.f90 index 9c5308e31..5a7e6cadb 100644 --- a/src/shared/save_header_file.f90 +++ b/src/shared/save_header_file.f90 @@ -55,7 +55,7 @@ subroutine save_header_file(NSPEC_AB,NGLOB_AB,NPROC, & endif ! copy number of elements and points in an include file for the solver - HEADER_FILE = OUTPUT_FILES_PATH(1:len_trim(OUTPUT_FILES_PATH))//'/values_from_mesher.h' + HEADER_FILE = OUTPUT_FILES(1:len_trim(OUTPUT_FILES))//'/values_from_mesher.h' open(unit=IOUT,file=HEADER_FILE,status='unknown') write(IOUT,*) @@ -132,7 +132,7 @@ subroutine save_header_file(NSPEC_AB,NGLOB_AB,NPROC, & ! copy number of surface elements in an include file for the movies if (nfaces_surface_glob_ext_mesh > 0) then - HEADER_FILE = OUTPUT_FILES_PATH(1:len_trim(OUTPUT_FILES_PATH))//'/surface_from_mesher.h' + HEADER_FILE = OUTPUT_FILES(1:len_trim(OUTPUT_FILES))//'/surface_from_mesher.h' open(unit=IOUT,file=HEADER_FILE,status='unknown') write(IOUT,*) '!' diff --git a/src/shared/serial.f90 b/src/shared/serial.f90 index f8f7238ce..5cad722e5 100644 --- a/src/shared/serial.f90 +++ b/src/shared/serial.f90 @@ -63,11 +63,11 @@ end subroutine synchronize_all subroutine bcast_all_i(buffer, countval) - use unused_mod implicit none integer countval integer, dimension(countval) :: buffer + integer(kind=4) :: unused_i4 unused_i4 = buffer(1) @@ -79,13 +79,13 @@ end subroutine bcast_all_i subroutine bcast_all_cr(buffer, countval) - use unused_mod use constants,only: CUSTOM_REAL implicit none integer countval real(kind=CUSTOM_REAL), dimension(countval) :: buffer + real(kind=CUSTOM_REAL) :: unused_cr unused_cr = buffer(1) @@ -97,12 +97,12 @@ end subroutine bcast_all_cr subroutine bcast_all_singlecr(buffer) - use unused_mod use constants,only: CUSTOM_REAL implicit none real(kind=CUSTOM_REAL) :: buffer + real(kind=CUSTOM_REAL) :: unused_cr unused_cr = buffer @@ -114,11 +114,11 @@ end subroutine bcast_all_singlecr subroutine bcast_all_dp(buffer, countval) - use unused_mod implicit none integer countval double precision, dimension(countval) :: buffer + double precision :: unused_dp unused_dp = buffer(1) @@ -130,11 +130,10 @@ end subroutine bcast_all_dp subroutine bcast_all_singledp(buffer) - use unused_mod - implicit none double precision :: buffer + double precision :: unused_dp unused_dp = buffer @@ -146,11 +145,11 @@ end subroutine bcast_all_singledp subroutine bcast_all_r(buffer, countval) - use unused_mod implicit none integer countval real, dimension(countval) :: buffer + real :: unused_r unused_r = buffer(1) @@ -162,7 +161,6 @@ end subroutine bcast_all_r subroutine bcast_all_i_for_database(buffer, countval) - use unused_mod implicit none integer countval @@ -170,6 +168,7 @@ subroutine bcast_all_i_for_database(buffer, countval) ! of indices, provided we call the routine using the first memory cell of that multidimensional array, ! i.e. for instance buffer(1,1,1) if the array has three dimensions with indices that all start at 1. integer :: buffer + integer(kind=4) :: unused_i4 unused_i4 = countval @@ -183,7 +182,6 @@ end subroutine bcast_all_i_for_database subroutine bcast_all_l_for_database(buffer, countval) - use unused_mod implicit none integer countval @@ -191,6 +189,8 @@ subroutine bcast_all_l_for_database(buffer, countval) ! of indices, provided we call the routine using the first memory cell of that multidimensional array, ! i.e. for instance buffer(1,1,1) if the array has three dimensions with indices that all start at 1. logical :: buffer + integer(kind=4) :: unused_i4 + logical :: unused_l unused_i4 = countval @@ -204,7 +204,6 @@ end subroutine bcast_all_l_for_database subroutine bcast_all_cr_for_database(buffer, countval) - use unused_mod use constants,only: CUSTOM_REAL implicit none @@ -214,6 +213,8 @@ subroutine bcast_all_cr_for_database(buffer, countval) ! of indices, provided we call the routine using the first memory cell of that multidimensional array, ! i.e. for instance buffer(1,1,1) if the array has three dimensions with indices that all start at 1. real(kind=CUSTOM_REAL) :: buffer + integer(kind=4) :: unused_i4 + real(kind=CUSTOM_REAL) :: unused_cr unused_i4 = countval @@ -227,7 +228,6 @@ end subroutine bcast_all_cr_for_database subroutine bcast_all_dp_for_database(buffer, countval) - use unused_mod implicit none integer countval @@ -235,6 +235,8 @@ subroutine bcast_all_dp_for_database(buffer, countval) ! of indices, provided we call the routine using the first memory cell of that multidimensional array, ! i.e. for instance buffer(1,1,1) if the array has three dimensions with indices that all start at 1. double precision :: buffer + integer(kind=4) :: unused_i4 + double precision :: unused_dp unused_i4 = countval @@ -248,7 +250,6 @@ end subroutine bcast_all_dp_for_database subroutine bcast_all_r_for_database(buffer, countval) - use unused_mod implicit none integer countval @@ -256,6 +257,8 @@ subroutine bcast_all_r_for_database(buffer, countval) ! of indices, provided we call the routine using the first memory cell of that multidimensional array, ! i.e. for instance buffer(1,1,1) if the array has three dimensions with indices that all start at 1. real :: buffer + integer(kind=4) :: unused_i4 + real :: unused_r unused_i4 = countval @@ -263,6 +266,64 @@ subroutine bcast_all_r_for_database(buffer, countval) end subroutine bcast_all_r_for_database +! +!---- +! + + subroutine bcast_all_singlei_world(buffer) + + implicit none + + integer :: buffer,idummy + + idummy = buffer + + end subroutine bcast_all_singlei_world + +! +!---- +! + + subroutine bcast_all_singlel_world(buffer) + + implicit none + + logical :: buffer,ldummy + + ldummy = buffer + + end subroutine bcast_all_singlel_world + +! +!---- +! + + subroutine bcast_all_singledp_world(buffer) + + implicit none + + double precision :: buffer,dpdummy + + dpdummy = buffer + + end subroutine bcast_all_singledp_world + +! +!---- +! + + subroutine bcast_all_string_world(buffer) + + use constants,only: MAX_STRING_LEN + + implicit none + + character(len=MAX_STRING_LEN) :: buffer,stringdummy + + stringdummy = buffer + + end subroutine bcast_all_string_world + ! !---- ! @@ -353,7 +414,6 @@ end subroutine gather_all_all_cr subroutine gatherv_all_cr(sendbuf, sendcnt, recvbuf, recvcount, recvoffset,recvcounttot, NPROC) - use unused_mod use constants,only: CUSTOM_REAL implicit none @@ -363,6 +423,8 @@ subroutine gatherv_all_cr(sendbuf, sendcnt, recvbuf, recvcount, recvoffset,recvc real(kind=CUSTOM_REAL), dimension(sendcnt) :: sendbuf real(kind=CUSTOM_REAL), dimension(recvcounttot) :: recvbuf + integer(kind=4) :: unused_i4 + recvbuf(:) = sendbuf(:) unused_i4 = recvcount(1) @@ -378,8 +440,13 @@ subroutine init_mpi() use shared_parameters, only: NUMBER_OF_SIMULTANEOUS_RUNS + integer :: myrank + logical :: BROADCAST_AFTER_READ + ! we need to make sure that NUMBER_OF_SIMULTANEOUS_RUNS is read, thus read the parameter file - call read_parameter_file() + myrank = 0 + BROADCAST_AFTER_READ = .false. + call read_parameter_file(myrank,BROADCAST_AFTER_READ) if (NUMBER_OF_SIMULTANEOUS_RUNS <= 0) stop 'NUMBER_OF_SIMULTANEOUS_RUNS <= 0 makes no sense' @@ -532,12 +599,13 @@ end subroutine max_all_i subroutine max_allreduce_i(buffer,countval) - use unused_mod implicit none integer :: countval integer,dimension(countval),intent(inout) :: buffer + integer(kind=4) :: unused_i4 + unused_i4 = buffer(1) end subroutine max_allreduce_i @@ -711,7 +779,6 @@ end subroutine any_all_l subroutine sendrecv_all_cr(sendbuf, sendcount, dest, sendtag, & recvbuf, recvcount, source, recvtag) - use unused_mod use constants,only: CUSTOM_REAL implicit none @@ -720,6 +787,10 @@ subroutine sendrecv_all_cr(sendbuf, sendcount, dest, sendtag, & real(kind=CUSTOM_REAL), dimension(sendcount) :: sendbuf real(kind=CUSTOM_REAL), dimension(recvcount) :: recvbuf + integer(kind=4) :: unused_i4 + + real(kind=CUSTOM_REAL) :: unused_cr + stop 'sendrecv_all_cr not implemented for serial code' unused_i4 = dest unused_i4 = sendtag @@ -748,7 +819,6 @@ end function proc_null subroutine isend_cr(sendbuf, sendcount, dest, sendtag, req) - use unused_mod use constants,only: CUSTOM_REAL implicit none @@ -756,6 +826,9 @@ subroutine isend_cr(sendbuf, sendcount, dest, sendtag, req) integer sendcount, dest, sendtag, req real(kind=CUSTOM_REAL), dimension(sendcount) :: sendbuf + integer(kind=4) :: unused_i4 + real(kind=CUSTOM_REAL) :: unused_cr + stop 'isend_cr not implemented for serial code' unused_i4 = dest unused_i4 = sendtag @@ -770,7 +843,6 @@ end subroutine isend_cr subroutine irecv_cr(recvbuf, recvcount, dest, recvtag, req) - use unused_mod use constants,only: CUSTOM_REAL implicit none @@ -778,6 +850,9 @@ subroutine irecv_cr(recvbuf, recvcount, dest, recvtag, req) integer recvcount, dest, recvtag, req real(kind=CUSTOM_REAL), dimension(recvcount) :: recvbuf + integer(kind=4) :: unused_i4 + real(kind=CUSTOM_REAL) :: unused_cr + stop 'irecv_cr not implemented for serial code' unused_i4 = dest unused_i4 = recvtag @@ -792,13 +867,13 @@ end subroutine irecv_cr subroutine isend_i(sendbuf, sendcount, dest, sendtag, req) - use unused_mod - implicit none integer sendcount, dest, sendtag, req integer, dimension(sendcount) :: sendbuf + integer(kind=4) :: unused_i4 + stop 'isend_i not implemented for serial code' unused_i4 = dest unused_i4 = sendtag @@ -813,13 +888,13 @@ end subroutine isend_i subroutine irecv_i(recvbuf, recvcount, dest, recvtag, req) - use unused_mod - implicit none integer recvcount, dest, recvtag, req integer, dimension(recvcount) :: recvbuf + integer(kind=4) :: unused_i4 + stop 'irecv_i not implemented for serial code' unused_i4 = dest unused_i4 = recvtag @@ -835,14 +910,14 @@ end subroutine irecv_i subroutine recv_i(recvbuf, recvcount, dest, recvtag ) - use unused_mod - implicit none integer dest,recvtag integer recvcount integer,dimension(recvcount):: recvbuf + integer(kind=4) :: unused_i4 + stop 'recv_i not implemented for serial code' unused_i4 = dest unused_i4 = recvtag @@ -856,7 +931,6 @@ end subroutine recv_i subroutine recvv_cr(recvbuf, recvcount, dest, recvtag ) - use unused_mod use constants,only: CUSTOM_REAL implicit none @@ -864,6 +938,9 @@ subroutine recvv_cr(recvbuf, recvcount, dest, recvtag ) integer recvcount,dest,recvtag real(kind=CUSTOM_REAL),dimension(recvcount) :: recvbuf + integer(kind=4) :: unused_i4 + real(kind=CUSTOM_REAL) :: unused_cr + stop 'recvv_cr not implemented for serial code' unused_i4 = dest unused_i4 = recvtag @@ -878,14 +955,14 @@ end subroutine recvv_cr subroutine send_i(sendbuf, sendcount, dest, sendtag) - use unused_mod - implicit none integer dest,sendtag integer sendcount integer, dimension(sendcount) :: sendbuf + integer(kind=4) :: unused_i4 + stop 'send_i not implemented for serial code' unused_i4 = dest unused_i4 = sendtag @@ -900,13 +977,13 @@ end subroutine send_i subroutine send_i_t(sendbuf,sendcount,dest) - use unused_mod - implicit none integer :: dest,sendcount integer, dimension(sendcount) :: sendbuf + integer(kind=4) :: unused_i4 + stop 'send_i_t not implemented for serial code' unused_i4 = dest unused_i4 = sendbuf(1) @@ -920,13 +997,13 @@ end subroutine send_i_t subroutine recv_i_t(recvbuf,recvcount,source) - use unused_mod - implicit none integer :: source,recvcount integer, dimension(recvcount) :: recvbuf + integer(kind=4) :: unused_i4 + stop 'recv_i_t not implemented for serial code' unused_i4 = source unused_i4 = recvbuf(1) @@ -971,14 +1048,15 @@ end subroutine recv_i_t ! the following two subroutines are needed by locate_receivers.f90 subroutine send_dp(sendbuf, sendcount, dest, sendtag) - use unused_mod - implicit none integer dest,sendtag integer sendcount double precision,dimension(sendcount):: sendbuf + integer(kind=4) :: unused_i4 + double precision :: unused_dp + stop 'send_dp not implemented for serial code' unused_i4 = dest unused_i4 = sendtag @@ -990,14 +1068,15 @@ end subroutine send_dp ! subroutine recv_dp(recvbuf, recvcount, dest, recvtag) - use unused_mod - implicit none integer dest,recvtag integer recvcount double precision,dimension(recvcount):: recvbuf + integer(kind=4) :: unused_i4 + double precision :: unused_dp + stop 'recv_dp not implemented for serial code' unused_i4 = dest unused_i4 = recvtag @@ -1011,8 +1090,6 @@ end subroutine recv_dp subroutine sendv_cr(sendbuf, sendcount, dest, sendtag) - use unused_mod - use constants,only: CUSTOM_REAL implicit none @@ -1020,6 +1097,9 @@ subroutine sendv_cr(sendbuf, sendcount, dest, sendtag) integer sendcount,dest,sendtag real(kind=CUSTOM_REAL),dimension(sendcount) :: sendbuf + integer(kind=4) :: unused_i4 + real(kind=CUSTOM_REAL) :: unused_cr + stop 'sendv_cr not implemented for serial code' unused_i4 = dest unused_i4 = sendtag @@ -1032,12 +1112,12 @@ end subroutine sendv_cr subroutine wait_req(req) - use unused_mod - implicit none integer :: req + integer(kind=4) :: unused_i4 + unused_i4 = req end subroutine wait_req diff --git a/src/shared/shared_par.f90 b/src/shared/shared_par.f90 index dcd9a4fce..1f8568470 100644 --- a/src/shared/shared_par.f90 +++ b/src/shared/shared_par.f90 @@ -36,7 +36,7 @@ module constants ! create a copy of the original output file path, to which we may add a "run0001/", "run0002/", "run0003/" prefix later ! if NUMBER_OF_SIMULTANEOUS_RUNS > 1 - character(len=MAX_STRING_LEN) :: OUTPUT_FILES_PATH = OUTPUT_FILES_PATH_BASE + character(len=MAX_STRING_LEN) :: OUTPUT_FILES = OUTPUT_FILES_BASE ! if doing simultaneous runs for the same mesh and model, see who should read the mesh and the model and broadcast it to others ! we put a default value here @@ -72,7 +72,6 @@ module shared_input_parameters double precision :: DT integer :: NGNOD -! character(len=MAX_STRING_LEN) :: MODEL character(len=MAX_STRING_LEN) :: SEP_MODEL_DIRECTORY @@ -110,13 +109,17 @@ module shared_input_parameters ! seismograms integer :: NTSTEP_BETWEEN_OUTPUT_INFO integer :: NTSTEP_BETWEEN_OUTPUT_SEISMOS,NTSTEP_BETWEEN_READ_ADJSRC - logical :: SAVE_SEISMOGRAMS_DISPLACEMENT,SAVE_SEISMOGRAMS_VELOCITY,SAVE_SEISMOGRAMS_ACCELERATION + logical :: SAVE_SEISMOGRAMS_DISPLACEMENT,SAVE_SEISMOGRAMS_VELOCITY,SAVE_SEISMOGRAMS_ACCELERATION,SAVE_SEISMOGRAMS_PRESSURE logical :: WRITE_SEISMOGRAMS_BY_MASTER,SAVE_ALL_SEISMOS_IN_ONE_FILE,USE_BINARY_FOR_SEISMOGRAMS,SU_FORMAT ! sources logical :: USE_FORCE_POINT_SOURCE logical :: USE_RICKER_TIME_FUNCTION,PRINT_SOURCE_TIME_FUNCTION + logical :: USE_TRICK_FOR_BETTER_PRESSURE,USE_SOURCE_ENCODING,OUTPUT_ENERGY + logical :: ANISOTROPIC_KL,SAVE_TRANSVERSE_KL,APPROXIMATE_HESS_KL,SAVE_MOHO_MESH + integer :: NTSTEP_BETWEEN_OUTPUT_ENERGY + ! external code coupling (DSM) logical :: COUPLE_WITH_EXTERNAL_CODE integer :: EXTERNAL_CODE_TYPE @@ -151,6 +154,11 @@ module shared_compute_parameters ! model integer :: IMODEL +!! DK DK added this temporarily here to make SPECFEM3D and SPECFEM3D_GLOBE much more similar +!! DK DK in terms of the structure of their main time iteration loop; these are future features +!! DK DK that are missing in this code but implemented in the other and that could thus be cut and pasted one day + integer :: it_begin,it_end + integer :: seismo_offset,seismo_current end module shared_compute_parameters diff --git a/src/specfem3D/check_stability.f90 b/src/specfem3D/check_stability.f90 index b61c755ee..d5c9442d3 100644 --- a/src/specfem3D/check_stability.f90 +++ b/src/specfem3D/check_stability.f90 @@ -305,7 +305,7 @@ subroutine check_stability() ! write time stamp file to give information about progression of simulation write(outputname,"('/timestamp',i6.6)") it - open(unit=IOUT,file=trim(OUTPUT_FILES_PATH)//outputname,status='unknown') + open(unit=IOUT,file=trim(OUTPUT_FILES)//outputname,status='unknown') write(IOUT,*) 'Time step # ',it write(IOUT,*) 'Time: ',sngl((it-1)*DT-t0),' seconds' write(IOUT,*) 'Elapsed time in seconds = ',tCPU @@ -401,3 +401,36 @@ subroutine check_stability() end subroutine check_stability +! +!------------------------------------------------------------------------------------------------- +! + + subroutine it_print_elapsed_time() + + use specfem_par + use specfem_par_elastic + use specfem_par_acoustic + + implicit none + + ! local parameters + integer :: ihours,iminutes,iseconds,int_tCPU + ! timing + double precision :: tCPU + + if (myrank == 0) then + ! elapsed time since beginning of the simulation + tCPU = wtime() - time_start + + int_tCPU = int(tCPU) + ihours = int_tCPU / 3600 + iminutes = (int_tCPU - 3600*ihours) / 60 + iseconds = int_tCPU - 3600*ihours - 60*iminutes + write(IMAIN,*) 'Time-Loop Complete. Timing info:' + write(IMAIN,*) 'Total elapsed time in seconds = ',tCPU + write(IMAIN,"(' Total elapsed time in hh:mm:ss = ',i6,' h ',i2.2,' m ',i2.2,' s')") ihours,iminutes,iseconds + call flush_IMAIN() + endif + + end subroutine it_print_elapsed_time + diff --git a/src/specfem3D/comp_source_time_function.f90 b/src/specfem3D/comp_source_time_function.f90 index 9c8aa4309..535d04050 100644 --- a/src/specfem3D/comp_source_time_function.f90 +++ b/src/specfem3D/comp_source_time_function.f90 @@ -27,8 +27,6 @@ double precision function comp_source_time_function(t,hdur) - use constants - implicit none double precision t,hdur @@ -47,45 +45,111 @@ end function comp_source_time_function double precision function comp_source_time_function_gauss(t,hdur) - use constants + use constants, only : PI, SOURCE_DECAY_MIMIC_TRIANGLE implicit none - double precision :: t,hdur - double precision :: hdur_decay + double precision, intent(in) :: t,hdur + double precision :: hdur_decay,a double precision,parameter :: SOURCE_DECAY_STRONG = 2.0d0/SOURCE_DECAY_MIMIC_TRIANGLE ! note: hdur given is hdur_gaussian = hdur/SOURCE_DECAY_MIMIC_TRIANGLE ! and SOURCE_DECAY_MIMIC_TRIANGLE ~ 1.68 hdur_decay = hdur - ! this here uses a stronger gaussian decay rate (empirical value) to avoid non-zero onset times; + ! this here uses a stronger Gaussian decay rate (empirical value) to avoid non-zero onset times; ! however, it should mimik a triangle source time function... !hdur_decay = hdur / SOURCE_DECAY_STRONG ! note: a nonzero time to start the simulation with would lead to more high-frequency noise ! due to the (spatial) discretization of the point source on the mesh - ! gaussian - comp_source_time_function_gauss = exp(-(t/hdur_decay)**2)/(sqrt(PI)*hdur_decay) + ! Gaussian wavelet + a = 1.d0 / (hdur_decay**2) + comp_source_time_function_gauss = exp(-a*t**2) / (sqrt(PI)*hdur_decay) end function comp_source_time_function_gauss +! +!------------------------------------------------------------------------------------------------- +! + + double precision function comp_source_time_function_dgau(t,hdur) + + use constants, only : PI, SOURCE_DECAY_MIMIC_TRIANGLE + + implicit none + + double precision, intent(in) :: t,hdur + double precision :: hdur_decay,a + double precision,parameter :: SOURCE_DECAY_STRONG = 2.0d0/SOURCE_DECAY_MIMIC_TRIANGLE + + ! note: hdur given is hdur_gaussian = hdur/SOURCE_DECAY_MIMIC_TRIANGLE + ! and SOURCE_DECAY_MIMIC_TRIANGLE ~ 1.68 + hdur_decay = hdur + + ! this here uses a stronger Gaussian decay rate (empirical value) to avoid non-zero onset times; + ! however, it should mimik a triangle source time function... + !hdur_decay = hdur / SOURCE_DECAY_STRONG + + ! note: a nonzero time to start the simulation with would lead to more high-frequency noise + ! due to the (spatial) discretization of the point source on the mesh + + ! first derivative of a Gaussian wavelet + a = 1.d0 / (hdur_decay**2) + comp_source_time_function_dgau = - 2.d0 * a * t * exp(-a*t**2) / (sqrt(PI)*hdur_decay) + + end function comp_source_time_function_dgau + +! +!------------------------------------------------------------------------------------------------- +! + + double precision function comp_source_time_function_d2gau(t,hdur) + + use constants, only : PI, SOURCE_DECAY_MIMIC_TRIANGLE + + implicit none + + double precision, intent(in) :: t,hdur + double precision :: hdur_decay,a + double precision,parameter :: SOURCE_DECAY_STRONG = 2.0d0/SOURCE_DECAY_MIMIC_TRIANGLE + + ! note: hdur given is hdur_gaussian = hdur/SOURCE_DECAY_MIMIC_TRIANGLE + ! and SOURCE_DECAY_MIMIC_TRIANGLE ~ 1.68 + hdur_decay = hdur + + ! this here uses a stronger Gaussian decay rate (empirical value) to avoid non-zero onset times; + ! however, it should mimik a triangle source time function... + !hdur_decay = hdur / SOURCE_DECAY_STRONG + + ! note: a nonzero time to start the simulation with would lead to more high-frequency noise + ! due to the (spatial) discretization of the point source on the mesh + + ! second derivative of a Gaussian wavelet + a = 1.d0 / (hdur_decay**2) + comp_source_time_function_d2gau = 2.d0 * a * (-1.d0 + 2.d0*a*t**2) * exp(-a*t**2) / (sqrt(PI)*hdur_decay) + + end function comp_source_time_function_d2gau + ! !------------------------------------------------------------------------------------------------- ! double precision function comp_source_time_function_rickr(t,f0) - use constants + use constants, only : PI implicit none - double precision t,f0 + double precision, intent(in) :: t,f0 + + ! local variables + double precision :: a - ! ricker - comp_source_time_function_rickr = (1.d0 - 2.d0*PI*PI*f0*f0*t*t ) & - * exp( -PI*PI*f0*f0*t*t ) + ! Ricker wavelet + a = PI**2 * f0**2 + comp_source_time_function_rickr = (1.d0 - 2.d0*a*t*t) * exp( -a*t*t ) !!! another source time function they have called 'ricker' in some old papers, !!! e.g., 'Finite-Frequency Kernels Based on Adjoint Methods' by Liu & Tromp, BSSA (2006) @@ -94,3 +158,45 @@ double precision function comp_source_time_function_rickr(t,f0) end function comp_source_time_function_rickr +! +!------------------------------------------------------------------------------------------------- +! + + double precision function comp_source_time_function_drck(t,f0) + + use constants, only : PI + + implicit none + + double precision, intent(in) :: t,f0 + + ! local variables + double precision :: a + + ! first derivative of a Ricker wavelet + a = PI**2 * f0**2 + comp_source_time_function_drck = 2.d0*a*t * (-3.d0 + 2.d0*a*t*t) * exp( -a*t*t ) + + end function comp_source_time_function_drck + +! +!------------------------------------------------------------------------------------------------- +! + + double precision function comp_source_time_function_d2rck(t,f0) + + use constants, only : PI + + implicit none + + double precision, intent(in) :: t,f0 + + ! local variables + double precision :: a + + ! second derivative of a Ricker wavelet + a = PI**2 * f0**2 + comp_source_time_function_d2rck = -2.d0*a * (3.d0 - 12.d0*a*t*t + 4.d0*a**2*t*t*t*t) * exp( -a*t*t ) + + end function comp_source_time_function_d2rck + diff --git a/src/specfem3D/compute_add_sources_acoustic.f90 b/src/specfem3D/compute_add_sources_acoustic.f90 index 06f12e619..fb6a7e6ee 100644 --- a/src/specfem3D/compute_add_sources_acoustic.f90 +++ b/src/specfem3D/compute_add_sources_acoustic.f90 @@ -41,7 +41,8 @@ subroutine compute_add_sources_acoustic(NSPEC_AB,NGLOB_AB,potential_dot_dot_acou xigll,yigll,zigll,xi_receiver,eta_receiver,gamma_receiver,& station_name,network_name,adj_source_file,nrec_local,number_receiver_global, & pm1_source_encoding,nsources_local,USE_FORCE_POINT_SOURCE, & - USE_RICKER_TIME_FUNCTION,SU_FORMAT + USE_RICKER_TIME_FUNCTION,SU_FORMAT,USE_TRICK_FOR_BETTER_PRESSURE,USE_SOURCE_ENCODING + implicit none integer :: NSPEC_AB,NGLOB_AB @@ -65,8 +66,8 @@ subroutine compute_add_sources_acoustic(NSPEC_AB,NGLOB_AB,potential_dot_dot_acou double precision :: dt,t0 real(kind=CUSTOM_REAL), dimension(NSOURCES,NDIM,NGLLX,NGLLY,NGLLZ) :: sourcearrays - double precision, external :: comp_source_time_function,comp_source_time_function_rickr,& - comp_source_time_function_gauss + double precision, external :: comp_source_time_function,comp_source_time_function_rickr, & + comp_source_time_function_d2rck,comp_source_time_function_gauss,comp_source_time_function_d2gau logical, dimension(NSPEC_AB) :: ispec_is_acoustic @@ -127,10 +128,32 @@ subroutine compute_add_sources_acoustic(NSPEC_AB,NGLOB_AB,potential_dot_dot_acou f0 = hdur(isource) if (USE_RICKER_TIME_FUNCTION) then - stf_used = comp_source_time_function_rickr(dble(it-1)*DT-t0-tshift_src(isource),f0) +! use a trick to increase accuracy of pressure seismograms in fluid (acoustic) elements: +! use the second derivative of the source for the source time function instead of the source itself, +! and then record -potential_acoustic() as pressure seismograms instead of -potential_dot_dot_acoustic(); +! this is mathematically equivalent, but numerically significantly more accurate because in the explicit +! Newmark time scheme acceleration is accurate at zeroth order while displacement is accurate at second order, +! thus in fluid elements potential_dot_dot_acoustic() is accurate at zeroth order while potential_acoustic() +! is accurate at second order and thus contains significantly less numerical noise. + if(USE_TRICK_FOR_BETTER_PRESSURE) then + stf_used = comp_source_time_function_d2rck(dble(it-1)*DT-t0-tshift_src(isource),f0) + else + stf_used = comp_source_time_function_rickr(dble(it-1)*DT-t0-tshift_src(isource),f0) + endif else ! use a very small duration of 5*DT to mimic a Dirac in time - stf_used = comp_source_time_function_gauss(dble(it-1)*DT-t0-tshift_src(isource),5.d0*DT) +! use a trick to increase accuracy of pressure seismograms in fluid (acoustic) elements: +! use the second derivative of the source for the source time function instead of the source itself, +! and then record -potential_acoustic() as pressure seismograms instead of -potential_dot_dot_acoustic(); +! this is mathematically equivalent, but numerically significantly more accurate because in the explicit +! Newmark time scheme acceleration is accurate at zeroth order while displacement is accurate at second order, +! thus in fluid elements potential_dot_dot_acoustic() is accurate at zeroth order while potential_acoustic() +! is accurate at second order and thus contains significantly less numerical noise. + if(USE_TRICK_FOR_BETTER_PRESSURE) then + stf_used = comp_source_time_function_d2gau(dble(it-1)*DT-t0-tshift_src(isource),5.d0*DT) + else + stf_used = comp_source_time_function_gauss(dble(it-1)*DT-t0-tshift_src(isource),5.d0*DT) + endif endif ! beware, for acoustic medium, source is: pressure divided by Kappa of the fluid @@ -152,17 +175,39 @@ subroutine compute_add_sources_acoustic(NSPEC_AB,NGLOB_AB,potential_dot_dot_acou else if (USE_RICKER_TIME_FUNCTION) then - stf = comp_source_time_function_rickr(dble(it-1)*DT-t0-tshift_src(isource),hdur(isource)) +! use a trick to increase accuracy of pressure seismograms in fluid (acoustic) elements: +! use the second derivative of the source for the source time function instead of the source itself, +! and then record -potential_acoustic() as pressure seismograms instead of -potential_dot_dot_acoustic(); +! this is mathematically equivalent, but numerically significantly more accurate because in the explicit +! Newmark time scheme acceleration is accurate at zeroth order while displacement is accurate at second order, +! thus in fluid elements potential_dot_dot_acoustic() is accurate at zeroth order while potential_acoustic() +! is accurate at second order and thus contains significantly less numerical noise. + if(USE_TRICK_FOR_BETTER_PRESSURE) then + stf = comp_source_time_function_d2rck(dble(it-1)*DT-t0-tshift_src(isource),hdur(isource)) + else + stf = comp_source_time_function_rickr(dble(it-1)*DT-t0-tshift_src(isource),hdur(isource)) + endif else - ! gaussian source time - stf = comp_source_time_function_gauss(dble(it-1)*DT-t0-tshift_src(isource),hdur_gaussian(isource)) + ! Gaussian source time +! use a trick to increase accuracy of pressure seismograms in fluid (acoustic) elements: +! use the second derivative of the source for the source time function instead of the source itself, +! and then record -potential_acoustic() as pressure seismograms instead of -potential_dot_dot_acoustic(); +! this is mathematically equivalent, but numerically significantly more accurate because in the explicit +! Newmark time scheme acceleration is accurate at zeroth order while displacement is accurate at second order, +! thus in fluid elements potential_dot_dot_acoustic() is accurate at zeroth order while potential_acoustic() +! is accurate at second order and thus contains significantly less numerical noise. + if(USE_TRICK_FOR_BETTER_PRESSURE) then + stf = comp_source_time_function_d2gau(dble(it-1)*DT-t0-tshift_src(isource),hdur_gaussian(isource)) + else + stf = comp_source_time_function_gauss(dble(it-1)*DT-t0-tshift_src(isource),hdur_gaussian(isource)) + endif endif ! quasi-Heaviside - !stf = comp_source_time_function(dble(it-1)*DT-t0-tshift_src(isource),hdur_gaussian(isource)) + ! stf = comp_source_time_function(dble(it-1)*DT-t0-tshift_src(isource),hdur_gaussian(isource)) ! source encoding - stf = stf * pm1_source_encoding(isource) + if(USE_SOURCE_ENCODING) stf = stf * pm1_source_encoding(isource) ! distinguishes between single and double precision for reals if (CUSTOM_REAL == SIZE_REAL) then @@ -175,7 +220,7 @@ subroutine compute_add_sources_acoustic(NSPEC_AB,NGLOB_AB,potential_dot_dot_acou ! the sign is negative because pressure p = - Chi_dot_dot therefore we need ! to add minus the source to Chi_dot_dot to get plus the source in pressure - ! add source array + ! add source array do k=1,NGLLZ do j=1,NGLLY do i=1,NGLLX @@ -277,9 +322,9 @@ subroutine compute_add_sources_acoustic(NSPEC_AB,NGLOB_AB,potential_dot_dot_acou it_end = it_start + NTSTEP_BETWEEN_READ_ADJSRC - 1 write(procname,"(i4)") myrank procname = adjustl(procname) - open(unit=IIN_SU1, file=trim(OUTPUT_FILES_PATH)//'../SEM/'//trim(procname)//'_dx_SU.adj', & + open(unit=IIN_SU1, file=trim(OUTPUT_FILES)//'../SEM/'//trim(procname)//'_dx_SU.adj', & status='old',access='direct',recl=240+4*(NSTEP),iostat = ier) - if (ier /= 0) call exit_MPI(myrank,'file '//trim(OUTPUT_FILES_PATH) & + if (ier /= 0) call exit_MPI(myrank,'file '//trim(OUTPUT_FILES) & //'../SEM/'//trim(procname)//'_dx_SU.adj does not exist') do irec_local = 1,nrec_local @@ -373,7 +418,8 @@ subroutine compute_add_sources_acoustic_bpwf(NSPEC_AB, & use constants use specfem_par,only: PRINT_SOURCE_TIME_FUNCTION,stf_used_total, & pm1_source_encoding,nsources_local,USE_FORCE_POINT_SOURCE, & - USE_RICKER_TIME_FUNCTION + USE_RICKER_TIME_FUNCTION,USE_SOURCE_ENCODING + implicit none integer :: NSPEC_AB @@ -494,7 +540,7 @@ subroutine compute_add_sources_acoustic_bpwf(NSPEC_AB, & stf = comp_source_time_function_rickr( & dble(NSTEP-it)*DT-t0-tshift_src(isource),hdur(isource)) else - ! gaussian source time + ! Gaussian source time stf = comp_source_time_function_gauss( & dble(NSTEP-it)*DT-t0-tshift_src(isource),hdur_gaussian(isource)) endif @@ -503,7 +549,7 @@ subroutine compute_add_sources_acoustic_bpwf(NSPEC_AB, & !stf = comp_source_time_function(dble(NSTEP-it)*DT-t0-tshift_src(isource),hdur_gaussian(isource)) ! source encoding - stf = stf * pm1_source_encoding(isource) + if(USE_SOURCE_ENCODING) stf = stf * pm1_source_encoding(isource) ! distinguishes between single and double precision for reals if (CUSTOM_REAL == SIZE_REAL) then @@ -731,9 +777,9 @@ subroutine compute_add_sources_acoustic_GPU(NSPEC_AB,ispec_is_inner,phase_is_inn it_end = it_start + NTSTEP_BETWEEN_READ_ADJSRC - 1 write(procname,"(i4)") myrank procname = adjustl(procname) - open(unit=IIN_SU1, file=trim(OUTPUT_FILES_PATH)//'../SEM/'//trim(procname)//'_dx_SU.adj', & + open(unit=IIN_SU1, file=trim(OUTPUT_FILES)//'../SEM/'//trim(procname)//'_dx_SU.adj', & status='old',access='direct',recl=240+4*(NSTEP),iostat = ier) - if (ier /= 0) call exit_MPI(myrank,'file '//trim(OUTPUT_FILES_PATH) & + if (ier /= 0) call exit_MPI(myrank,'file '//trim(OUTPUT_FILES) & //'../SEM/'//trim(procname)//'_dx_SU.adj does not exist') do irec_local = 1,nrec_local diff --git a/src/specfem3D/compute_add_sources_viscoelastic.f90 b/src/specfem3D/compute_add_sources_viscoelastic.f90 index cf8ae6ae6..822c194e8 100644 --- a/src/specfem3D/compute_add_sources_viscoelastic.f90 +++ b/src/specfem3D/compute_add_sources_viscoelastic.f90 @@ -266,17 +266,17 @@ subroutine compute_add_sources_viscoelastic(NSPEC_AB,NGLOB_AB,accel, & write(procname,"(i4)") myrank procname = adjustl(procname) ! read adjoint sources - open(unit=IIN_SU1, file=trim(OUTPUT_FILES_PATH)//'../SEM/'//trim(procname)//'_dx_SU.adj', & + open(unit=IIN_SU1, file=trim(OUTPUT_FILES)//'../SEM/'//trim(procname)//'_dx_SU.adj', & status='old', access='direct', recl=240+4*NSTEP, iostat=ier) - if (ier /= 0) call exit_MPI(myrank,'file '//trim(OUTPUT_FILES_PATH) & + if (ier /= 0) call exit_MPI(myrank,'file '//trim(OUTPUT_FILES) & //'../SEM/'//trim(procname)//'_dx_SU.adj does not exist') - open(unit=IIN_SU2, file=trim(OUTPUT_FILES_PATH)//'../SEM/'//trim(procname)//'_dy_SU.adj', & + open(unit=IIN_SU2, file=trim(OUTPUT_FILES)//'../SEM/'//trim(procname)//'_dy_SU.adj', & status='old', access='direct', recl=240+4*NSTEP, iostat=ier) - if (ier /= 0) call exit_MPI(myrank,'file '//trim(OUTPUT_FILES_PATH) & + if (ier /= 0) call exit_MPI(myrank,'file '//trim(OUTPUT_FILES) & //'../SEM/'//trim(procname)//'_dy_SU.adj does not exist') - open(unit=IIN_SU3, file=trim(OUTPUT_FILES_PATH)//'../SEM/'//trim(procname)//'_dz_SU.adj', & + open(unit=IIN_SU3, file=trim(OUTPUT_FILES)//'../SEM/'//trim(procname)//'_dz_SU.adj', & status='old', access='direct', recl=240+4*NSTEP, iostat=ier) - if (ier /= 0) call exit_MPI(myrank,'file '//trim(OUTPUT_FILES_PATH) & + if (ier /= 0) call exit_MPI(myrank,'file '//trim(OUTPUT_FILES) & //'../SEM/'//trim(procname)//'_dz_SU.adj does not exist') do irec_local = 1,nrec_local @@ -770,17 +770,17 @@ subroutine compute_add_sources_viscoelastic_GPU(NSPEC_AB, & write(procname,"(i4)") myrank procname = adjustl(procname) ! read adjoint sources - open(unit=IIN_SU1, file=trim(OUTPUT_FILES_PATH)//'../SEM/'//trim(procname)//'_dx_SU.adj', & + open(unit=IIN_SU1, file=trim(OUTPUT_FILES)//'../SEM/'//trim(procname)//'_dx_SU.adj', & status='old', access='direct', recl=240+4*NSTEP, iostat=ier) - if (ier /= 0) call exit_MPI(myrank,'file '//trim(OUTPUT_FILES_PATH) & + if (ier /= 0) call exit_MPI(myrank,'file '//trim(OUTPUT_FILES) & //'../SEM/'//trim(procname)//'_dx_SU.adj does not exist') - open(unit=IIN_SU2, file=trim(OUTPUT_FILES_PATH)//'../SEM/'//trim(procname)//'_dy_SU.adj', & + open(unit=IIN_SU2, file=trim(OUTPUT_FILES)//'../SEM/'//trim(procname)//'_dy_SU.adj', & status='old', access='direct', recl=240+4*NSTEP, iostat=ier) - if (ier /= 0) call exit_MPI(myrank,'file '//trim(OUTPUT_FILES_PATH) & + if (ier /= 0) call exit_MPI(myrank,'file '//trim(OUTPUT_FILES) & //'../SEM/'//trim(procname)//'_dy_SU.adj does not exist') - open(unit=IIN_SU3, file=trim(OUTPUT_FILES_PATH)//'../SEM/'//trim(procname)//'_dz_SU.adj', & + open(unit=IIN_SU3, file=trim(OUTPUT_FILES)//'../SEM/'//trim(procname)//'_dz_SU.adj', & status='old', access='direct', recl=240+4*NSTEP, iostat=ier) - if (ier /= 0) call exit_MPI(myrank,'file '//trim(OUTPUT_FILES_PATH) & + if (ier /= 0) call exit_MPI(myrank,'file '//trim(OUTPUT_FILES) & //'../SEM/'//trim(procname)//'_dz_SU.adj does not exist') do irec_local = 1,nrec_local diff --git a/src/specfem3D/compute_arrays_source.f90 b/src/specfem3D/compute_arrays_source.f90 index bd03a061e..4aa39f6bf 100644 --- a/src/specfem3D/compute_arrays_source.f90 +++ b/src/specfem3D/compute_arrays_source.f90 @@ -138,7 +138,7 @@ subroutine compute_arrays_adjoint_source(myrank, adj_source_file, & integer icomp, itime, i, j, k, ier, it_start, it_end double precision :: junk ! note: should have same order as orientation in write_seismograms_to_file() - character(len=3),dimension(NDIM) :: comp != (/ "BHE", "BHN", "BHZ" /) + character(len=3),dimension(NDIM) :: comp character(len=MAX_STRING_LEN) :: filename ! gets channel names @@ -155,7 +155,7 @@ subroutine compute_arrays_adjoint_source(myrank, adj_source_file, & ! loops over components do icomp = 1, NDIM - filename = OUTPUT_FILES_PATH(1:len_trim(OUTPUT_FILES_PATH))//'/../SEM/'//trim(adj_source_file)//'.'//comp(icomp)//'.adj' + filename = OUTPUT_FILES(1:len_trim(OUTPUT_FILES))//'/../SEM/'//trim(adj_source_file)//'.'//comp(icomp)//'.adj' open(unit=IIN,file=trim(filename),status='old',action='read',iostat = ier) ! cycles to next file (this might be more error prone) !if (ier /= 0) cycle diff --git a/src/specfem3D/compute_forces_viscoelastic_Dev.F90 b/src/specfem3D/compute_forces_viscoelastic_Dev.F90 index 29c78f445..5019af939 100644 --- a/src/specfem3D/compute_forces_viscoelastic_Dev.F90 +++ b/src/specfem3D/compute_forces_viscoelastic_Dev.F90 @@ -64,11 +64,11 @@ subroutine compute_forces_viscoelastic_Dev(iphase,NSPEC_AB,NGLOB_AB, & ! computes elastic tensor term use constants, only: CUSTOM_REAL,NGLLX,NGLLY,NGLLZ,NDIM,NGLLCUBE, & - N_SLS,SAVE_MOHO_MESH,ONE_THIRD,FOUR_THIRDS,m1,m2, & + N_SLS,ONE_THIRD,FOUR_THIRDS,m1,m2, & MAKE_HOOKE_LAW_WEAKLY_NONLINEAR,A,B,C,A_over_4,B_over_2 use fault_solver_dynamic, only : Kelvin_Voigt_eta - use specfem_par, only: FULL_ATTENUATION_SOLID + use specfem_par, only: FULL_ATTENUATION_SOLID,SAVE_MOHO_MESH use pml_par, only: is_CPML,spec_to_CPML,accel_elastic_CPML,NSPEC_CPML, & PML_dux_dxl,PML_dux_dyl,PML_dux_dzl,PML_duy_dxl,PML_duy_dyl,PML_duy_dzl, & diff --git a/src/specfem3D/compute_forces_viscoelastic_calling_routine.F90 b/src/specfem3D/compute_forces_viscoelastic_calling_routine.F90 index 3ca64287e..23c85bd7b 100644 --- a/src/specfem3D/compute_forces_viscoelastic_calling_routine.F90 +++ b/src/specfem3D/compute_forces_viscoelastic_calling_routine.F90 @@ -505,6 +505,7 @@ subroutine compute_forces_viscoelastic_Dev_sim1(iphase) !---------------------------------------------------------------------------------------------- #ifdef OPENMP_MODE + print *,iphase !! DK DK this dummy statement just to avoid a warning by the compiler about "iphase" being unused stop 'OpenMP support has been discontinued for now' !! DK DK Jan 2013: beware, that OpenMP version is not maintained / supported and thus probably does not work ! call compute_forces_viscoelastic_Dev_openmp(iphase, NSPEC_AB,NGLOB_AB,displ,veloc,accel, & diff --git a/src/specfem3D/compute_forces_viscoelastic_noDev.f90 b/src/specfem3D/compute_forces_viscoelastic_noDev.f90 index 8718cd273..4d3f6013f 100644 --- a/src/specfem3D/compute_forces_viscoelastic_noDev.f90 +++ b/src/specfem3D/compute_forces_viscoelastic_noDev.f90 @@ -54,11 +54,11 @@ subroutine compute_forces_viscoelastic_noDev(iphase, & phase_ispec_inner_elastic,backward_simulation) use constants, only: CUSTOM_REAL,NGLLX,NGLLY,NGLLZ,NDIM, & - N_SLS,SAVE_MOHO_MESH,ONE_THIRD,FOUR_THIRDS, & + N_SLS,ONE_THIRD,FOUR_THIRDS, & MAKE_HOOKE_LAW_WEAKLY_NONLINEAR,A,B,C,A_over_4,B_over_2 use fault_solver_dynamic, only : Kelvin_Voigt_eta - use specfem_par, only: FULL_ATTENUATION_SOLID + use specfem_par, only: FULL_ATTENUATION_SOLID,SAVE_MOHO_MESH use pml_par, only: is_CPML,spec_to_CPML,accel_elastic_CPML,NSPEC_CPML, & PML_dux_dxl,PML_dux_dyl,PML_dux_dzl,PML_duy_dxl,PML_duy_dyl,PML_duy_dzl, & diff --git a/src/specfem3D/compute_gradient.f90 b/src/specfem3D/compute_gradient_in_acoustic.f90 similarity index 95% rename from src/specfem3D/compute_gradient.f90 rename to src/specfem3D/compute_gradient_in_acoustic.f90 index d51005399..905460af8 100644 --- a/src/specfem3D/compute_gradient.f90 +++ b/src/specfem3D/compute_gradient_in_acoustic.f90 @@ -25,8 +25,7 @@ ! !===================================================================== - - subroutine compute_gradient(ispec,NSPEC_AB,NGLOB_AB, & + subroutine compute_gradient_in_acoustic(ispec,NSPEC_AB,NGLOB_AB, & scalar_field, vector_field_element,& hprime_xx,hprime_yy,hprime_zz, & xix,xiy,xiz,etax,etay,etaz,gammax,gammay,gammaz, & @@ -35,11 +34,11 @@ subroutine compute_gradient(ispec,NSPEC_AB,NGLOB_AB, & ! calculates gradient of given acoustic scalar (potential) field on all GLL points in one, single element ! note: ! displacement s = (rho)^{-1} \del \chi -! velocity v = (rho)^{-1} \del \ddot \chi +! velocity v = (rho)^{-1} \del \ddot \chi ! ! in case of gravity: ! displacement s = \del \chi -! velocity v = \del \ddot \chi +! velocity v = \del \ddot \chi ! returns: (1/rho) times gradient vector field (vector_field_element) in specified element ! or in gravity case, just gradient vector field @@ -124,6 +123,6 @@ subroutine compute_gradient(ispec,NSPEC_AB,NGLOB_AB, & enddo enddo - end subroutine compute_gradient + end subroutine compute_gradient_in_acoustic diff --git a/src/specfem3D/compute_interpolated_dva.f90 b/src/specfem3D/compute_interpolated_dva.f90 index 6f0f547a4..603cdd71b 100644 --- a/src/specfem3D/compute_interpolated_dva.f90 +++ b/src/specfem3D/compute_interpolated_dva.f90 @@ -120,32 +120,31 @@ end subroutine compute_interpolated_dva !------------------------------------------------------------------------------------------------- ! -subroutine compute_interpolated_dva_ac(displ_element,veloc_element,& - potential_dot_dot_acoustic,potential_dot_acoustic,& - potential_acoustic,NGLOB_AB, & +subroutine compute_interpolated_dva_acoust(displ_element,veloc_element,accel_element, & + potential_dot_dot_acoustic,potential_acoustic,NGLOB_AB, & ispec,NSPEC_AB,ibool, & xi_r,eta_r,gamma_r, & hxir,hetar,hgammar, & - dxd,dyd,dzd,vxd,vyd,vzd,axd,ayd,azd) + dxd,dyd,dzd,vxd,vyd,vzd,axd,ayd,azd,pd,USE_TRICK_FOR_BETTER_PRESSURE) -! acoustic elements -! returns displacement/velocity/pressure (dxd,..,vxd,..,axd,.. ) at receiver location +! for acoustic elements +! returns displacement/velocity/acceleration/pressure (dxd,..,vxd,..,axd,..,pd) at receiver location use constants implicit none - double precision,intent(out) :: dxd,dyd,dzd,vxd,vyd,vzd,axd,ayd,azd + double precision,intent(out) :: dxd,dyd,dzd,vxd,vyd,vzd,axd,ayd,azd,pd integer :: ispec integer :: NSPEC_AB,NGLOB_AB - real(kind=CUSTOM_REAL),dimension(NDIM,NGLLX,NGLLY,NGLLZ):: displ_element,veloc_element - real(kind=CUSTOM_REAL),dimension(NGLOB_AB) :: potential_dot_dot_acoustic - real(kind=CUSTOM_REAL),dimension(NGLOB_AB) :: potential_dot_acoustic - real(kind=CUSTOM_REAL),dimension(NGLOB_AB) :: potential_acoustic + real(kind=CUSTOM_REAL),dimension(NDIM,NGLLX,NGLLY,NGLLZ):: displ_element,veloc_element,accel_element + real(kind=CUSTOM_REAL),dimension(NGLOB_AB) :: potential_dot_dot_acoustic,potential_acoustic - integer,dimension(NGLLX,NGLLY,NGLLZ,NSPEC_AB):: ibool + integer,dimension(NGLLX,NGLLY,NGLLZ,NSPEC_AB) :: ibool + + logical :: USE_TRICK_FOR_BETTER_PRESSURE ! receiver information double precision :: xi_r,eta_r,gamma_r @@ -161,13 +160,17 @@ subroutine compute_interpolated_dva_ac(displ_element,veloc_element,& dxd = ZERO dyd = ZERO dzd = ZERO + vxd = ZERO vyd = ZERO vzd = ZERO + axd = ZERO ayd = ZERO azd = ZERO + pd = ZERO + ! takes closest GLL point only (no interpolation) if (FASTER_RECEIVERS_POINTS_ONLY) then @@ -175,20 +178,47 @@ subroutine compute_interpolated_dva_ac(displ_element,veloc_element,& dxd = displ_element(1,nint(xi_r),nint(eta_r),nint(gamma_r)) dyd = displ_element(2,nint(xi_r),nint(eta_r),nint(gamma_r)) dzd = displ_element(3,nint(xi_r),nint(eta_r),nint(gamma_r)) + ! velocity vxd = veloc_element(1,nint(xi_r),nint(eta_r),nint(gamma_r)) vyd = veloc_element(2,nint(xi_r),nint(eta_r),nint(gamma_r)) vzd = veloc_element(3,nint(xi_r),nint(eta_r),nint(gamma_r)) + ! acceleration + axd = accel_element(1,nint(xi_r),nint(eta_r),nint(gamma_r)) + ayd = accel_element(2,nint(xi_r),nint(eta_r),nint(gamma_r)) + azd = accel_element(3,nint(xi_r),nint(eta_r),nint(gamma_r)) + ! global index iglob = ibool(nint(xi_r),nint(eta_r),nint(gamma_r),ispec) - ! x component -> acoustic potential - axd = potential_acoustic(iglob) - ! y component -> first time derivative of potential - ayd = potential_dot_acoustic(iglob) - ! z component -> pressure - azd = - potential_dot_dot_acoustic(iglob) + ! pressure + if(USE_TRICK_FOR_BETTER_PRESSURE) then + ! use a trick to increase accuracy of pressure seismograms in fluid (acoustic) elements: + ! use the second derivative of the source for the source time function instead of the source itself, + ! and then record -potential_acoustic() as pressure seismograms instead of -potential_dot_dot_acoustic(); + ! this is mathematically equivalent, but numerically significantly more accurate because in the explicit + ! Newmark time scheme acceleration is accurate at zeroth order while displacement is accurate at second order, + ! thus in fluid elements potential_dot_dot_acoustic() is accurate at zeroth order while potential_acoustic() + ! is accurate at second order and thus contains significantly less numerical noise. + pd = - potential_acoustic(iglob) + ! that trick is not implemented for the calculation of displacement, velocity nor acceleration seismograms + ! in acoustic elements yet; to do so we would need to recompute them using the second integral in time of the + ! current formulas in that case. Same remark for recording stations located in solid (elastic/viscoelastic) elements + ! in the case of fluid/solid models when that trick is used; thus for now we erase these seismograms here just in case + ! because they would be wrong + dxd = ZERO + dyd = ZERO + dzd = ZERO + vxd = ZERO + vyd = ZERO + vzd = ZERO + axd = ZERO + ayd = ZERO + azd = ZERO + else + pd = - potential_dot_dot_acoustic(iglob) ! this is the standard expression + endif else @@ -196,7 +226,6 @@ subroutine compute_interpolated_dva_ac(displ_element,veloc_element,& do k = 1,NGLLZ do j = 1,NGLLY do i = 1,NGLLX - iglob = ibool(i,j,k,ispec) hlagrange = hxir(i)*hetar(j)*hgammar(k) @@ -204,17 +233,47 @@ subroutine compute_interpolated_dva_ac(displ_element,veloc_element,& dxd = dxd + hlagrange*displ_element(1,i,j,k) dyd = dyd + hlagrange*displ_element(2,i,j,k) dzd = dzd + hlagrange*displ_element(3,i,j,k) + ! velocity vxd = vxd + hlagrange*veloc_element(1,i,j,k) vyd = vyd + hlagrange*veloc_element(2,i,j,k) vzd = vzd + hlagrange*veloc_element(3,i,j,k) - ! x component -> acoustic potential - axd = axd + hlagrange*potential_acoustic(iglob) - ! y component -> first time derivative of potential - ayd = ayd + hlagrange*potential_dot_acoustic(iglob) - ! z component -> pressure - azd = azd - hlagrange*potential_dot_dot_acoustic(iglob) + ! acceleration + axd = axd + hlagrange*accel_element(1,i,j,k) + ayd = ayd + hlagrange*accel_element(2,i,j,k) + azd = azd + hlagrange*accel_element(3,i,j,k) + + ! global index + iglob = ibool(i,j,k,ispec) + + ! pressure + if(USE_TRICK_FOR_BETTER_PRESSURE) then + ! use a trick to increase accuracy of pressure seismograms in fluid (acoustic) elements: + ! use the second derivative of the source for the source time function instead of the source itself, + ! and then record -potential_acoustic() as pressure seismograms instead of -potential_dot_dot_acoustic(); + ! this is mathematically equivalent, but numerically significantly more accurate because in the explicit + ! Newmark time scheme acceleration is accurate at zeroth order while displacement is accurate at second order, + ! thus in fluid elements potential_dot_dot_acoustic() is accurate at zeroth order while potential_acoustic() + ! is accurate at second order and thus contains significantly less numerical noise. + pd = pd - hlagrange*potential_acoustic(iglob) + ! that trick is not implemented for the calculation of displacement, velocity nor acceleration seismograms + ! in acoustic elements yet; to do so we would need to recompute them using the second integral in time of the + ! current formulas in that case. Same remark for recording stations located in solid (elastic/viscoelastic) elements + ! in the case of fluid/solid models when that trick is used; thus for now we erase these seismograms here just in case + ! because they would be wrong + dxd = ZERO + dyd = ZERO + dzd = ZERO + vxd = ZERO + vyd = ZERO + vzd = ZERO + axd = ZERO + ayd = ZERO + azd = ZERO + else + pd = pd - hlagrange*potential_dot_dot_acoustic(iglob) + endif enddo enddo @@ -222,4 +281,5 @@ subroutine compute_interpolated_dva_ac(displ_element,veloc_element,& endif -end subroutine compute_interpolated_dva_ac +end subroutine compute_interpolated_dva_acoust + diff --git a/src/specfem3D/compute_kernels.f90 b/src/specfem3D/compute_kernels.f90 index b7014050e..4f2315c59 100644 --- a/src/specfem3D/compute_kernels.f90 +++ b/src/specfem3D/compute_kernels.f90 @@ -212,14 +212,14 @@ subroutine compute_kernels_ac() if (ispec_is_acoustic(ispec)) then ! backward fields: displacement vector - call compute_gradient(ispec,NSPEC_ADJOINT,NGLOB_ADJOINT, & + call compute_gradient_in_acoustic(ispec,NSPEC_ADJOINT,NGLOB_ADJOINT, & b_potential_acoustic, b_displ_elm,& hprime_xx,hprime_yy,hprime_zz, & xix,xiy,xiz,etax,etay,etaz,gammax,gammay,gammaz, & ibool,rhostore,GRAVITY) ! adjoint fields: acceleration vector ! new expression (\partial_t^2\bfs^\dagger=-\frac{1}{\rho}\bfnabla\phi^\dagger) - call compute_gradient(ispec,NSPEC_AB,NGLOB_AB, & + call compute_gradient_in_acoustic(ispec,NSPEC_AB,NGLOB_AB, & potential_acoustic, accel_elm,& hprime_xx,hprime_yy,hprime_zz, & xix,xiy,xiz,etax,etay,etaz,gammax,gammay,gammaz, & @@ -393,14 +393,14 @@ subroutine compute_kernels_hessian() if (ispec_is_acoustic(ispec)) then ! adjoint fields: acceleration vector - call compute_gradient(ispec,NSPEC_AB,NGLOB_AB, & + call compute_gradient_in_acoustic(ispec,NSPEC_AB,NGLOB_AB, & potential_dot_dot_acoustic, accel_elm,& hprime_xx,hprime_yy,hprime_zz, & xix,xiy,xiz,etax,etay,etaz,gammax,gammay,gammaz, & ibool,rhostore,GRAVITY) ! adjoint fields: acceleration vector - call compute_gradient(ispec,NSPEC_AB,NGLOB_AB, & + call compute_gradient_in_acoustic(ispec,NSPEC_AB,NGLOB_AB, & b_potential_dot_dot_acoustic, b_accel_elm,& hprime_xx,hprime_yy,hprime_zz, & xix,xiy,xiz,etax,etay,etaz,gammax,gammay,gammaz, & diff --git a/src/specfem3D/compute_stacey_viscoelastic.f90 b/src/specfem3D/compute_stacey_viscoelastic.f90 index b42ee9422..b55767b54 100644 --- a/src/specfem3D/compute_stacey_viscoelastic.f90 +++ b/src/specfem3D/compute_stacey_viscoelastic.f90 @@ -89,10 +89,14 @@ subroutine compute_stacey_viscoelastic(NSPEC_AB,NGLOB_AB,accel, & integer :: it_dsm if (COUPLE_WITH_EXTERNAL_CODE) then - if (phase_is_inner .eqv. .false.) then - if (mod(it_dsm,Ntime_step_dsm+1) == 0 .or. it == 1) then - call read_dsm_file(Veloc_dsm_boundary,Tract_dsm_boundary,num_abs_boundary_faces,it_dsm) + if (old_DSM_coupling_from_Vadim) then + if (phase_is_inner .eqv. .false.) then + if (mod(it_dsm,Ntime_step_dsm+1) == 0 .or. it == 1) then + call read_dsm_file(Veloc_dsm_boundary,Tract_dsm_boundary,num_abs_boundary_faces,it_dsm) + endif endif + else + !! MODIFS DE NOBU 2D endif endif @@ -125,7 +129,7 @@ subroutine compute_stacey_viscoelastic(NSPEC_AB,NGLOB_AB,accel, & vz=veloc(3,iglob) !! CD CD !! For coupling with DSM - if (COUPLE_WITH_EXTERNAL_CODE) then + if (COUPLE_WITH_EXTERNAL_CODE) then !! To verify for NOBU version vx = vx - Veloc_dsm_boundary(1,it_dsm,igll,iface) vy = vy - Veloc_dsm_boundary(2,it_dsm,igll,iface) vz = vz - Veloc_dsm_boundary(3,it_dsm,igll,iface) @@ -146,7 +150,7 @@ subroutine compute_stacey_viscoelastic(NSPEC_AB,NGLOB_AB,accel, & tz = rho_vp(i,j,k,ispec)*vn*nz + rho_vs(i,j,k,ispec)*(vz-vn*nz) !! CD CD !! For coupling with DSM - if (COUPLE_WITH_EXTERNAL_CODE) then + if (COUPLE_WITH_EXTERNAL_CODE) then !! To verify for NOBU version tx = tx - Tract_dsm_boundary(1,it_dsm,igll,iface) ty = ty - Tract_dsm_boundary(2,it_dsm,igll,iface) tz = tz - Tract_dsm_boundary(3,it_dsm,igll,iface) @@ -182,7 +186,7 @@ subroutine compute_stacey_viscoelastic(NSPEC_AB,NGLOB_AB,accel, & endif !! CD CD !! For coupling with DSM - if (COUPLE_WITH_EXTERNAL_CODE) then + if (COUPLE_WITH_EXTERNAL_CODE) then !! To verify for NOBU version if (phase_is_inner .eqv. .true.) then it_dsm = it_dsm + 1 endif @@ -357,10 +361,14 @@ subroutine compute_stacey_viscoelastic_GPU(phase_is_inner,num_abs_boundary_faces integer :: it_dsm if (COUPLE_WITH_EXTERNAL_CODE) then - if (phase_is_inner .eqv. .false.) then - if (mod(it_dsm,Ntime_step_dsm+1) == 0 .or. it == 1) then - call read_dsm_file(Veloc_dsm_boundary,Tract_dsm_boundary,num_abs_boundary_faces,it_dsm) + if (old_DSM_coupling_from_Vadim) then + if (phase_is_inner .eqv. .false.) then + if (mod(it_dsm,Ntime_step_dsm+1) == 0 .or. it == 1) then + call read_dsm_file(Veloc_dsm_boundary,Tract_dsm_boundary,num_abs_boundary_faces,it_dsm) + endif endif + else + !! MODIFS DE NOBU 2D endif endif @@ -389,7 +397,7 @@ subroutine compute_stacey_viscoelastic_GPU(phase_is_inner,num_abs_boundary_faces endif !! CD CD : begin !! For coupling with DSM - if (COUPLE_WITH_EXTERNAL_CODE) then + if (COUPLE_WITH_EXTERNAL_CODE) then !! To verify for NOBU version if (phase_is_inner .eqv. .true.) then it_dsm = it_dsm + 1 endif diff --git a/src/specfem3D/create_color_image.f90 b/src/specfem3D/create_color_image.f90 index 4d2450b45..4c4979664 100644 --- a/src/specfem3D/create_color_image.f90 +++ b/src/specfem3D/create_color_image.f90 @@ -596,7 +596,7 @@ subroutine write_PNM_data(color_image_2D_data,iglob_image_color_2D,& ! display a given field as a red and blue color image ! to display the snapshots : display image*.gif ! when compiling with Intel ifort, use " -assume byterecl " option to create binary PNM images - use constants,only: HUGEVAL,TINYVAL,CUSTOM_REAL,OUTPUT_FILES_PATH,MAX_STRING_LEN + use constants,only: HUGEVAL,TINYVAL,CUSTOM_REAL,OUTPUT_FILES,MAX_STRING_LEN use image_PNM_par,only: BINARY_FILE,VP_BACKGROUND,& POWER_DISPLAY_COLOR implicit none @@ -617,7 +617,7 @@ subroutine write_PNM_data(color_image_2D_data,iglob_image_color_2D,& integer, parameter :: ascii_code_of_zero = 48, ascii_code_of_carriage_return = 10 ! open the image file - write(file_name,"(a,'/image',i7.7,'.pnm')") OUTPUT_FILES_PATH(1:len_trim(OUTPUT_FILES_PATH)),it + write(file_name,"(a,'/image',i7.7,'.pnm')") OUTPUT_FILES(1:len_trim(OUTPUT_FILES)),it ! first delete the file, just in case it was previously bigger open(unit=27,file=file_name,status='unknown') @@ -884,14 +884,14 @@ subroutine get_iglob_veloc(iglob,ispec,val_vector) if (SAVE_DISPLACEMENT) then if (SIMULATION_TYPE == 3) then ! displacement vector from backward potential - call compute_gradient(ispec,NSPEC_AB,NGLOB_AB, & + call compute_gradient_in_acoustic(ispec,NSPEC_AB,NGLOB_AB, & b_potential_acoustic, val_element,& hprime_xx,hprime_yy,hprime_zz, & xix,xiy,xiz,etax,etay,etaz,gammax,gammay,gammaz, & ibool,rhostore,GRAVITY) else ! displacement vector - call compute_gradient(ispec,NSPEC_AB,NGLOB_AB, & + call compute_gradient_in_acoustic(ispec,NSPEC_AB,NGLOB_AB, & potential_acoustic, val_element,& hprime_xx,hprime_yy,hprime_zz, & xix,xiy,xiz,etax,etay,etaz,gammax,gammay,gammaz, & @@ -900,14 +900,14 @@ subroutine get_iglob_veloc(iglob,ispec,val_vector) else if (SIMULATION_TYPE == 3) then ! velocity vector for backward/reconstructed wavefield - call compute_gradient(ispec,NSPEC_AB,NGLOB_AB, & + call compute_gradient_in_acoustic(ispec,NSPEC_AB,NGLOB_AB, & b_potential_dot_acoustic, val_element,& hprime_xx,hprime_yy,hprime_zz, & xix,xiy,xiz,etax,etay,etaz,gammax,gammay,gammaz, & ibool,rhostore,GRAVITY) else ! velocity vector - call compute_gradient(ispec,NSPEC_AB,NGLOB_AB, & + call compute_gradient_in_acoustic(ispec,NSPEC_AB,NGLOB_AB, & potential_dot_acoustic, val_element,& hprime_xx,hprime_yy,hprime_zz, & xix,xiy,xiz,etax,etay,etaz,gammax,gammay,gammaz, & diff --git a/src/specfem3D/fault_solver_common.f90 b/src/specfem3D/fault_solver_common.f90 index 610c11c8d..d418b1a3e 100644 --- a/src/specfem3D/fault_solver_common.f90 +++ b/src/specfem3D/fault_solver_common.f90 @@ -516,7 +516,7 @@ end subroutine store_dataT !------------------------------------------------------------------------ subroutine SCEC_write_dataT(dataT) - use specfem_par, only: OUTPUT_FILES_PATH + use specfem_par, only: OUTPUT_FILES !! DK DK use type() instead of class() for compatibility with some current compilers type(dataT_type), intent(in) :: dataT @@ -532,7 +532,7 @@ subroutine SCEC_write_dataT(dataT) write(my_fmt,'(a,i1,a)') '(',dataT%ndat+1,'(E15.7))' do i=1,dataT%npoin - open(IOUT,file=trim(OUTPUT_FILES_PATH)//trim(dataT%name(i))//'.dat',status='replace') + open(IOUT,file=trim(OUTPUT_FILES)//trim(dataT%name(i))//'.dat',status='replace') write(IOUT,*) "# problem=TPV104" ! WARNING: this should be a user input write(IOUT,*) "# author=Surendra Nadh Somala" ! WARNING: this should be a user input write(IOUT,1000) time_values(2), time_values(3), time_values(1), time_values(5), time_values(6), time_values(7) diff --git a/src/specfem3D/fault_solver_dynamic.f90 b/src/specfem3D/fault_solver_dynamic.f90 index 5be0596c5..2ba74e54f 100644 --- a/src/specfem3D/fault_solver_dynamic.f90 +++ b/src/specfem3D/fault_solver_dynamic.f90 @@ -231,12 +231,14 @@ subroutine init_one_fault(bc,IIN_BIN,IIN_PAR,dt,NT,iflt,myrank) if (RATE_AND_STATE) then call init_dataT(bc%dataT,bc%coord,bc%nglob,NT,dt,8,iflt) + if (bc%dataT%npoin>0) then bc%dataT%longFieldNames(8) = "log10 of state variable (log-seconds)" if (bc%rsf%StateLaw==1) then bc%dataT%shortFieldNames = trim(bc%dataT%shortFieldNames)//" log-theta" else bc%dataT%shortFieldNames = trim(bc%dataT%shortFieldNames)//" psi" endif + endif else call init_dataT(bc%dataT,bc%coord,bc%nglob,NT,dt,7,iflt) endif @@ -519,7 +521,7 @@ subroutine BC_DYNFLT_set3d(bc,MxA,V,D,iflt) theta_old = bc%rsf%theta call rsf_update_state(Vf_old,bc%dt,bc%rsf) do i=1,bc%nglob - Vf_new(i)=rtsafe(funcd,0.0_CUSTOM_REAL,Vf_old(i)+5.0_CUSTOM_REAL,1e-5_CUSTOM_REAL,tStick(i),-T(3,i),bc%Z(i),bc%rsf%f0(i), & + Vf_new(i)=rtsafe(0.0_CUSTOM_REAL,Vf_old(i)+5.0_CUSTOM_REAL,1e-5_CUSTOM_REAL,tStick(i),-T(3,i),bc%Z(i),bc%rsf%f0(i), & bc%rsf%V0(i),bc%rsf%a(i),bc%rsf%b(i),bc%rsf%L(i),bc%rsf%theta(i),bc%rsf%StateLaw) enddo @@ -528,7 +530,7 @@ subroutine BC_DYNFLT_set3d(bc,MxA,V,D,iflt) tmp_Vf(:) = 0.5_CUSTOM_REAL*(Vf_old(:) + Vf_new(:)) call rsf_update_state(tmp_Vf,bc%dt,bc%rsf) do i=1,bc%nglob - Vf_new(i)=rtsafe(funcd,0.0_CUSTOM_REAL,Vf_old(i)+5.0_CUSTOM_REAL,1e-5_CUSTOM_REAL,tStick(i),-T(3,i),bc%Z(i),bc%rsf%f0(i), & + Vf_new(i)=rtsafe(0.0_CUSTOM_REAL,Vf_old(i)+5.0_CUSTOM_REAL,1e-5_CUSTOM_REAL,tStick(i),-T(3,i),bc%Z(i),bc%rsf%f0(i), & bc%rsf%V0(i),bc%rsf%a(i),bc%rsf%b(i),bc%rsf%L(i),bc%rsf%theta(i),bc%rsf%StateLaw) enddo @@ -712,11 +714,11 @@ subroutine rsf_init(f,T0,V,nucFload,coord,IIN_PAR) real(kind=CUSTOM_REAL) :: V0,f0,a,b,L,theta_init,V_init,fw,Vw, C,T integer :: nV0,nf0,na,nb,nL,nV_init,ntheta_init,nfw,nVw, nC,nForcedRup - real(kind=CUSTOM_REAL) :: W1,W2,w,hypo_z - real(kind=CUSTOM_REAL) :: x,z - logical :: c1,c2,c3,c4 - real(kind=CUSTOM_REAL) :: b11,b12,b21,b22,B1,B2 - integer :: i !,nglob_bulk +! real(kind=CUSTOM_REAL) :: W1,W2,w,hypo_z +! real(kind=CUSTOM_REAL) :: x,z +! logical :: c1,c2,c3,c4 +! real(kind=CUSTOM_REAL) :: b11,b12,b21,b22,B1,B2 +! integer :: i !,nglob_bulk real(kind=CUSTOM_REAL) :: Fload integer :: nFload ! real(kind=CUSTOM_REAL), dimension(:,:), allocatable :: init_vel @@ -803,54 +805,55 @@ subroutine rsf_init(f,T0,V,nucFload,coord,IIN_PAR) ! WARNING: below is an ad-hoc setting of a(x,z) for some SCEC benchmark ! This should be instead an option in init_2d_distribution - W1=15000._CUSTOM_REAL - W2=7500._CUSTOM_REAL - w=3000._CUSTOM_REAL - hypo_z = -7500._CUSTOM_REAL - do i=1,nglob - x=coord(1,i) - z=coord(3,i) - c1=abs(x)W1 - c3=abs(z-hypo_z)W2 - if ((c1 .and. c2 .and. c3) .or. (c3 .and. c4 .and. c1)) then - - if (c1 .and. c2) then - b11 = w/(abs(x)-W1-w) - b12 = w/(abs(x)-W1) - B1 = HALF * (ONE + tanh(b11 + b12)) - else if (abs(x)<=W1) then - B1 = 1._CUSTOM_REAL - else - B1 = 0._CUSTOM_REAL - endif - - if (c3 .and. c4) then - b21 = w/(abs(z-hypo_z)-W2-w) - b22 = w/(abs(z-hypo_z)-W2) - B2 = HALF * (ONE + tanh(b21 + b22)) - else if (abs(z-hypo_z)<=W2) then - B2 = 1._CUSTOM_REAL - else - B2 = 0._CUSTOM_REAL - endif - - f%a(i) = 0.008 + 0.008 * (ONE - B1*B2) - f%Vw(i) = 0.1 + 0.9 * (ONE - B1*B2) - - else if (abs(x)<=W1 .and. abs(z-hypo_z)<=W2) then - f%a(i) = 0.008 - f%Vw(i) = 0.1_CUSTOM_REAL - else - f%a(i) = 0.016 - f%Vw(i) = 1.0_CUSTOM_REAL - endif - - enddo +! W1=15000._CUSTOM_REAL +! W2=7500._CUSTOM_REAL +! w=3000._CUSTOM_REAL +! hypo_z = -7500._CUSTOM_REAL +! do i=1,nglob +! x=coord(1,i) +! z=coord(3,i) +! c1=abs(x)W1 +! c3=abs(z-hypo_z)W2 +! if ((c1 .and. c2 .and. c3) .or. (c3 .and. c4 .and. c1)) then +! +! if (c1 .and. c2) then +! b11 = w/(abs(x)-W1-w) +! b12 = w/(abs(x)-W1) +! B1 = HALF * (ONE + tanh(b11 + b12)) +! else if (abs(x)<=W1) then +! B1 = 1._CUSTOM_REAL +! else +! B1 = 0._CUSTOM_REAL +! endif +! +! if (c3 .and. c4) then +! b21 = w/(abs(z-hypo_z)-W2-w) +! b22 = w/(abs(z-hypo_z)-W2) +! B2 = HALF * (ONE + tanh(b21 + b22)) +! else if (abs(z-hypo_z)<=W2) then +! B2 = 1._CUSTOM_REAL +! else +! B2 = 0._CUSTOM_REAL +! endif +! +! f%a(i) = 0.008 + 0.008 * (ONE - B1*B2) +! f%Vw(i) = 0.1 + 0.9 * (ONE - B1*B2) +! +! else if (abs(x)<=W1 .and. abs(z-hypo_z)<=W2) then +! f%a(i) = 0.008 +! f%Vw(i) = 0.1_CUSTOM_REAL +! else +! f%a(i) = 0.016 +! f%Vw(i) = 1.0_CUSTOM_REAL +! endif +! +! enddo ! WARNING: The line below scratches an earlier initialization of theta through theta_init ! We should implement it as an option for the user + if(TPV16) then if (f%stateLaw == 1) then f%theta = f%L/f%V0 & * exp( ( f%a * log(TWO*sinh(-sqrt(T0(1,:)**2+T0(2,:)**2)/T0(3,:)/f%a)) & @@ -859,7 +862,7 @@ subroutine rsf_init(f,T0,V,nucFload,coord,IIN_PAR) else f%theta = f%a * log(TWO*f%V0/f%V_init * sinh(-sqrt(T0(1,:)**2+T0(2,:)**2)/T0(3,:)/f%a)) endif - + endif ! WARNING : ad hoc for SCEC benchmark TPV10x allocate( nucFload(nglob) ) Fload = 0.e0_CUSTOM_REAL @@ -929,7 +932,7 @@ end subroutine rsf_update_state subroutine SCEC_Write_RuptureTime(dataXZ,iflt) - use specfem_par, only: OUTPUT_FILES_PATH + use specfem_par, only: OUTPUT_FILES type(dataXZ_type), intent(in) :: dataXZ integer, intent(in) :: iflt @@ -940,7 +943,7 @@ subroutine SCEC_Write_RuptureTime(dataXZ,iflt) call date_and_time(VALUES=time_values) - write(filename,'(a,I0)') trim(OUTPUT_FILES_PATH)//'/RuptureTime_Fault', iflt + write(filename,'(a,I0)') trim(OUTPUT_FILES)//'/RuptureTime_Fault', iflt IOUT = 121 !WARNING: not very robust. Could instead look for an available ID @@ -1106,13 +1109,13 @@ end subroutine store_dataXZ !--------------------------------------------------------------- subroutine write_dataXZ(dataXZ,itime,iflt) - use specfem_par, only: OUTPUT_FILES_PATH + use specfem_par, only: OUTPUT_FILES type(dataXZ_type), intent(in) :: dataXZ integer, intent(in) :: itime,iflt character(len=MAX_STRING_LEN) :: filename - write(filename,"(a,I0,'_F',I0,'.bin')") trim(OUTPUT_FILES_PATH)//'/Snapshot',itime,iflt + write(filename,"(a,I0,'_F',I0,'.bin')") trim(OUTPUT_FILES)//'/Snapshot',itime,iflt open(unit=IOUT, file= trim(filename), status='replace', form='unformatted',action='write') @@ -1306,11 +1309,10 @@ subroutine funcd(x,fn,df,tStick,Seff,Z,f0,V0,a,b,L,theta,statelaw) end subroutine funcd !--------------------------------------------------------------------- -function rtsafe(funcd,x1,x2,xacc,tStick,Seff,Z,f0,V0,a,b,L,theta,statelaw) +function rtsafe(x1,x2,xacc,tStick,Seff,Z,f0,V0,a,b,L,theta,statelaw) integer, parameter :: MAXIT=200 real(kind=CUSTOM_REAL) :: x1,x2,xacc - EXTERNAL funcd integer :: j !real(kind=CUSTOM_REAL) :: df,dx,dxold,f,fh,fl,temp,xh,xl double precision :: df,dx,dxold,f,fh,fl,temp,xh,xl,rtsafe @@ -1364,6 +1366,5 @@ function rtsafe(funcd,x1,x2,xacc,tStick,Seff,Z,f0,V0,a,b,L,theta,statelaw) end function rtsafe - - end module fault_solver_dynamic + diff --git a/src/specfem3D/fault_solver_kinematic.f90 b/src/specfem3D/fault_solver_kinematic.f90 index 151c279fb..caf8e9686 100644 --- a/src/specfem3D/fault_solver_kinematic.f90 +++ b/src/specfem3D/fault_solver_kinematic.f90 @@ -343,7 +343,7 @@ end subroutine init_dataXZ subroutine load_vslip_snapshots(dataXZ,itime,iflt) - use specfem_par, only: OUTPUT_FILES_PATH + use specfem_par, only: OUTPUT_FILES integer, intent(in) :: itime,iflt type(dataXZ_type), intent(inout) :: dataXZ character(len=MAX_STRING_LEN) :: filename @@ -352,7 +352,7 @@ subroutine load_vslip_snapshots(dataXZ,itime,iflt) IIN_BIN=101 IOUT = 102 - write(filename,"(a,I0,'_F',I0,'.bin')") trim(OUTPUT_FILES_PATH)//'/Snapshot',itime,iflt + write(filename,"(a,I0,'_F',I0,'.bin')") trim(OUTPUT_FILES)//'/Snapshot',itime,iflt print*, trim(filename) open(unit=IIN_BIN, file= trim(filename), status='old', form='formatted',& diff --git a/src/specfem3D/gravity_perturbation.f90 b/src/specfem3D/gravity_perturbation.f90 index 8483d65f3..fdaadbaa1 100644 --- a/src/specfem3D/gravity_perturbation.f90 +++ b/src/specfem3D/gravity_perturbation.f90 @@ -352,7 +352,7 @@ end subroutine gravity_timeseries subroutine gravity_output() - use specfem_par, only : myrank,NPROC,NSTEP,DT,OUTPUT_FILES_PATH + use specfem_par, only : myrank,NPROC,NSTEP,DT,OUTPUT_FILES implicit none integer :: isample,istat,nstep_grav @@ -363,7 +363,7 @@ subroutine gravity_output() do istat=1,nstat if (istat < myrank*nstat_local+1 .or. istat > (myrank+1)*nstat_local) cycle - write(sisname,"(a,I0,a)") trim(OUTPUT_FILES_PATH)//'/stat', istat, '.grav' + write(sisname,"(a,I0,a)") trim(OUTPUT_FILES)//'/stat', istat, '.grav' open(unit=IOUT,file=sisname,status='replace') do isample = 1,nstep_grav write(IOUT,*) isample*DT*ntimgap, accE(isample,istat),accN(isample,istat),accZ(isample,istat) @@ -373,7 +373,7 @@ subroutine gravity_output() if (myrank==0) then !left-over stations do istat=NPROC*nstat_local,nstat - write(sisname,"(a,I0,a)") trim(OUTPUT_FILES_PATH)//'/stat', istat, '.grav' + write(sisname,"(a,I0,a)") trim(OUTPUT_FILES)//'/stat', istat, '.grav' open(unit=IOUT,file=sisname,status='replace') do isample = 1,nstep_grav write(IOUT,*) isample*DT*ntimgap, accE(isample,istat),accN(isample,istat),accZ(isample,istat) diff --git a/src/specfem3D/initialize_simulation.f90 b/src/specfem3D/initialize_simulation.f90 index 53a3250bd..24ea80e28 100644 --- a/src/specfem3D/initialize_simulation.f90 +++ b/src/specfem3D/initialize_simulation.f90 @@ -39,32 +39,23 @@ subroutine initialize_simulation() implicit none integer :: ier - - ! read the parameter file - call read_parameter_file() - - call read_adios_parameters() - -!! DK DK added this for now (March 2013) -!! DK DK we will soon add it - if (PML_CONDITIONS .and. (SAVE_FORWARD .or. SIMULATION_TYPE==3)) stop 'PML_CONDITIONS is still under test for adjoint simulation' - - ! GPU_MODE is in par_file - call read_gpu_mode(GPU_MODE,GRAVITY) - - if (GPU_MODE .and. COUPLE_WITH_EXTERNAL_CODE) stop 'Coupling with DSM currently not implemented for GPUs' + logical :: BROADCAST_AFTER_READ ! myrank is the rank of each process, between 0 and NPROC-1. ! as usual in MPI, process 0 is in charge of coordinating everything ! and also takes care of the main output call world_rank(myrank) + ! read the parameter file + BROADCAST_AFTER_READ = .true. + call read_parameter_file(myrank,BROADCAST_AFTER_READ) + ! checks flags call initialize_simulation_check() ! open main output file, only written to by process 0 if (myrank == 0 .and. IMAIN /= ISTANDARD_OUTPUT) & - open(unit=IMAIN,file=trim(OUTPUT_FILES_PATH)//'/output_solver.txt',status='unknown') + open(unit=IMAIN,file=trim(OUTPUT_FILES)//'/output_solver.txt',status='unknown') ! user output if (myrank == 0) then @@ -132,8 +123,8 @@ subroutine initialize_simulation() ! reads in numbers of spectral elements and points for the part of the mesh handled by this process call create_name_database(prname,myrank,LOCAL_PATH) -! for coupling with DSM - if (COUPLE_WITH_EXTERNAL_CODE) call create_name_database(dsmname,myrank,TRACTION_PATH) +! for coupling with DSM !! To verify for NOBU version + if (COUPLE_WITH_EXTERNAL_CODE .and. old_DSM_coupling_from_Vadim) call create_name_database(dsmname,myrank,TRACTION_PATH) ! read the value of NSPEC_AB and NGLOB_AB because we need it to define some array sizes below if (ADIOS_FOR_MESH) then @@ -320,7 +311,7 @@ subroutine initialize_simulation_check() ! check that the code has been compiled with the right values if (myrank == 0) then - HEADER_FILE = OUTPUT_FILES_PATH(1:len_trim(OUTPUT_FILES_PATH))//'/values_from_mesher.h' + HEADER_FILE = OUTPUT_FILES(1:len_trim(OUTPUT_FILES))//'/values_from_mesher.h' open(unit=IOUT,file=trim(HEADER_FILE),status='old',iostat=ier) if (ier /= 0) then @@ -343,10 +334,10 @@ subroutine initialize_simulation_check() if (myrank == 0) then ! tests if OUTPUT_FILES directory exists ! note: inquire behaves differently when using intel ifort or gfortran compilers - !INQUIRE( FILE = OUTPUT_FILES_PATH(1:len_trim(OUTPUT_FILES_PATH))//'/.', EXIST = exists) - open(IOUT,file=trim(OUTPUT_FILES_PATH)//'/dummy.txt',status='unknown',iostat=ier) + !INQUIRE( FILE = OUTPUT_FILES(1:len_trim(OUTPUT_FILES))//'/.', EXIST = exists) + open(IOUT,file=trim(OUTPUT_FILES)//'/dummy.txt',status='unknown',iostat=ier) if (ier /= 0) then - print*,"OUTPUT_FILES directory does not work: ",trim(OUTPUT_FILES_PATH) + print*,"OUTPUT_FILES directory does not work: ",trim(OUTPUT_FILES) call exit_MPI(myrank,'error OUTPUT_FILES directory') endif close(IOUT,status='delete') @@ -393,7 +384,7 @@ subroutine initialize_simulation_adjoint() ! snapshot file names: ADJOINT attenuation if (ATTENUATION .and. ((SIMULATION_TYPE == 1 .and. SAVE_FORWARD) .or. SIMULATION_TYPE == 3)) & - call create_name_database(prname_Q,myrank,OUTPUT_FILES_PATH) + call create_name_database(prname_Q,myrank,OUTPUT_FILES) ! number of elements and points for adjoint arrays if (SIMULATION_TYPE == 3) then diff --git a/src/specfem3D/iterate_time.F90 b/src/specfem3D/iterate_time.F90 index 336b45e11..896fa14dd 100644 --- a/src/specfem3D/iterate_time.F90 +++ b/src/specfem3D/iterate_time.F90 @@ -34,13 +34,19 @@ subroutine iterate_time() use specfem_par_elastic use specfem_par_poroelastic use specfem_par_movie - use gravity_perturbation, only : gravity_timeseries, GRAVITY_SIMULATION + use gravity_perturbation, only: gravity_timeseries, GRAVITY_SIMULATION implicit none + ! for EXACT_UNDOING_TO_DISK + integer :: ispec,iglob,i,j,k,counter,record_length + integer, dimension(:), allocatable :: integer_mask_ibool_exact_undo + real(kind=CUSTOM_REAL), dimension(:), allocatable :: buffer_for_disk + character(len=MAX_STRING_LEN) outputname + !---- create a Gnuplot script to display the energy curve in log scale if (OUTPUT_ENERGY .and. myrank == 0) then - open(unit=IOUT_ENERGY,file=trim(OUTPUT_FILES_PATH)//'plot_energy.gnu',status='unknown',action='write') + open(unit=IOUT_ENERGY,file=trim(OUTPUT_FILES)//'plot_energy.gnu',status='unknown',action='write') write(IOUT_ENERGY,*) 'set term wxt' write(IOUT_ENERGY,*) '#set term postscript landscape color solid "Helvetica" 22' write(IOUT_ENERGY,*) '#set output "energy.ps"' @@ -61,13 +67,13 @@ subroutine iterate_time() ! open the file in which we will store the energy curve if (OUTPUT_ENERGY .and. myrank == 0) & - open(unit=IOUT_ENERGY,file=trim(OUTPUT_FILES_PATH)//'energy.dat',status='unknown',action='write') + open(unit=IOUT_ENERGY,file=trim(OUTPUT_FILES)//'energy.dat',status='unknown',action='write') ! ! s t a r t t i m e i t e r a t i o n s ! -! synchronize all processes to make sure everybody is ready to start time loop + ! synchronize all processes to make sure everybody is ready to start time loop call synchronize_all() if (myrank == 0) write(IMAIN,*) 'All processes are synchronized before time loop' @@ -78,26 +84,91 @@ subroutine iterate_time() call flush_IMAIN() endif -! create an empty file to monitor the start of the simulation + ! create an empty file to monitor the start of the simulation if (myrank == 0) then - open(unit=IOUT,file=trim(OUTPUT_FILES_PATH)//'/starttimeloop.txt',status='unknown') - write(IOUT,*) 'starting time loop' + open(unit=IOUT,file=trim(OUTPUT_FILES)//'/starttimeloop.txt',status='unknown',action='write') + write(IOUT,*) 'hello, starting time loop' close(IOUT) endif -! get MPI starting time + ! initialize variables for writing seismograms + seismo_offset = it_begin-1 + seismo_current = 0 + + ! get MPI starting time time_start = wtime() + ! ********************************************************* + ! ************* MAIN LOOP OVER THE TIME STEPS ************* + ! ********************************************************* + + if (EXACT_UNDOING_TO_DISK) then + + if (GPU_MODE) call exit_MPI(myrank,'EXACT_UNDOING_TO_DISK not supported for GPUs') + + if (UNDO_ATTENUATION) & + call exit_MPI(myrank,'EXACT_UNDOING_TO_DISK needs UNDO_ATTENUATION to be off because it computes the kernel directly instead') + + if (SIMULATION_TYPE == 1 .and. .not. SAVE_FORWARD) & + call exit_MPI(myrank,'EXACT_UNDOING_TO_DISK requires SAVE_FORWARD if SIMULATION_TYPE == 1') + + if (ANISOTROPIC_KL) call exit_MPI(myrank,'EXACT_UNDOING_TO_DISK requires ANISOTROPIC_KL to be turned off') + +!! DK DK determine the largest value of iglob that we need to save to disk, +!! DK DK since we save the upper part of the mesh only in the case of surface-wave kernels + ! crust_mantle + allocate(integer_mask_ibool_exact_undo(NGLOB_AB)) + integer_mask_ibool_exact_undo(:) = -1 + + counter = 0 + do ispec = 1, NSPEC_AB + do k = 1, NGLLZ + do j = 1, NGLLY + do i = 1, NGLLX + iglob = ibool(i,j,k,ispec) +! height = xstore(iglob) + ! save that element only if it is in the upper part of the mesh +! if (height >= 3000.d0) then + if (.true.) then + ! if this point has not yet been found before + if (integer_mask_ibool_exact_undo(iglob) == -1) then + ! create a new unique point + counter = counter + 1 + integer_mask_ibool_exact_undo(iglob) = counter + endif + endif + enddo + enddo + enddo + enddo + + ! allocate the buffer used to dump a single time step + allocate(buffer_for_disk(counter)) + + ! open the file in which we will dump all the time steps (in a single file) + write(outputname,"('huge_dumps/proc',i6.6,'_huge_dump_of_all_time_steps.bin')") myrank + inquire(iolength=record_length) buffer_for_disk + ! we write to or read from the file depending on the simulation type + if (SIMULATION_TYPE == 1) then + open(file=outputname, unit=IFILE_FOR_EXACT_UNDOING, action='write', status='unknown', & + form='unformatted', access='direct', recl=record_length) + else if (SIMULATION_TYPE == 3) then + open(file=outputname, unit=IFILE_FOR_EXACT_UNDOING, action='read', status='old', & + form='unformatted', access='direct', recl=record_length) + else + call exit_MPI(myrank,'EXACT_UNDOING_TO_DISK can only be used with SIMULATION_TYPE == 1 or SIMULATION_TYPE == 3') + endif -! ********************************************************* -! ************* MAIN LOOP OVER THE TIME STEPS ************* -! ********************************************************* + endif ! of if (EXACT_UNDOING_TO_DISK) - do it = 1,NSTEP + it_begin = 1 + it_end = NSTEP + do it = it_begin,it_end ! simulation status output and stability check - if (mod(it,NTSTEP_BETWEEN_OUTPUT_INFO) == 0 .or. it == 5 .or. it == NSTEP) & + if (mod(it,NTSTEP_BETWEEN_OUTPUT_INFO) == 0 .or. it == it_begin + 4 .or. it == it_end) then call check_stability() + endif ! simulation status output and stability check if (OUTPUT_ENERGY) then @@ -165,18 +236,11 @@ subroutine iterate_time() call it_read_forward_arrays() endif - ! write the seismograms with time shift (GPU_MODE transfer included) - if (nrec_local > 0 .or. ( WRITE_SEISMOGRAMS_BY_MASTER .and. myrank == 0)) then - call write_seismograms() - endif - ! calculating gravity field at current timestep if (GRAVITY_SIMULATION) call gravity_timeseries() - ! resetting d/v/a/R/eps for the backward reconstruction with attenuation - if (ATTENUATION) then - call it_store_attenuation_arrays() - endif + ! write the seismograms with time shift (GPU_MODE transfer included) + call write_seismograms() ! adjoint simulations: kernels if (SIMULATION_TYPE == 3) then @@ -184,26 +248,28 @@ subroutine iterate_time() endif ! outputs movie files - if (MOVIE_SIMULATION) then - call write_movie_output() - endif + call write_movie_output() ! first step of noise tomography, i.e., save a surface movie at every time step + ! modified from the subroutine 'write_movie_surface' if (NOISE_TOMOGRAPHY == 1) then - if (num_free_surface_faces > 0) then - call noise_save_surface_movie(displ,ibool, & - noise_surface_movie,it, & - NSPEC_AB,NGLOB_AB, & - num_free_surface_faces,free_surface_ispec,free_surface_ijk, & - Mesh_pointer,GPU_MODE) - endif + call noise_save_surface_movie(displ,ibool,noise_surface_movie,it,NSPEC_AB,NGLOB_AB, & + num_free_surface_faces,free_surface_ispec,free_surface_ijk,Mesh_pointer,GPU_MODE) endif -! -!---- end of time iteration loop -! + ! updates VTK window + if (VTK_MODE) then + call it_update_vtkwindow() + endif + + ! + !---- end of time iteration loop + ! enddo ! end of main time loop + ! close the huge file that contains a dump of all the time steps to disk + if (EXACT_UNDOING_TO_DISK) close(IFILE_FOR_EXACT_UNDOING) + call it_print_elapsed_time() ! Transfer fields from GPU card to host for further analysis @@ -214,9 +280,100 @@ subroutine iterate_time() end subroutine iterate_time +! +!------------------------------------------------------------------------------------------------- +! + + subroutine it_transfer_from_GPU() -!===================================================================== +! transfers fields on GPU back onto CPU + + use specfem_par + use specfem_par_elastic + use specfem_par_acoustic + + implicit none + + ! to store forward wave fields + if (SIMULATION_TYPE == 1 .and. SAVE_FORWARD) then + + ! acoustic potentials + if (ACOUSTIC_SIMULATION) & + call transfer_fields_ac_from_device(NGLOB_AB,potential_acoustic, & + potential_dot_acoustic, potential_dot_dot_acoustic, & + Mesh_pointer) + + ! elastic wavefield + if (ELASTIC_SIMULATION) then + call transfer_fields_el_from_device(NDIM*NGLOB_AB,displ,veloc,accel,Mesh_pointer) + + if (ATTENUATION) & + call transfer_fields_att_from_device(Mesh_pointer, & + R_xx,R_yy,R_xy,R_xz,R_yz,size(R_xx), & + epsilondev_xx,epsilondev_yy,epsilondev_xy,epsilondev_xz,epsilondev_yz, & + size(epsilondev_xx)) + + endif + else if (SIMULATION_TYPE == 3) then + + ! to store kernels + ! acoustic domains + if (ACOUSTIC_SIMULATION) then + ! only in case needed... + !call transfer_b_fields_ac_from_device(NGLOB_AB,b_potential_acoustic, & + ! b_potential_dot_acoustic, b_potential_dot_dot_acoustic, Mesh_pointer) + + ! acoustic kernels + call transfer_kernels_ac_to_host(Mesh_pointer,rho_ac_kl,kappa_ac_kl,NSPEC_AB) + endif + + ! elastic domains + if (ELASTIC_SIMULATION) then + ! only in case needed... + !call transfer_b_fields_from_device(NDIM*NGLOB_AB,b_displ,b_veloc,b_accel,Mesh_pointer) + + ! elastic kernels + call transfer_kernels_el_to_host(Mesh_pointer,rho_kl,mu_kl,kappa_kl,cijkl_kl,NSPEC_AB) + endif + + ! specific noise strength kernel + if (NOISE_TOMOGRAPHY == 3) then + call transfer_kernels_noise_to_host(Mesh_pointer,Sigma_kl,NSPEC_AB) + endif + + ! approximative hessian for preconditioning kernels + if (APPROXIMATE_HESS_KL) then + if (ELASTIC_SIMULATION) call transfer_kernels_hess_el_tohost(Mesh_pointer,hess_kl,NSPEC_AB) + if (ACOUSTIC_SIMULATION) call transfer_kernels_hess_ac_tohost(Mesh_pointer,hess_ac_kl,NSPEC_AB) + endif + + endif + + ! from here on, no gpu data is needed anymore + ! frees allocated memory on GPU + call prepare_cleanup_device(Mesh_pointer,ACOUSTIC_SIMULATION,ELASTIC_SIMULATION, & + STACEY_ABSORBING_CONDITIONS,NOISE_TOMOGRAPHY,COMPUTE_AND_STORE_STRAIN, & + ATTENUATION,ANISOTROPY,APPROXIMATE_OCEAN_LOAD, & + APPROXIMATE_HESS_KL) + + end subroutine it_transfer_from_GPU + +! +!------------------------------------------------------------------------------------------------- +! + + subroutine it_update_vtkwindow() + + implicit none + + stop 'it_update_vtkwindow() not implemented for this code yet' + + end subroutine it_update_vtkwindow + +! +!------------------------------------------------------------------------------------------------- +! subroutine it_read_forward_arrays() @@ -224,6 +381,7 @@ subroutine it_read_forward_arrays() use specfem_par_acoustic use specfem_par_elastic use specfem_par_poroelastic + implicit none integer :: ier @@ -310,254 +468,3 @@ subroutine it_read_forward_arrays() endif end subroutine it_read_forward_arrays - -!===================================================================== - - subroutine it_store_attenuation_arrays() - -! resetting d/v/a/R/eps for the backward reconstruction with attenuation - - use specfem_par - use specfem_par_elastic - use specfem_par_acoustic - - implicit none - - integer :: ier - character(len=MAX_STRING_LEN) :: outputname - - if (it > 1 .and. it < NSTEP) then - ! adjoint simulations - -! note backward/reconstructed wavefields: -! storing wavefield displ() at time step it, corresponds to time (it-1)*DT - t0 (see routine write_seismograms_to_file ) -! reconstucted wavefield b_displ() at it corresponds to time (NSTEP-it-1)*DT - t0 -! we read in the reconstructed wavefield at the end of the time iteration loop, i.e. after the Newmark scheme, -! thus, indexing is NSTEP-it (rather than something like NSTEP-(it-1) ) - - if (SIMULATION_TYPE == 3 .and. mod(NSTEP-it,NSTEP_Q_SAVE) == 0) then - ! reads files content - write(outputname,"('save_Q_arrays_',i6.6,'.bin')") NSTEP-it - open(unit=IIN,file=trim(prname_Q)//trim(outputname),status='old',& - action='read',form='unformatted',iostat=ier) - if (ier /= 0) then - print*,'error: opening save_Q_arrays' - print*,'path: ',trim(prname_Q)//trim(outputname) - call exit_mpi(myrank,'error open file save_Q_arrays_***.bin for reading') - endif - - if (ELASTIC_SIMULATION) then - ! reads arrays from disk files - read(IIN) b_displ - read(IIN) b_veloc - read(IIN) b_accel - - ! puts elastic fields onto GPU - if (GPU_MODE) then - ! wavefields - call transfer_b_fields_to_device(NDIM*NGLOB_AB,b_displ,b_veloc,b_accel, Mesh_pointer) - endif - - if (FULL_ATTENUATION_SOLID) read(IIN) b_R_trace - read(IIN) b_R_xx - read(IIN) b_R_yy - read(IIN) b_R_xy - read(IIN) b_R_xz - read(IIN) b_R_yz - if (FULL_ATTENUATION_SOLID) read(IIN) b_epsilondev_trace - read(IIN) b_epsilondev_xx - read(IIN) b_epsilondev_yy - read(IIN) b_epsilondev_xy - read(IIN) b_epsilondev_xz - read(IIN) b_epsilondev_yz - - ! puts elastic fields onto GPU - if (GPU_MODE) then - ! attenuation arrays - call transfer_b_fields_att_to_device(Mesh_pointer, & - b_R_xx,b_R_yy,b_R_xy,b_R_xz,b_R_yz,size(b_R_xx), & - b_epsilondev_xx,b_epsilondev_yy,b_epsilondev_xy,b_epsilondev_xz,b_epsilondev_yz, & - size(b_epsilondev_xx)) - endif - endif - - if (ACOUSTIC_SIMULATION) then - ! reads arrays from disk files - read(IIN) b_potential_acoustic - read(IIN) b_potential_dot_acoustic - read(IIN) b_potential_dot_dot_acoustic - - ! puts acoustic fields onto GPU - if (GPU_MODE) & - call transfer_b_fields_ac_to_device(NGLOB_AB,b_potential_acoustic, & - b_potential_dot_acoustic, b_potential_dot_dot_acoustic, Mesh_pointer) - - endif - close(IIN) - - else if (SIMULATION_TYPE == 1 .and. SAVE_FORWARD .and. mod(it,NSTEP_Q_SAVE) == 0) then - ! stores files content - write(outputname,"('save_Q_arrays_',i6.6,'.bin')") it - open(unit=IOUT,file=trim(prname_Q)//trim(outputname),status='unknown',& - action='write',form='unformatted',iostat=ier) - if (ier /= 0) then - print*,'error: opening save_Q_arrays' - print*,'path: ',trim(prname_Q)//trim(outputname) - call exit_mpi(myrank,'error open file save_Q_arrays_***.bin for writing') - endif - - if (ELASTIC_SIMULATION) then - ! gets elastic fields from GPU onto CPU - if (GPU_MODE) then - call transfer_fields_el_from_device(NDIM*NGLOB_AB,displ,veloc, accel, Mesh_pointer) - endif - - ! writes to disk file - write(IOUT) displ - write(IOUT) veloc - write(IOUT) accel - - if (GPU_MODE) then - ! attenuation arrays - call transfer_fields_att_from_device(Mesh_pointer, & - R_xx,R_yy,R_xy,R_xz,R_yz,size(R_xx), & - epsilondev_xx,epsilondev_yy,epsilondev_xy,epsilondev_xz,epsilondev_yz, & - size(epsilondev_xx)) - endif - - if (FULL_ATTENUATION_SOLID) write(IOUT) R_trace - write(IOUT) R_xx - write(IOUT) R_yy - write(IOUT) R_xy - write(IOUT) R_xz - write(IOUT) R_yz - if (FULL_ATTENUATION_SOLID) write(IOUT) epsilondev_trace - write(IOUT) epsilondev_xx - write(IOUT) epsilondev_yy - write(IOUT) epsilondev_xy - write(IOUT) epsilondev_xz - write(IOUT) epsilondev_yz - endif - - if (ACOUSTIC_SIMULATION) then - ! gets acoustic fields from GPU onto CPU - if (GPU_MODE) then - call transfer_fields_ac_from_device(NGLOB_AB,potential_acoustic, & - potential_dot_acoustic, potential_dot_dot_acoustic, Mesh_pointer) - endif - - ! writes to disk file - write(IOUT) potential_acoustic - write(IOUT) potential_dot_acoustic - write(IOUT) potential_dot_dot_acoustic - endif - close(IOUT) - - endif ! SIMULATION_TYPE - endif ! it - - end subroutine it_store_attenuation_arrays - -!===================================================================== - - subroutine it_print_elapsed_time() - - use specfem_par - use specfem_par_elastic - use specfem_par_acoustic - - implicit none - - ! local parameters - double precision :: tCPU - integer :: ihours,iminutes,iseconds,int_tCPU - - if (myrank == 0) then - ! elapsed time since beginning of the simulation - tCPU = wtime() - time_start - int_tCPU = int(tCPU) - ihours = int_tCPU / 3600 - iminutes = (int_tCPU - 3600*ihours) / 60 - iseconds = int_tCPU - 3600*ihours - 60*iminutes - write(IMAIN,*) 'Time-Loop Complete. Timing info:' - write(IMAIN,*) 'Total elapsed time in seconds = ',tCPU - write(IMAIN,"(' Total elapsed time in hh:mm:ss = ',i4,' h ',i2.2,' m ',i2.2,' s')") ihours,iminutes,iseconds - endif - - end subroutine it_print_elapsed_time - -!===================================================================== - - subroutine it_transfer_from_GPU() - -! transfers fields on GPU back onto CPU - - use specfem_par - use specfem_par_elastic - use specfem_par_acoustic - - implicit none - - ! to store forward wave fields - if (SIMULATION_TYPE == 1 .and. SAVE_FORWARD) then - - ! acoustic potentials - if (ACOUSTIC_SIMULATION) & - call transfer_fields_ac_from_device(NGLOB_AB,potential_acoustic, & - potential_dot_acoustic, potential_dot_dot_acoustic, & - Mesh_pointer) - - ! elastic wavefield - if (ELASTIC_SIMULATION) then - call transfer_fields_el_from_device(NDIM*NGLOB_AB,displ,veloc,accel,Mesh_pointer) - - if (ATTENUATION) & - call transfer_fields_att_from_device(Mesh_pointer, & - R_xx,R_yy,R_xy,R_xz,R_yz,size(R_xx), & - epsilondev_xx,epsilondev_yy,epsilondev_xy,epsilondev_xz,epsilondev_yz, & - size(epsilondev_xx)) - - endif - else if (SIMULATION_TYPE == 3) then - - ! to store kernels - ! acoustic domains - if (ACOUSTIC_SIMULATION) then - ! only in case needed... - !call transfer_b_fields_ac_from_device(NGLOB_AB,b_potential_acoustic, & - ! b_potential_dot_acoustic, b_potential_dot_dot_acoustic, Mesh_pointer) - - ! acoustic kernels - call transfer_kernels_ac_to_host(Mesh_pointer,rho_ac_kl,kappa_ac_kl,NSPEC_AB) - endif - - ! elastic domains - if (ELASTIC_SIMULATION) then - ! only in case needed... - !call transfer_b_fields_from_device(NDIM*NGLOB_AB,b_displ,b_veloc,b_accel, Mesh_pointer) - - ! elastic kernels - call transfer_kernels_el_to_host(Mesh_pointer,rho_kl,mu_kl,kappa_kl,cijkl_kl,NSPEC_AB) - endif - - ! specific noise strength kernel - if (NOISE_TOMOGRAPHY == 3) then - call transfer_kernels_noise_to_host(Mesh_pointer,Sigma_kl,NSPEC_AB) - endif - - ! approximative hessian for preconditioning kernels - if (APPROXIMATE_HESS_KL) then - if (ELASTIC_SIMULATION) call transfer_kernels_hess_el_tohost(Mesh_pointer,hess_kl,NSPEC_AB) - if (ACOUSTIC_SIMULATION) call transfer_kernels_hess_ac_tohost(Mesh_pointer,hess_ac_kl,NSPEC_AB) - endif - - endif - - ! frees allocated memory on GPU - call prepare_cleanup_device(Mesh_pointer, & - ACOUSTIC_SIMULATION,ELASTIC_SIMULATION, & - STACEY_ABSORBING_CONDITIONS,NOISE_TOMOGRAPHY,COMPUTE_AND_STORE_STRAIN, & - ATTENUATION,ANISOTROPY,APPROXIMATE_OCEAN_LOAD, & - APPROXIMATE_HESS_KL) - - end subroutine it_transfer_from_GPU diff --git a/src/specfem3D/locate_receivers.f90 b/src/specfem3D/locate_receivers.f90 index 1e892f7d9..7e721a107 100644 --- a/src/specfem3D/locate_receivers.f90 +++ b/src/specfem3D/locate_receivers.f90 @@ -187,7 +187,7 @@ subroutine locate_receivers(ibool,myrank,NSPEC_AB,NGLOB_AB,NGNOD, & ! checks if station locations already available if (SU_FORMAT) then ! checks if file with station infos located from previous run exists - inquire(file=trim(OUTPUT_FILES_PATH)//'/SU_stations_info.bin',exist=SU_station_file_exists) + inquire(file=trim(OUTPUT_FILES)//'/SU_stations_info.bin',exist=SU_station_file_exists) if (SU_station_file_exists) then ! all processes read in stations names from STATIONS file do irec=1,nrec @@ -197,7 +197,7 @@ subroutine locate_receivers(ibool,myrank,NSPEC_AB,NGLOB_AB,NGNOD, & close(IIN) ! master reads in available station information if (myrank == 0) then - open(unit=IOUT_SU,file=trim(OUTPUT_FILES_PATH)//'/SU_stations_info.bin', & + open(unit=IOUT_SU,file=trim(OUTPUT_FILES)//'/SU_stations_info.bin', & status='old',action='read',form='unformatted',iostat=ier) if (ier /= 0) call exit_mpi(myrank,'error opening file '//trim(rec_filename)) @@ -212,10 +212,10 @@ subroutine locate_receivers(ibool,myrank,NSPEC_AB,NGLOB_AB,NGNOD, & read(IOUT_SU) nu close(IOUT_SU) ! write the locations of stations, so that we can load them and write them to SU headers later - open(unit=IOUT_SU,file=trim(OUTPUT_FILES_PATH)//'/output_list_stations.txt', & + open(unit=IOUT_SU,file=trim(OUTPUT_FILES)//'/output_list_stations.txt', & status='unknown',action='write',iostat=ier) if (ier /= 0) & - call exit_mpi(myrank,'error opening file '//trim(OUTPUT_FILES_PATH)//'/output_list_stations.txt') + call exit_mpi(myrank,'error opening file '//trim(OUTPUT_FILES)//'/output_list_stations.txt') do irec=1,nrec write(IOUT_SU,*) station_name(irec),network_name(irec),x_found(irec),y_found(irec),z_found(irec) @@ -908,10 +908,10 @@ subroutine locate_receivers(ibool,myrank,NSPEC_AB,NGLOB_AB,NGNOD, & endif ! write the locations of stations, so that we can load them and write them to SU headers later - open(unit=IOUT_SU,file=trim(OUTPUT_FILES_PATH)//'/output_list_stations.txt', & + open(unit=IOUT_SU,file=trim(OUTPUT_FILES)//'/output_list_stations.txt', & status='unknown',action='write',iostat=ier) if (ier /= 0) & - call exit_mpi(myrank,'error opening file '//trim(OUTPUT_FILES_PATH)//'/output_list_stations.txt') + call exit_mpi(myrank,'error opening file '//trim(OUTPUT_FILES)//'/output_list_stations.txt') do irec=1,nrec write(IOUT_SU,*) station_name(irec),network_name(irec),x_found(irec),y_found(irec),z_found(irec) @@ -921,7 +921,7 @@ subroutine locate_receivers(ibool,myrank,NSPEC_AB,NGLOB_AB,NGNOD, & ! stores station infos for later runs if (SU_FORMAT) then - open(unit=IOUT_SU,file=trim(OUTPUT_FILES_PATH)//'/SU_stations_info.bin', & + open(unit=IOUT_SU,file=trim(OUTPUT_FILES)//'/SU_stations_info.bin', & status='unknown',action='write',form='unformatted',iostat=ier) if (ier == 0) then write(IOUT_SU) islice_selected_rec,ispec_selected_rec diff --git a/src/specfem3D/locate_source.f90 b/src/specfem3D/locate_source.f90 index 9fb8f67d2..38fab8618 100644 --- a/src/specfem3D/locate_source.f90 +++ b/src/specfem3D/locate_source.f90 @@ -807,9 +807,9 @@ subroutine locate_source(ibool,NSOURCES,myrank,NSPEC_AB,NGLOB_AB,NGNOD, & write(IMAIN,*) 'Source time function is a Heaviside, convolve later' write(IMAIN,*) endif - write(IMAIN,*) ' half duration: ',hdur(isource),' seconds' + write(IMAIN,*) ' half duration: ', hdur(isource),' seconds' - if (COUPLE_WITH_EXTERNAL_CODE) then + if (COUPLE_WITH_EXTERNAL_CODE) then !! To verify for NOBU version write(IMAIN,*) write(IMAIN,*) 'Coupling with an external code activated, thus not including any internal source' write(IMAIN,*) @@ -949,7 +949,7 @@ subroutine locate_source(ibool,NSOURCES,myrank,NSPEC_AB,NGLOB_AB,NGNOD, & call flush_IMAIN() ! output source information to a file so that we can load it and write to SU headers later - open(unit=IOUT_SU,file=trim(OUTPUT_FILES_PATH)//'/output_list_sources.txt',status='unknown') + open(unit=IOUT_SU,file=trim(OUTPUT_FILES)//'/output_list_sources.txt',status='unknown') do isource=1,NSOURCES write(IOUT_SU,*) x_found_source(isource),y_found_source(isource),z_found_source(isource) enddo diff --git a/src/specfem3D/noise_tomography.f90 b/src/specfem3D/noise_tomography.f90 index cf2a8dae2..f8472a754 100644 --- a/src/specfem3D/noise_tomography.f90 +++ b/src/specfem3D/noise_tomography.f90 @@ -272,7 +272,7 @@ subroutine read_parameters_noise(myrank,nrec,NSTEP,nmovie_points, & character(len=MAX_STRING_LEN) :: filename ! read master receiver ID -- the ID in "STATIONS" - filename = trim(OUTPUT_FILES_PATH)//'/..//NOISE_TOMOGRAPHY/irec_master_noise' + filename = trim(OUTPUT_FILES)//'/..//NOISE_TOMOGRAPHY/irec_master_noise' open(unit=IIN_NOISE,file=trim(filename),status='old',action='read',iostat=ier) if (ier /= 0) & call exit_MPI(myrank, 'file '//trim(filename)//' does NOT exist! This file contains the ID of the master receiver') @@ -289,9 +289,9 @@ subroutine read_parameters_noise(myrank,nrec,NSTEP,nmovie_points, & endif if (myrank == 0) then - open(unit=IOUT_NOISE,file=trim(OUTPUT_FILES_PATH)//'/irec_master_noise', & + open(unit=IOUT_NOISE,file=trim(OUTPUT_FILES)//'/irec_master_noise', & status='unknown',action='write',iostat=ier) - if (ier /= 0) call exit_MPI(myrank,'error opening file '//trim(OUTPUT_FILES_PATH)//'/irec_master_noise') + if (ier /= 0) call exit_MPI(myrank,'error opening file '//trim(OUTPUT_FILES)//'/irec_master_noise') write(IOUT_NOISE,*) 'The master receiver is: (RECEIVER ID)', irec_master_noise close(IOUT_NOISE) endif @@ -364,7 +364,7 @@ subroutine check_parameters_noise(myrank,NOISE_TOMOGRAPHY,SIMULATION_TYPE,SAVE_F character(len=MAX_STRING_LEN) :: outputname if (myrank == 0) then - open(unit=IOUT_NOISE,file=trim(OUTPUT_FILES_PATH)//'NOISE_SIMULATION', & + open(unit=IOUT_NOISE,file=trim(OUTPUT_FILES)//'NOISE_SIMULATION', & status='unknown',action='write') write(IOUT_NOISE,*) '*******************************************************************************' write(IOUT_NOISE,*) '*******************************************************************************' @@ -478,7 +478,7 @@ subroutine compute_arrays_source_noise(myrank, & noise_src(:) = 0._CUSTOM_REAL ! noise file (source time function) - filename = trim(OUTPUT_FILES_PATH)//'/..//NOISE_TOMOGRAPHY/S_squared' + filename = trim(OUTPUT_FILES)//'/..//NOISE_TOMOGRAPHY/S_squared' open(unit=IIN_NOISE,file=trim(filename),status='old',action='read',iostat=ier) if (ier /= 0 .and. myrank == 0) & call exit_MPI(myrank, 'file '//trim(filename)//' does NOT exist! This file should have been generated using Matlab scripts') @@ -493,7 +493,7 @@ subroutine compute_arrays_source_noise(myrank, & ! master receiver component direction, \nu_master - filename = trim(OUTPUT_FILES_PATH)//'/..//NOISE_TOMOGRAPHY/nu_master' + filename = trim(OUTPUT_FILES)//'/..//NOISE_TOMOGRAPHY/nu_master' open(unit=IIN_NOISE,file=trim(filename),status='old',action='read',iostat=ier) if (ier /= 0 .and. myrank == 0) & call exit_MPI(myrank,& @@ -508,7 +508,7 @@ subroutine compute_arrays_source_noise(myrank, & close(IIN_NOISE) if (myrank == 0) then - open(unit=IOUT_NOISE,file=trim(OUTPUT_FILES_PATH)//'nu_master',status='unknown',action='write') + open(unit=IOUT_NOISE,file=trim(OUTPUT_FILES)//'nu_master',status='unknown',action='write') write(IOUT_NOISE,*) 'The direction (ENZ) of selected component of master receiver is', nu_master close(IOUT_NOISE) endif @@ -623,6 +623,8 @@ subroutine noise_save_surface_movie(displ, & integer(kind=8) :: Mesh_pointer logical :: GPU_MODE + if (.not. (num_free_surface_faces > 0)) return + ! writes out wavefield at surface if (num_free_surface_faces > 0) then diff --git a/src/specfem3D/prepare_timerun.F90 b/src/specfem3D/prepare_timerun.F90 index 1d6067d9f..d484f6951 100644 --- a/src/specfem3D/prepare_timerun.F90 +++ b/src/specfem3D/prepare_timerun.F90 @@ -431,11 +431,14 @@ subroutine prepare_timerun_constants() if (ier /= 0) stop 'error allocating array seismograms_v' allocate(seismograms_a(NDIM,nrec_local,NSTEP),stat=ier) if (ier /= 0) stop 'error allocating array seismograms_a' + allocate(seismograms_p(NDIM,nrec_local,NSTEP),stat=ier) + if (ier /= 0) stop 'error allocating array seismograms_p' ! initialize seismograms seismograms_d(:,:,:) = 0._CUSTOM_REAL seismograms_v(:,:,:) = 0._CUSTOM_REAL seismograms_a(:,:,:) = 0._CUSTOM_REAL + seismograms_p(:,:,:) = 0._CUSTOM_REAL endif ! opens source time function file @@ -446,7 +449,7 @@ subroutine prepare_timerun_constants() else write(plot_file,"('/plot_source_time_function',i7.7,'.txt')") NSOURCES endif - open(unit=IOSTF,file=trim(OUTPUT_FILES_PATH)//plot_file,status='unknown',iostat=ier) + open(unit=IOSTF,file=trim(OUTPUT_FILES)//plot_file,status='unknown',iostat=ier) if (ier /= 0) call exit_mpi(myrank,'error opening plot_source_time_function file') endif @@ -1690,7 +1693,7 @@ subroutine compute_Roland_Sylvain_integr() ! write time stamp file to give information about progression of the calculation of gravity integrals write(outputname,"('/timestamp_gravity_calculations_ispec',i7.7,'_out_of_',i7.7)") ispec,NSPEC_AB ! timestamp file output - open(unit=IOUT,file=trim(OUTPUT_FILES_PATH)//outputname,status='unknown',action='write') + open(unit=IOUT,file=trim(OUTPUT_FILES)//outputname,status='unknown',action='write') write(IOUT,*) ispec,' elements done for gravity calculations out of ',NSPEC_AB close(unit=IOUT) endif @@ -1879,61 +1882,61 @@ subroutine compute_Roland_Sylvain_integr() write(IMAIN,*) 'computed G_yz = ',G_yz(iobs_receiver),' Eotvos' ! save the results - open(unit=IOUT,file=trim(OUTPUT_FILES_PATH)//'/results_g_x_for_GMT.txt',status='unknown',action='write') + open(unit=IOUT,file=trim(OUTPUT_FILES)//'/results_g_x_for_GMT.txt',status='unknown',action='write') do iobservation = 1,NTOTAL_OBSERVATION write(IOUT,*) g_x(iobservation) enddo close(unit=IOUT) - open(unit=IOUT,file=trim(OUTPUT_FILES_PATH)//'/results_g_y_for_GMT.txt',status='unknown',action='write') + open(unit=IOUT,file=trim(OUTPUT_FILES)//'/results_g_y_for_GMT.txt',status='unknown',action='write') do iobservation = 1,NTOTAL_OBSERVATION write(IOUT,*) g_y(iobservation) enddo close(unit=IOUT) - open(unit=IOUT,file=trim(OUTPUT_FILES_PATH)//'/results_g_z_for_GMT.txt',status='unknown',action='write') + open(unit=IOUT,file=trim(OUTPUT_FILES)//'/results_g_z_for_GMT.txt',status='unknown',action='write') do iobservation = 1,NTOTAL_OBSERVATION write(IOUT,*) g_z(iobservation) enddo close(unit=IOUT) - open(unit=IOUT,file=trim(OUTPUT_FILES_PATH)//'/results_norm_of_g_for_GMT.txt',status='unknown',action='write') + open(unit=IOUT,file=trim(OUTPUT_FILES)//'/results_norm_of_g_for_GMT.txt',status='unknown',action='write') do iobservation = 1,NTOTAL_OBSERVATION write(IOUT,*) sqrt(g_x(iobservation)**2 + g_y(iobservation)**2 + g_z(iobservation)**2) enddo close(unit=IOUT) - open(unit=IOUT,file=trim(OUTPUT_FILES_PATH)//'/results_G_xx_for_GMT.txt',status='unknown',action='write') + open(unit=IOUT,file=trim(OUTPUT_FILES)//'/results_G_xx_for_GMT.txt',status='unknown',action='write') do iobservation = 1,NTOTAL_OBSERVATION write(IOUT,*) G_xx(iobservation) enddo close(unit=IOUT) - open(unit=IOUT,file=trim(OUTPUT_FILES_PATH)//'/results_G_yy_for_GMT.txt',status='unknown',action='write') + open(unit=IOUT,file=trim(OUTPUT_FILES)//'/results_G_yy_for_GMT.txt',status='unknown',action='write') do iobservation = 1,NTOTAL_OBSERVATION write(IOUT,*) G_yy(iobservation) enddo close(unit=IOUT) - open(unit=IOUT,file=trim(OUTPUT_FILES_PATH)//'/results_G_zz_for_GMT.txt',status='unknown',action='write') + open(unit=IOUT,file=trim(OUTPUT_FILES)//'/results_G_zz_for_GMT.txt',status='unknown',action='write') do iobservation = 1,NTOTAL_OBSERVATION write(IOUT,*) G_zz(iobservation) enddo close(unit=IOUT) - open(unit=IOUT,file=trim(OUTPUT_FILES_PATH)//'/results_G_xy_for_GMT.txt',status='unknown',action='write') + open(unit=IOUT,file=trim(OUTPUT_FILES)//'/results_G_xy_for_GMT.txt',status='unknown',action='write') do iobservation = 1,NTOTAL_OBSERVATION write(IOUT,*) G_xy(iobservation) enddo close(unit=IOUT) - open(unit=IOUT,file=trim(OUTPUT_FILES_PATH)//'/results_G_xz_for_GMT.txt',status='unknown',action='write') + open(unit=IOUT,file=trim(OUTPUT_FILES)//'/results_G_xz_for_GMT.txt',status='unknown',action='write') do iobservation = 1,NTOTAL_OBSERVATION write(IOUT,*) G_xz(iobservation) enddo close(unit=IOUT) - open(unit=IOUT,file=trim(OUTPUT_FILES_PATH)//'/results_G_yz_for_GMT.txt',status='unknown',action='write') + open(unit=IOUT,file=trim(OUTPUT_FILES)//'/results_G_yz_for_GMT.txt',status='unknown',action='write') do iobservation = 1,NTOTAL_OBSERVATION write(IOUT,*) G_yz(iobservation) enddo diff --git a/src/specfem3D/read_mesh_databases.F90 b/src/specfem3D/read_mesh_databases.F90 index c6a6631f0..0eab32891 100644 --- a/src/specfem3D/read_mesh_databases.F90 +++ b/src/specfem3D/read_mesh_databases.F90 @@ -487,10 +487,15 @@ subroutine read_mesh_databases() if (COUPLE_WITH_EXTERNAL_CODE) then allocate(Veloc_dsm_boundary(3,Ntime_step_dsm,NGLLSQUARE,num_abs_boundary_faces)) allocate(Tract_dsm_boundary(3,Ntime_step_dsm,NGLLSQUARE,num_abs_boundary_faces)) - open(unit=IIN_veloc_dsm,file=dsmname(1:len_trim(dsmname))//'vel.bin',status='old', & - action='read',form='unformatted',iostat=ier) - open(unit=IIN_tract_dsm,file=dsmname(1:len_trim(dsmname))//'tract.bin',status='old', & - action='read',form='unformatted',iostat=ier) + + if (old_DSM_coupling_from_Vadim) then + open(unit=IIN_veloc_dsm,file=dsmname(1:len_trim(dsmname))//'vel.bin',status='old', & + action='read',form='unformatted',iostat=ier) + open(unit=IIN_tract_dsm,file=dsmname(1:len_trim(dsmname))//'tract.bin',status='old', & + action='read',form='unformatted',iostat=ier) + else + !! To verify for NOBU version (normally, remains empty) + endif else allocate(Veloc_dsm_boundary(1,1,1,1)) allocate(Tract_dsm_boundary(1,1,1,1)) diff --git a/src/specfem3D/read_mesh_databases_adios.F90 b/src/specfem3D/read_mesh_databases_adios.F90 index 9ebce237c..cb8ecdaaf 100644 --- a/src/specfem3D/read_mesh_databases_adios.F90 +++ b/src/specfem3D/read_mesh_databases_adios.F90 @@ -840,10 +840,16 @@ subroutine read_mesh_databases_adios() if (COUPLE_WITH_EXTERNAL_CODE) then allocate(Veloc_dsm_boundary(3,Ntime_step_dsm,NGLLSQUARE,num_abs_boundary_faces)) allocate(Tract_dsm_boundary(3,Ntime_step_dsm,NGLLSQUARE,num_abs_boundary_faces)) - open(unit=IIN_veloc_dsm,file=dsmname(1:len_trim(dsmname))//'vel.bin',status='old', & - action='read',form='unformatted',iostat=ier) - open(unit=IIN_tract_dsm,file=dsmname(1:len_trim(dsmname))//'tract.bin',status='old', & - action='read',form='unformatted',iostat=ier) + + if (old_DSM_coupling_from_Vadim) then + open(unit=IIN_veloc_dsm,file=dsmname(1:len_trim(dsmname))//'vel.bin',status='old', & + action='read',form='unformatted',iostat=ier) + open(unit=IIN_tract_dsm,file=dsmname(1:len_trim(dsmname))//'tract.bin',status='old', & + action='read',form='unformatted',iostat=ier) + else + !! To verify for NOBU version (normally, remains empty) + endif + else allocate(Veloc_dsm_boundary(1,1,1,1)) allocate(Tract_dsm_boundary(1,1,1,1)) diff --git a/src/specfem3D/rules.mk b/src/specfem3D/rules.mk index 6e5c60e89..1f56fc6fc 100644 --- a/src/specfem3D/rules.mk +++ b/src/specfem3D/rules.mk @@ -72,7 +72,7 @@ specfem3D_OBJECTS = \ $O/compute_forces_poro_fluid_part.spec.o \ $O/compute_forces_poroelastic_calling_routine.spec.o \ $O/compute_forces_poro_solid_part.spec.o \ - $O/compute_gradient.spec.o \ + $O/compute_gradient_in_acoustic.spec.o \ $O/compute_interpolated_dva.spec.o \ $O/compute_kernels.spec.o \ $O/compute_stacey_acoustic.spec.o \ @@ -116,7 +116,6 @@ specfem3D_SHARED_OBJECTS = \ $O/assemble_MPI_scalar.shared.o \ $O/check_mesh_resolution.shared.o \ $O/create_name_database.shared.o \ - $O/create_serial_name_database.shared.o \ $O/define_derivation_matrices.shared.o \ $O/detect_surface.shared.o \ $O/exit_mpi.shared.o \ @@ -139,7 +138,6 @@ specfem3D_SHARED_OBJECTS = \ $O/recompute_jacobian.shared.o \ $O/save_header_file.shared.o \ $O/sort_array_coordinates.shared.o \ - $O/unused_mod.shared_module.o \ $O/utm_geo.shared.o \ $O/write_VTK_data.shared.o \ $O/write_c_binary.cc.o \ @@ -302,7 +300,7 @@ endif ### Module dependencies ### -$O/specfem3D_par.spec.o: $O/shared_par.shared_module.o $O/unused_mod.shared_module.o +$O/specfem3D_par.spec.o: $O/shared_par.shared_module.o $O/compute_stacey_acoustic.spec.o: $O/shared_par.shared_module.o $O/compute_stacey_poroelastic.spec.o: $O/shared_par.shared_module.o $O/locate_receivers.spec.o: $O/shared_par.shared_module.o @@ -327,7 +325,7 @@ $O/compute_coupling_poroelastic_el.spec.o: $O/specfem3D_par.spec.o $O/compute_forces_poroelastic_calling_routine.spec.o: $O/specfem3D_par.spec.o $O/compute_forces_poro_fluid_part.spec.o: $O/specfem3D_par.spec.o $O/compute_forces_poro_solid_part.spec.o: $O/specfem3D_par.spec.o -$O/compute_gradient.spec.o: $O/specfem3D_par.spec.o +$O/compute_gradient_in_acoustic.spec.o: $O/specfem3D_par.spec.o $O/compute_interpolated_dva.spec.o: $O/specfem3D_par.spec.o $O/compute_kernels.spec.o: $O/specfem3D_par.spec.o $O/compute_stacey_viscoelastic.spec.o: $O/specfem3D_par.spec.o @@ -366,7 +364,7 @@ $O/compute_forces_viscoelastic_Dev.spec.o: $O/specfem3D_par.spec.o $O/pml_par.sp $O/compute_forces_viscoelastic_noDev.spec.o: $O/specfem3D_par.spec.o $O/pml_par.spec.o $O/fault_solver_dynamic.spec.o $O/compute_forces_viscoelastic_calling_routine.spec.o: $O/specfem3D_par.spec.o $O/pml_par.spec.o $O/fault_solver_dynamic.spec.o $O/fault_solver_kinematic.spec.o $O/iterate_time.spec.o: $O/specfem3D_par.spec.o $O/gravity_perturbation.spec.o -$O/prepare_timerun.spec.o: $O/specfem3D_par.spec.o $O/pml_par.spec.o $O/fault_solver_dynamic.spec.o $O/fault_solver_kinematic.spec.o $O/gravity_perturbation.spec.o $O/unused_mod.shared_module.o +$O/prepare_timerun.spec.o: $O/specfem3D_par.spec.o $O/pml_par.spec.o $O/fault_solver_dynamic.spec.o $O/fault_solver_kinematic.spec.o $O/gravity_perturbation.spec.o ## adios $O/read_forward_arrays_adios.spec_adios.o: $O/specfem3D_par.spec.o $O/pml_par.spec.o @@ -375,7 +373,7 @@ $O/initialize_simulation.spec.o: $O/specfem3D_par.spec.o $(adios_specfem3D_PREOB $O/save_kernels_adios.spec_adios.o: $O/specfem3D_par.spec.o $(adios_specfem3D_PREOBJECTS) $O/save_forward_arrays_adios.spec_adios.o: $O/specfem3D_par.spec.o $O/pml_par.spec.o $(adios_specfem3D_PREOBJECTS) $O/finalize_simulation.spec.o: $O/specfem3D_par.spec.o $O/pml_par.spec.o $O/gravity_perturbation.spec.o $(adios_specfem3D_PREOBJECTS) -$O/specfem3D_adios_stubs.spec_noadios.o: $O/specfem3D_par.spec.o $O/unused_mod.shared_module.o $O/adios_manager_stubs.shared_noadios.o +$O/specfem3D_adios_stubs.spec_noadios.o: $O/specfem3D_par.spec.o $O/adios_manager_stubs.shared_noadios.o $O/adios_helpers.shared_adios.o: \ $O/adios_helpers_definitions.shared_adios_module.o \ $O/adios_helpers_writers.shared_adios_module.o diff --git a/src/specfem3D/save_adjoint_kernels.f90 b/src/specfem3D/save_adjoint_kernels.f90 index dbfbfb572..ac1f274de 100644 --- a/src/specfem3D/save_adjoint_kernels.f90 +++ b/src/specfem3D/save_adjoint_kernels.f90 @@ -40,10 +40,10 @@ subroutine save_adjoint_kernels() - use constants, only: CUSTOM_REAL, SAVE_TRANSVERSE_KL, ANISOTROPIC_KL, & - APPROXIMATE_HESS_KL, NGLLX, NGLLY, NGLLZ - use specfem_par, only: LOCAL_PATH, myrank, sigma_kl, NSPEC_AB, & - ADIOS_FOR_KERNELS, NOISE_TOMOGRAPHY, NSPEC_ADJOINT + use constants, only: CUSTOM_REAL, NGLLX, NGLLY, NGLLZ + use specfem_par, only: LOCAL_PATH, myrank, sigma_kl, NSPEC_AB, ADIOS_FOR_KERNELS, NOISE_TOMOGRAPHY, NSPEC_ADJOINT, & + APPROXIMATE_HESS_KL, ANISOTROPIC_KL, SAVE_TRANSVERSE_KL + use specfem_par_acoustic, only: ACOUSTIC_SIMULATION use specfem_par_elastic, only: ELASTIC_SIMULATION use specfem_par_poroelastic, only: POROELASTIC_SIMULATION @@ -958,7 +958,7 @@ subroutine save_kernels_source_derivatives() ! writes out derivative kernels do irec_local = 1, nrec_local - write(outputname,'(a,i6.6)') OUTPUT_FILES_PATH(1:len_trim(OUTPUT_FILES_PATH)) // & + write(outputname,'(a,i6.6)') OUTPUT_FILES(1:len_trim(OUTPUT_FILES)) // & '/src_frechet.',number_receiver_global(irec_local) open(unit=IOUT,file=trim(outputname),status='unknown',iostat=ier) diff --git a/src/specfem3D/setup_movie_meshes.f90 b/src/specfem3D/setup_movie_meshes.f90 index 98481839d..1c122560a 100644 --- a/src/specfem3D/setup_movie_meshes.f90 +++ b/src/specfem3D/setup_movie_meshes.f90 @@ -282,7 +282,7 @@ subroutine setup_movie_meshes() ! updates number of surface elements in an include file for the movies if (nfaces_surface_glob_ext_mesh > 0) then - filename = OUTPUT_FILES_PATH(1:len_trim(OUTPUT_FILES_PATH)) // '/surface_from_mesher.h' + filename = OUTPUT_FILES(1:len_trim(OUTPUT_FILES)) // '/surface_from_mesher.h' open(unit=IOUT,file=trim(filename),status='unknown') write(IOUT,*) '!' write(IOUT,*) '! this is the parameter file for static compilation for movie creation' diff --git a/src/specfem3D/setup_sources_receivers.f90 b/src/specfem3D/setup_sources_receivers.f90 index 52e6a5a98..d8e085dc0 100644 --- a/src/specfem3D/setup_sources_receivers.f90 +++ b/src/specfem3D/setup_sources_receivers.f90 @@ -108,8 +108,12 @@ subroutine setup_sources() if (ier /= 0) stop 'error allocating arrays for force point sources' endif - ! for source encoding (acoustic sources so far only) - allocate(pm1_source_encoding(NSOURCES),stat=ier) + ! for source encoding (acoustic sources only so far) + if(USE_SOURCE_ENCODING) then + allocate(pm1_source_encoding(NSOURCES),stat=ier) + else + allocate(pm1_source_encoding(1),stat=ier) + endif if (ier /= 0) stop 'error allocating arrays for sources' ! locate sources in the mesh @@ -352,8 +356,8 @@ subroutine setup_receivers() ! reads in station file if (SIMULATION_TYPE == 1) then - rec_filename = IN_DATA_FILES_PATH(1:len_trim(IN_DATA_FILES_PATH))//'STATIONS' - filtered_rec_filename = IN_DATA_FILES_PATH(1:len_trim(IN_DATA_FILES_PATH))//'STATIONS_FILTERED' + rec_filename = IN_DATA_FILES(1:len_trim(IN_DATA_FILES))//'STATIONS' + filtered_rec_filename = IN_DATA_FILES(1:len_trim(IN_DATA_FILES))//'STATIONS_FILTERED' ! see if we are running several independent runs in parallel ! if so, add the right directory for that run (group numbers start at zero, but directory names start at run0001, thus we add one) @@ -371,8 +375,8 @@ subroutine setup_receivers() call synchronize_all() else - rec_filename = IN_DATA_FILES_PATH(1:len_trim(IN_DATA_FILES_PATH))//'STATIONS_ADJOINT' - filtered_rec_filename = IN_DATA_FILES_PATH(1:len_trim(IN_DATA_FILES_PATH))//'STATIONS_ADJOINT_FILTERED' + rec_filename = IN_DATA_FILES(1:len_trim(IN_DATA_FILES))//'STATIONS_ADJOINT' + filtered_rec_filename = IN_DATA_FILES(1:len_trim(IN_DATA_FILES))//'STATIONS_ADJOINT_FILTERED' ! see if we are running several independent runs in parallel ! if so, add the right directory for that run (group numbers start at zero, but directory names start at run0001, thus we add one) @@ -666,7 +670,7 @@ subroutine setup_sources_precompute_arrays() ! determines factor +/-1 depending on sign of moment tensor ! (see e.g. Krebs et al., 2009. Fast full-wavefield seismic inversion using encoded sources, ! Geophysics, 74 (6), WCC177-WCC188.) - pm1_source_encoding(isource) = sign(1.0d0,Mxx(isource)) + if(USE_SOURCE_ENCODING) pm1_source_encoding(isource) = sign(1.0d0,Mxx(isource)) ! source array interpolated on all element gll points (only used for non point sources) call compute_arrays_source_acoustic(sourcearray,hxis,hetas,hgammas,factor_source) @@ -711,7 +715,7 @@ subroutine setup_sources_precompute_arrays() ! checks **net**.**sta**.**BH**.adj files for correct number of time steps adj_source_file = trim(network_name(irec))//'.'//trim(station_name(irec)) do icomp = 1,NDIM - filename = OUTPUT_FILES_PATH(1:len_trim(OUTPUT_FILES_PATH))// & + filename = OUTPUT_FILES(1:len_trim(OUTPUT_FILES))// & '/../SEM/'//trim(adj_source_file) // '.'// comp(icomp) // '.adj' open(unit=IIN,file=trim(filename),status='old',action='read',iostat=ier) if (ier == 0) then @@ -769,7 +773,6 @@ subroutine setup_sources_precompute_arrays() end subroutine setup_sources_precompute_arrays - ! !------------------------------------------------------------------------------------------------- ! @@ -878,7 +881,7 @@ subroutine setup_sources_receivers_VTKfile() if (myrank == 0) then ! vtk file - open(IOVTK,file=trim(OUTPUT_FILES_PATH)//'/sr.vtk',status='unknown',iostat=ier) + open(IOVTK,file=trim(OUTPUT_FILES)//'/sr.vtk',status='unknown',iostat=ier) if (ier /= 0) stop 'error opening sr.vtk file' ! vtk header write(IOVTK,'(a)') '# vtk DataFile Version 2.0' @@ -989,8 +992,8 @@ subroutine setup_sources_receivers_VTKfile() ! creates additional receiver and source files if (SIMULATION_TYPE == 1 .or. SIMULATION_TYPE == 3) then ! extracts receiver locations - filename = trim(OUTPUT_FILES_PATH)//'/sr.vtk' - filename_new = trim(OUTPUT_FILES_PATH)//'/receiver.vtk' + filename = trim(OUTPUT_FILES)//'/sr.vtk' + filename_new = trim(OUTPUT_FILES)//'/receiver.vtk' ! vtk file for receivers only write(system_command, & @@ -998,7 +1001,7 @@ subroutine setup_sources_receivers_VTKfile() "'",'"',nrec,'"',NSOURCES,"'",trim(filename),trim(filename_new) ! extracts source locations - filename_new = trim(OUTPUT_FILES_PATH)//'/source.vtk' + filename_new = trim(OUTPUT_FILES)//'/source.vtk' write(system_command1, & "('awk ',a1,'{if (NR<5) print $0;if (NR==5)print ',a1,'POINTS',i6,' float',a1,';')") & diff --git a/src/specfem3D/specfem3D_adios_stubs.f90 b/src/specfem3D/specfem3D_adios_stubs.f90 index 0dfb0c91c..a7b895014 100644 --- a/src/specfem3D/specfem3D_adios_stubs.f90 +++ b/src/specfem3D/specfem3D_adios_stubs.f90 @@ -39,12 +39,13 @@ !------------------------------------------------' subroutine read_mesh_for_init_ADIOS(nspec, nglob) - use unused_mod use adios_manager_mod implicit none integer, intent(inout) :: nspec, nglob + integer(kind=4) :: unused_i4 + unused_i4 = nspec unused_i4 = nglob @@ -68,13 +69,16 @@ end subroutine read_mesh_databases_moho_adios !-----------------------------------------' subroutine define_kernel_adios_variables(handle, SAVE_WEIGHTS) - use unused_mod + use adios_manager_mod implicit none integer(kind=8), intent(inout) :: handle logical, intent(in) :: SAVE_WEIGHTS + integer(kind=8) :: unused_i8 + logical :: unused_l + unused_i8 = handle unused_l = SAVE_WEIGHTS @@ -82,24 +86,28 @@ subroutine define_kernel_adios_variables(handle, SAVE_WEIGHTS) end subroutine define_kernel_adios_variables subroutine perform_write_adios_kernels(handle) - use unused_mod + use adios_manager_mod implicit none integer(kind=8), intent(in) :: handle + integer(kind=8) :: unused_i8 + unused_i8 = handle call no_adios_err() end subroutine subroutine save_kernels_acoustic_adios(handle) - use unused_mod + use adios_manager_mod implicit none integer(kind=8), intent(in) :: handle + integer(kind=8) :: unused_i8 + unused_i8 = handle call no_adios_err() @@ -108,7 +116,7 @@ subroutine save_kernels_acoustic_adios(handle) subroutine save_kernels_elastic_adios(handle, alphav_kl, alphah_kl, & betav_kl, betah_kl, eta_kl, & rhop_kl, alpha_kl, beta_kl) - use unused_mod + use specfem_par use adios_manager_mod @@ -118,6 +126,9 @@ subroutine save_kernels_elastic_adios(handle, alphav_kl, alphah_kl, & alphav_kl,alphah_kl,betav_kl,betah_kl, & eta_kl, rhop_kl, alpha_kl, beta_kl + integer(kind=8) :: unused_i8 + real(kind=CUSTOM_REAL) :: unused_cr + unused_i8 = handle unused_cr = alphav_kl(1,1,1,1) unused_cr = alphah_kl(1,1,1,1) @@ -132,24 +143,28 @@ subroutine save_kernels_elastic_adios(handle, alphav_kl, alphah_kl, & end subroutine subroutine save_kernels_poroelastic_adios(handle) - use unused_mod + use adios_manager_mod implicit none integer(kind=8), intent(in) :: handle + integer(kind=8) :: unused_i8 + unused_i8 = handle call no_adios_err() end subroutine save_kernels_poroelastic_adios subroutine save_kernels_hessian_adios(handle) - use unused_mod + use adios_manager_mod implicit none integer(kind=8), intent(in) :: handle + integer(kind=8) :: unused_i8 + unused_i8 = handle call no_adios_err() diff --git a/src/specfem3D/specfem3D_par.f90 b/src/specfem3D/specfem3D_par.f90 index 96c74455c..e9fee5e11 100644 --- a/src/specfem3D/specfem3D_par.f90 +++ b/src/specfem3D/specfem3D_par.f90 @@ -129,7 +129,7 @@ module specfem_par character(len=MAX_LENGTH_NETWORK_NAME), allocatable, dimension(:) :: network_name ! seismograms - real(kind=CUSTOM_REAL), dimension(:,:,:), allocatable :: seismograms_d,seismograms_v,seismograms_a + real(kind=CUSTOM_REAL), dimension(:,:,:), allocatable :: seismograms_d,seismograms_v,seismograms_a,seismograms_p ! Gauss-Lobatto-Legendre points of integration and weights double precision, dimension(NGLLX) :: xigll,wxgll diff --git a/src/specfem3D/write_movie_output.f90 b/src/specfem3D/write_movie_output.f90 index ad06caad5..420d4ab74 100644 --- a/src/specfem3D/write_movie_output.f90 +++ b/src/specfem3D/write_movie_output.f90 @@ -33,8 +33,11 @@ subroutine write_movie_output() use specfem_par_movie use specfem_par_elastic use specfem_par_acoustic + implicit none + if (.not. MOVIE_SIMULATION) return + ! gets resulting array values onto CPU if (GPU_MODE .and. & ( & @@ -143,19 +146,19 @@ subroutine wmo_create_shakemap_em() if (ispec_is_acoustic(ispec)) then ! displacement vector - call compute_gradient(ispec,NSPEC_AB,NGLOB_AB, & + call compute_gradient_in_acoustic(ispec,NSPEC_AB,NGLOB_AB, & potential_acoustic, displ_element,& hprime_xx,hprime_yy,hprime_zz, & xix,xiy,xiz,etax,etay,etaz,gammax,gammay,gammaz, & ibool,rhostore,GRAVITY) ! velocity vector - call compute_gradient(ispec,NSPEC_AB,NGLOB_AB, & + call compute_gradient_in_acoustic(ispec,NSPEC_AB,NGLOB_AB, & potential_dot_acoustic, veloc_element,& hprime_xx,hprime_yy,hprime_zz, & xix,xiy,xiz,etax,etay,etaz,gammax,gammay,gammaz, & ibool,rhostore,GRAVITY) ! accel ? - call compute_gradient(ispec,NSPEC_AB,NGLOB_AB, & + call compute_gradient_in_acoustic(ispec,NSPEC_AB,NGLOB_AB, & potential_dot_dot_acoustic, accel_element,& hprime_xx,hprime_yy,hprime_zz, & xix,xiy,xiz,etax,etay,etaz,gammax,gammay,gammaz, & @@ -269,7 +272,7 @@ subroutine wmo_create_shakemap_em() ! creates shakemap file if (myrank == 0) then - open(unit=IOUT,file=trim(OUTPUT_FILES_PATH)//'/shakingdata',status='unknown',form='unformatted',iostat=ier) + open(unit=IOUT,file=trim(OUTPUT_FILES)//'/shakingdata',status='unknown',form='unformatted',iostat=ier) if (ier /= 0) stop 'error opening file shakingdata' write(IOUT) store_val_x_all_external_mesh ! x coordinates write(IOUT) store_val_y_all_external_mesh ! y coordinates @@ -391,14 +394,14 @@ subroutine wmo_create_movie_surface_em() if (ispec_is_acoustic(ispec)) then if (SAVE_DISPLACEMENT) then ! displacement vector - call compute_gradient(ispec,NSPEC_AB,NGLOB_AB, & + call compute_gradient_in_acoustic(ispec,NSPEC_AB,NGLOB_AB, & potential_acoustic, val_element,& hprime_xx,hprime_yy,hprime_zz, & xix,xiy,xiz,etax,etay,etaz,gammax,gammay,gammaz, & ibool,rhostore,GRAVITY) else ! velocity vector - call compute_gradient(ispec,NSPEC_AB,NGLOB_AB, & + call compute_gradient_in_acoustic(ispec,NSPEC_AB,NGLOB_AB, & potential_dot_acoustic, val_element,& hprime_xx,hprime_yy,hprime_zz, & xix,xiy,xiz,etax,etay,etaz,gammax,gammay,gammaz, & @@ -482,7 +485,7 @@ subroutine wmo_create_movie_surface_em() ! file output if (myrank == 0) then write(outputname,"('/moviedata',i6.6)") it - open(unit=IOUT,file=trim(OUTPUT_FILES_PATH)//outputname,status='unknown',form='unformatted',iostat=ier) + open(unit=IOUT,file=trim(OUTPUT_FILES)//outputname,status='unknown',form='unformatted',iostat=ier) if (ier /= 0) stop 'error opening file moviedata' write(IOUT) store_val_x_all_external_mesh ! x coordinate write(IOUT) store_val_y_all_external_mesh ! y coordinate @@ -630,14 +633,14 @@ subroutine wmo_movie_surface_output_o() if (ispec_is_acoustic(ispec)) then if (SAVE_DISPLACEMENT) then ! displacement vector - call compute_gradient(ispec,NSPEC_AB,NGLOB_AB, & + call compute_gradient_in_acoustic(ispec,NSPEC_AB,NGLOB_AB, & potential_acoustic, val_element,& hprime_xx,hprime_yy,hprime_zz, & xix,xiy,xiz,etax,etay,etaz,gammax,gammay,gammaz, & ibool,rhostore,GRAVITY) else ! velocity vector - call compute_gradient(ispec,NSPEC_AB,NGLOB_AB, & + call compute_gradient_in_acoustic(ispec,NSPEC_AB,NGLOB_AB, & potential_dot_acoustic, val_element,& hprime_xx,hprime_yy,hprime_zz, & xix,xiy,xiz,etax,etay,etaz,gammax,gammay,gammaz, & @@ -739,7 +742,7 @@ subroutine wmo_movie_surface_output_o() ! file output: note that values are only stored on free surface if (myrank == 0) then write(outputname,"('/moviedata',i6.6)") it - open(unit=IOUT,file=trim(OUTPUT_FILES_PATH)//outputname,status='unknown',form='unformatted',iostat=ier) + open(unit=IOUT,file=trim(OUTPUT_FILES)//outputname,status='unknown',form='unformatted',iostat=ier) if (ier /= 0) stop 'error opening file moviedata' write(IOUT) store_val_x_all_external_mesh ! x coordinate write(IOUT) store_val_y_all_external_mesh ! y coordinate @@ -786,19 +789,19 @@ subroutine wmo_create_shakemap_o() if (ispec_is_acoustic(ispec)) then ! displacement vector - call compute_gradient(ispec,NSPEC_AB,NGLOB_AB, & + call compute_gradient_in_acoustic(ispec,NSPEC_AB,NGLOB_AB, & potential_acoustic, displ_element,& hprime_xx,hprime_yy,hprime_zz, & xix,xiy,xiz,etax,etay,etaz,gammax,gammay,gammaz, & ibool,rhostore,GRAVITY) ! velocity vector - call compute_gradient(ispec,NSPEC_AB,NGLOB_AB, & + call compute_gradient_in_acoustic(ispec,NSPEC_AB,NGLOB_AB, & potential_dot_acoustic, veloc_element,& hprime_xx,hprime_yy,hprime_zz, & xix,xiy,xiz,etax,etay,etaz,gammax,gammay,gammaz, & ibool,rhostore,GRAVITY) ! accel ? - call compute_gradient(ispec,NSPEC_AB,NGLOB_AB, & + call compute_gradient_in_acoustic(ispec,NSPEC_AB,NGLOB_AB, & potential_dot_dot_acoustic, accel_element,& hprime_xx,hprime_yy,hprime_zz, & xix,xiy,xiz,etax,etay,etaz,gammax,gammay,gammaz, & @@ -922,7 +925,7 @@ subroutine wmo_create_shakemap_o() ! creates shakemap file: note that values are only stored on free surface if (myrank == 0) then - open(unit=IOUT,file=trim(OUTPUT_FILES_PATH)//'/shakingdata',status='unknown',form='unformatted',iostat=ier) + open(unit=IOUT,file=trim(OUTPUT_FILES)//'/shakingdata',status='unknown',form='unformatted',iostat=ier) if (ier /= 0) stop 'error opening file shakingdata' write(IOUT) store_val_x_all_external_mesh ! x coordinates write(IOUT) store_val_y_all_external_mesh ! y coordinates @@ -1033,7 +1036,7 @@ subroutine wmo_movie_volume_output() if (.not. ispec_is_acoustic(ispec)) cycle ! calculates velocity - call compute_gradient(ispec,NSPEC_AB,NGLOB_AB, & + call compute_gradient_in_acoustic(ispec,NSPEC_AB,NGLOB_AB, & potential_dot_acoustic, veloc_element,& hprime_xx,hprime_yy,hprime_zz, & xix,xiy,xiz,etax,etay,etaz,gammax,gammay,gammaz, & diff --git a/src/specfem3D/write_output_ASCII_or_binary.f90 b/src/specfem3D/write_output_ASCII_or_binary.f90 index e93c007df..fbdf51ce8 100644 --- a/src/specfem3D/write_output_ASCII_or_binary.f90 +++ b/src/specfem3D/write_output_ASCII_or_binary.f90 @@ -26,8 +26,8 @@ !===================================================================== subroutine write_output_ASCII_or_binary(one_seismogram, & - NSTEP,it,SIMULATION_TYPE,DT,t0,myrank, & - iorientation,irecord,sisname,final_LOCAL_PATH) + NSTEP,it,SIMULATION_TYPE,DT,t0, & + iorientation,sisname,final_LOCAL_PATH) ! save seismograms in text format with no subsampling. ! Because we do not subsample the output, this can result in large files @@ -47,8 +47,7 @@ subroutine write_output_ASCII_or_binary(one_seismogram, & double precision t0,DT - integer myrank - integer iorientation,irecord + integer iorientation character(len=MAX_STRING_LEN) :: sisname,final_LOCAL_PATH @@ -77,7 +76,6 @@ subroutine write_output_ASCII_or_binary(one_seismogram, & ! make sure we never write more than the maximum number of time steps ! subtract half duration of the source to make sure travel time is correct do isample = 1,min(it,NSTEP) - if (irecord == 1) then ! forward simulation if (SIMULATION_TYPE == 1) then @@ -108,9 +106,6 @@ subroutine write_output_ASCII_or_binary(one_seismogram, & write(IOUT,*) time_t,' ',one_seismogram(iorientation,isample) endif - else - call exit_MPI(myrank,'incorrect record label') - endif enddo ! binary format case diff --git a/src/specfem3D/write_output_SU.f90 b/src/specfem3D/write_output_SU.f90 index f975a7500..0397eb07b 100644 --- a/src/specfem3D/write_output_SU.f90 +++ b/src/specfem3D/write_output_SU.f90 @@ -50,7 +50,7 @@ subroutine write_output_SU() if (ier /= 0) stop 'error allocating arrays x_found y_found z_found' ! reads in station locations from output_list file - open(unit=IIN_SU1,file=trim(OUTPUT_FILES_PATH)//'/output_list_stations.txt',status='old',iostat=ier) + open(unit=IIN_SU1,file=trim(OUTPUT_FILES)//'/output_list_stations.txt',status='old',iostat=ier) if (ier /= 0) stop 'error opening output_list_stations.txt file' do irec=1,nrec @@ -59,14 +59,14 @@ subroutine write_output_SU() close(IIN_SU1) ! reads in source locations from output_list file - open(unit=IIN_SU1,file=trim(OUTPUT_FILES_PATH)//'/output_list_sources.txt',status='old',iostat=ier) + open(unit=IIN_SU1,file=trim(OUTPUT_FILES)//'/output_list_sources.txt',status='old',iostat=ier) if (ier /= 0) stop 'error opening output_list_sources.txt file' read(IIN_SU1,*) x_found_source,y_found_source,z_found_source close(IIN_SU1) ! directory to store seismograms - final_LOCAL_PATH = OUTPUT_FILES_PATH(1:len_trim(OUTPUT_FILES_PATH)) // '/' + final_LOCAL_PATH = OUTPUT_FILES(1:len_trim(OUTPUT_FILES)) // '/' write(procname,"(i4)") myrank procname = adjustl(procname) diff --git a/src/specfem3D/write_seismograms.f90 b/src/specfem3D/write_seismograms.f90 index 6441e9a00..7650d412d 100644 --- a/src/specfem3D/write_seismograms.f90 +++ b/src/specfem3D/write_seismograms.f90 @@ -33,10 +33,12 @@ subroutine write_seismograms() use specfem_par_acoustic use specfem_par_elastic use specfem_par_poroelastic + implicit none + ! local parameters - real(kind=CUSTOM_REAL),dimension(NDIM,NGLLX,NGLLY,NGLLZ):: displ_element,veloc_element - double precision :: dxd,dyd,dzd,vxd,vyd,vzd,axd,ayd,azd + real(kind=CUSTOM_REAL),dimension(NDIM,NGLLX,NGLLY,NGLLZ):: displ_element,veloc_element,accel_element + double precision :: dxd,dyd,dzd,vxd,vyd,vzd,axd,ayd,azd,pd integer :: irec_local,irec integer :: iglob,ispec,i,j,k ! adjoint locals @@ -48,6 +50,8 @@ subroutine write_seismograms() ! TODO: Test and Fix CUDA seismograms code. logical, parameter :: USE_CUDA_SEISMOGRAMS = .false. + if (.not. (nrec_local > 0 .or. (WRITE_SEISMOGRAMS_BY_MASTER .and. myrank == 0))) return + ! gets resulting array values onto CPU if (GPU_MODE) then if (nrec_local > 0) then @@ -89,6 +93,20 @@ subroutine write_seismograms() do irec_local = 1,nrec_local + dxd = ZERO + dyd = ZERO + dzd = ZERO + + vxd = ZERO + vyd = ZERO + vzd = ZERO + + axd = ZERO + ayd = ZERO + azd = ZERO + + pd = ZERO + ! gets global number of that receiver irec = number_receiver_global(irec_local) @@ -102,7 +120,7 @@ subroutine write_seismograms() select case (SIMULATION_TYPE) case (1) - ! receiver's spectral element + ! spectral element in which the receiver is located ispec = ispec_selected_rec(irec) ! elastic wave field @@ -113,31 +131,38 @@ subroutine write_seismograms() xi_receiver(irec),eta_receiver(irec),gamma_receiver(irec), & hxir,hetar,hgammar, & dxd,dyd,dzd,vxd,vyd,vzd,axd,ayd,azd) - endif !elastic + endif ! elastic ! acoustic wave field if (ispec_is_acoustic(ispec)) then ! displacement vector - call compute_gradient(ispec,NSPEC_AB,NGLOB_AB, & - potential_acoustic, displ_element,& + call compute_gradient_in_acoustic(ispec,NSPEC_AB,NGLOB_AB, & + potential_acoustic,displ_element, & hprime_xx,hprime_yy,hprime_zz, & xix,xiy,xiz,etax,etay,etaz,gammax,gammay,gammaz, & ibool,rhostore,GRAVITY) + ! velocity vector - call compute_gradient(ispec,NSPEC_AB,NGLOB_AB, & - potential_dot_acoustic, veloc_element,& + call compute_gradient_in_acoustic(ispec,NSPEC_AB,NGLOB_AB, & + potential_dot_acoustic,veloc_element, & + hprime_xx,hprime_yy,hprime_zz, & + xix,xiy,xiz,etax,etay,etaz,gammax,gammay,gammaz, & + ibool,rhostore,GRAVITY) + + ! acceleration vector + call compute_gradient_in_acoustic(ispec,NSPEC_AB,NGLOB_AB, & + potential_dot_dot_acoustic,accel_element, & hprime_xx,hprime_yy,hprime_zz, & xix,xiy,xiz,etax,etay,etaz,gammax,gammay,gammaz, & ibool,rhostore,GRAVITY) - ! interpolates displ/veloc/pressure at receiver locations - call compute_interpolated_dva_ac(displ_element,veloc_element,& - potential_dot_dot_acoustic,potential_dot_acoustic,& - potential_acoustic,NGLOB_AB, & + ! interpolates displ/veloc/accel/pressure at receiver locations + call compute_interpolated_dva_acoust(displ_element,veloc_element,accel_element, & + potential_dot_dot_acoustic,potential_acoustic,NGLOB_AB, & ispec,NSPEC_AB,ibool, & xi_receiver(irec),eta_receiver(irec),gamma_receiver(irec), & hxir,hetar,hgammar, & - dxd,dyd,dzd,vxd,vyd,vzd,axd,ayd,azd) + dxd,dyd,dzd,vxd,vyd,vzd,axd,ayd,azd,pd,USE_TRICK_FOR_BETTER_PRESSURE) endif ! acoustic ! poroelastic wave field @@ -148,9 +173,9 @@ subroutine write_seismograms() xi_receiver(irec),eta_receiver(irec),gamma_receiver(irec), & hxir,hetar,hgammar, & dxd,dyd,dzd,vxd,vyd,vzd,axd,ayd,azd) - endif !poroelastic + endif ! poroelastic - !adjoint simulations + ! adjoint simulations case (2) ! adjoint source is placed at receiver @@ -204,26 +229,33 @@ subroutine write_seismograms() ! acoustic wave field if (ispec_is_acoustic(ispec)) then ! displacement vector - call compute_gradient(ispec,NSPEC_AB,NGLOB_AB, & - potential_acoustic, displ_element,& + call compute_gradient_in_acoustic(ispec,NSPEC_AB,NGLOB_AB, & + potential_acoustic,displ_element, & hprime_xx,hprime_yy,hprime_zz, & xix,xiy,xiz,etax,etay,etaz,gammax,gammay,gammaz, & ibool,rhostore,GRAVITY) + ! velocity vector - call compute_gradient(ispec,NSPEC_AB,NGLOB_AB, & - potential_dot_acoustic, veloc_element,& + call compute_gradient_in_acoustic(ispec,NSPEC_AB,NGLOB_AB, & + potential_dot_acoustic,veloc_element, & hprime_xx,hprime_yy,hprime_zz, & xix,xiy,xiz,etax,etay,etaz,gammax,gammay,gammaz, & ibool,rhostore,GRAVITY) - ! interpolates displ/veloc/pressure at receiver locations - call compute_interpolated_dva_ac(displ_element,veloc_element,& - potential_dot_dot_acoustic,potential_dot_acoustic,& - potential_acoustic,NGLOB_AB, & + ! acceleration vector + call compute_gradient_in_acoustic(ispec,NSPEC_AB,NGLOB_AB, & + potential_dot_dot_acoustic,accel_element, & + hprime_xx,hprime_yy,hprime_zz, & + xix,xiy,xiz,etax,etay,etaz,gammax,gammay,gammaz, & + ibool,rhostore,GRAVITY) + + ! interpolates displ/veloc/accel/pressure at receiver locations + call compute_interpolated_dva_acoust(displ_element,veloc_element,accel_element, & + potential_dot_dot_acoustic,potential_acoustic,NGLOB_AB, & ispec,NSPEC_AB,ibool, & xi_receiver(irec),eta_receiver(irec),gamma_receiver(irec), & hxir,hetar,hgammar, & - dxd,dyd,dzd,vxd,vyd,vzd,axd,ayd,azd) + dxd,dyd,dzd,vxd,vyd,vzd,axd,ayd,azd,pd,USE_TRICK_FOR_BETTER_PRESSURE) endif ! acoustic ! adjoint simulations @@ -233,7 +265,7 @@ subroutine write_seismograms() ! elastic wave field if (ispec_is_elastic(ispec)) then - ! backward fields: interpolates displ/veloc/accel at receiver locations + ! backward field: interpolates displ/veloc/accel at receiver locations call compute_interpolated_dva(b_displ,b_veloc,b_accel,NGLOB_ADJOINT,& ispec,NSPEC_AB,ibool, & xi_receiver(irec),eta_receiver(irec),gamma_receiver(irec), & @@ -243,27 +275,34 @@ subroutine write_seismograms() ! acoustic wave field if (ispec_is_acoustic(ispec)) then - ! backward fields: displacement vector - call compute_gradient(ispec,NSPEC_AB,NGLOB_ADJOINT, & - b_potential_acoustic, displ_element,& + ! backward field: displacement vector + call compute_gradient_in_acoustic(ispec,NSPEC_AB,NGLOB_ADJOINT, & + b_potential_acoustic,displ_element, & + hprime_xx,hprime_yy,hprime_zz, & + xix,xiy,xiz,etax,etay,etaz,gammax,gammay,gammaz, & + ibool,rhostore,GRAVITY) + + ! backward field: velocity vector + call compute_gradient_in_acoustic(ispec,NSPEC_AB,NGLOB_ADJOINT, & + b_potential_dot_acoustic,veloc_element, & hprime_xx,hprime_yy,hprime_zz, & xix,xiy,xiz,etax,etay,etaz,gammax,gammay,gammaz, & ibool,rhostore,GRAVITY) - ! backward fields: velocity vector - call compute_gradient(ispec,NSPEC_AB,NGLOB_ADJOINT, & - b_potential_dot_acoustic, veloc_element,& + + ! backward field: acceleration vector + call compute_gradient_in_acoustic(ispec,NSPEC_AB,NGLOB_AB, & + b_potential_dot_dot_acoustic,accel_element, & hprime_xx,hprime_yy,hprime_zz, & xix,xiy,xiz,etax,etay,etaz,gammax,gammay,gammaz, & ibool,rhostore,GRAVITY) - ! backward fields: interpolates displ/veloc/pressure at receiver locations - call compute_interpolated_dva_ac(displ_element,veloc_element,& - b_potential_dot_dot_acoustic,b_potential_dot_acoustic,& - b_potential_acoustic,NGLOB_ADJOINT, & + ! backward field: interpolates displ/veloc/accel/pressure at receiver locations + call compute_interpolated_dva_acoust(displ_element,veloc_element,accel_element, & + b_potential_dot_dot_acoustic,b_potential_acoustic,NGLOB_ADJOINT, & ispec,NSPEC_AB,ibool, & xi_receiver(irec),eta_receiver(irec),gamma_receiver(irec), & hxir,hetar,hgammar, & - dxd,dyd,dzd,vxd,vyd,vzd,axd,ayd,azd) + dxd,dyd,dzd,vxd,vyd,vzd,axd,ayd,azd,pd,USE_TRICK_FOR_BETTER_PRESSURE) endif ! acoustic end select ! SIMULATION_TYPE @@ -271,13 +310,15 @@ subroutine write_seismograms() ! store North, East and Vertical components ! distinguish between single and double precision for reals if (CUSTOM_REAL == SIZE_REAL) then - seismograms_d(:,irec_local,it) = sngl((nu(:,1,irec)*dxd + nu(:,2,irec)*dyd + nu(:,3,irec)*dzd)) - seismograms_v(:,irec_local,it) = sngl((nu(:,1,irec)*vxd + nu(:,2,irec)*vyd + nu(:,3,irec)*vzd)) - seismograms_a(:,irec_local,it) = sngl((nu(:,1,irec)*axd + nu(:,2,irec)*ayd + nu(:,3,irec)*azd)) + seismograms_d(:,irec_local,it) = sngl(nu(:,1,irec)*dxd + nu(:,2,irec)*dyd + nu(:,3,irec)*dzd) + seismograms_v(:,irec_local,it) = sngl(nu(:,1,irec)*vxd + nu(:,2,irec)*vyd + nu(:,3,irec)*vzd) + seismograms_a(:,irec_local,it) = sngl(nu(:,1,irec)*axd + nu(:,2,irec)*ayd + nu(:,3,irec)*azd) + seismograms_p(1,irec_local,it) = sngl(pd) ! only one scalar in the case of pressure else - seismograms_d(:,irec_local,it) = (nu(:,1,irec)*dxd + nu(:,2,irec)*dyd + nu(:,3,irec)*dzd) - seismograms_v(:,irec_local,it) = (nu(:,1,irec)*vxd + nu(:,2,irec)*vyd + nu(:,3,irec)*vzd) - seismograms_a(:,irec_local,it) = (nu(:,1,irec)*axd + nu(:,2,irec)*ayd + nu(:,3,irec)*azd) + seismograms_d(:,irec_local,it) = nu(:,1,irec)*dxd + nu(:,2,irec)*dyd + nu(:,3,irec)*dzd + seismograms_v(:,irec_local,it) = nu(:,1,irec)*vxd + nu(:,2,irec)*vyd + nu(:,3,irec)*vzd + seismograms_a(:,irec_local,it) = nu(:,1,irec)*axd + nu(:,2,irec)*ayd + nu(:,3,irec)*azd + seismograms_p(1,irec_local,it) = pd ! only one scalar in the case of pressure endif !adjoint simulations @@ -293,6 +334,7 @@ subroutine write_seismograms() if(SAVE_SEISMOGRAMS_DISPLACEMENT) call write_seismograms_to_file(seismograms_d,1) if(SAVE_SEISMOGRAMS_VELOCITY) call write_seismograms_to_file(seismograms_v,2) if(SAVE_SEISMOGRAMS_ACCELERATION) call write_seismograms_to_file(seismograms_a,3) + if(SAVE_SEISMOGRAMS_PRESSURE) call write_seismograms_to_file(seismograms_p,4) else call write_adj_seismograms_to_file(myrank,seismograms_d,number_receiver_global, & nrec_local,it,DT,NSTEP,t0,1) @@ -328,7 +370,6 @@ subroutine write_seismograms_to_file(seismograms,istore) ! local parameters integer irec,irec_local - integer irecord character(len=1) component @@ -339,13 +380,15 @@ subroutine write_seismograms_to_file(seismograms,istore) integer,dimension(1) :: tmp_nrec_local_received,tmp_irec,tmp_nrec_local integer,dimension(:),allocatable:: islice_num_rec_local - ! saves displacement, velocity or acceleration + ! saves displacement, velocity, acceleration, or pressure if (istore == 1) then component = 'd' else if (istore == 2) then component = 'v' else if (istore == 3) then component = 'a' + else if (istore == 4) then + component = 'p' else call exit_MPI(myrank,'wrong component to save for seismograms') endif @@ -362,16 +405,13 @@ subroutine write_seismograms_to_file(seismograms,istore) ! get global number of that receiver irec = number_receiver_global(irec_local) - ! save three components of displacement vector - irecord = 1 - ! writes out this seismogram one_seismogram = seismograms(:,irec_local,:) call write_one_seismogram(one_seismogram,irec, & station_name,network_name,nrec, & DT,t0,it,NSTEP,SIMULATION_TYPE, & - myrank,irecord,component,irec_local) + myrank,component,istore,irec_local) enddo ! nrec_local @@ -395,7 +435,7 @@ subroutine write_seismograms_to_file(seismograms,istore) islice_num_rec_local(iproc) = islice_num_rec_local(iproc) + 1 enddo - ! loops on all the slices + ! loop on all the slices do iproc = 0,NPROCTOT-1 ! communicate only with processes which contain local receivers @@ -428,14 +468,11 @@ subroutine write_seismograms_to_file(seismograms,istore) total_seismos = total_seismos + 1 - ! save three components of displacement vector - irecord = 1 - ! writes out this seismogram call write_one_seismogram(one_seismogram,irec, & station_name,network_name,nrec, & DT,t0,it,NSTEP,SIMULATION_TYPE, & - myrank,irecord,component,total_seismos) + myrank,component,istore,total_seismos) enddo ! nrec_local_received endif ! if (nrec_local_received > 0) @@ -477,16 +514,16 @@ end subroutine write_seismograms_to_file subroutine write_one_seismogram(one_seismogram,irec, & station_name,network_name,nrec, & DT,t0,it,NSTEP,SIMULATION_TYPE, & - myrank,irecord,component,number_of_current_seismogram) + myrank,component,istore,number_of_current_seismogram) use constants implicit none - integer :: NSTEP,it,SIMULATION_TYPE,number_of_current_seismogram + integer, intent(in) :: NSTEP,it,SIMULATION_TYPE,number_of_current_seismogram,istore real(kind=CUSTOM_REAL), dimension(NDIM,NSTEP) :: one_seismogram - integer myrank,irecord + integer myrank double precision t0,DT integer :: nrec,irec @@ -495,8 +532,8 @@ subroutine write_one_seismogram(one_seismogram,irec, & character(len=1) component ! local parameters - integer iorientation - integer length_station_name,length_network_name + integer :: iorientation,number_of_components + integer :: length_station_name,length_network_name character(len=MAX_STRING_LEN) :: sisname,final_LOCAL_PATH character(len=3) :: channel @@ -504,11 +541,22 @@ subroutine write_one_seismogram(one_seismogram,irec, & !! DK DK to implement option SAVE_ALL_SEISMOS_IN_ONE_FILE tomorrow iorientation = number_of_current_seismogram !!!!!!!!!!! dummy statement - ! loops over each seismogram component - do iorientation = 1,NDIM + ! see how many components we need to store: 1 for pressure, NDIM for a vector + if(istore == 4) then ! this is for pressure + number_of_components = 1 + else + number_of_components = NDIM + endif + + ! loop over each seismogram component + do iorientation = 1,number_of_components ! gets channel name - call write_channel_name(iorientation,channel) + if(istore == 4) then ! this is for pressure + call write_channel_name(istore,channel) + else + call write_channel_name(iorientation,channel) + endif ! create the name of the seismogram file for each slice ! file name includes the name of the station, the network and the component @@ -527,12 +575,12 @@ subroutine write_one_seismogram(one_seismogram,irec, & station_name(irec)(1:length_station_name),channel,component ! directory to store seismograms - final_LOCAL_PATH = OUTPUT_FILES_PATH(1:len_trim(OUTPUT_FILES_PATH)) // '/' + final_LOCAL_PATH = OUTPUT_FILES(1:len_trim(OUTPUT_FILES)) // '/' ! ASCII output format call write_output_ASCII_or_binary(one_seismogram, & - NSTEP,it,SIMULATION_TYPE,DT,t0,myrank, & - iorientation,irecord,sisname,final_LOCAL_PATH) + NSTEP,it,SIMULATION_TYPE,DT,t0, & + iorientation,sisname,final_LOCAL_PATH) enddo ! do iorientation @@ -557,19 +605,21 @@ subroutine write_adj_seismograms_to_file(myrank,seismograms,number_receiver_glob ! local parameters integer :: irec,irec_local - integer :: iorientation,irecord,isample + integer :: iorientation,isample,number_of_components character(len=3) :: channel character(len=1) :: component character(len=MAX_STRING_LEN) :: sisname -! save displacement, velocity or acceleration + ! saves displacement, velocity, acceleration, or pressure if (istore == 1) then component = 'd' else if (istore == 2) then component = 'v' else if (istore == 3) then component = 'a' + else if (istore == 4) then + component = 'p' else call exit_MPI(myrank,'wrong component to save for seismograms') endif @@ -579,13 +629,22 @@ subroutine write_adj_seismograms_to_file(myrank,seismograms,number_receiver_glob ! get global number of that receiver irec = number_receiver_global(irec_local) - ! save three components of displacement vector - irecord = 1 + ! see how many components we need to store: 1 for pressure, NDIM for a vector + if(istore == 4) then ! this is for pressure + number_of_components = 1 + else + number_of_components = NDIM + endif - do iorientation = 1,NDIM + ! loop over each seismogram component + do iorientation = 1,number_of_components ! gets channel name - call write_channel_name(iorientation,channel) + if(istore == 4) then ! this is for pressure + call write_channel_name(istore,channel) + else + call write_channel_name(iorientation,channel) + endif ! create the name of the seismogram file for each slice ! file name includes the name of the station, the network and the component @@ -596,20 +655,16 @@ subroutine write_adj_seismograms_to_file(myrank,seismograms,number_receiver_glob ! if the simulation uses many time steps. However, subsampling the output ! here would result in a loss of accuracy when one later convolves ! the results with the source time function - open(unit=IOUT,file=OUTPUT_FILES_PATH(1:len_trim(OUTPUT_FILES_PATH))//sisname(1:len_trim(sisname)),status='unknown') + open(unit=IOUT,file=OUTPUT_FILES(1:len_trim(OUTPUT_FILES))//sisname(1:len_trim(sisname)),status='unknown') ! make sure we never write more than the maximum number of time steps ! subtract half duration of the source to make sure travel time is correct do isample = 1,min(it,NSTEP) - if (irecord == 1) then - ! distinguish between single and double precision for reals - if (CUSTOM_REAL == SIZE_REAL) then - write(IOUT,*) sngl(dble(isample-1)*DT - t0),' ',seismograms(iorientation,irec_local,isample) - else - write(IOUT,*) dble(isample-1)*DT - t0,' ',seismograms(iorientation,irec_local,isample) - endif + ! distinguish between single and double precision for reals + if (CUSTOM_REAL == SIZE_REAL) then + write(IOUT,*) sngl(dble(isample-1)*DT - t0),' ',seismograms(iorientation,irec_local,isample) else - call exit_MPI(myrank,'incorrect record label') + write(IOUT,*) dble(isample-1)*DT - t0,' ',seismograms(iorientation,irec_local,isample) endif enddo @@ -638,7 +693,7 @@ subroutine write_adj_seismograms2_to_file(myrank,seismograms,number_receiver_glo ! local parameters integer :: irec,irec_local - integer :: idimval,jdimval,irecord,isample + integer :: idimval,jdimval,isample character(len=4) :: chn character(len=1) :: component @@ -651,11 +706,8 @@ subroutine write_adj_seismograms2_to_file(myrank,seismograms,number_receiver_glo ! get global number of that receiver irec = number_receiver_global(irec_local) - ! save three components of displacement vector - irecord = 1 - - do idimval = 1, NDIM - do jdimval = idimval, NDIM + do idimval = 1,NDIM + do jdimval = idimval,NDIM ! strain channel name if (idimval == 1 .and. jdimval == 1) then @@ -683,20 +735,16 @@ subroutine write_adj_seismograms2_to_file(myrank,seismograms,number_receiver_glo ! if the simulation uses many time steps. However, subsampling the output ! here would result in a loss of accuracy when one later convolves ! the results with the source time function - open(unit=IOUT,file=OUTPUT_FILES_PATH(1:len_trim(OUTPUT_FILES_PATH))//sisname(1:len_trim(sisname)),status='unknown') + open(unit=IOUT,file=OUTPUT_FILES(1:len_trim(OUTPUT_FILES))//sisname(1:len_trim(sisname)),status='unknown') ! make sure we never write more than the maximum number of time steps ! subtract half duration of the source to make sure travel time is correct do isample = 1,min(it,NSTEP) - if (irecord == 1) then - ! distinguish between single and double precision for reals - if (CUSTOM_REAL == SIZE_REAL) then - write(IOUT,*) sngl(dble(isample-1)*DT - t0),' ',seismograms(jdimval,idimval,irec_local,isample) - else - write(IOUT,*) dble(isample-1)*DT - t0,' ',seismograms(jdimval,idimval,irec_local,isample) - endif + ! distinguish between single and double precision for reals + if (CUSTOM_REAL == SIZE_REAL) then + write(IOUT,*) sngl(dble(isample-1)*DT - t0),' ',seismograms(jdimval,idimval,irec_local,isample) else - call exit_MPI(myrank,'incorrect record label') + write(IOUT,*) dble(isample-1)*DT - t0,' ',seismograms(jdimval,idimval,irec_local,isample) endif enddo @@ -738,6 +786,8 @@ subroutine write_channel_name(iorientation,channel) channel = bic(1:2)//'Y' case (3) channel = bic(1:2)//'Z' + case (4) + channel = bic(1:2)//'P' ! for pressure seismograms case default call exit_mpi(0,'error channel orientation value') end select @@ -753,6 +803,8 @@ subroutine write_channel_name(iorientation,channel) channel = bic(1:2)//'N' case (3) channel = bic(1:2)//'Z' + case (4) + channel = bic(1:2)//'P' ! for pressure seismograms case default call exit_mpi(0,'error channel orientation value') end select @@ -771,7 +823,7 @@ subroutine band_instrument_code(DT,bic) ! SEM seismograms governed by their sampling rate. ! Instrument code (second letter in channel codes) is fixed to "X" which is assigned by IRIS for synthetic seismograms. ! See the manual for further explanations! - ! Ebru, November 2010 + ! Ebru Bozdag, November 2010 implicit none double precision :: DT character(len=2) :: bic @@ -792,3 +844,4 @@ subroutine band_instrument_code(DT,bic) endif end subroutine band_instrument_code + diff --git a/src/tomography/add_model_iso.f90 b/src/tomography/add_model_iso.f90 index f6f237202..279782f62 100644 --- a/src/tomography/add_model_iso.f90 +++ b/src/tomography/add_model_iso.f90 @@ -117,7 +117,7 @@ program add_model ! calculates gradient ! steepest descent method - call get_gradient_steepest_iso() + call get_sd_direction_iso() ! computes new model values for alpha, beta and rho ! and stores new model files @@ -209,16 +209,16 @@ subroutine initialize() implicit none + logical :: BROADCAST_AFTER_READ + ! initialize the MPI communicator and start the NPROCTOT MPI processes call init_mpi() call world_size(sizeprocs) call world_rank(myrank) ! reads the parameter file - call read_parameter_file() - - ! reads ADIOS flags - call read_adios_parameters() + BROADCAST_AFTER_READ = .true. + call read_parameter_file(myrank,BROADCAST_AFTER_READ) if (ADIOS_ENABLED) stop 'Flag ADIOS_ENABLED not supported yet for xadd_model, please rerun program...' diff --git a/src/tomography/get_gradient_cg.f90 b/src/tomography/get_cg_direction.f90 similarity index 97% rename from src/tomography/get_gradient_cg.f90 rename to src/tomography/get_cg_direction.f90 index 55f3725e7..ee1937d29 100644 --- a/src/tomography/get_gradient_cg.f90 +++ b/src/tomography/get_cg_direction.f90 @@ -26,7 +26,7 @@ !===================================================================== -subroutine get_gradient_cg_tiso() +subroutine get_cg_direction_tiso() ! calculates TI gradient based on a conjugate gradient method ! @@ -59,7 +59,7 @@ subroutine get_gradient_cg_tiso() integer :: iglob integer :: i,j,k,ispec,ier - ! allocate arrays for storing gradients + ! allocate arrays for storing gradient ! transversely isotropic arrays allocate(model_dbulk(NGLLX,NGLLY,NGLLZ,NSPEC), & model_dbetav(NGLLX,NGLLY,NGLLZ,NSPEC), & @@ -92,7 +92,7 @@ subroutine get_gradient_cg_tiso() norm_eta_old = norm_eta_sum if (myrank == 0) then - print*,'norm squared old gradients:' + print*,'norm squared old gradient:' print*,' bulk : ',norm_bulk_old print*,' betav: ',norm_betav_old print*,' betah: ',norm_betah_old @@ -106,7 +106,7 @@ subroutine get_gradient_cg_tiso() if (norm_eta_old < 1.e-22) call exit_mpi(myrank,'norm old gradient eta is zero') endif - ! Powell, 1977: checks orthogonality between old and new gradients + ! Powell, 1977: checks orthogonality between old and new gradient ! gets length of ( gamma_(n-1)^T * gamma_n ) norm_bulk = sum( kernel_bulk_old * kernel_bulk ) norm_betav = sum( kernel_betav_old * kernel_betav ) @@ -145,7 +145,7 @@ subroutine get_gradient_cg_tiso() endif - ! difference kernel/gradients + ! difference kernel/gradient ! length ( ( gamma_n - gamma_(n-1))^T * lambda_n ) norm_bulk = sum( (kernel_bulk - kernel_bulk_old) * kernel_bulk ) norm_betav = sum( (kernel_betav - kernel_betav_old) * kernel_betav ) @@ -165,7 +165,7 @@ subroutine get_gradient_cg_tiso() norm_eta = norm_eta_sum if (myrank == 0) then - print*,'norm squared difference gradients:' + print*,'norm squared difference gradient:' print*,' bulk : ',norm_bulk print*,' betav: ',norm_betav print*,' betah: ',norm_betah @@ -215,7 +215,7 @@ subroutine get_gradient_cg_tiso() alpha_eta = alpha_all endif ! user output - print*,'alpha gradients:' + print*,'alpha gradient:' print*,' bulk : ',alpha_bulk print*,' betav: ',alpha_betav print*,' betah: ',alpha_betah @@ -286,7 +286,7 @@ subroutine get_gradient_cg_tiso() enddo enddo else - ! uses only old kernel/gradients + ! uses only old kernel/gradient do ispec = 1, NSPEC do k = 1, NGLLZ do j = 1, NGLLY @@ -341,8 +341,8 @@ subroutine get_gradient_cg_tiso() endif ! stores model_dbulk, ... arrays - ! note: stores these new gradients before we scale them with the step length - call write_gradients_tiso() + ! note: stores these new gradient before we scale them with the step length + call write_gradient_tiso() ! statistics call min_all_cr(minval(model_dbulk),min_bulk) @@ -466,7 +466,7 @@ subroutine get_gradient_cg_tiso() call max_all_cr(maxval(model_deta),max_eta) if (myrank == 0) then - print*,'scaled gradients:' + print*,'scaled gradient:' print*,' bulk min/max : ',min_bulk,max_bulk print*,' betav min/max: ',min_vsv,max_vsv print*,' betah min/max: ',min_vsh,max_vsh @@ -475,5 +475,5 @@ subroutine get_gradient_cg_tiso() endif call synchronize_all() -end subroutine get_gradient_cg_tiso +end subroutine get_cg_direction_tiso diff --git a/src/tomography/get_gradient_steepest.f90 b/src/tomography/get_sd_direction.f90 similarity index 96% rename from src/tomography/get_gradient_steepest.f90 rename to src/tomography/get_sd_direction.f90 index 0949e53f4..69dfe5913 100644 --- a/src/tomography/get_gradient_steepest.f90 +++ b/src/tomography/get_sd_direction.f90 @@ -26,7 +26,7 @@ !===================================================================== -subroutine get_gradient_steepest_iso() +subroutine get_sd_direction_iso() ! calculates gradient by steepest descent method @@ -43,7 +43,7 @@ subroutine get_gradient_steepest_iso() integer :: iglob integer :: i,j,k,ispec,ier - ! allocate arrays for storing gradients + ! allocate arrays for storing gradient ! isotropic arrays allocate(model_dbulk(NGLLX,NGLLY,NGLLZ,NSPEC), & model_dbeta(NGLLX,NGLLY,NGLLZ,NSPEC), & @@ -96,7 +96,7 @@ subroutine get_gradient_steepest_iso() enddo ! stores model_dbulk, ... arrays - call write_gradients_iso() + call write_gradient_iso() ! statistics call min_all_cr(minval(model_dbulk),min_bulk) @@ -109,7 +109,7 @@ subroutine get_gradient_steepest_iso() call max_all_cr(maxval(model_drho),max_rho) if (myrank == 0) then - print*,'initial gradients:' + print*,'initial gradient:' print*,' a min/max : ',min_bulk,max_bulk print*,' beta min/max: ',min_beta,max_beta print*,' rho min/max : ',min_rho,max_rho @@ -118,7 +118,7 @@ subroutine get_gradient_steepest_iso() ! statistics output if (PRINT_STATISTICS_FILES .and. myrank == 0) then - open(IOUT,file=trim(OUTPUT_STATISTICS_DIR)//'statistics_gradients_minmax',status='unknown') + open(IOUT,file=trim(OUTPUT_STATISTICS_DIR)//'statistics_gradient_minmax',status='unknown') write(IOUT,*) '#min_beta #max_beta #min_bulk #max_bulk #min_rho #max_rho' write(IOUT,'(6e24.12)') min_beta, max_beta, min_bulk, max_bulk, min_rho, max_rho close(IOUT) @@ -211,7 +211,7 @@ subroutine get_gradient_steepest_iso() call max_all_cr(maxval(model_drho),max_rho) if (myrank == 0) then - print*,'scaled gradients:' + print*,'scaled gradient:' print*,' a min/max : ',min_bulk,max_bulk print*,' beta min/max: ',min_beta,max_beta print*,' rho min/max : ',min_rho,max_rho @@ -221,20 +221,20 @@ subroutine get_gradient_steepest_iso() ! statistics output if (PRINT_STATISTICS_FILES .and. myrank == 0) then - open(IOUT,file=trim(OUTPUT_STATISTICS_DIR)//'statistics_scaled_gradients',status='unknown') + open(IOUT,file=trim(OUTPUT_STATISTICS_DIR)//'statistics_scaled_gradient',status='unknown') write(IOUT,*) '#min_beta #max_beta #min_bulk #max_bulk #min_rho #max_rho' write(IOUT,'(6e24.12)') min_beta,max_beta,min_bulk,max_bulk,min_rho,max_rho close(IOUT) endif -end subroutine get_gradient_steepest_iso +end subroutine get_sd_direction_iso ! !------------------------------------------------------------------------------------------------- ! -subroutine get_gradient_steepest_tiso() +subroutine get_sd_direction_tiso() ! calculates gradient by steepest descent method @@ -252,7 +252,7 @@ subroutine get_gradient_steepest_tiso() integer :: iglob integer :: i,j,k,ispec,ier - ! allocate arrays for storing gradients + ! allocate arrays for storing gradient ! transversely isotropic arrays allocate(model_dbulk(NGLLX,NGLLY,NGLLZ,NSPEC), & model_dbetav(NGLLX,NGLLY,NGLLZ,NSPEC), & @@ -308,7 +308,7 @@ subroutine get_gradient_steepest_tiso() enddo ! stores model_dbulk, ... arrays - call write_gradients_tiso() + call write_gradient_tiso() ! statistics call min_all_cr(minval(model_dbulk),min_bulk) @@ -324,7 +324,7 @@ subroutine get_gradient_steepest_tiso() call max_all_cr(maxval(model_deta),max_eta) if (myrank == 0) then - print*,'initial gradients:' + print*,'initial gradient:' print*,' bulk min/max : ',min_bulk,max_bulk print*,' betav min/max: ',min_vsv,max_vsv print*,' betah min/max: ',min_vsh,max_vsh @@ -422,7 +422,7 @@ subroutine get_gradient_steepest_tiso() call max_all_cr(maxval(model_deta),max_eta) if (myrank == 0) then - print*,'scaled gradients:' + print*,'scaled gradient:' print*,' bulk min/max : ',min_bulk,max_bulk print*,' betav min/max: ',min_vsv,max_vsv print*,' betah min/max: ',min_vsh,max_vsh @@ -431,5 +431,5 @@ subroutine get_gradient_steepest_tiso() endif call synchronize_all() -end subroutine get_gradient_steepest_tiso +end subroutine get_sd_direction_tiso diff --git a/src/tomography/model_update.f90 b/src/tomography/model_update.f90 index ab297c507..af2a48327 100644 --- a/src/tomography/model_update.f90 +++ b/src/tomography/model_update.f90 @@ -28,7 +28,7 @@ program model_update use specfem_par,only: kappastore,mustore !,ibool - use specfem_par,only: NPROC,OUTPUT_FILES_PATH,LOCAL_PATH + use specfem_par,only: NPROC,OUTPUT_FILES,LOCAL_PATH use specfem_par_elastic,only: rho_vp,rho_vs use tomography_model_iso @@ -89,26 +89,26 @@ program model_update ! default input/output directories ! directory where the summed and smoothed input kernels are linked - if (OUTPUT_FILES_PATH(len_trim(OUTPUT_FILES_PATH):len_trim(OUTPUT_FILES_PATH)) /= '/') then - INPUT_KERNELS_DIR = trim(OUTPUT_FILES_PATH)//'/'//trim(INPUT_KERNELS_DIR_NAME) + if (OUTPUT_FILES(len_trim(OUTPUT_FILES):len_trim(OUTPUT_FILES)) /= '/') then + INPUT_KERNELS_DIR = trim(OUTPUT_FILES)//'/'//trim(INPUT_KERNELS_DIR_NAME) else - INPUT_KERNELS_DIR = trim(OUTPUT_FILES_PATH)//trim(INPUT_KERNELS_DIR_NAME) + INPUT_KERNELS_DIR = trim(OUTPUT_FILES)//trim(INPUT_KERNELS_DIR_NAME) endif ! directory where the mesh files for the NEW model will be written - if (OUTPUT_FILES_PATH(len_trim(OUTPUT_FILES_PATH):len_trim(OUTPUT_FILES_PATH)) /= '/') then - OUTPUT_MODEL_DIR = trim(OUTPUT_FILES_PATH)//'/'//trim(LOCAL_PATH_NEW_NAME) + if (OUTPUT_FILES(len_trim(OUTPUT_FILES):len_trim(OUTPUT_FILES)) /= '/') then + OUTPUT_MODEL_DIR = trim(OUTPUT_FILES)//'/'//trim(LOCAL_PATH_NEW_NAME) else - OUTPUT_MODEL_DIR = trim(OUTPUT_FILES_PATH)//trim(LOCAL_PATH_NEW_NAME) + OUTPUT_MODEL_DIR = trim(OUTPUT_FILES)//trim(LOCAL_PATH_NEW_NAME) endif ! directory where the output files of model_update will be written PRINT_STATISTICS_FILES = .true. - if (OUTPUT_FILES_PATH(len_trim(OUTPUT_FILES_PATH):len_trim(OUTPUT_FILES_PATH)) /= '/') then - OUTPUT_STATISTICS_DIR = trim(OUTPUT_FILES_PATH)//'/'//trim(OUTPUT_STATISTICS_DIR_NAME) + if (OUTPUT_FILES(len_trim(OUTPUT_FILES):len_trim(OUTPUT_FILES)) /= '/') then + OUTPUT_STATISTICS_DIR = trim(OUTPUT_FILES)//'/'//trim(OUTPUT_STATISTICS_DIR_NAME) else - OUTPUT_STATISTICS_DIR = trim(OUTPUT_FILES_PATH)//trim(OUTPUT_STATISTICS_DIR_NAME) + OUTPUT_STATISTICS_DIR = trim(OUTPUT_FILES)//trim(OUTPUT_STATISTICS_DIR_NAME) endif ! reads in parameters needed @@ -320,9 +320,9 @@ program model_update call read_kernels_iso() !--------------------------------------------------------------------------------------------- - ! calculates gradient + ! computes search direction !--------------------------------------------------------------------------------------------- - call get_gradient_steepest_iso() + call get_sd_direction_iso() !--------------------------------------------------------------------------------------------- ! new model @@ -461,7 +461,7 @@ program model_update ! call write_new_model_iso() -! vtk file output +! VTK file output ! ! vs model ! fname = 'vs_new' ! write(m_file,'(a,i6.6,a)') trim(OUTPUT_MODEL_DIR)//'/proc',myrank,trim(REG)//trim(fname) @@ -569,16 +569,16 @@ subroutine initialize() implicit none + logical :: BROADCAST_AFTER_READ + ! initialize the MPI communicator and start the NPROCTOT MPI processes call init_mpi() call world_size(sizeprocs) call world_rank(myrank) ! reads the parameter file - call read_parameter_file() - - ! reads ADIOS flags - call read_adios_parameters() + BROADCAST_AFTER_READ = .true. + call read_parameter_file(myrank,BROADCAST_AFTER_READ) if (ADIOS_ENABLED) stop 'Flag ADIOS_ENABLED set to .true. not supported yet for xmodel_update, please rerun program...' diff --git a/src/tomography/read_kernels_cg.f90 b/src/tomography/read_kernels_cg.f90 index 22f212ca5..94e3f1d97 100644 --- a/src/tomography/read_kernels_cg.f90 +++ b/src/tomography/read_kernels_cg.f90 @@ -181,13 +181,13 @@ subroutine read_kernels_cg_tiso_old() call exit_mpi(myrank,'flags old model not consistent') endif - ! reads in old gradients + ! reads in old gradient if (USE_OLD_GRADIENT) then ! user output - if (myrank == 0) print*,'reading old gradients...' + if (myrank == 0) print*,'reading old gradient...' - ! allocate arrays for storing old gradients + ! allocate arrays for storing old gradient ! transversely isotropic arrays allocate(model_dbulk_old(NGLLX,NGLLY,NGLLZ,NSPEC), & model_dbetav_old(NGLLX,NGLLY,NGLLZ,NSPEC), & diff --git a/src/tomography/rules.mk b/src/tomography/rules.mk index 2db8d0593..907bb1ed8 100644 --- a/src/tomography/rules.mk +++ b/src/tomography/rules.mk @@ -34,7 +34,6 @@ $(tomography_OBJECTS): S := ${S_TOP}/src/tomography tomography_TARGETS = \ $E/xadd_model_iso \ $E/xmodel_update \ - $E/xsmooth_sem \ $E/xsum_kernels \ $E/xsum_preconditioned_kernels \ $(EMPTY_MACRO) @@ -42,7 +41,6 @@ tomography_TARGETS = \ tomography_OBJECTS = \ $(xadd_model_iso_OBJECTS) \ $(xmodel_update_OBJECTS) \ - $(xsmooth_sem_OBJECTS) \ $(xsum_kernels_OBJECTS) \ $(xsum_preconditioned_kernels_OBJECTS) \ $(EMPTY_MACRO) @@ -51,7 +49,6 @@ tomography_OBJECTS = \ tomography_SHARED_OBJECTS = \ $(xadd_model_SHARED_OBJECTS) \ $(xmodel_update_SHARED_OBJECTS) \ - $(xsmooth_sem_SHARED_OBJECTS) \ $(xsum_kernels_SHARED_OBJECTS) \ $(xsum_preconditioned_kernels_SHARED_OBJECTS) \ $(EMPTY_MACRO) @@ -77,16 +74,14 @@ tomo: $(tomography_TARGETS) tomography: $(tomography_TARGETS) -## single targets + +### single targets add_model_iso: xadd_model_iso xadd_model_iso: $E/xadd_model_iso model_update: xmodel_update xmodel_update: $E/xmodel_update -smooth_sem: xsmooth_sem -xsmooth_sem: $E/xsmooth_sem - sum_kernels: xsum_kernels xsum_kernels: $E/xsum_kernels @@ -94,6 +89,7 @@ sum_preconditioned_kernels: xsum_preconditioned_kernels xsum_preconditioned_kernels: $E/xsum_preconditioned_kernels + ####################################### #### @@ -108,13 +104,13 @@ xsum_preconditioned_kernels: $E/xsum_preconditioned_kernels xadd_model_OBJECTS = \ $O/tomography_par.tomo_module.o \ $O/compute_kernel_integral.tomo.o \ - $O/get_gradient_cg.tomo.o \ - $O/get_gradient_steepest.tomo.o \ + $O/get_cg_direction.tomo.o \ + $O/get_sd_direction.tomo.o \ $O/read_kernels.tomo.o \ $O/read_kernels_cg.tomo.o \ $O/read_model.tomo.o \ $O/read_parameters_tomo.tomo.o \ - $O/write_gradients.tomo.o \ + $O/write_gradient.tomo.o \ $O/write_new_model.tomo.o \ $O/write_new_model_perturbations.tomo.o \ $(EMPTY_MACRO) @@ -130,7 +126,6 @@ xadd_model_SHARED_OBJECTS = \ $O/param_reader.cc.o \ $O/read_parameter_file.shared.o \ $O/read_value_parameters.shared.o \ - $O/unused_mod.shared_module.o \ $(EMPTY_MACRO) ## @@ -153,12 +148,12 @@ ${E}/xadd_model_iso: $(xadd_model_iso_OBJECTS) $(xadd_model_SHARED_OBJECTS) $(CO ## xmodel_update_OBJECTS = \ $O/tomography_par.tomo_module.o \ - $O/get_gradient_steepest.tomo.o \ + $O/get_sd_direction.tomo.o \ $O/model_update.tomo.o \ $O/read_kernels.tomo.o \ $O/read_parameters_tomo.tomo.o \ $O/save_external_bin_m_up.tomo.o \ - $O/write_gradients.tomo.o \ + $O/write_gradient.tomo.o \ $O/write_new_model.tomo.o \ $O/write_new_model_perturbations.tomo.o \ $(EMPTY_MACRO) @@ -177,7 +172,6 @@ xmodel_update_SHARED_OBJECTS = \ $O/param_reader.cc.o \ $O/read_parameter_file.shared.o \ $O/read_value_parameters.shared.o \ - $O/unused_mod.shared_module.o \ $O/write_VTK_data.shared.o \ $(EMPTY_MACRO) @@ -219,37 +213,6 @@ ${E}/xmodel_update: $(xmodel_update_OBJECTS) $(xmodel_update_SHARED_OBJECTS) $(C ${FCLINK} -o $@ $+ $(MPILIBS) -## -## xsmooth_sem -## -xsmooth_sem_OBJECTS = \ - $O/tomography_par.tomo_module.o \ - $O/smooth_sem.tomo.o \ - $(EMPTY_MACRO) - -xsmooth_sem_SHARED_OBJECTS = \ - $O/specfem3D_par.spec.o \ - $O/pml_par.spec.o \ - $O/read_mesh_databases.spec.o \ - $O/shared_par.shared_module.o \ - $O/check_mesh_resolution.shared.o \ - $O/create_name_database.shared.o \ - $O/exit_mpi.shared.o \ - $O/gll_library.shared.o \ - $O/param_reader.cc.o \ - $O/read_parameter_file.shared.o \ - $O/read_value_parameters.shared.o \ - $O/unused_mod.shared_module.o \ - $O/write_VTK_data.shared.o \ - $(EMPTY_MACRO) - -# extra dependencies -$O/smooth_sem.tomo.o: $O/specfem3D_par.spec.o $O/tomography_par.tomo_module.o - -${E}/xsmooth_sem: $(xsmooth_sem_OBJECTS) $(xsmooth_sem_SHARED_OBJECTS) $(COND_MPI_OBJECTS) - ${FCLINK} -o $@ $+ $(MPILIBS) - - ## ## xsum_kernels ## @@ -263,7 +226,6 @@ xsum_kernels_SHARED_OBJECTS = \ $O/param_reader.cc.o \ $O/read_parameter_file.shared.o \ $O/read_value_parameters.shared.o \ - $O/unused_mod.shared_module.o \ $(EMPTY_MACRO) ${E}/xsum_kernels: $(xsum_kernels_OBJECTS) $(xsum_kernels_SHARED_OBJECTS) $(COND_MPI_OBJECTS) diff --git a/src/tomography/sum_kernels.f90 b/src/tomography/sum_kernels.f90 index f15f12911..b06e1a427 100644 --- a/src/tomography/sum_kernels.f90 +++ b/src/tomography/sum_kernels.f90 @@ -44,6 +44,11 @@ ! ! output directory: OUTPUT_SUM/ ! the resulting kernel files will be stored in this directory +! +! +! DEPRECATION WARNING: Eventually, all of the following routines, or at lesast +! some the subroutines, will be merged with src/tomography/xcombine_sem +! program sum_kernels @@ -62,7 +67,10 @@ program sum_kernels integer :: nker integer :: ier + logical :: BROADCAST_AFTER_READ + ! ============ program starts here ===================== + ! initialize the MPI communicator and start the NPROCTOT MPI processes call init_mpi() call world_size(sizeprocs) @@ -96,7 +104,8 @@ program sum_kernels endif ! needs local_path for mesh files - call read_parameter_file() + BROADCAST_AFTER_READ = .true. + call read_parameter_file(myrank,BROADCAST_AFTER_READ) ! checks if number of MPI process as specified if (sizeprocs /= NPROC) then @@ -300,3 +309,4 @@ subroutine sum_kernel(kernel_name,kernel_list,nker) end subroutine sum_kernel + diff --git a/src/tomography/sum_preconditioned_kernels.f90 b/src/tomography/sum_preconditioned_kernels.f90 index 274d33fe3..42974f69b 100644 --- a/src/tomography/sum_preconditioned_kernels.f90 +++ b/src/tomography/sum_preconditioned_kernels.f90 @@ -66,7 +66,10 @@ program sum_preconditioned_kernels integer :: nker integer :: ier + logical :: BROADCAST_AFTER_READ + ! ============ program starts here ===================== + ! initialize the MPI communicator and start the NPROCTOT MPI processes call init_mpi() call world_size(sizeprocs) @@ -100,7 +103,8 @@ program sum_preconditioned_kernels endif ! needs local_path for mesh files - call read_parameter_file() + BROADCAST_AFTER_READ = .true. + call read_parameter_file(myrank,BROADCAST_AFTER_READ) ! checks if number of MPI process as specified if (sizeprocs /= NPROC) then diff --git a/src/tomography/write_gradients.f90 b/src/tomography/write_gradient.f90 similarity index 94% rename from src/tomography/write_gradients.f90 rename to src/tomography/write_gradient.f90 index 6fc64b9e7..f30f871b5 100644 --- a/src/tomography/write_gradients.f90 +++ b/src/tomography/write_gradient.f90 @@ -26,7 +26,7 @@ !===================================================================== -subroutine write_gradients_iso() +subroutine write_gradient_iso() ! file output for new model @@ -35,7 +35,7 @@ subroutine write_gradients_iso() character(len=MAX_STRING_LEN) :: m_file, fname ! user output - if (myrank == 0) print*,'writing out gradients...' + if (myrank == 0) print*,'writing out gradient...' ! kernel updates fname = 'dbulk' @@ -64,13 +64,13 @@ subroutine write_gradients_iso() if (myrank == 0) print* -end subroutine write_gradients_iso +end subroutine write_gradient_iso ! !------------------------------------------------------------------------------------------------- ! -subroutine write_gradients_tiso() +subroutine write_gradient_tiso() ! file output for new model @@ -80,7 +80,7 @@ subroutine write_gradients_tiso() character(len=MAX_STRING_LEN) :: m_file, fname ! user output - if (myrank == 0) print*,'writing out gradients...' + if (myrank == 0) print*,'writing out gradient...' ! kernel updates fname = 'dbulk_c' @@ -117,6 +117,6 @@ subroutine write_gradients_tiso() if (myrank == 0) print* -end subroutine write_gradients_tiso +end subroutine write_gradient_tiso diff --git a/tests/auxiliaries/0.compile.default_make.sh b/tests/auxiliaries/0.compile.default_make.sh index 5655becaf..76f038b11 100755 --- a/tests/auxiliaries/0.compile.default_make.sh +++ b/tests/auxiliaries/0.compile.default_make.sh @@ -52,7 +52,7 @@ done echo "" >> $testdir/results.log #cleanup -rm -rf ./bin/* +rm -rf ./bin/* echo "successful compilation" >> $testdir/results.log diff --git a/tests/compilations/2.configure.main_binaries_available.sh b/tests/compilations/2.configure.main_binaries_available.sh index c85f736e4..67936b8ff 100755 --- a/tests/compilations/2.configure.main_binaries_available.sh +++ b/tests/compilations/2.configure.main_binaries_available.sh @@ -34,7 +34,7 @@ do #make -j 4 $var >> $testdir/results.log 2>&1 # check - if [ ! -e bin/$var ]; then + if [ ! -e bin/$var ]; then echo "compilation of $var failed, please check..." >> $testdir/results.log exit 1 else diff --git a/tests/compilations/3.configure.supplement_binaries_available.sh b/tests/compilations/3.configure.supplement_binaries_available.sh index 00ad5aee3..dc3434d61 100755 --- a/tests/compilations/3.configure.supplement_binaries_available.sh +++ b/tests/compilations/3.configure.supplement_binaries_available.sh @@ -27,7 +27,6 @@ exec=( xcombine_surf_data \ xconvert_skewness_to_angle \ xmultiply_CUBIT_Abaqus_mesh_by_1000 \ xmodel_update \ - xsmooth_sem \ xsum_kernels \ xsum_preconditioned_kernels \ ) @@ -41,7 +40,7 @@ do echo "" >> $testdir/results.log # check - if [ ! -e bin/$var ]; then + if [ ! -e bin/$var ]; then echo "compilation of $var failed, please check..." >> $testdir/results.log exit 1 else diff --git a/tests/decompose_mesh/0.compile.default_make.sh b/tests/decompose_mesh/0.compile.default_make.sh index 9b12eb3e1..ea0f0618e 100755 --- a/tests/decompose_mesh/0.compile.default_make.sh +++ b/tests/decompose_mesh/0.compile.default_make.sh @@ -44,7 +44,7 @@ fi echo "" >> $testdir/results.log #cleanup -rm -rf ./bin/* +rm -rf ./bin/* echo "successful compilation" >> $testdir/results.log diff --git a/tests/decompose_mesh/test_partitioning.f90 b/tests/decompose_mesh/test_partitioning.f90 index 689ef1181..34653298b 100644 --- a/tests/decompose_mesh/test_partitioning.f90 +++ b/tests/decompose_mesh/test_partitioning.f90 @@ -1,3 +1,7 @@ + +!! DK DK put this because I do not know how to fix the rules.mk dependencies + include "../../src/shared/serial.f90" + program test_partitioning use decompose_mesh diff --git a/tests/decompose_mesh/test_read.f90 b/tests/decompose_mesh/test_read.f90 index 68b38e13f..d93c6fdac 100644 --- a/tests/decompose_mesh/test_read.f90 +++ b/tests/decompose_mesh/test_read.f90 @@ -1,3 +1,7 @@ + +!! DK DK put this because I do not know how to fix the rules.mk dependencies + include "../../src/shared/serial.f90" + program test_read use decompose_mesh @@ -12,8 +16,13 @@ program test_read double precision,parameter :: PAR_FILE_DT = 0.05 logical,parameter :: PAR_FILE_USE_RICKER_TIME_FUNCTION = .false. + integer :: myrank + logical :: BROADCAST_AFTER_READ + ! reads ../DATA/Par_file - call read_parameter_file() + myrank = 0 + BROADCAST_AFTER_READ = .false. + call read_parameter_file(myrank,BROADCAST_AFTER_READ) ! punctual check of values for given default Par_file in SPECFEM3D/DATA/ directory print*,'NPROC = ',NPROC diff --git a/tests/decompose_mesh/test_valence.f90 b/tests/decompose_mesh/test_valence.f90 index e17a9acae..607d9887f 100644 --- a/tests/decompose_mesh/test_valence.f90 +++ b/tests/decompose_mesh/test_valence.f90 @@ -1,3 +1,7 @@ + +!! DK DK put this because I do not know how to fix the rules.mk dependencies + include "../../src/shared/serial.f90" + program test_valence use decompose_mesh diff --git a/tests/generate_databases/0.compile.default_make.sh b/tests/generate_databases/0.compile.default_make.sh index c70b673ca..fbc416f6f 100755 --- a/tests/generate_databases/0.compile.default_make.sh +++ b/tests/generate_databases/0.compile.default_make.sh @@ -43,7 +43,7 @@ else fi #cleanup -rm -rf ./bin/* +rm -rf ./bin/* echo "successful compilation" >> $testdir/results.log diff --git a/tests/meshfem3D/0.compile.default_make.sh b/tests/meshfem3D/0.compile.default_make.sh index c2f2c777f..c5a2852e5 100755 --- a/tests/meshfem3D/0.compile.default_make.sh +++ b/tests/meshfem3D/0.compile.default_make.sh @@ -43,7 +43,7 @@ else fi #cleanup -rm -rf ./bin/* +rm -rf ./bin/* echo "successful compilation" >> $testdir/results.log diff --git a/tests/run_all_tests.sh b/tests/run_all_tests.sh index cf37b9d35..349f81a93 100755 --- a/tests/run_all_tests.sh +++ b/tests/run_all_tests.sh @@ -61,7 +61,7 @@ do cd $dir/ fi - + done echo diff --git a/tests/run_tests.sh b/tests/run_tests.sh index f38b24d51..57b9d95b5 100755 --- a/tests/run_tests.sh +++ b/tests/run_tests.sh @@ -88,7 +88,7 @@ else do if [[ "$file" == *run_tests.sh* ]]; then # skips this run script - : + : else step " processing $file : " try ./$file diff --git a/tests/specfem3D/0.compile.default_make.sh b/tests/specfem3D/0.compile.default_make.sh index f10d99ca8..35d73e712 100755 --- a/tests/specfem3D/0.compile.default_make.sh +++ b/tests/specfem3D/0.compile.default_make.sh @@ -43,7 +43,7 @@ else fi #cleanup -rm -rf ./bin/* +rm -rf ./bin/* echo "successful compilation" >> $testdir/results.log diff --git a/tests/tomography/0.compile.default_make.sh b/tests/tomography/0.compile.default_make.sh index 35c71a850..0d1e3354d 100755 --- a/tests/tomography/0.compile.default_make.sh +++ b/tests/tomography/0.compile.default_make.sh @@ -35,7 +35,6 @@ echo "" >> $testdir/results.log # checks executable availability exec=( xadd_model_iso \ xmodel_update \ - xsmooth_sem \ xsum_preconditioned_kernels \ ) @@ -53,7 +52,7 @@ done echo "" >> $testdir/results.log #cleanup -rm -rf ./bin/* +rm -rf ./bin/* echo "successful compilation" >> $testdir/results.log diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/FORWARD_ADJOINT/COPY_LOCAL/copy_local.f90 b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/FORWARD_ADJOINT/COPY_LOCAL/copy_local.f90 index 3b58cfb92..3ed4a2155 100644 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/FORWARD_ADJOINT/COPY_LOCAL/copy_local.f90 +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/FORWARD_ADJOINT/COPY_LOCAL/copy_local.f90 @@ -2,13 +2,13 @@ program xcopy_local implicit none include 'mpif.h' - + integer myrank,sizeprocs,ier integer iregion_code - character(len=256) :: command,filename,procname + character(len=256) :: command,filename,procname character(len=256) :: databases,scratchdir character(len=8) cp - + ! forward mesh databases !databases = "/tigress-hsm/dpeter/SPECFEM3D_GLOBE/DATABASES_MPI.middle_east" @@ -17,19 +17,19 @@ program xcopy_local ! local node scratch directory scratchdir = "/scratch/hejunzhu/" - + ! initialize the MPI communicator and start the NPROCTOT MPI processes. call MPI_INIT(ier) ! run the main program call MPI_COMM_SIZE(MPI_COMM_WORLD,sizeprocs,ier) call MPI_COMM_RANK(MPI_COMM_WORLD,myrank,ier) - + ! creates local scratch directory !command = 'rm -rf '//trim(scratchdir) - !call system(trim(command)) + !call system(trim(command)) !command = 'mkdir -p '//trim(scratchdir) - !call system(trim(command)) + !call system(trim(command)) ! copy command if( myrank == 0 ) then @@ -37,62 +37,62 @@ program xcopy_local else cp = "cp" endif - + do iregion_code=1,3 ! process name - write(procname,"('/proc',i6.6,'_reg',i1,'_')") myrank,iregion_code + write(procname,"('/proc',i6.6,'_reg',i1,'_')") myrank,iregion_code ! database files filename = trim(databases)//trim(procname)//'array_dims.txt' - - command = trim(cp)//' '//trim(filename)//' '//trim(scratchdir) - call system(trim(command)) + + command = trim(cp)//' '//trim(filename)//' '//trim(scratchdir) + call system(trim(command)) filename = trim(databases)//trim(procname)//'attenuation.bin' - - command = trim(cp)//' '//trim(filename)//' '//trim(scratchdir) - call system(trim(command)) + + command = trim(cp)//' '//trim(filename)//' '//trim(scratchdir) + call system(trim(command)) filename = trim(databases)//trim(procname)//'boundary.bin' - - command = trim(cp)//' '//trim(filename)//' '//trim(scratchdir) - call system(trim(command)) + + command = trim(cp)//' '//trim(filename)//' '//trim(scratchdir) + call system(trim(command)) filename = trim(databases)//trim(procname)//'ibool*.txt' - - command = trim(cp)//' '//trim(filename)//' '//trim(scratchdir) - call system(trim(command)) + + command = trim(cp)//' '//trim(filename)//' '//trim(scratchdir) + call system(trim(command)) filename = trim(databases)//trim(procname)//'solver_data_1.bin' - command = trim(cp)//' '//trim(filename)//' '//trim(scratchdir) - call system(trim(command)) - + command = trim(cp)//' '//trim(filename)//' '//trim(scratchdir) + call system(trim(command)) + filename = trim(databases)//trim(procname)//'solver_data_2.bin' - - command = trim(cp)//' '//trim(filename)//' '//trim(scratchdir) - call system(trim(command)) + + command = trim(cp)//' '//trim(filename)//' '//trim(scratchdir) + call system(trim(command)) filename = trim(databases)//trim(procname)//'stacey.bin' - - command = trim(cp)//' '//trim(filename)//' '//trim(scratchdir) - call system(trim(command)) + + command = trim(cp)//' '//trim(filename)//' '//trim(scratchdir) + call system(trim(command)) !filename = trim(databases)//trim(procname)//'absorb*.bin' ! - !command = trim(cp)//' '//trim(filename)//' '//trim(scratchdir) - !call system(trim(command)) + !command = trim(cp)//' '//trim(filename)//' '//trim(scratchdir) + !call system(trim(command)) !filename = trim(databases)//trim(procname)//'boundary_disc.bin' ! - !command = trim(cp)//' '//trim(filename)//' '//trim(scratchdir) - !call system(trim(command)) + !command = trim(cp)//' '//trim(filename)//' '//trim(scratchdir) + !call system(trim(command)) enddo - + ! stop all the MPI processes, and exit call MPI_FINALIZE(ier) diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/FORWARD_ADJOINT/COPY_LOCAL/xcompile.sh b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/FORWARD_ADJOINT/COPY_LOCAL/xcompile.sh index 85ec16c22..377066a9b 100755 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/FORWARD_ADJOINT/COPY_LOCAL/xcompile.sh +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/FORWARD_ADJOINT/COPY_LOCAL/xcompile.sh @@ -3,10 +3,10 @@ # Princeton University, New Jersey, USA # Last modified: Mon Jan 24 20:34:14 EST 2011 -if [ -f xcopy_local_forward ]; then - echo RM xcopy_local_forward - rm xcopy_local_forward -fi +if [ -f xcopy_local_forward ]; then + echo RM xcopy_local_forward + rm xcopy_local_forward +fi mpif90 -o xcopy_local_forward -O3 copy_local.f90 diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/FORWARD_ADJOINT/PERL_CENTER/change_simulation_type.pl b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/FORWARD_ADJOINT/PERL_CENTER/change_simulation_type.pl index a75f21621..bcdcb79a7 100755 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/FORWARD_ADJOINT/PERL_CENTER/change_simulation_type.pl +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/FORWARD_ADJOINT/PERL_CENTER/change_simulation_type.pl @@ -1,16 +1,16 @@ #!/usr/bin/perl -# change the SIMULATION_TYPE setting in DATA/Par_file +# change the SIMULATION_TYPE setting in DATA/Par_file # Qinya Liu, Caltech, May 2007 use Time::Local; use Getopt::Std; use POSIX; - + sub Usage{ print STDERR <; close(IN); @@ -52,7 +52,7 @@ END } } if ($vfm=~/SAVE_FORWARD/) { - if ($opt_F) { $vfm=~s/false/true/; } + if ($opt_F) { $vfm=~s/false/true/; } else {$vfm=~s/true/false/;} } diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/FORWARD_ADJOINT/PERL_CENTER/cut_data_syn.pl b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/FORWARD_ADJOINT/PERL_CENTER/cut_data_syn.pl index ece8395c3..99b5c674b 100755 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/FORWARD_ADJOINT/PERL_CENTER/cut_data_syn.pl +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/FORWARD_ADJOINT/PERL_CENTER/cut_data_syn.pl @@ -8,9 +8,9 @@ sub Usage{ print STDERR < /dev/null"); - print SAC "r $file_dat $file_syn \n"; - print SAC "cut off \n"; - print SAC "eval to cutbeg ( (max &1,b &2,b ) ) \n"; - print SAC "eval to cutend ( (min &1,e &2,e ) ) \n"; - print SAC "cut %cutbeg %cutend \n"; - print SAC "cut on \n"; - print SAC "r \n"; - print SAC "ch SCALE 1 \n"; - print SAC "w $file_dat $file_syn \nquit\n"; - close(SAC); - } + if (! -f $file_dat) {die("No such file: $file_dat\n");} + + ($datname) = split(" ",`basename $file_dat`); + ($sta,$net,$comp,undef,$ext)=split(/\./,$datname); + $cmp=substr($comp,2,3); + + $file_syn="$opt_d/$sta.$net.LH$cmp.sem.sac.$ext"; + + if ( -f $file_syn ) { + print "Cutting file $file_syn\n"; + open(SAC,"|sac > /dev/null"); + print SAC "r $file_dat $file_syn \n"; + print SAC "cut off \n"; + print SAC "eval to cutbeg ( (max &1,b &2,b ) ) \n"; + print SAC "eval to cutend ( (min &1,e &2,e ) ) \n"; + print SAC "cut %cutbeg %cutend \n"; + print SAC "cut on \n"; + print SAC "r \n"; + print SAC "ch SCALE 1 \n"; + print SAC "w $file_dat $file_syn \nquit\n"; + close(SAC); + } } diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/FORWARD_ADJOINT/PERL_CENTER/global_slice_number.pl b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/FORWARD_ADJOINT/PERL_CENTER/global_slice_number.pl index 96cbe65b4..9a3d87daf 100755 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/FORWARD_ADJOINT/PERL_CENTER/global_slice_number.pl +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/FORWARD_ADJOINT/PERL_CENTER/global_slice_number.pl @@ -35,7 +35,7 @@ print "xi_width = $xi_width, eta_width = $eta_width; clat = $clat, clon = $clon; grot = $grot\n"; } -# minor +# minor print "compute slices along minor arc ...\n"; if ($nchunk == 6) { $command = "./xglobal_slice_number $elon $elat $slon $slat $nproc 0"; diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/FORWARD_ADJOINT/PERL_CENTER/mesh2vtu.pl b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/FORWARD_ADJOINT/PERL_CENTER/mesh2vtu.pl index c3963400f..af1e1a5db 100755 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/FORWARD_ADJOINT/PERL_CENTER/mesh2vtu.pl +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/FORWARD_ADJOINT/PERL_CENTER/mesh2vtu.pl @@ -32,7 +32,7 @@ sub Usage { This is a wrapper around mesh2vtu Brian Savage 6/26/2004 - + END exit(-1); } diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/FORWARD_ADJOINT/PERL_CENTER/process_data.pl b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/FORWARD_ADJOINT/PERL_CENTER/process_data.pl index 356fdf89d..a74642fd6 100755 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/FORWARD_ADJOINT/PERL_CENTER/process_data.pl +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/FORWARD_ADJOINT/PERL_CENTER/process_data.pl @@ -33,7 +33,7 @@ sub Usage{ data_sac_files --- names of the data sac files to be processed Notice: - 1. We require that polezero files in the same directory as the sac + 1. We require that polezero files in the same directory as the sac data files which is generally satisfied. We require that resp dir be specified even if it is current(.). All the needed info is taken from sac headers @@ -42,10 +42,10 @@ sub Usage{ 4. For BH? components, please set -s 20, otherwise interpolation to 1 sample/second will be performed - NOTE: Please make sure that SAC, saclst and IASP91 packages are installed properly on + NOTE: Please make sure that SAC, saclst and IASP91 packages are installed properly on your system, and that all the environment variables are set properly before running the script. - + Qinya Liu, Originally written in Oct 2002; updated in Feb 2010 END exit(1); @@ -60,7 +60,7 @@ END if ($opt_R and not -d $opt_R) {die("Check if dir $opt_R exists\n");} if ($opt_t) {($tmin, $tmax) = split(/\//,$opt_t); - $f1 = 1./$tmax; $f2=1./$tmin;} + $f1 = 1./$tmax; $f2=1./$tmin;} if ($opt_d) { $out_dir=$opt_d; if (not -d $out_dir) {mkdir($out_dir,0777);} } @@ -86,7 +86,7 @@ END print "Processing data file $file \n"; if (not $opt_d) {$outfile = $file.$ext;} else { ($filename) = split(" ",`basename $file`); - $outfile = "$out_dir/${filename}${ext}";} + $outfile = "$out_dir/${filename}${ext}";} ($filedir) = split(" ",`dirname $file`); if ($ext or $opt_d) {system("\\cp -f $file $outfile");} @@ -132,7 +132,7 @@ END print SAC "echo on\n"; print SAC "r $outfile\n";} - if ($opt_l){ # cut record + if ($opt_l){ # cut record print " Cut the record from o+$lmin to o+$lmax\n"; (undef,$tmp_o)=split(" ",`$saclst o f $outfile`); if (abs($tmp_o-$undef) < $eps) {die("O has not been set to cut record\n");} @@ -164,25 +164,25 @@ END if ($opt_i) { # assume pz file in the same dir $pzfile=`ls -1 $filedir/PZFILES/SAC_PZs_${network}_${sta}_${comp}_${khole}* | head -1`; chomp($pzfile); - if (!-f $pzfile) {print " **** No pzfile $pzfile **** \n"; $no_resp=1;} + if (!-f $pzfile) {print " **** No pzfile $pzfile **** \n"; $no_resp=1;} else { - ############ Hejun Zhu for rdseed5 pzfile without header ############## - #$pzfile_new=$pzfile."_new"; - #`awk 'NR>18' $pzfile > $pzfile_new`; - ######################################## - print " Transfer instrument response using pz file $pzfile\n"; - printf SAC ("trans from polezero s %20s to none freq %12.6f%12.6f%12.6f%12.6f \n", - $pzfile,$f0,$f1,$f2,$f3);} + ############ Hejun Zhu for rdseed5 pzfile without header ############## + #$pzfile_new=$pzfile."_new"; + #`awk 'NR>18' $pzfile > $pzfile_new`; + ######################################## + print " Transfer instrument response using pz file $pzfile\n"; + printf SAC ("trans from polezero s %20s to none freq %12.6f%12.6f%12.6f%12.6f \n", + $pzfile,$f0,$f1,$f2,$f3);} } else { # assume resp file in opt_R @respfiles=glob("$opt_R/${network}.${sta}.${khole}.${comp}*.RESP"); $respfile = find_resp_file($outfile,@respfiles); if (! -f $respfile or @respfiles == 0) {print " **** No respfile $respfiles for $network, $sta, $khole, $comp ****\n"; $no_resp=1;} else { - print " Transfer instrument response using response file $respfile\n"; - printf SAC ("trans from evalresp fname $respfile to none freq %12.6f%12.6f%12.6f%12.6f \n", - $f0,$f1,$f2,$f3); - printf SAC "mul 1e-9\n"; }} + print " Transfer instrument response using response file $respfile\n"; + printf SAC ("trans from evalresp fname $respfile to none freq %12.6f%12.6f%12.6f%12.6f \n", + $f0,$f1,$f2,$f3); + printf SAC "mul 1e-9\n"; }} printf SAC " rtrend\n rmean\n taper width $opt_T\n"; } @@ -222,7 +222,7 @@ END print SAC "echo off\nquit\n"; close(SAC); if ($no_resp and defined $opt_d) { - print "Deleting $outfile\n"; + print "Deleting $outfile\n"; system("rm -f $outfile");} } print " Done! \n"; diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/FORWARD_ADJOINT/PERL_CENTER/process_syn.pl b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/FORWARD_ADJOINT/PERL_CENTER/process_syn.pl index 2a581a819..160ed4a83 100755 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/FORWARD_ADJOINT/PERL_CENTER/process_syn.pl +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/FORWARD_ADJOINT/PERL_CENTER/process_syn.pl @@ -33,11 +33,11 @@ sub Usage{ names of files -- name of syn files to be processed - NOTE: Please make sure that SAC, saclst and IASP91 packages are installed properly on + NOTE: Please make sure that SAC, saclst and IASP91 packages are installed properly on your system, and that all the environment variables are set properly before running the script. - + Qinya Liu, originally written in Oct 2002, most recently updated in Feb 2010. END @@ -55,7 +55,7 @@ END if (!$opt_P) {$poles=4;$pass=2;} else{($poles,$pass)=split(/\//,$opt_P); if(not defined $pass or $pass<1){$pass=2;}} -if ($opt_l) {($lmin,$lmax) = split(/\//,$opt_l);} +if ($opt_l) {($lmin,$lmax) = split(/\//,$opt_l);} else {$lmin = 0; $lmax = 3600;} if ($opt_a and not -f $opt_a) {$opt_a="/opt/seismo/data/STATIONS_new";} if ($opt_o and not $opt_m) {die("Specify centroid time first\n");} @@ -87,7 +87,7 @@ END foreach $file (@ARGV) { - print "\nProcessing file $file\n"; + print "\nProcessing file $file\n"; if (! -f $file) {die(" No such file : $file\n");} # transfer ascii file to sac file according to name of files @@ -163,7 +163,7 @@ END else { printf SAC ("bp n $poles p $pass co %10.5f %10.5f\n",$f1,$f2);} print SAC "rtrend\n rmean\n taper\n";} - + if ($opt_i) {# convolve with instrument response print "Convolving instrument response...\n"; $pzfile="SAC_PZs_${net}_${sta}_${comp}_"; diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/FORWARD_ADJOINT/PERL_CENTER/rotate.pl b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/FORWARD_ADJOINT/PERL_CENTER/rotate.pl index ca7af4276..6746dc32f 100755 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/FORWARD_ADJOINT/PERL_CENTER/rotate.pl +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/FORWARD_ADJOINT/PERL_CENTER/rotate.pl @@ -103,5 +103,5 @@ sub Usage { print SAC "w $radial $tang\nquit\n"; close(SAC); } - + print " Done !\n"; diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/FORWARD_ADJOINT/PERL_CENTER/xold/process_data_old.pl b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/FORWARD_ADJOINT/PERL_CENTER/xold/process_data_old.pl index d8c38b8a7..6b50c22e4 100755 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/FORWARD_ADJOINT/PERL_CENTER/xold/process_data_old.pl +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/FORWARD_ADJOINT/PERL_CENTER/xold/process_data_old.pl @@ -33,7 +33,7 @@ sub Usage{ data_sac_files --- names of the data sac files to be processed Notice: - 1. We require that polezero files in the same directory as the sac + 1. We require that polezero files in the same directory as the sac data files which is generally satisfied. We require that resp dir be specified even if it is current(.). All the needed info is taken from sac headers @@ -42,10 +42,10 @@ sub Usage{ 4. For BH? components, please set -s 20, otherwise interpolation to 1 sample/second will be performed - NOTE: Please make sure that SAC, saclst and IASP91 packages are installed properly on + NOTE: Please make sure that SAC, saclst and IASP91 packages are installed properly on your system, and that all the environment variables are set properly before running the script. - + Qinya Liu, Originally written in Oct 2002; updated in Feb 2010 END exit(1); @@ -60,7 +60,7 @@ END if ($opt_R and not -d $opt_R) {die("Check if dir $opt_R exists\n");} if ($opt_t) {($tmin, $tmax) = split(/\//,$opt_t); - $f1 = 1./$tmax; $f2=1./$tmin;} + $f1 = 1./$tmax; $f2=1./$tmin;} if ($opt_d) { $out_dir=$opt_d; if (not -d $out_dir) {mkdir($out_dir,0777);} } @@ -86,7 +86,7 @@ END print "Processing data file $file \n"; if (not $opt_d) {$outfile = $file.$ext;} else { ($filename) = split(" ",`basename $file`); - $outfile = "$out_dir/${filename}${ext}";} + $outfile = "$out_dir/${filename}${ext}";} ($filedir) = split(" ",`dirname $file`); if ($ext or $opt_d) {system("\\cp -f $file $outfile");} @@ -135,7 +135,7 @@ END if ($opt_s) {print SAC "interp delta $dt\n"; print SAC "w over\n";} - if ($opt_l){ # cut record + if ($opt_l){ # cut record print " Cut the record from o+$lmin to o+$lmax\n"; (undef,$tmp_o)=split(" ",`$saclst o f $outfile`); if (abs($tmp_o-$undef) < $eps) {die("O has not been set to cut record\n");} @@ -167,25 +167,25 @@ END if ($opt_i) { # assume pz file in the same dir $pzfile=`ls -1 $filedir/PZFILES/SAC_PZs_${network}_${sta}_${comp}_${khole}* | head -1`; chomp($pzfile); - if (!-f $pzfile) {print " **** No pzfile $pzfile **** \n"; $no_resp=1;} + if (!-f $pzfile) {print " **** No pzfile $pzfile **** \n"; $no_resp=1;} else { - ############ Hejun Zhu for rdseed5 pzfile without header ############## - #$pzfile_new=$pzfile."_new"; - #`awk 'NR>18' $pzfile > $pzfile_new`; - ######################################## - print " Transfer instrument response using pz file $pzfile\n"; - printf SAC ("trans from polezero s %20s to none freq %12.6f%12.6f%12.6f%12.6f \n", - $pzfile,$f0,$f1,$f2,$f3);} + ############ Hejun Zhu for rdseed5 pzfile without header ############## + #$pzfile_new=$pzfile."_new"; + #`awk 'NR>18' $pzfile > $pzfile_new`; + ######################################## + print " Transfer instrument response using pz file $pzfile\n"; + printf SAC ("trans from polezero s %20s to none freq %12.6f%12.6f%12.6f%12.6f \n", + $pzfile,$f0,$f1,$f2,$f3);} } else { # assume resp file in opt_R @respfiles=glob("$opt_R/${network}.${sta}.${khole}.${comp}*.RESP"); $respfile = find_resp_file($outfile,@respfiles); if (! -f $respfile or @respfiles == 0) {print " **** No respfile $respfiles for $network, $sta, $khole, $comp ****\n"; $no_resp=1;} else { - print " Transfer instrument response using response file $respfile\n"; - printf SAC ("trans from evalresp fname $respfile to none freq %12.6f%12.6f%12.6f%12.6f \n", - $f0,$f1,$f2,$f3); - printf SAC "mul 1e-9\n"; }} + print " Transfer instrument response using response file $respfile\n"; + printf SAC ("trans from evalresp fname $respfile to none freq %12.6f%12.6f%12.6f%12.6f \n", + $f0,$f1,$f2,$f3); + printf SAC "mul 1e-9\n"; }} printf SAC " rtrend\n rmean\n taper width $opt_T\n"; } @@ -219,7 +219,7 @@ END print SAC "echo off\nquit\n"; close(SAC); if ($no_resp and defined $opt_d) { - print "Deleting $outfile\n"; + print "Deleting $outfile\n"; system("rm -f $outfile");} } print " Done! \n"; diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/FORWARD_ADJOINT/PERL_CENTER/xold/process_syn_old.pl b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/FORWARD_ADJOINT/PERL_CENTER/xold/process_syn_old.pl index f2f4f103d..97ecb3c71 100755 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/FORWARD_ADJOINT/PERL_CENTER/xold/process_syn_old.pl +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/FORWARD_ADJOINT/PERL_CENTER/xold/process_syn_old.pl @@ -33,11 +33,11 @@ sub Usage{ names of files -- name of syn files to be processed - NOTE: Please make sure that SAC, saclst and IASP91 packages are installed properly on + NOTE: Please make sure that SAC, saclst and IASP91 packages are installed properly on your system, and that all the environment variables are set properly before running the script. - + Qinya Liu, originally written in Oct 2002, most recently updated in Feb 2010. END @@ -55,7 +55,7 @@ END if (!$opt_P) {$poles=4;$pass=2;} else{($poles,$pass)=split(/\//,$opt_P); if(not defined $pass or $pass<1){$pass=2;}} -if ($opt_l) {($lmin,$lmax) = split(/\//,$opt_l);} +if ($opt_l) {($lmin,$lmax) = split(/\//,$opt_l);} else {$lmin = 0; $lmax = 3600;} if ($opt_a and not -f $opt_a) {$opt_a="/opt/seismo/data/STATIONS_new";} if ($opt_o and not $opt_m) {die("Specify centroid time first\n");} @@ -87,7 +87,7 @@ END foreach $file (@ARGV) { - print "\nProcessing file $file\n"; + print "\nProcessing file $file\n"; if (! -f $file) {die(" No such file : $file\n");} # transfer ascii file to sac file according to name of files @@ -169,7 +169,7 @@ END else { printf SAC ("bp n $poles p $pass co %10.5f %10.5f\n",$f1,$f2);} print SAC "rtrend\n rmean\n taper\n";} - + if ($opt_i) {# convolve with instrument response print "Convolving instrument response...\n"; $pzfile="SAC_PZs_${net}_${sta}_${comp}_"; diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/FORWARD_ADJOINT/PERL_CENTER/xold/xprocess_dat_pbs.sh b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/FORWARD_ADJOINT/PERL_CENTER/xold/xprocess_dat_pbs.sh index eb11153d5..207372f65 100644 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/FORWARD_ADJOINT/PERL_CENTER/xold/xprocess_dat_pbs.sh +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/FORWARD_ADJOINT/PERL_CENTER/xold/xprocess_dat_pbs.sh @@ -21,14 +21,14 @@ datdir=DATASET_GLOBE/CMTSOLUTION_201006030432A syndir=SYN_S00/CMTSOLUTION_201006030432A cmtfile=CMTSOLUTION_CENTER/CMTSOLUTION_201006030432A -if [ $opt == 1 ]; then - ./PERL_SRC/process_data.pl -m $cmtfile -s 1.0 -l $tstart/$tend -t $fmin/$fmax -f -i -p -x $ext $datdir/*.sac - ./PERL_SRC/rotate.pl -l $tstart -L $tend $datdir/*.BHE.sac.$ext -elif [ $opt == 2 ]; then - ./PERL_SRC/process_syn.pl -S -m $cmtfile -s 1.0 -l $tstart/$tend -t $fmin/$fmax -f -x $ext $syndir/*.sac - ./PERL_SRC/rotate.pl -l $tstart -L $tend $syndir/*.LHE.sem.sac.$ext -elif [ $opt == 3 ]; then - ./PERL_SRC/cut_data_syn.pl -d $syndir $datdir/*BH[ZRT]*.$ext +if [ $opt == 1 ]; then + ./PERL_SRC/process_data.pl -m $cmtfile -s 1.0 -l $tstart/$tend -t $fmin/$fmax -f -i -p -x $ext $datdir/*.sac + ./PERL_SRC/rotate.pl -l $tstart -L $tend $datdir/*.BHE.sac.$ext +elif [ $opt == 2 ]; then + ./PERL_SRC/process_syn.pl -S -m $cmtfile -s 1.0 -l $tstart/$tend -t $fmin/$fmax -f -x $ext $syndir/*.sac + ./PERL_SRC/rotate.pl -l $tstart -L $tend $syndir/*.LHE.sem.sac.$ext +elif [ $opt == 3 ]; then + ./PERL_SRC/cut_data_syn.pl -d $syndir $datdir/*BH[ZRT]*.$ext fi echo PROCESSING DATA DONE diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/FORWARD_ADJOINT/XPBS_process_dat.sh b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/FORWARD_ADJOINT/XPBS_process_dat.sh index f87494ec9..6b83b1778 100755 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/FORWARD_ADJOINT/XPBS_process_dat.sh +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/FORWARD_ADJOINT/XPBS_process_dat.sh @@ -21,22 +21,22 @@ datdir=DATASET_EUROPE/CMTSOLUTION_200604121652A syndir=SYN_M13/CMTSOLUTION_200604121652A cmtfile=CMTSOLUTION_CENTER/CMTSOLUTION_200604121652A -if [ $opt == 1 ]; then - ./PERL_CENTER/process_data.pl -m $cmtfile -s 10.0 -l $tstart/$tend -t $fmin/$fmax -f -i -p -x $ext $datdir/*.sac - ./PERL_CENTER/rotate.pl -l $tstart -L $tend $datdir/*.BHE.sac.$ext - echo delete N E bandpass component - cd $datdir - rm *.BHN.sac.$ext - rm *.BHE.sac.$ext +if [ $opt == 1 ]; then + ./PERL_CENTER/process_data.pl -m $cmtfile -s 10.0 -l $tstart/$tend -t $fmin/$fmax -f -i -p -x $ext $datdir/*.sac + ./PERL_CENTER/rotate.pl -l $tstart -L $tend $datdir/*.BHE.sac.$ext + echo delete N E bandpass component + cd $datdir + rm *.BHN.sac.$ext + rm *.BHE.sac.$ext -elif [ $opt == 2 ]; then - ./PERL_CENTER/process_syn.pl -S -m $cmtfile -s 10.0 -l $tstart/$tend -t $fmin/$fmax -f -x $ext $syndir/*.sac - ./PERL_CENTER/rotate.pl -l $tstart -L $tend $syndir/*.LHE.sem.sac.$ext - ./PERL_CENTER/cut_data_syn.pl -d $syndir $datdir/*BH[ZRT]*.$ext - echo delete N E bandpass component - cd $syndir - rm *.LHN.sem.sac.$ext - rm *.LHE.sem.sac.$ext +elif [ $opt == 2 ]; then + ./PERL_CENTER/process_syn.pl -S -m $cmtfile -s 10.0 -l $tstart/$tend -t $fmin/$fmax -f -x $ext $syndir/*.sac + ./PERL_CENTER/rotate.pl -l $tstart -L $tend $syndir/*.LHE.sem.sac.$ext + ./PERL_CENTER/cut_data_syn.pl -d $syndir $datdir/*BH[ZRT]*.$ext + echo delete N E bandpass component + cd $syndir + rm *.LHN.sem.sac.$ext + rm *.LHE.sem.sac.$ext fi -echo PROCESSING DATA successfully +echo PROCESSING DATA successfully diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/FORWARD_ADJOINT/XSHELL_process_dat.sh b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/FORWARD_ADJOINT/XSHELL_process_dat.sh index 4ffdbb836..d93eab612 100755 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/FORWARD_ADJOINT/XSHELL_process_dat.sh +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/FORWARD_ADJOINT/XSHELL_process_dat.sh @@ -1,17 +1,17 @@ #!/bin/sh -# This script is used to process data and syn -# It used process_data.pl process_syn.pl -# Hejun Zhu Jun 07 2010 +# This script is used to process data and syn +# It used process_data.pl process_syn.pl +# Hejun Zhu Jun 07 2010 # INPUT: -# fmin : minimum period -# fmax : maximum period +# fmin : minimum period +# fmax : maximum period # tstart: cut start time # tend: cut end time -# cmtid: event id +# cmtid: event id # opt: 1=process dat; 2=process syn; 3=cut data and synthetics -# Bandpass 15-25sec, 20-34sec, 26-56sec, 50-120sec (15-35sec, 50-120sec) +# Bandpass 15-25sec, 20-34sec, 26-56sec, 50-120sec (15-35sec, 50-120sec) # Input @@ -24,7 +24,7 @@ tstart=0 tend=1800 -# Get names +# Get names datpnm=DATASET_EUROPE synpnm="SYN_"$iter ext1=`printf "%03i\n" $fmin` @@ -32,43 +32,43 @@ ext2=`printf "%03i\n" $fmax` ext="T"$ext1"_"$ext2 -# Check files +# Check files if [ ! -f $eventfile ]; then - echo WRONG! NO $eventfile - exit -fi + echo WRONG! NO $eventfile + exit +fi -while read line -do - cmtfile="../SHARE_FILES/CMTSOLUTION_CENTER/$line" - cmtfiletag="..\/SHARE_FILES\/CMTSOLUTION_CENTER\/$line" - cmtid=`echo $line | awk -F"_" '{print $2}'` - proctag="#PBS -N XPROC_DAT_$cmtid" - datdir="$datpnm\/CMTSOLUTION_$cmtid" - syndir="$synpnm\/$line" +while read line +do + cmtfile="../SHARE_FILES/CMTSOLUTION_CENTER/$line" + cmtfiletag="..\/SHARE_FILES\/CMTSOLUTION_CENTER\/$line" + cmtid=`echo $line | awk -F"_" '{print $2}'` + proctag="#PBS -N XPROC_DAT_$cmtid" + datdir="$datpnm\/CMTSOLUTION_$cmtid" + syndir="$synpnm\/$line" - if [ ! -f $cmtfile ]; then - echo WRONG! NO $cmtfile - exit - fi + if [ ! -f $cmtfile ]; then + echo WRONG! NO $cmtfile + exit + fi - sed -e "s/^#PBS -N.*$/$proctag/g" \ - -e "s/^cmtfile=.*$/cmtfile=$cmtfiletag/g" \ - -e "s/^tstart=.*$/tstart=$tstart/g" \ - -e "s/^tend=.*$/tend=$tend/g" \ - -e "s/^fmin=.*$/fmin=$fmin/g" \ - -e "s/^fmax=.*$/fmax=$fmax/g" \ - -e "s/^ext=.*$/ext=$ext/g" \ - -e "s/^datdir=.*$/datdir=$datdir/g" \ - -e "s/^syndir=.*$/syndir=$syndir/g" \ - -e "s/^opt=.*$/opt=$opt/g" \ - XPBS_process_dat.sh > XPBS_process_dat.sh.out - mv XPBS_process_dat.sh.out XPBS_process_dat.sh + sed -e "s/^#PBS -N.*$/$proctag/g" \ + -e "s/^cmtfile=.*$/cmtfile=$cmtfiletag/g" \ + -e "s/^tstart=.*$/tstart=$tstart/g" \ + -e "s/^tend=.*$/tend=$tend/g" \ + -e "s/^fmin=.*$/fmin=$fmin/g" \ + -e "s/^fmax=.*$/fmax=$fmax/g" \ + -e "s/^ext=.*$/ext=$ext/g" \ + -e "s/^datdir=.*$/datdir=$datdir/g" \ + -e "s/^syndir=.*$/syndir=$syndir/g" \ + -e "s/^opt=.*$/opt=$opt/g" \ + XPBS_process_dat.sh > XPBS_process_dat.sh.out + mv XPBS_process_dat.sh.out XPBS_process_dat.sh - echo qsub $line - qsub XPBS_process_dat.sh - sleep 5 -done < $eventfile + echo qsub $line + qsub XPBS_process_dat.sh + sleep 5 +done < $eventfile diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/FORWARD_ADJOINT/XSRC_FLEXWIN/xcheck_finish_flexwin.sh b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/FORWARD_ADJOINT/XSRC_FLEXWIN/xcheck_finish_flexwin.sh index 9149a1703..6d62e7d81 100755 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/FORWARD_ADJOINT/XSRC_FLEXWIN/xcheck_finish_flexwin.sh +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/FORWARD_ADJOINT/XSRC_FLEXWIN/xcheck_finish_flexwin.sh @@ -19,32 +19,32 @@ ext="T"$ext1"_"$ext2 -if [ ! -f $eventfile ]; then - echo WRONG! NO $eventfile - exit -fi -while read line -do - - cmtid=`echo $line | awk -F"_" '{print $NF}'` - flexwin_output="XFLEXWIN_OUTPUT_"$iter"/OUTPUT_FLEXWIN_"$cmtid"_"$ext - mefile="../MEASUREMENT_CENTER/MEASUREMENT_"$cmtid - - if [ ! -f $flexwin_output ]; then - echo WRONG! NO $flexwin_output - exit - fi - if [ ! -f $mefile ]; then - echo WRONG! NO $mefile - exit - fi - - - lastline=`tail -1 $mefile` - tag=`echo $lastline| awk -F" " '{print $1}'` - - exist=`grep $tag $flexwin_output | awk '{print $1}'` - echo $line $exist - - -done < $eventfile +if [ ! -f $eventfile ]; then + echo WRONG! NO $eventfile + exit +fi +while read line +do + + cmtid=`echo $line | awk -F"_" '{print $NF}'` + flexwin_output="XFLEXWIN_OUTPUT_"$iter"/OUTPUT_FLEXWIN_"$cmtid"_"$ext + mefile="../MEASUREMENT_CENTER/MEASUREMENT_"$cmtid + + if [ ! -f $flexwin_output ]; then + echo WRONG! NO $flexwin_output + exit + fi + if [ ! -f $mefile ]; then + echo WRONG! NO $mefile + exit + fi + + + lastline=`tail -1 $mefile` + tag=`echo $lastline| awk -F" " '{print $1}'` + + exist=`grep $tag $flexwin_output | awk '{print $1}'` + echo $line $exist + + +done < $eventfile diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/FORWARD_ADJOINT/XSRC_FLEXWIN/xprepare_flexwin.sh b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/FORWARD_ADJOINT/XSRC_FLEXWIN/xprepare_flexwin.sh index 0cefa4414..446b76955 100755 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/FORWARD_ADJOINT/XSRC_FLEXWIN/xprepare_flexwin.sh +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/FORWARD_ADJOINT/XSRC_FLEXWIN/xprepare_flexwin.sh @@ -3,17 +3,17 @@ # Princeton University, New Jersey, USA # Last modified: Wed Aug 18 10:02:23 EDT 2010 -# This script is used to prepare flexwin input file +# This script is used to prepare flexwin input file # flexwin.input # INPUT: -# cmtid: cmtid from Harvard Solution -# iter: iteration number -# fmin: minimum period -# fmax: maximum period (Tmin and Tmax are used to generate file extension) -# Name: -# datdir: data directory -# syndir: syn directory -# windir: win directory (save all output from FLEXWIN) +# cmtid: cmtid from Harvard Solution +# iter: iteration number +# fmin: minimum period +# fmax: maximum period (Tmin and Tmax are used to generate file extension) +# Name: +# datdir: data directory +# syndir: syn directory +# windir: win directory (save all output from FLEXWIN) @@ -28,120 +28,120 @@ ext1=`printf "%03i\n" $fmin` ext2=`printf "%03i\n" $fmax` ext="T"$ext1"_"$ext2 -if [ ! -f $eventfile ]; then - echo WRONG! NO $eventfile - exit -fi +if [ ! -f $eventfile ]; then + echo WRONG! NO $eventfile + exit +fi -if [ -f t1 ] ; then - echo deleting t1 - rm t1 -fi +if [ -f t1 ] ; then + echo deleting t1 + rm t1 +fi flexwin_input_dir="XFLEXWIN_INPUT_"$iter -flexwin_output_dir="XFLEXWIN_OUTPUT_"$iter - -if [ ! -d $flexwin_input_dir ]; then - echo MKDIR $flexwin_input_dir - mkdir $flexwin_input_dir -fi -if [ ! -d $flexwin_output_dir ]; then - echo MKDIR $flexwin_output_dir - mkdir $flexwin_output_dir -fi - - -while read name -do - - cmtid=`echo $name | awk -F"_" '{print $NF}'` - - mefile="../MEASUREMENT_CENTER/MEASUREMENT_"$cmtid - datdir=$datpnm"/CMTSOLUTION_"$cmtid - syndir=$synpnm"/CMTSOLUTION_"$cmtid - windir=$synpnm"/CMTSOLUTION_"$cmtid"_WIN_"$ext - flexwin_input=$flexwin_input_dir"/INPUT_FLEXWIN_"$cmtid"_"$ext - - echo checking INPUT - echo DATDIR: $datdir - echo SYNDIR: $syndir - echo WINDIR: $windir - echo MEASURE: $mefile - - - if [ ! -f $mefile ]; then - echo WRONG! NO $mefile - exit - fi - - nsta=`wc -l $mefile | awk '{print $1}'` - echo found $nsta stations - - - n=0 - while read line - do - sta=`echo $line | awk '{print $1}'| awk -F"." '{print $1}'` - net=`echo $line | awk '{print $1}'| awk -F"." '{print $2}'` - - datz=$datdir"/"$sta"."$net".BHZ.sac."$ext - datr=$datdir"/"$sta"."$net".BHR.sac."$ext - datt=$datdir"/"$sta"."$net".BHT.sac."$ext - - synz=$syndir"/"$sta"."$net".LHZ.sem.sac."$ext - synr=$syndir"/"$sta"."$net".LHR.sem.sac."$ext - synt=$syndir"/"$sta"."$net".LHT.sem.sac."$ext - - - if [ ! -f $datz ]; then - echo WRONG! NO $datz - exit - fi - if [ ! -f $datr ]; then - echo WRONG! NO $datr - exit - fi - if [ ! -f $datt ]; then - echo WRONG! NO $datt - exit - fi - if [ ! -f $synz ]; then - echo WRONG! NO $synz - exit - fi - if [ ! -f $synr ]; then - echo WRONG! NO $synr - exit - fi - if [ ! -f $synt ]; then - echo WRONG! NO $synt - exit - fi - - - winz=$windir"/"$sta"."$net".LHZ" - winr=$windir"/"$sta"."$net".LHR" - wint=$windir"/"$sta"."$net".LHT" - - n=`echo $n | awk '{print $n+1}'` - echo $datz >> t1 - echo $synz >> t1 - echo $winz >> t1 - - n=`echo $n | awk '{print $n+1}'` - echo $datr >> t1 - echo $synr >> t1 - echo $winr >> t1 - - n=`echo $n | awk '{print $n+1}'` - echo $datt >> t1 - echo $synt >> t1 - echo $wint >> t1 - - done < $mefile - - echo $n > $flexwin_input - cat t1 >> $flexwin_input - rm t1 +flexwin_output_dir="XFLEXWIN_OUTPUT_"$iter + +if [ ! -d $flexwin_input_dir ]; then + echo MKDIR $flexwin_input_dir + mkdir $flexwin_input_dir +fi +if [ ! -d $flexwin_output_dir ]; then + echo MKDIR $flexwin_output_dir + mkdir $flexwin_output_dir +fi + + +while read name +do + + cmtid=`echo $name | awk -F"_" '{print $NF}'` + + mefile="../MEASUREMENT_CENTER/MEASUREMENT_"$cmtid + datdir=$datpnm"/CMTSOLUTION_"$cmtid + syndir=$synpnm"/CMTSOLUTION_"$cmtid + windir=$synpnm"/CMTSOLUTION_"$cmtid"_WIN_"$ext + flexwin_input=$flexwin_input_dir"/INPUT_FLEXWIN_"$cmtid"_"$ext + + echo checking INPUT + echo DATDIR: $datdir + echo SYNDIR: $syndir + echo WINDIR: $windir + echo MEASURE: $mefile + + + if [ ! -f $mefile ]; then + echo WRONG! NO $mefile + exit + fi + + nsta=`wc -l $mefile | awk '{print $1}'` + echo found $nsta stations + + + n=0 + while read line + do + sta=`echo $line | awk '{print $1}'| awk -F"." '{print $1}'` + net=`echo $line | awk '{print $1}'| awk -F"." '{print $2}'` + + datz=$datdir"/"$sta"."$net".BHZ.sac."$ext + datr=$datdir"/"$sta"."$net".BHR.sac."$ext + datt=$datdir"/"$sta"."$net".BHT.sac."$ext + + synz=$syndir"/"$sta"."$net".LHZ.sem.sac."$ext + synr=$syndir"/"$sta"."$net".LHR.sem.sac."$ext + synt=$syndir"/"$sta"."$net".LHT.sem.sac."$ext + + + if [ ! -f $datz ]; then + echo WRONG! NO $datz + exit + fi + if [ ! -f $datr ]; then + echo WRONG! NO $datr + exit + fi + if [ ! -f $datt ]; then + echo WRONG! NO $datt + exit + fi + if [ ! -f $synz ]; then + echo WRONG! NO $synz + exit + fi + if [ ! -f $synr ]; then + echo WRONG! NO $synr + exit + fi + if [ ! -f $synt ]; then + echo WRONG! NO $synt + exit + fi + + + winz=$windir"/"$sta"."$net".LHZ" + winr=$windir"/"$sta"."$net".LHR" + wint=$windir"/"$sta"."$net".LHT" + + n=`echo $n | awk '{print $n+1}'` + echo $datz >> t1 + echo $synz >> t1 + echo $winz >> t1 + + n=`echo $n | awk '{print $n+1}'` + echo $datr >> t1 + echo $synr >> t1 + echo $winr >> t1 + + n=`echo $n | awk '{print $n+1}'` + echo $datt >> t1 + echo $synt >> t1 + echo $wint >> t1 + + done < $mefile + + echo $n > $flexwin_input + cat t1 >> $flexwin_input + rm t1 done < $eventfile diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/FORWARD_ADJOINT/XSRC_FLEXWIN/xrun_flexwin.sh b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/FORWARD_ADJOINT/XSRC_FLEXWIN/xrun_flexwin.sh index d0eef09f4..4eaf9c35d 100755 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/FORWARD_ADJOINT/XSRC_FLEXWIN/xrun_flexwin.sh +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/FORWARD_ADJOINT/XSRC_FLEXWIN/xrun_flexwin.sh @@ -3,7 +3,7 @@ # Princeton University, New Jersey, USA # Last modified: Wed Aug 18 10:00:14 EDT 2010 -# This script is used to run flexwin +# This script is used to run flexwin # using flexwin.input in XFLEXWIN_INPUT_OUTPUT # and generate flexwin.output in XFLEXWIN_INPUT_OUTPUT @@ -17,48 +17,48 @@ ext1=`printf "%03i\n" $fmin` ext2=`printf "%03i\n" $fmax` ext="T"$ext1"_"$ext2 -if [ ! -f $eventfile ] ;then - echo WRONG! NO $eventfile - exit -fi +if [ ! -f $eventfile ] ;then + echo WRONG! NO $eventfile + exit +fi -while read line -do - cmtid=`echo $line | awk -F"_" '{print $NF}'` - flexwin_input="XFLEXWIN_INPUT_"$iter"\/INPUT_FLEXWIN_"$cmtid"_"$ext - flexwin_output="XFLEXWIN_OUTPUT_"$iter"\/OUTPUT_FLEXWIN_"$cmtid"_"$ext - flexwin_tag="#PBS -N XFLEXWIN_$cmtid" - syndir="..\/SYN_$iter" - dir="CMTSOLUTION_"$cmtid"_WIN_"$ext +while read line +do + cmtid=`echo $line | awk -F"_" '{print $NF}'` + flexwin_input="XFLEXWIN_INPUT_"$iter"\/INPUT_FLEXWIN_"$cmtid"_"$ext + flexwin_output="XFLEXWIN_OUTPUT_"$iter"\/OUTPUT_FLEXWIN_"$cmtid"_"$ext + flexwin_tag="#PBS -N XFLEXWIN_$cmtid" + syndir="..\/SYN_$iter" + dir="CMTSOLUTION_"$cmtid"_WIN_"$ext - dir2=../SYN_$iter/$dir - if [ ! -d $dir2 ]; then - echo MKDIR $dir2 - mkdir $dir2 - fi + dir2=../SYN_$iter/$dir + if [ ! -d $dir2 ]; then + echo MKDIR $dir2 + mkdir $dir2 + fi - sed -e "s/^#PBS -N.*$/$flexwin_tag/g" \ - -e "s/^input=.*$/input=$flexwin_input/g" \ - -e "s/^output=.*$/output=$flexwin_output/g" \ - -e "s/^syndir=.*$/syndir=$syndir/g" \ - -e "s/^dir=.*$/dir=$dir/g" \ - xrun_flexwin_pbs.sh > xrun_flexwin_pbs.sh.out - mv xrun_flexwin_pbs.sh.out xrun_flexwin_pbs.sh + sed -e "s/^#PBS -N.*$/$flexwin_tag/g" \ + -e "s/^input=.*$/input=$flexwin_input/g" \ + -e "s/^output=.*$/output=$flexwin_output/g" \ + -e "s/^syndir=.*$/syndir=$syndir/g" \ + -e "s/^dir=.*$/dir=$dir/g" \ + xrun_flexwin_pbs.sh > xrun_flexwin_pbs.sh.out + mv xrun_flexwin_pbs.sh.out xrun_flexwin_pbs.sh - # change PAR_FILE - #echo replace PAR_FILE with fmax = $fmax and fmin = $fmin - #tag_min="WIN_MIN_PERIOD = $fmin.0" - #tag_max="WIN_MAX_PERIOD = $fmax.0" - #sed -e "24s/^.*$/$tag_min/g" PAR_FILE > PAR_FILE.sed - #mv PAR_FILE.sed PAR_FILE - #sed -e "25s/^.*$/$tag_max/g" PAR_FILE > PAR_FILE.sed - #mv PAR_FILE.sed PAR_FILE + # change PAR_FILE + #echo replace PAR_FILE with fmax = $fmax and fmin = $fmin + #tag_min="WIN_MIN_PERIOD = $fmin.0" + #tag_max="WIN_MAX_PERIOD = $fmax.0" + #sed -e "24s/^.*$/$tag_min/g" PAR_FILE > PAR_FILE.sed + #mv PAR_FILE.sed PAR_FILE + #sed -e "25s/^.*$/$tag_max/g" PAR_FILE > PAR_FILE.sed + #mv PAR_FILE.sed PAR_FILE - echo running flexwin for fmax = $fmax and fmin = $fmin for $cmtid - #./flexwin < $flexwin_input > $flexwin_output - qsub xrun_flexwin_pbs.sh - sleep 10 + echo running flexwin for fmax = $fmax and fmin = $fmin for $cmtid + #./flexwin < $flexwin_input > $flexwin_output + qsub xrun_flexwin_pbs.sh + sleep 10 done < $eventfile diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/FORWARD_ADJOINT/XSRC_FLEXWIN/xrun_flexwin_pbs.sh b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/FORWARD_ADJOINT/XSRC_FLEXWIN/xrun_flexwin_pbs.sh index 0bed01155..441507944 100644 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/FORWARD_ADJOINT/XSRC_FLEXWIN/xrun_flexwin_pbs.sh +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/FORWARD_ADJOINT/XSRC_FLEXWIN/xrun_flexwin_pbs.sh @@ -18,10 +18,10 @@ dir=CMTSOLUTION_200604121652A_WIN_T025_150 ./flexwin < $input > $output cd $syndir -if [ -f $dir.tar.gz ]; then - echo rm $dir.tar.gz - rm $dir.tar.gz -fi +if [ -f $dir.tar.gz ]; then + echo rm $dir.tar.gz + rm $dir.tar.gz +fi tar -czvf $dir.tar.gz $dir rm -rf $dir echo flexwin done successfully diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/FORWARD_ADJOINT/XSRC_MEASURE_ADJ/xcheck_finish_measure.sh b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/FORWARD_ADJOINT/XSRC_MEASURE_ADJ/xcheck_finish_measure.sh index cd90a8a0c..d6438b06a 100755 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/FORWARD_ADJOINT/XSRC_MEASURE_ADJ/xcheck_finish_measure.sh +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/FORWARD_ADJOINT/XSRC_MEASURE_ADJ/xcheck_finish_measure.sh @@ -15,24 +15,24 @@ ext="T"$ext1"_"$ext2 -if [ ! -f $eventfile ]; then - echo WRONG! NO $eventfile - exit -fi -while read line -do - - cmtid=`echo $line | awk -F"_" '{print $NF}'` - mea_input="XMEASUREMENT_INPUT_"$iter"/MEASUREMENT_"$cmtid"_"$ext - mea_output="../SYN_"$iter"/"$line"_MT_"$ext - - nwin=`sed -n '5p' $mea_input` - - nadj=`ls $mea_output/*.adj | wc -l` - - echo $line $nwin $nadj - if [ $nwin -ne $nadj ]; then - echo WRONG!!!! - fi - -done < $eventfile +if [ ! -f $eventfile ]; then + echo WRONG! NO $eventfile + exit +fi +while read line +do + + cmtid=`echo $line | awk -F"_" '{print $NF}'` + mea_input="XMEASUREMENT_INPUT_"$iter"/MEASUREMENT_"$cmtid"_"$ext + mea_output="../SYN_"$iter"/"$line"_MT_"$ext + + nwin=`sed -n '5p' $mea_input` + + nadj=`ls $mea_output/*.adj | wc -l` + + echo $line $nwin $nadj + if [ $nwin -ne $nadj ]; then + echo WRONG!!!! + fi + +done < $eventfile diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/FORWARD_ADJOINT/XSRC_MEASURE_ADJ/xcheck_finish_rotation.sh b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/FORWARD_ADJOINT/XSRC_MEASURE_ADJ/xcheck_finish_rotation.sh index e1f0e4928..5c56d1ad9 100755 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/FORWARD_ADJOINT/XSRC_MEASURE_ADJ/xcheck_finish_rotation.sh +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/FORWARD_ADJOINT/XSRC_MEASURE_ADJ/xcheck_finish_rotation.sh @@ -15,31 +15,31 @@ ext="T"$ext1"_"$ext2 -if [ ! -f $eventfile ]; then - echo WRONG! NO $eventfile - exit -fi -while read line -do +if [ ! -f $eventfile ]; then + echo WRONG! NO $eventfile + exit +fi +while read line +do - cmtid=`echo $line | awk -F"_" '{print $NF}'` - mea_output="../SYN_"$iter"/"$line"_ADJ_"$ext - adjstafile="../SYN_"$iter"/"$line"_ADJ_"$ext"/STATIONS_ADJOINT" + cmtid=`echo $line | awk -F"_" '{print $NF}'` + mea_output="../SYN_"$iter"/"$line"_ADJ_"$ext + adjstafile="../SYN_"$iter"/"$line"_ADJ_"$ext"/STATIONS_ADJOINT" - if [ ! -f $adjstafile ] ;then - echo WRONG!!! - fi + if [ ! -f $adjstafile ] ;then + echo WRONG!!! + fi - n=`wc -l $adjstafile | awk '{print $1}'` - n1=`echo "($n*3)" | bc -l` + n=`wc -l $adjstafile | awk '{print $1}'` + n1=`echo "($n*3)" | bc -l` - nadj=`ls $mea_output/*LH[ENZ].adj | wc -l` - - echo $line $n1 $nadj + nadj=`ls $mea_output/*LH[ENZ].adj | wc -l` - if [ $n1 -ne $nadj ]; then - echo WRONG!!!! - fi + echo $line $n1 $nadj -done < $eventfile + if [ $n1 -ne $nadj ]; then + echo WRONG!!!! + fi + +done < $eventfile diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/FORWARD_ADJOINT/XSRC_MEASURE_ADJ/xcombine_adj_src.sh b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/FORWARD_ADJOINT/XSRC_MEASURE_ADJ/xcombine_adj_src.sh index 32990c356..f8887d1d1 100755 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/FORWARD_ADJOINT/XSRC_MEASURE_ADJ/xcombine_adj_src.sh +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/FORWARD_ADJOINT/XSRC_MEASURE_ADJ/xcombine_adj_src.sh @@ -3,7 +3,7 @@ # Princeton University, New Jersey, USA # Last modified: Thu Aug 26 15:08:23 EDT 2010 -# This script uses combine_adj_src.pl to combine two +# This script uses combine_adj_src.pl to combine two # sets of adjoint sources @@ -11,40 +11,40 @@ eventfile=../EVENTID_CENTER/XEVENTID iter=M18 -while read line -do - echo $line - - cmtid=`echo $line | awk -F"_" '{print $NF}'` - adjdir1="../SYN_"$iter"/CMTSOLUTION_"$cmtid"_ADJ_T015_040" - adjdir2="../SYN_"$iter"/CMTSOLUTION_"$cmtid"_ADJ_T025_150" - adjdir_new="../SYN_"$iter"/CMTSOLUTION_"$cmtid"_ADJ_comb" - - stafile1="../SYN_"$iter"/CMTSOLUTION_"$cmtid"_ADJ_T015_040/STATIONS_ADJOINT" - stafile2="../SYN_"$iter"/CMTSOLUTION_"$cmtid"_ADJ_T025_150/STATIONS_ADJOINT" - stafile_new="../SYN_"$iter"/CMTSOLUTION_"$cmtid"_ADJ_comb/STATIONS_ADJOINT" - - if [ ! -d $adjdir1 ]; then - echo WRONG! NO $adjdir1 - exit - fi - if [ ! -d $adjdir2 ]; then - echo WRONG! NO $adjdir2 - exit - fi - if [ ! -f $stafile1 ]; then - echo WRONG! NO $stafile1 - exit - fi - if [ ! -f $stafile2 ]; then - echo WRONG! NO $stafile2 - exit - fi - if [ ! -d $adjdir_new ]; then - echo mkdir $adjdir_new - mkdir $adjdir_new - fi - - ./combine_adj_src.pl $adjdir1 $adjdir2 $adjdir_new $stafile1 $stafile2 $stafile_new - -done < $eventfile +while read line +do + echo $line + + cmtid=`echo $line | awk -F"_" '{print $NF}'` + adjdir1="../SYN_"$iter"/CMTSOLUTION_"$cmtid"_ADJ_T015_040" + adjdir2="../SYN_"$iter"/CMTSOLUTION_"$cmtid"_ADJ_T025_150" + adjdir_new="../SYN_"$iter"/CMTSOLUTION_"$cmtid"_ADJ_comb" + + stafile1="../SYN_"$iter"/CMTSOLUTION_"$cmtid"_ADJ_T015_040/STATIONS_ADJOINT" + stafile2="../SYN_"$iter"/CMTSOLUTION_"$cmtid"_ADJ_T025_150/STATIONS_ADJOINT" + stafile_new="../SYN_"$iter"/CMTSOLUTION_"$cmtid"_ADJ_comb/STATIONS_ADJOINT" + + if [ ! -d $adjdir1 ]; then + echo WRONG! NO $adjdir1 + exit + fi + if [ ! -d $adjdir2 ]; then + echo WRONG! NO $adjdir2 + exit + fi + if [ ! -f $stafile1 ]; then + echo WRONG! NO $stafile1 + exit + fi + if [ ! -f $stafile2 ]; then + echo WRONG! NO $stafile2 + exit + fi + if [ ! -d $adjdir_new ]; then + echo mkdir $adjdir_new + mkdir $adjdir_new + fi + + ./combine_adj_src.pl $adjdir1 $adjdir2 $adjdir_new $stafile1 $stafile2 $stafile_new + +done < $eventfile diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/FORWARD_ADJOINT/XSRC_MEASURE_ADJ/xrotate_adj_src.sh b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/FORWARD_ADJOINT/XSRC_MEASURE_ADJ/xrotate_adj_src.sh index 346d7245a..25f0cb34c 100755 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/FORWARD_ADJOINT/XSRC_MEASURE_ADJ/xrotate_adj_src.sh +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/FORWARD_ADJOINT/XSRC_MEASURE_ADJ/xrotate_adj_src.sh @@ -3,7 +3,7 @@ # Princeton University, New Jersey, USA # Last modified: Fri Jan 21 14:54:09 EST 2011 -# This script is used to generate adjoint source for ENZ component +# This script is used to generate adjoint source for ENZ component eventfile=../EVENTID_CENTER/XEVENTID iter=M18 @@ -14,93 +14,93 @@ ext1=`printf "%03i\n" $fmin` ext2=`printf "%03i\n" $fmax` ext="T"$ext1"_"$ext2 -if [ ! -f $eventfile ] ;then - echo WRONG! NO $eventfile - exit -fi - - -while read line -do - - echo $line - cmtid=`echo $line | awk -F"_" '{print $NF}'` - cmtfile="../CMTSOLUTION_CENTER/CMTSOLUTION_"$cmtid - stafile="../STATIONS_CENTER/STATIONS.ORFEUS" - meaoutput="../SYN_"$iter"/CMTSOLUTION_"$cmtid"_MT_"$ext - adjoutput="../SYN_"$iter"/CMTSOLUTION_"$cmtid"_ADJ_"$ext -# datdir="../DATASET_EUROPE/CMTSOLUTION_"$cmtid -# syndir="../SYN_"$iter"/CMTSOLUTION_"$cmtid -# mefile="XMEASUREMENT_INPUT_"$iter"/MEASUREMENT_"$cmtid"_"$ext - - if [ ! -f $cmtfile ]; then - echo WRONG! NO $cmtfile - exit - fi - if [ ! -f $stafile ]; then - echo WRONG! NO $stafile - exit - fi - if [ ! -d $meaoutput ]; then - echo WRONG! NO $meaoutput - exit - fi - if [ ! -d $adjoutput ]; then - echo MKDIR $adjoutput - mkdir $adjoutput - fi -# if [ ! -d $datdir ] ;then -# echo WRONG! NO $datdir -# exit -# fi -# if [ ! -d $syndir ]; then -# echo WRONG! NO $syndir -# exit -# fi -# if [ ! -f $mefile ]; then -# echo WRONG! NO $mefile -# exit -# fi - - - # rotate adjoint source - ./prepare_adj_src.pl -m $cmtfile -s $stafile -z LH -o $adjoutput $meaoutput/*.adj - - # plot adjoint source - while read name - do - - sta=`echo $name | awk '{print $1}'` - net=`echo $name | awk '{print $2}'` - - - for comp in Z E N R T - do - #if [ $ext == "T050_150" ]; then - #if [ $ext == "T040_150" ]; then - fileold=$adjoutput"/"$sta"."$net".LH"$comp".iker07.adj" - #elif [ $ext == "T015_050" ]; then - #elif [ $ext == "T015_040" ]; then - # fileold=$adjoutput"/"$sta"."$net".LH"$comp".iker05.adj" - #else - # echo WRONG! $ext - # exit - #fi - #if [ ! -f $fileold ]; then - # echo WRONG! NO $fileold - # exit - #fi - filenew=$adjoutput"/"$sta"."$net".LH"$comp".adj" - if [ -f $fileold ]; then - mv $fileold $filenew - fi - done - - - done < STATIONS_ADJOINT - - # remove station file - mv STATIONS_ADJOINT $adjoutput/ +if [ ! -f $eventfile ] ;then + echo WRONG! NO $eventfile + exit +fi + + +while read line +do + + echo $line + cmtid=`echo $line | awk -F"_" '{print $NF}'` + cmtfile="../CMTSOLUTION_CENTER/CMTSOLUTION_"$cmtid + stafile="../STATIONS_CENTER/STATIONS.ORFEUS" + meaoutput="../SYN_"$iter"/CMTSOLUTION_"$cmtid"_MT_"$ext + adjoutput="../SYN_"$iter"/CMTSOLUTION_"$cmtid"_ADJ_"$ext +# datdir="../DATASET_EUROPE/CMTSOLUTION_"$cmtid +# syndir="../SYN_"$iter"/CMTSOLUTION_"$cmtid +# mefile="XMEASUREMENT_INPUT_"$iter"/MEASUREMENT_"$cmtid"_"$ext + + if [ ! -f $cmtfile ]; then + echo WRONG! NO $cmtfile + exit + fi + if [ ! -f $stafile ]; then + echo WRONG! NO $stafile + exit + fi + if [ ! -d $meaoutput ]; then + echo WRONG! NO $meaoutput + exit + fi + if [ ! -d $adjoutput ]; then + echo MKDIR $adjoutput + mkdir $adjoutput + fi +# if [ ! -d $datdir ] ;then +# echo WRONG! NO $datdir +# exit +# fi +# if [ ! -d $syndir ]; then +# echo WRONG! NO $syndir +# exit +# fi +# if [ ! -f $mefile ]; then +# echo WRONG! NO $mefile +# exit +# fi + + + # rotate adjoint source + ./prepare_adj_src.pl -m $cmtfile -s $stafile -z LH -o $adjoutput $meaoutput/*.adj + + # plot adjoint source + while read name + do + + sta=`echo $name | awk '{print $1}'` + net=`echo $name | awk '{print $2}'` + + + for comp in Z E N R T + do + #if [ $ext == "T050_150" ]; then + #if [ $ext == "T040_150" ]; then + fileold=$adjoutput"/"$sta"."$net".LH"$comp".iker07.adj" + #elif [ $ext == "T015_050" ]; then + #elif [ $ext == "T015_040" ]; then + # fileold=$adjoutput"/"$sta"."$net".LH"$comp".iker05.adj" + #else + # echo WRONG! $ext + # exit + #fi + #if [ ! -f $fileold ]; then + # echo WRONG! NO $fileold + # exit + #fi + filenew=$adjoutput"/"$sta"."$net".LH"$comp".adj" + if [ -f $fileold ]; then + mv $fileold $filenew + fi + done + + + done < STATIONS_ADJOINT + + # remove station file + mv STATIONS_ADJOINT $adjoutput/ done < $eventfile diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/FORWARD_ADJOINT/XSRC_MEASURE_ADJ/xrun_measure_adj.sh b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/FORWARD_ADJOINT/XSRC_MEASURE_ADJ/xrun_measure_adj.sh index b01f79695..ed0f7b602 100755 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/FORWARD_ADJOINT/XSRC_MEASURE_ADJ/xrun_measure_adj.sh +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/FORWARD_ADJOINT/XSRC_MEASURE_ADJ/xrun_measure_adj.sh @@ -5,10 +5,10 @@ # this script is used to run measure_adj parallelly -# INPUT : measurement from FLEXWIN as, XMEASUREMENT_INPUT_M00/MEASUREMENT_012202A_T050_120 -# OUTPUT: adjoint source saved in as, ../SYN_M00/CMTSOLUTION_012204A_MT_T050_120 -# window_chi and window_index in XWINDOW_OUTPUT_M00/WINDOW_CHI_012202A_T050_120 and XWINDOW_OUTPUT_M00/WINDOW_INDEX_012202A_T050_120 -# outputtag in XOUTPUT_TAG_M00/OUTPUT_012202A_T050_120 +# INPUT : measurement from FLEXWIN as, XMEASUREMENT_INPUT_M00/MEASUREMENT_012202A_T050_120 +# OUTPUT: adjoint source saved in as, ../SYN_M00/CMTSOLUTION_012204A_MT_T050_120 +# window_chi and window_index in XWINDOW_OUTPUT_M00/WINDOW_CHI_012202A_T050_120 and XWINDOW_OUTPUT_M00/WINDOW_INDEX_012202A_T050_120 +# outputtag in XOUTPUT_TAG_M00/OUTPUT_012202A_T050_120 eventfile=../EVENTID_CENTER/XEVENTID @@ -20,50 +20,50 @@ ext1=`printf "%03i\n" $fmin` ext2=`printf "%03i\n" $fmax` ext="T"$ext1"_"$ext2 -if [ ! -f $eventfile ] ;then - echo WRONG! NO $eventfile - exit -fi +if [ ! -f $eventfile ] ;then + echo WRONG! NO $eventfile + exit +fi -if [ ! -d XOUTPUT_TAG_$iter ]; then - echo mkdir XOUTPUT_TAG_$iter - mkdir XOUTPUT_TAG_$iter -fi -if [ ! -d XWINDOW_OUTPUT_$iter ]; then - echo mkdir XWINDOW_OUTPUT_$iter - mkdir XWINDOW_OUTPUT_$iter -fi +if [ ! -d XOUTPUT_TAG_$iter ]; then + echo mkdir XOUTPUT_TAG_$iter + mkdir XOUTPUT_TAG_$iter +fi +if [ ! -d XWINDOW_OUTPUT_$iter ]; then + echo mkdir XWINDOW_OUTPUT_$iter + mkdir XWINDOW_OUTPUT_$iter +fi -while read line -do - echo $line - cmtid=`echo $line | awk -F"_" '{print $NF}'` - # input for measure_adj - inputfile="XMEASUREMENT_INPUT_"$iter"/MEASUREMENT_"$cmtid"_"$ext - inputfile_tag="XMEASUREMENT_INPUT_"$iter"\/MEASUREMENT_"$cmtid"_"$ext - if [ ! -f $inputfile ]; then - echo WRONG! NO $inputfile - exit - fi - outdir=`sed -n '2p' $inputfile` - if [ ! -d $outdir ]; then - echo mkdir $outdir - mkdir $outdir - fi - output="XOUTPUT_TAG_"$iter"\/OUTPUT_"$cmtid"_"$ext - meatag="#PBS -N XMEASURE_$cmtid" - syndir="..\/SYN_"$iter - mtdir="CMTSOLUTION_"$cmtid"_MT_"$ext +while read line +do + echo $line + cmtid=`echo $line | awk -F"_" '{print $NF}'` + # input for measure_adj + inputfile="XMEASUREMENT_INPUT_"$iter"/MEASUREMENT_"$cmtid"_"$ext + inputfile_tag="XMEASUREMENT_INPUT_"$iter"\/MEASUREMENT_"$cmtid"_"$ext + if [ ! -f $inputfile ]; then + echo WRONG! NO $inputfile + exit + fi + outdir=`sed -n '2p' $inputfile` + if [ ! -d $outdir ]; then + echo mkdir $outdir + mkdir $outdir + fi + output="XOUTPUT_TAG_"$iter"\/OUTPUT_"$cmtid"_"$ext + meatag="#PBS -N XMEASURE_$cmtid" + syndir="..\/SYN_"$iter + mtdir="CMTSOLUTION_"$cmtid"_MT_"$ext - sed -e "s/^#PBS -N.*$/$meatag/g" \ - -e "s/^inputfile=.*$/inputfile=$inputfile_tag/g" \ - -e "s/^output=.*$/output=$output/g" \ - -e "s/^syndir=.*$/syndir=$syndir/g" \ - -e "s/^mtdir=.*$/mtdir=$mtdir/g" \ - xrun_measure_adj_pbs.sh > xrun_measure_adj_pbs.sh.out - mv xrun_measure_adj_pbs.sh.out xrun_measure_adj_pbs.sh + sed -e "s/^#PBS -N.*$/$meatag/g" \ + -e "s/^inputfile=.*$/inputfile=$inputfile_tag/g" \ + -e "s/^output=.*$/output=$output/g" \ + -e "s/^syndir=.*$/syndir=$syndir/g" \ + -e "s/^mtdir=.*$/mtdir=$mtdir/g" \ + xrun_measure_adj_pbs.sh > xrun_measure_adj_pbs.sh.out + mv xrun_measure_adj_pbs.sh.out xrun_measure_adj_pbs.sh - qsub xrun_measure_adj_pbs.sh - sleep 10 -done < $eventfile + qsub xrun_measure_adj_pbs.sh + sleep 10 +done < $eventfile diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/FORWARD_ADJOINT/XSRC_MEASURE_ADJ/xrun_measure_adj_pbs.sh b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/FORWARD_ADJOINT/XSRC_MEASURE_ADJ/xrun_measure_adj_pbs.sh index bf988e77d..668ab5c0e 100644 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/FORWARD_ADJOINT/XSRC_MEASURE_ADJ/xrun_measure_adj_pbs.sh +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/FORWARD_ADJOINT/XSRC_MEASURE_ADJ/xrun_measure_adj_pbs.sh @@ -10,25 +10,25 @@ echo $PBS_O_WORKDIR cd $PBS_O_WORKDIR -# input and output for mt_measure_adj +# input and output for mt_measure_adj inputfile=XMEASUREMENT_INPUT_M18/MEASUREMENT_201006030432A_T015_040 output=XOUTPUT_TAG_M18/OUTPUT_201006030432A_T015_040 syndir=../SYN_M18 mtdir=CMTSOLUTION_201006030432A_MT_T015_040 echo run mt_measure_adj... -./mt_measure_adj < $inputfile > $output +./mt_measure_adj < $inputfile > $output -echo delete useless files -cd $syndir"/"$mtdir -rm *.err_* +echo delete useless files +cd $syndir"/"$mtdir +rm *.err_* -#cd $syndir -#if [ -f $mtdir.tar.gz ]; then -# echo rm $mtdir.tar.gz -# rm $mtdir.tar.gz -#fi -#tar -czvf $mtdir.tar.gz $mtdir +#cd $syndir +#if [ -f $mtdir.tar.gz ]; then +# echo rm $mtdir.tar.gz +# rm $mtdir.tar.gz +#fi +#tar -czvf $mtdir.tar.gz $mtdir #rm $mtdir/* -echo measurement done successfully +echo measurement done successfully diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/FORWARD_ADJOINT/XSRC_SEM/xparallel_adjoint_solver.sh b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/FORWARD_ADJOINT/XSRC_SEM/xparallel_adjoint_solver.sh index 7f3502042..e46b1e747 100644 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/FORWARD_ADJOINT/XSRC_SEM/xparallel_adjoint_solver.sh +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/FORWARD_ADJOINT/XSRC_SEM/xparallel_adjoint_solver.sh @@ -19,42 +19,42 @@ cat $PBS_NODEFILE > OUTPUT_FILES/compute_nodes echo "$PBS_JOBID" > OUTPUT_FILES/jobid if [ -d /scratch/hejunzhu ]; then - echo rm /scratch/hejunzhu - pbsdsh -u rm -rf /scratch/hejunzhu -fi + echo rm /scratch/hejunzhu + pbsdsh -u rm -rf /scratch/hejunzhu +fi echo mkdir local dir... -pbsdsh -u mkdir -p /scratch/hejunzhu +pbsdsh -u mkdir -p /scratch/hejunzhu echo change simulation type... -./change_simulation_type.pl -F +./change_simulation_type.pl -F echo copying mesh file... -mpiexec -np 100 ./xcopy_local_forward +mpiexec -np 100 ./xcopy_local_forward echo submit job... mpiexec -np 100 ./xspecfem3D -echo solver done +echo solver done -echo tar the synthetics +echo tar the synthetics cd OUTPUT_FILES -#tar -czvf SEM.forward.tar.gz *.sac +#tar -czvf SEM.forward.tar.gz *.sac rm *.sac cd ../ -echo end tar +echo end tar echo change simulation type again... -./change_simulation_type.pl -b +./change_simulation_type.pl -b -echo sumit adjoint simulation -mpiexec -np 100 ./xspecfem3D +echo sumit adjoint simulation +mpiexec -np 100 ./xspecfem3D -echo tar the synthetics +echo tar the synthetics cd OUTPUT_FILES -#tar -czvf SEM.backward.tar.gz *.sac -rm *.sac -cd ../ -echo end tar +#tar -czvf SEM.backward.tar.gz *.sac +rm *.sac +cd ../ +echo end tar echo collect kernels... pbsdsh -u bash -c 'cp -p /scratch/hejunzhu/proc*_reg1_bulk_betav_kernel.bin $PBS_O_WORKDIR/KERNEL/' @@ -62,7 +62,7 @@ pbsdsh -u bash -c 'cp -p /scratch/hejunzhu/proc*_reg1_bulk_betah_kernel.bin $PBS pbsdsh -u bash -c 'cp -p /scratch/hejunzhu/proc*_reg1_bulk_c_kernel.bin $PBS_O_WORKDIR/KERNEL/' pbsdsh -u bash -c 'cp -p /scratch/hejunzhu/proc*_reg1_eta_kernel.bin $PBS_O_WORKDIR/KERNEL/' pbsdsh -u bash -c 'cp -p /scratch/hejunzhu/proc*_reg1_rho_kernel.bin $PBS_O_WORKDIR/KERNEL/' -pbsdsh -u bash -c 'cp -p /scratch/hejunzhu/proc*_reg1_hess_kernel.bin $PBS_O_WORKDIR/KERNEL/' +pbsdsh -u bash -c 'cp -p /scratch/hejunzhu/proc*_reg1_hess_kernel.bin $PBS_O_WORKDIR/KERNEL/' diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/FORWARD_ADJOINT/XSRC_SEM/xparallel_forward_solver.sh b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/FORWARD_ADJOINT/XSRC_SEM/xparallel_forward_solver.sh index 770707724..37bc4c752 100644 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/FORWARD_ADJOINT/XSRC_SEM/xparallel_forward_solver.sh +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/FORWARD_ADJOINT/XSRC_SEM/xparallel_forward_solver.sh @@ -20,20 +20,20 @@ echo "$PBS_JOBID" > OUTPUT_FILES/jobid if [ -d /scratch/hejunzhu ]; then - echo rm /scratch/hejunzhu - pbsdsh -u rm -rf /scratch/hejunzhu -fi + echo rm /scratch/hejunzhu + pbsdsh -u rm -rf /scratch/hejunzhu +fi echo mkdir local dir... -pbsdsh -u mkdir -p /scratch/hejunzhu +pbsdsh -u mkdir -p /scratch/hejunzhu echo copying mesh file... -mpiexec -np 100 ./xcopy_local_forward +mpiexec -np 100 ./xcopy_local_forward echo submit job... mpiexec -np 100 ./xspecfem3D echo solver done successfully -#echo clean the folder +#echo clean the folder #mv OUTPUT_FILES/*.sac SYN/tmp/ diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/FORWARD_ADJOINT/XSRC_SEM/xparallel_mesher.sh b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/FORWARD_ADJOINT/XSRC_SEM/xparallel_mesher.sh index ac265d9b3..4b23ac948 100644 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/FORWARD_ADJOINT/XSRC_SEM/xparallel_mesher.sh +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/FORWARD_ADJOINT/XSRC_SEM/xparallel_mesher.sh @@ -16,9 +16,9 @@ cd $PBS_O_WORKDIR local_dir=`grep LOCAL_PATH DATA/Par_file | cut -d '=' -f 2` if [ ! -d $local_dir ]; then - mkdir $local_dir - echo create $local_dir -fi + mkdir $local_dir + echo create $local_dir +fi mpiexec -np 100 ./xmeshfem3D echo mesher done successfully diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/FORWARD_ADJOINT/xcheck_process_dat.sh b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/FORWARD_ADJOINT/xcheck_process_dat.sh index 71528a1a5..cbca06547 100755 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/FORWARD_ADJOINT/xcheck_process_dat.sh +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/FORWARD_ADJOINT/xcheck_process_dat.sh @@ -4,12 +4,12 @@ ntot=0 for line in XPROC_DAT_* do - n=`wc -l $line | awk '{print $1}'` - ntot=`echo $ntot +1 | bc -l` - tag="successfully" - tag1="DONE" - text=`grep $tag $line` - text1=`grep $tag1 $line` - echo $line $text $text1 $n -done + n=`wc -l $line | awk '{print $1}'` + ntot=`echo $ntot +1 | bc -l` + tag="successfully" + tag1="DONE" + text=`grep $tag $line` + text1=`grep $tag1 $line` + echo $line $text $text1 $n +done echo found $ntot finshed diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/FORWARD_ADJOINT/xcollect_syn.sh b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/FORWARD_ADJOINT/xcollect_syn.sh index 42040ea7b..460f2f1db 100755 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/FORWARD_ADJOINT/xcollect_syn.sh +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/FORWARD_ADJOINT/xcollect_syn.sh @@ -7,50 +7,50 @@ eventfile=../SHARE_FILES/EVENTID_CENTER/XEVENTID iter=M18 -# Check files +# Check files if [ ! -f $eventfile ]; then - echo WRONG! NO $eventfile - exit -fi + echo WRONG! NO $eventfile + exit +fi if [ ! -d SYN_$iter ]; then - echo mkdir SYN_$iter - mkdir SYN_$iter -fi + echo mkdir SYN_$iter + mkdir SYN_$iter +fi -while read line +while read line do - echo $line - cmtid=`echo $line | awk -F"_" '{print $2}'` - mefile=MEASUREMENT_CENTER/MEASUREMENT_$cmtid - dir="SYN_"$iter"/"$line - if [ ! -d $dir ]; then - echo mkdir $dir - mkdir $dir - fi - if [ ! -f $mefile ]; then - echo WRONG! NO $mefile - exit - fi - - while read name - do - if [ ! -f FORWARD_$iter/$line/OUTPUT_FILES/$name.LHZ.sem.sac ]; then - echo WRONG! NO FORWARD_$iter/$line/OUTPUT_FILES/$name.LHZ.sem.sac - exit - fi - if [ ! -f FORWARD_$iter/$line/OUTPUT_FILES/$name.LHE.sem.sac ]; then - echo WRONG! NO FORWARD_$iter/$line/OUTPUT_FILES/$name.LHE.sem.sac - exit - fi - if [ ! -f FORWARD_$iter/$line/OUTPUT_FILES/$name.LHN.sem.sac ]; then - echo WRONG! NO FORWARD_$iter/$line/OUTPUT_FILES/$name.LHN.sem.sac - exit - fi - - - cp FORWARD_$iter/$line/OUTPUT_FILES/$name.*.sac SYN_$iter/$line - done < $mefile - -done < $eventfile + echo $line + cmtid=`echo $line | awk -F"_" '{print $2}'` + mefile=MEASUREMENT_CENTER/MEASUREMENT_$cmtid + dir="SYN_"$iter"/"$line + if [ ! -d $dir ]; then + echo mkdir $dir + mkdir $dir + fi + if [ ! -f $mefile ]; then + echo WRONG! NO $mefile + exit + fi + + while read name + do + if [ ! -f FORWARD_$iter/$line/OUTPUT_FILES/$name.LHZ.sem.sac ]; then + echo WRONG! NO FORWARD_$iter/$line/OUTPUT_FILES/$name.LHZ.sem.sac + exit + fi + if [ ! -f FORWARD_$iter/$line/OUTPUT_FILES/$name.LHE.sem.sac ]; then + echo WRONG! NO FORWARD_$iter/$line/OUTPUT_FILES/$name.LHE.sem.sac + exit + fi + if [ ! -f FORWARD_$iter/$line/OUTPUT_FILES/$name.LHN.sem.sac ]; then + echo WRONG! NO FORWARD_$iter/$line/OUTPUT_FILES/$name.LHN.sem.sac + exit + fi + + + cp FORWARD_$iter/$line/OUTPUT_FILES/$name.*.sac SYN_$iter/$line + done < $mefile + +done < $eventfile diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/FORWARD_ADJOINT/xgen_measurement.sh b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/FORWARD_ADJOINT/xgen_measurement.sh index b88690a23..cf32f0926 100755 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/FORWARD_ADJOINT/xgen_measurement.sh +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/FORWARD_ADJOINT/xgen_measurement.sh @@ -1,7 +1,7 @@ #!/bin/sh -# This script is used to generate a file which contain the same -# data and synthetics -# format for MEASUREMENT file is sta.net stlo stla dist az +# This script is used to generate a file which contain the same +# data and synthetics +# format for MEASUREMENT file is sta.net stlo stla dist az # Hejun Zhu, Jun 24, 2010 eventfile=../SHARE_FILES/EVENTID_CENTER/XEVENTID @@ -9,40 +9,40 @@ iter=M00 while read line do - echo $line - eid=`echo $line | awk -F"_" '{print $NF}'` - datdir=DATASET_EUROPE/$line - syndir="SYN_"$iter"/"$line - mefile="MEASUREMENT_CENTER/MEASUREMENT_"$eid - - if [ -f $mefile ]; then - echo deleting $mefile - rm $mefile - fi - if [ ! -d $datdir ]; then - echo WRONG! NO $datdir - exit - fi - if [ ! -d $syndir ]; then - echo WRONG! NO $syndir - exit - fi - - - for file1 in $datdir/*BHE.sac; do - sta=`echo $file1 | awk -F"/" '{print $NF}' | awk -F"." '{print $1}'` - net=`echo $file1 | awk -F"/" '{print $NF}' | awk -F"." '{print $2}'` - - file2=$datdir"/"$sta"."$net".BHE.sac" - - - file4=$syndir"/"$sta"."$net".LHE.sem.sac" - if [ -f $file4 ] ; then - #echo found $sta $net for $line - #echo $sta"."$net $stlo $stla $dist $az >> $mefile - echo $sta"."$net >> $mefile - fi - done + echo $line + eid=`echo $line | awk -F"_" '{print $NF}'` + datdir=DATASET_EUROPE/$line + syndir="SYN_"$iter"/"$line + mefile="MEASUREMENT_CENTER/MEASUREMENT_"$eid + + if [ -f $mefile ]; then + echo deleting $mefile + rm $mefile + fi + if [ ! -d $datdir ]; then + echo WRONG! NO $datdir + exit + fi + if [ ! -d $syndir ]; then + echo WRONG! NO $syndir + exit + fi + + + for file1 in $datdir/*BHE.sac; do + sta=`echo $file1 | awk -F"/" '{print $NF}' | awk -F"." '{print $1}'` + net=`echo $file1 | awk -F"/" '{print $NF}' | awk -F"." '{print $2}'` + + file2=$datdir"/"$sta"."$net".BHE.sac" + + + file4=$syndir"/"$sta"."$net".LHE.sem.sac" + if [ -f $file4 ] ; then + #echo found $sta $net for $line + #echo $sta"."$net $stlo $stla $dist $az >> $mefile + echo $sta"."$net >> $mefile + fi + done done < $eventfile diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/FORWARD_ADJOINT/xsubmit_adjoint_simulation.sh b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/FORWARD_ADJOINT/xsubmit_adjoint_simulation.sh index c78c6dd23..c7d33d2c7 100755 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/FORWARD_ADJOINT/xsubmit_adjoint_simulation.sh +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/FORWARD_ADJOINT/xsubmit_adjoint_simulation.sh @@ -1,7 +1,7 @@ #!/bin/sh -# This script is used to submit adjoint simulation -# require adjoint source and station file first +# This script is used to submit adjoint simulation +# require adjoint source and station file first # Hejun Zhu, Aug 25, 2010 @@ -19,127 +19,127 @@ ext="comb" parent="XSRC_SEM" cmtcenter="../SHARE_FILES/CMTSOLUTION_CENTER" stacenter="../SHARE_FILES/STATION_CENTER" -xcopy="COPY_LOCAL/xcopy_local_forward" +xcopy="COPY_LOCAL/xcopy_local_forward" xchange="PERL_SRC/change_simulation_type.pl" pnm=ADJOINT_$iter -if [ ! -f $eventfile ]; then - echo WRONG! NO $eventfile - exit -fi +if [ ! -f $eventfile ]; then + echo WRONG! NO $eventfile + exit +fi if [ ! -d $pnm ]; then - echo mkdir $pnm ... - mkdir $pnm -fi -if [ ! -d $cmtcenter ]; then - echo WRONG! NO $cmtcenter - exit -fi -if [ ! -f $xcopy ]; then - echo WRONG! NO $xcopy - exit -fi -if [ ! -f $xchange ]; then - echo WRONG! NO $xchange - exit -fi - -while read line -do - dir=$pnm"/"$line - eid=`echo $line | awk -F"_" '{print $NF}'` - stafile=STATION_$eid - - if [ ! -d $dir ]; then - echo " make dir... " - mkdir $dir - fi - if [ ! -d $dir/DATA ]; then - echo " make DATA ... " - mkdir $dir/DATA - fi - - - adjdir="SYN_"$iter"/"$line"_ADJ_"$ext - if [ ! -d $adjdir ]; then - echo WRONG! NO $adjdir - exit - fi - - - # only copy useful part of the code to sub directory - cp -r $parent/DATA/Par_file $dir/DATA - cp -r $parent/DATA/STATIONS $dir/DATA - cp -r $parent/DATA/CMTSOLUTION $dir/DATA - cp -r $parent/OUTPUT_FILES $dir/ - cp -r $parent/SEM $dir/ - cp -r $parent/KERNEL $dir/ - cp $parent/xparallel_adjoint_solver.sh $dir/ - cp $parent/xspecfem3D $dir/ - cp $xcopy $dir/ - cp $xchange $dir/ - - # distribute adjoint source and stations - echo distribute adjoint sources and stations - if [ ! -f $adjdir/STATIONS_ADJOINT ]; then - echo WRONG! NO $adjdir/STATIONS_ADJOINT - exit - fi - cp $adjdir/*.LH[ZEN].adj $dir/SEM/ - cp $adjdir/STATIONS_ADJOINT $dir/DATA - - cat $cmtcenter/$line > $dir/DATA/CMTSOLUTION - cat $stacenter/$stafile > $dir/DATA/STATIONS - - cd $dir/DATA - - if [ ! -f Par_file ]; then - echo WRONG! NO Par_file - exit - fi - echo " change Par_file... " - path="\/scratch\/hejunzhu" - sed -e "s/^LOCAL_PATH.*$/LOCAL_PATH = $path/g" \ - Par_file > Par_file_out - mv Par_file_out Par_file - - - cd .. - if [ ! -f xparallel_adjoint_solver.sh ]; then - echo WRONG! NO xparallel_adjoint_solver.sh - exit - fi - echo " changing pbs file " - tag="#PBS -N $line" - sed -e "s/^#PBS -N.*$/$tag/g" xparallel_adjoint_solver.sh > xparallel_adjoint_solver_out.sh - mv xparallel_adjoint_solver_out.sh xparallel_adjoint_solver.sh - - - # check code exist - if [ ! -f xspecfem3D ] ;then - echo WRONG! NO xspecfem3D - exit - fi - if [ ! -f xcopy_local_forward ]; then - echo WRONG! NO xcopy_local_forward - exit - fi - if [ ! -f change_simulation_type.pl ]; then - echo WRONG! NO change_simulation_type.pl - exit - fi - mimic=`grep USE_ATTENUATION_MIMIC OUTPUT_FILES/values_from_mesher.h | awk -F"=" '{print $NF}'` - if [ $mimic != ".true." ]; then - echo WRONG! NEED reompile solver with MIMIC attenuation - exit - fi - - - echo submitting job - qsub xparallel_adjoint_solver.sh - - sleep 3 - cd ../../ - -done < $eventfile + echo mkdir $pnm ... + mkdir $pnm +fi +if [ ! -d $cmtcenter ]; then + echo WRONG! NO $cmtcenter + exit +fi +if [ ! -f $xcopy ]; then + echo WRONG! NO $xcopy + exit +fi +if [ ! -f $xchange ]; then + echo WRONG! NO $xchange + exit +fi + +while read line +do + dir=$pnm"/"$line + eid=`echo $line | awk -F"_" '{print $NF}'` + stafile=STATION_$eid + + if [ ! -d $dir ]; then + echo " make dir... " + mkdir $dir + fi + if [ ! -d $dir/DATA ]; then + echo " make DATA ... " + mkdir $dir/DATA + fi + + + adjdir="SYN_"$iter"/"$line"_ADJ_"$ext + if [ ! -d $adjdir ]; then + echo WRONG! NO $adjdir + exit + fi + + + # only copy useful part of the code to sub directory + cp -r $parent/DATA/Par_file $dir/DATA + cp -r $parent/DATA/STATIONS $dir/DATA + cp -r $parent/DATA/CMTSOLUTION $dir/DATA + cp -r $parent/OUTPUT_FILES $dir/ + cp -r $parent/SEM $dir/ + cp -r $parent/KERNEL $dir/ + cp $parent/xparallel_adjoint_solver.sh $dir/ + cp $parent/xspecfem3D $dir/ + cp $xcopy $dir/ + cp $xchange $dir/ + + # distribute adjoint source and stations + echo distribute adjoint sources and stations + if [ ! -f $adjdir/STATIONS_ADJOINT ]; then + echo WRONG! NO $adjdir/STATIONS_ADJOINT + exit + fi + cp $adjdir/*.LH[ZEN].adj $dir/SEM/ + cp $adjdir/STATIONS_ADJOINT $dir/DATA + + cat $cmtcenter/$line > $dir/DATA/CMTSOLUTION + cat $stacenter/$stafile > $dir/DATA/STATIONS + + cd $dir/DATA + + if [ ! -f Par_file ]; then + echo WRONG! NO Par_file + exit + fi + echo " change Par_file... " + path="\/scratch\/hejunzhu" + sed -e "s/^LOCAL_PATH.*$/LOCAL_PATH = $path/g" \ + Par_file > Par_file_out + mv Par_file_out Par_file + + + cd .. + if [ ! -f xparallel_adjoint_solver.sh ]; then + echo WRONG! NO xparallel_adjoint_solver.sh + exit + fi + echo " changing pbs file " + tag="#PBS -N $line" + sed -e "s/^#PBS -N.*$/$tag/g" xparallel_adjoint_solver.sh > xparallel_adjoint_solver_out.sh + mv xparallel_adjoint_solver_out.sh xparallel_adjoint_solver.sh + + + # check code exist + if [ ! -f xspecfem3D ] ;then + echo WRONG! NO xspecfem3D + exit + fi + if [ ! -f xcopy_local_forward ]; then + echo WRONG! NO xcopy_local_forward + exit + fi + if [ ! -f change_simulation_type.pl ]; then + echo WRONG! NO change_simulation_type.pl + exit + fi + mimic=`grep USE_ATTENUATION_MIMIC OUTPUT_FILES/values_from_mesher.h | awk -F"=" '{print $NF}'` + if [ $mimic != ".true." ]; then + echo WRONG! NEED reompile solver with MIMIC attenuation + exit + fi + + + echo submitting job + qsub xparallel_adjoint_solver.sh + + sleep 3 + cd ../../ + +done < $eventfile diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/FORWARD_ADJOINT/xsubmit_forward_simulation.sh b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/FORWARD_ADJOINT/xsubmit_forward_simulation.sh index 6404ced5e..1c3598a43 100755 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/FORWARD_ADJOINT/xsubmit_forward_simulation.sh +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/FORWARD_ADJOINT/xsubmit_forward_simulation.sh @@ -2,9 +2,9 @@ # generate and clean code dir for several simulations # Input: cmtid: CMTSOLUTION id # iter: iteration number -# opt: 1-generate code -# 2-clean code -# 3-clean /scratch/lustre/hejunzhu/*** directory +# opt: 1-generate code +# 2-clean code +# 3-clean /scratch/lustre/hejunzhu/*** directory # Hejun Zhu, Mar 23, 2010 eventfile="../SHARE_FILES/EVENTID_CENTER/XEVENTID" @@ -13,105 +13,105 @@ iter=M00 parent="XSRC_SEM" cmtcenter="../SHARE_FILES/CMTSOLUTION_CENTER" stacenter="../SHARE_FILES/STATION_CENTER" -xcopy="COPY_LOCAL/xcopy_local_forward" +xcopy="COPY_LOCAL/xcopy_local_forward" pnm=FORWARD_$iter if [ ! -f $eventfile ]; then - echo WRONG! NO $eventfile - exit -fi + echo WRONG! NO $eventfile + exit +fi if [ ! -d $pnm ]; then - echo mkdir $pnm ... - mkdir $pnm -fi -if [ ! -d $cmtcenter ]; then - echo WRONG! NO $cmtcenter - exit + echo mkdir $pnm ... + mkdir $pnm +fi +if [ ! -d $cmtcenter ]; then + echo WRONG! NO $cmtcenter + exit +fi +if [ ! -d $stacenter ]; then + echo WRONG! NO $stacenter + exit +fi +if [ ! -f $xcopy ]; then + echo WRONG! NO $xcopy + exit fi -if [ ! -d $stacenter ]; then - echo WRONG! NO $stacenter - exit -fi -if [ ! -f $xcopy ]; then - echo WRONG! NO $xcopy - exit -fi while read line do - echo "*** processing $line ***" - - dir=$pnm"/"$line - eid=`echo $line | awk -F"_" '{print $NF}'` - stafile=STATION_$eid - - if [ ! -d $dir ]; then - echo " make dir... " - mkdir $dir - fi - - if [ ! -d $dir/DATA ]; then - echo " make DATA" - mkdir $dir/DATA - fi - - # only copy useful part of the code to sub directory - cp -r $parent/DATA/Par_file $dir/DATA/ - cp -r $parent/DATA/STATIONS $dir/DATA/ - cp -r $parent/DATA/CMTSOLUTION $dir/DATA/ - cp -r $parent/OUTPUT_FILES $dir/ - cp $parent/xparallel_forward_solver.sh $dir/ - cp $parent/xspecfem3D $dir/ - cp $xcopy $dir/ + echo "*** processing $line ***" + + dir=$pnm"/"$line + eid=`echo $line | awk -F"_" '{print $NF}'` + stafile=STATION_$eid + + if [ ! -d $dir ]; then + echo " make dir... " + mkdir $dir + fi + + if [ ! -d $dir/DATA ]; then + echo " make DATA" + mkdir $dir/DATA + fi + + # only copy useful part of the code to sub directory + cp -r $parent/DATA/Par_file $dir/DATA/ + cp -r $parent/DATA/STATIONS $dir/DATA/ + cp -r $parent/DATA/CMTSOLUTION $dir/DATA/ + cp -r $parent/OUTPUT_FILES $dir/ + cp $parent/xparallel_forward_solver.sh $dir/ + cp $parent/xspecfem3D $dir/ + cp $xcopy $dir/ cat $cmtcenter/$line > $dir/DATA/CMTSOLUTION - cat $stacenter/$stafile > $dir/DATA/STATIONS - - cd $dir/DATA - - if [ ! -f Par_file ]; then - echo WRONG! NO Par_file - exit - fi - echo " change Par_file... " - path="\/scratch\/hejunzhu" - sed -e "s/^LOCAL_PATH.*$/LOCAL_PATH = $path/g" Par_file >Par_file_out - mv Par_file_out Par_file - - cd .. - if [ ! -f xparallel_forward_solver.sh ]; then - echo WRONG! NO xparallel_forward_solver.sh - exit - fi - echo " changing pbs file " - tag="#PBS -N $line" - sed -e "s/^#PBS -N.*$/$tag/g" xparallel_forward_solver.sh > xparallel_forward_solver_out.sh - mv xparallel_forward_solver_out.sh xparallel_forward_solver.sh - - if [ ! -f xspecfem3D ] ;then - echo WRONG! NO xspecfem3D - exit - fi - if [ ! -f xcopy_local_forward ]; then - echo WRONG! NO xcopy_local_forward - exit - fi - - mimic=`grep USE_ATTENUATION_MIMIC OUTPUT_FILES/values_from_mesher.h | awk -F"=" '{print $NF}'` - if [ $mimic != ".false." ]; then - echo WRONG! NEED reompile solver with MIMIC attenuation - exit - fi - - - echo submitting job - qsub xparallel_forward_solver.sh - - sleep 3 - - cd ../../ - + cat $stacenter/$stafile > $dir/DATA/STATIONS + + cd $dir/DATA + + if [ ! -f Par_file ]; then + echo WRONG! NO Par_file + exit + fi + echo " change Par_file... " + path="\/scratch\/hejunzhu" + sed -e "s/^LOCAL_PATH.*$/LOCAL_PATH = $path/g" Par_file >Par_file_out + mv Par_file_out Par_file + + cd .. + if [ ! -f xparallel_forward_solver.sh ]; then + echo WRONG! NO xparallel_forward_solver.sh + exit + fi + echo " changing pbs file " + tag="#PBS -N $line" + sed -e "s/^#PBS -N.*$/$tag/g" xparallel_forward_solver.sh > xparallel_forward_solver_out.sh + mv xparallel_forward_solver_out.sh xparallel_forward_solver.sh + + if [ ! -f xspecfem3D ] ;then + echo WRONG! NO xspecfem3D + exit + fi + if [ ! -f xcopy_local_forward ]; then + echo WRONG! NO xcopy_local_forward + exit + fi + + mimic=`grep USE_ATTENUATION_MIMIC OUTPUT_FILES/values_from_mesher.h | awk -F"=" '{print $NF}'` + if [ $mimic != ".false." ]; then + echo WRONG! NEED reompile solver with MIMIC attenuation + exit + fi + + + echo submitting job + qsub xparallel_forward_solver.sh + + sleep 3 + + cd ../../ + done < $eventfile diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/ITERATION_UPDATE/X01_SRC_SUM_KERNELS/XPBS_sum_kernels.sh b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/ITERATION_UPDATE/X01_SRC_SUM_KERNELS/XPBS_sum_kernels.sh index e7fd7596a..79939b1a6 100755 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/ITERATION_UPDATE/X01_SRC_SUM_KERNELS/XPBS_sum_kernels.sh +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/ITERATION_UPDATE/X01_SRC_SUM_KERNELS/XPBS_sum_kernels.sh @@ -1,7 +1,7 @@ #!/bin/sh #PBS -q tromp -#PBS -N XSUM_KERNELS +#PBS -N XSUM_KERNELS #PBS -l nodes=13:ppn=8 #PBS -l walltime=15:00:00 #PBS -j oe @@ -12,33 +12,33 @@ echo $PBS_O_WORKDIR cd $PBS_O_WORKDIR -iter=M00 +iter=M00 -input_dir=../../FORWARD_ADJOINT/ADJOINT_$iter -output_dir=../SUMMED_KERNELS_$iter +input_dir=../../FORWARD_ADJOINT/ADJOINT_$iter +output_dir=../SUMMED_KERNELS_$iter eventid=../../SHARE_FILES/EVENTID_CENTER/XEVENTID -# checking directories -if [ ! -d $input_dir ]; then - echo WRONG! NO $inputdir - exit -fi +# checking directories +if [ ! -d $input_dir ]; then + echo WRONG! NO $inputdir + exit +fi -if [ ! -f $eventid ]; then - echo WRONG! NO $eventid - exit -fi +if [ ! -f $eventid ]; then + echo WRONG! NO $eventid + exit +fi -# making directories -if [ ! -d $output_dir ]; then - echo MKDIR $output_dir - mkdir $output_dir -fi +# making directories +if [ ! -d $output_dir ]; then + echo MKDIR $output_dir + mkdir $output_dir +fi -echo submit summing kernels -mpiexec -np 100 ./xsum_kernels $input_dir $output_dir $eventid -echo done successfully +echo submit summing kernels +mpiexec -np 100 ./xsum_kernels $input_dir $output_dir $eventid +echo done successfully diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/ITERATION_UPDATE/X01_SRC_SUM_KERNELS/sum_kernels.f90 b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/ITERATION_UPDATE/X01_SRC_SUM_KERNELS/sum_kernels.f90 index dc8740bbb..8bdbf3d61 100644 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/ITERATION_UPDATE/X01_SRC_SUM_KERNELS/sum_kernels.f90 +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/ITERATION_UPDATE/X01_SRC_SUM_KERNELS/sum_kernels.f90 @@ -1,93 +1,93 @@ -! This subroutine is used to sum all event kernels to get misfit kernels +! This subroutine is used to sum all event kernels to get misfit kernels ! Last modified: Fri Sep 14 08:50:36 EDT 2012 program sum_kernels - implicit none - include 'mpif.h' + implicit none + include 'mpif.h' include '../../SHARE_FILES/HEADER_FILES/constants.h' - include '../../SHARE_FILES/HEADER_FILES/values_from_mesher.h' + include '../../SHARE_FILES/HEADER_FILES/values_from_mesher.h' - integer,parameter:: NSPEC=NSPEC_CRUST_MANTLE - integer,parameter:: NKERNEL=6 !bulk_betah, bulk_betav, bulk_c, eta, rho, hess + integer,parameter:: NSPEC=NSPEC_CRUST_MANTLE + integer,parameter:: NKERNEL=6 !bulk_betah, bulk_betav, bulk_c, eta, rho, hess - integer:: myrank, sizeprocs,ier - integer:: ios,nevent,ievent,iker - character(len=350):: eventid,line,kernel_file,input_dir,output_dir - character(len=150):: event_list(1000), kernel_name(NKERNEL) - real(kind=CUSTOM_REAL),dimension(NGLLX,NGLLY,NGLLZ,NSPEC):: kernel,total_kernel + integer:: myrank, sizeprocs,ier + integer:: ios,nevent,ievent,iker + character(len=350):: eventid,line,kernel_file,input_dir,output_dir + character(len=150):: event_list(1000), kernel_name(NKERNEL) + real(kind=CUSTOM_REAL),dimension(NGLLX,NGLLY,NGLLZ,NSPEC):: kernel,total_kernel call MPI_INIT(ier) call MPI_COMM_SIZE(MPI_COMM_WORLD,sizeprocs,ier) - call MPI_COMM_RANK(MPI_COMM_WORLD,myrank,ier) + call MPI_COMM_RANK(MPI_COMM_WORLD,myrank,ier) - call getarg(1,input_dir) + call getarg(1,input_dir) call getarg(2,output_dir) - call getarg(3,eventid) + call getarg(3,eventid) - if (trim(input_dir) == '' & - .or. trim(output_dir) == '' & - .or. trim(eventid) == '' ) then + if (trim(input_dir) == '' & + .or. trim(output_dir) == '' & + .or. trim(eventid) == '' ) then call exit_MPI(myrank,'USAGE: xsum_kernels input_dir output_dir eventid') - end if + endif - if (myrank == 0) then + if (myrank == 0) then write(*,*) 'SUM EVENT KERNELS TO GET MISFIT KENRELS' - write(*,*) 'INPUT DIRECTION:',input_dir - write(*,*) 'OUTPUT DIRECTION:',output_dir - write(*,*) 'INPUT EVENTFILE:',eventid - end if + write(*,*) 'INPUT DIRECTION:',input_dir + write(*,*) 'OUTPUT DIRECTION:',output_dir + write(*,*) 'INPUT EVENTFILE:',eventid + endif - kernel_name=(/"reg1_bulk_betah_kernel","reg1_bulk_betav_kernel","reg1_bulk_c_kernel","reg1_eta_kernel","reg1_rho_kernel","reg1_hess_kernel"/) + kernel_name=(/"reg1_bulk_betah_kernel","reg1_bulk_betav_kernel","reg1_bulk_c_kernel","reg1_eta_kernel","reg1_rho_kernel","reg1_hess_kernel"/) - nevent=0 - open(unit=1001,file=trim(eventid),status='old',iostat=ios) - if ( ios /= 0 ) then + nevent=0 + open(unit=1001,file=trim(eventid),status='old',iostat=ios) + if ( ios /= 0 ) then print*, 'ERROR OPENING', trim(eventid) - stop - end if - do while ( 1 == 1) - read(1001,'(a)',iostat=ios) line + stop + endif + do while ( 1 == 1) + read(1001,'(a)',iostat=ios) line if ( ios /=0) exit - nevent=nevent+1 - event_list(nevent)=line - end do - close(1001) + nevent=nevent+1 + event_list(nevent)=line + enddo + close(1001) - do iker=1,NKERNEL + do iker=1,NKERNEL total_kernel=0. - do ievent=1,nevent + do ievent=1,nevent - if (myrank==0) write(*,*) 'READING IN EVENT KERNEL:',trim(kernel_name(iker)),' FOR ',trim(event_list(ievent)) + if (myrank==0) write(*,*) 'READING IN EVENT KERNEL:',trim(kernel_name(iker)),' FOR ',trim(event_list(ievent)) + + write(kernel_file,'(a,i6.6,a)') trim(input_dir)//'/'//trim(event_list(ievent))//'/KERNEL/'//'proc',myrank,'_'//trim(kernel_name(iker))//'.bin' - write(kernel_file,'(a,i6.6,a)') trim(input_dir)//'/'//trim(event_list(ievent))//'/KERNEL/'//'proc',myrank,'_'//trim(kernel_name(iker))//'.bin' - open(unit=1002,file=trim(kernel_file),status='old',form='unformatted') - read(1002) kernel(:,:,:,1:NSPEC) + read(1002) kernel(:,:,:,1:NSPEC) close(1002) ! sum ther kernel - if (iker == 6 ) then ! for hessian , sum the absolute value + if (iker == 6 ) then ! for hessian , sum the absolute value total_kernel(:,:,:,1:NSPEC)=total_kernel(:,:,:,1:NSPEC) + abs(kernel(:,:,:,1:NSPEC)) - else + else total_kernel(:,:,:,1:NSPEC)=total_kernel(:,:,:,1:NSPEC) + kernel(:,:,:,1:NSPEC) - end if + endif - end do + enddo if (myrank==0) write(*,*) 'WRITING MISFIT KERNELS:',trim(kernel_name(iker)) write(kernel_file,'(a,i6.6,a)') trim(output_dir)//'/proc',myrank,'_'//trim(kernel_name(iker))//'.bin' - + open(1002,file=trim(kernel_file),form='unformatted') write(1002) total_kernel(:,:,:,1:NSPEC) - close(1002) - end do + close(1002) + enddo - if (myrank==0) write(*,*) 'done summing all the kernels' + if (myrank==0) write(*,*) 'done summing all the kernels' - call MPI_FINALIZE(ier) + call MPI_FINALIZE(ier) end program sum_kernels diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/ITERATION_UPDATE/X01_SRC_SUM_KERNELS/xcompile.sh b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/ITERATION_UPDATE/X01_SRC_SUM_KERNELS/xcompile.sh index 0777d38f9..b4eea7f38 100755 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/ITERATION_UPDATE/X01_SRC_SUM_KERNELS/xcompile.sh +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/ITERATION_UPDATE/X01_SRC_SUM_KERNELS/xcompile.sh @@ -4,14 +4,14 @@ # Last modified: Fri Sep 14 10:46:40 EDT 2012 -if [ ! -f ../../SHARE_FILES/HEADER_FILES/constants.h ]; then - echo WRONG! NO constants.h in SHARE_FILES/HEADER_FILES - exit -fi -if [ ! -f ../../SHARE_FILES/HEADER_FILES/values_from_mesher.h ]; then - echo WRONG! values_from_mesher.h in SHARE_FILES/HEADER_FILES - exit -fi +if [ ! -f ../../SHARE_FILES/HEADER_FILES/constants.h ]; then + echo WRONG! NO constants.h in SHARE_FILES/HEADER_FILES + exit +fi +if [ ! -f ../../SHARE_FILES/HEADER_FILES/values_from_mesher.h ]; then + echo WRONG! values_from_mesher.h in SHARE_FILES/HEADER_FILES + exit +fi -mpif90 -O3 -o xsum_kernels sum_kernels.f90 exit_mpi.f90 +mpif90 -O3 -o xsum_kernels sum_kernels.f90 exit_mpi.f90 diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/ITERATION_UPDATE/X02_SRC_PRECOND_KERNELS/XPBS_precond_kernels.sh b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/ITERATION_UPDATE/X02_SRC_PRECOND_KERNELS/XPBS_precond_kernels.sh index 336cb03b6..1d9ad67bd 100755 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/ITERATION_UPDATE/X02_SRC_PRECOND_KERNELS/XPBS_precond_kernels.sh +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/ITERATION_UPDATE/X02_SRC_PRECOND_KERNELS/XPBS_precond_kernels.sh @@ -1,7 +1,7 @@ #!/bin/sh #PBS -q tromp -#PBS -N XPRECOND_KERNELS +#PBS -N XPRECOND_KERNELS #PBS -l nodes=13:ppn=8 #PBS -l walltime=15:00:00 #PBS -j oe @@ -14,16 +14,16 @@ cd $PBS_O_WORKDIR iter=M00 -input_dir=../SUMMED_KERNELS_$iter +input_dir=../SUMMED_KERNELS_$iter -if [ ! -d $input_dir ]; then - echo WRONG! NO $input_dir - exit -fi +if [ ! -d $input_dir ]; then + echo WRONG! NO $input_dir + exit +fi -echo submit precondition kernels +echo submit precondition kernels mpiexec -np 100 ./xprecond_kernels $input_dir -echo done successfully +echo done successfully diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/ITERATION_UPDATE/X02_SRC_PRECOND_KERNELS/precond_kernels.f90 b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/ITERATION_UPDATE/X02_SRC_PRECOND_KERNELS/precond_kernels.f90 index 712e6f63f..8d28978bb 100644 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/ITERATION_UPDATE/X02_SRC_PRECOND_KERNELS/precond_kernels.f90 +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/ITERATION_UPDATE/X02_SRC_PRECOND_KERNELS/precond_kernels.f90 @@ -1,103 +1,103 @@ -! This program is used to precondtion misfit kernels +! This program is used to precondtion misfit kernels ! Last modified: Fri Sep 14 10:35:58 EDT 2012 program precond_kernels - implicit none - include 'mpif.h' + implicit none + include 'mpif.h' include '../../SHARE_FILES/HEADER_FILES/constants.h' - include '../../SHARE_FILES/HEADER_FILES/values_from_mesher.h' + include '../../SHARE_FILES/HEADER_FILES/values_from_mesher.h' include '../../SHARE_FILES/HEADER_FILES/precision.h' - integer,parameter:: NSPEC=NSPEC_CRUST_MANTLE - integer,parameter:: NKERNEL=4 !bulk_betah, bulk_betav, bulk_c, eta - real(kind=CUSTOM_REAL),parameter:: THRESHOLD_HESS=5.e-4 + integer,parameter:: NSPEC=NSPEC_CRUST_MANTLE + integer,parameter:: NKERNEL=4 !bulk_betah, bulk_betav, bulk_c, eta + real(kind=CUSTOM_REAL),parameter:: THRESHOLD_HESS=5.e-4 - integer:: myrank, sizeprocs,ier - integer:: ios,iker - character(len=350):: kernel_file,hess_file,input_dir - character(len=150):: kernel_name(NKERNEL) + integer:: myrank, sizeprocs,ier + integer:: ios,iker + character(len=350):: kernel_file,hess_file,input_dir + character(len=150):: kernel_name(NKERNEL) real(kind=CUSTOM_REAL),dimension(NGLLX,NGLLY,NGLLZ,NSPEC):: kernel,hess,kernel_precond real(kind=CUSTOM_REAL):: maxh,maxh_all call MPI_INIT(ier) call MPI_COMM_SIZE(MPI_COMM_WORLD,sizeprocs,ier) - call MPI_COMM_RANK(MPI_COMM_WORLD,myrank,ier) + call MPI_COMM_RANK(MPI_COMM_WORLD,myrank,ier) - call getarg(1,input_dir) - - if (trim(input_dir) == '' ) then - call exit_MPI(myrank,'USAGE: xprecond_kernels input_dir') - end if + call getarg(1,input_dir) - if (myrank == 0) then + if (trim(input_dir) == '' ) then + call exit_MPI(myrank,'USAGE: xprecond_kernels input_dir') + endif + + if (myrank == 0) then write(*,*) 'PRECONDITION MISFIT KERNELS' - end if + endif - kernel_name=(/"reg1_bulk_betah_kernel","reg1_bulk_betav_kernel","reg1_bulk_c_kernel","reg1_eta_kernel"/) + kernel_name=(/"reg1_bulk_betah_kernel","reg1_bulk_betav_kernel","reg1_bulk_c_kernel","reg1_eta_kernel"/) - do iker=1,NKERNEL + do iker=1,NKERNEL kernel_precond=0. hess=0. kernel=0. - write(kernel_file,'(a,i6.6,a)') trim(input_dir)//'/proc',myrank,'_'//trim(kernel_name(iker))//'.bin' - write(hess_file,'(a,i6.6,a)') trim(input_dir)//'/proc',myrank,'_reg1_hess_kernel.bin' - - if (myrank==0) then + write(kernel_file,'(a,i6.6,a)') trim(input_dir)//'/proc',myrank,'_'//trim(kernel_name(iker))//'.bin' + write(hess_file,'(a,i6.6,a)') trim(input_dir)//'/proc',myrank,'_reg1_hess_kernel.bin' + + if (myrank==0) then write(*,*) 'READING IN KERNELS:',trim(kernel_name(iker)) write(*,*) 'KERNEL FILES:',trim(kernel_file) write(*,*) 'HESSIAN FILES:',trim(hess_file) - end if - - open(unit=1002,file=trim(kernel_file),status='old',form='unformatted') - read(1002) kernel(:,:,:,1:NSPEC) + endif + + open(unit=1002,file=trim(kernel_file),status='old',form='unformatted') + read(1002) kernel(:,:,:,1:NSPEC) close(1002) - open(unit=1002,file=trim(hess_file),status='old',form='unformatted') - read(1002) hess(:,:,:,1:NSPEC) + open(unit=1002,file=trim(hess_file),status='old',form='unformatted') + read(1002) hess(:,:,:,1:NSPEC) close(1002) maxh=maxval(hess) - call mpi_allreduce(maxh,maxh_all,1,CUSTOM_MPI_TYPE,MPI_MAX,MPI_COMM_WORLD,ier) - if ( maxh_all < 1.e-18 ) then + call mpi_allreduce(maxh,maxh_all,1,CUSTOM_MPI_TYPE,MPI_MAX,MPI_COMM_WORLD,ier) + if ( maxh_all < 1.e-18 ) then call MPI_ABORT(MPI_COMM_WORLD,30,ier) - end if - - if (myrank==0) write(*,*) 'MAX HESSIAN FOR ALL PROCESSORS:',maxh_all + endif - ! normalized hess - hess=hess/maxh_all + if (myrank==0) write(*,*) 'MAX HESSIAN FOR ALL PROCESSORS:',maxh_all - where(hess(:,:,:,:) > THRESHOLD_HESS ) - hess=1.0_CUSTOM_REAL / hess - elsewhere - hess=1.0_CUSTOM_REAL / THRESHOLD_HESS - endwhere + ! normalized hess + hess=hess/maxh_all + + where(hess(:,:,:,:) > THRESHOLD_HESS ) + hess=1.0_CUSTOM_REAL / hess + elsewhere + hess=1.0_CUSTOM_REAL / THRESHOLD_HESS + endwhere kernel_precond=kernel*hess if (myrank==0) write(*,*) 'WRITING OUT PRECONDITIONED KERNEL FOR:',trim(kernel_name(iker)) write(kernel_file,'(a,i6.6,a)') trim(input_dir)//'/proc',myrank,'_'//trim(kernel_name(iker))//'_precond.bin' - + open(1002,file=trim(kernel_file),form='unformatted') write(1002) kernel_precond(:,:,:,1:NSPEC) - close(1002) + close(1002) - if (iker==1) then + if (iker==1) then write(hess_file,'(a,i6.6,a)') trim(input_dir)//'/proc',myrank,'_reg1_hess_kernel_precond.bin' open(1002,file=trim(hess_file),form='unformatted') write(1002) hess(:,:,:,1:NSPEC) close(1002) - end if - end do + endif + enddo - if (myrank==0) write(*,*) 'DONE PRECONDITION ALL MISFIT KERNELS' + if (myrank==0) write(*,*) 'DONE PRECONDITION ALL MISFIT KERNELS' - call MPI_FINALIZE(ier) + call MPI_FINALIZE(ier) end program precond_kernels diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/ITERATION_UPDATE/X02_SRC_PRECOND_KERNELS/xcompile.sh b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/ITERATION_UPDATE/X02_SRC_PRECOND_KERNELS/xcompile.sh index 2d4107ead..74e49f955 100755 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/ITERATION_UPDATE/X02_SRC_PRECOND_KERNELS/xcompile.sh +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/ITERATION_UPDATE/X02_SRC_PRECOND_KERNELS/xcompile.sh @@ -3,14 +3,14 @@ # Princeton University, New Jersey, USA # Last modified: Tue Jan 25 17:19:32 EST 2011 -if [ ! -f ../../SHARE_FILES/HEADER_FILES/constants.h ]; then - echo WRONG! NO constants.h in SHARE_FILES - exit -fi -if [ ! -f ../../SHARE_FILES/HEADER_FILES/values_from_mesher.h ]; then - echo WRONG! values_from_mesher.h in SHARE_FILES - exit -fi +if [ ! -f ../../SHARE_FILES/HEADER_FILES/constants.h ]; then + echo WRONG! NO constants.h in SHARE_FILES + exit +fi +if [ ! -f ../../SHARE_FILES/HEADER_FILES/values_from_mesher.h ]; then + echo WRONG! values_from_mesher.h in SHARE_FILES + exit +fi -mpif90 -O3 -o xprecond_kernels precond_kernels.f90 exit_mpi.f90 +mpif90 -O3 -o xprecond_kernels precond_kernels.f90 exit_mpi.f90 diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/ITERATION_UPDATE/X03_SRC_SMOOTH_KERNELS/XPBS_smooth_kernel.sh b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/ITERATION_UPDATE/X03_SRC_SMOOTH_KERNELS/XPBS_smooth_kernel.sh index f55f2ebae..57365b7d5 100644 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/ITERATION_UPDATE/X03_SRC_SMOOTH_KERNELS/XPBS_smooth_kernel.sh +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/ITERATION_UPDATE/X03_SRC_SMOOTH_KERNELS/XPBS_smooth_kernel.sh @@ -15,12 +15,12 @@ cd $PBS_O_WORKDIR iter=M18 sigma_h=50 sigma_v=5 -topo_path=../EUROPE_TOPOLOGY_FILE -kernel_path=../SUMMED_KERNEL_$iter +topo_path=../EUROPE_TOPOLOGY_FILE +kernel_path=../SUMMED_KERNEL_$iter tag=eta_kernel_precond -output_tag="XTAG_SMOOTH_"$iter"_"$tag +output_tag="XTAG_SMOOTH_"$iter"_"$tag -echo submit smoothing $tag kernel -mpiexec -np 100 ./xsmooth_sem_globe $sigma_h $sigma_v $tag $kernel_path $topo_path > $output_tag -echo smoothing $tag kernel done successfully +echo submit smoothing $tag kernel +mpiexec -np 100 ./xsmooth_sem_globe $sigma_h $sigma_v $tag $kernel_path $topo_path > $output_tag +echo smoothing $tag kernel done successfully diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/ITERATION_UPDATE/X03_SRC_SMOOTH_KERNELS/XSHELL_smooth_kernel.sh b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/ITERATION_UPDATE/X03_SRC_SMOOTH_KERNELS/XSHELL_smooth_kernel.sh index 0f289efc2..b5f46ae5e 100755 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/ITERATION_UPDATE/X03_SRC_SMOOTH_KERNELS/XSHELL_smooth_kernel.sh +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/ITERATION_UPDATE/X03_SRC_SMOOTH_KERNELS/XSHELL_smooth_kernel.sh @@ -9,22 +9,22 @@ sigma_h=50 sigma_v=5 -for tag in bulk_c_kernel_precond bulk_betav_kernel_precond bulk_betah_kernel_precond eta_kernel_precond +for tag in bulk_c_kernel_precond bulk_betav_kernel_precond bulk_betah_kernel_precond eta_kernel_precond do - echo $tag - - title="#PBS -N XSMOOTH_$tag" - - sed -e "s/^tag=.*$/tag=$tag/g" \ - -e "s/^iter=.*$/iter=$iter/g" \ - -e "s/^sigma_h=.*$/sigma_h=$sigma_h/g" \ - -e "s/^sigma_v=.*$/sigma_v=$sigma_v/g" \ - -e "s/^#PBS -N.*$/$title/g" \ - XPBS_smooth_kernel.sh > XPBS_smooth_kernel.sh.out - - mv XPBS_smooth_kernel.sh.out XPBS_smooth_kernel.sh - qsub XPBS_smooth_kernel.sh - sleep 3 -done + echo $tag + + title="#PBS -N XSMOOTH_$tag" + + sed -e "s/^tag=.*$/tag=$tag/g" \ + -e "s/^iter=.*$/iter=$iter/g" \ + -e "s/^sigma_h=.*$/sigma_h=$sigma_h/g" \ + -e "s/^sigma_v=.*$/sigma_v=$sigma_v/g" \ + -e "s/^#PBS -N.*$/$title/g" \ + XPBS_smooth_kernel.sh > XPBS_smooth_kernel.sh.out + + mv XPBS_smooth_kernel.sh.out XPBS_smooth_kernel.sh + qsub XPBS_smooth_kernel.sh + sleep 3 +done diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/ITERATION_UPDATE/X03_SRC_SMOOTH_KERNELS/smooth_sub.f90 b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/ITERATION_UPDATE/X03_SRC_SMOOTH_KERNELS/smooth_sub.f90 index 3bef48664..6d515fd71 100644 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/ITERATION_UPDATE/X03_SRC_SMOOTH_KERNELS/smooth_sub.f90 +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/ITERATION_UPDATE/X03_SRC_SMOOTH_KERNELS/smooth_sub.f90 @@ -8,11 +8,11 @@ subroutine get_all_eight_slices(ichunk,ixi,ieta,& implicit none integer, intent(IN) :: ichunk,ixi,ieta,nproc_xi,nproc_eta - + integer, intent(OUT) :: ileft,iright,ibot,itop,ilb,ilt,irb,irt integer :: get_slice_number - + integer :: ichunk_left, islice_xi_left, islice_eta_left, & ichunk_right, islice_xi_right, islice_eta_right, & ichunk_bot, islice_xi_bot, islice_eta_bot, & @@ -37,7 +37,7 @@ subroutine get_all_eight_slices(ichunk,ixi,ieta,& ilt = get_slice_number(ichunk,ixi-1,ieta+1,nproc_xi,nproc_eta) irb = get_slice_number(ichunk,ixi+1,ieta-1,nproc_xi,nproc_eta) irt = get_slice_number(ichunk,ixi+1,ieta+1,nproc_xi,nproc_eta) - + if (ixi==0) then call get_lrbt_slices(ichunk_left,islice_xi_left,islice_eta_left, & ileft0, ichunk_left0, islice_xi_left0, islice_eta_left0, & @@ -52,7 +52,7 @@ subroutine get_all_eight_slices(ichunk,ixi,ieta,& else if (ichunk == 2) then ilb = get_slice_number(ichunk_right0,islice_xi_right0,islice_eta_right0,nproc_xi,nproc_eta) ilt = get_slice_number(ichunk_left0,islice_xi_left0,islice_eta_left0,nproc_xi,nproc_eta) - else + else ilb = get_slice_number(ichunk_left0,islice_xi_left0,islice_eta_left0,nproc_xi,nproc_eta) ilt = get_slice_number(ichunk_right0,islice_xi_right0,islice_eta_right0,nproc_xi,nproc_eta) endif @@ -98,7 +98,7 @@ subroutine get_all_eight_slices(ichunk,ixi,ieta,& irb = get_slice_number(ichunk_top0,islice_xi_top0,islice_eta_top0,nproc_xi,nproc_eta) endif endif - + if (ieta==nproc_eta-1) then call get_lrbt_slices(ichunk_top,islice_xi_top,islice_eta_top, & ileft0, ichunk_left0, islice_xi_left0, islice_eta_left0, & @@ -200,7 +200,7 @@ subroutine get_lrbt_slices(ichunk,ixi,ieta, & islice_xi_top=slice_xi_top(ichunk+1) islice_eta_top=slice_eta_top(ichunk+1) endif - + ileft = get_slice_number(ichunk_left,islice_xi_left,islice_eta_left,nproc_xi,nproc_eta) iright = get_slice_number(ichunk_right,islice_xi_right,islice_eta_right,nproc_xi,nproc_eta) ibot = get_slice_number(ichunk_bot,islice_xi_bot,islice_eta_bot,nproc_xi,nproc_eta) diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/ITERATION_UPDATE/X03_SRC_SMOOTH_KERNELS/xcompile.sh b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/ITERATION_UPDATE/X03_SRC_SMOOTH_KERNELS/xcompile.sh index f615bbcdf..466da8081 100755 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/ITERATION_UPDATE/X03_SRC_SMOOTH_KERNELS/xcompile.sh +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/ITERATION_UPDATE/X03_SRC_SMOOTH_KERNELS/xcompile.sh @@ -3,17 +3,17 @@ # Princeton University, New Jersey, USA # Last modified: Tue Jan 25 17:19:32 EST 2011 -if [ ! -f ../../SHARE_FILES/HEADER_FILES/constants.h ]; then - echo WRONG! NO constants.h - exit -fi -if [ ! -f ../../SHARE_FILES/HEADER_FILES/values_from_mesher.h ]; then - echo WRONG! NO values_from_mesher.h - exit -fi -if [ ! -f ../../SHARE_FILES/HEADER_FILES/precision.h ]; then - echo WRONG! NO precision.h - exit -fi +if [ ! -f ../../SHARE_FILES/HEADER_FILES/constants.h ]; then + echo WRONG! NO constants.h + exit +fi +if [ ! -f ../../SHARE_FILES/HEADER_FILES/values_from_mesher.h ]; then + echo WRONG! NO values_from_mesher.h + exit +fi +if [ ! -f ../../SHARE_FILES/HEADER_FILES/precision.h ]; then + echo WRONG! NO precision.h + exit +fi mpif90 -O3 -o xsmooth_sem_globe smooth_sem_globe.f90 smooth_sub.f90 exit_mpi.f90 gll_library.f90 diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/ITERATION_UPDATE/X04_SRC_DIRECTION_CG/XPBS_compute_direction_cg.sh b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/ITERATION_UPDATE/X04_SRC_DIRECTION_CG/XPBS_compute_direction_cg.sh index 31cba4567..10aedaf3c 100644 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/ITERATION_UPDATE/X04_SRC_DIRECTION_CG/XPBS_compute_direction_cg.sh +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/ITERATION_UPDATE/X04_SRC_DIRECTION_CG/XPBS_compute_direction_cg.sh @@ -1,7 +1,7 @@ #!/bin/sh #PBS -q tromp -#PBS -N XCOMPUTE_CG_DIRECTION +#PBS -N XCOMPUTE_CG_DIRECTION #PBS -l nodes=13:ppn=8 #PBS -l walltime=15:00:00 #PBS -j oe @@ -18,32 +18,32 @@ iter_old=M00 xoutput_tag=XTAG_$iter_new -direction_0=../DIRECTION_CG_$iter_old +direction_0=../DIRECTION_CG_$iter_old direction_1=../DIRECTION_CG_$iter_new gradient_0=../SUMMED_KERNEL_$iter_old gradient_1=../SUMMED_KERNEL_$iter_new -if [ ! -d $direction_0 ]; then - echo WRONG! NO $direction_0 - exit -fi -if [ ! -d $gradient_0 ]; then - echo WRONG! NO $gradient_0 - exit -fi -if [ ! -d $gradient_1 ]; then - echo WRONG! NO $gradient_1 - exit -fi - -if [ ! -d $direction_1 ]; then - echo MKDIR $direction_1 - mkdir $direction_1 -fi - -echo submit compute cg direction -mpiexec -np 100 ./xcompute_direction_cg $direction_0 $direction_1 $gradient_0 $gradient_1 > $xoutput_tag -echo done successfully +if [ ! -d $direction_0 ]; then + echo WRONG! NO $direction_0 + exit +fi +if [ ! -d $gradient_0 ]; then + echo WRONG! NO $gradient_0 + exit +fi +if [ ! -d $gradient_1 ]; then + echo WRONG! NO $gradient_1 + exit +fi + +if [ ! -d $direction_1 ]; then + echo MKDIR $direction_1 + mkdir $direction_1 +fi + +echo submit compute cg direction +mpiexec -np 100 ./xcompute_direction_cg $direction_0 $direction_1 $gradient_0 $gradient_1 > $xoutput_tag +echo done successfully diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/ITERATION_UPDATE/X04_SRC_DIRECTION_CG/compute_direction_cg.f90 b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/ITERATION_UPDATE/X04_SRC_DIRECTION_CG/compute_direction_cg.f90 index 3ac4acbdc..62753fe26 100644 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/ITERATION_UPDATE/X04_SRC_DIRECTION_CG/compute_direction_cg.f90 +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/ITERATION_UPDATE/X04_SRC_DIRECTION_CG/compute_direction_cg.f90 @@ -1,19 +1,19 @@ -program xcompute_direction_cg +program xcompute_direction_cg implicit none include 'mpif.h' include '../../SHARE_FILES/HEADER_FILES/constants.h' include '../../SHARE_FILES/HEADER_FILES/values_from_mesher.h' - include '../../SHARE_FILES/HEADER_FILES/precision.h' + include '../../SHARE_FILES/HEADER_FILES/precision.h' - integer,parameter:: NSPEC=NSPEC_CRUST_MANTLE - integer,parameter:: NKERNEL=4 - integer:: myrank, sizeprocs,ier - integer:: iker,ispec,i,j,k + integer,parameter:: NSPEC=NSPEC_CRUST_MANTLE + integer,parameter:: NKERNEL=4 + integer:: myrank, sizeprocs,ier + integer:: iker,ispec,i,j,k - character(len=512):: direction_0_dir, direction_1_dir, gradient_0_dir, gradient_1_dir - character(len=512):: direction_0_file, direction_1_file, gradient_0_file, gradient_1_file - character(len=256):: kernel_name(NKERNEL) + character(len=512):: direction_0_dir, direction_1_dir, gradient_0_dir, gradient_1_dir + character(len=512):: direction_0_file, direction_1_file, gradient_0_file, gradient_1_file + character(len=256):: kernel_name(NKERNEL) real(kind=CUSTOM_REAL),dimension(NGLLX,NGLLY,NGLLZ,NSPEC):: direction_0, direction_1,gradient_0,gradient_1 real(kind=CUSTOM_REAL)::beta,beta_upper,beta_down,beta_upper_all_tmp,beta_down_all_tmp @@ -21,102 +21,102 @@ program xcompute_direction_cg call MPI_INIT(ier) call MPI_COMM_SIZE(MPI_COMM_WORLD,sizeprocs,ier) - call MPI_COMM_RANK(MPI_COMM_WORLD,myrank,ier) + call MPI_COMM_RANK(MPI_COMM_WORLD,myrank,ier) call getarg(1,direction_0_dir) call getarg(2,direction_1_dir) - call getarg(3,gradient_0_dir) - call getarg(4,gradient_1_dir) + call getarg(3,gradient_0_dir) + call getarg(4,gradient_1_dir) - if (trim(direction_0_dir) == '' .or. trim(direction_1_dir) == '' & + if (trim(direction_0_dir) == '' .or. trim(direction_1_dir) == '' & .or. trim(gradient_0_dir) == '' .or. trim(gradient_1_dir) == '') then - call exit_MPI(myrank,'USAGE: xcompute_direction_cg direction_0_dir direction_1_dir gradient_0_dir gradient_1_dir') - end if + call exit_MPI(myrank,'USAGE: xcompute_direction_cg direction_0_dir direction_1_dir gradient_0_dir gradient_1_dir') + endif - kernel_name=(/"reg1_bulk_betah_kernel_precond_smooth","reg1_bulk_betav_kernel_precond_smooth","reg1_bulk_c_kernel_precond_smooth","reg1_eta_kernel_precond_smooth"/) + kernel_name=(/"reg1_bulk_betah_kernel_precond_smooth","reg1_bulk_betav_kernel_precond_smooth","reg1_bulk_c_kernel_precond_smooth","reg1_eta_kernel_precond_smooth"/) - do iker = 1,NKERNEL - write(gradient_0_file,'(a,i6.6,a)') trim(gradient_0_dir)//'/proc',myrank,'_'//trim(kernel_name(iker))//'.bin' - write(gradient_1_file,'(a,i6.6,a)') trim(gradient_1_dir)//'/proc',myrank,'_'//trim(kernel_name(iker))//'.bin' + do iker = 1,NKERNEL + write(gradient_0_file,'(a,i6.6,a)') trim(gradient_0_dir)//'/proc',myrank,'_'//trim(kernel_name(iker))//'.bin' + write(gradient_1_file,'(a,i6.6,a)') trim(gradient_1_dir)//'/proc',myrank,'_'//trim(kernel_name(iker))//'.bin' open(1001,file=trim(gradient_0_file),status='old',form='unformatted',iostat=ier) if (myrank == 0) print*, 'reading gradient0:',trim(gradient_0_file) - if ( ier /=0) then + if ( ier /=0) then print*, 'error opening:',trim(gradient_0_file) - call exit_mpi(myrank,'file not found') - end if + call exit_mpi(myrank,'file not found') + endif read(1001) gradient_0(:,:,:,1:NSPEC) close(1001) - open(1001,file=trim(gradient_1_file),status='old',form='unformatted',iostat=ier) + open(1001,file=trim(gradient_1_file),status='old',form='unformatted',iostat=ier) if (myrank == 0) print*, 'reading gradient1:',trim(gradient_1_file) - if (ier/=0) then + if (ier/=0) then print*, 'error opening:',trim(gradient_1_file) call exit_mpi(myrank,'file not found') - end if + endif read(1001) gradient_1(:,:,:,1:NSPEC) - close(1001) + close(1001) beta_upper=sum(gradient_1*(gradient_1-gradient_0)) beta_down=sum(gradient_0*gradient_0) - + call mpi_barrier(MPI_COMM_WORLD,ier) call mpi_allreduce(beta_upper,beta_upper_all_tmp,1,CUSTOM_MPI_TYPE,MPI_SUM,MPI_COMM_WORLD,ier) call mpi_allreduce(beta_down,beta_down_all_tmp,1,CUSTOM_MPI_TYPE,MPI_SUM,MPI_COMM_WORLD,ier) - - beta_upper_all(iker)=beta_upper_all_tmp + + beta_upper_all(iker)=beta_upper_all_tmp beta_down_all(iker)=beta_down_all_tmp - end do + enddo beta=sum(beta_upper_all)/sum(beta_down_all) - if (myrank == 0 ) then + if (myrank == 0 ) then print*,'before zero',myrank,beta - end if - if ( beta < 0.0 ) then + endif + if ( beta < 0.0 ) then beta=0.0 - end if + endif - if (myrank == 0 ) then + if (myrank == 0 ) then print*,myrank,beta - end if + endif - do iker = 1,NKERNEL - direction_1=0._CUSTOM_REAL + do iker = 1,NKERNEL + direction_1=0._CUSTOM_REAL write(direction_0_file,'(a,i6.6,a)') trim(direction_0_dir)//'/proc',myrank,'_'//trim(kernel_name(iker))//'.bin' write(direction_1_file,'(a,i6.6,a)') trim(direction_1_dir)//'/proc',myrank,'_'//trim(kernel_name(iker))//'.bin' - write(gradient_0_file,'(a,i6.6,a)') trim(gradient_0_dir)//'/proc',myrank,'_'//trim(kernel_name(iker))//'.bin' - write(gradient_1_file,'(a,i6.6,a)') trim(gradient_1_dir)//'/proc',myrank,'_'//trim(kernel_name(iker))//'.bin' + write(gradient_0_file,'(a,i6.6,a)') trim(gradient_0_dir)//'/proc',myrank,'_'//trim(kernel_name(iker))//'.bin' + write(gradient_1_file,'(a,i6.6,a)') trim(gradient_1_dir)//'/proc',myrank,'_'//trim(kernel_name(iker))//'.bin' open(1001,file=trim(direction_0_file),status='old',form='unformatted',iostat=ier) if ( myrank == 0) print*,'reading direction0:',trim(direction_0_file) - if (ier /= 0 ) then - print*, 'error opening:',trim(direction_0_file) - call exit_mpi(myrank,'file not found') - end if - read(1001) direction_0(:,:,:,1:NSPEC) - close(1001) + if (ier /= 0 ) then + print*, 'error opening:',trim(direction_0_file) + call exit_mpi(myrank,'file not found') + endif + read(1001) direction_0(:,:,:,1:NSPEC) + close(1001) open(1001,file=trim(gradient_0_file),status='old',form='unformatted',iostat=ier) if (myrank == 0) print*, 'reading gradient0:',trim(gradient_0_file) - if ( ier /=0) then + if ( ier /=0) then print*, 'error opening:',trim(gradient_0_file) - call exit_mpi(myrank,'file not found') - end if + call exit_mpi(myrank,'file not found') + endif read(1001) gradient_0(:,:,:,1:NSPEC) close(1001) - open(1001,file=trim(gradient_1_file),status='old',form='unformatted',iostat=ier) + open(1001,file=trim(gradient_1_file),status='old',form='unformatted',iostat=ier) if (myrank == 0) print*, 'reading gradient1:',trim(gradient_1_file) - if (ier/=0) then + if (ier/=0) then print*, 'error opening:',trim(gradient_1_file) call exit_mpi(myrank,'file not found') - end if + endif read(1001) gradient_1(:,:,:,1:NSPEC) - close(1001) + close(1001) @@ -124,20 +124,20 @@ program xcompute_direction_cg do ispec=1,NSPEC do k = 1,NGLLZ do j = 1,NGLLY - do i = 1,NGLLX - - direction_1(i,j,k,ispec)=-gradient_1(i,j,k,ispec)+beta*direction_0(i,j,k,ispec) - end do ! i - end do ! j - end do ! k - end do ! ispec + do i = 1,NGLLX + + direction_1(i,j,k,ispec)=-gradient_1(i,j,k,ispec)+beta*direction_0(i,j,k,ispec) + enddo ! i + enddo ! j + enddo ! k + enddo ! ispec open(1001,file=trim(direction_1_file),form='unformatted',action='write') - if (myrank == 0) print*, 'writing direction1:',direction_1_file + if (myrank == 0) print*, 'writing direction1:',direction_1_file write(1001) direction_1 - close(1001) + close(1001) - end do ! kernel type + enddo ! kernel type - call MPI_FINALIZE(ier) + call MPI_FINALIZE(ier) end program xcompute_direction_cg diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/ITERATION_UPDATE/X04_SRC_DIRECTION_CG/xcompile.sh b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/ITERATION_UPDATE/X04_SRC_DIRECTION_CG/xcompile.sh index f8a222f63..cb538e76d 100755 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/ITERATION_UPDATE/X04_SRC_DIRECTION_CG/xcompile.sh +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/ITERATION_UPDATE/X04_SRC_DIRECTION_CG/xcompile.sh @@ -3,17 +3,17 @@ # Princeton University, New Jersey, USA # Last modified: Tue Jan 25 17:19:32 EST 2011 -if [ ! -f ../../SHARE_FILES/HEADER_FILES/constants.h ]; then - echo WRONG! NO constants.h - exit -fi -if [ ! -f ../../SHARE_FILES/HEADER_FILES/values_from_mesher.h ]; then - echo WRONG! NO values_from_mesher.h - exit -fi -if [ ! -f ../../SHARE_FILES/HEADER_FILES/precision.h ]; then - echo WRONG! NO precision.h - exit -fi +if [ ! -f ../../SHARE_FILES/HEADER_FILES/constants.h ]; then + echo WRONG! NO constants.h + exit +fi +if [ ! -f ../../SHARE_FILES/HEADER_FILES/values_from_mesher.h ]; then + echo WRONG! NO values_from_mesher.h + exit +fi +if [ ! -f ../../SHARE_FILES/HEADER_FILES/precision.h ]; then + echo WRONG! NO precision.h + exit +fi mpif90 -O3 -o xcompute_direction_cg compute_direction_cg.f90 exit_mpi.f90 diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/ITERATION_UPDATE/X04_SRC_DIRECTION_LBFGS/XPBS_compute_direction_lbfgs.sh b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/ITERATION_UPDATE/X04_SRC_DIRECTION_LBFGS/XPBS_compute_direction_lbfgs.sh index 963c074fc..b560bce81 100755 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/ITERATION_UPDATE/X04_SRC_DIRECTION_LBFGS/XPBS_compute_direction_lbfgs.sh +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/ITERATION_UPDATE/X04_SRC_DIRECTION_LBFGS/XPBS_compute_direction_lbfgs.sh @@ -1,7 +1,7 @@ #!/bin/sh #PBS -q tromp -#PBS -N XCOMPUTE_LBFGS_DIRECTION +#PBS -N XCOMPUTE_LBFGS_DIRECTION #PBS -l nodes=13:ppn=8 #PBS -l walltime=15:00:00 #PBS -j oe @@ -27,32 +27,32 @@ gradient_1=../SUMMED_KERNEL_M$iter_current direction=../DIRECTION_LBFGS_M$iter_current -if [ ! -d $model_0 ]; then - echo WRONG! NO $model_0 - exit -fi -if [ ! -d $model_1 ]; then - echo WRONG! NO $model_1 - exit -fi -if [ ! -d $gradient_1 ]; then - echo WRONG! NO $gradient_1 - exit -fi -if [ ! -d $gradient_0 ]; then - echo WRONG! NO $gradient_0 - exit -fi - -if [ ! -d $direction ]; then - echo MKDIR $direction - mkdir $direction -fi +if [ ! -d $model_0 ]; then + echo WRONG! NO $model_0 + exit +fi +if [ ! -d $model_1 ]; then + echo WRONG! NO $model_1 + exit +fi +if [ ! -d $gradient_1 ]; then + echo WRONG! NO $gradient_1 + exit +fi +if [ ! -d $gradient_0 ]; then + echo WRONG! NO $gradient_0 + exit +fi + +if [ ! -d $direction ]; then + echo MKDIR $direction + mkdir $direction +fi # submit job echo submit compute direction lbfgs -mpiexec -np 100 ./xcompute_direction_lbfgs $iter_start $iter_current > $xoutput_tag -echo done successfully +mpiexec -np 100 ./xcompute_direction_lbfgs $iter_start $iter_current > $xoutput_tag +echo done successfully diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/ITERATION_UPDATE/X04_SRC_DIRECTION_LBFGS/compute_direction_lbfgs.f90 b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/ITERATION_UPDATE/X04_SRC_DIRECTION_LBFGS/compute_direction_lbfgs.f90 index dcead15ef..0f5ed85ce 100644 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/ITERATION_UPDATE/X04_SRC_DIRECTION_LBFGS/compute_direction_lbfgs.f90 +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/ITERATION_UPDATE/X04_SRC_DIRECTION_LBFGS/compute_direction_lbfgs.f90 @@ -1,4 +1,4 @@ -! This program is used to compute lbfgs update direction +! This program is used to compute lbfgs update direction ! Author: Hejun Zhu, hejunzhu@princeton.edu ! Princeton University, New Jersey, USA ! Last modified: Tue Aug 21 17:48:28 EDT 2012 @@ -7,12 +7,12 @@ module globe_parameter include '../../SHARE_FILES/HEADER_FILES/constants.h' include '../../SHARE_FILES/HEADER_FILES/values_from_mesher.h' - integer,parameter:: NSPEC=NSPEC_CRUST_MANTLE + integer,parameter:: NSPEC=NSPEC_CRUST_MANTLE integer,parameter:: NGLOB=NGLOB_CRUST_MANTLE integer,parameter:: NKERNEL=4 integer,parameter:: m_store=5 ! stored model step 3<=m_store<=7 - integer:: myrank, sizeprocs,ier + integer:: myrank, sizeprocs,ier integer::iker,ispec,i,j,k character(len=512)::filename,dirname @@ -22,13 +22,13 @@ module globe_parameter end module globe_parameter -program xcompute_direction_lbfgs +program xcompute_direction_lbfgs use globe_parameter - implicit none + implicit none include 'mpif.h' include '../../SHARE_FILES/HEADER_FILES/precision.h' - + integer:: iter_start,iter_current,iter_store,istore character(len=128):: s_iter_start,s_iter_current @@ -42,24 +42,24 @@ program xcompute_direction_lbfgs call MPI_INIT(ier) call MPI_COMM_SIZE(MPI_COMM_WORLD,sizeprocs,ier) - call MPI_COMM_RANK(MPI_COMM_WORLD,myrank,ier) - - ! read in parameters + call MPI_COMM_RANK(MPI_COMM_WORLD,myrank,ier) + + ! read in parameters call getarg(1,s_iter_start) call getarg(2,s_iter_current) read(s_iter_start,*) iter_start read(s_iter_current,*) iter_current if (myrank ==0) print*, 'starting iteration for this period band:',iter_start - if (myrank ==0) print*, 'current iteration:',iter_current + if (myrank ==0) print*, 'current iteration:',iter_current - iter_store = iter_current-m_store - if ( iter_store <= iter_start ) then - iter_store = iter_start - end if - if (myrank==0) print*, 'stored iteration:',iter_store + iter_store = iter_current-m_store + if ( iter_store <= iter_start ) then + iter_store = iter_start + endif + if (myrank==0) print*, 'stored iteration:',iter_store - kernel_name=(/"reg1_bulk_betah_kernel_precond_smooth","reg1_bulk_betav_kernel_precond_smooth","reg1_eta_kernel_precond_smooth","reg1_bulk_c_kernel_precond_smooth"/) + kernel_name=(/"reg1_bulk_betah_kernel_precond_smooth","reg1_bulk_betav_kernel_precond_smooth","reg1_eta_kernel_precond_smooth","reg1_bulk_c_kernel_precond_smooth"/) model_name=(/"reg1_vsh","reg1_vsv","reg1_eta","reg1_bulk"/) ! initialize arrays @@ -76,39 +76,39 @@ program xcompute_direction_lbfgs call get_ibool call get_gradient(iter_current,q_vector) - - if (myrank == 0) then + + if (myrank == 0) then print*,'************************************************' print*,'*******starting backward store *****************' print*,'************************************************' - end if + endif do istore=iter_current-1,iter_store,-1 call get_gradient(istore+1,gradient1) call get_gradient(istore,gradient0) call get_model(istore+1,model1) call get_model(istore,model0) - gradient_diff=gradient1-gradient0 + gradient_diff=gradient1-gradient0 model_diff=model1-model0 p_tmp=sum(gradient_diff*model_diff) call mpi_allreduce(p_tmp,p_sum,1,CUSTOM_MPI_TYPE,MPI_SUM,MPI_COMM_WORLD,ier) - p(istore)=1.0/p_sum - - a_tmp=sum(model_diff*q_vector) + p(istore)=1.0/p_sum + + a_tmp=sum(model_diff*q_vector) call mpi_allreduce(a_tmp,a_sum,1,CUSTOM_MPI_TYPE,MPI_SUM,MPI_COMM_WORLD,ier) a(istore)=p(istore)*a_sum if (myrank == 0) print*,'a,p:',a(istore),p(istore) - q_vector=q_vector-a(istore)*gradient_diff - end do + q_vector=q_vector-a(istore)*gradient_diff + enddo istore=iter_current-1 call get_gradient(istore+1,gradient1) call get_gradient(istore,gradient0) call get_model(istore+1,model1) call get_model(istore,model0) - gradient_diff=gradient1-gradient0 + gradient_diff=gradient1-gradient0 model_diff=model1-model0 ! this implements Algorithm 7.4 and equation (7.20) on page 178 of the book of @@ -122,12 +122,12 @@ program xcompute_direction_lbfgs if ( myrank == 0) print*,'p_k:',p_k r_vector=p_k*q_vector !r_vector=1.0*q_vector - - if (myrank == 0) then + + if (myrank == 0) then print*,'******************************************' print*,'********starting forward store ***********' print*,'******************************************' - end if + endif do istore=iter_store,iter_current-1,1 call get_gradient(istore+1,gradient1) @@ -139,31 +139,31 @@ program xcompute_direction_lbfgs model_diff=model1-model0 b_tmp=sum(gradient_diff*r_vector) - call mpi_allreduce(b_tmp,b_sum,1,CUSTOM_MPI_TYPE,MPI_SUM,MPI_COMM_WORLD,ier) + call mpi_allreduce(b_tmp,b_sum,1,CUSTOM_MPI_TYPE,MPI_SUM,MPI_COMM_WORLD,ier) b=p(istore)*b_sum if (myrank==0) print*,'a,b:',a(istore),b r_vector=r_vector+model_diff*(a(istore)-b) - end do + enddo r_vector=-1.0*r_vector call write_gradient(iter_current,r_vector) - - call MPI_FINALIZE(ier) + + call MPI_FINALIZE(ier) end program xcompute_direction_lbfgs -subroutine get_ibool - use globe_parameter - implicit none - - real(kind=CUSTOM_REAL),dimension(NGLOB)::tmp +subroutine get_ibool + use globe_parameter + implicit none + + real(kind=CUSTOM_REAL),dimension(NGLOB)::tmp write(dirname,'(a)') '/scratch/lustre/hejunzhu/2012SHEAR_ATTENUATION_ITERATION_UPDATE/EUROPE_TOPOLOGY_FILE' - write(filename,'(a,i6.6,a)') trim(dirname)//'/proc',myrank,'_reg1_solver_data_2.bin' + write(filename,'(a,i6.6,a)') trim(dirname)//'/proc',myrank,'_reg1_solver_data_2.bin' open(1001,file=trim(filename),status='old',form='unformatted',iostat=ier) if( ier /= 0 ) call exit_mpi(myrank,'error opening solver2 file') read(1001) tmp(1:NGLOB) @@ -176,21 +176,21 @@ end subroutine get_ibool subroutine get_gradient(iter,gradient) use globe_parameter - implicit none + implicit none integer::iter,iglob - real(kind=CUSTOM_REAL),dimension(NKERNEL*NGLOB)::gradient - real(kind=CUSTOM_REAL),dimension(NGLLX,NGLLY,NGLLZ,NSPEC)::vector + real(kind=CUSTOM_REAL),dimension(NKERNEL*NGLOB)::gradient + real(kind=CUSTOM_REAL),dimension(NGLLX,NGLLY,NGLLZ,NSPEC)::vector real(kind=CUSTOM_REAL),dimension(NKERNEL,NGLOB)::vector_gll do iker=1,NKERNEL write(dirname,'(a,i2.2)') '../SUMMED_KERNEL_M',iter write(filename,'(a,i6.6,a)') trim(dirname)//'/proc',myrank,'_'//trim(kernel_name(iker))//'.bin' - open(1001,file=trim(filename),status='old',form='unformatted',iostat=ier) + open(1001,file=trim(filename),status='old',form='unformatted',iostat=ier) if ( myrank == 0) print*,'reading gradient:',trim(filename) - if (ier /= 0 ) then + if (ier /= 0 ) then print*,'error reading:',trim(filename) - call exit_mpi(myrank,'file not found') - end if + call exit_mpi(myrank,'file not found') + endif read(1001) vector(:,:,:,1:NSPEC) close(1001) do ispec=1,NSPEC @@ -199,11 +199,11 @@ subroutine get_gradient(iter,gradient) do i=1,NGLLX iglob=ibool(i,j,k,ispec) vector_gll(iker,iglob)=vector(i,j,k,ispec) - end do - end do - end do - end do - end do + enddo + enddo + enddo + enddo + enddo gradient(1:NGLOB)=vector_gll(1,1:NGLOB) gradient(NGLOB+1:2*NGLOB)=vector_gll(2,1:NGLOB) gradient(2*NGLOB+1:3*NGLOB)=vector_gll(3,1:NGLOB) @@ -213,22 +213,22 @@ end subroutine get_gradient subroutine get_model(iter,model) use globe_parameter - implicit none + implicit none integer::iter,iglob real(kind=CUSTOM_REAL),dimension(NKERNEL*NGLOB):: model - real(kind=CUSTOM_REAL),dimension(NKERNEL,NGLOB):: vector_gll - real(kind=CUSTOM_REAL),dimension(NGLLX,NGLLY,NGLLZ,NSPEC):: vector + real(kind=CUSTOM_REAL),dimension(NKERNEL,NGLOB):: vector_gll + real(kind=CUSTOM_REAL),dimension(NGLLX,NGLLY,NGLLZ,NSPEC):: vector do iker=1,NKERNEL write(dirname,'(a,i2.2)') '../MODEL_M',iter write(filename,'(a,i6.6,a)') trim(dirname)//'/proc',myrank,'_'//trim(model_name(iker))//'.bin' - open(1001,file=trim(filename),status='old',form='unformatted',iostat=ier) - if ( myrank == 0) print*,'reading model:',trim(filename) - if ( ier /=0) then - print*,'error reading:',trim(filename) - call exit_mpi(myrank,'file not found') - end if - read(1001) vector(:,:,:,1:NSPEC) + open(1001,file=trim(filename),status='old',form='unformatted',iostat=ier) + if ( myrank == 0) print*,'reading model:',trim(filename) + if ( ier /=0) then + print*,'error reading:',trim(filename) + call exit_mpi(myrank,'file not found') + endif + read(1001) vector(:,:,:,1:NSPEC) close(1001) do ispec=1,NSPEC do k=1,NGLLZ @@ -236,11 +236,11 @@ subroutine get_model(iter,model) do i=1,NGLLX iglob=ibool(i,j,k,ispec) vector_gll(iker,iglob)=vector(i,j,k,ispec) - end do - end do - end do - end do - end do + enddo + enddo + enddo + enddo + enddo model(1:NGLOB)=log(vector_gll(1,1:NGLOB)) model(NGLOB+1:2*NGLOB)=log(vector_gll(2,1:NGLOB)) model(2*NGLOB+1:3*NGLOB)=log(vector_gll(3,1:NGLOB)) @@ -250,35 +250,35 @@ end subroutine get_model subroutine write_gradient(iter,gradient) use globe_parameter - implicit none + implicit none - integer::iter,iglob - real(kind=CUSTOM_REAL),dimension(NKERNEL*NGLOB)::gradient - real(kind=CUSTOM_REAL),dimension(NKERNEL,NGLLX,NGLLY,NGLLZ,NSPEC)::vector + integer::iter,iglob + real(kind=CUSTOM_REAL),dimension(NKERNEL*NGLOB)::gradient + real(kind=CUSTOM_REAL),dimension(NKERNEL,NGLLX,NGLLY,NGLLZ,NSPEC)::vector real(kind=CUSTOM_REAL),dimension(NKERNEL,NGLOB)::vector_gll - + vector_gll(1,1:NGLOB)=gradient(1:NGLOB) vector_gll(2,1:NGLOB)=gradient(NGLOB+1:2*NGLOB) vector_gll(3,1:NGLOB)=gradient(2*NGLOB+1:3*NGLOB) vector_gll(4,1:NGLOB)=gradient(3*NGLOB+1:4*NGLOB) - do iker=1,NKERNEL + do iker=1,NKERNEL do ispec=1,NSPEC do k=1,NGLLZ do j=1,NGLLY do i=1,NGLLX iglob=ibool(i,j,k,ispec) vector(iker,i,j,k,ispec)=vector_gll(iker,iglob) - end do - end do - end do - end do + enddo + enddo + enddo + enddo write(dirname,'(a,i2.2)') '../DIRECTION_LBFGS_M',iter write(filename,'(a,i6.6,a)') trim(dirname)//'/proc',myrank,'_'//trim(kernel_name(iker))//'.bin' open(1001,file=trim(filename),form='unformatted',action='write') if ( myrank == 0) print*,'writing direct:',filename - write(1001) vector(iker,:,:,:,1:NSPEC) + write(1001) vector(iker,:,:,:,1:NSPEC) close(1001) - end do -end subroutine write_gradient + enddo +end subroutine write_gradient diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/ITERATION_UPDATE/X04_SRC_DIRECTION_LBFGS/xcompile.sh b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/ITERATION_UPDATE/X04_SRC_DIRECTION_LBFGS/xcompile.sh index 16fdb7000..2cb5d304f 100755 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/ITERATION_UPDATE/X04_SRC_DIRECTION_LBFGS/xcompile.sh +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/ITERATION_UPDATE/X04_SRC_DIRECTION_LBFGS/xcompile.sh @@ -3,17 +3,17 @@ # Princeton University, New Jersey, USA # Last modified: Tue Jan 25 17:19:32 EST 2011 -if [ ! -f ../../SHARE_FILES/HEADER_FILES/constants.h ]; then - echo WRONG! NO constants.h - exit -fi -if [ ! -f ../../SHARE_FILES/HEADER_FILES/values_from_mesher.h ]; then - echo WRONG! NO values_from_mesher.h - exit -fi -if [ ! -f ../../SHARE_FILES/HEADER_FILES/precision.h ]; then - echo WRONG! NO precision.h - exit -fi +if [ ! -f ../../SHARE_FILES/HEADER_FILES/constants.h ]; then + echo WRONG! NO constants.h + exit +fi +if [ ! -f ../../SHARE_FILES/HEADER_FILES/values_from_mesher.h ]; then + echo WRONG! NO values_from_mesher.h + exit +fi +if [ ! -f ../../SHARE_FILES/HEADER_FILES/precision.h ]; then + echo WRONG! NO precision.h + exit +fi mpif90 -O3 -o xcompute_direction_lbfgs compute_direction_lbfgs.f90 exit_mpi.f90 diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/ITERATION_UPDATE/X04_SRC_DIRECTION_SD/XPBS_compute_direction_sd.sh b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/ITERATION_UPDATE/X04_SRC_DIRECTION_SD/XPBS_compute_direction_sd.sh index 27f9d4d01..e2c717c1c 100644 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/ITERATION_UPDATE/X04_SRC_DIRECTION_SD/XPBS_compute_direction_sd.sh +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/ITERATION_UPDATE/X04_SRC_DIRECTION_SD/XPBS_compute_direction_sd.sh @@ -1,7 +1,7 @@ #!/bin/sh #PBS -q tromp -#PBS -N XCOMPUTE_CG_DIRECTION +#PBS -N XCOMPUTE_CG_DIRECTION #PBS -l nodes=13:ppn=8 #PBS -l walltime=15:00:00 #PBS -j oe @@ -16,22 +16,22 @@ iter=M00 xoutput_tag=XTAG_$iter -direction_dir=../DIRECTION_SD_$iter +direction_dir=../DIRECTION_SD_$iter gradient_dir=../SUMMED_KERNEL_$iter -if [ ! -d $gradient_dir ]; then - echo WRONG! NO $gradient_dir - exit -fi +if [ ! -d $gradient_dir ]; then + echo WRONG! NO $gradient_dir + exit +fi -if [ ! -d $direction_dir ]; then - echo MKDIR $direction_dir - mkdir $direction_dir -fi +if [ ! -d $direction_dir ]; then + echo MKDIR $direction_dir + mkdir $direction_dir +fi -echo submit compute sd direction -mpiexec -np 100 ./xcompute_direction_sd $direction $gradient > $xoutput_tag -echo done successfully +echo submit compute sd direction +mpiexec -np 100 ./xcompute_direction_sd $direction $gradient > $xoutput_tag +echo done successfully diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/ITERATION_UPDATE/X04_SRC_DIRECTION_SD/compute_direction_sd.f90 b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/ITERATION_UPDATE/X04_SRC_DIRECTION_SD/compute_direction_sd.f90 index 333642e7a..b86d8861b 100644 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/ITERATION_UPDATE/X04_SRC_DIRECTION_SD/compute_direction_sd.f90 +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/ITERATION_UPDATE/X04_SRC_DIRECTION_SD/compute_direction_sd.f90 @@ -1,61 +1,61 @@ -program xcompute_direction_sd +program xcompute_direction_sd implicit none include 'mpif.h' include '../../SHARE_FILES/HEADER_FILES/constants.h' include '../../SHARE_FILES/HEADER_FILES/values_from_mesher.h' - include '../../SHARE_FILES/HEADER_FILES/precision.h' + include '../../SHARE_FILES/HEADER_FILES/precision.h' - integer,parameter:: NSPEC=NSPEC_CRUST_MANTLE - integer,parameter:: NKERNEL=4 - integer:: myrank, sizeprocs,ier - integer:: iker,ispec,i,j,k + integer,parameter:: NSPEC=NSPEC_CRUST_MANTLE + integer,parameter:: NKERNEL=4 + integer:: myrank, sizeprocs,ier + integer:: iker,ispec,i,j,k - character(len=512):: direction_dir, gradient_dir - character(len=512):: direction_file, gradient_file - character(len=256):: kernel_name(NKERNEL) + character(len=512):: direction_dir, gradient_dir + character(len=512):: direction_file, gradient_file + character(len=256):: kernel_name(NKERNEL) real(kind=CUSTOM_REAL),dimension(NGLLX,NGLLY,NGLLZ,NSPEC):: direction,gradient call MPI_INIT(ier) call MPI_COMM_SIZE(MPI_COMM_WORLD,sizeprocs,ier) - call MPI_COMM_RANK(MPI_COMM_WORLD,myrank,ier) + call MPI_COMM_RANK(MPI_COMM_WORLD,myrank,ier) call getarg(1,direction_dir) - call getarg(2,gradient_dir) + call getarg(2,gradient_dir) if (trim(direction_dir) == ''.or. trim(gradient_dir) == '') then - call exit_MPI(myrank,'USAGE: xcompute_direction_sd direction_dir gradient_dir') - end if + call exit_MPI(myrank,'USAGE: xcompute_direction_sd direction_dir gradient_dir') + endif - kernel_name=(/"reg1_bulk_betah_kernel_precond_smooth","reg1_bulk_betav_kernel_precond_smooth","reg1_bulk_c_kernel_precond_smooth","reg1_eta_kernel_precond_smooth"/) + kernel_name=(/"reg1_bulk_betah_kernel_precond_smooth","reg1_bulk_betav_kernel_precond_smooth","reg1_bulk_c_kernel_precond_smooth","reg1_eta_kernel_precond_smooth"/) - do iker = 1,NKERNEL - direction=0._CUSTOM_REAL + do iker = 1,NKERNEL + direction=0._CUSTOM_REAL write(direction_file,'(a,i6.6,a)') trim(direction_dir)//'/proc',myrank,'_'//trim(kernel_name(iker))//'.bin' - write(gradient_file,'(a,i6.6,a)') trim(gradient_dir)//'/proc',myrank,'_'//trim(kernel_name(iker))//'.bin' + write(gradient_file,'(a,i6.6,a)') trim(gradient_dir)//'/proc',myrank,'_'//trim(kernel_name(iker))//'.bin' - open(1001,file=trim(gradient_file),status='old',form='unformatted',iostat=ier) + open(1001,file=trim(gradient_file),status='old',form='unformatted',iostat=ier) if (myrank == 0) print*, 'reading gradient1:',trim(gradient_file) - if (ier/=0) then + if (ier/=0) then print*, 'error opening:',trim(gradient_file) call exit_mpi(myrank,'file not found') - end if + endif read(1001) gradient(:,:,:,1:NSPEC) - close(1001) + close(1001) direction=-gradient - + open(1001,file=trim(direction_file),form='unformatted',action='write') - if (myrank == 0) print*, 'writing direction1:',direction_file + if (myrank == 0) print*, 'writing direction1:',direction_file write(1001) direction - close(1001) + close(1001) - end do ! kernel type + enddo ! kernel type -call MPI_FINALIZE(ier) +call MPI_FINALIZE(ier) end program xcompute_direction_sd diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/ITERATION_UPDATE/X04_SRC_DIRECTION_SD/xcompile.sh b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/ITERATION_UPDATE/X04_SRC_DIRECTION_SD/xcompile.sh index 93c8ed862..09a375236 100755 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/ITERATION_UPDATE/X04_SRC_DIRECTION_SD/xcompile.sh +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/ITERATION_UPDATE/X04_SRC_DIRECTION_SD/xcompile.sh @@ -3,17 +3,17 @@ # Princeton University, New Jersey, USA # Last modified: Tue Jan 25 17:19:32 EST 2011 -if [ ! -f ../../SHARE_FILES/HEADER_FILES/constants.h ]; then - echo WRONG! NO constants.h in SHARE_FILES - exit -fi -if [ ! -f ../../SHARE_FILES/HEADER_FILES/values_from_mesher.h ]; then - echo WRONG! NO values_from_mesher.h in SHARE_FILES - exit -fi -if [ ! -f ../../SHARE_FILES/HEADER_FILES/precision.h ]; then - echo WRONG! NO precision.h in SHARE_FILES - exit -fi +if [ ! -f ../../SHARE_FILES/HEADER_FILES/constants.h ]; then + echo WRONG! NO constants.h in SHARE_FILES + exit +fi +if [ ! -f ../../SHARE_FILES/HEADER_FILES/values_from_mesher.h ]; then + echo WRONG! NO values_from_mesher.h in SHARE_FILES + exit +fi +if [ ! -f ../../SHARE_FILES/HEADER_FILES/precision.h ]; then + echo WRONG! NO precision.h in SHARE_FILES + exit +fi mpif90 -O3 -o xcompute_direction_sd compute_direction_sd.f90 exit_mpi.f90 diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/ITERATION_UPDATE/X05_SRC_UPDATE_MODELS/XPBS_update_model.sh b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/ITERATION_UPDATE/X05_SRC_UPDATE_MODELS/XPBS_update_model.sh index b9753506c..552df9814 100644 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/ITERATION_UPDATE/X05_SRC_UPDATE_MODELS/XPBS_update_model.sh +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/ITERATION_UPDATE/X05_SRC_UPDATE_MODELS/XPBS_update_model.sh @@ -1,7 +1,7 @@ #!/bin/sh #PBS -q tromp -#PBS -N XUPDATE_MODEL +#PBS -N XUPDATE_MODEL #PBS -l nodes=13:ppn=8 #PBS -l walltime=15:00:00 #PBS -j oe @@ -19,25 +19,25 @@ step_len=0.01 xoutput_tag=XTAG_$iter_new -input_model=../MODEL_$iter_old +input_model=../MODEL_$iter_old input_kernel=../DIRECTION_CG_$iter_old output_model=../MODEL_$iter_new -if [ ! -d $input_model ]; then - echo WRONG! NO $input_model - exit -fi -if [ ! -d $input_kernel ]; then - echo WRONG! NO $input_kernel - exit -fi -if [ ! -d $output_model ]; then - echo MKDIR $output_model - mkdir $output_model -fi - -echo submit updata model -mpiexec -np 100 ./xadd_model_globe $step_len $input_model $input_kernel $output_model > $xoutput_tag -echo done successfully +if [ ! -d $input_model ]; then + echo WRONG! NO $input_model + exit +fi +if [ ! -d $input_kernel ]; then + echo WRONG! NO $input_kernel + exit +fi +if [ ! -d $output_model ]; then + echo MKDIR $output_model + mkdir $output_model +fi + +echo submit updata model +mpiexec -np 100 ./xadd_model_globe $step_len $input_model $input_kernel $output_model > $xoutput_tag +echo done successfully diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/ITERATION_UPDATE/X05_SRC_UPDATE_MODELS/add_model_globe.f90 b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/ITERATION_UPDATE/X05_SRC_UPDATE_MODELS/add_model_globe.f90 index ca0309bec..f5e9d60d9 100644 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/ITERATION_UPDATE/X05_SRC_UPDATE_MODELS/add_model_globe.f90 +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/ITERATION_UPDATE/X05_SRC_UPDATE_MODELS/add_model_globe.f90 @@ -239,7 +239,7 @@ program add_model ! stores new model in files call store_new_model() - ! stores relative model perturbations + ! stores relative model perturbations call store_perturbations() ! stop all the MPI processes, and exit @@ -317,18 +317,18 @@ subroutine read_parameters() call getarg(2,input_model) call getarg(3,input_kernel) call getarg(4,output_model) -!< Hejun Zhu +!< Hejun Zhu -!> Hejun Zhu +!> Hejun Zhu ! if (trim(s_step_fac) == '') then ! call exit_MPI(myrank,'Usage: add_model_globe_tiso step_factor') ! endif if (trim(s_step_fac) == '' .or. trim(input_model) == '' & - .or. trim(input_kernel) == ''.or. trim(output_model) == '') then - call exit_MPI(myrank, 'Usage: add model_globe_tiso step_factor input_model input_kernel output_model') + .or. trim(input_kernel) == ''.or. trim(output_model) == '') then + call exit_MPI(myrank, 'Usage: add model_globe_tiso step_factor input_model input_kernel output_model') endif -!< Hejun Zhu +!< Hejun Zhu ! read in parameter information @@ -577,7 +577,7 @@ subroutine compute_volume() enddo ! global addressing - write(m_file,'(a,i6.6,a)') & + write(m_file,'(a,i6.6,a)') & '/tigress-hsm/hejunzhu/2011EUROPE_ITERATION_UPDATE/EUROPE_TOPOLOGY_FILE/proc',myrank,'_reg1_solver_data_2.bin' open(11,file=trim(m_file),status='old',form='unformatted',iostat=ier) if( ier /= 0 ) then @@ -772,7 +772,7 @@ subroutine get_gradient() do i = 1, NGLLX ! for bulk - model_dbulk(i,j,k,ispec) = kernel_bulk(i,j,k,ispec) ! no negative sign, in conjugate direction subroutine + model_dbulk(i,j,k,ispec) = kernel_bulk(i,j,k,ispec) ! no negative sign, in conjugate direction subroutine ! for shear model_dbetav(i,j,k,ispec) = kernel_betav(i,j,k,ispec) @@ -803,10 +803,10 @@ subroutine get_gradient() enddo enddo -!> Hejun Zhu +!> Hejun Zhu ! stores model_dbulk, ... arrays ! call store_kernel_updates() -!< Hejun Zhu +!< Hejun Zhu ! statistics call mpi_reduce(minval(model_dbulk),min_bulk,1,CUSTOM_MPI_TYPE,MPI_MIN,0,MPI_COMM_WORLD,ier) @@ -898,7 +898,7 @@ subroutine get_gradient() ! multiply model updates by a subjective factor that will change the step model_dbulk(:,:,:,:) = step_length * model_dbulk(:,:,:,:) model_dbetav(:,:,:,:) = step_length * model_dbetav(:,:,:,:) - model_dbetah(:,:,:,:) = step_length * model_dbetah(:,:,:,:) + model_dbetah(:,:,:,:) = step_length * model_dbetah(:,:,:,:) model_deta(:,:,:,:) = step_length * model_deta(:,:,:,:) diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/ITERATION_UPDATE/X05_SRC_UPDATE_MODELS/xcompile.sh b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/ITERATION_UPDATE/X05_SRC_UPDATE_MODELS/xcompile.sh index a5f600f63..092bf7def 100755 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/ITERATION_UPDATE/X05_SRC_UPDATE_MODELS/xcompile.sh +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/ITERATION_UPDATE/X05_SRC_UPDATE_MODELS/xcompile.sh @@ -3,17 +3,17 @@ # Princeton University, New Jersey, USA # Last modified: Tue Jan 25 17:19:32 EST 2011 -if [ ! -f ../../SHARE_FILES/HEADER_FILES/constants.h ]; then - echo WRONG! NO constants.h - exit -fi -if [ ! -f ../../SHARE_FILES/HEADER_FILES/values_from_mesher.h ]; then - echo WRONG! NO values_from_mesher.h - exit -fi -if [ ! -f ../../SHARE_FILES/HEADER_FILES/precision.h ]; then - echo WRONG! NO precision.h - exit -fi +if [ ! -f ../../SHARE_FILES/HEADER_FILES/constants.h ]; then + echo WRONG! NO constants.h + exit +fi +if [ ! -f ../../SHARE_FILES/HEADER_FILES/values_from_mesher.h ]; then + echo WRONG! NO values_from_mesher.h + exit +fi +if [ ! -f ../../SHARE_FILES/HEADER_FILES/precision.h ]; then + echo WRONG! NO precision.h + exit +fi mpif90 -O3 -o xadd_model_globe add_model_globe.f90 exit_mpi.f90 gll_library.f90 diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/ITERATION_UPDATE/XPBS_single_kernel_vtu.sh b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/ITERATION_UPDATE/XPBS_single_kernel_vtu.sh index 214b3871a..e4bd7c908 100644 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/ITERATION_UPDATE/XPBS_single_kernel_vtu.sh +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/ITERATION_UPDATE/XPBS_single_kernel_vtu.sh @@ -15,11 +15,11 @@ topo_path=EUROPE_TOPOLOGY_FILE local_path=../MODEL_INVERSION/ADJOINT_M18/CMTSOLUTION_200704090832A/KERNEL/ out_path=VTU_SINGLE_KERNEL_M18/CMTSOLUTION_200704090832A -#for tag in bulk_c_kernel bulk_betav_kernel bulk_betah_kernel eta_kernel rho_kernel hess_kernel +#for tag in bulk_c_kernel bulk_betav_kernel bulk_betah_kernel eta_kernel rho_kernel hess_kernel for tag in bulk_betav_kernel -do - ./xcombine_vol_data $slicefile $tag $topo_path $local_path $out_path 0 1 -done +do + ./xcombine_vol_data $slicefile $tag $topo_path $local_path $out_path 0 1 +done -echo combine kernels successfully +echo combine kernels successfully diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/ITERATION_UPDATE/XSHELL_single_kernel_vtu.sh b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/ITERATION_UPDATE/XSHELL_single_kernel_vtu.sh index f1f792743..bf9a64dab 100755 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/ITERATION_UPDATE/XSHELL_single_kernel_vtu.sh +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/ITERATION_UPDATE/XSHELL_single_kernel_vtu.sh @@ -6,69 +6,69 @@ eventfile=../SHARE_FILES/EVENTID_CENTER/XEVENTID iter=M18 -slicefile=XSLICE_FILE - -savedir=VTU_SINGLE_KERNEL_$iter -topo_path1=EUROPE_TOPOLOGY_FILE -topo_path2="EUROPE_TOPOLOGY_FILE" - - -if [ ! -f $eventfile ]; then - echo WRONG! NO $eventfile - exit -fi -if [ ! -f $slicefile ]; then - echo WRONG! NO $slicefile - exit -fi -if [ ! -f xcombine_vol_data ]; then - echo WRONG! NO xcombine_vol_data - exit -fi -if [ ! -d $savedir ]; then - echo MKDIR $savedir - mkdir $savedir -fi -if [ ! -d $topo_path1 ]; then - echo WRONG !NO $topo_path 1 - exit -fi - - -while read line -do - cmtid=`echo $line | awk -F"_" '{print $2}'` - local_path1=../FORWARD_ADJOINT/ADJOINT_$iter/$line/KERNEL/ - local_path2="..\/FORWARD_ADJOINT\/ADJOINT_$iter\/$line\/KERNEL\/" - - out_path1=VTU_SINGLE_KERNEL_$iter/$line - out_path2="VTU_SINGLE_KERNEL_$iter\/$line" - - proctag="#PBS -N XCOMBINE_KERNEL_$cmtid" - - if [ ! -d $out_path1 ] ;then - echo MKDIR $out_path1 - mkdir $out_path1 - fi - - if [ ! -d $local_path1 ]; then - echo WRONG! NO $local_path1 - exit - fi - - - sed -e "s/^#PBS -N.*$/$proctag/g" \ - -e "s/^slicefile=.*$/slicefile=$slicefile/g" \ - -e "s/^topo_path=.*$/topo_path=$topo_path2/g" \ - -e "s/^local_path=.*$/local_path=$local_path2/g" \ - -e "s/^out_path=.*$/out_path=$out_path2/g" \ - XPBS_single_kernel_vtu.sh > XPBS_single_kernel_vtu.sh.out - mv XPBS_single_kernel_vtu.sh.out XPBS_single_kernel_vtu.sh - - echo qsub $line - qsub XPBS_single_kernel_vtu.sh - sleep 3 - -done < $eventfile - - +slicefile=XSLICE_FILE + +savedir=VTU_SINGLE_KERNEL_$iter +topo_path1=EUROPE_TOPOLOGY_FILE +topo_path2="EUROPE_TOPOLOGY_FILE" + + +if [ ! -f $eventfile ]; then + echo WRONG! NO $eventfile + exit +fi +if [ ! -f $slicefile ]; then + echo WRONG! NO $slicefile + exit +fi +if [ ! -f xcombine_vol_data ]; then + echo WRONG! NO xcombine_vol_data + exit +fi +if [ ! -d $savedir ]; then + echo MKDIR $savedir + mkdir $savedir +fi +if [ ! -d $topo_path1 ]; then + echo WRONG !NO $topo_path 1 + exit +fi + + +while read line +do + cmtid=`echo $line | awk -F"_" '{print $2}'` + local_path1=../FORWARD_ADJOINT/ADJOINT_$iter/$line/KERNEL/ + local_path2="..\/FORWARD_ADJOINT\/ADJOINT_$iter\/$line\/KERNEL\/" + + out_path1=VTU_SINGLE_KERNEL_$iter/$line + out_path2="VTU_SINGLE_KERNEL_$iter\/$line" + + proctag="#PBS -N XCOMBINE_KERNEL_$cmtid" + + if [ ! -d $out_path1 ] ;then + echo MKDIR $out_path1 + mkdir $out_path1 + fi + + if [ ! -d $local_path1 ]; then + echo WRONG! NO $local_path1 + exit + fi + + + sed -e "s/^#PBS -N.*$/$proctag/g" \ + -e "s/^slicefile=.*$/slicefile=$slicefile/g" \ + -e "s/^topo_path=.*$/topo_path=$topo_path2/g" \ + -e "s/^local_path=.*$/local_path=$local_path2/g" \ + -e "s/^out_path=.*$/out_path=$out_path2/g" \ + XPBS_single_kernel_vtu.sh > XPBS_single_kernel_vtu.sh.out + mv XPBS_single_kernel_vtu.sh.out XPBS_single_kernel_vtu.sh + + echo qsub $line + qsub XPBS_single_kernel_vtu.sh + sleep 3 + +done < $eventfile + + diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/ITERATION_UPDATE/xcopy_model_to_mesher.sh b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/ITERATION_UPDATE/xcopy_model_to_mesher.sh index 2eb7b7bfd..52851c60b 100755 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/ITERATION_UPDATE/xcopy_model_to_mesher.sh +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/ITERATION_UPDATE/xcopy_model_to_mesher.sh @@ -9,23 +9,23 @@ model=MODEL_$iter dest=../FORWARD_ADJOINT/XSRC_SEM/DATA/GLL/ if [ ! -d $model ]; then - echo WRONG! NO $model - exit -fi -if [ ! -d $dest ]; then - echo WRONG! NO $dest - exit -fi + echo WRONG! NO $model + exit +fi +if [ ! -d $dest ]; then + echo WRONG! NO $dest + exit +fi echo copy vpv from $model ... -cp $model/proc*_reg1_vpv.bin $dest -echo copy vph from $model ... -cp $model/proc*_reg1_vph.bin $dest +cp $model/proc*_reg1_vpv.bin $dest +echo copy vph from $model ... +cp $model/proc*_reg1_vph.bin $dest echo copy vsv from $model ... cp $model/proc*_reg1_vsv.bin $dest echo copy vsh from $model ... -cp $model/proc*_reg1_vsh.bin $dest +cp $model/proc*_reg1_vsh.bin $dest echo copy rho from $model ... -cp $model/proc*_reg1_rho.bin $dest -echo copy eta from $model ... -cp $model/proc*_reg1_eta.bin $dest +cp $model/proc*_reg1_rho.bin $dest +echo copy eta from $model ... +cp $model/proc*_reg1_eta.bin $dest diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/ITERATION_UPDATE/xgen_vtu_file.sh b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/ITERATION_UPDATE/xgen_vtu_file.sh index 3253f540a..0571b0ba0 100644 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/ITERATION_UPDATE/xgen_vtu_file.sh +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/ITERATION_UPDATE/xgen_vtu_file.sh @@ -4,13 +4,13 @@ # Last modified: Fri Sep 14 15:08:23 EDT 2012 -# This script is used to generate vtu file from bin file +# This script is used to generate vtu file from bin file -iter=M00 -vtu=KERNEL -if [ $vtu == DIRECTION ]; then - method=CG -fi +iter=M00 +vtu=KERNEL +if [ $vtu == DIRECTION ]; then + method=CG +fi topo_path=EUROPE_TOPOLOGY_FILE @@ -18,59 +18,59 @@ slicefile=XSLIEC_FILE -if [ $vtu == KERNEL ]; then - local_path=SUMMED_KERNEL_$iter - out_path=VTU_SUMMED_KERNEL_$iter -elif [ $vtu == DIRECTION ]; then - if [ $method == SD ]; then - local_path=DIRECTION_SD_$iter - output_path=VTU_DIRECTION_SD_$iter - elif [ $method == CG ]; then - local_path=DIRECTION_CG_$iter - output_path=VTU_DIRECTION_CG_$iter - elif [ $method == LBFGS ]; then - local_path=DIRECTION_LBFGS_$iter - output_path=VTU_DIRECTION_LBFGS_$iter - else - echo WRONG! NO $method - fi -elif [ $vtu == MODEL ]; then - local_path=MODEL_$iter - output_path=VTU_MODEL_$iter -elif [ $vtu == MODEL_PERT ]; then - local_path=MODEL_$iter"_PERT_STW" - output_path=VTU_MODEL_$iter"_PERT_STW" -else - echo WRONG! NO $vtu - exit -fi +if [ $vtu == KERNEL ]; then + local_path=SUMMED_KERNEL_$iter + out_path=VTU_SUMMED_KERNEL_$iter +elif [ $vtu == DIRECTION ]; then + if [ $method == SD ]; then + local_path=DIRECTION_SD_$iter + output_path=VTU_DIRECTION_SD_$iter + elif [ $method == CG ]; then + local_path=DIRECTION_CG_$iter + output_path=VTU_DIRECTION_CG_$iter + elif [ $method == LBFGS ]; then + local_path=DIRECTION_LBFGS_$iter + output_path=VTU_DIRECTION_LBFGS_$iter + else + echo WRONG! NO $method + fi +elif [ $vtu == MODEL ]; then + local_path=MODEL_$iter + output_path=VTU_MODEL_$iter +elif [ $vtu == MODEL_PERT ]; then + local_path=MODEL_$iter"_PERT_STW" + output_path=VTU_MODEL_$iter"_PERT_STW" +else + echo WRONG! NO $vtu + exit +fi -if [ $vtu == KERNEL ]; then - for tag in bulk_betav_kernel_precond_smooth bulk_betah_kernel_precond_smooth bulk_c_kernel_precond_smooth eta_kernel_precond_smooth - do - ./xcombine_vol_data $slicefile $tag $topo_path $local_path $out_path 0 1 - done -elif [ $vtu == DIRECTION ]; then - for tag in bulk_c_kernel_precond bulk_betav_kernel_precond bulk_betah_kernel_precond eta_kernel_precond rho_kernel_precond hess_kernel_precond - do - ./xcombine_vol_data $slicefile $tag $topo_path $local_path $out_path 0 1 - done -elif [ $vtu == MODEL ]; then - for tag in vpv vph vsv vsh eta rho - do +if [ $vtu == KERNEL ]; then + for tag in bulk_betav_kernel_precond_smooth bulk_betah_kernel_precond_smooth bulk_c_kernel_precond_smooth eta_kernel_precond_smooth + do + ./xcombine_vol_data $slicefile $tag $topo_path $local_path $out_path 0 1 + done +elif [ $vtu == DIRECTION ]; then + for tag in bulk_c_kernel_precond bulk_betav_kernel_precond bulk_betah_kernel_precond eta_kernel_precond rho_kernel_precond hess_kernel_precond + do + ./xcombine_vol_data $slicefile $tag $topo_path $local_path $out_path 0 1 + done +elif [ $vtu == MODEL ]; then + for tag in vpv vph vsv vsh eta rho + do - ./xcombine_vol_data $slicefile $tag $topo_path $local_path $out_path 0 1 - done -elif [ $vtu == MODEL_PERT ]; then - for tag in dvsh dvpv dvph deta drho - do - ./xcombine_vol_data $slicefile $tag $topo_path $local_path $out_path 0 1 - done + ./xcombine_vol_data $slicefile $tag $topo_path $local_path $out_path 0 1 + done +elif [ $vtu == MODEL_PERT ]; then + for tag in dvsh dvpv dvph deta drho + do + ./xcombine_vol_data $slicefile $tag $topo_path $local_path $out_path 0 1 + done -else - echo WRONG! NO $vtu - exit -fi +else + echo WRONG! NO $vtu + exit +fi diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/ITERATION_UPDATE/xold/xgen_direction_vtu.sh b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/ITERATION_UPDATE/xold/xgen_direction_vtu.sh index f562f9206..8bb51c718 100755 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/ITERATION_UPDATE/xold/xgen_direction_vtu.sh +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/ITERATION_UPDATE/xold/xgen_direction_vtu.sh @@ -8,47 +8,47 @@ iter=M00 method=CG -slicefile=XSLICE_FILE -topo_path=EUROPE_TOPOLOGY_FILE - -if [ $method == SD ]; then - local_path=DIRECTION_SD_$iter - out_path=VTU_DIRECTION_SD_$iter -elif [ $method == CG ]; then - local_path=DIRECTION_CG_$iter - out_path=VTU_DIRECTION_CG_$iter -elif [ $method == LBFGS ]; then - local_path=DIRECTION_LBFGS_$iter - out_path=VTU_DIRECTION_LBFGS_$iter -else - echo WRONG! NO $method - exit -fi - - - -if [ ! -f $slicefile ] ;then - echo WRONG! NO $slicefile - exit -fi -if [ ! -d $topo_path ]; then - echo WRONG! NO $topo_path - exit -fi -if [ ! -d $local_path ]; then - echo WROGN! NO $local_path - exit -fi +slicefile=XSLICE_FILE +topo_path=EUROPE_TOPOLOGY_FILE + +if [ $method == SD ]; then + local_path=DIRECTION_SD_$iter + out_path=VTU_DIRECTION_SD_$iter +elif [ $method == CG ]; then + local_path=DIRECTION_CG_$iter + out_path=VTU_DIRECTION_CG_$iter +elif [ $method == LBFGS ]; then + local_path=DIRECTION_LBFGS_$iter + out_path=VTU_DIRECTION_LBFGS_$iter +else + echo WRONG! NO $method + exit +fi + + + +if [ ! -f $slicefile ] ;then + echo WRONG! NO $slicefile + exit +fi +if [ ! -d $topo_path ]; then + echo WRONG! NO $topo_path + exit +fi +if [ ! -d $local_path ]; then + echo WROGN! NO $local_path + exit +fi if [ ! -d $out_path ]; then - echo MKDIR $out_path - mkdir $out_path -fi + echo MKDIR $out_path + mkdir $out_path +fi -for tag in bulk_c_kernel_precond bulk_betav_kernel_precond bulk_betah_kernel_precond eta_kernel_precond rho_kernel_precond hess_kernel_precond -do - ./xcombine_vol_data $slicefile $tag $topo_path $local_path $out_path 0 1 -done +for tag in bulk_c_kernel_precond bulk_betav_kernel_precond bulk_betah_kernel_precond eta_kernel_precond rho_kernel_precond hess_kernel_precond +do + ./xcombine_vol_data $slicefile $tag $topo_path $local_path $out_path 0 1 +done -echo combine kernels successfully +echo combine kernels successfully diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/ITERATION_UPDATE/xold/xgen_model_vtu.sh b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/ITERATION_UPDATE/xold/xgen_model_vtu.sh index f7e8f40c2..f78b0cb7a 100755 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/ITERATION_UPDATE/xold/xgen_model_vtu.sh +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/ITERATION_UPDATE/xold/xgen_model_vtu.sh @@ -8,37 +8,37 @@ iter=M18 slicefile=XSLICE_FILE topo_path=EUROPE_TOPOLOGY_FILE -local_path=MODEL_$iter +local_path=MODEL_$iter out_path=VTU_MODEL_$iter -if [ ! -f $slicefile ]; then - echo WRONG! NO $slicefile - exit -fi -if [ ! -d $topo_path ]; then - echo WRONG! NO $topo_path - exit -fi -if [ ! -d $local_path ]; then - echo WRONG! NO $local_path - exit -fi -if [ ! -d $out_path ]; then - echo MKDIR $out_path - mkdir $out_path -fi +if [ ! -f $slicefile ]; then + echo WRONG! NO $slicefile + exit +fi +if [ ! -d $topo_path ]; then + echo WRONG! NO $topo_path + exit +fi +if [ ! -d $local_path ]; then + echo WRONG! NO $local_path + exit +fi +if [ ! -d $out_path ]; then + echo MKDIR $out_path + mkdir $out_path +fi -#for tag in vpv vph vsv vsh eta rho +#for tag in vpv vph vsv vsh eta rho #for tag in vsv vsh dvsvvsv dvshvsh -#for tag in dvsvvsv dvshvsh dvpvvpv dvphvph detaeta drhorho -for tag in vsv +#for tag in dvsvvsv dvshvsh dvpvvpv dvphvph detaeta drhorho +for tag in vsv #for tag in dvsvvsv -do - ./xcombine_vol_data $slicefile $tag $topo_path $local_path $out_path 0 1 -done +do + ./xcombine_vol_data $slicefile $tag $topo_path $local_path $out_path 0 1 +done -echo combine kernels successfully +echo combine kernels successfully diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/ITERATION_UPDATE/xold/xgen_pert_model_ref_vtu.sh b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/ITERATION_UPDATE/xold/xgen_pert_model_ref_vtu.sh index cdf97d5b7..381056c94 100755 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/ITERATION_UPDATE/xold/xgen_pert_model_ref_vtu.sh +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/ITERATION_UPDATE/xold/xgen_pert_model_ref_vtu.sh @@ -5,37 +5,37 @@ iter=M18_PERT_STW -slicefile=XSLICE_FILE +slicefile=XSLICE_FILE topo_path=/tigress-hsm/hejunzhu/2011EUROPE_ITERATION_UPDATE/EUROPE_TOPOLOGY_FILE -local_path=/tigress-hsm/hejunzhu/2011EUROPE_ITERATION_UPDATE/MODEL_$iter +local_path=/tigress-hsm/hejunzhu/2011EUROPE_ITERATION_UPDATE/MODEL_$iter out_path=/tigress-hsm/hejunzhu/2011EUROPE_ITERATION_UPDATE/VTU_MODEL_$iter -if [ ! -f $slicefile ]; then - echo WRONG! NO $slicefile - exit -fi -if [ ! -d $topo_path ]; then - echo WRONG! NO $topo_path - exit -fi -if [ ! -d $local_path ]; then - echo WRONG! NO $local_path - exit -fi -if [ ! -d $out_path ]; then - echo MKDIR $out_path - mkdir $out_path -fi +if [ ! -f $slicefile ]; then + echo WRONG! NO $slicefile + exit +fi +if [ ! -d $topo_path ]; then + echo WRONG! NO $topo_path + exit +fi +if [ ! -d $local_path ]; then + echo WRONG! NO $local_path + exit +fi +if [ ! -d $out_path ]; then + echo MKDIR $out_path + mkdir $out_path +fi -#for tag in dvsv dvsh dvpv dvph deta drho +#for tag in dvsv dvsh dvpv dvph deta drho for tag in dvsh dvpv dvph deta drho -do - ./xcombine_vol_data $slicefile $tag $topo_path $local_path $out_path 0 1 -done +do + ./xcombine_vol_data $slicefile $tag $topo_path $local_path $out_path 0 1 +done -echo combine kernels successfully +echo combine kernels successfully diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/ITERATION_UPDATE/xold/xgen_summed_kernel_vtu.sh b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/ITERATION_UPDATE/xold/xgen_summed_kernel_vtu.sh index 8af1cb21d..8140992d2 100755 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/ITERATION_UPDATE/xold/xgen_summed_kernel_vtu.sh +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/ITERATION_UPDATE/xold/xgen_summed_kernel_vtu.sh @@ -7,41 +7,41 @@ iter=M18 -slicefile=XSLICE_FILE -topo_path=/tigress-hsm/hejunzhu/2011EUROPE_ITERATION_UPDATE/EUROPE_TOPOLOGY_FILE +slicefile=XSLICE_FILE +topo_path=/tigress-hsm/hejunzhu/2011EUROPE_ITERATION_UPDATE/EUROPE_TOPOLOGY_FILE local_path=/tigress-hsm/hejunzhu/2011EUROPE_ITERATION_UPDATE/SUMMED_KERNEL_$iter out_path=/tigress-hsm/hejunzhu/2011EUROPE_ITERATION_UPDATE/VTU_SUMMED_KERNEL_$iter -if [ ! -f $slicefile ] ;then - echo WRONG! NO $slicefile - exit -fi -if [ ! -d $topo_path ]; then - echo WRONG! NO $topo_path - exit -fi -if [ ! -d $local_path ]; then - echo WROGN! NO $local_path - exit -fi +if [ ! -f $slicefile ] ;then + echo WRONG! NO $slicefile + exit +fi +if [ ! -d $topo_path ]; then + echo WRONG! NO $topo_path + exit +fi +if [ ! -d $local_path ]; then + echo WROGN! NO $local_path + exit +fi if [ ! -d $out_path ]; then - echo MKDIR $out_path - mkdir $out_path -fi + echo MKDIR $out_path + mkdir $out_path +fi #for tag in bulk_c_kernel bulk_betav_kernel bulk_betah_kernel eta_kernel rho_kernel hess_kernel #for tag in bulk_betav_kernel bulk_betah_kernel hess_kernel #for tag in bulk_betah_kernel -#for tag in bulk_c_kernel_precond bulk_betav_kernel_precond bulk_betah_kernel_precond eta_kernel_precond rho_kernel_precond #hess_kernel_precond -#for tag in bulk_betav_kernel_precond bulk_betah_kernel_precond hess_kernel_precond -#for tag in bulk_betah_kernel_precond -#for tag in bulk_betav_kernel_precond_smooth bulk_betah_kernel_precond_smooth bulk_c_kernel_precond_smooth eta_kernel_precond_smooth +#for tag in bulk_c_kernel_precond bulk_betav_kernel_precond bulk_betah_kernel_precond eta_kernel_precond rho_kernel_precond #hess_kernel_precond +#for tag in bulk_betav_kernel_precond bulk_betah_kernel_precond hess_kernel_precond +#for tag in bulk_betah_kernel_precond +#for tag in bulk_betav_kernel_precond_smooth bulk_betah_kernel_precond_smooth bulk_c_kernel_precond_smooth eta_kernel_precond_smooth for tag in bulk_betav_kernel_precond_smooth bulk_betah_kernel_precond_smooth #for tag in bulk_betav_kernel_precond_smooth -do - ./xcombine_vol_data $slicefile $tag $topo_path $local_path $out_path 0 1 -done +do + ./xcombine_vol_data $slicefile $tag $topo_path $local_path $out_path 0 1 +done -echo combine kernels successfully +echo combine kernels successfully diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/MODEL_VISULIZATION/SRC_MODEL_SLICE_HORIZ/XPBS_slice_horiz.sh b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/MODEL_VISULIZATION/SRC_MODEL_SLICE_HORIZ/XPBS_slice_horiz.sh index 07371cf78..83c456cd6 100755 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/MODEL_VISULIZATION/SRC_MODEL_SLICE_HORIZ/XPBS_slice_horiz.sh +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/MODEL_VISULIZATION/SRC_MODEL_SLICE_HORIZ/XPBS_slice_horiz.sh @@ -2,7 +2,7 @@ #PBS -q tromp -#PBS -N XSLICE +#PBS -N XSLICE #PBS -l nodes=12:ppn=8+1:ppn=4 #PBS -l walltime=15:00:00 #PBS -j oe @@ -20,8 +20,8 @@ gmtout=/scratch/lustre/hejunzhu/2012SHEAR_ATTENUATION_ITERATION_UPDATE/XSRC_MODE echo $PBS_O_WORKDIR cd $PBS_O_WORKDIR -echo submit slicing -mpiexec -np 100 ./xsem_model_slice $depthslice $topo_path $model_path $tag $gmtout -echo done successfully +echo submit slicing +mpiexec -np 100 ./xsem_model_slice $depthslice $topo_path $model_path $tag $gmtout +echo done successfully diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/MODEL_VISULIZATION/SRC_MODEL_SLICE_HORIZ/XSHELL_slice_horiz.sh b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/MODEL_VISULIZATION/SRC_MODEL_SLICE_HORIZ/XSHELL_slice_horiz.sh index 15277905b..1759871a9 100755 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/MODEL_VISULIZATION/SRC_MODEL_SLICE_HORIZ/XSHELL_slice_horiz.sh +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/MODEL_VISULIZATION/SRC_MODEL_SLICE_HORIZ/XSHELL_slice_horiz.sh @@ -5,67 +5,67 @@ iter=M42_PERT_STW -topo_path="\/scratch\/lustre\/hejunzhu\/2012SHEAR_ATTENUATION_ITERATION_UPDATE\/EUROPE_TOPOLOGY_FILE" +topo_path="\/scratch\/lustre\/hejunzhu\/2012SHEAR_ATTENUATION_ITERATION_UPDATE\/EUROPE_TOPOLOGY_FILE" topo_path1=/scratch/lustre/hejunzhu/2012SHEAR_ATTENUATION_ITERATION_UPDATE/EUROPE_TOPOLOGY_FILE - -model_path="\/scratch\/lustre\/hejunzhu\/2012SHEAR_ATTENUATION_ITERATION_UPDATE\/MODEL_$iter" + +model_path="\/scratch\/lustre\/hejunzhu\/2012SHEAR_ATTENUATION_ITERATION_UPDATE\/MODEL_$iter" model_path1=/scratch/lustre/hejunzhu/2012SHEAR_ATTENUATION_ITERATION_UPDATE/MODEL_$iter -out_path="\/scratch\/lustre\/hejunzhu\/2012SHEAR_ATTENUATION_ITERATION_UPDATE\/XSRC_MODEL_SLICE_HORIZ\/MODEL_$iter" -out_path1=/scratch/lustre/hejunzhu/2012SHEAR_ATTENUATION_ITERATION_UPDATE/XSRC_MODEL_SLICE_HORIZ/MODEL_$iter +out_path="\/scratch\/lustre\/hejunzhu\/2012SHEAR_ATTENUATION_ITERATION_UPDATE\/XSRC_MODEL_SLICE_HORIZ\/MODEL_$iter" +out_path1=/scratch/lustre/hejunzhu/2012SHEAR_ATTENUATION_ITERATION_UPDATE/XSRC_MODEL_SLICE_HORIZ/MODEL_$iter + + +if [ ! -f xsem_model_slice ]; then + echo WRONG! NO xsem_model_slice + exit +fi + +if [ ! -d $topo_path1 ]; then + echo WRONG !NO $topo_path1 + exit +fi + +if [ ! -d $model_path1 ]; then + echo WRONG! NO $model_path1 + exit +fi -if [ ! -f xsem_model_slice ]; then - echo WRONG! NO xsem_model_slice - exit +if [ ! -d $out_path1 ] ;then + echo MKDIR $out_path1 + mkdir $out_path1 fi -if [ ! -d $topo_path1 ]; then - echo WRONG !NO $topo_path1 - exit -fi - -if [ ! -d $model_path1 ]; then - echo WRONG! NO $model_path1 - exit -fi - - -if [ ! -d $out_path1 ] ;then - echo MKDIR $out_path1 - mkdir $out_path1 -fi - -#for depth in 005 025 050 075 125 175 225 275 325 375 425 475 525 575 625 675 -for depth in 075 -do - depthslice="XYZ_FILE_HORIZ\/DEPTH_SLICE_$depth.xyz" - depthslice1="XYZ_FILE_HORIZ/DEPTH_SLICE_$depth.xyz" - if [ ! -f $depthslice1 ]; then - echo WRONG! NO $depthslice1 - exit - fi - - #for tag in dvsh_vsv dbulk dpossion - #for tag in dvsh dvsh_vsv dbulk dpossion - #for tag in dvp_vs - for tag in dvsv dQmu - do - gmtout="\/scratch\/lustre\/hejunzhu\/2012SHEAR_ATTENUATION_ITERATION_UPDATE\/XSRC_MODEL_SLICE_HORIZ\/MODEL_$iter\/DEPTH_SLICE_"$depth"_"$tag".xyz" - - echo $depth $tag - - sed -e "s/^depthslice=.*$/depthslice=$depthslice/g"\ - -e "s/^topo_path=.*$/topo_path=$topo_path/g"\ - -e "s/^model_path=.*$/model_path=$model_path/g"\ - -e "s/^tag=.*$/tag=$tag/g"\ - -e "s/^gmtout=.*$/gmtout=$gmtout/g"\ - xgen_slice_pbs.sh > xgen_slice_pbs.sh.out - mv xgen_slice_pbs.sh.out xgen_slice_pbs.sh - qsub xgen_slice_pbs.sh - sleep 5 - - done +#for depth in 005 025 050 075 125 175 225 275 325 375 425 475 525 575 625 675 +for depth in 075 +do + depthslice="XYZ_FILE_HORIZ\/DEPTH_SLICE_$depth.xyz" + depthslice1="XYZ_FILE_HORIZ/DEPTH_SLICE_$depth.xyz" + if [ ! -f $depthslice1 ]; then + echo WRONG! NO $depthslice1 + exit + fi + + #for tag in dvsh_vsv dbulk dpossion + #for tag in dvsh dvsh_vsv dbulk dpossion + #for tag in dvp_vs + for tag in dvsv dQmu + do + gmtout="\/scratch\/lustre\/hejunzhu\/2012SHEAR_ATTENUATION_ITERATION_UPDATE\/XSRC_MODEL_SLICE_HORIZ\/MODEL_$iter\/DEPTH_SLICE_"$depth"_"$tag".xyz" + + echo $depth $tag + + sed -e "s/^depthslice=.*$/depthslice=$depthslice/g"\ + -e "s/^topo_path=.*$/topo_path=$topo_path/g"\ + -e "s/^model_path=.*$/model_path=$model_path/g"\ + -e "s/^tag=.*$/tag=$tag/g"\ + -e "s/^gmtout=.*$/gmtout=$gmtout/g"\ + xgen_slice_pbs.sh > xgen_slice_pbs.sh.out + mv xgen_slice_pbs.sh.out xgen_slice_pbs.sh + qsub xgen_slice_pbs.sh + sleep 5 + + done done diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/MODEL_VISULIZATION/SRC_MODEL_SLICE_HORIZ/exit_mpi.f90 b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/MODEL_VISULIZATION/SRC_MODEL_SLICE_HORIZ/exit_mpi.f90 index ede763e4b..ed7e236b0 100644 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/MODEL_VISULIZATION/SRC_MODEL_SLICE_HORIZ/exit_mpi.f90 +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/MODEL_VISULIZATION/SRC_MODEL_SLICE_HORIZ/exit_mpi.f90 @@ -70,7 +70,7 @@ subroutine exit_MPI(myrank,error_msg) ! otherwise: there is no standard behaviour to exit with an error code in fortran, ! however most compilers do recognize this as an error code stop statement; ! to check stop code in terminal: > echo $? - stop 30 + stop 30 ! or just exit with message: !stop 'error, program ended in exit_MPI' diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/MODEL_VISULIZATION/SRC_MODEL_SLICE_HORIZ/rthetaphi_xyz.f90 b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/MODEL_VISULIZATION/SRC_MODEL_SLICE_HORIZ/rthetaphi_xyz.f90 index d04ee9f5c..3ad97c40e 100644 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/MODEL_VISULIZATION/SRC_MODEL_SLICE_HORIZ/rthetaphi_xyz.f90 +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/MODEL_VISULIZATION/SRC_MODEL_SLICE_HORIZ/rthetaphi_xyz.f90 @@ -113,10 +113,10 @@ subroutine rthetaphi_2_xyz(x,y,z,r,theta,phi) include "../../SHARE_FILES/HEADER_FILES/constants.h" real(kind=CUSTOM_REAL) x,y,z,r,theta,phi - + x = r * sin(theta) * cos(phi) y = r * sin(theta) * sin(phi) z = r * cos(theta) - + end subroutine rthetaphi_2_xyz diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/MODEL_VISULIZATION/SRC_MODEL_SLICE_HORIZ/sem_model_slice.f90 b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/MODEL_VISULIZATION/SRC_MODEL_SLICE_HORIZ/sem_model_slice.f90 index 79a987106..61471aa56 100644 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/MODEL_VISULIZATION/SRC_MODEL_SLICE_HORIZ/sem_model_slice.f90 +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/MODEL_VISULIZATION/SRC_MODEL_SLICE_HORIZ/sem_model_slice.f90 @@ -1,56 +1,56 @@ program sem_model_slice -implicit none +implicit none include 'mpif.h' include '../../SHARE_FILES/HEADER_FILES/constants.h' include '../../SHARE_FILES/HEADER_FILES/values_from_mesher.h' include '../../SHARE_FILES/HEADER_FILES/precision.h' -integer,parameter:: NUM_NODES=99 ! for recent mesher 100 processors -integer,parameter:: iregion=1 ! for region one +integer,parameter:: NUM_NODES=99 ! for recent mesher 100 processors +integer,parameter:: iregion=1 ! for region one integer,parameter:: NMAXPTS=10000000 -real(kind=CUSTOM_REAL):: R_CUT_RANGE=0.00785d0 ! dr=0.00785 ~ 50 km depth +real(kind=CUSTOM_REAL):: R_CUT_RANGE=0.00785d0 ! dr=0.00785 ~ 50 km depth integer::iproc,ipt,npts -character(len=150):: xyz_infile,topo_dir,model_dir,filename,gmt_outfile +character(len=150):: xyz_infile,topo_dir,model_dir,filename,gmt_outfile character(len=256):: prname_topo, prname_file -character(len=256):: topo_file, data_file +character(len=256):: topo_file, data_file real(kind=CUSTOM_REAL),dimension(NMAXPTS):: x,y,z -real(kind=CUSTOM_REAL),dimension(NMAXPTS):: xfound,yfound,zfound,vfound +real(kind=CUSTOM_REAL),dimension(NMAXPTS):: xfound,yfound,zfound,vfound real(kind=CUSTOM_REAL),dimension(NMAXPTS)::distmin,dist, distall, v, vall -integer,dimension(NMAXPTS):: ispec_found,ix_found,iy_found,iz_found +integer,dimension(NMAXPTS):: ispec_found,ix_found,iy_found,iz_found real(kind=CUSTOM_REAL),dimension(NGLOB_CRUST_MANTLE):: xstore, ystore, zstore integer,dimension(NGLLX,NGLLY,NGLLZ,NSPEC_CRUST_MANTLE):: ibool -real(kind=CUSTOM_REAL),dimension(NGLLX,NGLLY,NGLLZ,NSPEC_CRUST_MANTLE):: vstore +real(kind=CUSTOM_REAL),dimension(NGLLX,NGLLY,NGLLZ,NSPEC_CRUST_MANTLE):: vstore integer:: ier,sizeprocs,myrank,ios integer:: i,j,k,ispec,iglob real(kind=CUSTOM_REAL):: r,theta,phi,lat,lon,dep, xmesh,ymesh,zmesh -real(kind=CUSTOM_REAL),dimension(2,NMAXPTS):: in,out -real(kind=CUSTOM_REAL):: R_CUT, r1 +real(kind=CUSTOM_REAL),dimension(2,NMAXPTS):: in,out +real(kind=CUSTOM_REAL):: R_CUT, r1 call MPI_INIT(ier) call MPI_COMM_SIZE(MPI_COMM_WORLD,sizeprocs,ier) -call MPI_COMM_RANK(MPI_COMM_WORLD,myrank,ier) +call MPI_COMM_RANK(MPI_COMM_WORLD,myrank,ier) -! read input file +! read input file call getarg(1,xyz_infile) call getarg(2,topo_dir) call getarg(3,model_dir) call getarg(4,filename) -call getarg(5,gmt_outfile) +call getarg(5,gmt_outfile) ! read interpolate points -if ( myrank == 0) then +if ( myrank == 0) then write(*,*) "INPUT FILE:", trim(xyz_infile) write(*,*) "TOPOLOGY FILE:", trim(topo_dir) write(*,*) "MODEL DIR:", trim(model_dir) - write(*,*) "VALUE NAME:", trim(filename) - write(*,*) "OUTPUT:", trim(gmt_outfile) -end if + write(*,*) "VALUE NAME:", trim(filename) + write(*,*) "OUTPUT:", trim(gmt_outfile) +endif - -open(1001,file=trim(xyz_infile),status='old',iostat=ios) -i=0 + +open(1001,file=trim(xyz_infile),status='old',iostat=ios) +i=0 do while (1==1) i=i+1 read(1001,*,iostat=ios) xmesh,ymesh,zmesh @@ -59,27 +59,27 @@ program sem_model_slice x(i)=xmesh y(i)=ymesh z(i)=zmesh -end do +enddo close(1001) npts=i-1 -!end if +!endif !call MPI_BCAST(npts,1,MPI_INTEGER,0,MPI_COMM_WORLD,ier) !call MPI_BCAST(x,NMAXPTS,CUSTOM_MPI_TYPE,0,MPI_COMM_WORLD,ier) !call MPI_BCAST(y,NMAXPTS,CUSTOM_MPI_TYPE,0,MPI_COMM_WORLD,ier) !call MPI_BCAST(z,NMAXPTS,CUSTOM_MPI_TYPE,0,MPI_COMM_WORLD,ier) -if ( myrank == 0 ) then - write(*,*) 'Total number of points = ', npts +if ( myrank == 0 ) then + write(*,*) 'Total number of points = ', npts if (npts>NMAXPTS .or. npts < 0) call exit_MPI(myrank,'Npts error...') -end if +endif -write(prname_topo,'(a,i6.6,a,i1,a)') trim(topo_dir)//'/proc',myrank,'_reg',iregion,'_' +write(prname_topo,'(a,i6.6,a,i1,a)') trim(topo_dir)//'/proc',myrank,'_reg',iregion,'_' write(prname_file,'(a,i6.6,a,i1,a)') trim(model_dir)//'/proc',myrank,'_reg',iregion,'_' -! read value file +! read value file data_file = trim(prname_file) // trim(filename) // '.bin' open(unit = 27,file = trim(data_file),status='old',action='read', iostat = ios,form ='unformatted') if (ios /= 0) call exit_MPI(myrank,'Error reading value file') @@ -87,8 +87,8 @@ program sem_model_slice close(27) if (myrank ==0) write(*,*) 'DONE READING',trim(data_file) - -! read topology + +! read topology topo_file = trim(prname_topo) // 'solver_data_2' // '.bin' open(unit = 28,file = trim(topo_file),status='old',action='read', iostat = ios, form='unformatted') if (ios /= 0) call exit_MPI(myrank,'Error reading topology file') @@ -104,7 +104,7 @@ program sem_model_slice if (myrank == 0) write(*,*) 'DONE READING',trim(topo_file) -distmin(1:npts)=HUGEVAL +distmin(1:npts)=HUGEVAL do ispec=1,NSPEC_CRUST_MANTLE @@ -116,55 +116,55 @@ program sem_model_slice iglob=ibool(i,j,k,ispec) - r1=sqrt((xstore(iglob))**2+(ystore(iglob))**2+(zstore(iglob))**2) - - if ( abs(r1-R_CUT) < R_CUT_RANGE ) then + r1=sqrt((xstore(iglob))**2+(ystore(iglob))**2+(zstore(iglob))**2) + + if ( abs(r1-R_CUT) < R_CUT_RANGE ) then dist(1:npts) = dsqrt((x(1:npts)-dble(xstore(iglob)))**2 & +(y(1:npts)-dble(ystore(iglob)))**2 & +(z(1:npts)-dble(zstore(iglob)))**2) do ipt=1,npts - if (dist(ipt) < distmin(ipt)) then + if (dist(ipt) < distmin(ipt)) then distmin(ipt)=dist(ipt) - ispec_found(ipt)=ispec + ispec_found(ipt)=ispec ix_found(ipt)=i iy_found(ipt)=j iz_found(ipt)=k vfound(ipt)=vstore(i,j,k,ispec) - end if - end do ! ipt loop - end if ! radius within in a range + endif + enddo ! ipt loop + endif ! radius within in a range - end do ! i loop - end do ! j loop - end do ! k loop -end do ! ispec loop + enddo ! i loop + enddo ! j loop + enddo ! k loop +enddo ! ispec loop call MPI_BARRIER(MPI_COMM_WORLD,ier) -if (myrank == 0) print*,'Done looping over global points' +if (myrank == 0) print*,'Done looping over global points' do i = 1,npts in(1,i)=distmin(i) in(2,i)=myrank -end do +enddo call MPI_REDUCE(in,out,npts,CUSTOM_MPI_2REAL,MPI_MINLOC,0,MPI_COMM_WORLD,ier) -call MPI_BCAST(out,2*npts,CUSTOM_MPI_TYPE,0,MPI_COMM_WORLD,ier) +call MPI_BCAST(out,2*npts,CUSTOM_MPI_TYPE,0,MPI_COMM_WORLD,ier) v(1:npts)=0 dist(1:npts)=0. do i=1,npts - if (myrank == nint(out(2,i))) then + if (myrank == nint(out(2,i))) then v(i)=vfound(i) dist(i)=distmin(i) - end if -end do + endif +enddo call MPI_REDUCE(v,vall,npts,CUSTOM_MPI_TYPE,MPI_SUM,0,MPI_COMM_WORLD,ier) -call MPI_REDUCE(dist,distall,npts,CUSTOM_MPI_TYPE,MPI_SUM,0,MPI_COMM_WORLD,ier) +call MPI_REDUCE(dist,distall,npts,CUSTOM_MPI_TYPE,MPI_SUM,0,MPI_COMM_WORLD,ier) -if (myrank == 0) then +if (myrank == 0) then open(1002, file=gmt_outfile,status='unknown') do i = 1,npts xmesh=x(i); ymesh=y(i); zmesh=z(i) @@ -173,11 +173,11 @@ program sem_model_slice lon=phi*180.0/PI dep=(1.0-r)*R_EARTH_KM ! write(1002,*) lon,lat,dep,vall(i),distall(i) - write(1002,*) lon,lat,r,vall(i),distall(i) - end do + write(1002,*) lon,lat,r,vall(i),distall(i) + enddo close(1002) -end if +endif 202 FORMAT (5(F12.9,2X)) call MPI_FINALIZE(ier) -end program sem_model_slice +end program sem_model_slice diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/MODEL_VISULIZATION/SRC_MODEL_SLICE_VERT/XPBS_slice_vert.sh b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/MODEL_VISULIZATION/SRC_MODEL_SLICE_VERT/XPBS_slice_vert.sh index 22302de46..ddbcb2d61 100755 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/MODEL_VISULIZATION/SRC_MODEL_SLICE_VERT/XPBS_slice_vert.sh +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/MODEL_VISULIZATION/SRC_MODEL_SLICE_VERT/XPBS_slice_vert.sh @@ -1,7 +1,7 @@ #!/bin/sh #PBS -q tromp -#PBS -N XSLICE +#PBS -N XSLICE #PBS -l nodes=12:ppn=8+1:ppn=4 #PBS -l walltime=15:00:00 #PBS -j oe @@ -19,8 +19,8 @@ gmtout=/scratch/lustre/hejunzhu/2011EUROPE_SHOW_MODEL/XSRC_MODEL_SLICE_VERT/MODE echo $PBS_O_WORKDIR cd $PBS_O_WORKDIR -echo submit slicing -mpiexec -np 100 ./xsem_model_slice $depthslice $topo_path $model_path $tag $gmtout -echo done successfully +echo submit slicing +mpiexec -np 100 ./xsem_model_slice $depthslice $topo_path $model_path $tag $gmtout +echo done successfully diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/MODEL_VISULIZATION/SRC_MODEL_SLICE_VERT/XSHELL_slice_vert.sh b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/MODEL_VISULIZATION/SRC_MODEL_SLICE_VERT/XSHELL_slice_vert.sh index 11cb9f22d..50ffd3d29 100755 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/MODEL_VISULIZATION/SRC_MODEL_SLICE_VERT/XSHELL_slice_vert.sh +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/MODEL_VISULIZATION/SRC_MODEL_SLICE_VERT/XSHELL_slice_vert.sh @@ -5,76 +5,76 @@ iter=M30_PERT_STW -topo_path="\/scratch\/lustre\/hejunzhu\/2011EUROPE_SHOW_MODEL\/EUROPE_TOPOLOGY_FILE_NO_TOPO_ELL" +topo_path="\/scratch\/lustre\/hejunzhu\/2011EUROPE_SHOW_MODEL\/EUROPE_TOPOLOGY_FILE_NO_TOPO_ELL" topo_path1=/scratch/lustre/hejunzhu/2011EUROPE_SHOW_MODEL/EUROPE_TOPOLOGY_FILE_NO_TOPO_ELL - -model_path="\/scratch\/lustre\/hejunzhu\/2011EUROPE_SHOW_MODEL\/MODEL_$iter" + +model_path="\/scratch\/lustre\/hejunzhu\/2011EUROPE_SHOW_MODEL\/MODEL_$iter" model_path1=/scratch/lustre/hejunzhu/2011EUROPE_SHOW_MODEL/MODEL_$iter -#model_path="\/scratch\/lustre\/hejunzhu\/2011EUROPE_ITERATION_UPDATE\/MODEL_$iter" +#model_path="\/scratch\/lustre\/hejunzhu\/2011EUROPE_ITERATION_UPDATE\/MODEL_$iter" #model_path1=/scratch/lustre/hejunzhu/2011EUROPE_ITERATION_UPDATE/MODEL_$iter -out_path="\/scratch\/lustre\/hejunzhu\/2011EUROPE_SHOW_MODEL\/XSRC_MODEL_SLICE_VERT\/MODEL_$iter" -out_path1=/scratch/lustre/hejunzhu/2011EUROPE_SHOW_MODEL/XSRC_MODEL_SLICE_VERT/MODEL_$iter +out_path="\/scratch\/lustre\/hejunzhu\/2011EUROPE_SHOW_MODEL\/XSRC_MODEL_SLICE_VERT\/MODEL_$iter" +out_path1=/scratch/lustre/hejunzhu/2011EUROPE_SHOW_MODEL/XSRC_MODEL_SLICE_VERT/MODEL_$iter -if [ ! -f xsem_model_slice ]; then - echo WRONG! NO xsem_model_slice - exit +if [ ! -f xsem_model_slice ]; then + echo WRONG! NO xsem_model_slice + exit fi -if [ ! -d $topo_path1 ]; then - echo WRONG !NO $topo_path1 - exit -fi +if [ ! -d $topo_path1 ]; then + echo WRONG !NO $topo_path1 + exit +fi -if [ ! -d $model_path1 ]; then - echo WRONG! NO $model_path1 - exit -fi +if [ ! -d $model_path1 ]; then + echo WRONG! NO $model_path1 + exit +fi -if [ ! -d $out_path1 ] ;then - echo MKDIR $out_path1 - mkdir $out_path1 -fi +if [ ! -d $out_path1 ] ;then + echo MKDIR $out_path1 + mkdir $out_path1 +fi #for sliceid in A B C D E F G H #for sliceid in SINGLE -for sliceid in England -do - echo submitting slice $sliceid - - depthslice="XYZ_FILE\/VERT_SLICE_$sliceid.xyz" - depthslice1="XYZ_FILE/VERT_SLICE_$sliceid.xyz" - - - if [ ! -f $depthslice1 ]; then - echo WRONG! NO $depthslice1 - exit - fi - - #for tag in dvsh_vsv - #for tag in dvsv dvsh dvsh_vsv - #for tag in dvsh_vsv dvs dvp #dvsh dbulk # dvp - for tag in dvsv - do - gmtout="\/scratch\/lustre\/hejunzhu\/2011EUROPE_SHOW_MODEL\/XSRC_MODEL_SLICE_VERT\/MODEL_$iter\/VERT_SLICE_"$sliceid"_"$tag".xyz" - - - sed -e "s/^depthslice=.*$/depthslice=$depthslice/g"\ - -e "s/^topo_path=.*$/topo_path=$topo_path/g"\ - -e "s/^model_path=.*$/model_path=$model_path/g"\ - -e "s/^tag=.*$/tag=$tag/g"\ - -e "s/^gmtout=.*$/gmtout=$gmtout/g"\ - xgen_slice_pbs.sh > xgen_slice_pbs.sh.out - mv xgen_slice_pbs.sh.out xgen_slice_pbs.sh - qsub xgen_slice_pbs.sh - sleep 5 - - done - -done +for sliceid in England +do + echo submitting slice $sliceid + + depthslice="XYZ_FILE\/VERT_SLICE_$sliceid.xyz" + depthslice1="XYZ_FILE/VERT_SLICE_$sliceid.xyz" + + + if [ ! -f $depthslice1 ]; then + echo WRONG! NO $depthslice1 + exit + fi + + #for tag in dvsh_vsv + #for tag in dvsv dvsh dvsh_vsv + #for tag in dvsh_vsv dvs dvp #dvsh dbulk # dvp + for tag in dvsv + do + gmtout="\/scratch\/lustre\/hejunzhu\/2011EUROPE_SHOW_MODEL\/XSRC_MODEL_SLICE_VERT\/MODEL_$iter\/VERT_SLICE_"$sliceid"_"$tag".xyz" + + + sed -e "s/^depthslice=.*$/depthslice=$depthslice/g"\ + -e "s/^topo_path=.*$/topo_path=$topo_path/g"\ + -e "s/^model_path=.*$/model_path=$model_path/g"\ + -e "s/^tag=.*$/tag=$tag/g"\ + -e "s/^gmtout=.*$/gmtout=$gmtout/g"\ + xgen_slice_pbs.sh > xgen_slice_pbs.sh.out + mv xgen_slice_pbs.sh.out xgen_slice_pbs.sh + qsub xgen_slice_pbs.sh + sleep 5 + + done + +done diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/MODEL_VISULIZATION/SRC_MODEL_SLICE_VERT/exit_mpi.f90 b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/MODEL_VISULIZATION/SRC_MODEL_SLICE_VERT/exit_mpi.f90 index ede763e4b..ed7e236b0 100644 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/MODEL_VISULIZATION/SRC_MODEL_SLICE_VERT/exit_mpi.f90 +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/MODEL_VISULIZATION/SRC_MODEL_SLICE_VERT/exit_mpi.f90 @@ -70,7 +70,7 @@ subroutine exit_MPI(myrank,error_msg) ! otherwise: there is no standard behaviour to exit with an error code in fortran, ! however most compilers do recognize this as an error code stop statement; ! to check stop code in terminal: > echo $? - stop 30 + stop 30 ! or just exit with message: !stop 'error, program ended in exit_MPI' diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/MODEL_VISULIZATION/SRC_MODEL_SLICE_VERT/rthetaphi_xyz.f90 b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/MODEL_VISULIZATION/SRC_MODEL_SLICE_VERT/rthetaphi_xyz.f90 index d04ee9f5c..3ad97c40e 100644 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/MODEL_VISULIZATION/SRC_MODEL_SLICE_VERT/rthetaphi_xyz.f90 +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/MODEL_VISULIZATION/SRC_MODEL_SLICE_VERT/rthetaphi_xyz.f90 @@ -113,10 +113,10 @@ subroutine rthetaphi_2_xyz(x,y,z,r,theta,phi) include "../../SHARE_FILES/HEADER_FILES/constants.h" real(kind=CUSTOM_REAL) x,y,z,r,theta,phi - + x = r * sin(theta) * cos(phi) y = r * sin(theta) * sin(phi) z = r * cos(theta) - + end subroutine rthetaphi_2_xyz diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/MODEL_VISULIZATION/SRC_MODEL_SLICE_VERT/sem_model_slice.f90 b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/MODEL_VISULIZATION/SRC_MODEL_SLICE_VERT/sem_model_slice.f90 index 34e8e00c6..1d19f3598 100644 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/MODEL_VISULIZATION/SRC_MODEL_SLICE_VERT/sem_model_slice.f90 +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/MODEL_VISULIZATION/SRC_MODEL_SLICE_VERT/sem_model_slice.f90 @@ -1,56 +1,56 @@ program sem_model_slice -implicit none +implicit none include 'mpif.h' include '../../SHARE_FILES/HEADER_FILES/constants.h' include '../../SHARE_FILES/HEADER_FILES/values_from_mesher.h' include '../../SHARE_FILES/HEADER_FILES/precision.h' -integer,parameter:: NUM_NODES=99 ! for recent mesher 100 processors -integer,parameter:: iregion=1 ! for region one +integer,parameter:: NUM_NODES=99 ! for recent mesher 100 processors +integer,parameter:: iregion=1 ! for region one integer,parameter:: NMAXPTS=10000000 -real(kind=CUSTOM_REAL):: R_CUT_RANGE=0.00785d0 ! dr=0.00785 ~ 50 km depth +real(kind=CUSTOM_REAL):: R_CUT_RANGE=0.00785d0 ! dr=0.00785 ~ 50 km depth integer::iproc,ipt,npts -character(len=150):: xyz_infile,topo_dir,model_dir,filename,gmt_outfile +character(len=150):: xyz_infile,topo_dir,model_dir,filename,gmt_outfile character(len=256):: prname_topo, prname_file -character(len=256):: topo_file, data_file +character(len=256):: topo_file, data_file real(kind=CUSTOM_REAL),dimension(NMAXPTS):: x,y,z -real(kind=CUSTOM_REAL),dimension(NMAXPTS):: xfound,yfound,zfound,vfound +real(kind=CUSTOM_REAL),dimension(NMAXPTS):: xfound,yfound,zfound,vfound real(kind=CUSTOM_REAL),dimension(NMAXPTS)::distmin,dist, distall, v, vall -integer,dimension(NMAXPTS):: ispec_found,ix_found,iy_found,iz_found +integer,dimension(NMAXPTS):: ispec_found,ix_found,iy_found,iz_found real(kind=CUSTOM_REAL),dimension(NGLOB_CRUST_MANTLE):: xstore, ystore, zstore integer,dimension(NGLLX,NGLLY,NGLLZ,NSPEC_CRUST_MANTLE):: ibool -real(kind=CUSTOM_REAL),dimension(NGLLX,NGLLY,NGLLZ,NSPEC_CRUST_MANTLE):: vstore +real(kind=CUSTOM_REAL),dimension(NGLLX,NGLLY,NGLLZ,NSPEC_CRUST_MANTLE):: vstore integer:: ier,sizeprocs,myrank,ios integer:: i,j,k,ispec,iglob real(kind=CUSTOM_REAL):: r,theta,phi,lat,lon,dep, xmesh,ymesh,zmesh,rnew -real(kind=CUSTOM_REAL),dimension(2,NMAXPTS):: in,out -real(kind=CUSTOM_REAL):: R_CUT, r1 +real(kind=CUSTOM_REAL),dimension(2,NMAXPTS):: in,out +real(kind=CUSTOM_REAL):: R_CUT, r1 call MPI_INIT(ier) call MPI_COMM_SIZE(MPI_COMM_WORLD,sizeprocs,ier) -call MPI_COMM_RANK(MPI_COMM_WORLD,myrank,ier) +call MPI_COMM_RANK(MPI_COMM_WORLD,myrank,ier) -! read input file +! read input file call getarg(1,xyz_infile) call getarg(2,topo_dir) call getarg(3,model_dir) call getarg(4,filename) -call getarg(5,gmt_outfile) +call getarg(5,gmt_outfile) ! read interpolate points -if ( myrank == 0) then +if ( myrank == 0) then write(*,*) "INPUT FILE:", trim(xyz_infile) write(*,*) "TOPOLOGY FILE:", trim(topo_dir) write(*,*) "MODEL DIR:", trim(model_dir) - write(*,*) "VALUE NAME:", trim(filename) - write(*,*) "OUTPUT:", trim(gmt_outfile) -end if + write(*,*) "VALUE NAME:", trim(filename) + write(*,*) "OUTPUT:", trim(gmt_outfile) +endif - -open(1001,file=trim(xyz_infile),status='old',iostat=ios) -i=0 + +open(1001,file=trim(xyz_infile),status='old',iostat=ios) +i=0 do while (1==1) i=i+1 read(1001,*,iostat=ios) xmesh,ymesh,zmesh @@ -59,27 +59,27 @@ program sem_model_slice x(i)=xmesh y(i)=ymesh z(i)=zmesh -end do +enddo close(1001) npts=i-1 -!end if +!endif !call MPI_BCAST(npts,1,MPI_INTEGER,0,MPI_COMM_WORLD,ier) !call MPI_BCAST(x,NMAXPTS,CUSTOM_MPI_TYPE,0,MPI_COMM_WORLD,ier) !call MPI_BCAST(y,NMAXPTS,CUSTOM_MPI_TYPE,0,MPI_COMM_WORLD,ier) !call MPI_BCAST(z,NMAXPTS,CUSTOM_MPI_TYPE,0,MPI_COMM_WORLD,ier) -if ( myrank == 0 ) then - write(*,*) 'Total number of points = ', npts +if ( myrank == 0 ) then + write(*,*) 'Total number of points = ', npts if (npts>NMAXPTS .or. npts < 0) call exit_MPI(myrank,'Npts error...') -end if +endif -write(prname_topo,'(a,i6.6,a,i1,a)') trim(topo_dir)//'/proc',myrank,'_reg',iregion,'_' +write(prname_topo,'(a,i6.6,a,i1,a)') trim(topo_dir)//'/proc',myrank,'_reg',iregion,'_' write(prname_file,'(a,i6.6,a,i1,a)') trim(model_dir)//'/proc',myrank,'_reg',iregion,'_' -! read value file +! read value file data_file = trim(prname_file) // trim(filename) // '.bin' open(unit = 27,file = trim(data_file),status='old',action='read', iostat = ios,form ='unformatted') if (ios /= 0) call exit_MPI(myrank,'Error reading value file') @@ -87,8 +87,8 @@ program sem_model_slice close(27) if (myrank ==0) write(*,*) 'DONE READING',trim(data_file) - -! read topology + +! read topology topo_file = trim(prname_topo) // 'solver_data_2' // '.bin' open(unit = 28,file = trim(topo_file),status='old',action='read', iostat = ios, form='unformatted') if (ios /= 0) call exit_MPI(myrank,'Error reading topology file') @@ -104,7 +104,7 @@ program sem_model_slice if (myrank == 0) write(*,*) 'DONE READING',trim(topo_file) -distmin(1:npts)=HUGEVAL +distmin(1:npts)=HUGEVAL do ispec=1,NSPEC_CRUST_MANTLE @@ -116,55 +116,55 @@ program sem_model_slice iglob=ibool(i,j,k,ispec) - r1=sqrt((xstore(iglob))**2+(ystore(iglob))**2+(zstore(iglob))**2) - - if ( r1 > 0.7 ) then + r1=sqrt((xstore(iglob))**2+(ystore(iglob))**2+(zstore(iglob))**2) + + if ( r1 > 0.7 ) then dist(1:npts) = dsqrt((x(1:npts)-dble(xstore(iglob)))**2 & +(y(1:npts)-dble(ystore(iglob)))**2 & +(z(1:npts)-dble(zstore(iglob)))**2) do ipt=1,npts - if (dist(ipt) < distmin(ipt)) then + if (dist(ipt) < distmin(ipt)) then distmin(ipt)=dist(ipt) - ispec_found(ipt)=ispec + ispec_found(ipt)=ispec ix_found(ipt)=i iy_found(ipt)=j iz_found(ipt)=k vfound(ipt)=vstore(i,j,k,ispec) - end if - end do ! ipt loop - end if ! radius within in a range + endif + enddo ! ipt loop + endif ! radius within in a range - end do ! i loop - end do ! j loop - end do ! k loop -end do ! ispec loop + enddo ! i loop + enddo ! j loop + enddo ! k loop +enddo ! ispec loop call MPI_BARRIER(MPI_COMM_WORLD,ier) -if (myrank == 0) print*,'Done looping over global points' +if (myrank == 0) print*,'Done looping over global points' do i = 1,npts in(1,i)=distmin(i) in(2,i)=myrank -end do +enddo call MPI_REDUCE(in,out,npts,CUSTOM_MPI_2REAL,MPI_MINLOC,0,MPI_COMM_WORLD,ier) -call MPI_BCAST(out,2*npts,CUSTOM_MPI_TYPE,0,MPI_COMM_WORLD,ier) +call MPI_BCAST(out,2*npts,CUSTOM_MPI_TYPE,0,MPI_COMM_WORLD,ier) v(1:npts)=0 dist(1:npts)=0. do i=1,npts - if (myrank == nint(out(2,i))) then + if (myrank == nint(out(2,i))) then v(i)=vfound(i) dist(i)=distmin(i) - end if -end do + endif +enddo call MPI_REDUCE(v,vall,npts,CUSTOM_MPI_TYPE,MPI_SUM,0,MPI_COMM_WORLD,ier) -call MPI_REDUCE(dist,distall,npts,CUSTOM_MPI_TYPE,MPI_SUM,0,MPI_COMM_WORLD,ier) +call MPI_REDUCE(dist,distall,npts,CUSTOM_MPI_TYPE,MPI_SUM,0,MPI_COMM_WORLD,ier) -if (myrank == 0) then +if (myrank == 0) then open(1002, file=gmt_outfile,status='unknown') do i = 1,npts xmesh=x(i); ymesh=y(i); zmesh=z(i) @@ -180,12 +180,12 @@ program sem_model_slice ! write(1002,*) lon,lat,dep,vall(i),distall(i) - write(1002,*) lon,lat,rnew,vall(i),distall(i) -! write(1002,*) xmesh,ymesh,zmesh,vall(i),distall(i) - end do + write(1002,*) lon,lat,rnew,vall(i),distall(i) +! write(1002,*) xmesh,ymesh,zmesh,vall(i),distall(i) + enddo close(1002) -end if +endif 202 FORMAT (5(F12.9,2X)) call MPI_FINALIZE(ier) -end program sem_model_slice +end program sem_model_slice diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/SHARE_FILES/HEADER_FILES/constants.h b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/SHARE_FILES/HEADER_FILES/constants.h index 688675c81..4676c7847 100644 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/SHARE_FILES/HEADER_FILES/constants.h +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/SHARE_FILES/HEADER_FILES/constants.h @@ -103,7 +103,7 @@ !! pathname of the topography file ! character (len=*), parameter :: PATHNAME_TOPO_FILE = 'DATA/topo_bathy/topo_bathy_etopo2_smoothed_window7.dat' -!!--- ETOPO1 1-minute model, implemented now, but data file must be created first +!!--- ETOPO1 1-minute model, implemented now, but data file must be created first !! size of topography and bathymetry file integer, parameter :: NX_BATHY = 21600,NY_BATHY = 10800 !! resolution of topography file in minutes @@ -124,21 +124,21 @@ ! minimum thickness in meters to include the effect of the oceans and topo double precision, parameter :: MINIMUM_THICKNESS_3D_OCEANS = 100.d0 -!-- crustal models +!-- crustal models integer, parameter :: ICRUST_CRUST2 = 1 integer, parameter :: ICRUST_CRUSTMAPS = 2 !> Hejun Zhu integer, parameter :: ICRUST_EPCRUST=3 !< Hejun Zhu - + ! increase smoothing for critical regions (increases mesh stability) - logical, parameter :: SMOOTH_CRUST = .true. + logical, parameter :: SMOOTH_CRUST = .true. ! use sedimentary layers in crustal model logical, parameter :: INCLUDE_SEDIMENTS_CRUST = .true. double precision, parameter :: MINIMUM_SEDIMENT_THICKNESS = 2.d0 ! minimim thickness in km - + !-- uncomment for using Crust2.0 (used when CRUSTAL flag is set for simulation) ! integer, parameter :: ITYPE_CRUSTAL_MODEL = ICRUST_CRUST2 !!-- uncomment for using General Crustmaps instead @@ -194,8 +194,8 @@ ! default is .false. to compute isotropic kernels (related to alpha and beta) logical, parameter :: ANISOTROPIC_KL = .true. -! output only transverse isotropic kernels (alpha_v,alpha_h,beta_v,beta_h,eta,rho) -! rather than fully anisotropic kernels in case ANISOTROPIC_KL is set to .true. +! output only transverse isotropic kernels (alpha_v,alpha_h,beta_v,beta_h,eta,rho) +! rather than fully anisotropic kernels in case ANISOTROPIC_KL is set to .true. logical, parameter :: SAVE_TRANSVERSE_KL = .true. ! print date and time estimate of end of run in another country, @@ -507,9 +507,9 @@ ! General Crustmaps parameters integer, parameter :: CRUSTMAP_RESOLUTION = 4 !means 1/4 degrees - integer, parameter :: NLAYERS_CRUSTMAP = 5 + integer, parameter :: NLAYERS_CRUSTMAP = 5 -!> Hejun Zhu, parameters for EPCRUST , from Molinari et al's model(2010) +!> Hejun Zhu, parameters for EPCRUST , from Molinari et al's model(2010) ! latitude : 9.0N - 89.5N ! longitude: 56.0W - 70.0E character(len=*), parameter:: PATHNAME_EPCRUST='DATA/EPCRUST_EXTEND/EPcrust_0_5.txt' @@ -517,11 +517,11 @@ double precision, parameter:: EPCRUST_LON_MIN=-56.0d0 double precision, parameter:: EPCRUST_LON_MAX=70.0d0 double precision, parameter:: EPCRUST_LAT_MIN=9.0d0 - double precision, parameter:: EPCRUST_LAT_MAX=89.5d0 - double precision, parameter:: EPCRUST_SAMPLE=0.5d0 + double precision, parameter:: EPCRUST_LAT_MAX=89.5d0 + double precision, parameter:: EPCRUST_SAMPLE=0.5d0 logical, parameter:: flag_smooth_epcrust=.true. integer, parameter:: NTHETA_EP=4, NPHI_EP=20 - double precision, parameter:: cap_degree_EP=0.2d0 + double precision, parameter:: cap_degree_EP=0.2d0 !< Hejun Zhu @@ -541,12 +541,12 @@ logical, parameter :: REGIONAL_MOHO_MESH_ASIA = .false. ! used only for fixing time step logical, parameter :: HONOR_DEEP_MOHO = .false. ! uncomment for e.g. Europe case, where deep moho is rare - double precision, parameter :: RMOHO_STRETCH_ADJUSTEMENT = -15000.d0 ! moho mesh boundary down to 55km + double precision, parameter :: RMOHO_STRETCH_ADJUSTEMENT = -15000.d0 ! moho mesh boundary down to 55km ! uncomment for deep moho cases, e.g. Asia case (Himalayan moho) -!! double precision, parameter :: RMOHO_STRETCH_ADJUSTEMENT = -20000.d0 ! moho mesh boundary down to 60km +!! double precision, parameter :: RMOHO_STRETCH_ADJUSTEMENT = -20000.d0 ! moho mesh boundary down to 60km + - -! to suppress the crustal layers +! to suppress the crustal layers ! (replaced by an extension of the mantle: R_EARTH is not modified, but no more crustal doubling) logical, parameter :: SUPPRESS_CRUSTAL_MESH = .false. diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/SHARE_FILES/HEADER_FILES/values_from_mesher.h b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/SHARE_FILES/HEADER_FILES/values_from_mesher.h index 9878751cf..ffa8ad2a3 100644 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/SHARE_FILES/HEADER_FILES/values_from_mesher.h +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/SHARE_FILES/HEADER_FILES/values_from_mesher.h @@ -1,4 +1,4 @@ - + ! ! this is the parameter file for static compilation of the solver ! @@ -23,39 +23,39 @@ ! total for full 6-chunk mesh: ! --------------------------- ! - ! exact total number of spectral elements in entire mesh = - ! 4692600.00000000 - ! approximate total number of points in entire mesh = - ! 316881000.000000 - ! approximate total number of degrees of freedom in entire mesh = - ! 892096200.000000 + ! exact total number of spectral elements in entire mesh = + ! 4692600.00000000 + ! approximate total number of points in entire mesh = + ! 316881000.000000 + ! approximate total number of degrees of freedom in entire mesh = + ! 892096200.000000 ! ! position of the mesh chunk at the surface: ! ----------------------------------------- ! - ! angular size in first direction in degrees = 68.00000 - ! angular size in second direction in degrees = 68.00000 + ! angular size in first direction in degrees = 68.00000 + ! angular size in second direction in degrees = 68.00000 ! - ! longitude of center in degrees = 7.000000 - ! latitude of center in degrees = 52.00000 + ! longitude of center in degrees = 7.000000 + ! latitude of center in degrees = 52.00000 ! - ! angle of rotation of the first chunk = 45.00000 + ! angle of rotation of the first chunk = 45.00000 ! ! corner 1 - ! longitude in degrees = 6.99999999999999 - ! latitude in degrees = 8.40726023480213 + ! longitude in degrees = 6.99999999999999 + ! latitude in degrees = 8.40726023480213 ! ! corner 2 - ! longitude in degrees = 64.1611658328499 - ! latitude in degrees = 34.9449365466497 + ! longitude in degrees = 64.1611658328499 + ! latitude in degrees = 34.9449365466497 ! ! corner 3 - ! longitude in degrees = -50.1611658328499 - ! latitude in degrees = 34.9449365466497 + ! longitude in degrees = -50.1611658328499 + ! latitude in degrees = 34.9449365466497 ! ! corner 4 - ! longitude in degrees = -173.000000000000 - ! latitude in degrees = 84.3892903527184 + ! longitude in degrees = -173.000000000000 + ! latitude in degrees = 84.3892903527184 ! ! resolution of the mesh at the surface: ! ------------------------------------- @@ -63,14 +63,14 @@ ! spectral elements along a great circle = 960 ! GLL points along a great circle = 3840 ! average distance between points in degrees = 9.3750000E-02 - ! average distance between points in km = 10.42452 - ! average size of a spectral element in km = 41.69810 + ! average distance between points in km = 10.42452 + ! average size of a spectral element in km = 41.69810 ! ! number of time steps = 10600 ! ! number of seismic sources = 1 ! - + ! approximate static memory needed by the solver: ! ---------------------------------------------- ! @@ -84,36 +84,36 @@ ! size of static arrays for all slices = 26.0327711701393 GB ! = 2.542262809583917E-002 TB ! - + integer, parameter :: NEX_XI_VAL = 240 integer, parameter :: NEX_ETA_VAL = 240 - + integer, parameter :: NSPEC_CRUST_MANTLE = 7092 integer, parameter :: NSPEC_OUTER_CORE = 684 integer, parameter :: NSPEC_INNER_CORE = 45 - + integer, parameter :: NGLOB_CRUST_MANTLE = 475797 integer, parameter :: NGLOB_OUTER_CORE = 48789 integer, parameter :: NGLOB_INNER_CORE = 3549 - + integer, parameter :: NSPECMAX_ANISO_IC = 1 - + integer, parameter :: NSPECMAX_ISO_MANTLE = 7092 integer, parameter :: NSPECMAX_TISO_MANTLE = 7092 integer, parameter :: NSPECMAX_ANISO_MANTLE = 1 - + integer, parameter :: NSPEC_CRUST_MANTLE_ATTENUAT = 7092 integer, parameter :: NSPEC_INNER_CORE_ATTENUATION = 45 - + integer, parameter :: NSPEC_CRUST_MANTLE_STR_OR_ATT = 7092 integer, parameter :: NSPEC_INNER_CORE_STR_OR_ATT = 45 - + integer, parameter :: NSPEC_CRUST_MANTLE_STR_AND_ATT = 7092 integer, parameter :: NSPEC_INNER_CORE_STR_AND_ATT = 45 - + integer, parameter :: NSPEC_CRUST_MANTLE_STRAIN_ONLY = 7092 integer, parameter :: NSPEC_INNER_CORE_STRAIN_ONLY = 45 - + integer, parameter :: NSPEC_CRUST_MANTLE_ADJOINT = 7092 integer, parameter :: NSPEC_OUTER_CORE_ADJOINT = 684 integer, parameter :: NSPEC_INNER_CORE_ADJOINT = 45 @@ -121,31 +121,31 @@ integer, parameter :: NGLOB_OUTER_CORE_ADJOINT = 48789 integer, parameter :: NGLOB_INNER_CORE_ADJOINT = 3549 integer, parameter :: NSPEC_OUTER_CORE_ROT_ADJOINT = 684 - + integer, parameter :: NSPEC_CRUST_MANTLE_STACEY = 7092 integer, parameter :: NSPEC_OUTER_CORE_STACEY = 684 - + integer, parameter :: NGLOB_CRUST_MANTLE_OCEANS = 475797 - + logical, parameter :: TRANSVERSE_ISOTROPY_VAL = .true. - + logical, parameter :: ANISOTROPIC_3D_MANTLE_VAL = .false. - + logical, parameter :: ANISOTROPIC_INNER_CORE_VAL = .false. - + logical, parameter :: ATTENUATION_VAL = .true. - + logical, parameter :: ATTENUATION_3D_VAL = .false. - + logical, parameter :: ELLIPTICITY_VAL = .true. - + logical, parameter :: GRAVITY_VAL = .true. - + logical, parameter :: OCEANS_VAL = .true. - + logical, parameter :: ROTATION_VAL = .true. integer, parameter :: NSPEC_OUTER_CORE_ROTATION = 684 - + integer, parameter :: NGLOB1D_RADIAL_CM = 189 integer, parameter :: NGLOB1D_RADIAL_OC = 133 integer, parameter :: NGLOB1D_RADIAL_IC = 21 @@ -186,4 +186,4 @@ integer, parameter :: NSPEC2D_ICB = 1 logical, parameter :: USE_DEVILLE_PRODUCTS_VAL = .true. logical, parameter :: USE_ATTENUATION_MIMIC = .true. - logical, parameter :: COMPUTE_AND_STORE_STRAIN = .true. + logical, parameter :: COMPUTE_AND_STORE_STRAIN = .true. diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/SOURCE_INVERSION/SRC_CORRECT_INITIALTIME_MOMENT/XPBS_correction.sh b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/SOURCE_INVERSION/SRC_CORRECT_INITIALTIME_MOMENT/XPBS_correction.sh index ce186859a..fa1e5f8e8 100755 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/SOURCE_INVERSION/SRC_CORRECT_INITIALTIME_MOMENT/XPBS_correction.sh +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/SOURCE_INVERSION/SRC_CORRECT_INITIALTIME_MOMENT/XPBS_correction.sh @@ -12,4 +12,4 @@ cd $PBS_O_WORKDIR input=XCORRECT_INPUT_M42/CORRECT_201105192015A -./xcorrect_syn_time_moment < $input +./xcorrect_syn_time_moment < $input diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/SOURCE_INVERSION/SRC_CORRECT_INITIALTIME_MOMENT/XSHELL_correction.sh b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/SOURCE_INVERSION/SRC_CORRECT_INITIALTIME_MOMENT/XSHELL_correction.sh index 0f00674b2..b70ed4b76 100755 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/SOURCE_INVERSION/SRC_CORRECT_INITIALTIME_MOMENT/XSHELL_correction.sh +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/SOURCE_INVERSION/SRC_CORRECT_INITIALTIME_MOMENT/XSHELL_correction.sh @@ -11,7 +11,7 @@ iter1=M42 iter2=M43 ext1=T015_040 -ext2=T030_100 +ext2=T030_100 dirold=../SYN_$iter1 @@ -19,87 +19,87 @@ dirnew=../SYN_$iter2 dirinput=XCORRECT_INPUT_$iter1 # check directories -if [ ! -f $eventfile ]; then - echo WRONG! NO $eventfile - exit +if [ ! -f $eventfile ]; then + echo WRONG! NO $eventfile + exit fi -if [ ! -d $dirold ]; then - echo WRONG! NO $dirold - exit -fi -if [ ! -d $dirinput ]; then - echo MKDIR $dirinput - mkdir $dirinput -fi -if [ ! -d $dirnew ]; then - echo MKDIR $dirnew - mkdir $dirnew -fi - -while read line +if [ ! -d $dirold ]; then + echo WRONG! NO $dirold + exit +fi +if [ ! -d $dirinput ]; then + echo MKDIR $dirinput + mkdir $dirinput +fi +if [ ! -d $dirnew ]; then + echo MKDIR $dirnew + mkdir $dirnew +fi + +while read line do - echo running correction for $line... - cmtid=`echo $line | awk -F"_" '{print $NF}'` - minmax=../SRC_GRIDSEARCH_INITIALTIME_MOMENT/XGRIDSEARCH_OUTPUT_$iter1/XMINMAX_$cmtid - input=$dirinput/CORRECT_$cmtid - synold=$dirold/CMTSOLUTION_$cmtid - synnew=$dirnew/CMTSOLUTION_$cmtid - - tag="#PBS -N XXCORRECT_$cmtid" - input_tag="$dirinput\/CORRECT_$cmtid" - - # check directories - if [ ! -f $minmax ]; then - echo WRONG! NO $minmax - exit - fi - if [ -f $input ]; then - echo $input exist, rm it - rm $input - fi - if [ ! -d $synold ]; then - echo WRONG! NO $synold - exit - fi - if [ ! -d $synnew ]; then - echo NO $synnew, make it - mkdir $synnew - fi - if [ -f xtmp ]; then - echo xtmp exist, rm it - rm xtmp - fi - - dt0=`cat $minmax | awk '{print $1}'` - dm0=`cat $minmax | awk '{print $2}'` - - ls $synold/*.$ext1 > xtmp - ls $synold/*.$ext2 >> xtmp - - nfile=`wc -l xtmp | awk '{print $1}'` - - echo "$dt0 $dm0 " > $input - echo $nfile >> $input - while read line - do - name=`echo $line | awk -F"/" '{print $NF}'` - name_new=$synnew/$name - echo $line >> $input - echo $name_new >> $input - done < xtmp - - rm xtmp - - - sed -e "s/^#PBS -N.*$/$tag/g" \ - -e "s/^input=.*$/input=$input_tag/g" \ - XPBS_correction.sh > XPBS_correction.sh.out - mv XPBS_correction.sh.out XPBS_correction.sh - - echo RUNNING CORRECTION FOR EVENTID $cmtid - qsub XPBS_correction.sh - sleep 3 - - -done < $eventfile + echo running correction for $line... + cmtid=`echo $line | awk -F"_" '{print $NF}'` + minmax=../SRC_GRIDSEARCH_INITIALTIME_MOMENT/XGRIDSEARCH_OUTPUT_$iter1/XMINMAX_$cmtid + input=$dirinput/CORRECT_$cmtid + synold=$dirold/CMTSOLUTION_$cmtid + synnew=$dirnew/CMTSOLUTION_$cmtid + + tag="#PBS -N XXCORRECT_$cmtid" + input_tag="$dirinput\/CORRECT_$cmtid" + + # check directories + if [ ! -f $minmax ]; then + echo WRONG! NO $minmax + exit + fi + if [ -f $input ]; then + echo $input exist, rm it + rm $input + fi + if [ ! -d $synold ]; then + echo WRONG! NO $synold + exit + fi + if [ ! -d $synnew ]; then + echo NO $synnew, make it + mkdir $synnew + fi + if [ -f xtmp ]; then + echo xtmp exist, rm it + rm xtmp + fi + + dt0=`cat $minmax | awk '{print $1}'` + dm0=`cat $minmax | awk '{print $2}'` + + ls $synold/*.$ext1 > xtmp + ls $synold/*.$ext2 >> xtmp + + nfile=`wc -l xtmp | awk '{print $1}'` + + echo "$dt0 $dm0 " > $input + echo $nfile >> $input + while read line + do + name=`echo $line | awk -F"/" '{print $NF}'` + name_new=$synnew/$name + echo $line >> $input + echo $name_new >> $input + done < xtmp + + rm xtmp + + + sed -e "s/^#PBS -N.*$/$tag/g" \ + -e "s/^input=.*$/input=$input_tag/g" \ + XPBS_correction.sh > XPBS_correction.sh.out + mv XPBS_correction.sh.out XPBS_correction.sh + + echo RUNNING CORRECTION FOR EVENTID $cmtid + qsub XPBS_correction.sh + sleep 3 + + +done < $eventfile diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/SOURCE_INVERSION/SRC_CORRECT_INITIALTIME_MOMENT/correct_syn_time_moment.f90 b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/SOURCE_INVERSION/SRC_CORRECT_INITIALTIME_MOMENT/correct_syn_time_moment.f90 index f030ee90b..91f655cb1 100644 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/SOURCE_INVERSION/SRC_CORRECT_INITIALTIME_MOMENT/correct_syn_time_moment.f90 +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/SOURCE_INVERSION/SRC_CORRECT_INITIALTIME_MOMENT/correct_syn_time_moment.f90 @@ -4,28 +4,28 @@ program xcorrect_syn integer,parameter:: NDIM=80000 real:: dt0,dm0 -integer:: nfile,i,j +integer:: nfile,i,j character(len=250):: oldsyn_fnm,newsyn_fnm real,dimension(NDIM):: oldsyn,newsyn,syn_t integer:: npt,nerr,nerr1 -real:: b,dt,b_new +real:: b,dt,b_new real:: evla,evlo,stla,stlo,evdp character*8:: kstnm,knetwk,kcmpnm integer::ishift write(*,*) 'read input file' read(*,*) dt0, dm0 -read(*,*) nfile +read(*,*) nfile write(*,*) 'correct initial time:',dt0 write(*,*) 'correct scale moment:',dm0 -write(*,*) 'total number of files:',nfile +write(*,*) 'total number of files:',nfile do i = 1,nfile - + oldsyn=0.0 newsyn=0.0 - syn_t=0.0 + syn_t=0.0 read(*,'(a)') oldsyn_fnm read(*,'(a)') newsyn_fnm @@ -34,7 +34,7 @@ program xcorrect_syn write(*,*) 'new syn:',newsyn_fnm call rsac1(oldsyn_fnm,oldsyn,npt,b,dt,NDIM,nerr) - if (nerr.ne.0) stop 'error reading sac file' + if (nerr/=0) stop 'error reading sac file' call getfhv('evla',evla,nerr) call getfhv('evlo',evlo,nerr) @@ -43,20 +43,20 @@ program xcorrect_syn call getfhv('evdp',evdp,nerr) call getkhv('kstnm',kstnm,nerr) call getkhv('kcmpnm',kcmpnm,nerr) - call getkhv('knetwk',knetwk,nerr) + call getkhv('knetwk',knetwk,nerr) ! shift and apply scale moment correction for seismograms ishift=nint(abs(dt0)/dt) - if (dt0 > 0.0 ) then - newsyn(1+ishift:npt+ishift)=dm0*oldsyn(1:npt) - else + if (dt0 > 0.0 ) then + newsyn(1+ishift:npt+ishift)=dm0*oldsyn(1:npt) + else newsyn(1:npt)=dm0*oldsyn(1+ishift:npt+ishift) - end if + endif do j =1,npt syn_t(j)=b+(j-1)*dt - end do + enddo ! call newhdr() call setfhv('b',b,nerr1) call setfhv('delta',dt,nerr1) @@ -70,11 +70,11 @@ program xcorrect_syn call setkhv('kcmpnm',trim(kcmpnm),nerr1) call setkhv('knetwk',trim(knetwk),nerr1) - ! write new seismograms + ! write new seismograms call wsac0(newsyn_fnm,syn_t(1:npt),newsyn(1:npt),nerr1) - if (nerr1.ne.0) stop 'Error reading sac file' + if (nerr1/=0) stop 'Error reading sac file' -end do -write(*,*) "SUCESSIVEFULLY" +enddo +write(*,*) "SUCESSIVEFULLY" end program xcorrect_syn diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/SOURCE_INVERSION/SRC_CORRECT_INITIALTIME_MOMENT/xcompile.sh b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/SOURCE_INVERSION/SRC_CORRECT_INITIALTIME_MOMENT/xcompile.sh index b271cb872..4faa6d3c8 100755 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/SOURCE_INVERSION/SRC_CORRECT_INITIALTIME_MOMENT/xcompile.sh +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/SOURCE_INVERSION/SRC_CORRECT_INITIALTIME_MOMENT/xcompile.sh @@ -3,10 +3,10 @@ # Princeton University, New Jersey, USA # Last modified: Mon Jan 24 20:34:14 EST 2011 -if [ -f xcorrect_syn_time_moment ]; then - echo RM xcorrect_syn_time_moment - rm xcorrect_syn_time_moment -fi +if [ -f xcorrect_syn_time_moment ]; then + echo RM xcorrect_syn_time_moment + rm xcorrect_syn_time_moment +fi gfortran -o xcorrect_syn_time_moment -O3 correct_syn_time_moment.f90 -L/home/hejunzhu/BIN/sac-101.4/lib -lsacio diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/SOURCE_INVERSION/SRC_GRIDSEARCH_INITIALTIME_MOMENT/XPBS_gridsearch.sh b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/SOURCE_INVERSION/SRC_GRIDSEARCH_INITIALTIME_MOMENT/XPBS_gridsearch.sh index 298b8c779..72e08a57e 100755 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/SOURCE_INVERSION/SRC_GRIDSEARCH_INITIALTIME_MOMENT/XPBS_gridsearch.sh +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/SOURCE_INVERSION/SRC_GRIDSEARCH_INITIALTIME_MOMENT/XPBS_gridsearch.sh @@ -12,4 +12,4 @@ cd $PBS_O_WORKDIR input=XGRIDSEARCH_INPUT_M42/PAR_201105192015A -./xgridsearch_time_moment < $input +./xgridsearch_time_moment < $input diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/SOURCE_INVERSION/SRC_GRIDSEARCH_INITIALTIME_MOMENT/XSHELL_gridsearch.sh b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/SOURCE_INVERSION/SRC_GRIDSEARCH_INITIALTIME_MOMENT/XSHELL_gridsearch.sh index 792baaada..9d869e1cc 100755 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/SOURCE_INVERSION/SRC_GRIDSEARCH_INITIALTIME_MOMENT/XSHELL_gridsearch.sh +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/SOURCE_INVERSION/SRC_GRIDSEARCH_INITIALTIME_MOMENT/XSHELL_gridsearch.sh @@ -4,9 +4,9 @@ # Last modified: Mon Jun 4 16:25:38 EDT 2012 -# input parameters +# input parameters iter1=M42 -iter2=M43 +iter2=M43 mstart=0.2 mend=1.8 @@ -23,88 +23,88 @@ linesearch_mbest=0.02 body_bandpass=T015_040 surf_bandpass=T040_100 -criteria=phase_amplitude +criteria=phase_amplitude eventfile=../../SHARE_FILES/EVENTID_CENTER/XEVENTID -dir1=../../SHARE_FILES/CMTSOLUTION_CENTER_$iter1 +dir1=../../SHARE_FILES/CMTSOLUTION_CENTER_$iter1 dir2=../../SHARE_FILES/CMTSOLUTION_CENTER_$iter2 -# check directories and files -if [ ! -f $eventfile ]; then - echo WRONG! NO $eventfile - exit -fi - -if [ ! -d $dir1 ]; then - echo wrong! no $dir1 - exit -fi - -if [ ! -d $dir2 ]; then - echo mkdir $dir2 - mkdir $dir2 -fi - -if [ ! -d XGRIDSEARCH_OUTPUT_$iter1 ];then - echo MKDIR XGRIDSEARCH_OUTPUT_$iter1 - mkdir XGRIDSEARCH_OUTPUT_$iter1 -fi - -while read line -do - - cmtid=`echo $line | awk -F"_" '{print $NF}'` - grd_tag="#PBS -N XOUTPUT_GRID_$cmtid" - parinput=XGRIDSEARCH_INPUT_$iter1/PAR_$cmtid - parinput_tag="XGRIDSEARCH_INPUT_"$iter1"\/PAR_"$cmtid - - - cmtorig="../../SHARE_FILES/CMTSOLUTION_CENTER_$iter1/CMTSOLUTION_$cmtid" - cmtnew="../../SHARE_FILES/CMTSOLUTION_CENTER_$iter2/CMTSOLUTION_$cmtid" - gridinput="XGRIDSEARCH_INPUT_$iter1/GRIDSEARCH_"$cmtid - gridoutput1="XGRIDSEARCH_OUTPUT_$iter1/XMINMAX_$cmtid" - gridoutput2="XGRIDSEARCH_OUTPUT_$iter1/XMISFITFUNCTION_$cmtid" - - - if [ -f $parinput ] ;then - echo $parinput exist, delete it - rm $parinput - fi - - if [ ! -f $cmtorig ]; then - echo WRONG! NO $cmtorig - exit - fi - - if [ ! -f $gridinput ]; then - echo WRONG! NO $gridinput - exit - fi - - echo GERENATING... $parinput - echo $cmtorig > $parinput - echo $cmtnew >> $parinput - echo $gridinput >> $parinput - echo $gridoutput1 >> $parinput - echo $gridoutput2 >> $parinput - echo "$mstart $mend $dm" >> $parinput - echo "$tstart $tend $dt" >> $parinput - echo "$fact_am" >> $parinput - echo "$fact_tt" >> $parinput - echo "$linesearch_mbest" >> $parinput - echo "$body_bandpass" >> $parinput - echo "$surf_bandpass" >> $parinput - echo "$criteria" >> $parinput - - - sed -e "s/^#PBS -N.*$/$grd_tag/g" \ - -e "s/^input=.*$/input=$parinput_tag/g" \ - XPBS_gridsearch.sh > XPBS_gridsearch.sh.out - mv XPBS_gridsearch.sh.out XPBS_gridsearch.sh - - - echo RUNNING GRIDSEARCH FOR EVENT $cmtid - qsub XPBS_gridsearch.sh - sleep 3 - -done < $eventfile +# check directories and files +if [ ! -f $eventfile ]; then + echo WRONG! NO $eventfile + exit +fi + +if [ ! -d $dir1 ]; then + echo wrong! no $dir1 + exit +fi + +if [ ! -d $dir2 ]; then + echo mkdir $dir2 + mkdir $dir2 +fi + +if [ ! -d XGRIDSEARCH_OUTPUT_$iter1 ];then + echo MKDIR XGRIDSEARCH_OUTPUT_$iter1 + mkdir XGRIDSEARCH_OUTPUT_$iter1 +fi + +while read line +do + + cmtid=`echo $line | awk -F"_" '{print $NF}'` + grd_tag="#PBS -N XOUTPUT_GRID_$cmtid" + parinput=XGRIDSEARCH_INPUT_$iter1/PAR_$cmtid + parinput_tag="XGRIDSEARCH_INPUT_"$iter1"\/PAR_"$cmtid + + + cmtorig="../../SHARE_FILES/CMTSOLUTION_CENTER_$iter1/CMTSOLUTION_$cmtid" + cmtnew="../../SHARE_FILES/CMTSOLUTION_CENTER_$iter2/CMTSOLUTION_$cmtid" + gridinput="XGRIDSEARCH_INPUT_$iter1/GRIDSEARCH_"$cmtid + gridoutput1="XGRIDSEARCH_OUTPUT_$iter1/XMINMAX_$cmtid" + gridoutput2="XGRIDSEARCH_OUTPUT_$iter1/XMISFITFUNCTION_$cmtid" + + + if [ -f $parinput ] ;then + echo $parinput exist, delete it + rm $parinput + fi + + if [ ! -f $cmtorig ]; then + echo WRONG! NO $cmtorig + exit + fi + + if [ ! -f $gridinput ]; then + echo WRONG! NO $gridinput + exit + fi + + echo GERENATING... $parinput + echo $cmtorig > $parinput + echo $cmtnew >> $parinput + echo $gridinput >> $parinput + echo $gridoutput1 >> $parinput + echo $gridoutput2 >> $parinput + echo "$mstart $mend $dm" >> $parinput + echo "$tstart $tend $dt" >> $parinput + echo "$fact_am" >> $parinput + echo "$fact_tt" >> $parinput + echo "$linesearch_mbest" >> $parinput + echo "$body_bandpass" >> $parinput + echo "$surf_bandpass" >> $parinput + echo "$criteria" >> $parinput + + + sed -e "s/^#PBS -N.*$/$grd_tag/g" \ + -e "s/^input=.*$/input=$parinput_tag/g" \ + XPBS_gridsearch.sh > XPBS_gridsearch.sh.out + mv XPBS_gridsearch.sh.out XPBS_gridsearch.sh + + + echo RUNNING GRIDSEARCH FOR EVENT $cmtid + qsub XPBS_gridsearch.sh + sleep 3 + +done < $eventfile diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/SOURCE_INVERSION/SRC_GRIDSEARCH_INITIALTIME_MOMENT/gridsearch_time_moment.f90 b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/SOURCE_INVERSION/SRC_GRIDSEARCH_INITIALTIME_MOMENT/gridsearch_time_moment.f90 index 76ab38530..2d2bcbc41 100644 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/SOURCE_INVERSION/SRC_GRIDSEARCH_INITIALTIME_MOMENT/gridsearch_time_moment.f90 +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/SOURCE_INVERSION/SRC_GRIDSEARCH_INITIALTIME_MOMENT/gridsearch_time_moment.f90 @@ -1,6 +1,6 @@ -program xgrid_search_time_moment +program xgrid_search_time_moment - implicit none + implicit none integer,parameter:: NDIM=80000 @@ -11,41 +11,41 @@ program xgrid_search_time_moment character(len=150) :: string,bandpass,cmp character(len=150) :: body_bandpass,surf_bandpass,criteria real ,dimension(:),allocatable :: misfit,t0,m0 - real,dimension(NDIM):: data,syn,syn_m0 + real,dimension(NDIM):: data,syn,syn_m0 real,dimension(NDIM):: data_win,syn_win real :: tshift, dlnA, cc_max real::s_m0,e_m0,d_m0,s_t0,e_t0,d_t0,t00,m00,m0_best,t0_best,maxmisfit,t_cmt,t_cmt_new integer:: i,j,k,n_m0,n_t0,n_total,i_total,cc_shift real:: misfit_tmp,b,b2,dt,dt2,tstart,tend,tstart0,tend0,weight integer:: nf,nwin,nerr,ios,lstr,npts,npts2 - integer:: is,ie,ishift,isd,ied,iss,iee,imina(1),imin + integer:: is,ie,ishift,isd,ied,iss,iee,imina(1),imin integer:: bd_z,bd_r,bd_t,sw_z,sw_r,sw_t real:: deltaT,deltaA,fact_am,fact_tt,deltaT0 real:: linesearch_mbest integer:: istart,iend !---------------------------------------------------------------- - !- read in input parameters + !- read in input parameters !---------------------------------------------------------------- - read(*,'(a)') cmt_file ! read in old cmt file - read(*,'(a)') new_cmt_file ! read in new cmt file - read(*,'(a)') flexwin_out_file ! read in measurement window selected from flexwin - read(*,'(a)') output_minmax ! output selected original time and scale moment - read(*,'(a)') output_misfit ! output 2D misfit function for delta_t0 and delta_M0 - read(*,*) s_m0,e_m0,d_m0 ! starting, end and spacing for scale moment searching - read(*,*) s_t0,e_t0,d_t0 ! starting, end and spacing for original time searching - read(*,*) fact_am ! weighting for amplitude misfit function - read(*,*) fact_tt ! weighting for original time misfit function - read(*,*) linesearch_mbest ! perturbation for scale moment pick - read(*,'(a)') body_bandpass ! extension for body wave bandpass, e.g.,T015_040 - read(*,'(a)') surf_bandpass ! extension for surface wave bandpass, e.g.,T040_100 - read(*,'(a)') criteria ! misfit function, waveform, phase_amplitude + read(*,'(a)') cmt_file ! read in old cmt file + read(*,'(a)') new_cmt_file ! read in new cmt file + read(*,'(a)') flexwin_out_file ! read in measurement window selected from flexwin + read(*,'(a)') output_minmax ! output selected original time and scale moment + read(*,'(a)') output_misfit ! output 2D misfit function for delta_t0 and delta_M0 + read(*,*) s_m0,e_m0,d_m0 ! starting, end and spacing for scale moment searching + read(*,*) s_t0,e_t0,d_t0 ! starting, end and spacing for original time searching + read(*,*) fact_am ! weighting for amplitude misfit function + read(*,*) fact_tt ! weighting for original time misfit function + read(*,*) linesearch_mbest ! perturbation for scale moment pick + read(*,'(a)') body_bandpass ! extension for body wave bandpass, e.g.,T015_040 + read(*,'(a)') surf_bandpass ! extension for surface wave bandpass, e.g.,T040_100 + read(*,'(a)') criteria ! misfit function, waveform, phase_amplitude !--------------------------------------------------------- - !- setup searching space + !- setup searching space !--------------------------------------------------------- n_m0=nint((e_m0-s_m0)/d_m0)+1 - n_t0=nint((e_t0-s_t0)/d_t0)+1 + n_t0=nint((e_t0-s_t0)/d_t0)+1 n_total=n_m0*n_t0 allocate(misfit(n_total)) @@ -55,167 +55,167 @@ program xgrid_search_time_moment t0=0.0 m0=0.0 - i_total=0 + i_total=0 do i=1,n_m0 - do j=1,n_t0 - i_total=i_total+1 + do j=1,n_t0 + i_total=i_total+1 t0(i_total)=s_t0+d_t0*(j-1) m0(i_total)=s_m0+d_m0*(i-1) - end do - end do + enddo + enddo if ( i_total /= n_total ) stop 'i_total not equal n_total, check input paramters' - write(*,*) i_total,n_total + write(*,*) i_total,n_total !------------------------------------------------------------ - !- read in measurement window from flexwin and calculate misfit function + !- read in measurement window from flexwin and calculate misfit function !------------------------------------------------------------ open(1001,file=trim(flexwin_out_file),status='old') read(1001,*) nf,bd_z,bd_r,bd_t,sw_z,sw_r,sw_t do j=1,nf - write(*,*) j,nf - read(1001,'(a)') data_file - read(1001,'(a)') syn_file - + write(*,*) j,nf + read(1001,'(a)') data_file + read(1001,'(a)') syn_file + call rsac1(data_file,data,npts,b,dt,NDIM,nerr) - if (nerr.ne.0) stop 'error reading data' + if (nerr/=0) stop 'error reading data' call rsac1(syn_file,syn,npts2,b2,dt2,NDIM,nerr) - if (nerr.ne.0) stop 'error reading synthetics' - + if (nerr/=0) stop 'error reading synthetics' + lstr=len_trim(syn_file) bandpass=syn_file(lstr-7:lstr) cmp=syn_file(lstr-19:lstr-17) - - ! decide weight factors - if ( trim(bandpass) .eq. trim(body_bandpass) .and. trim(cmp) .eq. 'LHZ' ) then - if ( bd_z .ne. 0 ) then - weight=1.0/bd_z - else + + ! decide weight factors + if ( trim(bandpass) == trim(body_bandpass) .and. trim(cmp) == 'LHZ' ) then + if ( bd_z /= 0 ) then + weight=1.0/bd_z + else weight=1.0 - end if - else if ( trim(bandpass) .eq. trim(body_bandpass) .and. trim(cmp) .eq. 'LHR' ) then - if ( bd_r .ne. 0 ) then - weight=1.0/bd_r - else + endif + else if ( trim(bandpass) == trim(body_bandpass) .and. trim(cmp) == 'LHR' ) then + if ( bd_r /= 0 ) then + weight=1.0/bd_r + else weight=1.0 - end if - else if ( trim(bandpass) .eq. trim(body_bandpass) .and. trim(cmp) .eq. 'LHT' ) then - if ( bd_t .ne. 0 ) then + endif + else if ( trim(bandpass) == trim(body_bandpass) .and. trim(cmp) == 'LHT' ) then + if ( bd_t /= 0 ) then weight=1.0/bd_t - else + else weight=1.0 - end if - else if ( trim(bandpass) .eq. trim(surf_bandpass) .and. trim(cmp) .eq. 'LHZ' ) then - if ( sw_z .ne. 0 ) then + endif + else if ( trim(bandpass) == trim(surf_bandpass) .and. trim(cmp) == 'LHZ' ) then + if ( sw_z /= 0 ) then weight=1.0/sw_z - else - weight=1.0 - end if - else if ( trim(bandpass) .eq. trim(surf_bandpass) .and. trim(cmp) .eq. 'LHR' ) then - if ( sw_r .ne. 0 ) then + else + weight=1.0 + endif + else if ( trim(bandpass) == trim(surf_bandpass) .and. trim(cmp) == 'LHR' ) then + if ( sw_r /= 0 ) then weight=1.0/sw_r - else + else weight=1.0 - end if - else if ( trim(bandpass) .eq. trim(surf_bandpass) .and. trim(cmp) .eq. 'LHT' ) then - if ( sw_t .ne. 0) then + endif + else if ( trim(bandpass) == trim(surf_bandpass) .and. trim(cmp) == 'LHT' ) then + if ( sw_t /= 0) then weight=1.0/sw_t - else - weight=1.0 - end if - else - stop 'wrong bandpass and component, check input parameters' - end if - - - read(1001,*) nwin - do k=1,nwin - read(1001,*) tstart,tend - is=max(floor((tstart-b)/dt),1) + else + weight=1.0 + endif + else + stop 'wrong bandpass and component, check input parameters' + endif + + + read(1001,*) nwin + do k=1,nwin + read(1001,*) tstart,tend + is=max(floor((tstart-b)/dt),1) ie=min(ceiling((tend-b)/dt),npts) data_win(:)=0.0 - syn_win(:)=0.0 + syn_win(:)=0.0 data_win(is:ie)=data(is:ie) syn_win(is:ie)=syn(is:ie) - call xcorr_calc(data_win,syn_win,npts,is,ie,cc_shift,cc_max) - deltaT0=cc_shift*dt - + call xcorr_calc(data_win,syn_win,npts,is,ie,cc_shift,cc_max) + deltaT0=cc_shift*dt + - do i=1,n_total + do i=1,n_total t00=t0(i) m00=m0(i) ishift=nint(t00/dt) - + isd=is ied=ie iss=isd-ishift iee=ied-ishift - - if ( trim(criteria) .eq. 'waveform' ) then - ! full waveform misfit function + + if ( trim(criteria) == 'waveform' ) then + ! full waveform misfit function misfit_tmp=weight*sum((m00*syn(iss:iee)-data(isd:ied))**2)/sum(sqrt(syn(iss:iee)**2)*sqrt(data(isd:ied)**2)) - else if (trim(criteria) .eq. 'phase_amplitude' ) then - ! phase and amplitude misfit function + else if (trim(criteria) == 'phase_amplitude' ) then + ! phase and amplitude misfit function deltaT=deltaT0-t00 syn_m0=syn*m00 deltaA=0.5*log(sum(data(isd:ied)*data(isd:ied))/sum(syn_m0(iss:iee)*syn_m0(iss:iee))) misfit_tmp=weight*(fact_tt*(deltaT**2)+fact_am*(deltaA**2)) else - stop 'wrong criteria for misfit function, check input parameters' - end if - + stop 'wrong criteria for misfit function, check input parameters' + endif + ! total misfit function - misfit(i)=misfit(i)+misfit_tmp + misfit(i)=misfit(i)+misfit_tmp + + enddo + enddo + enddo + close(1001) - end do - end do - end do - close(1001) - !------------------------------------------------------------ !- select minimum misfit function and write out new cmt file !------------------------------------------------------------ imina=minloc(misfit(1:n_total)) imin=imina(1) m0_best=m0(imin) - t0_best=t0(imin) + t0_best=t0(imin) - maxmisfit=maxval(misfit(1:n_total)) + maxmisfit=maxval(misfit(1:n_total)) open(1004,file=trim(cmt_file),status='old',iostat=ios) - if (ios/=0) stop 'Error openning CMT file' - do while (ios == 0) - read(1004,'(a)',iostat=ios) string - lstr=len_trim(string) - if (string(1:10) == 'time shift') then - read(string(12:lstr),*) t_cmt - end if - end do - close(1004) + if (ios/=0) stop 'Error openning CMT file' + do while (ios == 0) + read(1004,'(a)',iostat=ios) string + lstr=len_trim(string) + if (string(1:10) == 'time shift') then + read(string(12:lstr),*) t_cmt + endif + enddo + close(1004) t_cmt_new=t_cmt+t0_best - ! several criteria to negelect selected parameters - ! 1. if number of window smaller than 10 - ! 2. if new original time is smaller than 0.0 - ! 3. for scale moment, only use perturbation linesearch_mbest since its large covariance - if (nf < 10 ) then + ! several criteria to negelect selected parameters + ! 1. if number of window smaller than 10 + ! 2. if new original time is smaller than 0.0 + ! 3. for scale moment, only use perturbation linesearch_mbest since its large covariance + if (nf < 10 ) then t0_best=0.0 m0_best=1.0 - end if + endif - if ( t_cmt_new < 0.0 ) then + if ( t_cmt_new < 0.0 ) then t0_best=0.0 m0_best=1.0 - end if + endif m0_best=1.0+(m0_best-1.0)*linesearch_mbest @@ -226,17 +226,17 @@ program xgrid_search_time_moment write(*,*) 'MIN MISFIT:',misfit(imin) - + open(1002,file=trim(output_minmax),status='unknown') - write(1002,*) t0_best,m0_best,misfit(imin) + write(1002,*) t0_best,m0_best,misfit(imin) close(1002) - open(1003,file=trim(output_misfit),status='unknown') + open(1003,file=trim(output_misfit),status='unknown') do i = 1,n_total write(1003,*) t0(i),m0(i),misfit(i)/maxmisfit - end do - close(1003) + enddo + close(1003) - call write_new_cmtsolution(cmt_file,trim(new_cmt_file),t0_best,m0_best) + call write_new_cmtsolution(cmt_file,trim(new_cmt_file),t0_best,m0_best) write(*,*) 'SUCESSIVEFULLY' @@ -252,8 +252,8 @@ subroutine xcorr_calc(d,s,npts,i1,i2,ishift,cc_max) ! inputs: ! s(npts) = synthetic ! d(npts) = data (or observed) - ! i1, i2 = start and stop indexes of window within s and d - + ! i1, i2 = start and stop indexes of window within s and d + real, dimension(*), intent(in) :: s,d integer, intent(in) :: npts, i1, i2 @@ -272,7 +272,7 @@ subroutine xcorr_calc(d,s,npts,i1,i2,ishift,cc_max) ishift = 0 cc_max = 0.0 - if (i1.lt.1 .or. i1.gt.i2 .or. i2.gt.npts) then + if (i1<1 .or. i1>i2 .or. i2>npts) then write(*,*) 'Error with window limits: i1, i2, npts ', i1, i2, npts return endif @@ -306,12 +306,12 @@ subroutine xcorr_calc(d,s,npts,i1,i2,ishift,cc_max) ! cc as a function of i cc = 0. do j = i1, i2 ! loop over full window length - if((j+i).ge.1 .and. (j+i).le.npts) cc = cc + s(j)*d(j+i) ! d is shifted by i + if((j+i)>=1 .and. (j+i)<=npts) cc = cc + s(j)*d(j+i) ! d is shifted by i enddo cc = cc/norm ! keeping cc-max only - if (cc .gt. cc_max) then + if (cc > cc_max) then cc_max = cc ishift = i endif @@ -331,18 +331,18 @@ end subroutine xcorr_calc subroutine write_new_cmtsolution(cmt_file,new_cmt_file,t0_best,m0_best) - - character(len=*),intent(in):: cmt_file,new_cmt_file - real,intent(in):: t0_best,m0_best + + character(len=*),intent(in):: cmt_file,new_cmt_file + real,intent(in):: t0_best,m0_best integer,parameter:: IOCMT=1009 character(len=150):: pde_time,event_name,str_tshift,str_hdur,str_lat,str_lon,str_dep - real:: t_cmt, t_cmt_new + real:: t_cmt, t_cmt_new real,dimension(6):: moment_tensor,moment_tensor_new - integer:: ios,lstr + integer:: ios,lstr character(len=150) :: string - - ! read basic information + + ! read basic information open(IOCMT,file=trim(cmt_file),status='old') read(IOCMT,'(a)') pde_time read(IOCMT,'(a)') event_name @@ -353,45 +353,45 @@ subroutine write_new_cmtsolution(cmt_file,new_cmt_file,t0_best,m0_best) read(IOCMT,'(a)') str_dep close(IOCMT) - ! read tshift and moment tensor + ! read tshift and moment tensor open(IOCMT,file=trim(cmt_file),status='old',iostat=ios) if (ios /= 0) stop 'Error opening CMT file' - do while (ios==0) - read(IOCMT,'(a)',iostat=ios) string - lstr=len_trim(string) + do while (ios==0) + read(IOCMT,'(a)',iostat=ios) string + lstr=len_trim(string) - if (string(1:10) == 'time shift') then - read(string(12:lstr),*) t_cmt - else if (string(1:3) == 'Mrr') then + if (string(1:10) == 'time shift') then + read(string(12:lstr),*) t_cmt + else if (string(1:3) == 'Mrr') then read(string(5:lstr),*) moment_tensor(1) - else if (string(1:3) == 'Mtt') then + else if (string(1:3) == 'Mtt') then read(string(5:lstr),*) moment_tensor(2) - else if (string(1:3) == 'Mpp') then + else if (string(1:3) == 'Mpp') then read(string(5:lstr),*) moment_tensor(3) - else if (string(1:3) == 'Mrt') then + else if (string(1:3) == 'Mrt') then read(string(5:lstr),*) moment_tensor(4) - else if (string(1:3) == 'Mrp') then + else if (string(1:3) == 'Mrp') then read(string(5:lstr),*) moment_tensor(5) - else if (string(1:3) == 'Mtp') then - read(string(5:lstr),*) moment_tensor(6) - end if - end do - close(IOCMT) + else if (string(1:3) == 'Mtp') then + read(string(5:lstr),*) moment_tensor(6) + endif + enddo + close(IOCMT) - ! calculate new t0 and Mij + ! calculate new t0 and Mij !t_cmt_new=t_cmt - t_cmt_new=t_cmt+t0_best - moment_tensor_new(:)=moment_tensor(:)*m0_best + t_cmt_new=t_cmt+t0_best + moment_tensor_new(:)=moment_tensor(:)*m0_best - ! write out new CMTSOLUTION - open(IOCMT,file=trim(new_cmt_file),status='unknown') + ! write out new CMTSOLUTION + open(IOCMT,file=trim(new_cmt_file),status='unknown') write(IOCMT,'(a)') trim(pde_time) - write(IOCMT,'(a)') trim(event_name) - write(IOCMT,'(a,f12.4)') 'time shift:',t_cmt_new + write(IOCMT,'(a)') trim(event_name) + write(IOCMT,'(a,f12.4)') 'time shift:',t_cmt_new write(IOCMT,'(a)') trim(str_hdur) write(IOCMT,'(a)') trim(str_lat) write(IOCMT,'(a)') trim(str_lon) - write(IOCMT,'(a)') trim(str_dep) + write(IOCMT,'(a)') trim(str_dep) write(IOCMT,'(a,g19.6)') 'Mrr:',moment_tensor_new(1) write(IOCMT,'(a,g19.6)') 'Mtt:',moment_tensor_new(2) @@ -399,8 +399,8 @@ subroutine write_new_cmtsolution(cmt_file,new_cmt_file,t0_best,m0_best) write(IOCMT,'(a,g19.6)') 'Mrt:',moment_tensor_new(4) write(IOCMT,'(a,g19.6)') 'Mrp:',moment_tensor_new(5) write(IOCMT,'(a,g19.6)') 'Mtp:',moment_tensor_new(6) - close(IOCMT) + close(IOCMT) -end subroutine write_new_cmtsolution +end subroutine write_new_cmtsolution diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/SOURCE_INVERSION/SRC_GRIDSEARCH_INITIALTIME_MOMENT/xcombine_gridsearch.sh b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/SOURCE_INVERSION/SRC_GRIDSEARCH_INITIALTIME_MOMENT/xcombine_gridsearch.sh index 98618efff..5edc54a13 100755 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/SOURCE_INVERSION/SRC_GRIDSEARCH_INITIALTIME_MOMENT/xcombine_gridsearch.sh +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/SOURCE_INVERSION/SRC_GRIDSEARCH_INITIALTIME_MOMENT/xcombine_gridsearch.sh @@ -11,59 +11,59 @@ ext2=T030_100 eventfile=../EVENTID_CENTER/XEVENTID -meadir=XMEASUREMENT_INPUT_$iter +meadir=XMEASUREMENT_INPUT_$iter grddir=XGRIDSEARCH_INPUT_$iter -if [ ! -d $meadir ]; then - echo WRONG! NO $meadir - exit +if [ ! -d $meadir ]; then + echo WRONG! NO $meadir + exit fi -if [ ! -d $grddir ]; then - echo MKDIR $grddir - mkdir $grddir +if [ ! -d $grddir ]; then + echo MKDIR $grddir + mkdir $grddir fi -if [ ! -f $eventfile ]; then - echo WRONG! NO $eventfile - exit +if [ ! -f $eventfile ]; then + echo WRONG! NO $eventfile + exit fi while read line -do - echo $line - cmtid=`echo $line | awk -F"_" '{print $NF}'` - m1=$meadir/MEASUREMENT_$cmtid'_'$ext1 - m2=$meadir/MEASUREMENT_$cmtid'_'$ext2 - ofile=$grddir/GRIDSEARCH_$cmtid - if [ ! -f $m1 ]; then - echo WRONG! NO $m1 - exit - fi - if [ ! -f $m2 ]; then - echo WRONG! NO $m2 - exit - fi - if [ -f $ofile ]; then - echo DELETE $ofile - rm $ofile - fi +do + echo $line + cmtid=`echo $line | awk -F"_" '{print $NF}'` + m1=$meadir/MEASUREMENT_$cmtid'_'$ext1 + m2=$meadir/MEASUREMENT_$cmtid'_'$ext2 + ofile=$grddir/GRIDSEARCH_$cmtid + if [ ! -f $m1 ]; then + echo WRONG! NO $m1 + exit + fi + if [ ! -f $m2 ]; then + echo WRONG! NO $m2 + exit + fi + if [ -f $ofile ]; then + echo DELETE $ofile + rm $ofile + fi - n1=`sed -n '5p' $m1` - n2=`sed -n '5p' $m2` + n1=`sed -n '5p' $m1` + n2=`sed -n '5p' $m2` bd_z=`sed -n '1p' $m1 | awk '{print $2}'` - bd_r=`sed -n '1p' $m1 | awk '{print $3}'` - bd_t=`sed -n '1p' $m1 | awk '{print $4}'` - sw_z=`sed -n '1p' $m2 | awk '{print $2}'` - sw_r=`sed -n '1p' $m2 | awk '{print $3}'` - sw_t=`sed -n '1p' $m2 | awk '{print $4}'` + bd_r=`sed -n '1p' $m1 | awk '{print $3}'` + bd_t=`sed -n '1p' $m1 | awk '{print $4}'` + sw_z=`sed -n '1p' $m2 | awk '{print $2}'` + sw_r=`sed -n '1p' $m2 | awk '{print $3}'` + sw_t=`sed -n '1p' $m2 | awk '{print $4}'` - ntotal=`echo $n1 + $n2 | bc -l` + ntotal=`echo $n1 + $n2 | bc -l` - echo $ntotal $bd_z $bd_r $bd_t $sw_z $sw_r $sw_t > $ofile - awk 'FNR>5' $m1 >> $ofile - awk 'FNR>5' $m2 >> $ofile + echo $ntotal $bd_z $bd_r $bd_t $sw_z $sw_r $sw_t > $ofile + awk 'FNR>5' $m1 >> $ofile + awk 'FNR>5' $m2 >> $ofile -done < $eventfile +done < $eventfile diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/SOURCE_INVERSION/SRC_GRIDSEARCH_INITIALTIME_MOMENT/xcompile.sh b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/SOURCE_INVERSION/SRC_GRIDSEARCH_INITIALTIME_MOMENT/xcompile.sh index d55563eb7..35b70774b 100755 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/SOURCE_INVERSION/SRC_GRIDSEARCH_INITIALTIME_MOMENT/xcompile.sh +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/SOURCE_INVERSION/SRC_GRIDSEARCH_INITIALTIME_MOMENT/xcompile.sh @@ -4,10 +4,10 @@ # Last modified: Wed Sep 12 11:17:06 EDT 2012 -if [ -f xgridsearch_time_moment ]; then - echo RM xgridsearch_time_moment - rm xgridsearch_time_moment -fi +if [ -f xgridsearch_time_moment ]; then + echo RM xgridsearch_time_moment + rm xgridsearch_time_moment +fi gfortran -o xgridsearch_time_moment -O3 gridsearch_time_moment.f90 -L/home/hejunzhu/BIN/sac-101.4/lib -lsacio #gfortran -o xgridsearch_time_moment -O3 gridsearch_time_moment.f90 -L${SACHOME}/lib -lsacio diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/XUTIL/xcheck_finish.sh b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/XUTIL/xcheck_finish.sh index c440ba8e5..0e1c526e0 100755 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/XUTIL/xcheck_finish.sh +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/XUTIL/xcheck_finish.sh @@ -6,16 +6,16 @@ ntot=0 for dir in CMTSOLUTION_* -do - - file=$dir/job_src2.log - if [ -f $file ]; then - ntot=`echo $ntot + 1| bc -l` - tag="successfully" - n=`wc -l $file | awk '{print $1}'` - text=`grep $tag $file` - echo $dir $text $n - fi +do + + file=$dir/job_src2.log + if [ -f $file ]; then + ntot=`echo $ntot + 1| bc -l` + tag="successfully" + n=`wc -l $file | awk '{print $1}'` + text=`grep $tag $file` + echo $dir $text $n + fi done diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/XUTIL/xcheck_kernel.sh b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/XUTIL/xcheck_kernel.sh index e1f3db9b1..117122407 100755 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/XUTIL/xcheck_kernel.sh +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/XUTIL/xcheck_kernel.sh @@ -5,8 +5,8 @@ for dir in CMTSOLUTION_* -do - n=`ls $dir/KERNEL/*.bin | wc -l` - echo $dir $n +do + n=`ls $dir/KERNEL/*.bin | wc -l` + echo $dir $n -done +done diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/XUTIL/xcheck_seismo.sh b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/XUTIL/xcheck_seismo.sh index dd6a141c2..917990a2b 100755 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/XUTIL/xcheck_seismo.sh +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/XUTIL/xcheck_seismo.sh @@ -4,8 +4,8 @@ # Last modified: Thu Feb 23 17:27:34 EST 2012 for dir in CMTSOLUTION_* -do - n=`ls $dir/OUTPUT_FILES/*.sem.sac | wc -l` - echo $dir $n +do + n=`ls $dir/OUTPUT_FILES/*.sem.sac | wc -l` + echo $dir $n -done +done diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/XUTIL/xdecompress.sh b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/XUTIL/xdecompress.sh index 2efbc26a5..d393785e4 100755 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/XUTIL/xdecompress.sh +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/XUTIL/xdecompress.sh @@ -5,7 +5,7 @@ for dir in CMTSOLUTION_* -do +do - tar -xzvf $dir -done + tar -xzvf $dir +done diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/XUTIL/xtar_mt.sh b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/XUTIL/xtar_mt.sh index 2c3ef4b01..d2f55303f 100755 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/XUTIL/xtar_mt.sh +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/XUTIL/xtar_mt.sh @@ -5,9 +5,9 @@ for dir in CMTSOLUTION_* -do - echo $dir - tar -czvf $dir.tar.gz $dir - rm -rf $dir +do + echo $dir + tar -czvf $dir.tar.gz $dir + rm -rf $dir -done +done diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/compile_Howto_manual.sh b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/compile_Howto_manual.sh index 9a66de04a..e34a6bc4f 100755 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/compile_Howto_manual.sh +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/ADJOINT_TOMOGRAPHY_TOOLKIT/compile_Howto_manual.sh @@ -15,12 +15,12 @@ /bin/rm -rf *.tit > /dev/null /bin/rm -rf *.spl > /dev/null - pdflatex HowtoUseToolkit - bibtex HowtoUseToolkit - pdflatex HowtoUseToolkit - pdflatex HowtoUseToolkit - pdflatex HowtoUseToolkit - pdflatex HowtoUseToolkit + pdflatex HowtoUseToolkit + bibtex HowtoUseToolkit + pdflatex HowtoUseToolkit + pdflatex HowtoUseToolkit + pdflatex HowtoUseToolkit + pdflatex HowtoUseToolkit /bin/rm -rf *.dvi > /dev/null /bin/rm -rf *.log > /dev/null diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/PLOTTING/gji_subspace_initial.pl b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/PLOTTING/gji_subspace_initial.pl index 42a786eb2..c1f6b8b8c 100755 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/PLOTTING/gji_subspace_initial.pl +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/PLOTTING/gji_subspace_initial.pl @@ -155,8 +155,8 @@ # loop over models for ($m = $imodelmin; $m <= $imodelmax; $m = $m+1) { - $imodel = $m; # current model - $mtest = $m % 2; # =1 for a test model + $imodel = $m; # current model + $mtest = $m % 2; # =1 for a test model $stirun = sprintf("%4.4i",$irun0+$imodel); if ($mtest==1) { @@ -192,7 +192,7 @@ # only plot even models (m04 = iteration 8) $kmaxt = 4; - $kmaxm = 4*(1 - $mtest); # =0 for test model + $kmaxm = 4*(1 - $mtest); # =0 for test model if ($itest == 1) { $kmax = $kmaxt; } else { @@ -208,67 +208,67 @@ $find = $fcol; $find2 = 2*$fcol; - $file0 = $files[0]; # initial model + $file0 = $files[0]; # initial model $file1 = $files[$k]; if (not -f $file1) { - die("Check if $file1 exist or not\n"); + die("Check if $file1 exist or not\n"); } # phase velocity map if ($k==0 && $m==$imodelmin) { - # set bounds for the plotting - #$xmin = -121; $xmax = -115.0; $zmin = 31.75; $zmax = 36.5; - ($xmin,$xmax,$zmin,$zmax,$smin,$smax,$tmin,$tmax) = split(" ",`minmax -C $file1`); - $dinc = 0.25; # buffer around min/max - $xmin = $xmin-$dinc; $xmax = $xmax+$dinc; - $zmin = $zmin-$dinc; $zmax = $zmax+$dinc; - $R = "-R$xmin/$xmax/$zmin/$zmax"; - print "\n$R\n"; + # set bounds for the plotting + #$xmin = -121; $xmax = -115.0; $zmin = 31.75; $zmax = 36.5; + ($xmin,$xmax,$zmin,$zmax,$smin,$smax,$tmin,$tmax) = split(" ",`minmax -C $file1`); + $dinc = 0.25; # buffer around min/max + $xmin = $xmin-$dinc; $xmax = $xmax+$dinc; + $zmin = $zmin-$dinc; $zmax = $zmax+$dinc; + $R = "-R$xmin/$xmax/$zmin/$zmax"; + print "\n$R\n"; } if ($k==0) { - print CSH "psbasemap $B $R $J1 -K -V -P $origin > $psfile\n"; # START + print CSH "psbasemap $B $R $J1 -K -V -P $origin > $psfile\n"; # START } else { - print CSH "psbasemap $B $R $J1 -K -O -V $shift >> $psfile\n"; + print CSH "psbasemap $B $R $J1 -K -O -V $shift >> $psfile\n"; } if ($icolor == 1) { - #print CSH "awk '{print \$1,\$2,\$7}' $file1 | pscontour $R $J1 -A- -C$cptfile1 -I -K -O -V >> $psfile\n"; - if ($k == 0) { + #print CSH "awk '{print \$1,\$2,\$7}' $file1 | pscontour $R $J1 -A- -C$cptfile1 -I -K -O -V >> $psfile\n"; + if ($k == 0) { print CSH "awk '{print \$1,\$2,0}' $file0 | nearneighbor -G$grdfile $R $interp\n"; - } elsif ($k == 1) { - print CSH "awk '{print \$1,\$2,\$${find}}' $file0 | nearneighbor -G$grdfile $R $interp\n"; - } elsif ($k == 2) { + } elsif ($k == 1) { + print CSH "awk '{print \$1,\$2,\$${find}}' $file0 | nearneighbor -G$grdfile $R $interp\n"; + } elsif ($k == 2) { print CSH "awk '{print \$1,\$2,\$${find}}' $file1 | nearneighbor -G$grdfile $R $interp\n"; } elsif ($k == 3) { $file2 = "ftemp"; - print CSH "paste $file1 $file0 > $file2\n"; - print CSH "awk '{print \$1,\$2,\$${find}-\$${find2}}' $file2 | nearneighbor -G$grdfile $R $interp\n"; + print CSH "paste $file1 $file0 > $file2\n"; + print CSH "awk '{print \$1,\$2,\$${find}-\$${find2}}' $file2 | nearneighbor -G$grdfile $R $interp\n"; } else { die("k ($k) must be 0,1,2,3"); - } - print CSH "grdimage $grdfile -C$cptfile1 $J1 -K -O -V -Q >> $psfile\n"; + } + print CSH "grdimage $grdfile -C$cptfile1 $J1 -K -O -V -Q >> $psfile\n"; } print CSH "pscoast $J1 $R $B -W1p -Na/1p -Dh -K -O -V >> $psfile\n"; # plot receivers - if (0==1) { # numbered large circles - print CSH "awk '\$1 == \"R\" {print \$2,\$3}' $rec_file | psxy -N $J1 $R -K -O -V $rec0 >> $psfile\n"; - $rec_file2 = text_rec; $angle = 0; $just = "CM"; - print CSH "awk '\$1 == \"R\" {print \$2,\$3,$fsize3,$angle,$fontno,\"$just\",\$4}' $rec_file > $rec_file2\n"; - print CSH "pstext $rec_file2 -N $J1 $R -K -O -V >> $psfile\n"; + if (0==1) { # numbered large circles + print CSH "awk '\$1 == \"R\" {print \$2,\$3}' $rec_file | psxy -N $J1 $R -K -O -V $rec0 >> $psfile\n"; + $rec_file2 = text_rec; $angle = 0; $just = "CM"; + print CSH "awk '\$1 == \"R\" {print \$2,\$3,$fsize3,$angle,$fontno,\"$just\",\$4}' $rec_file > $rec_file2\n"; + print CSH "pstext $rec_file2 -N $J1 $R -K -O -V >> $psfile\n"; - } else { # small circles - print CSH "awk '\$1 == \"R\" {print \$2,\$3}' $rec_file | psxy -N -Sc5p -W0.5p $J1 $R -K -O -V >> $psfile\n"; + } else { # small circles + print CSH "awk '\$1 == \"R\" {print \$2,\$3}' $rec_file | psxy -N -Sc5p -W0.5p $J1 $R -K -O -V >> $psfile\n"; } # plot sources if ($ievent_one) { - print CSH "awk '\$1 == \"S\" {print \$2,\$3}' $rec_file | psxy $src0 -N $J1 $R -K -O -V >> $psfile\n"; + print CSH "awk '\$1 == \"S\" {print \$2,\$3}' $rec_file | psxy $src0 -N $J1 $R -K -O -V >> $psfile\n"; } if ($ievent_all) { - print CSH "awk '{print \$1,\$2}' $evefile | psxy $src -N $J1 $R -K -O -V >> $psfile\n"; + print CSH "awk '{print \$1,\$2}' $evefile | psxy $src -N $J1 $R -K -O -V >> $psfile\n"; } # plot label @@ -283,22 +283,22 @@ # plot title and GMT header if ($k==3) { - $plot_title = "Model m00, model $stmod, and target model (run_${stirun})"; - $Utag = "-U/0/0.25/$plabel"; - $shift = "-Xa-3.5 -Ya8.5"; - print CSH "pstext -N $J1 $R $Utag -O -V $shift >>$psfile<>$psfile<$cshfile"); print CSH "gmtset BASEMAP_TYPE plain PAPER_MEDIA letter TICK_LENGTH $tick LABEL_FONT_SIZE $fsize2 ANOT_FONT_SIZE $fsize2 PLOT_DEGREE_FORMAT D HEADER_FONT $fontno ANOT_FONT $fontno LABEL_FONT $fontno HEADER_FONT_SIZE $fsize1 FRAME_PEN $fpen TICK_PEN $tpen\n"; #=============================================== @@ -378,12 +378,12 @@ # iteration index (subset of all possible) @kvec = (0,$qmax); $numk = @kvec; -$niter_max = $kvec[$numk-1]; # max iteration is the last in the list +$niter_max = $kvec[$numk-1]; # max iteration is the last in the list # load all possible files for ($k = 0; $k <= $niter_max; $k = $k+1) { - $irun = $irun0_cg + 2*$k; # wave2d run number + $irun = $irun0_cg + 2*$k; # wave2d run number $strun = sprintf("%4.4i",$irun); $dir = "$odir$strun"; @@ -458,7 +458,7 @@ if($qmax > 1) { @kvec = (0,1,$qmax); $numk = @kvec; } for ($i = 0; $i < $numk; $i = $i+1) { - + $t = $i; $k = $kvec[$i]; $mod = $mods[2*$k]; @@ -470,7 +470,7 @@ if ($i == 0) { print CSH "psbasemap $B $R $J -P -K -V $origin > $psfile\n"; # START } else { - print CSH "psbasemap $B $R $J -K -O -V $shift >> $psfile\n"; + print CSH "psbasemap $B $R $J -K -O -V $shift >> $psfile\n"; } if ($icolor==1) { #print CSH "awk '{print \$1,\$2,\$6}' $str_files[$k] | pscontour $R $J -A- -C$cpt_vel -I -O -K -V >> $psfile\n"; @@ -525,7 +525,7 @@ $shift = "-X$dX1p"; $title = "($labs[$t]) $tlabs[$t]"; -print CSH "psbasemap $B $R $J -K -O -V $shift >> $psfile\n"; +print CSH "psbasemap $B $R $J -K -O -V $shift >> $psfile\n"; if ($icolor==1) { print CSH "awk '{print \$1,\$2,\$6}' $file1dat_str | nearneighbor -G$grdfile $R $interp\n"; print CSH "grdimage $grdfile -C${cpt_vel} $J -K -O -V -Q >> $psfile\n"; @@ -573,12 +573,12 @@ #$smod = "m\@+${mod}\@+"; $t = $t+1; $title = "($labs[$t]) $tlabs[$i] ${smod}"; - + #------------------- # KEY COMMAND -- formula to scale from mislocation to dot size # THIS MUST BE REPEATED FOR THE KEY BELOW! -# $irun = $irun0_cg + 2*$k; # wave2d run number (CG) +# $irun = $irun0_cg + 2*$k; # wave2d run number (CG) # $strun = sprintf("%4.4i",$irun); # $dir = "$odir$strun"; @@ -596,7 +596,7 @@ $source_error_file = $src_files[$k]; $dots_file = "temp"; - print CSH "awk '{print \$1,\$2,\$6,${ref_rad} + sqrt(\$7*\$7 + \$8*\$8)*$fac/1000}' $source_error_file > $dots_file\n"; + print CSH "awk '{print \$1,\$2,\$6,${ref_rad} + sqrt(\$7*\$7 + \$8*\$8)*$fac/1000}' $source_error_file > $dots_file\n"; print CSH "awk '{print \$1,\$2,\$6,sqrt(\$7*\$7 + \$8*\$8)/1000}' $source_error_file > source_error\n"; #print "\n $source_error_file \n $dots_file \n"; die("testing"); #------------------- diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/PLOTTING/joint_subspace.pl b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/PLOTTING/joint_subspace.pl index 8116082b6..a8874cb18 100755 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/PLOTTING/joint_subspace.pl +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/PLOTTING/joint_subspace.pl @@ -305,7 +305,7 @@ #=============================================== print "\nWriting CSH file...\n"; - + open(CSH,">$cshfile"); print CSH "gmtset BASEMAP_TYPE plain PAPER_MEDIA letter TICK_LENGTH $tick LABEL_FONT_SIZE $fsize2 ANOT_FONT_SIZE $fsize2 PLOT_DEGREE_FORMAT D HEADER_FONT $fontno ANOT_FONT $fontno LABEL_FONT $fontno HEADER_FONT_SIZE $fsize1 FRAME_PEN $fpen TICK_PEN $tpen\n"; #=============================================== @@ -313,12 +313,12 @@ # iteration index (subset of all possible) @kvec = (0,$qmax); $numk = @kvec; -$niter_max = $kvec[$numk-1]; # max iteration is the last in the list +$niter_max = $kvec[$numk-1]; # max iteration is the last in the list # load all possible files for ($k = 0; $k <= $niter_max; $k = $k+1) { - $irun = $irun0_cg + 2*$k; # wave2d run number + $irun = $irun0_cg + 2*$k; # wave2d run number $strun = sprintf("%4.4i",$irun); $dir = "${odir}${strun}"; @@ -415,7 +415,7 @@ $shift = "-X$dX1p"; $src_file = $file1dat_src; $dots_file = "temp"; -print CSH "awk '{print \$1,\$2,\$8,${ref_rad} + sqrt(\$6*\$6 + \$7*\$7)*$fac/1000}' $src_file > $dots_file\n"; +print CSH "awk '{print \$1,\$2,\$8,${ref_rad} + sqrt(\$6*\$6 + \$7*\$7)*$fac/1000}' $src_file > $dots_file\n"; print CSH "psbasemap $B $R $J -K -O -V $shift >> $psfile\n"; print CSH "pscoast $J $R $coast_info2 -K -O -V >> $psfile\n"; print CSH "awk '\$1 == \"R\" {print \$2,\$3}' $recfile |psxy -N $J $R -K -O -V $rec >> $psfile\n"; @@ -523,7 +523,7 @@ $source_error_file = $src_files[$k]; $dots_file = "temp"; - print CSH "awk '{print \$1,\$2,\$8,${ref_rad} + sqrt(\$6*\$6 + \$7*\$7)*$fac/1000}' $source_error_file > $dots_file\n"; + print CSH "awk '{print \$1,\$2,\$8,${ref_rad} + sqrt(\$6*\$6 + \$7*\$7)*$fac/1000}' $source_error_file > $dots_file\n"; print CSH "awk '{print \$1,\$2,\$8,sqrt(\$6*\$6 + \$7*\$7)/1000}' $source_error_file > source_error\n"; #print "\n $source_error_file \n $dots_file \n"; die("testing"); #------------------- @@ -569,7 +569,7 @@ $source_error_file = $src_files_hess[$k]; $dots_file = "temp"; - print CSH "awk '{print \$1,\$2,\$8,${ref_rad} + sqrt(\$6*\$6 + \$7*\$7)*$fac/1000}' $source_error_file > $dots_file\n"; + print CSH "awk '{print \$1,\$2,\$8,${ref_rad} + sqrt(\$6*\$6 + \$7*\$7)*$fac/1000}' $source_error_file > $dots_file\n"; print CSH "awk '{print \$1,\$2,\$8,sqrt(\$6*\$6 + \$7*\$7)/1000}' $source_error_file > source_error\n"; #print "\n $source_error_file \n $dots_file \n"; die("testing"); #------------------- @@ -617,9 +617,9 @@ $ndot = @misloc_dots; $xlon0 = -117; $dlon = 1.0; for ($j = 0; $j < $ndot; $j = $j+1) { - $misloc = $misloc_dots[$j]; - $misloc_size[$j] = $ref_rad + $misloc*$fac; # KEY: use same formula as above - $xlon[$j] = $xlon0 + $j*$dlon; + $misloc = $misloc_dots[$j]; + $misloc_size[$j] = $ref_rad + $misloc*$fac; # KEY: use same formula as above + $xlon[$j] = $xlon0 + $j*$dlon; } # source error scale -- symbols @@ -731,7 +731,7 @@ } # plot the structure - print CSH "psbasemap $B $R $J -K -O -V $shift >> $psfile\n"; + print CSH "psbasemap $B $R $J -K -O -V $shift >> $psfile\n"; if ($icolor==1) { #print CSH "awk '{print \$1,\$2,\$6}' $str_file | pscontour $R $J -A- -C$cpt_vel -I -O -K -V >> $psfile\n"; print CSH "awk '{print \$1,\$2,\$7}' $str_file | nearneighbor -G$grdfile $R $interp\n"; @@ -745,7 +745,7 @@ } print CSH "pstext -N $J_title $R_title -K -O -V >>$psfile<> $psfile\n"; +print CSH "psbasemap $B $R $J -K -O -V $shift >> $psfile\n"; if ($icolor==1) { print CSH "awk '{print \$1,\$2,\$7}' $file1dat_str | nearneighbor -G$grdfile $R $interp\n"; print CSH "grdimage $grdfile -C${cpt_vel} $J -K -O -V -Q >> $psfile\n"; diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/PLOTTING/multi_plot_rs.pl b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/PLOTTING/multi_plot_rs.pl index 9e8d74c6b..fb366bc63 100755 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/PLOTTING/multi_plot_rs.pl +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/PLOTTING/multi_plot_rs.pl @@ -4,7 +4,7 @@ # # multi_plot_rs.pl # Carl Tape, 22-Sept-2005 -# +# # This script repeatedly calls plot_rs.pl to make sub record sections. # It then concatenates the record sections into a single pdf document. # diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/PLOTTING/plot_body_compare_seis.pl b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/PLOTTING/plot_body_compare_seis.pl index 40472e6e0..6a07abb81 100755 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/PLOTTING/plot_body_compare_seis.pl +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/PLOTTING/plot_body_compare_seis.pl @@ -151,7 +151,7 @@ # source time function print "\n seismogram file is $seisfile\n"; - + # determine the max value among the source time functions ($tmin,$tmax,$junk1,$junk2,$junk3,$junk4,$rmin,$rmax) = split(" ",`minmax -C $seisfile`); ($ss) = sort{$b <=> $a} (abs($rmin),abs($rmax)); @@ -197,7 +197,7 @@ "s0 - s2 (NGLL=5, 33 el, NOT honoring mesh)", "s0 - s3 (NGLL=5, 34 el, NOT honoring mesh, but GLL pts equidistant from discontinuities)"); print CSH "pstext -N -JX1 -R0/1/0/1 -K -O -P -V $txtinfo >>$psfile<> $psfile\n"; print CSH "awk '{print \$1,\$4}' $seisfile |psxy $Rs2 $Js $Bs1 -W0.5p,0/0/255 -P -K -O -V >> $psfile\n"; @@ -219,7 +219,7 @@ "s1 - s2 (NGLL=5, NOT honoring mesh, 33 el)", "s1 - s3 (NGLL=5, NOT honoring mesh, but GLL pts equidistant from discontinuities, 34 el)"); print CSH "pstext -N -JX1 -R0/1/0/1 -K -O -P -V $txtinfo >>$psfile<> $psfile\n"; print CSH "pstext -N -JX1 -R0/1/0/1 -K -O -P -V $txtinfo >>$psfile<> $psfile\n"; #print CSH "awk '\$1 == \"R\" {print \$2/1000,\$3/1000}' $dir/sr.txt |psxy -N $J $R -K -O $orient -V $rec >> $psfile\n"; #print CSH "awk '\$1 == \"S\" {print \$2/1000,\$3/1000}' $dir/sr.txt |psxy -N $J $R -K -O $orient -V $src >> $psfile\n"; - + # plot title - $xtx = $xmin+0.5*($xmax-$xmin); $ztx = $zmin+1.15*($zmax-$zmin); + $xtx = $xmin+0.5*($xmax-$xmin); $ztx = $zmin+1.15*($zmax-$zmin); #if ($i == $numf-1) {print CSH "pstext -N $J $R -K -O $orient -V >>$psfile<> $psfile\n"; # sources and receivers, plus chi label if ($ibest==1) { - print CSH "pstext -N $J1 $R -K -O -V -Xa-0 -Ya-0.9 >>$psfile<>$psfile<> $psfile\n"; print CSH "awk '{print \$1,\$2}' $rfile | psxy $R $J1 $rec -K -O -V >> $psfile\n"; } diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/PLOTTING/plot_gauss_mean.pl b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/PLOTTING/plot_gauss_mean.pl index 7b4effa80..7a70c9ec9 100755 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/PLOTTING/plot_gauss_mean.pl +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/PLOTTING/plot_gauss_mean.pl @@ -226,7 +226,7 @@ #------------------------------------------------------------------------ # covariance matrices -- NOTE plotting j,i,Cij - + $file1syn = "$idir/C_Cest.dat"; if (not -f $file1syn) {die("Check if file1syn $file1syn exist or not\n");} $B1syn = "-Ba256f32:.\" \":WesN"; diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/PLOTTING/plot_geometry.pl b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/PLOTTING/plot_geometry.pl index 9e4af97b7..52ec62fcc 100755 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/PLOTTING/plot_geometry.pl +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/PLOTTING/plot_geometry.pl @@ -68,7 +68,7 @@ $fsize1 = "11"; $fsize2 = "9"; $fsize3 = "5"; -$fontno = "1"; # 1 or 4 +$fontno = "1"; # 1 or 4 $tick = "0.2c"; # plot symbols for sources, receivers, and shelf @@ -90,7 +90,7 @@ ($xmin,$xmax,$zmin,$zmax) = split(" ",`minmax -C -I2 $file1syn`); $xmin = $xmin/1000; $xmax = $xmax/1000; $zmin = $zmin/1000; $zmax = $zmax/1000; - $pinc = 0.0; # buffer around min/max + $pinc = 0.0; # buffer around min/max $B = "-B20:.\" \":WESn"; @stflabs = ("x, h (t)","y, h (t)","z, h (t)"); $xtick1 = 1; $xtick2 = 1; @@ -186,7 +186,7 @@ # source time function print "\n Source time function is $stffile1\n"; - + # determine the max value among the source time functions for ($k = 1; $k <= $nstf; $k ++ ) { $sfile = "${edir}/${stf_tag}_${k}"; @@ -196,7 +196,7 @@ } if ($ss==0) { $ss = 1; -} # do not normalize by zero +} # do not normalize by zero print "tmin = $tmin\ntmax = $tmax\nss = $ss\n"; $tinc = 20; diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/PLOTTING/plot_image.pl b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/PLOTTING/plot_image.pl index 877ac2cd5..ba6ee2f1a 100755 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/PLOTTING/plot_image.pl +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/PLOTTING/plot_image.pl @@ -238,7 +238,7 @@ } else { print CSH "awk '{print \$($icol[0])/1000,\$($icol[1])/1000,\$($icol[2])/$cnorm }' $datafile > $dfile\n"; } - + #print CSH "awk '{print \$($icol[0]),\$($icol[1]),\$($icol[2])/$cnorm }' $datafile | pscontour $R $J -A- -C$cptfile -I -K -O -V >> $psfile\n"; #print CSH "pscontour $dfile $R $J -A- -C$cptfile -I -K -O -V >> $psfile\n"; diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/PLOTTING/plot_kernel.pl b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/PLOTTING/plot_kernel.pl index 54c64ac64..b3a99e305 100755 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/PLOTTING/plot_kernel.pl +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/PLOTTING/plot_kernel.pl @@ -145,8 +145,8 @@ print CSH "psbasemap $B1syn $R $J1 -P -K -V $origin > $psfile\n"; # START # phase velocity map - #print CSH "awk '{print \$1,\$2,\$3/1000}' $file_msyn | pscontour $R $J1 -A- -C$cptfile1 -I -P -K -O -V >> $psfile\n"; - print CSH "awk '{print \$1,\$2,\$3 / $norm}' $file_ker | pscontour $R $J1 -A- -C$cptfile1 -I -P -K -O -V >> $psfile\n"; + #print CSH "awk '{print \$1,\$2,\$3/1000}' $file_msyn | pscontour $R $J1 -A- -C$cptfile1 -I -P -K -O -V >> $psfile\n"; + print CSH "awk '{print \$1,\$2,\$3 / $norm}' $file_ker | pscontour $R $J1 -A- -C$cptfile1 -I -P -K -O -V >> $psfile\n"; print CSH "pscoast $J1 $R $B1syn -W1p -Na/1p -Dh -P -K -O -V >> $psfile\n"; #print CSH "awk '{print \$2,\$1}' INPUT/oms_shelf |psxy $J1 $R $Wshelf -K -O -P -V >> $psfile\n"; diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/PLOTTING/plot_rs.pl b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/PLOTTING/plot_rs.pl index 3b783ffcc..02a07e773 100755 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/PLOTTING/plot_rs.pl +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/PLOTTING/plot_rs.pl @@ -41,9 +41,9 @@ () -C : cutting of trace, default no cutting -J : projection, default [-JX6/-8] -E : alignment of traces , like -Ekt5 default [-Ek8.0] - -M : scale of trace, default [0.03/1] + -M : scale of trace, default [0.03/1] -W : data trace property - -w : syn trace property + -w : syn trace property -d data_file, data_ext, comp -D data_dir, data_ext, comp, station_file -S syn_dir, syn_ext, shift_hdr @@ -80,7 +80,7 @@ () elsif ($opt_D) { ($data_dir,$data_ext,$comp,$station_used) = split(/\,/,$opt_D); - if (not $comp ) {die("need to specfiy component to plot\n");} + if (not $comp ) {die("need to specfiy component to plot\n");} if (not $data_dir) {die("need to specify the data directory\n");} if (not $data_ext) {die("need to specify the data extensions\n");} @data_files = (); @@ -174,7 +174,7 @@ () (undef,$datamax) = split(" ",`saclst depmax f $data_files[$i]`); (undef,$synmax) = split(" ",`saclst depmax f $syn_files[$i]`); if ($datamax > $synmax * $opt_T or $synmax > $datamax * $opt_T) { - print "skip $data_files[$i] and $syn_files[$i] -- too large amp. ratio\n";} + print "skip $data_files[$i] and $syn_files[$i] -- too large amp. ratio\n";} else {push(@datatmp,$data_files[$i]); push(@syntmp,$syn_files[$i]);} } @data_files = @datatmp; @syn_files = @syntmp; } @@ -195,7 +195,7 @@ () # use saclst to extract various quantities (evel, evdp not accessible) (undef,$sta,$dist,$az,$stla,$stlo,$net)=split(" ", `saclst kstnm dist az stla stlo knetwk f $data`); - + #$text .= sprintf("$R1 %6.1f 10 0 4 BC %s\n $R2 %6.1f 10 0 4 BC %6.1f %6.1f \n",$dist,$sta,$dist,$dist,$az); $R2p = $R2 + 0.01*($R2-$R1); # x-coordinate for label at right diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/PLOTTING/plot_surf_16frames.pl b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/PLOTTING/plot_surf_16frames.pl index 473d13ec7..b7eebd32e 100755 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/PLOTTING/plot_surf_16frames.pl +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/PLOTTING/plot_surf_16frames.pl @@ -10,7 +10,7 @@ # adjoint wavefield, interaction field, and kernel. # # copied from plot_oms_kernel.pl and plot_for_adj_oms.pl on 09-June-2005 -# +# #------------------------- # EXAMPLES (GJI figures): # (27-Nov-2005, traveltime) -- socal kernels @@ -236,7 +236,7 @@ $snap1 = sprintf("%05d",$j1); $snap2 = sprintf("%05d",$j2); $time = sprintf("%04d",$j1*$dt); - + $snapshot_f = "${basedir}/$wavefield[0]_${snap1}"; $snapshot_a = "${basedir}/$wavefield[1]_${snap2}"; $snapshot_k = "${basedir}/$wavefield[2]_${snap2}"; @@ -244,13 +244,13 @@ if (not -f $snapshot_f) {die("check if snapshot_f $snapshot_f exist or not\n");} if (not -f $snapshot_a) {die("check if snapshot_a $snapshot_a exist or not\n");} if (not -f $snapshot_k) {die("check if snapshot_k $snapshot_k exist or not\n");} - + $k = 0; $R = $Rc[$k]; print CSH "echo $psfile\n"; print CSH "echo $snapshot_f\n"; - + $B = "-B1/1:\"t = $time s\"::.\" \":Wsne"; $B_row1 = "-B1/1:\"t = $time s\"::.\" \":WSne"; if ($i == 0) { $B = $B_row1;} @@ -275,9 +275,9 @@ $ztext = $zmin+0.5*($zmax-$zmin); $tstr = "t = $time s"; print CSH "pstext -N $J $R -K -O -P -V >>$psfile<>$psfile<> $psfile\n"; if($icolor==1) { diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/PLOTTING/plot_surf_ker_mod.pl b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/PLOTTING/plot_surf_ker_mod.pl index 05da9c57f..8bdb64ee0 100755 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/PLOTTING/plot_surf_ker_mod.pl +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/PLOTTING/plot_surf_ker_mod.pl @@ -58,7 +58,7 @@ # scripts/plot_ker_mod.pl OUTPUT/run_ event_ socal_vel_dat.dat socal_vel_syn.dat kernel_basis -7/3.0/0/10 1 1/25 1 460 16 # scripts/plot_ker_mod.pl OUTPUT/run_ event_ socal_vel_dat.dat socal_vel_syn.dat kernel_basis -7/3.0/0/10 1 1/25 1 480 16 # scripts/plot_ker_mod.pl OUTPUT/run_ event_ socal_vel_dat.dat socal_vel_syn.dat kernel_basis -7/3.0/0/10 1 1/25 1 500 16 -# +# # PERTURBED CONDITIONS (Rayleigh, gamma = 30) # scripts/plot_ker_mod.pl OUTPUT/run_ event_ socal_vel_dat.dat socal_vel_syn.dat kernel_basis -7/3.0/0/10 1 1/25 1 280 16 # reference # scripts/plot_ker_mod.pl OUTPUT/run_ event_ socal_vel_dat.dat socal_vel_syn.dat kernel_basis -6/1.0/1/2 1 1/25 1 520 16 # pert source diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/PLOTTING/plot_surf_model_all.pl b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/PLOTTING/plot_surf_model_all.pl index bcf877bd7..91891357d 100755 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/PLOTTING/plot_surf_model_all.pl +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/PLOTTING/plot_surf_model_all.pl @@ -159,8 +159,8 @@ # loop over models for ($m = $imodelmin; $m <= $imodelmax; $m = $m+1) { - $imodel = $m; # current model - $mtest = $m % 2; # =1 for a test model + $imodel = $m; # current model + $mtest = $m % 2; # =1 for a test model $stirun = sprintf("%4.4i",$irun0+$imodel); if ($mtest==1) { @@ -187,7 +187,7 @@ # write plotting scripts $wid = $wid1; - $J1 = "-JM${wid}i"; # in lat-lon + $J1 = "-JM${wid}i"; # in lat-lon $origin = "-X1.5 -Y7.25"; $Dlen = 2.0; $Dx = $wid/2; $Dy = -0.35; $Dscale1 = "-D$Dx/$Dy/$Dlen/0.15h"; @@ -200,13 +200,13 @@ print "\n----FIGURE 1--model $stmod----\n"; @files = ("$dir0/${mfile_syn}","$dir0/${mfile_syn}", - "$dir1/${mfile_syn}","$dir1/${mfile_syn}", - "$dir0/${mfile_dat}","$dir0/${mfile_dat}"); + "$dir1/${mfile_syn}","$dir1/${mfile_syn}", + "$dir0/${mfile_dat}","$dir0/${mfile_dat}"); @stlabs = ("m00","mtar - m00",$stmod,"mtar - $stmod","mtar","mtar - mtar"); # only plot even models (m04 = iteration 8) $kmaxt = 6; - $kmaxm = 6*(1 - $mtest); # =0 for test model + $kmaxm = 6*(1 - $mtest); # =0 for test model if ($itest == 1) { $kmax = $kmaxt; } else { @@ -224,62 +224,62 @@ $file1 = $files[$k]; if (not -f $file1) { - die("Check if $file1 exist or not\n"); + die("Check if $file1 exist or not\n"); } # column-concatenate target model and current model if ($k % 2 == 1) { - $file2 = "ftemp"; - print CSH "paste $filedat $file1 > $file2\n"; + $file2 = "ftemp"; + print CSH "paste $filedat $file1 > $file2\n"; } # phase velocity map if ($k==0 && $m==$imodelmin) { - # set bounds for the plotting - #$xmin = -121; $xmax = -115.0; $zmin = 31.75; $zmax = 36.5; - ($xmin,$xmax,$zmin,$zmax,$smin,$smax,$tmin,$tmax) = split(" ",`minmax -C $file1`); - $dinc = 0.25; # buffer around min/max - $xmin = $xmin-$dinc; $xmax = $xmax+$dinc; - $zmin = $zmin-$dinc; $zmax = $zmax+$dinc; - $R = "-R$xmin/$xmax/$zmin/$zmax"; - print "\n$R\n"; + # set bounds for the plotting + #$xmin = -121; $xmax = -115.0; $zmin = 31.75; $zmax = 36.5; + ($xmin,$xmax,$zmin,$zmax,$smin,$smax,$tmin,$tmax) = split(" ",`minmax -C $file1`); + $dinc = 0.25; # buffer around min/max + $xmin = $xmin-$dinc; $xmax = $xmax+$dinc; + $zmin = $zmin-$dinc; $zmax = $zmax+$dinc; + $R = "-R$xmin/$xmax/$zmin/$zmax"; + print "\n$R\n"; } if ($k==0) { - print CSH "psbasemap $B $R $J1 -K -V -P $origin > $psfile0\n"; # START + print CSH "psbasemap $B $R $J1 -K -V -P $origin > $psfile0\n"; # START } else { - print CSH "psbasemap $B $R $J1 -K -O -V $shift >> $psfile0\n"; + print CSH "psbasemap $B $R $J1 -K -O -V $shift >> $psfile0\n"; } if ($icolor == 1) { - #print CSH "awk '{print \$1,\$2,\$7}' $file1 | pscontour $R $J1 -A- -C$cptfile1 -I -K -O -V >> $psfile0\n"; - if ($k % 2 == 0) { - print CSH "awk '{print \$1,\$2,\$${find}}' $file1 | nearneighbor -G$grdfile $R $interp\n"; - } else { - print CSH "awk '{print \$1,\$2,\$${find}-\$${find2}}' $file2 | nearneighbor -G$grdfile $R $interp\n"; - } - print CSH "grdimage $grdfile -C$cptfile1 $J1 -K -O -V -Q >> $psfile0\n"; + #print CSH "awk '{print \$1,\$2,\$7}' $file1 | pscontour $R $J1 -A- -C$cptfile1 -I -K -O -V >> $psfile0\n"; + if ($k % 2 == 0) { + print CSH "awk '{print \$1,\$2,\$${find}}' $file1 | nearneighbor -G$grdfile $R $interp\n"; + } else { + print CSH "awk '{print \$1,\$2,\$${find}-\$${find2}}' $file2 | nearneighbor -G$grdfile $R $interp\n"; + } + print CSH "grdimage $grdfile -C$cptfile1 $J1 -K -O -V -Q >> $psfile0\n"; } print CSH "pscoast $J1 $R $B -W1p -Na/1p -Dh -K -O -V >> $psfile0\n"; # plot receivers - if (0==1) { # numbered large circles - print CSH "awk '\$1 == \"R\" {print \$2,\$3}' $rec_file | psxy -N $J1 $R -K -O -V $rec0 >> $psfile0\n"; - $rec_file2 = text_rec; $angle = 0; $just = "CM"; - print CSH "awk '\$1 == \"R\" {print \$2,\$3,$fsize3,$angle,$fontno,\"$just\",\$4}' $rec_file > $rec_file2\n"; - print CSH "pstext $rec_file2 -N $J1 $R -K -O -V >> $psfile0\n"; + if (0==1) { # numbered large circles + print CSH "awk '\$1 == \"R\" {print \$2,\$3}' $rec_file | psxy -N $J1 $R -K -O -V $rec0 >> $psfile0\n"; + $rec_file2 = text_rec; $angle = 0; $just = "CM"; + print CSH "awk '\$1 == \"R\" {print \$2,\$3,$fsize3,$angle,$fontno,\"$just\",\$4}' $rec_file > $rec_file2\n"; + print CSH "pstext $rec_file2 -N $J1 $R -K -O -V >> $psfile0\n"; - } else { # small circles - print CSH "awk '\$1 == \"R\" {print \$2,\$3}' $rec_file | psxy -N -Sc5p -W0.5p $J1 $R -K -O -V >> $psfile0\n"; + } else { # small circles + print CSH "awk '\$1 == \"R\" {print \$2,\$3}' $rec_file | psxy -N -Sc5p -W0.5p $J1 $R -K -O -V >> $psfile0\n"; } # plot sources if ($ievent_one) { - print CSH "awk '\$1 == \"S\" {print \$2,\$3}' $rec_file | psxy $src0 -N $J1 $R -K -O -V >> $psfile0\n"; + print CSH "awk '\$1 == \"S\" {print \$2,\$3}' $rec_file | psxy $src0 -N $J1 $R -K -O -V >> $psfile0\n"; } if ($ievent_all) { - print CSH "awk '{print \$1,\$2}' $evefile | psxy $src -N $J1 $R -K -O -V >> $psfile0\n"; + print CSH "awk '{print \$1,\$2}' $evefile | psxy $src -N $J1 $R -K -O -V >> $psfile0\n"; } # plot label @@ -289,28 +289,28 @@ # colorscale bars if ($k==4) { - print CSH "psscale -C$cptfile1 $Dscale1 $Bscale1 -K -O -V >> $psfile0\n"; + print CSH "psscale -C$cptfile1 $Dscale1 $Bscale1 -K -O -V >> $psfile0\n"; } if ($k==5) { - print CSH "psscale -C$cptfile1 $Dscale1 $Bscale2 -K -O -V >> $psfile0\n"; + print CSH "psscale -C$cptfile1 $Dscale1 $Bscale2 -K -O -V >> $psfile0\n"; } # plot title and GMT header if ($k==5) { - $plot_title = "Model m00, model $stmod, and target model (run_${stirun})"; - $Utag = "-U/0/0.25/$plabel"; - $shift = "-Xa-3.5 -Ya8.5"; - print CSH "pstext -N $J1 $R $Utag -O -V $shift >>$psfile0<>$psfile0< $file2\n"; + $file2 = "ftemp"; + print CSH "paste $file1 $file0 > $file2\n"; } # phase velocity map if ($k==0 && $m==$imodelmin) { - # set bounds for the plotting - #$xmin = -121; $xmax = -115.0; $zmin = 31.75; $zmax = 36.5; - ($xmin,$xmax,$zmin,$zmax,$smin,$smax,$tmin,$tmax) = split(" ",`minmax -C $file1`); - $dinc = 0.25; # buffer around min/max - $xmin = $xmin-$dinc; $xmax = $xmax+$dinc; - $zmin = $zmin-$dinc; $zmax = $zmax+$dinc; - $R = "-R$xmin/$xmax/$zmin/$zmax"; - print "\n$R\n"; + # set bounds for the plotting + #$xmin = -121; $xmax = -115.0; $zmin = 31.75; $zmax = 36.5; + ($xmin,$xmax,$zmin,$zmax,$smin,$smax,$tmin,$tmax) = split(" ",`minmax -C $file1`); + $dinc = 0.25; # buffer around min/max + $xmin = $xmin-$dinc; $xmax = $xmax+$dinc; + $zmin = $zmin-$dinc; $zmax = $zmax+$dinc; + $R = "-R$xmin/$xmax/$zmin/$zmax"; + print "\n$R\n"; } if ($k==0) { - print CSH "psbasemap $B $R $J1 -K -V -P $origin > $psfile1\n"; # START + print CSH "psbasemap $B $R $J1 -K -V -P $origin > $psfile1\n"; # START } else { - print CSH "psbasemap $B $R $J1 -K -O -V $shift >> $psfile1\n"; + print CSH "psbasemap $B $R $J1 -K -O -V $shift >> $psfile1\n"; } if ($icolor == 1) { - #print CSH "awk '{print \$1,\$2,\$7}' $file1 | pscontour $R $J1 -A- -C$cptfile1 -I -K -O -V >> $psfile1\n"; - if ($k % 2 == 0) { - print CSH "awk '{print \$1,\$2,\$${find}}' $file1 | nearneighbor -G$grdfile $R $interp\n"; - } else { - print CSH "awk '{print \$1,\$2,\$${find}-\$${find2}}' $file2 | nearneighbor -G$grdfile $R $interp\n"; - } - print CSH "grdimage $grdfile -C$cptfile1 $J1 -K -O -V -Q >> $psfile1\n"; + #print CSH "awk '{print \$1,\$2,\$7}' $file1 | pscontour $R $J1 -A- -C$cptfile1 -I -K -O -V >> $psfile1\n"; + if ($k % 2 == 0) { + print CSH "awk '{print \$1,\$2,\$${find}}' $file1 | nearneighbor -G$grdfile $R $interp\n"; + } else { + print CSH "awk '{print \$1,\$2,\$${find}-\$${find2}}' $file2 | nearneighbor -G$grdfile $R $interp\n"; + } + print CSH "grdimage $grdfile -C$cptfile1 $J1 -K -O -V -Q >> $psfile1\n"; } print CSH "pscoast $J1 $R $B -W1p -Na/1p -Dh -K -O -V >> $psfile1\n"; # plot receivers - if (0==1) { # numbered large circles - print CSH "awk '\$1 == \"R\" {print \$2,\$3}' $rec_file | psxy -N $J1 $R -K -O -V $rec0 >> $psfile1\n"; - $rec_file2 = text_rec; $angle = 0; $just = "CM"; - print CSH "awk '\$1 == \"R\" {print \$2,\$3,$fsize3,$angle,$fontno,\"$just\",\$4}' $rec_file > $rec_file2\n"; - print CSH "pstext $rec_file2 -N $J1 $R -K -O -V >> $psfile1\n"; + if (0==1) { # numbered large circles + print CSH "awk '\$1 == \"R\" {print \$2,\$3}' $rec_file | psxy -N $J1 $R -K -O -V $rec0 >> $psfile1\n"; + $rec_file2 = text_rec; $angle = 0; $just = "CM"; + print CSH "awk '\$1 == \"R\" {print \$2,\$3,$fsize3,$angle,$fontno,\"$just\",\$4}' $rec_file > $rec_file2\n"; + print CSH "pstext $rec_file2 -N $J1 $R -K -O -V >> $psfile1\n"; - } else { # small circles - print CSH "awk '\$1 == \"R\" {print \$2,\$3}' $rec_file | psxy -N -Sc5p -W0.5p $J1 $R -K -O -V >> $psfile1\n"; + } else { # small circles + print CSH "awk '\$1 == \"R\" {print \$2,\$3}' $rec_file | psxy -N -Sc5p -W0.5p $J1 $R -K -O -V >> $psfile1\n"; } # plot sources if ($ievent_one) { - print CSH "awk '\$1 == \"S\" {print \$2,\$3}' $rec_file | psxy $src0 -N $J1 $R -K -O -V >> $psfile1\n"; + print CSH "awk '\$1 == \"S\" {print \$2,\$3}' $rec_file | psxy $src0 -N $J1 $R -K -O -V >> $psfile1\n"; } if ($ievent_all) { - print CSH "awk '{print \$1,\$2}' $evefile | psxy $src -N $J1 $R -K -O -V >> $psfile1\n"; + print CSH "awk '{print \$1,\$2}' $evefile | psxy $src -N $J1 $R -K -O -V >> $psfile1\n"; } # plot label @@ -427,28 +427,28 @@ # colorscale bars if ($k==4) { - print CSH "psscale -C$cptfile1 $Dscale1 $Bscale1 -K -O -V >> $psfile1\n"; + print CSH "psscale -C$cptfile1 $Dscale1 $Bscale1 -K -O -V >> $psfile1\n"; } if ($k==5) { - print CSH "psscale -C$cptfile1 $Dscale1 $Bscale2 -K -O -V >> $psfile1\n"; + print CSH "psscale -C$cptfile1 $Dscale1 $Bscale2 -K -O -V >> $psfile1\n"; } # plot title and GMT header if ($k==5) { - $plot_title = "Model m00, model $stmod, and target model (run_${stirun})"; - $Utag = "-U/0/0.25/$plabel"; - $shift = "-Xa-3.5 -Ya8.5"; - print CSH "pstext -N $J1 $R $Utag -O -V $shift >>$psfile1<>$psfile1< 0) { - if (not -f $file1) { - die("Check if file1 $file1 exist or not\n"); - } - $file2 = "ftemp"; + if (not -f $file1) { + die("Check if file1 $file1 exist or not\n"); + } + $file2 = "ftemp"; print "concatenating two files:\n $file0\n $file1\n"; - print CSH "paste $file1 $file0 > $file2\n"; + print CSH "paste $file1 $file0 > $file2\n"; } # phase velocity map if ($k==0) { - # set bounds for the plotting - #$xmin = -121; $xmax = -115.0; $zmin = 31.75; $zmax = 36.5; - ($xmin,$xmax,$zmin,$zmax,$smin,$smax,$tmin,$tmax) = split(" ",`minmax -C $file1`); - $dinc = 0.25; # buffer around min/max - $xmin = $xmin-$dinc; $xmax = $xmax+$dinc; - $zmin = $zmin-$dinc; $zmax = $zmax+$dinc; - $R = "-R$xmin/$xmax/$zmin/$zmax"; - print "\n$R\n"; + # set bounds for the plotting + #$xmin = -121; $xmax = -115.0; $zmin = 31.75; $zmax = 36.5; + ($xmin,$xmax,$zmin,$zmax,$smin,$smax,$tmin,$tmax) = split(" ",`minmax -C $file1`); + $dinc = 0.25; # buffer around min/max + $xmin = $xmin-$dinc; $xmax = $xmax+$dinc; + $zmin = $zmin-$dinc; $zmax = $zmax+$dinc; + $R = "-R$xmin/$xmax/$zmin/$zmax"; + print "\n$R\n"; } if ($k==0) { - print CSH "psbasemap $B $R $J1 -K -V -P $origin > $psfile2\n"; # START + print CSH "psbasemap $B $R $J1 -K -V -P $origin > $psfile2\n"; # START } else { - print CSH "psbasemap $B $R $J1 -K -O -V $shift >> $psfile2\n"; + print CSH "psbasemap $B $R $J1 -K -O -V $shift >> $psfile2\n"; } if ($icolor == 1) { - #print CSH "awk '{print \$1,\$2,\$7}' $file1 | pscontour $R $J1 -A- -C$cptfile1 -I -K -O -V >> $psfile2\n"; - if ($kmod == 0) { - print CSH "awk '{print \$1,\$2,\$${find}}' $file1 | nearneighbor -G$grdfile $R $interp\n"; - } else { - print CSH "awk '{print \$1,\$2,\$${find}-\$${find2}}' $file2 | nearneighbor -G$grdfile $R $interp\n"; - } - print CSH "grdimage $grdfile -C$cptfile1 $J1 -K -O -V -Q >> $psfile2\n"; + #print CSH "awk '{print \$1,\$2,\$7}' $file1 | pscontour $R $J1 -A- -C$cptfile1 -I -K -O -V >> $psfile2\n"; + if ($kmod == 0) { + print CSH "awk '{print \$1,\$2,\$${find}}' $file1 | nearneighbor -G$grdfile $R $interp\n"; + } else { + print CSH "awk '{print \$1,\$2,\$${find}-\$${find2}}' $file2 | nearneighbor -G$grdfile $R $interp\n"; + } + print CSH "grdimage $grdfile -C$cptfile1 $J1 -K -O -V -Q >> $psfile2\n"; } print CSH "pscoast $J1 $R $B -W1p -Na/1p -Dh -K -O -V >> $psfile2\n"; # plot receivers - if (0==1) { # numbered large circles - print CSH "awk '\$1 == \"R\" {print \$2,\$3}' $rec_file | psxy -N $J1 $R -K -O -V $rec0 >> $psfile2\n"; - $rec_file2 = text_rec; $angle = 0; $just = "CM"; - print CSH "awk '\$1 == \"R\" {print \$2,\$3,$fsize3,$angle,$fontno,\"$just\",\$4}' $rec_file > $rec_file2\n"; - print CSH "pstext $rec_file2 -N $J1 $R -K -O -V >> $psfile2\n"; + if (0==1) { # numbered large circles + print CSH "awk '\$1 == \"R\" {print \$2,\$3}' $rec_file | psxy -N $J1 $R -K -O -V $rec0 >> $psfile2\n"; + $rec_file2 = text_rec; $angle = 0; $just = "CM"; + print CSH "awk '\$1 == \"R\" {print \$2,\$3,$fsize3,$angle,$fontno,\"$just\",\$4}' $rec_file > $rec_file2\n"; + print CSH "pstext $rec_file2 -N $J1 $R -K -O -V >> $psfile2\n"; - } else { # small circles - print CSH "awk '\$1 == \"R\" {print \$2,\$3}' $rec_file | psxy -N -Sc5p -W0.5p $J1 $R -K -O -V >> $psfile2\n"; + } else { # small circles + print CSH "awk '\$1 == \"R\" {print \$2,\$3}' $rec_file | psxy -N -Sc5p -W0.5p $J1 $R -K -O -V >> $psfile2\n"; } # plot sources if ($ievent_one) { - print CSH "awk '\$1 == \"S\" {print \$2,\$3}' $rec_file | psxy $src0 -N $J1 $R -K -O -V >> $psfile2\n"; + print CSH "awk '\$1 == \"S\" {print \$2,\$3}' $rec_file | psxy $src0 -N $J1 $R -K -O -V >> $psfile2\n"; } if ($ievent_all) { - print CSH "awk '{print \$1,\$2}' $evefile | psxy $src -N $J1 $R -K -O -V >> $psfile2\n"; + print CSH "awk '{print \$1,\$2}' $evefile | psxy $src -N $J1 $R -K -O -V >> $psfile2\n"; } # plot label @@ -586,37 +586,37 @@ # colorscale bars if ($k==6) { - print CSH "psscale -C$cptfile1 $Dscale1 $Bscale1 -K -O -V >> $psfile2\n"; + print CSH "psscale -C$cptfile1 $Dscale1 $Bscale1 -K -O -V >> $psfile2\n"; } if ($k==7) { - print CSH "psscale -C$cptfile1 $Dscale1 $Bscale2 -K -O -V >> $psfile2\n"; + print CSH "psscale -C$cptfile1 $Dscale1 $Bscale2 -K -O -V >> $psfile2\n"; } if ($k==8) { - print CSH "psscale -C$cptfile1 $Dscale1 $Bscale3 -K -O -V >> $psfile2\n"; + print CSH "psscale -C$cptfile1 $Dscale1 $Bscale3 -K -O -V >> $psfile2\n"; } # plot title and GMT header if ($k==8) { - $plot_title = "Models $stmodp, $stmodt, $stmod (run_${stirun})"; - $Utag = "-U/0/0.25/$plabel"; - $shift = "-Xa-4.5 -Ya7"; - print CSH "pstext -N $J1 $R $Utag -O -V $shift >>$psfile2<>$psfile2< m/s c_glob(:) = 1000.*c_glob(:) c0 = c0*1000. c_glob_syn(:) = c0 ! c-maps for synthetics - elseif(IMODEL==2) then ! checkerboard + else if(IMODEL==2) then ! checkerboard c0 = 3500. ! reference phase velocity (m/s) (should be obtained based on hdur) !Nfac = 3 ! scalelength of map = N * (wavelength of surface waves for hdur) @@ -472,7 +472,7 @@ program wave2d c_glob_syn(:) = c0 ! c-maps for synthetics - elseif(IMODEL==3) then ! read c-map for synthetics and data for a 'middle' iteration + else if(IMODEL==3) then ! read c-map for synthetics and data for a 'middle' iteration ! read in phase velocity map for data open(unit=16,file=trim(model_dir)//'socal_vel_dat.dat', status='unknown') @@ -490,14 +490,14 @@ program wave2d !!$ close(16) ! compute c0 by finding the average of the phase velocity map - c0 = 0. + c0 = 0. do iglob = 1,NGLOB c0 = c0 + c_glob(iglob) * da(iglob) enddo c0 = c0 / (LENGTH * HEIGHT) c_glob_syn(:) = c0 - + else stop 'IMODEL must be 0,1,2,3' endif @@ -685,7 +685,7 @@ program wave2d !do ievent=1,nevent ! print *, x_eve_lon_dat(ievent),z_eve_lat_dat(ievent) !enddo - + !stop 'testing' !-------------------------------------- @@ -699,9 +699,9 @@ program wave2d if(PERT_SOURCE == 1) then ! source perturbations - if(1==1) then ! read in perturbed events from another file + if(1==1) then ! read in perturbed events from another file - open(19,file='/home/store2/carltape/'//trim(out_dir3)//'run_2550/events_xy.dat',status='unknown') + open(19,file='/home/store2/carltape/'//trim(out_dir3)//'run_2550/events_xy.dat',status='unknown') do ievent = 1,25 read(19,'(3f20.10,1i12)') x_eve(ievent), z_eve(ievent), otime(ievent), itemp1 enddo @@ -723,7 +723,7 @@ program wave2d ! origin time perturbation call random_number(rand1) ptime = (ptmax - ptmin)*rand1 + ptmin - !ptime = src_pert_time + !ptime = src_pert_time ! azimuthal perturbation (in radians) call random_number(rand1) @@ -733,7 +733,7 @@ program wave2d ! radial perturbation (in meters) call random_number(rand1) prad = (rmax - rmin)*rand1 + rmin - !prad = rmax + !prad = rmax ! fill vectors otime(ievent) = otime_dat(ievent) - ptime ! NOTE THE SIGN @@ -778,11 +778,11 @@ program wave2d eglob(:) = eglob_dat(:) x_eve(:) = x_eve_dat(:) z_eve(:) = z_eve_dat(:) - x_eve_lon(:) = x_eve_lon_dat(:) + x_eve_lon(:) = x_eve_lon_dat(:) z_eve_lat(:) = z_eve_lat_dat(:) ispec_eve(:) = ispec_eve_dat(:) xi_eve(:) = xi_eve_dat(:) - gamma_eve(:) = gamma_eve_dat(:) + gamma_eve(:) = gamma_eve_dat(:) otime(:) = otime_dat(:) ! origin time @@ -833,7 +833,7 @@ program wave2d nrec = 3 -elseif(IREC_SPACE==2) then ! actual station locations +else if(IREC_SPACE==2) then ! actual station locations ! read in (target) receivers recfile = trim(in_dir)//'STATION_149_full' @@ -845,7 +845,7 @@ program wave2d read(88,*) (x_rec_lon0(i),z_rec_lat0(i),i=1,nrec) close(88) -elseif(IREC_SPACE==4) then ! 'regular' mesh of receivers +else if(IREC_SPACE==4) then ! 'regular' mesh of receivers ! calculate mesh spacing dx = LENGTH/NMESH_REC @@ -1195,7 +1195,7 @@ program wave2d if(INV_SOURCE==1) print *, ' inverting for source parameters' print *,'==============================================================' -!enddo +!enddo !stop 'itesting' !do istep = 0,2*NITERATION @@ -1217,7 +1217,7 @@ program wave2d !m_vel(:) = m0_vel(:) !m_src(:) = m0_src(:) - elseif(itest==1) then + else if(itest==1) then c_glob_syn(:) = mt_vec(1:nmod_str) m_src(:) = mt_vec(nmod_str+1:nmod) @@ -1247,7 +1247,7 @@ program wave2d ! do ievent = ievent_min, ievent_max do ievent = 5,5 ! 1,5 !============================================ - + print *,'------------------------------------' print *,' EVENT NUMBER ',ievent print *,'------------------------------------' @@ -1288,7 +1288,7 @@ program wave2d z_src_lat0(1) = z_eve_lat(ievent) nsrc = 1 - elseif (ISRC_SPACE==2) then ! finite source segment + else if (ISRC_SPACE==2) then ! finite source segment ! specify the target starting point of the fault, the azimuth, and the length x_src_lon_i = -119. ; z_src_lat_i = 33. ; flen = 100.0d+03 ! short fault @@ -1316,19 +1316,19 @@ program wave2d ! get target fault points in lat-lon call mesh_geo(MAX_SR,x_src_lon0,z_src_lat0,x_src0,z_src0,UTM_PROJECTION_ZONE,IUTM2LONGLAT) - elseif (ISRC_SPACE==3) then ! California continental shelf (OMS) + else if (ISRC_SPACE==3) then ! California continental shelf (OMS) x_src_lon0(1:nshelf) = shelf_lon(1:nshelf) z_src_lat0(1:nshelf) = shelf_lat(1:nshelf) - nsrc = nshelf + nsrc = nshelf - elseif (ISRC_SPACE==4) then ! California coastline (OMS) + else if (ISRC_SPACE==4) then ! California coastline (OMS) x_src_lon0(1:ncoast) = coast_lon(1:ncoast) z_src_lat0(1:ncoast) = coast_lat(1:ncoast) nsrc = ncoast - elseif (ISRC_SPACE==5) then ! finite circular region + else if (ISRC_SPACE==5) then ! finite circular region ! lat-lon of the center point xcen_lon = -119.0 @@ -1492,7 +1492,7 @@ program wave2d !!$ !origin_time = origin_time_dat ! testing !!$ !!$ endif - + !!$ ! write model vector to file !!$ open(unit=19,file=trim(out_dir1)//'test.dat',status='unknown') !!$ do i = 1,nmod @@ -1574,7 +1574,7 @@ program wave2d ! source magnitude (same for data and synthetics) if(NCOMP==3) then f0(1) = 0.0 ; f0(2) = FNORM ; f0(3) = 0.0 - elseif(NCOMP==1) then + else if(NCOMP==1) then f0(1) = FNORM else stop 'NCOMP must be 1 or 3' @@ -1582,12 +1582,12 @@ program wave2d ! source time function for DATA stf_dat(:) = 0. - call get_source_time_function(origin_time_dat,stf_dat,ti) + call get_source_time_function(origin_time_dat,stf_dat,ti) !call get_source_time_function(nsrc,origin_time_dat,f0,samp_dat,ti) ! source function for data allocate(samp_dat(NSTEP,NCOMP,nsrc)) - samp_dat(:,:,:) = 0.0 + samp_dat(:,:,:) = 0.0 do i = 1,nsrc do icomp = 1,NCOMP samp_dat(:, icomp, i) = stf_dat(:) * f0(icomp) @@ -1596,12 +1596,12 @@ program wave2d ! source time function for SYNTHETICS (allows for origin time perturbation) stf(:) = 0. - call get_source_time_function(origin_time,stf,ti) + call get_source_time_function(origin_time,stf,ti) !call get_source_time_function(nsrc,origin_time,f0,samp,ti) ! source function for synthetics allocate(samp(NSTEP,NCOMP,nsrc)) - samp(:,:,:) = 0.0 + samp(:,:,:) = 0.0 do i = 1,nsrc do icomp = 1,NCOMP samp(:, icomp, i) = stf(:) * f0(icomp) @@ -1640,9 +1640,9 @@ program wave2d !!$ ti(itime) = dble(itime-1)*DT !!$ stf = source_time_function(ti(itime)-tshift, hdur, istf) ! note time shift (constants) !!$ do i = 1, nsrc -!!$ samp(itime, :, i) = stf * f0(:) +!!$ samp(itime, :, i) = stf * f0(:) !!$ enddo -!!$ enddo +!!$ enddo !-------------------------------------- ! testing filter routines @@ -1659,7 +1659,7 @@ program wave2d !!$stop !-------------------------------------- - + ! write source and receivers to file ! NOTE THAT THE RECEIVER LABELING IS SIMPLY NUMERICAL ORDER (FOR NOW) !write(filename,'(a,i3.3,a)') trim(out_dir)//'sr_e',ievent,'.txt' @@ -1718,7 +1718,7 @@ program wave2d enddo close(18) - ! write source vectors to file (data is always the same) + ! write source vectors to file (data is always the same) open(unit=19,file=trim(out_dir1)//'socal_src_dat.dat',status='unknown') do i = 1,nevent write(19,'(i8,3f20.12)') i, m_src_dat((i-1)*3 + 1)/1000., & @@ -1775,7 +1775,7 @@ program wave2d !========================= ! SYNTHETICS (forward wavefield) - + if(WRITE_STF_F) call write_seismogram(samp, nsrc, trim(out_dir)//'stffor_syn') !stop 'testing' @@ -1852,7 +1852,7 @@ program wave2d !!$ open(19,file=filename1,status='unknown') !!$ if(IKER <= 4) write(19,'(7a,f12.6)') trim(script_dir)//trim(filename2),' ', & !!$ trim(out_dir),' ', trim(data_tag) ,' ','1', tshift -!!$ write(19,'(7a,f12.6)') trim(script_dir)//trim(filename2),' ', & +!!$ write(19,'(7a,f12.6)') trim(script_dir)//trim(filename2),' ', & !!$ trim(out_dir),' ', trim(syn_tag) ,' ','1', tshift !!$ if(WRITE_STF_A) write(19,'(7a,f12.6)') trim(script_dir)//trim(filename2),' ', & !!$ trim(out_dir),' ', trim(stfadj_tag),' ','1', tshift @@ -1922,7 +1922,7 @@ program wave2d nrec, rglob, ispec_rec, hxir_store, hgammar_store, adj_syn, & trim(last_frame_name), absorb_field, & rho_kernel, mu_kernel, kappa_kernel, three_source_model, stf, f0) - + !call write_seismogram(three_source_model(:,:,:,1), nsrc, trim(out_dir)//'pert_src_m01') !call write_seismogram(three_source_model(:,:,:,2), nsrc, trim(out_dir)//'pert_src_m02') !call write_seismogram(three_source_model(:,:,:,3), nsrc, trim(out_dir)//'pert_src_m03') @@ -1932,7 +1932,7 @@ program wave2d !call write_seismogram(three_source_model(:,:,:,6), nsrc, trim(out_dir)//'pert_src_m06') !call write_seismogram(three_source_model(:,:,:,7), nsrc, trim(out_dir)//'pert_src_m07') !call write_seismogram(three_source_model(:,:,:,8), nsrc, trim(out_dir)//'pert_src_m08') - + print * print *, ' to make the gradient for the source (unscaled)' print *, DT*sum(three_source_model(:,1,1,1)) @@ -2050,7 +2050,7 @@ program wave2d ! Gaussian half-width controlling the smoothing (m) !dtrsh2 = (3.*sigma)**2 ! all points outside d^2 are set to zero - dtrsh2 = (9./8.)*gamma**2 + dtrsh2 = (9./8.)*gamma**2 ! EXAMPLE gaussian smoothing function for one point ! find the closest gridpoint to the target point @@ -2094,7 +2094,7 @@ program wave2d !!$ k_temp(:,:,:) = 0. !!$ do ispec = 1,NSPEC !!$ do j = 1,NGLLZ -!!$ do i = 1,NGLLX +!!$ do i = 1,NGLLX !!$ itemp = ibool(i,j,ispec) !!$ k_temp(i,j,ispec) = k_rough_global(itemp) * k_gaus_global(itemp) * wxgll(i)*wzgll(j)*jacobian(i,j,ispec) !!$ enddo @@ -2107,7 +2107,7 @@ program wave2d k_temp(:,:,:) = 0. do ispec = 1,NSPEC do j = 1,NGLLZ - do i = 1,NGLLX + do i = 1,NGLLX itemp = ibool(i,j,ispec) k_temp(i,j,ispec) = k_gaus_global(itemp) * wxgll(i)*wzgll(j)*jacobian(i,j,ispec) enddo @@ -2120,7 +2120,7 @@ program wave2d k_temp(:,:,:) = 0. do ispec = 1,NSPEC do j = 1,NGLLZ - do i = 1,NGLLX + do i = 1,NGLLX itemp = ibool(i,j,ispec) k_temp(i,j,ispec) = k_rough_global(itemp) * k_gaus_global(itemp) * wxgll(i)*wzgll(j)*jacobian(i,j,ispec) enddo @@ -2196,7 +2196,7 @@ program wave2d endif endif ! itest==0 .or. POLY_ORDER==3 - + !==================== ! update search direction and model @@ -2242,7 +2242,7 @@ program wave2d !istep_switch = 6 !if(istep < istep_switch) lam_t_val = -2.*chi_k_val / dot_product(gk, pk) ! quadratic extrapolation !if(istep >= istep_switch) lam_t_val = -chi_k_val / dot_product(gk, pk) ! linear extrapolation - lam_t_val = -2.*chi_k_val / dot_product(gk, pk) + lam_t_val = -2.*chi_k_val / dot_product(gk, pk) mt(:) = m0(:) + lam_t_val * pk(:) !mt(:) = m0(:) + lam_t_val * pk(:) / da(:) ! structure only (g = K da) itest = 1 @@ -2253,13 +2253,13 @@ program wave2d ! get the new (test) structure model in terms of fractional perturbation if(INV_STRUCT == 0) then mt_vec(i) = c_glob_syn(i) ! use same structure always - + else !mt_vec(i) = c0 * (1. + mt(i)) !mt_vec(i) = c0 * (1. + mt(i)/ da(i) ) mt_vec(i) = c0 * (1. + mt(i)/sqrt(da(i))*m_scale_str ) ! old version endif - + else ! source ! get the new source model in terms of (xs, zs, t0) if(INV_SOURCE == 0) then @@ -2267,7 +2267,7 @@ program wave2d mt_vec(i) = m_src_syn(i - nmod_str) else - !mt_vec(i) = m0_vec(i) + mt(i) + !mt_vec(i) = m0_vec(i) + mt(i) !mt_vec(i) = m0_vec(i) + mt(i)*m_scale_src(i - nmod_str) !mt_vec(i) = m_src_syn(i - nmod_str) * (1. + mt(i)) @@ -2284,7 +2284,7 @@ program wave2d g0(:) = gk(:) p0(:) = pk(:) - elseif(itest==1) then ! if present kernel is for a test model + else if(itest==1) then ! if present kernel is for a test model chi_t_val = chi_val @@ -2317,7 +2317,7 @@ program wave2d qfac = Pb**2 - 3.*Pa*Pc; if(Pa /= 0 .and. qfac >= 0) then xmin = (-Pb + sqrt(qfac)) / (3.*Pa) - elseif(Pa == 0 .and. Pb /= 0) then + else if(Pa == 0 .and. Pb /= 0) then xmin = -Pc/(2.*Pb) else stop 'check the input polynomial' @@ -2363,13 +2363,13 @@ program wave2d ! get the new structure model in terms of fractional perturbation if(INV_STRUCT == 0) then m0_vec(i) = c_glob_syn(i) ! use same structure always - + else !m0_vec(i) = c0 * (1. + m0(i)) !m0_vec(i) = c0 * (1. + m0(i)/ da(i) ) m0_vec(i) = c0 * (1. + m0(i)/sqrt(da(i))*m_scale_str ) ! old version endif - + else ! source ! get the new source model in terms of (xs, zs, t0) if(INV_SOURCE == 0) then @@ -2387,7 +2387,7 @@ program wave2d endif enddo - + print *, 'lam_0_val = ', sngl(lam_0_val) endif @@ -2523,4 +2523,4 @@ program wave2d enddo ! do iq end program wave2d - + diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/gji_paper/codes_18_06Aug2006/wave2d_cmap.f90 b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/gji_paper/codes_18_06Aug2006/wave2d_cmap.f90 index 03587fa9b..bf046d942 100644 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/gji_paper/codes_18_06Aug2006/wave2d_cmap.f90 +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/gji_paper/codes_18_06Aug2006/wave2d_cmap.f90 @@ -55,7 +55,7 @@ program wave2d_cmap integer :: isolver, irun0, irun, idat, iopt, ispec, istep !********* PROGRAM STARTS HERE ********************* - + irun0 = 420 !out_dir2 = "OUTPUT/" @@ -85,7 +85,7 @@ program wave2d_cmap da(:) = 0. do ispec = 1,NSPEC do j = 1,NGLLZ - do i = 1,NGLLX + do i = 1,NGLLX iglob = ibool(i,j,ispec) da(iglob) = da(iglob) + wxgll(i)*wzgll(j)*jacobian(i,j,ispec) enddo @@ -173,7 +173,7 @@ program wave2d_cmap ! convert global gridpoint mesh coordinates to lat-lon x_lon(:) = 0. - z_lat(:) = 0. + z_lat(:) = 0. call mesh_geo(NGLOB,x_lon,z_lat,x,z,UTM_PROJECTION_ZONE,IMESH2LONLAT) !write(*,'(2f16.6)') (x_lon(iglob), z_lat(iglob), iglob=1,NGLOB) @@ -211,7 +211,7 @@ program wave2d_cmap open(unit=17,file=filename,status='unknown') read(17,*) c0 close(17) - + ! convert km/s --> m/s c_glob(:) = 1000.*c_glob(:) c0 = c0*1000. @@ -266,7 +266,7 @@ program wave2d_cmap k_temp(:,:,:) = 0. do ispec = 1,NSPEC do j = 1,NGLLZ - do i = 1,NGLLX + do i = 1,NGLLX itemp = ibool(i,j,ispec) k_temp(i,j,ispec) = k_gaus_global(itemp) * wxgll(i)*wzgll(j)*jacobian(i,j,ispec) enddo @@ -279,7 +279,7 @@ program wave2d_cmap k_temp(:,:,:) = 0. do ispec = 1,NSPEC do j = 1,NGLLZ - do i = 1,NGLLX + do i = 1,NGLLX itemp = ibool(i,j,ispec) k_temp(i,j,ispec) = k_rough_global(itemp) * k_gaus_global(itemp) * wxgll(i)*wzgll(j)*jacobian(i,j,ispec) enddo @@ -293,7 +293,7 @@ program wave2d_cmap enddo !============================================ - + !k_smooth_global(:) = c_glob(:) ! c-maps for data @@ -365,4 +365,4 @@ program wave2d_cmap !deallocate(x,z,x_lon,z_lat,c_glob,c_glob_syn,c_glob_dat) end program wave2d_cmap - + diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/gji_paper/codes_18_06Aug2006/wave2d_constants.f90 b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/gji_paper/codes_18_06Aug2006/wave2d_constants.f90 index f273a2851..df3824be9 100644 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/gji_paper/codes_18_06Aug2006/wave2d_constants.f90 +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/gji_paper/codes_18_06Aug2006/wave2d_constants.f90 @@ -37,7 +37,7 @@ module wave2d_constants ! STATION_COAST_BUFFER : exclude stations within this distance from edge of coast integer, parameter :: IREC_SPACE = 2 ! see wave2d.f90 integer, parameter :: NMESH_REC = 10 - double precision, parameter :: SOURCE_GRID_BUFFER = 4.0d+03 ! m + double precision, parameter :: SOURCE_GRID_BUFFER = 4.0d+03 ! m double precision, parameter :: STATION_GRID_BUFFER = 15.0d+03 ! m double precision, parameter :: STATION_COAST_BUFFER = 0.0d+03 ! m @@ -85,13 +85,13 @@ module wave2d_constants logical, parameter :: WRITE_SPECTRAL_MAP_F = .false. logical, parameter :: WRITE_STF_A = .false. - logical, parameter :: WRITE_SEISMO_A = .false. - logical, parameter :: WRITE_SPECTRA_A = .false. + logical, parameter :: WRITE_SEISMO_A = .false. + logical, parameter :: WRITE_SPECTRA_A = .false. logical, parameter :: WRITE_SPECTRAL_MAP_A = .false. logical, parameter :: WRITE_KERNELS = .false. ! kernel snapshots logical, parameter :: WRITE_SNAPSHOTS = .false. ! wavefield snapshots - + ! MODEL (S.I. units) double precision, parameter :: DENSITY = 2.6d+03 ! kg/m^3 @@ -101,7 +101,7 @@ module wave2d_constants !--------------------------------------------------------------- ! CHT: do not change these -! UTM zone for Southern California region +! UTM zone for Southern California region ! integer, parameter :: UTM_PROJECTION_ZONE = 11 ! to suppress UTM projection for SCEC benchmarks @@ -154,7 +154,7 @@ module wave2d_constants ! number of nodes for 2D and 3D shape functions for hexahedra ! we use 8-node mesh bricks, which are more stable than 27-node elements integer, parameter :: NGNOD = 8, NGNOD2D = 4 - + ! number of iterations to solve the system for xi and eta integer, parameter :: NUM_ITER = 1 diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/gji_paper/codes_18_06Aug2006/wave2d_define_der_matrices.f90 b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/gji_paper/codes_18_06Aug2006/wave2d_define_der_matrices.f90 index 2ff76f225..6612f78d9 100644 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/gji_paper/codes_18_06Aug2006/wave2d_define_der_matrices.f90 +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/gji_paper/codes_18_06Aug2006/wave2d_define_der_matrices.f90 @@ -7,7 +7,7 @@ module wave2d_define_der_matrices subroutine define_derivative_matrices(xigll,zigll,wxgll,wzgll,hprime_xx,hprime_zz,wgllwgll_xz) implicit none - + ! Gauss-Lobatto-Legendre points of integration double precision, dimension(NGLLX) :: xigll double precision, dimension(NGLLZ) :: zigll diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/gji_paper/codes_18_06Aug2006/wave2d_solver.f90 b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/gji_paper/codes_18_06Aug2006/wave2d_solver.f90 index 6d9d1aab1..f63b8cef3 100644 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/gji_paper/codes_18_06Aug2006/wave2d_solver.f90 +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/gji_paper/codes_18_06Aug2006/wave2d_solver.f90 @@ -33,7 +33,7 @@ subroutine mesher ! loop over GLL points to calculate jacobian, and set up numbering ! ! jacobian = | dx/dxi dx/dgamma | = (z2-z1)*(x2-x1)/4 as dx/dgamma=dz/dxi = 0 - ! | dz/dxi dz/dgamma | + ! | dz/dxi dz/dgamma | ! do j = 1,NGLLZ do i = 1,NGLLX @@ -43,16 +43,16 @@ subroutine mesher dxidz(i,j,ispec) = 0. dgammadx(i,j,ispec) = 0. dgammadz(i,j,ispec) = 2. / (z2(ispec)-z1(ispec)) - jacobian(i,j,ispec) = (z2(ispec)-z1(ispec))*(x2(ispec)-x1(ispec)) / 4. + jacobian(i,j,ispec) = (z2(ispec)-z1(ispec))*(x2(ispec)-x1(ispec)) / 4. ! set up local to global numbering - if ( (i.eq.1).and.(ix.gt.1) ) then + if ( (i==1).and.(ix>1) ) then ibool(i,j,ispec) = ibool(NGLLX,j,ispec-1) - else if ( (j.eq.1).and.(iz.gt.1) ) then + else if ( (j==1).and.(iz>1) ) then ibool(i,j,ispec) = ibool(i,NGLLZ,ispec-NEX) else iglob = iglob + 1 - ibool(i,j,ispec) = iglob + ibool(i,j,ispec) = iglob endif ! get the global gridpoints @@ -61,42 +61,42 @@ subroutine mesher z(iglob1) = 0.5*(1.-zigll(j))*z1(ispec)+0.5*(1.+zigll(j))*z2(ispec) ! end loop over GLL points - end do - end do + enddo + enddo ! if boundary element ! 1,2,3,4 --> left, right, bottom, top - if (ix.eq.1) then ! left boundary + if (ix==1) then ! left boundary nspecb(1) = nspecb(1) + 1 ibelm(1,nspecb(1)) = ispec do j = 1,NGLLZ jacobianb(1,j,nspecb(1))= (z2(ispec)-z1(ispec))/2. - end do + enddo endif - if (ix.eq.NEX) then ! right boundary + if (ix==NEX) then ! right boundary nspecb(2) = nspecb(2) + 1 ibelm(2,nspecb(2)) = ispec do j = 1,NGLLZ jacobianb(2,j,nspecb(2))= (z2(ispec)-z1(ispec))/2. - end do + enddo endif - if (iz.eq.1) then ! bottom boundary + if (iz==1) then ! bottom boundary nspecb(3) = nspecb(3) + 1 ibelm(3,nspecb(3)) = ispec do i = 1,NGLLX jacobianb(3,i,nspecb(3))= (x2(ispec)-x1(ispec))/2. - end do + enddo endif - if (iz.eq.NEZ) then ! top boundary + if (iz==NEZ) then ! top boundary nspecb(4) = nspecb(4) + 1 ibelm(4,nspecb(4)) = ispec do i = 1,NGLLX jacobianb(4,i,nspecb(4))= (x2(ispec)-x1(ispec))/2. - end do + enddo endif ! end loop over elements - end do - end do + enddo + enddo !!$ do ibb=1,4 !!$ print *, ibb, nspecb(ibb) @@ -119,7 +119,7 @@ subroutine mesher print *,'space step (km):', sngl(dh/1000.) print *,'time step estimate from courant = 0.2: ',sngl(time_step),' seconds' print *,' actual time step: ',sngl(DT),' seconds' - + end subroutine mesher !------------------------------------------------------- @@ -145,14 +145,14 @@ subroutine set_model_property() ! fill local arrays from global vectors do ispec = 1,NSPEC do j = 1,NGLLZ - do i = 1,NGLLX + do i = 1,NGLLX iglob = ibool(i,j,ispec) rho(i,j,ispec) = rho_global(iglob) kappa(i,j,ispec) = kappa_global(iglob) mu(i,j,ispec) = mu_global(iglob) - end do - end do - end do + enddo + enddo + enddo !!$ ! properties !!$ do ispec = 1,NSPEC @@ -171,9 +171,9 @@ subroutine set_model_property() !!$ kappa(i,j,ispec) = 1.3d+11 !!$ mu(i,j,ispec) = 6.8d+10 !!$ endif -!!$ end do -!!$ end do -!!$ end do +!!$ enddo +!!$ enddo +!!$ enddo !!$ ! create vectors from the arrays !!$ do ispec = 1,NSPEC @@ -251,7 +251,7 @@ subroutine solver(solver_type, nsrc, sglob, ispec_src, hxis_store, hgammas_store if (solver_type == 1) then if (present(last_frame) .and. present(absorbfield)) save_forward = .true. endif - + if (solver_type == 3) then if (.not. (present(last_frame) .and. present(absorbfield) & .and. present(rhop_kernel) .and. present(beta_kernel) .and. present(alpha_kernel))) & @@ -276,8 +276,8 @@ subroutine solver(solver_type, nsrc, sglob, ispec_src, hxis_store, hgammas_store samp(:,:,:) = 0. endif - - ! gridpoints per wavelength estimation + + ! gridpoints per wavelength estimation print * print *, 'space step (km):', sngl(dh/1000.) if(ISURFACE) then @@ -293,7 +293,7 @@ subroutine solver(solver_type, nsrc, sglob, ispec_src, hxis_store, hgammas_store c = sqrt(RIGIDITY/DENSITY) print *, 'number of gridpoints per wavelength for S:', floor(hdur*c/dh) endif - + NINT = NSTEP/NSAVE if (NINT * NSAVE > NSTEP) stop 'NSTEP should equal to NINT * NSAVE' @@ -306,9 +306,9 @@ subroutine solver(solver_type, nsrc, sglob, ispec_src, hxis_store, hgammas_store mass_local = wxgll(i)*wzgll(j)*rho(i,j,ispec)*jacobian(i,j,ispec) iglob = ibool(i,j,ispec) mass_global(iglob) = mass_global(iglob) + mass_local - end do - end do - end do + enddo + enddo + enddo ! time marching parameters deltat = DT @@ -330,11 +330,11 @@ subroutine solver(solver_type, nsrc, sglob, ispec_src, hxis_store, hgammas_store open(11,file = trim(last_frame),status='old',iostat=ios) if (ios /= 0) stop 'Error reading the last frame' do i = 1, NGLOB - !read(11,*) b_displ(1,i), b_displ(2,i), b_displ(3,i), & + !read(11,*) b_displ(1,i), b_displ(2,i), b_displ(3,i), & ! b_veloc(1,i), b_veloc(2,i), b_veloc(3,i), & ! b_accel(1,i), b_accel(2,i), b_accel(3,i) read(11,fm) (b_displ(j,i), j = 1,NCOMP), & - (b_veloc(j,i), j = 1,NCOMP), & + (b_veloc(j,i), j = 1,NCOMP), & (b_accel(j,i), j = 1,NCOMP) enddo close(11) @@ -366,7 +366,7 @@ subroutine solver(solver_type, nsrc, sglob, ispec_src, hxis_store, hgammas_store ! do ispec = 1,NSPEC - ! first double loop over GLL + ! first double loop over GLL ! compute and store gradients do j = 1,NGLLZ do i = 1,NGLLX @@ -383,7 +383,7 @@ subroutine solver(solver_type, nsrc, sglob, ispec_src, hxis_store, hgammas_store if (solver_type == 3) then b_tempy1l = b_tempy1l + b_displ(1,iglob)*hp1 endif - end do + enddo ! derivative along z tempy2l = 0. @@ -395,7 +395,7 @@ subroutine solver(solver_type, nsrc, sglob, ispec_src, hxis_store, hgammas_store if (solver_type == 3) then b_tempy2l = b_tempy2l + b_displ(1,iglob)*hp2 endif - end do + enddo ! from mesher dxidxl = dxidx(i,j,ispec) @@ -406,7 +406,7 @@ subroutine solver(solver_type, nsrc, sglob, ispec_src, hxis_store, hgammas_store ! spatial gradients dsydxl = tempy1l*dxidxl + tempy2l*dgammadxl dsydzl = tempy1l*dxidzl + tempy2l*dgammadzl - + ! save spatial gradient for (point) source perturbations if(solver_type == 3 .and. ispec == ispec_src(1)) then displ_grad(i,j,1) = dsydxl @@ -434,7 +434,7 @@ subroutine solver(solver_type, nsrc, sglob, ispec_src, hxis_store, hgammas_store !mu_k(iglob2) = sum(ds * b_ds) - ONE_THIRD * kappa_k(iglob2) ! (12-July-2006) mu_k(iglob2) = sum(ds * b_ds) endif - + mul = mu(i,j,ispec) ! model heterogeneity sigma_xy = mul*dsydxl sigma_zy = mul*dsydzl @@ -472,7 +472,7 @@ subroutine solver(solver_type, nsrc, sglob, ispec_src, hxis_store, hgammas_store if (solver_type == 3) then b_tempy1l = b_tempy1l + b_tempy1(k,j)*fac1 endif - end do + enddo ! along z direction tempy2l = 0. @@ -483,7 +483,7 @@ subroutine solver(solver_type, nsrc, sglob, ispec_src, hxis_store, hgammas_store if (solver_type == 3) then b_tempy2l = b_tempy2l + b_tempy2(i,k)*fac2 endif - end do + enddo fac1 = wzgll(j) fac2 = wxgll(i) @@ -494,10 +494,10 @@ subroutine solver(solver_type, nsrc, sglob, ispec_src, hxis_store, hgammas_store b_accel(1,iglob) = b_accel(1,iglob) - (fac1* b_tempy1l + fac2* b_tempy2l) endif - end do ! second loop over the GLL points - end do + enddo ! second loop over the GLL points + enddo - end do ! end loop over all spectral elements + enddo ! end loop over all spectral elements ! ! boundary conditions @@ -511,11 +511,11 @@ subroutine solver(solver_type, nsrc, sglob, ispec_src, hxis_store, hgammas_store do ibb = 1,NABSORB ! index of grid boundary if(ibb == 1) then i = 1 - elseif(ibb == 2) then + else if(ibb == 2) then i = NGLLX - elseif(ibb == 3) then + else if(ibb == 3) then i = 1 - elseif(ibb == 4) then + else if(ibb == 4) then i = NGLLZ endif @@ -525,9 +525,9 @@ subroutine solver(solver_type, nsrc, sglob, ispec_src, hxis_store, hgammas_store if (ibb == 1 .or. ibb == 2) then ! left or right boundary element j1 = 1; j2 = NGLLZ else if (ib == 1) then ! top left corner element - j1 = 2; j2 = NGLLX + j1 = 2; j2 = NGLLX else if (ib == nspecb(ibb)) then ! top right corner element - j1 = 1; j2 = NGLLX-1 + j1 = 1; j2 = NGLLX-1 else ! top or bottom boundary (excluding corner elements) j1 = 1; j2 = NGLLX endif @@ -548,8 +548,8 @@ subroutine solver(solver_type, nsrc, sglob, ispec_src, hxis_store, hgammas_store if (save_forward) then absorbfield(itime,1,j,ib,ibb) = ty*weight endif - end do - end do + enddo + enddo enddo else ! NCOMP==3 @@ -559,7 +559,7 @@ subroutine solver(solver_type, nsrc, sglob, ispec_src, hxis_store, hgammas_store ! do ispec = 1,NSPEC - ! first double loop over GLL + ! first double loop over GLL ! compute and store gradients do j = 1,NGLLZ do i = 1,NGLLX @@ -586,7 +586,7 @@ subroutine solver(solver_type, nsrc, sglob, ispec_src, hxis_store, hgammas_store b_tempy1l = b_tempy1l + b_displ(2,iglob)*hp1 b_tempz1l = b_tempz1l + b_displ(3,iglob)*hp1 endif - end do + enddo ! derivative along z tempx2l = 0. @@ -608,7 +608,7 @@ subroutine solver(solver_type, nsrc, sglob, ispec_src, hxis_store, hgammas_store b_tempy2l = b_tempy2l + b_displ(2,iglob)*hp2 b_tempz2l = b_tempz2l + b_displ(3,iglob)*hp2 endif - end do + enddo dxidxl = dxidx(i,j,ispec) dxidzl = dxidz(i,j,ispec) @@ -702,8 +702,8 @@ subroutine solver(solver_type, nsrc, sglob, ispec_src, hxis_store, hgammas_store b_tempz2(i,j) = jacobianl*(b_sigma_xz*dgammadxl+b_sigma_zz*dgammadzl) endif - end do - end do + enddo + enddo ! ! second double-loop over GLL ! compute all rhs terms @@ -730,7 +730,7 @@ subroutine solver(solver_type, nsrc, sglob, ispec_src, hxis_store, hgammas_store b_tempy1l = b_tempy1l + b_tempy1(k,j)*fac1 b_tempz1l = b_tempz1l + b_tempz1(k,j)*fac1 endif - end do + enddo ! along z direction tempx2l = 0. @@ -745,13 +745,13 @@ subroutine solver(solver_type, nsrc, sglob, ispec_src, hxis_store, hgammas_store fac2 = wzgll(k)*hprime_zz(j,k) tempx2l = tempx2l + tempx2(i,k)*fac2 tempy2l = tempy2l + tempy2(i,k)*fac2 - tempz2l = tempz2l + tempz2(i,k)*fac2 + tempz2l = tempz2l + tempz2(i,k)*fac2 if (solver_type == 3) then b_tempx2l = b_tempx2l + b_tempx2(i,k)*fac2 b_tempy2l = b_tempy2l + b_tempy2(i,k)*fac2 - b_tempz2l = b_tempz2l + b_tempz2(i,k)*fac2 + b_tempz2l = b_tempz2l + b_tempz2(i,k)*fac2 endif - end do + enddo fac1 = wzgll(j) fac2 = wxgll(i) @@ -768,10 +768,10 @@ subroutine solver(solver_type, nsrc, sglob, ispec_src, hxis_store, hgammas_store b_accel(3,iglob) = b_accel(3,iglob) - (fac1* b_tempz1l + fac2* b_tempz2l) endif - end do ! second loop over the GLL points - end do + enddo ! second loop over the GLL points + enddo - end do ! end loop over all spectral elements + enddo ! end loop over all spectral elements ! ! boundary conditions @@ -782,11 +782,11 @@ subroutine solver(solver_type, nsrc, sglob, ispec_src, hxis_store, hgammas_store do ibb = 1,NABSORB ! index of grid boundary (CHT) if (ibb == 1) then i = 1; nx = -1.; nz = 0. - elseif (ibb == 2) then + else if (ibb == 2) then i = NGLLX; nx = 1.; nz = 0. - elseif (ibb == 3) then + else if (ibb == 3) then i = 1; nx = 0.; nz = -1. - elseif (ibb == 4) then ! CHT + else if (ibb == 4) then ! CHT i = NGLLZ; nx = 0.; nz = 1. endif @@ -796,9 +796,9 @@ subroutine solver(solver_type, nsrc, sglob, ispec_src, hxis_store, hgammas_store if (ibb == 1 .or. ibb == 2) then ! left or right boundary element j1 = 1; j2 = NGLLZ else if (ib == 1) then ! top left corner element - j1 = 2; j2 = NGLLX + j1 = 2; j2 = NGLLX else if (ib == nspecb(ibb)) then ! top right corner element - j1 = 1; j2 = NGLLX-1 + j1 = 1; j2 = NGLLX-1 else ! top or bottom boundary (excluding corner elements) j1 = 1; j2 = NGLLX endif @@ -834,8 +834,8 @@ subroutine solver(solver_type, nsrc, sglob, ispec_src, hxis_store, hgammas_store absorbfield(itime,2,j,ib,ibb) = ty*weight absorbfield(itime,3,j,ib,ibb) = tz*weight endif - end do - end do + enddo + enddo enddo endif ! NCOMP @@ -845,22 +845,22 @@ subroutine solver(solver_type, nsrc, sglob, ispec_src, hxis_store, hgammas_store do ibb = 1,NABSORB ! CHT : add 4th boundary if (ibb == 1) then i = 1 - elseif (ibb == 2) then + else if (ibb == 2) then i = NGLLX - elseif (ibb == 3) then + else if (ibb == 3) then i = 1 - elseif (ibb == 4) then + else if (ibb == 4) then i = NGLLZ - end if + endif ! see comments above do ib = 1,nspecb(ibb) if (ibb == 1 .or. ibb == 2) then j1 = 1; j2 = NGLLZ - elseif (ib == 1) then - j1 = 2; j2 = NGLLX - elseif (ib == nspecb(ibb)) then - j1 = 1; j2 = NGLLX-1 + else if (ib == 1) then + j1 = 2; j2 = NGLLX + else if (ib == nspecb(ibb)) then + j1 = 1; j2 = NGLLX-1 else j1 = 1; j2 = NGLLX endif @@ -894,7 +894,7 @@ subroutine solver(solver_type, nsrc, sglob, ispec_src, hxis_store, hgammas_store ! take the value at the closest gridpoint -- OLD METHOD !iglob = sglob(isrc) - !accel(:,iglob) = accel(:,iglob) + samp(itime,:,isrc) + !accel(:,iglob) = accel(:,iglob) + samp(itime,:,isrc) enddo ! isrc @@ -910,9 +910,9 @@ subroutine solver(solver_type, nsrc, sglob, ispec_src, hxis_store, hgammas_store enddo enddo !iglob = rglob(irec) - !accel(:,iglob) = accel(:,iglob) + ramp(NSTEP-itime+1,:,irec) + !accel(:,iglob) = accel(:,iglob) + ramp(NSTEP-itime+1,:,irec) enddo - + ! forward wavefield, but computed in reverse if (solver_type == 3) then do isrc = 1,nsrc @@ -926,12 +926,12 @@ subroutine solver(solver_type, nsrc, sglob, ispec_src, hxis_store, hgammas_store enddo enddo !iglob = sglob(isrc) - !b_accel(:,iglob) = b_accel(:,iglob) + samp(NSTEP-itime+1,:,isrc) + !b_accel(:,iglob) = b_accel(:,iglob) + samp(NSTEP-itime+1,:,isrc) enddo endif endif - + ! above here, accel(:) are actually the RHS! ! divide by the mass matrix do i = 1,NGLOB @@ -982,7 +982,7 @@ subroutine solver(solver_type, nsrc, sglob, ispec_src, hxis_store, hgammas_store ! note that samp above is copied to stf_for ! we fill the record 'in reverse' so that the max arrival will coincide ! with the forward source time function pulse - elseif (solver_type==2 .or. solver_type==3) then + else if (solver_type==2 .or. solver_type==3) then do isrc = 1,nsrc temp1 = 0; temp2 = 0. ; temp3 = 0. @@ -1046,24 +1046,24 @@ subroutine solver(solver_type, nsrc, sglob, ispec_src, hxis_store, hgammas_store endif ! solver_type ! save last frame - if (mod(itime, NSAVE) == 0) then + if (mod(itime, NSAVE) == 0) then if (save_forward) then open(11,file = trim(last_frame),status='unknown',iostat=ios) if (ios /= 0) stop 'Error reading the last frame' do i = 1,NGLOB - write(11,fm) (sngl(displ(j,i)), j = 1,NCOMP), & + write(11,fm) (sngl(displ(j,i)), j = 1,NCOMP), & (sngl(veloc(j,i)), j = 1,NCOMP), & (sngl(accel(j,i)), j = 1,NCOMP) enddo close(11) endif - + ! ONE KERNEL: for basis function analysis ! take the integrated kernel at the FINAL TIME STEP if (solver_type == 3 .and. itime == NSTEP) then filename5 = trim(out_dir)//'kernel_basis' - open(unit = 13, file = trim(filename5), status = 'unknown',iostat=ios) + open(unit = 13, file = trim(filename5), status = 'unknown',iostat=ios) if (ios /= 0) stop 'Error writing snapshot to disk' do iglob = 1, NGLOB write(13,'(3e16.6)') x_lon(iglob), z_lat(iglob), sngl(beta_kernel(iglob)) @@ -1076,7 +1076,7 @@ subroutine solver(solver_type, nsrc, sglob, ispec_src, hxis_store, hgammas_store endif ! solver_type == 3 endif - + !stop 'testing' !=================================== @@ -1088,7 +1088,7 @@ subroutine solver(solver_type, nsrc, sglob, ispec_src, hxis_store, hgammas_store !if (mod(itime, NSAVE) == 0) then if (solver_type == 1) then write(filename1,'(a,i5.5)') trim(out_dir)//'forward_',tlab - elseif (solver_type == 2) then + else if (solver_type == 2) then write(filename1,'(a,i5.5)') trim(out_dir)//'adjoint_',tlab else write(filename1,'(a,i5.5)') trim(out_dir)//'adjoint_',tlab ! adjoint wavefield @@ -1107,7 +1107,7 @@ subroutine solver(solver_type, nsrc, sglob, ispec_src, hxis_store, hgammas_store if (ios /= 0) stop 'Error writing snapshot to disk' do iglob = 1, NGLOB xtemp = x_lon(iglob) ; ztemp = z_lat(iglob) - write(11,'(5e16.6)') sngl(xtemp), sngl(ztemp), (sngl(displ(j,iglob)),j=1,NCOMP) + write(11,'(5e16.6)') sngl(xtemp), sngl(ztemp), (sngl(displ(j,iglob)),j=1,NCOMP) enddo close(11) endif @@ -1118,7 +1118,7 @@ subroutine solver(solver_type, nsrc, sglob, ispec_src, hxis_store, hgammas_store if (ios /= 0) stop 'Error writing snapshot to disk' do iglob = 1, NGLOB xtemp = x_lon(iglob) ; ztemp = z_lat(iglob) - write(11,'(5e16.6)') sngl(xtemp), sngl(ztemp), (sngl(b_displ(j,iglob)),j=1,NCOMP) + write(11,'(5e16.6)') sngl(xtemp), sngl(ztemp), (sngl(b_displ(j,iglob)),j=1,NCOMP) enddo close(11) open(unit = 11, file = trim(filename3), status = 'unknown',iostat=ios) diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/gji_paper/codes_18_06Aug2006/wave2d_sub.f90 b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/gji_paper/codes_18_06Aug2006/wave2d_sub.f90 index cdbdefa19..c498a63bc 100644 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/gji_paper/codes_18_06Aug2006/wave2d_sub.f90 +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/gji_paper/codes_18_06Aug2006/wave2d_sub.f90 @@ -7,7 +7,7 @@ module wave2d_sub contains - !----------------------------------------------------- + !----------------------------------------------------- subroutine write_parameters(filename) @@ -16,14 +16,14 @@ subroutine write_parameters(filename) print *, 'writing out parameters' open(unit=12, file=filename, status='unknown', iostat=ios) - + write(12,*) 'hey you' close(12) end subroutine write_parameters - !----------------------------------------------------- + !----------------------------------------------------- !!$ subroutine get_source_function(nsrc,origin_time,f0,samp,ti) !!$ @@ -50,7 +50,7 @@ end subroutine write_parameters !!$ !!$ end subroutine get_source_function - !----------------------------------------------------- + !----------------------------------------------------- subroutine get_source_time_function(origin_time,stf_vec,ti) @@ -87,10 +87,10 @@ subroutine get_source_time_function(origin_time,stf_vec,ti) if(ISRC_TIME==1) then ! Ricker amp = -2.*(alpha**3)/dsqrt(PI) - elseif(ISRC_TIME==2) then ! Gaussian + else if(ISRC_TIME==2) then ! Gaussian amp = alpha/dsqrt(PI) - elseif(ISRC_TIME==3) then ! truncated sine + else if(ISRC_TIME==3) then ! truncated sine cyc = 3 per = 2.*hdur !t1 = -0.50*per @@ -98,11 +98,11 @@ subroutine get_source_time_function(origin_time,stf_vec,ti) t2 = t1 + per*dble(cyc) amp = alpha**2*dsqrt(2./PI)*exp(-0.5d0) - elseif(ISRC_TIME==4) then ! sine + else if(ISRC_TIME==4) then ! sine per = 2.*hdur amp = alpha**2*dsqrt(2./PI)*exp(-0.5d0) -!!$ elseif(ISRC_TIME==5) then ! plane wave field +!!$ else if(ISRC_TIME==5) then ! plane wave field !!$ !!$ amp = alpha**2*dsqrt(2./PI)*exp(-0.5d0) ! amplitude !!$ az = 25.*PI/180. ! azimuth of vector (from north) @@ -115,7 +115,7 @@ subroutine get_source_time_function(origin_time,stf_vec,ti) !!$ ! probably the speed should be based on the slope of the seafloor !!$ !c_source = 9.81*per/(2*PI) ! T=16s, c=25 m/s !!$ c_source = c0 -!!$ +!!$ !!$ ! projection of each source point vector onto the directional vector k !!$ allocate(d_vec(nsrc)) !!$ d_vec(:) = 0. @@ -125,7 +125,7 @@ subroutine get_source_time_function(origin_time,stf_vec,ti) !!$ print *, ' period : ', sngl(per), ' s' !!$ print *, ' phase velocity : ', sngl(c_source/1000.), ' km/s' !!$ print *, ' wavelength : ', sngl(c_source*per/1000.), ' km' -!!$ print *, 'relative distance from plane wave wavefront to each source point:' +!!$ print *, 'relative distance from plane wave wavefront to each source point:' !!$ do i=1,nsrc !!$ d_vec(i) = kx*x(sglob(i)) + ky*z(sglob(i)) !!$ write(*,'(i6,3f12.3)') i, x(sglob(i))/1000., z(sglob(i))/1000., d_vec(i)/1000. @@ -137,7 +137,7 @@ subroutine get_source_time_function(origin_time,stf_vec,ti) ti(itime) = dble(itime-1)*DT t = ti(itime) - origin_time ! time shift - + if(ISRC_TIME==1) then ! d/dt[Gaussian] wavelet if(t >= -dgaus .and. t <= dgaus) then @@ -146,7 +146,7 @@ subroutine get_source_time_function(origin_time,stf_vec,ti) stf = 0. endif - elseif(ISRC_TIME==2) then + else if(ISRC_TIME==2) then ! Error function ! source_time_function = 0.5d0*(1.0d0+erf(decay_rate*t/hdur)) @@ -157,7 +157,7 @@ subroutine get_source_time_function(origin_time,stf_vec,ti) stf = 0. endif - elseif(ISRC_TIME==3) then + else if(ISRC_TIME==3) then ! truncated sine function (duration is cyc*per seconds) if(t >= t1 .and. t <= t2) then stf = amp*sin(2*PI*(t-t1)/per) @@ -165,22 +165,22 @@ subroutine get_source_time_function(origin_time,stf_vec,ti) stf = 0. endif - elseif(ISRC_TIME==4) then + else if(ISRC_TIME==4) then ! sine function stf = amp*sin(2*PI*t/per) !stf = amp/2.*sin(2*PI*t/per) + amp/2.*sin(2*PI*t/(1.1*per)) - !elseif(ISRC_TIME==5) then + !else if(ISRC_TIME==5) then ! ! plane wavefield, dependant on source position ! tmp = t - d_vec(i)/c_source ! !stf = amp*sin( 2*PI/per*tmp ) ! stf = amp/2.*sin(2*PI*tmp/per) + amp/2.*sin(2*PI*tmp/(1.1*per)) endif - + ! fill source time function stf_vec(itime) = stf - + enddo @@ -190,7 +190,7 @@ subroutine get_source_time_function(origin_time,stf_vec,ti) end subroutine get_source_time_function - !----------------------------------------------------- + !----------------------------------------------------- subroutine taper_series(x,nt) @@ -199,7 +199,7 @@ subroutine taper_series(x,nt) double precision :: ntemp,jtemp,wtemp,cfac integer :: i,pwr - + ntemp = dble(nt)/2.0 ! KEY COMMAND: power of polynomial taper @@ -208,18 +208,18 @@ subroutine taper_series(x,nt) ! Welch taper (in time) do i = 1,nt - + jtemp = dble(i-1) wtemp = (jtemp - ntemp) / ntemp cfac = 1. - wtemp**pwr !cfac = 1 - (2*(i - 1)/(nt - 1) - 1) ** pwr ! see Qinya code below - + x(i) = cfac*x(i) - enddo + enddo end subroutine taper_series - !----------------------------------------------------- + !----------------------------------------------------- subroutine write_snapshot(disp, filename) @@ -242,7 +242,7 @@ subroutine write_snapshot(disp, filename) end subroutine write_snapshot - !----------------------------------------------------- + !----------------------------------------------------- !!$ subroutine write_source_function(nsrc, ti, seis, sglob, seis_name) !!$ @@ -275,7 +275,7 @@ end subroutine write_snapshot !!$ !!$ end subroutine write_source_function - !----------------------------------------------------- + !----------------------------------------------------- subroutine write_seismogram(seis, nrec, seis_name) @@ -304,7 +304,7 @@ subroutine write_seismogram(seis, nrec, seis_name) end subroutine write_seismogram - !----------------------------------------------------- + !----------------------------------------------------- subroutine write_spectral_map(seis, nrec, rglob, seis_name, write_spectra) @@ -380,18 +380,18 @@ subroutine write_spectral_map(seis, nrec, rglob, seis_name, write_spectra) ! if within the frequency band if(w >= wmin_win .and. w <= wmax_win) abs_int = abs_int + abs_val - if(write_spectra) write(12,'(2e16.6)') w, abs_val - !if(write_spectra.and.w/=0.) write(12,'(2e16.6)') (2*PI)/w, abs_val + if(write_spectra) write(12,'(2e16.6)') w, abs_val + !if(write_spectra.and.w/=0.) write(12,'(2e16.6)') (2*PI)/w, abs_val enddo if(write_spectra) close(12) - + if(0==1) then write(*,'(a,3f12.4)') ' T, s (min/0/max) :', (2*PI)/wmax_win , 2*hdur , (2*PI)/wmin_win write(*,'(a,3f12.4)') ' f, Hz (min/0/max) :', wmin_win/(2*PI) , 1/(2*hdur) , wmax_win/(2*PI) write(*,'(a,3f12.4)') ' w, rad/s (min/0/max) :', wmin_win , 2*PI/(2*hdur) , wmax_win write(*,'(a,e24.8)') ' integrated power :', dw*abs_int - print * - endif + print * + endif call dfftw_destroy_plan(plan) @@ -405,14 +405,14 @@ subroutine write_spectral_map(seis, nrec, rglob, seis_name, write_spectra) end subroutine write_spectral_map - !----------------------------------------------------- + !----------------------------------------------------- subroutine filter(ti, seis, nrec) integer, intent(in) :: nrec double precision, intent(in) :: ti(NSTEP) double precision, intent(inout) :: seis(NSTEP,NCOMP,nrec) - + character(len=200) :: filename double precision :: data(NSTEP) double precision :: dt @@ -517,14 +517,14 @@ subroutine make_adjoint_source(nrec, syn, tstart, tend, adj_syn, data) adj_syn(:,i,irec) = ( syn(:,i,irec) - data(:,i,irec) ) * time_window(:) - elseif(IKER==5) then ! traveltime + else if(IKER==5) then ! traveltime ! minus sign is shifted from norm to adj_syn, in comparison with Tromp et al (2005) ! thus, norm is ensured to be POSITIVE (N > 0) norm = -DT * sum( time_window(:) * syn(:,i,irec) * syn_accel(:,i,irec) ) if (abs(norm) > EPS) adj_syn(:,i,irec) = -syn_veloc(:,i,irec) * time_window(:) / norm - elseif(IKER==6) then ! amplitude + else if(IKER==6) then ! amplitude ! norm is ensured to be POSITIVE (M > 0) norm = DT * sum( time_window(:) * syn(:,i,irec) * syn(:,i,irec) ) @@ -589,7 +589,7 @@ end subroutine make_adjoint_source !!$ !!$ ! assign adjoint force !!$ do i = 1,NCOMP -!!$ +!!$ !!$ adj_syn(:,i,irec) = ( syn(:,i,irec) - data(:,i,irec) ) * time_window(:) !!$ !!$ enddo diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/gji_paper/codes_18_06Aug2006/wave2d_sub2.f90 b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/gji_paper/codes_18_06Aug2006/wave2d_sub2.f90 index 128be3a9d..9f1baef5a 100644 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/gji_paper/codes_18_06Aug2006/wave2d_sub2.f90 +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/gji_paper/codes_18_06Aug2006/wave2d_sub2.f90 @@ -1,10 +1,10 @@ module wave2d_sub2 - + use wave2d_constants use wave2d_variables - + implicit none - + ! this module contains subroutines pertaining to filtering gridpoints ! and converting amoung UTM, mesh, and index coordinates @@ -111,13 +111,13 @@ subroutine locate_targets(nrec, x_target, z_target, & !!$ if(ia==1) then !!$ iax = 1 !!$ iaz = 1 -!!$ elseif(ia==2) then +!!$ else if(ia==2) then !!$ iax = NGLLX !!$ iaz = 1 -!!$ elseif(ia==3) then +!!$ else if(ia==3) then !!$ iax = NGLLX !!$ iaz = NGLLZ -!!$ elseif(ia==4) then +!!$ else if(ia==4) then !!$ iax = 1 !!$ iaz = NGLLZ !!$ endif @@ -262,7 +262,7 @@ subroutine recompute_jacobian_2d(ispec, xi, gamma, xtemp, ztemp, xix, xiz, gamma !--------------------------------------------- ! ! jacobian = | dx/dxi dx/dgamma | = (z2-z1)*(x2-x1)/4 as dx/dgamma=dz/dxi = 0 - ! | dz/dxi dz/dgamma | + ! | dz/dxi dz/dgamma | ! jacobian, integration weight xix = 2. / (x2(ispec)-x1(ispec)) @@ -270,7 +270,7 @@ subroutine recompute_jacobian_2d(ispec, xi, gamma, xtemp, ztemp, xix, xiz, gamma gammax = 0. gammaz = 2. / (z2(ispec)-z1(ispec)) - jacob = (z2(ispec)-z1(ispec))*(x2(ispec)-x1(ispec)) / 4. + jacob = (z2(ispec)-z1(ispec))*(x2(ispec)-x1(ispec)) / 4. ! find the (x,z) corresponding to (xi,gamma,ispec) xtemp = 0.5*(1.- xi)*x1(ispec) + 0.5*(1.+ xi)*x2(ispec) @@ -371,7 +371,7 @@ subroutine set_glob(nrec, x_rec, z_rec, rglob) integer, intent(inout) :: nrec double precision, intent(in) :: x_rec(nrec), z_rec(nrec) integer, intent(out) :: rglob(nrec) - + double precision :: dmin, d integer, dimension(nrec) :: rglobtemp integer :: irec, ispec, i, j, k, iglob, itemp, iflag @@ -381,7 +381,7 @@ subroutine set_glob(nrec, x_rec, z_rec, rglob) print *, nrec,' input target points into set_glob.f90' if(nrec/=0) then - + ! find the closest gridpoint to the target point do irec = 1, nrec dmin = sqrt(LENGTH**2+HEIGHT**2) ! max possible distance @@ -479,7 +479,7 @@ subroutine station_filter(nrec, x_rec, z_rec, ifilter, dmin_trsh) !x_rec(j) = xtar !z_rec(j) = ztar ifilter(j) = irec - + ! obtain the coastal point closest to the target point !dmin = sqrt(LENGTH**2+HEIGHT**2) !do i=1,ncoast @@ -490,13 +490,13 @@ subroutine station_filter(nrec, x_rec, z_rec, ifilter, dmin_trsh) ! endif !enddo - !! if target point is at least dmin_trsh from the coast, then keep it + !! if target point is at least dmin_trsh from the coast, then keep it !if ( dmin >= dmin_trsh ) then ! j = j+1 ! x_rec(j) = xtar ! z_rec(j) = ztar !endif - + endif enddo nrec = j @@ -555,7 +555,7 @@ subroutine station_filter_2(nrec, x_rec, z_rec, ieast) z_div = mp*x_div + bp !write(*,'(4f16.6)') xtar/1000., ztar/1000., x_div/1000., z_div/1000 - ! if target point is at least dmin_trsh from the coast, then keep it + ! if target point is at least dmin_trsh from the coast, then keep it if ( 0 < dble(ieast)*(xtar - x_div) ) then j = j+1 x_rec(j) = xtar @@ -573,7 +573,7 @@ subroutine mesh_geo(npt,rlon,rlat,rx,rz,UTM_PROJECTION_ZONE,iway) integer, intent(in) :: npt, UTM_PROJECTION_ZONE, iway double precision, intent(inout) :: rx(npt),rz(npt),rlon(npt),rlat(npt) - + double precision :: xtemp,ztemp integer i @@ -666,7 +666,7 @@ subroutine utm_geo(rlon,rlat,rx,ry,UTM_PROJECTION_ZONE,iway) e2 = 1.0-(semimin/semimaj)**2.0 e4 = e2*e2 e6 = e2*e4 - e8 = e4*e4 + e8 = e4*e4 ep2 = e2/(1.-e2) if (iway == IUTM2LONGLAT) then @@ -683,7 +683,7 @@ subroutine utm_geo(rlon,rlat,rx,ry,UTM_PROJECTION_ZONE,iway) cmr = cm*degrad if (iway == ILONGLAT2UTM) then ! lat-lon to UTM - + rlon = degrad*dlon rlat = degrad*dlat @@ -730,7 +730,7 @@ subroutine utm_geo(rlon,rlat,rx,ry,UTM_PROJECTION_ZONE,iway) yy = yy + north else ! UTM to lat-lon - + ! remove false easting and northing xx = xx - east yy = yy - north diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/gji_paper/codes_18_06Aug2006/wave2d_sub3.f90 b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/gji_paper/codes_18_06Aug2006/wave2d_sub3.f90 index 306d0698e..6515b79a0 100644 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/gji_paper/codes_18_06Aug2006/wave2d_sub3.f90 +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/gji_paper/codes_18_06Aug2006/wave2d_sub3.f90 @@ -1,13 +1,13 @@ module wave2d_sub3 - + use wave2d_constants use wave2d_variables - + implicit none ! this module contains subroutines pertaining to filtering gridpoints ! and converting amoung UTM, mesh, and index coordinates - + contains !------------------------------------------ @@ -134,13 +134,13 @@ subroutine mtm_adj(ipick, ievent, nrec, syn, tstart, tend, adj_syn, data) do j = 1, nlen if((j+i) > 1 .and. (j+i) < nlen) cc = cc + dzr_win(j) * dzr2_win(j+i) enddo - if( cc > cc_max) then + if( cc > cc_max) then cc_max = cc ishift = i endif - enddo + enddo tshift_xc = ishift*DT ! KEY: cross-correlation time shift - + !=================================================== ! if you want a MTM measurement, then go here if(IKER==3 .or. IKER==4) then @@ -150,14 +150,14 @@ subroutine mtm_adj(ipick, ievent, nrec, syn, tstart, tend, adj_syn, data) do i = 1, nlen dzr3_win(i) = 0 if( (ishift+i) > 1 .and. (ishift+i) < nlen ) dzr3_win(i) = dzr2_win(i+ishift) - dzr30_win(i) = dzr3_win(i) + dzr30_win(i) = dzr3_win(i) enddo ! create complex synthetic seismogram do i = 1,npt - if (i <= nlen) then + if (i <= nlen) then wseis1(i) = cmplx(dzr0_win(i),0) - else + else wseis1(i) = 0 endif enddo @@ -182,7 +182,7 @@ subroutine mtm_adj(ipick, ievent, nrec, syn, tstart, tend, adj_syn, data) do ictaper = 1, ntaper ! loop over tapers - ! apply taper ictaper to synth and obs windowed seismograms + ! apply taper ictaper to synth and obs windowed seismograms do i = 1, nlen dzr_win(i) = dzr0_win(i) * tas(i,ictaper) dzr3_win(i) = dzr30_win(i) * tas(i,ictaper) @@ -190,10 +190,10 @@ subroutine mtm_adj(ipick, ievent, nrec, syn, tstart, tend, adj_syn, data) ! create complex seismograms do i = 1,npt - if (i <= nlen) then + if (i <= nlen) then wseis(i) = cmplx(dzr_win(i),0) wseis3(i) = cmplx(dzr3_win(i),0) - else + else wseis(i) = 0 wseis3(i) = 0 endif @@ -211,22 +211,22 @@ subroutine mtm_adj(ipick, ievent, nrec, syn, tstart, tend, adj_syn, data) ampmax = 0 ampmax_unw = 0 do i = 1, fnum - if( abs(wseis(i)) > ampmax) then + if( abs(wseis(i)) > ampmax) then ampmax = abs(wseis(i)) i_amp_max = i - endif - if( abs(wseis1(i)) > ampmax_unw) then + endif + if( abs(wseis1(i)) > ampmax_unw) then ampmax_unw = abs(wseis1(i)) i_amp_max_unw = i - endif + endif enddo wtr_use = cmplx(ampmax * wtr, 0) wtr_use_unw = cmplx(ampmax_unw * wtr, 0) ! these variables define maximum frequency for measurement ! i_right_stop = 1 --> stop at frequency i_right, not fnum - i_right = fnum - i_right_stop = 0 + i_right = fnum + i_right_stop = 0 ! loop over frequencies do i = 1, fnum @@ -240,15 +240,15 @@ subroutine mtm_adj(ipick, ievent, nrec, syn, tstart, tend, adj_syn, data) if(abs(wseis(i)) > abs(wtr_use)) trans(i) = wseis3(i) / wseis(i) if(abs(wseis(i)) <= abs(wtr_use)) trans(i) = wseis3(i) / (wseis(i)+wtr_use) - ! determine i_right values using the power in the un-tapered synthetic - if(abs(wseis1(i)) <= abs(wtr_use_unw) .and. i_right_stop == 0 .and. i > i_amp_max_unw) then + ! determine i_right values using the power in the un-tapered synthetic + if(abs(wseis1(i)) <= abs(wtr_use_unw) .and. i_right_stop == 0 .and. i > i_amp_max_unw) then i_right_stop = 1 i_right = i - endif - if(abs(wseis1(i)) >= 10*abs(wtr_use_unw) .and. i_right_stop == 1 .and. i > i_amp_max_unw) then - i_right_stop = 0 + endif + if(abs(wseis1(i)) >= 10*abs(wtr_use_unw) .and. i_right_stop == 1 .and. i > i_amp_max_unw) then + i_right_stop = 0 i_right = i - endif + endif enddo ! loop over frequencies (i=1,fnum) @@ -272,10 +272,10 @@ subroutine mtm_adj(ipick, ievent, nrec, syn, tstart, tend, adj_syn, data) ! find water level for multi taper measurement ampmax = 0 do i = 1, fnum - if( abs(bot_mtm(i)) > ampmax) then + if( abs(bot_mtm(i)) > ampmax) then ampmax = abs(bot_mtm(i)) i_amp_max = i - endif + endif enddo wtr_use = cmplx(ampmax * wtr_mtm**2, 0) @@ -287,7 +287,7 @@ subroutine mtm_adj(ipick, ievent, nrec, syn, tstart, tend, adj_syn, data) !======================================================= ! construct time series : tau(omega), dlnA(omega) - + ! taper function for the freq domain nw = dble(i_right - 1) @@ -297,7 +297,7 @@ subroutine mtm_adj(ipick, ievent, nrec, syn, tstart, tend, adj_syn, data) dlnA_w(:) = 0. w_taper(:) = 0. open(91,file='transfer_freq.dat',status='unknown') - do i = 1, i_right + do i = 1, i_right fvec(i) = df*i ! do not divide by zero !dtau_w(i) = -atan2(aimag(trans_mtm(i)), real(trans_mtm(i))) - ZZIGN*tshift_xc @@ -411,7 +411,7 @@ subroutine mtm_adj(ipick, ievent, nrec, syn, tstart, tend, adj_syn, data) ! It also stores the displacement field sj(w), which is in the numerator of p(w). do ictaper = 1,ntaper - ! apply TAPER ictaper to windowed synthetics + ! apply TAPER ictaper to windowed synthetics do i = 1,nlen dzr_win(i) = dzr0_win(i) * tas(i,ictaper) enddo @@ -428,7 +428,7 @@ subroutine mtm_adj(ipick, ievent, nrec, syn, tstart, tend, adj_syn, data) enddo ! term in numerator (sj) - top_p_ntaper(:,ictaper) = wseis(:) + top_p_ntaper(:,ictaper) = wseis(:) enddo ! loop over tapers @@ -478,7 +478,7 @@ subroutine mtm_adj(ipick, ievent, nrec, syn, tstart, tend, adj_syn, data) enddo close(21) - ! time domain : tapers and other time series + ! time domain : tapers and other time series open(18,file='test_hj_t.dat',status='unknown') open(19,file='test_pj_t.dat',status='unknown') open(20,file='test_Pj_t.dat',status='unknown') @@ -495,7 +495,7 @@ subroutine mtm_adj(ipick, ievent, nrec, syn, tstart, tend, adj_syn, data) write(22,hfmt) ( sngl(qt_adj(i,ictaper)), ictaper=1,ntaper ) ! qj(t) write(23,hfmt) ( sngl(dlnA_qj_t(i,ictaper)), ictaper=1,ntaper ) ! Qj(t) - write(24,hfmt) ( sngl(dlnA_qj_t(i,ictaper) * tas(i,ictaper)), ictaper=1,ntaper ) ! hj(t) Qj(t) + write(24,hfmt) ( sngl(dlnA_qj_t(i,ictaper) * tas(i,ictaper)), ictaper=1,ntaper ) ! hj(t) Qj(t) enddo close(18) ; close(19) ; close(20) ; close(21) ; close(22) ; close(23) ; close(24) @@ -520,23 +520,23 @@ subroutine mtm_adj(ipick, ievent, nrec, syn, tstart, tend, adj_syn, data) if(ipick==0) then adj_syn(i1,icomp,irec) = ( syn(i1,icomp,irec) - data(i1,icomp,irec) ) * time_window(i) * meas_pert - elseif(ipick==1) then + else if(ipick==1) then ! meas_pert = 1.0 for most runs adj_syn(i1,icomp,irec) = -tshift_xc * ft_bar_t(i) * time_window(i) * meas_pert - elseif(ipick==2) then + else if(ipick==2) then adj_syn(i1,icomp,irec) = -dlna * fa_bar_t(i) * time_window(i) * meas_pert - elseif(ipick==3) then + else if(ipick==3) then adj_syn(i1,icomp,irec) = fp(i) * time_window(i) - elseif(ipick==4) then + else if(ipick==4) then adj_syn(i1,icomp,irec) = fq(i) * time_window(i) - elseif(ipick==5) then + else if(ipick==5) then adj_syn(i1,icomp,irec) = ft_bar_t(i) * time_window(i) - elseif(ipick==6) then + else if(ipick==6) then adj_syn(i1,icomp,irec) = fa_bar_t(i) * time_window(i) endif @@ -552,27 +552,27 @@ subroutine mtm_adj(ipick, ievent, nrec, syn, tstart, tend, adj_syn, data) chi(ievent,irec,icomp,1) = 0.5 * sum( adj_syn(:,icomp,irec)**2 ) * DT measure_vec(imeasure) = chi(ievent,irec,icomp,1) - elseif(ipick==1) then + else if(ipick==1) then chi(ievent,irec,icomp,1) = 0.5 * (tshift_xc * meas_pert)**2 measure_vec(imeasure) = tshift_xc * meas_pert - elseif(ipick==2) then + else if(ipick==2) then chi(ievent,irec,icomp,1) = 0.5 * (dlna * meas_pert)**2 measure_vec(imeasure) = dlna * meas_pert - elseif(ipick==3) then + else if(ipick==3) then chi(ievent,irec,icomp,1) = 0. measure_vec(imeasure) = 0. - elseif(ipick==4) then + else if(ipick==4) then chi(ievent,irec,icomp,1) = 0. measure_vec(imeasure) = 0. - elseif(ipick==5) then + else if(ipick==5) then chi(ievent,irec,icomp,1) = 0. measure_vec(imeasure) = 0. - elseif(ipick==6) then + else if(ipick==6) then chi(ievent,irec,icomp,1) = 0. measure_vec(imeasure) = 0. @@ -586,7 +586,7 @@ end subroutine mtm_adj !------------------------------------------------------------------ ! END MAIN PROGRAM !------------------------------------------------------------------ - + !------------------------------------------------------------------ subroutine clogc(n,xi,zzign,dt) !------------------------------------------------------------------ @@ -675,7 +675,7 @@ subroutine ftinv(npow,s,zzign,dt,r) do 10 i=1,nsmp 10 r(i)=real(s(i)) return - + end subroutine ftinv !------------------------------------------------------------------ diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/gji_paper/codes_18_06Aug2006/wave2d_variables.f90 b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/gji_paper/codes_18_06Aug2006/wave2d_variables.f90 index e2b4b0ebc..6889e0cad 100644 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/gji_paper/codes_18_06Aug2006/wave2d_variables.f90 +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/gji_paper/codes_18_06Aug2006/wave2d_variables.f90 @@ -64,14 +64,14 @@ module wave2d_variables ! displacement, velocity and acceleration double precision, dimension(NCOMP,NGLOB) :: displ,veloc,accel double precision, dimension(NCOMP,NGLOB) :: b_displ,b_veloc,b_accel - + ! plotting double precision, dimension(NGLOB) :: norm ! space derivatives double precision tempx1l,tempx2l,tempy1l,tempy2l,tempz1l,tempz2l double precision fac1,fac2,hp1,hp2 - double precision dsxdxl,dszdxl,dsydxl,dsydzl,dsxdzl,dszdzl + double precision dsxdxl,dszdxl,dsydxl,dsydzl,dsxdzl,dszdzl double precision sigma_xx,sigma_xy,sigma_xz,sigma_zx,sigma_zy,sigma_zz double precision, dimension(NGLLX,NGLLZ) :: tempx1,tempx2,tempy1,tempy2,tempz1,tempz2 double precision, dimension(3,3) :: ds @@ -100,7 +100,7 @@ module wave2d_variables integer ios ! number of time steps to store wavefield - integer NINT + integer NINT ! input/output directory character(len=100) :: in_dir,out_dir diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/gji_paper/plot_gji_2wid.pl b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/gji_paper/plot_gji_2wid.pl index 104ab159d..1f2defd6d 100755 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/gji_paper/plot_gji_2wid.pl +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/gji_paper/plot_gji_2wid.pl @@ -276,7 +276,7 @@ #=============================================== print "\nWriting CSH file...\n"; - + open(CSH,">$cshfile"); print CSH "gmtset BASEMAP_TYPE plain PLOT_DEGREE_FORMAT D TICK_LENGTH $tick LABEL_FONT_SIZE $fsize2 ANOT_FONT_SIZE $fsize2 HEADER_FONT $fontno ANOT_FONT $fontno LABEL_FONT $fontno HEADER_FONT_SIZE $fsize1 FRAME_PEN $fpen TICK_PEN $tpen \n"; #=============================================== @@ -370,7 +370,7 @@ #=============================================== print "\nWriting CSH file...\n"; - + open(CSH,">$cshfile"); print CSH "gmtset BASEMAP_TYPE plain PLOT_DEGREE_FORMAT D TICK_LENGTH $tick LABEL_FONT_SIZE $fsize2 ANOT_FONT_SIZE $fsize2 HEADER_FONT $fontno ANOT_FONT $fontno LABEL_FONT $fontno HEADER_FONT_SIZE $fsize1 FRAME_PEN $fpen TICK_PEN $tpen \n"; #=============================================== @@ -466,7 +466,7 @@ #=============================================== print "\nWriting CSH file...\n"; - + open(CSH,">$cshfile"); print CSH "gmtset BASEMAP_TYPE plain TICK_LENGTH $tick LABEL_FONT_SIZE $fsize2 ANOT_FONT_SIZE $fsize2 PLOT_DEGREE_FORMAT D HEADER_FONT $fontno ANOT_FONT $fontno LABEL_FONT $fontno HEADER_FONT_SIZE $fsize1 FRAME_PEN $fpen TICK_PEN $tpen\n"; #=============================================== @@ -589,7 +589,7 @@ #=============================================== print "\nWriting CSH file...\n"; - + open(CSH,">$cshfile"); print CSH "gmtset BASEMAP_TYPE plain TICK_LENGTH $tick LABEL_FONT_SIZE $fsize2 ANOT_FONT_SIZE $fsize2 PLOT_DEGREE_FORMAT D HEADER_FONT $fontno ANOT_FONT $fontno LABEL_FONT $fontno HEADER_FONT_SIZE $fsize1 FRAME_PEN $fpen TICK_PEN $tpen\n"; #=============================================== diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/gji_paper/plot_gji_3wid.pl b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/gji_paper/plot_gji_3wid.pl index 3c06878d2..9601bda42 100755 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/gji_paper/plot_gji_3wid.pl +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/gji_paper/plot_gji_3wid.pl @@ -411,7 +411,7 @@ #=============================================== print "\nWriting CSH file...\n"; - + open(CSH,">$cshfile"); print CSH "gmtset BASEMAP_TYPE plain PLOT_DEGREE_FORMAT D TICK_LENGTH $tick LABEL_FONT_SIZE $fsize2 ANOT_FONT_SIZE $fsize2 HEADER_FONT $fontno ANOT_FONT $fontno LABEL_FONT $fontno HEADER_FONT_SIZE $fsize1 FRAME_PEN $fpen TICK_PEN $tpen \n"; #=============================================== @@ -838,7 +838,7 @@ #=============================================== print "\nWriting CSH file...\n"; - + open(CSH,">$cshfile"); print CSH "gmtset BASEMAP_TYPE plain TICK_LENGTH $tick LABEL_FONT_SIZE $fsize2 ANOT_FONT_SIZE $fsize2 PLOT_DEGREE_FORMAT D HEADER_FONT $fontno ANOT_FONT $fontno LABEL_FONT $fontno HEADER_FONT_SIZE $fsize1 FRAME_PEN $fpen TICK_PEN $tpen\n"; #=============================================== @@ -1086,7 +1086,7 @@ #=============================================== print "\nWriting CSH file...\n"; - + open(CSH,">$cshfile"); print CSH "gmtset BASEMAP_TYPE plain TICK_LENGTH $tick LABEL_FONT_SIZE $fsize2 ANOT_FONT_SIZE $fsize2 PLOT_DEGREE_FORMAT D HEADER_FONT $fontno ANOT_FONT $fontno LABEL_FONT $fontno HEADER_FONT_SIZE $fsize1 FRAME_PEN $fpen TICK_PEN $tpen\n"; #=============================================== @@ -1233,7 +1233,7 @@ #=============================================== print "\nWriting CSH file...\n"; - + open(CSH,">$cshfile"); print CSH "gmtset BASEMAP_TYPE plain TICK_LENGTH $tick LABEL_FONT_SIZE $fsize2 ANOT_FONT_SIZE $fsize2 PLOT_DEGREE_FORMAT D HEADER_FONT $fontno ANOT_FONT $fontno LABEL_FONT $fontno HEADER_FONT_SIZE $fsize1 FRAME_PEN $fpen TICK_PEN $tpen\n"; #=============================================== @@ -1389,7 +1389,7 @@ #=============================================== print "\nWriting CSH file...\n"; - + open(CSH,">$cshfile"); print CSH "gmtset BASEMAP_TYPE plain TICK_LENGTH $tick LABEL_FONT_SIZE $fsize2 ANOT_FONT_SIZE $fsize2 PLOT_DEGREE_FORMAT D HEADER_FONT $fontno ANOT_FONT $fontno LABEL_FONT $fontno HEADER_FONT_SIZE $fsize1 FRAME_PEN $fpen TICK_PEN $tpen\n"; #=============================================== @@ -1470,7 +1470,7 @@ #=============================================== print "\nWriting CSH file...\n"; - + open(CSH,">$cshfile"); print CSH "gmtset BASEMAP_TYPE plain TICK_LENGTH $tick LABEL_FONT_SIZE $fsize2 ANOT_FONT_SIZE $fsize2 PLOT_DEGREE_FORMAT D HEADER_FONT $fontno ANOT_FONT $fontno LABEL_FONT $fontno HEADER_FONT_SIZE $fsize1 FRAME_PEN $fpen TICK_PEN $tpen\n"; #=============================================== @@ -1587,7 +1587,7 @@ print CSH "awk '\$1 == \"R\" {print \$2,\$3}' $recfile |psxy -N $J $R -K -O -P -V $rec >> $psfile\n"; print CSH "awk '{print \$1,\$2}' $evefile |psxy -N $J $R -K -O -P -V $src >> $psfile\n"; print CSH "pstext -N $J_title $R_title -K -O -V -P >>$psfile<$cshfile"); print CSH "gmtset BASEMAP_TYPE plain TICK_LENGTH $tick LABEL_FONT_SIZE $fsize2 ANOT_FONT_SIZE $fsize2 PLOT_DEGREE_FORMAT D HEADER_FONT $fontno ANOT_FONT $fontno LABEL_FONT $fontno HEADER_FONT_SIZE $fsize1 FRAME_PEN $fpen TICK_PEN $tpen\n"; #=============================================== @@ -1786,7 +1786,7 @@ #=============================================== print "\nWriting CSH file...\n"; - + open(CSH,">$cshfile"); print CSH "gmtset BASEMAP_TYPE plain TICK_LENGTH $tick LABEL_FONT_SIZE $fsize2 ANOT_FONT_SIZE $fsize2 PLOT_DEGREE_FORMAT D HEADER_FONT $fontno ANOT_FONT $fontno LABEL_FONT $fontno HEADER_FONT_SIZE $fsize1 FRAME_PEN $fpen TICK_PEN $tpen\n"; #=============================================== @@ -1859,7 +1859,7 @@ } # for k < nevent # summed event kernel - + # get the summed kernel and chi files $file2 = "$dir/summed_ker.dat"; $recfile = "$dir/${edir}/sr.txt"; # src-rec for first event @@ -1925,7 +1925,7 @@ #=============================================== print "\nWriting CSH file...\n"; - + open(CSH,">$cshfile"); print CSH "gmtset BASEMAP_TYPE plain TICK_LENGTH $tick LABEL_FONT_SIZE $fsize2 ANOT_FONT_SIZE $fsize2 PLOT_DEGREE_FORMAT D HEADER_FONT $fontno ANOT_FONT $fontno LABEL_FONT $fontno HEADER_FONT_SIZE $fsize1 FRAME_PEN $fpen TICK_PEN $tpen\n"; #=============================================== @@ -2054,7 +2054,7 @@ #=============================================== print "\nWriting CSH file...\n"; - + open(CSH,">$cshfile"); print CSH "gmtset BASEMAP_TYPE plain TICK_LENGTH $tick LABEL_FONT_SIZE $fsize2 ANOT_FONT_SIZE $fsize2 PLOT_DEGREE_FORMAT D HEADER_FONT $fontno ANOT_FONT $fontno LABEL_FONT $fontno HEADER_FONT_SIZE $fsize1 FRAME_PEN $fpen TICK_PEN $tpen\n"; #=============================================== @@ -2163,7 +2163,7 @@ #=============================================== print "\nWriting CSH file...\n"; - + open(CSH,">$cshfile"); print CSH "gmtset BASEMAP_TYPE plain TICK_LENGTH $tick LABEL_FONT_SIZE $fsize2 ANOT_FONT_SIZE $fsize2 PLOT_DEGREE_FORMAT D HEADER_FONT $fontno ANOT_FONT $fontno LABEL_FONT $fontno HEADER_FONT_SIZE $fsize1 FRAME_PEN $fpen TICK_PEN $tpen\n"; #=============================================== @@ -2294,7 +2294,7 @@ #=============================================== print "\nWriting CSH file...\n"; - + open(CSH,">$cshfile"); print CSH "gmtset BASEMAP_TYPE plain TICK_LENGTH $tick LABEL_FONT_SIZE $fsize2 ANOT_FONT_SIZE $fsize2 PLOT_DEGREE_FORMAT D HEADER_FONT $fontno ANOT_FONT $fontno LABEL_FONT $fontno HEADER_FONT_SIZE $fsize1 FRAME_PEN $fpen TICK_PEN $tpen\n"; #=============================================== @@ -2332,7 +2332,7 @@ for ($i = 0; $i < $numk; $i = $i+1) { $k = $kvec[$i]; - $mod = $mods[$k*2]; $smod = "m\@+$mod\@+"; + $mod = $mods[$k*2]; $smod = "m\@+$mod\@+"; $title = "($labs[$i]) Phase speed model $smod"; if ($k== 0) {$title = "($labs[$i]) Initial phase speed model $smod"} if ($k % 3 == 0) {$shift = $shift2} else {$shift = $shift1} @@ -2484,7 +2484,7 @@ #=============================================== print "\nWriting CSH file...\n"; - + open(CSH,">$cshfile"); print CSH "gmtset BASEMAP_TYPE plain TICK_LENGTH $tick LABEL_FONT_SIZE $fsize1 ANOT_FONT_SIZE $fsize2 PLOT_DEGREE_FORMAT D HEADER_FONT $fontno ANOT_FONT $fontno LABEL_FONT $fontno HEADER_FONT_SIZE $fsize1 FRAME_PEN $fpen TICK_PEN $tpen\n"; #=============================================== @@ -2560,7 +2560,7 @@ $ker_file = "${dir_hess}/run_0020/lcurve05/m_IMODEL_3_rayleigh_id03_plot"; if (not -f $ker_file) { die("Check if $ker_file exist or not\n") } - + $title = "(c) Model from kernels, $stgam"; $shift = $shift1; @@ -2672,7 +2672,7 @@ #=============================================== print "\nWriting CSH file...\n"; - + open(CSH,">$cshfile"); print CSH "gmtset BASEMAP_TYPE plain TICK_LENGTH $tick LABEL_FONT_SIZE $fsize2 ANOT_FONT_SIZE $fsize2 PLOT_DEGREE_FORMAT D HEADER_FONT $fontno ANOT_FONT $fontno LABEL_FONT $fontno HEADER_FONT_SIZE $fsize1 FRAME_PEN $fpen TICK_PEN $tpen\n"; #=============================================== @@ -2868,7 +2868,7 @@ #=============================================== print "\nWriting CSH file...\n"; - + open(CSH,">$cshfile"); print CSH "gmtset BASEMAP_TYPE plain TICK_LENGTH $tick LABEL_FONT_SIZE $fsize2 ANOT_FONT_SIZE $fsize2 PLOT_DEGREE_FORMAT D HEADER_FONT $fontno ANOT_FONT $fontno LABEL_FONT $fontno HEADER_FONT_SIZE $fsize1 FRAME_PEN $fpen TICK_PEN $tpen\n"; #=============================================== diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/gji_paper/plot_gji_paper.pl b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/gji_paper/plot_gji_paper.pl index fe4821ad6..87825d2a3 100755 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/gji_paper/plot_gji_paper.pl +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/gji_paper/plot_gji_paper.pl @@ -89,7 +89,7 @@ #=============================================== print "\nWriting CSH file...\n"; - + open(CSH,">$cshfile"); print CSH "gmtset BASEMAP_TYPE plain TICK_LENGTH $tick LABEL_FONT_SIZE $fsize1 ANOT_FONT_SIZE $fsize2 PLOT_DEGREE_FORMAT D HEADER_FONT $fontno ANOT_FONT $fontno LABEL_FONT $fontno HEADER_FONT_SIZE $fsize1 FRAME_PEN $fpen TICK_PEN $tpen\n"; #=============================================== diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/gji_paper/plot_gji_paper_source.pl b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/gji_paper/plot_gji_paper_source.pl index d24faa8f4..241f3adcb 100755 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/gji_paper/plot_gji_paper_source.pl +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/gji_paper/plot_gji_paper_source.pl @@ -304,7 +304,7 @@ #=============================================== print "\nWriting CSH file...\n"; - + open(CSH,">$cshfile"); print CSH "gmtset BASEMAP_TYPE plain TICK_LENGTH $tick LABEL_FONT_SIZE $fsize2 ANOT_FONT_SIZE $fsize2 PLOT_DEGREE_FORMAT D HEADER_FONT $fontno ANOT_FONT $fontno LABEL_FONT $fontno HEADER_FONT_SIZE $fsize1 FRAME_PEN $fpen TICK_PEN $tpen\n"; #=============================================== @@ -498,7 +498,7 @@ #=============================================== print "\nWriting CSH file...\n"; - + open(CSH,">$cshfile"); print CSH "gmtset BASEMAP_TYPE plain TICK_LENGTH $tick LABEL_FONT_SIZE $fsize2 ANOT_FONT_SIZE $fsize2 PLOT_DEGREE_FORMAT D HEADER_FONT $fontno ANOT_FONT $fontno LABEL_FONT $fontno HEADER_FONT_SIZE $fsize1 FRAME_PEN $fpen TICK_PEN $tpen\n"; #=============================================== @@ -514,7 +514,7 @@ if($ii == 0) {$irun0 = 2600; $qmax = 14; @labs = ("a","b","c"); @tags = (" ","(fixed)");} else {$irun0 = 2650; $qmax = 3; @labs = ("d","e","f"); @tags = ("(fixed)"," "); } } - + $irun = $irun0 + $iter; $strun0 = sprintf("%4.4i",$irun0); $strun = sprintf("%4.4i",$irun); @@ -690,8 +690,8 @@ ($elon,$elat,$num) = split(" ",$events[$ievent-1]); print "\n $elon $elat $num \n"; - $xtxt = $elon-0.05; - $ytxt = $elat+0.3; + $xtxt = $elon-0.05; + $ytxt = $elat+0.3; print CSH "pstext -N $J $R -K -O -V -P >>$psfile<>$psfile< $cpt_spl \n"; @@ -394,7 +394,7 @@ #=============================================== print "\nWriting CSH file...\n"; - + open(CSH,">$cshfile"); print CSH "gmtset BASEMAP_TYPE plain PLOT_DEGREE_FORMAT D TICK_LENGTH $tick LABEL_FONT_SIZE $fsize2 ANOT_FONT_SIZE $fsize2 HEADER_FONT $fontno ANOT_FONT $fontno LABEL_FONT $fontno HEADER_FONT_SIZE $fsize1 FRAME_PEN $fpen TICK_PEN $tpen \n"; #=============================================== @@ -1006,7 +1006,7 @@ #=============================================== print "\nWriting CSH file...\n"; - + open(CSH,">$cshfile"); print CSH "gmtset BASEMAP_TYPE plain TICK_LENGTH $tick LABEL_FONT_SIZE $fsize2 ANOT_FONT_SIZE $fsize2 PLOT_DEGREE_FORMAT D HEADER_FONT $fontno ANOT_FONT $fontno LABEL_FONT $fontno HEADER_FONT_SIZE $fsize1 FRAME_PEN $fpen TICK_PEN $tpen\n"; #=============================================== @@ -1074,7 +1074,7 @@ print CSH "awk '\$1 == \"R\" {print \$2,\$3}' $recfile |psxy -N $J $R -K -O -V $rec >> $psfile\n"; print CSH "awk '{print \$1,\$2}' $evefile |psxy -N $J $R -K -O -V $src >> $psfile\n"; #print CSH "psscale -C$cpt_vel $Dscale $Bscale1 -K -O -V >> $psfile \n"; - print CSH "pstext -N $J_title $R_title -K -O -V >>$psfile<>$psfile<$cshfile"); print CSH "gmtset BASEMAP_TYPE plain TICK_LENGTH $tick LABEL_FONT_SIZE $fsize2 ANOT_FONT_SIZE $fsize2 PLOT_DEGREE_FORMAT D HEADER_FONT $fontno ANOT_FONT $fontno LABEL_FONT $fontno HEADER_FONT_SIZE $fsize1 FRAME_PEN $fpen TICK_PEN $tpen\n"; #=============================================== @@ -1190,7 +1190,7 @@ print "\nT2b = $T2b\n"; $bs2b = sprintf("%2.2e",0.9*$ss); $Bscale2c = sprintf("-B${bs2b}:\" K * B ( 10\@+%2.2i\@+ ) \": -E10p",$kpwr); - + $cpt_kerb = "color1b.cpt"; print CSH "makecpt -C$colorbar $T2b > temp1\n"; print CSH "sed 's/^B.*/B 170 0 0 /' temp1 > temp2\n"; @@ -1279,7 +1279,7 @@ #=============================================== print "\nWriting CSH file...\n"; - + open(CSH,">$cshfile"); print CSH "gmtset BASEMAP_TYPE plain TICK_LENGTH $tick LABEL_FONT_SIZE 9 ANOT_FONT_SIZE 9 PLOT_DEGREE_FORMAT D HEADER_FONT $fontno ANOT_FONT $fontno LABEL_FONT $fontno HEADER_FONT_SIZE 12 FRAME_PEN $fpen TICK_PEN $tpen\n"; #=============================================== @@ -1352,7 +1352,7 @@ print "\nT2b = $T2b\n"; $bs2b = sprintf("%2.2e",0.9*$ss); $Bscale2c = sprintf("-B${bs2b}:\" K * B ( 10\@+%2.2i\@+ m\@+-2\@+ s ) \": -E10p",$kpwr); - + $cpt_kerb = "color1b.cpt"; print CSH "makecpt -C$colorbar $T2b > temp1\n"; print CSH "sed 's/^B.*/B 170 0 0 /' temp1 > temp2\n"; @@ -1454,7 +1454,7 @@ ($blon2,$blat2) = split(" ",$splines[$ispl2-1]); # ray path - $title = "($labs[3]) Ray : i = ${iray} / ${nmeas} (event ${ieve}, rec ${irec})"; + $title = "($labs[3]) Ray : i = ${iray} / ${nmeas} (event ${ieve}, rec ${irec})"; $B = "$B0".$Bopts[$Baxes[3]]; #print CSH "psbasemap $B $R $J -K -V -P $origin > $psfile\n"; # START print CSH "psbasemap $B $R $J -K -O -V -P $shift2 >> $psfile\n"; @@ -1553,7 +1553,7 @@ #=============================================== print "\nWriting CSH file...\n"; - + open(CSH,">$cshfile"); print CSH "gmtset BASEMAP_TYPE plain TICK_LENGTH $tick LABEL_FONT_SIZE $fsize2 ANOT_FONT_SIZE $fsize2 PLOT_DEGREE_FORMAT D HEADER_FONT $fontno ANOT_FONT $fontno LABEL_FONT $fontno HEADER_FONT_SIZE $fsize1 FRAME_PEN $fpen TICK_PEN $tpen\n"; #=============================================== @@ -1674,7 +1674,7 @@ #=============================================== print "\nWriting CSH file...\n"; - + open(CSH,">$cshfile"); print CSH "gmtset BASEMAP_TYPE plain TICK_LENGTH $tick LABEL_FONT_SIZE $fsize2 ANOT_FONT_SIZE $fsize2 PLOT_DEGREE_FORMAT D HEADER_FONT $fontno ANOT_FONT $fontno LABEL_FONT $fontno HEADER_FONT_SIZE $fsize1 FRAME_PEN $fpen TICK_PEN $tpen\n"; #=============================================== @@ -1766,7 +1766,7 @@ #=============================================== print "\nWriting CSH file...\n"; - + open(CSH,">$cshfile"); print CSH "gmtset BASEMAP_TYPE plain TICK_LENGTH 0.1c LABEL_FONT_SIZE $fsize3 ANOT_FONT_SIZE $fsize3 PLOT_DEGREE_FORMAT D HEADER_FONT $fontno ANOT_FONT $fontno LABEL_FONT $fontno HEADER_FONT_SIZE $fsize2 FRAME_PEN $fpen TICK_PEN $tpen\n"; #=============================================== @@ -1822,7 +1822,7 @@ print CSH "echo $psfile\n"; print CSH "echo $snapshot_f\n"; - + $B = "-B1/1:\"t = $time s\"::.\" \":wsne"; $B_row1 = "-B1/1:\"t = $time s\"::.\" \":wsne"; if ($i == 0) { $B = $B_row1} @@ -1848,7 +1848,7 @@ #----------------------------- if($irun == 1 || $irun == 2) { # data file generated in gji_figs.m (11-28-05) - + # get axes limits $ax_file = "${dir}/time_series_axes.dat"; if (not -f $ax_file) { die("Check if $ax_file exist or not\n") } @@ -1858,7 +1858,7 @@ ($tmin,$tmax,$junk,$junk) = split(" ",$axlims[2]); print "\n $tmin $tmax \n @pwr_vec \n @cmx_vec \n\n"; @norm = ("1e$pwr_vec[0]","1e$pwr_vec[1]","1e$pwr_vec[2]","1e$pwr_vec[3]"); - + # make plot bounds $R1 = "-R${tmin}/${tmax}/-${cmx_vec[0]}/${cmx_vec[0]}"; $R2 = "-R${tmin}/${tmax}/-${cmx_vec[1]}/${cmx_vec[1]}"; @@ -1960,7 +1960,7 @@ #=============================================== print "\nWriting CSH file...\n"; - + open(CSH,">$cshfile"); print CSH "gmtset BASEMAP_TYPE plain TICK_LENGTH 0.2c LABEL_FONT_SIZE $fsize1 ANOT_FONT_SIZE $fsize1 PLOT_DEGREE_FORMAT D HEADER_FONT $fontno ANOT_FONT $fontno LABEL_FONT $fontno HEADER_FONT_SIZE $fsize0 FRAME_PEN $fpen TICK_PEN $tpen\n"; #=============================================== @@ -2064,7 +2064,7 @@ #=============================================== print "\nWriting CSH file...\n"; - + open(CSH,">$cshfile"); print CSH "gmtset BASEMAP_TYPE plain TICK_LENGTH 0.15c LABEL_FONT_SIZE $fsize2 ANOT_FONT_SIZE 10 PLOT_DEGREE_FORMAT D HEADER_FONT $fontno ANOT_FONT $fontno LABEL_FONT $fontno HEADER_FONT_SIZE $fsize1 FRAME_PEN $fpen TICK_PEN $tpen\n"; #=============================================== @@ -2255,7 +2255,7 @@ #=============================================== print "\nWriting CSH file...\n"; - + open(CSH,">$cshfile"); print CSH "gmtset BASEMAP_TYPE plain TICK_LENGTH 0.1c LABEL_FONT_SIZE $fsize2 ANOT_FONT_SIZE $fsize3 PLOT_DEGREE_FORMAT D HEADER_FONT $fontno ANOT_FONT $fontno LABEL_FONT $fontno HEADER_FONT_SIZE $fsize1 FRAME_PEN $fpen TICK_PEN $tpen\n"; #=============================================== @@ -2282,7 +2282,7 @@ ($tmin,$tmax,$junk,$junk) = split(" ",$axlims[2]); print "\n $tmin $tmax \n @pwr_vec \n @cmx_vec \n\n"; @norm = ("1e$pwr_vec[0]","1e$pwr_vec[1]","1e$pwr_vec[2]","1e$pwr_vec[3]"); - + # make plot bounds $R1 = "-R${tmin}/${tmax}/-${cmx_vec[0]}/${cmx_vec[0]}"; $R2 = "-R${tmin}/${tmax}/-${cmx_vec[1]}/${cmx_vec[1]}"; @@ -2379,7 +2379,7 @@ #=============================================== print "\nWriting CSH file...\n"; - + open(CSH,">$cshfile"); print CSH "gmtset BASEMAP_TYPE plain TICK_LENGTH $tick LABEL_FONT_SIZE $fsize3 ANOT_FONT_SIZE $fsize3 PLOT_DEGREE_FORMAT D HEADER_FONT $fontno ANOT_FONT $fontno LABEL_FONT $fontno HEADER_FONT_SIZE $fsize2 FRAME_PEN $fpen TICK_PEN $tpen\n"; #=============================================== @@ -2398,7 +2398,7 @@ if (not -f $chifile) { die("Check if $chifile exist or not\n") } # file names for figures - $name = "talk_cg10_${strun0}"; $psfile = "$name.ps"; $jpgfile = "$name.jpg"; $epsfile = "$name.eps"; + $name = "talk_cg10_${strun0}"; $psfile = "$name.ps"; $jpgfile = "$name.jpg"; $epsfile = "$name.eps"; # number of receivers open(IN,$file3); @temp = ; $nrec = @temp; diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/src/numerical_recipes.f90 b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/src/numerical_recipes.f90 index b17b75091..e1efdce2b 100644 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/src/numerical_recipes.f90 +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/src/numerical_recipes.f90 @@ -220,9 +220,9 @@ subroutine splint(xa,ya,y2a,n,x,y) KHI=K ELSE KLO=K - ENDIF + endif goto 1 - ENDIF + endif H=XA(KHI)-XA(KLO) IF (H == 0.d0) stop 'Bad input in spline evaluation' A=(XA(KHI)-X)/H diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/src/test_smooth.f90 b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/src/test_smooth.f90 index e6da9a350..3518798bb 100644 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/src/test_smooth.f90 +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/src/test_smooth.f90 @@ -51,7 +51,7 @@ program test_smooth !!$ valence(:) = 0 !!$ do ispec = 1,NSPEC !!$ do j = 1,NGLLZ -!!$ do i = 1,NGLLX +!!$ do i = 1,NGLLX !!$ iglob = ibool(i,j,ispec) !!$ da_local(i,j,ispec) = wxgll(i)*wzgll(j)*jacobian(i,j,ispec) !!$ @@ -167,7 +167,7 @@ program test_smooth k_rough_local(:,:,:) = 0. do ispec = 1,NSPEC do j = 1,NGLLZ - do i = 1,NGLLX + do i = 1,NGLLX itemp = ibool(i,j,ispec) k_rough_local(i,j,ispec) = k_rough_global(itemp) enddo @@ -177,7 +177,7 @@ program test_smooth ! Smoothing function is a Gaussian whose full-width is given by gamma; ! all points outside d^2 (dtrsh2) are set to zero. - dtrsh2 = (1.5*gamma)**2 + dtrsh2 = (1.5*gamma)**2 ! EXAMPLE gaussian smoothing function for one point ! (1) find the closest gridpoint to the target point @@ -204,7 +204,7 @@ program test_smooth !------------------------------------ ! Compute the SMOOTHED kernel by convolving a Gaussian with the UNSMOOTHED kernel. - ! This involves integrating NGLOB products between a Gaussian and the unsmoothed kernel. + ! This involves integrating NGLOB products between a Gaussian and the unsmoothed kernel. print *, 'convolving the kernel with a Gaussian...' @@ -227,7 +227,7 @@ program test_smooth k_gaus_local(:,:,:) = 0. do ispec = 1,NSPEC do j = 1,NGLLZ - do i = 1,NGLLX + do i = 1,NGLLX itemp = ibool(i,j,ispec) dist2 = (xcen - x(itemp))**2 + (zcen - z(itemp))**2 if(dist2 <= dtrsh2) then @@ -255,14 +255,14 @@ program test_smooth if(itype==1) then ! local integration with local arrays k_gaus_int_global(iglob) = sum( k_gaus_local(:,:,:) * da_local(:,:,:) ) - k_smooth_global(iglob) = sum( k_rough_local(:,:,:) * k_gaus_local(:,:,:) * da_local(:,:,:) ) / k_gaus_int_global(iglob) + k_smooth_global(iglob) = sum( k_rough_local(:,:,:) * k_gaus_local(:,:,:) * da_local(:,:,:) ) / k_gaus_int_global(iglob) - elseif(itype==2) then ! local integration with global array + else if(itype==2) then ! local integration with global array k_temp(:,:,:) = 0. do ispec = 1,NSPEC do j = 1,NGLLZ - do i = 1,NGLLX + do i = 1,NGLLX itemp = ibool(i,j,ispec) k_temp(i,j,ispec) = k_gaus_global(itemp) * da_local(i,j,ispec) enddo @@ -273,7 +273,7 @@ program test_smooth k_temp(:,:,:) = 0. do ispec = 1,NSPEC do j = 1,NGLLZ - do i = 1,NGLLX + do i = 1,NGLLX itemp = ibool(i,j,ispec) k_temp(i,j,ispec) = k_rough_global(itemp) * k_gaus_global(itemp) * da_local(i,j,ispec) enddo @@ -281,10 +281,10 @@ program test_smooth enddo k_smooth_global(iglob) = sum( k_temp(:,:,:) ) / k_gaus_int_global(iglob) - elseif(itype==3) then ! global integration with global arrays + else if(itype==3) then ! global integration with global arrays k_gaus_int_global(iglob) = sum( k_gaus_global(:) * da_global(:) ) - k_smooth_global(iglob) = sum( k_rough_global(:) * k_gaus_global(:) * da_global(:) ) / k_gaus_int_global(iglob) + k_smooth_global(iglob) = sum( k_rough_global(:) * k_gaus_global(:) * da_global(:) ) / k_gaus_int_global(iglob) endif @@ -313,4 +313,4 @@ program test_smooth !call system('chmod 755 get_smooth.csh ; get_smooth.csh') end program test_smooth - + diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/src/wave2d.f90 b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/src/wave2d.f90 index 0d37d91b4..bf3e373ca 100644 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/src/wave2d.f90 +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/src/wave2d.f90 @@ -150,7 +150,7 @@ program wave2d double precision :: joint_str_src_grad_ratio, jsw_str, jsw_src, joint_total_weight, jfac double precision :: fac_str, fac_ts, fac_xs, fac_ys, fac_total_m ! fac_total_g double precision :: ugsq_str, ugsq_ts, ugsq_xs, ugsq_ys, ugsq_src - double precision, dimension(:), allocatable :: cov_imetric, cov_model ! icov_metric, icov_model + double precision, dimension(:), allocatable :: cov_imetric, cov_model ! icov_metric, icov_model ! conjugate gradient optimization (using line-search) double precision, dimension(:), allocatable :: pk, gk, g0, p0, m0, gt, mt, mdiff, mprior @@ -159,7 +159,7 @@ program wave2d double precision :: Pa,Pb,Pc,Pd,qfac,xx1,xx2,yy1,yy2,g1,g2,xmin ! arrays describing the structure and source parameters - ! OBSOLETE: m_src_syn_vec_initial, m_src_syn_initial, m_src_syn_vec, m_src_dat_vec, m0_vec_initial, + ! OBSOLETE: m_src_syn_vec_initial, m_src_syn_initial, m_src_syn_vec, m_src_dat_vec, m0_vec_initial, double precision, dimension(:), allocatable :: m0_vec, mt_vec, mtarget double precision, dimension(:), allocatable :: m_src_syn, m_src_dat, m_src_prior @@ -328,7 +328,7 @@ program wave2d close(19) open(20,file='INPUT/events_xyt_pert_sigmas.dat',status='unknown') - read(20,*) temp1,src_pert_dist,src_pert_time + read(20,*) temp1,src_pert_dist,src_pert_time close(20) endif @@ -380,7 +380,7 @@ program wave2d !write(*,'(4f16.6)') (coast_lon(i), coast_lat(i), coast_x(i)/1000.0, coast_z(i)/1000.0, i = 1,ncoast) else - + !---------- ! events for data @@ -553,7 +553,7 @@ program wave2d k = 0 do ispec = 1,NSPEC do j = 1,NGLLZ - do i = 1,NGLLX + do i = 1,NGLLX k = k+1 iglob = ibool(i,j,ispec) write(15,'(6i8,4e18.8)') k, ispec, i, j, iglob, valence(iglob), & @@ -597,7 +597,7 @@ program wave2d stop 'checking the GLL indexing on the elements' endif - print * + print * write(*,*) ' PROPERTIES OF THE GRID :' write(*,*) ' GLOBAL :' write(*,'(a,1f20.10)') ' da_min (m^2) : ', minval(da_global) @@ -629,7 +629,7 @@ program wave2d !-------------------------------------- - ! determine the UTM coordinates of your origin and corners + ! determine the UTM coordinates of your origin and corners if (ISURFACE==1) then utm_xmin = 0.0 ; utm_zmin = 0.0 @@ -657,7 +657,7 @@ program wave2d ! convert global gridpoint mesh coordinates to lat-lon x_lon(:) = 0.0 - z_lat(:) = 0.0 + z_lat(:) = 0.0 call mesh_geo(NGLOB,x_lon,z_lat,x,z,UTM_PROJECTION_ZONE,IMESH2LONLAT) !write(*,'(2f16.6)') (x_lon(iglob), z_lat(iglob), iglob=1,NGLOB) @@ -695,7 +695,7 @@ program wave2d x_plot(:) = x_lon(:) z_plot(:) = z_lat(:) - elseif (ISURFACE==0) then + else if (ISURFACE==0) then x_plot(:) = x(:) z_plot(:) = z(:) @@ -706,7 +706,7 @@ program wave2d t_target = 2*hdur ! target period for phase velocity map -!!$ ! homogeneous or heterogeneous phase velocity map +!!$ ! homogeneous or heterogeneous phase velocity map !!$ !!$ if (IMODEL_DAT == 1 .or. IMODEL_SYN == 1) then ! read or compute a heterogeneous map !!$ ! This calls model_files/get_socal_map.csh, which executes wave2d_socal.f90 @@ -756,7 +756,7 @@ program wave2d !!$ !!$ ! compute beta0 by finding the average of the phase velocity map !!$ print *, 'computing the average of the phase velocity map' -!!$ beta0 = 0.0 +!!$ beta0 = 0.0 !!$ do iglob = 1,NGLOB !!$ beta0 = beta0 + c_glob(iglob) * da_global(iglob) !!$ enddo @@ -774,7 +774,7 @@ program wave2d beta0 = 3500.0 ! (3500 for GJI) rho0 = DENSITY - elseif (ISURFACE==0) then + else if (ISURFACE==0) then !alpha0 = a_layers(2) ! layer 2 of SoCal model (1D) !beta0 = b_layers(2) ! layer 2 of SoCal model (1D) alpha0 = (a_layers(2)+a_layers(1))/2 @@ -795,7 +795,7 @@ program wave2d ! load in heterogeneous reference and target models ! NOTE: THESE ARE ONLY FOR A SPECIFIC MESH if ((IMODEL_SYN == 3).and.(IMODEL_DAT == 3)) then - + idir = '/data1/cig/seismo/3D/ADJOINT_TOMO/iterate_adj/SEM2D_iterate_INPUT/random_fields/' ! read in structure model for synthetics @@ -804,7 +804,7 @@ program wave2d open(unit=19,file=filename2,status='old') do ispec = 1,NSPEC do j = 1,NGLLZ - do i = 1,NGLLX + do i = 1,NGLLX read(19,'(6e20.10)') temp1, temp2, temp3, temp4, temp5, temp6 kappa_syn(i,j,ispec) = temp3 mu_syn(i,j,ispec) = temp4 @@ -819,7 +819,7 @@ program wave2d open(unit=20,file=filename2,status='old') do ispec = 1,NSPEC do j = 1,NGLLZ - do i = 1,NGLLX + do i = 1,NGLLX read(20,'(6e20.10)') temp1, temp2, temp3, temp4, temp5, temp6 kappa_dat(i,j,ispec) = temp3 mu_dat(i,j,ispec) = temp4 @@ -882,7 +882,7 @@ program wave2d beta0 = sqrt( mu0 / rho0 ) bulk0 = sqrt( kappa0 / rho0 ) !alpha0 = sum(alpha_initial_syn * da_local) / (LENGTH * HEIGHT) - !beta0 = sum(beta_initial_syn * da_local) / (LENGTH * HEIGHT) + !beta0 = sum(beta_initial_syn * da_local) / (LENGTH * HEIGHT) endif !!$ ! initial and reference velocity structure @@ -915,7 +915,7 @@ program wave2d open(unit=19,file=filename2,status='unknown') do ispec = 1,NSPEC do j = 1,NGLLZ - do i = 1,NGLLX + do i = 1,NGLLX ! CURRENT MODEL (synthetics) !read(19,*) temp1, temp2, & ! kappa_syn(i,j,ispec), mu_syn(i,j,ispec), rho_syn(i,j,ispec), & @@ -965,14 +965,14 @@ program wave2d open(unit=19,file=trim(out_dir2)//file_structure_syn,status='unknown') do ispec = 1,NSPEC do j = 1,NGLLZ - do i = 1,NGLLX + do i = 1,NGLLX iglob = ibool(i,j,ispec) ! TARGET MODEL (data) write(18,'(6e20.10)') x_plot(iglob), z_plot(iglob), & kappa_dat(i,j,ispec), mu_dat(i,j,ispec), rho_dat(i,j,ispec), & - log( beta_dat(i,j,ispec) / beta0 ) - + log( beta_dat(i,j,ispec) / beta0 ) + ! CURRENT MODEL (synthetics) write(19,'(6e20.10)') x_plot(iglob), z_plot(iglob), & kappa_syn(i,j,ispec), mu_syn(i,j,ispec), rho_syn(i,j,ispec), & @@ -1147,7 +1147,7 @@ program wave2d write(*,'(i8, 5f17.10)') i, temp1, temp2, temp3, temp4, temp5*6371.0*1000.0 enddo - elseif (ISURFACE==0) then + else if (ISURFACE==0) then print * print *, 'events, km [x_eve0_syn, z_eve0_syn, x_eve_syn, x_eve_syn, dist]:' do i = 1,nevent @@ -1212,19 +1212,19 @@ program wave2d if (ISURFACE==1) then ! read in PERTURBED events from another file (for GJI-2007 simulations) ! initialize to no perturbations from synthetics !otime_dat(:) = otime_syn(:) - !x_eve_dat(:) = x_eve_syn(:) - !z_eve_dat(:) = z_eve_syn(:) + !x_eve_dat(:) = x_eve_syn(:) + !z_eve_dat(:) = z_eve_syn(:) ! initialize to prior model ! NOTE: these arrays have different lengths otime_dat(1:nevent) = otime(1:nevent) - x_eve_dat(1:nevent) = x_eve0_syn(1:nevent) - z_eve_dat(1:nevent) = z_eve0_syn(1:nevent) + x_eve_dat(1:nevent) = x_eve0_syn(1:nevent) + z_eve_dat(1:nevent) = z_eve0_syn(1:nevent) if (PERT_SOURCE_T == 1) then otime_dat(:) = otime_dat(:) + otime_eve_dat_pert(:) endif - + if (PERT_SOURCE_X == 1) then x_eve_dat(:) = x_eve_dat(:) + x_eve_dat_pert(:) z_eve_dat(:) = z_eve_dat(:) + z_eve_dat_pert(:) @@ -1245,14 +1245,14 @@ program wave2d !!$ enddo !!$ close(19) -!!$ open(19,file='OUTPUT/run_2550/events_xy.dat',status='unknown') +!!$ open(19,file='OUTPUT/run_2550/events_xy.dat',status='unknown') !!$ do ievent = 1,25 !!$ read(19,'(3f20.10,1i12)') x_eve_dat(ievent), z_eve_dat(ievent), otime_dat(ievent), itemp1 !!$ enddo !!$ close(19) !!$ otime_dat(5) = otime_syn(5) + 0.8 ! testing for event 5 (0.8) - elseif (ISURFACE==0) then + else if (ISURFACE==0) then ! perturb the events to get target events for the synthetics ! perturbation is described as (r,theta) polar coordinates @@ -1268,7 +1268,7 @@ program wave2d ! origin time perturbation call random_number(rand1) ptime = (ptmax - ptmin)*rand1 + ptmin - !ptime = src_pert_time + !ptime = src_pert_time ! azimuthal perturbation (in radians) call random_number(rand1) @@ -1278,7 +1278,7 @@ program wave2d ! radial perturbation (in meters) call random_number(rand1) prad = (rmax - rmin)*rand1 + rmin - !prad = rmax + !prad = rmax ! fill vectors otime_dat(ievent) = otime_syn(ievent) - ptime ! NOTE THE SIGN @@ -1331,7 +1331,7 @@ program wave2d z_eve_dat(:) = z_eve_syn(:) ispec_eve_dat(:) = ispec_eve_syn(:) xi_eve_dat(:) = xi_eve_syn(:) - gamma_eve_dat(:) = gamma_eve_syn(:) + gamma_eve_dat(:) = gamma_eve_syn(:) otime_dat(:) = otime_syn(:) endif ! PERT_SOURCE @@ -1387,7 +1387,7 @@ program wave2d nrec = 3 - elseif (IREC_SPACE==2) then ! actual station locations + else if (IREC_SPACE==2) then ! actual station locations ! read in (target) receivers recfile = trim(in_dir)//'STATION_149_full' @@ -1399,7 +1399,7 @@ program wave2d read(88,*) (x_rec_lon0(i),z_rec_lat0(i),i = 1,nrec) close(88) - elseif (IREC_SPACE==4) then ! 'regular' mesh of receivers + else if (IREC_SPACE==4) then ! 'regular' mesh of receivers ! calculate mesh spacing dx = LENGTH/NMESH_REC @@ -1422,13 +1422,13 @@ program wave2d endif ! IREC_SPACE - elseif (ISURFACE==0) then ! enter target x-z + else if (ISURFACE==0) then ! enter target x-z if (IREC_SPACE==1) then ! individual receivers stop ' no individual receiver listed' - elseif (IREC_SPACE==2) then ! actual station locations - + else if (IREC_SPACE==2) then ! actual station locations + ! read in (target) receivers recfile = trim(in_dir)//'STATIONS_socal1D_rand15' ! 200 km width !recfile = trim(in_dir)//'STATIONS_socal1D_rand30' ! 400 km width @@ -1437,7 +1437,7 @@ program wave2d read(88,*) (x_rec0(i),z_rec0(i),i = 1,nrec) close(88) - elseif (IREC_SPACE==4) then ! 'regular' line of receivers (BODY waves) + else if (IREC_SPACE==4) then ! 'regular' line of receivers (BODY waves) ! calculate mesh spacing dx = LENGTH/NMESH_REC @@ -1825,7 +1825,7 @@ program wave2d ! create mprior temp_local1(:,:,:) = 0.0 - call local2mvec(temp_local1, nmod_src, m_src_prior, nmod, mprior) + call local2mvec(temp_local1, nmod_src, m_src_prior, nmod, mprior) ! create mtarget temp_local1(:,:,:) = log( beta_dat(:,:,:) / beta0 ) @@ -1921,18 +1921,18 @@ program wave2d ! NOTE: we ignore parts of the model norm that do not participate in the inversion if ( INV_STRUCT_BETA == 1 .and. INV_SOURCE_T == 0 .and. INV_SOURCE_X == 0 ) then ! structure fac_str = 1.00 - elseif ( INV_STRUCT_BETA == 0 .and. INV_SOURCE_T == 1 .and. INV_SOURCE_X == 0 ) then ! origin time + else if ( INV_STRUCT_BETA == 0 .and. INV_SOURCE_T == 1 .and. INV_SOURCE_X == 0 ) then ! origin time fac_ts = 1.00 - elseif ( INV_STRUCT_BETA == 0 .and. INV_SOURCE_T == 0 .and. INV_SOURCE_X == 1 ) then ! location + else if ( INV_STRUCT_BETA == 0 .and. INV_SOURCE_T == 0 .and. INV_SOURCE_X == 1 ) then ! location fac_xs = 0.50 ; fac_ys = 0.50 - elseif ( INV_STRUCT_BETA == 1 .and. INV_SOURCE_T == 1 .and. INV_SOURCE_X == 0 ) then ! structure + origin time + else if ( INV_STRUCT_BETA == 1 .and. INV_SOURCE_T == 1 .and. INV_SOURCE_X == 0 ) then ! structure + origin time fac_str = 0.50 ; fac_ts = 0.50 - elseif ( INV_STRUCT_BETA == 1 .and. INV_SOURCE_T == 0 .and. INV_SOURCE_X == 1 ) then ! structure + location + else if ( INV_STRUCT_BETA == 1 .and. INV_SOURCE_T == 0 .and. INV_SOURCE_X == 1 ) then ! structure + location fac_str = 0.50 ; fac_xs = 0.25 ; fac_ys = 0.25 - elseif ( INV_STRUCT_BETA == 0 .and. INV_SOURCE_T == 1 .and. INV_SOURCE_X == 1 ) then ! source + else if ( INV_STRUCT_BETA == 0 .and. INV_SOURCE_T == 1 .and. INV_SOURCE_X == 1 ) then ! source fac_ts = 0.50 ; fac_xs = 0.25 ; fac_ys = 0.25 - elseif ( INV_STRUCT_BETA == 1 .and. INV_SOURCE_T == 1 .and. INV_SOURCE_X == 1 ) then ! joint - fac_str = 1.0/2.0 ; fac_ts = 1.0/6.0 ; fac_xs = 1.0/6.0 ; fac_ys = 1.0/6.0 + else if ( INV_STRUCT_BETA == 1 .and. INV_SOURCE_T == 1 .and. INV_SOURCE_X == 1 ) then ! joint + fac_str = 1.0/2.0 ; fac_ts = 1.0/6.0 ; fac_xs = 1.0/6.0 ; fac_ys = 1.0/6.0 !fac_str = 0.85 ; fac_ts = 0.05 ; fac_xs = 0.05 ; fac_ys = 0.05 else stop 'you must invert for something' @@ -1988,7 +1988,7 @@ program wave2d !ugsq_str = 0.3352965529d6 ; ugsq_ts = 0.8068082292d3 ; ugsq_xs = 0.1209790150d4 ; ugsq_ys = 0.1391331978d4 ! Gaussians, 25 events !!$ ! ad hoc: choose balance among the four parts of the gradient -!!$ fac_str = 1.0/2.0 ; fac_ts = 1.0/6.0 ; fac_xs = 1.0/6.0 ; fac_ys = 1.0/6.0 +!!$ fac_str = 1.0/2.0 ; fac_ts = 1.0/6.0 ; fac_xs = 1.0/6.0 ; fac_ys = 1.0/6.0 !!$ !fac_str = 1.0/4.0 ; fac_ts = 1.0/4.0 ; fac_xs = 1.0/4.0 ; fac_ys = 1.0/4.0 !!$ !fac_str = 0.7 ; fac_ts = 0.1 ; fac_xs = 0.1 ; fac_ys = 0.1 !!$ !fac_str = 0.85 ; fac_ts = 0.05 ; fac_xs = 0.05 ; fac_ys = 0.05 @@ -2011,7 +2011,7 @@ program wave2d ! TESTING !covm_weight_parts(:) = 1.0 - !covg_weight_parts(:) = 1.0 + !covg_weight_parts(:) = 1.0 ! Re-set any weights that are 0.0 to 1.0; these portions of the covariance matrix ! should not play a role, since the corresponding gradients will always be 0.0. @@ -2104,7 +2104,7 @@ program wave2d write(19,'(5e14.6)') sum(da_local(:,:,:)), sum(da_local_vec(:)), sum(da_global(:)), LENGTH*HEIGHT, AREA write(19,'(3e14.6)') minval(da_local_vec(:)), maxval(da_local_vec(:)), sum(da_local_vec(:))/NLOCAL write(19,'(3e14.6)') minval(da_global(:)), maxval(da_global(:)), sum(da_global(:))/NGLOB -!!$ write(19,*) +!!$ write(19,*) !!$ write(19,*) 'COVERAGE WEIGHTS: ' !!$ write(19,'(2f14.6)') coverage_str, coverage_src !!$ write(19,*) 'JOINT WEIGHTS (based on unbalanced gradients): ' @@ -2172,12 +2172,12 @@ program wave2d ! data covariance allocate(cov_data(nmeas)) cov_data(:) = 0.0 - + if (IKER==0) then cov_data(:) = SIGMA_WAVEFORM * SIGMA_WAVEFORM * nmeas_run - elseif (IKER==1) then + else if (IKER==1) then cov_data(:) = SIGMA_DT * SIGMA_DT * nmeas_run - elseif (IKER==2) then + else if (IKER==2) then cov_data(:) = SIGMA_DLNA * SIGMA_DLNA * nmeas_run endif @@ -2201,12 +2201,12 @@ program wave2d ! load measurement perturbations if ( ADD_DATA_ERRORS ) then - if (nmeas .ge. 10000) stop 'measurement error file only contains 10000 lines' + if (nmeas >= 10000) stop 'measurement error file only contains 10000 lines' allocate(measure_pert_vec(nmeas)) measure_pert_vec(:) = 0.0 - ! By reading in the same set of perturbations, rather than generating + ! By reading in the same set of perturbations, rather than generating ! a new distrubution each time, we can be sure that the data errors will ! not influence the convergence. open(55,file=trim(in_dir)//'sigma_0p1_pert.dat',status='unknown') @@ -2214,7 +2214,7 @@ program wave2d read(55,*) measure_pert_vec(i) enddo close(55) - + ! check this by writing to file open(55,file=trim(out_dir2)//'data_errors_added.dat',status='unknown') do i = 1,nmeas @@ -2266,7 +2266,7 @@ program wave2d if (itest==0) then ! reference model (current model) call mvec2local(nmod, nmod_src, m0_vec, beta_syn, m_src_syn) - elseif (itest==1) then ! test model + else if (itest==1) then ! test model call mvec2local(nmod, nmod_src, mt_vec, beta_syn, m_src_syn) endif @@ -2319,7 +2319,7 @@ program wave2d call compute_norm_sq(filename, imnorm, & ievent_min, ievent_max, nevent, index_source, nmod, & m0, mprior, cov_model, model_norm_parts, covm_weight_parts) - elseif (itest==1) then ! test model + else if (itest==1) then ! test model call compute_norm_sq(filename, imnorm, & ievent_min, ievent_max, nevent, index_source, nmod, & mt, mprior, cov_model, model_norm_parts, covm_weight_parts) @@ -2353,7 +2353,7 @@ program wave2d mdiff(:) = 0.0 if (itest==0) then mdiff = mtarget - m0 + mprior - elseif (itest==1) then + else if (itest==1) then mdiff = mtarget - mt + mprior endif @@ -2442,7 +2442,7 @@ program wave2d !z_src_lat0(1) = z_eve_lat_syn(ievent) nsrc = 1 - elseif (ISRC_SPACE==2) then ! finite source segment + else if (ISRC_SPACE==2) then ! finite source segment ! specify the target starting point of the fault, the azimuth, and the length x_src_lon_i = -119.0 ; z_src_lat_i = 33.0 ; flen = 100.0d+03 ! short fault @@ -2470,19 +2470,19 @@ program wave2d ! get target fault points in lat-lon call mesh_geo(MAX_SR,x_src_lon0,z_src_lat0,x_src0,z_src0,UTM_PROJECTION_ZONE,IUTM2LONGLAT) - elseif (ISRC_SPACE==3) then ! California continental shelf (OMS) + else if (ISRC_SPACE==3) then ! California continental shelf (OMS) x_src_lon0(1:nshelf) = shelf_lon(1:nshelf) z_src_lat0(1:nshelf) = shelf_lat(1:nshelf) - nsrc = nshelf + nsrc = nshelf - elseif (ISRC_SPACE==4) then ! California coastline (OMS) + else if (ISRC_SPACE==4) then ! California coastline (OMS) x_src_lon0(1:ncoast) = coast_lon(1:ncoast) z_src_lat0(1:ncoast) = coast_lat(1:ncoast) nsrc = ncoast - elseif (ISRC_SPACE==5) then ! finite circular region + else if (ISRC_SPACE==5) then ! finite circular region ! lat-lon of the center point xcen_lon = -119.0 @@ -2642,7 +2642,7 @@ program wave2d x_src_dat(1) = x_eve_dat(ievent) z_src_dat(1) = z_eve_dat(ievent) origin_time_dat = otime_dat(ievent) - if (ISURFACE==1) then + if (ISURFACE==1) then x_src_lon_dat(1) = x_eve_lon_dat(ievent) z_src_lat_dat(1) = z_eve_lat_dat(ievent) endif @@ -2722,7 +2722,7 @@ program wave2d write(*,'(i8, 5f17.10)') i, temp1, temp2, temp3, temp4, temp5*6371.0*1000.0 enddo - elseif (ISURFACE==0) then + else if (ISURFACE==0) then print * print *, 'sources [x_src_dat, z_src_dat, x_src, z_src, dist (m)]:' do i = 1,nsrc @@ -2778,7 +2778,7 @@ program wave2d f0(1) = FNORM * FOR_X f0(2) = FNORM * FOR_Y f0(3) = FNORM * FOR_Z - elseif (ISURFACE==1) then + else if (ISURFACE==1) then f0(1) = FNORM else stop 'NCOMP must be 1 or 3' @@ -2790,7 +2790,7 @@ program wave2d ! source function for data (includes the source magnitude f0) allocate(samp_dat(NSTEP,NCOMP,nsrc)) - samp_dat = 0.0 + samp_dat = 0.0 do i = 1,nsrc do icomp = 1,NCOMP samp_dat(:, icomp, i) = stf_dat(:) * f0(icomp) @@ -2799,11 +2799,11 @@ program wave2d ! source time function for SYNTHETICS (allows for iterative origin time perturbations) stf_syn(:) = 0.0 - call get_source_time_function(origin_time_syn,stf_syn,ti) + call get_source_time_function(origin_time_syn,stf_syn,ti) ! source function for synthetics (includes the source magnitude f0) allocate(samp(NSTEP,NCOMP,nsrc)) - samp = 0.0 + samp = 0.0 do i = 1,nsrc do icomp = 1,NCOMP samp(:, icomp, i) = stf_syn(:) * f0(icomp) @@ -2869,7 +2869,7 @@ program wave2d ! only write the files for the first event, since they are the same for each event if (ifirst_event == 1) then - + ! write velocity structure for data and synthetics to file -- LOCAL LEVEL file_structure_dat = 'structure_dat.dat' file_structure_syn = 'structure_syn.dat' @@ -2877,13 +2877,13 @@ program wave2d open(unit=19,file=trim(out_dir1)//file_structure_syn,status='unknown') do ispec = 1,NSPEC do j = 1,NGLLZ - do i = 1,NGLLX + do i = 1,NGLLX iglob = ibool(i,j,ispec) ! TARGET MODEL (data) write(18,'(6e20.10)') x_plot(iglob), z_plot(iglob), & kappa_dat(i,j,ispec), mu_dat(i,j,ispec), rho_dat(i,j,ispec), & - log( beta_dat(i,j,ispec) / beta0 ) + log( beta_dat(i,j,ispec) / beta0 ) ! CURRENT MODEL (synthetics) write(19,'(6e20.10)') x_plot(iglob), z_plot(iglob), & @@ -2939,7 +2939,7 @@ program wave2d m_src_dat(itemp1) - m_src_dat(itemp1), & m_src_dat(itemp2) - m_src_dat(itemp2), & m_src_dat(itemp3) - m_src_dat(itemp3) - + ! sources for synthetics write(20,'(8e20.10)') xtemp, ztemp, & m_src_syn(itemp1), m_src_syn(itemp2), m_src_syn(itemp3), & @@ -3101,8 +3101,8 @@ program wave2d call mtm_adj(ievent, nrec, syn, tstart, tend, adj_syn, data, data_recon) if (WRITE_SEISMO_RECONSTRUCT) call write_seismogram(data_recon, nrec, trim(out_dir)//'dat_recon') - - ! specify which components you want to send back + + ! specify which components you want to send back if (ISURFACE==0) then if (REV_X == 0) adj_syn(:,1,:) = 0.0 if (REV_Y == 0) adj_syn(:,2,:) = 0.0 @@ -3122,7 +3122,7 @@ program wave2d !!$ open(19,file=filename1,status='unknown') !!$ if (IKER <= 4) write(19,'(7a,f12.6)') trim(script_dir)//trim(filename2),' ', & !!$ trim(out_dir),' ', trim(data_tag) ,' ','1', tshift -!!$ write(19,'(7a,f12.6)') trim(script_dir)//trim(filename2),' ', & +!!$ write(19,'(7a,f12.6)') trim(script_dir)//trim(filename2),' ', & !!$ trim(out_dir),' ', trim(syn_tag) ,' ','1', tshift !!$ if (WRITE_STF_A) write(19,'(7a,f12.6)') trim(script_dir)//trim(filename2),' ', & !!$ trim(out_dir),' ', trim(stfadj_tag),' ','1', tshift @@ -3184,7 +3184,7 @@ program wave2d nrec, rglob, ispec_rec, hxir_store, hgammar_store, adj_syn, & trim(last_frame_name), absorb_field, & atype_kernel, btype_kernel, rtype_kernel, three_source_model, stf_syn, f0) - + !---------------------- ! gradient vector for source parameters @@ -3210,7 +3210,7 @@ program wave2d enddo deallocate(three_source_model) - !---------------------- + !---------------------- ! smooth EACH event kernel for the data subspace method if (ISMOOTH_EVENT_KERNEL == 1) then @@ -3226,13 +3226,13 @@ program wave2d !!$ if (ISMOOTH_EVENT_KERNEL == 1) then ! write smoothed beta kernel to file - open(unit = 13, file = trim(out_dir)//'kernel_basis_smooth', status = 'unknown',iostat=ios) + open(unit = 13, file = trim(out_dir)//'kernel_basis_smooth', status = 'unknown',iostat=ios) if (ios /= 0) stop 'Error writing smoothed kernel to disk' k = 1 ktemp(:) = 0.0 do ispec = 1,NSPEC do j = 1,NGLLZ - do i = 1,NGLLX + do i = 1,NGLLX iglob = ibool(i,j,ispec) write(13,'(4e16.6)') x_plot(iglob), z_plot(iglob), & kbeta_smooth(i,j,ispec), btype_kernel(i,j,ispec) @@ -3340,8 +3340,8 @@ program wave2d model_norm_target, model_norm_target_struct, model_norm_target_source write(91,'(a30,3e16.8)') ' model_norm2_diff(m) : ', & model_norm_diff, model_norm_diff_struct, model_norm_diff_source - !write(91,'(a30,1e16.8)') ' chi_model_stop(mtarget) : ', chi_model_stop - write(91,'(a30,1e16.8)') ' chi_data_stop : ', chi_data_stop + !write(91,'(a30,1e16.8)') ' chi_model_stop(mtarget) : ', chi_model_stop + write(91,'(a30,1e16.8)') ' chi_data_stop : ', chi_data_stop write(91,'(a30,1e16.8)') ' chi(m) : ', chi_val endif @@ -3353,13 +3353,13 @@ program wave2d print *, ' data_norm <= 2(chi_data_stop) : ', data_norm, 2.0*chi_data_stop endif - !if ( itest==0 .and. (chi_val .ge. chi_k_val) ) then + !if ( itest==0 .and. (chi_val >= chi_k_val) ) then if ( itest==0 .and. var_red_val < VAR_RED_MIN ) then stop_cg = .true. print *, ' chi_k_val : ', chi_k_val print *, ' chi_val : ', chi_val print *, ' var_red_val : ', var_red_val - print *, ' VAR_RED_MIN : ', VAR_RED_MIN + print *, ' VAR_RED_MIN : ', VAR_RED_MIN print *, ' var_red_val < VAR_RED_MIN' endif @@ -3433,7 +3433,7 @@ program wave2d if ( ISMOOTH_MISFIT_KERNEL == 1) then call smooth_function(btype_kernel_sum, GAMMA_SMOOTH_KERNEL, kbeta_smooth) else - kbeta_smooth = btype_kernel_sum + kbeta_smooth = btype_kernel_sum endif !kbulk_smooth = 0.0 ! testing for S-wave only @@ -3454,8 +3454,8 @@ program wave2d gradient_model(:) = (m0(:) - mprior(:)) / cov_imetric(:) !gradient_model(:) = (m0(:) - mprior(:)) / cov_model(:) else - gradient_model(:) = (mt(:) - mprior(:)) / cov_imetric(:) - !gradient_model(:) = (mt(:) - mprior(:)) / cov_model(:) + gradient_model(:) = (mt(:) - mprior(:)) / cov_imetric(:) + !gradient_model(:) = (mt(:) - mprior(:)) / cov_model(:) endif endif @@ -3531,7 +3531,7 @@ program wave2d !!$ !scale_struct_gji = sqrt( norm_source_2 / (norm_bulk_2 + norm_beta_2) ) !!$ scale_struct_gji = sqrt( gradient_norm_source / gradient_norm_struct ) !!$ open(unit=19,file=trim(out_dir1)//'scaling_gji.dat',status='unknown') -!!$ write(19,'(1e20.10)') scale_struct_gji +!!$ write(19,'(1e20.10)') scale_struct_gji !!$ close(19) !!$ ! write gradient norms to file @@ -3565,8 +3565,8 @@ program wave2d !!$ call write_norm_sq(filename3,gradient_norm_model_parts) !stop 'TESTING GRADIENT NORMS' - - ! update balance using unweighted gradient norm -- see cov_imetric above + + ! update balance using unweighted gradient norm -- see cov_imetric above ! NOTE 1: this will only use gradient for non-test models (itest=0) ! NOTE 2: do you want this for the first step only (istep=0) or each step if ( (istep==0) .and. (0==1) ) then @@ -3675,7 +3675,7 @@ program wave2d else beta_val_top = sum((gk(:) - g0(:)) * (cov_imetric(:)*gk(:)) ) beta_val_bot = sum(g0(:) * (cov_imetric(:)*g0(:)) ) - beta_val = beta_val_top / beta_val_bot + beta_val = beta_val_top / beta_val_bot endif pk(:) = -cov_imetric(:) * gk(:) + beta_val * p0(:) @@ -3691,7 +3691,7 @@ program wave2d ! KEY: test value for line-search to get test model ! You must be careful to define the metric for the dot product operation. ! Here, we use a diagonal covariance matrix; for a full covariance matrix, - ! the operation would be : g_k C^kl p_l + ! the operation would be : g_k C^kl p_l ! The minimum of the test-model parameter should go through 0.5, which ! is the misfit if all the data are fit within the uncertainties specified by @@ -3700,7 +3700,7 @@ program wave2d !mu_val = 0.0 lam_t_val_bot = sum( gk(:) * pk(:) ) ! ghat dot p - lam_t_val = 2.0*(mu_val - chi_k_val) / lam_t_val_bot + lam_t_val = 2.0*(mu_val - chi_k_val) / lam_t_val_bot ! alternative approach (more ad hoc) !lam_t_val = -2.0*(1.0 - mu_val)*chi_k_val / sum( gk(:) * pk(:) ) @@ -3758,7 +3758,7 @@ program wave2d write(19,'(5e16.8)') mu_val, lam_t_val_bot, lam_t_val, beta_val, chi_k_val close(19) - elseif (itest==1) then ! if present kernel is for a test model + else if (itest==1) then ! if present kernel is for a test model chi_t_val = chi_val @@ -3768,7 +3768,7 @@ program wave2d yy1 = chi_k_val yy2 = chi_t_val g1 = sum(g0(:) * pk(:)) - !g1 = dot_product(g0, pk) ! GJI paper + !g1 = dot_product(g0, pk) ! GJI paper if (POLY_ORDER == 3) then ! use cubic polynomial: six values gives an analytical minimum @@ -3790,7 +3790,7 @@ program wave2d qfac = Pb**2.0 - 3.0*Pa*Pc if (Pa /= 0.0 .and. qfac >= 0.0) then xmin = (-Pb + sqrt(qfac)) / (3.0*Pa) - elseif (Pa == 0.0 .and. Pb /= 0.0) then + else if (Pa == 0.0 .and. Pb /= 0.0) then xmin = -Pc/(2.0*Pb) else print *, 'Pa, Pb, Pc, Pd, qfac: ',Pa,Pb,Pc,Pd,qfac @@ -3943,7 +3943,7 @@ program wave2d !deallocate(m_src_syn_vec,m_src_dat_vec) !deallocate(m0_vec_initial,m_src_syn_vec_initial,m_src_syn_initial) !deallocate(m_scale_src_all) - + deallocate(cov_data,index_data,index_source) if (ADD_DATA_ERRORS) deallocate(measure_pert_vec) diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/src/wave2d_cmap.f90 b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/src/wave2d_cmap.f90 index 03587fa9b..bf046d942 100644 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/src/wave2d_cmap.f90 +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/src/wave2d_cmap.f90 @@ -55,7 +55,7 @@ program wave2d_cmap integer :: isolver, irun0, irun, idat, iopt, ispec, istep !********* PROGRAM STARTS HERE ********************* - + irun0 = 420 !out_dir2 = "OUTPUT/" @@ -85,7 +85,7 @@ program wave2d_cmap da(:) = 0. do ispec = 1,NSPEC do j = 1,NGLLZ - do i = 1,NGLLX + do i = 1,NGLLX iglob = ibool(i,j,ispec) da(iglob) = da(iglob) + wxgll(i)*wzgll(j)*jacobian(i,j,ispec) enddo @@ -173,7 +173,7 @@ program wave2d_cmap ! convert global gridpoint mesh coordinates to lat-lon x_lon(:) = 0. - z_lat(:) = 0. + z_lat(:) = 0. call mesh_geo(NGLOB,x_lon,z_lat,x,z,UTM_PROJECTION_ZONE,IMESH2LONLAT) !write(*,'(2f16.6)') (x_lon(iglob), z_lat(iglob), iglob=1,NGLOB) @@ -211,7 +211,7 @@ program wave2d_cmap open(unit=17,file=filename,status='unknown') read(17,*) c0 close(17) - + ! convert km/s --> m/s c_glob(:) = 1000.*c_glob(:) c0 = c0*1000. @@ -266,7 +266,7 @@ program wave2d_cmap k_temp(:,:,:) = 0. do ispec = 1,NSPEC do j = 1,NGLLZ - do i = 1,NGLLX + do i = 1,NGLLX itemp = ibool(i,j,ispec) k_temp(i,j,ispec) = k_gaus_global(itemp) * wxgll(i)*wzgll(j)*jacobian(i,j,ispec) enddo @@ -279,7 +279,7 @@ program wave2d_cmap k_temp(:,:,:) = 0. do ispec = 1,NSPEC do j = 1,NGLLZ - do i = 1,NGLLX + do i = 1,NGLLX itemp = ibool(i,j,ispec) k_temp(i,j,ispec) = k_rough_global(itemp) * k_gaus_global(itemp) * wxgll(i)*wzgll(j)*jacobian(i,j,ispec) enddo @@ -293,7 +293,7 @@ program wave2d_cmap enddo !============================================ - + !k_smooth_global(:) = c_glob(:) ! c-maps for data @@ -365,4 +365,4 @@ program wave2d_cmap !deallocate(x,z,x_lon,z_lat,c_glob,c_glob_syn,c_glob_dat) end program wave2d_cmap - + diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/src/wave2d_constants.f90 b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/src/wave2d_constants.f90 index 999a29d70..e3bdb0443 100644 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/src/wave2d_constants.f90 +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/src/wave2d_constants.f90 @@ -75,7 +75,7 @@ module wave2d_constants ! mesh specifications: membrane surface waves double precision, parameter :: LENGTH = 480.0d3 ! m double precision, parameter :: HEIGHT = 480.0d3 ! m - double precision, parameter :: AREA = LENGTH*HEIGHT + double precision, parameter :: AREA = LENGTH*HEIGHT integer, parameter :: NEX = 40 integer, parameter :: NEZ = 40 !!$ @@ -99,15 +99,15 @@ module wave2d_constants ! reference model and target model choice integer, parameter :: IMODEL_SYN = 0 integer, parameter :: IMODEL_DAT = 2 - logical, parameter :: M0ISMPRIOR = .true. + logical, parameter :: M0ISMPRIOR = .true. !----------------------------------------------------------------------------------------- - ! 0 1 2 3 + ! 0 1 2 3 !----------------------------------------------------------------------------------------- ! ISURFACE=1, IMODEL_SYN : homo checker het ! ISURFACE=1, IMODEL_DAT : homo pert checker pert het !----------------------------------------------------------------------------------------- - ! ISURFACE=0, IMODEL_SYN : homo 1D model checker NA - ! ISURFACE=0, IMODEL_DAT : homo pert 1D model checker pert NA + ! ISURFACE=0, IMODEL_SYN : homo 1D model checker NA + ! ISURFACE=0, IMODEL_DAT : homo pert 1D model checker pert NA !----------------------------------------------------------------------------------------- ! smooth the structure model or kernels @@ -122,7 +122,7 @@ module wave2d_constants ! body waves : 10 double precision, parameter :: SIGMA_SMOOTH_KERNEL = 2.121320d4 double precision, parameter :: SIGMA_SMOOTH_MODEL = 1.060660d4 - double precision, parameter :: GAMMA_SMOOTH_KERNEL = sqrt(8.0)*SIGMA_SMOOTH_KERNEL + double precision, parameter :: GAMMA_SMOOTH_KERNEL = sqrt(8.0)*SIGMA_SMOOTH_KERNEL double precision, parameter :: GAMMA_SMOOTH_MODEL = sqrt(8.0)*SIGMA_SMOOTH_MODEL ! parameters for smoothing @@ -159,7 +159,7 @@ module wave2d_constants logical, parameter :: WRITE_STF_A = .false. logical, parameter :: WRITE_SEISMO_A = .false. ! source inversions - ! logical, parameter :: WRITE_SPECTRA_A = .false. + ! logical, parameter :: WRITE_SPECTRA_A = .false. ! logical, parameter :: WRITE_SPECTRAL_MAP_A = .false. logical, parameter :: WRITE_KERNELS = .true. ! write all nine kernels @@ -179,11 +179,11 @@ module wave2d_constants ! stopping criteria ! NITERATION : number of iterations ! VAR_RED_MIN : minimum variance reduction - ! SIGMA_FAC : stop if a model value exceeds SIGMA_FAC * sigma_m + ! SIGMA_FAC : stop if a model value exceeds SIGMA_FAC * sigma_m ! CONV_STOP : stop when the misfit value is this fraction of the INITIAL misfit value integer, parameter :: NITERATION = 2 double precision, parameter :: VAR_RED_MIN = 0.05d0 - !double precision, parameter :: SIGMA_FAC = 2.0d0 + !double precision, parameter :: SIGMA_FAC = 2.0d0 !double precision, parameter :: CONV_STOP = 1.0d-4 ! Gaussian errors containted in input file @@ -211,7 +211,7 @@ module wave2d_constants integer, parameter :: INV_SOURCE_X = 0 ! whether to include the model norm term in the misfit function, which acts like damping - logical, parameter :: INCLUDE_MODEL_NORM = .true. + logical, parameter :: INCLUDE_MODEL_NORM = .true. ! log file showing source loactions logical, parameter :: ISOURCE_LOG = .true. @@ -250,7 +250,7 @@ module wave2d_constants !--------------------------------------------------------------- ! CHT: do not change these - ! UTM zone for Southern California region + ! UTM zone for Southern California region ! integer, parameter :: UTM_PROJECTION_ZONE = 11 ! to suppress UTM projection for SCEC benchmarks @@ -322,7 +322,7 @@ module wave2d_constants !!$ double precision, parameter :: trbdndw = 0.3, a = 30.0 !!$ integer, parameter :: passes = 2, iord = 4 !!$ -!!$! +!!$! !!$! MULTI-TAPER PARAMETERS !!$! !!$! Ying Zhou: The fit between the recovered data and the data can be improved diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/src/wave2d_constants_ex00.f90 b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/src/wave2d_constants_ex00.f90 index 999a29d70..e3bdb0443 100644 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/src/wave2d_constants_ex00.f90 +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/src/wave2d_constants_ex00.f90 @@ -75,7 +75,7 @@ module wave2d_constants ! mesh specifications: membrane surface waves double precision, parameter :: LENGTH = 480.0d3 ! m double precision, parameter :: HEIGHT = 480.0d3 ! m - double precision, parameter :: AREA = LENGTH*HEIGHT + double precision, parameter :: AREA = LENGTH*HEIGHT integer, parameter :: NEX = 40 integer, parameter :: NEZ = 40 !!$ @@ -99,15 +99,15 @@ module wave2d_constants ! reference model and target model choice integer, parameter :: IMODEL_SYN = 0 integer, parameter :: IMODEL_DAT = 2 - logical, parameter :: M0ISMPRIOR = .true. + logical, parameter :: M0ISMPRIOR = .true. !----------------------------------------------------------------------------------------- - ! 0 1 2 3 + ! 0 1 2 3 !----------------------------------------------------------------------------------------- ! ISURFACE=1, IMODEL_SYN : homo checker het ! ISURFACE=1, IMODEL_DAT : homo pert checker pert het !----------------------------------------------------------------------------------------- - ! ISURFACE=0, IMODEL_SYN : homo 1D model checker NA - ! ISURFACE=0, IMODEL_DAT : homo pert 1D model checker pert NA + ! ISURFACE=0, IMODEL_SYN : homo 1D model checker NA + ! ISURFACE=0, IMODEL_DAT : homo pert 1D model checker pert NA !----------------------------------------------------------------------------------------- ! smooth the structure model or kernels @@ -122,7 +122,7 @@ module wave2d_constants ! body waves : 10 double precision, parameter :: SIGMA_SMOOTH_KERNEL = 2.121320d4 double precision, parameter :: SIGMA_SMOOTH_MODEL = 1.060660d4 - double precision, parameter :: GAMMA_SMOOTH_KERNEL = sqrt(8.0)*SIGMA_SMOOTH_KERNEL + double precision, parameter :: GAMMA_SMOOTH_KERNEL = sqrt(8.0)*SIGMA_SMOOTH_KERNEL double precision, parameter :: GAMMA_SMOOTH_MODEL = sqrt(8.0)*SIGMA_SMOOTH_MODEL ! parameters for smoothing @@ -159,7 +159,7 @@ module wave2d_constants logical, parameter :: WRITE_STF_A = .false. logical, parameter :: WRITE_SEISMO_A = .false. ! source inversions - ! logical, parameter :: WRITE_SPECTRA_A = .false. + ! logical, parameter :: WRITE_SPECTRA_A = .false. ! logical, parameter :: WRITE_SPECTRAL_MAP_A = .false. logical, parameter :: WRITE_KERNELS = .true. ! write all nine kernels @@ -179,11 +179,11 @@ module wave2d_constants ! stopping criteria ! NITERATION : number of iterations ! VAR_RED_MIN : minimum variance reduction - ! SIGMA_FAC : stop if a model value exceeds SIGMA_FAC * sigma_m + ! SIGMA_FAC : stop if a model value exceeds SIGMA_FAC * sigma_m ! CONV_STOP : stop when the misfit value is this fraction of the INITIAL misfit value integer, parameter :: NITERATION = 2 double precision, parameter :: VAR_RED_MIN = 0.05d0 - !double precision, parameter :: SIGMA_FAC = 2.0d0 + !double precision, parameter :: SIGMA_FAC = 2.0d0 !double precision, parameter :: CONV_STOP = 1.0d-4 ! Gaussian errors containted in input file @@ -211,7 +211,7 @@ module wave2d_constants integer, parameter :: INV_SOURCE_X = 0 ! whether to include the model norm term in the misfit function, which acts like damping - logical, parameter :: INCLUDE_MODEL_NORM = .true. + logical, parameter :: INCLUDE_MODEL_NORM = .true. ! log file showing source loactions logical, parameter :: ISOURCE_LOG = .true. @@ -250,7 +250,7 @@ module wave2d_constants !--------------------------------------------------------------- ! CHT: do not change these - ! UTM zone for Southern California region + ! UTM zone for Southern California region ! integer, parameter :: UTM_PROJECTION_ZONE = 11 ! to suppress UTM projection for SCEC benchmarks @@ -322,7 +322,7 @@ module wave2d_constants !!$ double precision, parameter :: trbdndw = 0.3, a = 30.0 !!$ integer, parameter :: passes = 2, iord = 4 !!$ -!!$! +!!$! !!$! MULTI-TAPER PARAMETERS !!$! !!$! Ying Zhou: The fit between the recovered data and the data can be improved diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/src/wave2d_constants_ex01.f90 b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/src/wave2d_constants_ex01.f90 index 022ebcbdc..b38b97b51 100644 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/src/wave2d_constants_ex01.f90 +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/src/wave2d_constants_ex01.f90 @@ -75,7 +75,7 @@ module wave2d_constants ! mesh specifications: membrane surface waves double precision, parameter :: LENGTH = 480.0d3 ! m double precision, parameter :: HEIGHT = 480.0d3 ! m - double precision, parameter :: AREA = LENGTH*HEIGHT + double precision, parameter :: AREA = LENGTH*HEIGHT integer, parameter :: NEX = 40 integer, parameter :: NEZ = 40 !!$ @@ -99,15 +99,15 @@ module wave2d_constants ! reference model and target model choice integer, parameter :: IMODEL_SYN = 0 integer, parameter :: IMODEL_DAT = 2 - logical, parameter :: M0ISMPRIOR = .true. + logical, parameter :: M0ISMPRIOR = .true. !----------------------------------------------------------------------------------------- - ! 0 1 2 3 + ! 0 1 2 3 !----------------------------------------------------------------------------------------- ! ISURFACE=1, IMODEL_SYN : homo checker het ! ISURFACE=1, IMODEL_DAT : homo pert checker pert het !----------------------------------------------------------------------------------------- - ! ISURFACE=0, IMODEL_SYN : homo 1D model checker NA - ! ISURFACE=0, IMODEL_DAT : homo pert 1D model checker pert NA + ! ISURFACE=0, IMODEL_SYN : homo 1D model checker NA + ! ISURFACE=0, IMODEL_DAT : homo pert 1D model checker pert NA !----------------------------------------------------------------------------------------- ! smooth the structure model or kernels @@ -122,7 +122,7 @@ module wave2d_constants ! body waves : 10 double precision, parameter :: SIGMA_SMOOTH_KERNEL = 2.121320d4 double precision, parameter :: SIGMA_SMOOTH_MODEL = 1.060660d4 - double precision, parameter :: GAMMA_SMOOTH_KERNEL = sqrt(8.0)*SIGMA_SMOOTH_KERNEL + double precision, parameter :: GAMMA_SMOOTH_KERNEL = sqrt(8.0)*SIGMA_SMOOTH_KERNEL double precision, parameter :: GAMMA_SMOOTH_MODEL = sqrt(8.0)*SIGMA_SMOOTH_MODEL ! parameters for smoothing @@ -159,7 +159,7 @@ module wave2d_constants logical, parameter :: WRITE_STF_A = .false. logical, parameter :: WRITE_SEISMO_A = .false. ! source inversions - ! logical, parameter :: WRITE_SPECTRA_A = .false. + ! logical, parameter :: WRITE_SPECTRA_A = .false. ! logical, parameter :: WRITE_SPECTRAL_MAP_A = .false. logical, parameter :: WRITE_KERNELS = .true. ! write all nine kernels @@ -179,11 +179,11 @@ module wave2d_constants ! stopping criteria ! NITERATION : number of iterations ! VAR_RED_MIN : minimum variance reduction - ! SIGMA_FAC : stop if a model value exceeds SIGMA_FAC * sigma_m + ! SIGMA_FAC : stop if a model value exceeds SIGMA_FAC * sigma_m ! CONV_STOP : stop when the misfit value is this fraction of the INITIAL misfit value integer, parameter :: NITERATION = 16 double precision, parameter :: VAR_RED_MIN = 0.05d0 - !double precision, parameter :: SIGMA_FAC = 2.0d0 + !double precision, parameter :: SIGMA_FAC = 2.0d0 !double precision, parameter :: CONV_STOP = 1.0d-4 ! Gaussian errors containted in input file @@ -211,7 +211,7 @@ module wave2d_constants integer, parameter :: INV_SOURCE_X = 0 ! whether to include the model norm term in the misfit function, which acts like damping - logical, parameter :: INCLUDE_MODEL_NORM = .true. + logical, parameter :: INCLUDE_MODEL_NORM = .true. ! log file showing source loactions logical, parameter :: ISOURCE_LOG = .true. @@ -250,7 +250,7 @@ module wave2d_constants !--------------------------------------------------------------- ! CHT: do not change these - ! UTM zone for Southern California region + ! UTM zone for Southern California region ! integer, parameter :: UTM_PROJECTION_ZONE = 11 ! to suppress UTM projection for SCEC benchmarks @@ -322,7 +322,7 @@ module wave2d_constants !!$ double precision, parameter :: trbdndw = 0.3, a = 30.0 !!$ integer, parameter :: passes = 2, iord = 4 !!$ -!!$! +!!$! !!$! MULTI-TAPER PARAMETERS !!$! !!$! Ying Zhou: The fit between the recovered data and the data can be improved diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/src/wave2d_constants_ex02.f90 b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/src/wave2d_constants_ex02.f90 index e4250dbe5..f4d72edd0 100644 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/src/wave2d_constants_ex02.f90 +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/src/wave2d_constants_ex02.f90 @@ -75,7 +75,7 @@ module wave2d_constants ! mesh specifications: membrane surface waves double precision, parameter :: LENGTH = 480.0d3 ! m double precision, parameter :: HEIGHT = 480.0d3 ! m - double precision, parameter :: AREA = LENGTH*HEIGHT + double precision, parameter :: AREA = LENGTH*HEIGHT integer, parameter :: NEX = 40 integer, parameter :: NEZ = 40 !!$ @@ -100,13 +100,13 @@ module wave2d_constants integer, parameter :: IMODEL_SYN = 0 integer, parameter :: IMODEL_DAT = 2 !----------------------------------------------------------------------------------------- - ! 0 1 2 3 + ! 0 1 2 3 !----------------------------------------------------------------------------------------- ! ISURFACE=1, IMODEL_SYN : homo checker het ! ISURFACE=1, IMODEL_DAT : homo pert checker pert het !----------------------------------------------------------------------------------------- - ! ISURFACE=0, IMODEL_SYN : homo 1D model checker NA - ! ISURFACE=0, IMODEL_DAT : homo pert 1D model checker pert NA + ! ISURFACE=0, IMODEL_SYN : homo 1D model checker NA + ! ISURFACE=0, IMODEL_DAT : homo pert 1D model checker pert NA !----------------------------------------------------------------------------------------- ! smooth the structure model or kernels @@ -121,7 +121,7 @@ module wave2d_constants ! body waves : 10 double precision, parameter :: SIGMA_SMOOTH_KERNEL = 2.121320d4 double precision, parameter :: SIGMA_SMOOTH_MODEL = 1.060660d4 - double precision, parameter :: GAMMA_SMOOTH_KERNEL = sqrt(8.0)*SIGMA_SMOOTH_KERNEL + double precision, parameter :: GAMMA_SMOOTH_KERNEL = sqrt(8.0)*SIGMA_SMOOTH_KERNEL double precision, parameter :: GAMMA_SMOOTH_MODEL = sqrt(8.0)*SIGMA_SMOOTH_MODEL ! parameters for smoothing @@ -158,7 +158,7 @@ module wave2d_constants logical, parameter :: WRITE_STF_A = .false. logical, parameter :: WRITE_SEISMO_A = .false. ! source inversions - ! logical, parameter :: WRITE_SPECTRA_A = .false. + ! logical, parameter :: WRITE_SPECTRA_A = .false. ! logical, parameter :: WRITE_SPECTRAL_MAP_A = .false. logical, parameter :: WRITE_KERNELS = .true. ! write all nine kernels @@ -178,11 +178,11 @@ module wave2d_constants ! stopping criteria ! NITERATION : number of iterations ! VAR_RED_MIN : minimum variance reduction - ! SIGMA_FAC : stop if a model value exceeds SIGMA_FAC * sigma_m + ! SIGMA_FAC : stop if a model value exceeds SIGMA_FAC * sigma_m ! CONV_STOP : stop when the misfit value is this fraction of the INITIAL misfit value integer, parameter :: NITERATION = 16 double precision, parameter :: VAR_RED_MIN = 0.05d0 - !double precision, parameter :: SIGMA_FAC = 2.0d0 + !double precision, parameter :: SIGMA_FAC = 2.0d0 !double precision, parameter :: CONV_STOP = 1.0d-4 ! Gaussian errors containted in input file @@ -210,7 +210,7 @@ module wave2d_constants integer, parameter :: INV_SOURCE_X = 1 ! whether to include the model norm term in the misfit function, which acts like damping - logical, parameter :: INCLUDE_MODEL_NORM = .true. + logical, parameter :: INCLUDE_MODEL_NORM = .true. ! log file showing source loactions logical, parameter :: ISOURCE_LOG = .true. @@ -249,7 +249,7 @@ module wave2d_constants !--------------------------------------------------------------- ! CHT: do not change these - ! UTM zone for Southern California region + ! UTM zone for Southern California region ! integer, parameter :: UTM_PROJECTION_ZONE = 11 ! to suppress UTM projection for SCEC benchmarks @@ -321,7 +321,7 @@ module wave2d_constants !!$ double precision, parameter :: trbdndw = 0.3, a = 30.0 !!$ integer, parameter :: passes = 2, iord = 4 !!$ -!!$! +!!$! !!$! MULTI-TAPER PARAMETERS !!$! !!$! Ying Zhou: The fit between the recovered data and the data can be improved diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/src/wave2d_constants_ex03.f90 b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/src/wave2d_constants_ex03.f90 index 144c1d591..b73624f80 100644 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/src/wave2d_constants_ex03.f90 +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/src/wave2d_constants_ex03.f90 @@ -75,7 +75,7 @@ module wave2d_constants ! mesh specifications: membrane surface waves double precision, parameter :: LENGTH = 480.0d3 ! m double precision, parameter :: HEIGHT = 480.0d3 ! m - double precision, parameter :: AREA = LENGTH*HEIGHT + double precision, parameter :: AREA = LENGTH*HEIGHT integer, parameter :: NEX = 40 integer, parameter :: NEZ = 40 !!$ @@ -100,13 +100,13 @@ module wave2d_constants integer, parameter :: IMODEL_SYN = 0 integer, parameter :: IMODEL_DAT = 2 !----------------------------------------------------------------------------------------- - ! 0 1 2 3 + ! 0 1 2 3 !----------------------------------------------------------------------------------------- ! ISURFACE=1, IMODEL_SYN : homo checker het ! ISURFACE=1, IMODEL_DAT : homo pert checker pert het !----------------------------------------------------------------------------------------- - ! ISURFACE=0, IMODEL_SYN : homo 1D model checker NA - ! ISURFACE=0, IMODEL_DAT : homo pert 1D model checker pert NA + ! ISURFACE=0, IMODEL_SYN : homo 1D model checker NA + ! ISURFACE=0, IMODEL_DAT : homo pert 1D model checker pert NA !----------------------------------------------------------------------------------------- ! smooth the structure model or kernels @@ -121,7 +121,7 @@ module wave2d_constants ! body waves : 10 double precision, parameter :: SIGMA_SMOOTH_KERNEL = 2.121320d4 double precision, parameter :: SIGMA_SMOOTH_MODEL = 1.060660d4 - double precision, parameter :: GAMMA_SMOOTH_KERNEL = sqrt(8.0)*SIGMA_SMOOTH_KERNEL + double precision, parameter :: GAMMA_SMOOTH_KERNEL = sqrt(8.0)*SIGMA_SMOOTH_KERNEL double precision, parameter :: GAMMA_SMOOTH_MODEL = sqrt(8.0)*SIGMA_SMOOTH_MODEL ! parameters for smoothing @@ -158,7 +158,7 @@ module wave2d_constants logical, parameter :: WRITE_STF_A = .false. logical, parameter :: WRITE_SEISMO_A = .false. ! source inversions - ! logical, parameter :: WRITE_SPECTRA_A = .false. + ! logical, parameter :: WRITE_SPECTRA_A = .false. ! logical, parameter :: WRITE_SPECTRAL_MAP_A = .false. logical, parameter :: WRITE_KERNELS = .true. ! write all nine kernels @@ -178,11 +178,11 @@ module wave2d_constants ! stopping criteria ! NITERATION : number of iterations ! VAR_RED_MIN : minimum variance reduction - ! SIGMA_FAC : stop if a model value exceeds SIGMA_FAC * sigma_m + ! SIGMA_FAC : stop if a model value exceeds SIGMA_FAC * sigma_m ! CONV_STOP : stop when the misfit value is this fraction of the INITIAL misfit value integer, parameter :: NITERATION = 16 double precision, parameter :: VAR_RED_MIN = 0.05d0 - !double precision, parameter :: SIGMA_FAC = 2.0d0 + !double precision, parameter :: SIGMA_FAC = 2.0d0 !double precision, parameter :: CONV_STOP = 1.0d-4 ! Gaussian errors containted in input file @@ -210,7 +210,7 @@ module wave2d_constants integer, parameter :: INV_SOURCE_X = 1 ! whether to include the model norm term in the misfit function, which acts like damping - logical, parameter :: INCLUDE_MODEL_NORM = .true. + logical, parameter :: INCLUDE_MODEL_NORM = .true. ! log file showing source loactions logical, parameter :: ISOURCE_LOG = .true. @@ -249,7 +249,7 @@ module wave2d_constants !--------------------------------------------------------------- ! CHT: do not change these - ! UTM zone for Southern California region + ! UTM zone for Southern California region ! integer, parameter :: UTM_PROJECTION_ZONE = 11 ! to suppress UTM projection for SCEC benchmarks @@ -321,7 +321,7 @@ module wave2d_constants !!$ double precision, parameter :: trbdndw = 0.3, a = 30.0 !!$ integer, parameter :: passes = 2, iord = 4 !!$ -!!$! +!!$! !!$! MULTI-TAPER PARAMETERS !!$! !!$! Ying Zhou: The fit between the recovered data and the data can be improved diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/src/wave2d_constants_ex04.f90 b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/src/wave2d_constants_ex04.f90 index 03749816c..883dd8a64 100644 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/src/wave2d_constants_ex04.f90 +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/src/wave2d_constants_ex04.f90 @@ -75,7 +75,7 @@ module wave2d_constants ! mesh specifications: membrane surface waves double precision, parameter :: LENGTH = 480.0d3 ! m double precision, parameter :: HEIGHT = 480.0d3 ! m - double precision, parameter :: AREA = LENGTH*HEIGHT + double precision, parameter :: AREA = LENGTH*HEIGHT integer, parameter :: NEX = 40 integer, parameter :: NEZ = 40 !!$ @@ -100,13 +100,13 @@ module wave2d_constants integer, parameter :: IMODEL_SYN = 0 integer, parameter :: IMODEL_DAT = 2 !----------------------------------------------------------------------------------------- - ! 0 1 2 3 + ! 0 1 2 3 !----------------------------------------------------------------------------------------- ! ISURFACE=1, IMODEL_SYN : homo checker het ! ISURFACE=1, IMODEL_DAT : homo pert checker pert het !----------------------------------------------------------------------------------------- - ! ISURFACE=0, IMODEL_SYN : homo 1D model checker NA - ! ISURFACE=0, IMODEL_DAT : homo pert 1D model checker pert NA + ! ISURFACE=0, IMODEL_SYN : homo 1D model checker NA + ! ISURFACE=0, IMODEL_DAT : homo pert 1D model checker pert NA !----------------------------------------------------------------------------------------- ! smooth the structure model or kernels @@ -121,7 +121,7 @@ module wave2d_constants ! body waves : 10 double precision, parameter :: SIGMA_SMOOTH_KERNEL = 2.121320d4 double precision, parameter :: SIGMA_SMOOTH_MODEL = 1.060660d4 - double precision, parameter :: GAMMA_SMOOTH_KERNEL = sqrt(8.0)*SIGMA_SMOOTH_KERNEL + double precision, parameter :: GAMMA_SMOOTH_KERNEL = sqrt(8.0)*SIGMA_SMOOTH_KERNEL double precision, parameter :: GAMMA_SMOOTH_MODEL = sqrt(8.0)*SIGMA_SMOOTH_MODEL ! parameters for smoothing @@ -158,7 +158,7 @@ module wave2d_constants logical, parameter :: WRITE_STF_A = .false. logical, parameter :: WRITE_SEISMO_A = .false. ! source inversions - ! logical, parameter :: WRITE_SPECTRA_A = .false. + ! logical, parameter :: WRITE_SPECTRA_A = .false. ! logical, parameter :: WRITE_SPECTRAL_MAP_A = .false. logical, parameter :: WRITE_KERNELS = .true. ! write all nine kernels @@ -178,11 +178,11 @@ module wave2d_constants ! stopping criteria ! NITERATION : number of iterations ! VAR_RED_MIN : minimum variance reduction - ! SIGMA_FAC : stop if a model value exceeds SIGMA_FAC * sigma_m + ! SIGMA_FAC : stop if a model value exceeds SIGMA_FAC * sigma_m ! CONV_STOP : stop when the misfit value is this fraction of the INITIAL misfit value integer, parameter :: NITERATION = 16 double precision, parameter :: VAR_RED_MIN = 0.05d0 - !double precision, parameter :: SIGMA_FAC = 2.0d0 + !double precision, parameter :: SIGMA_FAC = 2.0d0 !double precision, parameter :: CONV_STOP = 1.0d-4 ! Gaussian errors containted in input file @@ -210,7 +210,7 @@ module wave2d_constants integer, parameter :: INV_SOURCE_X = 1 ! whether to include the model norm term in the misfit function, which acts like damping - logical, parameter :: INCLUDE_MODEL_NORM = .true. + logical, parameter :: INCLUDE_MODEL_NORM = .true. ! log file showing source loactions logical, parameter :: ISOURCE_LOG = .true. @@ -249,7 +249,7 @@ module wave2d_constants !--------------------------------------------------------------- ! CHT: do not change these - ! UTM zone for Southern California region + ! UTM zone for Southern California region ! integer, parameter :: UTM_PROJECTION_ZONE = 11 ! to suppress UTM projection for SCEC benchmarks @@ -321,7 +321,7 @@ module wave2d_constants !!$ double precision, parameter :: trbdndw = 0.3, a = 30.0 !!$ integer, parameter :: passes = 2, iord = 4 !!$ -!!$! +!!$! !!$! MULTI-TAPER PARAMETERS !!$! !!$! Ying Zhou: The fit between the recovered data and the data can be improved diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/src/wave2d_constants_ex05.f90 b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/src/wave2d_constants_ex05.f90 index 257e12a7b..67df05f4c 100644 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/src/wave2d_constants_ex05.f90 +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/src/wave2d_constants_ex05.f90 @@ -75,7 +75,7 @@ module wave2d_constants ! mesh specifications: membrane surface waves double precision, parameter :: LENGTH = 480.0d3 ! m double precision, parameter :: HEIGHT = 480.0d3 ! m - double precision, parameter :: AREA = LENGTH*HEIGHT + double precision, parameter :: AREA = LENGTH*HEIGHT integer, parameter :: NEX = 40 integer, parameter :: NEZ = 40 !!$ @@ -100,13 +100,13 @@ module wave2d_constants integer, parameter :: IMODEL_SYN = 0 integer, parameter :: IMODEL_DAT = 2 !----------------------------------------------------------------------------------------- - ! 0 1 2 3 + ! 0 1 2 3 !----------------------------------------------------------------------------------------- ! ISURFACE=1, IMODEL_SYN : homo checker het ! ISURFACE=1, IMODEL_DAT : homo pert checker pert het !----------------------------------------------------------------------------------------- - ! ISURFACE=0, IMODEL_SYN : homo 1D model checker NA - ! ISURFACE=0, IMODEL_DAT : homo pert 1D model checker pert NA + ! ISURFACE=0, IMODEL_SYN : homo 1D model checker NA + ! ISURFACE=0, IMODEL_DAT : homo pert 1D model checker pert NA !----------------------------------------------------------------------------------------- ! smooth the structure model or kernels @@ -121,7 +121,7 @@ module wave2d_constants ! body waves : 10 double precision, parameter :: SIGMA_SMOOTH_KERNEL = 2.121320d4 double precision, parameter :: SIGMA_SMOOTH_MODEL = 1.060660d4 - double precision, parameter :: GAMMA_SMOOTH_KERNEL = sqrt(8.0)*SIGMA_SMOOTH_KERNEL + double precision, parameter :: GAMMA_SMOOTH_KERNEL = sqrt(8.0)*SIGMA_SMOOTH_KERNEL double precision, parameter :: GAMMA_SMOOTH_MODEL = sqrt(8.0)*SIGMA_SMOOTH_MODEL ! parameters for smoothing @@ -158,7 +158,7 @@ module wave2d_constants logical, parameter :: WRITE_STF_A = .false. logical, parameter :: WRITE_SEISMO_A = .false. ! source inversions - ! logical, parameter :: WRITE_SPECTRA_A = .false. + ! logical, parameter :: WRITE_SPECTRA_A = .false. ! logical, parameter :: WRITE_SPECTRAL_MAP_A = .false. logical, parameter :: WRITE_KERNELS = .true. ! write all nine kernels @@ -178,11 +178,11 @@ module wave2d_constants ! stopping criteria ! NITERATION : number of iterations ! VAR_RED_MIN : minimum variance reduction - ! SIGMA_FAC : stop if a model value exceeds SIGMA_FAC * sigma_m + ! SIGMA_FAC : stop if a model value exceeds SIGMA_FAC * sigma_m ! CONV_STOP : stop when the misfit value is this fraction of the INITIAL misfit value integer, parameter :: NITERATION = 16 double precision, parameter :: VAR_RED_MIN = 0.05d0 - !double precision, parameter :: SIGMA_FAC = 2.0d0 + !double precision, parameter :: SIGMA_FAC = 2.0d0 !double precision, parameter :: CONV_STOP = 1.0d-4 ! Gaussian errors containted in input file @@ -210,7 +210,7 @@ module wave2d_constants integer, parameter :: INV_SOURCE_X = 1 ! whether to include the model norm term in the misfit function, which acts like damping - logical, parameter :: INCLUDE_MODEL_NORM = .true. + logical, parameter :: INCLUDE_MODEL_NORM = .true. ! log file showing source loactions logical, parameter :: ISOURCE_LOG = .true. @@ -249,7 +249,7 @@ module wave2d_constants !--------------------------------------------------------------- ! CHT: do not change these - ! UTM zone for Southern California region + ! UTM zone for Southern California region ! integer, parameter :: UTM_PROJECTION_ZONE = 11 ! to suppress UTM projection for SCEC benchmarks @@ -321,7 +321,7 @@ module wave2d_constants !!$ double precision, parameter :: trbdndw = 0.3, a = 30.0 !!$ integer, parameter :: passes = 2, iord = 4 !!$ -!!$! +!!$! !!$! MULTI-TAPER PARAMETERS !!$! !!$! Ying Zhou: The fit between the recovered data and the data can be improved diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/src/wave2d_constants_ex06.f90 b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/src/wave2d_constants_ex06.f90 index af6eb589c..14200b0b6 100644 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/src/wave2d_constants_ex06.f90 +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/src/wave2d_constants_ex06.f90 @@ -75,7 +75,7 @@ module wave2d_constants ! mesh specifications: membrane surface waves double precision, parameter :: LENGTH = 480.0d3 ! m double precision, parameter :: HEIGHT = 480.0d3 ! m - double precision, parameter :: AREA = LENGTH*HEIGHT + double precision, parameter :: AREA = LENGTH*HEIGHT integer, parameter :: NEX = 40 integer, parameter :: NEZ = 40 !!$ @@ -100,13 +100,13 @@ module wave2d_constants integer, parameter :: IMODEL_SYN = 0 integer, parameter :: IMODEL_DAT = 2 !----------------------------------------------------------------------------------------- - ! 0 1 2 3 + ! 0 1 2 3 !----------------------------------------------------------------------------------------- ! ISURFACE=1, IMODEL_SYN : homo checker het ! ISURFACE=1, IMODEL_DAT : homo pert checker pert het !----------------------------------------------------------------------------------------- - ! ISURFACE=0, IMODEL_SYN : homo 1D model checker NA - ! ISURFACE=0, IMODEL_DAT : homo pert 1D model checker pert NA + ! ISURFACE=0, IMODEL_SYN : homo 1D model checker NA + ! ISURFACE=0, IMODEL_DAT : homo pert 1D model checker pert NA !----------------------------------------------------------------------------------------- ! smooth the structure model or kernels @@ -121,7 +121,7 @@ module wave2d_constants ! body waves : 10 double precision, parameter :: SIGMA_SMOOTH_KERNEL = 2.121320d4 double precision, parameter :: SIGMA_SMOOTH_MODEL = 1.060660d4 - double precision, parameter :: GAMMA_SMOOTH_KERNEL = sqrt(8.0)*SIGMA_SMOOTH_KERNEL + double precision, parameter :: GAMMA_SMOOTH_KERNEL = sqrt(8.0)*SIGMA_SMOOTH_KERNEL double precision, parameter :: GAMMA_SMOOTH_MODEL = sqrt(8.0)*SIGMA_SMOOTH_MODEL ! parameters for smoothing @@ -158,7 +158,7 @@ module wave2d_constants logical, parameter :: WRITE_STF_A = .false. logical, parameter :: WRITE_SEISMO_A = .false. ! source inversions - ! logical, parameter :: WRITE_SPECTRA_A = .false. + ! logical, parameter :: WRITE_SPECTRA_A = .false. ! logical, parameter :: WRITE_SPECTRAL_MAP_A = .false. logical, parameter :: WRITE_KERNELS = .true. ! write all nine kernels @@ -178,11 +178,11 @@ module wave2d_constants ! stopping criteria ! NITERATION : number of iterations ! VAR_RED_MIN : minimum variance reduction - ! SIGMA_FAC : stop if a model value exceeds SIGMA_FAC * sigma_m + ! SIGMA_FAC : stop if a model value exceeds SIGMA_FAC * sigma_m ! CONV_STOP : stop when the misfit value is this fraction of the INITIAL misfit value integer, parameter :: NITERATION = 16 double precision, parameter :: VAR_RED_MIN = 0.05d0 - !double precision, parameter :: SIGMA_FAC = 2.0d0 + !double precision, parameter :: SIGMA_FAC = 2.0d0 !double precision, parameter :: CONV_STOP = 1.0d-4 ! Gaussian errors containted in input file @@ -210,7 +210,7 @@ module wave2d_constants integer, parameter :: INV_SOURCE_X = 0 ! whether to include the model norm term in the misfit function, which acts like damping - logical, parameter :: INCLUDE_MODEL_NORM = .true. + logical, parameter :: INCLUDE_MODEL_NORM = .true. ! log file showing source loactions logical, parameter :: ISOURCE_LOG = .true. @@ -249,7 +249,7 @@ module wave2d_constants !--------------------------------------------------------------- ! CHT: do not change these - ! UTM zone for Southern California region + ! UTM zone for Southern California region ! integer, parameter :: UTM_PROJECTION_ZONE = 11 ! to suppress UTM projection for SCEC benchmarks @@ -321,7 +321,7 @@ module wave2d_constants !!$ double precision, parameter :: trbdndw = 0.3, a = 30.0 !!$ integer, parameter :: passes = 2, iord = 4 !!$ -!!$! +!!$! !!$! MULTI-TAPER PARAMETERS !!$! !!$! Ying Zhou: The fit between the recovered data and the data can be improved diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/src/wave2d_constants_ex07.f90 b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/src/wave2d_constants_ex07.f90 index 1fb5f9c46..92f9f2d8a 100644 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/src/wave2d_constants_ex07.f90 +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/src/wave2d_constants_ex07.f90 @@ -75,7 +75,7 @@ module wave2d_constants ! mesh specifications: membrane surface waves double precision, parameter :: LENGTH = 480.0d3 ! m double precision, parameter :: HEIGHT = 480.0d3 ! m - double precision, parameter :: AREA = LENGTH*HEIGHT + double precision, parameter :: AREA = LENGTH*HEIGHT integer, parameter :: NEX = 40 integer, parameter :: NEZ = 40 !!$ @@ -100,13 +100,13 @@ module wave2d_constants integer, parameter :: IMODEL_SYN = 0 integer, parameter :: IMODEL_DAT = 2 !----------------------------------------------------------------------------------------- - ! 0 1 2 3 + ! 0 1 2 3 !----------------------------------------------------------------------------------------- ! ISURFACE=1, IMODEL_SYN : homo checker het ! ISURFACE=1, IMODEL_DAT : homo pert checker pert het !----------------------------------------------------------------------------------------- - ! ISURFACE=0, IMODEL_SYN : homo 1D model checker NA - ! ISURFACE=0, IMODEL_DAT : homo pert 1D model checker pert NA + ! ISURFACE=0, IMODEL_SYN : homo 1D model checker NA + ! ISURFACE=0, IMODEL_DAT : homo pert 1D model checker pert NA !----------------------------------------------------------------------------------------- ! smooth the structure model or kernels @@ -121,7 +121,7 @@ module wave2d_constants ! body waves : 10 double precision, parameter :: SIGMA_SMOOTH_KERNEL = 2.121320d4 double precision, parameter :: SIGMA_SMOOTH_MODEL = 1.060660d4 - double precision, parameter :: GAMMA_SMOOTH_KERNEL = sqrt(8.0)*SIGMA_SMOOTH_KERNEL + double precision, parameter :: GAMMA_SMOOTH_KERNEL = sqrt(8.0)*SIGMA_SMOOTH_KERNEL double precision, parameter :: GAMMA_SMOOTH_MODEL = sqrt(8.0)*SIGMA_SMOOTH_MODEL ! parameters for smoothing @@ -158,7 +158,7 @@ module wave2d_constants logical, parameter :: WRITE_STF_A = .false. logical, parameter :: WRITE_SEISMO_A = .false. ! source inversions - ! logical, parameter :: WRITE_SPECTRA_A = .false. + ! logical, parameter :: WRITE_SPECTRA_A = .false. ! logical, parameter :: WRITE_SPECTRAL_MAP_A = .false. logical, parameter :: WRITE_KERNELS = .true. ! write all nine kernels @@ -178,11 +178,11 @@ module wave2d_constants ! stopping criteria ! NITERATION : number of iterations ! VAR_RED_MIN : minimum variance reduction - ! SIGMA_FAC : stop if a model value exceeds SIGMA_FAC * sigma_m + ! SIGMA_FAC : stop if a model value exceeds SIGMA_FAC * sigma_m ! CONV_STOP : stop when the misfit value is this fraction of the INITIAL misfit value integer, parameter :: NITERATION = 0 double precision, parameter :: VAR_RED_MIN = 0.05d0 - !double precision, parameter :: SIGMA_FAC = 2.0d0 + !double precision, parameter :: SIGMA_FAC = 2.0d0 !double precision, parameter :: CONV_STOP = 1.0d-4 ! Gaussian errors containted in input file @@ -210,7 +210,7 @@ module wave2d_constants integer, parameter :: INV_SOURCE_X = 0 ! whether to include the model norm term in the misfit function, which acts like damping - logical, parameter :: INCLUDE_MODEL_NORM = .true. + logical, parameter :: INCLUDE_MODEL_NORM = .true. ! log file showing source loactions logical, parameter :: ISOURCE_LOG = .true. @@ -249,7 +249,7 @@ module wave2d_constants !--------------------------------------------------------------- ! CHT: do not change these - ! UTM zone for Southern California region + ! UTM zone for Southern California region ! integer, parameter :: UTM_PROJECTION_ZONE = 11 ! to suppress UTM projection for SCEC benchmarks @@ -321,7 +321,7 @@ module wave2d_constants !!$ double precision, parameter :: trbdndw = 0.3, a = 30.0 !!$ integer, parameter :: passes = 2, iord = 4 !!$ -!!$! +!!$! !!$! MULTI-TAPER PARAMETERS !!$! !!$! Ying Zhou: The fit between the recovered data and the data can be improved diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/src/wave2d_constants_ex08.f90 b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/src/wave2d_constants_ex08.f90 index 818ecf3fa..5beded4d3 100644 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/src/wave2d_constants_ex08.f90 +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/src/wave2d_constants_ex08.f90 @@ -75,7 +75,7 @@ module wave2d_constants ! mesh specifications: membrane surface waves double precision, parameter :: LENGTH = 480.0d3 ! m double precision, parameter :: HEIGHT = 480.0d3 ! m - double precision, parameter :: AREA = LENGTH*HEIGHT + double precision, parameter :: AREA = LENGTH*HEIGHT integer, parameter :: NEX = 40 integer, parameter :: NEZ = 40 !!$ @@ -101,13 +101,13 @@ module wave2d_constants integer, parameter :: IMODEL_DAT = 3 logical, parameter :: M0ISMPRIOR = .false. !----------------------------------------------------------------------------------------- - ! 0 1 2 3 + ! 0 1 2 3 !----------------------------------------------------------------------------------------- ! ISURFACE=1, IMODEL_SYN : homo checker het ! ISURFACE=1, IMODEL_DAT : homo pert checker pert het !----------------------------------------------------------------------------------------- - ! ISURFACE=0, IMODEL_SYN : homo 1D model checker NA - ! ISURFACE=0, IMODEL_DAT : homo pert 1D model checker pert NA + ! ISURFACE=0, IMODEL_SYN : homo 1D model checker NA + ! ISURFACE=0, IMODEL_DAT : homo pert 1D model checker pert NA !----------------------------------------------------------------------------------------- ! smooth the structure model or kernels @@ -122,7 +122,7 @@ module wave2d_constants ! body waves : 10 double precision, parameter :: SIGMA_SMOOTH_KERNEL = 2.121320d4 double precision, parameter :: SIGMA_SMOOTH_MODEL = 1.060660d4 - double precision, parameter :: GAMMA_SMOOTH_KERNEL = sqrt(8.0)*SIGMA_SMOOTH_KERNEL + double precision, parameter :: GAMMA_SMOOTH_KERNEL = sqrt(8.0)*SIGMA_SMOOTH_KERNEL double precision, parameter :: GAMMA_SMOOTH_MODEL = sqrt(8.0)*SIGMA_SMOOTH_MODEL ! parameters for smoothing @@ -159,7 +159,7 @@ module wave2d_constants logical, parameter :: WRITE_STF_A = .false. logical, parameter :: WRITE_SEISMO_A = .false. ! source inversions - ! logical, parameter :: WRITE_SPECTRA_A = .false. + ! logical, parameter :: WRITE_SPECTRA_A = .false. ! logical, parameter :: WRITE_SPECTRAL_MAP_A = .false. logical, parameter :: WRITE_KERNELS = .true. ! write all nine kernels @@ -179,11 +179,11 @@ module wave2d_constants ! stopping criteria ! NITERATION : number of iterations ! VAR_RED_MIN : minimum variance reduction - ! SIGMA_FAC : stop if a model value exceeds SIGMA_FAC * sigma_m + ! SIGMA_FAC : stop if a model value exceeds SIGMA_FAC * sigma_m ! CONV_STOP : stop when the misfit value is this fraction of the INITIAL misfit value integer, parameter :: NITERATION = 16 double precision, parameter :: VAR_RED_MIN = 0.05d0 - !double precision, parameter :: SIGMA_FAC = 2.0d0 + !double precision, parameter :: SIGMA_FAC = 2.0d0 !double precision, parameter :: CONV_STOP = 1.0d-4 ! Gaussian errors containted in input file @@ -211,7 +211,7 @@ module wave2d_constants integer, parameter :: INV_SOURCE_X = 1 ! whether to include the model norm term in the misfit function, which acts like damping - logical, parameter :: INCLUDE_MODEL_NORM = .true. + logical, parameter :: INCLUDE_MODEL_NORM = .true. ! log file showing source loactions logical, parameter :: ISOURCE_LOG = .true. @@ -250,7 +250,7 @@ module wave2d_constants !--------------------------------------------------------------- ! CHT: do not change these - ! UTM zone for Southern California region + ! UTM zone for Southern California region ! integer, parameter :: UTM_PROJECTION_ZONE = 11 ! to suppress UTM projection for SCEC benchmarks @@ -322,7 +322,7 @@ module wave2d_constants !!$ double precision, parameter :: trbdndw = 0.3, a = 30.0 !!$ integer, parameter :: passes = 2, iord = 4 !!$ -!!$! +!!$! !!$! MULTI-TAPER PARAMETERS !!$! !!$! Ying Zhou: The fit between the recovered data and the data can be improved diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/src/wave2d_constants_gji2007.f90 b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/src/wave2d_constants_gji2007.f90 index 450d745c3..d19519b58 100644 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/src/wave2d_constants_gji2007.f90 +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/src/wave2d_constants_gji2007.f90 @@ -73,7 +73,7 @@ module wave2d_constants ! mesh specifications: membrane surface waves double precision, parameter :: LENGTH = 480.0d+03 ! m double precision, parameter :: HEIGHT = 480.0d+03 ! m - double precision, parameter :: AREA = LENGTH*HEIGHT + double precision, parameter :: AREA = LENGTH*HEIGHT integer, parameter :: NEX = 40 integer, parameter :: NEZ = 40 !!$ @@ -98,13 +98,13 @@ module wave2d_constants integer, parameter :: IMODEL_SYN = 0 integer, parameter :: IMODEL_DAT = 2 !----------------------------------------------------------------------------------------- - ! 0 1 2 3 + ! 0 1 2 3 !----------------------------------------------------------------------------------------- ! ISURFACE=1, IMODEL_SYN : homo checker het ! ISURFACE=1, IMODEL_DAT : homo pert checker pert het pert !----------------------------------------------------------------------------------------- - ! ISURFACE=0, IMODEL_SYN : homo 1D model checker het - ! ISURFACE=0, IMODEL_DAT : homo pert 1D model checker pert het pert + ! ISURFACE=0, IMODEL_SYN : homo 1D model checker het + ! ISURFACE=0, IMODEL_DAT : homo pert 1D model checker pert het pert !----------------------------------------------------------------------------------------- ! whether you want to smooth the structure model for computing the synthetics @@ -146,13 +146,13 @@ module wave2d_constants logical, parameter :: WRITE_STF_A = .false. logical, parameter :: WRITE_SEISMO_A = .false. ! source inversions -! logical, parameter :: WRITE_SPECTRA_A = .false. +! logical, parameter :: WRITE_SPECTRA_A = .false. ! logical, parameter :: WRITE_SPECTRAL_MAP_A = .false. logical, parameter :: WRITE_KERNELS = .true. ! write all nine kernels logical, parameter :: WRITE_KERNEL_SNAPSHOTS = .false. ! kernel snapshots logical, parameter :: WRITE_WAVFIELD_SNAPSHOTS = .false. ! wavefield snapshots - + !-------------------------------------- ! INVERSION PARAMETERS @@ -165,7 +165,7 @@ module wave2d_constants ! stopping criteria ! NITERATION : number of iterations ! VAR_RED_MIN : minimum variance reduction (in percent) - ! SIGMA_FAC : stop if a model value exceeds SIGMA_FAC * sigma_m + ! SIGMA_FAC : stop if a model value exceeds SIGMA_FAC * sigma_m ! CONV_STOP : stop when the misfit value is this fraction of the INITIAL misfit value integer, parameter :: NITERATION = 16 double precision, parameter :: VAR_RED_MIN = 0.0d0 @@ -176,8 +176,8 @@ module wave2d_constants double precision, parameter :: SIGMA_DLNA = 1.0d0 double precision, parameter :: SIGMA_WAVEFORM = 1.0d0 logical, parameter :: ADD_DATA_ERRORS = .false. - - !double precision, parameter :: SIGMA_FAC = 2.0d0 + + !double precision, parameter :: SIGMA_FAC = 2.0d0 !double precision, parameter :: CONV_STOP = 1.0d-04 ! order of interpolating polynomial in conjugate gradient algorithm @@ -197,11 +197,11 @@ module wave2d_constants integer, parameter :: INV_SOURCE_X = 0 ! whether to include the model norm term in the misfit function, which acts like damping - logical, parameter :: INCLUDE_MODEL_NORM = .false. - + logical, parameter :: INCLUDE_MODEL_NORM = .false. + ! log file showing source loactions logical, parameter :: ISOURCE_LOG = .true. - + ! DO NOT CHANGE THESE integer, parameter :: NVAR_STRUCT = 2 ! alpha, beta (seismic velocities only) integer, parameter :: NVAR_SOURCE = 3 ! x position, z position, origin time @@ -236,7 +236,7 @@ module wave2d_constants !--------------------------------------------------------------- ! CHT: do not change these -! UTM zone for Southern California region +! UTM zone for Southern California region ! integer, parameter :: UTM_PROJECTION_ZONE = 11 ! to suppress UTM projection for SCEC benchmarks @@ -277,7 +277,7 @@ module wave2d_constants ! number of nodes for 2D and 3D shape functions for hexahedra ! we use 8-node mesh bricks, which are more stable than 27-node elements integer, parameter :: NGNOD = 8, NGNOD2D = 4 - + ! number of iterations to solve the system for xi and eta integer, parameter :: NUM_ITER = 1 @@ -308,7 +308,7 @@ module wave2d_constants !!$ double precision, parameter :: trbdndw = 0.3, a = 30.0 !!$ integer, parameter :: passes = 2, iord = 4 !!$ -!!$! +!!$! !!$! MULTI-TAPER PARAMETERS !!$! !!$! Ying Zhou: The fit between the recovered data and the data can be improved diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/src/wave2d_define_der_matrices.f90 b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/src/wave2d_define_der_matrices.f90 index 2ff76f225..6612f78d9 100644 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/src/wave2d_define_der_matrices.f90 +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/src/wave2d_define_der_matrices.f90 @@ -7,7 +7,7 @@ module wave2d_define_der_matrices subroutine define_derivative_matrices(xigll,zigll,wxgll,wzgll,hprime_xx,hprime_zz,wgllwgll_xz) implicit none - + ! Gauss-Lobatto-Legendre points of integration double precision, dimension(NGLLX) :: xigll double precision, dimension(NGLLZ) :: zigll diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/src/wave2d_solver.f90 b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/src/wave2d_solver.f90 index 4789ce86d..4cf71bab3 100644 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/src/wave2d_solver.f90 +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/src/wave2d_solver.f90 @@ -65,7 +65,7 @@ subroutine mesher !!$ do j = 1,NGLLZ !!$ ! present GLL height (upper layer) !!$ ztemp2 = 0.5*(1.0-zigll(j))*z1temp + 0.5*(1.0+zigll(j))*z2temp -!!$ +!!$ !!$ if(j > 1) then !!$ ! previous GLL z height (lower layer) !!$ ztemp1 = 0.5*(1.0-zigll(j-1))*z1temp + 0.5*(1.0+zigll(j-1))*z2temp @@ -129,7 +129,7 @@ subroutine mesher ! loop over GLL points to calculate jacobian, and set up numbering ! ! jacobian = | dx/dxi dx/dgamma | = (z2-z1)*(x2-x1)/4 as dx/dgamma=dz/dxi = 0 - ! | dz/dxi dz/dgamma | + ! | dz/dxi dz/dgamma | ! do j = 1,NGLLZ do i = 1,NGLLX @@ -139,16 +139,16 @@ subroutine mesher dxidz(i,j,ispec) = 0.0 dgammadx(i,j,ispec) = 0.0 dgammadz(i,j,ispec) = 2.0 / (z2(ispec)-z1(ispec)) - jacobian(i,j,ispec) = (z2(ispec)-z1(ispec))*(x2(ispec)-x1(ispec)) / 4. + jacobian(i,j,ispec) = (z2(ispec)-z1(ispec))*(x2(ispec)-x1(ispec)) / 4. ! set up local to global numbering - if ( (i.eq.1).and.(ix.gt.1) ) then + if ( (i==1).and.(ix>1) ) then ibool(i,j,ispec) = ibool(NGLLX,j,ispec-1) - else if ( (j.eq.1).and.(iz.gt.1) ) then + else if ( (j==1).and.(iz>1) ) then ibool(i,j,ispec) = ibool(i,NGLLZ,ispec-NEX) else iglob = iglob + 1 - ibool(i,j,ispec) = iglob + ibool(i,j,ispec) = iglob endif ! get the global gridpoints @@ -162,33 +162,33 @@ subroutine mesher ! if boundary element ! 1,2,3,4 --> left, right, bottom, top - if (ix.eq.1) then ! left boundary + if (ix==1) then ! left boundary nspecb(1) = nspecb(1) + 1 ibelm(1,nspecb(1)) = ispec do j = 1,NGLLZ jacobianb(1,j,nspecb(1))= (z2(ispec)-z1(ispec))/2.0 - end do + enddo endif - if (ix.eq.NEX) then ! right boundary + if (ix==NEX) then ! right boundary nspecb(2) = nspecb(2) + 1 ibelm(2,nspecb(2)) = ispec do j = 1,NGLLZ jacobianb(2,j,nspecb(2))= (z2(ispec)-z1(ispec))/2.0 - end do + enddo endif - if (iz.eq.1) then ! bottom boundary + if (iz==1) then ! bottom boundary nspecb(3) = nspecb(3) + 1 ibelm(3,nspecb(3)) = ispec do i = 1,NGLLX jacobianb(3,i,nspecb(3))= (x2(ispec)-x1(ispec))/2.0 - end do + enddo endif - if (iz.eq.NEZ) then ! top boundary + if (iz==NEZ) then ! top boundary nspecb(4) = nspecb(4) + 1 ibelm(4,nspecb(4)) = ispec do i = 1,NGLLX jacobianb(4,i,nspecb(4))= (x2(ispec)-x1(ispec))/2.0 - end do + enddo endif ! end loop over elements enddo @@ -240,7 +240,7 @@ subroutine mesher_additional k = 0 do ispec = 1,NSPEC do j = 1,NGLLZ - do i = 1,NGLLX + do i = 1,NGLLX iglob = ibool(i,j,ispec) da_local(i,j,ispec) = wxgll(i)*wzgll(j)*jacobian(i,j,ispec) @@ -329,7 +329,7 @@ subroutine set_model_property(iref) do ispec = 1,NSPEC do j = 1,NGLLZ - do i = 1,NGLLX + do i = 1,NGLLX iglob = ibool(i,j,ispec) ! structure for reference model (synthetics) @@ -345,7 +345,7 @@ subroutine set_model_property(iref) mu_syn(i,j,ispec) = DENSITY*beta0*beta0 rho_syn(i,j,ispec) = DENSITY - elseif(IMODEL_SYN == 1) then ! 1D model (body waves) + else if(IMODEL_SYN == 1) then ! 1D model (body waves) if(ISURFACE==0) then call make_1D_model(i,j,ispec,ktemp,mtemp,rtemp) ! 1D model @@ -356,11 +356,11 @@ subroutine set_model_property(iref) stop 'check model in set_model_property.f90' endif - elseif(IMODEL_SYN == 2) then ! checkerboard model + else if(IMODEL_SYN == 2) then ! checkerboard model if(ISURFACE==0) then stop 'check model in set_model_property.f90' - elseif(ISURFACE==1) then + else if(ISURFACE==1) then ! checkerboard S-wave velocity (= membrane wave phase velocity) ! GLOBALLY defined (not at the elemental level) btemp2 = beta0 * (1.0 + afac/100.0*(sin(x(iglob)*w_scale) * sin(z(iglob)*w_scale)) ) @@ -370,7 +370,7 @@ subroutine set_model_property(iref) rho_syn(i,j,ispec) = DENSITY endif - elseif(IMODEL_SYN == 3) then ! heterogeneous model + else if(IMODEL_SYN == 3) then ! heterogeneous model if(ISURFACE==0) then stop 'check model in set_model_property.f90' @@ -413,7 +413,7 @@ subroutine set_model_property(iref) kappa_dat(i,j,ispec) = ktemp + dkappa2 mu_dat(i,j,ispec) = mtemp + dmu2 - elseif(IMODEL_DAT == 1) then ! 1D model (NOT a 1D perturbation) + else if(IMODEL_DAT == 1) then ! 1D model (NOT a 1D perturbation) if(ISURFACE==0) then call make_1D_model(i,j,ispec,ktemp,mtemp,rtemp) ! 1D model @@ -425,7 +425,7 @@ subroutine set_model_property(iref) mu_dat(i,j,ispec) = mtemp rho_dat(i,j,ispec) = rtemp - elseif(IMODEL_DAT == 2) then ! checkerboard perturbation + else if(IMODEL_DAT == 2) then ! checkerboard perturbation if(ISURFACE==0) then stop 'check model in set_model_property.f90' @@ -443,7 +443,7 @@ subroutine set_model_property(iref) !rho_dat(i,j,ispec) = DENSITY endif - elseif(IMODEL_DAT == 3) then ! heterogeneous perturbation + else if(IMODEL_DAT == 3) then ! heterogeneous perturbation if(ISURFACE==0) then stop 'check model in set_model_property.f90' @@ -496,36 +496,36 @@ subroutine make_1D_model(i,j,ispec,kappa1,mu1,rho1) if(dtemp < z_breaks(1)) then ! shallow surface rtemp = r_layers(1) ; atemp = a_layers(1) ; btemp = b_layers(1) - elseif(dtemp == z_breaks(1)) then ! 'basin' reflector + else if(dtemp == z_breaks(1)) then ! 'basin' reflector if(HEIGHT-z1(ispec) == dtemp) then rtemp = r_layers(1) ; atemp = a_layers(1) ; btemp = b_layers(1) - elseif(HEIGHT-z2(ispec) == dtemp) then + else if(HEIGHT-z2(ispec) == dtemp) then rtemp = r_layers(2) ; atemp = a_layers(2) ; btemp = b_layers(2) else print *, dtemp, z_breaks(1), z1(ispec), z2(ispec) stop 'error in make_1D_model.f90' endif - elseif(dtemp > z_breaks(1) .and. dtemp < z_breaks(2)) then ! upper crust + else if(dtemp > z_breaks(1) .and. dtemp < z_breaks(2)) then ! upper crust rtemp = r_layers(2) ; atemp = a_layers(2) ; btemp = b_layers(2) - elseif(dtemp == z_breaks(2)) then ! mid-crust reflector + else if(dtemp == z_breaks(2)) then ! mid-crust reflector if(HEIGHT-z1(ispec) == dtemp) then rtemp = r_layers(2) ; atemp = a_layers(2) ; btemp = b_layers(2) - elseif(HEIGHT-z2(ispec) == dtemp) then + else if(HEIGHT-z2(ispec) == dtemp) then rtemp = r_layers(3) ; atemp = a_layers(3) ; btemp = b_layers(3) else print *, dtemp, z_breaks(2), z1(ispec), z2(ispec) stop 'error in make_1D_model.f90' endif - elseif(dtemp > z_breaks(2) .and. dtemp < z_breaks(3)) then ! lower crust + else if(dtemp > z_breaks(2) .and. dtemp < z_breaks(3)) then ! lower crust rtemp = r_layers(3) ; atemp = a_layers(3) ; btemp = b_layers(3) - elseif(dtemp == z_breaks(3)) then ! Moho + else if(dtemp == z_breaks(3)) then ! Moho if(HEIGHT-z1(ispec) == dtemp) then rtemp = r_layers(3) ; atemp = a_layers(3) ; btemp = b_layers(3) - elseif(HEIGHT-z2(ispec) == dtemp) then + else if(HEIGHT-z2(ispec) == dtemp) then rtemp = r_layers(4) ; atemp = a_layers(4) ; btemp = b_layers(4) else print *, dtemp, z_breaks(3), z1(ispec), z2(ispec) @@ -565,7 +565,7 @@ subroutine solver(solver_type, idata, & character(len=*), optional :: last_frame double precision, intent(inout), optional :: absorbfield(NSTEP, NCOMP, NGLL, NELE, NABSORB) double precision, intent(out), optional :: three_source_model(NSTEP,NCOMP,nsrc,NVAR_SOURCE) ! 3 : ts, xs, zs - !double precision, intent(out), optional :: three_source_model(NSTEP,NCOMP,nsrc,10) ! testing + !double precision, intent(out), optional :: three_source_model(NSTEP,NCOMP,nsrc,10) ! testing double precision, intent(out), dimension(NGLLX,NGLLZ,NSPEC), optional :: rtype_kernel, btype_kernel, atype_kernel double precision, intent(in), optional :: stf_syn(NSTEP), f0(NCOMP) @@ -684,9 +684,9 @@ subroutine solver(solver_type, idata, & mass_local = wxgll(i)*wzgll(j)*rho(i,j,ispec)*jacobian(i,j,ispec) iglob = ibool(i,j,ispec) mass_global(iglob) = mass_global(iglob) + mass_local - end do - end do - end do + enddo + enddo + enddo ! time marching parameters deltat = DT @@ -703,16 +703,16 @@ subroutine solver(solver_type, idata, & displ(:,:) = 0.0 veloc(:,:) = 0.0 accel(:,:) = 0.0 - + if (solver_type == 3) then open(11,file = trim(last_frame),status='old',iostat=ios) if (ios /= 0) stop 'Error reading the last frame' do i = 1, NGLOB - !read(11,*) b_displ(1,i), b_displ(2,i), b_displ(3,i), & + !read(11,*) b_displ(1,i), b_displ(2,i), b_displ(3,i), & ! b_veloc(1,i), b_veloc(2,i), b_veloc(3,i), & ! b_accel(1,i), b_accel(2,i), b_accel(3,i) read(11,fm) (b_displ(j,i), j = 1,NCOMP), & - (b_veloc(j,i), j = 1,NCOMP), & + (b_veloc(j,i), j = 1,NCOMP), & (b_accel(j,i), j = 1,NCOMP) enddo close(11) @@ -787,7 +787,7 @@ subroutine solver(solver_type, idata, & ! do ispec = 1,NSPEC - ! first double loop over GLL + ! first double loop over GLL ! compute and store gradients do j = 1,NGLLZ do i = 1,NGLLX @@ -804,7 +804,7 @@ subroutine solver(solver_type, idata, & if (solver_type == 3) then b_tempy1l = b_tempy1l + b_displ(1,iglob)*hp1 endif - end do + enddo ! derivative along z tempy2l = 0.0 @@ -816,7 +816,7 @@ subroutine solver(solver_type, idata, & if (solver_type == 3) then b_tempy2l = b_tempy2l + b_displ(1,iglob)*hp2 endif - end do + enddo ! from mesher dxidxl = dxidx(i,j,ispec) @@ -854,9 +854,9 @@ subroutine solver(solver_type, idata, & b_ds(2,1) = b_ds(1,2) b_ds(3,2) = b_ds(2,3) - ! mu kernel : K-mu = double-dot-product of deviatoric strains + ! mu kernel : K-mu = double-dot-product of deviatoric strains ! kappa kernel : not used for SH case (see kappa_k below) - ! (see below for kappa kernel) + ! (see below for kappa kernel) mu_k(i,j,ispec) = sum(ds * b_ds) !mu_k(iglob2) = sum(ds * b_ds) ! (09-Jan-2007) !mu_k(iglob2) = sum(ds * b_ds) - ONE_THIRD * kappa_k(iglob2) ! (12-July-2006) @@ -899,7 +899,7 @@ subroutine solver(solver_type, idata, & if (solver_type == 3) then b_tempy1l = b_tempy1l + b_tempy1(k,j)*fac1 endif - end do + enddo ! along z direction tempy2l = 0.0 @@ -910,7 +910,7 @@ subroutine solver(solver_type, idata, & if (solver_type == 3) then b_tempy2l = b_tempy2l + b_tempy2(i,k)*fac2 endif - end do + enddo fac1 = wzgll(j) fac2 = wxgll(i) @@ -921,10 +921,10 @@ subroutine solver(solver_type, idata, & b_accel(1,iglob) = b_accel(1,iglob) - (fac1* b_tempy1l + fac2* b_tempy2l) endif - end do ! second loop over the GLL points - end do + enddo ! second loop over the GLL points + enddo - end do ! end loop over all spectral elements + enddo ! end loop over all spectral elements ! ! boundary conditions @@ -938,11 +938,11 @@ subroutine solver(solver_type, idata, & do ibb = 1,NABSORB ! index of grid boundary if(ibb == 1) then i = 1 - elseif(ibb == 2) then + else if(ibb == 2) then i = NGLLX - elseif(ibb == 3) then + else if(ibb == 3) then i = 1 - elseif(ibb == 4) then + else if(ibb == 4) then i = NGLLZ endif @@ -952,9 +952,9 @@ subroutine solver(solver_type, idata, & if (ibb == 1 .or. ibb == 2) then ! left or right boundary element j1 = 1; j2 = NGLLZ else if (ib == 1) then ! top left corner element - j1 = 2; j2 = NGLLX + j1 = 2; j2 = NGLLX else if (ib == nspecb(ibb)) then ! top right corner element - j1 = 1; j2 = NGLLX-1 + j1 = 1; j2 = NGLLX-1 else ! top or bottom boundary (excluding corner elements) j1 = 1; j2 = NGLLX endif @@ -975,8 +975,8 @@ subroutine solver(solver_type, idata, & if (save_forward) then absorbfield(itime,1,j,ib,ibb) = ty*weight endif - end do - end do + enddo + enddo enddo else ! NCOMP==3 @@ -988,7 +988,7 @@ subroutine solver(solver_type, idata, & ! do ispec = 1,NSPEC - ! first double loop over GLL + ! first double loop over GLL ! compute and store gradients do j = 1,NGLLZ do i = 1,NGLLX @@ -1015,7 +1015,7 @@ subroutine solver(solver_type, idata, & b_tempy1l = b_tempy1l + b_displ(2,iglob)*hp1 b_tempz1l = b_tempz1l + b_displ(3,iglob)*hp1 endif - end do + enddo ! derivative along z tempx2l = 0.0 @@ -1037,7 +1037,7 @@ subroutine solver(solver_type, idata, & b_tempy2l = b_tempy2l + b_displ(2,iglob)*hp2 b_tempz2l = b_tempz2l + b_displ(3,iglob)*hp2 endif - end do + enddo ! from the mesher dxidxl = dxidx(i,j,ispec) @@ -1146,8 +1146,8 @@ subroutine solver(solver_type, idata, & b_tempz2(i,j) = jacobianl*(b_sigma_xz*dgammadxl+b_sigma_zz*dgammadzl) endif - end do - end do + enddo + enddo ! ! second double-loop over GLL ! compute all rhs terms @@ -1174,7 +1174,7 @@ subroutine solver(solver_type, idata, & b_tempy1l = b_tempy1l + b_tempy1(k,j)*fac1 b_tempz1l = b_tempz1l + b_tempz1(k,j)*fac1 endif - end do + enddo ! along z direction tempx2l = 0.0 @@ -1189,13 +1189,13 @@ subroutine solver(solver_type, idata, & fac2 = wzgll(k)*hprime_zz(j,k) tempx2l = tempx2l + tempx2(i,k)*fac2 tempy2l = tempy2l + tempy2(i,k)*fac2 - tempz2l = tempz2l + tempz2(i,k)*fac2 + tempz2l = tempz2l + tempz2(i,k)*fac2 if (solver_type == 3) then b_tempx2l = b_tempx2l + b_tempx2(i,k)*fac2 b_tempy2l = b_tempy2l + b_tempy2(i,k)*fac2 - b_tempz2l = b_tempz2l + b_tempz2(i,k)*fac2 + b_tempz2l = b_tempz2l + b_tempz2(i,k)*fac2 endif - end do + enddo fac1 = wzgll(j) fac2 = wxgll(i) @@ -1212,10 +1212,10 @@ subroutine solver(solver_type, idata, & b_accel(3,iglob) = b_accel(3,iglob) - (fac1* b_tempz1l + fac2* b_tempz2l) endif - end do ! second loop over the GLL points - end do + enddo ! second loop over the GLL points + enddo - end do ! end loop over all spectral elements + enddo ! end loop over all spectral elements ! ! boundary conditions @@ -1226,11 +1226,11 @@ subroutine solver(solver_type, idata, & do ibb = 1,NABSORB ! index of grid boundary (CHT) if (ibb == 1) then i = 1; nx = -1.0; nz = 0.0 - elseif (ibb == 2) then + else if (ibb == 2) then i = NGLLX; nx = 1.0; nz = 0.0 - elseif (ibb == 3) then + else if (ibb == 3) then i = 1; nx = 0.0; nz = -1.0 - elseif (ibb == 4) then ! CHT + else if (ibb == 4) then ! CHT i = NGLLZ; nx = 0.0; nz = 1.0 endif @@ -1240,9 +1240,9 @@ subroutine solver(solver_type, idata, & if (ibb == 1 .or. ibb == 2) then ! left or right boundary element j1 = 1; j2 = NGLLZ else if (ib == 1) then ! top left corner element - j1 = 2; j2 = NGLLX + j1 = 2; j2 = NGLLX else if (ib == nspecb(ibb)) then ! top right corner element - j1 = 1; j2 = NGLLX-1 + j1 = 1; j2 = NGLLX-1 else ! top or bottom boundary (excluding corner elements) j1 = 1; j2 = NGLLX endif @@ -1278,8 +1278,8 @@ subroutine solver(solver_type, idata, & absorbfield(itime,2,j,ib,ibb) = ty*weight absorbfield(itime,3,j,ib,ibb) = tz*weight endif - end do - end do + enddo + enddo enddo endif ! NCOMP @@ -1289,22 +1289,22 @@ subroutine solver(solver_type, idata, & do ibb = 1,NABSORB ! CHT : add 4th boundary if (ibb == 1) then i = 1 - elseif (ibb == 2) then + else if (ibb == 2) then i = NGLLX - elseif (ibb == 3) then + else if (ibb == 3) then i = 1 - elseif (ibb == 4) then + else if (ibb == 4) then i = NGLLZ - end if + endif ! see comments above do ib = 1,nspecb(ibb) if (ibb == 1 .or. ibb == 2) then j1 = 1; j2 = NGLLZ - elseif (ib == 1) then - j1 = 2; j2 = NGLLX - elseif (ib == nspecb(ibb)) then - j1 = 1; j2 = NGLLX-1 + else if (ib == 1) then + j1 = 2; j2 = NGLLX + else if (ib == nspecb(ibb)) then + j1 = 1; j2 = NGLLX-1 else j1 = 1; j2 = NGLLX endif @@ -1338,7 +1338,7 @@ subroutine solver(solver_type, idata, & ! take the value at the closest gridpoint -- OLD METHOD !iglob = sglob(isrc) - !accel(:,iglob) = accel(:,iglob) + samp(itime,:,isrc) + !accel(:,iglob) = accel(:,iglob) + samp(itime,:,isrc) enddo ! isrc @@ -1354,7 +1354,7 @@ subroutine solver(solver_type, idata, & enddo enddo !iglob = rglob(irec) - !accel(:,iglob) = accel(:,iglob) + ramp(NSTEP-itime+1,:,irec) + !accel(:,iglob) = accel(:,iglob) + ramp(NSTEP-itime+1,:,irec) enddo ! forward wavefield, but computed in reverse @@ -1370,7 +1370,7 @@ subroutine solver(solver_type, idata, & enddo enddo !iglob = sglob(isrc) - !b_accel(:,iglob) = b_accel(:,iglob) + samp(NSTEP-itime+1,:,isrc) + !b_accel(:,iglob) = b_accel(:,iglob) + samp(NSTEP-itime+1,:,isrc) enddo endif @@ -1421,14 +1421,14 @@ subroutine solver(solver_type, idata, & enddo ! irec - elseif (solver_type == 2 .or. solver_type == 3) then + else if (solver_type == 2 .or. solver_type == 3) then ! ADJOINT SEISMOGRAMS (adjoint wavefield recorded at the original source) ! These are needed for the source (and joint) inversions. ! note that samp above is copied to stf_for ! We fill the record 'in reverse' so that the max arrival will coincide ! with the forward source time function pulse. - + do isrc = 1,nsrc do icomp = 1,NCOMP @@ -1487,7 +1487,7 @@ subroutine solver(solver_type, idata, & do ispec = 1,NSPEC do j = 1,NGLLZ - do i = 1,NGLLX + do i = 1,NGLLX iglob = ibool(i,j,ispec) ! kappa-mu-rho -- THESE ARE THE TWO KERNELS FOR AN ISOTROPIC ELASTIC MEDIUM, PLUS DENSITY @@ -1545,13 +1545,13 @@ subroutine solver(solver_type, idata, & endif ! solver_type = 2 or 3 ! save FINAL SNAPSHOT - if (mod(itime, NSAVE) == 0) then + if (mod(itime, NSAVE) == 0) then if (save_forward) then open(11,file = trim(last_frame),status='unknown',iostat=ios) if (ios /= 0) stop 'Error reading the last frame' do i = 1,NGLOB - write(11,fm) (sngl(displ(j,i)), j = 1,NCOMP), & + write(11,fm) (sngl(displ(j,i)), j = 1,NCOMP), & (sngl(veloc(j,i)), j = 1,NCOMP), & (sngl(accel(j,i)), j = 1,NCOMP) enddo @@ -1569,7 +1569,7 @@ subroutine solver(solver_type, idata, & if (solver_type == 1) then if(idata==0) write(filename1,'(a,i5.5)') trim(out_dir)//'forward_syn_',tlab if(idata==1) write(filename1,'(a,i5.5)') trim(out_dir)//'forward_dat_',tlab - elseif (solver_type == 2) then + else if (solver_type == 2) then write(filename1,'(a,i5.5)') trim(out_dir)//'adjoint_',tlab else write(filename1,'(a,i5.5)') trim(out_dir)//'adjoint_',tlab ! adjoint wavefield @@ -1584,7 +1584,7 @@ subroutine solver(solver_type, idata, & open(unit=11, file=trim(filename1), status='unknown', iostat=ios) if (ios /= 0) stop 'Error writing snapshot to disk' do iglob = 1, NGLOB - write(11,'(5e16.6)') sngl(x_plot(iglob)), sngl(z_plot(iglob)), (sngl(displ(j,iglob)),j=1,NCOMP) + write(11,'(5e16.6)') sngl(x_plot(iglob)), sngl(z_plot(iglob)), (sngl(displ(j,iglob)),j=1,NCOMP) enddo close(11) endif @@ -1594,7 +1594,7 @@ subroutine solver(solver_type, idata, & open(unit=11, file=trim(filename2), status='unknown', iostat=ios) if (ios /= 0) stop 'Error writing snapshot to disk' do iglob = 1, NGLOB - write(11,'(5e16.6)') sngl(x_plot(iglob)), sngl(z_plot(iglob)), (sngl(b_displ(j,iglob)),j=1,NCOMP) + write(11,'(5e16.6)') sngl(x_plot(iglob)), sngl(z_plot(iglob)), (sngl(b_displ(j,iglob)),j=1,NCOMP) enddo close(11) @@ -1605,7 +1605,7 @@ subroutine solver(solver_type, idata, & do ispec = 1,NSPEC do j = 1,NGLLZ - do i = 1,NGLLX + do i = 1,NGLLX iglob = ibool(i,j,ispec) ! kappa-mu-rho : three kernels and three interaction fields @@ -1662,11 +1662,11 @@ subroutine solver(solver_type, idata, & ! (Using local2global is a bit safer.) if(WRITE_KERNELS) then filename5 = trim(out_dir)//'kernel_basis' - open(unit = 13, file = trim(filename5), status = 'unknown',iostat=ios) + open(unit = 13, file = trim(filename5), status = 'unknown',iostat=ios) if (ios /= 0) stop 'Error writing all nine kernels to disk' do ispec = 1,NSPEC do j = 1,NGLLZ - do i = 1,NGLLX + do i = 1,NGLLX iglob = ibool(i,j,ispec) ! x, z, -- kappa, mu, rho -- alpha, beta, rho -- c, beta rho @@ -1692,12 +1692,12 @@ subroutine solver(solver_type, idata, & btype_kernel = mu_kappa_rho_kernel rtype_kernel = rho_kappa_mu_kernel - elseif (STRUCTURE_PARAMETER_TYPE == 2) then + else if (STRUCTURE_PARAMETER_TYPE == 2) then atype_kernel = alpha_beta_rho_kernel btype_kernel = beta_alpha_rho_kernel rtype_kernel = rho_alpha_beta_kernel - elseif (STRUCTURE_PARAMETER_TYPE == 3) then + else if (STRUCTURE_PARAMETER_TYPE == 3) then atype_kernel = c_beta_rho_kernel btype_kernel = beta_c_rho_kernel rtype_kernel = rho_c_beta_kernel diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/src/wave2d_sub.f90 b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/src/wave2d_sub.f90 index e6759605b..3c0258e4f 100644 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/src/wave2d_sub.f90 +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/src/wave2d_sub.f90 @@ -7,8 +7,8 @@ module wave2d_sub contains - !----------------------------------------------------- - + !----------------------------------------------------- + subroutine write_parameters_plot(filename) character(len=*),intent(in) :: filename @@ -18,15 +18,15 @@ subroutine write_parameters_plot(filename) open(unit=12, file=trim(filename), status='unknown') write(12,'(3i10)') 0,NSTEP,NSAVE - write(12,'(3i10)') FOR_X, FOR_Y, FOR_Z + write(12,'(3i10)') FOR_X, FOR_Y, FOR_Z write(12,'(1f16.8)') DT write(12,'(1f16.8)') hdur close(12) end subroutine write_parameters_plot - !----------------------------------------------------- - + !----------------------------------------------------- + subroutine write_parameters(filename) character(len=*),intent(in) :: filename @@ -62,7 +62,7 @@ subroutine write_parameters(filename) write(12,*) 'LON_MIN',LON_MIN write(12,*) 'UTM_PROJECTION_ZONE',UTM_PROJECTION_ZONE write(12,*) 'LENGTH',LENGTH - write(12,*) 'HEIGHT ',HEIGHT + write(12,*) 'HEIGHT ',HEIGHT write(12,*) 'AREA',AREA write(12,*) 'NEX',NEX write(12,*) 'NEZ',NEZ @@ -137,7 +137,7 @@ subroutine write_parameters(filename) write(12,*) 'STRUCTURE_PARAMETER_TYPE',STRUCTURE_PARAMETER_TYPE write(12,*) 'DENSITY',DENSITY write(12,*) 'INCOMPRESSIBILITY',INCOMPRESSIBILITY - write(12,*) 'RIGIDITY',RIGIDITY + write(12,*) 'RIGIDITY',RIGIDITY write(12,*) 'PWAVESPEED',PWAVESPEED write(12,*) 'SWAVESPEED',SWAVESPEED write(12,*) 'BWAVESPEED',BWAVESPEED @@ -180,7 +180,7 @@ subroutine write_parameters(filename) end subroutine write_parameters - !----------------------------------------------------- + !----------------------------------------------------- subroutine write_chi(dir,nevent,nrec) @@ -259,7 +259,7 @@ subroutine write_chi(dir,nevent,nrec) end subroutine write_chi - !----------------------------------------------------- + !----------------------------------------------------- !!$ subroutine get_source_function(nsrc,origin_time,f0,samp,ti) !!$ @@ -286,7 +286,7 @@ end subroutine write_chi !!$ !!$ end subroutine get_source_function - !----------------------------------------------------- + !----------------------------------------------------- subroutine get_source_time_function(origin_time,stf_vec,ti) @@ -323,10 +323,10 @@ subroutine get_source_time_function(origin_time,stf_vec,ti) if(ISRC_TIME==1) then ! Ricker amp = -2.0*(alpha**3)/dsqrt(PI) - elseif(ISRC_TIME==2) then ! Gaussian + else if(ISRC_TIME==2) then ! Gaussian amp = alpha/dsqrt(PI) - elseif(ISRC_TIME==3) then ! truncated sine + else if(ISRC_TIME==3) then ! truncated sine cyc = 3.0 per = 2.*hdur !t1 = -0.50*per @@ -334,11 +334,11 @@ subroutine get_source_time_function(origin_time,stf_vec,ti) t2 = t1 + per*cyc amp = alpha**2.0*dsqrt(2.0/PI)*exp(-0.5) - elseif(ISRC_TIME==4) then ! sine + else if(ISRC_TIME==4) then ! sine per = 2.0*hdur amp = alpha**2.0*dsqrt(2.0/PI)*exp(-0.5) -!!$ elseif(ISRC_TIME==5) then ! plane wave field +!!$ else if(ISRC_TIME==5) then ! plane wave field !!$ !!$ amp = alpha**2*dsqrt(2./PI)*exp(-0.5) ! amplitude !!$ az = 25.*PI/180.0 ! azimuth of vector (from north) @@ -351,7 +351,7 @@ subroutine get_source_time_function(origin_time,stf_vec,ti) !!$ ! probably the speed should be based on the slope of the seafloor !!$ !c_source = 9.81*per/(2*PI) ! T=16s, c=25 m/s !!$ c_source = c0 -!!$ +!!$ !!$ ! projection of each source point vector onto the directional vector k !!$ allocate(d_vec(nsrc)) !!$ d_vec(:) = 0.0 @@ -361,7 +361,7 @@ subroutine get_source_time_function(origin_time,stf_vec,ti) !!$ print *, ' period : ', sngl(per), ' s' !!$ print *, ' phase velocity : ', sngl(c_source/1000.0), ' km/s' !!$ print *, ' wavelength : ', sngl(c_source*per/1000.0), ' km' -!!$ print *, 'relative distance from plane wave wavefront to each source point:' +!!$ print *, 'relative distance from plane wave wavefront to each source point:' !!$ do i=1,nsrc !!$ d_vec(i) = kx*x(sglob(i)) + ky*z(sglob(i)) !!$ write(*,'(i6,3f12.3)') i, x(sglob(i))/1000.0, z(sglob(i))/1000.0, d_vec(i)/1000.0 @@ -373,7 +373,7 @@ subroutine get_source_time_function(origin_time,stf_vec,ti) ti(itime) = dble(itime-1)*DT t = ti(itime) - origin_time ! time shift - + if(ISRC_TIME==1) then ! d/dt[Gaussian] wavelet if(t >= -dgaus .and. t <= dgaus) then @@ -382,7 +382,7 @@ subroutine get_source_time_function(origin_time,stf_vec,ti) stf = 0.0 endif - elseif(ISRC_TIME==2) then + else if(ISRC_TIME==2) then ! Error function ! source_time_function = 0.5*(1.0+erf(decay_rate*t/hdur)) @@ -393,7 +393,7 @@ subroutine get_source_time_function(origin_time,stf_vec,ti) stf = 0.0 endif - elseif(ISRC_TIME==3) then + else if(ISRC_TIME==3) then ! truncated sine function (duration is cyc*per seconds) if(t >= t1 .and. t <= t2) then stf = amp*sin(2.0*PI*(t-t1)/per) @@ -401,22 +401,22 @@ subroutine get_source_time_function(origin_time,stf_vec,ti) stf = 0.0 endif - elseif(ISRC_TIME==4) then + else if(ISRC_TIME==4) then ! sine function stf = amp*sin(2*PI*t/per) !stf = amp/2.*sin(2*PI*t/per) + amp/2.*sin(2*PI*t/(1.1*per)) - !elseif(ISRC_TIME==5) then + !else if(ISRC_TIME==5) then ! ! plane wavefield, dependant on source position ! tmp = t - d_vec(i)/c_source ! !stf = amp*sin( 2*PI/per*tmp ) ! stf = amp/2.*sin(2*PI*tmp/per) + amp/2.*sin(2*PI*tmp/(1.1*per)) endif - + ! fill source time function stf_vec(itime) = stf - + enddo @@ -426,7 +426,7 @@ subroutine get_source_time_function(origin_time,stf_vec,ti) end subroutine get_source_time_function - !----------------------------------------------------- + !----------------------------------------------------- subroutine taper_series(x,nt) @@ -435,7 +435,7 @@ subroutine taper_series(x,nt) double precision :: ntemp,jtemp,wtemp,cfac integer :: i,pwr - + ntemp = dble(nt)/2.0 ! KEY COMMAND: power of polynomial taper @@ -444,18 +444,18 @@ subroutine taper_series(x,nt) ! Welch taper (in time) do i = 1,nt - + jtemp = dble(i-1) wtemp = (jtemp - ntemp) / ntemp cfac = 1. - wtemp**pwr !cfac = 1 - (2*(i - 1)/(nt - 1) - 1) ** pwr ! see Qinya code below - + x(i) = cfac*x(i) - enddo + enddo end subroutine taper_series - !----------------------------------------------------- + !----------------------------------------------------- subroutine write_snapshot(disp, filename) @@ -479,7 +479,7 @@ subroutine write_snapshot(disp, filename) end subroutine write_snapshot - !----------------------------------------------------- + !----------------------------------------------------- !!$ subroutine write_source_function(nsrc, ti, seis, sglob, seis_name) !!$ @@ -512,7 +512,7 @@ end subroutine write_snapshot !!$ !!$ end subroutine write_source_function - !----------------------------------------------------- + !----------------------------------------------------- subroutine write_seismogram(seis, nrec, seis_name) @@ -541,7 +541,7 @@ subroutine write_seismogram(seis, nrec, seis_name) end subroutine write_seismogram - !----------------------------------------------------- + !----------------------------------------------------- subroutine write_time_series(fvec, tlen, filename) @@ -559,7 +559,7 @@ subroutine write_time_series(fvec, tlen, filename) end subroutine write_time_series - !----------------------------------------------------- + !----------------------------------------------------- !!$ subroutine write_spectral_map(seis, nrec, rglob, seis_name, write_spectra) !!$ @@ -637,18 +637,18 @@ end subroutine write_time_series !!$ ! if within the frequency band !!$ if(w >= wmin_win .and. w <= wmax_win) abs_int = abs_int + abs_val !!$ -!!$ if(write_spectra) write(12,'(2e16.6)') w, abs_val -!!$ !if(write_spectra.and.w/=0.0) write(12,'(2e16.6)') (2*PI)/w, abs_val +!!$ if(write_spectra) write(12,'(2e16.6)') w, abs_val +!!$ !if(write_spectra.and.w/=0.0) write(12,'(2e16.6)') (2*PI)/w, abs_val !!$ enddo !!$ if(write_spectra) close(12) -!!$ +!!$ !!$ if(0==1) then !!$ write(*,'(a,3f12.4)') ' T, s (min/0/max) :', (2*PI)/wmax_win , 2*hdur , (2*PI)/wmin_win !!$ write(*,'(a,3f12.4)') ' f, Hz (min/0/max) :', wmin_win/(2*PI) , 1/(2*hdur) , wmax_win/(2*PI) !!$ write(*,'(a,3f12.4)') ' w, rad/s (min/0/max) :', wmin_win , 2*PI/(2*hdur) , wmax_win !!$ write(*,'(a,e24.8)') ' integrated power :', dw*abs_int -!!$ print * -!!$ endif +!!$ print * +!!$ endif !!$ !!$ call dfftw_destroy_plan(plan) !!$ @@ -662,14 +662,14 @@ end subroutine write_time_series !!$ !!$ end subroutine write_spectral_map - !----------------------------------------------------- + !----------------------------------------------------- !!$ subroutine filter(ti, seis, nrec) !!$ !!$ integer, intent(in) :: nrec !!$ double precision, intent(in) :: ti(NSTEP) !!$ double precision, intent(inout) :: seis(NSTEP,NCOMP,nrec) -!!$ +!!$ !!$ character(len=200) :: filename !!$ double precision :: data(NSTEP) !!$ double precision :: dt @@ -774,14 +774,14 @@ end subroutine write_time_series !!$ !!$ adj_syn(:,i,irec) = ( syn(:,i,irec) - data(:,i,irec) ) * time_window(:) !!$ -!!$ elseif(IKER==5) then ! traveltime +!!$ else if(IKER==5) then ! traveltime !!$ !!$ ! minus sign is shifted from norm to adj_syn, in comparison with Tromp et al (2005) !!$ ! thus, norm is ensured to be POSITIVE (N > 0) !!$ norm = -DT * sum( time_window(:) * syn(:,i,irec) * syn_accel(:,i,irec) ) !!$ if (abs(norm) > EPS) adj_syn(:,i,irec) = -syn_veloc(:,i,irec) * time_window(:) / norm !!$ -!!$ elseif(IKER==6) then ! amplitude +!!$ else if(IKER==6) then ! amplitude !!$ !!$ ! norm is ensured to be POSITIVE (M > 0) !!$ norm = DT * sum( time_window(:) * syn(:,i,irec) * syn(:,i,irec) ) @@ -887,12 +887,12 @@ subroutine smooth_global_function(rough_global, gamma, smooth_global) !------------------------------------ ! Compute the SMOOTHED kernel by convolving a Gaussian with the UNSMOOTHED kernel. - ! This involves integrating NGLOB products between a Gaussian and the unsmoothed kernel. - + ! This involves integrating NGLOB products between a Gaussian and the unsmoothed kernel. + print *, 'convolving the kernel with a Gaussian...' smooth_global(:) = 0.0 - + ! There are FOUR STEPS to the convolution: ! (1) Obtain the center-point for the Gaussian; this could be a GLL point for ! high-resolution smoothing, or it could be an element corner (low-resolution). @@ -989,7 +989,7 @@ subroutine local2global(array_local, vec_global) do ispec = 1,NSPEC do j = 1,NGLLZ - do i = 1,NGLLX + do i = 1,NGLLX iglob = ibool(i,j,ispec) vec_global(iglob) = vec_global(iglob) + array_local(i,j,ispec) enddo @@ -1018,7 +1018,7 @@ subroutine global2local(vec_global, array_local) do ispec = 1,NSPEC do j = 1,NGLLZ - do i = 1,NGLLX + do i = 1,NGLLX iglob = ibool(i,j,ispec) array_local(i,j,ispec) = vec_global(iglob) enddo @@ -1028,7 +1028,7 @@ subroutine global2local(vec_global, array_local) end subroutine global2local !---------------------------------------------------- - + ! subroutine local2mvec(array1, array2, nmod_src, source_vec, nmod, mvec, array_fac0) !subroutine local2mvec(array1, array2, nmod_src, source_vec, nmod, mvec) subroutine local2mvec(array1, nmod_src, source_vec, nmod, mvec) @@ -1062,7 +1062,7 @@ subroutine local2mvec(array1, nmod_src, source_vec, nmod, mvec) do ipar = 1,NVAR_STRUCT do ispec = 1,NSPEC do j = 1,NGLLZ - do i = 1,NGLLX + do i = 1,NGLLX k = k+1 !if(ipar==1) mvec(k) = array1(i,j,ispec) * array_fac(i,j,ispec) ! alpha !if(ipar==2) mvec(k) = array2(i,j,ispec) * array_fac(i,j,ispec) ! beta @@ -1103,7 +1103,7 @@ subroutine mvec2local(nmod, nmod_src, mvec, array1, source_vec) do ipar = 1,NVAR_STRUCT do ispec = 1,NSPEC do j = 1,NGLLZ - do i = 1,NGLLX + do i = 1,NGLLX k = k+1 if(ipar==1) array1(i,j,ispec) = mvec(k) ! btype (mu, beta, beta) !if(ipar==2) array2(i,j,ispec) = mvec(k) ! atype (kappa, alpha, c) @@ -1145,7 +1145,7 @@ subroutine compute_norm_sq(filename, imnorm, & !---------- - norm_sq_parts0(:) = 0.0 + norm_sq_parts0(:) = 0.0 ctemp(:) = 0.0 mtemp(:) = 0.0 npw(:) = 1.0 @@ -1159,7 +1159,7 @@ subroutine compute_norm_sq(filename, imnorm, & if (present(norm_parts_weight)) npw(:) = 1.0 / norm_parts_weight(:) !if (present(norm_parts_weight)) npw(:) = 1.0 / norm_parts_weight(:)**2 - elseif (imnorm == 1) then ! norm of model + else if (imnorm == 1) then ! norm of model ctemp(:) = cov_model(:) mtemp(:) = mvec(:) - mvec_prior(:) if (present(norm_parts_weight)) npw(:) = norm_parts_weight(:) @@ -1191,7 +1191,7 @@ subroutine compute_norm_sq(filename, imnorm, & ! weight each part of the norm norm_sq_parts(:) = norm_sq_parts0(:) * npw(:) - !----------------------------------------------------- + !----------------------------------------------------- ! write parts to file ! norm-squared and norm of each parameter class @@ -1221,7 +1221,7 @@ subroutine compute_norm_sq(filename, imnorm, & end subroutine compute_norm_sq -!!$ !----------------------------------------------------- +!!$ !----------------------------------------------------- !!$ !!$ subroutine write_norm_sq(filename,norm_sq_parts) !!$ diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/src/wave2d_sub2.f90 b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/src/wave2d_sub2.f90 index e2cb19ccf..e34fa67a4 100644 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/src/wave2d_sub2.f90 +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/src/wave2d_sub2.f90 @@ -111,13 +111,13 @@ subroutine locate_targets(nrec, x_target, z_target, & !!$ if(ia==1) then !!$ iax = 1 !!$ iaz = 1 -!!$ elseif(ia==2) then +!!$ else if(ia==2) then !!$ iax = NGLLX !!$ iaz = 1 -!!$ elseif(ia==3) then +!!$ else if(ia==3) then !!$ iax = NGLLX !!$ iaz = NGLLZ -!!$ elseif(ia==4) then +!!$ else if(ia==4) then !!$ iax = 1 !!$ iaz = NGLLZ !!$ endif @@ -262,7 +262,7 @@ subroutine recompute_jacobian_2d(ispec, xi, gamma, xtemp, ztemp, xix, xiz, gamma !--------------------------------------------- ! ! jacobian = | dx/dxi dx/dgamma | = (z2-z1)*(x2-x1)/4 as dx/dgamma=dz/dxi = 0 - ! | dz/dxi dz/dgamma | + ! | dz/dxi dz/dgamma | ! jacobian, integration weight xix = 2. / (x2(ispec)-x1(ispec)) @@ -270,7 +270,7 @@ subroutine recompute_jacobian_2d(ispec, xi, gamma, xtemp, ztemp, xix, xiz, gamma gammax = 0. gammaz = 2. / (z2(ispec)-z1(ispec)) - jacob = (z2(ispec)-z1(ispec))*(x2(ispec)-x1(ispec)) / 4. + jacob = (z2(ispec)-z1(ispec))*(x2(ispec)-x1(ispec)) / 4. ! find the (x,z) corresponding to (xi,gamma,ispec) xtemp = 0.5*(1.- xi)*x1(ispec) + 0.5*(1.+ xi)*x2(ispec) @@ -474,7 +474,7 @@ subroutine station_filter(nrec, x_rec, z_rec, ifilter, dmin_trsh) ! target point xtar = x_rec(irec) ztar = z_rec(irec) - + !print *, xtar, ztar ! if target point is not near grid boundary @@ -500,7 +500,7 @@ subroutine station_filter(nrec, x_rec, z_rec, ifilter, dmin_trsh) ! endif !enddo - !! if target point is at least dmin_trsh from the coast, then keep it + !! if target point is at least dmin_trsh from the coast, then keep it !if ( dmin >= dmin_trsh ) then ! j = j+1 ! x_rec(j) = xtar @@ -567,7 +567,7 @@ subroutine station_filter_2(nrec, x_rec, z_rec, ieast) z_div = mp*x_div + bp !write(*,'(4f16.6)') xtar/1000., ztar/1000., x_div/1000., z_div/1000 - ! if target point is at least dmin_trsh from the coast, then keep it + ! if target point is at least dmin_trsh from the coast, then keep it if ( 0 < dble(ieast)*(xtar - x_div) ) then j = j+1 x_rec(j) = xtar @@ -678,7 +678,7 @@ subroutine utm_geo(rlon,rlat,rx,ry,UTM_PROJECTION_ZONE,iway) e2 = 1.0-(semimin/semimaj)**2.0 e4 = e2*e2 e6 = e2*e4 - e8 = e4*e4 + e8 = e4*e4 ep2 = e2/(1.-e2) if (iway == IUTM2LONGLAT) then diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/src/wave2d_sub4.f90 b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/src/wave2d_sub4.f90 index 4c246eb56..a9dfc3b4d 100644 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/src/wave2d_sub4.f90 +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/src/wave2d_sub4.f90 @@ -72,7 +72,7 @@ module wave2d_sub4 !!$ wseis_syn(1:nlen) = cmplx(syn_displ(1:nlen),0.) !!$ call fft(lnpt,wseis_syn,FORWARD_FFT,DT) ! displacement !!$ -!!$ ! KEY: assemble omega vector +!!$ ! KEY: assemble omega vector !!$ wvec(:) = 0. !!$ do j = 1,npt !!$ if(j > npt/2) then @@ -322,7 +322,7 @@ subroutine mtm_adj(ievent, nrec, syn, tstart, tend, adj_syn, data, data_recon) do j = 1, nlen if((j+i) > 1 .and. (j+i) < nlen) cc = cc + dzr_win(j) * dzr2_win(j+i) ! cross-correlation enddo - if( cc > cc_max) then + if( cc > cc_max) then cc_max = cc ishift = i endif @@ -359,7 +359,7 @@ subroutine mtm_adj(ievent, nrec, syn, tstart, tend, adj_syn, data, data_recon) !dlnAd = sqrt( (DT * sum( dat_displ(:) * dat_displ(:) )) / (DT * sum( syn_displ(:) * syn_displ(:) )) ) - 1. !dlnAv = sqrt( (DT * sum( dat_veloc(:) * dat_veloc(:) )) / (DT * sum( syn_veloc(:) * syn_veloc(:) )) ) - 1. - ! modified to avoid first-order approximation + ! modified to avoid first-order approximation dlnAd = 0.5 * log( sum(dat_displ(:)*dat_displ(:)) / sum(syn_displ(:)*syn_displ(:)) ) dlnAv = 0.5 * log( sum(dat_veloc(:)*dat_veloc(:)) / sum(syn_veloc(:)*syn_veloc(:)) ) @@ -384,7 +384,7 @@ subroutine mtm_adj(ievent, nrec, syn, tstart, tend, adj_syn, data, data_recon) ! cross-correlation traveltime adjoint source for banana-doughnut kernel ft_bar_t(:) = -syn_veloc(:) / Nnorm - + ! cross-correlation traveltime adjoint source for misfit kernel ! NOTE 1: sign convention ! NOTE 2: weighted by measurement and (diagonal) data covariance matrix @@ -394,7 +394,7 @@ subroutine mtm_adj(ievent, nrec, syn, tstart, tend, adj_syn, data, data_recon) ! You have TWO OPTIONS: measure the amplitudes based on DISPLACEMENT or VELOCITY ! Default option has been IAMP_VEL = 0 if(IAMP_VEL == 0) then ! DISPLACEMENT - fa_bar_t(:) = syn_displ(:) / Mnorm + fa_bar_t(:) = syn_displ(:) / Mnorm dlnA = dlnAd else ! VELOCITY fa_bar_t(:) = -syn_accel(:) / Nnorm @@ -459,7 +459,7 @@ subroutine mtm_adj(ievent, nrec, syn, tstart, tend, adj_syn, data, data_recon) !!$ dw = twopi / (npt*DT) !!$ fnum = npt/2 + 1 !!$ -!!$ ! KEY: assemble omega vector +!!$ ! KEY: assemble omega vector !!$ wvec(:) = 0. !!$ do j = 1,npt !!$ if(j > npt/2) then @@ -480,7 +480,7 @@ subroutine mtm_adj(ievent, nrec, syn, tstart, tend, adj_syn, data, data_recon) !!$ do i = 1, nlen !!$ dzr3_win(i) = 0. !!$ if( (ishift+i) > 1 .and. (ishift+i) < nlen ) dzr3_win(i) = dzr2_win(i+ishift) -!!$ dzr30_win(i) = dzr3_win(i) +!!$ dzr30_win(i) = dzr3_win(i) !!$ enddo !!$ !!$ ! create complex synthetic seismogram and complex data seismogram @@ -510,7 +510,7 @@ subroutine mtm_adj(ievent, nrec, syn, tstart, tend, adj_syn, data, data_recon) !!$ !!$ do ictaper = 1, NTAPER ! loop over tapers !!$ -!!$ ! time domain: apply taper ictaper to synth and obs windowed seismograms +!!$ ! time domain: apply taper ictaper to synth and obs windowed seismograms !!$ ! these get written over at each loop iteration of ictaper !!$ do i = 1, nlen !!$ dzr_win(i) = dzr0_win(i) * tas(i,ictaper) ! syn(t), single-tapered and windowed @@ -546,18 +546,18 @@ subroutine mtm_adj(ievent, nrec, syn, tstart, tend, adj_syn, data, data_recon) !!$ wtr_use = cmplx(ampmax * WTR, 0.) ! syn !!$ wtr_use_unw = cmplx(ampmax_unw * WTR, 0.) ! syn, single-tapered !!$ -!!$ ! determine i_right values using the power in the (untapered) synthetic +!!$ ! determine i_right values using the power in the (untapered) synthetic !!$ ! these variables define maximum frequency for measurement !!$ ! i_right_stop = 1 --> stop at frequency i_right, not fnum -!!$ i_right = fnum -!!$ i_right_stop = 0 +!!$ i_right = fnum +!!$ i_right_stop = 0 !!$ do i = 1,fnum ! loop over frequencies -!!$ if(i > i_amp_max_unw .and. abs(wseis_syn(i)) <= abs(wtr_use_unw) .and. i_right_stop == 0) then +!!$ if(i > i_amp_max_unw .and. abs(wseis_syn(i)) <= abs(wtr_use_unw) .and. i_right_stop == 0) then !!$ i_right_stop = 1 !!$ i_right = i !!$ endif -!!$ if(i > i_amp_max_unw .and. abs(wseis_syn(i)) >= 10.*abs(wtr_use_unw) .and. i_right_stop == 1) then -!!$ i_right_stop = 0 +!!$ if(i > i_amp_max_unw .and. abs(wseis_syn(i)) >= 10.*abs(wtr_use_unw) .and. i_right_stop == 1) then +!!$ i_right_stop = 0 !!$ i_right = i !!$ endif !!$ enddo ! frequencies: i = 1,fnum @@ -591,7 +591,7 @@ subroutine mtm_adj(ievent, nrec, syn, tstart, tend, adj_syn, data, data_recon) !!$ ! find water level for multi-taper measurement !!$ ampmax = 0. !!$ do i = 1, fnum -!!$ if( abs(bot_mtm(i)) > ampmax) then +!!$ if( abs(bot_mtm(i)) > ampmax) then !!$ ampmax = abs(bot_mtm(i)) !!$ i_amp_max = i !!$ endif @@ -652,7 +652,7 @@ subroutine mtm_adj(ievent, nrec, syn, tstart, tend, adj_syn, data, data_recon) !!$ ! write transfer function to file !!$ write(filename,'(a,i5.5,a)') 'transfer_freq_', irec, '.dat' !!$ open(91,file=filename,status='unknown') -!!$ do i = 1, i_right +!!$ do i = 1, i_right !!$ write(91,'(4e18.8)') wvec(i)/twopi, dtau_w(i), dlnA_w(i), w_taper(i) !!$ enddo !!$ close(91) @@ -706,7 +706,7 @@ subroutine mtm_adj(ievent, nrec, syn, tstart, tend, adj_syn, data, data_recon) !!$ ! Note that the transfer function (trans_mtm) deals with the SHIFTED synthetics. !!$ write(filename,'(a,i5.5,a)') 'recovered_seis_freq_', irec, '.dat' !!$ open(91,file=filename,status='unknown') -!!$ do i = 1,i_right +!!$ do i = 1,i_right !!$ !!$ omega = wvec(i) !!$ wseis_rec(i) = wseis_syn(i) * (1.+ dlnA_w(i)) * exp(-cci*omega*dtau_w(i)) @@ -812,7 +812,7 @@ subroutine mtm_adj(ievent, nrec, syn, tstart, tend, adj_syn, data, data_recon) !!$ ! It also stores the displacement field sj(w), which is in the NUMERATOR term of p(w). !!$ do ictaper = 1,NTAPER !!$ -!!$ ! apply TAPER ictaper to windowed synthetics +!!$ ! apply TAPER ictaper to windowed synthetics !!$ dzr_win(:) = 0. !!$ do i = 1,nlen ! time domain !!$ dzr_win(i) = dzr0_win(i) * tas(i,ictaper) @@ -830,7 +830,7 @@ subroutine mtm_adj(ievent, nrec, syn, tstart, tend, adj_syn, data, data_recon) !!$ enddo !!$ !!$ ! term in numerator (sj) (complex) -!!$ top_p_ntaper(:,ictaper) = wseis(:) +!!$ top_p_ntaper(:,ictaper) = wseis(:) !!$ !!$ enddo ! loop over tapers !!$ @@ -903,7 +903,7 @@ subroutine mtm_adj(ievent, nrec, syn, tstart, tend, adj_syn, data, data_recon) !!$ enddo !!$ close(21) !!$ -!!$ ! time domain : tapers and other time series +!!$ ! time domain : tapers and other time series !!$ open(18,file='test_hj_t.dat',status='unknown') !!$ open(19,file='test_pj_t.dat',status='unknown') !!$ open(20,file='test_Pj_t.dat',status='unknown') @@ -920,7 +920,7 @@ subroutine mtm_adj(ievent, nrec, syn, tstart, tend, adj_syn, data, data_recon) !!$ !!$ write(22,hfmt) ( sngl(qt_adj(i,ictaper)), ictaper=1,NTAPER ) ! qj(t) !!$ write(23,hfmt) ( sngl(dlnA_qj_t(i,ictaper)), ictaper=1,NTAPER ) ! Qj(t) -!!$ write(24,hfmt) ( sngl(dlnA_qj_t(i,ictaper) * tas(i,ictaper)), ictaper=1,NTAPER ) ! hj(t) Qj(t) +!!$ write(24,hfmt) ( sngl(dlnA_qj_t(i,ictaper) * tas(i,ictaper)), ictaper=1,NTAPER ) ! hj(t) Qj(t) !!$ enddo !!$ !!$ close(18) ; close(19) ; close(20) ; close(21) ; close(22) ; close(23) ; close(24) @@ -951,24 +951,24 @@ subroutine mtm_adj(ievent, nrec, syn, tstart, tend, adj_syn, data, data_recon) if(IKER==0) then adj_syn(i1,icomp,irec) = ( syn(i1,icomp,irec) - data(i1,icomp,irec) ) * time_window(i) - elseif(IKER==1) then + else if(IKER==1) then adj_syn(i1,icomp,irec) = ft_t(i) * time_window(i) - elseif(IKER==2) then + else if(IKER==2) then adj_syn(i1,icomp,irec) = fa_t(i) * time_window(i) - elseif(IKER==3) then + else if(IKER==3) then stop 'Multitaper measurements NOT an option' !adj_syn(i1,icomp,irec) = fp(i) * time_window(i) - elseif(IKER==4) then + else if(IKER==4) then stop 'Multitaper measurements NOT an option' !adj_syn(i1,icomp,irec) = fq(i) * time_window(i) - elseif(IKER==5) then + else if(IKER==5) then adj_syn(i1,icomp,irec) = ft_bar_t(i) * time_window(i) - elseif(IKER==6) then + else if(IKER==6) then adj_syn(i1,icomp,irec) = fa_bar_t(i) * time_window(i) endif @@ -1004,16 +1004,16 @@ subroutine mtm_adj(ievent, nrec, syn, tstart, tend, adj_syn, data, data_recon) ! crude integration of the waveform difference chi_data(ievent,irec,icomp,1) = DT*sum( adj_syn(:,icomp,irec)**2 ) / cov_data(imeasure) - elseif(IKER==1) then + else if(IKER==1) then chi_data(ievent,irec,icomp,1) = (tshift_xc_pert )**2 / cov_data(imeasure) - elseif(IKER==2) then + else if(IKER==2) then chi_data(ievent,irec,icomp,1) = (dlnA_pert)**2 / cov_data(imeasure) -!!$ elseif(IKER==3) then +!!$ else if(IKER==3) then !!$ chi_data(ievent,irec,icomp,1) = 2.*dw*sum( wp_taper(1:i_right) * (dtau_w(1:i_right)**2) ) !!$ -!!$ elseif(IKER==4) then +!!$ else if(IKER==4) then !!$ chi_data(ievent,irec,icomp,1) = 2.*dw*sum( wq_taper(1:i_right) * (dlnA_w(1:i_right)**2) ) endif @@ -1027,7 +1027,7 @@ end subroutine mtm_adj !------------------------------------------------------------------ ! END MAIN PROGRAM !------------------------------------------------------------------ - + !!$!------------------------------------------------------------------ !!$ subroutine fft(n,xi,zign,dt) !!$! Fourier transform @@ -1095,13 +1095,13 @@ end subroutine mtm_adj !!$ !!$ ! final steps deal with dt factors !!$ if(zign > 0.) then ! FORWARD FFT -!!$ do i = 1,lx +!!$ do i = 1,lx !!$ xi(i) = xi(i)*dt ! multiplication by dt !!$ enddo !!$ !!$ else ! REVERSE FFT !!$ flx = flx*dt -!!$ do i = 1,lx +!!$ do i = 1,lx !!$ xi(i) = xi(i)/flx ! division by dt !!$ enddo !!$ endif @@ -1133,7 +1133,7 @@ end subroutine mtm_adj !!$ do i = 1,nsmp !!$ r(i) = real(s(i)) ! REAL part !!$ enddo -!!$ +!!$ !!$ end subroutine fftinv !!$ !!$!------------------------------------------------------------------ diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/src/wave2d_variables.f90 b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/src/wave2d_variables.f90 index 0a7ed24b7..b3e1e045a 100644 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/src/wave2d_variables.f90 +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/SEM2D_iterate/src/wave2d_variables.f90 @@ -90,14 +90,14 @@ module wave2d_variables ! displacement, velocity and acceleration double precision, dimension(NCOMP,NGLOB) :: displ,veloc,accel double precision, dimension(NCOMP,NGLOB) :: b_displ,b_veloc,b_accel - + ! plotting ! double precision, dimension(NGLOB) :: norm ! space derivatives double precision tempx1l,tempx2l,tempy1l,tempy2l,tempz1l,tempz2l double precision fac1,fac2,hp1,hp2 - double precision dsxdxl,dszdxl,dsydxl,dsydzl,dsxdzl,dszdzl + double precision dsxdxl,dszdxl,dsydxl,dsydzl,dsxdzl,dszdzl double precision sigma_xx,sigma_xy,sigma_xz,sigma_zx,sigma_zy,sigma_zz double precision, dimension(NGLLX,NGLLZ) :: tempx1,tempx2,tempy1,tempy2,tempz1,tempz2 double precision, dimension(3,3) :: ds @@ -152,7 +152,7 @@ module wave2d_variables integer ios ! number of time steps to store wavefield - integer NINT + integer NINT ! input/output directory character(len=100) :: in_dir,out_dir diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/UTILS/kernel_combine.pl b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/UTILS/kernel_combine.pl index dfa7dfe3e..9538b6415 100755 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/UTILS/kernel_combine.pl +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/UTILS/kernel_combine.pl @@ -55,7 +55,7 @@ $pdcat[$p] = $kfilem; $p = $p+1; } } -} +} #====================== diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/UTILS/tomo_make_figs.pl b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/UTILS/tomo_make_figs.pl index 853d3ae6b..653b0cd33 100755 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/UTILS/tomo_make_figs.pl +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/UTILS/tomo_make_figs.pl @@ -5,7 +5,7 @@ # tomo_make_figs.pl # # This script makes the event kernel plots by calling vtk scripts. -# +# # EXAMPLE (unsmoothed kernels): # ~/UTILS/tomo_make_figs.pl 1 1 all m16 0 0 # ~/UTILS/tomo_make_figs.pl 1 0 all m16 0 0 (make vtu files only) @@ -49,7 +49,7 @@ open(IN,$file_eids); @eids = ; $nevent = @eids; # COLOR SCALE for kernels -$cmax0 = 2.5e-11; # default value 5.0e-11 +$cmax0 = 2.5e-11; # default value 5.0e-11 #$cmax0 = 15.0e-11; #======================================================== @@ -137,12 +137,12 @@ if ( $nmesh == $nmesh0) { print "--> making vtu files\n"; @files = glob("${mesh_files}"); - foreach $ifile (@files) { + foreach $ifile (@files) { $ofile = `echo $ifile | sed s/mesh/vtu/`; chomp($ofile); `mesh2vtu.pl -i $ifile -o $ofile`; - print "mesh2vtu.pl -i $ifile -o $ofile\n"; - } - #die("testing"); + print "mesh2vtu.pl -i $ifile -o $ofile\n"; + } + #die("testing"); } } } @@ -174,58 +174,58 @@ } else { - # RUN output directory - if ($ismooth == 0) { + # RUN output directory + if ($ismooth == 0) { - # first, generate the source and receiver vtk files - #print CSH "\n/opt/seismo-util/source/perl/split_sr_vtk/split_sr_vtk.pl $srvtk ${dir_output}"; - `split_sr_vtk.pl $srvtk ${dir_output}`; + # first, generate the source and receiver vtk files + #print CSH "\n/opt/seismo-util/source/perl/split_sr_vtk/split_sr_vtk.pl $srvtk ${dir_output}"; + `split_sr_vtk.pl $srvtk ${dir_output}`; - # color scale value - $cfile = "${dir_mesh}/cmax_kernel"; + # color scale value + $cfile = "${dir_mesh}/cmax_kernel"; - `echo $cmax0 > $cfile`; - #if(not -f $cfile) { - # $cmax0 = 1.0e-11; # default value - # `echo $cmax0 > $cfile`; - #} - - `mkdir -p ${dir_fig1}`; - `rm ${dir_fig1}/*`; # remove all figures (for now) + `echo $cmax0 > $cfile`; + #if(not -f $cfile) { + # $cmax0 = 1.0e-11; # default value + # `echo $cmax0 > $cfile`; + #} - # second, make figures - # view_kernel.pl deletes all figures in its local dir each time - cd_directory($dir_vtk); - `rm ${dir_vtk}/*.vtk`; - `cp ${dir_output}/*.vtk ${dir_vtk}`; + `mkdir -p ${dir_fig1}`; + `rm ${dir_fig1}/*`; # remove all figures (for now) - #`${dir_vtk}/view_kernel.pl $eid 1 $smodel $ftag $elab`; # kappa kernel - #`cp ${dir_vtk}/*ps ${dir_vtk}/*pdf ${dir_fig1}`; # kappa kernel + # second, make figures + # view_kernel.pl deletes all figures in its local dir each time + cd_directory($dir_vtk); + `rm ${dir_vtk}/*.vtk`; + `cp ${dir_output}/*.vtk ${dir_vtk}`; - `${dir_vtk}/view_kernel.pl $eid 2 $smodel $ftag $elab`; # mu kernel - `cp ${dir_vtk}/*ps ${dir_vtk}/*pdf ${dir_fig1}`; # mu kernel + #`${dir_vtk}/view_kernel.pl $eid 1 $smodel $ftag $elab`; # kappa kernel + #`cp ${dir_vtk}/*ps ${dir_vtk}/*pdf ${dir_fig1}`; # kappa kernel - `cp ${dir_vtk}/view_kernel*pl ${dir_vtk}/view_kernel*tcl ${dir_fig1}`; + `${dir_vtk}/view_kernel.pl $eid 2 $smodel $ftag $elab`; # mu kernel + `cp ${dir_vtk}/*ps ${dir_vtk}/*pdf ${dir_fig1}`; # mu kernel - # copy some files to the extra directory - # the index denotes which depth cross-section to take - $index = 3; $sti = sprintf("%2.2i",$index); - `cp ${dir_fig1}/*set.pdf ${dir_fig1}/*${sti}.pdf ${dir_fig1}/*${sti}.ps ${dir_fig2}`; + `cp ${dir_vtk}/view_kernel*pl ${dir_vtk}/view_kernel*tcl ${dir_fig1}`; + + # copy some files to the extra directory + # the index denotes which depth cross-section to take + $index = 3; $sti = sprintf("%2.2i",$index); + `cp ${dir_fig1}/*set.pdf ${dir_fig1}/*${sti}.pdf ${dir_fig1}/*${sti}.ps ${dir_fig2}`; } else { - cd_directory($dir_vtk); - `rm ${dir_vtk}/*.vtk`; - `cp ${dir_output}/*.vtk ${dir_vtk}`; + cd_directory($dir_vtk); + `rm ${dir_vtk}/*.vtk`; + `cp ${dir_output}/*.vtk ${dir_vtk}`; - #`${dir_vtk}/view_kernel_smooth.pl $eid 1 $smodel $ftag $elab $hsmooth $vsmooth`; # kappa kernel - #`cp ${dir_vtk}/*ps ${dir_vtk}/*pdf ${dir_fig1}`; # kappa kernel + #`${dir_vtk}/view_kernel_smooth.pl $eid 1 $smodel $ftag $elab $hsmooth $vsmooth`; # kappa kernel + #`cp ${dir_vtk}/*ps ${dir_vtk}/*pdf ${dir_fig1}`; # kappa kernel - `${dir_vtk}/view_kernel_smooth.pl $eid 2 $smodel $ftag $elab $hsmooth $vsmooth`; # mu kernel - `cp ${dir_vtk}/*ps ${dir_vtk}/*pdf ${dir_fig1}`; # mu kernel + `${dir_vtk}/view_kernel_smooth.pl $eid 2 $smodel $ftag $elab $hsmooth $vsmooth`; # mu kernel + `cp ${dir_vtk}/*ps ${dir_vtk}/*pdf ${dir_fig1}`; # mu kernel - `cp ${dir_vtk}/view_kernel_smooth*pl ${dir_vtk}/view_kernel_smooth*tcl ${dir_fig1}`; - } + `cp ${dir_vtk}/view_kernel_smooth*pl ${dir_vtk}/view_kernel_smooth*tcl ${dir_fig1}`; + } } # write the event to an output file diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/UTILS/tomo_make_figs_pmax.pl b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/UTILS/tomo_make_figs_pmax.pl index 5f63433e9..d9b2ad775 100755 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/UTILS/tomo_make_figs_pmax.pl +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/UTILS/tomo_make_figs_pmax.pl @@ -6,7 +6,7 @@ # # This script plots model updates from the subspace method # by calling vtk scripts. -# +# # EXAMPLE: # ~/UTILS/tomo_make_figs_pmax.pl 1 0 dm15 0.80 0.0 mu_kernel_smooth beta_window # @@ -30,7 +30,7 @@ # dir_vtk -- to run vtk script # dir_ker_out -- collect copies of the figures $dir_vtk = "/net/denali/scratch1/carltape/vtk/carl_new"; -$dir_ker_out = "/net/sierra/raid1/carltape/socal/socal_3D/RUNS/MODELS/${smodel}/${fdir}"; +$dir_ker_out = "/net/sierra/raid1/carltape/socal/socal_3D/RUNS/MODELS/${smodel}/${fdir}"; $dir_mesh = $dir_ker_out; if (not -e $dir_vtk) {die("check if dir_vtk $dir_vtk exist or not\n")} if (not -e $dir_ker_out) {die("check if dir_ker_out $dir_ker_out exist or not\n")} @@ -82,12 +82,12 @@ if ( $nmesh == $nmesh0) { print "--> making vtu files\n"; @files = glob("${mesh_files}"); - foreach $ifile (@files) { + foreach $ifile (@files) { $ofile = `echo $ifile | sed s/mesh/vtu/`; chomp($ofile); `mesh2vtu.pl -i $ifile -o $ofile`; - print "mesh2vtu.pl -i $ifile -o $ofile\n"; - } - #die("testing"); + print "mesh2vtu.pl -i $ifile -o $ofile\n"; + } + #die("testing"); } } } diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/KERNELS_MODELS/copy_bin_dirs.pl b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/KERNELS_MODELS/copy_bin_dirs.pl index 750fddebc..c4d8e40c9 100755 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/KERNELS_MODELS/copy_bin_dirs.pl +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/KERNELS_MODELS/copy_bin_dirs.pl @@ -12,7 +12,7 @@ # hdur_lab label for the measurements (T02, T06, all) # nproc number of processors # ftag type of files you want to copy -# +# # EXAMPLE: # copy_bin_dirs.pl m10 all 168 mu_kernel ; copy_bin_dirs.pl m10 all 168 kappa_kernel # @@ -43,7 +43,7 @@ die("testing"); } -$imin = 1; $imax = $neid; # default +$imin = 1; $imax = $neid; # default #$imin = 1; $imax = 30; #$imin = 89; $imax = $imin; @@ -82,12 +82,12 @@ `mkdir -p $odir`; `cp $bin_files $odir`; `sleep 10s`; - + $nfile_out = `ls -1 $odir/*$ftag*.bin | wc | awk '{print \$1}'`; chomp($nfile_out); if ($nfile_out != $nproc) { - print "\n -- nfile_out = $nfile_out -- nproc = $nproc --\n"; - die("mismatch of expected vs actual bin files\n"); + print "\n -- nfile_out = $nfile_out -- nproc = $nproc --\n"; + die("mismatch of expected vs actual bin files\n"); } } diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/cg_step/src/constants.h b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/cg_step/src/constants.h index ae8a7bea1..86168c062 100644 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/cg_step/src/constants.h +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/cg_step/src/constants.h @@ -89,7 +89,7 @@ double precision, parameter :: SOURCE_DECAY_RATE = 1.628d0 ! --------------------------------------------------------------------------------------- -! LQY -- Following 3 variables stays here temporarily, +! LQY -- Following 3 variables stays here temporarily, ! we need to move them to Par_file at a proper time ! --------------------------------------------------------------------------------------- ! save moho mesh and compute Moho boundary kernels @@ -99,7 +99,7 @@ ! to be used in the backward reconstruction in the presence of attenuation integer, parameter :: NSTEP_Q_SAVE = 200 -! the scratch disk to save the state variables saved in the forward +! the scratch disk to save the state variables saved in the forward ! simulation, this can be a global scratch disk in case you run out of ! space on the local scratch disk character(len=150), parameter :: LOCAL_PATH_Q = '/ibrixfs1/scratch/lqy' diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/cg_step/src/values_from_mesher.h b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/cg_step/src/values_from_mesher.h index c1e001260..bd2fa95ce 100644 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/cg_step/src/values_from_mesher.h +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/cg_step/src/values_from_mesher.h @@ -1,4 +1,4 @@ - + ! ! this is the parameter file for static compilation of the solver ! @@ -7,9 +7,9 @@ ! ! number of processors = 168 ! - ! number of ES nodes = 21.00000 + ! number of ES nodes = 21.00000 ! percentage of total 640 ES nodes = 3.281250 % - ! total memory available on these ES nodes (Gb) = 336.0000 + ! total memory available on these ES nodes (Gb) = 336.0000 ! ! max points per processor = max vector length = 163941 ! min vector length = 25 @@ -24,12 +24,12 @@ ! total for full mesh: ! ------------------- ! - ! exact total number of spectral elements in entire mesh = + ! exact total number of spectral elements in entire mesh = ! 405216 - ! approximate total number of points in entire mesh = - ! 27542088.0000000 - ! approximate total number of degrees of freedom in entire mesh = - ! 82626264.0000000 + ! approximate total number of points in entire mesh = + ! 27542088.0000000 + ! approximate total number of degrees of freedom in entire mesh = + ! 82626264.0000000 ! ! resolution of the mesh at the surface: ! ------------------------------------- @@ -38,17 +38,17 @@ ! spectral elements along Y = 288 ! GLL points along X = 1345 ! GLL points along Y = 1153 - ! average distance between points along X in m = 475.4175 - ! average distance between points along Y in m = 436.8476 + ! average distance between points along X in m = 475.4175 + ! average distance between points along Y in m = 436.8476 ! - + integer, parameter :: NSPEC_AB = 2412 integer, parameter :: NGLOB_AB = 163941 - + ! ! number of time steps = 27300 ! integer, parameter :: NSPEC_ATTENUATION = 1 logical, parameter :: ATTENUATION_VAL = .false. logical, parameter :: ANISOTROPY_VAL = .false. - + diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/model_pert/setup_model_pert.pl b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/model_pert/setup_model_pert.pl index a5da8a5c1..1ec0cdba1 100755 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/model_pert/setup_model_pert.pl +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/model_pert/setup_model_pert.pl @@ -7,7 +7,7 @@ # Start with one vp and vs model, and then add a perturbation to new vp and vs models. # # Removed linked files in INPUT_MODEL prior to running. -# +# # EXAMPLE: # setup_model_pert.pl 168 m16 m00 vs_m16 vs_m00 vs_m16_m00 # setup_model_pert.pl 168 m16 m15 vs_m16 vs_m15 vs_m16_m15 diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/model_pert/src/constants.h b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/model_pert/src/constants.h index ae8a7bea1..86168c062 100644 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/model_pert/src/constants.h +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/model_pert/src/constants.h @@ -89,7 +89,7 @@ double precision, parameter :: SOURCE_DECAY_RATE = 1.628d0 ! --------------------------------------------------------------------------------------- -! LQY -- Following 3 variables stays here temporarily, +! LQY -- Following 3 variables stays here temporarily, ! we need to move them to Par_file at a proper time ! --------------------------------------------------------------------------------------- ! save moho mesh and compute Moho boundary kernels @@ -99,7 +99,7 @@ ! to be used in the backward reconstruction in the presence of attenuation integer, parameter :: NSTEP_Q_SAVE = 200 -! the scratch disk to save the state variables saved in the forward +! the scratch disk to save the state variables saved in the forward ! simulation, this can be a global scratch disk in case you run out of ! space on the local scratch disk character(len=150), parameter :: LOCAL_PATH_Q = '/ibrixfs1/scratch/lqy' diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/model_pert/src/values_from_mesher.h b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/model_pert/src/values_from_mesher.h index c1e001260..bd2fa95ce 100644 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/model_pert/src/values_from_mesher.h +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/model_pert/src/values_from_mesher.h @@ -1,4 +1,4 @@ - + ! ! this is the parameter file for static compilation of the solver ! @@ -7,9 +7,9 @@ ! ! number of processors = 168 ! - ! number of ES nodes = 21.00000 + ! number of ES nodes = 21.00000 ! percentage of total 640 ES nodes = 3.281250 % - ! total memory available on these ES nodes (Gb) = 336.0000 + ! total memory available on these ES nodes (Gb) = 336.0000 ! ! max points per processor = max vector length = 163941 ! min vector length = 25 @@ -24,12 +24,12 @@ ! total for full mesh: ! ------------------- ! - ! exact total number of spectral elements in entire mesh = + ! exact total number of spectral elements in entire mesh = ! 405216 - ! approximate total number of points in entire mesh = - ! 27542088.0000000 - ! approximate total number of degrees of freedom in entire mesh = - ! 82626264.0000000 + ! approximate total number of points in entire mesh = + ! 27542088.0000000 + ! approximate total number of degrees of freedom in entire mesh = + ! 82626264.0000000 ! ! resolution of the mesh at the surface: ! ------------------------------------- @@ -38,17 +38,17 @@ ! spectral elements along Y = 288 ! GLL points along X = 1345 ! GLL points along Y = 1153 - ! average distance between points along X in m = 475.4175 - ! average distance between points along Y in m = 436.8476 + ! average distance between points along X in m = 475.4175 + ! average distance between points along Y in m = 436.8476 ! - + integer, parameter :: NSPEC_AB = 2412 integer, parameter :: NGLOB_AB = 163941 - + ! ! number of time steps = 27300 ! integer, parameter :: NSPEC_ATTENUATION = 1 logical, parameter :: ATTENUATION_VAL = .false. logical, parameter :: ANISOTROPY_VAL = .false. - + diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/model_slice/constants.h b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/model_slice/constants.h index 09855e954..da6240080 100644 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/model_slice/constants.h +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/model_slice/constants.h @@ -89,7 +89,7 @@ double precision, parameter :: SOURCE_DECAY_RATE = 1.628d0 ! --------------------------------------------------------------------------------------- -! LQY -- Following 3 variables stays here temporarily, +! LQY -- Following 3 variables stays here temporarily, ! we need to move them to Par_file at a proper time ! --------------------------------------------------------------------------------------- ! save moho mesh and compute Moho boundary kernels @@ -99,7 +99,7 @@ ! to be used in the backward reconstruction in the presence of attenuation integer, parameter :: NSTEP_Q_SAVE = 200 -! the scratch disk to save the state variables saved in the forward +! the scratch disk to save the state variables saved in the forward ! simulation, this can be a global scratch disk in case you run out of ! space on the local scratch disk character(len=150), parameter :: LOCAL_PATH_Q = '/ibrixfs1/scratch/lqy' diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/model_slice/sem_model_slice.f90 b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/model_slice/sem_model_slice.f90 index 9da4cfb34..6f5c128aa 100644 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/model_slice/sem_model_slice.f90 +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/model_slice/sem_model_slice.f90 @@ -42,7 +42,7 @@ program sem_model_slice ! read points to be interpolated open(11,file=xyz_infile,iostat=ios) i=0 - do while (1 == 1) + do while (1 == 1) i=i+1 read(11,*,iostat=ios) x(i),y(i),z(i) if (ios /= 0) exit diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/model_slice/values_from_mesher.h b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/model_slice/values_from_mesher.h index a769dcf5f..10a3016ca 100644 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/model_slice/values_from_mesher.h +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/model_slice/values_from_mesher.h @@ -1,4 +1,4 @@ - + ! ! this is the parameter file for static compilation of the solver ! @@ -7,9 +7,9 @@ ! ! number of processors = 168 ! - ! number of ES nodes = 21.00000 + ! number of ES nodes = 21.00000 ! percentage of total 640 ES nodes = 3.281250 % - ! total memory available on these ES nodes (Gb) = 336.0000 + ! total memory available on these ES nodes (Gb) = 336.0000 ! ! max points per processor = max vector length = 163941 ! min vector length = 25 @@ -24,12 +24,12 @@ ! total for full mesh: ! ------------------- ! - ! exact total number of spectral elements in entire mesh = + ! exact total number of spectral elements in entire mesh = ! 405216 - ! approximate total number of points in entire mesh = - ! 27542088.0000000 - ! approximate total number of degrees of freedom in entire mesh = - ! 82626264.0000000 + ! approximate total number of points in entire mesh = + ! 27542088.0000000 + ! approximate total number of degrees of freedom in entire mesh = + ! 82626264.0000000 ! ! resolution of the mesh at the surface: ! ------------------------------------- @@ -38,17 +38,17 @@ ! spectral elements along Y = 288 ! GLL points along X = 1345 ! GLL points along Y = 1153 - ! average distance between points along X in m = 475.4175 - ! average distance between points along Y in m = 436.8476 + ! average distance between points along X in m = 475.4175 + ! average distance between points along Y in m = 436.8476 ! - + integer, parameter :: NSPEC_AB = 2412 integer, parameter :: NGLOB_AB = 163941 - + ! ! number of time steps = 18200 ! integer, parameter :: NSPEC_ATTENUATION = NSPEC_AB logical, parameter :: ATTENUATION_VAL = .true. logical, parameter :: ANISOTROPY_VAL = .false. - + diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/model_vp_vs/setup_model_vp_vs.pl b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/model_vp_vs/setup_model_vp_vs.pl index a7deb10fe..ba178eba4 100755 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/model_vp_vs/setup_model_vp_vs.pl +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/model_vp_vs/setup_model_vp_vs.pl @@ -6,7 +6,7 @@ # # Start with one vp and vs model, and then add a perturbation and compute new vp and vs models. # Note the minmax wavespeed specifications within the fortran code. -# +# # EXAMPLE: # setup_model_vp_vs.pl 168 m15 dm15 vp_m15 vs_m15 dm_kappa_kernel_smooth_p090 dm_mu_kernel_smooth_p090 # setup_model_vp_vs.pl 168 m14 dm14 vp_m14 vs_m14 dm_kappa_kernel_smooth_p080 dm_mu_kernel_smooth_p080 diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/model_vp_vs/src/add_model.f90 b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/model_vp_vs/src/add_model.f90 index 6b0c41e53..4cf5a7409 100644 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/model_vp_vs/src/add_model.f90 +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/model_vp_vs/src/add_model.f90 @@ -117,7 +117,7 @@ program add_model ! compute minmax values of current model ! NOTE: mpi_reduce operates on the values from all procs, - ! but the reduced value only exists on the root proc. + ! but the reduced value only exists on the root proc. call mpi_reduce(minval(model_vs(:,:,:,1:nspec)), vsmin_before, 1, CUSTOM_MPI_TYPE, MPI_MIN, 0, MPI_COMM_WORLD,ier) call mpi_reduce(maxval(model_vs(:,:,:,1:nspec)), vsmax_before, 1, CUSTOM_MPI_TYPE, MPI_MAX, 0, MPI_COMM_WORLD,ier) call mpi_reduce(minval(model_vp(:,:,:,1:nspec)), vpmin_before, 1, CUSTOM_MPI_TYPE, MPI_MIN, 0, MPI_COMM_WORLD,ier) @@ -191,11 +191,11 @@ program add_model !----------------------------------------------------- ! S wavespeed model - model_vs_new = 0. + model_vs_new = 0. model_vs_new = model_vs * exp( model_dB ) ! P wavespeed model - model_vp_new = 0. + model_vp_new = 0. model_vp_new = sqrt( (4.0/3.0)* model_vs**2 * exp( 2.0*model_dB ) + & (model_vp**2 - (4.0/3.0)* model_vs**2) * exp( 2.0*model_dC ) ) @@ -261,7 +261,7 @@ program add_model ! compute Poisson's ratio and bulk wavespeed of the current model and new model ! Poisson's ratio of current model - total_model = 0. + total_model = 0. total_model = ( model_vp**2 - 2.0*model_vs**2 ) / ( 2.0*model_vp**2 - 2.0*model_vs**2 ) fname = 'poisson' write(m_file,'(a,i6.6,a)') 'OUTPUT_MODEL/proc',myrank,'_'//trim(fname)//'.bin' @@ -270,7 +270,7 @@ program add_model close(12) ! Poisson's ratio of new model - total_model = 0. + total_model = 0. total_model = ( model_vp_new**2 - 2.0*model_vs_new**2 ) / & ( 2.0*model_vp_new**2 - 2.0*model_vs_new**2 ) fname = 'poisson_new' @@ -280,7 +280,7 @@ program add_model close(12) ! bulk wavespeed of current model - total_model = 0. + total_model = 0. total_model = sqrt( model_vp**2 - (4.0/3.0)*model_vs**2 ) fname = 'vb' write(m_file,'(a,i6.6,a)') 'OUTPUT_MODEL/proc',myrank,'_'//trim(fname)//'.bin' @@ -289,7 +289,7 @@ program add_model close(12) ! bulk wavespeed of new model - total_model = 0. + total_model = 0. total_model = sqrt( model_vp_new**2 - (4.0/3.0)*model_vs_new**2 ) fname = 'vb_new' write(m_file,'(a,i6.6,a)') 'OUTPUT_MODEL/proc',myrank,'_'//trim(fname)//'.bin' diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/model_vp_vs/src/constants.h b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/model_vp_vs/src/constants.h index ae8a7bea1..86168c062 100644 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/model_vp_vs/src/constants.h +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/model_vp_vs/src/constants.h @@ -89,7 +89,7 @@ double precision, parameter :: SOURCE_DECAY_RATE = 1.628d0 ! --------------------------------------------------------------------------------------- -! LQY -- Following 3 variables stays here temporarily, +! LQY -- Following 3 variables stays here temporarily, ! we need to move them to Par_file at a proper time ! --------------------------------------------------------------------------------------- ! save moho mesh and compute Moho boundary kernels @@ -99,7 +99,7 @@ ! to be used in the backward reconstruction in the presence of attenuation integer, parameter :: NSTEP_Q_SAVE = 200 -! the scratch disk to save the state variables saved in the forward +! the scratch disk to save the state variables saved in the forward ! simulation, this can be a global scratch disk in case you run out of ! space on the local scratch disk character(len=150), parameter :: LOCAL_PATH_Q = '/ibrixfs1/scratch/lqy' diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/model_vp_vs/src/values_from_mesher.h b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/model_vp_vs/src/values_from_mesher.h index c1e001260..bd2fa95ce 100644 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/model_vp_vs/src/values_from_mesher.h +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/model_vp_vs/src/values_from_mesher.h @@ -1,4 +1,4 @@ - + ! ! this is the parameter file for static compilation of the solver ! @@ -7,9 +7,9 @@ ! ! number of processors = 168 ! - ! number of ES nodes = 21.00000 + ! number of ES nodes = 21.00000 ! percentage of total 640 ES nodes = 3.281250 % - ! total memory available on these ES nodes (Gb) = 336.0000 + ! total memory available on these ES nodes (Gb) = 336.0000 ! ! max points per processor = max vector length = 163941 ! min vector length = 25 @@ -24,12 +24,12 @@ ! total for full mesh: ! ------------------- ! - ! exact total number of spectral elements in entire mesh = + ! exact total number of spectral elements in entire mesh = ! 405216 - ! approximate total number of points in entire mesh = - ! 27542088.0000000 - ! approximate total number of degrees of freedom in entire mesh = - ! 82626264.0000000 + ! approximate total number of points in entire mesh = + ! 27542088.0000000 + ! approximate total number of degrees of freedom in entire mesh = + ! 82626264.0000000 ! ! resolution of the mesh at the surface: ! ------------------------------------- @@ -38,17 +38,17 @@ ! spectral elements along Y = 288 ! GLL points along X = 1345 ! GLL points along Y = 1153 - ! average distance between points along X in m = 475.4175 - ! average distance between points along Y in m = 436.8476 + ! average distance between points along X in m = 475.4175 + ! average distance between points along Y in m = 436.8476 ! - + integer, parameter :: NSPEC_AB = 2412 integer, parameter :: NGLOB_AB = 163941 - + ! ! number of time steps = 27300 ! integer, parameter :: NSPEC_ATTENUATION = 1 logical, parameter :: ATTENUATION_VAL = .false. logical, parameter :: ANISOTROPY_VAL = .false. - + diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/scripts/setup_forward_dir.pl b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/scripts/setup_forward_dir.pl index 559614c6b..ad23881e1 100755 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/scripts/setup_forward_dir.pl +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/scripts/setup_forward_dir.pl @@ -73,31 +73,31 @@ $cmtfile = "${cmt_dir}/CMTSOLUTION_$eid"; if (not -f $cmtfile) { - print "\n --> cmtfile does not exist"; + print "\n --> cmtfile does not exist"; } else { - # copy in a new CMTSOLUTION - $cmtfile1 = "$eid/DATA/CMTSOLUTION"; - `${scripts_dir}/copy_basin_sem_dir.bash ${master_dir} $eid`; - `cp $cmtfile $cmtfile1`; - - # change the half-duration - $hdur_st = sprintf("%8.4f",$hdur); - $ctemp = "${cmtfile}_temp"; - `sed '/^half duration:/s/^.*\$/half duration: ${hdur_st}/' $cmtfile1 > $ctemp`; - `mv $ctemp $cmtfile1`; - - # change the simulation time in the Par_file - $sdur = sprintf("%.1f",$sdur_round); - $parfile = "$eid/DATA/Par_file"; - $ptemp = "$eid/DATA/Par_file_temp"; - `sed '/^RECORD_LENGTH_IN_SECONDS =/s/^.*\$/RECORD_LENGTH_IN_SECONDS = $sdur/' $parfile > $ptemp`; - `mv $ptemp $parfile`; - - # change the label for the run - `sed "/socal_earthquakes/s/socal_earthquakes/${eid}_earthquake/" $eid/go_mesher_solver_lsf_basin.bash > $eid/run.tmp`; - `mv -f $eid/run.tmp $eid/go_mesher_solver_lsf_basin.bash`; + # copy in a new CMTSOLUTION + $cmtfile1 = "$eid/DATA/CMTSOLUTION"; + `${scripts_dir}/copy_basin_sem_dir.bash ${master_dir} $eid`; + `cp $cmtfile $cmtfile1`; + + # change the half-duration + $hdur_st = sprintf("%8.4f",$hdur); + $ctemp = "${cmtfile}_temp"; + `sed '/^half duration:/s/^.*\$/half duration: ${hdur_st}/' $cmtfile1 > $ctemp`; + `mv $ctemp $cmtfile1`; + + # change the simulation time in the Par_file + $sdur = sprintf("%.1f",$sdur_round); + $parfile = "$eid/DATA/Par_file"; + $ptemp = "$eid/DATA/Par_file_temp"; + `sed '/^RECORD_LENGTH_IN_SECONDS =/s/^.*\$/RECORD_LENGTH_IN_SECONDS = $sdur/' $parfile > $ptemp`; + `mv $ptemp $parfile`; + + # change the label for the run + `sed "/socal_earthquakes/s/socal_earthquakes/${eid}_earthquake/" $eid/go_mesher_solver_lsf_basin.bash > $eid/run.tmp`; + `mv -f $eid/run.tmp $eid/go_mesher_solver_lsf_basin.bash`; } } } diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/scripts/setup_kernel_dir.pl b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/scripts/setup_kernel_dir.pl index ae3bcbc38..74f7bdfff 100755 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/scripts/setup_kernel_dir.pl +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/scripts/setup_kernel_dir.pl @@ -10,7 +10,7 @@ # smodel model within the CG iteration (m0, m0t, m1, etc) # hdur_lab label for the measurements (T02, T06, all) # nstat minimum number of stations to use -# +# # EXAMPLE: # setup_kernel_dir.pl m00 all 10 # setup_kernel_dir.pl m12 all 10 @@ -83,112 +83,112 @@ } else { if ( -e $eid || (-e "done_dirs/${eid}" || -e "PROCESS/${eid}") ) { - print "--> kernel simulation has been setup or has been done\n"; - + print "--> kernel simulation has been setup or has been done\n"; + } else { - # output directories on denali - $output_dir = "${run_dir_eid}/OUTPUT_${hdur_lab}"; - $adj_dir = "${run_dir_eid}/ADJOINT_${hdur_lab}"; + # output directories on denali + $output_dir = "${run_dir_eid}/OUTPUT_${hdur_lab}"; + $adj_dir = "${run_dir_eid}/ADJOINT_${hdur_lab}"; - if (-e $output_dir) { - print "--> kernel simulation has been run\n"; + if (-e $output_dir) { + print "--> kernel simulation has been run\n"; - } else { - - if (not -e "${adj_dir}") { - print "--> measurement code has not been run\n"; + } else { - } else { - $nadj = `ls -1 ${adj_dir}/*adj | wc | awk '{print \$1}'`; chomp($nadj); - $nstat_adj = $nadj/3; - print "--> number of adjoint sources/stations : $nadj/$nstat_adj\n"; + if (not -e "${adj_dir}") { + print "--> measurement code has not been run\n"; + + } else { + $nadj = `ls -1 ${adj_dir}/*adj | wc | awk '{print \$1}'`; chomp($nadj); + $nstat_adj = $nadj/3; + print "--> number of adjoint sources/stations : $nadj/$nstat_adj\n"; - if ($nstat_adj < $nstat) { - print "--> fewer than $nstat stations\n"; - } else { - print "--> RUN THIS EVENT\n"; + if ($nstat_adj < $nstat) { + print "--> fewer than $nstat stations\n"; + } else { + print "--> RUN THIS EVENT\n"; - #---------------------------- + #---------------------------- - # replicate the master directory - `${scripts_dir}/copy_basin_sem_dir.bash ${master_dir} $eid`; + # replicate the master directory + `${scripts_dir}/copy_basin_sem_dir.bash ${master_dir} $eid`; # modify the EID label for the post-processing script # eid=9818433 $processfile = "$eid/go_process.bash"; $ptemp = "$eid/go_process_temp.bash"; - `sed '/^eid=/s/^.*\$/eid=$eid/' $processfile > $ptemp`; - `mv $ptemp $processfile`; + `sed '/^eid=/s/^.*\$/eid=$eid/' $processfile > $ptemp`; + `mv $ptemp $processfile`; `chmod +x $processfile`; - # copy in a new CMTSOLUTION - $cmtfile0 = "$cmtfile"; - $cmtfile1 = "$eid/DATA/CMTSOLUTION"; - `cp $cmtfile0 $cmtfile1`; - - # change the half-duration - #$hdur_st = sprintf("%8.4f",$hdur); - #$ctemp = "${cmtfile1}_temp"; - #`sed '/^half duration:/s/^.*\$/half duration: ${hdur_st}/' $cmtfile1 > $ctemp`; - #`mv $ctemp $cmtfile1`; - - # change the simulation TYPE in the Par_file - `change_simulation_type2.pl -F`; - - # change the simulation TIME in the Par_file - #$sdur_round = 5; # testing only - $sdur = sprintf("%.1f",$sdur_round); - $parfile = "$eid/DATA/Par_file"; - $ptemp = "$eid/DATA/Par_file_temp"; - `sed '/^RECORD_LENGTH_IN_SECONDS =/s/^.*\$/RECORD_LENGTH_IN_SECONDS = $sdur/' $parfile > $ptemp`; - `mv $ptemp $parfile`; - - # make sure attenuation is OFF - `sed '/^ATTENUATION =/s/^.*\$/ATTENUATION = .false./' $parfile > $ptemp`; - `mv $ptemp $parfile`; - - # copy the STATIONS file - $stafile = "${adj_dir}/STATIONS_ADJOINT"; - `cp $stafile $eid/DATA/STATIONS`; - `cp $stafile $eid/DATA/STATIONS_ADJOINT`; - - # number of stations - $ns = `sed -n 1p $eid/DATA/STATIONS`; - $nadj1 = 3*$ns; - - # copy adjoint sources - `rm $eid/SEM/*adj`; - print "\n copying the adjoint sources onto pangu...\n"; - `cp ${adj_dir}/*adj $eid/SEM`; - - # check that all the adjoint sources are there - $nadj2 = `ls -1 $eid/SEM/*adj | wc | awk '{print \$1}'`; chomp($nadj2); - print "\n NUMBER OF RECORDS -- $nadj1 $nadj2 --"; - if ($nadj1 != $nadj2) { - die("Check adjoint sources: $nadj1 does not equal $nadj2"); - } - - # make directories (and remove old ones) - $sem_dir = "$eid/SEM/SEM_${hdur_lab}"; - $output_dir = "$eid/SEM/OUTPUT_${hdur_lab}"; - $mesh_dir = "$eid/SEM/MESH_${hdur_lab}"; - `rm -r $eid/SEM/SEM_* ; mkdir ${sem_dir}`; - `rm -r $eid/SEM/OUTPUT_* ; mkdir ${output_dir}`; - `rm -r $eid/SEM/MESH_* ; mkdir ${mesh_dir}`; - - # change the label for the run - `sed "/socal_kernel/s/socal_kernel/${eid}_kernel/" $eid/go_kernel.bash > $eid/run.tmp`; - `mv -f $eid/run.tmp $eid/go_kernel.bash`; - - #---------------------------- - - } - } - } + # copy in a new CMTSOLUTION + $cmtfile0 = "$cmtfile"; + $cmtfile1 = "$eid/DATA/CMTSOLUTION"; + `cp $cmtfile0 $cmtfile1`; + + # change the half-duration + #$hdur_st = sprintf("%8.4f",$hdur); + #$ctemp = "${cmtfile1}_temp"; + #`sed '/^half duration:/s/^.*\$/half duration: ${hdur_st}/' $cmtfile1 > $ctemp`; + #`mv $ctemp $cmtfile1`; + + # change the simulation TYPE in the Par_file + `change_simulation_type2.pl -F`; + + # change the simulation TIME in the Par_file + #$sdur_round = 5; # testing only + $sdur = sprintf("%.1f",$sdur_round); + $parfile = "$eid/DATA/Par_file"; + $ptemp = "$eid/DATA/Par_file_temp"; + `sed '/^RECORD_LENGTH_IN_SECONDS =/s/^.*\$/RECORD_LENGTH_IN_SECONDS = $sdur/' $parfile > $ptemp`; + `mv $ptemp $parfile`; + + # make sure attenuation is OFF + `sed '/^ATTENUATION =/s/^.*\$/ATTENUATION = .false./' $parfile > $ptemp`; + `mv $ptemp $parfile`; + + # copy the STATIONS file + $stafile = "${adj_dir}/STATIONS_ADJOINT"; + `cp $stafile $eid/DATA/STATIONS`; + `cp $stafile $eid/DATA/STATIONS_ADJOINT`; + + # number of stations + $ns = `sed -n 1p $eid/DATA/STATIONS`; + $nadj1 = 3*$ns; + + # copy adjoint sources + `rm $eid/SEM/*adj`; + print "\n copying the adjoint sources onto pangu...\n"; + `cp ${adj_dir}/*adj $eid/SEM`; + + # check that all the adjoint sources are there + $nadj2 = `ls -1 $eid/SEM/*adj | wc | awk '{print \$1}'`; chomp($nadj2); + print "\n NUMBER OF RECORDS -- $nadj1 $nadj2 --"; + if ($nadj1 != $nadj2) { + die("Check adjoint sources: $nadj1 does not equal $nadj2"); + } + + # make directories (and remove old ones) + $sem_dir = "$eid/SEM/SEM_${hdur_lab}"; + $output_dir = "$eid/SEM/OUTPUT_${hdur_lab}"; + $mesh_dir = "$eid/SEM/MESH_${hdur_lab}"; + `rm -r $eid/SEM/SEM_* ; mkdir ${sem_dir}`; + `rm -r $eid/SEM/OUTPUT_* ; mkdir ${output_dir}`; + `rm -r $eid/SEM/MESH_* ; mkdir ${mesh_dir}`; + + # change the label for the run + `sed "/socal_kernel/s/socal_kernel/${eid}_kernel/" $eid/go_kernel.bash > $eid/run.tmp`; + `mv -f $eid/run.tmp $eid/go_kernel.bash`; + + #---------------------------- + + } + } + } } } } -} # for loop +} # for loop #================================================================= diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/smooth/go.bash b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/smooth/go.bash index c0ef49e83..6fcee4827 100755 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/smooth/go.bash +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/smooth/go.bash @@ -9,7 +9,7 @@ remap_lsf_machines.pl OUTPUT_FILES/lsf_machines >OUTPUT_FILES/machines # number of slices 14x12, 0 stands for basin code (1 would be 1-chunk global, # and 6 would be 6-chunk global) -# element size on the surface would be 2 km, +# element size on the surface would be 2 km, # the smoothing 'radius' sigma = 5 km # the neigboring points within 3*sigma+element_size are used for the smoothing diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/smooth/go_globe_pbs.bash b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/smooth/go_globe_pbs.bash index 03dba29eb..01661890c 100755 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/smooth/go_globe_pbs.bash +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/smooth/go_globe_pbs.bash @@ -17,11 +17,11 @@ numnodes=144 ## horizontal: sigmah (in km) ## vertical: sigmav (in km) ## e.g. period 40 s: wavelength lambda = 40 s * 4 km/s ~ 160 km -sigmah=160 -sigmav=40 +sigmah=160 +sigmav=40 # kernel to smooth -kernel=bulk_c_kernel +kernel=bulk_c_kernel ########################################################### diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/smooth/go_old.bash b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/smooth/go_old.bash index ebf44975c..9506d04fc 100755 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/smooth/go_old.bash +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/smooth/go_old.bash @@ -9,7 +9,7 @@ remap_lsf_machines.pl OUTPUT_FILES/lsf_machines >OUTPUT_FILES/machines # number of slices 14x12, 0 stands for basin code (1 would be 1-chunk global, # and 6 would be 6-chunk global) -# element size on the surface would be 2 km, +# element size on the surface would be 2 km, # the smoothing 'radius' sigma = 5 km # the neigboring points within 3*sigma+element_size are used for the smoothing diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/smooth/run_globe.bash b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/smooth/run_globe.bash index c5ce94841..9d5025d29 100755 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/smooth/run_globe.bash +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/smooth/run_globe.bash @@ -12,14 +12,14 @@ rm -f OUTPUT_FILES/* # runs job date -# creates job scripts from template: +# creates job scripts from template: template=go_globe_pbs.bash for tag in "bulk_c" "bulk_beta" "rho" do echo "kernel: $tag" - + # prepares job script from template sed -e "s:bulk_c:$tag:" $template > go_globe_pbs.${tag}.bash diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/smooth/src/constants.h b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/smooth/src/constants.h index ae8a7bea1..86168c062 100644 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/smooth/src/constants.h +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/smooth/src/constants.h @@ -89,7 +89,7 @@ double precision, parameter :: SOURCE_DECAY_RATE = 1.628d0 ! --------------------------------------------------------------------------------------- -! LQY -- Following 3 variables stays here temporarily, +! LQY -- Following 3 variables stays here temporarily, ! we need to move them to Par_file at a proper time ! --------------------------------------------------------------------------------------- ! save moho mesh and compute Moho boundary kernels @@ -99,7 +99,7 @@ ! to be used in the backward reconstruction in the presence of attenuation integer, parameter :: NSTEP_Q_SAVE = 200 -! the scratch disk to save the state variables saved in the forward +! the scratch disk to save the state variables saved in the forward ! simulation, this can be a global scratch disk in case you run out of ! space on the local scratch disk character(len=150), parameter :: LOCAL_PATH_Q = '/ibrixfs1/scratch/lqy' diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/smooth/src/smooth_sem_fun.f90 b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/smooth/src/smooth_sem_fun.f90 index a2a01c5f7..9681589b4 100644 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/smooth/src/smooth_sem_fun.f90 +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/smooth/src/smooth_sem_fun.f90 @@ -2,9 +2,9 @@ program smooth_specfem_function ! this is the embarassingly-parallel program that smooth any specfem function (primarily ! the kernels) that has the dimension of (NGLLX,NGLLY,NGLLZ,NSPEC_MAX), notice that it -! uses the constants.h and precision.h files from the original SEM package, and the +! uses the constants.h and precision.h files from the original SEM package, and the ! values_from_mesher.h file from the output of the mesher (or create_header_file), -! therefore, you need to compile it for your specific case +! therefore, you need to compile it for your specific case implicit none include 'mpif.h' @@ -16,7 +16,7 @@ program smooth_specfem_function integer, parameter :: NSPEC_MAX=NSPEC_AB integer, parameter :: NGLOB_MAX=NGLOB_AB - + ! only include the neighboring 3 x 3 slices integer, parameter :: NSLICES = 3 integer ,parameter :: NSLICES2 = NSLICES * NSLICES @@ -103,8 +103,8 @@ program smooth_specfem_function sigma_v2 = sigma_v ** 2 ! search radius - sigma_h3 = 3.0 * sigma_h + element_size - sigma_v3 = 3.0 * sigma_v + element_size + sigma_h3 = 3.0 * sigma_h + element_size + sigma_v3 = 3.0 * sigma_v + element_size ! theoretic normal value norm_h = 2.0*PI*sigma_h**2 @@ -142,7 +142,7 @@ program smooth_specfem_function islice(j) = islice0(i) endif enddo - ns = j + ns = j ! read in the topology files of the current and neighboring slices do i = 1, ns @@ -166,9 +166,9 @@ program smooth_specfem_function close(11) open(11,file=z_file(1),status='old',form='unformatted') read(11) z(1:nglob(1)) - close(11) - open(11,file=i_file(1),status='old',form='unformatted') - read(11) ibool(:,:,:,1:nspec(1)) + close(11) + open(11,file=i_file(1),status='old',form='unformatted') + read(11) ibool(:,:,:,1:nspec(1)) close(11) ! get the location of the center of the elements @@ -196,7 +196,7 @@ program smooth_specfem_function ! loop over all the slices do ii = 1, ns - + ! read in the topology, kernel files, calculate center of elements open(11,file=x_file(ii),status='old',form='unformatted') read(11) x(1:nglob(ii)) @@ -206,10 +206,10 @@ program smooth_specfem_function close(11) open(11,file=z_file(ii),status='old',form='unformatted') read(11) z(1:nglob(ii)) - close(11) - open(11,file=i_file(ii),status='old',form='unformatted') - read(11) ibool(:,:,:,1:nspec(ii)) - close(11) + close(11) + open(11,file=i_file(ii),status='old',form='unformatted') + read(11) ibool(:,:,:,1:nspec(ii)) + close(11) open(11,file=j_file(ii),status='old',form='unformatted') read(11) jacobian(:,:,:,1:nspec(ii)) close(11) @@ -242,22 +242,22 @@ program smooth_specfem_function if (myrank == 0) write(*,*) 'slice number = ', ii ! loop over elements to be smoothed in the current slice - do ispec = 1, nspec(1) + do ispec = 1, nspec(1) if (mod(ispec,100) == 0 .and. myrank == 0) write(*,*) 'ispec=', ispec ! --- only double loop over the elements in the search radius --- do ispec2 = 1, nspec(ii) - + !if ( sqrt( (cx(ispec2)-cx0(ispec)) **2 + (cy(ispec2)-cy0(ispec)) ** 2 + (cz(ispec2)-cz0(ispec)) ** 2) > sigma3) cycle if ( sqrt( (cx(ispec2)-cx0(ispec)) **2 + (cy(ispec2)-cy0(ispec)) ** 2 ) > sigma_h3 .or. sqrt( (cz(ispec2)-cz0(ispec)) ** 2) > sigma_v3 ) cycle factor(:,:,:) = jacobian(:,:,:,ispec2) * wgll_cube(:,:,:) ! integration factors ! loop over GLL points of the elements in current slice (ispec) - do k = 1, NGLLZ + do k = 1, NGLLZ do j = 1, NGLLY do i = 1, NGLLX - + x0 = xl(i,j,k,ispec); y0 = yl(i,j,k,ispec); z0 = zl(i,j,k,ispec) ! current point (i,j,k,ispec) !exp_val(:,:,:) = exp( -((xx(:,:,:,ispec2)-x0)**2+(yy(:,:,:,ispec2)-y0)**2 & @@ -270,7 +270,7 @@ program smooth_specfem_function tk(i,j,k,ispec) = tk(i,j,k,ispec) + sum(exp_val(:,:,:) * kernel(:,:,:,ispec2)) bk(i,j,k,ispec) = bk(i,j,k,ispec) + sum(exp_val(:,:,:)) - enddo + enddo enddo enddo ! (i,j,k) enddo ! (ispec2) @@ -290,8 +290,8 @@ program smooth_specfem_function call exit_mpi(myrank, 'Error computing Gaussian function on the grid') endif - kernel_smooth(i,j,k,ispec) = tk(i,j,k,ispec)/bk(i,j,k,ispec) - + kernel_smooth(i,j,k,ispec) = tk(i,j,k,ispec)/bk(i,j,k,ispec) + enddo enddo enddo @@ -300,7 +300,7 @@ program smooth_specfem_function open(11,file=trim(ks_file),status='unknown',form='unformatted') ! Note: output the following instead of kernel_smooth(:,:,:,1:nspec(1)) to create files of the same sizes write(11) kernel_smooth(:,:,:,:) - close(11) + close(11) ! the maximum value for the smoothed kernel call mpi_reduce(maxval(abs(kernel_smooth(:,:,:,1:nspec(1)))), max_new, 1, & diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/smooth/src/smooth_sub.f90 b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/smooth/src/smooth_sub.f90 index 3bef48664..6d515fd71 100644 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/smooth/src/smooth_sub.f90 +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/smooth/src/smooth_sub.f90 @@ -8,11 +8,11 @@ subroutine get_all_eight_slices(ichunk,ixi,ieta,& implicit none integer, intent(IN) :: ichunk,ixi,ieta,nproc_xi,nproc_eta - + integer, intent(OUT) :: ileft,iright,ibot,itop,ilb,ilt,irb,irt integer :: get_slice_number - + integer :: ichunk_left, islice_xi_left, islice_eta_left, & ichunk_right, islice_xi_right, islice_eta_right, & ichunk_bot, islice_xi_bot, islice_eta_bot, & @@ -37,7 +37,7 @@ subroutine get_all_eight_slices(ichunk,ixi,ieta,& ilt = get_slice_number(ichunk,ixi-1,ieta+1,nproc_xi,nproc_eta) irb = get_slice_number(ichunk,ixi+1,ieta-1,nproc_xi,nproc_eta) irt = get_slice_number(ichunk,ixi+1,ieta+1,nproc_xi,nproc_eta) - + if (ixi==0) then call get_lrbt_slices(ichunk_left,islice_xi_left,islice_eta_left, & ileft0, ichunk_left0, islice_xi_left0, islice_eta_left0, & @@ -52,7 +52,7 @@ subroutine get_all_eight_slices(ichunk,ixi,ieta,& else if (ichunk == 2) then ilb = get_slice_number(ichunk_right0,islice_xi_right0,islice_eta_right0,nproc_xi,nproc_eta) ilt = get_slice_number(ichunk_left0,islice_xi_left0,islice_eta_left0,nproc_xi,nproc_eta) - else + else ilb = get_slice_number(ichunk_left0,islice_xi_left0,islice_eta_left0,nproc_xi,nproc_eta) ilt = get_slice_number(ichunk_right0,islice_xi_right0,islice_eta_right0,nproc_xi,nproc_eta) endif @@ -98,7 +98,7 @@ subroutine get_all_eight_slices(ichunk,ixi,ieta,& irb = get_slice_number(ichunk_top0,islice_xi_top0,islice_eta_top0,nproc_xi,nproc_eta) endif endif - + if (ieta==nproc_eta-1) then call get_lrbt_slices(ichunk_top,islice_xi_top,islice_eta_top, & ileft0, ichunk_left0, islice_xi_left0, islice_eta_left0, & @@ -200,7 +200,7 @@ subroutine get_lrbt_slices(ichunk,ixi,ieta, & islice_xi_top=slice_xi_top(ichunk+1) islice_eta_top=slice_eta_top(ichunk+1) endif - + ileft = get_slice_number(ichunk_left,islice_xi_left,islice_eta_left,nproc_xi,nproc_eta) iright = get_slice_number(ichunk_right,islice_xi_right,islice_eta_right,nproc_xi,nproc_eta) ibot = get_slice_number(ichunk_bot,islice_xi_bot,islice_eta_bot,nproc_xi,nproc_eta) diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/smooth/src/values_from_mesher.h b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/smooth/src/values_from_mesher.h index c1e001260..bd2fa95ce 100644 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/smooth/src/values_from_mesher.h +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/smooth/src/values_from_mesher.h @@ -1,4 +1,4 @@ - + ! ! this is the parameter file for static compilation of the solver ! @@ -7,9 +7,9 @@ ! ! number of processors = 168 ! - ! number of ES nodes = 21.00000 + ! number of ES nodes = 21.00000 ! percentage of total 640 ES nodes = 3.281250 % - ! total memory available on these ES nodes (Gb) = 336.0000 + ! total memory available on these ES nodes (Gb) = 336.0000 ! ! max points per processor = max vector length = 163941 ! min vector length = 25 @@ -24,12 +24,12 @@ ! total for full mesh: ! ------------------- ! - ! exact total number of spectral elements in entire mesh = + ! exact total number of spectral elements in entire mesh = ! 405216 - ! approximate total number of points in entire mesh = - ! 27542088.0000000 - ! approximate total number of degrees of freedom in entire mesh = - ! 82626264.0000000 + ! approximate total number of points in entire mesh = + ! 27542088.0000000 + ! approximate total number of degrees of freedom in entire mesh = + ! 82626264.0000000 ! ! resolution of the mesh at the surface: ! ------------------------------------- @@ -38,17 +38,17 @@ ! spectral elements along Y = 288 ! GLL points along X = 1345 ! GLL points along Y = 1153 - ! average distance between points along X in m = 475.4175 - ! average distance between points along Y in m = 436.8476 + ! average distance between points along X in m = 475.4175 + ! average distance between points along Y in m = 436.8476 ! - + integer, parameter :: NSPEC_AB = 2412 integer, parameter :: NGLOB_AB = 163941 - + ! ! number of time steps = 27300 ! integer, parameter :: NSPEC_ATTENUATION = 1 logical, parameter :: ATTENUATION_VAL = .false. logical, parameter :: ANISOTROPY_VAL = .false. - + diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/smooth_all/SERIAL_RUN/go1.bash b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/smooth_all/SERIAL_RUN/go1.bash index 13cd134a1..166d1dea0 100755 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/smooth_all/SERIAL_RUN/go1.bash +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/smooth_all/SERIAL_RUN/go1.bash @@ -11,7 +11,7 @@ remap_lsf_machines.pl OUTPUT_FILES/lsf_machines >OUTPUT_FILES/machines # number of slices 14x12, 0 stands for basin code (1 would be 1-chunk global, # and 6 would be 6-chunk global) -# element size on the surface would be 2 km, +# element size on the surface would be 2 km, # the smoothing 'radius' sigma = 5 km # the neigboring points within 3*sigma+element_size are used for the smoothing diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/smooth_all/SERIAL_RUN/setup_smooth_all.pl b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/smooth_all/SERIAL_RUN/setup_smooth_all.pl index e0e4574b8..4268fe439 100755 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/smooth_all/SERIAL_RUN/setup_smooth_all.pl +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/smooth_all/SERIAL_RUN/setup_smooth_all.pl @@ -7,7 +7,7 @@ # This script copies directories with binary files of a specified parameter # from one place to a local directory on pangu. # -# +# # EXAMPLE: # setup_smooth_all.pl m16 168 mu_kernel ; setup_smooth_all.pl m16 168 kappa_kernel # @@ -36,7 +36,7 @@ print "number of event kernels : $neid\n"; -$imin = 1; $imax = $neid; # default +$imin = 1; $imax = $neid; # default #$imin = 1; $imax = 20; #$imin = 10; $imax = $imin; @@ -71,37 +71,37 @@ print "nfiles_out = ${nfiles_out}\n"; if ( ${nfiles_out} == $nproc ) { - print "--> $nfiles_out bin files exist -- ready to go\n"; + print "--> $nfiles_out bin files exist -- ready to go\n"; } else { - `mkdir -p $edir_smooth/$eid`; - `mkdir -p $edir_copy`; - `mkdir -p $eid/OUTPUT_FILES`; - `mkdir -p $eid/inout_smooth`; - - $sfiles = "${edir_out}/*${ftag}_smooth.bin"; - $nsfiles = `ls -1 $sfiles | wc | awk '{print \$1}'`; chomp($nsfiles); - if ( $nsfiles == $nproc ) { - print "--> $nsfiles bin files already exist -- no need to run\n"; - - } else { - # link input event kernels - `ln -s $efiles_in $edir_out`; - - # copy run scripts and link executable file - `cp $masterdir/run.lsf $edir_copy`; - `cp $masterdir/go.bash $edir_copy`; - `ln -s $masterdir/topo $edir_copy`; - `ln -s $masterdir/smooth_sem_fun $edir_copy`; - `ln -s $masterdir/xcombine_vol_data $edir_copy`; - `ln -s $masterdir/slice_file $edir_copy`; - `ln -s $masterdir/combine.bash $edir_copy`; - - # change the label for the run - `sed "/smooth_model/s/smooth_model/${eid}_smooth/" ${edir_copy}/go.bash > ${edir_copy}/run.tmp`; - `mv -f ${edir_copy}/run.tmp ${edir_copy}/go.bash`; - } + `mkdir -p $edir_smooth/$eid`; + `mkdir -p $edir_copy`; + `mkdir -p $eid/OUTPUT_FILES`; + `mkdir -p $eid/inout_smooth`; + + $sfiles = "${edir_out}/*${ftag}_smooth.bin"; + $nsfiles = `ls -1 $sfiles | wc | awk '{print \$1}'`; chomp($nsfiles); + if ( $nsfiles == $nproc ) { + print "--> $nsfiles bin files already exist -- no need to run\n"; + + } else { + # link input event kernels + `ln -s $efiles_in $edir_out`; + + # copy run scripts and link executable file + `cp $masterdir/run.lsf $edir_copy`; + `cp $masterdir/go.bash $edir_copy`; + `ln -s $masterdir/topo $edir_copy`; + `ln -s $masterdir/smooth_sem_fun $edir_copy`; + `ln -s $masterdir/xcombine_vol_data $edir_copy`; + `ln -s $masterdir/slice_file $edir_copy`; + `ln -s $masterdir/combine.bash $edir_copy`; + + # change the label for the run + `sed "/smooth_model/s/smooth_model/${eid}_smooth/" ${edir_copy}/go.bash > ${edir_copy}/run.tmp`; + `mv -f ${edir_copy}/run.tmp ${edir_copy}/go.bash`; + } } } } diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/smooth_all/TO_COMBINE/DONE/finish_smooth_all.pl b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/smooth_all/TO_COMBINE/DONE/finish_smooth_all.pl index 989bf0452..0e33f6b91 100755 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/smooth_all/TO_COMBINE/DONE/finish_smooth_all.pl +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/smooth_all/TO_COMBINE/DONE/finish_smooth_all.pl @@ -51,7 +51,7 @@ #=================================== -$imin = 1; $imax = $neid; # default +$imin = 1; $imax = $neid; # default #$imin = 1; $imax = 10; #$imin = 1; $imax = $imin; @@ -66,7 +66,7 @@ # (1) check if job is done # (2) check if mesh files are off pangu # (3) check if mesh files are in smooth_all - + $mfiles = "${ftag}_smooth_${stg}.mesh"; $bfiles = "*${ftag}_smooth.bin"; @@ -87,11 +87,11 @@ # check that there are 168 files there $ncheck = `ls -1 $pdir/$bfiles | wc | awk '{print \$1}'`; chomp($ncheck); if ($ncheck != $nproc) { - die("ncheck ($ncheck) not equal to nproc ($nproc)"); + die("ncheck ($ncheck) not equal to nproc ($nproc)"); } } else { - + # low-res mesh files $mfiles2 = "$sdir/$mfiles"; $mfile_out2 = `ls -1 $mfiles2 | wc | awk '{print \$1}'`; chomp($mfile_out2); @@ -99,21 +99,21 @@ # high-res binary files $bfiles2 = "$sdir/inout_smooth/$bfiles"; $bfile_out2 = `ls -1 $bfiles2 | wc | awk '{print \$1}'`; chomp($bfile_out2); - + if ( (${mfile_out2} == 1) && (${bfile_out2} == $nproc) ) { - # (1) copy the mesh files off pangu - # (2) copy the bin files to event_kernels_smooth + # (1) copy the mesh files off pangu + # (2) copy the bin files to event_kernels_smooth # NOTE: cp is a safer operation than mv -- especially for the sensitive IBRIX system - print "--> copying the mesh and binary files\n"; - `mkdir -p $odir`; - `cp $mfiles2 $odir`; + print "--> copying the mesh and binary files\n"; + `mkdir -p $odir`; + `cp $mfiles2 $odir`; `sleep 3s`; `mkdir -p $pdir`; if (0==1) { - `cp $bfiles2 $pdir`; - } else { - `mv $bfiles2 $pdir`; - } + `cp $bfiles2 $pdir`; + } else { + `mv $bfiles2 $pdir`; + } `sleep 3s`; # check that all the binary files made it @@ -122,31 +122,31 @@ $bfiles3 = "$pdir/$bfiles"; $bfile_out3 = `ls -1 $bfiles3 | wc | awk '{print \$1}'`; chomp($bfile_out3); if ( ${bfile_out3} != $nproc ) { - #die("only ${bfile_out3} out of $nproc made it into $pdir"); - print "only ${bfile_out3} out of $nproc made it into $pdir\n"; - @leftfiles = glob("$bfiles2"); + #die("only ${bfile_out3} out of $nproc made it into $pdir"); + print "only ${bfile_out3} out of $nproc made it into $pdir\n"; + @leftfiles = glob("$bfiles2"); print "leftfiles are @leftfiles\n"; - `cp @leftfiles $pdir`; - `sleep 3s`; + `cp @leftfiles $pdir`; + `sleep 3s`; # check the numbers again - $bfiles3 = "$pdir/$bfiles"; - $bfile_out3 = `ls -1 $bfiles3 | wc | awk '{print \$1}'`; chomp($bfile_out3); - if ( ${bfile_out3} != $nproc ) { - die("only ${bfile_out3} out of $nproc made it into $pdir"); - } - } + $bfiles3 = "$pdir/$bfiles"; + $bfile_out3 = `ls -1 $bfiles3 | wc | awk '{print \$1}'`; chomp($bfile_out3); + if ( ${bfile_out3} != $nproc ) { + die("only ${bfile_out3} out of $nproc made it into $pdir"); + } + } } else { if( ${mfile_out2} == 1 ) { die("mesh file was made but only ${bfile_out2} out of $nproc binary files"); } - if ( ${bfile_out2} == $nproc ) { - die("$nproc binary files but no $mesh file\n"); - } + if ( ${bfile_out2} == $nproc ) { + die("$nproc binary files but no $mesh file\n"); + } if ( (${mfile_out2} == 0) && (${bfile_out2} == 0) ) { - print "--> this event has not been setup yet\n"; - } + print "--> this event has not been setup yet\n"; + } } } } diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/smooth_all/TO_COMBINE/setup_batch.pl b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/smooth_all/TO_COMBINE/setup_batch.pl index 3289539f5..c04991b7a 100755 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/smooth_all/TO_COMBINE/setup_batch.pl +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/smooth_all/TO_COMBINE/setup_batch.pl @@ -82,11 +82,11 @@ if ($nmesh == $nmesh0) { print "--> $nmesh mesh files already exist\n"; } else { - print "$nmesh mesh files\n"; + print "$nmesh mesh files\n"; @sfiles = `ls -1 -d $eid/inout_smooth/*smooth.bin`; $nbin = @sfiles; if ($nbin != $nbin0) { - print "--> re-run the smoothing, since you have $nbin not $nbin0 files\n"; + print "--> re-run the smoothing, since you have $nbin not $nbin0 files\n"; } else { print "--> ready to set this up\n"; `cp go_process.bash $eid`; @@ -94,11 +94,11 @@ # modify the EID label for the post-processing script # eid=9818433 - $processfile = "$eid/go_process.bash"; - $ptemp = "$eid/go_process_temp.bash"; - `sed '/^eid=/s/^.*\$/eid=$eid/' $processfile > $ptemp`; - `mv $ptemp $processfile`; - `chmod +x $processfile`; + $processfile = "$eid/go_process.bash"; + $ptemp = "$eid/go_process_temp.bash"; + `sed '/^eid=/s/^.*\$/eid=$eid/' $processfile > $ptemp`; + `mv $ptemp $processfile`; + `chmod +x $processfile`; } } } # icheck diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/smooth_all/setup_smooth_all.pl b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/smooth_all/setup_smooth_all.pl index cd0582b2a..400cb705f 100755 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/smooth_all/setup_smooth_all.pl +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/smooth_all/setup_smooth_all.pl @@ -5,7 +5,7 @@ # setup_smooth_all.pl # # This script takes a template smoothing directory and sets up many copies. -# +# # EXAMPLE: # setup_smooth_all.pl m16 168 rho_cbr_kernel # @@ -38,7 +38,7 @@ print "number of event kernels : $neid\n"; -$imin = 1; $imax = $neid; # default +$imin = 1; $imax = $neid; # default #$imin = 1; $imax = 2; #$imin = 14; $imax = $imin; @@ -74,7 +74,7 @@ # check if mesh files have been made $mesh_local = "${edir_local}/${ftag}_smooth*"; - $mesh_out = "$edir0/${ftag}_smooth*"; + $mesh_out = "$edir0/${ftag}_smooth*"; $nmesh_local = `ls -1 ${mesh_local} | wc | awk '{print \$1}'`; chomp($nmesh_local); $nmesh_out = `ls -1 ${mesh_out} | wc | awk '{print \$1}'`; chomp($nmesh_out); if ($nmesh_out == 1) { @@ -92,7 +92,7 @@ print "no unsmoothed files or smoothed files\n"; } else { - print "unsmoothed files present but no smoothed files\n"; + print "unsmoothed files present but no smoothed files\n"; if (-e $edir_local) { print "--> READY TO EXECUTE SMOOTHING\n"; @@ -100,7 +100,7 @@ `mkdir -p ${edir_local}`; `mkdir -p ${edir_local}/OUTPUT_FILES`; - `ln -s $edir ${edir_local}/inout_smooth`; # KEY LINK + `ln -s $edir ${edir_local}/inout_smooth`; # KEY LINK # NOTE: the link leaves the danger of over-writing input files # copy run scripts and link executable file diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/smooth_update/go.bash b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/smooth_update/go.bash index 6618fda0a..abc801ebc 100755 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/smooth_update/go.bash +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/smooth_update/go.bash @@ -9,7 +9,7 @@ remap_lsf_machines.pl OUTPUT_FILES/lsf_machines >OUTPUT_FILES/machines # number of slices 14x12, 0 stands for basin code (1 would be 1-chunk global, # and 6 would be 6-chunk global) -# element size on the surface would be 2 km, +# element size on the surface would be 2 km, # the smoothing 'radius' sigma = 5 km # the neigboring points within 3*sigma+element_size are used for the smoothing diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/smooth_update/go_old.bash b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/smooth_update/go_old.bash index c009f1d62..e02494b54 100755 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/smooth_update/go_old.bash +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/smooth_update/go_old.bash @@ -9,7 +9,7 @@ remap_lsf_machines.pl OUTPUT_FILES/lsf_machines >OUTPUT_FILES/machines # number of slices 14x12, 0 stands for basin code (1 would be 1-chunk global, # and 6 would be 6-chunk global) -# element size on the surface would be 2 km, +# element size on the surface would be 2 km, # the smoothing 'radius' sigma = 5 km # the neigboring points within 3*sigma+element_size are used for the smoothing diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/subspace_hessian/prepare_run.pl b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/subspace_hessian/prepare_run.pl index a61661144..871253064 100755 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/subspace_hessian/prepare_run.pl +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/subspace_hessian/prepare_run.pl @@ -6,7 +6,7 @@ # # This prepares a run for computing the subspace hessian matrix # from a set of event kernels. -# +# # EXAMPLE: # prepare_run.pl m14 1 # diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/subspace_hessian/src/constants.h b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/subspace_hessian/src/constants.h index ae8a7bea1..86168c062 100644 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/subspace_hessian/src/constants.h +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/subspace_hessian/src/constants.h @@ -89,7 +89,7 @@ double precision, parameter :: SOURCE_DECAY_RATE = 1.628d0 ! --------------------------------------------------------------------------------------- -! LQY -- Following 3 variables stays here temporarily, +! LQY -- Following 3 variables stays here temporarily, ! we need to move them to Par_file at a proper time ! --------------------------------------------------------------------------------------- ! save moho mesh and compute Moho boundary kernels @@ -99,7 +99,7 @@ ! to be used in the backward reconstruction in the presence of attenuation integer, parameter :: NSTEP_Q_SAVE = 200 -! the scratch disk to save the state variables saved in the forward +! the scratch disk to save the state variables saved in the forward ! simulation, this can be a global scratch disk in case you run out of ! space on the local scratch disk character(len=150), parameter :: LOCAL_PATH_Q = '/ibrixfs1/scratch/lqy' diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/subspace_hessian/src/values_from_mesher.h b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/subspace_hessian/src/values_from_mesher.h index c1e001260..bd2fa95ce 100644 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/subspace_hessian/src/values_from_mesher.h +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/subspace_hessian/src/values_from_mesher.h @@ -1,4 +1,4 @@ - + ! ! this is the parameter file for static compilation of the solver ! @@ -7,9 +7,9 @@ ! ! number of processors = 168 ! - ! number of ES nodes = 21.00000 + ! number of ES nodes = 21.00000 ! percentage of total 640 ES nodes = 3.281250 % - ! total memory available on these ES nodes (Gb) = 336.0000 + ! total memory available on these ES nodes (Gb) = 336.0000 ! ! max points per processor = max vector length = 163941 ! min vector length = 25 @@ -24,12 +24,12 @@ ! total for full mesh: ! ------------------- ! - ! exact total number of spectral elements in entire mesh = + ! exact total number of spectral elements in entire mesh = ! 405216 - ! approximate total number of points in entire mesh = - ! 27542088.0000000 - ! approximate total number of degrees of freedom in entire mesh = - ! 82626264.0000000 + ! approximate total number of points in entire mesh = + ! 27542088.0000000 + ! approximate total number of degrees of freedom in entire mesh = + ! 82626264.0000000 ! ! resolution of the mesh at the surface: ! ------------------------------------- @@ -38,17 +38,17 @@ ! spectral elements along Y = 288 ! GLL points along X = 1345 ! GLL points along Y = 1153 - ! average distance between points along X in m = 475.4175 - ! average distance between points along Y in m = 436.8476 + ! average distance between points along X in m = 475.4175 + ! average distance between points along Y in m = 436.8476 ! - + integer, parameter :: NSPEC_AB = 2412 integer, parameter :: NGLOB_AB = 163941 - + ! ! number of time steps = 27300 ! integer, parameter :: NSPEC_ATTENUATION = 1 logical, parameter :: ATTENUATION_VAL = .false. logical, parameter :: ANISOTROPY_VAL = .false. - + diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/subspace_update/make_mesh.pl b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/subspace_update/make_mesh.pl index 6f69a81d0..d1bb7ca6e 100755 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/subspace_update/make_mesh.pl +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/subspace_update/make_mesh.pl @@ -70,7 +70,7 @@ $mfile = sprintf("make_mesh_%2.2i.bash",$i); open(MFILE,">$mfile"); print MFILE "#!/bin/bash\n"; - print MFILE "cd $pwd\n"; + print MFILE "cd $pwd\n"; print MFILE "$pwd/xcombine_vol_data $slicefile $dmtag topo $odir . 0\n"; close(MFILE); `chmod +x $mfile`; diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/subspace_update/prepare_run.pl b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/subspace_update/prepare_run.pl index 2653020c1..2027e2dc8 100755 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/subspace_update/prepare_run.pl +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/subspace_update/prepare_run.pl @@ -9,7 +9,7 @@ # # After you view the possible models, you pick one. # Make sure you have both the mu and the kappa update. -# +# # EXAMPLE: # prepare_run.pl 60/4/80 m14 mu_kernel both 1 window 1 # prepare_run.pl 20/4/60 m10 mu_kernel both 1 window 1 @@ -109,7 +109,7 @@ ($lamval,$invlamval,$index) = split(" ",$lamlines[$pmax-1]); chomp($lamval); print LAM "$lamval\n"; -} +} close(LAM); diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/subspace_update/src/constants.h b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/subspace_update/src/constants.h index ae8a7bea1..86168c062 100644 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/subspace_update/src/constants.h +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/subspace_update/src/constants.h @@ -89,7 +89,7 @@ double precision, parameter :: SOURCE_DECAY_RATE = 1.628d0 ! --------------------------------------------------------------------------------------- -! LQY -- Following 3 variables stays here temporarily, +! LQY -- Following 3 variables stays here temporarily, ! we need to move them to Par_file at a proper time ! --------------------------------------------------------------------------------------- ! save moho mesh and compute Moho boundary kernels @@ -99,7 +99,7 @@ ! to be used in the backward reconstruction in the presence of attenuation integer, parameter :: NSTEP_Q_SAVE = 200 -! the scratch disk to save the state variables saved in the forward +! the scratch disk to save the state variables saved in the forward ! simulation, this can be a global scratch disk in case you run out of ! space on the local scratch disk character(len=150), parameter :: LOCAL_PATH_Q = '/ibrixfs1/scratch/lqy' diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/subspace_update/src/subspace_update.f90 b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/subspace_update/src/subspace_update.f90 index 7a353e487..8dbeaa55c 100644 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/subspace_update/src/subspace_update.f90 +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/subspace_update/src/subspace_update.f90 @@ -102,7 +102,7 @@ program subspace_update read(22,*) dnorm(i) if(myrank==0) write(*,*) dnorm(i) enddo - close(22) + close(22) ! read in the number of window picks per event if (myrank == 0) write(*,*) 'reading in window tallies' @@ -111,7 +111,7 @@ program subspace_update read(23,*) dcov_fac(i) if(myrank==0) write(*,*) dcov_fac(i) enddo - close(23) + close(23) ! read in the model covariance normalization term if (myrank == 0) write(*,*) 'reading in model covariance normalization term' @@ -187,7 +187,7 @@ program subspace_update ! In this manner, we should think of the operation Cm G^T as being applied FIRST. ! (2) The factor of 2 (in kfac) is because K_bulk = 2 K_kappa and K_beta = 2 K_mu . ! (3) The factor dcov_fac(isrc) is a factor from the data covariance matrix that was - ! left out in computing the adjoint sources, but it WAS included in computing + ! left out in computing the adjoint sources, but it WAS included in computing ! the weight terms dnorm. ! (4) The MINUS sign is needed for each gradient (kfac). ! (5) To invert H = G^T G, we added lamda^2 to the diagonal. This is like multiplying diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/subspace_update/src/values_from_mesher.h b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/subspace_update/src/values_from_mesher.h index c1e001260..bd2fa95ce 100644 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/subspace_update/src/values_from_mesher.h +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/subspace_update/src/values_from_mesher.h @@ -1,4 +1,4 @@ - + ! ! this is the parameter file for static compilation of the solver ! @@ -7,9 +7,9 @@ ! ! number of processors = 168 ! - ! number of ES nodes = 21.00000 + ! number of ES nodes = 21.00000 ! percentage of total 640 ES nodes = 3.281250 % - ! total memory available on these ES nodes (Gb) = 336.0000 + ! total memory available on these ES nodes (Gb) = 336.0000 ! ! max points per processor = max vector length = 163941 ! min vector length = 25 @@ -24,12 +24,12 @@ ! total for full mesh: ! ------------------- ! - ! exact total number of spectral elements in entire mesh = + ! exact total number of spectral elements in entire mesh = ! 405216 - ! approximate total number of points in entire mesh = - ! 27542088.0000000 - ! approximate total number of degrees of freedom in entire mesh = - ! 82626264.0000000 + ! approximate total number of points in entire mesh = + ! 27542088.0000000 + ! approximate total number of degrees of freedom in entire mesh = + ! 82626264.0000000 ! ! resolution of the mesh at the surface: ! ------------------------------------- @@ -38,17 +38,17 @@ ! spectral elements along Y = 288 ! GLL points along X = 1345 ! GLL points along Y = 1153 - ! average distance between points along X in m = 475.4175 - ! average distance between points along Y in m = 436.8476 + ! average distance between points along X in m = 475.4175 + ! average distance between points along Y in m = 436.8476 ! - + integer, parameter :: NSPEC_AB = 2412 integer, parameter :: NGLOB_AB = 163941 - + ! ! number of time steps = 27300 ! integer, parameter :: NSPEC_ATTENUATION = 1 logical, parameter :: ATTENUATION_VAL = .false. logical, parameter :: ANISOTROPY_VAL = .false. - + diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/sum_kernel/setup_sum.pl b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/sum_kernel/setup_sum.pl index d9fca7140..255e4145f 100755 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/sum_kernel/setup_sum.pl +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/sum_kernel/setup_sum.pl @@ -5,7 +5,7 @@ # setup_sum.pl # # Example script for setting up this directory; this will vary for each user. -# +# # EXAMPLE: # setup_sum.pl 168 rho_cbr_kernel # @@ -45,7 +45,7 @@ # open list for subset of EIDs open(KEIDS,">${kernel_list_sub}"); -$imin = 1; $imax = $neid; # default +$imin = 1; $imax = $neid; # default #$imin = 1; $imax = 2; #$imin = 18; $imax = $imin; diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/sum_kernel/src/values_from_mesher.h b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/sum_kernel/src/values_from_mesher.h index da685a138..00312d73a 100644 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/sum_kernel/src/values_from_mesher.h +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/sum_kernel/src/values_from_mesher.h @@ -1,4 +1,4 @@ - + ! ! this is the parameter file for static compilation of the solver ! @@ -7,9 +7,9 @@ ! ! number of processors = 168 ! - ! number of ES nodes = 21.00000 + ! number of ES nodes = 21.00000 ! percentage of total 640 ES nodes = 3.281250 % - ! total memory available on these ES nodes (Gb) = 336.0000 + ! total memory available on these ES nodes (Gb) = 336.0000 integer, parameter :: NPROC_VAL = 168 integer, parameter :: NPROC_XI_VAL = 14 integer, parameter :: NPROC_ETA_VAL = 12 @@ -27,12 +27,12 @@ ! total for full mesh: ! ------------------- ! - ! exact total number of spectral elements in entire mesh = + ! exact total number of spectral elements in entire mesh = ! 405216 - ! approximate total number of points in entire mesh = - ! 27542088.0000000 - ! approximate total number of degrees of freedom in entire mesh = - ! 82626264.0000000 + ! approximate total number of points in entire mesh = + ! 27542088.0000000 + ! approximate total number of degrees of freedom in entire mesh = + ! 82626264.0000000 ! ! resolution of the mesh at the surface: ! ------------------------------------- @@ -41,26 +41,26 @@ ! spectral elements along Y = 288 ! GLL points along X = 1345 ! GLL points along Y = 1153 - ! average distance between points along X in m = 475.4175 - ! average distance between points along Y in m = 436.8476 + ! average distance between points along X in m = 475.4175 + ! average distance between points along Y in m = 436.8476 ! - + integer, parameter :: NSPEC_AB_VAL = 2412 integer, parameter :: NGLOB_AB_VAL = 163941 - + ! ! number of time steps = 18200 ! integer, parameter :: NSPEC_ATTENUATION = 1 logical, parameter :: ATTENUATION_VAL = .false. - + integer, parameter :: NSPEC_ANISO = 1 logical, parameter :: ANISOTROPY_VAL = .false. - + integer, parameter :: NSPEC_ATT_AND_KERNEL = 1 integer, parameter :: NSPEC_ADJOINT = 2412 integer, parameter :: NGLOB_ADJOINT = 163941 - + integer, parameter :: NSPEC2DMAX_XMIN_XMAX_VAL = 150 integer, parameter :: NSPEC2DMAX_YMIN_YMAX_VAL = 150 integer, parameter :: NSPEC2D_BOTTOM_VAL = 36 @@ -68,6 +68,6 @@ integer, parameter :: NPOIN2DMAX_XMIN_XMAX_VAL = 3751 integer, parameter :: NPOIN2DMAX_YMIN_YMAX_VAL = 3751 integer, parameter :: NPOIN2DMAX_XY_VAL = 3751 - + integer, parameter :: NSPEC2D_MOHO_BOUN = 1 integer, parameter :: NSPEC_BOUN = 1 diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/topo_input/combine_vol_data/combine_vol_data_mod.f90 b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/topo_input/combine_vol_data/combine_vol_data_mod.f90 index 3fb4827fe..2cf36a458 100644 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/topo_input/combine_vol_data/combine_vol_data_mod.f90 +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/topo_input/combine_vol_data/combine_vol_data_mod.f90 @@ -339,7 +339,7 @@ program combine_paraview_data if (it == 1) then nee = nelement * num_node call write_integer(nee) - end if + endif do i = 1, nelement read(26,*) njunk, njunk2, n1, n2, n3, n4, n5, n6, n7, n8 diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/topo_input/combine_vol_data/compile.bash b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/topo_input/combine_vol_data/compile.bash index b2f40e1f7..017d0068a 100755 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/topo_input/combine_vol_data/compile.bash +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/topo_input/combine_vol_data/compile.bash @@ -1,4 +1,4 @@ rm -rf xcombine_vol_data *.o mpif90 -O3 -c -o combine_vol_data_mod.o combine_vol_data_mod.f90 cc -c -o write_c_binary.o write_c_binary.c -mpif90 -O3 -o xcombine_vol_data combine_vol_data_mod.o write_c_binary.o \ No newline at end of file +mpif90 -O3 -o xcombine_vol_data combine_vol_data_mod.o write_c_binary.o diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/topo_input/combine_vol_data/values_from_mesher.h b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/topo_input/combine_vol_data/values_from_mesher.h index 0437cd4b2..116f02bc5 100644 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/topo_input/combine_vol_data/values_from_mesher.h +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/cluster/topo_input/combine_vol_data/values_from_mesher.h @@ -1,4 +1,4 @@ - + ! ! this is the parameter file for static compilation of the solver ! @@ -7,9 +7,9 @@ ! ! number of processors = 168 ! - ! number of ES nodes = 21.00000 + ! number of ES nodes = 21.00000 ! percentage of total 640 ES nodes = 3.281250 % - ! total memory available on these ES nodes (Gb) = 336.0000 + ! total memory available on these ES nodes (Gb) = 336.0000 integer, parameter :: NPROC_VAL = 168 integer, parameter :: NPROC_XI_VAL = 14 integer, parameter :: NPROC_ETA_VAL = 12 @@ -27,12 +27,12 @@ ! total for full mesh: ! ------------------- ! - ! exact total number of spectral elements in entire mesh = + ! exact total number of spectral elements in entire mesh = ! 405216 - ! approximate total number of points in entire mesh = - ! 27542088.0000000 - ! approximate total number of degrees of freedom in entire mesh = - ! 82626264.0000000 + ! approximate total number of points in entire mesh = + ! 27542088.0000000 + ! approximate total number of degrees of freedom in entire mesh = + ! 82626264.0000000 ! ! resolution of the mesh at the surface: ! ------------------------------------- @@ -41,26 +41,26 @@ ! spectral elements along Y = 288 ! GLL points along X = 1345 ! GLL points along Y = 1153 - ! average distance between points along X in m = 475.4175 - ! average distance between points along Y in m = 436.8476 + ! average distance between points along X in m = 475.4175 + ! average distance between points along Y in m = 436.8476 ! - + integer, parameter :: NSPEC_AB_VAL = 2412 integer, parameter :: NGLOB_AB_VAL = 163941 - + ! ! number of time steps = 27300 ! integer, parameter :: NSPEC_ATTENUATION = 1 logical, parameter :: ATTENUATION_VAL = .false. - + integer, parameter :: NSPEC_ANISO = 1 logical, parameter :: ANISOTROPY_VAL = .false. - + integer, parameter :: NSPEC_ATT_AND_KERNEL = 1 integer, parameter :: NSPEC_ADJOINT = 1 integer, parameter :: NGLOB_ADJOINT = 1 - + integer, parameter :: NSPEC2DMAX_XMIN_XMAX_VAL = 150 integer, parameter :: NSPEC2DMAX_YMIN_YMAX_VAL = 150 integer, parameter :: NSPEC2D_BOTTOM_VAL = 36 @@ -68,6 +68,6 @@ integer, parameter :: NPOIN2DMAX_XMIN_XMAX_VAL = 3751 integer, parameter :: NPOIN2DMAX_YMIN_YMAX_VAL = 3751 integer, parameter :: NPOIN2DMAX_XY_VAL = 3751 - + integer, parameter :: NSPEC2D_MOHO_BOUN = 1 integer, parameter :: NSPEC_BOUN = 1 diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/matlab/setup_subspace_dir.pl b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/matlab/setup_subspace_dir.pl index 487dd408d..7403424ee 100755 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/matlab/setup_subspace_dir.pl +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/matlab/setup_subspace_dir.pl @@ -58,10 +58,10 @@ print "$dir \n"; if (-e $dir) { - #print "--> dir exists -- now deleting and remaking\n"; `rm -rf $dir`; + #print "--> dir exists -- now deleting and remaking\n"; `rm -rf $dir`; print "--> dir exists\n"; } else { - print "--> dir does not exist -- now making\n"; + print "--> dir does not exist -- now making\n"; } `mkdir -p $dir`; `mkdir -p $dir/mu_all`; diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/misfit_plot/OLD_version/plot_misfit.pl b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/misfit_plot/OLD_version/plot_misfit.pl index b524de336..ee7e6e8cb 100755 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/misfit_plot/OLD_version/plot_misfit.pl +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/misfit_plot/OLD_version/plot_misfit.pl @@ -158,14 +158,14 @@ @comps = ("Z","R","T"); for ($k = 1; $k <= 3; $k = $k+1) { $comp = $comps[$k-1]; - + $Pfile = "GMT_time_series_${Ttag}_${comp}.dat"; $bounds = "GMT_axes_${Ttag}_${comp}.dat"; $Nfile = "GMT_norms_${Ttag}_${comp}.dat"; # if the seismograms exist, then plot them if ( (-f $Pfile) && (-f $bounds) ) { - + open(IN,"$bounds"); @lines = ; ($tmin,$tmax,$ymin,$ymax) = split(" ",$lines[0]); $tmin = -10; @@ -182,25 +182,25 @@ $y_seis_lab = $y_seis + $ywid - 0.05; $originPlab = "-Xa${x_seis_lab} -Ya${y_seis_lab}"; - + if($j==1) {`psbasemap $J $R $B0 -O -K $originP >> $psfile`} else {`psbasemap $J $R $B -O -K $originP >> $psfile`} if ($j==1) { - `awk \'{print \$1,\$2}\' $Pfile | psxy $J $R -W0.5p,0/0/0 -O -K $originP >> $psfile`; - `awk \'{print \$1,\$3}\' $Pfile | psxy $J $R -W0.5p,255/0/0 -O -K $originP >> $psfile`; + `awk \'{print \$1,\$2}\' $Pfile | psxy $J $R -W0.5p,0/0/0 -O -K $originP >> $psfile`; + `awk \'{print \$1,\$3}\' $Pfile | psxy $J $R -W0.5p,255/0/0 -O -K $originP >> $psfile`; `pstext -R0/1/0/1 -JX1 $slabinfo -K -O $originPlab >> $psfile <> $psfile`; - `awk \'{print \$1,\$4}\' $Pfile | psxy $J $R -W0.5p,255/0/0 -O -K $originP >> $psfile`; + `awk \'{print \$1,\$2}\' $Pfile | psxy $J $R -W0.5p,0/0/0 -O -K $originP >> $psfile`; + `awk \'{print \$1,\$4}\' $Pfile | psxy $J $R -W0.5p,255/0/0 -O -K $originP >> $psfile`; `pstext -R0/1/0/1 -JX1 $slabinfo -K -O $originPlab >> $psfile <> $psfile`; + `awk \'{print \$1,\$5}\' $Pfile | psxy $J $R -W0.5p,0/0/0 -O -K $originP >> $psfile`; `pstext -R0/1/0/1 -JX1 $slabinfo -K -O $originPlab >> $psfile <> $psfile`; + `awk \'{print \$1,\$6}\' $Pfile | psxy $J $R -W0.5p,0/0/0 -O -K $originP >> $psfile`; `pstext -R0/1/0/1 -JX1 $slabinfo -K -O $originPlab >> $psfile <> $psfile`; + `awk \'{print \$1,\$7}\' $Pfile | psxy $J $R -W0.5p,0/0/0 -O -K $originP >> $psfile`; `pstext -R0/1/0/1 -JX1 $slabinfo -K -O $originPlab >> $psfile <> $ps_file <> $ps_file <> $ps_file <> $ps_file`; # CMT source + `psmeca $cmtpsmeca $bounds $proj $cmtinfo -O -K >> $ps_file`; # CMT source `rm $cmtpsmeca`; `psxy $bounds $proj -St0.15 -W2 -G255/0/0 -K -O>> $ps_file <> $ps_file <> $ps_file"); - print GMT "$Twinb[$i] 0\n $Twine[$i] 0\n $Twine[$i] 2\n $Twinb[$i] 2\n $Twinb[$i] 0\n"; - close(GMT); + open(GMT,"|psxy $proj $bounds $winfo -O -K >> $ps_file"); + print GMT "$Twinb[$i] 0\n $Twine[$i] 0\n $Twine[$i] 2\n $Twinb[$i] 2\n $Twinb[$i] 0\n"; + close(GMT); } } if ($iplot_win2==1) { for ($i=0; $i<$nT2; $i++) { - open(GMT,"|psxy $proj $bounds $winfo2 -O -K >> $ps_file"); - print GMT "$Twinb2[$i] 0\n $Twine2[$i] 0\n $Twine2[$i] 2\n $Twinb2[$i] 2\n $Twinb2[$i] 0\n"; - close(GMT); + open(GMT,"|psxy $proj $bounds $winfo2 -O -K >> $ps_file"); + print GMT "$Twinb2[$i] 0\n $Twine2[$i] 0\n $Twine2[$i] 2\n $Twinb2[$i] 2\n $Twinb2[$i] 0\n"; + close(GMT); } } } if ($Tflag==1) { `pssac2 $proj $Tdat $bounds -Ent-3 -M${sizeT} $black_pen -N -K -O >> $ps_file`; - } # data + } # data `pssac2 $proj $Tsyn $bounds -Ent-3 -M${sizeT2} $red_pen -N -K -O >> $ps_file`; # synthetics #if ($ntline && ($iplot_recon==1)) {`pssac2 $proj $Trecon $bounds -Ent-3 -M${sizeT3} $recon_pen -N -K -O >> $ps_file`;} # reconstructed `psbasemap $proj $bounds -K -O $Bseis >> $ps_file`; # replot basemap @@ -677,19 +677,19 @@ END if ($ntline) { if ($iplot_dAlabel || $iplot_dTlabel) { for ($i=0; $i<$nT; $i++) { - $xtext = $Twinb[$i]; $just = "LB"; - if ($i == 0) { - $xtext = $xtextpos2; $just = "LB"; - } - if ($i == $nT-1) { - $xtext = $xtextpos4; $just = "RB"; - } - if ($iplot_dTlabel) { - `echo \"$xtext $ytextpos4 $dTfsize 0 1 $just $stlabT_dT[$i]\" | pstext $textinfo1 $proj $bounds -N -O -K >> $ps_file`; - } - if ($iplot_dAlabel) { - `echo \"$xtext $ytextpos3 $dTfsize 0 1 $just $stlabT_dA[$i]\" | pstext $textinfo1 $proj $bounds -N -O -K >> $ps_file`; - } + $xtext = $Twinb[$i]; $just = "LB"; + if ($i == 0) { + $xtext = $xtextpos2; $just = "LB"; + } + if ($i == $nT-1) { + $xtext = $xtextpos4; $just = "RB"; + } + if ($iplot_dTlabel) { + `echo \"$xtext $ytextpos4 $dTfsize 0 1 $just $stlabT_dT[$i]\" | pstext $textinfo1 $proj $bounds -N -O -K >> $ps_file`; + } + if ($iplot_dAlabel) { + `echo \"$xtext $ytextpos3 $dTfsize 0 1 $just $stlabT_dA[$i]\" | pstext $textinfo1 $proj $bounds -N -O -K >> $ps_file`; + } } } } @@ -708,16 +708,16 @@ END if ($nrline) { if ($iplot_win==1) { for ($i=0; $i<$nR; $i++) { - open(GMT,"|psxy $proj $bounds $winfo -O -K >> $ps_file"); - print GMT "$Rwinb[$i] 0\n $Rwine[$i] 0\n $Rwine[$i] 2\n $Rwinb[$i] 2\n $Rwinb[$i] 0\n"; - close(GMT); + open(GMT,"|psxy $proj $bounds $winfo -O -K >> $ps_file"); + print GMT "$Rwinb[$i] 0\n $Rwine[$i] 0\n $Rwine[$i] 2\n $Rwinb[$i] 2\n $Rwinb[$i] 0\n"; + close(GMT); } } if ($iplot_win2==1) { for ($i=0; $i<$nR2; $i++) { - open(GMT,"|psxy $proj $bounds $winfo2 -O -K >> $ps_file"); - print GMT "$Rwinb2[$i] 0\n $Rwine2[$i] 0\n $Rwine2[$i] 2\n $Rwinb2[$i] 2\n $Rwinb2[$i] 0"; - close(GMT); + open(GMT,"|psxy $proj $bounds $winfo2 -O -K >> $ps_file"); + print GMT "$Rwinb2[$i] 0\n $Rwine2[$i] 0\n $Rwine2[$i] 2\n $Rwinb2[$i] 2\n $Rwinb2[$i] 0"; + close(GMT); } } } @@ -732,19 +732,19 @@ END if ($nrline) { if ($iplot_dTlabel==1 || $iplot_dAlabel==1) { for ($i=0; $i<$nR; $i++) { - $xtext = $Rwinb[$i]; $just = "LB"; - if ($i == 0) { - $xtext = $xtextpos2; $just = "LB"; - } - if ($i == $nR-1) { - $xtext = $xtextpos4; $just = "RB"; - } - if ($iplot_dTlabel==1) { - `echo \"$xtext $ytextpos4 $dTfsize 0 1 $just $stlabR_dT[$i]\" | pstext $textinfo1 $proj $bounds -N -O -K >> $ps_file`; - } - if ($iplot_dAlabel==1) { - `echo \"$xtext $ytextpos3 $dTfsize 0 1 $just $stlabR_dA[$i]\" | pstext $textinfo1 $proj $bounds -N -O -K >> $ps_file`; - } + $xtext = $Rwinb[$i]; $just = "LB"; + if ($i == 0) { + $xtext = $xtextpos2; $just = "LB"; + } + if ($i == $nR-1) { + $xtext = $xtextpos4; $just = "RB"; + } + if ($iplot_dTlabel==1) { + `echo \"$xtext $ytextpos4 $dTfsize 0 1 $just $stlabR_dT[$i]\" | pstext $textinfo1 $proj $bounds -N -O -K >> $ps_file`; + } + if ($iplot_dAlabel==1) { + `echo \"$xtext $ytextpos3 $dTfsize 0 1 $just $stlabR_dA[$i]\" | pstext $textinfo1 $proj $bounds -N -O -K >> $ps_file`; + } } } } @@ -763,16 +763,16 @@ END if ($nzline) { if ($iplot_win==1) { for ($i=0; $i<$nZ; $i++) { - open(GMT,"|psxy $proj $bounds $winfo -O -K >> $ps_file"); - print GMT "$Zwinb[$i] 0\n $Zwine[$i] 0\n $Zwine[$i] 2\n $Zwinb[$i] 2\n $Zwinb[$i] 0\n"; - close(GMT); + open(GMT,"|psxy $proj $bounds $winfo -O -K >> $ps_file"); + print GMT "$Zwinb[$i] 0\n $Zwine[$i] 0\n $Zwine[$i] 2\n $Zwinb[$i] 2\n $Zwinb[$i] 0\n"; + close(GMT); } } if ($iplot_win2==1) { for ($i=0; $i<$nZ2; $i++) { - open(GMT,"|psxy $proj $bounds $winfo2 -O -K >> $ps_file"); - print GMT "$Zwinb2[$i] 0\n $Zwine2[$i] 0\n $Zwine2[$i] 2\n $Zwinb2[$i] 2\n $Zwinb2[$i] 0\n"; - close(GMT); + open(GMT,"|psxy $proj $bounds $winfo2 -O -K >> $ps_file"); + print GMT "$Zwinb2[$i] 0\n $Zwine2[$i] 0\n $Zwine2[$i] 2\n $Zwinb2[$i] 2\n $Zwinb2[$i] 0\n"; + close(GMT); } } } @@ -795,19 +795,19 @@ END if ($nzline) { if ($iplot_dTlabel==1 || $iplot_dAlabel==1) { for ($i=0; $i<$nZ; $i++) { - $xtext = $Zwinb[$i]; $just = "LB"; - if ($i == 0) { - $xtext = $xtextpos2; $just = "LB"; - } - if ($i == $nZ-1) { - $xtext = $xtextpos4; $just = "RB"; - } - if ($iplot_dTlabel==1) { - `echo \"$xtext $ytextpos4 $dTfsize 0 1 $just $stlabZ_dT[$i]\" | pstext $textinfo1 $proj $bounds -N -O -K >> $ps_file`; - } - if ($iplot_dAlabel==1) { - `echo \"$xtext $ytextpos3 $dTfsize 0 1 $just $stlabZ_dA[$i]\" | pstext $textinfo1 $proj $bounds -N -O -K >> $ps_file`; - } + $xtext = $Zwinb[$i]; $just = "LB"; + if ($i == 0) { + $xtext = $xtextpos2; $just = "LB"; + } + if ($i == $nZ-1) { + $xtext = $xtextpos4; $just = "RB"; + } + if ($iplot_dTlabel==1) { + `echo \"$xtext $ytextpos4 $dTfsize 0 1 $just $stlabZ_dT[$i]\" | pstext $textinfo1 $proj $bounds -N -O -K >> $ps_file`; + } + if ($iplot_dAlabel==1) { + `echo \"$xtext $ytextpos3 $dTfsize 0 1 $just $stlabZ_dA[$i]\" | pstext $textinfo1 $proj $bounds -N -O -K >> $ps_file`; + } } } } @@ -852,7 +852,7 @@ END # Input: number1, number2 # returns greater of 2 numbers sub max { - if ($_[0]<$_[1]) {return $_[1]} else {return $_[0]}; + if ($_[0]<$_[1]) {return $_[1]} else {return $_[0]}; } sub get_cmt { diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/misfit_plot/plot_seis_all.pl b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/misfit_plot/plot_seis_all.pl index 4504c7bb7..8865a6eeb 100755 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/misfit_plot/plot_seis_all.pl +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/misfit_plot/plot_seis_all.pl @@ -248,7 +248,7 @@ END `ln -s $datadir/*$sta*HHZ* DATA`; `ln -s $datadir/*$sta*HHR* DATA`; `ln -s $datadir/*$sta*HHT* DATA`; #$lcut = "0/200"; # KEY - #$lcut = "0/150"; + #$lcut = "0/150"; if ($imulti==0) { # KEY: plot 1, 2, or 3 sets of ZRT seismograms with map diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/misfit_plot/plot_seis_multi.pl b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/misfit_plot/plot_seis_multi.pl index f0f326dc8..fbb1a7e9a 100755 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/misfit_plot/plot_seis_multi.pl +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/misfit_plot/plot_seis_multi.pl @@ -6,7 +6,7 @@ # # Text here. # -# +# # EXAMPLE: # # plot_seis_multi.pl -m CMTSOLUTION_3321590 -n PHL/CI -l 10/190 -a 3321590_T006_T030_m16_STATIONS_ADJOINT -d DATA -s SYN -w MEASUREMENT_WINDOWS_3321590_T006_T030_m16/MEASUREMENT_WINDOWS_3321590_T006_T030_m00 -x 3321590_T006_T030_m16_window_chi/3321590_T006_T030_m00_window_chi -i 3321590/m16/m00/6/30 @@ -206,15 +206,15 @@ END $xtextpos3 = $tmin + 0.50*$trange; # title position $xtextpos4 = $tmin + 0.98*$trange; # final window measurement label -$ytextpos5 = 1.35*$Srange; # titles +$ytextpos5 = 1.35*$Srange; # titles #$ytextpos4 = 1.03*$Srange; # dT label #$ytextpos3 = 0.90*$Srange; # dlnA label -$ytextpos4 = 0.95*$Srange; # dT label -$ytextpos3 = 0.80*$Srange; # dlnA label -$ytextpos2 = 0.35*$Srange; # Z, R, T label -$ytextpos1 = 0.10*$Srange; # ymax label +$ytextpos4 = 0.95*$Srange; # dT label +$ytextpos3 = 0.80*$Srange; # dlnA label +$ytextpos2 = 0.35*$Srange; # Z, R, T label +$ytextpos1 = 0.10*$Srange; # ymax label -$ytextpos4 = 0.85*$Srange; # lower dT label +$ytextpos4 = 0.85*$Srange; # lower dT label # dimension of seismograms $proj = "-JX${sdX}/${sdY}"; @@ -318,11 +318,11 @@ END (undef,undef,undef,undef,undef,$kplotR,undef,undef,$chi2R,$chi3R,$chi4R,$chi5R,$meas2R,$meas3R,$meas4R,$meas5R,$sigma2R,$sigma3R,$sigma4R,$sigma5R) = split(" ",$mlines[$i]); if ($iplot_sigma==1) { - $stlabR_dT[$i] = sprintf("\@~D\@~T = %.2f \\261 %.2f s",$meas4R,$sigma4R); - $stlabR_dA[$i] = sprintf("\@~D\@~A = %.2f \\261 %.2f",$meas5R,$sigma5R); + $stlabR_dT[$i] = sprintf("\@~D\@~T = %.2f \\261 %.2f s",$meas4R,$sigma4R); + $stlabR_dA[$i] = sprintf("\@~D\@~A = %.2f \\261 %.2f",$meas5R,$sigma5R); } else { - $stlabR_dT[$i] = sprintf("\@~D\@~T = %.2f s",$meas4R); - $stlabR_dA[$i] = sprintf("\@~D\@~A = %.2f",$meas5R); + $stlabR_dT[$i] = sprintf("\@~D\@~T = %.2f s",$meas4R); + $stlabR_dA[$i] = sprintf("\@~D\@~A = %.2f",$meas5R); } } } @@ -350,11 +350,11 @@ END (undef,undef,undef,undef,undef,$kplotZ,undef,undef,$chi2Z,$chi3Z,$chi4Z,$chi5Z,$meas2Z,$meas3Z,$meas4Z,$meas5Z,$sigma2Z,$sigma3Z,$sigma4Z,$sigma5Z) = split(" ",$mlines[$i]); if ($iplot_sigma==1) { - $stlabZ_dT[$i] = sprintf("\@~D\@~T = %.2f \\261 %.2f s",$meas4Z,$sigma4Z); - $stlabZ_dA[$i] = sprintf("\@~D\@~A = %.2f \\261 %.2f",$meas5Z,$sigma5Z); + $stlabZ_dT[$i] = sprintf("\@~D\@~T = %.2f \\261 %.2f s",$meas4Z,$sigma4Z); + $stlabZ_dA[$i] = sprintf("\@~D\@~A = %.2f \\261 %.2f",$meas5Z,$sigma5Z); } else { - $stlabZ_dT[$i] = sprintf("\@~D\@~T = %.2f s",$meas4Z); - $stlabZ_dA[$i] = sprintf("\@~D\@~A = %.2f",$meas5Z); + $stlabZ_dT[$i] = sprintf("\@~D\@~T = %.2f s",$meas4Z); + $stlabZ_dA[$i] = sprintf("\@~D\@~A = %.2f",$meas5Z); } } } @@ -394,7 +394,7 @@ END #print "\n Overall max values: $maxD (data), $maxS (syn) $max (overall)\n"; $bounds = "-R$tmin/$tmax/$Smin/$Smax"; - $scale = 1.2; # KEY: scaling for plotting seismograms + $scale = 1.2; # KEY: scaling for plotting seismograms $size = 1/$scale; } @@ -449,10 +449,10 @@ END for ($i=0; $i<$nT; $i++) { $xtext = $Twinb[$i]; $just = "LB"; if ($i == 0) { - $xtext = $xtextpos2; $just = "LB"; + $xtext = $xtextpos2; $just = "LB"; } if ($i == $nT-1) { - $xtext = $xtextpos4; $just = "RB"; + $xtext = $xtextpos4; $just = "RB"; } if($iplot_dTlabel) {`echo \"$xtext $ytextpos4 $dTfsize 0 1 $just $stlabT_dT[$i]\" | pstext $textinfo1 $proj $bounds -N -O -K >> $ps_file`;} if($iplot_dAlabel) {`echo \"$xtext $ytextpos3 $dTfsize 0 1 $just $stlabT_dA[$i]\" | pstext $textinfo1 $proj $bounds -N -O -K >> $ps_file`;} @@ -485,10 +485,10 @@ END for ($i=0; $i<$nR; $i++) { $xtext = $Rwinb[$i]; $just = "LB"; if ($i == 0) { - $xtext = $xtextpos2; $just = "LB"; + $xtext = $xtextpos2; $just = "LB"; } if ($i == $nR-1) { - $xtext = $xtextpos4; $just = "RB"; + $xtext = $xtextpos4; $just = "RB"; } if($iplot_dTlabel==1) {`echo \"$xtext $ytextpos4 $dTfsize 0 1 $just $stlabR_dT[$i]\" | pstext $textinfo1 $proj $bounds -N -O -K >> $ps_file`;} if($iplot_dAlabel==1) {`echo \"$xtext $ytextpos3 $dTfsize 0 1 $just $stlabR_dA[$i]\" | pstext $textinfo1 $proj $bounds -N -O -K >> $ps_file`;} @@ -521,10 +521,10 @@ END for ($i=0; $i<$nZ; $i++) { $xtext = $Zwinb[$i]; $just = "LB"; if ($i == 0) { - $xtext = $xtextpos2; $just = "LB"; + $xtext = $xtextpos2; $just = "LB"; } if ($i == $nZ-1) { - $xtext = $xtextpos4; $just = "RB"; + $xtext = $xtextpos4; $just = "RB"; } if($iplot_dTlabel==1) {`echo \"$xtext $ytextpos4 $dTfsize 0 1 $just $stlabZ_dT[$i]\" | pstext $textinfo1 $proj $bounds -N -O -K >> $ps_file`;} if($iplot_dAlabel==1) {`echo \"$xtext $ytextpos3 $dTfsize 0 1 $just $stlabZ_dA[$i]\" | pstext $textinfo1 $proj $bounds -N -O -K >> $ps_file`;} @@ -572,7 +572,7 @@ END # Input: number1, number2 # returns greater of 2 numbers sub max { - if ($_[0]<$_[1]) {return $_[1]} else {return $_[0]}; + if ($_[0]<$_[1]) {return $_[1]} else {return $_[0]}; } sub get_cmt { diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/model_plot/gmt/plot_horz_coverage.pl b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/model_plot/gmt/plot_horz_coverage.pl index ef1b83d4d..a81f76bb7 100755 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/model_plot/gmt/plot_horz_coverage.pl +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/model_plot/gmt/plot_horz_coverage.pl @@ -85,7 +85,7 @@ # resolution of color plots #$interp = "-I2m/2m -S4m"; # key information -$interp = "-I2m"; +$interp = "-I2m"; $grdfile = "temp.grd"; # position of titles and labels @@ -135,11 +135,11 @@ if ($iregion==1) { # southern California - $wid = 2.8; # width of figure (inches) + $wid = 2.8; # width of figure (inches) $xmin = -122; $xmax = -114; $ymin = 31.5; $ymax = 37; # $xmin = -121.2; $xmax = -114.8; $ymin = 32.3; $ymax = 36.7; $tick1 = 1; $tick2 = 0.5; - $xmin = -122; $xmax = -114; $ymin = 32; $ymax = 37; + $xmin = -122; $xmax = -114; $ymin = 32; $ymax = 37; $xtick1 = 2; $xtick2 = 0.5; $ytick1 = 1; $ytick2 = 0.5; $cmax = 5000; $cmin = -$cmax; @@ -149,14 +149,14 @@ $topo_labels = "$dir0/socal_2005/socal_topo_labs.xyz"; $fault_labels = "$dir0/socal_2005/socal_fault_labs.xyz"; $name = "plot_horz_coverage"; - $origin = "-X1i -Y5i"; + $origin = "-X1i -Y5i"; # inset map $iinset = 1; $origin_inset = "-Xa7.5 -Ya4.5"; $Jinset = "-JM1.5"; $Rinset = "-R-132/-110/25/50"; - $Binset = "-B100wesn"; + $Binset = "-B100wesn"; $coast_res = "-Df -A0/0/4"; } @@ -234,10 +234,10 @@ $fname = "horz_${stirun}_xc_${modlab}_m16_${smodeltag}_${stip}_${imask}"; $psfile = "$fname.ps"; $jpgfile = "$fname.jpg"; - $vsnorm = $vsnorms[$p-1]; # reference velocity for m00 and m16 - $vbnorm = $vbnorms[$p-1]; # reference velocity for m00 and m16 + $vsnorm = $vsnorms[$p-1]; # reference velocity for m00 and m16 + $vbnorm = $vbnorms[$p-1]; # reference velocity for m00 and m16 $vpert = $vperts[$p-1]; # perturbation from reference velocity to plot - $zdep = $zcuts[$p-1]; # depth of the cross-section (m) + $zdep = $zcuts[$p-1]; # depth of the cross-section (m) # zero-level for mask normalization $cfile = "${dirdat}/horz_${stirun}_xc_${modlab}_m16_${smodeltag}_${stip}_mask_value.dat"; @@ -282,15 +282,15 @@ $kcol = 3 + $imask; if ($k==1) { - print CSH "psbasemap $J $R $B -K -V $orient $origin > $psfile\n"; # START + print CSH "psbasemap $J $R $B -K -V $orient $origin > $psfile\n"; # START } else { print CSH "psbasemap $J $R $B -K -O -V $shift >> $psfile\n"; } print CSH "psbasemap $J $R $B $cgray -K -O -V >> $psfile\n"; if ($icolor==1) { - #print CSH "awk '{print \$1,\$2,log(\$3/$cnorm)}' $dfile | nearneighbor -G$grdfile $R $interp\n"; + #print CSH "awk '{print \$1,\$2,log(\$3/$cnorm)}' $dfile | nearneighbor -G$grdfile $R $interp\n"; print CSH "awk '{print \$1,\$2,log(\$${kcol}/$cnorm)}' $dfile | xyz2grd -G$grdfile $R $interp\n"; - print CSH "grdimage $grdfile -C${cptfile} $J -Q -K -O -V >> $psfile\n"; + print CSH "grdimage $grdfile -C${cptfile} $J -Q -K -O -V >> $psfile\n"; print CSH "psscale -C${cptfile} $Dscale $Bscale -K -O -V >> $psfile\n"; #$slab1 = sprintf("ln ( %s / %.1e )",$mtit,$cnorm); @@ -311,16 +311,16 @@ if ($imask==1) { # boundaries of simulation - print CSH "psxy ${outer_boundary} $J $R -W2p,0/0/0 -K -O -V >>$psfile\n"; - #print CSH "psxy ${inner_boundary} $J $R -W1.5p,0/0/0,-- -K -O -V >>$psfile\n"; + print CSH "psxy ${outer_boundary} $J $R -W2p,0/0/0 -K -O -V >>$psfile\n"; + #print CSH "psxy ${inner_boundary} $J $R -W1.5p,0/0/0,-- -K -O -V >>$psfile\n"; $ibox = 0; if ($ibox==1) { - $boxinfo = "-W1.5p,0/0/255"; # -A : suppress drawing line segments as great circle arcs + $boxinfo = "-W1.5p,0/0/255"; # -A : suppress drawing line segments as great circle arcs - # Lin model (2007) box - $lin_boundary = "/net/denali/home2/carltape/gmt/tomography/lin_2007/lin_boundary_points.dat"; - print CSH "psxy ${lin_boundary} $J $R $boxinfo -K -O -V >>$psfile\n"; + # Lin model (2007) box + $lin_boundary = "/net/denali/home2/carltape/gmt/tomography/lin_2007/lin_boundary_points.dat"; + print CSH "psxy ${lin_boundary} $J $R $boxinfo -K -O -V >>$psfile\n"; } } @@ -342,7 +342,7 @@ if ($itoplab==1) { print CSH "pstext -N $R_title $J_title -K -O -V >>$psfile<>$psfile<>$psfile<>$psfile<>$psfile<>$psfile<>$psfile< color1a.cpt makecpt -Cseis -T3.167e+00/3.868e+00/1.079e-02 -D > color1b.cpt makecpt -Cseis -T-1.010e-01/1.010e-01/3.108e-03 -D > color2.cpt @@ -13,8 +13,8 @@ EOF pstext -N -R0/1/0/1 -JM2.8 -K -O -V >>horz_xc_vs_m16_m00_021_extra0.ps<> horz_xc_vs_m16_m00_021_extra0.ps -psxy /home/carltape/gmt/faults/jennings_more.xy -JM2.8 -R-121.2/-114.8/32.3/36.7 -m -W0.75p,0/0/0 -K -V -O >> horz_xc_vs_m16_m00_021_extra0.ps +pscoast -JM2.8 -R-121.2/-114.8/32.3/36.7 -Df -A0/0/4 -W0.75p -Na/0.75p -K -O -V >> horz_xc_vs_m16_m00_021_extra0.ps +psxy /home/carltape/gmt/faults/jennings_more.xy -JM2.8 -R-121.2/-114.8/32.3/36.7 -m -W0.75p,0/0/0 -K -V -O >> horz_xc_vs_m16_m00_021_extra0.ps psbasemap -JM2.8 -R-121.2/-114.8/32.3/36.7 -Ba1f0.5d:." ":wesn -K -V -O >> horz_xc_vs_m16_m00_021_extra0.ps pstext -R0/1/0/1 -JM2.8 -N -C4p -W255/255/255o,1.0p,0/0/0,solid -G0/0/0 -K -O -V >>horz_xc_vs_m16_m00_021_extra0.ps<>horz_xc_vs_m16_m00_021_extra0.ps<> horz_xc_vs_m16_m00_021_extra0.ps -psxy /home/carltape/gmt/faults/jennings_more.xy -JM2.8 -R-121.2/-114.8/32.3/36.7 -m -W0.75p,0/0/0 -K -V -O >> horz_xc_vs_m16_m00_021_extra0.ps +pscoast -JM2.8 -R-121.2/-114.8/32.3/36.7 -Df -A0/0/4 -W0.75p -Na/0.75p -K -O -V >> horz_xc_vs_m16_m00_021_extra0.ps +psxy /home/carltape/gmt/faults/jennings_more.xy -JM2.8 -R-121.2/-114.8/32.3/36.7 -m -W0.75p,0/0/0 -K -V -O >> horz_xc_vs_m16_m00_021_extra0.ps psbasemap -JM2.8 -R-121.2/-114.8/32.3/36.7 -Ba1f0.5d:." ":WEsn -K -V -O >> horz_xc_vs_m16_m00_021_extra0.ps pstext -R0/1/0/1 -JM2.8 -N -C4p -W255/255/255o,1.0p,0/0/0,solid -G0/0/0 -K -O -V >>horz_xc_vs_m16_m00_021_extra0.ps<>horz_xc_vs_m16_m00_021_extra0.ps<> horz_xc_vs_m16_m00_021_extra0.ps -psxy /home/carltape/gmt/faults/jennings_more.xy -JM2.8 -R-121.2/-114.8/32.3/36.7 -m -W0.75p,0/0/0 -K -V -O >> horz_xc_vs_m16_m00_021_extra0.ps +pscoast -JM2.8 -R-121.2/-114.8/32.3/36.7 -Df -A0/0/4 -W0.75p -Na/0.75p -K -O -V >> horz_xc_vs_m16_m00_021_extra0.ps +psxy /home/carltape/gmt/faults/jennings_more.xy -JM2.8 -R-121.2/-114.8/32.3/36.7 -m -W0.75p,0/0/0 -K -V -O >> horz_xc_vs_m16_m00_021_extra0.ps psbasemap -JM2.8 -R-121.2/-114.8/32.3/36.7 -Ba1f0.5d:." ":wesn -K -V -O >> horz_xc_vs_m16_m00_021_extra0.ps pstext -R0/1/0/1 -JM2.8 -N -C4p -W255/255/255o,1.0p,0/0/0,solid -G0/0/0 -K -O -V >>horz_xc_vs_m16_m00_021_extra0.ps<>horz_xc_vs_m16_m00_021_extra0.ps< $cptfile1a\n"; @@ -276,7 +276,7 @@ # colorpoint file for perturbation ln(m16/m00) -- FIXED with depth $cptfile2 = "color2.cpt"; - $cmin = -$cpert2*1.01; $cmax = $cpert2*1.01; + $cmin = -$cpert2*1.01; $cmax = $cpert2*1.01; $dc = ($cmax-$cmin)/${scale_color}; $T = sprintf("-T%3.3e/%3.3e/%3.3e",$cmin,$cmax,$dc); print CSH "makecpt -C$colorbar $T -D > $cptfile2\n"; @@ -299,19 +299,19 @@ $title = $titles[$k-1]; if ($k==1) { - print CSH "psbasemap $J $R $B -K -V $orient $origin > $psfile\n"; # START + print CSH "psbasemap $J $R $B -K -V $orient $origin > $psfile\n"; # START } else { print CSH "psbasemap $J $R $B -K -O -V $shift >> $psfile\n"; } print CSH "psbasemap $J $R $B $cgray -K -O -V >> $psfile\n"; # mask color if ($icolor==1) { if ($k == 1) { - ##print CSH "awk '{print \$1,\$2,log(\$3/$cnorm)}' $dfile | nearneighbor -G$grdfile $R $interp\n"; + ##print CSH "awk '{print \$1,\$2,log(\$3/$cnorm)}' $dfile | nearneighbor -G$grdfile $R $interp\n"; #print CSH "awk '{print \$1,\$2,log(\$3/$cnorm)}' $dfile | xyz2grd -G$grdfile $R $interp\n"; - #print CSH "grdimage $grdfile -C$cptfile1a $J -Q -K -O -V >> $psfile\n"; + #print CSH "grdimage $grdfile -C$cptfile1a $J -Q -K -O -V >> $psfile\n"; #print CSH "awk '{print \$1,\$2,\$3/1000}' $dfile | xyz2grd -G$grdfile $R $interp\n"; print CSH "grep -v NaN $dfile | awk '{print \$1,\$2,\$3/1000}' | xyz2grd -G$grdfile $R $interp\n"; - print CSH "grdimage $grdfile -C$cptfile1b $J -Q -K -O -V >> $psfile\n"; + print CSH "grdimage $grdfile -C$cptfile1b $J -Q -K -O -V >> $psfile\n"; #print CSH "psscale -C${cptfile1a} $Dscale $Bscale1a -K -O -V >> $psfile\n"; print CSH "psscale -C${cptfile1b} $Dscale2 $Bscale1b -K -O -V >> $psfile\n"; @@ -323,11 +323,11 @@ print CSH "pstext -N $R_title $J_title -K -O -V >>$psfile<> $psfile\n"; + #print CSH "grdimage $grdfile -C$cptfile1a $J -Q -K -O -V >> $psfile\n"; print CSH "grep -v NaN $dfile | awk '{print \$1,\$2,\$4/1000}' | xyz2grd -G$grdfile $R $interp\n"; - print CSH "grdimage $grdfile -C$cptfile1b $J -Q -K -O -V >> $psfile\n"; + print CSH "grdimage $grdfile -C$cptfile1b $J -Q -K -O -V >> $psfile\n"; #print CSH "psscale -C${cptfile1a} $Dscale $Bscale1a -K -O -V >> $psfile\n"; print CSH "psscale -C${cptfile1b} $Dscale2 $Bscale1b -K -O -V >> $psfile\n"; @@ -338,10 +338,10 @@ print CSH "pstext -N $R_title $J_title -K -O -V >>$psfile<> $psfile\n"; + print CSH "grdimage $grdfile -C$cptfile2 $J -K -O -V -Q >> $psfile\n"; print CSH "psscale -C${cptfile2} $Dscale $Bscale2 -K -O -V >> $psfile\n"; $slab1 = "ln($smodel2 / $smodel1)"; @@ -361,16 +361,16 @@ if (0==1) { # boundaries of simulation - print CSH "psxy ${outer_boundary} $J $R -W2p,0/0/0 -K -O -V >>$psfile\n"; - print CSH "psxy ${inner_boundary} $J $R -W1.5p,0/0/0,-- -K -O -V >>$psfile\n"; + print CSH "psxy ${outer_boundary} $J $R -W2p,0/0/0 -K -O -V >>$psfile\n"; + print CSH "psxy ${inner_boundary} $J $R -W1.5p,0/0/0,-- -K -O -V >>$psfile\n"; $ibox = 0; if ($ibox==1) { - $boxinfo = "-W1.5p,0/0/255"; # -A : suppress drawing line segments as great circle arcs + $boxinfo = "-W1.5p,0/0/255"; # -A : suppress drawing line segments as great circle arcs - # Lin model (2007) box - $lin_boundary = "/net/denali/home2/carltape/gmt/tomography/lin_2007/lin_boundary_points.dat"; - print CSH "psxy ${lin_boundary} $J $R $boxinfo -K -O -V >>$psfile\n"; + # Lin model (2007) box + $lin_boundary = "/net/denali/home2/carltape/gmt/tomography/lin_2007/lin_boundary_points.dat"; + print CSH "psxy ${lin_boundary} $J $R $boxinfo -K -O -V >>$psfile\n"; } } @@ -382,24 +382,24 @@ # plot a line at -119 longitude if ($p==11 && $ivs==1) { - $xmark = -119; - print CSH "psxy $J $R $finfo1 -K -O -V >>$psfile<>$psfile<>$psfile<>$psfile<> $psfile\n"; - print CSH "awk '{print \$1,\$2}' ${pfile} | psxy $J $R $finfo2 -K -O -V >> $psfile\n"; - } + @irs = (2,5); $nray = @irs ; + for ($ik = 1; $ik <= $nray; $ik ++ ) { + $ir = $irs[$ik-1]; + $stir = sprintf("%3.3i",$ir); + $pfile = "./INPUT/vert_01/vert_xc_${stir}_ray_path"; + if (not -f $pfile) { + die("Check if pfile $pfile exist or not\n"); + } + print CSH "awk '{print \$1,\$2}' ${pfile} | psxy $J $R $finfo1 -K -O -V >> $psfile\n"; + print CSH "awk '{print \$1,\$2}' ${pfile} | psxy $J $R $finfo2 -K -O -V >> $psfile\n"; + } } } @@ -421,7 +421,7 @@ if ($itoplab==1) { print CSH "pstext -N $R_title $J_title -K -O -V >>$psfile<>$psfile<>$psfile<>$psfile<>$psfile< $psfile\n"; # START - + print CSH "psbasemap $J $R $B -K -V $orient $origin > $psfile\n"; # START + print CSH "psbasemap $J $R $B $cgray -K -O -V >> $psfile\n"; if ($icolor==1) { print CSH "awk '{print \$1,\$2,\$4/1000}' $dfile | xyz2grd -G$grdfile $R $interp\n"; - print CSH "grdimage $grdfile -C$cptfile1b $J -Q -K -O -V >> $psfile\n"; + print CSH "grdimage $grdfile -C$cptfile1b $J -Q -K -O -V >> $psfile\n"; print CSH "psscale -C${cptfile1b} $Dscale2 $Bscale1b -K -O -V >> $psfile\n"; $slab1 = sprintf("(%.2f \\261 %.0f \\045)",$cnorm/1000,$cpert1*100); $slab2 = "$mtit km/s"; @@ -497,7 +497,7 @@ if ($itoplab==1) { print CSH "pstext -N $R_title $J_title -K -O -V >>$psfile<>$psfile<>$psfile<>$psfile<>$psfile<$cshfile"); print CSH "gmtset COLOR_NAN $sky_color PAPER_MEDIA letter MEASURE_UNIT inch BASEMAP_TYPE plain PLOT_DEGREE_FORMAT D TICK_LENGTH $tlen LABEL_FONT_SIZE $fsize2 ANOT_FONT_SIZE $fsize2 HEADER_FONT $fontno ANOT_FONT $fontno LABEL_FONT $fontno HEADER_FONT_SIZE $fsize1 FRAME_PEN $fpen TICK_PEN $tpen \n"; -@iBs = (5,8,4); # what sides of each cross section to show tick marks +@iBs = (5,8,4); # what sides of each cross section to show tick marks # modify the height of each cross-section based on the length for ($p = $pmin; $p <= $pmax; $p ++ ) { @@ -237,14 +237,14 @@ # USER INPUT # parameters controlling the placement of subplots and labels - $x0_xc = 5.8; $y0_xc = 5; # lower left of m00 cross section + $x0_xc = 5.8; $y0_xc = 5; # lower left of m00 cross section #$x0_map = 0.6; #$y0_map = 5; #$xgap_map_xc = 0.8; #$x0_xc = $x0_map + $widmap + $xgap_map_xc; #$y0_xc = $y0_map; $ygap_lab = 0.1; $xgap_lab = 0.6*$ygap_lab; # labels on the xc - $xgap_cbar = 0.2; # gap between plot and cbar + $xgap_cbar = 0.2; # gap between plot and cbar #$omap = "-Xa${x0_map} -Ya${y0_map}"; #$oxc = "-Xa${x0_xc} -Ya${y0_xc}"; @@ -253,8 +253,8 @@ $f_cbar = 0.6; $fygap_top = 0.20; $f_lab = $fygap_bot + $f_cbar + $fygap_top; - $Dthick = 0.15; # thickness of colorbar - $Dlen = $heightxc*$f_cbar; # length of colorbar + $Dthick = 0.15; # thickness of colorbar + $Dlen = $heightxc*$f_cbar; # length of colorbar $Dscale0 = "-D0/0/${Dlen}/${Dthick}"; #@Dscales = ($Dscale0,$Dscale0,"${Dscale0}h"); @Dscales = ($Dscale0,$Dscale0,$Dscale0); @@ -287,7 +287,7 @@ # absolute origins -- these depend on the WIDTH of the cross section # cross sections - $xgap_xc = 0.5; # hspace between cross sections + $xgap_xc = 0.5; # hspace between cross sections #if($wid < 3.5) {$xgap_xc = 1.0;} $x1 = $x0_xc; $y1 = $y0_xc; $oxc1 = "-Xa${x1} -Ya${y1}"; $x2 = $x0_xc; $y2 = $y0_xc - $heightxc; $oxc2 = "-Xa${x2} -Ya${y2}"; @@ -321,8 +321,8 @@ $xcb1 = $x1 + $wid + $xgap_cbar; $ycb1 = $y1 + $fac; $ocb1 = "-Xa${xcb1} -Ya${ycb1}"; $xcb2 = $x2 + $wid + $xgap_cbar; $ycb2 = $y2 + $fac; $ocb2 = "-Xa${xcb2} -Ya${ycb2}"; $xcb3 = $x3 - $xgap_cbar - $Dthick; $ycb3 = $y3 + $fac; $ocb3 = "-Xa${xcb3} -Ya${ycb3}"; - #$xcb3 = $x0_map + $widmap + $Dlen/2 + 0.4; $ycb3 = $y3 + $heightxc + 1.0; $ocb3 = "-Xa${xcb3} -Ya${ycb3}"; - #$xcb3 = $x3 + $wid - $Dlen/2; $ycb3 = $y3 + $heightxc + 1.0; $ocb3 = "-Xa${xcb3} -Ya${ycb3}"; + #$xcb3 = $x0_map + $widmap + $Dlen/2 + 0.4; $ycb3 = $y3 + $heightxc + 1.0; $ocb3 = "-Xa${xcb3} -Ya${ycb3}"; + #$xcb3 = $x3 + $wid - $Dlen/2; $ycb3 = $y3 + $heightxc + 1.0; $ocb3 = "-Xa${xcb3} -Ya${ycb3}"; @ocbs = ($ocb1,$ocb2,$ocb3); # label for colorbar @@ -346,7 +346,7 @@ # colorpoint file for perturbation ln(m16/m00) -- FIXED with depth $cptfile2 = "color2.cpt"; - $cmin = -$cpert2; $cmax = $cpert2; + $cmin = -$cpert2; $cmax = $cpert2; $dc = ($cmax-$cmin)/${scale_color}; $T = sprintf("-T%3.3e/%3.3e/%3.3e",$cmin*1.01,$cmax*1.01,$dc); print CSH "makecpt -C$colorbar $T -D > $cptfile2\n"; @@ -354,7 +354,7 @@ # colorbars for cross sections $Bscale1 = sprintf("-B%2.2ef0.5:\" \": -E10p",$vtick); #$Bscale2 = sprintf("-Ba%2.2ef0.05:\"$titles[2]\": -E10p",$cpert2); - $Bscale2 = sprintf("-Ba%2.2ef0.05:\" \": -E10p -A",$cpert2); # -A for ticks on other side + $Bscale2 = sprintf("-Ba%2.2ef0.05:\" \": -E10p -A",$cpert2); # -A for ticks on other side #------------------------------------ @@ -377,7 +377,7 @@ if (not -f ${outer_boundary}) { die("Check if outer_boundary ${outer_boundary} exist or not\n"); } - print CSH "psxy ${outer_boundary} $Jmap $Rmap -W1p,0/0/0 -K -O -V $omap >> $psfile\n"; + print CSH "psxy ${outer_boundary} $Jmap $Rmap -W1p,0/0/0 -K -O -V $omap >> $psfile\n"; } # plot ray path @@ -431,7 +431,7 @@ print CSH "psbasemap $J $R $B -G${sky_color} -K -O -V $oxc >> $psfile\n"; #if ($k==1) { - # print CSH "psbasemap $J $R $B -K -V $orient $origin > $psfile\n"; # START + # print CSH "psbasemap $J $R $B -K -V $orient $origin > $psfile\n"; # START #} else { # print CSH "psbasemap $J $R $B -K -O -V $shift >> $psfile\n"; #} @@ -440,8 +440,8 @@ if ($icolor==1) { #print CSH "awk '{print \$1,\$2,\$($icol+$k-1)}' $dfile | pscontour -C$cptfile1 -A- -I $J $R -K -O -V $oxc >> $psfile\n"; #print CSH "awk '{print \$1,\$2,\$($icol+$k-1)}' $dfile | xyz2grd -G$grdfile $R $interp\n"; - print CSH "awk '{print \$1,\$2,\$($icol+$k-1)}' $dfile | nearneighbor -G$grdfile $R $interp\n"; - print CSH "grdimage $grdfile -C$cptfile1 $J -Q -T -K -O -V $oxc >> $psfile\n"; + print CSH "awk '{print \$1,\$2,\$($icol+$k-1)}' $dfile | nearneighbor -G$grdfile $R $interp\n"; + print CSH "grdimage $grdfile -C$cptfile1 $J -Q -T -K -O -V $oxc >> $psfile\n"; # -A+r0.005 OR -A- # -C0.25 -L2.0/4.0 -Q100 @@ -465,10 +465,10 @@ } elsif ($k == 2) { if ($icolor==1) { - #print CSH "awk '{print \$1,\$2,\$($icol+$k-1)}' $dfile | pscontour -C$cptfile1 -A- -I $J $R -K -O -V $oxc >> $psfile\n"; + #print CSH "awk '{print \$1,\$2,\$($icol+$k-1)}' $dfile | pscontour -C$cptfile1 -A- -I $J $R -K -O -V $oxc >> $psfile\n"; #print CSH "awk '{print \$1,\$2,\$($icol+$k-1)}' $dfile | xyz2grd -G$grdfile $R $interp\n"; - print CSH "awk '{print \$1,\$2,\$($icol+$k-1)}' $dfile | nearneighbor -G$grdfile $R $interp\n"; - print CSH "grdimage $grdfile -C$cptfile1 $J -Q -K -O -V $oxc >> $psfile\n"; + print CSH "awk '{print \$1,\$2,\$($icol+$k-1)}' $dfile | nearneighbor -G$grdfile $R $interp\n"; + print CSH "grdimage $grdfile -C$cptfile1 $J -Q -K -O -V $oxc >> $psfile\n"; print CSH "grdcontour $grdfile $coninfo $J -K -O -V $oxc >> $psfile\n"; } @@ -482,7 +482,7 @@ #print CSH "awk '{print \$1,\$2,\$($icol+$k-1)}' $dfile | pscontour -C$cptfile2 -A- -I $J $R -K -O -V $oxc >> $psfile\n"; #print CSH "awk '{print \$1,\$2,\$($icol+$k-1)}' $dfile | xyz2grd -G$grdfile $R $interp\n"; print CSH "awk '{print \$1,\$2,\$($icol+$k-1)}' $dfile | nearneighbor -G$grdfile $R $interp\n"; - print CSH "grdimage $grdfile -C$cptfile2 $J -Q -K -O -V $oxc >> $psfile\n"; + print CSH "grdimage $grdfile -C$cptfile2 $J -Q -K -O -V $oxc >> $psfile\n"; } print CSH "psscale -C${cptfile2} $Dscale $Bscale2 -K -O -V $ocb >> $psfile\n"; @@ -490,7 +490,7 @@ #print CSH "pstext -N $R_title $J_title -K -O -V $ocbarlab >>$psfile<> $psfile\n"; + print CSH "psbasemap $J $R $B -K -O -V $oxc >> $psfile\n"; # details for specific cross-sections #if ($irun==1) { @@ -512,7 +512,7 @@ print CSH "psxy $J $R $finfo -K -O -V $oxc >>$psfile<>$psfile<>$psfile<>$psfile<>$psfile<>$psfile<>$psfile<>$psfile<> $psfile\n"; + print CSH "psxy ${outer_boundary} $Jmap $Rmap -W1p,0/0/0 -K -O -V $omap >> $psfile\n"; } # plot ray path @@ -727,7 +727,7 @@ $xlon1 = -118; $xlat1 = 33.9; $xlon2 = -118.3; $xlat2 = 33.8; $rayinfo = "-W1.0p,0/0/0"; - print CSH "psbasemap $Jmapinset $Rmapinset $Bmap -K -O -V $omapinset >> $psfile\n"; + print CSH "psbasemap $Jmapinset $Rmapinset $Bmap -K -O -V $omapinset >> $psfile\n"; print CSH "pscoast $Jmapinset $Rmapinset $coast_info2 -K -O -V $omapinset >> $psfile \n"; print CSH "psxy $Jmapinset $Rmapinset $rayinfo -K -O -V $omapinset >>$psfile<> $psfile \n"; print CSH "awk '{print \$1,\$2}' ${rfile} | psxy $Jmapinset $Rmapinset $srcinfo_mapinset -K -O -V $omapinset >> $psfile\n"; print CSH "awk '{print \$5,\$6}' ${rfile} | psxy $Jmapinset $Rmapinset $recinfo_mapinset -K -O -V $omapinset >> $psfile\n"; - print CSH "psbasemap $Jmapinset $Rmapinset $Bmap -K -O -V $omapinset >> $psfile\n"; + print CSH "psbasemap $Jmapinset $Rmapinset $Bmap -K -O -V $omapinset >> $psfile\n"; } print CSH "gmtset TICK_LENGTH $tlen\n"; # restore tick @@ -766,16 +766,16 @@ if ($imap==1) { print CSH "psbasemap $J $R $B -K -O -V $oxc > $psfile\n"; } else { - print CSH "psbasemap $J $R $B -K -V $oxc > $psfile\n"; + print CSH "psbasemap $J $R $B -K -V $oxc > $psfile\n"; } print CSH "psbasemap $J $R $B -G${sky_color} -K -O -V $oxc >> $psfile\n"; if ($icolor==1) { - print CSH "awk '{print \$1,\$2,\$($icol+$k-1)}' $dfile | nearneighbor -G$grdfile $R $interp\n"; + print CSH "awk '{print \$1,\$2,\$($icol+$k-1)}' $dfile | nearneighbor -G$grdfile $R $interp\n"; #print CSH "awk '{print \$1,\$2,\$4}' $dfile | xyz2grd -G$grdfile $R $interp\n"; - print CSH "grdimage $grdfile -C$cptfile1 $J -Q -K -O -V $oxc >> $psfile\n"; + print CSH "grdimage $grdfile -C$cptfile1 $J -Q -K -O -V $oxc >> $psfile\n"; - print CSH "grdcontour $grdfile -Cconfile2_${modlab} -A- -W0.75p $J -K -O -V $oxc >> $psfile\n"; + print CSH "grdcontour $grdfile -Cconfile2_${modlab} -A- -W0.75p $J -K -O -V $oxc >> $psfile\n"; } print CSH "psscale -C${cptfile1} $Dscale $Bscale1 -K -O -V $ocb >> $psfile\n"; @@ -784,12 +784,12 @@ # details for specific cross-sections #if ($irun==1) { - # positions of five faults along each profile - # (1) SAF, (2) GF, (3) SGF, (4) MCF, (5) SYF, (6) CRF - #(undef,undef,undef,$saf,$gf,$sgf,$mcf,$syf,$crf) = split(" ",$faults[$p-1]); - #print "$p -- SAF $saf -- GF -- $gf -- SGF $sgf -- MCF $mcf -- SYF $syf\n"; die("TESTING"); + # positions of five faults along each profile + # (1) SAF, (2) GF, (3) SGF, (4) MCF, (5) SYF, (6) CRF + #(undef,undef,undef,$saf,$gf,$sgf,$mcf,$syf,$crf) = split(" ",$faults[$p-1]); + #print "$p -- SAF $saf -- GF -- $gf -- SGF $sgf -- MCF $mcf -- SYF $syf\n"; die("TESTING"); - # vertical lines + # vertical lines print CSH "psxy $J $R $finfo -K -O -V $oxc >>$psfile<>$psfile<>$psfile<>$psfile<>$psfile<>$psfile<>$psfile<>$psfile<>$psfile<> $psfile\n"; - print CSH "awk '{print \$7,$zmax0}' $rfile | psxy $J $R $recinfo_xc -K -O -V $oxc >> $psfile\n"; + print CSH "awk '{print \$3,-\$4}' $rfile | psxy $J $R $srcinfo_xc -K -O -V $oxc >> $psfile\n"; + print CSH "awk '{print \$7,$zmax0}' $rfile | psxy $J $R $recinfo_xc -K -O -V $oxc >> $psfile\n"; } # details for specific cross-sections #if ($irun==1) { - #(undef,undef,undef,$saf,$gf,$sgf,$mcf,$syf) = split(" ",$faults[$p-1]); + #(undef,undef,undef,$saf,$gf,$sgf,$mcf,$syf) = split(" ",$faults[$p-1]); $talign = "CB"; $flsize = 9; $textinfo = "-N -C3p -W255/255/255o,1.0p,0/0/0,solid -G0/0/0"; @@ -830,7 +830,7 @@ if($kcf != 9999) {print CSH "pstext $J $R $textinfo -K -O -V $oxc >>$psfile<>$psfile<>$psfile<>$psfile<>$psfile<>$psfile<>$psfile<>$psfile<$cshfile"); print CSH "gmtset COLOR_NAN $sky_color PAPER_MEDIA letter MEASURE_UNIT inch BASEMAP_TYPE plain PLOT_DEGREE_FORMAT D TICK_LENGTH $tlen LABEL_FONT_SIZE $fsize2 ANOT_FONT_SIZE $fsize2 HEADER_FONT $fontno ANOT_FONT $fontno LABEL_FONT $fontno HEADER_FONT_SIZE $fsize1 FRAME_PEN $fpen TICK_PEN $tpen \n"; -#@iBs = (9,3,14,6,14,6); # what sides of each cross section to show tick marks +#@iBs = (9,3,14,6,14,6); # what sides of each cross section to show tick marks @iBs = (7,4,7,4,7,4); # modify the height of each cross-section based on the length @@ -272,14 +272,14 @@ $y0_map = 8; $x0_xc = $x0_map + 3.5; $y0_xc = $y0_map; $ygap_lab = 0.1; $xgap_lab = 0.6*$ygap_lab; # labels on the xc -$xgap_cbar = 0.2; # gap between plot and cbar +$xgap_cbar = 0.2; # gap between plot and cbar # factors (times $heightxc) controlling y position of colorbar and labels $fygap_bot = 0.0; $f_cbar = 0.9; $fygap_top = 0.0; $f_lab = $fygap_bot + $f_cbar + $fygap_top; -$Dlen = $heightxc*$f_cbar; # length of colorbar +$Dlen = $heightxc*$f_cbar; # length of colorbar $Dscale0 = "-D0/0/${Dlen}/${Dthick}"; #--------------------------------------------------------- @@ -323,7 +323,7 @@ $cptfile1 = "color1.cpt"; $dc = ($vmax-$vmin)/${scale_color}; $T = sprintf("-T%3.3e/%3.3e/%3.3e",$vmin,$vmax,$dc); -print CSH "makecpt -C$colorbar $T -D -Z > color.cpt\n"; # -Z for continuous (not for pscontour) +print CSH "makecpt -C$colorbar $T -D -Z > color.cpt\n"; # -Z for continuous (not for pscontour) print CSH "sed 's/^F.*/F 200 200 200/' color.cpt > $cptfile1\n"; # colorbars for cross sections @@ -470,7 +470,7 @@ #--------------------- # 2: HORIZONTAL CROSS SECTIONS OF MODEL -$icut = 13; # depth to plot +$icut = 13; # depth to plot $sticut = sprintf("%3.3i",$icut); $irunh = 2; $stirunh = sprintf("%2.2i",$irunh); $dirdath = "INPUT/horz_${stirunh}"; @@ -483,15 +483,15 @@ open(IN,$fcuts); @lines = ; $nump = @lines; # factors (times $heightxc) controlling y position of colorbar and labels -$Dthick = 0.1; # thickness of colorbar -$Dlen = 1.0; # length of colorbar +$Dthick = 0.1; # thickness of colorbar +$Dlen = 1.0; # length of colorbar $Dscale = "-D0/0/${Dlen}/${Dthick}"; #--------------------- # 3: HORIZONTAL CROSS SECTIONS OF KERNELS # parameters controlling which kernel slices to plot -@icols = (4,4, 3,3,4,5); # column in the datafile +@icols = (4,4, 3,3,4,5); # column in the datafile @icuts = (1,13, 1,13,13,13); # index into depth slice @letters = ("b","c","d","e","f","g"); @@ -527,7 +527,7 @@ $icut = $icuts[$ik-1]; $sticut = sprintf("%3.3i",$icut); # minmax for color scale - if ($ik <= 2) { + if ($ik <= 2) { # load values and check that the files exist (undef,$zcut,$vs_norm,$vb_norm,$vpert) = split(" ",$lines[$icut-1]); $cnorm = $vs_norm; @@ -541,7 +541,7 @@ } else { $cmin = -$cmax; } - + # data file if($ik <= 2) { $dfileh = "${dirdath}/horz_${stirunh}_xc_${dtag}_${sticut}_mask1.dat"; @@ -619,7 +619,7 @@ #------------------------------------ -print CSH "pstext -N $R_title $J_title -O -V >>$psfile<>$psfile< no pdf file exists\n"; + #print "$j -- $eid --> no pdf file exists\n"; } elsif ($numf == 1) { - #print "$j -- $eid --> pdf file exists\n"; - $pdffile = $files[0]; chomp($pdffile); - $pdcat[$k] = $pdffile; + #print "$j -- $eid --> pdf file exists\n"; + $pdffile = $files[0]; chomp($pdffile); + $pdcat[$k] = $pdffile; $k = $k+1; print OUT "$ftag\n"; } else { - print "$eid\n"; - die("more than one pdf file exists\n"); + print "$eid\n"; + die("more than one pdf file exists\n"); } - } # for + } # for } # make composite PDF file @@ -166,18 +166,18 @@ @files = glob("*${ftag}.pdf"); $numf = @files; if ($numf == 0) { - #print "$j -- $eid --> no pdf file exists\n"; + #print "$j -- $eid --> no pdf file exists\n"; } elsif ($numf == 1) { - #print "$j -- $eid --> pdf file exists\n"; - $pdffile = $files[0]; chomp($pdffile); - $pdcat[$k] = $pdffile; + #print "$j -- $eid --> pdf file exists\n"; + $pdffile = $files[0]; chomp($pdffile); + $pdcat[$k] = $pdffile; $k = $k+1; print OUT "$ftag\n"; } else { - print "$eid\n"; - die("more than one pdf file exists\n"); + print "$eid\n"; + die("more than one pdf file exists\n"); } - } # for + } # for } # make composite PDF file diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/model_plot/gmt/scripts/plot_horz_models_one.pl b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/model_plot/gmt/scripts/plot_horz_models_one.pl index 6d032c869..db7281a6c 100755 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/model_plot/gmt/scripts/plot_horz_models_one.pl +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/model_plot/gmt/scripts/plot_horz_models_one.pl @@ -128,7 +128,7 @@ if ($iregion==1) { # southern California - $wid = 5.5; # width of figure (inches) + $wid = 5.5; # width of figure (inches) $xmin = -122; $xmax = -114; $ymin = 31.5; $ymax = 37; $xmin = -121.2; $xmax = -114.8; $ymin = 32.3; $ymax = 36.7; # SPECFEM $tick1 = 1; $tick2 = 0.5; @@ -139,14 +139,14 @@ $topo_labels = "$dir0/socal_2005/socal_topo_labs.xyz"; $fault_labels = "$dir0/socal_2005/socal_fault_labs.xyz"; $name = "plot_horz_models_one"; - $origin = "-X1.5i -Y4i"; + $origin = "-X1.5i -Y4i"; # inset map $iinset = 1; $origin_inset = "-Xa7.5 -Ya4.5"; $Jinset = "-JM1.5"; $Rinset = "-R-132/-110/25/50"; - $Binset = "-B100wesn"; + $Binset = "-B100wesn"; $coast_res = "-Df -A0/0/4"; } @@ -230,10 +230,10 @@ $epsfile = "$fname.eps"; $jpgfile = "$fname.jpg"; - $vsnorm = $vsnorms[$p-1]; # reference velocity for m00 and m16 - $vbnorm = $vbnorms[$p-1]; # reference velocity for m00 and m16 + $vsnorm = $vsnorms[$p-1]; # reference velocity for m00 and m16 + $vbnorm = $vbnorms[$p-1]; # reference velocity for m00 and m16 $vpert = $vperts[$p-1]; # perturbation from reference velocity to plot - $zdep = $zcuts[$p-1]; # depth of the cross-section (m) + $zdep = $zcuts[$p-1]; # depth of the cross-section (m) # make less of a range for Vb compared with Vs -- factor if($ivs == 0) {$vpert = 1.0*$vpert;} @@ -251,7 +251,7 @@ # colorpoint file for m00 and m16 -- VARIES with depth -- in ln(m00/cnorm) $cptfile1a = "color1a.cpt"; - $cmin = -$cpert1*1.01; $cmax = $cpert1*1.01; + $cmin = -$cpert1*1.01; $cmax = $cpert1*1.01; $dc = ($cmax-$cmin)/${scale_color}; $T = sprintf("-T%3.3e/%3.3e/%3.3e",$cmin,$cmax,$dc); print CSH "makecpt -C$colorbar $T -D > $cptfile1a\n"; @@ -268,7 +268,7 @@ # colorpoint file for perturbation ln(m16/m00) -- FIXED with depth $cptfile2 = "color2.cpt"; - $cmin = -$cpert2*1.01; $cmax = $cpert2*1.01; + $cmin = -$cpert2*1.01; $cmax = $cpert2*1.01; $dc = ($cmax-$cmin)/${scale_color}; $T = sprintf("-T%3.3e/%3.3e/%3.3e",$cmin,$cmax,$dc); print CSH "makecpt -C$colorbar $T -D > $cptfile2\n"; @@ -290,7 +290,7 @@ $title = $titles[$k-1]; if ($k==1) { - print CSH "psbasemap $J $R $B -K -V $orient $origin > $psfile\n"; # START + print CSH "psbasemap $J $R $B -K -V $orient $origin > $psfile\n"; # START } else { print CSH "psbasemap $J $R $B -K -O -V $shift >> $psfile\n"; } @@ -307,10 +307,10 @@ } if ($icolor==1) { - #print CSH "awk '{print \$1,\$2,log(\$4/$cnorm)}' $dfile | nearneighbor -G$grdfile $R $interp\n"; + #print CSH "awk '{print \$1,\$2,log(\$4/$cnorm)}' $dfile | nearneighbor -G$grdfile $R $interp\n"; #print CSH "awk '{print \$1,\$2,log(\$4/$cnorm)}' $dfile | xyz2grd -G$grdfile $R $interp\n"; #print CSH "awk '{print \$1,\$2,\$4)}' $dfile | xyz2grd -G$grdfile $R $interp\n"; - #print CSH "grdimage $grdfile -C$cptfile1a $J -Q -K -O -V >> $psfile\n"; + #print CSH "grdimage $grdfile -C$cptfile1a $J -Q -K -O -V >> $psfile\n"; print CSH "awk '{print \$1,\$2,\$4/1000}' $dfile | xyz2grd -G$grdfile $R $interp\n"; @@ -348,16 +348,16 @@ if (0==1) { # boundaries of simulation - print CSH "psxy ${outer_boundary} $J $R -W2p,0/0/0 -K -O -V >>$psfile\n"; - print CSH "psxy ${inner_boundary} $J $R -W1.5p,0/0/0,-- -K -O -V >>$psfile\n"; + print CSH "psxy ${outer_boundary} $J $R -W2p,0/0/0 -K -O -V >>$psfile\n"; + print CSH "psxy ${inner_boundary} $J $R -W1.5p,0/0/0,-- -K -O -V >>$psfile\n"; $ibox = 0; if ($ibox==1) { - $boxinfo = "-W1.5p,0/0/255"; # -A : suppress drawing line segments as great circle arcs + $boxinfo = "-W1.5p,0/0/255"; # -A : suppress drawing line segments as great circle arcs - # Lin model (2007) box - $lin_boundary = "/net/denali/home2/carltape/gmt/tomography/lin_2007/lin_boundary_points.dat"; - print CSH "psxy ${lin_boundary} $J $R $boxinfo -K -O -V >>$psfile\n"; + # Lin model (2007) box + $lin_boundary = "/net/denali/home2/carltape/gmt/tomography/lin_2007/lin_boundary_points.dat"; + print CSH "psxy ${lin_boundary} $J $R $boxinfo -K -O -V >>$psfile\n"; } } @@ -369,24 +369,24 @@ # plot a line at -119 longitude if ($p==21 && $ivs==1) { - $xmark = -119; - print CSH "psxy $J $R $finfo1 -K -O -V >>$psfile<>$psfile<>$psfile<>$psfile<> $psfile\n"; - print CSH "awk '{print \$1,\$2}' ${pfile} | psxy $J $R $finfo2 -K -O -V >> $psfile\n"; - } + @irs = (2,5); $nray = @irs ; + for ($ik = 1; $ik <= $nray; $ik ++ ) { + $ir = $irs[$ik-1]; + $stir = sprintf("%3.3i",$ir); + $pfile = "./INPUT/vert_01/vert_01_xc_${stir}_ray_path"; + if (not -f $pfile) { + die("Check if pfile $pfile exist or not\n"); + } + print CSH "awk '{print \$1,\$2}' ${pfile} | psxy $J $R $finfo1 -K -O -V >> $psfile\n"; + print CSH "awk '{print \$1,\$2}' ${pfile} | psxy $J $R $finfo2 -K -O -V >> $psfile\n"; + } } # fault labels @@ -420,7 +420,7 @@ if ($itoplab==1) { print CSH "pstext -N $R_title $J_title -K -O -V >>$psfile<>$psfile<>$psfile<>$psfile<>$psfile<>$psfile<>$psfile< $cptfile1a\n"; @@ -275,7 +275,7 @@ # colorpoint file for perturbation ln(m16/m00) -- FIXED with depth $cptfile2 = "color2.cpt"; - $cmin = -$cpert2*1.01; $cmax = $cpert2*1.01; + $cmin = -$cpert2*1.01; $cmax = $cpert2*1.01; $dc = ($cmax-$cmin)/${scale_color}; $T = sprintf("-T%3.3e/%3.3e/%3.3e",$cmin,$cmax,$dc); print CSH "makecpt -C$colorbar $T -D > $cptfile2\n"; @@ -294,15 +294,15 @@ $title = $titles[$w-1]; if ($w==1) { - print CSH "psbasemap $J $R $B -K -V $orient $origin > $psfile\n"; # START + print CSH "psbasemap $J $R $B -K -V $orient $origin > $psfile\n"; # START } else { print CSH "psbasemap $J $R $B -K -O -V $shift >> $psfile\n"; } print CSH "psbasemap $J $R $B $cgray -K -O -V >> $psfile\n"; if ($icolor==1) { - #print CSH "awk '{print \$1,\$2,log(\$4/$cnorm)}' $dfile | nearneighbor -G$grdfile $R $interp\n"; + #print CSH "awk '{print \$1,\$2,log(\$4/$cnorm)}' $dfile | nearneighbor -G$grdfile $R $interp\n"; print CSH "awk '{print \$1,\$2,log(\$4/$cnorm)}' $dfile | xyz2grd -G$grdfile $R $interp\n"; - print CSH "grdimage $grdfile -C$cptfile1a $J -Q -K -O -V >> $psfile\n"; + print CSH "grdimage $grdfile -C$cptfile1a $J -Q -K -O -V >> $psfile\n"; #print CSH "psscale -C${cptfile1a} $Dscale $Bscale1a -K -O -V >> $psfile\n"; print CSH "psscale -C${cptfile1b} $Dscale2 $Bscale1b -K -O -V >> $psfile\n"; @@ -331,16 +331,16 @@ if (0==1) { # boundaries of simulation - print CSH "psxy ${outer_boundary} $J $R -W2p,0/0/0 -K -O -V >>$psfile\n"; - print CSH "psxy ${inner_boundary} $J $R -W1.5p,0/0/0,-- -K -O -V >>$psfile\n"; + print CSH "psxy ${outer_boundary} $J $R -W2p,0/0/0 -K -O -V >>$psfile\n"; + print CSH "psxy ${inner_boundary} $J $R -W1.5p,0/0/0,-- -K -O -V >>$psfile\n"; $ibox = 0; if ($ibox==1) { - $boxinfo = "-W1.5p,0/0/255"; # -A : suppress drawing line segments as great circle arcs + $boxinfo = "-W1.5p,0/0/255"; # -A : suppress drawing line segments as great circle arcs - # Lin model (2007) box - $lin_boundary = "/home/carltape/gmt/tomography/lin_2007/lin_boundary_points.dat"; - print CSH "psxy ${lin_boundary} $J $R $boxinfo -K -O -V >>$psfile\n"; + # Lin model (2007) box + $lin_boundary = "/home/carltape/gmt/tomography/lin_2007/lin_boundary_points.dat"; + print CSH "psxy ${lin_boundary} $J $R $boxinfo -K -O -V >>$psfile\n"; } } @@ -352,24 +352,24 @@ # plot a line at -119 longitude if ($p==11 && $ivs==1) { - $xmark = -119; - print CSH "psxy $J $R $finfo1 -K -O -V >>$psfile<>$psfile<>$psfile<>$psfile<> $psfile\n"; - print CSH "awk '{print \$1,\$2}' ${pfile} | psxy $J $R $finfo2 -K -O -V >> $psfile\n"; - } + @irs = (4,10,25); $nray = @irs; + #@irs = (2,5); $nray = @irs; + for ($ik = 1; $ik <= $nray; $ik ++ ) { + $ir = $irs[$ik-1]; + $stir = sprintf("%3.3i",$ir); + $pfile = "./INPUT/vert_01/vert_xc_${stir}_ray_path"; + if (not -f $pfile) {die("Check if pfile $pfile exist or not\n");} + print CSH "awk '{print \$1,\$2}' ${pfile} | psxy $J $R $finfo1 -K -O -V >> $psfile\n"; + print CSH "awk '{print \$1,\$2}' ${pfile} | psxy $J $R $finfo2 -K -O -V >> $psfile\n"; + } } } @@ -404,7 +404,7 @@ if ($itoplab==1) { print CSH "pstext -N $R_title $J_title -K -O -V >>$psfile<>$psfile<>$psfile<>$psfile<>$psfile<>$psfile<>$psfile<> $psfile\n"; + print CSH "psxy ${outer_boundary} $Jmap $Rmap -W2p,0/0/0 -K -O -V $omap >> $psfile\n"; } #============================================== @@ -266,7 +266,7 @@ # print CSH "pstext $R_title $J_title $textinfo -K -O -V $olab2 >>$psfile<> $psfile\n"; print CSH "pstext -N $R_title $J_title -K -O -V >>$psfile<> $psfile\n"; # FINISH (no K) + print CSH "psbasemap $Jmap $Rmap $Bmap -O -V $omap >> $psfile\n"; # FINISH (no K) #if($ixv==1) {print CSH "convert $psfile -rotate $rotangle $jpgfile\n";} if ($ixv==1) {print CSH "gv $psfile &\n";} diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/model_plot/gmt/scripts/plot_vert_models_one.pl b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/model_plot/gmt/scripts/plot_vert_models_one.pl index fe15cd6e6..3587eb199 100755 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/model_plot/gmt/scripts/plot_vert_models_one.pl +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/model_plot/gmt/scripts/plot_vert_models_one.pl @@ -164,7 +164,7 @@ open(CSH,">$cshfile"); print CSH "gmtset COLOR_NAN $sky_color PAPER_MEDIA letter MEASURE_UNIT inch BASEMAP_TYPE plain PLOT_DEGREE_FORMAT D TICK_LENGTH $tlen LABEL_FONT_SIZE $fsize2 ANOT_FONT_SIZE $fsize2 HEADER_FONT $fontno ANOT_FONT $fontno LABEL_FONT $fontno HEADER_FONT_SIZE $fsize1 FRAME_PEN $fpen TICK_PEN $tpen \n"; -@iBs = (5,8,4); # what sides of each cross section to show tick marks +@iBs = (5,8,4); # what sides of each cross section to show tick marks # modify the height of each cross-section based on the length for ($p = $pmin; $p <= $pmax; $p ++ ) { @@ -217,14 +217,14 @@ # USER INPUT # parameters controlling the placement of subplots and labels - $x0_xc = 0.75; $y0_xc = 3; # lower left of m00 cross section + $x0_xc = 0.75; $y0_xc = 3; # lower left of m00 cross section #$x0_map = 0.6; #$y0_map = 5; #$xgap_map_xc = 0.8; #$x0_xc = $x0_map + $widmap + $xgap_map_xc; #$y0_xc = $y0_map; $ygap_lab = 0.1; $xgap_lab = 0.6*$ygap_lab; # labels on the xc - $xgap_cbar = 0.2; # gap between plot and cbar + $xgap_cbar = 0.2; # gap between plot and cbar #$omap = "-Xa${x0_map} -Ya${y0_map}"; #$oxc = "-Xa${x0_xc} -Ya${y0_xc}"; @@ -233,8 +233,8 @@ $f_cbar = 0.6; $fygap_top = 0.20; $f_lab = $fygap_bot + $f_cbar + $fygap_top; - $Dthick = 0.20; # thickness of colorbar - $Dlen = $heightxc*$f_cbar; # length of colorbar + $Dthick = 0.20; # thickness of colorbar + $Dlen = $heightxc*$f_cbar; # length of colorbar $Dscale0 = "-D0/0/${Dlen}/${Dthick}"; #@Dscales = ($Dscale0,$Dscale0,"${Dscale0}h"); @Dscales = ($Dscale0,$Dscale0,$Dscale0); @@ -263,7 +263,7 @@ # absolute origins -- these depend on the WIDTH of the cross section # cross sections - $xgap_xc = 0.5; # hspace between cross sections + $xgap_xc = 0.5; # hspace between cross sections #if($wid < 3.5) {$xgap_xc = 1.0;} $x1 = $x0_xc; $y1 = $y0_xc; $oxc1 = "-Xa${x1} -Ya${y1}"; $x2 = $x0_xc; $y2 = $y0_xc; $oxc2 = "-Xa${x2} -Ya${y2}"; @@ -281,8 +281,8 @@ $xcb1 = $x1 + $wid + $xgap_cbar; $ycb1 = $y1 + $fac; $ocb1 = "-Xa${xcb1} -Ya${ycb1}"; $xcb2 = $x2 + $wid + $xgap_cbar; $ycb2 = $y2 + $fac; $ocb2 = "-Xa${xcb2} -Ya${ycb2}"; $xcb3 = $x3 - $xgap_cbar - $Dthick; $ycb3 = $y3 + $fac; $ocb3 = "-Xa${xcb3} -Ya${ycb3}"; - #$xcb3 = $x0_map + $widmap + $Dlen/2 + 0.4; $ycb3 = $y3 + $heightxc + 1.0; $ocb3 = "-Xa${xcb3} -Ya${ycb3}"; - #$xcb3 = $x3 + $wid - $Dlen/2; $ycb3 = $y3 + $heightxc + 1.0; $ocb3 = "-Xa${xcb3} -Ya${ycb3}"; + #$xcb3 = $x0_map + $widmap + $Dlen/2 + 0.4; $ycb3 = $y3 + $heightxc + 1.0; $ocb3 = "-Xa${xcb3} -Ya${ycb3}"; + #$xcb3 = $x3 + $wid - $Dlen/2; $ycb3 = $y3 + $heightxc + 1.0; $ocb3 = "-Xa${xcb3} -Ya${ycb3}"; @ocbs = ($ocb1,$ocb2,$ocb3); # label for colorbar @@ -306,7 +306,7 @@ # colorpoint file for perturbation ln(m16/m00) -- FIXED with depth $cptfile2 = "color2.cpt"; - $cmin = -$cpert2; $cmax = $cpert2; + $cmin = -$cpert2; $cmax = $cpert2; $dc = ($cmax-$cmin)/${scale_color}; $T = sprintf("-T%3.3e/%3.3e/%3.3e",$cmin*1.01,$cmax*1.01,$dc); print CSH "makecpt -C$colorbar $T -D > $cptfile2\n"; @@ -314,7 +314,7 @@ # colorbars for cross sections $Bscale1 = sprintf("-B%2.2ef0.5:\" \": -E10p",$vtick); #$Bscale2 = sprintf("-Ba%2.2ef0.05:\"$titles[2]\": -E10p",$cpert2); - $Bscale2 = sprintf("-Ba%2.2ef0.05:\" \": -E10p -A",$cpert2); # -A for ticks on other side + $Bscale2 = sprintf("-Ba%2.2ef0.05:\" \": -E10p -A",$cpert2); # -A for ticks on other side #------------------------------------ @@ -426,11 +426,11 @@ print CSH "psbasemap $J $R $B -G${sky_color} -K -O -V $oxc >> $psfile\n"; if ($icolor==1) { - print CSH "awk '{print \$1,\$2,\$($icol+$k-1)}' $dfile | nearneighbor -G$grdfile $R $interp\n"; + print CSH "awk '{print \$1,\$2,\$($icol+$k-1)}' $dfile | nearneighbor -G$grdfile $R $interp\n"; #print CSH "awk '{print \$1,\$2,\$4}' $dfile | xyz2grd -G$grdfile $R $interp\n"; - print CSH "grdimage $grdfile -C$cptfile1 $J -Q -K -O -V $oxc >> $psfile\n"; + print CSH "grdimage $grdfile -C$cptfile1 $J -Q -K -O -V $oxc >> $psfile\n"; - print CSH "grdcontour $grdfile -Cconfile1 -A- -W1.5p -Q100 $J -K -O -V $oxc >> $psfile\n"; + print CSH "grdcontour $grdfile -Cconfile1 -A- -W1.5p -Q100 $J -K -O -V $oxc >> $psfile\n"; } print CSH "psscale -C${cptfile1} $Dscale $Bscale1 -K -O -V $ocb >> $psfile\n"; @@ -439,12 +439,12 @@ # details for specific cross-sections #if ($irun==1) { - # positions of five faults along each profile - # (1) SAF, (2) GF, (3) SGF, (4) MCF, (5) SYF, (6) CRF - #(undef,undef,undef,$saf,$gf,$sgf,$mcf,$syf,$crf) = split(" ",$faults[$p-1]); - #print "$p -- SAF $saf -- GF -- $gf -- SGF $sgf -- MCF $mcf -- SYF $syf\n"; die("TESTING"); + # positions of five faults along each profile + # (1) SAF, (2) GF, (3) SGF, (4) MCF, (5) SYF, (6) CRF + #(undef,undef,undef,$saf,$gf,$sgf,$mcf,$syf,$crf) = split(" ",$faults[$p-1]); + #print "$p -- SAF $saf -- GF -- $gf -- SGF $sgf -- MCF $mcf -- SYF $syf\n"; die("TESTING"); - # vertical lines + # vertical lines print CSH "psxy $J $R $finfo -K -O -V $oxc >>$psfile<>$psfile<>$psfile<> $psfile\n"; - print CSH "awk '{print \$7,$zmax0}' $rfile | psxy $J $R $recinfo_xc -K -O -V $oxc >> $psfile\n"; + print CSH "awk '{print \$3,-\$4}' $rfile | psxy $J $R $srcinfo_xc -K -O -V $oxc >> $psfile\n"; + print CSH "awk '{print \$7,$zmax0}' $rfile | psxy $J $R $recinfo_xc -K -O -V $oxc >> $psfile\n"; } # details for specific cross-sections #if ($irun==1) { - #(undef,undef,undef,$saf,$gf,$sgf,$mcf,$syf) = split(" ",$faults[$p-1]); + #(undef,undef,undef,$saf,$gf,$sgf,$mcf,$syf) = split(" ",$faults[$p-1]); $talign = "CB"; $flsize = $fsize1; $textinfo = "-N -C4p -W255/255/255o,1.0p,0/0/0,solid -G0/0/0"; @@ -486,9 +486,9 @@ print CSH "pstext $R_title $J_title $textinfo -K -O -V $olab >>$psfile<>$psfile<>$psfile<>$psfile<>$psfile<>$psfile<>$psfile<sed.txt"); - + # file names print SED "/kReader1 SetFileName/s/SetFileName.*\$/SetFileName $file1/ \n"; #print SED "/kReader2 SetFileName/s/SetFileName.*\$/SetFileName $file2/ \n"; #print SED "/kReader3 SetFileName/s/SetFileName.*\$/SetFileName $file3/ \n"; # color scale - print SED "/scalarBar SetTitle/s/SetTitle.*\$/SetTitle \"$clabel\"/ \n"; + print SED "/scalarBar SetTitle/s/SetTitle.*\$/SetTitle \"$clabel\"/ \n"; $scalar_low = sprintf("%.4e",-$cmax); $scalar_high = sprintf("%.4e",$cmax); @@ -237,7 +237,7 @@ # file name $filename = sprintf("${ftag}_%2.2i.ps",$i); - print SED "/writer SetFileName/s/SetFileName.*\$/SetFileName \"$filename\"/ \n"; + print SED "/writer SetFileName/s/SetFileName.*\$/SetFileName \"$filename\"/ \n"; # close SED file close(SED); diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/model_plot/vtk/view_kernel_smooth.pl b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/model_plot/vtk/view_kernel_smooth.pl index e78d596f2..b0d546f19 100755 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/model_plot/vtk/view_kernel_smooth.pl +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/model_plot/vtk/view_kernel_smooth.pl @@ -106,9 +106,9 @@ $z_center = ($utm_zmin + $utm_zmax)/2; # increment between cross sections -$dxinc = 50000; # meters -$dyinc = 50000; # meters -$dzinc = 5000; # meters +$dxinc = 50000; # meters +$dyinc = 50000; # meters +$dzinc = 5000; # meters # number of cuts $Nx = int($xran/$dxinc) + 1; @@ -173,14 +173,14 @@ # open file for replacing the cross-section line open(SED,">sed.txt"); - + # file names print SED "/kReader1 SetFileName/s/SetFileName.*\$/SetFileName $file1/ \n"; #print SED "/kReader2 SetFileName/s/SetFileName.*\$/SetFileName $file2/ \n"; #print SED "/kReader3 SetFileName/s/SetFileName.*\$/SetFileName $file3/ \n"; # color scale - print SED "/scalarBar SetTitle/s/SetTitle.*\$/SetTitle \"$clabel\"/ \n"; + print SED "/scalarBar SetTitle/s/SetTitle.*\$/SetTitle \"$clabel\"/ \n"; $scalar_low = sprintf("%.4e",-$cmax); $scalar_high = sprintf("%.4e",$cmax); diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/model_plot/vtk/view_kernel_sum.pl b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/model_plot/vtk/view_kernel_sum.pl index 0661dd0c9..e1b0f9dc4 100755 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/model_plot/vtk/view_kernel_sum.pl +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/model_plot/vtk/view_kernel_sum.pl @@ -85,9 +85,9 @@ $z_center = ($utm_zmin + $utm_zmax)/2; # increment between cross sections -$dxinc = 50000; # meters -$dyinc = 50000; # meters -$dzinc = 5000; # meters +$dxinc = 50000; # meters +$dyinc = 50000; # meters +$dzinc = 5000; # meters # number of cuts $Nx = int($xran/$dxinc) + 1; @@ -149,12 +149,12 @@ # open file for replacing the cross-section line open(SED,">sed.txt"); - + # file names print SED "/kReader1 SetFileName/s/SetFileName.*\$/SetFileName $file1/ \n"; # color scale - print SED "/scalarBar SetTitle/s/SetTitle.*\$/SetTitle \"$clabel\"/ \n"; + print SED "/scalarBar SetTitle/s/SetTitle.*\$/SetTitle \"$clabel\"/ \n"; $scalar_low = sprintf("%.4e",-$cmax); $scalar_high = sprintf("%.4e",$cmax); @@ -189,7 +189,7 @@ # file name $filename = sprintf("${ftag}_%2.2i.ps",$i); - print SED "/writer SetFileName/s/SetFileName.*\$/SetFileName \"$filename\"/ \n"; + print SED "/writer SetFileName/s/SetFileName.*\$/SetFileName \"$filename\"/ \n"; # close SED file close(SED); diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/model_plot/vtk/view_kernel_sum_orig.pl b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/model_plot/vtk/view_kernel_sum_orig.pl index 7e91b4933..00e8f3f72 100755 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/model_plot/vtk/view_kernel_sum_orig.pl +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/model_plot/vtk/view_kernel_sum_orig.pl @@ -83,9 +83,9 @@ $z_center = ($utm_zmin + $utm_zmax)/2; # increment between cross sections -$dxinc = 50000; # meters -$dyinc = 50000; # meters -$dzinc = 5000; # meters +$dxinc = 50000; # meters +$dyinc = 50000; # meters +$dzinc = 5000; # meters # number of cuts $Nx = int($xran/$dxinc) + 1; @@ -146,14 +146,14 @@ # open file for replacing the cross-section line open(SED,">sed.txt"); - + # file names print SED "/kReader1 SetFileName/s/SetFileName.*\$/SetFileName $file1/ \n"; #print SED "/kReader2 SetFileName/s/SetFileName.*\$/SetFileName $file2/ \n"; #print SED "/kReader3 SetFileName/s/SetFileName.*\$/SetFileName $file3/ \n"; # color scale - print SED "/scalarBar SetTitle/s/SetTitle.*\$/SetTitle \"$clabel\"/ \n"; + print SED "/scalarBar SetTitle/s/SetTitle.*\$/SetTitle \"$clabel\"/ \n"; $scalar_low = sprintf("%.4e",-$cmax); $scalar_high = sprintf("%.4e",$cmax); @@ -208,7 +208,7 @@ # file name $filename = sprintf("${ftag}_%2.2i.ps",$i); - print SED "/writer SetFileName/s/SetFileName.*\$/SetFileName \"$filename\"/ \n"; + print SED "/writer SetFileName/s/SetFileName.*\$/SetFileName \"$filename\"/ \n"; # close SED file close(SED); diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/model_plot/vtk/view_model.pl b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/model_plot/vtk/view_model.pl index 442f0a7c2..bdd169120 100755 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/model_plot/vtk/view_model.pl +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/model_plot/vtk/view_model.pl @@ -169,9 +169,9 @@ $z_center = ($utm_zmin + $utm_zmax)/2; # increment between cross sections -$dxinc = 50000; # meters -$dyinc = 50000; # meters -$dzinc = 5000; # meters +$dxinc = 50000; # meters +$dyinc = 50000; # meters +$dzinc = 5000; # meters # number of cuts $Nx = int($xran/$dxinc) + 1; @@ -236,12 +236,12 @@ # open file for replacing the cross-section line open(SED,">sed.txt"); - + # file names print SED "/kReader1 SetFileName/s/SetFileName.*\$/SetFileName $file1/ \n"; # color scale - print SED "/scalarBar SetTitle/s/SetTitle.*\$/SetTitle \"$clabel\"/ \n"; + print SED "/scalarBar SetTitle/s/SetTitle.*\$/SetTitle \"$clabel\"/ \n"; print SED "/kMapper1 SetScalarRange/s/SetScalarRange.*\$/SetScalarRange $scalar_low $scalar_high/ \n"; print SED "/hrMapper1 SetScalarRange/s/SetScalarRange.*\$/SetScalarRange $scalar_low $scalar_high/ \n"; @@ -274,7 +274,7 @@ # file name $filename = sprintf("${ftag}_%2.2i.ps",$i); - print SED "/writer SetFileName/s/SetFileName.*\$/SetFileName \"$filename\"/ \n"; + print SED "/writer SetFileName/s/SetFileName.*\$/SetFileName \"$filename\"/ \n"; # close SED file close(SED); diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/model_plot/vtk/view_model_new.pl b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/model_plot/vtk/view_model_new.pl index f15eae2df..077582dca 100755 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/model_plot/vtk/view_model_new.pl +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/model_plot/vtk/view_model_new.pl @@ -73,9 +73,9 @@ $z_center = ($utm_zmin + $utm_zmax)/2; # increment between cross sections -$dxinc = 50000; # meters -$dyinc = 50000; # meters -$dzinc = 5000; # meters +$dxinc = 50000; # meters +$dyinc = 50000; # meters +$dzinc = 5000; # meters # number of cuts $Nx = int($xran/$dxinc) + 1; @@ -133,14 +133,14 @@ # open file for replacing the cross-section line open(SED,">sed.txt"); - + # file names print SED "/kReader1 SetFileName/s/SetFileName.*\$/SetFileName $file1/ \n"; #print SED "/kReader2 SetFileName/s/SetFileName.*\$/SetFileName $file2/ \n"; #print SED "/kReader3 SetFileName/s/SetFileName.*\$/SetFileName $file3/ \n"; # color scale - print SED "/scalarBar SetTitle/s/SetTitle.*\$/SetTitle \"$clabel\"/ \n"; + print SED "/scalarBar SetTitle/s/SetTitle.*\$/SetTitle \"$clabel\"/ \n"; $scalar_low = sprintf("%.4e",-$cmax); $scalar_high = sprintf("%.4e",$cmax); @@ -196,7 +196,7 @@ # file name #$filename = sprintf("${ftag}_%2.2i.ps",$i); $filename = sprintf("${fname}_%2.2i.ps",$i); - print SED "/writer SetFileName/s/SetFileName.*\$/SetFileName \"$filename\"/ \n"; + print SED "/writer SetFileName/s/SetFileName.*\$/SetFileName \"$filename\"/ \n"; # close SED file close(SED); diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/model_plot/vtk/view_update.pl b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/model_plot/vtk/view_update.pl index 99dffe448..131b223f2 100755 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/model_plot/vtk/view_update.pl +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/model_plot/vtk/view_update.pl @@ -122,9 +122,9 @@ $z_center = ($utm_zmin + $utm_zmax)/2; # increment between cross sections -$dxinc = 50000; # meters -$dyinc = 50000; # meters -$dzinc = 5000; # meters +$dxinc = 50000; # meters +$dyinc = 50000; # meters +$dzinc = 5000; # meters # number of cuts $Nx = int($xran/$dxinc) + 1; @@ -174,14 +174,14 @@ # open file for replacing the cross-section line open(SED,">sed.txt"); - + # file names print SED "/kReader1 SetFileName/s/SetFileName.*\$/SetFileName $file1/ \n"; #print SED "/kReader2 SetFileName/s/SetFileName.*\$/SetFileName $file2/ \n"; #print SED "/kReader3 SetFileName/s/SetFileName.*\$/SetFileName $file3/ \n"; # color scale - print SED "/scalarBar SetTitle/s/SetTitle.*\$/SetTitle \"$clabel\"/ \n"; + print SED "/scalarBar SetTitle/s/SetTitle.*\$/SetTitle \"$clabel\"/ \n"; $scalar_low = sprintf("%.4e",-$cmax); $scalar_high = sprintf("%.4e",$cmax); @@ -237,7 +237,7 @@ # file name #$filename = sprintf("${ftag}_%2.2i.ps",$i); $filename = sprintf("${fname}_%2.2i.ps",$i); - print SED "/writer SetFileName/s/SetFileName.*\$/SetFileName \"$filename\"/ \n"; + print SED "/writer SetFileName/s/SetFileName.*\$/SetFileName \"$filename\"/ \n"; # close SED file close(SED); diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/measure_adj/PLOTS/make_pdf_by_event.pl b/utils/ADJOINT_TOMOGRAPHY_TOOLS/measure_adj/PLOTS/make_pdf_by_event.pl index 05241f232..c0c35ae6a 100755 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/measure_adj/PLOTS/make_pdf_by_event.pl +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/measure_adj/PLOTS/make_pdf_by_event.pl @@ -29,7 +29,7 @@ ($stanet,$stalon,$stlat,undef,undef,undef,undef,undef) = split(" ",$stalines[$ik-1]); ($station,$network) = split("\\.",$stanet); #print "$ik out of $nrec : $station $network\n"; - + @files = glob("*${station}_${network}*pdf"); $numf = @files; if ($numf == 0) { diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/measure_adj/PLOTS/make_pdf_by_station.pl b/utils/ADJOINT_TOMOGRAPHY_TOOLS/measure_adj/PLOTS/make_pdf_by_station.pl index 317341ddf..4d1035149 100755 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/measure_adj/PLOTS/make_pdf_by_station.pl +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/measure_adj/PLOTS/make_pdf_by_station.pl @@ -87,7 +87,7 @@ if (-f $ofile) { print "--> $ofile already exists\n"; - } else { + } else { # loop over all possible events for ($j = 1; $j <= $nevent; $j = $j+1) { @@ -98,30 +98,30 @@ ($nmatch,undef,undef) = split(" ",`grep $eid ${file_eid_sub} | wc`); if ($nmatch == 1) { - # EXAMPLE: 9828889_T006_T030_GSC_CI_m16_cc_win_adj.pdf - @files = glob("${eid}_${Ttag}_${station}_${network}_${smodel}*pdf"); - $numf = @files; - if ($numf == 0) { - #print "$j -- $eid --> no pdf file exists\n"; - - } elsif ($numf == 1) { - #print "$j -- $eid --> pdf file exists\n"; - $pdffile = $files[0]; chomp($pdffile); - $pdcat[$k] = $pdffile; $k = $k+1; - - } else { - print "$eid\n"; - die("more than one pdf file exists\n"); - } + # EXAMPLE: 9828889_T006_T030_GSC_CI_m16_cc_win_adj.pdf + @files = glob("${eid}_${Ttag}_${station}_${network}_${smodel}*pdf"); + $numf = @files; + if ($numf == 0) { + #print "$j -- $eid --> no pdf file exists\n"; + + } elsif ($numf == 1) { + #print "$j -- $eid --> pdf file exists\n"; + $pdffile = $files[0]; chomp($pdffile); + $pdcat[$k] = $pdffile; $k = $k+1; + + } else { + print "$eid\n"; + die("more than one pdf file exists\n"); + } } - } # for + } # for # if there is at least one file, then make the composite PDF if ($k > $emin+1) { print "output file is $ofile\n"; $pdcat[$k] = "./$ofile"; print "@pdcat\n"; - `@pdcat`; # execute + `@pdcat`; # execute `sleep 5s`; } else { diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/measure_adj/PLOTS/plot_win_adj.pl b/utils/ADJOINT_TOMOGRAPHY_TOOLS/measure_adj/PLOTS/plot_win_adj.pl index 2e141dc16..301839ebe 100755 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/measure_adj/PLOTS/plot_win_adj.pl +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/measure_adj/PLOTS/plot_win_adj.pl @@ -1,4 +1,4 @@ -#!/usr/bin/perl +#!/usr/bin/perl # #----------------------------------- # plot_win_adj.pl @@ -8,7 +8,7 @@ # # NOTE: USER must change the file suffixes below, depending on the dataset. # (Search for "USER".) -# +# # EXAMPLE: # plot_win_adj.pl -M ../CMTSOLUTION_9818433 -n MPM/CI/BH -b 0 -l -10/200 -k 7/1 -a STATIONS_ADJOINT -d DATA -s SYN -c RECON -w MEASUREMENT.WINDOWS -i m16 -j 6/30 # @@ -471,7 +471,7 @@ END # TRANSVERSE component: data, synthetics, and windows #print "pssac2 $Tsyn -X-2 -Y4.5 $proj $bounds -Ent-3 -M${sizeT2} $red_pen -N -K -O $tick \n"; if (-f $Tsyn){ -`pssac2 $Tsyn -X-2 -Y4.5 $proj $bounds -Ent-3 -M${sizeT2} $red_pen -N -K -O $tick >> $ps_file`; # synthetics +`pssac2 $Tsyn -X-2 -Y4.5 $proj $bounds -Ent-3 -M${sizeT2} $red_pen -N -K -O $tick >> $ps_file`; # synthetics if ($ntline) { if ($iplot_win==1) { for ($i=0; $i<$nT; $i++) { @@ -488,10 +488,10 @@ END for ($i=0; $i<$nT; $i++) { $xtext = $Twinb[$i]; $just = "LB"; if ($i == 0) { - $xtext = $xtextpos2; $just = "LB"; + $xtext = $xtextpos2; $just = "LB"; } if ($i == $nT-1) { - $xtext = $xtextpos4; $just = "RB"; + $xtext = $xtextpos4; $just = "RB"; } `echo \"$xtext $ytextpos4 7 0 1 $just $stlabT_dT[$i]\" | pstext $textinfo $proj $bounds -N -O -K >> $ps_file`; `echo \"$xtext $ytextpos3 7 0 1 $just $stlabT_dA[$i]\" | pstext $textinfo $proj $bounds -N -O -K >> $ps_file`; @@ -520,10 +520,10 @@ END for ($i=0; $i<$nR; $i++) { $xtext = $Rwinb[$i]; $just = "LB"; if ($i == 0) { - $xtext = $xtextpos2; $just = "LB"; + $xtext = $xtextpos2; $just = "LB"; } if ($i == $nR-1) { - $xtext = $xtextpos4; $just = "RB"; + $xtext = $xtextpos4; $just = "RB"; } `echo \"$xtext $ytextpos4 7 0 1 $just $stlabR_dT[$i]\" | pstext $textinfo $proj $bounds -N -O -K >> $ps_file`; `echo \"$xtext $ytextpos3 7 0 1 $just $stlabR_dA[$i]\" | pstext $textinfo $proj $bounds -N -O -K >> $ps_file`; @@ -553,10 +553,10 @@ END for ($i=0; $i<$nZ; $i++) { $xtext = $Zwinb[$i]; $just = "LB"; if ($i == 0) { - $xtext = $xtextpos2; $just = "LB"; + $xtext = $xtextpos2; $just = "LB"; } if ($i == $nZ-1) { - $xtext = $xtextpos4; $just = "RB"; + $xtext = $xtextpos4; $just = "RB"; } `echo \"$xtext $ytextpos4 7 0 1 $just $stlabZ_dT[$i]\" | pstext $textinfo $proj $bounds -N -O -K >> $ps_file`; `echo \"$xtext $ytextpos3 7 0 1 $just $stlabZ_dA[$i]\" | pstext $textinfo $proj $bounds -N -O -K >> $ps_file`; @@ -594,7 +594,7 @@ END #$maxZ=1.0; $maxR=1.0; $maxT=1.0; - $scale=1.2; # adjust for plotting (this times max gives the axis limits) + $scale=1.2; # adjust for plotting (this times max gives the axis limits) if (-f $Zadj) { ($minZ,$maxZ)=split(/\//,`minmax $Zadj | awk '{print \$6}'`); (undef,$minZ)=split(//,$maxZ); @@ -642,7 +642,7 @@ END $Zadj2="ADJOINT_SOURCES/$sta.$net.${chan}Z.${klab2}.adj"; $Radj2="ADJOINT_SOURCES/$sta.$net.${chan}R.${klab2}.adj"; $Tadj2="ADJOINT_SOURCES/$sta.$net.${chan}T.${klab2}.adj"; - + } # VERTICAL component: adjoint source and windows @@ -651,12 +651,12 @@ END if ($iplot_win==1) { if ($nzline) { for ($i =0; $i<$nZ; $i++) { - open(GMT,"|psxy $proj $bounds -W2 -G220/220/220 -O -K >> $ps_file"); - print GMT "$Zwinb[$i] -$maxZ\n"; - print GMT "$Zwine[$i] -$maxZ\n"; - print GMT "$Zwine[$i] $maxZ\n"; - print GMT "$Zwinb[$i] $maxZ\n"; - close(GMT); + open(GMT,"|psxy $proj $bounds -W2 -G220/220/220 -O -K >> $ps_file"); + print GMT "$Zwinb[$i] -$maxZ\n"; + print GMT "$Zwine[$i] -$maxZ\n"; + print GMT "$Zwine[$i] $maxZ\n"; + print GMT "$Zwinb[$i] $maxZ\n"; + close(GMT); } } } @@ -676,12 +676,12 @@ END if ($iplot_win==1) { if ($nrline) { for ($i =0; $i<$nR; $i++) { - open(GMT,"|psxy $proj $bounds -W2 -G220/220/220 -O -K >> $ps_file"); - print GMT "$Rwinb[$i] -$maxR\n"; - print GMT "$Rwine[$i] -$maxR\n"; - print GMT "$Rwine[$i] $maxR\n"; - print GMT "$Rwinb[$i] $maxR\n"; - close(GMT); + open(GMT,"|psxy $proj $bounds -W2 -G220/220/220 -O -K >> $ps_file"); + print GMT "$Rwinb[$i] -$maxR\n"; + print GMT "$Rwine[$i] -$maxR\n"; + print GMT "$Rwine[$i] $maxR\n"; + print GMT "$Rwinb[$i] $maxR\n"; + close(GMT); } } } @@ -701,12 +701,12 @@ END if ($iplot_win==1) { if ($ntline) { for ($i =0; $i<$nT; $i++) { - open(GMT,"|psxy $proj $bounds -W2 -G220/220/220 -O -K >> $ps_file"); - print GMT "$Twinb[$i] -$maxT\n"; - print GMT "$Twine[$i] -$maxT\n"; - print GMT "$Twine[$i] $maxT\n"; - print GMT "$Twinb[$i] $maxT\n"; - close(GMT); + open(GMT,"|psxy $proj $bounds -W2 -G220/220/220 -O -K >> $ps_file"); + print GMT "$Twinb[$i] -$maxT\n"; + print GMT "$Twine[$i] -$maxT\n"; + print GMT "$Twine[$i] $maxT\n"; + print GMT "$Twinb[$i] $maxT\n"; + close(GMT); } } } @@ -740,7 +740,7 @@ END # Input: number1, number2 # returns greater of 2 numbers #sub max { -# if ($_[0]<$_[1]) {return $_[1]} else {return $_[0]}; +# if ($_[0]<$_[1]) {return $_[1]} else {return $_[0]}; #} sub get_cmt { diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/measure_adj/PLOTS/plot_win_adj_all.pl b/utils/ADJOINT_TOMOGRAPHY_TOOLS/measure_adj/PLOTS/plot_win_adj_all.pl index 003b8ba17..ca5637650 100755 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/measure_adj/PLOTS/plot_win_adj_all.pl +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/measure_adj/PLOTS/plot_win_adj_all.pl @@ -4,7 +4,7 @@ # plot_win_adj_all.pl # # This calls plot_win_adj.pl to make plots of data, syn, windows, measurements, and adjoint sources. -# +# # EXAMPLE: # plot_win_adj_all.pl -l -10/200 -m ../CMTSOLUTION_9818433 -n BH -b 0 -k 7/1 -a STATIONS_ADJOINT -d DATA -s SYN -c RECON -w MEASUREMENT.WINDOWS -i m16 -j 6/30 # @@ -37,7 +37,7 @@ END if($opt_i) {$smodel=$opt_i;} if($opt_j) {$Ts=$opt_j;} -print "\nplot_win_adj_all.pl:\n"; +print "\nplot_win_adj_all.pl:\n"; # loop over STATIONS -- first line is the number of stations $ns = `sed -n 1p $opt_a`; diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/measure_adj/PLOTS/plot_win_stats.pl b/utils/ADJOINT_TOMOGRAPHY_TOOLS/measure_adj/PLOTS/plot_win_stats.pl index 37f77a8e7..fcd90ee4f 100755 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/measure_adj/PLOTS/plot_win_stats.pl +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/measure_adj/PLOTS/plot_win_stats.pl @@ -8,7 +8,7 @@ # # CALLED BY: # plot_win_stats_all.pl -# +# # EXAMPLE: # plot_win_stats.pl ... # diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/measure_adj/PLOTS/plot_win_stats_all.pl b/utils/ADJOINT_TOMOGRAPHY_TOOLS/measure_adj/PLOTS/plot_win_stats_all.pl index 119d4a3c2..9c4bab591 100755 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/measure_adj/PLOTS/plot_win_stats_all.pl +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/measure_adj/PLOTS/plot_win_stats_all.pl @@ -7,7 +7,7 @@ # It also compiles all the measurements into one histogram, with the option of plotting here. # # The set of final histograms are copied to an output directory. -# +# # EXAMPLE: # plot_win_stats_all.pl 6/30 m16 0 # plot_win_stats_all.pl 6/30 m16 1 (plot histogram) @@ -101,7 +101,7 @@ #die("TESTING"); `plot_win_stats.pl $Ts $eid $name $meas_file $sta_file $eid_text ${cmtall_psmeca}`; - # check if the figure was made + # check if the figure was made if (-f "${name}.pdf") { $k = $k+1; print "$i, $eid, ${name}.pdf was made\n"; diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/measure_adj/USER_MANUAL/measure_adj_manual.tex b/utils/ADJOINT_TOMOGRAPHY_TOOLS/measure_adj/USER_MANUAL/measure_adj_manual.tex index b92eca8c2..2915c622e 100644 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/measure_adj/USER_MANUAL/measure_adj_manual.tex +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/measure_adj/USER_MANUAL/measure_adj_manual.tex @@ -99,7 +99,7 @@ \subsection{System requirements} \begin{itemize} \item UNIX operating system (Linux, Solaris, MacOS \ldots) \item GNU make -\item a fortran compiler (gfortran, ifort, etc...) +\item a fortran compiler (gfortran, ifort, etc...) \item other packages : SAC (Seismic Analysis Code, available from IRIS); GMT (Generic Mapping Tools) for the plotting scripts \end{itemize} @@ -119,7 +119,7 @@ \section{Obtaining the code} \section{Compilation} -If your compiler of choice is gfortran, then you should be able to use the \verb+Makefile+ with only minor modifications (notably you may need to change the search path for the {\tt libsacio.a} library). If you prefer another compiler, you should modify the OPT and FC lines in the makefiles accordingly. We tested the code using gfortran version 4.3.3. (To check your version, type \verb+gfortran --version+.) +If your compiler of choice is gfortran, then you should be able to use the \verb+Makefile+ with only minor modifications (notably you may need to change the search path for the {\tt libsacio.a} library). If you prefer another compiler, you should modify the OPT and FC lines in the makefiles accordingly. We tested the code using gfortran version 4.3.3. (To check your version, type \verb+gfortran --version+.) Steps to compile the MEAS--ADJ package: % @@ -155,8 +155,8 @@ \subsection{Running the test case} $dir0 = "/opt/seismo/datalib/SC/"; $fault_file = "$dir0/jennings.xy"; \end{verbatim} -\item Dr. Lupei Zhu's \verb+saclst+ program -\item Dr. Lupei Zhu's \verb+pssac2+ plotting program (\verb+pssac+ may work as well). +\item Dr. Lupei Zhu's \verb+saclst+ program +\item Dr. Lupei Zhu's \verb+pssac2+ plotting program (\verb+pssac+ may work as well). \end{itemize} %------------------------------------------------------------------- @@ -188,7 +188,7 @@ \subsection{Input file 1: {\tt MEASUREMENT.WINDOWS}} \end{verbatim} % The first line contains the number of pairs of records to be read in. Each pair of files is followed by the number of windows within which measurements will be made, followed by the time intervals for each window. -Note that data and synthetics require to have exactly the same \verb+t0, dt, npts+ for the code to run through. Therefore +Note that data and synthetics require to have exactly the same \verb+t0, dt, npts+ for the code to run through. Therefore no interpolation of \verb+dt+ is really necessary at any point. %------------- @@ -199,7 +199,7 @@ \subsection{Input file 2: {\tt MEASUREMENT.PAR}} \begin{verbatim} -0.585 0.0110 18200 # tstart, DT, npts: time vector for simulations 7 # imeas (1-8; see manual) - BH # channel of synthetics: BH or LH + BH # channel of synthetics: BH or LH 30.000 6.000 # TLONG and TSHORT: band-pass periods for records .false. # RUN_BANDPASS: use band-pass on records .true. # DISPLAY_DETAILS @@ -250,7 +250,7 @@ \subsection{Input file 2: {\tt MEASUREMENT.PAR}} \item Multitaper parameter, \verb+ITAPER+: Type of taper to use in constructing the transfer function between synthetics and data. Taper options are multitaper (1), cosine taper (2), and boxcar taper (3). For the single-taper options (2--3) the transfer function is not used, as the adjoint sources are constructed directly from the synthetic seismograms. For the multitaper option, the number of tapers is fixed to be twice \verb+NPI+ (see \verb+multitaper_vala.pdf+). \item Multitaper parameters, \verb+WTR+, \verb+NPI+ (see \verb+multitaper_vala.pdf+). Note \verb+WTR+ is also used to -determine \verb+i_right+ corresponding to the maximum frequency of valid frequency-dependent measurements. It requires +determine \verb+i_right+ corresponding to the maximum frequency of valid frequency-dependent measurements. It requires that the power at this frequency is above $10$ times the \verb+WTR*max_syn_power+. \item Multitaper parameter, \verb+DT_FAC+ (see \refSec{sec:MTparm}). @@ -272,21 +272,21 @@ \subsubsection{Multitaper parameters} MTMs are rejected (\verb+ user_trace = .false.+) based on: \begin{itemize} \item number of cycles in the window -\item number of frequency points given within \verb+[fstart,fend]+. Even when \verb+RUN_BANDPASS+ is turned off, the \verb+TLONG+ and \verb+TSHORT+ are still converted to \verb+fstart,fend+. They are best set to the values used in \verb+FLEXWIN+ +\item number of frequency points given within \verb+[fstart,fend]+. Even when \verb+RUN_BANDPASS+ is turned off, the \verb+TLONG+ and \verb+TSHORT+ are still converted to \verb+fstart,fend+. They are best set to the values used in \verb+FLEXWIN+ \item \verb+tshift_cc <= dt+: too small a time shift \item \verb+ abs(dtau_w(j)) > Tvec(j)/DT_FAC+: $\tau$ at a specific frequency is too high -\item \verb+ err_dt(j) > Tvec(j)/ERR_FAC+: error for a specific frequency is too high +\item \verb+ err_dt(j) > Tvec(j)/ERR_FAC+: error for a specific frequency is too high \item \verb+ abs(dtau_w(j)) > DT_MAX_SCALE*abs(tshift))+ $\tau$ at specific frequency deviates too much for global \verb+tshift_cc+ \end{itemize} Note that the cross-correlation measurements are then run through \verb+cc_measure_select()+ to determine if they are usable or not (\verb+tshift, dlnA = 0+). -Two example sets of parameters are given +Two example sets of parameters are given % \begin{verbatim} ! ********* adjust following for global traces ************************ ! ratio of current period with respect to dt and err_dt measurements - double precision, parameter :: DT_FAC = 1.0 + double precision, parameter :: DT_FAC = 1.0 double precision, parameter :: ERR_FAC = 8.0 ! max time shift allowed at all freq should be DT_MAX_SCALE * Tshift_xc double precision, parameter :: DT_MAX_SCALE = 5.0 @@ -297,7 +297,7 @@ \subsubsection{Multitaper parameters} ! ********* adjust following for socal 3-30s traces ******************** ! ratio of current period with respect to dt and err_dt measurements double precision, parameter :: DT_FAC = 2.0 - double precision, parameter :: ERR_FAC = 2.5 + double precision, parameter :: ERR_FAC = 2.5 ! max time shift allowed at all freq should be DT_MAX_SCALE * Tshift_xc double precision, parameter :: DT_MAX_SCALE = 3.5 ! use 3 cycles for surfaces waves @@ -356,7 +356,7 @@ \subsection{Output files} window_chi(20) = npts*dt \end{verbatim} % unit 12 -\item \verb+window_index+, an abbreviated output file with the indexing for each window. The columns are +\item \verb+window_index+, an abbreviated output file with the indexing for each window. The columns are \begin{verbatim} write(12,'(a3,a8,a5,a5,3i5,2f12.3)') net,sta,chan_syn,chan_dat,nwin,ipair,j,tstart,tend \end{verbatim} @@ -372,7 +372,7 @@ \subsection{Output files} % \end{enumerate} -With \verb+COMPUTE_ADJOINT_SOURCE = .true.+, +With \verb+COMPUTE_ADJOINT_SOURCE = .true.+, \begin{enumerate} \item adjoint source files (e.g., \verb+MPM.CI.BHZ.iker07.adj+) will appear in \verb+OUTPUT_FILES/+. These are ascii files with the time colume defined by \verb+tstart,DT,npts+ in the parameter file. @@ -392,7 +392,7 @@ \subsection{Output files} prefix.recon_syn_cc.sac # syn_dtw_cc prefix.recon_syn_cc_dt.sac # syn_dtw_cc_dt prefix.dt/dlnA_average/cc # dtau/dlnA_meas, dtaul/dlnA_sigma ('average' means 'mtm') -prefix.ph/abs/dlnA/ph_cor/dt # transfer fun.: phi/abs/log(abs)/phi(corr)/dtau(idf_new:idf_new:i_right) +prefix.ph/abs/dlnA/ph_cor/dt # transfer fun.: phi/abs/log(abs)/phi(corr)/dtau(idf_new:idf_new:i_right) # tshift/dlnA from cc are added to dtau/dlnA_wt prefix.recon_syn.sac # recon. syn with both dtau(om) and dlnA(om) applied for all imeas >=3 cases. prefix.recon_syn_dt.sac # reconstructed syn with only dtau(om) applied @@ -406,7 +406,7 @@ \subsection{Output files} prefix.obs (original data/syn) prefix.syn prefix.dat.sac (time windowed data/syn) -prefix.syn.sac +prefix.syn.sac prefix.obs.power % abs(dat_dtwo(1:i_right)), i.e., dat_dtw_cc prefix.syn.power % abs(syn_dtwo(1:i_right)), i.e., syn_dtw \end{verbatim} @@ -421,7 +421,7 @@ \subsection{Scripts} \begin{enumerate} \item \verb+write_par_file.pl+. Write the file \verb+MEASUREMENT.PAR+ from a given set of parameters. This is called within the run scripts in \verb+scripts_tomo+. -\item \verb+prepare_adj_src.pl+. This script reads in a set of adjoint sources made from Z-R-T records and outputs a set of adjoint sources in Z-E-N that can be used in SPECFEM3D. +\item \verb+prepare_adj_src.pl+. This script reads in a set of adjoint sources made from Z-R-T records and outputs a set of adjoint sources in Z-E-N that can be used in SPECFEM3D. \begin{verbatim} prepare_adj_src.pl -m CMT -z BH -s STATION -o OUTDIR -i [rotation] all_adj_ZRT_files prepare_adj_src.pl -m CMTSOLUTION_9818433 -s PLOTS/STATIONS_TOMO -o ADJOINT_SOURCES \ @@ -440,7 +440,7 @@ \subsection{Scripts} \begin{verbatim} Usage: combine_adj_src.pl DIR_1 DIR_2 DIR_NEW imeas1 imeas2 chan \end{verbatim} -Adjoint sources from \verb+dir1+ and \verb+dir2+ with the same station/net/component names are added up; station files +Adjoint sources from \verb+dir1+ and \verb+dir2+ with the same station/net/component names are added up; station files from \verb+dir1/STATIONS_ADJOINT+ and \verb+dir2/STATIONS_ADJOINT+ are combined into \verb+dir_new/STATIONS_ADJOINT+. \end{enumerate} % @@ -462,7 +462,7 @@ \subsection{Scripts} plot_win_adj.pl -m ../CMTSOLUTION_9818433 -n MPM/CI/BH -b 0 -l -10/200 -k 7/1 \ -a STATIONS_ADJOINT -d DATA -s SYN -c RECON -w MEASUREMENT.WINDOWS -i m16 -j 6/30 \end{verbatim} -gives plots of detailed information on data, syn, reconstructed syn and corresponding adjoint sources, as well as +gives plots of detailed information on data, syn, reconstructed syn and corresponding adjoint sources, as well as source/station distributions on a map (Figure \ref{fig:iker07} for MTM, \verb+imeas=7+). Some tweaking is probably necessary before successful application to a different dataset, including: setting evid in CMT file (correspond to data name evid.net.sta), setting corresponding kstnam,knetwk,kcmpnm for both @@ -514,23 +514,23 @@ \section{Measurement options} \item \verb+imeas = 3+, cross-correlation traveltime for a (banana-doughtnut) sensitivity kernel. The measurement between data and synthetics {\em is not used} in constructing the adjoint source. \eqa \phi &=& T_{syn} \nn\\ -\delta \phi &=& \delta{T_{syn}} = - \frac{\int w(t) \dot{s}(t) \delta s(t)\,dt}{\int w(t) \dot{s}^2(t)\,dt} +\delta \phi &=& \delta{T_{syn}} = - \frac{\int w(t) \dot{s}(t) \delta s(t)\,dt}{\int w(t) \dot{s}^2(t)\,dt} \quad\quad\quad\text{TTL (43)}\nn \\ f^\dagger(t) &=& -\frac{w(t)\dot{s}(t)}{\int w(t) \dot{s}^2(t)\,dt} \nn \ena -where $w(t)$ is the time window over which the measurement is made. +where $w(t)$ is the time window over which the measurement is made. \red{Note the $-$ sign!.} -\item \verb+imeas = 4+, amplitude difference for a (banana-doughtnut) sensitivity kernel. The measurement between data and synthetics {\em is not used} in constructing the adjoint source. +\item \verb+imeas = 4+, amplitude difference for a (banana-doughtnut) sensitivity kernel. The measurement between data and synthetics {\em is not used} in constructing the adjoint source. \eqa \phi &=& \ln A_{syn} \nn\\ -\delta \phi &=& \delta ln A_{syn} = \frac{\int w(t)s(t)\delta s(t)\,dt}{\int w(t) s^2(t)\,dt} +\delta \phi &=& \delta ln A_{syn} = \frac{\int w(t)s(t)\delta s(t)\,dt}{\int w(t) s^2(t)\,dt} \quad\quad\quad\text{TTL (64)} \nn \\ f^\dagger(t) &=& \frac{w(t) s(t)}{\int w(t) s^2(t)\,dt} \nn \ena -\item \verb+imeas = 5+, cross-correlation traveltime difference for an event kernel. +\item \verb+imeas = 5+, cross-correlation traveltime difference for an event kernel. \eqa \phi &=& \frac{1}{2}\sum_{rp}\left[ \frac{T_{obs}-T_{syn}}{\sigma_{\Delta T}} \right]^2 \nn\\ \delta \phi &=& - \sum_{rp} \frac{T_{obs}-T_{syn}}{\sigma^2_{\Delta T}}\, \delta{T_{syn}} = \sum_{rp} \frac{ \Delta T_{syn}}{\sigma^2_{\Delta T}} @@ -539,7 +539,7 @@ \section{Measurement options} \ena where the traveltime \textit{delay} of observed data w.r.t. synthetics $\Delta T_{syn}= T_{obs}-T_{syn}$ {\em is used} in constructing the adjoint source. The summation is performed over receivers ($r$) and phases ($p$). -Note the cross-correlation related measurements, including \verb+tshift, dlnA, cc_max+ +Note the cross-correlation related measurements, including \verb+tshift, dlnA, cc_max+ given by \verb+compute_syn_cc()+ correspond to \eq cc_i = \frac{\sum_j s_j \red{d_{j+i}}}{\sum_j s_j s_j},\quad \Delta T = i_{max}*dt, @@ -548,18 +548,18 @@ \section{Measurement options} \en and average error estimates are given by \eq -\sigma_{\Delta T} = \sqrt{\frac{\int[d(t)-s_c(t)]^2\,dt}{\int \dot{s}^2_c(t)\,dt}},\quad +\sigma_{\Delta T} = \sqrt{\frac{\int[d(t)-s_c(t)]^2\,dt}{\int \dot{s}^2_c(t)\,dt}},\quad \sigma_{\Delta lnA} = \sqrt{\frac{\int[d(t)-s_c(t)]^2\,dt}{\int s^2_{ct}(t)\,dt}} \en where $s_c(t)$ is the reconstructed synthetics after applying $\Delta T$ and $\Delta \ln A$ corrections. -\item \verb+imeas = 6+, amplitude difference for an event kernel. As +\item \verb+imeas = 6+, amplitude difference for an event kernel. As \eq d(t) \sim \exp(\Delta \ln A)\, s(t) \sim (1+\Delta \ln A_{syn})\, s(t) \nn, \en the misfit of amplitude anomaly may be defined by \eqa -\phi &=& \frac{1}{2}\sum_{rp}\left[\frac{\ln A_{obs} - \ln A_{syn}}{\sigma_{\Delta lnA}}\right]^2 +\phi &=& \frac{1}{2}\sum_{rp}\left[\frac{\ln A_{obs} - \ln A_{syn}}{\sigma_{\Delta lnA}}\right]^2 = \sum_{rp}\frac{1}{2}\left[\frac{\Delta \ln A}{\sigma_{\Delta lnA}}\right]^2 \nn\\ \delta \phi &=& -\sum_{rp}\frac{\Delta \ln A}{\sigma^2_{\Delta lnA}}\,\delta ln A = -\sum_{rp} \frac{\Delta \ln A}{\sigma^2_{\Delta lnA}} \frac{\int w(t)s(t)\delta s(t)\,dt}{\int w(t) s^2(t)\,dt} \nn \\ f^\dagger(t) &=& -\sum_{rp}\frac{w(t) s(t)}{\int w(t) s^2(t)\,dt} \frac{\Delta \ln A}{\sigma^2_{\Delta lnA}}\nn @@ -569,7 +569,7 @@ \section{Measurement options} \item \verb+imeas = 7+, multitaper traveltime difference for an event kernel. The measurement between data and synthetics {\em is used} in constructing the adjoint source. See \verb+multitaper_notes.pdf+. \eqa &&\phi_P(\bbm)= \frac{1}{2}\sum_{rp} \int W_{P_{rp}}(\om) \left[\tau_{rp}^{obs}(\om) - \tau_{rp}(\om,\bbm)\right]^2\, d\om \nn \\ -&&\delta \phi_P = -\sum_{rp}\int W_{P_{rp}}(\om) \Delta \tau_{rp}(\om, \bbm) \delta \tau_{rp}(\om,\bbm)\,d\om \nn \\ +&&\delta \phi_P = -\sum_{rp}\int W_{P_{rp}}(\om) \Delta \tau_{rp}(\om, \bbm) \delta \tau_{rp}(\om,\bbm)\,d\om \nn \\ &&f^\dagger_P(t) = \sum_{rp}\sum_j h_j(t) P_j(t), \quad P_j(\om)=W_{P_{rp}}(\om) \Delta \tau_{rp}(\om) p_j(\om), \nn \\ && \quad\quad\quad p_j(\om)=\frac{i\om s_j(\om)}{\sum_k |(i\om) s_k(\om)|^2}, \quad s_j(t)=s(t,\bbm)h_j(t)\nn \ena @@ -588,7 +588,7 @@ \section{Measurement options} \phi_Q(\bbm)&=& \frac{1}{2}\sum_{rp} \int W_{Q_{rp}}(\om) \left[ \ln A_{rp}^{obs}(\om) - \ln A_{rp}(\om,\bbm)\right]^2\, d\om \nn \\ \delta \phi_Q &=& -\sum_{rp}\int W_{Q_{rp}}(\om) \Delta \ln A_{rp}(\om, \bbm) \delta \ln A_{rp}(\om,\bbm)\,d\om \nn \\ f^\dagger_Q(t) &=& \sum_{rp}\sum_j h_j(t) Q_j(t), \quad Q_j(\om)=W_{Q_{rp}}(\om) \Delta \ln A_{Q_{rp}}(\om) q_j(\om), \nn\\ -&&\quad\quad q_j(\om)= -\frac{s_j}{\sum_k |s_k|^2}= i\om p_j(\om)\nn +&&\quad\quad q_j(\om)= -\frac{s_j}{\sum_k |s_k|^2}= i\om p_j(\om)\nn \ena where $\Delta \ln A_{rp}(\om,\bbm)=\ln A^{obs}_{rp}(\om)-\ln A_{rp}(\om,\bbm)$ is the frequency-dependent amplitude anomaly measurements, and \eq @@ -605,7 +605,7 @@ \subsection{NO\_WAVEFORM\_DIFFERENCE} \subsection{DO\_WEIGHTING} It is also possible to weigh windowed measurements of different categories if weighting is set in \verb+ma_weighting+ module (\verb+DO_WEIGHTING+): \eq -\Phi = \sum_\alpha \, W_\alpha \, \sum_i \phi_{\alpha,i} +\Phi = \sum_\alpha \, W_\alpha \, \sum_i \phi_{\alpha,i} \en For instance, weights can be given to windows in \verb+P_SV/SH/Rayleigh/Love+ - \verb+Z/R/T+, 6 different categories of measurements separately. They are only used to change the traveltime adjoint sources (and corresponding $\phi$ values) at this point. @@ -623,22 +623,22 @@ \subsection{Time-domain taper} \subsection{Reonstructed synthetics} \eq -\tilde{s}(\om)=s(\om) e^{\Delta \ln A(\om)- i \om \Delta\tau(\om)} +\tilde{s}(\om)=s(\om) e^{\Delta \ln A(\om)- i \om \Delta\tau(\om)} \en with the FFT convention in D\&T (p109) \subsection{Post-processing of adjoint sources} Note since data and synthetics have actually been pre-filtered, therefore the adjoint source that satisfies \eq -\delta \phi = \int f^\dagger (t) s^f(t) dt = \frac{1}{2\pi} \int f^\dagger(\om) B^*(\om)s^*(\om)\,d\om +\delta \phi = \int f^\dagger (t) s^f(t) dt = \frac{1}{2\pi} \int f^\dagger(\om) B^*(\om)s^*(\om)\,d\om =\int F^{-1}[f^\dagger(\om)B^*(\om)](t) s(t)\,dt \en i.e., the adjoint source also needs to be filtered by the same band-pass filter to produce the exact Fr\'{e}chet derivatives. \subsection{DO\_RAY\_DENSITY\_SOURCE} -Both \verb+sigma_tau+ and \verb+sigma_dlnA+, as well as measurements \verb+Delta_dtau/DlnA+ are set to be 1, -and carried all the way to the adjoint source \verb+tr/amp_adj_src(:)+. \verb+DO_RAY_DENSITY_SOURCE+ automatically +Both \verb+sigma_tau+ and \verb+sigma_dlnA+, as well as measurements \verb+Delta_dtau/DlnA+ are set to be 1, +and carried all the way to the adjoint source \verb+tr/amp_adj_src(:)+. \verb+DO_RAY_DENSITY_SOURCE+ automatically sets \verb+Error_type=0+. It provides a good indication of the volumetric coverage of the model domain by the given measurement sets. @@ -669,7 +669,7 @@ \subsection{Notes and Acknowledgments} The following individuals have also contributed to the development of the source code or related scripts: Vala \vala, Min Chen. The following individuals contributed to this manual: Carl Tape. -The \verb+measure_adj+ code makes use of filtering and enveloping algorithms that are part of SAC (Seismic Analysis Code, Lawerence Livermore National Laboratory) provided for free to IRIS members. We thank Brian Savage for adding interfaces to these algorithms in recent SAC distributions. +The \verb+measure_adj+ code makes use of filtering and enveloping algorithms that are part of SAC (Seismic Analysis Code, Lawerence Livermore National Laboratory) provided for free to IRIS members. We thank Brian Savage for adding interfaces to these algorithms in recent SAC distributions. We acknowledge support by the National Science Foundation under grant EAR-0711177. diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/measure_adj/UTIL/pssac2/jb.c b/utils/ADJOINT_TOMOGRAPHY_TOOLS/measure_adj/UTIL/pssac2/jb.c index 4c59a8256..afc1c1a17 100644 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/measure_adj/UTIL/pssac2/jb.c +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/measure_adj/UTIL/pssac2/jb.c @@ -12,461 +12,461 @@ /* function find - - Purpose: Finds the integer value within a sorted array x + + Purpose: Finds the integer value within a sorted array x of length n closest to value xt Input: xt - Value x - Sorted Array of values n - Length of x - Output: Integer in the array of closest value to xt + Output: Integer in the array of closest value to xt */ int find(float xt, float *x, int n) { - int il, im, itst, ihalf; - -// fprintf(stdout, "%f %f\n", xt,x[n-1]); - if(xt <= x[0]) { - return(0); - } - if(xt >= x[n-1]) { - return(n-1); - } - ihalf = 0; - il = 1; - im = n; - itst = im-il; -// fprintf(stdout, "%d %d %d %d\n", im, il, itst, ihalf); - while(itst > 1) { - ihalf = (im + il) / 2; -// fprintf(stdout, "%f > %f\n", xt, x[ihalf-1]); - if(xt >= x[ihalf-1]) { -// fprintf(stdout, "Greater\n"); - il = ihalf; - } else { -// fprintf(stdout, "Smaller\n"); - im = ihalf; - } - itst = im - il; -// fprintf(stdout, "%d %d %d %d\n", im, il, itst, ihalf); - } - return(il-1); + int il, im, itst, ihalf; + +// fprintf(stdout, "%f %f\n", xt,x[n-1]); + if(xt <= x[0]) { + return(0); + } + if(xt >= x[n-1]) { + return(n-1); + } + ihalf = 0; + il = 1; + im = n; + itst = im-il; +// fprintf(stdout, "%d %d %d %d\n", im, il, itst, ihalf); + while(itst > 1) { + ihalf = (im + il) / 2; +// fprintf(stdout, "%f > %f\n", xt, x[ihalf-1]); + if(xt >= x[ihalf-1]) { +// fprintf(stdout, "Greater\n"); + il = ihalf; + } else { +// fprintf(stdout, "Smaller\n"); + im = ihalf; + } + itst = im - il; +// fprintf(stdout, "%d %d %d %d\n", im, il, itst, ihalf); + } + return(il-1); } /* Function trd4 - - Purpose: + + Purpose: Input: ts - Double Array of Travel times for distance and depth [ sec ] delts - Array of Distances in degrees - hp - Array of Depths in Degrees - hs - Specific Depth - delt - Specific Distance - + hp - Array of Depths in Degrees + hs - Specific Depth + delt - Specific Distance + Output: t - Output Time [ sec ] - aih - + aih - ai0 - - dtdd - dt/dd - dtdhx - dt/dh - nh - Closest Element in Depth Array - nd = Closest Element in Distance Array + dtdd - dt/dd + dtdhx - dt/dh + nh - Closest Element in Depth Array + nd = Closest Element in Distance Array */ void -trd4(JBTable *jb, float hp, float delt, +trd4(JBTable *jb, float hp, float delt, float *t, float *aih, float *ai0, float *dtdd, float *dtdhx) { - int l, k; - float dh, dd; - float ddlt1, dtddh, ddh1, dtdhd, dtdh, dtdddh; - float c1, c2, c3, c4; - if(delt > jb->deltas[jb->nd-1]) { - return; - } - l = find(hp, jb->depths, jb->nh); - dh = hp - jb->depths[l]; - - k = find(delt, jb->deltas, jb->nd); - dd = delt - jb->deltas[k]; -// fprintf(stdout, "%d %d\n", l+1, k+1); - ddlt1 = 1.0 / (jb->deltas[k+1] - jb->deltas[k]); - dtddh = (jb->ts[l][k+1] - jb->ts[l][k]) * ddlt1; - - ddh1 = 1.0 / (jb->depths[l+1] - jb->depths[l]); - dtdhd = (jb->ts[l+1][k] - jb->ts[l][k]) * ddh1; - - dtdddh = (jb->ts[l+1][k+1] - jb->ts[l+1][k] - (jb->ts[l][k+1] - jb->ts[l][k]) ) * - ddlt1 * ddh1; - dtdh = dtdhd + dtdddh * dd; - *dtdd = dtddh + dtdddh * dh; - - *t = jb->ts[l][k] + dtdh * dh + dtddh * dd; - -// fprintf(stdout, "%f %f %f %f %f\n", *dtdd, dtddh, dtdddh, dh, dd); - c3 = *dtdd; - *dtdd = *dtdd * RAD2DEG; - *dtdhx = dtdh; - c1 = -(*dtdhx) * (R_EARTH - hp); - *aih = atan2(*dtdd, c1); - c2 = (jb->ts[0][1] - jb->ts[0][0]) / (jb->deltas[1] - jb->deltas[0]); - c4 = sqrt(c2*c2 - c3*c3); -// fprintf(stdout, "%f %f %f %f\n", c1,c2,c3,c4); - *ai0 = atan2(c3,c4); - *aih = *aih * RAD2DEG; - *ai0 = *ai0 * RAD2DEG; + int l, k; + float dh, dd; + float ddlt1, dtddh, ddh1, dtdhd, dtdh, dtdddh; + float c1, c2, c3, c4; + if(delt > jb->deltas[jb->nd-1]) { + return; + } + l = find(hp, jb->depths, jb->nh); + dh = hp - jb->depths[l]; + + k = find(delt, jb->deltas, jb->nd); + dd = delt - jb->deltas[k]; +// fprintf(stdout, "%d %d\n", l+1, k+1); + ddlt1 = 1.0 / (jb->deltas[k+1] - jb->deltas[k]); + dtddh = (jb->ts[l][k+1] - jb->ts[l][k]) * ddlt1; + + ddh1 = 1.0 / (jb->depths[l+1] - jb->depths[l]); + dtdhd = (jb->ts[l+1][k] - jb->ts[l][k]) * ddh1; + + dtdddh = (jb->ts[l+1][k+1] - jb->ts[l+1][k] - (jb->ts[l][k+1] - jb->ts[l][k]) ) * + ddlt1 * ddh1; + dtdh = dtdhd + dtdddh * dd; + *dtdd = dtddh + dtdddh * dh; + + *t = jb->ts[l][k] + dtdh * dh + dtddh * dd; + +// fprintf(stdout, "%f %f %f %f %f\n", *dtdd, dtddh, dtdddh, dh, dd); + c3 = *dtdd; + *dtdd = *dtdd * RAD2DEG; + *dtdhx = dtdh; + c1 = -(*dtdhx) * (R_EARTH - hp); + *aih = atan2(*dtdd, c1); + c2 = (jb->ts[0][1] - jb->ts[0][0]) / (jb->deltas[1] - jb->deltas[0]); + c4 = sqrt(c2*c2 - c3*c3); +// fprintf(stdout, "%f %f %f %f\n", c1,c2,c3,c4); + *ai0 = atan2(c3,c4); + *aih = *aih * RAD2DEG; + *ai0 = *ai0 * RAD2DEG; } float gfact3(JBTable *jb, float dist, float depth) { - - int ld; - float as, rs; - float distr, distm1, distm2, distp1, distp2; - float t, aih, ai0, dtdd, dtdh; - float aihr, ai0r; - float tm1, tm2, tp1, tp2, dum, dum2, dm, dhx; - float p, d2tdd2, c5;; - float gd; - - if(depth > 800) { - return(-1.0); - } -// if(dist > 90 || dist < 30) { -// return(-1.0); -// } - ld = find(depth, jb->z, jb->nl); - as = jb->vp[ld] + (jb->vp[ld+1] - jb->vp[ld]) * - (depth - jb->z[ld]) / (jb->z[ld+1] - jb->z[ld]); - rs = jb->den[ld] + (jb->den[ld+1] - jb->den[ld]) * - (depth - jb->z[ld]) / (jb->z[ld+1] - jb->z[ld]); -// fprintf(stdout, "%d %d\n", ld, jb->nl); -// fprintf(stdout, "%f\n", (depth - jb->z[ld]) / (jb->z[ld+1] - jb->z[ld]) ); -// fprintf(stdout, "%f %f\n", as, rs); - distr = dist * DEG2RAD; - distm2 = dist - 2.0 * DD; - distm1 = dist - DD; - distp2 = dist + 2.0 * DD; - distp1 = dist + DD; - trd4(jb, depth, dist, &t, &aih, &ai0, &dtdd, &dtdh); - aihr = aih * DEG2RAD; - ai0r = ai0 * DEG2RAD; - - trd4(jb, depth, distm2, &tm2, &dum, &dum2, &dm, &dhx); - trd4(jb, depth, distm1, &tm1, &dum, &dum2, &dm, &dhx); - trd4(jb, depth, distp2, &tp2, &dum, &dum2, &dm, &dhx); - trd4(jb, depth, distp1, &tp1, &dum, &dum2, &dm, &dhx); - -// fprintf(stdout, "%f %f %f %f\n", tm2, tm1, tp2, tp1); - - dtdd = (tp1-tm1) / (2.0 * DD); - p = dtdd * RAD2DEG; - d2tdd2 = (tp2 - 2.0 * t + tm2 ) / (4.0 * DD * DD); - d2tdd2 = d2tdd2 * RAD2DEG * RAD2DEG; - c5 = rs * as * p * fabs(d2tdd2); - c5 = c5 / (jb->vp[0] * jb->den[0] * sin(distr) * cos(aihr) * cos(ai0r)); - gd = as * sqrt(c5) / (R_EARTH - depth); -// fprintf(stdout, "%f %f %f %f %f %f %f\n", gd, as, c5, distr, depth, aihr, ai0r); - return(gd); + + int ld; + float as, rs; + float distr, distm1, distm2, distp1, distp2; + float t, aih, ai0, dtdd, dtdh; + float aihr, ai0r; + float tm1, tm2, tp1, tp2, dum, dum2, dm, dhx; + float p, d2tdd2, c5;; + float gd; + + if(depth > 800) { + return(-1.0); + } +// if(dist > 90 || dist < 30) { +// return(-1.0); +// } + ld = find(depth, jb->z, jb->nl); + as = jb->vp[ld] + (jb->vp[ld+1] - jb->vp[ld]) * + (depth - jb->z[ld]) / (jb->z[ld+1] - jb->z[ld]); + rs = jb->den[ld] + (jb->den[ld+1] - jb->den[ld]) * + (depth - jb->z[ld]) / (jb->z[ld+1] - jb->z[ld]); +// fprintf(stdout, "%d %d\n", ld, jb->nl); +// fprintf(stdout, "%f\n", (depth - jb->z[ld]) / (jb->z[ld+1] - jb->z[ld]) ); +// fprintf(stdout, "%f %f\n", as, rs); + distr = dist * DEG2RAD; + distm2 = dist - 2.0 * DD; + distm1 = dist - DD; + distp2 = dist + 2.0 * DD; + distp1 = dist + DD; + trd4(jb, depth, dist, &t, &aih, &ai0, &dtdd, &dtdh); + aihr = aih * DEG2RAD; + ai0r = ai0 * DEG2RAD; + + trd4(jb, depth, distm2, &tm2, &dum, &dum2, &dm, &dhx); + trd4(jb, depth, distm1, &tm1, &dum, &dum2, &dm, &dhx); + trd4(jb, depth, distp2, &tp2, &dum, &dum2, &dm, &dhx); + trd4(jb, depth, distp1, &tp1, &dum, &dum2, &dm, &dhx); + +// fprintf(stdout, "%f %f %f %f\n", tm2, tm1, tp2, tp1); + + dtdd = (tp1-tm1) / (2.0 * DD); + p = dtdd * RAD2DEG; + d2tdd2 = (tp2 - 2.0 * t + tm2 ) / (4.0 * DD * DD); + d2tdd2 = d2tdd2 * RAD2DEG * RAD2DEG; + c5 = rs * as * p * fabs(d2tdd2); + c5 = c5 / (jb->vp[0] * jb->den[0] * sin(distr) * cos(aihr) * cos(ai0r)); + gd = as * sqrt(c5) / (R_EARTH - depth); +// fprintf(stdout, "%f %f %f %f %f %f %f\n", gd, as, c5, distr, depth, aihr, ai0r); + return(gd); } static JBTable JB = { - JB_NL , - {0.0 , 15.0, 15.0, 33.0, 33.0, 100.0, 200.0, 300.0, 413.0, 600.0, 800.0}, - {5.57, 5.57, 6.50, 6.50, 7.75, 7.95, 8.26, 8.58, 8.97, 10.25, 11.00}, - {3.36, 3.36, 3.74, 3.74, 4.35, 4.45, 4.60, 4.76, 4.96, 5.66, 6.13 }, - {2.65, 2.65, 2.87, 2.87, 3.32, 3.38, 3.47, 3.55, 3.64, 4.13, 4.49 }, - JB_NH , - {0.0, 15.0, 33.0, 96.0, 160.0, 223.0, 287.0, - 350.0, 413.0, 477.0, 540.0, 603.0, 667.0, 730.0, - 793.0}, - JB_ND , - {0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, - 2.0, 2.5, 3.0, 3.5, 4.0, 4.5, 5.0, 5.5, 6.0, 6.5, - 7.0, 7.5, 8.0, 8.5, 9.0, 9.5, 10.0, 11.0, 12.0, 13.0, - 14.0, 15.0, 16.0, 17.0, 18.0, 19.0, 20.0, 21.0, 22.0, 23.0, - 24.0, 25.0, 26.0, 27.0, 28.0, 29.0, 30.0, 31.0, 32.0, 33.0, - 34.0, 35.0, 36.0, 37.0, 38.0, 39.0, 40.0, 41.0, 42.0, 43.0, - 44.0, 45.0, 46.0, 47.0, 48.0, 49.0, 50.0, 51.0, 52.0, 53.0, - 54.0, 55.0, 56.0, 57.0, 58.0, 59.0, 60.0, 61.0, 62.0, 63.0, - 64.0, 65.0, 66.0, 67.0, 68.0, 69.0, 70.0, 71.0, 72.0, 73.0, - 74.0, 75.0, 76.0, 77.0, 78.0, 79.0, 80.0, 81.0, 82.0, 83.0, - 84.0, 85.0, 86.0, 87.0, 88.0, 89.0, 90.0, 91.0, 92.0, 93.0, - 94.0, 95.0, 96.0, 97.0, 98.0, 99.0,100.0,101.0,102.0}, - { - { 0., 4.00000, 8.00000, 12.0000, 16.0000, 19.9000, 23.3000, - 26.7000, 29.6000, 35.4000, 42.6000, 49.7000, 56.8000, 63.9000, - 71.0000, 78.1000, 85.2000, 92.2000, 99.3000, 106.300, 113.300, - 120.300, 127.300, 134.200, 141.100, 148.000, 161.700, 175.300, - 188.700, 201.900, 215.000, 228.000, 240.700, 253.200, 265.500, - 277.000, 287.400, 297.500, 307.400, 317.100, 326.800, 336.200, - 345.400, 354.500, 363.500, 372.500, 381.300, 390.100, 398.800, - 407.500, 416.100, 424.600, 433.000, 441.400, 449.800, 458.100, - 466.300, 474.500, 482.700, 490.800, 498.900, 506.800, 514.700, - 522.600, 530.300, 538.000, 545.600, 553.200, 560.700, 568.000, - 575.400, 582.600, 589.800, 596.800, 603.800, 610.700, 617.500, - 624.300, 630.900, 637.500, 644.000, 650.400, 656.800, 663.100, - 669.300, 675.400, 681.500, 687.500, 693.400, 699.200, 705.000, - 710.700, 716.300, 721.800, 727.300, 732.700, 738.000, 743.200, - 748.400, 753.500, 758.500, 763.500, 768.400, 773.200, 778.000, - 782.700, 787.300, 791.900, 796.500, 801.100, 805.700, 810.300, - 814.800, 819.300, 823.800, 828.400, 832.900, 837.400}, - - { 2.70000, 4.80000, 8.40000, 12.3000, 16.2000, 18.0000, 21.3000, - 24.5000, 27.8000, 33.5000, 40.7000, 47.8000, 54.9000, 62.0000, - 69.1000, 76.2000, 83.2000, 90.2000, 97.3000, 104.3000, 111.300, - 118.300, 125.300, 132.200, 139.100, 146.000, 159.700, 173.300, - 186.700, 199.900, 213.000, 225.800, 238.500, 251.000, 263.300, - 274.800, 285.200, 295.300, 305.200, 314.900, 324.600, 333.800, - 343.000, 352.100, 361.100, 370.100, 378.900, 387.700, 396.400, - 405.100, 413.700, 422.100, 430.500, 438.900, 447.300, 455.600, - 463.800, 472.000, 480.200, 488.300, 496.400, 504.300, 512.200, - 520.100, 527.800, 535.500, 543.100, 550.700, 558.200, 565.500, - 572.900, 580.100, 587.300, 594.300, 601.300, 608.200, 615.000, - 621.800, 628.400, 635.000, 641.500, 647.900, 654.300, 660.600, - 666.800, 672.900, 679.000, 685.000, 690.900, 696.700, 702.500, - 708.100, 713.700, 719.200, 724.700, 730.100, 735.400, 740.600, - 745.800, 750.900, 755.900, 760.900, 765.800, 770.600, 775.400, - 780.100, 784.700, 789.300, 793.900, 798.500, 803.100, 807.700, - 812.200, 816.700, 821.200, 825.800, 830.300, 834.800}, - - { 5.40000, 6.60000, 9.10000, 11.9000, 14.8000, 17.7000, 20.5000, - 23.4000, 26.3000, 32.0000, 39.1000, 46.3000, 53.4000, 60.5000, - 67.6000, 74.7000, 81.7000, 88.7000, 95.8000, 102.800, 109.800, - 116.700, 123.700, 130.600, 137.500, 144.400, 158.100, 171.600, - 185.000, 198.100, 211.200, 224.100, 236.700, 249.200, 261.500, - 272.500, 282.900, 292.900, 302.800, 312.500, 322.200, 331.600, - 340.800, 349.900, 358.800, 367.700, 376.600, 385.400, 394.100, - 402.700, 411.300, 419.800, 428.200, 436.600, 444.900, 453.200, - 461.500, 469.700, 477.900, 486.000, 494.000, 502.000, 509.800, - 517.700, 525.400, 533.100, 540.700, 548.200, 555.700, 563.100, - 570.400, 577.600, 584.800, 591.800, 598.800, 605.700, 612.500, - 619.200, 625.900, 632.400, 638.900, 645.300, 651.600, 657.900, - 664.100, 670.200, 676.300, 682.200, 688.200, 694.000, 699.800, - 705.500, 711.200, 716.700, 722.200, 727.600, 732.900, 738.100, - 743.200, 748.300, 753.300, 758.200, 763.100, 767.900, 772.700, - 777.400, 782.100, 786.700, 791.300, 795.800, 800.400, 804.900, - 809.500, 814.000, 818.500, 823.100, 827.600, 832.100 }, - - {13.5000, 13.8000, 14.8000, 16.4000, 18.3000, 20.4000, 22.9000, - 25.4000, 27.3000, 32.9000, 39.8000, 46.7000, 53.6000, 60.4000, - 67.2000, 74.1000, 80.9000, 87.7000, 94.6000, 101.600, 108.400, - 115.200, 122.000, 128.700, 135.500, 142.200, 155.600, 168.900, - 182.100, 195.000, 207.900, 220.500, 232.900, 245.200, 256.500, - 267.100, 277.300, 287.200, 296.900, 306.500, 316.200, 325.500, - 334.700, 343.800, 352.700, 361.600, 370.400, 379.100, 387.800, - 396.400, 404.900, 413.400, 421.800, 430.100, 438.400, 446.700, - 454.900, 463.100, 471.300, 479.400, 487.400, 495.300, 503.200, - 511.000, 518.700, 526.400, 534.000, 541.500, 549.000, 556.300, - 563.600, 570.800, 577.900, 584.900, 591.800, 598.700, 605.500, - 612.200, 618.900, 625.400, 631.900, 638.300, 644.600, 650.800, - 657.000, 663.100, 669.100, 675.100, 680.900, 686.800, 692.500, - 698.200, 703.800, 709.300, 714.800, 720.200, 725.500, 730.700, - 735.800, 740.800, 745.800, 750.700, 755.600, 760.400, 765.100, - 769.800, 774.500, 779.100, 783.700, 788.200, 792.800, 797.300, - 801.900, 806.400, 811.000, 815.500, 820.000, 824.400}, - - {21.4000, 21.6000, 22.1000, 23.1000, 24.3000, 25.8000, 27.6000, - 29.6000, 32.0000, 36.0000, 42.1000, 48.4000, 54.8000, 61.3000, - 67.8000, 74.4000, 81.0000, 87.6000, 94.3000, 101.000, 107.700, - 114.300, 120.900, 127.500, 134.100, 140.600, 153.700, 166.700, - 179.600, 192.300, 204.900, 217.300, 229.500, 241.100, 251.600, - 261.900, 271.900, 281.700, 291.400, 301.000, 310.400, 319.700, - 328.800, 337.900, 346.800, 355.700, 364.500, 373.200, 381.800, - 390.300, 398.800, 407.200, 415.600, 424.000, 432.300, 440.500, - 448.700, 456.900, 465.000, 473.000, 481.000, 488.900, 496.700, - 504.500, 512.200, 519.800, 527.400, 534.900, 542.300, 549.600, - 556.900, 564.100, 571.100, 578.100, 585.100, 591.900, 598.700, - 605.400, 612.000, 618.500, 625.000, 631.400, 637.700, 643.900, - 650.000, 656.100, 662.100, 668.000, 673.900, 679.700, 685.400, - 691.000, 696.600, 702.100, 707.500, 712.900, 718.200, 723.400, - 728.500, 733.500, 738.500, 743.400, 748.200, 753.000, 757.700, - 762.400, 767.100, 771.700, 776.300, 780.800, 785.400, 789.900, - 794.500, 799.000, 803.600, 808.100, 812.600, 817.000}, - - {29.1000, 29.5000, 29.8000, 30.3000, 31.2000, 32.3000, 33.7000, - 35.1000, 37.0000, 40.6000, 45.7000, 51.3000, 57.1000, 63.2000, - 69.4000, 75.6000, 82.0000, 88.3000, 94.7000, 101.100, 107.500, - 114.000, 120.500, 126.900, 133.300, 139.700, 152.500, 165.100, - 177.600, 190.000, 202.300, 214.400, 226.000, 236.500, 246.700, - 256.900, 266.800, 276.500, 286.200, 295.600, 304.900, 314.100, - 323.200, 332.200, 341.100, 349.900, 358.600, 367.300, 375.900, - 384.400, 392.900, 401.300, 409.700, 418.000, 426.300, 434.500, - 442.700, 450.800, 458.900, 466.900, 474.800, 482.700, 490.400, - 498.200, 505.800, 513.400, 520.900, 528.300, 535.700, 543.000, - 550.200, 557.300, 564.400, 571.400, 578.300, 585.100, 591.800, - 598.500, 605.100, 611.600, 618.000, 624.400, 630.700, 636.900, - 643.000, 649.100, 655.100, 661.100, 667.000, 672.800, 678.500, - 684.100, 689.600, 695.100, 700.500, 705.800, 711.100, 716.200, - 721.400, 726.400, 731.400, 736.300, 741.100, 745.800, 750.500, - 755.200, 759.800, 764.500, 769.100, 773.600, 778.200, 782.700, - 787.300, 791.800, 796.400, 800.900, 805.400, 809.800}, - - {36.6000, 37.0000, 37.2000, 37.5000, 38.1000, 39.1000, 40.3000, - 41.6000, 43.2000, 45.8000, 50.3000, 55.2000, 60.4000, 66.0000, - 71.7000, 77.5000, 83.5000, 89.5000, 95.6000, 101.800, 108.000, - 114.200, 120.400, 126.600, 132.800, 139.000, 151.400, 163.800, - 176.000, 188.100, 200.100, 211.300, 221.900, 232.200, 242.300, - 252.200, 262.000, 271.700, 281.200, 290.500, 299.600, 308.700, - 317.800, 326.800, 335.600, 344.400, 353.100, 361.700, 370.300, - 378.800, 387.200, 395.600, 404.000, 412.300, 420.500, 428.700, - 436.900, 445.000, 453.000, 461.000, 468.900, 476.700, 484.500, - 492.200, 499.800, 507.300, 514.700, 522.100, 529.400, 536.600, - 543.800, 550.900, 557.900, 564.900, 571.800, 578.600, 585.300, - 591.900, 598.400, 604.900, 611.300, 617.600, 623.900, 630.100, - 636.200, 642.300, 648.300, 654.300, 660.200, 666.000, 671.700, - 677.300, 682.800, 688.300, 693.600, 698.900, 704.100, 709.300, - 714.400, 719.400, 724.400, 729.300, 734.100, 738.800, 743.500, - 748.200, 752.800, 757.500, 762.100, 766.600, 771.200, 775.700, - 780.300, 784.800, 789.400, 793.900, 798.400, 802.800}, - - {43.9000, 44.0000, 44.2000, 44.5000, 45.1000, 45.9000, 46.7000, - 47.9000, 49.2000, 51.6000, 55.4000, 59.7000, 64.4000, 69.4000, - 74.7000, 80.1000, 85.7000, 91.4000, 97.2000, 103.100, 109.000, - 114.900, 120.800, 126.800, 132.800, 138.800, 150.800, 162.800, - 174.700, 186.300, 197.000, 207.600, 218.000, 228.100, 238.100, - 247.900, 257.600, 267.200, 276.500, 285.700, 294.700, 303.800, - 312.800, 321.700, 330.500, 339.200, 347.800, 356.400, 364.900, - 373.400, 381.800, 390.200, 398.500, 406.800, 415.000, 423.200, - 431.300, 439.400, 447.400, 455.400, 463.300, 471.100, 478.800, - 486.500, 494.100, 501.600, 509.000, 516.400, 523.700, 530.900, - 538.000, 545.100, 552.000, 558.900, 565.800, 572.500, 579.100, - 585.700, 592.200, 598.600, 605.000, 611.300, 617.600, 623.700, - 629.800, 635.900, 641.900, 647.800, 653.700, 659.500, 665.200, - 670.800, 676.300, 681.700, 687.000, 692.300, 697.500, 702.700, - 707.700, 712.800, 717.700, 722.500, 727.300, 732.100, 736.700, - 741.400, 746.000, 750.700, 755.300, 759.800, 764.400, 769.000, - 773.500, 778.000, 782.600, 787.100, 791.500, 795.900}, - - {51.1000, 51.1000, 51.3000, 51.5000, 52.0000, 52.7000, 53.6000, - 54.4000, 55.5000, 57.6000, 60.9000, 64.6000, 68.9000, 73.4000, - 78.2000, 83.3000, 88.4000, 93.7000, 99.2000, 104.800, 110.400, - 116.100, 121.800, 127.500, 133.200, 139.000, 150.600, 161.800, - 172.900, 183.600, 194.000, 204.100, 214.200, 224.300, 234.100, - 243.800, 253.400, 262.000, 272.000, 281.100, 290.100, 299.100, - 308.000, 316.800, 325.500, 334.200, 342.800, 351.400, 359.900, - 368.400, 376.800, 385.200, 393.500, 401.700, 409.900, 418.100, - 426.200, 434.200, 442.200, 450.100, 458.000, 465.800, 473.500, - 481.100, 488.700, 496.200, 503.600, 511.000, 518.300, 525.500, - 532.600, 539.600, 546.500, 553.300, 560.000, 566.700, 573.300, - 579.900, 586.400, 592.800, 599.200, 605.500, 611.700, 617.800, - 623.900, 629.900, 635.800, 641.700, 647.500, 653.200, 658.800, - 664.400, 669.900, 675.300, 680.600, 685.900, 691.100, 696.200, - 701.300, 706.300, 711.200, 716.000, 720.800, 725.500, 730.200, - 734.800, 739.400, 744.100, 748.700, 753.200, 757.800, 762.400, - 766.900, 771.500, 776.000, 780.400, 784.800, 789.200}, - - {58.0000, 58.0000, 58.2000, 58.4000, 58.7000, 59.3000, 59.8000, - 60.5000, 61.6000, 63.4000, 66.3000, 69.7000, 73.4000, 77.5000, - 81.9000, 86.5000, 91.3000, 96.3000, 101.400, 106.500, 111.800, - 117.100, 122.500, 127.900, 133.300, 138.600, 149.300, 159.900, - 170.500, 180.900, 191.100, 201.200, 211.200, 221.100, 230.800, - 240.300, 249.700, 259.000, 268.100, 277.100, 286.100, 295.000, - 303.900, 312.600, 321.400, 330.000, 338.600, 347.100, 355.500, - 363.900, 372.300, 380.600, 388.900, 397.100, 405.300, 413.400, - 421.500, 429.500, 437.400, 445.300, 453.100, 460.800, 468.500, - 476.100, 483.600, 491.100, 498.500, 505.800, 513.000, 520.100, - 527.200, 534.200, 541.000, 547.800, 554.500, 561.200, 567.800, - 574.400, 580.900, 587.300, 593.600, 599.800, 606.000, 612.100, - 618.100, 624.100, 630.000, 635.800, 641.600, 647.300, 652.900, - 658.400, 663.900, 669.300, 674.600, 679.800, 685.000, 690.100, - 695.100, 700.100, 705.000, 709.800, 714.600, 719.300, 724.000, - 728.600, 733.200, 737.800, 742.400, 747.000, 751.500, 756.000, - 760.600, 765.100, 769.600, 774.100, 778.500, 782.900}, - - {64.5000, 64.5000, 64.7000, 64.9000, 65.2000, 65.7000, 66.1000, - 66.7000, 67.6000, 69.2000, 71.8000, 74.8000, 78.1000, 81.7000, - 85.7000, 89.9000, 94.3000, 98.9000, 103.600, 108.400, 113.300, - 118.300, 123.300, 128.400, 133.500, 138.600, 148.800, 158.900, - 169.100, 179.200, 189.200, 199.000, 208.700, 218.400, 227.900, - 237.300, 246.500, 255.700, 264.700, 273.700, 282.600, 291.400, - 300.200, 309.000, 317.600, 326.200, 334.700, 343.200, 351.600, - 360.000, 368.300, 376.600, 384.800, 392.900, 401.000, 409.100, - 417.100, 425.100, 433.000, 440.800, 448.600, 456.300, 463.900, - 471.500, 479.000, 486.400, 493.700, 501.000, 508.100, 515.200, - 522.200, 529.100, 536.000, 542.800, 549.500, 556.100, 562.700, - 569.200, 575.600, 582.000, 588.300, 594.500, 600.700, 606.800, - 612.800, 618.700, 624.600, 630.400, 636.100, 641.700, 647.300, - 652.800, 658.200, 663.600, 668.900, 674.100, 679.300, 684.300, - 689.400, 694.300, 699.200, 704.000, 708.700, 713.400, 718.100, - 722.700, 727.300, 731.900, 736.500, 741.100, 745.600, 750.100, - 754.700, 759.200, 763.700, 768.200, 772.600, 777.000}, - - {70.8000, 70.8000, 71.0000, 71.2000, 71.6000, 72.0000, 72.3000, - 72.9000, 73.6000, 74.8000, 77.1000, 79.8000, 82.8000, 86.2000, - 89.7000, 93.5000, 97.6000, 101.800, 106.100, 110.600, 115.200, - 119.800, 124.500, 129.300, 134.100, 138.900, 148.700, 158.600, - 168.500, 178.200, 187.900, 197.500, 206.900, 216.300, 225.600, - 234.800, 243.900, 253.000, 261.900, 270.800, 279.600, 288.400, - 297.100, 305.700, 314.300, 322.800, 331.300, 339.700, 348.100, - 356.400, 364.700, 372.900, 381.100, 389.300, 397.400, 405.400, - 413.400, 421.300, 429.100, 436.900, 444.600, 452.200, 459.800, - 467.300, 474.800, 482.100, 489.400, 496.500, 503.600, 510.600, - 517.600, 524.500, 531.300, 538.100, 544.800, 551.400, 557.900, - 564.400, 570.800, 577.100, 583.400, 589.600, 595.700, 601.700, - 607.700, 613.600, 619.400, 625.200, 630.900, 636.500, 642.100, - 647.600, 653.000, 658.300, 663.600, 668.800, 673.900, 679.000, - 684.000, 688.900, 693.800, 698.600, 703.300, 708.000, 712.700, - 717.300, 721.900, 726.400, 731.000, 735.500, 740.000, 744.500, - 749.000, 753.500, 758.000, 762.600, 767.000, 771.400}, - - {76.8000, 76.8000, 77.0000, 77.2000, 77.5000, 78.0000, 78.4000, - 78.9000, 79.5000, 80.3000, 82.3000, 84.7000, 87.5000, 90.6000, - 93.7000, 97.3000, 100.900, 104.800, 108.900, 113.100, 117.400, - 121.700, 126.200, 130.700, 135.300, 139.900, 149.100, 158.600, - 168.100, 177.600, 187.100, 196.400, 205.500, 214.700, 223.800, - 232.800, 241.800, 250.800, 259.600, 268.400, 277.100, 285.800, - 294.400, 302.900, 311.400, 319.900, 328.300, 336.700, 345.000, - 353.300, 361.500, 369.700, 377.900, 386.000, 394.000, 402.000, - 409.900, 417.800, 425.500, 433.300, 440.900, 448.500, 456.000, - 463.400, 470.800, 478.100, 485.300, 492.400, 499.500, 506.500, - 513.400, 520.200, 527.000, 533.700, 540.300, 546.900, 553.400, - 559.800, 566.200, 572.500, 578.700, 584.900, 590.900, 597.000, - 602.900, 608.800, 614.600, 620.300, 626.000, 631.600, 637.100, - 642.600, 647.900, 653.300, 658.500, 663.700, 668.800, 673.900, - 678.800, 683.800, 688.600, 693.300, 698.000, 702.700, 707.300, - 711.900, 716.500, 721.100, 725.700, 730.300, 734.800, 739.300, - 743.800, 748.300, 752.800, 757.300, 761.700, 766.100}, - - {82.8000, 82.8000, 83.0000, 83.1000, 83.2000, 83.6000, 84.0000, - 84.4000, 85.0000, 85.9000, 87.7000, 89.8000, 92.3000, 95.1000, - 98.3000, 101.400, 104.800, 108.200, 112.000, 115.900, 119.900, - 124.000, 128.200, 132.500, 136.800, 141.200, 150.000, 159.000, - 168.100, 177.200, 186.400, 195.500, 204.500, 213.500, 222.500, - 231.300, 240.200, 249.000, 257.700, 266.400, 275.000, 283.600, - 292.100, 300.600, 309.000, 317.400, 325.700, 334.100, 342.300, - 350.500, 358.700, 366.800, 374.900, 383.000, 391.000, 398.900, - 406.700, 414.500, 422.200, 429.800, 437.400, 444.900, 452.400, - 459.800, 467.100, 474.400, 481.600, 488.600, 495.600, 502.600, - 509.400, 516.200, 522.900, 529.500, 536.100, 542.600, 549.000, - 555.400, 561.800, 568.000, 574.200, 580.300, 586.400, 592.400, - 598.300, 604.200, 610.000, 615.700, 621.300, 626.800, 632.300, - 637.700, 643.100, 648.300, 653.600, 658.700, 663.800, 668.800, - 673.700, 678.600, 683.400, 688.100, 692.800, 697.500, 702.100, - 706.700, 711.300, 715.900, 720.500, 725.100, 729.600, 734.100, - 738.600, 743.100, 747.600, 752.100, 756.500, 760.900}, - - {88.8000, 88.8000, 89.0000, 89.1000, 89.2000, 89.4000, 89.7000, - 90.1000, 90.6000, 91.5000, 93.0000, 94.9000, 97.2000, 99.7000, - 102.400, 105.400, 108.600, 111.900, 115.300, 118.900, 122.600, - 126.500, 130.500, 134.500, 138.600, 142.700, 151.200, 159.800, - 168.500, 177.300, 186.200, 195.100, 204.000, 212.800, 221.600, - 230.300, 239.000, 247.700, 256.300, 264.900, 273.400, 281.900, - 290.300, 298.700, 307.100, 315.400, 323.700, 331.900, 340.100, - 348.200, 356.300, 364.400, 372.400, 380.400, 388.300, 396.100, - 403.800, 411.500, 419.100, 426.700, 434.200, 441.700, 449.100, - 456.400, 463.700, 470.900, 478.000, 485.000, 491.900, 498.800, - 505.600, 512.300, 519.000, 525.600, 532.100, 538.600, 545.000, - 551.400, 557.600, 563.900, 570.000, 576.100, 582.100, 588.000, - 593.900, 599.700, 605.400, 611.100, 616.600, 622.200, 627.600, - 633.000, 638.300, 643.500, 648.700, 653.800, 658.800, 663.800, - 668.700, 673.600, 678.400, 683.100, 687.800, 692.400, 697.000, - 701.600, 706.200, 710.800, 715.300, 719.900, 724.400, 728.900, - 733.500, 738.000, 742.500, 747.000, 751.400, 755.800} - } + JB_NL , + {0.0 , 15.0, 15.0, 33.0, 33.0, 100.0, 200.0, 300.0, 413.0, 600.0, 800.0}, + {5.57, 5.57, 6.50, 6.50, 7.75, 7.95, 8.26, 8.58, 8.97, 10.25, 11.00}, + {3.36, 3.36, 3.74, 3.74, 4.35, 4.45, 4.60, 4.76, 4.96, 5.66, 6.13 }, + {2.65, 2.65, 2.87, 2.87, 3.32, 3.38, 3.47, 3.55, 3.64, 4.13, 4.49 }, + JB_NH , + {0.0, 15.0, 33.0, 96.0, 160.0, 223.0, 287.0, + 350.0, 413.0, 477.0, 540.0, 603.0, 667.0, 730.0, + 793.0}, + JB_ND , + {0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, + 2.0, 2.5, 3.0, 3.5, 4.0, 4.5, 5.0, 5.5, 6.0, 6.5, + 7.0, 7.5, 8.0, 8.5, 9.0, 9.5, 10.0, 11.0, 12.0, 13.0, + 14.0, 15.0, 16.0, 17.0, 18.0, 19.0, 20.0, 21.0, 22.0, 23.0, + 24.0, 25.0, 26.0, 27.0, 28.0, 29.0, 30.0, 31.0, 32.0, 33.0, + 34.0, 35.0, 36.0, 37.0, 38.0, 39.0, 40.0, 41.0, 42.0, 43.0, + 44.0, 45.0, 46.0, 47.0, 48.0, 49.0, 50.0, 51.0, 52.0, 53.0, + 54.0, 55.0, 56.0, 57.0, 58.0, 59.0, 60.0, 61.0, 62.0, 63.0, + 64.0, 65.0, 66.0, 67.0, 68.0, 69.0, 70.0, 71.0, 72.0, 73.0, + 74.0, 75.0, 76.0, 77.0, 78.0, 79.0, 80.0, 81.0, 82.0, 83.0, + 84.0, 85.0, 86.0, 87.0, 88.0, 89.0, 90.0, 91.0, 92.0, 93.0, + 94.0, 95.0, 96.0, 97.0, 98.0, 99.0,100.0,101.0,102.0}, + { + { 0., 4.00000, 8.00000, 12.0000, 16.0000, 19.9000, 23.3000, + 26.7000, 29.6000, 35.4000, 42.6000, 49.7000, 56.8000, 63.9000, + 71.0000, 78.1000, 85.2000, 92.2000, 99.3000, 106.300, 113.300, + 120.300, 127.300, 134.200, 141.100, 148.000, 161.700, 175.300, + 188.700, 201.900, 215.000, 228.000, 240.700, 253.200, 265.500, + 277.000, 287.400, 297.500, 307.400, 317.100, 326.800, 336.200, + 345.400, 354.500, 363.500, 372.500, 381.300, 390.100, 398.800, + 407.500, 416.100, 424.600, 433.000, 441.400, 449.800, 458.100, + 466.300, 474.500, 482.700, 490.800, 498.900, 506.800, 514.700, + 522.600, 530.300, 538.000, 545.600, 553.200, 560.700, 568.000, + 575.400, 582.600, 589.800, 596.800, 603.800, 610.700, 617.500, + 624.300, 630.900, 637.500, 644.000, 650.400, 656.800, 663.100, + 669.300, 675.400, 681.500, 687.500, 693.400, 699.200, 705.000, + 710.700, 716.300, 721.800, 727.300, 732.700, 738.000, 743.200, + 748.400, 753.500, 758.500, 763.500, 768.400, 773.200, 778.000, + 782.700, 787.300, 791.900, 796.500, 801.100, 805.700, 810.300, + 814.800, 819.300, 823.800, 828.400, 832.900, 837.400}, + + { 2.70000, 4.80000, 8.40000, 12.3000, 16.2000, 18.0000, 21.3000, + 24.5000, 27.8000, 33.5000, 40.7000, 47.8000, 54.9000, 62.0000, + 69.1000, 76.2000, 83.2000, 90.2000, 97.3000, 104.3000, 111.300, + 118.300, 125.300, 132.200, 139.100, 146.000, 159.700, 173.300, + 186.700, 199.900, 213.000, 225.800, 238.500, 251.000, 263.300, + 274.800, 285.200, 295.300, 305.200, 314.900, 324.600, 333.800, + 343.000, 352.100, 361.100, 370.100, 378.900, 387.700, 396.400, + 405.100, 413.700, 422.100, 430.500, 438.900, 447.300, 455.600, + 463.800, 472.000, 480.200, 488.300, 496.400, 504.300, 512.200, + 520.100, 527.800, 535.500, 543.100, 550.700, 558.200, 565.500, + 572.900, 580.100, 587.300, 594.300, 601.300, 608.200, 615.000, + 621.800, 628.400, 635.000, 641.500, 647.900, 654.300, 660.600, + 666.800, 672.900, 679.000, 685.000, 690.900, 696.700, 702.500, + 708.100, 713.700, 719.200, 724.700, 730.100, 735.400, 740.600, + 745.800, 750.900, 755.900, 760.900, 765.800, 770.600, 775.400, + 780.100, 784.700, 789.300, 793.900, 798.500, 803.100, 807.700, + 812.200, 816.700, 821.200, 825.800, 830.300, 834.800}, + + { 5.40000, 6.60000, 9.10000, 11.9000, 14.8000, 17.7000, 20.5000, + 23.4000, 26.3000, 32.0000, 39.1000, 46.3000, 53.4000, 60.5000, + 67.6000, 74.7000, 81.7000, 88.7000, 95.8000, 102.800, 109.800, + 116.700, 123.700, 130.600, 137.500, 144.400, 158.100, 171.600, + 185.000, 198.100, 211.200, 224.100, 236.700, 249.200, 261.500, + 272.500, 282.900, 292.900, 302.800, 312.500, 322.200, 331.600, + 340.800, 349.900, 358.800, 367.700, 376.600, 385.400, 394.100, + 402.700, 411.300, 419.800, 428.200, 436.600, 444.900, 453.200, + 461.500, 469.700, 477.900, 486.000, 494.000, 502.000, 509.800, + 517.700, 525.400, 533.100, 540.700, 548.200, 555.700, 563.100, + 570.400, 577.600, 584.800, 591.800, 598.800, 605.700, 612.500, + 619.200, 625.900, 632.400, 638.900, 645.300, 651.600, 657.900, + 664.100, 670.200, 676.300, 682.200, 688.200, 694.000, 699.800, + 705.500, 711.200, 716.700, 722.200, 727.600, 732.900, 738.100, + 743.200, 748.300, 753.300, 758.200, 763.100, 767.900, 772.700, + 777.400, 782.100, 786.700, 791.300, 795.800, 800.400, 804.900, + 809.500, 814.000, 818.500, 823.100, 827.600, 832.100 }, + + {13.5000, 13.8000, 14.8000, 16.4000, 18.3000, 20.4000, 22.9000, + 25.4000, 27.3000, 32.9000, 39.8000, 46.7000, 53.6000, 60.4000, + 67.2000, 74.1000, 80.9000, 87.7000, 94.6000, 101.600, 108.400, + 115.200, 122.000, 128.700, 135.500, 142.200, 155.600, 168.900, + 182.100, 195.000, 207.900, 220.500, 232.900, 245.200, 256.500, + 267.100, 277.300, 287.200, 296.900, 306.500, 316.200, 325.500, + 334.700, 343.800, 352.700, 361.600, 370.400, 379.100, 387.800, + 396.400, 404.900, 413.400, 421.800, 430.100, 438.400, 446.700, + 454.900, 463.100, 471.300, 479.400, 487.400, 495.300, 503.200, + 511.000, 518.700, 526.400, 534.000, 541.500, 549.000, 556.300, + 563.600, 570.800, 577.900, 584.900, 591.800, 598.700, 605.500, + 612.200, 618.900, 625.400, 631.900, 638.300, 644.600, 650.800, + 657.000, 663.100, 669.100, 675.100, 680.900, 686.800, 692.500, + 698.200, 703.800, 709.300, 714.800, 720.200, 725.500, 730.700, + 735.800, 740.800, 745.800, 750.700, 755.600, 760.400, 765.100, + 769.800, 774.500, 779.100, 783.700, 788.200, 792.800, 797.300, + 801.900, 806.400, 811.000, 815.500, 820.000, 824.400}, + + {21.4000, 21.6000, 22.1000, 23.1000, 24.3000, 25.8000, 27.6000, + 29.6000, 32.0000, 36.0000, 42.1000, 48.4000, 54.8000, 61.3000, + 67.8000, 74.4000, 81.0000, 87.6000, 94.3000, 101.000, 107.700, + 114.300, 120.900, 127.500, 134.100, 140.600, 153.700, 166.700, + 179.600, 192.300, 204.900, 217.300, 229.500, 241.100, 251.600, + 261.900, 271.900, 281.700, 291.400, 301.000, 310.400, 319.700, + 328.800, 337.900, 346.800, 355.700, 364.500, 373.200, 381.800, + 390.300, 398.800, 407.200, 415.600, 424.000, 432.300, 440.500, + 448.700, 456.900, 465.000, 473.000, 481.000, 488.900, 496.700, + 504.500, 512.200, 519.800, 527.400, 534.900, 542.300, 549.600, + 556.900, 564.100, 571.100, 578.100, 585.100, 591.900, 598.700, + 605.400, 612.000, 618.500, 625.000, 631.400, 637.700, 643.900, + 650.000, 656.100, 662.100, 668.000, 673.900, 679.700, 685.400, + 691.000, 696.600, 702.100, 707.500, 712.900, 718.200, 723.400, + 728.500, 733.500, 738.500, 743.400, 748.200, 753.000, 757.700, + 762.400, 767.100, 771.700, 776.300, 780.800, 785.400, 789.900, + 794.500, 799.000, 803.600, 808.100, 812.600, 817.000}, + + {29.1000, 29.5000, 29.8000, 30.3000, 31.2000, 32.3000, 33.7000, + 35.1000, 37.0000, 40.6000, 45.7000, 51.3000, 57.1000, 63.2000, + 69.4000, 75.6000, 82.0000, 88.3000, 94.7000, 101.100, 107.500, + 114.000, 120.500, 126.900, 133.300, 139.700, 152.500, 165.100, + 177.600, 190.000, 202.300, 214.400, 226.000, 236.500, 246.700, + 256.900, 266.800, 276.500, 286.200, 295.600, 304.900, 314.100, + 323.200, 332.200, 341.100, 349.900, 358.600, 367.300, 375.900, + 384.400, 392.900, 401.300, 409.700, 418.000, 426.300, 434.500, + 442.700, 450.800, 458.900, 466.900, 474.800, 482.700, 490.400, + 498.200, 505.800, 513.400, 520.900, 528.300, 535.700, 543.000, + 550.200, 557.300, 564.400, 571.400, 578.300, 585.100, 591.800, + 598.500, 605.100, 611.600, 618.000, 624.400, 630.700, 636.900, + 643.000, 649.100, 655.100, 661.100, 667.000, 672.800, 678.500, + 684.100, 689.600, 695.100, 700.500, 705.800, 711.100, 716.200, + 721.400, 726.400, 731.400, 736.300, 741.100, 745.800, 750.500, + 755.200, 759.800, 764.500, 769.100, 773.600, 778.200, 782.700, + 787.300, 791.800, 796.400, 800.900, 805.400, 809.800}, + + {36.6000, 37.0000, 37.2000, 37.5000, 38.1000, 39.1000, 40.3000, + 41.6000, 43.2000, 45.8000, 50.3000, 55.2000, 60.4000, 66.0000, + 71.7000, 77.5000, 83.5000, 89.5000, 95.6000, 101.800, 108.000, + 114.200, 120.400, 126.600, 132.800, 139.000, 151.400, 163.800, + 176.000, 188.100, 200.100, 211.300, 221.900, 232.200, 242.300, + 252.200, 262.000, 271.700, 281.200, 290.500, 299.600, 308.700, + 317.800, 326.800, 335.600, 344.400, 353.100, 361.700, 370.300, + 378.800, 387.200, 395.600, 404.000, 412.300, 420.500, 428.700, + 436.900, 445.000, 453.000, 461.000, 468.900, 476.700, 484.500, + 492.200, 499.800, 507.300, 514.700, 522.100, 529.400, 536.600, + 543.800, 550.900, 557.900, 564.900, 571.800, 578.600, 585.300, + 591.900, 598.400, 604.900, 611.300, 617.600, 623.900, 630.100, + 636.200, 642.300, 648.300, 654.300, 660.200, 666.000, 671.700, + 677.300, 682.800, 688.300, 693.600, 698.900, 704.100, 709.300, + 714.400, 719.400, 724.400, 729.300, 734.100, 738.800, 743.500, + 748.200, 752.800, 757.500, 762.100, 766.600, 771.200, 775.700, + 780.300, 784.800, 789.400, 793.900, 798.400, 802.800}, + + {43.9000, 44.0000, 44.2000, 44.5000, 45.1000, 45.9000, 46.7000, + 47.9000, 49.2000, 51.6000, 55.4000, 59.7000, 64.4000, 69.4000, + 74.7000, 80.1000, 85.7000, 91.4000, 97.2000, 103.100, 109.000, + 114.900, 120.800, 126.800, 132.800, 138.800, 150.800, 162.800, + 174.700, 186.300, 197.000, 207.600, 218.000, 228.100, 238.100, + 247.900, 257.600, 267.200, 276.500, 285.700, 294.700, 303.800, + 312.800, 321.700, 330.500, 339.200, 347.800, 356.400, 364.900, + 373.400, 381.800, 390.200, 398.500, 406.800, 415.000, 423.200, + 431.300, 439.400, 447.400, 455.400, 463.300, 471.100, 478.800, + 486.500, 494.100, 501.600, 509.000, 516.400, 523.700, 530.900, + 538.000, 545.100, 552.000, 558.900, 565.800, 572.500, 579.100, + 585.700, 592.200, 598.600, 605.000, 611.300, 617.600, 623.700, + 629.800, 635.900, 641.900, 647.800, 653.700, 659.500, 665.200, + 670.800, 676.300, 681.700, 687.000, 692.300, 697.500, 702.700, + 707.700, 712.800, 717.700, 722.500, 727.300, 732.100, 736.700, + 741.400, 746.000, 750.700, 755.300, 759.800, 764.400, 769.000, + 773.500, 778.000, 782.600, 787.100, 791.500, 795.900}, + + {51.1000, 51.1000, 51.3000, 51.5000, 52.0000, 52.7000, 53.6000, + 54.4000, 55.5000, 57.6000, 60.9000, 64.6000, 68.9000, 73.4000, + 78.2000, 83.3000, 88.4000, 93.7000, 99.2000, 104.800, 110.400, + 116.100, 121.800, 127.500, 133.200, 139.000, 150.600, 161.800, + 172.900, 183.600, 194.000, 204.100, 214.200, 224.300, 234.100, + 243.800, 253.400, 262.000, 272.000, 281.100, 290.100, 299.100, + 308.000, 316.800, 325.500, 334.200, 342.800, 351.400, 359.900, + 368.400, 376.800, 385.200, 393.500, 401.700, 409.900, 418.100, + 426.200, 434.200, 442.200, 450.100, 458.000, 465.800, 473.500, + 481.100, 488.700, 496.200, 503.600, 511.000, 518.300, 525.500, + 532.600, 539.600, 546.500, 553.300, 560.000, 566.700, 573.300, + 579.900, 586.400, 592.800, 599.200, 605.500, 611.700, 617.800, + 623.900, 629.900, 635.800, 641.700, 647.500, 653.200, 658.800, + 664.400, 669.900, 675.300, 680.600, 685.900, 691.100, 696.200, + 701.300, 706.300, 711.200, 716.000, 720.800, 725.500, 730.200, + 734.800, 739.400, 744.100, 748.700, 753.200, 757.800, 762.400, + 766.900, 771.500, 776.000, 780.400, 784.800, 789.200}, + + {58.0000, 58.0000, 58.2000, 58.4000, 58.7000, 59.3000, 59.8000, + 60.5000, 61.6000, 63.4000, 66.3000, 69.7000, 73.4000, 77.5000, + 81.9000, 86.5000, 91.3000, 96.3000, 101.400, 106.500, 111.800, + 117.100, 122.500, 127.900, 133.300, 138.600, 149.300, 159.900, + 170.500, 180.900, 191.100, 201.200, 211.200, 221.100, 230.800, + 240.300, 249.700, 259.000, 268.100, 277.100, 286.100, 295.000, + 303.900, 312.600, 321.400, 330.000, 338.600, 347.100, 355.500, + 363.900, 372.300, 380.600, 388.900, 397.100, 405.300, 413.400, + 421.500, 429.500, 437.400, 445.300, 453.100, 460.800, 468.500, + 476.100, 483.600, 491.100, 498.500, 505.800, 513.000, 520.100, + 527.200, 534.200, 541.000, 547.800, 554.500, 561.200, 567.800, + 574.400, 580.900, 587.300, 593.600, 599.800, 606.000, 612.100, + 618.100, 624.100, 630.000, 635.800, 641.600, 647.300, 652.900, + 658.400, 663.900, 669.300, 674.600, 679.800, 685.000, 690.100, + 695.100, 700.100, 705.000, 709.800, 714.600, 719.300, 724.000, + 728.600, 733.200, 737.800, 742.400, 747.000, 751.500, 756.000, + 760.600, 765.100, 769.600, 774.100, 778.500, 782.900}, + + {64.5000, 64.5000, 64.7000, 64.9000, 65.2000, 65.7000, 66.1000, + 66.7000, 67.6000, 69.2000, 71.8000, 74.8000, 78.1000, 81.7000, + 85.7000, 89.9000, 94.3000, 98.9000, 103.600, 108.400, 113.300, + 118.300, 123.300, 128.400, 133.500, 138.600, 148.800, 158.900, + 169.100, 179.200, 189.200, 199.000, 208.700, 218.400, 227.900, + 237.300, 246.500, 255.700, 264.700, 273.700, 282.600, 291.400, + 300.200, 309.000, 317.600, 326.200, 334.700, 343.200, 351.600, + 360.000, 368.300, 376.600, 384.800, 392.900, 401.000, 409.100, + 417.100, 425.100, 433.000, 440.800, 448.600, 456.300, 463.900, + 471.500, 479.000, 486.400, 493.700, 501.000, 508.100, 515.200, + 522.200, 529.100, 536.000, 542.800, 549.500, 556.100, 562.700, + 569.200, 575.600, 582.000, 588.300, 594.500, 600.700, 606.800, + 612.800, 618.700, 624.600, 630.400, 636.100, 641.700, 647.300, + 652.800, 658.200, 663.600, 668.900, 674.100, 679.300, 684.300, + 689.400, 694.300, 699.200, 704.000, 708.700, 713.400, 718.100, + 722.700, 727.300, 731.900, 736.500, 741.100, 745.600, 750.100, + 754.700, 759.200, 763.700, 768.200, 772.600, 777.000}, + + {70.8000, 70.8000, 71.0000, 71.2000, 71.6000, 72.0000, 72.3000, + 72.9000, 73.6000, 74.8000, 77.1000, 79.8000, 82.8000, 86.2000, + 89.7000, 93.5000, 97.6000, 101.800, 106.100, 110.600, 115.200, + 119.800, 124.500, 129.300, 134.100, 138.900, 148.700, 158.600, + 168.500, 178.200, 187.900, 197.500, 206.900, 216.300, 225.600, + 234.800, 243.900, 253.000, 261.900, 270.800, 279.600, 288.400, + 297.100, 305.700, 314.300, 322.800, 331.300, 339.700, 348.100, + 356.400, 364.700, 372.900, 381.100, 389.300, 397.400, 405.400, + 413.400, 421.300, 429.100, 436.900, 444.600, 452.200, 459.800, + 467.300, 474.800, 482.100, 489.400, 496.500, 503.600, 510.600, + 517.600, 524.500, 531.300, 538.100, 544.800, 551.400, 557.900, + 564.400, 570.800, 577.100, 583.400, 589.600, 595.700, 601.700, + 607.700, 613.600, 619.400, 625.200, 630.900, 636.500, 642.100, + 647.600, 653.000, 658.300, 663.600, 668.800, 673.900, 679.000, + 684.000, 688.900, 693.800, 698.600, 703.300, 708.000, 712.700, + 717.300, 721.900, 726.400, 731.000, 735.500, 740.000, 744.500, + 749.000, 753.500, 758.000, 762.600, 767.000, 771.400}, + + {76.8000, 76.8000, 77.0000, 77.2000, 77.5000, 78.0000, 78.4000, + 78.9000, 79.5000, 80.3000, 82.3000, 84.7000, 87.5000, 90.6000, + 93.7000, 97.3000, 100.900, 104.800, 108.900, 113.100, 117.400, + 121.700, 126.200, 130.700, 135.300, 139.900, 149.100, 158.600, + 168.100, 177.600, 187.100, 196.400, 205.500, 214.700, 223.800, + 232.800, 241.800, 250.800, 259.600, 268.400, 277.100, 285.800, + 294.400, 302.900, 311.400, 319.900, 328.300, 336.700, 345.000, + 353.300, 361.500, 369.700, 377.900, 386.000, 394.000, 402.000, + 409.900, 417.800, 425.500, 433.300, 440.900, 448.500, 456.000, + 463.400, 470.800, 478.100, 485.300, 492.400, 499.500, 506.500, + 513.400, 520.200, 527.000, 533.700, 540.300, 546.900, 553.400, + 559.800, 566.200, 572.500, 578.700, 584.900, 590.900, 597.000, + 602.900, 608.800, 614.600, 620.300, 626.000, 631.600, 637.100, + 642.600, 647.900, 653.300, 658.500, 663.700, 668.800, 673.900, + 678.800, 683.800, 688.600, 693.300, 698.000, 702.700, 707.300, + 711.900, 716.500, 721.100, 725.700, 730.300, 734.800, 739.300, + 743.800, 748.300, 752.800, 757.300, 761.700, 766.100}, + + {82.8000, 82.8000, 83.0000, 83.1000, 83.2000, 83.6000, 84.0000, + 84.4000, 85.0000, 85.9000, 87.7000, 89.8000, 92.3000, 95.1000, + 98.3000, 101.400, 104.800, 108.200, 112.000, 115.900, 119.900, + 124.000, 128.200, 132.500, 136.800, 141.200, 150.000, 159.000, + 168.100, 177.200, 186.400, 195.500, 204.500, 213.500, 222.500, + 231.300, 240.200, 249.000, 257.700, 266.400, 275.000, 283.600, + 292.100, 300.600, 309.000, 317.400, 325.700, 334.100, 342.300, + 350.500, 358.700, 366.800, 374.900, 383.000, 391.000, 398.900, + 406.700, 414.500, 422.200, 429.800, 437.400, 444.900, 452.400, + 459.800, 467.100, 474.400, 481.600, 488.600, 495.600, 502.600, + 509.400, 516.200, 522.900, 529.500, 536.100, 542.600, 549.000, + 555.400, 561.800, 568.000, 574.200, 580.300, 586.400, 592.400, + 598.300, 604.200, 610.000, 615.700, 621.300, 626.800, 632.300, + 637.700, 643.100, 648.300, 653.600, 658.700, 663.800, 668.800, + 673.700, 678.600, 683.400, 688.100, 692.800, 697.500, 702.100, + 706.700, 711.300, 715.900, 720.500, 725.100, 729.600, 734.100, + 738.600, 743.100, 747.600, 752.100, 756.500, 760.900}, + + {88.8000, 88.8000, 89.0000, 89.1000, 89.2000, 89.4000, 89.7000, + 90.1000, 90.6000, 91.5000, 93.0000, 94.9000, 97.2000, 99.7000, + 102.400, 105.400, 108.600, 111.900, 115.300, 118.900, 122.600, + 126.500, 130.500, 134.500, 138.600, 142.700, 151.200, 159.800, + 168.500, 177.300, 186.200, 195.100, 204.000, 212.800, 221.600, + 230.300, 239.000, 247.700, 256.300, 264.900, 273.400, 281.900, + 290.300, 298.700, 307.100, 315.400, 323.700, 331.900, 340.100, + 348.200, 356.300, 364.400, 372.400, 380.400, 388.300, 396.100, + 403.800, 411.500, 419.100, 426.700, 434.200, 441.700, 449.100, + 456.400, 463.700, 470.900, 478.000, 485.000, 491.900, 498.800, + 505.600, 512.300, 519.000, 525.600, 532.100, 538.600, 545.000, + 551.400, 557.600, 563.900, 570.000, 576.100, 582.100, 588.000, + 593.900, 599.700, 605.400, 611.100, 616.600, 622.200, 627.600, + 633.000, 638.300, 643.500, 648.700, 653.800, 658.800, 663.800, + 668.700, 673.600, 678.400, 683.100, 687.800, 692.400, 697.000, + 701.600, 706.200, 710.800, 715.300, 719.900, 724.400, 728.900, + 733.500, 738.000, 742.500, 747.000, 751.400, 755.800} + } }; JBTable * jbtable_load() { return(&JB); } - + diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/measure_adj/UTIL/pssac2/jb.h b/utils/ADJOINT_TOMOGRAPHY_TOOLS/measure_adj/UTIL/pssac2/jb.h index 47bd31be0..ed6c5cf4c 100644 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/measure_adj/UTIL/pssac2/jb.h +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/measure_adj/UTIL/pssac2/jb.h @@ -6,17 +6,17 @@ typedef struct _JBTable JBTable; struct _JBTable { - int nl; - float z[JB_NL]; - float vp[JB_NL]; - float vs[JB_NL]; - float den[JB_NL]; + int nl; + float z[JB_NL]; + float vp[JB_NL]; + float vs[JB_NL]; + float den[JB_NL]; - int nh; - float depths[JB_NH]; - int nd; - float deltas[JB_ND]; - float ts[JB_NH][JB_ND]; + int nh; + float depths[JB_NH]; + int nd; + float deltas[JB_ND]; + float ts[JB_NH][JB_ND]; }; float gfact3(JBTable *jb, float dist, float depth); diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/measure_adj/UTIL/pssac2/pssac2.c b/utils/ADJOINT_TOMOGRAPHY_TOOLS/measure_adj/UTIL/pssac2/pssac2.c index c7bf08fc0..320d08801 100644 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/measure_adj/UTIL/pssac2/pssac2.c +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/measure_adj/UTIL/pssac2/pssac2.c @@ -1,5 +1,5 @@ /*-------------------------------------------------------------------- - * The GMT-system: @(#)pssac.c 2.13 2/2/95 + * The GMT-system: @(#)pssac.c 2.13 2/2/95 * * Copyright (c) 1991 by P. Wessel and W. H. F. Smith * See README file for copying and redistribution conditions. @@ -7,7 +7,7 @@ * pssac will read sacfiles and plot them * PostScript code is written to stdout. * - * Revision: Lupei Zhu from psxy + * Revision: Lupei Zhu from psxy * Modifications: Upgraded to new version of GMT (Brian Savage) * Small updates * Added ability to plot seismograms on maps @@ -61,15 +61,15 @@ usage(void) { fprintf(stderr," or -Ct[0-9]/cut_end or -Ccut_begin/t[0-9]\n"); fprintf(stderr," -E option determines\n"); fprintf(stderr," (1) profile type:\n"); - fprintf(stderr," a: azimuth profile\n"); - fprintf(stderr," b: back-azimuth profile\n"); - fprintf(stderr," d: distance profile with x in degrees\n"); - fprintf(stderr," k: distance profile with x in kilometers\n"); - fprintf(stderr," n: traces are numbered from 1 to N in y-axis\n"); + fprintf(stderr," a: azimuth profile\n"); + fprintf(stderr," b: back-azimuth profile\n"); + fprintf(stderr," d: distance profile with x in degrees\n"); + fprintf(stderr," k: distance profile with x in kilometers\n"); + fprintf(stderr," n: traces are numbered from 1 to N in y-axis\n"); fprintf(stderr," (2) time alignment:\n"); - fprintf(stderr," tn: align up with time mark tn in SAC head\n"); - fprintf(stderr," n= -5(b), -3(o), -2(a), 0-9 (t0-t9)\n"); - fprintf(stderr," vel: use reduced velocity\n"); + fprintf(stderr," tn: align up with time mark tn in SAC head\n"); + fprintf(stderr," n= -5(b), -3(o), -2(a), 0-9 (t0-t9)\n"); + fprintf(stderr," vel: use reduced velocity\n"); fprintf(stderr," Examples: -Ek8.0 -Eat-2 -Ed4.4 -Ent-3\n"); fprintf(stderr," -M vertical scaling in sacfile_unit/MEASURE_UNIT = size \n"); fprintf(stderr," size: each trace will normalized to size (in MEASURE_UNIT)\n"); @@ -107,13 +107,13 @@ usage(void) { fprintf(stderr," or it may be specified with individual files using stdin\n"); fprintf(stderr," -n Distances and Great Circle Arcs may be negative, don't complain\n"); fprintf(stderr," -r remove the mean value\n"); - fprintf(stderr," -s byte swap the data before plotting\n"); + fprintf(stderr," -s byte swap the data before plotting\n"); fprintf(stderr," -v plot the traces vertically\n"); fprintf(stderr," -V Verbose (use more for more information)\n"); exit(-1); } -float +float get_sac_t_value(SACHEAD *h, int t) { float tval; float *fpt; @@ -122,7 +122,7 @@ get_sac_t_value(SACHEAD *h, int t) { return(tval); } -float +float get_sac_u_value(SACHEAD *h, int t) { float tval; float *fpt; @@ -133,9 +133,9 @@ get_sac_u_value(SACHEAD *h, int t) { int main (int argc, char **argv) { - int i, ii, n, fno, nrdc; - int plot_n, pn, ierr; - float *yval; + int i, ii, n, fno, nrdc; + int plot_n, pn, ierr; + float *yval; float *fpt; float t0; float y0, yy0; @@ -148,7 +148,7 @@ main (int argc, char **argv) { double tt0, tt1; double neg_tt0, neg_tt1; char *c; - char line[LINE_SIZE]; + char line[LINE_SIZE]; char sac_file[100]; char penpen[20]; char prf; @@ -167,7 +167,7 @@ main (int argc, char **argv) { /* For phase painting, used in GMT_fill */ struct GMT_FILL fill_pos, fill_neg; int *plot_pen; - + SACHEAD h; int rgb[3]; float dt; @@ -192,7 +192,7 @@ main (int argc, char **argv) { double size = 1.0; double delay = 0.0; double yscale = 1.0; - float x0 = 0.0; + float x0 = 0.0; int red = 0; int blu = 0; @@ -236,143 +236,143 @@ main (int argc, char **argv) { case 'B': case 'J': case 'K': case 'O': case 'P': case 'R': case 'U': case 'X': case 'x': case 'Y': case 'y': case '#': case '\0': - error += GMT_get_common_args (argv[i],&west,&east,&south,&north); - break; - + error += GMT_get_common_args (argv[i],&west,&east,&south,&north); + break; + /* Supplemental parameters,C,E,M,S,W,L */ - case 'M': /* Multiple line segments,-Msize */ - if(strstr(&argv[i][2],"/s") == NULL && - strstr(&argv[i][2],"/b") == NULL) { /* -Msize/alpha */ - ierr=sscanf(&argv[i][2],"%lf/%lf",&size,&alpha); - if(ierr == 2) { - norm = TRUE; - size = 1/size; - } - } else if(strstr(&argv[i][2],"/b") != NULL) { /* -Msize/b */ - ierr=sscanf(&argv[i][2],"%lf",&size); - body_wave_scaling = TRUE; - size = 1/size; - jb = jbtable_load(); - } else if(strstr(&argv[i][2],"/s") != NULL) { /* -Msize/s */ - ierr=sscanf(&argv[i][2],"%lf",&size); - sin_scaling = TRUE; - size = 1/size; - } else { - fprintf(stderr, "%s: Error parsing -M option (%s)\n", PSSAC, argv[i]); - exit(-1); - } - option_M_specified = TRUE; - break; - break; + case 'M': /* Multiple line segments,-Msize */ + if(strstr(&argv[i][2],"/s") == NULL && + strstr(&argv[i][2],"/b") == NULL) { /* -Msize/alpha */ + ierr=sscanf(&argv[i][2],"%lf/%lf",&size,&alpha); + if(ierr == 2) { + norm = TRUE; + size = 1/size; + } + } else if(strstr(&argv[i][2],"/b") != NULL) { /* -Msize/b */ + ierr=sscanf(&argv[i][2],"%lf",&size); + body_wave_scaling = TRUE; + size = 1/size; + jb = jbtable_load(); + } else if(strstr(&argv[i][2],"/s") != NULL) { /* -Msize/s */ + ierr=sscanf(&argv[i][2],"%lf",&size); + sin_scaling = TRUE; + size = 1/size; + } else { + fprintf(stderr, "%s: Error parsing -M option (%s)\n", PSSAC, argv[i]); + exit(-1); + } + option_M_specified = TRUE; + break; + break; case 'N': - clipping_on = FALSE; - break; - case 'S': /* Sdelay */ - if(argv[i][2] == 'u') { /* Align on User Variable */ - sscanf(&argv[i][3],"%d", &user_variable); - user_defined_shifts = TRUE; - } else { - sscanf(&argv[i][2],"%lf",&delay); - } - break; - case 'G': /* paint positive */ - sscanf(&argv[i][2],"%d/%d/%d/%lf/%lf/%lf",&red,&grn,&blu,&cam0,&tt0,&tt1); - GMT_init_fill(&fill_pos, red, grn, blu); - phase_paint = TRUE; - break; - case 'g': /* paint positive */ - sscanf(&argv[i][2],"%d/%d/%d/%lf/%lf/%lf",&red,&grn,&blu,&neg_cam0,&neg_tt0,&neg_tt1); - GMT_init_fill(&fill_neg, red, grn, blu); - neg_phase_paint = TRUE; - break; - case 'C': /* Ccut0/cut1 */ - c = &argv[i][2]; - if(c[0] == 't') { - window_cut_use_headers_0 = TRUE; - c++; - } - sscanf(c,"%lf",&cut0); - c = strstr(&argv[i][2],"/"); - c++; - if(c[0] == 't') { - window_cut_use_headers_1 = TRUE; - c++; - } - sscanf(c,"%lf",&cut1); - window_cut = TRUE; - if(window_cut_use_headers_0 == TRUE) { - cut0t = (int) cut0; - cut0 = 0.0; - } - if(window_cut_use_headers_1 == TRUE) { - cut1t = (int) cut1; - cut1 = 0.0; - } - break; + clipping_on = FALSE; + break; + case 'S': /* Sdelay */ + if(argv[i][2] == 'u') { /* Align on User Variable */ + sscanf(&argv[i][3],"%d", &user_variable); + user_defined_shifts = TRUE; + } else { + sscanf(&argv[i][2],"%lf",&delay); + } + break; + case 'G': /* paint positive */ + sscanf(&argv[i][2],"%d/%d/%d/%lf/%lf/%lf",&red,&grn,&blu,&cam0,&tt0,&tt1); + GMT_init_fill(&fill_pos, red, grn, blu); + phase_paint = TRUE; + break; + case 'g': /* paint positive */ + sscanf(&argv[i][2],"%d/%d/%d/%lf/%lf/%lf",&red,&grn,&blu,&neg_cam0,&neg_tt0,&neg_tt1); + GMT_init_fill(&fill_neg, red, grn, blu); + neg_phase_paint = TRUE; + break; + case 'C': /* Ccut0/cut1 */ + c = &argv[i][2]; + if(c[0] == 't') { + window_cut_use_headers_0 = TRUE; + c++; + } + sscanf(c,"%lf",&cut0); + c = strstr(&argv[i][2],"/"); + c++; + if(c[0] == 't') { + window_cut_use_headers_1 = TRUE; + c++; + } + sscanf(c,"%lf",&cut1); + window_cut = TRUE; + if(window_cut_use_headers_0 == TRUE) { + cut0t = (int) cut0; + cut0 = 0.0; + } + if(window_cut_use_headers_1 == TRUE) { + cut1t = (int) cut1; + cut1 = 0.0; + } + break; case 'E': - reduce=TRUE; - prf=argv[i][2]; - rdc=argv[i][3]; - if (rdc == 't') { - if(sscanf(&argv[i][4],"%d",&nrdc) != 1) { - fprintf(stderr, "%s: error reading in SAC time variable\n", PSSAC); - exit(-1); - } - } else { - if(sscanf(&argv[i][3],"%lf",&reduce_vel) != 1) { - fprintf(stderr, "%s: error reading in reduction velocity\n", PSSAC); - exit(-1); - } - } - break; - case 'W': /* Set line attributes */ - GMT_getpen (&argv[i][2],&pen); - break; + reduce=TRUE; + prf=argv[i][2]; + rdc=argv[i][3]; + if (rdc == 't') { + if(sscanf(&argv[i][4],"%d",&nrdc) != 1) { + fprintf(stderr, "%s: error reading in SAC time variable\n", PSSAC); + exit(-1); + } + } else { + if(sscanf(&argv[i][3],"%lf",&reduce_vel) != 1) { + fprintf(stderr, "%s: error reading in reduction velocity\n", PSSAC); + exit(-1); + } + } + break; + case 'W': /* Set line attributes */ + GMT_getpen (&argv[i][2],&pen); + break; case 'n': - negative_distances = TRUE; - break; - case 'D': /* Set the position shifting */ - if(sscanf(&argv[i][2],"%lf/%lf",&dx, &dy) < 2) { - fprintf(stderr, "%s: error reading in position shifting variables\n", PSSAC); - exit(-1); - } - break; - case 'l': /* Set the timescale position */ - if(sscanf(&argv[i][2],"%lf/%lf/%lf/%lf/%d", - ×cale_x, - ×cale_y, - ×cale_len, - ×cale_bar, - ×cale_font_size) < 5) { - fprintf(stderr, "%s: error reading in timescale position\n", PSSAC); - exit(-1); - } - plot_timescale = TRUE; - break; - case 'L': /* Set seconds per MEASURE_UNIT for map projection */ - option_L_specified = TRUE; - sscanf(&argv[i][2],"%lf",&secs_per_measure); - break; + negative_distances = TRUE; + break; + case 'D': /* Set the position shifting */ + if(sscanf(&argv[i][2],"%lf/%lf",&dx, &dy) < 2) { + fprintf(stderr, "%s: error reading in position shifting variables\n", PSSAC); + exit(-1); + } + break; + case 'l': /* Set the timescale position */ + if(sscanf(&argv[i][2],"%lf/%lf/%lf/%lf/%d", + ×cale_x, + ×cale_y, + ×cale_len, + ×cale_bar, + ×cale_font_size) < 5) { + fprintf(stderr, "%s: error reading in timescale position\n", PSSAC); + exit(-1); + } + plot_timescale = TRUE; + break; + case 'L': /* Set seconds per MEASURE_UNIT for map projection */ + option_L_specified = TRUE; + sscanf(&argv[i][2],"%lf",&secs_per_measure); + break; case 'r': - rmean=TRUE; - break; + rmean=TRUE; + break; case 's': - byte_swap = 1; - break; - case 'v': /* plot trace vertically */ - vertical_trace = TRUE; - break; + byte_swap = 1; + break; + case 'v': /* plot trace vertically */ + vertical_trace = TRUE; + break; case 'V': - verbose_level = verbose_level + 1; - break; - default: /* Options not recognized */ - error=TRUE; - break; + verbose_level = verbose_level + 1; + break; + default: /* Options not recognized */ + error=TRUE; + break; } } else n_files++; } - if (argc == 1 || error) { /* Display usage */ + if (argc == 1 || error) { /* Display usage */ usage(); } if(option_M_specified == FALSE) { @@ -387,7 +387,7 @@ main (int argc, char **argv) { #if ( GMT_VERSION_MAJOR < 4 ) GMT_put_history(argc,argv); /* VERISON less and 4.0.0 */ #else -#if ( GMT_VERSION_MINOR < 2 ) +#if ( GMT_VERSION_MINOR < 2 ) GMT_put_history(argc,argv); /* VERSION 4.1.4 and Less */ #else GMT_history(argc,argv); /* VERSION 4.2.0 and Greater */ @@ -398,18 +398,18 @@ main (int argc, char **argv) { #if ( GMT_VERSION_MAJOR < 4 ) ps_plotinit (NULL, - gmtdefs.overlay, - gmtdefs.page_orientation, - gmtdefs.x_origin, - gmtdefs.y_origin, - gmtdefs.global_x_scale, - gmtdefs.global_y_scale, - gmtdefs.n_copies, - gmtdefs.dpi, - gmtdefs.measure_unit, - gmtdefs.paper_width, - gmtdefs.page_rgb, - GMT_epsinfo (argv[0])); + gmtdefs.overlay, + gmtdefs.page_orientation, + gmtdefs.x_origin, + gmtdefs.y_origin, + gmtdefs.global_x_scale, + gmtdefs.global_y_scale, + gmtdefs.n_copies, + gmtdefs.dpi, + gmtdefs.measure_unit, + gmtdefs.paper_width, + gmtdefs.page_rgb, + GMT_epsinfo (argv[0])); #else GMT_plotinit(argc, argv); #endif @@ -418,7 +418,7 @@ main (int argc, char **argv) { if(clipping_on == TRUE) { GMT_map_clip_on (rgb,3); } - /* set pen attribute */ + /* set pen attribute */ GMT_setpen(&pen); yy0=0; @@ -429,28 +429,28 @@ main (int argc, char **argv) { while( (n_files && ++fno 1) { - fprintf(stderr, "%s: Using commnd line \n", PSSAC); + fprintf(stderr, "%s: Using commnd line \n", PSSAC); } if (argv[fno][0] == '-') continue; else strcpy(sac_file,argv[fno]); - } else { /* from standard in */ + } else { /* from standard in */ if(verbose_level >= 1) { - fprintf(stderr, "%s: Using stdin \n", PSSAC); + fprintf(stderr, "%s: Using stdin \n", PSSAC); } i=sscanf(line, "%s %f %f %s",sac_file,&x0,&y0,penpen); if (i>2) positioning = TRUE; if (i>3) { - /* set pen attribute */ - GMT_getpen(penpen,&pen); - GMT_setpen(&pen); + /* set pen attribute */ + GMT_getpen(penpen,&pen); + GMT_setpen(&pen); } if(verbose_level > 2) { - fprintf(stderr, "%s: Reading %s \n", PSSAC, sac_file); + fprintf(stderr, "%s: Reading %s \n", PSSAC, sac_file); } } - + /* read in sac files */ if(verbose_level > 1) { fprintf(stderr, "%s: Reading in %s ...\n", PSSAC, sac_file); @@ -464,17 +464,17 @@ main (int argc, char **argv) { if(window_cut_use_headers_0 == TRUE) { cut0 = get_sac_t_value(&h, (int)cut0t); } - if(window_cut_use_headers_1 == TRUE) { + if(window_cut_use_headers_1 == TRUE) { cut1 = get_sac_t_value(&h, (int)cut1t); } - - /* determine time alignment and y-axis + + /* determine time alignment and y-axis location of the trace from profile type*/ t=t0=h.b+delay; if(user_defined_shifts == TRUE) { if(get_sac_u_value(&h, (int)user_variable) != -12345.0) { - t = t - get_sac_u_value(&h, (int)user_variable); - t0 = t; + t = t - get_sac_u_value(&h, (int)user_variable); + t0 = t; } } if(verbose_level > 2) { @@ -484,51 +484,51 @@ main (int argc, char **argv) { fprintf(stderr, "%s: \tb-value: %f\n", PSSAC, h.b); fprintf(stderr, "%s: \tdelay: %f\n", PSSAC, delay); if(user_defined_shifts == TRUE) { - fprintf(stderr, "%s: \tdelay u: %f\n", PSSAC, get_sac_u_value(&h, (int)user_variable)); + fprintf(stderr, "%s: \tdelay u: %f\n", PSSAC, get_sac_u_value(&h, (int)user_variable)); } } if (reduce) { switch (prf) { case 'd': yy0=h.gcarc; - if(verbose_level > 1) { - fprintf(stderr, "%s:\tGreat Circle Arc: %e\n", PSSAC, yy0); - } - if(h.gcarc < 0.0) { - fprintf(stderr, "%s: Great Circle Arc less than zero (%s) %e\n", PSSAC, sac_file, yy0); - } + if(verbose_level > 1) { + fprintf(stderr, "%s:\tGreat Circle Arc: %e\n", PSSAC, yy0); + } + if(h.gcarc < 0.0) { + fprintf(stderr, "%s: Great Circle Arc less than zero (%s) %e\n", PSSAC, sac_file, yy0); + } break; case 'k': - yy0=h.dist; - if(verbose_level > 1) { - fprintf(stderr, "%s:\tDistance: %e\n", PSSAC, yy0); - } - if(h.dist < 0.0 && !negative_distances) { - fprintf(stderr, "%s: Distance less than zero (%s) %e\n", PSSAC, sac_file, yy0); - } + yy0=h.dist; + if(verbose_level > 1) { + fprintf(stderr, "%s:\tDistance: %e\n", PSSAC, yy0); + } + if(h.dist < 0.0 && !negative_distances) { + fprintf(stderr, "%s: Distance less than zero (%s) %e\n", PSSAC, sac_file, yy0); + } break; case 'a': yy0=h.az; - if(verbose_level > 1) { - fprintf(stderr, "%s:\tAzimuth: %e\n", PSSAC, yy0); - } - if(h.az < 0.0) { - fprintf(stderr, "%s: Azimuth less than zero (%s) %e\n", PSSAC, sac_file, yy0); - } - break; + if(verbose_level > 1) { + fprintf(stderr, "%s:\tAzimuth: %e\n", PSSAC, yy0); + } + if(h.az < 0.0) { + fprintf(stderr, "%s: Azimuth less than zero (%s) %e\n", PSSAC, sac_file, yy0); + } + break; case 'b': - yy0=h.baz; - if(verbose_level > 1) { - fprintf(stderr, "%s:\tBack-Azimuth: %e\n", PSSAC, yy0); - } - if(h.baz < 0.0) { - fprintf(stderr, "%s: Back-Azimuth less than zero (%s) %e\n", PSSAC, sac_file, yy0); - } - break; + yy0=h.baz; + if(verbose_level > 1) { + fprintf(stderr, "%s:\tBack-Azimuth: %e\n", PSSAC, yy0); + } + if(h.baz < 0.0) { + fprintf(stderr, "%s: Back-Azimuth less than zero (%s) %e\n", PSSAC, sac_file, yy0); + } + break; case 'n': - if(verbose_level > 1) { - fprintf(stderr, "%s:\tNumber: %e\n", PSSAC, yy0); - } + if(verbose_level > 1) { + fprintf(stderr, "%s:\tNumber: %e\n", PSSAC, yy0); + } yy0++; break; default: @@ -536,22 +536,22 @@ main (int argc, char **argv) { exit(3); } if (rdc == 't') { - t = t0 - *(fpt + 10 + nrdc); - if(window_cut_use_headers_0 == TRUE) { - cut0 = cut0 - *(fpt + 10 + nrdc); - } - if(window_cut_use_headers_1 == TRUE) { - cut1 = cut1 - *(fpt + 10 + nrdc); - } + t = t0 - *(fpt + 10 + nrdc); + if(window_cut_use_headers_0 == TRUE) { + cut0 = cut0 - *(fpt + 10 + nrdc); + } + if(window_cut_use_headers_1 == TRUE) { + cut1 = cut1 - *(fpt + 10 + nrdc); + } } else { - t = t0 - fabs(h.dist/reduce_vel); - if(window_cut_use_headers_0 == TRUE) { - cut0 = cut0 - fabs(h.dist/reduce_vel); - } - if(window_cut_use_headers_1 == TRUE) { - cut1 = cut1 - fabs(h.dist/reduce_vel); - } + t = t0 - fabs(h.dist/reduce_vel); + if(window_cut_use_headers_0 == TRUE) { + cut0 = cut0 - fabs(h.dist/reduce_vel); + } + if(window_cut_use_headers_1 == TRUE) { + cut1 = cut1 - fabs(h.dist/reduce_vel); + } } } if (! positioning ) y0 = yy0; @@ -567,48 +567,48 @@ main (int argc, char **argv) { realdt = h.delta; realt = t; - /* At this point we need to determine + /* At this point we need to determine dt -- x spacing in degrees (if projecting) or MEASURE_UNIT (if plotting) t -- initial point in degrees (if projecting) or MEASURE_UNIT (if plotting) - which depends on projection + which depends on projection */ - if(project_info.projection < 10) { + if(project_info.projection < 10) { /* Linear, Log10, Pow */ /* Tested with -JX but nothing else */ dt = h.delta; t += x0; } else { /* Other projections -- see gmt_project.h and MAP_PROJECTIONS */ - /* If the location was not specified, - use the sac header stlo and stla + /* If the location was not specified, + use the sac header stlo and stla */ if(positioning == FALSE) { - x0 = h.stlo; - y0 = h.stla; + x0 = h.stlo; + y0 = h.stla; } /* Determine dt (in MEASURE_UNIT) */ dt = (h.delta) / secs_per_measure; - /* Convert original lat/lon point (x0,y0) to - MEASURE_UNIT (t,ty=>y0) for plotting */ + /* Convert original lat/lon point (x0,y0) to + MEASURE_UNIT (t,ty=>y0) for plotting */ if(vertical_trace == TRUE) { - GMT_geo_to_xy(x0,y0,&ty,&t); - y0 = t; - t += dy; - y0 += dx; + GMT_geo_to_xy(x0,y0,&ty,&t); + y0 = t; + t += dy; + y0 += dx; } else { - GMT_geo_to_xy(x0,y0,&t,&ty); - y0 = ty; - t += dx; - y0 += dy; + GMT_geo_to_xy(x0,y0,&t,&ty); + y0 = ty; + t += dx; + y0 += dy; } /* Get position from t(position) and - realt (timing) and - secs_per_measure (time scaling) */ + realt (timing) and + secs_per_measure (time scaling) */ t = t + (realt / secs_per_measure); if(verbose_level > 2) { - fprintf(stderr, "%s: Paramters for map plotting \n", PSSAC); - fprintf(stderr, "%s: \tsecs_per_measure: %f\n", PSSAC, secs_per_measure); - fprintf(stderr, "%s: \tmeasure_unit: %s\n", PSSAC, - GMT_unit_names[gmtdefs.measure_unit]); + fprintf(stderr, "%s: Paramters for map plotting \n", PSSAC); + fprintf(stderr, "%s: \tsecs_per_measure: %f\n", PSSAC, secs_per_measure); + fprintf(stderr, "%s: \tmeasure_unit: %s\n", PSSAC, + GMT_unit_names[gmtdefs.measure_unit]); } } if(verbose_level > 2) { @@ -621,13 +621,13 @@ main (int argc, char **argv) { fprintf(stderr, "%s: \trealdt: %f\n", PSSAC, realdt); fprintf(stderr, "%s: \tcut0: %f\n", PSSAC, cut0); fprintf(stderr, "%s: \tcut1: %f\n", PSSAC, cut1); - + } for(n=0,i=0;i=cut0 && realt<=cut1) || ( !window_cut) ){ - xx[n]=t; - yy[n]=yval[i]; - n++; + xx[n]=t; + yy[n]=yval[i]; + n++; } t += dt; realt += realdt; @@ -636,87 +636,87 @@ main (int argc, char **argv) { free((char *)xx); free((char *)yy); if(verbose_level > 1) { - fprintf(stderr, "%s: Skipping %s (no points)\n", PSSAC, sac_file); + fprintf(stderr, "%s: Skipping %s (no points)\n", PSSAC, sac_file); } continue; } if(option_M_specified == TRUE){ if(verbose_level > 1) { - if(sin_scaling){ - fprintf(stderr, "%s: Multi-Segment Scaled, trace multiplied by %lf *sqrt(sin(gcarc))\n",PSSAC, size); - } - else if(norm){ - fprintf(stderr, "%s: Multi-Segment Scaled, trace multiplied by %lf *dist[km]^%lf\n",PSSAC,size,alpha); - } - else if(body_wave_scaling) { - fprintf(stderr, "%s: Multi-Segment Scaled, trace multiplied by %lf Geometrical Spreading Factor\n", PSSAC, size); - } - else{ - fprintf(stderr, "%s: Multi-Segment Scaled, trace normalized to %lf inches\n", PSSAC, size); - } + if(sin_scaling){ + fprintf(stderr, "%s: Multi-Segment Scaled, trace multiplied by %lf *sqrt(sin(gcarc))\n",PSSAC, size); + } + else if(norm){ + fprintf(stderr, "%s: Multi-Segment Scaled, trace multiplied by %lf *dist[km]^%lf\n",PSSAC,size,alpha); + } + else if(body_wave_scaling) { + fprintf(stderr, "%s: Multi-Segment Scaled, trace multiplied by %lf Geometrical Spreading Factor\n", PSSAC, size); + } + else{ + fprintf(stderr, "%s: Multi-Segment Scaled, trace normalized to %lf inches\n", PSSAC, size); + } } h.depmax=-1.e20;h.depmin=1.e20;h.depmen=0.; for(i=0;i yy[i] ? h.depmax : yy[i]; - h.depmin=h.depmin < yy[i] ? h.depmin : yy[i]; - h.depmen += yy[i]; + h.depmin=h.depmin < yy[i] ? h.depmin : yy[i]; + h.depmen += yy[i]; } h.depmen /= ( float ) n; if(!rmean) h.depmen=0.0; if(project_info.projection < 10) { /* X-Y-ish plots */ - ysc=size*fabs((north-south)/project_info.pars[1]); - ysc=size*fabs((north-south)/GMT_map_height); + ysc=size*fabs((north-south)/project_info.pars[1]); + ysc=size*fabs((north-south)/GMT_map_height); } else { /* Map Projections */ - ysc = size; + ysc = size; } if(norm) { - if(h.dist < 0.0 && !negative_distances) { - fprintf(stderr, "%s: Warning -- Distance in km is less than zero (%s)\n", PSSAC, sac_file); - } - yscale=pow(fabs(h.dist),alpha)*ysc; + if(h.dist < 0.0 && !negative_distances) { + fprintf(stderr, "%s: Warning -- Distance in km is less than zero (%s)\n", PSSAC, sac_file); + } + yscale=pow(fabs(h.dist),alpha)*ysc; } else if(sin_scaling) { - if(h.gcarc < 0.0 && !negative_distances) { - fprintf(stderr, "%s: Warning -- Distance in degrees is less than zero (%s)\n", PSSAC, sac_file); - } - yscale=ysc*pow(sin(fabs(h.gcarc)*2*PI/360),0.5); + if(h.gcarc < 0.0 && !negative_distances) { + fprintf(stderr, "%s: Warning -- Distance in degrees is less than zero (%s)\n", PSSAC, sac_file); + } + yscale=ysc*pow(sin(fabs(h.gcarc)*2*PI/360),0.5); } else if(body_wave_scaling) { - if(fabs(h.gcarc) < 30.0 || fabs(h.gcarc) > 90.0) { - fprintf(stderr, "%s: Warning -- Distances < 30.0 or > 90.0 degrees are ill-behaved\n", PSSAC); - } - if(h.evdp < 0.0 || h.evdp > 800) { - fprintf(stderr, "%s: File: %s Depth: %f\n", PSSAC, sac_file, h.evdp); - fprintf(stderr, "%s: Warning -- Depths < 0.0 or > 800.0 km are ill-behaved\n", PSSAC); - } - yscale = ysc * gfact3(jb, fabs(h.gcarc), h.evdp); + if(fabs(h.gcarc) < 30.0 || fabs(h.gcarc) > 90.0) { + fprintf(stderr, "%s: Warning -- Distances < 30.0 or > 90.0 degrees are ill-behaved\n", PSSAC); + } + if(h.evdp < 0.0 || h.evdp > 800) { + fprintf(stderr, "%s: File: %s Depth: %f\n", PSSAC, sac_file, h.evdp); + fprintf(stderr, "%s: Warning -- Depths < 0.0 or > 800.0 km are ill-behaved\n", PSSAC); + } + yscale = ysc * gfact3(jb, fabs(h.gcarc), h.evdp); } else { - yscale=ysc/fabs(h.depmax - h.depmin); + yscale=ysc/fabs(h.depmax - h.depmin); } for(i=0;i 2) { - fprintf(stderr, "%s: Vertical Scale Determination\n", PSSAC); - fprintf(stderr, "%s: \tdepmin: %f\n", PSSAC, h.depmin); - fprintf(stderr, "%s: \tdepmax: %f\n", PSSAC, h.depmax); - fprintf(stderr, "%s: \tysc: %f\n", PSSAC, ysc); - fprintf(stderr, "%s: \tpars[0]: %f\n", PSSAC, project_info.pars[0]); - fprintf(stderr, "%s: \tpars[1]: %f\n", PSSAC, project_info.pars[1]); - fprintf(stderr, "%s: \tnorth: %f\n", PSSAC, north); - fprintf(stderr, "%s: \tsouth: %f\n", PSSAC, south); - fprintf(stderr, "%s: \twidth: %f\n", PSSAC, GMT_map_width); - fprintf(stderr, "%s: \theight: %f\n", PSSAC, GMT_map_height); - fprintf(stderr, "%s: \tyscale: %f\n", PSSAC, yscale); - fprintf(stderr, "%s: \ty0: %f\n", PSSAC, y0); + fprintf(stderr, "%s: Vertical Scale Determination\n", PSSAC); + fprintf(stderr, "%s: \tdepmin: %f\n", PSSAC, h.depmin); + fprintf(stderr, "%s: \tdepmax: %f\n", PSSAC, h.depmax); + fprintf(stderr, "%s: \tysc: %f\n", PSSAC, ysc); + fprintf(stderr, "%s: \tpars[0]: %f\n", PSSAC, project_info.pars[0]); + fprintf(stderr, "%s: \tpars[1]: %f\n", PSSAC, project_info.pars[1]); + fprintf(stderr, "%s: \tnorth: %f\n", PSSAC, north); + fprintf(stderr, "%s: \tsouth: %f\n", PSSAC, south); + fprintf(stderr, "%s: \twidth: %f\n", PSSAC, GMT_map_width); + fprintf(stderr, "%s: \theight: %f\n", PSSAC, GMT_map_height); + fprintf(stderr, "%s: \tyscale: %f\n", PSSAC, yscale); + fprintf(stderr, "%s: \ty0: %f\n", PSSAC, y0); } } if (vertical_trace) { if(verbose_level > 1) { - fprintf(stderr, "%s: Vertical Trace\n", PSSAC); + fprintf(stderr, "%s: Vertical Trace\n", PSSAC); } xp = (double *) GMT_memory(CNULL, n, sizeof (double), PSSAC); memcpy((char *)xp, (char *)yy, n*sizeof(double)); @@ -724,20 +724,20 @@ main (int argc, char **argv) { memcpy((char *)xx, (char *)xp, n*sizeof(double)); free(xp); } - + if(verbose_level > 3) { fprintf(stderr, "%s: projecting %d points\n", PSSAC, n); for(i = 0; i < n; i++) { - fprintf(stderr, "%s: (pt) => %d: (x,y) => (%f, %f)\n", PSSAC, i,xx[i],yy[i]); + fprintf(stderr, "%s: (pt) => %d: (x,y) => (%f, %f)\n", PSSAC, i,xx[i],yy[i]); } } if(project_info.projection < 10) { plot_n = GMT_geo_to_xy_line (xx,yy,n); if(verbose_level > 2) { - fprintf(stderr, "%s: creating %d points\n", PSSAC, plot_n); + fprintf(stderr, "%s: creating %d points\n", PSSAC, plot_n); } if(plot_n == 0) { - fprintf(stderr, "%s: No points to plot -- %s\n", PSSAC, sac_file); + fprintf(stderr, "%s: No points to plot -- %s\n", PSSAC, sac_file); } xp=(double *) GMT_memory (CNULL,plot_n,sizeof (double),PSSAC); yp=(double *) GMT_memory (CNULL,plot_n,sizeof (double),PSSAC); @@ -753,13 +753,13 @@ main (int argc, char **argv) { memcpy ((char *)xp,(char *)xx,plot_n * sizeof (double)); memcpy ((char *)yp,(char *)yy,plot_n * sizeof (double)); for(i = 0; i < plot_n; i++) { - plot_pen[i] = 2; + plot_pen[i] = 2; } } - + if (phase_paint) { if(verbose_level > 1) { - fprintf(stderr, "%s: Painting Phase\n", PSSAC); + fprintf(stderr, "%s: Painting Phase\n", PSSAC); } xxx=(double *) GMT_memory(CNULL,n+2,sizeof (double),PSSAC); yyy=(double *) GMT_memory(CNULL,n+2,sizeof (double),PSSAC); @@ -767,48 +767,48 @@ main (int argc, char **argv) { for(i=1;icam && xx[i]>tt0) { - yyy[ii] = cam; - if (yy[i-1] < cam) - xxx[ii] = xx[i-1]+(cam-yy[i-1])*(xx[i]-xx[i-1])/(yy[i]-yy[i-1]); - if (xxx[ii]tt0) - xxx[ii] = xx[i-1]; - ii++; - xxx[ii] = xxx[ii-1]; - yyy[ii] = yy[i-1]+(xxx[ii-1]-xx[i-1])*(yy[i]-yy[i-1])/(xx[i]-xx[i-1]); - } - ii++; - while(yy[i]>cam && xx[i]cam) { - xxx[ii] = tt1; - if (xx[i]tt0) + xxx[ii] = xx[i-1]; + ii++; + xxx[ii] = xxx[ii-1]; + yyy[ii] = yy[i-1]+(xxx[ii-1]-xx[i-1])*(yy[i]-yy[i-1])/(xx[i]-xx[i-1]); + } + ii++; + while(yy[i]>cam && xx[i]cam) { + xxx[ii] = tt1; + if (xx[i] 1) { - fprintf(stderr, "%s: Painting Phase Negative\n", PSSAC); + fprintf(stderr, "%s: Painting Phase Negative\n", PSSAC); } xxx=(double *) GMT_memory(CNULL,n+2,sizeof (double),PSSAC); yyy=(double *) GMT_memory(CNULL,n+2,sizeof (double),PSSAC); cam = y0+neg_cam0*yscale; /* Loop over all points until neg_tt1 */ for(i=1;i neg_tt0) { - yyy[ii] = cam; - /* If the previous y point is greater than the upper limit, linear interpolate */ - if (yy[i-1] > cam) - xxx[ii] = xx[i-1]+(cam-yy[i-1])*(xx[i]-xx[i-1])/(yy[i]-yy[i-1]); - /* If the previous x point is less than neg_tt0, find the assicaiated y value */ - if (xxx[ii] < neg_tt0) { - xxx[ii] = neg_tt0; - yyy[ii] = yy[i-1]+(neg_tt0-xx[i-1])*(yy[i]-yy[i-1])/(xx[i]-xx[i-1]); - } - else { - xxx[ii] = neg_tt0; - if (xx[i-1] > neg_tt0) - xxx[ii] = xx[i-1]; - ii++; - xxx[ii] = xxx[ii-1]; - yyy[ii] = yy[i-1]+(xxx[ii-1]-xx[i-1])*(yy[i]-yy[i-1])/(xx[i]-xx[i-1]); - } - ii++; - /* Continue until we find another y point above the upper limit - or Reach neg_tt1 in x or we reach the end of i */ - while(yy[i] < cam && xx[i] < neg_tt1 && i < n-1) { - xxx[ii] = xx[i]; - yyy[ii] = yy[i]; - ii++; - i++; - } - - if (yy[i] < cam) { - xxx[ii] = neg_tt1; - if (xx[i] < neg_tt1) - xxx[ii] = xx[i]; - yyy[ii] = yy[i-1]+(xxx[ii]-xx[i-1])*(yy[i]-yy[i-1])/(xx[i]-xx[i-1]); - ii++; - xxx[ii] = xxx[ii-1]; - } else { - xxx[ii] = xx[i-1] + (cam-yy[i-1])*(xx[i]-xx[i-1])/(yy[i]-yy[i-1]); - } - /* Close the polygon */ - yyy[ii] = cam; - ii++; - if ((pn = GMT_geo_to_xy_line(xxx,yyy,ii)) < 3 ) continue; - xxp=(double *) GMT_memory (CNULL,pn,sizeof (double),PSSAC); - yyp=(double *) GMT_memory (CNULL,pn,sizeof (double),PSSAC); - memcpy ((char *)xxp,(char *)GMT_x_plot,pn*sizeof (double)); - memcpy ((char *)yyp,(char *)GMT_y_plot,pn*sizeof (double)); - GMT_fill(xxp, yyp, pn, &fill_neg, FALSE); - free((char *)xxp); - free((char *)yyp); - } /* Finished painting this section of negative values */ + ii = 0; + /* Find a point greater than the initial time and greater that the upper limit */ + if (yy[i] < cam && xx[i] > neg_tt0) { + yyy[ii] = cam; + /* If the previous y point is greater than the upper limit, linear interpolate */ + if (yy[i-1] > cam) + xxx[ii] = xx[i-1]+(cam-yy[i-1])*(xx[i]-xx[i-1])/(yy[i]-yy[i-1]); + /* If the previous x point is less than neg_tt0, find the assicaiated y value */ + if (xxx[ii] < neg_tt0) { + xxx[ii] = neg_tt0; + yyy[ii] = yy[i-1]+(neg_tt0-xx[i-1])*(yy[i]-yy[i-1])/(xx[i]-xx[i-1]); + } + else { + xxx[ii] = neg_tt0; + if (xx[i-1] > neg_tt0) + xxx[ii] = xx[i-1]; + ii++; + xxx[ii] = xxx[ii-1]; + yyy[ii] = yy[i-1]+(xxx[ii-1]-xx[i-1])*(yy[i]-yy[i-1])/(xx[i]-xx[i-1]); + } + ii++; + /* Continue until we find another y point above the upper limit + or Reach neg_tt1 in x or we reach the end of i */ + while(yy[i] < cam && xx[i] < neg_tt1 && i < n-1) { + xxx[ii] = xx[i]; + yyy[ii] = yy[i]; + ii++; + i++; + } + + if (yy[i] < cam) { + xxx[ii] = neg_tt1; + if (xx[i] < neg_tt1) + xxx[ii] = xx[i]; + yyy[ii] = yy[i-1]+(xxx[ii]-xx[i-1])*(yy[i]-yy[i-1])/(xx[i]-xx[i-1]); + ii++; + xxx[ii] = xxx[ii-1]; + } else { + xxx[ii] = xx[i-1] + (cam-yy[i-1])*(xx[i]-xx[i-1])/(yy[i]-yy[i-1]); + } + /* Close the polygon */ + yyy[ii] = cam; + ii++; + if ((pn = GMT_geo_to_xy_line(xxx,yyy,ii)) < 3 ) continue; + xxp=(double *) GMT_memory (CNULL,pn,sizeof (double),PSSAC); + yyp=(double *) GMT_memory (CNULL,pn,sizeof (double),PSSAC); + memcpy ((char *)xxp,(char *)GMT_x_plot,pn*sizeof (double)); + memcpy ((char *)yyp,(char *)GMT_y_plot,pn*sizeof (double)); + GMT_fill(xxp, yyp, pn, &fill_neg, FALSE); + free((char *)xxp); + free((char *)yyp); + } /* Finished painting this section of negative values */ } /* Finished with the entire trace */ free((char *)xxx); free((char *)yyy); } - + if(verbose_level > 2) { fprintf(stderr, "%s: plotting %d points\n", PSSAC, plot_n); } if(verbose_level > 3) { fprintf(stderr, "%s: projecting %d points\n", PSSAC, n); for(i = 0; i < n; i++) { - fprintf(stderr, "%s: (pt) => %d: (x,y) => (%f, %f)\n", PSSAC, i,xp[i],yp[i]); + fprintf(stderr, "%s: (pt) => %d: (x,y) => (%f, %f)\n", PSSAC, i,xp[i],yp[i]); } } GMT_plot_line(xp, yp, plot_pen, plot_n); @@ -908,18 +908,18 @@ main (int argc, char **argv) { sprintf(timescale_txt, "%.0f secs.", secs_per_measure * timescale_len); #if ( GMT_VERSION_MAJOR < 4 ) GMT_text3d(timescale_x, timescale_y - timescale_bar/2, project_info.z_level, - timescale_font_size, gmtdefs.anot_font, timescale_txt, - 0.0, 10, 0); + timescale_font_size, gmtdefs.anot_font, timescale_txt, + 0.0, 10, 0); #else GMT_text3D(timescale_x, timescale_y - timescale_bar/2, project_info.z_level, - timescale_font_size, gmtdefs.annot_font[0], timescale_txt, - 0.0, 10, 0); + timescale_font_size, gmtdefs.annot_font[0], timescale_txt, + 0.0, 10, 0); #endif } if(clipping_on == TRUE) { GMT_map_clip_off (); } - + GMT_init_pen(&pen,1); GMT_setpen(&pen); if (frame_info.plot) { @@ -931,7 +931,7 @@ main (int argc, char **argv) { #if (GMT_VERSION_MAJOR < 4) ps_plotend (gmtdefs.last_page); GMT_end (argc,argv); -#else +#else GMT_plotend(); #endif return(1); diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/measure_adj/UTIL/pssac2/sac.h b/utils/ADJOINT_TOMOGRAPHY_TOOLS/measure_adj/UTIL/pssac2/sac.h index 294016007..fd13da3b7 100644 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/measure_adj/UTIL/pssac2/sac.h +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/measure_adj/UTIL/pssac2/sac.h @@ -1,41 +1,41 @@ /************************************************************************* - Name: sac.h + Name: sac.h - Purpose: structure for header of a SAC (Seismic Analysis Code) - data file, and prototype for basic SAC I/O + Purpose: structure for header of a SAC (Seismic Analysis Code) + data file, and prototype for basic SAC I/O - Notes: Key to comment flags describing each field: - Column 1: - R required by SAC - (blank) optional - Column 2: - A = settable from a priori knowledge - D = available in data - F = available in or derivable from SEED fixed data header - T = available in SEED header tables - (blank) = not directly available from SEED data, header - tables, or elsewhere + Notes: Key to comment flags describing each field: + Column 1: + R required by SAC + (blank) optional + Column 2: + A = settable from a priori knowledge + D = available in data + F = available in or derivable from SEED fixed data header + T = available in SEED header tables + (blank) = not directly available from SEED data, header + tables, or elsewhere - Problems: none known + Problems: none known - References: O'Neill, D. (1987). IRIS Interim Data Distribution Format + References: O'Neill, D. (1987). IRIS Interim Data Distribution Format (SAC ASCII), Version 1.0 (12 November 1987). Incorporated - Research Institutions for Seismology, 1616 North Fort Myer - Drive, Suite 1440, Arlington, Virginia 22209. 11 pp. - Tull, J. (1987). SAC User's Manual, Version 10.2, October 7, - 1987. Lawrence Livermore National Laboratory, L-205, - Livermore, California 94550. ??? pp. + Research Institutions for Seismology, 1616 North Fort Myer + Drive, Suite 1440, Arlington, Virginia 22209. 11 pp. + Tull, J. (1987). SAC User's Manual, Version 10.2, October 7, + 1987. Lawrence Livermore National Laboratory, L-205, + Livermore, California 94550. ??? pp. - Language: C, hopefully ANSI standard + Language: C, hopefully ANSI standard - Author: Dennis O'Neill + Author: Dennis O'Neill - Revisions: 07/15/88 Dennis O'Neill Initial preliminary release 0.9 + Revisions: 07/15/88 Dennis O'Neill Initial preliminary release 0.9 11/21/88 Dennis O'Neill Production release 1.0 - 01/27/91 Lorraine Hwang Header number is now version 6 - 07/06/93 Xiaoming Ding structure name sac -> sac_head - typedef structure to be SACHEAD - 12/06/96 Lupei Zhu prototype sacio functions + 01/27/91 Lorraine Hwang Header number is now version 6 + 07/06/93 Xiaoming Ding structure name sac -> sac_head + typedef structure to be SACHEAD + 12/06/96 Lupei Zhu prototype sacio functions **************************************************************************/ @@ -44,221 +44,221 @@ typedef struct sac_head { - float delta; /* RF time increment, sec */ - float depmin; /* minimum amplitude */ - float depmax; /* maximum amplitude */ - float scale; /* amplitude scale factor */ - float odelta; /* observed time inc */ - float b; /* RD initial time - wrt nz* */ - float e; /* RD end time */ - float o; /* event start */ - float a; /* 1st arrival time */ - float internal1; /* internal use */ - float t0; /* user-defined time pick */ - float t1; /* user-defined time pick */ - float t2; /* user-defined time pick */ - float t3; /* user-defined time pick */ - float t4; /* user-defined time pick */ - float t5; /* user-defined time pick */ - float t6; /* user-defined time pick */ - float t7; /* user-defined time pick */ - float t8; /* user-defined time pick */ - float t9; /* user-defined time pick */ - float f; /* event end, sec > 0 */ - float resp0; /* instrument respnse parm*/ - float resp1; /* instrument respnse parm*/ - float resp2; /* instrument respnse parm*/ - float resp3; /* instrument respnse parm*/ - float resp4; /* instrument respnse parm*/ - float resp5; /* instrument respnse parm*/ - float resp6; /* instrument respnse parm*/ - float resp7; /* instrument respnse parm*/ - float resp8; /* instrument respnse parm*/ - float resp9; /* instrument respnse parm*/ - float stla; /* T station latititude */ - float stlo; /* T station longitude */ - float stel; /* T station elevation, m */ - float stdp; /* T station depth, m */ - float evla; /* event latitude */ - float evlo; /* event longitude */ - float evel; /* event elevation */ - float evdp; /* event depth */ - float unused1; /* reserved for future use*/ - float user0; /* available to user */ - float user1; /* available to user */ - float user2; /* available to user */ - float user3; /* available to user */ - float user4; /* available to user */ - float user5; /* available to user */ - float user6; /* available to user */ - float user7; /* available to user */ - float user8; /* available to user */ - float user9; /* available to user */ - float dist; /* stn-event distance, km */ - float az; /* event-stn azimuth */ - float baz; /* stn-event azimuth */ - float gcarc; /* stn-event dist, degrees*/ - float internal2; /* internal use */ - float internal3; /* internal use */ - float depmen; /* mean value, amplitude */ - float cmpaz; /* T component azimuth */ - float cmpinc; /* T component inclination */ - float unused2; /* reserved for future use*/ - float unused3; /* reserved for future use*/ - float unused4; /* reserved for future use*/ - float unused5; /* reserved for future use*/ - float unused6; /* reserved for future use*/ - float unused7; /* reserved for future use*/ - float unused8; /* reserved for future use*/ - float unused9; /* reserved for future use*/ - float unused10; /* reserved for future use*/ - float unused11; /* reserved for future use*/ - float unused12; /* reserved for future use*/ - int nzyear; /* F zero time of file, yr */ - int nzjday; /* F zero time of file, day */ - int nzhour; /* F zero time of file, hr */ - int nzmin; /* F zero time of file, min */ - int nzsec; /* F zero time of file, sec */ - int nzmsec; /* F zero time of file, msec*/ - int internal4; /* R header version number */ - int internal5; /* internal use */ - int internal6; /* internal use */ - int npts; /* RF number of samples */ - int internal7; /* internal use */ - int internal8; /* internal use */ - int unused13; /* reserved for future use*/ - int unused14; /* reserved for future use*/ - int unused15; /* reserved for future use*/ - int iftype; /* RA type of file */ - int idep; /* type of amplitude */ - int iztype; /* zero time equivalence */ - int unused16; /* reserved for future use*/ - int iinst; /* recording instrument */ - int istreg; /* stn geographic region */ - int ievreg; /* event geographic region*/ - int ievtyp; /* event type */ - int iqual; /* quality of data */ - int isynth; /* synthetic data flag */ - int unused17; /* reserved for future use*/ - int unused18; /* reserved for future use*/ - int unused19; /* reserved for future use*/ - int unused20; /* reserved for future use*/ - int unused21; /* reserved for future use*/ - int unused22; /* reserved for future use*/ - int unused23; /* reserved for future use*/ - int unused24; /* reserved for future use*/ - int unused25; /* reserved for future use*/ - int unused26; /* reserved for future use*/ - int leven; /* RA data-evenly-spaced flag*/ - int lpspol; /* station polarity flag */ - int lovrok; /* overwrite permission */ - int lcalda; /* calc distance, azimuth */ - int unused27; /* reserved for future use*/ - char kstnm[8]; /* F station name */ - char kevnm[16]; /* event name */ - char khole[8]; /* man-made event name */ - char ko[8]; /* event origin time id */ - char ka[8]; /* 1st arrival time ident */ - char kt0[8]; /* time pick 0 ident */ - char kt1[8]; /* time pick 1 ident */ - char kt2[8]; /* time pick 2 ident */ - char kt3[8]; /* time pick 3 ident */ - char kt4[8]; /* time pick 4 ident */ - char kt5[8]; /* time pick 5 ident */ - char kt6[8]; /* time pick 6 ident */ - char kt7[8]; /* time pick 7 ident */ - char kt8[8]; /* time pick 8 ident */ - char kt9[8]; /* time pick 9 ident */ - char kf[8]; /* end of event ident */ - char kuser0[8]; /* available to user */ - char kuser1[8]; /* available to user */ - char kuser2[8]; /* available to user */ - char kcmpnm[8]; /* F component name */ - char knetwk[8]; /* network name */ - char kdatrd[8]; /* date data read */ - char kinst[8]; /* instrument name */ + float delta; /* RF time increment, sec */ + float depmin; /* minimum amplitude */ + float depmax; /* maximum amplitude */ + float scale; /* amplitude scale factor */ + float odelta; /* observed time inc */ + float b; /* RD initial time - wrt nz* */ + float e; /* RD end time */ + float o; /* event start */ + float a; /* 1st arrival time */ + float internal1; /* internal use */ + float t0; /* user-defined time pick */ + float t1; /* user-defined time pick */ + float t2; /* user-defined time pick */ + float t3; /* user-defined time pick */ + float t4; /* user-defined time pick */ + float t5; /* user-defined time pick */ + float t6; /* user-defined time pick */ + float t7; /* user-defined time pick */ + float t8; /* user-defined time pick */ + float t9; /* user-defined time pick */ + float f; /* event end, sec > 0 */ + float resp0; /* instrument respnse parm*/ + float resp1; /* instrument respnse parm*/ + float resp2; /* instrument respnse parm*/ + float resp3; /* instrument respnse parm*/ + float resp4; /* instrument respnse parm*/ + float resp5; /* instrument respnse parm*/ + float resp6; /* instrument respnse parm*/ + float resp7; /* instrument respnse parm*/ + float resp8; /* instrument respnse parm*/ + float resp9; /* instrument respnse parm*/ + float stla; /* T station latititude */ + float stlo; /* T station longitude */ + float stel; /* T station elevation, m */ + float stdp; /* T station depth, m */ + float evla; /* event latitude */ + float evlo; /* event longitude */ + float evel; /* event elevation */ + float evdp; /* event depth */ + float unused1; /* reserved for future use*/ + float user0; /* available to user */ + float user1; /* available to user */ + float user2; /* available to user */ + float user3; /* available to user */ + float user4; /* available to user */ + float user5; /* available to user */ + float user6; /* available to user */ + float user7; /* available to user */ + float user8; /* available to user */ + float user9; /* available to user */ + float dist; /* stn-event distance, km */ + float az; /* event-stn azimuth */ + float baz; /* stn-event azimuth */ + float gcarc; /* stn-event dist, degrees*/ + float internal2; /* internal use */ + float internal3; /* internal use */ + float depmen; /* mean value, amplitude */ + float cmpaz; /* T component azimuth */ + float cmpinc; /* T component inclination */ + float unused2; /* reserved for future use*/ + float unused3; /* reserved for future use*/ + float unused4; /* reserved for future use*/ + float unused5; /* reserved for future use*/ + float unused6; /* reserved for future use*/ + float unused7; /* reserved for future use*/ + float unused8; /* reserved for future use*/ + float unused9; /* reserved for future use*/ + float unused10; /* reserved for future use*/ + float unused11; /* reserved for future use*/ + float unused12; /* reserved for future use*/ + int nzyear; /* F zero time of file, yr */ + int nzjday; /* F zero time of file, day */ + int nzhour; /* F zero time of file, hr */ + int nzmin; /* F zero time of file, min */ + int nzsec; /* F zero time of file, sec */ + int nzmsec; /* F zero time of file, msec*/ + int internal4; /* R header version number */ + int internal5; /* internal use */ + int internal6; /* internal use */ + int npts; /* RF number of samples */ + int internal7; /* internal use */ + int internal8; /* internal use */ + int unused13; /* reserved for future use*/ + int unused14; /* reserved for future use*/ + int unused15; /* reserved for future use*/ + int iftype; /* RA type of file */ + int idep; /* type of amplitude */ + int iztype; /* zero time equivalence */ + int unused16; /* reserved for future use*/ + int iinst; /* recording instrument */ + int istreg; /* stn geographic region */ + int ievreg; /* event geographic region*/ + int ievtyp; /* event type */ + int iqual; /* quality of data */ + int isynth; /* synthetic data flag */ + int unused17; /* reserved for future use*/ + int unused18; /* reserved for future use*/ + int unused19; /* reserved for future use*/ + int unused20; /* reserved for future use*/ + int unused21; /* reserved for future use*/ + int unused22; /* reserved for future use*/ + int unused23; /* reserved for future use*/ + int unused24; /* reserved for future use*/ + int unused25; /* reserved for future use*/ + int unused26; /* reserved for future use*/ + int leven; /* RA data-evenly-spaced flag*/ + int lpspol; /* station polarity flag */ + int lovrok; /* overwrite permission */ + int lcalda; /* calc distance, azimuth */ + int unused27; /* reserved for future use*/ + char kstnm[8]; /* F station name */ + char kevnm[16]; /* event name */ + char khole[8]; /* man-made event name */ + char ko[8]; /* event origin time id */ + char ka[8]; /* 1st arrival time ident */ + char kt0[8]; /* time pick 0 ident */ + char kt1[8]; /* time pick 1 ident */ + char kt2[8]; /* time pick 2 ident */ + char kt3[8]; /* time pick 3 ident */ + char kt4[8]; /* time pick 4 ident */ + char kt5[8]; /* time pick 5 ident */ + char kt6[8]; /* time pick 6 ident */ + char kt7[8]; /* time pick 7 ident */ + char kt8[8]; /* time pick 8 ident */ + char kt9[8]; /* time pick 9 ident */ + char kf[8]; /* end of event ident */ + char kuser0[8]; /* available to user */ + char kuser1[8]; /* available to user */ + char kuser2[8]; /* available to user */ + char kcmpnm[8]; /* F component name */ + char knetwk[8]; /* network name */ + char kdatrd[8]; /* date data read */ + char kinst[8]; /* instrument name */ } SACHEAD; /* definitions of constants for SAC enumerated data values */ /* undocumented == couldn't find a definition for it (denio, 07/15/88) */ -#define IREAL 0 /* undocumented */ -#define ITIME 1 /* file: time series data */ -#define IRLIM 2 /* file: real&imag spectrum */ -#define IAMPH 3 /* file: ampl&phas spectrum */ -#define IXY 4 /* file: gen'l x vs y data */ -#define IUNKN 5 /* x data: unknown type */ - /* zero time: unknown */ - /* event type: unknown */ -#define IDISP 6 /* x data: displacement (nm) */ -#define IVEL 7 /* x data: velocity (nm/sec) */ -#define IACC 8 /* x data: accel (cm/sec/sec)*/ -#define IB 9 /* zero time: start of file */ -#define IDAY 10 /* zero time: 0000 of GMT day*/ -#define IO 11 /* zero time: event origin */ -#define IA 12 /* zero time: 1st arrival */ -#define IT0 13 /* zero time: user timepick 0*/ -#define IT1 14 /* zero time: user timepick 1*/ -#define IT2 15 /* zero time: user timepick 2*/ -#define IT3 16 /* zero time: user timepick 3*/ -#define IT4 17 /* zero time: user timepick 4*/ -#define IT5 18 /* zero time: user timepick 5*/ -#define IT6 19 /* zero time: user timepick 6*/ -#define IT7 20 /* zero time: user timepick 7*/ -#define IT8 21 /* zero time: user timepick 8*/ -#define IT9 22 /* zero time: user timepick 9*/ -#define IRADNV 23 /* undocumented */ -#define ITANNV 24 /* undocumented */ -#define IRADEV 25 /* undocumented */ -#define ITANEV 26 /* undocumented */ -#define INORTH 27 /* undocumented */ -#define IEAST 28 /* undocumented */ -#define IHORZA 29 /* undocumented */ -#define IDOWN 30 /* undocumented */ -#define IUP 31 /* undocumented */ -#define ILLLBB 32 /* undocumented */ -#define IWWSN1 33 /* undocumented */ -#define IWWSN2 34 /* undocumented */ -#define IHGLP 35 /* undocumented */ -#define ISRO 36 /* undocumented */ -#define INUCL 37 /* event type: nuclear shot */ -#define IPREN 38 /* event type: nuke pre-shot */ -#define IPOSTN 39 /* event type: nuke post-shot*/ -#define IQUAKE 40 /* event type: earthquake */ -#define IPREQ 41 /* event type: foreshock */ -#define IPOSTQ 42 /* event type: aftershock */ -#define ICHEM 43 /* event type: chemical expl */ -#define IOTHER 44 /* event type: other source */ - /* data quality: other problm*/ -#define IGOOD 45 /* data quality: good */ -#define IGLCH 46 /* data quality: has glitches*/ -#define IDROP 47 /* data quality: has dropouts*/ -#define ILOWSN 48 /* data quality: low s/n */ -#define IRLDTA 49 /* data is real data */ -#define IVOLTS 50 /* file: velocity (volts) */ -#define INIV51 51 /* undocumented */ -#define INIV52 52 /* undocumented */ -#define INIV53 53 /* undocumented */ -#define INIV54 54 /* undocumented */ -#define INIV55 55 /* undocumented */ -#define INIV56 56 /* undocumented */ -#define INIV57 57 /* undocumented */ -#define INIV58 58 /* undocumented */ -#define INIV59 59 /* undocumented */ -#define INIV60 60 /* undocumented */ +#define IREAL 0 /* undocumented */ +#define ITIME 1 /* file: time series data */ +#define IRLIM 2 /* file: real&imag spectrum */ +#define IAMPH 3 /* file: ampl&phas spectrum */ +#define IXY 4 /* file: gen'l x vs y data */ +#define IUNKN 5 /* x data: unknown type */ + /* zero time: unknown */ + /* event type: unknown */ +#define IDISP 6 /* x data: displacement (nm) */ +#define IVEL 7 /* x data: velocity (nm/sec) */ +#define IACC 8 /* x data: accel (cm/sec/sec)*/ +#define IB 9 /* zero time: start of file */ +#define IDAY 10 /* zero time: 0000 of GMT day*/ +#define IO 11 /* zero time: event origin */ +#define IA 12 /* zero time: 1st arrival */ +#define IT0 13 /* zero time: user timepick 0*/ +#define IT1 14 /* zero time: user timepick 1*/ +#define IT2 15 /* zero time: user timepick 2*/ +#define IT3 16 /* zero time: user timepick 3*/ +#define IT4 17 /* zero time: user timepick 4*/ +#define IT5 18 /* zero time: user timepick 5*/ +#define IT6 19 /* zero time: user timepick 6*/ +#define IT7 20 /* zero time: user timepick 7*/ +#define IT8 21 /* zero time: user timepick 8*/ +#define IT9 22 /* zero time: user timepick 9*/ +#define IRADNV 23 /* undocumented */ +#define ITANNV 24 /* undocumented */ +#define IRADEV 25 /* undocumented */ +#define ITANEV 26 /* undocumented */ +#define INORTH 27 /* undocumented */ +#define IEAST 28 /* undocumented */ +#define IHORZA 29 /* undocumented */ +#define IDOWN 30 /* undocumented */ +#define IUP 31 /* undocumented */ +#define ILLLBB 32 /* undocumented */ +#define IWWSN1 33 /* undocumented */ +#define IWWSN2 34 /* undocumented */ +#define IHGLP 35 /* undocumented */ +#define ISRO 36 /* undocumented */ +#define INUCL 37 /* event type: nuclear shot */ +#define IPREN 38 /* event type: nuke pre-shot */ +#define IPOSTN 39 /* event type: nuke post-shot*/ +#define IQUAKE 40 /* event type: earthquake */ +#define IPREQ 41 /* event type: foreshock */ +#define IPOSTQ 42 /* event type: aftershock */ +#define ICHEM 43 /* event type: chemical expl */ +#define IOTHER 44 /* event type: other source */ + /* data quality: other problm*/ +#define IGOOD 45 /* data quality: good */ +#define IGLCH 46 /* data quality: has glitches*/ +#define IDROP 47 /* data quality: has dropouts*/ +#define ILOWSN 48 /* data quality: low s/n */ +#define IRLDTA 49 /* data is real data */ +#define IVOLTS 50 /* file: velocity (volts) */ +#define INIV51 51 /* undocumented */ +#define INIV52 52 /* undocumented */ +#define INIV53 53 /* undocumented */ +#define INIV54 54 /* undocumented */ +#define INIV55 55 /* undocumented */ +#define INIV56 56 /* undocumented */ +#define INIV57 57 /* undocumented */ +#define INIV58 58 /* undocumented */ +#define INIV59 59 /* undocumented */ +#define INIV60 60 /* undocumented */ /* True/false definitions */ #ifndef TRUE -#define FALSE 0 -#define TRUE 1 +#define FALSE 0 +#define TRUE 1 #endif /* Format strings for writing headers for SAC ASCII files */ -#define FCS "%15.7f%15.7f%15.7f%15.7f%15.7f\n" /* for floats */ -#define ICS "%10d%10d%10d%10d%10d\n" /* for integers */ -#define CCS1 "%-8.8s%-8.8s%-8.8s\n" /* for strings */ -#define CCS2 "%-8.8s%-16.16s\n" /* for strings */ +#define FCS "%15.7f%15.7f%15.7f%15.7f%15.7f\n" /* for floats */ +#define ICS "%10d%10d%10d%10d%10d\n" /* for integers */ +#define CCS1 "%-8.8s%-8.8s%-8.8s\n" /* for strings */ +#define CCS2 "%-8.8s%-16.16s\n" /* for strings */ #ifdef SAC_NULL @@ -305,19 +305,19 @@ static SACHEAD sac_null = { /* number of bytes in header that need to be swapped on PC (int+float+long)*/ #define HD_SIZE 440 -#define TMARK 10 -#define USERN 40 +#define TMARK 10 +#define USERN 40 /* prototype for SACIO functions */ -int read_sachead(const char *, SACHEAD *); -float *read_sac(const char *, SACHEAD *); -float *read_sac_swap(const char *, SACHEAD *, int do_swap); -float *read_sac2(const char *, SACHEAD *, int, float, int); -void sacUdata(float *, int, float *, int, int); -int write_sac(const char *, SACHEAD, const float *); -int wrtsac0(const char *, float, int, float, float, const float *); -int wrtsac2(const char *, int, const float *x, const float *y); -void swab4(char *, int); +int read_sachead(const char *, SACHEAD *); +float *read_sac(const char *, SACHEAD *); +float *read_sac_swap(const char *, SACHEAD *, int do_swap); +float *read_sac2(const char *, SACHEAD *, int, float, int); +void sacUdata(float *, int, float *, int, int); +int write_sac(const char *, SACHEAD, const float *); +int wrtsac0(const char *, float, int, float, float, const float *); +int wrtsac2(const char *, int, const float *x, const float *y); +void swab4(char *, int); void rtrend(float *, int); #endif diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/measure_adj/UTIL/pssac2/sacio.c b/utils/ADJOINT_TOMOGRAPHY_TOOLS/measure_adj/UTIL/pssac2/sacio.c index 0d382f6cf..1af1f8d31 100644 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/measure_adj/UTIL/pssac2/sacio.c +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/measure_adj/UTIL/pssac2/sacio.c @@ -1,16 +1,16 @@ /******************************************************************* -* sacio.c +* sacio.c * SAC I/O functions: -* read_sachead read SAC header -* read_sac read SAC binary data -* read_sac2 read SAC data with cut option -* write_sac write SAC binary data -* wrtsac0 write 1D array as evenly-spaced SAC binary data -* wrtsac0_ fortran wrap for wrtsac0 -* wrtsac2 write 2 1D arrays as XY SAC data -* wrtsac2_ fortran wrap for wrtsac2 -* swab4 reverse byte order for integer/float -* rtrend remove trend +* read_sachead read SAC header +* read_sac read SAC binary data +* read_sac2 read SAC data with cut option +* write_sac write SAC binary data +* wrtsac0 write 1D array as evenly-spaced SAC binary data +* wrtsac0_ fortran wrap for wrtsac0 +* wrtsac2 write 2 1D arrays as XY SAC data +* wrtsac2_ fortran wrap for wrtsac2 +* swab4 reverse byte order for integer/float +* rtrend remove trend *********************************************************************/ @@ -27,25 +27,25 @@ read_sachead - Description: read binary SAC header from file. + Description: read binary SAC header from file. - Author: Lupei Zhu + Author: Lupei Zhu - Arguments: const char *name file name - SACHEAD *hd SAC header to be filled + Arguments: const char *name file name + SACHEAD *hd SAC header to be filled - Return: 0 if success, -1 if failed + Return: 0 if success, -1 if failed Modify history: - 05/29/97 Lupei Zhu Initial coding + 05/29/97 Lupei Zhu Initial coding ************************************************************/ -int read_sachead(const char *name, - SACHEAD *hd - ) +int read_sachead(const char *name, + SACHEAD *hd + ) { - FILE *strm; - + FILE *strm; + if ((strm = fopen(name, "rb")) == NULL) { fprintf(stderr, "Unable to open %s\n",name); return -1; @@ -71,30 +71,30 @@ int read_sachead(const char *name, read_sac - Description: read binary data from file. If succeed, it will return - a float pointer to the read data array. The SAC header - is also filled. A NULL pointer is returned if failed. + Description: read binary data from file. If succeed, it will return + a float pointer to the read data array. The SAC header + is also filled. A NULL pointer is returned if failed. - Author: Lupei Zhu + Author: Lupei Zhu - Arguments: const char *name file name - SACHEAD *hd SAC header to be filled + Arguments: const char *name file name + SACHEAD *hd SAC header to be filled - Return: float pointer to the data array, NULL if failed + Return: float pointer to the data array, NULL if failed Modify history: - 09/20/93 Lupei Zhu Initial coding - 12/05/96 Lupei Zhu adding error handling - 12/06/96 Lupei Zhu swap byte-order on PC + 09/20/93 Lupei Zhu Initial coding + 12/05/96 Lupei Zhu adding error handling + 12/06/96 Lupei Zhu swap byte-order on PC ************************************************************/ -float* read_sac(const char *name, - SACHEAD *hd - ) +float* read_sac(const char *name, + SACHEAD *hd + ) { - FILE *strm; - float *ar; - unsigned sz; + FILE *strm; + float *ar; + unsigned sz; if ((strm = fopen(name, "rb")) == NULL) { fprintf(stderr, "Unable to open %s\n",name); @@ -138,7 +138,7 @@ float* read_sac(const char *name, = 0 Do not byte swap Returns: 0 - No swapping needs to be done - 1 - Swapping is needed + 1 - Swapping is needed */ int sac_byte_order(SACHEAD *hd) { @@ -150,16 +150,16 @@ sac_byte_order(SACHEAD *hd) { } -float* read_sac_swap(const char *name, - SACHEAD *hd, - int do_swap - ) +float* read_sac_swap(const char *name, + SACHEAD *hd, + int do_swap + ) { - FILE *strm; - float *ar; - unsigned sz; + FILE *strm; + float *ar; + unsigned sz; int swap; - + if ((strm = fopen(name, "rb")) == NULL) { fprintf(stderr, "Unable to open %s\n",name); fclose(strm); @@ -176,9 +176,9 @@ float* read_sac_swap(const char *name, if(do_swap) { swab4((char *) hd, HD_SIZE); if(sac_byte_order(hd)) { - fprintf(stderr, "Error deciphering SAC header %s\n", name); - fclose(strm); - return(NULL); + fprintf(stderr, "Error deciphering SAC header %s\n", name); + fclose(strm); + return(NULL); } } else { fprintf(stderr, "Error deciphering SAC header %s\n", name); @@ -187,7 +187,7 @@ float* read_sac_swap(const char *name, } } - + sz = hd->npts*sizeof(float); if ((ar = (float *) malloc(sz)) == NULL) { fprintf(stderr, "Error in allocating memory for reading %s\n",name); @@ -216,7 +216,7 @@ float* read_sac_swap(const char *name, } return ar; - + } @@ -224,31 +224,31 @@ float* read_sac_swap(const char *name, write_sac - Description: write SAC binary data. + Description: write SAC binary data. - Author: Lupei Zhu + Author: Lupei Zhu - Arguments: const char *name file name - SACHEAD hd SAC header - const float *ar pointer to the data + Arguments: const char *name file name + SACHEAD hd SAC header + const float *ar pointer to the data - Return: 0 if succeed; -1 if failed + Return: 0 if succeed; -1 if failed Modify history: - 09/20/93 Lupei Zhu Initial coding - 12/05/96 Lupei Zhu adding error handling - 12/06/96 Lupei Zhu swap byte-order on PC + 09/20/93 Lupei Zhu Initial coding + 12/05/96 Lupei Zhu adding error handling + 12/06/96 Lupei Zhu swap byte-order on PC ************************************************************/ -int write_sac(const char *name, - SACHEAD hd, - const float *ar - ) +int write_sac(const char *name, + SACHEAD hd, + const float *ar + ) { - FILE *strm; - unsigned sz; - float *data; - int error = 0; + FILE *strm; + unsigned sz; + float *data; + int error = 0; strm = NULL; sz = hd.npts*sizeof(float); @@ -297,23 +297,23 @@ int write_sac(const char *name, swab4 - Description: reverse byte order for float/integer + Description: reverse byte order for float/integer - Author: Lupei Zhu + Author: Lupei Zhu - Arguments: char *pt pointer to byte array - int n number of bytes + Arguments: char *pt pointer to byte array + int n number of bytes - Return: none + Return: none Modify history: - 12/03/96 Lupei Zhu Initial coding + 12/03/96 Lupei Zhu Initial coding ************************************************************/ -void swab4( char *pt, - int n - ) +void swab4( char *pt, + int n + ) { int i; char temp; @@ -333,35 +333,35 @@ void swab4( char *pt, wrtsac0 - Description: write 1D array into evenly spaced SAC data. + Description: write 1D array into evenly spaced SAC data. - Author: Lupei Zhu + Author: Lupei Zhu - Arguments: const char *name file name - float dt sampling interval - int ns number of points - float b0 starting time - float dist distance range - const float *ar data array + Arguments: const char *name file name + float dt sampling interval + int ns number of points + float b0 starting time + float dist distance range + const float *ar data array - Return: 0 if succeed; -1 if failed + Return: 0 if succeed; -1 if failed Modify history: - 09/20/93 Lupei Zhu Initial coding - 12/05/96 Lupei Zhu adding error handling - 12/06/96 Lupei Zhu swab byte-order on PC + 09/20/93 Lupei Zhu Initial coding + 12/05/96 Lupei Zhu adding error handling + 12/06/96 Lupei Zhu swab byte-order on PC ************************************************************/ -int wrtsac0(const char *name, - float dt, - int ns, - float b0, - float dist, - const float *ar - ) +int wrtsac0(const char *name, + float dt, + int ns, + float b0, + float dist, + const float *ar + ) { - SACHEAD hd = sac_null; + SACHEAD hd = sac_null; hd.npts = ns; hd.delta = dt; @@ -376,40 +376,40 @@ int wrtsac0(const char *name, return write_sac(name, hd, ar); } - + /*********************************************************** wrtsac2 - Description: write 2 arrays into XY SAC data. + Description: write 2 arrays into XY SAC data. - Author: Lupei Zhu + Author: Lupei Zhu - Arguments: const char *name file name - int ns number of points - const float *x x data array - const float *y y data array + Arguments: const char *name file name + int ns number of points + const float *x x data array + const float *y y data array - Return: 0 succeed, -1 fail + Return: 0 succeed, -1 fail Modify history: - 09/20/93 Lupei Zhu Initial coding - 12/05/96 Lupei Zhu adding error handling - 12/06/96 Lupei Zhu swap byte-order on PC + 09/20/93 Lupei Zhu Initial coding + 12/05/96 Lupei Zhu adding error handling + 12/06/96 Lupei Zhu swap byte-order on PC ************************************************************/ -int wrtsac2(const char *name, - int n, - const float *x, - const float *y - ) +int wrtsac2(const char *name, + int n, + const float *x, + const float *y + ) { - SACHEAD hd = sac_null; - float *ar; - unsigned sz; - int exit_code; + SACHEAD hd = sac_null; + float *ar; + unsigned sz; + int exit_code; hd.npts = n; hd.iftype = IXY; @@ -434,9 +434,9 @@ int wrtsac2(const char *name, } exit_code = write_sac(name, hd, ar); - + free(ar); - + return exit_code; } @@ -466,35 +466,35 @@ void wrtsac2_(const char *name, int n, const float *x, const float *y) { read_sac2 - Description: read portion ofdata from file. If succeed, it will return - a float pointer to the read data array. The SAC header - is also filled. A NULL pointer is returned if failed. + Description: read portion ofdata from file. If succeed, it will return + a float pointer to the read data array. The SAC header + is also filled. A NULL pointer is returned if failed. - Author: Lupei Zhu + Author: Lupei Zhu - Arguments: const char *name file name - SACHEAD *hd SAC header to be filled - int tmark, time mark in sac header - float t1 begin time is tmark + t1 - int npts number of points + Arguments: const char *name file name + SACHEAD *hd SAC header to be filled + int tmark, time mark in sac header + float t1 begin time is tmark + t1 + int npts number of points - Return: float pointer to the data array, NULL if failed + Return: float pointer to the data array, NULL if failed Modify history: - 11/08/00 Lupei Zhu Initial coding + 11/08/00 Lupei Zhu Initial coding ************************************************************/ -float* read_sac2(const char *name, - SACHEAD *hd, - int tmark, - float t1, - int npts - ) +float* read_sac2(const char *name, + SACHEAD *hd, + int tmark, + float t1, + int npts + ) { - FILE *strm; - int i, nt1, nt2; - float *ar, *fpt; - void rtrend(float *, int); + FILE *strm; + int i, nt1, nt2; + float *ar, *fpt; + void rtrend(float *, int); if ((strm = fopen(name, "rb")) == NULL) { fprintf(stderr, "Unable to open %s\n",name); @@ -525,8 +525,8 @@ float* read_sac2(const char *name, if (nt1 > 0 ) { if (fseek(strm,nt1*sizeof(float),SEEK_CUR) < 0) { - fprintf(stderr, "error in seek %s\n",name); - return NULL; + fprintf(stderr, "error in seek %s\n",name); + return NULL; } fpt = ar; } else { @@ -556,7 +556,7 @@ float* read_sac2(const char *name, } /* remove trend a*i + b */ -void rtrend(float *y, int n) { +void rtrend(float *y, int n) { int i; double a, b, a11, a12, a22, y1, y2; y1 = y2 = 0.; @@ -568,7 +568,7 @@ void rtrend(float *y, int n) { a11 = a12*(2*n-1)/3.; a22 = n; b = a11*a22-a12*a12; - a = (a22*y1-a12*y2)/b; + a = (a22*y1-a12*y2)/b; b = (a11*y2-a12*y1)/b; for(i=0;i $dir_new/$snc.adj"); - - } elsif ($nmatch == 2) { # sum the two adjoint sources + + } elsif ($nmatch == 2) { # sum the two adjoint sources if (-f $afile1 && -f $afile2) { system("paste $afile1 $afile2 | awk '{print \$1, \$2+\$4}' > $dir_new/$snc.adj"); } elsif (-f $afile1 && -f $afile3) { - system("paste $afile1 $afile3 | awk '{print \$1, \$2+\$4}' > $dir_new/$snc.adj"); + system("paste $afile1 $afile3 | awk '{print \$1, \$2+\$4}' > $dir_new/$snc.adj"); } elsif (-f $afile2 && -f $afile3) { - system("paste $afile2 $afile3 | awk '{print \$1, \$2+\$4}' > $dir_new/$snc.adj"); + system("paste $afile2 $afile3 | awk '{print \$1, \$2+\$4}' > $dir_new/$snc.adj"); } - + } elsif ($nmatch == 1) { # copy over the lone-station adjoint sources if (-f $afile1) {system("cp -f $afile1 $dir_new/$snc.adj >& /dev/null");} if (-f $afile2) {system("cp -f $afile2 $dir_new/$snc.adj >& /dev/null");} if (-f $afile3) {system("cp -f $afile3 $dir_new/$snc.adj >& /dev/null");} - } else { # error + } else { # error die("combine_3_adj_src.pl: NO MATCHES\n"); } } diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/measure_adj/scripts_tomo/combine_3_adj_src_all.pl b/utils/ADJOINT_TOMOGRAPHY_TOOLS/measure_adj/scripts_tomo/combine_3_adj_src_all.pl index 9fb09593c..6b0d566b5 100755 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/measure_adj/scripts_tomo/combine_3_adj_src_all.pl +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/measure_adj/scripts_tomo/combine_3_adj_src_all.pl @@ -6,7 +6,7 @@ # # This script calls combine_adj_src.pl to plot make composite adjoint sources # for a set of events. -# +# # EXAMPLE: # combine_3_adj_src_all.pl 2/30 3/30 6/30 mtm mtm mtm m15 # combine_3_adj_src_all.pl 2/30 3/30 6/30 cc cc cc m14 @@ -78,7 +78,7 @@ $sta_file1 = "${dir_adj1}/STATIONS_ADJOINT"; $sta_file2 = "${dir_adj2}/STATIONS_ADJOINT"; $sta_file3 = "${dir_adj3}/STATIONS_ADJOINT"; - + # combined output directory $odir = "${dir_run_eid}/ADJOINT_all"; diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/measure_adj/scripts_tomo/prepare_measure_adj.pl b/utils/ADJOINT_TOMOGRAPHY_TOOLS/measure_adj/scripts_tomo/prepare_measure_adj.pl index a711562d3..bad4b3c37 100755 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/measure_adj/scripts_tomo/prepare_measure_adj.pl +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/measure_adj/scripts_tomo/prepare_measure_adj.pl @@ -114,15 +114,15 @@ # We checked that the processing used in the Perl scripts matches what is used in # both the windowing code and in the measurement code. # NOTE: NO EXTENSION IS PUT ON THE BAND-PASSED VERSIONS -if ($iplot == 1) { +if ($iplot == 1) { # synthetics $syn_dir_plot = "PLOTS/${dir_syn}"; print CSH "\\rm -rf ${syn_dir_plot}\n"; print CSH "cp -r ${dir_meas_syn} ${syn_dir_plot}\n"; #print CSH "cd ${syn_dir_plot} ; mv_files.pl -x \"*sac*\" \"*sac\" ; cd -\n"; # remove extensions #print CSH "mkdir ${syn_dir_plot}\n"; - #print CSH "cd ${dir_meas_syn}\n"; - #print CSH "process_trinet_syn_new.pl -S -t $Ts -d ../${syn_dir_plot} *sac.d\n"; + #print CSH "cd ${dir_meas_syn}\n"; + #print CSH "process_trinet_syn_new.pl -S -t $Ts -d ../${syn_dir_plot} *sac.d\n"; #print CSH "cd -\n"; # data diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/measure_adj/scripts_tomo/run_measure_adj.pl b/utils/ADJOINT_TOMOGRAPHY_TOOLS/measure_adj/scripts_tomo/run_measure_adj.pl index 9cee5fb91..db3132b7f 100755 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/measure_adj/scripts_tomo/run_measure_adj.pl +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/measure_adj/scripts_tomo/run_measure_adj.pl @@ -89,11 +89,11 @@ $DLNA_MAX = $dlna_ref + $dlna_base; $CC_MIN = $cc_base - $cc_fac; if($CC_MIN < 0) {$CC_MIN = 0} - + $par1_old = $par1; $par1 = "${TSHIFT_MIN}/${TSHIFT_MAX}/${DLNA_MIN}/${DLNA_MAX}/${CC_MIN}"; print "Updating values from PAR_FILE:\n"; - print " old -- $par1_old --\n new -- $par1 --\n"; + print " old -- $par1_old --\n new -- $par1 --\n"; } #---------------------------- @@ -131,7 +131,7 @@ if ($iadj == 1) { $tfiles = "-i OUTPUT_FILES/*adj"; } else { - $tfiles = "OUTPUT_FILES/*recon.cc.sac"; + $tfiles = "OUTPUT_FILES/*recon.cc.sac"; } $adj_dir = "ADJOINT_SOURCES"; print CSH "\\rm -rf ${adj_dir}\n mkdir ${adj_dir}\n"; diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/measure_adj/scripts_tomo/run_mt_cc_plot.pl b/utils/ADJOINT_TOMOGRAPHY_TOOLS/measure_adj/scripts_tomo/run_mt_cc_plot.pl index 71545d4aa..82b0c0c32 100755 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/measure_adj/scripts_tomo/run_mt_cc_plot.pl +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/measure_adj/scripts_tomo/run_mt_cc_plot.pl @@ -101,7 +101,7 @@ print CSH "\\rm -rf OUTPUT_FILES ; mkdir OUTPUT_FILES\n"; # copy chi values into PLOTS -print CSH "cp window_chi PLOTS\n"; +print CSH "cp window_chi PLOTS\n"; # create MEASUREMENT.PAR file print CSH "write_par_file.pl $tvec $imeas $chan $Ts $iparbools $par1 $par2 $par3\n"; diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/measure_adj/scripts_tomo/run_tomo.pl b/utils/ADJOINT_TOMOGRAPHY_TOOLS/measure_adj/scripts_tomo/run_tomo.pl index cee3834ca..f4c458962 100755 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/measure_adj/scripts_tomo/run_tomo.pl +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/measure_adj/scripts_tomo/run_tomo.pl @@ -30,7 +30,7 @@ # socal m10, MAX: 2.0 pm 0.6 (2-30s), 3.0 pm 0.8 (3-30s), 5.0 pm 0.8 (6-30s) # socal m12, MAX: 2.0 pm 0.6 (2-30s), 3.0 pm 0.8 (3-30s), 5.0 pm 1.0 (6-30s) # socal m13 --> m16, MAX: 2.0 pm 1.0 (2-30s), 3.0 pm 1.0 (3-30s), 5.0 pm 1.0 (6-30s) -# +# #========================================================== if (@ARGV < 10) {die("Usage: run_tomo.pl xxx\n")} @@ -190,8 +190,8 @@ $outfile5 = "${dir_meas}/${infile5}"; print CSH "cp $infile5 $outfile5\n"; # composite PDF into RUN if (0==1) { - print CSH "mv $infile5 ${dir_pdf_eid}\n"; # composite PDF into single directory - print CSH "mv *.pdf ${dir_pdf_all}\n"; # individual PDFs into single directory + print CSH "mv $infile5 ${dir_pdf_eid}\n"; # composite PDF into single directory + print CSH "mv *.pdf ${dir_pdf_all}\n"; # individual PDFs into single directory } print CSH "cd $pwd\n"; diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/measure_adj/write_par_file.pl b/utils/ADJOINT_TOMOGRAPHY_TOOLS/measure_adj/write_par_file.pl index d0feb2201..c819497f6 100755 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/measure_adj/write_par_file.pl +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/measure_adj/write_par_file.pl @@ -18,7 +18,7 @@ # # EXAMPLE: # write_par_file.pl -0.585/0.011/18200 1 BH 6/30 0/1/1/1 -4.5/4.5/-1.5/1.5/0.69 1/1.0/0.5 1/0.02/2.5/2.0/2.5/3.5/1.5 -# +# # #========================================================== diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/mtadj/utils/combine_adj_src.pl b/utils/ADJOINT_TOMOGRAPHY_TOOLS/mtadj/utils/combine_adj_src.pl index b4b33b001..5588e8a7e 100755 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/mtadj/utils/combine_adj_src.pl +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/mtadj/utils/combine_adj_src.pl @@ -53,9 +53,9 @@ $adj{$sta}{num} = 1; $adj{$sta}{net} = "$nt"; $adj{$sta}{info} = "$nt $lat $lon $dep $bur";} - else {$adj{$sta}{num} ++ ; + else {$adj{$sta}{num} ++ ; # for example, this crashes if HAST.TA and HAST.BK are included - if ($nt ne $adj{$sta}{net}) {die("Check if network name same for $sta\n");} + if ($nt ne $adj{$sta}{net}) {die("Check if network name same for $sta\n");} } @files = glob("$dir2/$sta.$nt.BH?.*adj"); if (@files == 0) {print("Check if $dir2/$sta.$nt.BH?.*adj exist or not\n");} diff --git a/utils/ADJOINT_TOMOGRAPHY_TOOLS/mtadj/utils/rotate_adj_src.pl b/utils/ADJOINT_TOMOGRAPHY_TOOLS/mtadj/utils/rotate_adj_src.pl index 91020a272..5be47dcb6 100755 --- a/utils/ADJOINT_TOMOGRAPHY_TOOLS/mtadj/utils/rotate_adj_src.pl +++ b/utils/ADJOINT_TOMOGRAPHY_TOOLS/mtadj/utils/rotate_adj_src.pl @@ -52,17 +52,17 @@ if (defined $adj{$stanet}{$tname} ) { $tcomp = $adj{$stanet}{$tname}; $rcomp = $tcomp; $zcomp = $tcomp; $ncomp = $rcomp; $ecomp = $tcomp; $zcomp=~s/$tname/$zname/; - $rcomp =~s/$tname/$rname/; $ncomp=~s/$tname/$nname/; + $rcomp =~s/$tname/$rname/; $ncomp=~s/$tname/$nname/; $ecomp=~s/$tname/$ename/;} elsif (defined $adj{$stanet}{$rname}) { $rcomp = $adj{$stanet}{$rname}; $tcomp = $rcomp; $zcomp = $rcomp; $ncomp = $rcomp; $ecomp = $rcomp; $zcomp=~s/$rname/$zname/; - $tcomp =~s/$rname/$tname/; $ncomp=~s/$rname/$nname/; + $tcomp =~s/$rname/$tname/; $ncomp=~s/$rname/$nname/; $ecomp=~s/$rname/$ename/;} else { $zcomp = $adj{$stanet}{$zname}; $tcomp = $zcomp; $rcomp = $zcomp; $ncomp = $rcomp; $ecomp = $rcomp; $rcomp=~s/$zname/$rname/; - $tcomp =~s/$zname/$tname/; $ncomp=~s/$zname/$nname/; + $tcomp =~s/$zname/$tname/; $ncomp=~s/$zname/$nname/; $ecomp=~s/$zname/$ename/;} # write station info diff --git a/utils/Cluster/lsf/collect_seismo_lsf_multi.pl b/utils/Cluster/lsf/collect_seismo_lsf_multi.pl index 9eb801e34..bd65de474 100755 --- a/utils/Cluster/lsf/collect_seismo_lsf_multi.pl +++ b/utils/Cluster/lsf/collect_seismo_lsf_multi.pl @@ -14,7 +14,7 @@ (@junk2) = split(" ",$junk1); for($i=0;$i<@junk2/2;$i++) { $junk[$i] = $junk2[2*$i];} - + for($i=0;$i<@junk;$i++) { ($node) = split(" ",$junk[$i]); @@ -25,13 +25,13 @@ open(FILE3,"<$par_file") or die ("Fatal Error openning file $par_file\n"); while () { if ($_ =~ /^LOCAL_PATH/) { - chop; - @vals = split("=", $_); - $mpidir = $vals[1]; - $mpidir =~ s/^\s+//; - $mpidir =~ s/\s+$//; - close(FILE3); - last; + chop; + @vals = split("=", $_); + $mpidir = $vals[1]; + $mpidir =~ s/^\s+//; + $mpidir =~ s/\s+$//; + close(FILE3); + last; } } diff --git a/utils/Cluster/lsf/go_generate_databases_lsf.bash b/utils/Cluster/lsf/go_generate_databases_lsf.bash index 957933137..b99f2429a 100755 --- a/utils/Cluster/lsf/go_generate_databases_lsf.bash +++ b/utils/Cluster/lsf/go_generate_databases_lsf.bash @@ -18,8 +18,8 @@ ########################################################### if [ -z $USER ]; then - echo "could not run go_mesher_...bash as no USER env is set" - exit 2 + echo "could not run go_mesher_...bash as no USER env is set" + exit 2 fi # script to run the mesher and the solver diff --git a/utils/Cluster/lsf/go_solver_lsf.bash b/utils/Cluster/lsf/go_solver_lsf.bash index 1b01704c3..d65eb3f1b 100755 --- a/utils/Cluster/lsf/go_solver_lsf.bash +++ b/utils/Cluster/lsf/go_solver_lsf.bash @@ -18,8 +18,8 @@ ########################################################### if [ -z $USER ]; then - echo "could not run go_solver_...bash as no USER env is set" - exit 2 + echo "could not run go_solver_...bash as no USER env is set" + exit 2 fi # script to run the mesher and the solver diff --git a/utils/Cluster/lsf/remap_database/remap_database.f90 b/utils/Cluster/lsf/remap_database/remap_database.f90 index 0c09e2bc1..850603a38 100644 --- a/utils/Cluster/lsf/remap_database/remap_database.f90 +++ b/utils/Cluster/lsf/remap_database/remap_database.f90 @@ -1,7 +1,7 @@ program remap_databases ! this program remaps the databases to resume a solver calculation after -! the mesher +! the mesher ! Qinya Liu, May 2007, Caltech implicit none @@ -48,7 +48,7 @@ program remap_databases close(11) mymachine = slice_to_old_machine(myrank+1) - + local_data_base = '/scratch/lqy/DATABASES_MPI' write(scp_outfile,'(a,i4.4)') 'OUTPUT_FILES/scp_out.',myrank @@ -57,11 +57,11 @@ program remap_databases myrank, '* '//trim(local_data_base) call system('echo '//trim(command_string)//' > '//trim(scp_outfile)) - + call system(trim(command_string)//' >> '//trim(scp_outfile)) - + ! stop all the MPI processes, and exit call MPI_FINALIZE(ier) end program remap_databases - + diff --git a/utils/Cluster/lsf/remap_lsf_machines.pl b/utils/Cluster/lsf/remap_lsf_machines.pl index a707ae448..5f061c666 100755 --- a/utils/Cluster/lsf/remap_lsf_machines.pl +++ b/utils/Cluster/lsf/remap_lsf_machines.pl @@ -15,8 +15,8 @@ for($i=0;$i<@junk;$i++) { @node_array = split(" ",$junk[$i]); foreach $node (@node_array) { - next if ( $node =~ /^[0-9]/ ); - push(@nodes, $node); + next if ( $node =~ /^[0-9]/ ); + push(@nodes, $node); } } foreach $node (@nodes) { diff --git a/utils/Cluster/lsf/run_lsf.bash b/utils/Cluster/lsf/run_lsf.bash index e0ca60e4a..dcba00601 100755 --- a/utils/Cluster/lsf/run_lsf.bash +++ b/utils/Cluster/lsf/run_lsf.bash @@ -7,8 +7,8 @@ queue="-q normal" if [ $# -eq 1 ]; then - echo "Setting the queue to $1" - queue="-q $1" + echo "Setting the queue to $1" + queue="-q $1" fi d=`date` diff --git a/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/Part-2a-read_DSM_coefficients_back_SH/TraPSV_MPI_read_Zmin/TraSH-0.1.0.f90 b/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/Part-2a-read_DSM_coefficients_back_SH/TraPSV_MPI_read_Zmin/TraSH-0.1.0.f90 index ee87f728a..4781b2722 100755 --- a/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/Part-2a-read_DSM_coefficients_back_SH/TraPSV_MPI_read_Zmin/TraSH-0.1.0.f90 +++ b/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/Part-2a-read_DSM_coefficients_back_SH/TraPSV_MPI_read_Zmin/TraSH-0.1.0.f90 @@ -2,18 +2,18 @@ program TraSH_Zmin !----------------------------------------------------------------------- -! ! -! ! -! +! +! +! ! 2002.10.KAWAI Kenji ! 2009.6. FUJI Nobuaki ! 2011.9. FUJI Nobuaki ! 2013.11 YI WANG (MPI) ! ! -! +! ! !----------------------------------------------------------------------- @@ -37,8 +37,8 @@ program TraSH_Zmin real(kind(0d0)), parameter :: re=1.d-2, ratc=1.d-10, ratl=1.d-4 integer, parameter :: maxlmax = 25000, maxlmax_g = 1000 !change to 30000 for possible high frequency calculation. - - real(kind(0d0)) :: tlen + + real(kind(0d0)) :: tlen real(kind(0d0)) :: r0min, r0max, r0delta !!! JUST FOR ONE DEPTH FOR THIS MOMENT !! real(kind(0d0)) :: r0lat, r0lon,stla_curr,stlo_curr real(kind(0d0)), allocatable :: stla(:),stlo(:),stla_g(:),stlo_g(:) @@ -48,7 +48,7 @@ program TraSH_Zmin real(kind(0d0)), allocatable :: rrsta(:,:) integer, allocatable :: iista(:,:) integer :: r_n,r0_n, ir_,ir0,imt,itheta,ista - + character(120) :: coutfile, coutfile1,cinfile,coutfile2,coutfile3 integer :: imin,imax integer :: itranslat @@ -59,41 +59,41 @@ program TraSH_Zmin real(kind(0d0)) :: dummy real(kind(0d0)), allocatable :: vrmin(:), vrmax(:) real(kind(0d0)), allocatable :: rrho(:,:), vsv(:,:), vsh(:,:),qmu(:),vpv(:,:),vph(:,:),eta(:,:) - double precision, parameter :: convert_to_radians = pi/180.d0 - + double precision, parameter :: convert_to_radians = pi/180.d0 + complex(kind(0d0)), allocatable :: coef(:) real(kind(0d0)) :: rmin, rmax real(kind(0d0)), allocatable :: vmin(:), gridpar(:), dzpar(:) - - + + real(kind(0d0)) :: omegai - - + + integer, allocatable :: nlayer(:), iphase(:) integer :: ioutercore - ! variables pour des points stackes + ! variables pour des points stackes integer, allocatable :: isp(:),jsp(:) ! variables pour la source - - + + real(kind(0d0)) :: lsq,Aval,Cval,Fval,Lval,Nval,rval,thetasin,thetaval - + !----------------------------------------------------------------------- - ! variables pour des elements de matrice + ! variables pour des elements de matrice complex(kind(0d0)) :: g0tmp(6), g0dertmp(6),inv_lsq,inv_rval,thetacot_complex,inv_thetasin,inverse_of_omega_complex complex(kind(0d0)) :: u1,u2,u3,udr1,udr2,udr3,udt1,udt2,udt3,udp1,udp2,udp3 complex(kind(0d0)) :: uder11 , uder12 , uder13 , uder21 , uder22 , uder23 , uder31 , uder32 , uder33 ! la frequence real(kind(0d0)) :: omega - - ! des autres - + + ! des autres + integer :: llog,m, l - + !----------------------------------------------------------------------- complex(kind(0d0)), allocatable :: dvec(:,:,:),dvecdt(:,:,:),dvecdp(:,:,:) @@ -106,7 +106,7 @@ program TraSH_Zmin !----------------------------------------------------------------------- ! variables for the MPI communications. integer, allocatable :: Ifrq2(:,:) - + integer imin_glob, imax_glob !----------------------------------------------------------------------- @@ -118,7 +118,7 @@ program TraSH_Zmin real(kind(0d0)):: bazi,l2 integer, allocatable :: Ind(:),NbInd(:),IndSt(:),NbIndSt(:) integer :: istamin,istamax,k,ifq,c8,coeff,r_n_dum,theta_n - + !write(*,*) "routine is starting to run!@@@@@@@@@@@" call MPI_INIT(ierr) @@ -130,7 +130,7 @@ program TraSH_Zmin allocate(key(0:nbbigproc-1)) allocate(color(0:nbbigproc-1)) allocate(Ifrq2(2,0:nbbigproc-1)) - + if (mybigrank==0) then open(25,file='Double_para.txt') read(25,*) nb_colors,nb_tot_proc @@ -159,13 +159,13 @@ program TraSH_Zmin call MPI_Bcast(Ifrq2,2*nbbigproc,MPI_INTEGER,0,MPI_COMM_WORLD,ierr) - if (mybigrank==0) then + if (mybigrank==0) then call pinputTra_part2(ifrequ_min,ifrequ_max,inputdir,outputDir,psvmodel,modelname,stationsinf,tlen,imin_glob,imax_glob,r0min,r0max,r0delta,r0lat,r0lon,itranslat) !!here i delete the last myrank para in the vadim's routine,because the myrank para is not used. if (nbbigproc==0) then imin=imin_glob imax=imax_glob - endif + endif ! call WriteFrqByproc(nbproc,imin_glob,imax_glob) !distributing the task into every processors evenly. endif !only the root can excute this function call. @@ -208,7 +208,7 @@ program TraSH_Zmin ! call MPI_Bcast(nzone,1,MPI_INTEGER,0,MPI_COMM_WORLD,ierr) - + allocate(vrmin(1:nzone)) allocate(vrmax(1:nzone)) allocate(rrho(1:4,1:nzone)) @@ -223,10 +223,10 @@ program TraSH_Zmin allocate(isp(1:nzone)) allocate(jsp(1:nzone)) allocate(coef(1:nzone)) - + do i = 1, nzone read (20, *) vrmin(i), vrmax(i), rrho(1,i), rrho(2,i), rrho(3,i), rrho(4,i), dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, vsv(1,i), vsv(2,i), vsv(3,i), vsv(4,i), vsh(1,i), vsh(2,i), vsh(3,i), vsh(4,i), dummy, dummy, dummy, dummy, qmu(i), dummy - if ((vsv(1,i).eq.0.d0).and.(vsv(2,i).eq.0.d0).and.(vsv(3,i).eq.0.d0).and.(vsv(4,i).eq.0.d0)) then + if ((vsv(1,i)==0.d0).and.(vsv(2,i)==0.d0).and.(vsv(3,i)==0.d0).and.(vsv(4,i)==0.d0)) then iphase(i) = 2 ioutercore = i else @@ -240,12 +240,12 @@ program TraSH_Zmin nzone = nzone - ioutercore deallocate(vrmin,vrmax,rrho,vsv,vsh,qmu,vmin,gridpar,dzpar,nlayer,iphase,isp,jsp,coef) - + endif ! only root can read file for inputing the setting parameters. - + call MPI_Bcast(nzone,1,MPI_INTEGER,0,MPI_COMM_WORLD,ierr) !nzone changed call MPI_Bcast(ioutercore,1,MPI_INTEGER,0,MPI_COMM_WORLD,ierr) - + call MPI_Barrier(MPI_COMM_WORLD,ierr) allocate(vrmin(1:nzone)) @@ -295,9 +295,9 @@ program TraSH_Zmin rmax = vrmax(nzone) omegai = - dlog(1.d-2) / tlen - if (mybigrank==0) then + if (mybigrank==0) then open (1,file=stationsinf,status='old',action='read',position='rewind') - if(itranslat.eq.1) call translat (r0lat,r0lat) + if(itranslat==1) call translat (r0lat,r0lat) open(2,file='recdepth') read(2,*) r_n !now the r_n is not only the number of receivers,it's the receriver plane depth index. read(1,*) nsta_global @@ -328,13 +328,13 @@ program TraSH_Zmin allocate(stla_g(1:nsta_global)) allocate(stlo_g(1:nsta_global)) ! now the size allocated is nsta_global - + allocate(updown(1:r_n)) allocate(idum(1:r_n)) ! it is sufficient for us to save the final result to disk in single precision allocate(stresssngl_global(1:6,1:6,1:nsta_global)) allocate(displacementsngl_global(1:3,1:6,1:nsta_global)) - + allocate(tabg0(1:maxlmax_g,1,1:6,-2:2)) allocate(tabg0der(1:maxlmax_g,1,6,-2:2)) allocate(tmp_tabg0(1:maxlmax_g,1,1:6,-2:2)) @@ -457,7 +457,7 @@ program TraSH_Zmin allocate(dvecdp(1:theta_n,1:3,-2:2)) allocate(plm(1:theta_n,1:3,0:3),stat=ier) if(ier /= 0) stop 'error: not enough memory to allocate array' - + phi(:)=phi_g(istamin:istamax) theta(:)=theta_g(istamin:istamax) stla(:)=stla_g(istamin:istamax) @@ -473,22 +473,22 @@ program TraSH_Zmin write(list, '(I6,".",I6)'), imin_glob,imax_glob do j = 1,15 - if(list(j:j).eq.' ')list(j:j) = '0' + if(list(j:j)==' ')list(j:j) = '0' enddo list = trim(outputDir)//"/log/calLogSH"//"."//trim(modelname)//"."//trim(list) - + if (mybigrank == 0) then open(1,file =list, status = 'unknown', form = 'formatted') call date_and_time(datex,timex) write(1,'(/a,a4,a,a2,a,a2,a,a2,a,a2,a,a4)') & ' Starting date and time: ', & datex(1:4),'-',datex(5:6),'-',datex(7:8),'. ', & - timex(1:2),':',timex(3:4),':',timex(5:8) + timex(1:2),':',timex(3:4),':',timex(5:8) close (1) - - endif - + endif + + ! allocate(bvec(1:3,-2:2,1:theta_n)) ! allocate(bvecdt(1:3,-2:2,1:theta_n)) ! allocate(bvecdp(1:3,-2:2,1:theta_n)) @@ -497,7 +497,7 @@ program TraSH_Zmin ! source depths,currently we do not put any necessary allocation r0_n = int((r0max-r0min)/r0delta)+1 - allocate(r0(1:r0_n)) + allocate(r0(1:r0_n)) do i = 1, r0_n r0(i) = r0min + dble(i-1)*r0delta enddo @@ -506,11 +506,11 @@ program TraSH_Zmin write(list1, '(I6,".",I6)'), imin_glob,imax_glob !!unify scanning file for the process do j = 1,15 - if(list1(j:j).eq.' ')list1(j:j) = '0' + if(list1(j:j)==' ')list1(j:j) = '0' enddo list1 = trim(outputDir)//"/log/listSH"//"."//trim(modelname)//"."//trim(list1) open(24, file = list1, status = 'unknown', form = 'formatted') - write(24,*) + write(24,*) close(24) @@ -518,19 +518,19 @@ program TraSH_Zmin if (mybigrank == 0) then write(list, '(I6,".",I6)'), imin_glob,imax_glob !unify scanning file for the process do j = 1,15 - if(list(j:j).eq.' ')list(j:j) = '0' + if(list(j:j)==' ')list(j:j) = '0' enddo list = trim(outputDir)//"/log/calLogSH"//"."//trim(modelname)//"."//trim(list) - + open(1,file =list, status = 'unknown', form = 'formatted') call date_and_time(datex,timex) write(1,'(/a,a4,a,a2,a,a2,a,a2,a,a2,a,a4)') & ' Starting date and time: ', & datex(1:4),'-',datex(5:6),'-',datex(7:8),'. ', & - timex(1:2),':',timex(3:4),':',timex(5:8) + timex(1:2),':',timex(3:4),':',timex(5:8) close (1) endif - + llog = 0 @@ -542,13 +542,13 @@ program TraSH_Zmin ir0 = r0_n -!write(*,*) mybigrank,"th !!!!!!!!!!!!!!!start frequency calculation!!!!!!----" +!write(*,*) mybigrank,"th !!!!!!!!!!!!!!!start frequency calculation!!!!!!----" - do ifq = ifrequ_min,ifrequ_max + do ifq = ifrequ_min,ifrequ_max !!frequency loop start now for every proc - + ir0 = r0_n !Be careful with this declaration write(cinfile, '(I5.5,".G0_SH_",I5.5)') int(r0(ir0)*10.d0),ifq ! Noticing that now for the file constrction,i use ifq instead of ifq-1! @@ -566,7 +566,7 @@ program TraSH_Zmin displacementsngl = (0.e0,0.e0) stresssngl_global = (0.e0,0.e0) displacementsngl_global = (0.e0,0.e0) - + plm = 0.d0 dvec = (0.d0,0.d0) dvecdp = (0.d0,0.d0) @@ -576,112 +576,112 @@ program TraSH_Zmin lmax_r(:)=0 omega = 2.d0 * pi * dble(Ifq)/tlen !for this part of routines.the omega won't be used. - if ( Ifq .ne. 0 ) then !!frequency don't equal to 0 + if ( Ifq /= 0 ) then !!frequency don't equal to 0 lref=0 index_l=0 lmax_lu=0 do l = 0, maxlmax ! l-loop commence - call MPI_Barrier(SubCommunicators,ierr) - + call MPI_Barrier(SubCommunicators,ierr) + if (mod(l,maxlmax_g)==0) then lref=l tabg0=(0.d0,0.d0) - tabg0der=(0.d0,0.d0) + tabg0der=(0.d0,0.d0) if (myrank==0) then - do + do read(34) ir_,llog - if (ir_ == -1) then ! this flag indicates the end of all the data to read - exit - elseif (ir_ == r_n) then + if (ir_ == -1) then ! this flag indicates the end of all the data to read + exit + else if (ir_ == r_n) then ! in the case of the Zmin face, we read but ignore all the data from the input file except the last one; ! in the other code (for vertical faces) we use all the data read, but in this code we use the last one only from the same file read(34) tabg0(1:llog,1,:,:) !here only SH coefficients is read.so second para =1 fixed. - read(34) tabg0der(1:llog,1,:,:) - lmax_r(ir_) = llog + lref ! recover the computed number of l-order cofficients. - lmax_lu=max(lmax_lu,lmax_r(r_n)) ! just for test. - else !!! VM VM : we need ir_=r_n which is not nessesary the last one thus I test it - read(34) tmp_tabg0(1:llog,1,:,:) !here only SH coefficients is read.so second para =1 fixed - read(34) tmp_tabg0der(1:llog,1,:,:) + read(34) tabg0der(1:llog,1,:,:) + lmax_r(ir_) = llog + lref ! recover the computed number of l-order cofficients. + lmax_lu=max(lmax_lu,lmax_r(r_n)) ! just for test. + else !!! VM VM : we need ir_=r_n which is not nessesary the last one thus I test it + read(34) tmp_tabg0(1:llog,1,:,:) !here only SH coefficients is read.so second para =1 fixed + read(34) tmp_tabg0der(1:llog,1,:,:) lmax_r(ir_) = llog + lref ! lmax courant pour ir_ - lmax_lu=max(lmax_lu,lmax_r(r_n)) + lmax_lu=max(lmax_lu,lmax_r(r_n)) endif - enddo - endif ! rank 0 proc reading process is over - - index_l=0 - call MPI_Bcast(lmax_r,r_n,MPI_INTEGER,0,SubCommunicators,ierr) - call MPI_Bcast(tabg0,30*maxlmax_g,MPI_DOUBLE_COMPLEX,0,SubCommunicators,ierr) - call MPI_Bcast(tabg0der,30*maxlmax_g,MPI_DOUBLE_COMPLEX,0,SubCommunicators,ierr) - call MPI_Bcast(ir_,1,MPI_INTEGER,0,SubCommunicators,ierr) - call MPI_Bcast(llog,1,MPI_INTEGER,0,SubCommunicators,ierr) - !I have to change the size of tabg0/tabg0der from 60 in PSV to 30 in SH. - endif ! mod(l,maxlmax_g)==0 judgement over - - if (l>=lmax_r(r_n)) exit !! general speaking,l =lmax_r(r_n)) exit !! general speaking,l =lmax_r(r_n)) exit +!! In fact,above is setting the exit judgement:if (l>=lmax_r(r_n)) exit !! So l = lmax_r(r_n) can't be valid any more at the moment. - + !!# g0tmp = (0.d0,0.d0) !!# g0dertmp = (0.d0,0.d0) !!# call interpolate(1,0,r_(ir_),rrsta(1:3,ir_),g0(iista(1:3,ir_)),g0tmp) @@ -712,21 +712,21 @@ program TraSH_Zmin !! this part is different from the PSV part,only SH coefficients is needed.So we don't need so much space to save the g0tmp like PSV routine. in fact the g0tmp and g0dertmp are scalar only. ! if (ifq ==502 .and. l==1500 .and. m==2 .and. myrank==0 .and. itheta ==1) then -! write(*,*) 'g0tmp',imt,g0tmp(imt) -! write(*,*) 'g0dertmp',imt,g0dertmp(imt) -! if(imt==6) write(*,*) 'theta',theta(itheta) -! if(imt==6) write(*,*) 'dvec',dvec(itheta,2,:) -! if(imt==6) write(*,*) 'dvec',dvec(itheta,3,:) -! if(imt==6) write(*,*) 'dvecdt 2',dvecdt(itheta,3,:) -! if(imt==6) write(*,*) 'dvecdp 2',dvecdp(itheta,3,:) -! endif +! write(*,*) 'g0tmp',imt,g0tmp(imt) +! write(*,*) 'g0dertmp',imt,g0dertmp(imt) +! if(imt==6) write(*,*) 'theta',theta(itheta) +! if(imt==6) write(*,*) 'dvec',dvec(itheta,2,:) +! if(imt==6) write(*,*) 'dvec',dvec(itheta,3,:) +! if(imt==6) write(*,*) 'dvecdt 2',dvecdt(itheta,3,:) +! if(imt==6) write(*,*) 'dvecdp 2',dvecdp(itheta,3,:) +! endif ! itheta = ir_ thetaval = theta(itheta) * convert_to_radians - thetasin = sin(thetaval) - thetacot_complex = cmplx(cos(thetaval)/thetasin) - inv_thetasin = 1.d0 / cmplx(thetasin) + thetasin = sin(thetaval) + thetacot_complex = cmplx(cos(thetaval)/thetasin) + inv_thetasin = 1.d0 / cmplx(thetasin) !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!! case imt = 1 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! @@ -774,7 +774,7 @@ program TraSH_Zmin ! displacement(1,1,itheta) = u1 + displacement(1,1,itheta) ! displacement(2,1,itheta) = u2 + displacement(2,1,itheta) ! displacement(3,1,itheta) = u3 + displacement(3,1,itheta) - + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!! case imt = 2 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! @@ -821,7 +821,7 @@ program TraSH_Zmin displacement(1,2,itheta) = u1 + displacement(1,2,itheta) displacement(2,2,itheta) = u2 + displacement(2,2,itheta) displacement(3,2,itheta) = u3 + displacement(3,2,itheta) - + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!! case imt = 3 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! @@ -915,7 +915,7 @@ program TraSH_Zmin displacement(1,4,itheta) = u1 + displacement(1,4,itheta) displacement(2,4,itheta) = u2 + displacement(2,4,itheta) displacement(3,4,itheta) = u3 + displacement(3,4,itheta) - + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!! case imt = 5 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! @@ -962,7 +962,7 @@ program TraSH_Zmin displacement(1,5,itheta) = u1 + displacement(1,5,itheta) displacement(2,5,itheta) = u2 + displacement(2,5,itheta) displacement(3,5,itheta) = u3 + displacement(3,5,itheta) - + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!! case imt = 6 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! @@ -1010,7 +1010,7 @@ program TraSH_Zmin displacement(2,6,itheta) = u2 + displacement(2,6,itheta) displacement(3,6,itheta) = u3 + displacement(3,6,itheta) -! 33333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333 +! 33333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333 ! u = cmplx(0.d0) @@ -1019,10 +1019,10 @@ program TraSH_Zmin ! udp = cmplx(0.d0) ! uder = cmplx(0.d0) ! call calu(g0tmp(imt),lsq,dvec(itheta,1:3,m),u(1:3)) !noticing that the first para of dvec array is the station index now which is different from the original TraSH routine. -!! if (ifq ==347 .and. l<=4 .and. myrank==0 .and. itheta ==6 .and. imt==3) then -!! write(*,*) 'u(2) is',l,m,displacement(2,imt,itheta),u(2) -!! ! write(*,*) 'u(2) is',l,m,imt,u(2) -!! endif +!! if (ifq ==347 .and. l<=4 .and. myrank==0 .and. itheta ==6 .and. imt==3) then +!! write(*,*) 'u(2) is',l,m,displacement(2,imt,itheta),u(2) +!! ! write(*,*) 'u(2) is',l,m,imt,u(2) +!! endif ! call calu(g0dertmp(imt),lsq,dvec(itheta,1:3,m),udr(1:3)) ! call calu(g0tmp(imt),lsq,dvecdt(itheta,1:3,m),udt(1:3)) ! call calu(g0tmp(imt),lsq,dvecdp(itheta,1:3,m),udp(1:3)) @@ -1031,32 +1031,32 @@ program TraSH_Zmin ! call udertoStress(uder(1:3,1:3),stress(1:6,imt,itheta),A0sta(ir_),C0sta(ir_),F0sta(ir_),L0sta(ir_),N0sta(ir_)) ! displacement(1:3,imt,itheta) = u(1:3)+displacement(1:3,imt,itheta) - enddo ! for the itheta = 1,theta_n loop + enddo ! for the itheta = 1,theta_n loop endif !for the condition (l <= lmax_r(ir_)) enddo ! ir_= r_n,r_n loop termine ! enddo ! imt-loop termine - enddo !ir0-loop termine - endif !for the condition ( m.ne.0 ).and.( iabs(m).le.iabs(l) ) - enddo ! m-loop termine + enddo !ir0-loop termine + endif !for the condition ( m/=0 ).and.( iabs(m)<=iabs(l) ) + enddo ! m-loop termine - enddo !l-loop termine + enddo !l-loop termine open(24,file =list1, status = 'old',access='append', form = 'formatted') - write(24,*) ifq, dble(ifq)/tlen, llog-1 + write(24,*) ifq, dble(ifq)/tlen, llog-1 close(24) !************************************************************************************** inverse_of_omega_complex = 1.d0 / dcmplx(0,omega) ! write(*,*) 'inverse_of_omega_complex',ifq - + !IBM* ASSERT (MINITERCNT(1000)) !DIR$ SIMD !DIR$ loop count min(1000) do ista = 1,theta_n - -! stress(1:6,1:6,1:theta_n) = stress(1:6,1:6,1:theta_n)/cmplx(0,omega) + +! stress(1:6,1:6,1:theta_n) = stress(1:6,1:6,1:theta_n)/cmplx(0,omega) ! stresssngl(1:6,1:6,1:theta_n) = stress(1:6,1:6,1:theta_n) stresssngl(1,1,ista) = stress(1,1,ista) * inverse_of_omega_complex stresssngl(2,1,ista) = stress(2,1,ista) * inverse_of_omega_complex @@ -1094,14 +1094,14 @@ program TraSH_Zmin stresssngl(4,6,ista) = stress(4,6,ista) * inverse_of_omega_complex stresssngl(5,6,ista) = stress(5,6,ista) * inverse_of_omega_complex stresssngl(6,6,ista) = stress(6,6,ista) * inverse_of_omega_complex - + enddo !IBM* ASSERT (MINITERCNT(1000)) !DIR$ SIMD !DIR$ loop count min(1000) - - do ista = 1,theta_n + + do ista = 1,theta_n ! displacementsngl(1:3,1:6,1:theta_n) = displacement(1:3,1:6,1:theta_n) displacementsngl(1,1,ista) = displacement(1,1,ista) displacementsngl(2,1,ista) = displacement(2,1,ista) @@ -1122,7 +1122,7 @@ program TraSH_Zmin displacementsngl(2,6,ista) = displacement(2,6,ista) displacementsngl(3,6,ista) = displacement(3,6,ista) enddo - + Coeff = 3*6*nsta call mpi_gatherv(displacementsngl,Coeff,MPI_COMPLEX,displacementsngl_global,NbInd,Ind,MPI_COMPLEX,0,SubCommunicators,ierr) !! here the 0 is the receiving proc in every sub-group.The NbInd is the size of data-block of every proc in sub-group.Ind is similar to the displacement in the mpi_gatherv which represent the display of the receiving data-block in the root to the 1st element of displacementsngl_global array. @@ -1135,13 +1135,13 @@ program TraSH_Zmin ! write(*,*) 'displacement(2,:,ir_)',displacementsngl_global(2,1:6,ir_) !endif endif !!for the condition ifrq /= 0 - + if (myrank==0) then - ir0 = r0_n + ir0 = r0_n write(coutfile, '(I5.5,".Stress_SH_",I5.5)') int(r0(ir0)*10.d0),ifq coutfile = trim(modelname)//"."//coutfile coutfile = trim(outputDir)//"/Stress/"//coutfile - + !! DK DK not a good idea to give indices when writing the whole array: some compilers could create copies or use loops in such a case !! DK DK unformatted sequential I/Os (because sequential I/O is usually faster than direct-access I/O) !! DK DK and writing a single big file is also much better @@ -1163,20 +1163,20 @@ program TraSH_Zmin if (myrank==0) close(34) !! Only the myrank==0 proc can start the 34 file reading. - - if(mod(i,8).eq.0) then - + + if(mod(i,8)==0) then + open(1,file =list, status = 'old',access='append', form = 'formatted') call date_and_time(datex,timex) write(1,'(/a,i,a,a4,a,a2,a,a2,a,a2,a,a2,a,a4)') & ' Frequency-index ', i, ' :', & datex(1:4),'-',datex(5:6),'-',datex(7:8),'. ', & - timex(1:2),':',timex(3:4),':',timex(5:8) + timex(1:2),':',timex(3:4),':',timex(5:8) close (1) endif - enddo ! omega-loop termine + enddo ! omega-loop termine ! write(*,*) 'write the radius of the last plane',r_(r_n) !!test the depth of the computed plane call MPI_Barrier(MPI_COMM_WORLD,ierr) @@ -1190,17 +1190,17 @@ program TraSH_Zmin ir0 = r0_n write(coutfile, '(I5,".Stress_SH")'), int(r0(ir0)*10.d0) do j = 1,7 - if (coutfile(j:j).eq.' ')coutfile(j:j) = '0' + if (coutfile(j:j)==' ')coutfile(j:j) = '0' enddo - + coutfile = trim(modelname)//"."//coutfile coutfile = trim(outputDir)//"Stress/"//coutfile - + write(coutfile1, '(I5,".Displacement_SH")'), int(r0(ir0)*10.d0) do j = 1,7 - if (coutfile1(j:j).eq.' ')coutfile1(j:j) = '0' + if (coutfile1(j:j)==' ')coutfile1(j:j) = '0' enddo - + coutfile1 = trim(modelname)//"."//coutfile1 coutfile1 = trim(outputDir)//"Displacement/"//coutfile1 @@ -1220,14 +1220,14 @@ program TraSH_Zmin ! coutfile3 = trim(outputdir)//"/Stress/"//coutfile3 ! TO DO : il faudrait mettre un inputdir ! open(35,file=coutfile3, form='unformatted',action='read') !!!coutifle2 and coutfile3 are the file used for storing the Stress and Displacement for SH every frequency computation - + read(34) stresssngl_global(1:6,1:6,1:nsta_global) read(34) displacementsngl_global(1:3,1:6,1:nsta_global) close(34) ! read(35) displacementsngl_global(1:3,1:6,1:nsta_global) ! close(35) - + open(1,file=coutfile,status='unknown',form='unformatted', access = 'direct', recl=2*6*6*kind(0e0)*nsta_global) write(1,rec=i+1) stresssngl_global(1:6,1:6,1:nsta_global) close(1) @@ -1247,7 +1247,7 @@ program TraSH_Zmin write(1,'(/a,a4,a,a2,a,a2,a,a2,a,a2,a,a4)') & ' Finishing date and time: ', & datex(1:4),'-',datex(5:6),'-',datex(7:8),'. ', & - timex(1:2),':',timex(3:4),':',timex(5:8) + timex(1:2),':',timex(3:4),':',timex(5:8) close (1) endif !using the last processor to write the final statement. @@ -1258,8 +1258,8 @@ program TraSH_Zmin stop - - + + diff --git a/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/Part-2a-read_DSM_coefficients_back_SH/TraPSV_MPI_read_Zmin/calmat.f90 b/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/Part-2a-read_DSM_coefficients_back_SH/TraPSV_MPI_read_Zmin/calmat.f90 index fd5d330ff..b6b8ca0cb 100755 --- a/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/Part-2a-read_DSM_coefficients_back_SH/TraPSV_MPI_read_Zmin/calmat.f90 +++ b/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/Part-2a-read_DSM_coefficients_back_SH/TraPSV_MPI_read_Zmin/calmat.f90 @@ -9,33 +9,33 @@ subroutine calmatc( nlayer,vnp,vra,con,rpow,w1dn,w2dn,ra,m,work ) integer :: i,j,k,kk,l,nn,snp real(kind(0d0)) :: a(2,2),b(2,2),c(5),rh ! parameter check - if ( rpow .gt. maxrpow ) pause 'Invalid arguments.(calmatc)' + if ( rpow > maxrpow ) pause 'Invalid arguments.(calmatc)' ! computing of the matrix elements snp = 1 do i=1,nlayer rh = ra(i+1) - ra(i) - if ( w1dn .eq. 0 ) then + if ( w1dn == 0 ) then a(2,1) = -1.d0 / rh a(1,1) = ra(i+1) / rh a(2,2) = 1.d0 / rh a(1,2) = -ra(i) / rh else - if ( w1dn .eq. 1 ) then + if ( w1dn == 1 ) then a(2,1) = 0.d0 a(1,1) = -1.d0 / rh a(2,2) = 0.d0 a(1,2) = 1.d0 / rh - else + else pause 'Invalid arguments.(calmatc)' endif endif - if ( w2dn .eq. 0 ) then + if ( w2dn == 0 ) then b(2,1) = -1.d0 / rh b(1,1) = ra(i+1) / rh b(2,2) = 1.d0 / rh b(1,2) = -ra(i) / rh else - if ( w2dn .eq. 1 ) then + if ( w2dn == 1 ) then b(2,1) = 0.d0 b(1,1) = -1.d0 / rh b(2,2) = 0.d0 @@ -52,7 +52,7 @@ subroutine calmatc( nlayer,vnp,vra,con,rpow,w1dn,w2dn,ra,m,work ) call pmulti( 2,a(1,j),2,b(1,k),3,c ) do l=3,1,-1 c(l+rpow) = c(l) - if ( rpow.gt.0 ) c(l)=0.d0 + if ( rpow>0 ) c(l)=0.d0 enddo nn = 4 * (i-1) + 2 * (j-1) + k call pinteg( snp,5,c,ra(i),ra(i+1), & @@ -60,13 +60,13 @@ subroutine calmatc( nlayer,vnp,vra,con,rpow,w1dn,w2dn,ra,m,work ) enddo enddo enddo - - if ( w1dn .ne. w2dn ) then + + if ( w1dn /= w2dn ) then do i=1,4*nlayer - if ( (mod(i,4).eq.0) .or. (mod(i,4).eq.1) ) then + if ( (mod(i,4)==0) .or. (mod(i,4)==1) ) then m(i) = 2.d0 * work(i) else - if ( mod(i,4).eq.2 ) then + if ( mod(i,4)==2 ) then m(i) = work(i) + work(i+1) else m(i) = work(i-1) + work(i) @@ -78,8 +78,8 @@ subroutine calmatc( nlayer,vnp,vra,con,rpow,w1dn,w2dn,ra,m,work ) m(i) = work(i) enddo endif - - + + end subroutine calmatc !----------------------------------------------------------------------- @@ -92,29 +92,29 @@ subroutine caltl( nlayer,vnp,vra,rho,ra,tl) real(kind(0d0)) :: vra(vnp),rho(vnp),ra(*),tl(*) integer :: i,nn,snp real(kind(0d0)) ::c(3),from,to - + snp = 1 do i=1,nlayer c(1) = 0.d0 c(2) = 0.d0 c(3) = 1.d0 - + from = ra(i) to = ( ra(i) + ra(i+1) ) / 2.d0 nn = 4 * (i-1) call pinteg( snp,3,c,from,to,vnp,vra,rho,tl(nn+1) ) - + tl(nn+2) = 0.d0 tl(nn+3) = 0.d0 - + from = to to = ra(i+1) call pinteg( snp,3,c,from,to,vnp,vra,rho,tl(nn+4) ) - + enddo - - + + end subroutine caltl !----------------------------------------------------------------------- @@ -127,19 +127,19 @@ subroutine calhl( nlayer,vnp,vra,mu,ra,hl) real(kind(0d0)) :: vra(vnp),mu(vnp),ra(*),hl(*) integer ::i,nn,snp real(kind(0d0)) :: c(1),from,to - + snp = 1 do i=1,nlayer c(1) = 1.d0 - + from = ra(i) to = ( ra(i) + ra(i+1) ) / 2.d0 nn = 4 * (i-1) call pinteg( snp,1,c,from,to,vnp,vra,mu,hl(nn+1) ) - + hl(nn+2) = 0.d0 hl(nn+3) = 0.d0 - + from = to to = ra(i+1) call pinteg( snp,1,c,from,to,vnp,vra,mu,hl(nn+4) ) @@ -152,7 +152,7 @@ subroutine calt( nlayer, tl, tc, t ) implicit none integer :: nlayer, i real(kind(0d0)) :: t(*), tl(*), tc(*) - + do i=1,4*nlayer t(i) = ( tl(i) + tc(i) ) / 2.d0 enddo @@ -168,12 +168,12 @@ subroutine pmulti(n,a,m,b,l,c) implicit none integer :: n,m,l,i,j real(kind(0d0)) :: a(n),b(m),c(l) - - if (n+m-1.ne.l) pause 'Invalid arguments.(pmulti)' + + if (n+m-1/=l) pause 'Invalid arguments.(pmulti)' do i=1,l c(i)=0.d0 enddo - + do i=1,n do j=1,m c(i+j-1) = c(i+j-1) + a(i)*b(j) @@ -193,19 +193,19 @@ subroutine pinteg(snp,n,p,from,to,vnp,vra,con,pint) real(kind(0d0)) :: from,to,p(n),vra(vnp),con(vnp),pint real(kind(0d0)) :: x1,x2,q(2),pq(maxn+1),psint - - if ( n.gt.maxn ) pause 'Degrees of a polynomial is too large.(pinteg)' - if ( snp.ge.vnp ) snp = 1 - + + if ( n>maxn ) pause 'Degrees of a polynomial is too large.(pinteg)' + if ( snp>=vnp ) snp = 1 + pint = 0.d0 - x1 = from - + x1 = from + 100 continue - if ( (vra(snp).le.x1).and.(vra(snp+1).gt.x1) ) then + if ( (vra(snp)<=x1).and.(vra(snp+1)>x1) ) then x2 = dmin1( to, vra(snp+1) ) else snp = snp + 1 - if ( snp.eq.vnp ) snp = 1 + if ( snp==vnp ) snp = 1 goto 100 endif ! evaluating the integrated value @@ -214,14 +214,14 @@ subroutine pinteg(snp,n,p,from,to,vnp,vra,con,pint) call pmulti( n,p,2,q,n+1,pq ) call polint( n+1,pq,x1,x2,psint ) pint = pint + psint - - if ( x2.eq.to ) then + + if ( x2==to ) then continue else x1 = x2 goto 100 endif - + end subroutine pinteg !----------------------------------------------------------------------- @@ -237,19 +237,19 @@ subroutine polint( n,p,x1,x2,pint ) real(kind(0d0)) :: p(*),x1,x2,pint integer :: i,j real(kind(0d0)) :: a(maxn),b(maxn),dx,xx - - if ( n.gt.maxn) pause 'Degrees of a polynomial is too large.(polint)' - + + if ( n>maxn) pause 'Degrees of a polynomial is too large.(polint)' + a(1) = 1.d0 b(1) = 1.d0 - if ( n.ge.2 ) then + if ( n>=2 ) then do i=2,n a(i) = a(i-1) * x1 b(i) = b(i-1) * x2 enddo endif dx = x2 - x1 - + pint = 0.d0 do i=1,n xx = 0.d0 @@ -258,7 +258,7 @@ subroutine polint( n,p,x1,x2,pint ) enddo pint = pint + p(i) * dx * xx enddo - + end subroutine polint @@ -275,7 +275,7 @@ subroutine cala0( nlayer,omega,omegai,t,h1,h2,h3,h4,coef,a0 ) complex(kind(0d0)) :: comega2,coef,a0(*) integer :: i real(kind(0d0)) :: h - + comega2 = dcmplx( omega, -omegai ) * dcmplx( omega, -omegai ) do i=1,4*nlayer h = h1(i) - h2(i) + h3(i) - 2.d0 * h4(i) @@ -283,7 +283,7 @@ subroutine cala0( nlayer,omega,omegai,t,h1,h2,h3,h4,coef,a0 ) enddo end subroutine cala0 - + !----------------------------------------------------------------------- @@ -295,12 +295,12 @@ subroutine cala2( nlayer,h4,coef,a2 ) real(kind(0d0)) :: h4(*) complex(kind(0d0)) :: coef,a2(*) integer :: i - + do i=1,4*nlayer a2(i) = - coef * dcmplx( h4(i) ) enddo - - + + end subroutine cala2 @@ -314,7 +314,7 @@ subroutine cala( nn,l,lda,a0,a2,a ) complex(kind(0d0)) :: a0(lda,*),a2(lda,*),a(lda,*) integer :: i,j real(kind(0d0)) :: xl2 - + xl2 = dble(l) * dble(l+1) do j=1,nn do i=1,2 @@ -329,7 +329,7 @@ end subroutine cala subroutine calga(nlayer,omega,omegai,l,t,h1,h2,h3,h4,coef,a) ! Computing the coefficient matrix 'a' in the solid part. - + implicit none integer :: nlayer,l real(kind(0d0)) :: omega,omegai @@ -338,7 +338,7 @@ subroutine calga(nlayer,omega,omegai,l,t,h1,h2,h3,h4,coef,a) complex(kind(0d0)) :: comega2,coef,a(*) integer :: i real(kind(0d0)) :: h,xl2m2 - + h = 0.d0 do i=1,4*nlayer a(i) = 0.d0 @@ -359,7 +359,7 @@ end subroutine calga subroutine calga2(nlayer,omega,omegai,l,t,h1,h2,h3,coef,a) ! Computing the coefficient matrix 'a' in the solid part. - + implicit none integer :: nlayer,l real(kind(0d0)) :: omega,omegai @@ -390,8 +390,8 @@ subroutine overlap( nlayer,a,a2 ) integer :: nlayer complex(kind(0d0)) :: a(*),a2(2,*) integer :: i,j,k,mu,m,i1,i2,k1,k2,nsize - - + + nsize = nlayer+1 mu = 1 m = mu + 1 @@ -401,11 +401,11 @@ subroutine overlap( nlayer,a,a2 ) i2 = j do i=i1,i2 k = i - j + m - if ( i.eq.j ) then - if ( i.eq.1 ) then + if ( i==j ) then + if ( i==1 ) then a2(k,j) = a2(k,j) + a(1) else - if ( i.eq.nsize ) then + if ( i==nsize ) then a2(k,j) = a2(k,j) + a( 4*nlayer ) else k1 = 4 * i - 4 @@ -414,7 +414,7 @@ subroutine overlap( nlayer,a,a2 ) endif endif endif - if (i+1.eq.j) then + if (i+1==j) then k1 = 4 * i - 2 a2(k,j) = a2(k,j) + a(k1) endif @@ -425,32 +425,32 @@ end subroutine overlap !----------------------------------------------------------------------- subroutine calg2( l,m,spo,r0,mt,mu0,coef,ga,a,ga2,dr,g2,ig2 ) - + implicit none - real(kind(0d0)), parameter :: pi=3.1415926535897932d0 + real(kind(0d0)), parameter :: pi=3.1415926535897932d0 integer :: l,m real(kind(0d0)) :: spo,r0,mt(3,3),mu0 complex(kind(0d0)) :: coef,ga(8),a(4),ga2(2,3),g2(*) integer :: i,itmp,ig2 real(kind(0d0)) :: b1,sgn,ier complex(kind(0d0)) :: dd,cg2(3),dr(3),z(3) - real(kind(0d0)) :: eps + real(kind(0d0)) :: eps data eps / -1.d0 / ! computing of particular solution with free surface boundary conditions cg2 = 0 dd = dcmplx( 0.d0 ) - if ( m.ge.0 ) then + if ( m>=0 ) then sgn = 1.d0 else sgn = - 1.d0 endif - if ( iabs(m).eq.1 ) then + if ( iabs(m)==1 ) then b1 = dsqrt( dble( 2*l+1 ) / ( 16.d0 * pi ) ) - + dd = dcmplx( b1 ) * ( dcmplx( sgn * mt(1,3), mt(1,2) ) )& - & / ( dcmplx( r0 * r0 * mu0 ) * coef ) + & / ( dcmplx( r0 * r0 * mu0 ) * coef ) itmp = 4 cg2 = cmplx(0.d0) do i=2,3 @@ -458,13 +458,13 @@ subroutine calg2( l,m,spo,r0,mt,mu0,coef,ga,a,ga2,dr,g2,ig2 ) itmp = itmp + 2 enddo else - if ( iabs(m).eq.2 ) then + if ( iabs(m)==2 ) then b1 = dsqrt( dble(2*l+1)*dble(l-1)*dble(l+2)/(64.d0*pi) ) cg2(2) = dcmplx( b1 / r0 ) & - & * dcmplx( 2.d0*mt(2,3), sgn*( mt(2,2)-mt(3,3) ) ) + & * dcmplx( 2.d0*mt(2,3), sgn*( mt(2,2)-mt(3,3) ) ) endif endif - if ( ((m.eq.-2).or.(m.eq.-l)).and.(ig2.eq.0) ) then + if ( ((m==-2).or.(m==-l)).and.(ig2==0) ) then call dclisb0( ga2,3,1,2,cg2,eps,dr,z,ier) ig2= ig2+1 else diff --git a/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/Part-2a-read_DSM_coefficients_back_SH/TraPSV_MPI_read_Zmin/dclib.f90 b/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/Part-2a-read_DSM_coefficients_back_SH/TraPSV_MPI_read_Zmin/dclib.f90 index f292596c4..947fa49a9 100755 --- a/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/Part-2a-read_DSM_coefficients_back_SH/TraPSV_MPI_read_Zmin/dclib.f90 +++ b/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/Part-2a-read_DSM_coefficients_back_SH/TraPSV_MPI_read_Zmin/dclib.f90 @@ -25,16 +25,16 @@ subroutine dclisb0(a, n, nud, n1, b, eps, dr, z, ier) ier = 0 eps1 = 1.0d-14 m = nud + 1 - if ((n .le. 0) .or. (nud .le. 0 ) .or. (n1 .lt. m)) then + if ((n <= 0) .or. (nud <= 0 ) .or. (n1 < m)) then ier = 2 - print *, '(subr. lisb) invalid argument. ', n, nud, n1 + print *, '(subr. lisb) invalid argument. ', n, nud, n1 endif - - if (eps .le. 0.d0) eps = eps1 + + if (eps <= 0.d0) eps = eps1 ! modified cholesky decomposition j = 1 - if (abs(a(m,1)) .le. eps) then + if (abs(a(m,1)) <= eps) then ier = 1 print *, '(subr. lisb) singular at step # ', j endif @@ -43,17 +43,17 @@ subroutine dclisb0(a, n, nud, n1, b, eps, dr, z, ier) a(m-1,2) = a(m-1,2) * dr(1) s = a(m,2) - xx * a(m-1,2) j = 2 - if (abs(s) .le. eps) then + if (abs(s) <= eps) then ier = 1 print *, '(subr. lisb) singular at step # ', j endif dr(2) = dcmplx(1.0d0) / s - if (m .lt. 3) then + if (m < 3) then do j=3,n xx = a(1,j) a(1,j) = xx * dr(j-1) s = a(2,j) - xx * a(1,j) - if (abs(s) .le. eps) then + if (abs(s) <= eps) then ier = 1 print *, ' (subr. lisb) singular at step # ', j endif @@ -62,7 +62,7 @@ subroutine dclisb0(a, n, nud, n1, b, eps, dr, z, ier) else do j=3,n k1 = 1 - if (j .ge. m) k1 = j - m + 1 + if (j >= m) k1 = j - m + 1 mj = m - j do i=k1+1,j-1 sum = dcmplx(0.0d0) @@ -79,7 +79,7 @@ subroutine dclisb0(a, n, nud, n1, b, eps, dr, z, ier) a(mj+i,j) = au enddo t = a(m,j) - sum - if (abs(t) .le. eps) then + if (abs(t) <= eps) then ier = 1 print *, ' (subr. lisb) singular at step # ', j endif @@ -90,7 +90,7 @@ subroutine dclisb0(a, n, nud, n1, b, eps, dr, z, ier) entry dcsbsub0(a, n, nud, n1, b, eps, dr, z, ier) ! forward substitution m = nud + 1 - if (m .lt. 3) then + if (m < 3) then z(1) = b(1) do j=2,n z(j) = b(j) - a(1,j) * z(j-1) @@ -106,7 +106,7 @@ subroutine dclisb0(a, n, nud, n1, b, eps, dr, z, ier) z(1) = b(1) z(2) = b(2) - a(m-1,2) * z(1) do j=3,n - if (j .gt. m) then + if (j > m) then i1 = 1 else i1 = m - j + 1 @@ -125,7 +125,7 @@ subroutine dclisb0(a, n, nud, n1, b, eps, dr, z, ier) do j=3,n j1 = n - j + 1 i1 = 1 - if (j .lt. m) i1 = m - j + 1 + if (j < m) i1 = m - j + 1 sum = dcmplx(0.0d0) do k=i1,m-1 sum = sum + a(k,m-k+j1) * b(m-k+j1) @@ -133,6 +133,6 @@ subroutine dclisb0(a, n, nud, n1, b, eps, dr, z, ier) b(j1) = z(j1) - sum enddo endif - + end subroutine dclisb0 diff --git a/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/Part-2a-read_DSM_coefficients_back_SH/TraPSV_MPI_read_Zmin/dclib3.f90 b/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/Part-2a-read_DSM_coefficients_back_SH/TraPSV_MPI_read_Zmin/dclib3.f90 index 78fbcc718..d2b5c13d7 100755 --- a/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/Part-2a-read_DSM_coefficients_back_SH/TraPSV_MPI_read_Zmin/dclib3.f90 +++ b/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/Part-2a-read_DSM_coefficients_back_SH/TraPSV_MPI_read_Zmin/dclib3.f90 @@ -14,7 +14,7 @@ subroutine dclisb(a, n, nud, n1, np, b, eps, dr, z, ier) ! (8) z : 1-dim. working array. * ! (9) ier : error code. * ! copy right t. oguni july 30 1989 version 1.0 * -!*********************************************************************** +!*********************************************************************** integer :: n, nud, n1, np, ier complex(kind(0d0)) :: a(n1,n), b(n), dr(n), z(n) real(kind(0d0)) :: eps @@ -26,14 +26,14 @@ subroutine dclisb(a, n, nud, n1, np, b, eps, dr, z, ier) ier = 0 eps1 = 1.0d-14 m = nud + 1 - if ((n .le. 0) .or. (nud .le. 0 ) .or. (n1 .lt. m)) then + if ((n <= 0) .or. (nud <= 0 ) .or. (n1 < m)) then ier = 2 print *, '(subr. lisb) invalid argument. ', n, nud, n1 endif - if (eps .le. 0.0) eps = eps1 + if (eps <= 0.0) eps = eps1 ! modified cholesky decomposition j = 1 - if (abs(a(m,1)) .le. eps) then + if (abs(a(m,1)) <= eps) then ier = 1 print *, '(subr. lisb) singular at step # ', j endif @@ -42,17 +42,17 @@ subroutine dclisb(a, n, nud, n1, np, b, eps, dr, z, ier) a(m-1,2) = a(m-1,2) * dr(1) s = a(m,2) - xx * a(m-1,2) j = 2 - if (abs(s) .le. eps) then + if (abs(s) <= eps) then ier = 1 print *, '(subr. lisb) singular at step # ', j endif dr(2) = dcmplx(1.0d0) / s - if (m .lt. 3) then + if (m < 3) then do j=3,n xx = a(1,j) a(1,j) = xx * dr(j-1) s = a(2,j) - xx * a(1,j) - if (abs(s) .le. eps) then + if (abs(s) <= eps) then ier = 1 print *, ' (subr. lisb) singular at step # ', j endif @@ -61,7 +61,7 @@ subroutine dclisb(a, n, nud, n1, np, b, eps, dr, z, ier) else do j=3,n k1 = 1 - if (j .ge. m) k1 = j - m + 1 + if (j >= m) k1 = j - m + 1 mj = m - j do i=k1+1,j-1 sum = dcmplx(0.0d0) @@ -78,7 +78,7 @@ subroutine dclisb(a, n, nud, n1, np, b, eps, dr, z, ier) a(mj+i,j) = au enddo t = a(m,j) - sum - if (abs(t) .le. eps) then + if (abs(t) <= eps) then ier = 1 print *, ' (subr. lisb) singular at step # ', j endif @@ -89,7 +89,7 @@ subroutine dclisb(a, n, nud, n1, np, b, eps, dr, z, ier) entry dcsbsub(a, n, nud, n1, np, b, eps, dr, z, ier) ! forward substitution m = nud + 1 - if (m .lt. 3) then + if (m < 3) then z(np) = b(np) do j=np+1,n z(j) = b(j) - a(1,j) * z(j-1) @@ -99,7 +99,7 @@ subroutine dclisb(a, n, nud, n1, np, b, eps, dr, z, ier) z(np) = b(np) z(np+1) = b(np+1) - a(m-1,np+1) * z(np) do j=np+2,n - if (j .gt. np-1+m) then + if (j > np-1+m) then i1 = 1 else i1 = np-1+m - j + 1 @@ -115,8 +115,8 @@ subroutine dclisb(a, n, nud, n1, np, b, eps, dr, z, ier) enddo b(n) = z(n) b(n-1) = z(n-1) - a(m-1,n) * z(n) - endif - + endif + end subroutine dclisb diff --git a/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/Part-2a-read_DSM_coefficients_back_SH/TraPSV_MPI_read_Zmin/glu2.f90 b/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/Part-2a-read_DSM_coefficients_back_SH/TraPSV_MPI_read_Zmin/glu2.f90 index 0e22e0117..09aa3bf35 100755 --- a/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/Part-2a-read_DSM_coefficients_back_SH/TraPSV_MPI_read_Zmin/glu2.f90 +++ b/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/Part-2a-read_DSM_coefficients_back_SH/TraPSV_MPI_read_Zmin/glu2.f90 @@ -35,9 +35,9 @@ subroutine glu( a, n, n1, b, eps, wk, ip, ier ) complex(kind(0d0)) :: amax,aik,w,t ! left-hand side - if( eps.lt.0.d0 ) eps = 3.52d-15 + if( eps<0.d0 ) eps = 3.52d-15 - if( ( n1.lt.n ).or.( n.le.0 ) ) then + if( ( n1abs( amax ) ) then ipk = i amax = aik - end if + endif enddo - + ip(k) = ipk - - if( abs( amax ).gt.eps ) then - if( ipk.ne.k ) then + + if( abs( amax )>eps ) then + if( ipk/=k ) then w = a(ipk,k) a(ipk,k) = a(k,k) a(k,k) = w @@ -91,7 +91,7 @@ subroutine glu( a, n, n1, b, eps, wk, ip, ier ) wk(i) = a(i,k) enddo do j = k+1, n - if( ipk.ne.k ) then + if( ipk/=k ) then w = a(ipk,j) a(ipk,j) = a(k,j) a(k,j) = w @@ -102,7 +102,7 @@ subroutine glu( a, n, n1, b, eps, wk, ip, ier ) a(i,j) = a(i,j) + wk(i)*t enddo enddo - + ! matrix is singular. else ier = 1 @@ -114,18 +114,18 @@ subroutine glu( a, n, n1, b, eps, wk, ip, ier ) return endif enddo - + ! right-hand side ! entry glusub( a, b ) entry glusub( a, n, n1, b, eps, wk, ip, ier ) !forward elimination process do k = 1, n - if( ip(k).ne.k ) then + if( ip(k)/=k ) then w = b(ip(k)) b(ip(k)) = b(k) b(k) = w endif - + t = b(k) do i = k+1, n b(i) = b(i) + a(i,k)*t diff --git a/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/Part-2a-read_DSM_coefficients_back_SH/TraPSV_MPI_read_Zmin/others.f90 b/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/Part-2a-read_DSM_coefficients_back_SH/TraPSV_MPI_read_Zmin/others.f90 index 52cc60cf9..b24fb970e 100755 --- a/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/Part-2a-read_DSM_coefficients_back_SH/TraPSV_MPI_read_Zmin/others.f90 +++ b/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/Part-2a-read_DSM_coefficients_back_SH/TraPSV_MPI_read_Zmin/others.f90 @@ -10,13 +10,13 @@ subroutine pinputTra(outputDir,psvmodel,modelname,stationsinf,tlen,imin,imax,r0m 100 continue read(5,110) dummy 110 format(a120) - if(dummy(1:1).eq.'#') goto 100 - if(dummy(1:3).eq.'end') goto 120 + if(dummy(1:1)=='#') goto 100 + if(dummy(1:3)=='end') goto 120 write(1,110) dummy goto 100 120 continue close(1) - + open(unit=1,file=tmpfile,status='unknown') read(1,110) outputDir read(1,110) psvmodel @@ -99,13 +99,13 @@ subroutine pinput(outputDir,psvmodel,modelname,tlen,rmin_,rmax_,rdelta_,r0min,r0 100 continue read(5,110) dummy 110 format(a120) - if(dummy(1:1).eq.'#') goto 100 - if(dummy(1:3).eq.'end') goto 120 + if(dummy(1:1)=='#') goto 100 + if(dummy(1:3)=='end') goto 120 write(1,110) dummy goto 100 120 continue close(1) - + open(unit=1,file=tmpfile,status='unknown') read(1,110) outputDir read(1,110) psvmodel @@ -124,25 +124,25 @@ subroutine pinput(outputDir,psvmodel,modelname,tlen,rmin_,rmax_,rdelta_,r0min,r0 close(1) end subroutine pinput - + subroutine udertoStress(uder,stress,A,C,F,L,N) implicit none complex(kind(0d0)) :: uder(1:3,1:3), stress(1:6) real(kind(0d0)) :: A,C,F,L,N - + stress(1) = stress(1)+C*uder(1,1)+F*uder(2,2)+F*uder(3,3) stress(2) = stress(2)+F*uder(1,1)+A*uder(2,2)+A*uder(3,3)-2.d0*N*uder(3,3) stress(3) = stress(3)+F*uder(1,1)+A*uder(2,2)+A*uder(3,3)-2.d0*N*uder(2,2) stress(4) = stress(4)+L*(uder(1,2)+uder(2,1)) stress(5) = stress(5)+L*(uder(1,3)+uder(3,1)) stress(6) = stress(6)+N*(uder(2,3)+uder(3,2)) - + return end subroutine udertoStress - + ! @@ -153,12 +153,12 @@ subroutine setmt(imt,mt) real(kind(0d0)) :: mt(3,3) integer :: imt mt = 0.d0 - if(imt.eq.1) mt(1,1) = 1.d0 - if(imt.eq.2) mt(2,2) = 1.d0 - if(imt.eq.3) mt(3,3) = 1.d0 - if(imt.eq.4) mt(1,2) = 1.d0 - if(imt.eq.5) mt(1,3) = 1.d0 - if(imt.eq.6) mt(2,3) = 1.d0 + if(imt==1) mt(1,1) = 1.d0 + if(imt==2) mt(2,2) = 1.d0 + if(imt==3) mt(3,3) = 1.d0 + if(imt==4) mt(1,2) = 1.d0 + if(imt==5) mt(1,3) = 1.d0 + if(imt==6) mt(2,3) = 1.d0 return end subroutine setmt @@ -170,7 +170,7 @@ subroutine udertotsgtSH(imt,uder,ttsgt) complex(kind(0d0)) :: uder(1:3,1:3),tsgt(1:20),ttsgt(1:10) tsgt = cmplx(0.d0) - + tsgt(7) = ttsgt(1) tsgt(12) = ttsgt(2) tsgt(13) = ttsgt(3) @@ -183,17 +183,17 @@ subroutine udertotsgtSH(imt,uder,ttsgt) tsgt(20) = ttsgt(10) - if(imt.eq.1) then ! rr source + if(imt==1) then ! rr source tsgt(1) = tsgt(1) + uder(1,1) tsgt(3) = tsgt(3) - 5.d-1*uder(2,2) - 5.d-1*uder(3,3) tsgt(6) = tsgt(6) + uder(1,2) + uder(2,1) tsgt(10)= tsgt(10)+ 5.d-1*uder(2,2) - 5.d-1*uder(3,3) endif - if(imt.eq.2) then ! tt source + if(imt==2) then ! tt source tsgt(2) = tsgt(2) - 5.d-1*uder(1,1) tsgt(4) = tsgt(4) + 2.5d-1*uder(2,2) + 2.5d-1*uder(3,3) tsgt(8) = tsgt(8) - 5.d-1*uder(1,2) - 5.d-1*uder(2,1) - tsgt(9) = tsgt(9) + 5.d-1*uder(1,1) + tsgt(9) = tsgt(9) + 5.d-1*uder(1,1) tsgt(11)= tsgt(11)- 2.5d-1*uder(2,2) + 2.5d-1*uder(3,3) tsgt(12)= tsgt(12)- 2.5d-1*uder(2,2) - 2.5d-1*uder(3,3) tsgt(17)= tsgt(17)+ 2.5d-1*uder(1,2) + 2.5d-1*uder(2,1) @@ -201,7 +201,7 @@ subroutine udertotsgtSH(imt,uder,ttsgt) tsgt(19)= tsgt(19)+ 1.25d-1*uder(2,2) - 1.25d-1*uder(3,3) tsgt(20)= tsgt(20)+ 1.25d-1*uder(2,2) - 1.25d-1*uder(3,3) endif - if(imt.eq.3) then ! pp source + if(imt==3) then ! pp source tsgt(2) = tsgt(2) - 5.d-1*uder(1,1) tsgt(4) = tsgt(4) + 2.5d-1*uder(2,2) + 2.5d-1*uder(3,3) tsgt(8) = tsgt(8) - 5.d-1*uder(1,2) - 5.d-1*uder(2,1) @@ -213,7 +213,7 @@ subroutine udertotsgtSH(imt,uder,ttsgt) tsgt(19)= tsgt(19) -1.25d-1*uder(2,2) + 1.25d-1*uder(3,3) tsgt(20)= tsgt(20) -1.25d-1*uder(2,2) + 1.25d-1*uder(3,3) endif - if(imt.eq.4) then ! rt source + if(imt==4) then ! rt source tsgt(5) = tsgt(5) - uder(1,1) tsgt(7) = tsgt(7) + 5.d-1*uder(2,2) + 5.d-1*uder(3,3) tsgt(13)= tsgt(13)- 5.d-1*uder(1,2) - 5.d-1*uder(2,1) @@ -221,13 +221,13 @@ subroutine udertotsgtSH(imt,uder,ttsgt) tsgt(15)= tsgt(15)- 2.5d-1*uder(2,2) + 2.5d-1*uder(3,3) tsgt(16)= tsgt(16)+ 2.5d-1*uder(2,2) - 2.5d-1*uder(3,3) endif - if(imt.eq.5) then ! rp source + if(imt==5) then ! rp source tsgt(13)= tsgt(13)+ 5.d-1*uder(1,3) + 5.d-1*uder(3,1) tsgt(14)= tsgt(14)+ 5.d-1*uder(1,3) + 5.d-1*uder(3,1) tsgt(15)= tsgt(15)+ 5.d-1*uder(2,3) + 5.d-1*uder(3,2) tsgt(16)= tsgt(16)+ 5.d-1*uder(2,3) + 5.d-1*uder(3,2) endif - if(imt.eq.6) then ! tp source + if(imt==6) then ! tp source tsgt(17)= tsgt(17)- 5.d-1*uder(1,3) - 5.d-1*uder(3,1) tsgt(18)= tsgt(18)- 5.d-1*uder(1,3) - 5.d-1*uder(3,1) tsgt(19)= tsgt(19)- 5.d-1*uder(2,3) - 5.d-1*uder(3,2) @@ -270,7 +270,7 @@ subroutine locallyCartesianDerivatives (u,udr,udt,udp,uder,r,theta) uder(3,3) = (udp(3)/cmplx(thetasin)+u(1)+u(2)*cmplx(thetacot))/cmplx(r) return end subroutine locallyCartesianDerivatives - + subroutine normalisetoKM(u,r) implicit none @@ -288,7 +288,7 @@ end subroutine normalisetoKM subroutine calgrid( nzone,vrmin,vrmax,vs,rmin,rmax, & & imax,lmin,tlen,vmin,gridpar,dzpar ) implicit none - real(kind(0d0)), parameter :: pi=3.1415926535897932d0 + real(kind(0d0)), parameter :: pi=3.1415926535897932d0 integer :: nzone,imax,lmin real(kind(0d0)) :: vrmin(*),vrmax(*),vs(4,*) real(kind(0d0)) :: rmin,rmax,tlen,vmin(*),gridpar(*),dzpar(*) @@ -302,12 +302,12 @@ subroutine calgrid( nzone,vrmin,vrmax,vs,rmin,rmax, & vs1 = 0.d0 vs2 = 0.d0 do j=1,4 - if ( j.eq.1 ) then + if ( j==1 ) then coef1 = 1.d0 else coef1 = coef1 * ( vrmin(izone) / rmax ) endif - if ( j.eq.1 ) then + if ( j==1 ) then coef2 = 1.d0 else coef2 = coef2 * ( vrmax(izone) / rmax ) @@ -319,7 +319,7 @@ subroutine calgrid( nzone,vrmin,vrmax,vs,rmin,rmax, & rh = vrmax(izone) - vrmin(izone) ! computing omega,amax omega = 2.d0 * pi * dble(imax) / tlen - if ( vs1.ge.vs2 ) then + if ( vs1>=vs2 ) then vmin(izone) = vs2 else vmin(izone) = vs1 @@ -328,7 +328,7 @@ subroutine calgrid( nzone,vrmin,vrmax,vs,rmin,rmax, & gtmp = ( omega * omega ) / ( vmin(izone) * vmin(izone) ) & & - ( (dble(lmin)+0.5d0) * (dble(lmin)+0.5d0) )& & / ( amax * amax ) - if ( gtmp.gt.0.d0 ) then + if ( gtmp>0.d0 ) then dzpar(izone) = dsqrt( 1.d0/gtmp ) gridpar(izone) = rh / dzpar(izone) else @@ -343,7 +343,7 @@ subroutine calgrid( nzone,vrmin,vrmax,vs,rmin,rmax, & enddo do izone=1,nzone - if ( gridpar(izone).gt.0.d0 ) then + if ( gridpar(izone)>0.d0 ) then gridpar(izone) = gridpar(izone) / gtmp else rh = vrmax(izone) - vrmin(izone) @@ -360,7 +360,7 @@ subroutine calgrid( nzone,vrmin,vrmax,vs,rmin,rmax, & gridpar(izone) = gridpar(izone) / gtmp enddo - + end subroutine calgrid !----------------------------------------------------------------------------- @@ -368,7 +368,7 @@ end subroutine calgrid subroutine calra(nlayer,gridpar,dzpar,nzone,vrmin,vrmax,rmin,rmax,nnl,re ) implicit none - real(kind(0d0)), parameter :: pi=3.1415926535897932d0 + real(kind(0d0)), parameter :: pi=3.1415926535897932d0 integer :: nlayer,inlayer integer :: nzone, nnl(nzone) real(kind(0d0)) :: gridpar(*),dzpar(*),vrmin(*),vrmax(*),rmin,rmax @@ -380,22 +380,22 @@ subroutine calra(nlayer,gridpar,dzpar,nzone,vrmin,vrmax,rmin,rmax,nnl,re ) do izone=1,nzone rh = vrmax(izone) - vrmin(izone) - if(dzpar(izone).eq.0.d0) then + if(dzpar(izone)==0.d0) then ntmp = 1 else ntmp = int( sqrt(3.3d0 / re ) * rh / dzpar(izone) & & / 2.d0 / pi / 7.d-1 + 1 ) endif - ! ntmp (see Geller & Takeuchi 1995 6.2) + ! ntmp (see Geller & Takeuchi 1995 6.2) nnl(izone) = ntmp - if ( nnl(izone).lt.5 ) nnl(izone)=5 + if ( nnl(izone)<5 ) nnl(izone)=5 enddo inlayer = 0 do izone=1,nzone inlayer = inlayer + nnl(izone) enddo - nlayer = inlayer + nlayer = inlayer end subroutine calra @@ -405,7 +405,7 @@ end subroutine calra subroutine calra2(nlayer,gridpar,dzpar,nzone,vrmin,vrmax,rmin,rmax,nnl,ra,re,nsta,rsta,rrsta, iista,updown) implicit none - real(kind(0d0)), parameter :: pi=3.1415926535897932d0 + real(kind(0d0)), parameter :: pi=3.1415926535897932d0 integer :: nlayer integer :: nzone,nnl(nzone) real(kind(0d0)) :: gridpar(*),dzpar(*),vrmin(*),vrmax(*),rmin,rmax,ra(nlayer+nzone+1) @@ -425,7 +425,7 @@ subroutine calra2(nlayer,gridpar,dzpar,nzone,vrmin,vrmax,rmin,rmax,nnl,ra,re,nst do i=1,nnl(izone) itmp = itmp + 1 ra(itmp) = vrmin(izone) & - & + rh * dble(i) / dble( nnl(izone) ) + & + rh * dble(i) / dble( nnl(izone) ) enddo enddo @@ -436,19 +436,19 @@ subroutine calra2(nlayer,gridpar,dzpar,nzone,vrmin,vrmax,rmin,rmax,nnl,ra,re,nst !write(*,*) 'check for the last a few ra elements' !do ii=itmp,nlayer+nzone+1,1 !write(*,*) ii,'th radiu of the model is:',ra(ii) -!end do +!enddo itmp = 1 do izone=1,nzone rh = vrmax(izone) - vrmin(izone) do i=1,nnl(izone) do ista = 1, nsta - if( (ra(itmp).lt.rsta(ista)) .and.(rsta(ista).le.ra(itmp+1))) then - if(i.ne.nnl(izone)) then + if( (ra(itmp)=chikasa)) then ! ciista = ista ! ctmp = abs(rs-rsta(ista)) !endif - endif + endif enddo - itmp = itmp + 1 + itmp = itmp + 1 enddo enddo @@ -480,29 +480,29 @@ subroutine calra2(nlayer,gridpar,dzpar,nzone,vrmin,vrmax,rmin,rmax,nnl,ra,re,nst do i=1,nnl(izone) do ista = 1, nsta if (updown(ista)/=-1) then - if( (ra(itmp).lt.rsta(ista)) .and.(rsta(ista).le.ra(itmp+1))) then + if( (ra(itmp)=chikasa)) then ! ciista = ista ! ctmp = abs(rs-rsta(ista)) !endif enddo - itmp = itmp + 1 + itmp = itmp + 1 enddo enddo - if(ciista.eq.0) ciista = 1 - + if(ciista==0) ciista = 1 + end subroutine calra2 @@ -534,41 +534,41 @@ subroutine calspo( ndc,rdc,nlayer,r0,rmin,rmax,ra, isp,spo,spn ) integer :: ndc,nlayer,isp(*),spn real(kind(0d0)) :: rdc(*),r0,rmin,rmax,ra(*),spo integer :: itmp - + ! checquer des parameters - if ( (r0.lt.rmin).or.(r0.gt.rmax) ) & + if ( (r0rmax) ) & & pause 'The source location is improper.(calspo)' ! computing 'spo' - if ( r0.eq.rmax ) then + if ( r0==rmax ) then spo = dble(nlayer) - 0.01d0 r0 = ra(nlayer) & - & + (spo-dble(nlayer-1)) * ( ra(nlayer+1)-ra(nlayer) ) + & + (spo-dble(nlayer-1)) * ( ra(nlayer+1)-ra(nlayer) ) else - do itmp = 2, ndc+nlayer+2 - if ( r0.lt.ra(itmp) ) exit + do itmp = 2, ndc+nlayer+2 + if ( r00.99d0 ) then spo = dble(itmp-2) + 0.99d0 - r0 = ra(itmp-1) + (spo-dble(itmp-2)) * ( ra(itmp)-ra(itmp-1) ) + r0 = ra(itmp-1) + (spo-dble(itmp-2)) * ( ra(itmp)-ra(itmp-1) ) endif - + endif ! computing 'spn' spn = 0 - do itmp = 1, ndc+1 + do itmp = 1, ndc+1 spn = spn + 1 - if ( r0.le.rdc(itmp) ) exit + if ( r0<=rdc(itmp) ) exit enddo ! changing 'spo' spo = spo - dble( isp(spn) - 1 ) - + end subroutine calspo @@ -578,15 +578,15 @@ end subroutine calspo subroutine calgra( isp,ra,r0,spn,spo,gra ) - + integer :: isp(*),spn,itmp real(kind(0d0)) :: ra(*),r0,spo,gra(*) - + itmp = isp(spn) + dint( spo ) gra(1) = ra(itmp) gra(2) = r0 gra(3) = ra(itmp+1) - + end subroutine calgra !----------------------------------------------------------------------------- @@ -617,7 +617,7 @@ subroutine calstg( nzone,rrho,vsv,vsh,nlayer,nnl,ra,rmax,vnp,vra,rho,ecL,ecN ) tvsv = 0.d0 tvsh = 0.d0 do j=1,4 - if ( j.eq.1 ) then + if ( j==1 ) then coef = 1.d0 else coef = coef * ( vra(itmp) / rmax ) @@ -626,7 +626,7 @@ subroutine calstg( nzone,rrho,vsv,vsh,nlayer,nnl,ra,rmax,vnp,vra,rho,ecL,ecN ) tvsv = tvsv + vsv(j,izone) * coef tvsh = tvsh + vsh(j,izone) * coef enddo - rho(itmp) = trho + rho(itmp) = trho ecL(itmp) = rho(itmp) * tvsv * tvsv ecN(itmp) = rho(itmp) * tvsh * tvsh @@ -663,7 +663,7 @@ subroutine calgstg(nzone,nlayer,spn,rrho,vsv,vsh, ra,vra,rmax,rho,ecL,ecN,r0,mu0 tvsv = 0.d0 tvsh = 0.d0 do j=1,4 - if ( j.eq.1 ) then + if ( j==1 ) then coef = 1.d0 else coef = coef * ( vra(i) / rmax ) @@ -675,7 +675,7 @@ subroutine calgstg(nzone,nlayer,spn,rrho,vsv,vsh, ra,vra,rmax,rho,ecL,ecN,r0,mu0 rho(i) = trho ecL(i) = rho(i) * tvsv * tvsv ecN(i) = rho(i) * tvsh * tvsh - + enddo mu0 = ecL(2) @@ -695,17 +695,17 @@ subroutine callsuf(omega,nzone,vrmax,vsv,lsuf) real(kind(0d0)) :: omega, vrmax(*), vsv(4,*) real(kind(0d0)) :: tvs, coef integer :: i - + tvs = 0.d0 do i=1,4 - if(i.eq.1) then + if(i==1) then coef = 1.d0 else - coef = coef + coef = coef endif - tvs = tvs + ( vsv(i,nzone) ) * coef + tvs = tvs + ( vsv(i,nzone) ) * coef enddo - + lsuf = int(omega * vrmax(nzone) / tvs - 0.5d0) + 1 end subroutine callsuf @@ -715,17 +715,17 @@ end subroutine callsuf subroutine calcoef( nzone,omega,q,coef ) implicit none - real(kind(0d0)), parameter :: pi = 3.1415926535897932d0 + real(kind(0d0)), parameter :: pi = 3.1415926535897932d0 integer :: izone,nzone real(kind(0d0)) :: omega,q(*) complex(kind(0d0)) :: coef(*) real(kind(0d0)) :: aa,bb - - do izone=1,nzone - if(q(izone).le.0.d0) then + + do izone=1,nzone + if(q(izone)<=0.d0) then coef(izone) = dcmplx(1.d0) else - if ( omega.eq.0.d0 ) then + if ( omega==0.d0 ) then aa = 1.d0 else aa = 1.d0 + dlog( omega / ( 2.d0 * pi ) ) / ( pi * q(izone) ) @@ -740,24 +740,24 @@ end subroutine calcoef !----------------------------------------------------------------------------- subroutine calamp(g,l,lsuf,maxamp,ismall,ratl) - + implicit none integer :: l,lsuf,ismall real(kind(0d0)) :: maxamp,ratl complex(kind(0d0)) :: g - real(kind(0d0)) :: amp,ampratio + real(kind(0d0)) :: amp,ampratio ampratio = 0.d0 amp = abs(g) - if( amp.gt.maxamp ) maxamp = amp - if ( (amp.ne.0.d0).and.(maxamp.ne.0.d0) ) then + if( amp>maxamp ) maxamp = amp + if ( (amp/=0.d0).and.(maxamp/=0.d0) ) then ampratio = amp / maxamp endif - if( (ampratio.lt.ratl).and.(l.gt.lsuf) ) then + if( (ampratiolsuf) ) then ismall = ismall + 1 else ismall = 0 endif - + end subroutine calamp @@ -767,7 +767,7 @@ subroutine calu(c0,lsq,bvec,u) implicit none real(kind(0d0)) :: lsq complex(kind(0d0)) :: c0, bvec(3), u(1:3) - + u(1) = dcmplx( 0.d0 ) u(2) = u(2) + c0 * bvec(2) / dcmplx(lsq) u(3) = u(3) + c0 * bvec(3) / dcmplx(lsq) @@ -782,23 +782,23 @@ subroutine interpolate( ncomp,nderiv,rsta,rrsta,g,u ) implicit none integer :: ncomp,nderiv real(kind(0d0)) :: rsta,rrsta(3) - complex(kind(0d0)) :: g(3*ncomp),u(ncomp) - real(kind(0d0)):: dh(3) + complex(kind(0d0)) :: g(3*ncomp),u(ncomp) + real(kind(0d0)):: dh(3) integer :: ip(3),ier,i,itmp,icomp complex(kind(0d0)) :: a(3,3),b(3),wk(3) - real(kind(0d0)) :: eps + real(kind(0d0)) :: eps data eps / -1.d0 / do icomp=1,ncomp u(icomp) = dcmplx(0.d0) enddo - + do i=1,3 dh(i) = rrsta(i) - rsta enddo - - if( (dh(2).eq.0.d0).and.(nderiv.eq.0)) then + + if( (dh(2)==0.d0).and.(nderiv==0)) then itmp = ncomp + 1 do icomp=1,ncomp u(icomp) = g(itmp) @@ -806,18 +806,18 @@ subroutine interpolate( ncomp,nderiv,rsta,rrsta,g,u ) enddo return endif - + do i=1,3 a(1,i) = dcmplx( 1.d0 ) a(2,i) = dcmplx( dh(i) ) a(3,i) = dcmplx( dh(i) * dh(i) / 2.d0 ) enddo - + call fillinpb(nderiv,b) call glu(a,3,3,b,eps,wk,ip,ier) - - + + do icomp=1,ncomp do i=1,3 u(icomp) = u(icomp) + b(i) * g( ncomp * (i-1) + icomp ) @@ -837,23 +837,23 @@ subroutine fillinpb( nderiv,b ) integer :: nderiv complex(kind(0d0)) :: b(3) - - if( (nderiv.ne.0).and.(nderiv.ne.1).and.(nderiv.ne.2) ) & + + if( (nderiv/=0).and.(nderiv/=1).and.(nderiv/=2) ) & & pause 'invalid argument (fillinpb)' - if(nderiv.eq.0) then + if(nderiv==0) then b(1) = dcmplx( 1.d0 ) b(2) = dcmplx( 0.d0 ) b(3) = dcmplx( 0.d0 ) - elseif(nderiv.eq.1) then + else if(nderiv==1) then b(1) = dcmplx( 0.d0 ) b(2) = dcmplx( 1.d0 ) b(3) = dcmplx( 0.d0 ) - elseif(nderiv.eq.2) then + else if(nderiv==2) then b(1) = dcmplx( 0.d0 ) b(2) = dcmplx( 0.d0 ) b(3) = dcmplx( 1.d0 ) endif - + return end subroutine fillinpb @@ -872,11 +872,11 @@ subroutine calcutd(nzone,nnl,tmpr,rat,nn,ra,kc) real(kind(0d0)):: cU(nn),rc real(kind(0d0)) :: maxamp,amp(nn) integer :: iz,jz,jj,i,ml(nzone),tzone - + do jj=1,nn cU(jj) = 0.d0 enddo - + iz = 2 jz = 1 do jj=1,nn @@ -886,34 +886,34 @@ subroutine calcutd(nzone,nnl,tmpr,rat,nn,ra,kc) maxamp = -1.d0 do i=1,nn amp(i) = cU(i) - if(maxamp.lt.amp(i)) maxamp = amp(i) + if(maxampmaxamp) then nc = i exit endif enddo - + i = 1 do jj=1,nzone i = i + nnl(jj) ml(jj) = i enddo - + do jj=nzone,1,-1 - if(ml(jj).gt.nc) tzone = jj + if(ml(jj)>nc) tzone = jj enddo rc = ra(nc) kc = nc - + return end subroutine calcutd @@ -933,25 +933,25 @@ subroutine calstg4onedepth( maxnlay,maxnzone,nzone,vrmin,vrmax,iphase,rrho,vpv,v real(kind(0d0)):: ecA,ecC,ecF real(kind(0d0)):: trho,tvpv,tvph,tvsv,tvsh,teta,coef integer:: izone,j,itmp,jtmp,spn - + ! computing the structure grid points itmp = 0 jtmp = 0 spn = 0 do izone=1,nzone - if((vrmin(izone).le.r).and.(vrmax(izone).gt.r)) then + if((vrmin(izone)<=r).and.(vrmax(izone)>r)) then spn = izone endif enddo - if (vrmax(nzone).eq.r) spn = nzone - if((vrmin(spn).eq.r).and.(updown.eq.-1)) then + if (vrmax(nzone)==r) spn = nzone + if((vrmin(spn)==r).and.(updown==-1)) then spn = spn - 1 endif - - + + trho = 0.d0 tvpv = 0.d0 tvph = 0.d0 @@ -959,7 +959,7 @@ subroutine calstg4onedepth( maxnlay,maxnzone,nzone,vrmin,vrmax,iphase,rrho,vpv,v tvsh = 0.d0 teta = 0.d0 do j=1,4 - if ( j.eq.1 ) then + if ( j==1 ) then coef = 1.d0 else coef = coef * ( r / rmax ) @@ -976,7 +976,7 @@ subroutine calstg4onedepth( maxnlay,maxnzone,nzone,vrmin,vrmax,iphase,rrho,vpv,v ecA = trho * tvph * tvph ecC = trho * tvpv * tvpv ecF = teta * ( ecA - 2.d0 * ecL ) - + return end subroutine calstg4onedepth @@ -1038,21 +1038,21 @@ subroutine translat(geodetic,geocentric) implicit none real(kind(0d0)),parameter :: flattening = 1.d0 / 298.25d0 - real(kind(0d0)), parameter :: pi = 3.1415926535897932d0 - real(kind(0d0)) :: geocentric, geodetic + real(kind(0d0)), parameter :: pi = 3.1415926535897932d0 + real(kind(0d0)) :: geocentric, geodetic ! real(kind(0d0)) :: tmp integer :: flag flag = 0 - if(geodetic .gt. 90.d0) then + if(geodetic > 90.d0) then geodetic = 1.8d2 - geodetic flag = 1 endif - + geodetic = geodetic / 1.8d2 * pi geocentric = datan((1.d0-flattening)*(1.d0-flattening)* dtan(geodetic) ) geocentric = geocentric * 1.8d2 / pi - - if(flag .eq. 1) then + + if(flag == 1) then geocentric = 1.8d2 - geocentric endif @@ -1061,10 +1061,10 @@ end subroutine translat subroutine calthetaphi(ievla,ievlo,istla,istlo,theta,phi) - + implicit none - real(kind(0d0)), parameter:: pi = 3.1415926535897932d0 - + real(kind(0d0)), parameter:: pi = 3.1415926535897932d0 + real(kind(0d0)) :: ievla,ievlo,istla,istlo real(kind(0d0)) :: evla,evlo,stla,stlo real(kind(0d0)) :: theta,phi @@ -1072,25 +1072,25 @@ subroutine calthetaphi(ievla,ievlo,istla,istlo,theta,phi) real(kind(0d0)) :: tc,ts ! transformation to spherical coordinates - + evla = 90.d0 - ievla stla = 90.d0 - istla - + evla = evla / 1.8d2 * pi evlo = ievlo / 1.8d2 * pi stla = stla / 1.8d2 * pi stlo = istlo / 1.8d2 * pi - + gcarc = dacos( dcos(evla) * dcos(stla) + dsin(evla) * dsin(stla) * dcos(evlo - stlo) ) - + tc = (dcos(stla)*dsin(evla)-dsin(stla)*dcos(evla)*dcos(stlo-evlo))/dsin(gcarc) ts = dsin(stla) * dsin(stlo - evlo) / dsin(gcarc) az = dacos(tc) - if( ts .lt. 0.d0 ) az = -1.d0 * az - + if( ts < 0.d0 ) az = -1.d0 * az + az = az * 1.8d2 / pi - + gcarc = gcarc * 1.8d2 / pi theta = gcarc @@ -1129,13 +1129,13 @@ subroutine WriteFrqByproc(proc,imin,imax) write(20,"(i2)") 2 -if ( abs(imax-imin)-proc*dis > 0 ) then +if ( abs(imax-imin)-proc*dis > 0 ) then write(*,*) 'wrong task distribution.please check the code WriteFrqByproc!' stop else redun = abs(imax-imin)-proc*(dis-1) summ = 0 - f1 = 0 + f1 = 0 f2 = dis do k=0,redun-1,1 summ = f2 @@ -1143,7 +1143,7 @@ subroutine WriteFrqByproc(proc,imin,imax) write(*,*) 'summ is',summ f1 = f2+1 f2 = f2+dis - end do + enddo if (redun == 0) then f2 = f1+dis-1 @@ -1158,7 +1158,7 @@ subroutine WriteFrqByproc(proc,imin,imax) f1 = f2+1 f2 = f2+dis-1 enddo - + if ( summ /= abs(imax-imin) ) then write(*,*) 'wrong task distribution.please check the code WriteFrqByproc!' stop @@ -1266,7 +1266,7 @@ subroutine epitra(SourceLat,SourceLong,RecLat,RecLong,delta,azi,bazi) azi = 180.d0 - azi end subroutine epitra - + !----------------------------------------------------------------- subroutine DistribSta(n,n_global,myrank,nbproc,irmin,irmax) implicit none @@ -1274,14 +1274,14 @@ subroutine DistribSta(n,n_global,myrank,nbproc,irmin,irmax) n = int(n_global/nbproc) coef = mod(n_global,nbproc) - + if ( myrank < mod(n_global,nbproc) .and. mod(n_global,nbproc) /=0) then n = n + 1 - coef = 0 + coef = 0 endif irmin = (myrank ) * n + 1 + coef - irmax = (myrank + 1 ) * n + coef + irmax = (myrank + 1 ) * n + coef end subroutine DistribSta @@ -1304,35 +1304,35 @@ subroutine write_a_block_of_coefs_to_disk(tabg0,tabg0der,tabg0_small_buffer,ir_, ! tabg0_small_buffer(illog,:,:,:) = tabg0(illog,:,:,:,ir_) !! DK DK unrolled the loops to allow for vectorization of the outer loop on "illog" tabg0_small_buffer(illog,1,1,-2) = tabg0(illog,1,1,-2,ir_) - tabg0_small_buffer(illog,1,2,-2) = tabg0(illog,1,2,-2,ir_) - tabg0_small_buffer(illog,1,3,-2) = tabg0(illog,1,3,-2,ir_) - tabg0_small_buffer(illog,1,4,-2) = tabg0(illog,1,4,-2,ir_) - tabg0_small_buffer(illog,1,5,-2) = tabg0(illog,1,5,-2,ir_) - tabg0_small_buffer(illog,1,6,-2) = tabg0(illog,1,6,-2,ir_) - tabg0_small_buffer(illog,1,1,-1) = tabg0(illog,1,1,-1,ir_) - tabg0_small_buffer(illog,1,2,-1) = tabg0(illog,1,2,-1,ir_) - tabg0_small_buffer(illog,1,3,-1) = tabg0(illog,1,3,-1,ir_) - tabg0_small_buffer(illog,1,4,-1) = tabg0(illog,1,4,-1,ir_) - tabg0_small_buffer(illog,1,5,-1) = tabg0(illog,1,5,-1,ir_) - tabg0_small_buffer(illog,1,6,-1) = tabg0(illog,1,6,-1,ir_) - tabg0_small_buffer(illog,1,1,0) = tabg0(illog,1,1,0,ir_) - tabg0_small_buffer(illog,1,2,0) = tabg0(illog,1,2,0,ir_) - tabg0_small_buffer(illog,1,3,0) = tabg0(illog,1,3,0,ir_) - tabg0_small_buffer(illog,1,4,0) = tabg0(illog,1,4,0,ir_) - tabg0_small_buffer(illog,1,5,0) = tabg0(illog,1,5,0,ir_) - tabg0_small_buffer(illog,1,6,0) = tabg0(illog,1,6,0,ir_) - tabg0_small_buffer(illog,1,1,1) = tabg0(illog,1,1,1,ir_) - tabg0_small_buffer(illog,1,2,1) = tabg0(illog,1,2,1,ir_) - tabg0_small_buffer(illog,1,3,1) = tabg0(illog,1,3,1,ir_) - tabg0_small_buffer(illog,1,4,1) = tabg0(illog,1,4,1,ir_) - tabg0_small_buffer(illog,1,5,1) = tabg0(illog,1,5,1,ir_) - tabg0_small_buffer(illog,1,6,1) = tabg0(illog,1,6,1,ir_) - tabg0_small_buffer(illog,1,1,2) = tabg0(illog,1,1,2,ir_) - tabg0_small_buffer(illog,1,2,2) = tabg0(illog,1,2,2,ir_) - tabg0_small_buffer(illog,1,3,2) = tabg0(illog,1,3,2,ir_) - tabg0_small_buffer(illog,1,4,2) = tabg0(illog,1,4,2,ir_) - tabg0_small_buffer(illog,1,5,2) = tabg0(illog,1,5,2,ir_) - tabg0_small_buffer(illog,1,6,2) = tabg0(illog,1,6,2,ir_) + tabg0_small_buffer(illog,1,2,-2) = tabg0(illog,1,2,-2,ir_) + tabg0_small_buffer(illog,1,3,-2) = tabg0(illog,1,3,-2,ir_) + tabg0_small_buffer(illog,1,4,-2) = tabg0(illog,1,4,-2,ir_) + tabg0_small_buffer(illog,1,5,-2) = tabg0(illog,1,5,-2,ir_) + tabg0_small_buffer(illog,1,6,-2) = tabg0(illog,1,6,-2,ir_) + tabg0_small_buffer(illog,1,1,-1) = tabg0(illog,1,1,-1,ir_) + tabg0_small_buffer(illog,1,2,-1) = tabg0(illog,1,2,-1,ir_) + tabg0_small_buffer(illog,1,3,-1) = tabg0(illog,1,3,-1,ir_) + tabg0_small_buffer(illog,1,4,-1) = tabg0(illog,1,4,-1,ir_) + tabg0_small_buffer(illog,1,5,-1) = tabg0(illog,1,5,-1,ir_) + tabg0_small_buffer(illog,1,6,-1) = tabg0(illog,1,6,-1,ir_) + tabg0_small_buffer(illog,1,1,0) = tabg0(illog,1,1,0,ir_) + tabg0_small_buffer(illog,1,2,0) = tabg0(illog,1,2,0,ir_) + tabg0_small_buffer(illog,1,3,0) = tabg0(illog,1,3,0,ir_) + tabg0_small_buffer(illog,1,4,0) = tabg0(illog,1,4,0,ir_) + tabg0_small_buffer(illog,1,5,0) = tabg0(illog,1,5,0,ir_) + tabg0_small_buffer(illog,1,6,0) = tabg0(illog,1,6,0,ir_) + tabg0_small_buffer(illog,1,1,1) = tabg0(illog,1,1,1,ir_) + tabg0_small_buffer(illog,1,2,1) = tabg0(illog,1,2,1,ir_) + tabg0_small_buffer(illog,1,3,1) = tabg0(illog,1,3,1,ir_) + tabg0_small_buffer(illog,1,4,1) = tabg0(illog,1,4,1,ir_) + tabg0_small_buffer(illog,1,5,1) = tabg0(illog,1,5,1,ir_) + tabg0_small_buffer(illog,1,6,1) = tabg0(illog,1,6,1,ir_) + tabg0_small_buffer(illog,1,1,2) = tabg0(illog,1,1,2,ir_) + tabg0_small_buffer(illog,1,2,2) = tabg0(illog,1,2,2,ir_) + tabg0_small_buffer(illog,1,3,2) = tabg0(illog,1,3,2,ir_) + tabg0_small_buffer(illog,1,4,2) = tabg0(illog,1,4,2,ir_) + tabg0_small_buffer(illog,1,5,2) = tabg0(illog,1,5,2,ir_) + tabg0_small_buffer(illog,1,6,2) = tabg0(illog,1,6,2,ir_) enddo write(34) ir_,llog0 @@ -1347,34 +1347,34 @@ subroutine write_a_block_of_coefs_to_disk(tabg0,tabg0der,tabg0_small_buffer,ir_, !! DK DK unrolled the loops to allow for vectorization of the outer loop on "illog" tabg0_small_buffer(illog,1,1,-2) = tabg0der(illog,1,1,-2,ir_) tabg0_small_buffer(illog,1,2,-2) = tabg0der(illog,1,2,-2,ir_) - tabg0_small_buffer(illog,1,3,-2) = tabg0der(illog,1,3,-2,ir_) - tabg0_small_buffer(illog,1,4,-2) = tabg0der(illog,1,4,-2,ir_) - tabg0_small_buffer(illog,1,5,-2) = tabg0der(illog,1,5,-2,ir_) - tabg0_small_buffer(illog,1,6,-2) = tabg0der(illog,1,6,-2,ir_) - tabg0_small_buffer(illog,1,1,-1) = tabg0der(illog,1,1,-1,ir_) - tabg0_small_buffer(illog,1,2,-1) = tabg0der(illog,1,2,-1,ir_) - tabg0_small_buffer(illog,1,3,-1) = tabg0der(illog,1,3,-1,ir_) - tabg0_small_buffer(illog,1,4,-1) = tabg0der(illog,1,4,-1,ir_) - tabg0_small_buffer(illog,1,5,-1) = tabg0der(illog,1,5,-1,ir_) - tabg0_small_buffer(illog,1,6,-1) = tabg0der(illog,1,6,-1,ir_) - tabg0_small_buffer(illog,1,1,0) = tabg0der(illog,1,1,0,ir_) - tabg0_small_buffer(illog,1,2,0) = tabg0der(illog,1,2,0,ir_) - tabg0_small_buffer(illog,1,3,0) = tabg0der(illog,1,3,0,ir_) + tabg0_small_buffer(illog,1,3,-2) = tabg0der(illog,1,3,-2,ir_) + tabg0_small_buffer(illog,1,4,-2) = tabg0der(illog,1,4,-2,ir_) + tabg0_small_buffer(illog,1,5,-2) = tabg0der(illog,1,5,-2,ir_) + tabg0_small_buffer(illog,1,6,-2) = tabg0der(illog,1,6,-2,ir_) + tabg0_small_buffer(illog,1,1,-1) = tabg0der(illog,1,1,-1,ir_) + tabg0_small_buffer(illog,1,2,-1) = tabg0der(illog,1,2,-1,ir_) + tabg0_small_buffer(illog,1,3,-1) = tabg0der(illog,1,3,-1,ir_) + tabg0_small_buffer(illog,1,4,-1) = tabg0der(illog,1,4,-1,ir_) + tabg0_small_buffer(illog,1,5,-1) = tabg0der(illog,1,5,-1,ir_) + tabg0_small_buffer(illog,1,6,-1) = tabg0der(illog,1,6,-1,ir_) + tabg0_small_buffer(illog,1,1,0) = tabg0der(illog,1,1,0,ir_) + tabg0_small_buffer(illog,1,2,0) = tabg0der(illog,1,2,0,ir_) + tabg0_small_buffer(illog,1,3,0) = tabg0der(illog,1,3,0,ir_) tabg0_small_buffer(illog,1,4,0) = tabg0der(illog,1,4,0,ir_) - tabg0_small_buffer(illog,1,5,0) = tabg0der(illog,1,5,0,ir_) - tabg0_small_buffer(illog,1,6,0) = tabg0der(illog,1,6,0,ir_) - tabg0_small_buffer(illog,1,1,1) = tabg0der(illog,1,1,1,ir_) - tabg0_small_buffer(illog,1,2,1) = tabg0der(illog,1,2,1,ir_) - tabg0_small_buffer(illog,1,3,1) = tabg0der(illog,1,3,1,ir_) - tabg0_small_buffer(illog,1,4,1) = tabg0der(illog,1,4,1,ir_) - tabg0_small_buffer(illog,1,5,1) = tabg0der(illog,1,5,1,ir_) - tabg0_small_buffer(illog,1,6,1) = tabg0der(illog,1,6,1,ir_) - tabg0_small_buffer(illog,1,1,2) = tabg0der(illog,1,1,2,ir_) - tabg0_small_buffer(illog,1,2,2) = tabg0der(illog,1,2,2,ir_) - tabg0_small_buffer(illog,1,3,2) = tabg0der(illog,1,3,2,ir_) - tabg0_small_buffer(illog,1,4,2) = tabg0der(illog,1,4,2,ir_) - tabg0_small_buffer(illog,1,5,2) = tabg0der(illog,1,5,2,ir_) - tabg0_small_buffer(illog,1,6,2) = tabg0der(illog,1,6,2,ir_) + tabg0_small_buffer(illog,1,5,0) = tabg0der(illog,1,5,0,ir_) + tabg0_small_buffer(illog,1,6,0) = tabg0der(illog,1,6,0,ir_) + tabg0_small_buffer(illog,1,1,1) = tabg0der(illog,1,1,1,ir_) + tabg0_small_buffer(illog,1,2,1) = tabg0der(illog,1,2,1,ir_) + tabg0_small_buffer(illog,1,3,1) = tabg0der(illog,1,3,1,ir_) + tabg0_small_buffer(illog,1,4,1) = tabg0der(illog,1,4,1,ir_) + tabg0_small_buffer(illog,1,5,1) = tabg0der(illog,1,5,1,ir_) + tabg0_small_buffer(illog,1,6,1) = tabg0der(illog,1,6,1,ir_) + tabg0_small_buffer(illog,1,1,2) = tabg0der(illog,1,1,2,ir_) + tabg0_small_buffer(illog,1,2,2) = tabg0der(illog,1,2,2,ir_) + tabg0_small_buffer(illog,1,3,2) = tabg0der(illog,1,3,2,ir_) + tabg0_small_buffer(illog,1,4,2) = tabg0der(illog,1,4,2,ir_) + tabg0_small_buffer(illog,1,5,2) = tabg0der(illog,1,5,2,ir_) + tabg0_small_buffer(illog,1,6,2) = tabg0der(illog,1,6,2,ir_) enddo write(34) tabg0_small_buffer diff --git a/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/Part-2a-read_DSM_coefficients_back_SH/TraPSV_MPI_read_Zmin/trial.f90 b/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/Part-2a-read_DSM_coefficients_back_SH/TraPSV_MPI_read_Zmin/trial.f90 index 2758e5d86..b67db00d0 100755 --- a/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/Part-2a-read_DSM_coefficients_back_SH/TraPSV_MPI_read_Zmin/trial.f90 +++ b/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/Part-2a-read_DSM_coefficients_back_SH/TraPSV_MPI_read_Zmin/trial.f90 @@ -1,21 +1,21 @@ subroutine calbvecphi0_stock( l,thetadeg,plmDir,bvec,bvecdt,bvecdp) - + implicit none character(*) :: plmDir character(120) :: coutfile - real(kind(0d0)), parameter :: pi=3.1415926535897932d0 + real(kind(0d0)), parameter :: pi=3.1415926535897932d0 integer :: l,m,i,j real(kind(0d0)) :: theta,thetadeg,x,plm(1:3,0:3),fact,coef complex(kind(0d0)) :: bvec(1:3,-2:2) complex(kind(0d0)) :: bvecdt(1:3,-2:2),bvecdp(1:3,-2:2) real(kind(0d0)) :: plmdt,xl2 - + write(coutfile, '(I8, ".","PLM")') int(thetadeg*100000.d0) do j = 1,8 - if (coutfile(j:j).eq.' ')coutfile(j:j) = '0' + if (coutfile(j:j)==' ')coutfile(j:j) = '0' enddo - + coutfile = plmDir//"/"//coutfile open(1,file=coutfile,status='old',form='unformatted',access='direct', & @@ -32,7 +32,7 @@ subroutine calbvecphi0_stock( l,thetadeg,plmDir,bvec,bvecdt,bvecdp) do m=0,min0(l,2) fact = 1.d0 - if ( m.ne.0 ) then + if ( m/=0 ) then do i=l-m+1,l+m fact = fact * dble(i) enddo @@ -41,28 +41,28 @@ subroutine calbvecphi0_stock( l,thetadeg,plmDir,bvec,bvecdt,bvecdp) plmdt = dble(m) * x / sin( theta ) * plm(1,m) + plm(1,m+1) bvec(1,m) = dcmplx( 0.d0 ) bvec(1,-m) = dcmplx( 0.d0 ) - bvec(2,m) = dcmplx( 0.d0, dble(m) ) / dsin( theta) * coef * plm(1,m) + bvec(2,m) = dcmplx( 0.d0, dble(m) ) / dsin( theta) * coef * plm(1,m) bvec(2,-m) = dcmplx(conjg( bvec(2,m)) ) - bvec(3,m) = - coef * plmdt + bvec(3,m) = - coef * plmdt bvec(3,-m) = dcmplx(conjg( bvec(3,m) )) ! calculate derivatives bvecdt(1,m) = dcmplx( 0.d0 ) bvecdt(1,-m) = dcmplx( 0.d0 ) bvecdt(2,m) = dcmplx( 0.d0, dble(m) ) * ( plmdt / dsin(theta) & - - x / ( 1 - x * x ) * plm(1,m) ) * coef + - x / ( 1 - x * x ) * plm(1,m) ) * coef bvecdt(2,-m) = dcmplx( conjg( bvecdt(2,m) )) bvecdt(3,m) = ( x / dsin(theta) * plmdt - dble(m) * dble(m)/(1-x*x) *plm(1,m) & - & + xl2 * plm(1,m) ) * coef + & + xl2 * plm(1,m) ) * coef bvecdt(3,-m) = dcmplx(conjg( bvecdt(3,m)) ) bvecdp(1,m) = dcmplx( 0.d0 ) bvecdp(1,-m) = dcmplx( 0.d0 ) - bvecdp(2,m) = - dble(m) * dble(m) / dsin(theta) * plm(1,m) * coef + bvecdp(2,m) = - dble(m) * dble(m) / dsin(theta) * plm(1,m) * coef bvecdp(2,-m) = dcmplx(conjg( bvecdp(2,m)) ) - bvecdp(3,m) = - dcmplx( 0.d0, dble(m) ) * plmdt * coef + bvecdp(3,m) = - dcmplx( 0.d0, dble(m) ) * plmdt * coef bvecdp(3,-m) = dcmplx(conjg( bvecdp(3,m)) ) - if ( mod(m,2).eq.1 ) then + if ( mod(m,2)==1 ) then bvec(2,-m) = - bvec(2,-m) bvec(3,-m) = - bvec(3,-m) bvecdt(2,-m) = - bvecdt(2,-m) @@ -78,9 +78,9 @@ end subroutine calbvecphi0_stock subroutine calbvecphi0( l,theta,plm,bvec,bvecdt,bvecdp) - + implicit none - real(kind(0d0)), parameter :: pi=3.1415926535897932d0 + real(kind(0d0)), parameter :: pi=3.1415926535897932d0 integer :: l,m,i real(kind(0d0)) :: theta,x,plm(1:3,0:3),fact,coef complex(kind(0d0)) :: bvec(1:3,-2:2) @@ -91,11 +91,11 @@ subroutine calbvecphi0( l,theta,plm,bvec,bvecdt,bvecdp) xl2 = dble(l) * dble(l+1) do m=0,min0(l,3) call calplm( l,m,x,plm(1:3,m)) - enddo + enddo do m=0,min0(l,2) fact = 1.d0 - if ( m.ne.0 ) then + if ( m/=0 ) then do i=l-m+1,l+m fact = fact * dble(i) enddo @@ -104,28 +104,28 @@ subroutine calbvecphi0( l,theta,plm,bvec,bvecdt,bvecdp) plmdt = dble(m) * x / sin( theta ) * plm(1,m) + plm(1,m+1) bvec(1,m) = dcmplx( 0.d0 ) bvec(1,-m) = dcmplx( 0.d0 ) - bvec(2,m) = dcmplx( 0.d0, dble(m) ) / dsin( theta) * coef * plm(1,m) + bvec(2,m) = dcmplx( 0.d0, dble(m) ) / dsin( theta) * coef * plm(1,m) bvec(2,-m) = dcmplx(conjg( bvec(2,m)) ) - bvec(3,m) = - coef * plmdt + bvec(3,m) = - coef * plmdt bvec(3,-m) = dcmplx(conjg( bvec(3,m) )) ! calculate derivatives bvecdt(1,m) = dcmplx( 0.d0 ) bvecdt(1,-m) = dcmplx( 0.d0 ) bvecdt(2,m) = dcmplx( 0.d0, dble(m) ) * ( plmdt / dsin(theta) & - - x / ( 1 - x * x ) * plm(1,m) ) * coef + - x / ( 1 - x * x ) * plm(1,m) ) * coef bvecdt(2,-m) = dcmplx( conjg( bvecdt(2,m) )) bvecdt(3,m) = ( x / dsin(theta) * plmdt - dble(m) * dble(m)/(1-x*x) *plm(1,m) & - & + xl2 * plm(1,m) ) * coef + & + xl2 * plm(1,m) ) * coef bvecdt(3,-m) = dcmplx(conjg( bvecdt(3,m)) ) bvecdp(1,m) = dcmplx( 0.d0 ) bvecdp(1,-m) = dcmplx( 0.d0 ) - bvecdp(2,m) = - dble(m) * dble(m) / dsin(theta) * plm(1,m) * coef + bvecdp(2,m) = - dble(m) * dble(m) / dsin(theta) * plm(1,m) * coef bvecdp(2,-m) = dcmplx(conjg( bvecdp(2,m)) ) - bvecdp(3,m) = - dcmplx( 0.d0, dble(m) ) * plmdt * coef + bvecdp(3,m) = - dcmplx( 0.d0, dble(m) ) * plmdt * coef bvecdp(3,-m) = dcmplx(conjg( bvecdp(3,m)) ) - if ( mod(m,2).eq.1 ) then + if ( mod(m,2)==1 ) then bvec(2,-m) = - bvec(2,-m) bvec(3,-m) = - bvec(3,-m) bvecdt(2,-m) = - bvecdt(2,-m) @@ -147,10 +147,10 @@ subroutine calplm( l,m,x,plm ) integer :: l,m,i real(kind(0d0)) :: x,plm(1:3),pmm,somx2,fact - if ((m.lt.0).or.(m.gt.l).or.(dabs(x).gt.1.d0)) pause 'bad arguments' - if ( l.eq.m ) then + if ((m<0).or.(m>l).or.(dabs(x)>1.d0)) pause 'bad arguments' + if ( l==m ) then pmm = 1.d0 - if ( m.gt.0 ) then + if ( m>0 ) then somx2 = dsqrt( (1.d0-x)*(1.d0+x) ) fact = 1.d0 do i=1,m @@ -164,7 +164,7 @@ subroutine calplm( l,m,x,plm ) else plm(3) = plm(2) plm(2) = plm(1) - if ( l.eq.m+1 ) then + if ( l==m+1 ) then plm(1) = x * dble(2*m+1) * plm(2) else !print *, l,m,x @@ -178,10 +178,10 @@ end subroutine calplm subroutine calbveczero( l,bvec ) - + implicit none - real(kind(0d0)), parameter :: pi=3.1415926535897932d0 - + real(kind(0d0)), parameter :: pi=3.1415926535897932d0 + integer :: l,m,i real(kind(0d0)) :: fact,coef complex(kind(0d0)) :: bvec(1:3,-2:2) @@ -192,7 +192,7 @@ subroutine calbveczero( l,bvec ) do m=0,min0(l,1) fact = 1.d0 - if ( m.ne.0 ) then + if ( m/=0 ) then do i=l-m+1,l+m fact = fact * dble(i) enddo @@ -205,7 +205,7 @@ subroutine calbveczero( l,bvec ) bvec(3,m) = -dcmplx(dble(m),0.d0) * xl2 * coef / 2.d0 bvec(3,-m) = dcmplx(conjg( bvec(3,m) )) - if ( mod(m,2).eq.1 ) then + if ( mod(m,2)==1 ) then bvec(2,-m) = - bvec(2,-m) bvec(3,-m) = - bvec(3,-m) endif @@ -238,7 +238,7 @@ subroutine calbvec( l,theta,phi,plm,bvec,bvecdt,bvecdp ) do m=0,min0(l,2) fact = 1.d0 - if ( m.ne.0 ) then + if ( m/=0 ) then do i=l-m+1,l+m fact = fact * dble(i) enddo @@ -267,7 +267,7 @@ subroutine calbvec( l,theta,phi,plm,bvec,bvecdt,bvecdp ) bvecdp(3,m) = - dcmplx( 0.d0, dble(m) ) * plmdt * coef * expimp bvecdp(3,-m) = dconjg( bvecdp(3,m) ) - if ( mod(m,2).eq.1 ) then + if ( mod(m,2)==1 ) then bvec(2,-m) = - bvec(2,-m) bvec(3,-m) = - bvec(3,-m) bvecdt(2,-m) = - bvecdt(2,-m) @@ -286,14 +286,14 @@ subroutine calbvec_vector( l,theta,phi,plm,bvec,bvecdt,bvecdp,theta_n) !c at each station whose latitude and longitude are theta and phi. !cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc implicit none - real(kind(0d0)),parameter :: pi=3.1415926535897932d0 - + real(kind(0d0)),parameter :: pi=3.1415926535897932d0 + integer :: l,m,i,theta_n,itheta real(kind(0d0)):: theta(1:theta_n),phi(1:theta_n),x,plm(1:theta_n,1:3,0:3),fact,coef(0:2),inv_sintheta complex(kind(0d0)) :: bvec(1:theta_n,1:3,-2:2),expimp complex(kind(0d0)) :: bvecdt(1:theta_n,1:3,-2:2),bvecdp(theta_n,1:3,-2:2) real(kind(0d0)) :: plmdt,xl2 - + !write(*,*) 'l=',l,'theta_n is',theta_n xl2 = dble(l) * dble(l+1) @@ -301,7 +301,7 @@ subroutine calbvec_vector( l,theta,phi,plm,bvec,bvecdt,bvecdp,theta_n) if (l < 5 ) then do itheta = 1,theta_n x = dcos( theta(itheta) ) - + do m=0,min0(l,3) call calplm( l,m,x,plm(itheta,1:3,m) ) enddo @@ -340,16 +340,16 @@ subroutine calbvec_vector( l,theta,phi,plm,bvec,bvecdt,bvecdp,theta_n) plm(itheta,3,3) = plm(itheta,2,3) plm(itheta,2,3) = plm(itheta,1,3) plm(itheta,1,3) = (x*dble(2*l-1) * plm(itheta,2,3)-dble(l+2) * plm(itheta,3,3) )/dble(l-3) - + enddo - endif + endif ! plm computation is over. do m=0,min0(l,2) fact = 1.d0 - if ( m.ne.0 ) then + if ( m/=0 ) then do i=l-m+1,l+m fact = fact * dble(i) enddo @@ -357,12 +357,12 @@ subroutine calbvec_vector( l,theta,phi,plm,bvec,bvecdt,bvecdp,theta_n) coef(m) = dsqrt( dble(2*l+1)/(4.d0*pi) / fact ) enddo ! unify cofficients computation. - + do itheta = 1,theta_n x = dcos( theta(itheta) ) ! please noticing don't miss this x expression. inv_sintheta = 1.d0 / dsin(theta(itheta)) !pre-computing the inverse of sin(theta) -! this is for m==0, for any l value we need to calculate thses. +! this is for m==0, for any l value we need to calculate thses. expimp = cdexp( dcmplx( 0.d0,0.d0 )) plmdt = plm(itheta,1,1) bvec(itheta,1,0) = dcmplx( 0.d0 ,0.d0) @@ -377,7 +377,7 @@ subroutine calbvec_vector( l,theta,phi,plm,bvec,bvecdt,bvecdp,theta_n) bvecdp(itheta,3,0) = dcmplx( 0.d0, 0.d0) ! this is for m==1, for any l>=1 if(l >= 1) then - + expimp = cdexp( dcmplx( 0.d0, phi(itheta) ) ) plmdt = x *inv_sintheta * plm(itheta,1,1) + plm(itheta,1,2) bvec(itheta,1,1) = dcmplx( 0.d0 ) @@ -399,7 +399,7 @@ subroutine calbvec_vector( l,theta,phi,plm,bvec,bvecdt,bvecdp,theta_n) bvecdp(itheta,2,-1) = - dconjg( bvecdp(itheta,2,1) ) bvecdp(itheta,3,1) = - dcmplx( 0.d0, 1.d0 ) * plmdt * coef(1) * expimp bvecdp(itheta,3,-1) = - dconjg( bvecdp(itheta,3,1) ) - + endif ! this is for m==2, for any l>=2 @@ -429,7 +429,7 @@ subroutine calbvec_vector( l,theta,phi,plm,bvec,bvecdt,bvecdp,theta_n) endif -! if ( mod(m,2).eq.1 ) then +! if ( mod(m,2)==1 ) then ! bvec(2,-m) = - bvec(2,-m) ! bvec(3,-m) = - bvec(3,-m) ! bvecdt(2,-m) = - bvecdt(2,-m) @@ -451,30 +451,30 @@ subroutine calbvec_vector_test( l,theta,phi,plm,bvec,bvecdt,bvecdp,theta_n) !c at each station whose latitude and longitude are theta and phi. !cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc implicit none - real(kind(0d0)),parameter :: pi=3.1415926535897932d0 - + real(kind(0d0)),parameter :: pi=3.1415926535897932d0 + integer :: l,m,i,theta_n,itheta real(kind(0d0)):: theta(theta_n),phi(theta_n),x,plm(theta_n,1:3,0:3),fact,coef(0:2),inv_sintheta complex(kind(0d0)) :: bvec(theta_n,1:3,-2:2),expimp complex(kind(0d0)) :: bvecdt(theta_n,1:3,-2:2),bvecdp(theta_n,1:3,-2:2) real(kind(0d0)) :: plmdt,xl2 - + !write(*,*) 'l=',l,'theta_n is',theta_n xl2 = dble(l) * dble(l+1) do itheta = 1,theta_n x = dcos( theta(itheta) ) - + if (l < 5 ) then - write(*,*) 'if l<5',l + write(*,*) 'if l<5',l do m=0,min0(l,3) write(*,*) 'when l<5,the m =',m call calplm( l,m,x,plm(itheta,1,m) ) if(itheta==6) write(*,*) 'itheta th plm components are',m,plm(itheta,:,m) - + enddo - + if (itheta ==6) then ! write(*,*) itheta,'th station',itheta,theta(itheta),x,l,m ! write(*,*) 'itheta th plm components are:1',plm(itheta,1,:) @@ -482,7 +482,7 @@ subroutine calbvec_vector_test( l,theta,phi,plm,bvec,bvecdt,bvecdp,theta_n) ! write(*,*) 'itheta th plm components are:3',plm(itheta,3,:) write(*,*) '\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' endif - + else write(*,*) 'if l>=5',l @@ -517,10 +517,10 @@ subroutine calbvec_vector_test( l,theta,phi,plm,bvec,bvecdt,bvecdp,theta_n) plm(itheta,3,3) = plm(itheta,2,3) plm(itheta,2,3) = plm(itheta,1,3) plm(itheta,1,3) = (x*dble(2*l-1) * plm(itheta,2,3)-dble(l+2) * plm(itheta,3,3) )/dble(l-3) - - endif - enddo - + + endif + enddo + itheta = 6 write(*,*) 'itheta th plm components are:0',plm(itheta,:,0) write(*,*) 'itheta th plm components are:1',plm(itheta,:,1) @@ -530,7 +530,7 @@ subroutine calbvec_vector_test( l,theta,phi,plm,bvec,bvecdt,bvecdp,theta_n) do m=0,min0(l,2) fact = 1.d0 - if ( m.ne.0 ) then + if ( m/=0 ) then do i=l-m+1,l+m fact = fact * dble(i) enddo @@ -540,5 +540,5 @@ subroutine calbvec_vector_test( l,theta,phi,plm,bvec,bvecdt,bvecdp,theta_n) ! unify cofficients computation. write(*,*) 'coef are:',coef - + end subroutine calbvec_vector_test diff --git a/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/Part-2a-read_DSM_coefficients_back_SH/TraPSV_MPI_read_vertical_faces/TraSH-0.1.0.f90 b/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/Part-2a-read_DSM_coefficients_back_SH/TraPSV_MPI_read_vertical_faces/TraSH-0.1.0.f90 index b673c10b4..aae7608d0 100755 --- a/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/Part-2a-read_DSM_coefficients_back_SH/TraPSV_MPI_read_vertical_faces/TraSH-0.1.0.f90 +++ b/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/Part-2a-read_DSM_coefficients_back_SH/TraPSV_MPI_read_vertical_faces/TraSH-0.1.0.f90 @@ -2,18 +2,18 @@ program TraSH_Zmin !----------------------------------------------------------------------- -! ! -! ! -! +! +! +! ! 2002.10.KAWAI Kenji ! 2009.6. FUJI Nobuaki ! 2011.9. FUJI Nobuaki ! 2013.11 YI WANG (MPI) ! ! -! +! ! !----------------------------------------------------------------------- @@ -37,8 +37,8 @@ program TraSH_Zmin real(kind(0d0)), parameter :: re=1.d-2, ratc=1.d-10, ratl=1.d-4 integer, parameter :: maxlmax = 25000, maxlmax_g = 1000 !change to 30000 for possible high frequency calculation. - - real(kind(0d0)) :: tlen + + real(kind(0d0)) :: tlen real(kind(0d0)) :: r0min, r0max, r0delta !!! JUST FOR ONE DEPTH FOR THIS MOMENT !! real(kind(0d0)) :: r0lat, r0lon,stla_curr,stlo_curr real(kind(0d0)), allocatable :: stla(:),stlo(:),stla_g(:),stlo_g(:) @@ -48,7 +48,7 @@ program TraSH_Zmin real(kind(0d0)), allocatable :: rrsta(:,:) integer, allocatable :: iista(:,:) integer :: r_n,r0_n, ir_,ir0,imt,itheta - + character(120) :: coutfile, coutfile1,cinfile,coutfile2,coutfile3 integer :: imin,imax integer :: itranslat @@ -59,8 +59,8 @@ program TraSH_Zmin real(kind(0d0)) :: dummy real(kind(0d0)), allocatable :: vrmin(:), vrmax(:) real(kind(0d0)), allocatable :: rrho(:,:), vsv(:,:), vsh(:,:),qmu(:),vpv(:,:),vph(:,:),eta(:,:) - - + + complex(kind(0d0)), allocatable :: coef(:) real(kind(0d0)) :: rmin, rmax real(kind(0d0)), allocatable :: vmin(:), gridpar(:), dzpar(:) @@ -69,29 +69,29 @@ program TraSH_Zmin real(kind(0d0)) :: omegai complex(kind(0d0)) :: u1,u2,u3,udr1,udr2,udr3,udt1,udt2,udt3,udp1,udp2,udp3 complex(kind(0d0)) :: uder11 , uder12 , uder13 , uder21 , uder22 , uder23 , uder31 , uder32 , uder33 - + integer, allocatable :: nlayer(:), iphase(:) integer :: ioutercore,ista - ! variables pour des points stackes + ! variables pour des points stackes integer, allocatable :: isp(:),jsp(:) ! variables pour la source - - + + real(kind(0d0)) :: lsq - + !----------------------------------------------------------------------- - ! variables pour des elements de matrice + ! variables pour des elements de matrice ! la frequence real(kind(0d0)) :: omega - complex(kind(0d0)), allocatable :: g0tmp(:,:),g0dertmp(:,:) + complex(kind(0d0)), allocatable :: g0tmp(:,:),g0dertmp(:,:) + + ! des autres - ! des autres - integer :: llog,m, l,nlay - + !----------------------------------------------------------------------- complex(kind(0d0)), allocatable :: dvec(:,:,:,:),dvecdt(:,:,:,:),dvecdp(:,:,:,:) @@ -104,7 +104,7 @@ program TraSH_Zmin !----------------------------------------------------------------------- ! variables for the MPI communications. integer, allocatable :: Ifrq2(:,:) - + integer imin_glob, imax_glob !----------------------------------------------------------------------- @@ -129,7 +129,7 @@ program TraSH_Zmin allocate(key(0:nbbigproc-1)) allocate(color(0:nbbigproc-1)) allocate(Ifrq2(2,0:nbbigproc-1)) - + if (mybigrank==0) then open(25,file='Double_para.txt') read(25,*) nb_colors,nb_tot_proc @@ -158,13 +158,13 @@ program TraSH_Zmin call MPI_Bcast(Ifrq2,2*nbbigproc,MPI_INTEGER,0,MPI_COMM_WORLD,ierr) - if (mybigrank==0) then + if (mybigrank==0) then call pinputTra_part2(ifrequ_min,ifrequ_max,inputdir,outputDir,psvmodel,modelname,stationsinf,tlen,imin_glob,imax_glob,r0min,r0max,r0delta,r0lat,r0lon,itranslat) !!here i delete the last myrank para in the vadim's routine,because the myrank para is not used. if (nbbigproc==0) then imin=imin_glob imax=imax_glob - endif + endif ! call WriteFrqByproc(nbproc,imin_glob,imax_glob) !distributing the task into every processors evenly. endif !only the root can excute this function call. @@ -204,10 +204,10 @@ program TraSH_Zmin if (mybigrank==0) then open(20, file = psvmodel, status = 'old', action='read', position='rewind') read(20,*) nzone - + !call MPI_Bcast(nzone,1,MPI_INTEGER,0,MPI_COMM_WORLD,ierr) - + allocate(vrmin(1:nzone)) allocate(vrmax(1:nzone)) allocate(rrho(1:4,1:nzone)) @@ -227,11 +227,11 @@ program TraSH_Zmin allocate(coef(1:nzone)) !vpv=0.d0 !vph=0.d0 - + do i = 1, nzone read (20, *) vrmin(i), vrmax(i), rrho(1,i), rrho(2,i), rrho(3,i), rrho(4,i), dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, vsv(1,i), vsv(2,i), vsv(3,i), vsv(4,i), vsh(1,i), vsh(2,i), vsh(3,i), vsh(4,i), dummy, dummy, dummy, dummy, qmu(i), dummy - if ((vsv(1,i).eq.0.d0).and.(vsv(2,i).eq.0.d0).and.(vsv(3,i).eq.0.d0).and.(vsv(4,i).eq.0.d0)) then + if ((vsv(1,i)==0.d0).and.(vsv(2,i)==0.d0).and.(vsv(3,i)==0.d0).and.(vsv(4,i)==0.d0)) then iphase(i) = 2 ioutercore = i else @@ -239,21 +239,21 @@ program TraSH_Zmin endif enddo close(20) - - + + ! CAUTION: this program can only calculate for solid media (SH) for this moment open(20, file = psvmodel, status = 'old', action='read', position='rewind') read(20,*) nzone nzone = nzone - ioutercore deallocate(vrmin,vrmax,rrho,vsv,vsh,qmu,vmin,gridpar,dzpar,nlayer,iphase,isp,jsp,coef) - + endif ! only root can read file for inputing the setting parameters. - + call MPI_Bcast(nzone,1,MPI_INTEGER,0,MPI_COMM_WORLD,ierr) !nzone changed call MPI_Bcast(ioutercore,1,MPI_INTEGER,0,MPI_COMM_WORLD,ierr) - + call MPI_Barrier(MPI_COMM_WORLD,ierr) allocate(vrmin(1:nzone)) @@ -299,9 +299,9 @@ program TraSH_Zmin rmax = vrmax(nzone) omegai = - dlog(1.d-2) / tlen - if (mybigrank==0) then + if (mybigrank==0) then open (1,file=stationsinf,status='old',action='read',position='rewind') - if(itranslat.eq.1) call translat (r0lat,r0lat) + if(itranslat==1) call translat (r0lat,r0lat) open(2,file='recdepth') read(2,*) r_n !now the r_n is not the radius of receivers,it's the index of receriver plane depth index. read(1,*) nsta_global @@ -333,7 +333,7 @@ program TraSH_Zmin allocate(stla_g(1:nsta_global)) allocate(stlo_g(1:nsta_global)) ! now the size allocated is nsta_global - + allocate(updown(1:r_n)) allocate(idum(1:r_n)) ! it is sufficient for us to save the final result to disk in single precision @@ -398,8 +398,8 @@ program TraSH_Zmin ! updown(i),A0sta(i),C0sta(i),F0sta(i),L0sta(i),N0sta(i),idum(i)) ! write(*,*) mybigrank, i,C0sta(i),F0sta(i) enddo !pay attention for the MPI_BCAST.because it's easy to forget to declaire some element by BCAST. - !call mpi_barrier(MPI_COMM_WORLD,ierr) - !stop + !call mpi_barrier(MPI_COMM_WORLD,ierr) + !stop ! depth for stocking the Green function. allocate(rrsta(1:3,1:r_n)) allocate(iista(1:3,1:r_n)) @@ -472,7 +472,7 @@ program TraSH_Zmin allocate(plm(1:theta_n,1:3,0:3),stat=ier) if(ier /= 0) stop 'error: not enough memory to allocate array' - + phi(:)=phi_g(istamin:istamax) theta(:)=theta_g(istamin:istamax) stla(:)=stla_g(istamin:istamax) @@ -481,7 +481,7 @@ program TraSH_Zmin ! source depths,currently we do not put any necessary allocation r0_n = int((r0max-r0min)/r0delta)+1 - allocate(r0(1:r0_n)) + allocate(r0(1:r0_n)) do i = 1, r0_n r0(i) = r0min + dble(i-1)*r0delta enddo @@ -490,11 +490,11 @@ program TraSH_Zmin write(list1, '(I6,".",I6)'), imin_glob,imax_glob !!unify scanning file for the process do j = 1,15 - if(list1(j:j).eq.' ')list1(j:j) = '0' + if(list1(j:j)==' ')list1(j:j) = '0' enddo list1 = trim(outputDir)//"/log/listSH"//"."//trim(modelname)//"."//trim(list1) open(24, file = list1, status = 'unknown', form = 'formatted') - write(24,*) + write(24,*) close(24) plm=0.d0 @@ -515,7 +515,7 @@ program TraSH_Zmin enddo deallocate(plm) - + allocate(stress(1:6,1:6,1:r_n,1:nsta)) allocate(displacement(1:3,1:6,1:r_n,1:nsta)) @@ -539,7 +539,7 @@ program TraSH_Zmin ir0 = r0_n -!write(*,*) mybigrank,"th !!!!!!!!!!!!!!!start frequency calculation!!!!!!----" +!write(*,*) mybigrank,"th !!!!!!!!!!!!!!!start frequency calculation!!!!!!----" if (myrank==0.and.SLOW_DEBUG_MODE) then write(list, '(I6.6,".",I6.6)') ifrequ_min, ifrequ_max @@ -556,16 +556,16 @@ program TraSH_Zmin if (SLOW_DEBUG_MODE) then open(24, file = list1, status = 'unknown', form = 'formatted') write(24,*) - end if + endif endif - do ifq = ifrequ_min,ifrequ_max + do ifq = ifrequ_min,ifrequ_max !!frequency loop start now for every proc - + ir0 = r0_n !Be careful with this declaration write(cinfile, '(I5.5,".G0_SH_",I5.5)') int(r0(ir0)*10.d0),ifq ! Noticing that now for the file constrction,i use ifq instead of ifq-1! @@ -583,7 +583,7 @@ program TraSH_Zmin displacementsngl = (0.e0,0.e0) stresssngl_global = (0.e0,0.e0) displacementsngl_global = (0.e0,0.e0) - + ! plm = 0.d0 ! dvec = (0.d0,0.d0) ! dvecdp = (0.d0,0.d0) @@ -593,149 +593,149 @@ program TraSH_Zmin lmax_r(:)=maxlmax omega = 2.d0 * pi * dble(Ifq)/tlen !for this part of routines.the omega won't be used. - if ( Ifq .ne. 0 ) then !!frequency don't equal to 0 + if ( Ifq /= 0 ) then !!frequency don't equal to 0 lref=0 index_l=0 lmax_lu=0 do l = 0, maxlmax ! l-loop commence - call MPI_Barrier(SubCommunicators,ierr) - + call MPI_Barrier(SubCommunicators,ierr) + if (mod(l,maxlmax_g)==0) then lref=l tabg0=(0.d0,0.d0) - tabg0der=(0.d0,0.d0) + tabg0der=(0.d0,0.d0) if (myrank==0) then if (SLOW_DEBUG_MODE) then write(24,*) write(24,*) myrank,' reading l = ',l - end if + endif - do + do if (SLOW_DEBUG_MODE) then write(24,*) 'I want to read for l=',l write(24,*) 'max(lmax_r)=',maxval(lmax_r) - end if + endif read(34) ir_,llog if (SLOW_DEBUG_MODE) then write(24,*) 'I already read for l=',l,' and ir_=',ir_,llog write(24,*) write(24,*) mybigrank,'is reading for ir,llog',ir_,llog - end if + endif - if (ir_ == -1) then ! this flag indicates the end of all the data to read + if (ir_ == -1) then ! this flag indicates the end of all the data to read if (SLOW_DEBUG_MODE) then write(24,*) mybigrank,ir_,llog, ' exit ' - end if + endif - exit -! elseif (ir_ == r_n) then + exit +! else if (ir_ == r_n) then !! in the case of the Zmin face, we read but ignore all the data from the input file except the last one; !! in the other code (for vertical faces) we use all the data read, but in this code we use the last one only from the same file ! read(34) tabg0(1:llog,1,:,:) !here only SH coefficients is read.so second para =1 fixed. -! read(34) tabg0der(1:llog,1,:,:) -! lmax_r(ir_) = llog + lref ! recover the computed number of l-order cofficients. -! lmax_lu=max(lmax_lu,lmax_r(r_n)) ! just for test. +! read(34) tabg0der(1:llog,1,:,:) +! lmax_r(ir_) = llog + lref ! recover the computed number of l-order cofficients. +! lmax_lu=max(lmax_lu,lmax_r(r_n)) ! just for test. else !!! VM VM : we need ir_=r_n which is not nessesary the last one thus I test it - read(34) tabg0(1:llog,1,:,ir_,:) !here only SH coefficients is read.so second para =1 fixed - read(34) tabg0der(1:llog,1,:,ir_,:) + read(34) tabg0(1:llog,1,:,ir_,:) !here only SH coefficients is read.so second para =1 fixed + read(34) tabg0der(1:llog,1,:,ir_,:) lmax_r(ir_) = llog + lref ! lmax courant pour ir_ - lmax_lu=max(lmax_lu,lmax_r(r_n)) + lmax_lu=max(lmax_lu,lmax_r(r_n)) if (SLOW_DEBUG_MODE) then write(24,*) mybigrank,'allready read TABS',ir_,llog,lmax_r(ir_),lmax_lu - end if + endif endif - enddo + enddo if (SLOW_DEBUG_MODE) write(24,*) 'end reading block' - endif ! rank 0 proc reading process is over + endif ! rank 0 proc reading process is over - index_l=0 + index_l=0 if (SLOW_DEBUG_MODE.and.myrank==0) write(24,*) 'before bcast lmax_r',lmax_r - call MPI_Bcast(lmax_r,r_n,MPI_INTEGER,0,SubCommunicators,ierr) - call MPI_Bcast(tabg0,30*r_n*maxlmax_g,MPI_DOUBLE_COMPLEX,0,SubCommunicators,ierr) - call MPI_Bcast(tabg0der,30*r_n*maxlmax_g,MPI_DOUBLE_COMPLEX,0,SubCommunicators,ierr) + call MPI_Bcast(lmax_r,r_n,MPI_INTEGER,0,SubCommunicators,ierr) + call MPI_Bcast(tabg0,30*r_n*maxlmax_g,MPI_DOUBLE_COMPLEX,0,SubCommunicators,ierr) + call MPI_Bcast(tabg0der,30*r_n*maxlmax_g,MPI_DOUBLE_COMPLEX,0,SubCommunicators,ierr) !! here the dize of tabg0/tabg0der array is 30*r_n*maxlmax_g,has been multiplied r_n. - call MPI_Bcast(ir_,1,MPI_INTEGER,0,SubCommunicators,ierr) - call MPI_Bcast(llog,1,MPI_INTEGER,0,SubCommunicators,ierr) - !I have to change the size of tabg0/tabg0der from 60 in PSV to 30 in SH. - endif ! mod(l,maxlmax_g)==0 judgement over + call MPI_Bcast(ir_,1,MPI_INTEGER,0,SubCommunicators,ierr) + call MPI_Bcast(llog,1,MPI_INTEGER,0,SubCommunicators,ierr) + !I have to change the size of tabg0/tabg0der from 60 in PSV to 30 in SH. + endif ! mod(l,maxlmax_g)==0 judgement over - if (l > maxval(lmax_r)) then + if (l > maxval(lmax_r)) then if (SLOW_DEBUG_MODE.and.myrank==0) write(24,*) 'I exit because l too big' exit !! general speaking,l =lmax_r(r_n)) exit +!! In fact,above is setting the exit judgement:if (l>=lmax_r(r_n)) exit !! So l = lmax_r(r_n) can't be valid any more at the moment. - + !!# g0tmp = (0.d0,0.d0) !!# g0dertmp = (0.d0,0.d0) !!# call interpolate(1,0,r_(ir_),rrsta(1:3,ir_),g0(iista(1:3,ir_)),g0tmp) @@ -756,21 +756,21 @@ program TraSH_Zmin !! this part is different from the PSV part,only SH coefficients is needed.So we don't need so much space to save the g0tmp like PSV routine. in fact the g0tmp and g0dertmp are scalar only. ! if (ifq ==502 .and. l==1500 .and. m==2 .and. myrank==0 .and. itheta ==1) then -! write(*,*) 'g0tmp',imt,g0tmp(imt) -! write(*,*) 'g0dertmp',imt,g0dertmp(imt) -!! if(imt==6) write(*,*) 'theta',theta(itheta) -! if(imt==6) write(*,*) 'dvec',dvec(itheta,2,:) -! if(imt==6) write(*,*) 'dvec',dvec(itheta,3,:) -!! if(imt==6) write(*,*) 'dvecdt 2',dvecdt(itheta,3,:) -!! if(imt==6) write(*,*) 'dvecdp 2',dvecdp(itheta,3,:) -! endif +! write(*,*) 'g0tmp',imt,g0tmp(imt) +! write(*,*) 'g0dertmp',imt,g0dertmp(imt) +!! if(imt==6) write(*,*) 'theta',theta(itheta) +! if(imt==6) write(*,*) 'dvec',dvec(itheta,2,:) +! if(imt==6) write(*,*) 'dvec',dvec(itheta,3,:) +!! if(imt==6) write(*,*) 'dvecdt 2',dvecdt(itheta,3,:) +!! if(imt==6) write(*,*) 'dvecdp 2',dvecdp(itheta,3,:) +! endif ! itheta = ir_ thetaval = theta(itheta) * convert_to_radians thetasin = sin(thetaval) - thetacot_complex = cmplx(cos(thetaval)/thetasin) - inv_thetasin = 1.d0 / cmplx(thetasin) + thetacot_complex = cmplx(cos(thetaval)/thetasin) + inv_thetasin = 1.d0 / cmplx(thetasin) !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!! case imt = 2 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! @@ -786,12 +786,12 @@ program TraSH_Zmin udr3 = g0dertmp(2,ir_)*dvec(itheta,3,m,l)*inv_lsq udt1 = dcmplx( 0.d0 ) - udt2 = g0tmp(2,ir_)*dvecdt(itheta,2,m,l)*inv_lsq - udt3 = g0tmp(2,ir_)*dvecdt(itheta,3,m,l)*inv_lsq + udt2 = g0tmp(2,ir_)*dvecdt(itheta,2,m,l)*inv_lsq + udt3 = g0tmp(2,ir_)*dvecdt(itheta,3,m,l)*inv_lsq udp1 = dcmplx( 0.d0 ) - udp2 = g0tmp(2,ir_)*dvecdp(itheta,2,m,l)*inv_lsq - udp3 = g0tmp(2,ir_)*dvecdp(itheta,3,m,l)*inv_lsq + udp2 = g0tmp(2,ir_)*dvecdp(itheta,2,m,l)*inv_lsq + udp3 = g0tmp(2,ir_)*dvecdp(itheta,3,m,l)*inv_lsq uder11 = udr1 uder12 = (udt1-u2) * inv_rval @@ -832,12 +832,12 @@ program TraSH_Zmin udr3 = g0dertmp(3,ir_)*dvec(itheta,3,m,l)*inv_lsq udt1 = dcmplx( 0.d0 ) - udt2 = g0tmp(3,ir_)*dvecdt(itheta,2,m,l)*inv_lsq - udt3 = g0tmp(3,ir_)*dvecdt(itheta,3,m,l)*inv_lsq + udt2 = g0tmp(3,ir_)*dvecdt(itheta,2,m,l)*inv_lsq + udt3 = g0tmp(3,ir_)*dvecdt(itheta,3,m,l)*inv_lsq udp1 = dcmplx( 0.d0 ) - udp2 = g0tmp(3,ir_)*dvecdp(itheta,2,m,l)*inv_lsq - udp3 = g0tmp(3,ir_)*dvecdp(itheta,3,m,l)*inv_lsq + udp2 = g0tmp(3,ir_)*dvecdp(itheta,2,m,l)*inv_lsq + udp3 = g0tmp(3,ir_)*dvecdp(itheta,3,m,l)*inv_lsq uder11 = udr1 uder12 = (udt1-u2) * inv_rval @@ -878,12 +878,12 @@ program TraSH_Zmin udr3 = g0dertmp(4,ir_)*dvec(itheta,3,m,l)*inv_lsq udt1 = dcmplx( 0.d0 ) - udt2 = g0tmp(4,ir_)*dvecdt(itheta,2,m,l)*inv_lsq - udt3 = g0tmp(4,ir_)*dvecdt(itheta,3,m,l)*inv_lsq + udt2 = g0tmp(4,ir_)*dvecdt(itheta,2,m,l)*inv_lsq + udt3 = g0tmp(4,ir_)*dvecdt(itheta,3,m,l)*inv_lsq udp1 = dcmplx( 0.d0 ) - udp2 = g0tmp(4,ir_)*dvecdp(itheta,2,m,l)*inv_lsq - udp3 = g0tmp(4,ir_)*dvecdp(itheta,3,m,l)*inv_lsq + udp2 = g0tmp(4,ir_)*dvecdp(itheta,2,m,l)*inv_lsq + udp3 = g0tmp(4,ir_)*dvecdp(itheta,3,m,l)*inv_lsq uder11 = udr1 uder12 = (udt1-u2) * inv_rval @@ -924,12 +924,12 @@ program TraSH_Zmin udr3 = g0dertmp(5,ir_)*dvec(itheta,3,m,l)*inv_lsq udt1 = dcmplx( 0.d0 ) - udt2 = g0tmp(5,ir_)*dvecdt(itheta,2,m,l)*inv_lsq - udt3 = g0tmp(5,ir_)*dvecdt(itheta,3,m,l)*inv_lsq + udt2 = g0tmp(5,ir_)*dvecdt(itheta,2,m,l)*inv_lsq + udt3 = g0tmp(5,ir_)*dvecdt(itheta,3,m,l)*inv_lsq udp1 = dcmplx( 0.d0 ) - udp2 = g0tmp(5,ir_)*dvecdp(itheta,2,m,l)*inv_lsq - udp3 = g0tmp(5,ir_)*dvecdp(itheta,3,m,l)*inv_lsq + udp2 = g0tmp(5,ir_)*dvecdp(itheta,2,m,l)*inv_lsq + udp3 = g0tmp(5,ir_)*dvecdp(itheta,3,m,l)*inv_lsq uder11 = udr1 uder12 = (udt1-u2) * inv_rval @@ -970,12 +970,12 @@ program TraSH_Zmin udr3 = g0dertmp(6,ir_)*dvec(itheta,3,m,l)*inv_lsq udt1 = dcmplx( 0.d0 ) - udt2 = g0tmp(6,ir_)*dvecdt(itheta,2,m,l)*inv_lsq - udt3 = g0tmp(6,ir_)*dvecdt(itheta,3,m,l)*inv_lsq + udt2 = g0tmp(6,ir_)*dvecdt(itheta,2,m,l)*inv_lsq + udt3 = g0tmp(6,ir_)*dvecdt(itheta,3,m,l)*inv_lsq udp1 = dcmplx( 0.d0 ) - udp2 = g0tmp(6,ir_)*dvecdp(itheta,2,m,l)*inv_lsq - udp3 = g0tmp(6,ir_)*dvecdp(itheta,3,m,l)*inv_lsq + udp2 = g0tmp(6,ir_)*dvecdp(itheta,2,m,l)*inv_lsq + udp3 = g0tmp(6,ir_)*dvecdp(itheta,3,m,l)*inv_lsq uder11 = udr1 uder12 = (udt1-u2) * inv_rval @@ -1010,34 +1010,34 @@ program TraSH_Zmin ! udp = cmplx(0.d0) ! uder = cmplx(0.d0) ! call calu(g0tmp(imt,ir_),lsq,dvec(itheta,1:3,m,l),u(1:3)) !noticing that the first para of dvec array is the station index now which is different from the original TraSH routine. -!! if (ifq ==347 .and. l<=4 .and. myrank==0 .and. itheta ==6 .and. imt==3) then -!! write(*,*) 'u(2) is',l,m,displacement(2,imt,itheta),u(2) -!! ! write(*,*) 'u(2) is',l,m,imt,u(2) -!! endif +!! if (ifq ==347 .and. l<=4 .and. myrank==0 .and. itheta ==6 .and. imt==3) then +!! write(*,*) 'u(2) is',l,m,displacement(2,imt,itheta),u(2) +!! ! write(*,*) 'u(2) is',l,m,imt,u(2) +!! endif ! call calu(g0dertmp(imt,ir_),lsq,dvec(itheta,1:3,m,l),udr(1:3)) ! call calu(g0tmp(imt,ir_),lsq,dvecdt(itheta,1:3,m,l),udt(1:3)) ! call calu(g0tmp(imt,ir_),lsq,dvecdp(itheta,1:3,m,l),udp(1:3)) ! call locallyCartesianDerivatives(u(1:3),udr(1:3),udt(1:3),udp(1:3),uder(1:3,1:3),r_(ir_),theta(itheta)/180.d0*pi) !the unit of the theta(:) is degree. Here the r_(:) index is the depth index, -! !and the index for the theta(:) is using station index. +! !and the index for the theta(:) is using station index. !! if (ifq ==47 .and. l==4 .and. myrank==0 .and. itheta ==6 .and. imt==3 .and. ir_==10) then !! !write(*,*) l,m,'uder temporary matrix is:',stress(1:6,imt,ir_,itheta) -!! write(*,*) m,'COEFFICIENTS ARE:',A0sta(ir_),C0sta(ir_),F0sta(ir_),L0sta(ir_),N0sta(ir_) -!! endif +!! write(*,*) m,'COEFFICIENTS ARE:',A0sta(ir_),C0sta(ir_),F0sta(ir_),L0sta(ir_),N0sta(ir_) +!! endif ! call udertoStress(uder(1:3,1:3),stress(1:6,imt,ir_,itheta),A0sta(ir_),C0sta(ir_),F0sta(ir_),L0sta(ir_),N0sta(ir_)) ! displacement(1:3,imt,ir_,itheta) = u(1:3)+displacement(1:3,imt,ir_,itheta) - enddo ! for the itheta = 1,theta_n loop + enddo ! for the itheta = 1,theta_n loop endif !for the condition (l <= lmax_r(ir_)) enddo ! ir_= 1,r_n loop termine ! enddo ! imt-loop termine - enddo !ir0-loop termine - endif !for the condition ( m.ne.0 ).and.( iabs(m).le.iabs(l) ) - enddo ! m-loop termine + enddo !ir0-loop termine + endif !for the condition ( m/=0 ).and.( iabs(m)<=iabs(l) ) + enddo ! m-loop termine - enddo !l-loop termine + enddo !l-loop termine open(24,file =list1, status = 'old',access='append', form = 'formatted') - write(24,*) ifq, dble(ifq)/tlen, llog-1 + write(24,*) ifq, dble(ifq)/tlen, llog-1 close(24) @@ -1049,43 +1049,43 @@ program TraSH_Zmin !DIR$ loop count min(1000) do ista=1,nsta stresssngl(1,1,ir_,ista) = stress(1,1,ir_,ista) * inverse_of_omega_complex - stresssngl(2,1,ir_,ista) = stress(2,1,ir_,ista) * inverse_of_omega_complex - stresssngl(3,1,ir_,ista) = stress(3,1,ir_,ista) * inverse_of_omega_complex - stresssngl(4,1,ir_,ista) = stress(4,1,ir_,ista) * inverse_of_omega_complex - stresssngl(5,1,ir_,ista) = stress(5,1,ir_,ista) * inverse_of_omega_complex - stresssngl(6,1,ir_,ista) = stress(6,1,ir_,ista) * inverse_of_omega_complex - stresssngl(1,2,ir_,ista) = stress(1,2,ir_,ista) * inverse_of_omega_complex - stresssngl(2,2,ir_,ista) = stress(2,2,ir_,ista) * inverse_of_omega_complex - stresssngl(3,2,ir_,ista) = stress(3,2,ir_,ista) * inverse_of_omega_complex - stresssngl(4,2,ir_,ista) = stress(4,2,ir_,ista) * inverse_of_omega_complex - stresssngl(5,2,ir_,ista) = stress(5,2,ir_,ista) * inverse_of_omega_complex - stresssngl(6,2,ir_,ista) = stress(6,2,ir_,ista) * inverse_of_omega_complex - stresssngl(1,3,ir_,ista) = stress(1,3,ir_,ista) * inverse_of_omega_complex - stresssngl(2,3,ir_,ista) = stress(2,3,ir_,ista) * inverse_of_omega_complex - stresssngl(3,3,ir_,ista) = stress(3,3,ir_,ista) * inverse_of_omega_complex - stresssngl(4,3,ir_,ista) = stress(4,3,ir_,ista) * inverse_of_omega_complex - stresssngl(5,3,ir_,ista) = stress(5,3,ir_,ista) * inverse_of_omega_complex - stresssngl(6,3,ir_,ista) = stress(6,3,ir_,ista) * inverse_of_omega_complex - stresssngl(1,4,ir_,ista) = stress(1,4,ir_,ista) * inverse_of_omega_complex - stresssngl(2,4,ir_,ista) = stress(2,4,ir_,ista) * inverse_of_omega_complex - stresssngl(3,4,ir_,ista) = stress(3,4,ir_,ista) * inverse_of_omega_complex - stresssngl(4,4,ir_,ista) = stress(4,4,ir_,ista) * inverse_of_omega_complex - stresssngl(5,4,ir_,ista) = stress(5,4,ir_,ista) * inverse_of_omega_complex - stresssngl(6,4,ir_,ista) = stress(6,4,ir_,ista) * inverse_of_omega_complex - stresssngl(1,5,ir_,ista) = stress(1,5,ir_,ista) * inverse_of_omega_complex - stresssngl(2,5,ir_,ista) = stress(2,5,ir_,ista) * inverse_of_omega_complex - stresssngl(3,5,ir_,ista) = stress(3,5,ir_,ista) * inverse_of_omega_complex - stresssngl(4,5,ir_,ista) = stress(4,5,ir_,ista) * inverse_of_omega_complex - stresssngl(5,5,ir_,ista) = stress(5,5,ir_,ista) * inverse_of_omega_complex - stresssngl(6,5,ir_,ista) = stress(6,5,ir_,ista) * inverse_of_omega_complex - stresssngl(1,6,ir_,ista) = stress(1,6,ir_,ista) * inverse_of_omega_complex - stresssngl(2,6,ir_,ista) = stress(2,6,ir_,ista) * inverse_of_omega_complex - stresssngl(3,6,ir_,ista) = stress(3,6,ir_,ista) * inverse_of_omega_complex - stresssngl(4,6,ir_,ista) = stress(4,6,ir_,ista) * inverse_of_omega_complex - stresssngl(5,6,ir_,ista) = stress(5,6,ir_,ista) * inverse_of_omega_complex - stresssngl(6,6,ir_,ista) = stress(6,6,ir_,ista) * inverse_of_omega_complex - enddo - enddo + stresssngl(2,1,ir_,ista) = stress(2,1,ir_,ista) * inverse_of_omega_complex + stresssngl(3,1,ir_,ista) = stress(3,1,ir_,ista) * inverse_of_omega_complex + stresssngl(4,1,ir_,ista) = stress(4,1,ir_,ista) * inverse_of_omega_complex + stresssngl(5,1,ir_,ista) = stress(5,1,ir_,ista) * inverse_of_omega_complex + stresssngl(6,1,ir_,ista) = stress(6,1,ir_,ista) * inverse_of_omega_complex + stresssngl(1,2,ir_,ista) = stress(1,2,ir_,ista) * inverse_of_omega_complex + stresssngl(2,2,ir_,ista) = stress(2,2,ir_,ista) * inverse_of_omega_complex + stresssngl(3,2,ir_,ista) = stress(3,2,ir_,ista) * inverse_of_omega_complex + stresssngl(4,2,ir_,ista) = stress(4,2,ir_,ista) * inverse_of_omega_complex + stresssngl(5,2,ir_,ista) = stress(5,2,ir_,ista) * inverse_of_omega_complex + stresssngl(6,2,ir_,ista) = stress(6,2,ir_,ista) * inverse_of_omega_complex + stresssngl(1,3,ir_,ista) = stress(1,3,ir_,ista) * inverse_of_omega_complex + stresssngl(2,3,ir_,ista) = stress(2,3,ir_,ista) * inverse_of_omega_complex + stresssngl(3,3,ir_,ista) = stress(3,3,ir_,ista) * inverse_of_omega_complex + stresssngl(4,3,ir_,ista) = stress(4,3,ir_,ista) * inverse_of_omega_complex + stresssngl(5,3,ir_,ista) = stress(5,3,ir_,ista) * inverse_of_omega_complex + stresssngl(6,3,ir_,ista) = stress(6,3,ir_,ista) * inverse_of_omega_complex + stresssngl(1,4,ir_,ista) = stress(1,4,ir_,ista) * inverse_of_omega_complex + stresssngl(2,4,ir_,ista) = stress(2,4,ir_,ista) * inverse_of_omega_complex + stresssngl(3,4,ir_,ista) = stress(3,4,ir_,ista) * inverse_of_omega_complex + stresssngl(4,4,ir_,ista) = stress(4,4,ir_,ista) * inverse_of_omega_complex + stresssngl(5,4,ir_,ista) = stress(5,4,ir_,ista) * inverse_of_omega_complex + stresssngl(6,4,ir_,ista) = stress(6,4,ir_,ista) * inverse_of_omega_complex + stresssngl(1,5,ir_,ista) = stress(1,5,ir_,ista) * inverse_of_omega_complex + stresssngl(2,5,ir_,ista) = stress(2,5,ir_,ista) * inverse_of_omega_complex + stresssngl(3,5,ir_,ista) = stress(3,5,ir_,ista) * inverse_of_omega_complex + stresssngl(4,5,ir_,ista) = stress(4,5,ir_,ista) * inverse_of_omega_complex + stresssngl(5,5,ir_,ista) = stress(5,5,ir_,ista) * inverse_of_omega_complex + stresssngl(6,5,ir_,ista) = stress(6,5,ir_,ista) * inverse_of_omega_complex + stresssngl(1,6,ir_,ista) = stress(1,6,ir_,ista) * inverse_of_omega_complex + stresssngl(2,6,ir_,ista) = stress(2,6,ir_,ista) * inverse_of_omega_complex + stresssngl(3,6,ir_,ista) = stress(3,6,ir_,ista) * inverse_of_omega_complex + stresssngl(4,6,ir_,ista) = stress(4,6,ir_,ista) * inverse_of_omega_complex + stresssngl(5,6,ir_,ista) = stress(5,6,ir_,ista) * inverse_of_omega_complex + stresssngl(6,6,ir_,ista) = stress(6,6,ir_,ista) * inverse_of_omega_complex + enddo + enddo do ir_=1,r_n @@ -1094,32 +1094,32 @@ program TraSH_Zmin !DIR$ loop count min(1000) do ista = 1,nsta displacementsngl(1,1,ir_,ista) = displacement(1,1,ir_,ista) - displacementsngl(2,1,ir_,ista) = displacement(2,1,ir_,ista) - displacementsngl(3,1,ir_,ista) = displacement(3,1,ir_,ista) - displacementsngl(1,2,ir_,ista) = displacement(1,2,ir_,ista) - displacementsngl(2,2,ir_,ista) = displacement(2,2,ir_,ista) - displacementsngl(3,2,ir_,ista) = displacement(3,2,ir_,ista) - displacementsngl(1,3,ir_,ista) = displacement(1,3,ir_,ista) - displacementsngl(2,3,ir_,ista) = displacement(2,3,ir_,ista) - displacementsngl(3,3,ir_,ista) = displacement(3,3,ir_,ista) - displacementsngl(1,4,ir_,ista) = displacement(1,4,ir_,ista) - displacementsngl(2,4,ir_,ista) = displacement(2,4,ir_,ista) - displacementsngl(3,4,ir_,ista) = displacement(3,4,ir_,ista) - displacementsngl(1,5,ir_,ista) = displacement(1,5,ir_,ista) - displacementsngl(2,5,ir_,ista) = displacement(2,5,ir_,ista) - displacementsngl(3,5,ir_,ista) = displacement(3,5,ir_,ista) - displacementsngl(1,6,ir_,ista) = displacement(1,6,ir_,ista) - displacementsngl(2,6,ir_,ista) = displacement(2,6,ir_,ista) - displacementsngl(3,6,ir_,ista) = displacement(3,6,ir_,ista) - enddo - enddo - - - -! stress(1:6,1:6,1:r_n,1:theta_n) = stress(1:6,1:6,1:r_n,1:theta_n)/cmplx(0,omega) + displacementsngl(2,1,ir_,ista) = displacement(2,1,ir_,ista) + displacementsngl(3,1,ir_,ista) = displacement(3,1,ir_,ista) + displacementsngl(1,2,ir_,ista) = displacement(1,2,ir_,ista) + displacementsngl(2,2,ir_,ista) = displacement(2,2,ir_,ista) + displacementsngl(3,2,ir_,ista) = displacement(3,2,ir_,ista) + displacementsngl(1,3,ir_,ista) = displacement(1,3,ir_,ista) + displacementsngl(2,3,ir_,ista) = displacement(2,3,ir_,ista) + displacementsngl(3,3,ir_,ista) = displacement(3,3,ir_,ista) + displacementsngl(1,4,ir_,ista) = displacement(1,4,ir_,ista) + displacementsngl(2,4,ir_,ista) = displacement(2,4,ir_,ista) + displacementsngl(3,4,ir_,ista) = displacement(3,4,ir_,ista) + displacementsngl(1,5,ir_,ista) = displacement(1,5,ir_,ista) + displacementsngl(2,5,ir_,ista) = displacement(2,5,ir_,ista) + displacementsngl(3,5,ir_,ista) = displacement(3,5,ir_,ista) + displacementsngl(1,6,ir_,ista) = displacement(1,6,ir_,ista) + displacementsngl(2,6,ir_,ista) = displacement(2,6,ir_,ista) + displacementsngl(3,6,ir_,ista) = displacement(3,6,ir_,ista) + enddo + enddo + + + +! stress(1:6,1:6,1:r_n,1:theta_n) = stress(1:6,1:6,1:r_n,1:theta_n)/cmplx(0,omega) ! stresssngl(1:6,1:6,1:r_n,1:theta_n) = stress(1:6,1:6,1:r_n,1:theta_n) ! displacementsngl(1:3,1:6,1:r_n,1:theta_n) = displacement(1:3,1:6,1:r_n,1:theta_n) - + Coeff = 3*6*nsta*r_n !here the size of data for gethering is multiplying r_n number of depth. call mpi_gatherv(displacementsngl,Coeff,MPI_COMPLEX,displacementsngl_global,NbInd,Ind,MPI_COMPLEX,0,SubCommunicators,ierr) !! here the 0 is the receiving proc in every sub-group.The NbInd is the size of data-block of every proc in sub-group.Ind is similar to the displacement in the mpi_gatherv which represent the display of the receiving data-block in the root to the 1st element of displacementsngl_global array. @@ -1133,13 +1133,13 @@ program TraSH_Zmin ! write(*,*) 'displacement(2,:,ir_)',displacementsngl_global(2,1:6,ir_) !endif endif !!for the condition ifrq /= 0 - + if (myrank==0) then - ir0 = r0_n + ir0 = r0_n write(coutfile, '(I5.5,".Stress_SH_",I5.5)') int(r0(ir0)*10.d0),ifq coutfile = trim(modelname)//"."//coutfile coutfile = trim(outputDir)//"/Stress/"//coutfile - + !! DK DK not a good idea to give indices when writing the whole array: some compilers could create copies or use loops in such a case !! DK DK unformatted sequential I/Os (because sequential I/O is usually faster than direct-access I/O) !! DK DK and writing a single big file is also much better @@ -1161,7 +1161,7 @@ program TraSH_Zmin !! Only the myrank==0 proc can start the 34 file reading. - enddo ! frequency omega-loop termine + enddo ! frequency omega-loop termine ! write(*,*) 'write the radius of the last plane',r_(r_n) !!test the depth of the computed plane call MPI_Barrier(MPI_COMM_WORLD,ierr) @@ -1174,17 +1174,17 @@ program TraSH_Zmin ir0 = r0_n write(coutfile, '(I5,".Stress_SH")'), int(r0(ir0)*10.d0) do j = 1,7 - if (coutfile(j:j).eq.' ')coutfile(j:j) = '0' + if (coutfile(j:j)==' ')coutfile(j:j) = '0' enddo - + coutfile = trim(modelname)//"."//coutfile coutfile = trim(outputDir)//"Stress/"//coutfile - + write(coutfile1, '(I5,".Displacement_SH")'), int(r0(ir0)*10.d0) do j = 1,7 - if (coutfile1(j:j).eq.' ')coutfile1(j:j) = '0' + if (coutfile1(j:j)==' ')coutfile1(j:j) = '0' enddo - + coutfile1 = trim(modelname)//"."//coutfile1 coutfile1 = trim(outputDir)//"Displacement/"//coutfile1 @@ -1207,14 +1207,14 @@ program TraSH_Zmin ! open(35,file=coutfile3, form='unformatted',action='read') !!coutifle2 and coutfile3 are the file used for storing the Stress and Displacement for SH every frequency computation - + read(34) stresssngl_global(1:6,1:6,1:r_n,1:nsta_global) read(34) displacementsngl_global(1:3,1:6,1:r_n,1:nsta_global) close(34) ! read(35) displacementsngl_global(1:3,1:6,1:r_n,1:nsta_global) ! close(35) - + open(1,file=coutfile,status='unknown',form='unformatted', access = 'direct', recl=2*6*6*kind(0e0)*nsta_global) ! open(1,file=coutfile,status='unknown',form='unformatted', access = 'direct', recl=2*6*6*kind(0e0)*nsta_global*r_n) ! write(1,rec=i+1) stresssngl_global(1:6,1:6,1:r_n,1:nsta_global) @@ -1240,8 +1240,8 @@ program TraSH_Zmin stop - - + + diff --git a/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/Part-2a-read_DSM_coefficients_back_SH/TraPSV_MPI_read_vertical_faces/calmat.f90 b/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/Part-2a-read_DSM_coefficients_back_SH/TraPSV_MPI_read_vertical_faces/calmat.f90 index fd5d330ff..b6b8ca0cb 100755 --- a/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/Part-2a-read_DSM_coefficients_back_SH/TraPSV_MPI_read_vertical_faces/calmat.f90 +++ b/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/Part-2a-read_DSM_coefficients_back_SH/TraPSV_MPI_read_vertical_faces/calmat.f90 @@ -9,33 +9,33 @@ subroutine calmatc( nlayer,vnp,vra,con,rpow,w1dn,w2dn,ra,m,work ) integer :: i,j,k,kk,l,nn,snp real(kind(0d0)) :: a(2,2),b(2,2),c(5),rh ! parameter check - if ( rpow .gt. maxrpow ) pause 'Invalid arguments.(calmatc)' + if ( rpow > maxrpow ) pause 'Invalid arguments.(calmatc)' ! computing of the matrix elements snp = 1 do i=1,nlayer rh = ra(i+1) - ra(i) - if ( w1dn .eq. 0 ) then + if ( w1dn == 0 ) then a(2,1) = -1.d0 / rh a(1,1) = ra(i+1) / rh a(2,2) = 1.d0 / rh a(1,2) = -ra(i) / rh else - if ( w1dn .eq. 1 ) then + if ( w1dn == 1 ) then a(2,1) = 0.d0 a(1,1) = -1.d0 / rh a(2,2) = 0.d0 a(1,2) = 1.d0 / rh - else + else pause 'Invalid arguments.(calmatc)' endif endif - if ( w2dn .eq. 0 ) then + if ( w2dn == 0 ) then b(2,1) = -1.d0 / rh b(1,1) = ra(i+1) / rh b(2,2) = 1.d0 / rh b(1,2) = -ra(i) / rh else - if ( w2dn .eq. 1 ) then + if ( w2dn == 1 ) then b(2,1) = 0.d0 b(1,1) = -1.d0 / rh b(2,2) = 0.d0 @@ -52,7 +52,7 @@ subroutine calmatc( nlayer,vnp,vra,con,rpow,w1dn,w2dn,ra,m,work ) call pmulti( 2,a(1,j),2,b(1,k),3,c ) do l=3,1,-1 c(l+rpow) = c(l) - if ( rpow.gt.0 ) c(l)=0.d0 + if ( rpow>0 ) c(l)=0.d0 enddo nn = 4 * (i-1) + 2 * (j-1) + k call pinteg( snp,5,c,ra(i),ra(i+1), & @@ -60,13 +60,13 @@ subroutine calmatc( nlayer,vnp,vra,con,rpow,w1dn,w2dn,ra,m,work ) enddo enddo enddo - - if ( w1dn .ne. w2dn ) then + + if ( w1dn /= w2dn ) then do i=1,4*nlayer - if ( (mod(i,4).eq.0) .or. (mod(i,4).eq.1) ) then + if ( (mod(i,4)==0) .or. (mod(i,4)==1) ) then m(i) = 2.d0 * work(i) else - if ( mod(i,4).eq.2 ) then + if ( mod(i,4)==2 ) then m(i) = work(i) + work(i+1) else m(i) = work(i-1) + work(i) @@ -78,8 +78,8 @@ subroutine calmatc( nlayer,vnp,vra,con,rpow,w1dn,w2dn,ra,m,work ) m(i) = work(i) enddo endif - - + + end subroutine calmatc !----------------------------------------------------------------------- @@ -92,29 +92,29 @@ subroutine caltl( nlayer,vnp,vra,rho,ra,tl) real(kind(0d0)) :: vra(vnp),rho(vnp),ra(*),tl(*) integer :: i,nn,snp real(kind(0d0)) ::c(3),from,to - + snp = 1 do i=1,nlayer c(1) = 0.d0 c(2) = 0.d0 c(3) = 1.d0 - + from = ra(i) to = ( ra(i) + ra(i+1) ) / 2.d0 nn = 4 * (i-1) call pinteg( snp,3,c,from,to,vnp,vra,rho,tl(nn+1) ) - + tl(nn+2) = 0.d0 tl(nn+3) = 0.d0 - + from = to to = ra(i+1) call pinteg( snp,3,c,from,to,vnp,vra,rho,tl(nn+4) ) - + enddo - - + + end subroutine caltl !----------------------------------------------------------------------- @@ -127,19 +127,19 @@ subroutine calhl( nlayer,vnp,vra,mu,ra,hl) real(kind(0d0)) :: vra(vnp),mu(vnp),ra(*),hl(*) integer ::i,nn,snp real(kind(0d0)) :: c(1),from,to - + snp = 1 do i=1,nlayer c(1) = 1.d0 - + from = ra(i) to = ( ra(i) + ra(i+1) ) / 2.d0 nn = 4 * (i-1) call pinteg( snp,1,c,from,to,vnp,vra,mu,hl(nn+1) ) - + hl(nn+2) = 0.d0 hl(nn+3) = 0.d0 - + from = to to = ra(i+1) call pinteg( snp,1,c,from,to,vnp,vra,mu,hl(nn+4) ) @@ -152,7 +152,7 @@ subroutine calt( nlayer, tl, tc, t ) implicit none integer :: nlayer, i real(kind(0d0)) :: t(*), tl(*), tc(*) - + do i=1,4*nlayer t(i) = ( tl(i) + tc(i) ) / 2.d0 enddo @@ -168,12 +168,12 @@ subroutine pmulti(n,a,m,b,l,c) implicit none integer :: n,m,l,i,j real(kind(0d0)) :: a(n),b(m),c(l) - - if (n+m-1.ne.l) pause 'Invalid arguments.(pmulti)' + + if (n+m-1/=l) pause 'Invalid arguments.(pmulti)' do i=1,l c(i)=0.d0 enddo - + do i=1,n do j=1,m c(i+j-1) = c(i+j-1) + a(i)*b(j) @@ -193,19 +193,19 @@ subroutine pinteg(snp,n,p,from,to,vnp,vra,con,pint) real(kind(0d0)) :: from,to,p(n),vra(vnp),con(vnp),pint real(kind(0d0)) :: x1,x2,q(2),pq(maxn+1),psint - - if ( n.gt.maxn ) pause 'Degrees of a polynomial is too large.(pinteg)' - if ( snp.ge.vnp ) snp = 1 - + + if ( n>maxn ) pause 'Degrees of a polynomial is too large.(pinteg)' + if ( snp>=vnp ) snp = 1 + pint = 0.d0 - x1 = from - + x1 = from + 100 continue - if ( (vra(snp).le.x1).and.(vra(snp+1).gt.x1) ) then + if ( (vra(snp)<=x1).and.(vra(snp+1)>x1) ) then x2 = dmin1( to, vra(snp+1) ) else snp = snp + 1 - if ( snp.eq.vnp ) snp = 1 + if ( snp==vnp ) snp = 1 goto 100 endif ! evaluating the integrated value @@ -214,14 +214,14 @@ subroutine pinteg(snp,n,p,from,to,vnp,vra,con,pint) call pmulti( n,p,2,q,n+1,pq ) call polint( n+1,pq,x1,x2,psint ) pint = pint + psint - - if ( x2.eq.to ) then + + if ( x2==to ) then continue else x1 = x2 goto 100 endif - + end subroutine pinteg !----------------------------------------------------------------------- @@ -237,19 +237,19 @@ subroutine polint( n,p,x1,x2,pint ) real(kind(0d0)) :: p(*),x1,x2,pint integer :: i,j real(kind(0d0)) :: a(maxn),b(maxn),dx,xx - - if ( n.gt.maxn) pause 'Degrees of a polynomial is too large.(polint)' - + + if ( n>maxn) pause 'Degrees of a polynomial is too large.(polint)' + a(1) = 1.d0 b(1) = 1.d0 - if ( n.ge.2 ) then + if ( n>=2 ) then do i=2,n a(i) = a(i-1) * x1 b(i) = b(i-1) * x2 enddo endif dx = x2 - x1 - + pint = 0.d0 do i=1,n xx = 0.d0 @@ -258,7 +258,7 @@ subroutine polint( n,p,x1,x2,pint ) enddo pint = pint + p(i) * dx * xx enddo - + end subroutine polint @@ -275,7 +275,7 @@ subroutine cala0( nlayer,omega,omegai,t,h1,h2,h3,h4,coef,a0 ) complex(kind(0d0)) :: comega2,coef,a0(*) integer :: i real(kind(0d0)) :: h - + comega2 = dcmplx( omega, -omegai ) * dcmplx( omega, -omegai ) do i=1,4*nlayer h = h1(i) - h2(i) + h3(i) - 2.d0 * h4(i) @@ -283,7 +283,7 @@ subroutine cala0( nlayer,omega,omegai,t,h1,h2,h3,h4,coef,a0 ) enddo end subroutine cala0 - + !----------------------------------------------------------------------- @@ -295,12 +295,12 @@ subroutine cala2( nlayer,h4,coef,a2 ) real(kind(0d0)) :: h4(*) complex(kind(0d0)) :: coef,a2(*) integer :: i - + do i=1,4*nlayer a2(i) = - coef * dcmplx( h4(i) ) enddo - - + + end subroutine cala2 @@ -314,7 +314,7 @@ subroutine cala( nn,l,lda,a0,a2,a ) complex(kind(0d0)) :: a0(lda,*),a2(lda,*),a(lda,*) integer :: i,j real(kind(0d0)) :: xl2 - + xl2 = dble(l) * dble(l+1) do j=1,nn do i=1,2 @@ -329,7 +329,7 @@ end subroutine cala subroutine calga(nlayer,omega,omegai,l,t,h1,h2,h3,h4,coef,a) ! Computing the coefficient matrix 'a' in the solid part. - + implicit none integer :: nlayer,l real(kind(0d0)) :: omega,omegai @@ -338,7 +338,7 @@ subroutine calga(nlayer,omega,omegai,l,t,h1,h2,h3,h4,coef,a) complex(kind(0d0)) :: comega2,coef,a(*) integer :: i real(kind(0d0)) :: h,xl2m2 - + h = 0.d0 do i=1,4*nlayer a(i) = 0.d0 @@ -359,7 +359,7 @@ end subroutine calga subroutine calga2(nlayer,omega,omegai,l,t,h1,h2,h3,coef,a) ! Computing the coefficient matrix 'a' in the solid part. - + implicit none integer :: nlayer,l real(kind(0d0)) :: omega,omegai @@ -390,8 +390,8 @@ subroutine overlap( nlayer,a,a2 ) integer :: nlayer complex(kind(0d0)) :: a(*),a2(2,*) integer :: i,j,k,mu,m,i1,i2,k1,k2,nsize - - + + nsize = nlayer+1 mu = 1 m = mu + 1 @@ -401,11 +401,11 @@ subroutine overlap( nlayer,a,a2 ) i2 = j do i=i1,i2 k = i - j + m - if ( i.eq.j ) then - if ( i.eq.1 ) then + if ( i==j ) then + if ( i==1 ) then a2(k,j) = a2(k,j) + a(1) else - if ( i.eq.nsize ) then + if ( i==nsize ) then a2(k,j) = a2(k,j) + a( 4*nlayer ) else k1 = 4 * i - 4 @@ -414,7 +414,7 @@ subroutine overlap( nlayer,a,a2 ) endif endif endif - if (i+1.eq.j) then + if (i+1==j) then k1 = 4 * i - 2 a2(k,j) = a2(k,j) + a(k1) endif @@ -425,32 +425,32 @@ end subroutine overlap !----------------------------------------------------------------------- subroutine calg2( l,m,spo,r0,mt,mu0,coef,ga,a,ga2,dr,g2,ig2 ) - + implicit none - real(kind(0d0)), parameter :: pi=3.1415926535897932d0 + real(kind(0d0)), parameter :: pi=3.1415926535897932d0 integer :: l,m real(kind(0d0)) :: spo,r0,mt(3,3),mu0 complex(kind(0d0)) :: coef,ga(8),a(4),ga2(2,3),g2(*) integer :: i,itmp,ig2 real(kind(0d0)) :: b1,sgn,ier complex(kind(0d0)) :: dd,cg2(3),dr(3),z(3) - real(kind(0d0)) :: eps + real(kind(0d0)) :: eps data eps / -1.d0 / ! computing of particular solution with free surface boundary conditions cg2 = 0 dd = dcmplx( 0.d0 ) - if ( m.ge.0 ) then + if ( m>=0 ) then sgn = 1.d0 else sgn = - 1.d0 endif - if ( iabs(m).eq.1 ) then + if ( iabs(m)==1 ) then b1 = dsqrt( dble( 2*l+1 ) / ( 16.d0 * pi ) ) - + dd = dcmplx( b1 ) * ( dcmplx( sgn * mt(1,3), mt(1,2) ) )& - & / ( dcmplx( r0 * r0 * mu0 ) * coef ) + & / ( dcmplx( r0 * r0 * mu0 ) * coef ) itmp = 4 cg2 = cmplx(0.d0) do i=2,3 @@ -458,13 +458,13 @@ subroutine calg2( l,m,spo,r0,mt,mu0,coef,ga,a,ga2,dr,g2,ig2 ) itmp = itmp + 2 enddo else - if ( iabs(m).eq.2 ) then + if ( iabs(m)==2 ) then b1 = dsqrt( dble(2*l+1)*dble(l-1)*dble(l+2)/(64.d0*pi) ) cg2(2) = dcmplx( b1 / r0 ) & - & * dcmplx( 2.d0*mt(2,3), sgn*( mt(2,2)-mt(3,3) ) ) + & * dcmplx( 2.d0*mt(2,3), sgn*( mt(2,2)-mt(3,3) ) ) endif endif - if ( ((m.eq.-2).or.(m.eq.-l)).and.(ig2.eq.0) ) then + if ( ((m==-2).or.(m==-l)).and.(ig2==0) ) then call dclisb0( ga2,3,1,2,cg2,eps,dr,z,ier) ig2= ig2+1 else diff --git a/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/Part-2a-read_DSM_coefficients_back_SH/TraPSV_MPI_read_vertical_faces/constants.h b/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/Part-2a-read_DSM_coefficients_back_SH/TraPSV_MPI_read_vertical_faces/constants.h index d70d8f4a1..e755ee1c2 100755 --- a/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/Part-2a-read_DSM_coefficients_back_SH/TraPSV_MPI_read_vertical_faces/constants.h +++ b/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/Part-2a-read_DSM_coefficients_back_SH/TraPSV_MPI_read_vertical_faces/constants.h @@ -2,11 +2,11 @@ ! very slow debug mode or not: open many ASCII text files from each node to print debug information. ! *ALWAYS* set this flag to false and recompile the whole code before starting big production runs logical, parameter :: SLOW_DEBUG_MODE = .false. !!! .true. -! -! use timer +! +! use timer logical, parameter :: USE_TIMER = .true. ! ! maximum azimuthal order !! integer, parameter :: maxlmax = 35001 -! write coefficient expansion in disk every maxlmax_g elements +! write coefficient expansion in disk every maxlmax_g elements ! integer, parameter :: maxlmax_g = 1000 diff --git a/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/Part-2a-read_DSM_coefficients_back_SH/TraPSV_MPI_read_vertical_faces/dclib.f90 b/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/Part-2a-read_DSM_coefficients_back_SH/TraPSV_MPI_read_vertical_faces/dclib.f90 index f292596c4..947fa49a9 100755 --- a/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/Part-2a-read_DSM_coefficients_back_SH/TraPSV_MPI_read_vertical_faces/dclib.f90 +++ b/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/Part-2a-read_DSM_coefficients_back_SH/TraPSV_MPI_read_vertical_faces/dclib.f90 @@ -25,16 +25,16 @@ subroutine dclisb0(a, n, nud, n1, b, eps, dr, z, ier) ier = 0 eps1 = 1.0d-14 m = nud + 1 - if ((n .le. 0) .or. (nud .le. 0 ) .or. (n1 .lt. m)) then + if ((n <= 0) .or. (nud <= 0 ) .or. (n1 < m)) then ier = 2 - print *, '(subr. lisb) invalid argument. ', n, nud, n1 + print *, '(subr. lisb) invalid argument. ', n, nud, n1 endif - - if (eps .le. 0.d0) eps = eps1 + + if (eps <= 0.d0) eps = eps1 ! modified cholesky decomposition j = 1 - if (abs(a(m,1)) .le. eps) then + if (abs(a(m,1)) <= eps) then ier = 1 print *, '(subr. lisb) singular at step # ', j endif @@ -43,17 +43,17 @@ subroutine dclisb0(a, n, nud, n1, b, eps, dr, z, ier) a(m-1,2) = a(m-1,2) * dr(1) s = a(m,2) - xx * a(m-1,2) j = 2 - if (abs(s) .le. eps) then + if (abs(s) <= eps) then ier = 1 print *, '(subr. lisb) singular at step # ', j endif dr(2) = dcmplx(1.0d0) / s - if (m .lt. 3) then + if (m < 3) then do j=3,n xx = a(1,j) a(1,j) = xx * dr(j-1) s = a(2,j) - xx * a(1,j) - if (abs(s) .le. eps) then + if (abs(s) <= eps) then ier = 1 print *, ' (subr. lisb) singular at step # ', j endif @@ -62,7 +62,7 @@ subroutine dclisb0(a, n, nud, n1, b, eps, dr, z, ier) else do j=3,n k1 = 1 - if (j .ge. m) k1 = j - m + 1 + if (j >= m) k1 = j - m + 1 mj = m - j do i=k1+1,j-1 sum = dcmplx(0.0d0) @@ -79,7 +79,7 @@ subroutine dclisb0(a, n, nud, n1, b, eps, dr, z, ier) a(mj+i,j) = au enddo t = a(m,j) - sum - if (abs(t) .le. eps) then + if (abs(t) <= eps) then ier = 1 print *, ' (subr. lisb) singular at step # ', j endif @@ -90,7 +90,7 @@ subroutine dclisb0(a, n, nud, n1, b, eps, dr, z, ier) entry dcsbsub0(a, n, nud, n1, b, eps, dr, z, ier) ! forward substitution m = nud + 1 - if (m .lt. 3) then + if (m < 3) then z(1) = b(1) do j=2,n z(j) = b(j) - a(1,j) * z(j-1) @@ -106,7 +106,7 @@ subroutine dclisb0(a, n, nud, n1, b, eps, dr, z, ier) z(1) = b(1) z(2) = b(2) - a(m-1,2) * z(1) do j=3,n - if (j .gt. m) then + if (j > m) then i1 = 1 else i1 = m - j + 1 @@ -125,7 +125,7 @@ subroutine dclisb0(a, n, nud, n1, b, eps, dr, z, ier) do j=3,n j1 = n - j + 1 i1 = 1 - if (j .lt. m) i1 = m - j + 1 + if (j < m) i1 = m - j + 1 sum = dcmplx(0.0d0) do k=i1,m-1 sum = sum + a(k,m-k+j1) * b(m-k+j1) @@ -133,6 +133,6 @@ subroutine dclisb0(a, n, nud, n1, b, eps, dr, z, ier) b(j1) = z(j1) - sum enddo endif - + end subroutine dclisb0 diff --git a/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/Part-2a-read_DSM_coefficients_back_SH/TraPSV_MPI_read_vertical_faces/dclib3.f90 b/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/Part-2a-read_DSM_coefficients_back_SH/TraPSV_MPI_read_vertical_faces/dclib3.f90 index 78fbcc718..d2b5c13d7 100755 --- a/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/Part-2a-read_DSM_coefficients_back_SH/TraPSV_MPI_read_vertical_faces/dclib3.f90 +++ b/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/Part-2a-read_DSM_coefficients_back_SH/TraPSV_MPI_read_vertical_faces/dclib3.f90 @@ -14,7 +14,7 @@ subroutine dclisb(a, n, nud, n1, np, b, eps, dr, z, ier) ! (8) z : 1-dim. working array. * ! (9) ier : error code. * ! copy right t. oguni july 30 1989 version 1.0 * -!*********************************************************************** +!*********************************************************************** integer :: n, nud, n1, np, ier complex(kind(0d0)) :: a(n1,n), b(n), dr(n), z(n) real(kind(0d0)) :: eps @@ -26,14 +26,14 @@ subroutine dclisb(a, n, nud, n1, np, b, eps, dr, z, ier) ier = 0 eps1 = 1.0d-14 m = nud + 1 - if ((n .le. 0) .or. (nud .le. 0 ) .or. (n1 .lt. m)) then + if ((n <= 0) .or. (nud <= 0 ) .or. (n1 < m)) then ier = 2 print *, '(subr. lisb) invalid argument. ', n, nud, n1 endif - if (eps .le. 0.0) eps = eps1 + if (eps <= 0.0) eps = eps1 ! modified cholesky decomposition j = 1 - if (abs(a(m,1)) .le. eps) then + if (abs(a(m,1)) <= eps) then ier = 1 print *, '(subr. lisb) singular at step # ', j endif @@ -42,17 +42,17 @@ subroutine dclisb(a, n, nud, n1, np, b, eps, dr, z, ier) a(m-1,2) = a(m-1,2) * dr(1) s = a(m,2) - xx * a(m-1,2) j = 2 - if (abs(s) .le. eps) then + if (abs(s) <= eps) then ier = 1 print *, '(subr. lisb) singular at step # ', j endif dr(2) = dcmplx(1.0d0) / s - if (m .lt. 3) then + if (m < 3) then do j=3,n xx = a(1,j) a(1,j) = xx * dr(j-1) s = a(2,j) - xx * a(1,j) - if (abs(s) .le. eps) then + if (abs(s) <= eps) then ier = 1 print *, ' (subr. lisb) singular at step # ', j endif @@ -61,7 +61,7 @@ subroutine dclisb(a, n, nud, n1, np, b, eps, dr, z, ier) else do j=3,n k1 = 1 - if (j .ge. m) k1 = j - m + 1 + if (j >= m) k1 = j - m + 1 mj = m - j do i=k1+1,j-1 sum = dcmplx(0.0d0) @@ -78,7 +78,7 @@ subroutine dclisb(a, n, nud, n1, np, b, eps, dr, z, ier) a(mj+i,j) = au enddo t = a(m,j) - sum - if (abs(t) .le. eps) then + if (abs(t) <= eps) then ier = 1 print *, ' (subr. lisb) singular at step # ', j endif @@ -89,7 +89,7 @@ subroutine dclisb(a, n, nud, n1, np, b, eps, dr, z, ier) entry dcsbsub(a, n, nud, n1, np, b, eps, dr, z, ier) ! forward substitution m = nud + 1 - if (m .lt. 3) then + if (m < 3) then z(np) = b(np) do j=np+1,n z(j) = b(j) - a(1,j) * z(j-1) @@ -99,7 +99,7 @@ subroutine dclisb(a, n, nud, n1, np, b, eps, dr, z, ier) z(np) = b(np) z(np+1) = b(np+1) - a(m-1,np+1) * z(np) do j=np+2,n - if (j .gt. np-1+m) then + if (j > np-1+m) then i1 = 1 else i1 = np-1+m - j + 1 @@ -115,8 +115,8 @@ subroutine dclisb(a, n, nud, n1, np, b, eps, dr, z, ier) enddo b(n) = z(n) b(n-1) = z(n-1) - a(m-1,n) * z(n) - endif - + endif + end subroutine dclisb diff --git a/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/Part-2a-read_DSM_coefficients_back_SH/TraPSV_MPI_read_vertical_faces/glu2.f90 b/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/Part-2a-read_DSM_coefficients_back_SH/TraPSV_MPI_read_vertical_faces/glu2.f90 index 0e22e0117..09aa3bf35 100755 --- a/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/Part-2a-read_DSM_coefficients_back_SH/TraPSV_MPI_read_vertical_faces/glu2.f90 +++ b/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/Part-2a-read_DSM_coefficients_back_SH/TraPSV_MPI_read_vertical_faces/glu2.f90 @@ -35,9 +35,9 @@ subroutine glu( a, n, n1, b, eps, wk, ip, ier ) complex(kind(0d0)) :: amax,aik,w,t ! left-hand side - if( eps.lt.0.d0 ) eps = 3.52d-15 + if( eps<0.d0 ) eps = 3.52d-15 - if( ( n1.lt.n ).or.( n.le.0 ) ) then + if( ( n1abs( amax ) ) then ipk = i amax = aik - end if + endif enddo - + ip(k) = ipk - - if( abs( amax ).gt.eps ) then - if( ipk.ne.k ) then + + if( abs( amax )>eps ) then + if( ipk/=k ) then w = a(ipk,k) a(ipk,k) = a(k,k) a(k,k) = w @@ -91,7 +91,7 @@ subroutine glu( a, n, n1, b, eps, wk, ip, ier ) wk(i) = a(i,k) enddo do j = k+1, n - if( ipk.ne.k ) then + if( ipk/=k ) then w = a(ipk,j) a(ipk,j) = a(k,j) a(k,j) = w @@ -102,7 +102,7 @@ subroutine glu( a, n, n1, b, eps, wk, ip, ier ) a(i,j) = a(i,j) + wk(i)*t enddo enddo - + ! matrix is singular. else ier = 1 @@ -114,18 +114,18 @@ subroutine glu( a, n, n1, b, eps, wk, ip, ier ) return endif enddo - + ! right-hand side ! entry glusub( a, b ) entry glusub( a, n, n1, b, eps, wk, ip, ier ) !forward elimination process do k = 1, n - if( ip(k).ne.k ) then + if( ip(k)/=k ) then w = b(ip(k)) b(ip(k)) = b(k) b(k) = w endif - + t = b(k) do i = k+1, n b(i) = b(i) + a(i,k)*t diff --git a/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/Part-2a-read_DSM_coefficients_back_SH/TraPSV_MPI_read_vertical_faces/others.f90 b/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/Part-2a-read_DSM_coefficients_back_SH/TraPSV_MPI_read_vertical_faces/others.f90 index 19aca3e63..687b9f3ad 100755 --- a/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/Part-2a-read_DSM_coefficients_back_SH/TraPSV_MPI_read_vertical_faces/others.f90 +++ b/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/Part-2a-read_DSM_coefficients_back_SH/TraPSV_MPI_read_vertical_faces/others.f90 @@ -10,13 +10,13 @@ subroutine pinputTra(outputDir,psvmodel,modelname,stationsinf,tlen,imin,imax,r0m 100 continue read(5,110) dummy 110 format(a120) - if(dummy(1:1).eq.'#') goto 100 - if(dummy(1:3).eq.'end') goto 120 + if(dummy(1:1)=='#') goto 100 + if(dummy(1:3)=='end') goto 120 write(1,110) dummy goto 100 120 continue close(1) - + open(unit=1,file=tmpfile,status='unknown') read(1,110) outputDir read(1,110) psvmodel @@ -99,13 +99,13 @@ subroutine pinput(outputDir,psvmodel,modelname,tlen,rmin_,rmax_,rdelta_,r0min,r0 100 continue read(5,110) dummy 110 format(a120) - if(dummy(1:1).eq.'#') goto 100 - if(dummy(1:3).eq.'end') goto 120 + if(dummy(1:1)=='#') goto 100 + if(dummy(1:3)=='end') goto 120 write(1,110) dummy goto 100 120 continue close(1) - + open(unit=1,file=tmpfile,status='unknown') read(1,110) outputDir read(1,110) psvmodel @@ -124,31 +124,31 @@ subroutine pinput(outputDir,psvmodel,modelname,tlen,rmin_,rmax_,rdelta_,r0min,r0 close(1) end subroutine pinput - + subroutine udertoStress(uder,stress,A,C,F,L,N) implicit none complex(kind(0d0)) :: uder(1:3,1:3), stress(1:6) real(kind(0d0)) :: A,C,F,L,N - + !write(*,*) 'stress(1) ',stress(1) !write(*,*) 'C',C !write(*,*) 'F', F !write(*,*) 'uder(1,1)', uder(1,1) !write(*,*) 'uder(2,2)',uder(2,2) - !write(*,*) 'uder(3,3)',uder(3,3) + !write(*,*) 'uder(3,3)',uder(3,3) stress(1) = stress(1)+C*uder(1,1)+F*uder(2,2)+F*uder(3,3) stress(2) = stress(2)+F*uder(1,1)+A*uder(2,2)+A*uder(3,3)-2.d0*N*uder(3,3) stress(3) = stress(3)+F*uder(1,1)+A*uder(2,2)+A*uder(3,3)-2.d0*N*uder(2,2) stress(4) = stress(4)+L*(uder(1,2)+uder(2,1)) stress(5) = stress(5)+L*(uder(1,3)+uder(3,1)) stress(6) = stress(6)+N*(uder(2,3)+uder(3,2)) - + return end subroutine udertoStress - + ! @@ -159,12 +159,12 @@ subroutine setmt(imt,mt) real(kind(0d0)) :: mt(3,3) integer :: imt mt = 0.d0 - if(imt.eq.1) mt(1,1) = 1.d0 - if(imt.eq.2) mt(2,2) = 1.d0 - if(imt.eq.3) mt(3,3) = 1.d0 - if(imt.eq.4) mt(1,2) = 1.d0 - if(imt.eq.5) mt(1,3) = 1.d0 - if(imt.eq.6) mt(2,3) = 1.d0 + if(imt==1) mt(1,1) = 1.d0 + if(imt==2) mt(2,2) = 1.d0 + if(imt==3) mt(3,3) = 1.d0 + if(imt==4) mt(1,2) = 1.d0 + if(imt==5) mt(1,3) = 1.d0 + if(imt==6) mt(2,3) = 1.d0 return end subroutine setmt @@ -176,7 +176,7 @@ subroutine udertotsgtSH(imt,uder,ttsgt) complex(kind(0d0)) :: uder(1:3,1:3),tsgt(1:20),ttsgt(1:10) tsgt = cmplx(0.d0) - + tsgt(7) = ttsgt(1) tsgt(12) = ttsgt(2) tsgt(13) = ttsgt(3) @@ -189,17 +189,17 @@ subroutine udertotsgtSH(imt,uder,ttsgt) tsgt(20) = ttsgt(10) - if(imt.eq.1) then ! rr source + if(imt==1) then ! rr source tsgt(1) = tsgt(1) + uder(1,1) tsgt(3) = tsgt(3) - 5.d-1*uder(2,2) - 5.d-1*uder(3,3) tsgt(6) = tsgt(6) + uder(1,2) + uder(2,1) tsgt(10)= tsgt(10)+ 5.d-1*uder(2,2) - 5.d-1*uder(3,3) endif - if(imt.eq.2) then ! tt source + if(imt==2) then ! tt source tsgt(2) = tsgt(2) - 5.d-1*uder(1,1) tsgt(4) = tsgt(4) + 2.5d-1*uder(2,2) + 2.5d-1*uder(3,3) tsgt(8) = tsgt(8) - 5.d-1*uder(1,2) - 5.d-1*uder(2,1) - tsgt(9) = tsgt(9) + 5.d-1*uder(1,1) + tsgt(9) = tsgt(9) + 5.d-1*uder(1,1) tsgt(11)= tsgt(11)- 2.5d-1*uder(2,2) + 2.5d-1*uder(3,3) tsgt(12)= tsgt(12)- 2.5d-1*uder(2,2) - 2.5d-1*uder(3,3) tsgt(17)= tsgt(17)+ 2.5d-1*uder(1,2) + 2.5d-1*uder(2,1) @@ -207,7 +207,7 @@ subroutine udertotsgtSH(imt,uder,ttsgt) tsgt(19)= tsgt(19)+ 1.25d-1*uder(2,2) - 1.25d-1*uder(3,3) tsgt(20)= tsgt(20)+ 1.25d-1*uder(2,2) - 1.25d-1*uder(3,3) endif - if(imt.eq.3) then ! pp source + if(imt==3) then ! pp source tsgt(2) = tsgt(2) - 5.d-1*uder(1,1) tsgt(4) = tsgt(4) + 2.5d-1*uder(2,2) + 2.5d-1*uder(3,3) tsgt(8) = tsgt(8) - 5.d-1*uder(1,2) - 5.d-1*uder(2,1) @@ -219,7 +219,7 @@ subroutine udertotsgtSH(imt,uder,ttsgt) tsgt(19)= tsgt(19) -1.25d-1*uder(2,2) + 1.25d-1*uder(3,3) tsgt(20)= tsgt(20) -1.25d-1*uder(2,2) + 1.25d-1*uder(3,3) endif - if(imt.eq.4) then ! rt source + if(imt==4) then ! rt source tsgt(5) = tsgt(5) - uder(1,1) tsgt(7) = tsgt(7) + 5.d-1*uder(2,2) + 5.d-1*uder(3,3) tsgt(13)= tsgt(13)- 5.d-1*uder(1,2) - 5.d-1*uder(2,1) @@ -227,13 +227,13 @@ subroutine udertotsgtSH(imt,uder,ttsgt) tsgt(15)= tsgt(15)- 2.5d-1*uder(2,2) + 2.5d-1*uder(3,3) tsgt(16)= tsgt(16)+ 2.5d-1*uder(2,2) - 2.5d-1*uder(3,3) endif - if(imt.eq.5) then ! rp source + if(imt==5) then ! rp source tsgt(13)= tsgt(13)+ 5.d-1*uder(1,3) + 5.d-1*uder(3,1) tsgt(14)= tsgt(14)+ 5.d-1*uder(1,3) + 5.d-1*uder(3,1) tsgt(15)= tsgt(15)+ 5.d-1*uder(2,3) + 5.d-1*uder(3,2) tsgt(16)= tsgt(16)+ 5.d-1*uder(2,3) + 5.d-1*uder(3,2) endif - if(imt.eq.6) then ! tp source + if(imt==6) then ! tp source tsgt(17)= tsgt(17)- 5.d-1*uder(1,3) - 5.d-1*uder(3,1) tsgt(18)= tsgt(18)- 5.d-1*uder(1,3) - 5.d-1*uder(3,1) tsgt(19)= tsgt(19)- 5.d-1*uder(2,3) - 5.d-1*uder(3,2) @@ -276,7 +276,7 @@ subroutine locallyCartesianDerivatives (u,udr,udt,udp,uder,r,theta) uder(3,3) = (udp(3)/cmplx(thetasin)+u(1)+u(2)*cmplx(thetacot))/cmplx(r) return end subroutine locallyCartesianDerivatives - + subroutine normalisetoKM(u,r) implicit none @@ -294,7 +294,7 @@ end subroutine normalisetoKM subroutine calgrid( nzone,vrmin,vrmax,vs,rmin,rmax, & & imax,lmin,tlen,vmin,gridpar,dzpar ) implicit none - real(kind(0d0)), parameter :: pi=3.1415926535897932d0 + real(kind(0d0)), parameter :: pi=3.1415926535897932d0 integer :: nzone,imax,lmin real(kind(0d0)) :: vrmin(*),vrmax(*),vs(4,*) real(kind(0d0)) :: rmin,rmax,tlen,vmin(*),gridpar(*),dzpar(*) @@ -308,12 +308,12 @@ subroutine calgrid( nzone,vrmin,vrmax,vs,rmin,rmax, & vs1 = 0.d0 vs2 = 0.d0 do j=1,4 - if ( j.eq.1 ) then + if ( j==1 ) then coef1 = 1.d0 else coef1 = coef1 * ( vrmin(izone) / rmax ) endif - if ( j.eq.1 ) then + if ( j==1 ) then coef2 = 1.d0 else coef2 = coef2 * ( vrmax(izone) / rmax ) @@ -325,7 +325,7 @@ subroutine calgrid( nzone,vrmin,vrmax,vs,rmin,rmax, & rh = vrmax(izone) - vrmin(izone) ! computing omega,amax omega = 2.d0 * pi * dble(imax) / tlen - if ( vs1.ge.vs2 ) then + if ( vs1>=vs2 ) then vmin(izone) = vs2 else vmin(izone) = vs1 @@ -334,7 +334,7 @@ subroutine calgrid( nzone,vrmin,vrmax,vs,rmin,rmax, & gtmp = ( omega * omega ) / ( vmin(izone) * vmin(izone) ) & & - ( (dble(lmin)+0.5d0) * (dble(lmin)+0.5d0) )& & / ( amax * amax ) - if ( gtmp.gt.0.d0 ) then + if ( gtmp>0.d0 ) then dzpar(izone) = dsqrt( 1.d0/gtmp ) gridpar(izone) = rh / dzpar(izone) else @@ -349,7 +349,7 @@ subroutine calgrid( nzone,vrmin,vrmax,vs,rmin,rmax, & enddo do izone=1,nzone - if ( gridpar(izone).gt.0.d0 ) then + if ( gridpar(izone)>0.d0 ) then gridpar(izone) = gridpar(izone) / gtmp else rh = vrmax(izone) - vrmin(izone) @@ -366,7 +366,7 @@ subroutine calgrid( nzone,vrmin,vrmax,vs,rmin,rmax, & gridpar(izone) = gridpar(izone) / gtmp enddo - + end subroutine calgrid !----------------------------------------------------------------------------- @@ -374,7 +374,7 @@ end subroutine calgrid subroutine calra(nlayer,gridpar,dzpar,nzone,vrmin,vrmax,rmin,rmax,nnl,re ) implicit none - real(kind(0d0)), parameter :: pi=3.1415926535897932d0 + real(kind(0d0)), parameter :: pi=3.1415926535897932d0 integer :: nlayer,inlayer integer :: nzone, nnl(nzone) real(kind(0d0)) :: gridpar(*),dzpar(*),vrmin(*),vrmax(*),rmin,rmax @@ -386,22 +386,22 @@ subroutine calra(nlayer,gridpar,dzpar,nzone,vrmin,vrmax,rmin,rmax,nnl,re ) do izone=1,nzone rh = vrmax(izone) - vrmin(izone) - if(dzpar(izone).eq.0.d0) then + if(dzpar(izone)==0.d0) then ntmp = 1 else ntmp = int( sqrt(3.3d0 / re ) * rh / dzpar(izone) & & / 2.d0 / pi / 7.d-1 + 1 ) endif - ! ntmp (see Geller & Takeuchi 1995 6.2) + ! ntmp (see Geller & Takeuchi 1995 6.2) nnl(izone) = ntmp - if ( nnl(izone).lt.5 ) nnl(izone)=5 + if ( nnl(izone)<5 ) nnl(izone)=5 enddo inlayer = 0 do izone=1,nzone inlayer = inlayer + nnl(izone) enddo - nlayer = inlayer + nlayer = inlayer end subroutine calra @@ -411,7 +411,7 @@ end subroutine calra subroutine calra2(nlayer,gridpar,dzpar,nzone,vrmin,vrmax,rmin,rmax,nnl,ra,re,nsta,rsta,rrsta, iista,updown) implicit none - real(kind(0d0)), parameter :: pi=3.1415926535897932d0 + real(kind(0d0)), parameter :: pi=3.1415926535897932d0 integer :: nlayer integer :: nzone,nnl(nzone) real(kind(0d0)) :: gridpar(*),dzpar(*),vrmin(*),vrmax(*),rmin,rmax,ra(nlayer+nzone+1) @@ -431,7 +431,7 @@ subroutine calra2(nlayer,gridpar,dzpar,nzone,vrmin,vrmax,rmin,rmax,nnl,ra,re,nst do i=1,nnl(izone) itmp = itmp + 1 ra(itmp) = vrmin(izone) & - & + rh * dble(i) / dble( nnl(izone) ) + & + rh * dble(i) / dble( nnl(izone) ) enddo enddo @@ -442,19 +442,19 @@ subroutine calra2(nlayer,gridpar,dzpar,nzone,vrmin,vrmax,rmin,rmax,nnl,ra,re,nst !write(*,*) 'check for the last a few ra elements' !do ii=itmp,nlayer+nzone+1,1 !write(*,*) ii,'th radiu of the model is:',ra(ii) -!end do +!enddo itmp = 1 do izone=1,nzone rh = vrmax(izone) - vrmin(izone) do i=1,nnl(izone) do ista = 1, nsta - if( (ra(itmp).lt.rsta(ista)) .and.(rsta(ista).le.ra(itmp+1))) then - if(i.ne.nnl(izone)) then + if( (ra(itmp)=chikasa)) then ! ciista = ista ! ctmp = abs(rs-rsta(ista)) !endif - endif + endif enddo - itmp = itmp + 1 + itmp = itmp + 1 enddo enddo @@ -486,29 +486,29 @@ subroutine calra2(nlayer,gridpar,dzpar,nzone,vrmin,vrmax,rmin,rmax,nnl,ra,re,nst do i=1,nnl(izone) do ista = 1, nsta if (updown(ista)/=-1) then - if( (ra(itmp).lt.rsta(ista)) .and.(rsta(ista).le.ra(itmp+1))) then + if( (ra(itmp)=chikasa)) then ! ciista = ista ! ctmp = abs(rs-rsta(ista)) !endif enddo - itmp = itmp + 1 + itmp = itmp + 1 enddo enddo - if(ciista.eq.0) ciista = 1 - + if(ciista==0) ciista = 1 + end subroutine calra2 @@ -540,41 +540,41 @@ subroutine calspo( ndc,rdc,nlayer,r0,rmin,rmax,ra, isp,spo,spn ) integer :: ndc,nlayer,isp(*),spn real(kind(0d0)) :: rdc(*),r0,rmin,rmax,ra(*),spo integer :: itmp - + ! checquer des parameters - if ( (r0.lt.rmin).or.(r0.gt.rmax) ) & + if ( (r0rmax) ) & & pause 'The source location is improper.(calspo)' ! computing 'spo' - if ( r0.eq.rmax ) then + if ( r0==rmax ) then spo = dble(nlayer) - 0.01d0 r0 = ra(nlayer) & - & + (spo-dble(nlayer-1)) * ( ra(nlayer+1)-ra(nlayer) ) + & + (spo-dble(nlayer-1)) * ( ra(nlayer+1)-ra(nlayer) ) else - do itmp = 2, ndc+nlayer+2 - if ( r0.lt.ra(itmp) ) exit + do itmp = 2, ndc+nlayer+2 + if ( r00.99d0 ) then spo = dble(itmp-2) + 0.99d0 - r0 = ra(itmp-1) + (spo-dble(itmp-2)) * ( ra(itmp)-ra(itmp-1) ) + r0 = ra(itmp-1) + (spo-dble(itmp-2)) * ( ra(itmp)-ra(itmp-1) ) endif - + endif ! computing 'spn' spn = 0 - do itmp = 1, ndc+1 + do itmp = 1, ndc+1 spn = spn + 1 - if ( r0.le.rdc(itmp) ) exit + if ( r0<=rdc(itmp) ) exit enddo ! changing 'spo' spo = spo - dble( isp(spn) - 1 ) - + end subroutine calspo @@ -584,15 +584,15 @@ end subroutine calspo subroutine calgra( isp,ra,r0,spn,spo,gra ) - + integer :: isp(*),spn,itmp real(kind(0d0)) :: ra(*),r0,spo,gra(*) - + itmp = isp(spn) + dint( spo ) gra(1) = ra(itmp) gra(2) = r0 gra(3) = ra(itmp+1) - + end subroutine calgra !----------------------------------------------------------------------------- @@ -623,7 +623,7 @@ subroutine calstg( nzone,rrho,vsv,vsh,nlayer,nnl,ra,rmax,vnp,vra,rho,ecL,ecN ) tvsv = 0.d0 tvsh = 0.d0 do j=1,4 - if ( j.eq.1 ) then + if ( j==1 ) then coef = 1.d0 else coef = coef * ( vra(itmp) / rmax ) @@ -632,7 +632,7 @@ subroutine calstg( nzone,rrho,vsv,vsh,nlayer,nnl,ra,rmax,vnp,vra,rho,ecL,ecN ) tvsv = tvsv + vsv(j,izone) * coef tvsh = tvsh + vsh(j,izone) * coef enddo - rho(itmp) = trho + rho(itmp) = trho ecL(itmp) = rho(itmp) * tvsv * tvsv ecN(itmp) = rho(itmp) * tvsh * tvsh @@ -669,7 +669,7 @@ subroutine calgstg(nzone,nlayer,spn,rrho,vsv,vsh, ra,vra,rmax,rho,ecL,ecN,r0,mu0 tvsv = 0.d0 tvsh = 0.d0 do j=1,4 - if ( j.eq.1 ) then + if ( j==1 ) then coef = 1.d0 else coef = coef * ( vra(i) / rmax ) @@ -681,7 +681,7 @@ subroutine calgstg(nzone,nlayer,spn,rrho,vsv,vsh, ra,vra,rmax,rho,ecL,ecN,r0,mu0 rho(i) = trho ecL(i) = rho(i) * tvsv * tvsv ecN(i) = rho(i) * tvsh * tvsh - + enddo mu0 = ecL(2) @@ -701,17 +701,17 @@ subroutine callsuf(omega,nzone,vrmax,vsv,lsuf) real(kind(0d0)) :: omega, vrmax(*), vsv(4,*) real(kind(0d0)) :: tvs, coef integer :: i - + tvs = 0.d0 do i=1,4 - if(i.eq.1) then + if(i==1) then coef = 1.d0 else - coef = coef + coef = coef endif - tvs = tvs + ( vsv(i,nzone) ) * coef + tvs = tvs + ( vsv(i,nzone) ) * coef enddo - + lsuf = int(omega * vrmax(nzone) / tvs - 0.5d0) + 1 end subroutine callsuf @@ -721,17 +721,17 @@ end subroutine callsuf subroutine calcoef( nzone,omega,q,coef ) implicit none - real(kind(0d0)), parameter :: pi = 3.1415926535897932d0 + real(kind(0d0)), parameter :: pi = 3.1415926535897932d0 integer :: izone,nzone real(kind(0d0)) :: omega,q(*) complex(kind(0d0)) :: coef(*) real(kind(0d0)) :: aa,bb - - do izone=1,nzone - if(q(izone).le.0.d0) then + + do izone=1,nzone + if(q(izone)<=0.d0) then coef(izone) = dcmplx(1.d0) else - if ( omega.eq.0.d0 ) then + if ( omega==0.d0 ) then aa = 1.d0 else aa = 1.d0 + dlog( omega / ( 2.d0 * pi ) ) / ( pi * q(izone) ) @@ -746,24 +746,24 @@ end subroutine calcoef !----------------------------------------------------------------------------- subroutine calamp(g,l,lsuf,maxamp,ismall,ratl) - + implicit none integer :: l,lsuf,ismall real(kind(0d0)) :: maxamp,ratl complex(kind(0d0)) :: g - real(kind(0d0)) :: amp,ampratio + real(kind(0d0)) :: amp,ampratio ampratio = 0.d0 amp = abs(g) - if( amp.gt.maxamp ) maxamp = amp - if ( (amp.ne.0.d0).and.(maxamp.ne.0.d0) ) then + if( amp>maxamp ) maxamp = amp + if ( (amp/=0.d0).and.(maxamp/=0.d0) ) then ampratio = amp / maxamp endif - if( (ampratio.lt.ratl).and.(l.gt.lsuf) ) then + if( (ampratiolsuf) ) then ismall = ismall + 1 else ismall = 0 endif - + end subroutine calamp @@ -773,7 +773,7 @@ subroutine calu(c0,lsq,bvec,u) implicit none real(kind(0d0)) :: lsq complex(kind(0d0)) :: c0, bvec(3), u(1:3) - + u(1) = dcmplx( 0.d0 ) u(2) = u(2) + c0 * bvec(2) / dcmplx(lsq) u(3) = u(3) + c0 * bvec(3) / dcmplx(lsq) @@ -788,23 +788,23 @@ subroutine interpolate( ncomp,nderiv,rsta,rrsta,g,u ) implicit none integer :: ncomp,nderiv real(kind(0d0)) :: rsta,rrsta(3) - complex(kind(0d0)) :: g(3*ncomp),u(ncomp) - real(kind(0d0)):: dh(3) + complex(kind(0d0)) :: g(3*ncomp),u(ncomp) + real(kind(0d0)):: dh(3) integer :: ip(3),ier,i,itmp,icomp complex(kind(0d0)) :: a(3,3),b(3),wk(3) - real(kind(0d0)) :: eps + real(kind(0d0)) :: eps data eps / -1.d0 / do icomp=1,ncomp u(icomp) = dcmplx(0.d0) enddo - + do i=1,3 dh(i) = rrsta(i) - rsta enddo - - if( (dh(2).eq.0.d0).and.(nderiv.eq.0)) then + + if( (dh(2)==0.d0).and.(nderiv==0)) then itmp = ncomp + 1 do icomp=1,ncomp u(icomp) = g(itmp) @@ -812,18 +812,18 @@ subroutine interpolate( ncomp,nderiv,rsta,rrsta,g,u ) enddo return endif - + do i=1,3 a(1,i) = dcmplx( 1.d0 ) a(2,i) = dcmplx( dh(i) ) a(3,i) = dcmplx( dh(i) * dh(i) / 2.d0 ) enddo - + call fillinpb(nderiv,b) call glu(a,3,3,b,eps,wk,ip,ier) - - + + do icomp=1,ncomp do i=1,3 u(icomp) = u(icomp) + b(i) * g( ncomp * (i-1) + icomp ) @@ -843,23 +843,23 @@ subroutine fillinpb( nderiv,b ) integer :: nderiv complex(kind(0d0)) :: b(3) - - if( (nderiv.ne.0).and.(nderiv.ne.1).and.(nderiv.ne.2) ) & + + if( (nderiv/=0).and.(nderiv/=1).and.(nderiv/=2) ) & & pause 'invalid argument (fillinpb)' - if(nderiv.eq.0) then + if(nderiv==0) then b(1) = dcmplx( 1.d0 ) b(2) = dcmplx( 0.d0 ) b(3) = dcmplx( 0.d0 ) - elseif(nderiv.eq.1) then + else if(nderiv==1) then b(1) = dcmplx( 0.d0 ) b(2) = dcmplx( 1.d0 ) b(3) = dcmplx( 0.d0 ) - elseif(nderiv.eq.2) then + else if(nderiv==2) then b(1) = dcmplx( 0.d0 ) b(2) = dcmplx( 0.d0 ) b(3) = dcmplx( 1.d0 ) endif - + return end subroutine fillinpb @@ -878,11 +878,11 @@ subroutine calcutd(nzone,nnl,tmpr,rat,nn,ra,kc) real(kind(0d0)):: cU(nn),rc real(kind(0d0)) :: maxamp,amp(nn) integer :: iz,jz,jj,i,ml(nzone),tzone - + do jj=1,nn cU(jj) = 0.d0 enddo - + iz = 2 jz = 1 do jj=1,nn @@ -892,34 +892,34 @@ subroutine calcutd(nzone,nnl,tmpr,rat,nn,ra,kc) maxamp = -1.d0 do i=1,nn amp(i) = cU(i) - if(maxamp.lt.amp(i)) maxamp = amp(i) + if(maxampmaxamp) then nc = i exit endif enddo - + i = 1 do jj=1,nzone i = i + nnl(jj) ml(jj) = i enddo - + do jj=nzone,1,-1 - if(ml(jj).gt.nc) tzone = jj + if(ml(jj)>nc) tzone = jj enddo rc = ra(nc) kc = nc - + return end subroutine calcutd @@ -987,25 +987,25 @@ subroutine calstg4onedepth( maxnlay,maxnzone,nzone,vrmin,vrmax,iphase,rrho,vpv,v real(kind(0d0)):: ecA,ecC,ecF real(kind(0d0)):: trho,tvpv,tvph,tvsv,tvsh,teta,coef integer:: izone,j,itmp,jtmp,spn - + ! computing the structure grid points itmp = 0 jtmp = 0 spn = 0 do izone=1,nzone - if((vrmin(izone).le.r).and.(vrmax(izone).gt.r)) then + if((vrmin(izone)<=r).and.(vrmax(izone)>r)) then spn = izone endif enddo - if (vrmax(nzone).eq.r) spn = nzone - if((vrmin(spn).eq.r).and.(updown.eq.-1)) then + if (vrmax(nzone)==r) spn = nzone + if((vrmin(spn)==r).and.(updown==-1)) then spn = spn - 1 endif - - + + trho = 0.d0 tvpv = 0.d0 tvph = 0.d0 @@ -1013,7 +1013,7 @@ subroutine calstg4onedepth( maxnlay,maxnzone,nzone,vrmin,vrmax,iphase,rrho,vpv,v tvsh = 0.d0 teta = 0.d0 do j=1,4 - if ( j.eq.1 ) then + if ( j==1 ) then coef = 1.d0 else coef = coef * ( r / rmax ) @@ -1030,7 +1030,7 @@ subroutine calstg4onedepth( maxnlay,maxnzone,nzone,vrmin,vrmax,iphase,rrho,vpv,v ecA = trho * tvph * tvph ecC = trho * tvpv * tvpv ecF = teta * ( ecA - 2.d0 * ecL ) - + return end subroutine calstg4onedepth @@ -1042,21 +1042,21 @@ subroutine translat(geodetic,geocentric) implicit none real(kind(0d0)),parameter :: flattening = 1.d0 / 298.25d0 - real(kind(0d0)), parameter :: pi = 3.1415926535897932d0 - real(kind(0d0)) :: geocentric, geodetic + real(kind(0d0)), parameter :: pi = 3.1415926535897932d0 + real(kind(0d0)) :: geocentric, geodetic ! real(kind(0d0)) :: tmp integer :: flag flag = 0 - if(geodetic .gt. 90.d0) then + if(geodetic > 90.d0) then geodetic = 1.8d2 - geodetic flag = 1 endif - + geodetic = geodetic / 1.8d2 * pi geocentric = datan((1.d0-flattening)*(1.d0-flattening)* dtan(geodetic) ) geocentric = geocentric * 1.8d2 / pi - - if(flag .eq. 1) then + + if(flag == 1) then geocentric = 1.8d2 - geocentric endif @@ -1065,10 +1065,10 @@ end subroutine translat subroutine calthetaphi(ievla,ievlo,istla,istlo,theta,phi) - + implicit none - real(kind(0d0)), parameter:: pi = 3.1415926535897932d0 - + real(kind(0d0)), parameter:: pi = 3.1415926535897932d0 + real(kind(0d0)) :: ievla,ievlo,istla,istlo real(kind(0d0)) :: evla,evlo,stla,stlo real(kind(0d0)) :: theta,phi @@ -1076,25 +1076,25 @@ subroutine calthetaphi(ievla,ievlo,istla,istlo,theta,phi) real(kind(0d0)) :: tc,ts ! transformation to spherical coordinates - + evla = 90.d0 - ievla stla = 90.d0 - istla - + evla = evla / 1.8d2 * pi evlo = ievlo / 1.8d2 * pi stla = stla / 1.8d2 * pi stlo = istlo / 1.8d2 * pi - + gcarc = dacos( dcos(evla) * dcos(stla) + dsin(evla) * dsin(stla) * dcos(evlo - stlo) ) - + tc = (dcos(stla)*dsin(evla)-dsin(stla)*dcos(evla)*dcos(stlo-evlo))/dsin(gcarc) ts = dsin(stla) * dsin(stlo - evlo) / dsin(gcarc) az = dacos(tc) - if( ts .lt. 0.d0 ) az = -1.d0 * az - + if( ts < 0.d0 ) az = -1.d0 * az + az = az * 1.8d2 / pi - + gcarc = gcarc * 1.8d2 / pi theta = gcarc @@ -1133,13 +1133,13 @@ subroutine WriteFrqByproc(proc,imin,imax) write(20,"(i2)") 2 -if ( abs(imax-imin)-proc*dis > 0 ) then +if ( abs(imax-imin)-proc*dis > 0 ) then write(*,*) 'wrong task distribution.please check the code WriteFrqByproc!' stop else redun = abs(imax-imin)-proc*(dis-1) summ = 0 - f1 = 0 + f1 = 0 f2 = dis do k=0,redun-1,1 summ = f2 @@ -1147,7 +1147,7 @@ subroutine WriteFrqByproc(proc,imin,imax) write(*,*) 'summ is',summ f1 = f2+1 f2 = f2+dis - end do + enddo if (redun == 0) then f2 = f1+dis-1 @@ -1162,7 +1162,7 @@ subroutine WriteFrqByproc(proc,imin,imax) f1 = f2+1 f2 = f2+dis-1 enddo - + if ( summ /= abs(imax-imin) ) then write(*,*) 'wrong task distribution.please check the code WriteFrqByproc!' stop @@ -1270,7 +1270,7 @@ subroutine epitra(SourceLat,SourceLong,RecLat,RecLong,delta,azi,bazi) azi = 180.d0 - azi end subroutine epitra - + !----------------------------------------------------------------- subroutine DistribSta(n,n_global,myrank,nbproc,irmin,irmax) implicit none @@ -1278,14 +1278,14 @@ subroutine DistribSta(n,n_global,myrank,nbproc,irmin,irmax) n = int(n_global/nbproc) coef = mod(n_global,nbproc) - + if ( myrank < mod(n_global,nbproc) .and. mod(n_global,nbproc) /=0) then n = n + 1 - coef = 0 + coef = 0 endif irmin = (myrank ) * n + 1 + coef - irmax = (myrank + 1 ) * n + coef + irmax = (myrank + 1 ) * n + coef end subroutine DistribSta @@ -1308,35 +1308,35 @@ subroutine write_a_block_of_coefs_to_disk(tabg0,tabg0der,tabg0_small_buffer,ir_, ! tabg0_small_buffer(illog,:,:,:) = tabg0(illog,:,:,:,ir_) !! DK DK unrolled the loops to allow for vectorization of the outer loop on "illog" tabg0_small_buffer(illog,1,1,-2) = tabg0(illog,1,1,-2,ir_) - tabg0_small_buffer(illog,1,2,-2) = tabg0(illog,1,2,-2,ir_) - tabg0_small_buffer(illog,1,3,-2) = tabg0(illog,1,3,-2,ir_) - tabg0_small_buffer(illog,1,4,-2) = tabg0(illog,1,4,-2,ir_) - tabg0_small_buffer(illog,1,5,-2) = tabg0(illog,1,5,-2,ir_) - tabg0_small_buffer(illog,1,6,-2) = tabg0(illog,1,6,-2,ir_) - tabg0_small_buffer(illog,1,1,-1) = tabg0(illog,1,1,-1,ir_) - tabg0_small_buffer(illog,1,2,-1) = tabg0(illog,1,2,-1,ir_) - tabg0_small_buffer(illog,1,3,-1) = tabg0(illog,1,3,-1,ir_) - tabg0_small_buffer(illog,1,4,-1) = tabg0(illog,1,4,-1,ir_) - tabg0_small_buffer(illog,1,5,-1) = tabg0(illog,1,5,-1,ir_) - tabg0_small_buffer(illog,1,6,-1) = tabg0(illog,1,6,-1,ir_) - tabg0_small_buffer(illog,1,1,0) = tabg0(illog,1,1,0,ir_) - tabg0_small_buffer(illog,1,2,0) = tabg0(illog,1,2,0,ir_) - tabg0_small_buffer(illog,1,3,0) = tabg0(illog,1,3,0,ir_) - tabg0_small_buffer(illog,1,4,0) = tabg0(illog,1,4,0,ir_) - tabg0_small_buffer(illog,1,5,0) = tabg0(illog,1,5,0,ir_) - tabg0_small_buffer(illog,1,6,0) = tabg0(illog,1,6,0,ir_) - tabg0_small_buffer(illog,1,1,1) = tabg0(illog,1,1,1,ir_) - tabg0_small_buffer(illog,1,2,1) = tabg0(illog,1,2,1,ir_) - tabg0_small_buffer(illog,1,3,1) = tabg0(illog,1,3,1,ir_) - tabg0_small_buffer(illog,1,4,1) = tabg0(illog,1,4,1,ir_) - tabg0_small_buffer(illog,1,5,1) = tabg0(illog,1,5,1,ir_) - tabg0_small_buffer(illog,1,6,1) = tabg0(illog,1,6,1,ir_) - tabg0_small_buffer(illog,1,1,2) = tabg0(illog,1,1,2,ir_) - tabg0_small_buffer(illog,1,2,2) = tabg0(illog,1,2,2,ir_) - tabg0_small_buffer(illog,1,3,2) = tabg0(illog,1,3,2,ir_) - tabg0_small_buffer(illog,1,4,2) = tabg0(illog,1,4,2,ir_) - tabg0_small_buffer(illog,1,5,2) = tabg0(illog,1,5,2,ir_) - tabg0_small_buffer(illog,1,6,2) = tabg0(illog,1,6,2,ir_) + tabg0_small_buffer(illog,1,2,-2) = tabg0(illog,1,2,-2,ir_) + tabg0_small_buffer(illog,1,3,-2) = tabg0(illog,1,3,-2,ir_) + tabg0_small_buffer(illog,1,4,-2) = tabg0(illog,1,4,-2,ir_) + tabg0_small_buffer(illog,1,5,-2) = tabg0(illog,1,5,-2,ir_) + tabg0_small_buffer(illog,1,6,-2) = tabg0(illog,1,6,-2,ir_) + tabg0_small_buffer(illog,1,1,-1) = tabg0(illog,1,1,-1,ir_) + tabg0_small_buffer(illog,1,2,-1) = tabg0(illog,1,2,-1,ir_) + tabg0_small_buffer(illog,1,3,-1) = tabg0(illog,1,3,-1,ir_) + tabg0_small_buffer(illog,1,4,-1) = tabg0(illog,1,4,-1,ir_) + tabg0_small_buffer(illog,1,5,-1) = tabg0(illog,1,5,-1,ir_) + tabg0_small_buffer(illog,1,6,-1) = tabg0(illog,1,6,-1,ir_) + tabg0_small_buffer(illog,1,1,0) = tabg0(illog,1,1,0,ir_) + tabg0_small_buffer(illog,1,2,0) = tabg0(illog,1,2,0,ir_) + tabg0_small_buffer(illog,1,3,0) = tabg0(illog,1,3,0,ir_) + tabg0_small_buffer(illog,1,4,0) = tabg0(illog,1,4,0,ir_) + tabg0_small_buffer(illog,1,5,0) = tabg0(illog,1,5,0,ir_) + tabg0_small_buffer(illog,1,6,0) = tabg0(illog,1,6,0,ir_) + tabg0_small_buffer(illog,1,1,1) = tabg0(illog,1,1,1,ir_) + tabg0_small_buffer(illog,1,2,1) = tabg0(illog,1,2,1,ir_) + tabg0_small_buffer(illog,1,3,1) = tabg0(illog,1,3,1,ir_) + tabg0_small_buffer(illog,1,4,1) = tabg0(illog,1,4,1,ir_) + tabg0_small_buffer(illog,1,5,1) = tabg0(illog,1,5,1,ir_) + tabg0_small_buffer(illog,1,6,1) = tabg0(illog,1,6,1,ir_) + tabg0_small_buffer(illog,1,1,2) = tabg0(illog,1,1,2,ir_) + tabg0_small_buffer(illog,1,2,2) = tabg0(illog,1,2,2,ir_) + tabg0_small_buffer(illog,1,3,2) = tabg0(illog,1,3,2,ir_) + tabg0_small_buffer(illog,1,4,2) = tabg0(illog,1,4,2,ir_) + tabg0_small_buffer(illog,1,5,2) = tabg0(illog,1,5,2,ir_) + tabg0_small_buffer(illog,1,6,2) = tabg0(illog,1,6,2,ir_) enddo write(34) ir_,llog0 @@ -1351,34 +1351,34 @@ subroutine write_a_block_of_coefs_to_disk(tabg0,tabg0der,tabg0_small_buffer,ir_, !! DK DK unrolled the loops to allow for vectorization of the outer loop on "illog" tabg0_small_buffer(illog,1,1,-2) = tabg0der(illog,1,1,-2,ir_) tabg0_small_buffer(illog,1,2,-2) = tabg0der(illog,1,2,-2,ir_) - tabg0_small_buffer(illog,1,3,-2) = tabg0der(illog,1,3,-2,ir_) - tabg0_small_buffer(illog,1,4,-2) = tabg0der(illog,1,4,-2,ir_) - tabg0_small_buffer(illog,1,5,-2) = tabg0der(illog,1,5,-2,ir_) - tabg0_small_buffer(illog,1,6,-2) = tabg0der(illog,1,6,-2,ir_) - tabg0_small_buffer(illog,1,1,-1) = tabg0der(illog,1,1,-1,ir_) - tabg0_small_buffer(illog,1,2,-1) = tabg0der(illog,1,2,-1,ir_) - tabg0_small_buffer(illog,1,3,-1) = tabg0der(illog,1,3,-1,ir_) - tabg0_small_buffer(illog,1,4,-1) = tabg0der(illog,1,4,-1,ir_) - tabg0_small_buffer(illog,1,5,-1) = tabg0der(illog,1,5,-1,ir_) - tabg0_small_buffer(illog,1,6,-1) = tabg0der(illog,1,6,-1,ir_) - tabg0_small_buffer(illog,1,1,0) = tabg0der(illog,1,1,0,ir_) - tabg0_small_buffer(illog,1,2,0) = tabg0der(illog,1,2,0,ir_) - tabg0_small_buffer(illog,1,3,0) = tabg0der(illog,1,3,0,ir_) + tabg0_small_buffer(illog,1,3,-2) = tabg0der(illog,1,3,-2,ir_) + tabg0_small_buffer(illog,1,4,-2) = tabg0der(illog,1,4,-2,ir_) + tabg0_small_buffer(illog,1,5,-2) = tabg0der(illog,1,5,-2,ir_) + tabg0_small_buffer(illog,1,6,-2) = tabg0der(illog,1,6,-2,ir_) + tabg0_small_buffer(illog,1,1,-1) = tabg0der(illog,1,1,-1,ir_) + tabg0_small_buffer(illog,1,2,-1) = tabg0der(illog,1,2,-1,ir_) + tabg0_small_buffer(illog,1,3,-1) = tabg0der(illog,1,3,-1,ir_) + tabg0_small_buffer(illog,1,4,-1) = tabg0der(illog,1,4,-1,ir_) + tabg0_small_buffer(illog,1,5,-1) = tabg0der(illog,1,5,-1,ir_) + tabg0_small_buffer(illog,1,6,-1) = tabg0der(illog,1,6,-1,ir_) + tabg0_small_buffer(illog,1,1,0) = tabg0der(illog,1,1,0,ir_) + tabg0_small_buffer(illog,1,2,0) = tabg0der(illog,1,2,0,ir_) + tabg0_small_buffer(illog,1,3,0) = tabg0der(illog,1,3,0,ir_) tabg0_small_buffer(illog,1,4,0) = tabg0der(illog,1,4,0,ir_) - tabg0_small_buffer(illog,1,5,0) = tabg0der(illog,1,5,0,ir_) - tabg0_small_buffer(illog,1,6,0) = tabg0der(illog,1,6,0,ir_) - tabg0_small_buffer(illog,1,1,1) = tabg0der(illog,1,1,1,ir_) - tabg0_small_buffer(illog,1,2,1) = tabg0der(illog,1,2,1,ir_) - tabg0_small_buffer(illog,1,3,1) = tabg0der(illog,1,3,1,ir_) - tabg0_small_buffer(illog,1,4,1) = tabg0der(illog,1,4,1,ir_) - tabg0_small_buffer(illog,1,5,1) = tabg0der(illog,1,5,1,ir_) - tabg0_small_buffer(illog,1,6,1) = tabg0der(illog,1,6,1,ir_) - tabg0_small_buffer(illog,1,1,2) = tabg0der(illog,1,1,2,ir_) - tabg0_small_buffer(illog,1,2,2) = tabg0der(illog,1,2,2,ir_) - tabg0_small_buffer(illog,1,3,2) = tabg0der(illog,1,3,2,ir_) - tabg0_small_buffer(illog,1,4,2) = tabg0der(illog,1,4,2,ir_) - tabg0_small_buffer(illog,1,5,2) = tabg0der(illog,1,5,2,ir_) - tabg0_small_buffer(illog,1,6,2) = tabg0der(illog,1,6,2,ir_) + tabg0_small_buffer(illog,1,5,0) = tabg0der(illog,1,5,0,ir_) + tabg0_small_buffer(illog,1,6,0) = tabg0der(illog,1,6,0,ir_) + tabg0_small_buffer(illog,1,1,1) = tabg0der(illog,1,1,1,ir_) + tabg0_small_buffer(illog,1,2,1) = tabg0der(illog,1,2,1,ir_) + tabg0_small_buffer(illog,1,3,1) = tabg0der(illog,1,3,1,ir_) + tabg0_small_buffer(illog,1,4,1) = tabg0der(illog,1,4,1,ir_) + tabg0_small_buffer(illog,1,5,1) = tabg0der(illog,1,5,1,ir_) + tabg0_small_buffer(illog,1,6,1) = tabg0der(illog,1,6,1,ir_) + tabg0_small_buffer(illog,1,1,2) = tabg0der(illog,1,1,2,ir_) + tabg0_small_buffer(illog,1,2,2) = tabg0der(illog,1,2,2,ir_) + tabg0_small_buffer(illog,1,3,2) = tabg0der(illog,1,3,2,ir_) + tabg0_small_buffer(illog,1,4,2) = tabg0der(illog,1,4,2,ir_) + tabg0_small_buffer(illog,1,5,2) = tabg0der(illog,1,5,2,ir_) + tabg0_small_buffer(illog,1,6,2) = tabg0der(illog,1,6,2,ir_) enddo write(34) tabg0_small_buffer diff --git a/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/Part-2a-read_DSM_coefficients_back_SH/TraPSV_MPI_read_vertical_faces/trial.f90 b/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/Part-2a-read_DSM_coefficients_back_SH/TraPSV_MPI_read_vertical_faces/trial.f90 index 2758e5d86..b67db00d0 100755 --- a/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/Part-2a-read_DSM_coefficients_back_SH/TraPSV_MPI_read_vertical_faces/trial.f90 +++ b/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/Part-2a-read_DSM_coefficients_back_SH/TraPSV_MPI_read_vertical_faces/trial.f90 @@ -1,21 +1,21 @@ subroutine calbvecphi0_stock( l,thetadeg,plmDir,bvec,bvecdt,bvecdp) - + implicit none character(*) :: plmDir character(120) :: coutfile - real(kind(0d0)), parameter :: pi=3.1415926535897932d0 + real(kind(0d0)), parameter :: pi=3.1415926535897932d0 integer :: l,m,i,j real(kind(0d0)) :: theta,thetadeg,x,plm(1:3,0:3),fact,coef complex(kind(0d0)) :: bvec(1:3,-2:2) complex(kind(0d0)) :: bvecdt(1:3,-2:2),bvecdp(1:3,-2:2) real(kind(0d0)) :: plmdt,xl2 - + write(coutfile, '(I8, ".","PLM")') int(thetadeg*100000.d0) do j = 1,8 - if (coutfile(j:j).eq.' ')coutfile(j:j) = '0' + if (coutfile(j:j)==' ')coutfile(j:j) = '0' enddo - + coutfile = plmDir//"/"//coutfile open(1,file=coutfile,status='old',form='unformatted',access='direct', & @@ -32,7 +32,7 @@ subroutine calbvecphi0_stock( l,thetadeg,plmDir,bvec,bvecdt,bvecdp) do m=0,min0(l,2) fact = 1.d0 - if ( m.ne.0 ) then + if ( m/=0 ) then do i=l-m+1,l+m fact = fact * dble(i) enddo @@ -41,28 +41,28 @@ subroutine calbvecphi0_stock( l,thetadeg,plmDir,bvec,bvecdt,bvecdp) plmdt = dble(m) * x / sin( theta ) * plm(1,m) + plm(1,m+1) bvec(1,m) = dcmplx( 0.d0 ) bvec(1,-m) = dcmplx( 0.d0 ) - bvec(2,m) = dcmplx( 0.d0, dble(m) ) / dsin( theta) * coef * plm(1,m) + bvec(2,m) = dcmplx( 0.d0, dble(m) ) / dsin( theta) * coef * plm(1,m) bvec(2,-m) = dcmplx(conjg( bvec(2,m)) ) - bvec(3,m) = - coef * plmdt + bvec(3,m) = - coef * plmdt bvec(3,-m) = dcmplx(conjg( bvec(3,m) )) ! calculate derivatives bvecdt(1,m) = dcmplx( 0.d0 ) bvecdt(1,-m) = dcmplx( 0.d0 ) bvecdt(2,m) = dcmplx( 0.d0, dble(m) ) * ( plmdt / dsin(theta) & - - x / ( 1 - x * x ) * plm(1,m) ) * coef + - x / ( 1 - x * x ) * plm(1,m) ) * coef bvecdt(2,-m) = dcmplx( conjg( bvecdt(2,m) )) bvecdt(3,m) = ( x / dsin(theta) * plmdt - dble(m) * dble(m)/(1-x*x) *plm(1,m) & - & + xl2 * plm(1,m) ) * coef + & + xl2 * plm(1,m) ) * coef bvecdt(3,-m) = dcmplx(conjg( bvecdt(3,m)) ) bvecdp(1,m) = dcmplx( 0.d0 ) bvecdp(1,-m) = dcmplx( 0.d0 ) - bvecdp(2,m) = - dble(m) * dble(m) / dsin(theta) * plm(1,m) * coef + bvecdp(2,m) = - dble(m) * dble(m) / dsin(theta) * plm(1,m) * coef bvecdp(2,-m) = dcmplx(conjg( bvecdp(2,m)) ) - bvecdp(3,m) = - dcmplx( 0.d0, dble(m) ) * plmdt * coef + bvecdp(3,m) = - dcmplx( 0.d0, dble(m) ) * plmdt * coef bvecdp(3,-m) = dcmplx(conjg( bvecdp(3,m)) ) - if ( mod(m,2).eq.1 ) then + if ( mod(m,2)==1 ) then bvec(2,-m) = - bvec(2,-m) bvec(3,-m) = - bvec(3,-m) bvecdt(2,-m) = - bvecdt(2,-m) @@ -78,9 +78,9 @@ end subroutine calbvecphi0_stock subroutine calbvecphi0( l,theta,plm,bvec,bvecdt,bvecdp) - + implicit none - real(kind(0d0)), parameter :: pi=3.1415926535897932d0 + real(kind(0d0)), parameter :: pi=3.1415926535897932d0 integer :: l,m,i real(kind(0d0)) :: theta,x,plm(1:3,0:3),fact,coef complex(kind(0d0)) :: bvec(1:3,-2:2) @@ -91,11 +91,11 @@ subroutine calbvecphi0( l,theta,plm,bvec,bvecdt,bvecdp) xl2 = dble(l) * dble(l+1) do m=0,min0(l,3) call calplm( l,m,x,plm(1:3,m)) - enddo + enddo do m=0,min0(l,2) fact = 1.d0 - if ( m.ne.0 ) then + if ( m/=0 ) then do i=l-m+1,l+m fact = fact * dble(i) enddo @@ -104,28 +104,28 @@ subroutine calbvecphi0( l,theta,plm,bvec,bvecdt,bvecdp) plmdt = dble(m) * x / sin( theta ) * plm(1,m) + plm(1,m+1) bvec(1,m) = dcmplx( 0.d0 ) bvec(1,-m) = dcmplx( 0.d0 ) - bvec(2,m) = dcmplx( 0.d0, dble(m) ) / dsin( theta) * coef * plm(1,m) + bvec(2,m) = dcmplx( 0.d0, dble(m) ) / dsin( theta) * coef * plm(1,m) bvec(2,-m) = dcmplx(conjg( bvec(2,m)) ) - bvec(3,m) = - coef * plmdt + bvec(3,m) = - coef * plmdt bvec(3,-m) = dcmplx(conjg( bvec(3,m) )) ! calculate derivatives bvecdt(1,m) = dcmplx( 0.d0 ) bvecdt(1,-m) = dcmplx( 0.d0 ) bvecdt(2,m) = dcmplx( 0.d0, dble(m) ) * ( plmdt / dsin(theta) & - - x / ( 1 - x * x ) * plm(1,m) ) * coef + - x / ( 1 - x * x ) * plm(1,m) ) * coef bvecdt(2,-m) = dcmplx( conjg( bvecdt(2,m) )) bvecdt(3,m) = ( x / dsin(theta) * plmdt - dble(m) * dble(m)/(1-x*x) *plm(1,m) & - & + xl2 * plm(1,m) ) * coef + & + xl2 * plm(1,m) ) * coef bvecdt(3,-m) = dcmplx(conjg( bvecdt(3,m)) ) bvecdp(1,m) = dcmplx( 0.d0 ) bvecdp(1,-m) = dcmplx( 0.d0 ) - bvecdp(2,m) = - dble(m) * dble(m) / dsin(theta) * plm(1,m) * coef + bvecdp(2,m) = - dble(m) * dble(m) / dsin(theta) * plm(1,m) * coef bvecdp(2,-m) = dcmplx(conjg( bvecdp(2,m)) ) - bvecdp(3,m) = - dcmplx( 0.d0, dble(m) ) * plmdt * coef + bvecdp(3,m) = - dcmplx( 0.d0, dble(m) ) * plmdt * coef bvecdp(3,-m) = dcmplx(conjg( bvecdp(3,m)) ) - if ( mod(m,2).eq.1 ) then + if ( mod(m,2)==1 ) then bvec(2,-m) = - bvec(2,-m) bvec(3,-m) = - bvec(3,-m) bvecdt(2,-m) = - bvecdt(2,-m) @@ -147,10 +147,10 @@ subroutine calplm( l,m,x,plm ) integer :: l,m,i real(kind(0d0)) :: x,plm(1:3),pmm,somx2,fact - if ((m.lt.0).or.(m.gt.l).or.(dabs(x).gt.1.d0)) pause 'bad arguments' - if ( l.eq.m ) then + if ((m<0).or.(m>l).or.(dabs(x)>1.d0)) pause 'bad arguments' + if ( l==m ) then pmm = 1.d0 - if ( m.gt.0 ) then + if ( m>0 ) then somx2 = dsqrt( (1.d0-x)*(1.d0+x) ) fact = 1.d0 do i=1,m @@ -164,7 +164,7 @@ subroutine calplm( l,m,x,plm ) else plm(3) = plm(2) plm(2) = plm(1) - if ( l.eq.m+1 ) then + if ( l==m+1 ) then plm(1) = x * dble(2*m+1) * plm(2) else !print *, l,m,x @@ -178,10 +178,10 @@ end subroutine calplm subroutine calbveczero( l,bvec ) - + implicit none - real(kind(0d0)), parameter :: pi=3.1415926535897932d0 - + real(kind(0d0)), parameter :: pi=3.1415926535897932d0 + integer :: l,m,i real(kind(0d0)) :: fact,coef complex(kind(0d0)) :: bvec(1:3,-2:2) @@ -192,7 +192,7 @@ subroutine calbveczero( l,bvec ) do m=0,min0(l,1) fact = 1.d0 - if ( m.ne.0 ) then + if ( m/=0 ) then do i=l-m+1,l+m fact = fact * dble(i) enddo @@ -205,7 +205,7 @@ subroutine calbveczero( l,bvec ) bvec(3,m) = -dcmplx(dble(m),0.d0) * xl2 * coef / 2.d0 bvec(3,-m) = dcmplx(conjg( bvec(3,m) )) - if ( mod(m,2).eq.1 ) then + if ( mod(m,2)==1 ) then bvec(2,-m) = - bvec(2,-m) bvec(3,-m) = - bvec(3,-m) endif @@ -238,7 +238,7 @@ subroutine calbvec( l,theta,phi,plm,bvec,bvecdt,bvecdp ) do m=0,min0(l,2) fact = 1.d0 - if ( m.ne.0 ) then + if ( m/=0 ) then do i=l-m+1,l+m fact = fact * dble(i) enddo @@ -267,7 +267,7 @@ subroutine calbvec( l,theta,phi,plm,bvec,bvecdt,bvecdp ) bvecdp(3,m) = - dcmplx( 0.d0, dble(m) ) * plmdt * coef * expimp bvecdp(3,-m) = dconjg( bvecdp(3,m) ) - if ( mod(m,2).eq.1 ) then + if ( mod(m,2)==1 ) then bvec(2,-m) = - bvec(2,-m) bvec(3,-m) = - bvec(3,-m) bvecdt(2,-m) = - bvecdt(2,-m) @@ -286,14 +286,14 @@ subroutine calbvec_vector( l,theta,phi,plm,bvec,bvecdt,bvecdp,theta_n) !c at each station whose latitude and longitude are theta and phi. !cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc implicit none - real(kind(0d0)),parameter :: pi=3.1415926535897932d0 - + real(kind(0d0)),parameter :: pi=3.1415926535897932d0 + integer :: l,m,i,theta_n,itheta real(kind(0d0)):: theta(1:theta_n),phi(1:theta_n),x,plm(1:theta_n,1:3,0:3),fact,coef(0:2),inv_sintheta complex(kind(0d0)) :: bvec(1:theta_n,1:3,-2:2),expimp complex(kind(0d0)) :: bvecdt(1:theta_n,1:3,-2:2),bvecdp(theta_n,1:3,-2:2) real(kind(0d0)) :: plmdt,xl2 - + !write(*,*) 'l=',l,'theta_n is',theta_n xl2 = dble(l) * dble(l+1) @@ -301,7 +301,7 @@ subroutine calbvec_vector( l,theta,phi,plm,bvec,bvecdt,bvecdp,theta_n) if (l < 5 ) then do itheta = 1,theta_n x = dcos( theta(itheta) ) - + do m=0,min0(l,3) call calplm( l,m,x,plm(itheta,1:3,m) ) enddo @@ -340,16 +340,16 @@ subroutine calbvec_vector( l,theta,phi,plm,bvec,bvecdt,bvecdp,theta_n) plm(itheta,3,3) = plm(itheta,2,3) plm(itheta,2,3) = plm(itheta,1,3) plm(itheta,1,3) = (x*dble(2*l-1) * plm(itheta,2,3)-dble(l+2) * plm(itheta,3,3) )/dble(l-3) - + enddo - endif + endif ! plm computation is over. do m=0,min0(l,2) fact = 1.d0 - if ( m.ne.0 ) then + if ( m/=0 ) then do i=l-m+1,l+m fact = fact * dble(i) enddo @@ -357,12 +357,12 @@ subroutine calbvec_vector( l,theta,phi,plm,bvec,bvecdt,bvecdp,theta_n) coef(m) = dsqrt( dble(2*l+1)/(4.d0*pi) / fact ) enddo ! unify cofficients computation. - + do itheta = 1,theta_n x = dcos( theta(itheta) ) ! please noticing don't miss this x expression. inv_sintheta = 1.d0 / dsin(theta(itheta)) !pre-computing the inverse of sin(theta) -! this is for m==0, for any l value we need to calculate thses. +! this is for m==0, for any l value we need to calculate thses. expimp = cdexp( dcmplx( 0.d0,0.d0 )) plmdt = plm(itheta,1,1) bvec(itheta,1,0) = dcmplx( 0.d0 ,0.d0) @@ -377,7 +377,7 @@ subroutine calbvec_vector( l,theta,phi,plm,bvec,bvecdt,bvecdp,theta_n) bvecdp(itheta,3,0) = dcmplx( 0.d0, 0.d0) ! this is for m==1, for any l>=1 if(l >= 1) then - + expimp = cdexp( dcmplx( 0.d0, phi(itheta) ) ) plmdt = x *inv_sintheta * plm(itheta,1,1) + plm(itheta,1,2) bvec(itheta,1,1) = dcmplx( 0.d0 ) @@ -399,7 +399,7 @@ subroutine calbvec_vector( l,theta,phi,plm,bvec,bvecdt,bvecdp,theta_n) bvecdp(itheta,2,-1) = - dconjg( bvecdp(itheta,2,1) ) bvecdp(itheta,3,1) = - dcmplx( 0.d0, 1.d0 ) * plmdt * coef(1) * expimp bvecdp(itheta,3,-1) = - dconjg( bvecdp(itheta,3,1) ) - + endif ! this is for m==2, for any l>=2 @@ -429,7 +429,7 @@ subroutine calbvec_vector( l,theta,phi,plm,bvec,bvecdt,bvecdp,theta_n) endif -! if ( mod(m,2).eq.1 ) then +! if ( mod(m,2)==1 ) then ! bvec(2,-m) = - bvec(2,-m) ! bvec(3,-m) = - bvec(3,-m) ! bvecdt(2,-m) = - bvecdt(2,-m) @@ -451,30 +451,30 @@ subroutine calbvec_vector_test( l,theta,phi,plm,bvec,bvecdt,bvecdp,theta_n) !c at each station whose latitude and longitude are theta and phi. !cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc implicit none - real(kind(0d0)),parameter :: pi=3.1415926535897932d0 - + real(kind(0d0)),parameter :: pi=3.1415926535897932d0 + integer :: l,m,i,theta_n,itheta real(kind(0d0)):: theta(theta_n),phi(theta_n),x,plm(theta_n,1:3,0:3),fact,coef(0:2),inv_sintheta complex(kind(0d0)) :: bvec(theta_n,1:3,-2:2),expimp complex(kind(0d0)) :: bvecdt(theta_n,1:3,-2:2),bvecdp(theta_n,1:3,-2:2) real(kind(0d0)) :: plmdt,xl2 - + !write(*,*) 'l=',l,'theta_n is',theta_n xl2 = dble(l) * dble(l+1) do itheta = 1,theta_n x = dcos( theta(itheta) ) - + if (l < 5 ) then - write(*,*) 'if l<5',l + write(*,*) 'if l<5',l do m=0,min0(l,3) write(*,*) 'when l<5,the m =',m call calplm( l,m,x,plm(itheta,1,m) ) if(itheta==6) write(*,*) 'itheta th plm components are',m,plm(itheta,:,m) - + enddo - + if (itheta ==6) then ! write(*,*) itheta,'th station',itheta,theta(itheta),x,l,m ! write(*,*) 'itheta th plm components are:1',plm(itheta,1,:) @@ -482,7 +482,7 @@ subroutine calbvec_vector_test( l,theta,phi,plm,bvec,bvecdt,bvecdp,theta_n) ! write(*,*) 'itheta th plm components are:3',plm(itheta,3,:) write(*,*) '\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' endif - + else write(*,*) 'if l>=5',l @@ -517,10 +517,10 @@ subroutine calbvec_vector_test( l,theta,phi,plm,bvec,bvecdt,bvecdp,theta_n) plm(itheta,3,3) = plm(itheta,2,3) plm(itheta,2,3) = plm(itheta,1,3) plm(itheta,1,3) = (x*dble(2*l-1) * plm(itheta,2,3)-dble(l+2) * plm(itheta,3,3) )/dble(l-3) - - endif - enddo - + + endif + enddo + itheta = 6 write(*,*) 'itheta th plm components are:0',plm(itheta,:,0) write(*,*) 'itheta th plm components are:1',plm(itheta,:,1) @@ -530,7 +530,7 @@ subroutine calbvec_vector_test( l,theta,phi,plm,bvec,bvecdt,bvecdp,theta_n) do m=0,min0(l,2) fact = 1.d0 - if ( m.ne.0 ) then + if ( m/=0 ) then do i=l-m+1,l+m fact = fact * dble(i) enddo @@ -540,5 +540,5 @@ subroutine calbvec_vector_test( l,theta,phi,plm,bvec,bvecdt,bvecdp,theta_n) ! unify cofficients computation. write(*,*) 'coef are:',coef - + end subroutine calbvec_vector_test diff --git a/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/Part-2b-read_DSM_coefficients_back_PSV/TraPSV_MPI_read_Zmin/TraPSV-0.1.3.f90 b/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/Part-2b-read_DSM_coefficients_back_PSV/TraPSV_MPI_read_Zmin/TraPSV-0.1.3.f90 index 17f2faa19..4bda6416e 100755 --- a/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/Part-2b-read_DSM_coefficients_back_PSV/TraPSV_MPI_read_Zmin/TraPSV-0.1.3.f90 +++ b/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/Part-2b-read_DSM_coefficients_back_PSV/TraPSV_MPI_read_Zmin/TraPSV-0.1.3.f90 @@ -31,7 +31,7 @@ program TraPSV character(40) :: datex,timex real(kind(0d0)), parameter :: pi=3.1415926535897932d0 real(kind(0d0)), parameter :: re=1.d-2, ratc=1.d-10, ratl=1.d-4 - !integer, parameter :: maxlmax = 35000, maxlmax_g=1000 !! VM VM I moved this in constants.h + !integer, parameter :: maxlmax = 35000, maxlmax_g=1000 !! VM VM I moved this in constants.h real(kind(0d0)) :: tlen real(kind(0d0)) :: r0min, r0max, r0delta !!! JUST FOR ONE DEPTH FOR THE MOMENT !! @@ -129,7 +129,7 @@ program TraPSV time_to_project=0. time_to_plm=0. time_total=0. - end if + endif allocate(key(0:nbbigproc-1)) allocate(color(0:nbbigproc-1)) @@ -422,8 +422,8 @@ program TraPSV ' Starting date and time: ', & datex(1:4),'-',datex(5:6),'-',datex(7:8),'. ', & timex(1:2),':',timex(3:4),':',timex(5:8) - - + + write(list1, '(I6.6,".",I6.6)') ifrequ_min, ifrequ_max list1 = trim(outputDir)//"/log/list"//"."//trim(modelname)//"."//trim(list1) open(24, file = list1, status = 'unknown', form = 'formatted') @@ -445,9 +445,9 @@ program TraPSV ! write(36,*) 'theta ', theta(:) !write(36,*) 'stla ', stla(:) !write(36,*) 'stlo ', stlo(:) - end do + enddo close(36) - end if + endif llog = 0 ! boucle sur les freqs do ifq=ifrequ_min+1, ifrequ_max+1 @@ -505,16 +505,16 @@ program TraPSV if (SLOW_DEBUG_MODE) then write(24,*) write(24,*) 'reading l = ',l - end if + endif if (USE_TIMER) call cpu_time(start_time_to_read) do - + read(34) ir_,llog - + if (ir_ == -1) then ! this flag indicates the end of all the data to read exit - elseif (ir_ == r_n) then + else if (ir_ == r_n) then ! in the case of the Zmin face, we read but ignore all the data from the input file except the last one; ! in the other code (for vertical faces) we use all the data read, but in this code we use the last one only from the same file read(34) tabg0(1:llog,:,:,:) @@ -527,12 +527,12 @@ program TraPSV lmax_r(ir_) = llog + lref ! lmax courant pour ir_ lmax_lu=max(lmax_lu,lmax_r(r_n)) endif - enddo - + enddo + if (USE_TIMER) then call cpu_time(finish_time_to_read) time_to_read = time_to_read + finish_time_to_read - start_time_to_read - end if + endif endif index_l=0 @@ -544,7 +544,7 @@ program TraPSV call MPI_Bcast(time_to_read,1,MPI_REAL,0,SubCommunicators,ierr) endif if (l>=lmax_r(r_n)) exit ! si jamais on atteind le lmax du dernier ir_ - if (ir_==-1 .and. llog == -1) exit !! VM VM: I add this test because of bugs + if (ir_==-1 .and. llog == -1) exit !! VM VM: I add this test because of bugs !! VM VM: when mod(maxval(lmax_r),maxlmax_g)==0 index_l=index_l+1 @@ -552,7 +552,7 @@ program TraPSV lsq = dsqrt( l2 ) if (USE_TIMER) call cpu_time(start_time_to_plm) -! 33333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333 +! 33333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333 !! DK DK when l is greater than 5 we can get rid of all the "if" tests in this subroutine to make it much faster if(l <= 5) then call caldvec_for_l_less_than_5_no_store_l(l,theta,phi,plm,dvec,dvecdt,dvecdp,theta_n) @@ -560,13 +560,13 @@ program TraPSV call caldvec_for_l_more_than_5_no_store_l(l,theta,phi,plm,dvec,dvecdt,dvecdp,theta_n) endif -! 33333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333 +! 33333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333 if (USE_TIMER) then call cpu_time(finish_time_to_plm) time_to_plm = time_to_plm + finish_time_to_plm - start_time_to_plm call cpu_time(start_time_to_project) - end if + endif do m=-2,2 ! m-loop start @@ -578,7 +578,7 @@ program TraPSV if ( l==0 ) then ! l-branch for calu (l=0) -! 33333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333 +! 33333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333 ! rearranging the matrix elements do ir_ = r_n,r_n @@ -635,11 +635,11 @@ program TraPSV enddo ! of loop on imt (mt-loop) endif ! of if (l <= lmax_r(ir_)) then ... i.e. on the stack point enddo ! of loop on ir_ -! 33333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333 +! 33333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333 else ! for l /= 0 -! 33333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333 +! 33333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333 !! DK DK added this to precompute the inverse inv_lsq = 1.d0 / dcmplx(lsq) @@ -975,7 +975,7 @@ program TraPSV ! enddo ! of loop on imt (mt-loop) endif ! of if (l <= lmax_r(ir_)) then ... i.e. on the stack point enddo ! of loop on ir_ -! 33333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333 +! 33333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333 endif ! l-branch for calu endif @@ -1104,7 +1104,7 @@ program TraPSV !write(36,*) 'i ', i ! write(36,*) '1 :',displacement(1,:,:) !write(36,*) 'nsta :',displacement(nsta,:,:) - end if + endif !*!******** ECRITURE SUR LE DISQUE if (myrank==0) then @@ -1153,16 +1153,16 @@ program TraPSV time_to_plm = total_global_time call mpi_allreduce( time_to_project, total_global_time,1, MPI_REAL ,MPI_SUM, MPI_COMM_WORLD, ierr) time_to_project = total_global_time - if(myrank.eq.0) then + if(myrank==0) then open(25,file='timer_part3_zmin.txt') write(25,*) 'Total :',time_total write(25,*) 'plm calculation :',time_to_plm,100*time_to_plm/time_total,' %' write(25,*) 'reading :', time_to_read,100* time_to_read/time_total write(25,*) 'projection :', time_to_project,100*time_to_project/time_total close(25) - end if + endif - end if + endif call MPI_Barrier(MPI_COMM_WORLD,ierr) call MPI_COMM_FREE(SubCommunicators,ierr) call MPI_FINALIZE(ierr) diff --git a/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/Part-2b-read_DSM_coefficients_back_PSV/TraPSV_MPI_read_vertical_faces/TraPSV-0.1.3.f90 b/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/Part-2b-read_DSM_coefficients_back_PSV/TraPSV_MPI_read_vertical_faces/TraPSV-0.1.3.f90 index b5d34194b..7eb709222 100755 --- a/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/Part-2b-read_DSM_coefficients_back_PSV/TraPSV_MPI_read_vertical_faces/TraPSV-0.1.3.f90 +++ b/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/Part-2b-read_DSM_coefficients_back_PSV/TraPSV_MPI_read_vertical_faces/TraPSV-0.1.3.f90 @@ -447,13 +447,13 @@ program TraPSV if (SLOW_DEBUG_MODE) then open(24, file = list1, status = 'unknown', form = 'formatted') write(24,*) - + call date_and_time(datex,timex) write(25,'(/a,a4,a,a2,a,a2,a,a2,a,a2,a,a4)') ' PLM calculation done: ', & datex(1:4),'-',datex(5:6),'-',datex(7:8),'. ',timex(1:2),':',timex(3:4),':',timex(5:8) - end if - + endif + endif !*************************************************************************************************** @@ -502,7 +502,7 @@ program TraPSV displacementsngl=cmplx(0.e0) stresssngl_global=cmplx(0.e0) displacementsngl_global=cmplx(0.e0) - lmax_r(:)=maxlmax !! VM VM je dois initialiser au max a priori + lmax_r(:)=maxlmax !! VM VM je dois initialiser au max a priori omega = 2.d0 * pi * dble(i) / tlen if ( i/=0 ) then @@ -514,7 +514,7 @@ program TraPSV !*************************************************************************************************** do l = 0,maxlmax ! on parcourt tous les l a priori !*************************************************************************************************** - if (myrank.eq.0.and.SLOW_DEBUG_MODE) write(*,*) 'l= ',l + if (myrank==0.and.SLOW_DEBUG_MODE) write(*,*) 'l= ',l call MPI_Barrier(SubCommunicators,ierr) ! je veux que tous les procs aillent a la meme vitesse ! lecture des tableaux @@ -526,28 +526,28 @@ program TraPSV if (SLOW_DEBUG_MODE) then write(24,*) write(24,*) myrank,' reading l = ',l - end if - + endif + do if (SLOW_DEBUG_MODE) then write(24,*) 'I want to read for l=',l write(24,*) 'max(lmax_r)=',maxval(lmax_r) - end if + endif read(34) ir_,llog if (SLOW_DEBUG_MODE) then write(24,*) 'I already read for l=',l,' and ir_= ',ir_,llog - end if + endif if (SLOW_DEBUG_MODE) then - write(24,*) + write(24,*) write(24,*) mybigrank,'is reading for ir,llog',ir_,llog - end if + endif if (ir_==-1) then ! this flag indicates the end of all the data to read for the current block if (SLOW_DEBUG_MODE) then write(24,*) mybigrank,ir_,llog, ' exit ' - end if + endif exit else @@ -557,12 +557,12 @@ program TraPSV lmax_lu=max(lmax_lu,lmax_r(ir_)) if (SLOW_DEBUG_MODE) then write(24,*) mybigrank,'allready read TABS',ir_,llog,lmax_r(ir_),lmax_lu - end if + endif endif - + enddo - if (SLOW_DEBUG_MODE) write(24,*) 'end reading block' + if (SLOW_DEBUG_MODE) write(24,*) 'end reading block' endif index_l=0 call MPI_Bcast(lmax_r,r_n,MPI_INTEGER,0,SubCommunicators,ierr) @@ -571,17 +571,17 @@ program TraPSV call MPI_Bcast(ir_,1,MPI_INTEGER,0,SubCommunicators,ierr) call MPI_Bcast(llog,1,MPI_INTEGER,0,SubCommunicators,ierr) endif - !! VM VM : bug ici quand mod(maxval(lmax_r),maxlmax_g)==0 : on sort a maxval(lmax_r)+1 + !! VM VM : bug ici quand mod(maxval(lmax_r),maxlmax_g)==0 : on sort a maxval(lmax_r)+1 !! mais on passe dans la boucle de lecture juste au dessus, ca plante car il y a - !! plus rien a lire. + !! plus rien a lire. if (l > maxval(lmax_r)) then !!exit !! VM VM : this mean we reach the big l that wee need if (SLOW_DEBUG_MODE) write(24,*) 'I exit because l too big' exit - end if - if (ir_==-1 .and. llog == -1) then !!exit !! VM VM I add this test because of bugs + endif + if (ir_==-1 .and. llog == -1) then !!exit !! VM VM I add this test because of bugs if (SLOW_DEBUG_MODE) write(24,*) 'I exit because end of file' exit - end if !! VM VM when mod(maxval(lmax_r),maxlmax_g)==0 + endif !! VM VM when mod(maxval(lmax_r),maxlmax_g)==0 index_l = index_l+1 l2 = dble(l)*dble(l+1) lsq = dsqrt( l2 ) @@ -1104,9 +1104,9 @@ program TraPSV write(25,*) 'ir_ lmax' do ir_=1,r_n write(25,*) ir_,lmax_r(ir_) - end do + enddo close(25) - end if + endif endif call MPI_Barrier(MPI_COMM_WORLD,ierr) diff --git a/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/Part-3-modify_DSM_results_for_SPECFEM/ChangeFormat/ChangeFormat.f90 b/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/Part-3-modify_DSM_results_for_SPECFEM/ChangeFormat/ChangeFormat.f90 index 2de9460f3..57c5b281f 100755 --- a/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/Part-3-modify_DSM_results_for_SPECFEM/ChangeFormat/ChangeFormat.f90 +++ b/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/Part-3-modify_DSM_results_for_SPECFEM/ChangeFormat/ChangeFormat.f90 @@ -28,12 +28,12 @@ program ChangeFormat if (SLOW_DEBUG_MODE) then write(debug,'(a6,i5.5)') 'dg_Cgh',myrank open(100,file=debug) - end if + endif if (myrank==0) then call pinputTra(outputDir,psvmodel,modelname,stationsinf,tlen,imin_global,imax_global,r0min,r0max,& r0delta,r0lat,r0lon,itranslat,mt,dt,f0,f1,myrank) -! Here stationsinf is the name of the file for stock the point information on the surface of the chunk which is +! Here stationsinf is the name of the file for stock the point information on the surface of the chunk which is ! required to be computed. tlen is the time length for the computation. ! imin_global and imax_global is used for the grid number computation ! mt is moment tensor. dt is the sampling frequency, f0 and f1 are the lower and upper frequency bound for the filter. @@ -63,10 +63,10 @@ program ChangeFormat call MPI_Bcast(f0,1,MPI_DOUBLE_PRECISION,0,MPI_COMM_WORLD,ierr) call MPI_Bcast(f1,1,MPI_DOUBLE_PRECISION,0,MPI_COMM_WORLD,ierr) - !! + !! norder = 4 irek = 1 - + call DistribDepth(r_n,r_n_global,myrank,nbproc,iprofmin,iprofmax) ! distributing the total r_n_global depth plane into every proccess. @@ -106,7 +106,7 @@ program ChangeFormat !read(10) i1,i2,i3,i4 do ista = 1, nsta - read(10) sig + read(10) sig !call convolve_src_function(dt,sig,sigf,gauss,nt,ng) call bwfilt (sig, sigf, dt, nt, irek, norder, f0, f1) SeiLoc(1:nt ,1,ista,ir)=sigf diff --git a/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/Part-3-modify_DSM_results_for_SPECFEM/ChangeFormat_disp/ChangeFormat.f90 b/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/Part-3-modify_DSM_results_for_SPECFEM/ChangeFormat_disp/ChangeFormat.f90 index 33781306c..5b88b2cc2 100755 --- a/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/Part-3-modify_DSM_results_for_SPECFEM/ChangeFormat_disp/ChangeFormat.f90 +++ b/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/Part-3-modify_DSM_results_for_SPECFEM/ChangeFormat_disp/ChangeFormat.f90 @@ -28,7 +28,7 @@ program ChangeFormat if (SLOW_DEBUG_MODE) then write(debug,'(a6,i5.5)') 'dg_Cgh',myrank open(100,file=debug) - end if + endif if (myrank==0) then call pinputTra(outputDir,psvmodel,modelname,stationsinf,tlen,imin_global,imax_global,r0min,r0max,& @@ -60,10 +60,10 @@ program ChangeFormat call MPI_Bcast(f1,1,MPI_DOUBLE_PRECISION,0,MPI_COMM_WORLD,ierr) call DistribDepth(r_n,r_n_global,myrank,nbproc,iprofmin,iprofmax) - !! + !! norder = 4 irek = 1 - + parentdir = trim(outputDir)//"/out/" coef = 3 * nsta * nbrc @@ -101,7 +101,7 @@ program ChangeFormat order = 1 do ista = 1, nsta - read(10) sig + read(10) sig !call convolve_src_function(dt,sig,sigf,gauss,nt,ng) call bwfilt (sig, sigf, dt, nt, irek, norder, f0, f1) SeiLoc(1:nt ,1,ista,ir)=sigf @@ -125,7 +125,7 @@ program ChangeFormat ! do jj = 1,3 ! write(coutfile, '("green",I5.5,I3.3)') order+myrank*4, mod(jj,3)+7 ! do j = 1,9 -! if (coutfile(j:j).eq.' ')coutfile(j:j) = '0' +! if (coutfile(j:j)==' ')coutfile(j:j) = '0' ! enddo ! coutfile = trim(parentDir)//"/"//trim(coutfile) diff --git a/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/Part-3-modify_DSM_results_for_SPECFEM/ChangeFormat_zmin/ChangeFormat_zmin.f90 b/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/Part-3-modify_DSM_results_for_SPECFEM/ChangeFormat_zmin/ChangeFormat_zmin.f90 index 726af2f7b..07806fba4 100755 --- a/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/Part-3-modify_DSM_results_for_SPECFEM/ChangeFormat_zmin/ChangeFormat_zmin.f90 +++ b/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/Part-3-modify_DSM_results_for_SPECFEM/ChangeFormat_zmin/ChangeFormat_zmin.f90 @@ -28,7 +28,7 @@ program ChangeFormat if (myrank==0) then call pinputTra(outputDir,psvmodel,modelname,stationsinf,tlen,imin_global,imax_global,r0min,r0max,& r0delta,r0lat,r0lon,itranslat,mt,dt,f0,f1,myrank) - + open(2,file='recdepth') read(2,*) r_n_global close(2) @@ -53,7 +53,7 @@ program ChangeFormat call MPI_Bcast(dt,1,MPI_DOUBLE_PRECISION,0,MPI_COMM_WORLD,ierr) call MPI_Bcast(f0,1,MPI_DOUBLE_PRECISION,0,MPI_COMM_WORLD,ierr) call MPI_Bcast(f1,1,MPI_DOUBLE_PRECISION,0,MPI_COMM_WORLD,ierr) - !! + !! norder = 4 irek = 1 write(*,*) myrank,nsta_global diff --git a/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/Part-3-modify_DSM_results_for_SPECFEM/ChangeFormat_zmin_disp/ChangeFormat_zmin.f90 b/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/Part-3-modify_DSM_results_for_SPECFEM/ChangeFormat_zmin_disp/ChangeFormat_zmin.f90 index 74003a71c..ebfe48391 100755 --- a/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/Part-3-modify_DSM_results_for_SPECFEM/ChangeFormat_zmin_disp/ChangeFormat_zmin.f90 +++ b/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/Part-3-modify_DSM_results_for_SPECFEM/ChangeFormat_zmin_disp/ChangeFormat_zmin.f90 @@ -28,7 +28,7 @@ program ChangeFormat if (myrank==0) then call pinputTra(outputDir,psvmodel,modelname,stationsinf,tlen,imin_global,imax_global,r0min,r0max,& r0delta,r0lat,r0lon,itranslat,mt,dt,f0,f1,myrank) - + open(2,file='recdepth') read(2,*) r_n_global close(2) @@ -53,7 +53,7 @@ program ChangeFormat call MPI_Bcast(dt,1,MPI_DOUBLE_PRECISION,0,MPI_COMM_WORLD,ierr) call MPI_Bcast(f0,1,MPI_DOUBLE_PRECISION,0,MPI_COMM_WORLD,ierr) call MPI_Bcast(f1,1,MPI_DOUBLE_PRECISION,0,MPI_COMM_WORLD,ierr) - !! + !! norder = 4 irek = 1 @@ -142,9 +142,9 @@ program ChangeFormat ! do jj = 1,3 ! write(coutfile, '("green",I5.5,I3.3)') order+myrank*4, mod(jj,3)+7 ! do j = 1,9 -! if (coutfile(j:j).eq.' ')coutfile(j:j) = '0' +! if (coutfile(j:j)==' ')coutfile(j:j) = '0' ! enddo - + ! coutfile = trim(parentDir)//"/"//trim(coutfile) ! open(111,file=coutfile,status='unknown', form='formatted') diff --git a/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/Part-3-modify_DSM_results_for_SPECFEM/FFT_MPI_FACES_VERT_FULL/TraFFT.f90 b/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/Part-3-modify_DSM_results_for_SPECFEM/FFT_MPI_FACES_VERT_FULL/TraFFT.f90 index e47b81ea4..5aa3c50fd 100755 --- a/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/Part-3-modify_DSM_results_for_SPECFEM/FFT_MPI_FACES_VERT_FULL/TraFFT.f90 +++ b/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/Part-3-modify_DSM_results_for_SPECFEM/FFT_MPI_FACES_VERT_FULL/TraFFT.f90 @@ -372,42 +372,42 @@ program TraFFT endif if(iPS/=2) then ! SH calculation ! TO DO changer l'ordre ista,irpof dans tmpsngl(1) write(coutfile, '(I5.5,".Stress_SH_",i5.5)') int(r0(ir0)*10.d0),irank-1 - coutfile = trim(modelname)//"."//coutfile - coutfile = trim(outputDir)//"/Stress/"//coutfile - if (myrank==0) then - - open(1,file=coutfile,form='unformatted',action='read') - read(1) tmpsngl -! write(100,*) -! write(100,*) 'rec ,frq, ',k,i -! write(100,*) 'nb rec,profmin profmax :', r_n,iprofmin,iprofmax -! write(100,'(a)') trim( coutfile) - endif - size_of_array=6*6*r_n_global*nsta ! il faudrait faire un mpi_scatterv - !call MPI_Bcast() - call MPI_Bcast(tmpsngl,size_of_array,MPI_COMPLEX,0,MPI_COMM_WORLD,ierr) - do ista=1,nsta - kkk=0 - do iproff=iprofmin,iprofmax - kkk=kkk+1 - stresssngl(1:6,1:6,ista,kkk,i)=stresssngl(1:6,1:6,ista,kkk,i)+tmpsngl(1:6,1:6,iproff,ista) - enddo - enddo - - if (myrank==0) then - read(1) tmpsngl1 - close(1) - endif - size_of_array=3*6*r_n_global*nsta - call MPI_Bcast(tmpsngl1,size_of_array,MPI_COMPLEX,0,MPI_COMM_WORLD,ierr) - kkk=0 - do iproff=iprofmin,iprofmax !! VM VM : It's seems to be useless to perfrom sumation because of initilisation of displacementsngl?? - kkk=kkk+1 - do ista=1,nsta - displacementsngl(1:3,1:6,ista,kkk,i)=displacementsngl(1:3,1:6,ista,kkk,i)+tmpsngl1(1:3,1:6,iproff,ista) + coutfile = trim(modelname)//"."//coutfile + coutfile = trim(outputDir)//"/Stress/"//coutfile + if (myrank==0) then + + open(1,file=coutfile,form='unformatted',action='read') + read(1) tmpsngl +! write(100,*) +! write(100,*) 'rec ,frq, ',k,i +! write(100,*) 'nb rec,profmin profmax :', r_n,iprofmin,iprofmax +! write(100,'(a)') trim( coutfile) + endif + size_of_array=6*6*r_n_global*nsta ! il faudrait faire un mpi_scatterv + !call MPI_Bcast() + call MPI_Bcast(tmpsngl,size_of_array,MPI_COMPLEX,0,MPI_COMM_WORLD,ierr) + do ista=1,nsta + kkk=0 + do iproff=iprofmin,iprofmax + kkk=kkk+1 + stresssngl(1:6,1:6,ista,kkk,i)=stresssngl(1:6,1:6,ista,kkk,i)+tmpsngl(1:6,1:6,iproff,ista) + enddo + enddo + + if (myrank==0) then + read(1) tmpsngl1 + close(1) + endif + size_of_array=3*6*r_n_global*nsta + call MPI_Bcast(tmpsngl1,size_of_array,MPI_COMPLEX,0,MPI_COMM_WORLD,ierr) + kkk=0 + do iproff=iprofmin,iprofmax !! VM VM : It's seems to be useless to perfrom sumation because of initilisation of displacementsngl?? + kkk=kkk+1 + do ista=1,nsta + displacementsngl(1:3,1:6,ista,kkk,i)=displacementsngl(1:3,1:6,ista,kkk,i)+tmpsngl1(1:3,1:6,iproff,ista) enddo enddo - if (myrank==0) write(100,'(a)') trim(coutfile) + if (myrank==0) write(100,'(a)') trim(coutfile) endif call MPI_Barrier(MPI_COMM_WORLD,ierr) !! test diff --git a/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/Part-3-modify_DSM_results_for_SPECFEM/FFT_MPI_FACES_VERT_SH/TraFFT.f90 b/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/Part-3-modify_DSM_results_for_SPECFEM/FFT_MPI_FACES_VERT_SH/TraFFT.f90 index 23341ec2c..ac7cdcdfd 100755 --- a/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/Part-3-modify_DSM_results_for_SPECFEM/FFT_MPI_FACES_VERT_SH/TraFFT.f90 +++ b/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/Part-3-modify_DSM_results_for_SPECFEM/FFT_MPI_FACES_VERT_SH/TraFFT.f90 @@ -419,13 +419,13 @@ program TraFFT !! just for the output test. ! write(coutfile1, '("green_record",i3.3)') myrank ! do j = 1,15 -! if (coutfile1(j:j).eq. ' ')coutfile1(j:j) = '0' +! if (coutfile1(j:j)== ' ')coutfile1(j:j) = '0' ! enddo ! coutfile1 = trim(parentDir)//"/"//trim(coutfile1) ! open(111,file=coutfile1, form='formatted') -! ! if (myrank ==0) then +! ! if (myrank ==0) then ! ! open(111,file=coutfile1,status='unknown', form='formatted') -! ! write(111,*) +! ! write(111,*) ! ! close(111) ! ! endif ! ! this green_record file is used for reserving the station information @@ -461,12 +461,12 @@ program TraFFT ! do jj = 1,9 ! write(coutfile, '("green",I5.5,I3.3)') ,i,jj -! do j = 1,9 -! if (coutfile(j:j).eq.' ')coutfile(j:j) = '0' -! enddo -! coutfile = trim(parentDir)//"/"//trim(coutfile) -! -! open(1,file=coutfile,status='unknown', form='formatted') +! do j = 1,9 +! if (coutfile(j:j)==' ')coutfile(j:j) = '0' +! enddo +! coutfile = trim(parentDir)//"/"//trim(coutfile) +! +! open(1,file=coutfile,status='unknown', form='formatted') ! do j = iWindowStart,11999 ! write(1,*) dble(j)/samplingHz,ygt(jj,j) diff --git a/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/Part-3-modify_DSM_results_for_SPECFEM/FFT_MPI_FACES_ZMIN_FULL/TraFFT.f90 b/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/Part-3-modify_DSM_results_for_SPECFEM/FFT_MPI_FACES_ZMIN_FULL/TraFFT.f90 index 4735642fa..fda1f222f 100755 --- a/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/Part-3-modify_DSM_results_for_SPECFEM/FFT_MPI_FACES_ZMIN_FULL/TraFFT.f90 +++ b/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/Part-3-modify_DSM_results_for_SPECFEM/FFT_MPI_FACES_ZMIN_FULL/TraFFT.f90 @@ -345,10 +345,10 @@ program TraFFT !open(1,file=coutfile,status='unknown',form='unformatted', & ! access = 'direct', recl=2*6*6*kind(0e0)*nsta_global*r_n_global) !read(1,rec=k) tmpsngl(1:6,1:6,1:nsta_global) - if (myrank.eq.0) then + if (myrank==0) then open(1,file=coutfile,form='unformatted',action='read') read(1) tmpsngl - end if + endif call mpi_bcast(tmpsngl,36*nsta_global,MPI_COMPLEX,0,MPI_COMM_WORLD,ierr) !write(100,*) k,istamin,tmpsngl(1:6,1:6,istamin) stresssngl(1:6,1:6,1:nsta,i)=stresssngl(1:6,1:6,1:nsta,i)+tmpsngl(1:6,1:6,istamin:istamax) @@ -365,8 +365,8 @@ program TraFFT !open(1,file=coutfile,status='unknown',form='unformatted', & ! access = 'direct', recl=2*3*6*kind(0e0)*nsta_global*r_n_global) !read (1,rec=k) tmpsngl1(1:3,1:6,1:nsta_global) - !open(1,file=coutfile,form='unformatted',action='read') - if (myrank.eq.0) read(1) tmpsngl1 + !open(1,file=coutfile,form='unformatted',action='read') + if (myrank==0) read(1) tmpsngl1 call mpi_bcast(tmpsngl1,18*nsta_global,MPI_COMPLEX,0,MPI_COMM_WORLD,ierr) displacementsngl(1:3,1:6,1:nsta,i)=displacementsngl(1:3,1:6,1:nsta,i)+tmpsngl1(1:3,1:6,istamin:istamax) @@ -377,17 +377,17 @@ program TraFFT write(coutfile, '(I5.5,".Stress_SH_",i5.5)') int(r0(ir0)*10.d0),irank-1 coutfile = trim(modelname)//"."//coutfile coutfile = trim(outputDir)//"/Stress/"//coutfile - - if (myrank.eq.0) then + + if (myrank==0) then open(1,file=coutfile,form='unformatted',action='read') read(1) tmpsngl - end if + endif call mpi_bcast(tmpsngl,36*nsta_global,MPI_COMPLEX,0,MPI_COMM_WORLD,ierr) - + stresssngl(1:6,1:6,1:nsta,i)=stresssngl(1:6,1:6,1:nsta,i)+tmpsngl(1:6,1:6,istamin:istamax) - if (myrank.eq.0) read(1) tmpsngl1 + if (myrank==0) read(1) tmpsngl1 call mpi_bcast(tmpsngl1,18*nsta_global,MPI_COMPLEX,0,MPI_COMM_WORLD,ierr) displacementsngl(1:3,1:6,1:nsta,i)=displacementsngl(1:3,1:6,1:nsta,i)+tmpsngl1(1:3,1:6,istamin:istamax) diff --git a/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/Part-3-modify_DSM_results_for_SPECFEM/FFT_MPI_FACES_ZMIN_FULL/others.f90 b/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/Part-3-modify_DSM_results_for_SPECFEM/FFT_MPI_FACES_ZMIN_FULL/others.f90 index 60722ef1c..e3c20e88a 100755 --- a/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/Part-3-modify_DSM_results_for_SPECFEM/FFT_MPI_FACES_ZMIN_FULL/others.f90 +++ b/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/Part-3-modify_DSM_results_for_SPECFEM/FFT_MPI_FACES_ZMIN_FULL/others.f90 @@ -1079,7 +1079,7 @@ subroutine Local2chunk(vec,n,np1,Orign_Lon_Chunk,Origin_Lat_Chunk,azi_chunk,Lat_ integer icomp,itime,imin,imax call RotationMatrix_RT2Local(Rot_RT_NE,Bazi) - Bazi_chunk=270.d0-azi_chunk ! car on fait cette operation dans la subroutine ci dessous ca annule le truc, reflechir + Bazi_chunk=270.d0-azi_chunk ! car on fait cette operation dans la subroutine ci dessous ca annule le truc, reflechir ! a un truc pour mieux faire !! !! VM VM call RotationMatrix_RT2local(Rot_azi_chunk,Bazi_chunk) !! c'est l'azimuth du chunk diff --git a/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/Part-3-modify_DSM_results_for_SPECFEM/FFT_MPI_FACES_ZMIN_PSV/TraFFT.f90 b/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/Part-3-modify_DSM_results_for_SPECFEM/FFT_MPI_FACES_ZMIN_PSV/TraFFT.f90 index fbf950196..0148dfa0f 100755 --- a/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/Part-3-modify_DSM_results_for_SPECFEM/FFT_MPI_FACES_ZMIN_PSV/TraFFT.f90 +++ b/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/Part-3-modify_DSM_results_for_SPECFEM/FFT_MPI_FACES_ZMIN_PSV/TraFFT.f90 @@ -345,10 +345,10 @@ program TraFFT !open(1,file=coutfile,status='unknown',form='unformatted', & ! access = 'direct', recl=2*6*6*kind(0e0)*nsta_global*r_n_global) !read(1,rec=k) tmpsngl(1:6,1:6,1:nsta_global) - if (myrank.eq.0) then + if (myrank==0) then open(1,file=coutfile,form='unformatted',action='read') read(1) tmpsngl - end if + endif call mpi_bcast(tmpsngl,36*nsta_global,MPI_COMPLEX,0,MPI_COMM_WORLD,ierr) !write(100,*) k,istamin,tmpsngl(1:6,1:6,istamin) stresssngl(1:6,1:6,1:nsta,i)=stresssngl(1:6,1:6,1:nsta,i)+tmpsngl(1:6,1:6,istamin:istamax) @@ -365,8 +365,8 @@ program TraFFT !open(1,file=coutfile,status='unknown',form='unformatted', & ! access = 'direct', recl=2*3*6*kind(0e0)*nsta_global*r_n_global) !read (1,rec=k) tmpsngl1(1:3,1:6,1:nsta_global) - !open(1,file=coutfile,form='unformatted',action='read') - if (myrank.eq.0) read(1) tmpsngl1 + !open(1,file=coutfile,form='unformatted',action='read') + if (myrank==0) read(1) tmpsngl1 call mpi_bcast(tmpsngl1,18*nsta_global,MPI_COMPLEX,0,MPI_COMM_WORLD,ierr) displacementsngl(1:3,1:6,1:nsta,i)=displacementsngl(1:3,1:6,1:nsta,i)+tmpsngl1(1:3,1:6,istamin:istamax) diff --git a/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/Part-3-modify_DSM_results_for_SPECFEM/FFT_MPI_FACES_ZMIN_PSV/others.f90 b/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/Part-3-modify_DSM_results_for_SPECFEM/FFT_MPI_FACES_ZMIN_PSV/others.f90 index 60722ef1c..e3c20e88a 100755 --- a/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/Part-3-modify_DSM_results_for_SPECFEM/FFT_MPI_FACES_ZMIN_PSV/others.f90 +++ b/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/Part-3-modify_DSM_results_for_SPECFEM/FFT_MPI_FACES_ZMIN_PSV/others.f90 @@ -1079,7 +1079,7 @@ subroutine Local2chunk(vec,n,np1,Orign_Lon_Chunk,Origin_Lat_Chunk,azi_chunk,Lat_ integer icomp,itime,imin,imax call RotationMatrix_RT2Local(Rot_RT_NE,Bazi) - Bazi_chunk=270.d0-azi_chunk ! car on fait cette operation dans la subroutine ci dessous ca annule le truc, reflechir + Bazi_chunk=270.d0-azi_chunk ! car on fait cette operation dans la subroutine ci dessous ca annule le truc, reflechir ! a un truc pour mieux faire !! !! VM VM call RotationMatrix_RT2local(Rot_azi_chunk,Bazi_chunk) !! c'est l'azimuth du chunk diff --git a/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/Part-3-modify_DSM_results_for_SPECFEM/FFT_MPI_FACES_ZMIN_SH/TraFFT.f90 b/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/Part-3-modify_DSM_results_for_SPECFEM/FFT_MPI_FACES_ZMIN_SH/TraFFT.f90 index d4507e94b..14eb1ddf0 100755 --- a/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/Part-3-modify_DSM_results_for_SPECFEM/FFT_MPI_FACES_ZMIN_SH/TraFFT.f90 +++ b/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/Part-3-modify_DSM_results_for_SPECFEM/FFT_MPI_FACES_ZMIN_SH/TraFFT.f90 @@ -344,10 +344,10 @@ program TraFFT !open(1,file=coutfile,status='unknown',form='unformatted', & ! access = 'direct', recl=2*6*6*kind(0e0)*nsta_global*r_n_global) !read(1,rec=k) tmpsngl(1:6,1:6,1:nsta_global) - if (myrank.eq.0) then + if (myrank==0) then open(1,file=coutfile,form='unformatted',action='read') read(1) tmpsngl - end if + endif call mpi_bcast(tmpsngl,36*nsta_global,MPI_COMPLEX,0,MPI_COMM_WORLD,ierr) !write(100,*) k,istamin,tmpsngl(1:6,1:6,istamin) stresssngl(1:6,1:6,1:nsta,i)=stresssngl(1:6,1:6,1:nsta,i)+tmpsngl(1:6,1:6,istamin:istamax) @@ -364,8 +364,8 @@ program TraFFT !open(1,file=coutfile,status='unknown',form='unformatted', & ! access = 'direct', recl=2*3*6*kind(0e0)*nsta_global*r_n_global) !read (1,rec=k) tmpsngl1(1:3,1:6,1:nsta_global) - !open(1,file=coutfile,form='unformatted',action='read') - if (myrank.eq.0) read(1) tmpsngl1 + !open(1,file=coutfile,form='unformatted',action='read') + if (myrank==0) read(1) tmpsngl1 call mpi_bcast(tmpsngl1,18*nsta_global,MPI_COMPLEX,0,MPI_COMM_WORLD,ierr) displacementsngl(1:3,1:6,1:nsta,i)=displacementsngl(1:3,1:6,1:nsta,i)+tmpsngl1(1:3,1:6,istamin:istamax) @@ -425,17 +425,17 @@ program TraFFT open(20,file=coutfile,form='unformatted') !! just for the output test. -! write(coutfile1, '("green_record",i3.3)') myrank +! write(coutfile1, '("green_record",i3.3)') myrank ! do j = 1,15 -! if (coutfile1(j:j).eq. ' ')coutfile1(j:j) = '0' +! if (coutfile1(j:j)== ' ')coutfile1(j:j) = '0' ! enddo ! coutfile1 = trim(parentDir)//"/"//trim(coutfile1) -! open(111,file=coutfile1, form='formatted') -!! if (myrank ==0) then +! open(111,file=coutfile1, form='formatted') +!! if (myrank ==0) then !! open(111,file=coutfile1,status='unknown', form='formatted') -!! write(111,*) -!! close(111) -!! endif +!! write(111,*) +!! close(111) +!! endif !! this green_record file is used for reserving the station information @@ -468,12 +468,12 @@ program TraFFT ! endif ! do jj = 1,9 -! write(coutfile, '("green",I5.5,I3.3)') ,i+istamin-1,jj -! do j = 1,9 -! if (coutfile(j:j).eq.' ')coutfile(j:j) = '0' -! enddo -! -! coutfile = trim(parentDir)//"/"//trim(coutfile) +! write(coutfile, '("green",I5.5,I3.3)') ,i+istamin-1,jj +! do j = 1,9 +! if (coutfile(j:j)==' ')coutfile(j:j) = '0' +! enddo +! +! coutfile = trim(parentDir)//"/"//trim(coutfile) ! open(1,file=coutfile,status='unknown', form='formatted') ! do j = iWindowStart,11999 @@ -522,7 +522,7 @@ program TraFFT close(10) close(20) close(100) - + ! call MPI_Barrier(MPI_COMM_WORLD,ierr) ! close(111) diff --git a/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/Part-3-modify_DSM_results_for_SPECFEM/FFT_MPI_FACES_ZMIN_SH/TraFFT_new.f90 b/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/Part-3-modify_DSM_results_for_SPECFEM/FFT_MPI_FACES_ZMIN_SH/TraFFT_new.f90 index 4679d23bb..45b19de95 100755 --- a/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/Part-3-modify_DSM_results_for_SPECFEM/FFT_MPI_FACES_ZMIN_SH/TraFFT_new.f90 +++ b/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/Part-3-modify_DSM_results_for_SPECFEM/FFT_MPI_FACES_ZMIN_SH/TraFFT_new.f90 @@ -344,10 +344,10 @@ program TraFFT !open(1,file=coutfile,status='unknown',form='unformatted', & ! access = 'direct', recl=2*6*6*kind(0e0)*nsta_global*r_n_global) !read(1,rec=k) tmpsngl(1:6,1:6,1:nsta_global) - if (myrank.eq.0) then + if (myrank==0) then open(1,file=coutfile,form='unformatted',action='read') read(1) tmpsngl - end if + endif call mpi_bcast(tmpsngl,36*nsta_global,MPI_COMPLEX,0,MPI_COMM_WORLD,ierr) stresssngl(1:6,1:6,1:nsta,i)=stresssngl(1:6,1:6,1:nsta,i)+tmpsngl(1:6,1:6,istamin:istamax) !write(100,*) ' suite >' @@ -363,8 +363,8 @@ program TraFFT !open(1,file=coutfile,status='unknown',form='unformatted', & ! access = 'direct', recl=2*3*6*kind(0e0)*nsta_global*r_n_global) !read (1,rec=k) tmpsngl1(1:3,1:6,1:nsta_global) - !open(1,file=coutfile,form='unformatted',action='read') - if (myrank.eq.0) read(1) tmpsngl1 + !open(1,file=coutfile,form='unformatted',action='read') + if (myrank==0) read(1) tmpsngl1 call mpi_bcast(tmpsngl1,18*nsta_global,MPI_COMPLEX,0,MPI_COMM_WORLD,ierr) displacementsngl(1:3,1:6,1:nsta,i)=displacementsngl(1:3,1:6,1:nsta,i)+tmpsngl1(1:3,1:6,istamin:istamax) @@ -440,20 +440,20 @@ program TraFFT call tensorFFT_real(9,imin,np1,gt,ygt,omegai,tlen) do jj = 1,9 - write(coutfile, '("green",I5.5,I3.3)') ,i+istamin-1,jj - do j = 1,9 - if (coutfile(j:j).eq.' ')coutfile(j:j) = '0' - enddo - coutfile = trim(parentDir)//"/"//trim(coutfile) - !print *, coutfile -! + write(coutfile, '("green",I5.5,I3.3)') ,i+istamin-1,jj + do j = 1,9 + if (coutfile(j:j)==' ')coutfile(j:j) = '0' + enddo + coutfile = trim(parentDir)//"/"//trim(coutfile) + !print *, coutfile +! open(1,file=coutfile,status='unknown', form='formatted') do j = iWindowStart,iWindowEnd - write(1,*) dble(j)/samplingHz,ygt(jj,j) + write(1,*) dble(j)/samplingHz,ygt(jj,j) enddo close(1) - enddo + enddo Lon_current=stlo(i) diff --git a/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/Part-3-modify_DSM_results_for_SPECFEM/FFT_MPI_FACES_ZMIN_SH/others.f90 b/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/Part-3-modify_DSM_results_for_SPECFEM/FFT_MPI_FACES_ZMIN_SH/others.f90 index 60722ef1c..e3c20e88a 100755 --- a/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/Part-3-modify_DSM_results_for_SPECFEM/FFT_MPI_FACES_ZMIN_SH/others.f90 +++ b/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/Part-3-modify_DSM_results_for_SPECFEM/FFT_MPI_FACES_ZMIN_SH/others.f90 @@ -1079,7 +1079,7 @@ subroutine Local2chunk(vec,n,np1,Orign_Lon_Chunk,Origin_Lat_Chunk,azi_chunk,Lat_ integer icomp,itime,imin,imax call RotationMatrix_RT2Local(Rot_RT_NE,Bazi) - Bazi_chunk=270.d0-azi_chunk ! car on fait cette operation dans la subroutine ci dessous ca annule le truc, reflechir + Bazi_chunk=270.d0-azi_chunk ! car on fait cette operation dans la subroutine ci dessous ca annule le truc, reflechir ! a un truc pour mieux faire !! !! VM VM call RotationMatrix_RT2local(Rot_azi_chunk,Bazi_chunk) !! c'est l'azimuth du chunk diff --git a/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/Part-3-modify_DSM_results_for_SPECFEM/Interf_SPECFEM3D_DSM/read_absorbing_interfaces.f90 b/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/Part-3-modify_DSM_results_for_SPECFEM/Interf_SPECFEM3D_DSM/read_absorbing_interfaces.f90 index db2a3538f..27f756b6a 100755 --- a/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/Part-3-modify_DSM_results_for_SPECFEM/Interf_SPECFEM3D_DSM/read_absorbing_interfaces.f90 +++ b/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/Part-3-modify_DSM_results_for_SPECFEM/Interf_SPECFEM3D_DSM/read_absorbing_interfaces.f90 @@ -8,7 +8,7 @@ program read_absorbing_interfaces integer ispec,iglob,nbproc,myrank,inodes,nbnode,ier,ierr,i,j,k integer iface,num_abs_boundary_faces,igll character(len=27) filename - + ! name of the database file character(len=256) prname,dsmname,trname,LOCAL_PATH,Modele1D,datafile,tablefile,tracfile,TRAC_PATH @@ -87,8 +87,8 @@ program read_absorbing_interfaces read(10,*) vp(ilayer,:) read(10,*) vs(ilayer,:) read(10,*) rho(ilayer,:) - - end do + + enddo read(10,*) zmin read(10,*) lon0,lat0,azi0 close(10) @@ -117,40 +117,40 @@ program read_absorbing_interfaces allocate(flag_boundary_zmin(n2d_zmin)) max_spec = 0 - do while (1.eq.1) + do while (1==1) read(90,*,end=100) ispec,ispec2D,code_face - if (code_face.eq.1) flag_boundary_xmin(ispec2D)=ispec - if (code_face.eq.2) flag_boundary_xmax(ispec2D)=ispec - if (code_face.eq.3) flag_boundary_ymin(ispec2D)=ispec - if (code_face.eq.4) flag_boundary_ymax(ispec2D)=ispec - if (code_face.eq.5) flag_boundary_zmin(ispec2D)=ispec + if (code_face==1) flag_boundary_xmin(ispec2D)=ispec + if (code_face==2) flag_boundary_xmax(ispec2D)=ispec + if (code_face==3) flag_boundary_ymin(ispec2D)=ispec + if (code_face==4) flag_boundary_ymax(ispec2D)=ispec + if (code_face==5) flag_boundary_zmin(ispec2D)=ispec max_spec = max(max_spec,ispec) - end do + enddo 100 close(90) allocate(IndSpec_face(max_spec,5)) IndSpec_face(:,:) = 0 open(90,file=trim(meshdirectory)//'/flags_boundary.txt') ! table de correspondance ispec2D <-> ispec - do while (1.eq.1) + do while (1==1) read(90,*,end=101) ispec,ispec2D,code_face IndSpec_face(ispec,code_face)=ispec2D - end do + enddo 101 close(90) open(90,file=trim(meshdirectory)//'/Numglob2loc_elmn.txt') max_spec_local=0 - do while(1.eq.1) + do while(1==1) read(90,*,end=102) ispec_glob,ispec,iproc max_spec_local=max(max_spec_local,ispec) - end do + enddo 102 close(90) allocate(IndLoc2Glob(max_spec_local,nbproc)) IndLoc2Glob(:,:) = 0 open(90,file=trim(meshdirectory)//'/Numglob2loc_elmn.txt') max_spec_local=0 - do while(1.eq.1) + do while(1==1) read(90,*,end=103) ispec_glob,ispec,iproc IndLoc2Glob(ispec,iproc+1) = ispec_glob - end do + enddo 103 close(90) ! tracctions et vitesse VM @@ -180,12 +180,12 @@ program read_absorbing_interfaces ! premiere ouverutre des fichiers tractions et vitesses et table de correspondance ----------- !-------------- - if (myrank.eq.0) then + if (myrank==0) then open(unit=41,file=dsmname(1:len_trim(dsmname))//'velxmin.bin',form='unformatted',action='read') read(41) nbrcxmin,Nblocxmin,Nbrecxmin,nseisxmin open(unit=31,file=dsmname(1:len_trim(dsmname))//'tractxmin.bin',status='old',form='unformatted',action='read') read(31) nbrcxmin,Nblocxmin,Nbrecxmin,nseisxmin - end if + endif call MPI_Bcast(nbrcxmin,1,MPI_INTEGER,0,MPI_COMM_WORLD,ierr) call MPI_Bcast(Nblocxmin,1,MPI_INTEGER,0,MPI_COMM_WORLD,ierr) call MPI_Bcast(Nbrecxmin,1,MPI_INTEGER,0,MPI_COMM_WORLD,ierr) @@ -199,23 +199,23 @@ program read_absorbing_interfaces if(ier /= 0) stop 'error: not enough memory to allocate array' allocate(Velsgxmin(NtimeStep,3,nseisxmin,Nbrecxmin),stat=ier) if(ier /= 0) stop 'error: not enough memory to allocate array' - if (myrank.eq.0) then + if (myrank==0) then open(27,file=meshdirectory(1:len_trim(meshdirectory))//'IgXmin') call ReadIg(igxmin,NGLLY,NGLLZ,nspec2D_xmin,Nbrecxmin) close(27) - end if + endif call MPI_Bcast(igxmin,3*NGLLY*NGLLZ*nspec2D_xmin,MPI_INTEGER,0,MPI_COMM_WORLD,ierr) - if (myrank.eq.0) then + if (myrank==0) then open(unit=42,file=dsmname(1:len_trim(dsmname))//'velxmax.bin',form='unformatted',action='read') read(42) nbrcxmax,Nblocxmax,Nbrecxmax,nseisxmax open(unit=32,file=dsmname(1:len_trim(dsmname))//'tractxmax.bin',status='old',form='unformatted',action='read') read(32) nbrcxmax,Nblocxmax,Nbrecxmax,nseisxmax - end if + endif call MPI_Bcast(nbrcxmax,1,MPI_INTEGER,0,MPI_COMM_WORLD,ierr) call MPI_Bcast(Nblocxmax,1,MPI_INTEGER,0,MPI_COMM_WORLD,ierr) call MPI_Bcast(Nbrecxmax,1,MPI_INTEGER,0,MPI_COMM_WORLD,ierr) - call MPI_Bcast(nseisxmax,1,MPI_INTEGER,0,MPI_COMM_WORLD,ierr) + call MPI_Bcast(nseisxmax,1,MPI_INTEGER,0,MPI_COMM_WORLD,ierr) !write(42) nbrcxmax,Nblocxmax,Nbrecxmax,nseisxmax !write(*,*) 'Tailles :',nbrcxmax,Nblocxmax,Nbrecxmax,nseisxmax allocate(igxmax(3,NGLLY,NGLLZ,nspec2D_xmax),stat=ier) @@ -224,19 +224,19 @@ program read_absorbing_interfaces if(ier /= 0) stop 'error: not enough memory to allocate array' allocate(Velsgxmax(NtimeStep,3,nseisxmax,Nbrecxmax),stat=ier) if(ier /= 0) stop 'error: not enough memory to allocate array' - if (myrank.eq.0) then + if (myrank==0) then open(27,file=meshdirectory(1:len_trim(meshdirectory))//'IgXmax') call ReadIg(igxmax,NGLLY,NGLLZ,nspec2D_xmax,Nbrecxmax) close(27) - end if + endif call MPI_Bcast(igxmax,3*NGLLY*NGLLZ*nspec2D_xmax,MPI_INTEGER,0,MPI_COMM_WORLD,ierr) - - if (myrank.eq.0) then + + if (myrank==0) then open(unit=43,file=dsmname(1:len_trim(dsmname))//'velymin.bin',form='unformatted') read(43) nbrcymin,Nblocymin,Nbrecymin,nseisymin open(unit=33,file=dsmname(1:len_trim(dsmname))//'tractymin.bin',status='old',form='unformatted') read(33) nbrcymin,Nblocymin,Nbrecymin,nseisymin - end if + endif call MPI_Bcast(nbrcymin,1,MPI_INTEGER,0,MPI_COMM_WORLD,ierr) call MPI_Bcast(Nblocymin,1,MPI_INTEGER,0,MPI_COMM_WORLD,ierr) call MPI_Bcast(Nbrecymin,1,MPI_INTEGER,0,MPI_COMM_WORLD,ierr) @@ -249,19 +249,19 @@ program read_absorbing_interfaces if(ier /= 0) stop 'error: not enough memory to allocate array' allocate(Velsgymin(NtimeStep,3,nseisymin,Nbrecymin),stat=ier) if(ier /= 0) stop 'error: not enough memory to allocate array' - if (myrank.eq.0) then + if (myrank==0) then open(27,file=meshdirectory(1:len_trim(meshdirectory))//'IgYmin') call ReadIg(igymin,NGLLX,NGLLZ,nspec2D_ymin,Nbrecymin) close(27) - end if + endif call MPI_Bcast(igymin,3*NGLLX*NGLLZ*nspec2D_ymin,MPI_INTEGER,0,MPI_COMM_WORLD,ierr) - if (myrank.eq.0) then + if (myrank==0) then open(unit=44,file=dsmname(1:len_trim(dsmname))//'velymax.bin',form='unformatted',action='read') read(44) nbrcymax,Nblocymax,Nbrecymax,nseisymax open(unit=34,file=dsmname(1:len_trim(dsmname))//'tractymax.bin',status='old',form='unformatted',action='read') read(34) nbrcymax,Nblocymax,Nbrecymax,nseisymax - end if + endif call MPI_Bcast(nbrcymax,1,MPI_INTEGER,0,MPI_COMM_WORLD,ierr) call MPI_Bcast(Nblocymax,1,MPI_INTEGER,0,MPI_COMM_WORLD,ierr) call MPI_Bcast(Nbrecymax,1,MPI_INTEGER,0,MPI_COMM_WORLD,ierr) @@ -274,19 +274,19 @@ program read_absorbing_interfaces if(ier /= 0) stop 'error: not enough memory to allocate array' allocate(Velsgymax(NtimeStep,3,nseisymax,Nbrecymax),stat=ier) if(ier /= 0) stop 'error: not enough memory to allocate array' - if (myrank.eq.0) then + if (myrank==0) then open(27,file=meshdirectory(1:len_trim(meshdirectory))//'IgYmax') call ReadIg(igymax,NGLLX,NGLLZ,nspec2D_ymax,Nbrecymax) close(27) - end if + endif call MPI_Bcast(igymax,3*NGLLX*NGLLZ*nspec2D_ymax,MPI_INTEGER,0,MPI_COMM_WORLD,ierr) - if (myrank.eq.0) then + if (myrank==0) then open(unit=45,file=dsmname(1:len_trim(dsmname))//'velzmin.bin',form='unformatted') read(45) i1,i2,i3,i4 open(unit=35,file=dsmname(1:len_trim(dsmname))//'tractzmin.bin',status='old',form='unformatted') read(35) i1,i2,i3,i4 - end if + endif !write(45) i1,i2,i3,i4 allocate(igzmin(3,NGLLX,NGLLY,nspec2D_bottom)) if(ier /= 0) stop 'error: not enough memory to allocate array' @@ -294,13 +294,13 @@ program read_absorbing_interfaces if(ier /= 0) stop 'error: not enough memory to allocate array' allocate(Velsgzmin(NtimeStep,3,nseisxmin,nseisymin)) if(ier /= 0) stop 'error: not enough memory to allocate array' - if (myrank.eq.0) then + if (myrank==0) then open(27,file=meshdirectory(1:len_trim(meshdirectory))//'IgZmin') call ReadIgZ(igzmin,NGLLX,NGLLY,nspec2D_bottom) close(27) - end if + endif nbloc = Nblocymax - call MPI_Bcast(igzmin,3*NGLLX*NGLLY*nspec2D_bottom,MPI_INTEGER,0,MPI_COMM_WORLD,ierr) + call MPI_Bcast(igzmin,3*NGLLX*NGLLY*nspec2D_bottom,MPI_INTEGER,0,MPI_COMM_WORLD,ierr) ! !---------------------- lecture du maillage ! @@ -331,7 +331,7 @@ program read_absorbing_interfaces read(27) ystore read(27) zstore close(27) - + write(*,*) 'STEP 1' write(*,*) prname(1:len_trim(prname))//'inner' @@ -339,10 +339,10 @@ program read_absorbing_interfaces action='read',form='unformatted',iostat=ier) read(27) ispec_is_inner read(27) ispec_is_elastic - close(27) + close(27) write(*,*) 'STEP 2' - + write(*,*) prname(1:len_trim(prname))//'absorb_dsm' open(27,file=prname(1:len_trim(prname))//'absorb_dsm',status='old',& action='read',form='unformatted',iostat=ier) @@ -352,7 +352,7 @@ program read_absorbing_interfaces allocate(abs_boundary_ijk(3,NGLLSQUARE,num_abs_boundary_faces)) allocate(abs_boundary_jacobian2Dw(NGLLSQUARE,num_abs_boundary_faces)) allocate(abs_boundary_normal(3,NGLLSQUARE,num_abs_boundary_faces)) - + read(27) abs_boundary_ispec read(27) abs_boundary_ijk read(27) abs_boundary_jacobian2Dw @@ -369,11 +369,11 @@ program read_absorbing_interfaces do ibloc = 1 , nbloc - if (myrank.eq.0) then + if (myrank==0) then write(*,*) 'read bloc', ibloc,nbloc - !end if + !endif ! read traction call ReadTract(31,Tracsgxmin,TracXmin,NtimeStep,NGLLY,NGLLZ,nspec2D_xmin,nbrcxmin,Nblocxmin,Nbrecxmin,nseisxmin,igxmin) call ReadTract(32,Tracsgxmax,TracXmax,NtimeStep,NGLLY,NGLLZ,nspec2D_xmax,nbrcxmax,Nblocxmax,Nbrecxmax,nseisxmax,igxmax) @@ -392,8 +392,8 @@ program read_absorbing_interfaces ! pour zmin : on lit d'abord nseisymin points et ensuite nseisxmin (ceci est l'ordre ! de la boucle de lecture) - end if - + endif + call MPI_Bcast(TracXmin,3*NtimeStep*NGLLY*NGLLZ*nspec2D_xmin ,MPI_REAL,0,MPI_COMM_WORLD,ierr) call MPI_Bcast(TracXmax,3*NtimeStep*NGLLY*NGLLZ*nspec2D_xmax ,MPI_REAL,0,MPI_COMM_WORLD,ierr) call MPI_Bcast(TracYmin,3*NtimeStep*NGLLX*NGLLZ*nspec2D_ymin ,MPI_REAL,0,MPI_COMM_WORLD,ierr) @@ -407,35 +407,35 @@ program read_absorbing_interfaces call MPI_Bcast(VelZmin,3*NtimeStep*NGLLX*NGLLY*nspec2D_bottom,MPI_REAL,0,MPI_COMM_WORLD,ierr) do iface = 1,num_abs_boundary_faces ! boucle sur les facettes - - ispec = abs_boundary_ispec(iface) ! numerotation locale + + ispec = abs_boundary_ispec(iface) ! numerotation locale ispec_global = IndLoc2Glob(ispec,myrank+1) - if (ispec_global.eq.0) then + if (ispec_global==0) then write(*,*) 'element',ispec,myrank write(*,*) 'pas defini' stop - end if + endif ! test pour connaitre la face sur laquelle on se trouve igll = 13 iref = abs_boundary_ijk(1,igll,iface) jref = abs_boundary_ijk(2,igll,iface) kref = abs_boundary_ijk(3,igll,iface) - - if (iref.eq.1) code_face = 1 - if (iref.eq.NGLLX) code_face = 2 - if (jref.eq.1) code_face = 3 - if (jref.eq.NGLLY) code_face = 4 - if (kref.eq.1) code_face=5 + + if (iref==1) code_face = 1 + if (iref==NGLLX) code_face = 2 + if (jref==1) code_face = 3 + if (jref==NGLLY) code_face = 4 + if (kref==1) code_face=5 ispec2d = IndSpec_face(ispec_global,code_face) - ! xmin - if (code_face.eq.1) then + ! xmin + if (code_face==1) then do igll=1,NGLLSQUARE i = abs_boundary_ijk(1,igll,iface) j = abs_boundary_ijk(2,igll,iface) k = abs_boundary_ijk(3,igll,iface) - + iglob = ibool(i,j,k,ispec) !x0=xstore_ref(i,j,k,ispec_global) !y0=ystore_ref(i,j,k,ispec_global) @@ -445,21 +445,21 @@ program read_absorbing_interfaces y1=ystore(iglob) z1=zstore(iglob) - if (i.ne.1) then + if (i/=1) then write(*,*) 'le point',i,j,k,iface write(*,*) 'n est pas sur la face xmin' stop - end if - !write(27,'(7i10)') i,j,k,iface,ispec2d,Igxmin(1,j,k,ispec2d), Igxmin(2,j,k,ispec2d) ! ispec2d,code_face - !write(27,'(3f20.5,10x,3f20.5)') x0,y0,z0,x1,y1,z1 - if(ibloc.ge.iblocmin) write(28) TracXmin(:,:,j,k,ispec2d) - if(ibloc.ge.iblocmin) write(29) VelXmin(:,:,j,k,ispec2d) - end do - end if + endif + !write(27,'(7i10)') i,j,k,iface,ispec2d,Igxmin(1,j,k,ispec2d), Igxmin(2,j,k,ispec2d) ! ispec2d,code_face + !write(27,'(3f20.5,10x,3f20.5)') x0,y0,z0,x1,y1,z1 + if(ibloc>=iblocmin) write(28) TracXmin(:,:,j,k,ispec2d) + if(ibloc>=iblocmin) write(29) VelXmin(:,:,j,k,ispec2d) + enddo + endif - ! xmax - if (code_face.eq.2) then + ! xmax + if (code_face==2) then do igll=1,NGLLSQUARE i = abs_boundary_ijk(1,igll,iface) j = abs_boundary_ijk(2,igll,iface) @@ -476,20 +476,20 @@ program read_absorbing_interfaces - if (i.ne.NGLLX) then + if (i/=NGLLX) then write(*,*) 'le point',i,j,k,iface write(*,*) 'n est pas sur la face xmax' stop - end if - !write(27,'(7i10)') i,j,k,iface,ispec2d,Igxmax(1,j,k,ispec2d), Igxmax(2,j,k,ispec2d) ! ispec2d,code_face - if(ibloc.ge.iblocmin) write(28) TracXmax(:,:,j,k,ispec2d) - if(ibloc.ge.iblocmin) write(29) VelXmax(:,:,j,k,ispec2d) - end do - end if + endif + !write(27,'(7i10)') i,j,k,iface,ispec2d,Igxmax(1,j,k,ispec2d), Igxmax(2,j,k,ispec2d) ! ispec2d,code_face + if(ibloc>=iblocmin) write(28) TracXmax(:,:,j,k,ispec2d) + if(ibloc>=iblocmin) write(29) VelXmax(:,:,j,k,ispec2d) + enddo + endif - ! ymin - if (code_face.eq.3) then + ! ymin + if (code_face==3) then do igll=1,NGLLSQUARE i = abs_boundary_ijk(1,igll,iface) j = abs_boundary_ijk(2,igll,iface) @@ -505,26 +505,26 @@ program read_absorbing_interfaces z1=zstore(iglob) - if (j.ne.1) then + if (j/=1) then write(*,*) 'le point',i,j,k,iface write(*,*) 'n est pas sur la face ymin' stop - end if - !write(27,'(7i10)') i,j,k,iface,ispec2d,Igymin(1,i,k,ispec2d), Igymin(2,i,k,ispec2d) ! ispec2d,code_face + endif + !write(27,'(7i10)') i,j,k,iface,ispec2d,Igymin(1,i,k,ispec2d), Igymin(2,i,k,ispec2d) ! ispec2d,code_face !write(27,'(3f20.5,10x,3f20.5)') x0,y0,z0,x1,y1,z1 - if(ibloc.ge.iblocmin) write(28) TracYmin(:,:,i,k,ispec2d) - if(ibloc.ge.iblocmin) write(29) VelYmin(:,:,i,k,ispec2d) + if(ibloc>=iblocmin) write(28) TracYmin(:,:,i,k,ispec2d) + if(ibloc>=iblocmin) write(29) VelYmin(:,:,i,k,ispec2d) !write(27,*) 'YMIN:',ispec2d,i,j,k !write(27,*) 'PT :',x1,y1,z1 !do kkkk=1,50 !write(27,*) TracYmin(1,kkkk,i,k,ispec2d),TracYmin(2,kkkk,i,k,ispec2d), TracYmin(3,kkkk,i,k,ispec2d) - !end do + !enddo !write(27,*) '-------------------------------' - end do - end if + enddo + endif - ! ymax - if (code_face.eq.4) then + ! ymax + if (code_face==4) then do igll=1,NGLLSQUARE i = abs_boundary_ijk(1,igll,iface) j = abs_boundary_ijk(2,igll,iface) @@ -540,26 +540,26 @@ program read_absorbing_interfaces z1=zstore(iglob) - if (j.ne.NGLLY) then + if (j/=NGLLY) then write(*,*) 'le point',i,j,k,iface write(*,*) 'n est pas sur la face ymax' stop - end if - !write(27,'(7i10)') i,j,k,iface,ispec2d,Igymax(1,i,k,ispec2d), Igymax(2,i,k,ispec2d) ! ispec2d,code_face + endif + !write(27,'(7i10)') i,j,k,iface,ispec2d,Igymax(1,i,k,ispec2d), Igymax(2,i,k,ispec2d) ! ispec2d,code_face !write(27,'(3f20.5,10x,3f20.5)') x0,y0,z0,x1,y1,z1 - if(ibloc.ge.iblocmin) write(28) TracYmax(:,:,i,k,ispec2d) - if(ibloc.ge.iblocmin) write(29) VelYmax(:,:,i,k,ispec2d) + if(ibloc>=iblocmin) write(28) TracYmax(:,:,i,k,ispec2d) + if(ibloc>=iblocmin) write(29) VelYmax(:,:,i,k,ispec2d) !write(27,*) 'YMAX:',ispec2d,i,j,k !write(27,*) 'PT :',x1,y1,z1 !do kkkk=1,50 !write(27,*)TracYmax(1,kkkk,i,k,ispec2d),TracYmax(2,kkkk,i,k,ispec2d),TracYmax(3,kkkk,i,k,ispec2d) - !end do + !enddo !write(27,*) '-------------------------------' - end do - end if + enddo + endif - ! zmin - if (code_face.eq.5) then + ! zmin + if (code_face==5) then do igll=1,NGLLSQUARE i = abs_boundary_ijk(1,igll,iface) j = abs_boundary_ijk(2,igll,iface) @@ -576,20 +576,20 @@ program read_absorbing_interfaces - if (k.ne.1) then + if (k/=1) then write(*,*) 'le point',i,j,k,iface write(*,*) 'n est pas sur la face zmin' stop - end if - !write(27,'(7i10)') i,j,k,iface,ispec2d,Igzmin(1,i,j,ispec2d), Igzmin(2,i,j,ispec2d) ! ispec2d,code_face + endif + !write(27,'(7i10)') i,j,k,iface,ispec2d,Igzmin(1,i,j,ispec2d), Igzmin(2,i,j,ispec2d) ! ispec2d,code_face !write(27,'(3f20.5,10x,3f20.5)') x0,y0,z0,x1,y1,z1 - if(ibloc.ge.iblocmin) write(28) TracZmin(:,:,i,j,ispec2d) - if(ibloc.ge.iblocmin) write(29) VelZmin(:,:,i,j,ispec2d) - end do - end if - - end do - end do + if(ibloc>=iblocmin) write(28) TracZmin(:,:,i,j,ispec2d) + if(ibloc>=iblocmin) write(29) VelZmin(:,:,i,j,ispec2d) + enddo + endif + + enddo + enddo !close(27) ! fermeture du fichier traction close(28) close(29) @@ -603,7 +603,7 @@ program read_absorbing_interfaces close(43) close(44) close(45) - + call MPI_FINALIZE(ierr) !!! write(*,*) '!!!!!!!!!!!!!!!!!!!!!!----------- STEP read_absorbing fin ----------!!!!!!!!!!!' @@ -619,7 +619,7 @@ subroutine create_name_database(prname,iproc,LOCAL_PATH) ! create the name of the database for the mesher and the solver implicit none - + integer iproc ! name of the database file @@ -635,33 +635,33 @@ subroutine create_name_database(prname,iproc,LOCAL_PATH) prname = clean_LOCAL_PATH(1:len_trim(clean_LOCAL_PATH)) // procname end subroutine create_name_database - + subroutine Cart2Sph(lat,lon,X) implicit none double precision lat,lon,X(3) double precision deg2rad - + deg2rad = 3.141592653589793d0/180.d0 - + lat = 90.d0 - dacos(X(3)) / deg2rad lon = datan2(X(2),X(1)) / deg2rad - + !write(*,*) lat,lon - + end subroutine Cart2Sph - + subroutine Sph2Cart(lat,lon,X) implicit none double precision lat1,lon1,lat,lon,X(3) double precision deg2rad - + deg2rad = 3.141592653589793d0/180.d0 - - + + lat1 = deg2rad * (90.d0-lat) lon1 = deg2rad * lon - + X(1)=dcos(lon1)*dsin(lat1) X(2)=dsin(lon1)*dsin(lat1) X(3)=dcos(lat1) @@ -675,9 +675,9 @@ subroutine Rotate(lat,lon,Olat,Olon) double precision Olon, Olat, lat, lon, deg2rad double precision Rot(3,3),X(3),X1(3) integer i,j,k - + deg2rad = 3.141592653589793d0/180.d0 - + Rot(1,1)=dcos(deg2rad*Olat) Rot(1,2)=0.d0 Rot(1,3)=-dsin(deg2rad*Olat) @@ -685,27 +685,27 @@ subroutine Rotate(lat,lon,Olat,Olon) Rot(2,1)=0.d0 Rot(2,2)=1.d0 Rot(2,3)=0.d0 - + Rot(3,1)=dsin(deg2rad*Olat) Rot(3,2)=0.d0 Rot(3,3)=dcos(deg2rad*Olat) call Sph2Cart(lat,lon,X) - + do i=1,3 X1(i)=0.d0 - end do - + enddo + do i=1,3 do k=1,3 X1(i)=X1(i) + Rot(i,k) * X(k) - end do - end do + enddo + enddo call Cart2Sph(lat,lon,X1) - - lon = lon + olon - - + + lon = lon + olon + + end subroutine Rotate @@ -720,10 +720,10 @@ subroutine ReadIg(ig,NGLL1,NGLL2,nspec2D,Nb) read(27,*) i1,i2,i3,i4,i5,i6 ig(1,i1,i2,i3)=i4 ig(2,i1,i2,i3)=1 + Nb - i5 ! il faut inverser car les profs sont rangees - ! dans le sens oppose dans dsm / specfem3D + ! dans le sens oppose dans dsm / specfem3D ig(3,i1,i2,i3)=i6 !write(*,*) ig(1,i1,i2,i3),ig(2,i1,i2,i3) - end do + enddo end subroutine ReadIg subroutine ReadIgZ(ig,NGLL1,NGLL2,nspec2D) @@ -737,7 +737,7 @@ subroutine ReadIgZ(ig,NGLL1,NGLL2,nspec2D) ig(2,i1,i2,i3)=i5 ! i5 ig(3,i1,i2,i3)=i6 !write(*,*) ig(1,i1,i2,i3),ig(2,i1,i2,i3) - end do + enddo end subroutine ReadIgZ @@ -759,21 +759,21 @@ subroutine ReadVel(iunit,Trcsg,Trac,NtimeStep,NGLL1,NGLL2,nspec2D,nbrc,Nbloc,Nbr ! residus trop ! petit numeriquement !corrfac=dble(1e6) ! pour DSM - !if (ibloc.eq.1) then + !if (ibloc==1) then ! read(iunit) nbrc,Nbloc,Nbrec,nseis - !end if + !endif !write(*,*) 'Read Vel' do irec = 1,Nbrec do ns = 1, nseis do komp = 1, 3 read(iunit) (Trcsg(i,komp,ns,irec),i=1,nbrc) !write(*,*) (Trcsg(i,komp,ns,irec),i=1,nbrc) - end do - end do - end do + enddo + enddo + enddo !!$ do i=1,nbrc !!$ write(*,*) Trcsg(i,1,37,83),Trcsg(i,2,37,83),Trcsg(i,3,37,83) -!!$ end do +!!$ enddo !read(*,*) iii do isp = 1, nspec2D do k=1,NGLL2 @@ -782,15 +782,15 @@ subroutine ReadVel(iunit,Trcsg,Trac,NtimeStep,NGLL1,NGLL2,nspec2D,nbrc,Nbloc,Nbr do komp=1,3 !write(*,*) Ig(1,j,k,isp),Ig(2,j,k,isp) Trac(komp,i,j,k,isp) = Trcsg(i,komp,Ig(1,j,k,isp),Ig(2,j,k,isp)) * corrfac - end do - end do - end do - end do - end do + enddo + enddo + enddo + enddo + enddo return !!$ do i=1,nbrc !!$ write(*,*) Trac(1,i,1,1,10),Trac(2,i,1,1,10),Trac(3,i,1,1,10) -!!$ end do +!!$ enddo !!$ read(*,*) iii end subroutine ReadVel @@ -809,21 +809,21 @@ subroutine ReadTract(iunit,Trcsg,Trac,NtimeStep,NGLL1,NGLL2,nspec2D,nbrc,Nbloc,N corrfac=dble(1e6) ! pour DSM corrfac = corrfac * dble(1e6) ! multiplication pour ne pas avoir des residus trop ! petit numeriquement - !if (ibloc.eq.1) then + !if (ibloc==1) then ! read(iunit) nbrc,Nbloc,Nbrec,nseis - !end if + !endif !write(*,*) 'Read Tract',iunit,Nbrec do irec = 1,Nbrec do ns = 1, nseis do komp = 1, 3 read(iunit) (Trcsg(i,komp,ns,irec),i=1,nbrc) !write(*,*) (Trcsg(i,komp,ns,irec),i=1,nbrc) - end do - end do - end do + enddo + enddo + enddo !!$ do i=1,nbrc !!$ write(*,*) Trcsg(i,1,37,83),Trcsg(i,2,37,83),Trcsg(i,3,37,83) -!!$ end do +!!$ enddo !read(*,*) iii do isp = 1, nspec2D do k=1,NGLL2 @@ -832,15 +832,15 @@ subroutine ReadTract(iunit,Trcsg,Trac,NtimeStep,NGLL1,NGLL2,nspec2D,nbrc,Nbloc,N do komp=1,3 !write(*,'(7i12)') komp,i,j,k,isp,Ig(1,j,k,isp),Ig(2,j,k,isp) Trac(komp,i,j,k,isp) = Trcsg(i,komp,Ig(1,j,k,isp),Ig(2,j,k,isp)) * corrfac - end do - end do - end do - end do - end do + enddo + enddo + enddo + enddo + enddo return !!$ do i=1,nbrc !!$ write(*,*) Trac(1,i,1,1,10),Trac(2,i,1,1,10),Trac(3,i,1,1,10) -!!$ end do +!!$ enddo !!$ read(*,*) iii end subroutine ReadTract diff --git a/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/clean.sh b/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/clean.sh index 01db7535c..e5684f590 100755 --- a/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/clean.sh +++ b/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/clean.sh @@ -37,7 +37,7 @@ cd ${HOME_DSM_MAIN_DIR}/DSM-1-BIG_3D_storage_version/Part-3-modify_DSM_results_f cd ${HOME_DSM_MAIN_DIR}/DSM-1-BIG_3D_storage_version/Part-3-modify_DSM_results_for_SPECFEM/ChangeFormat ; rm *~ ; make clean cd ${HOME_DSM_MAIN_DIR}/DSM-1-BIG_3D_storage_version/Part-3-modify_DSM_results_for_SPECFEM/Interf_SPECFEM3D_DSM ; rm *~ ; make clean -cd ${HOME_DSM_MAIN_DIR}/DSM-1-BIG_3D_storage_version/UTILS/ ; rm *~ ; make clean +cd ${HOME_DSM_MAIN_DIR}/DSM-1-BIG_3D_storage_version/UTILS/ ; rm *~ ; make clean rm -rf ${HOME_DSM_MAIN_DIR}/bin/ diff --git a/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/install.sh b/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/install.sh index 5eb83df3a..4e38a558f 100755 --- a/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/install.sh +++ b/utils/DSM_FOR_SPECFEM3D/DSM-1-BIG_3D_storage_version/install.sh @@ -48,7 +48,7 @@ cd ${HOME_DSM_MAIN_DIR}/DSM-1-BIG_3D_storage_version/Part-3-modify_DSM_results_f cd ${HOME_DSM_MAIN_DIR}/DSM-1-BIG_3D_storage_version/Part-3-modify_DSM_results_for_SPECFEM/ChangeFormat ; make cd ${HOME_DSM_MAIN_DIR}/DSM-1-BIG_3D_storage_version/Part-3-modify_DSM_results_for_SPECFEM/Interf_SPECFEM3D_DSM ; make -cd ${HOME_DSM_MAIN_DIR}/DSM-1-BIG_3D_storage_version/UTILS/ ; make +cd ${HOME_DSM_MAIN_DIR}/DSM-1-BIG_3D_storage_version/UTILS/ ; make mv ${HOME_DSM_MAIN_DIR}/DSM-1-BIG_3D_storage_version/bin ${HOME_DSM_MAIN_DIR} diff --git a/utils/DSM_FOR_SPECFEM3D/OLD--DSM_cleaned/validation_benchmark_from_our_2010_JGR_paper_with_Vinnik/HOWTO_run_this_validation_benchmark_from_our_2010_JGR_paper_with_Lev_Vinnik.txt b/utils/DSM_FOR_SPECFEM3D/OLD--DSM_cleaned/validation_benchmark_from_our_2010_JGR_paper_with_Vinnik/HOWTO_run_this_validation_benchmark_from_our_2010_JGR_paper_with_Lev_Vinnik.txt index 5a9809f9c..84cbd8c33 100755 --- a/utils/DSM_FOR_SPECFEM3D/OLD--DSM_cleaned/validation_benchmark_from_our_2010_JGR_paper_with_Vinnik/HOWTO_run_this_validation_benchmark_from_our_2010_JGR_paper_with_Lev_Vinnik.txt +++ b/utils/DSM_FOR_SPECFEM3D/OLD--DSM_cleaned/validation_benchmark_from_our_2010_JGR_paper_with_Vinnik/HOWTO_run_this_validation_benchmark_from_our_2010_JGR_paper_with_Lev_Vinnik.txt @@ -3,7 +3,7 @@ Subject: validation benchmark from our 2010 JGR paper with Lev Vinnik added From: Dimitri Komatitsch Date: 24/03/2014 13:11 To: Yi Wang -CC: Clément Durochat, Vadim Monteiller, Sébastien Chevrot +CC: Clement Durochat, Vadim Monteiller, Sebastien Chevrot Dear Yi, @@ -31,7 +31,7 @@ Best regards, Dimitri. --- +-- Dimitri Komatitsch CNRS Research Director (DR CNRS), Laboratory of Mechanics and Acoustics, UPR 7051, Marseille, France http://komatitsch.free.fr diff --git a/utils/DSM_FOR_SPECFEM3D/OLD--DSM_cleaned/validation_benchmark_from_our_2010_JGR_paper_with_Vinnik/validation_SH_IASP91_regular/filter_sac_150seconds.txt b/utils/DSM_FOR_SPECFEM3D/OLD--DSM_cleaned/validation_benchmark_from_our_2010_JGR_paper_with_Vinnik/validation_SH_IASP91_regular/filter_sac_150seconds.txt index 5c2145709..72419b751 100755 --- a/utils/DSM_FOR_SPECFEM3D/OLD--DSM_cleaned/validation_benchmark_from_our_2010_JGR_paper_with_Vinnik/validation_SH_IASP91_regular/filter_sac_150seconds.txt +++ b/utils/DSM_FOR_SPECFEM3D/OLD--DSM_cleaned/validation_benchmark_from_our_2010_JGR_paper_with_Vinnik/validation_SH_IASP91_regular/filter_sac_150seconds.txt @@ -1,5 +1,5 @@ - + r Vinnik.S100.ASC_comp3.convolved_rescaled_3p.dat.sac diff --git a/utils/DSM_FOR_SPECFEM3D/OLD--DSM_cleaned/validation_benchmark_from_our_2010_JGR_paper_with_Vinnik/validation_SV_IASP91_regular/filter_sac_150seconds.txt b/utils/DSM_FOR_SPECFEM3D/OLD--DSM_cleaned/validation_benchmark_from_our_2010_JGR_paper_with_Vinnik/validation_SV_IASP91_regular/filter_sac_150seconds.txt index 5c2145709..72419b751 100755 --- a/utils/DSM_FOR_SPECFEM3D/OLD--DSM_cleaned/validation_benchmark_from_our_2010_JGR_paper_with_Vinnik/validation_SV_IASP91_regular/filter_sac_150seconds.txt +++ b/utils/DSM_FOR_SPECFEM3D/OLD--DSM_cleaned/validation_benchmark_from_our_2010_JGR_paper_with_Vinnik/validation_SV_IASP91_regular/filter_sac_150seconds.txt @@ -1,5 +1,5 @@ - + r Vinnik.S100.ASC_comp3.convolved_rescaled_3p.dat.sac diff --git a/utils/DSM_FOR_SPECFEM3D/shells/bacchus_run_benchmark_all_process.sh b/utils/DSM_FOR_SPECFEM3D/shells/bacchus_run_benchmark_all_process.sh index c36b5acda..11507787b 100755 --- a/utils/DSM_FOR_SPECFEM3D/shells/bacchus_run_benchmark_all_process.sh +++ b/utils/DSM_FOR_SPECFEM3D/shells/bacchus_run_benchmark_all_process.sh @@ -1,19 +1,19 @@ #!/bin/bash -# ------------ BACTH AND SPECIFIC CLUSTER DIRECTIVES ------ +# ------------ BACTH AND SPECIFIC CLUSTER DIRECTIVES ------ -# +# ###################################################################################################################### # # # BENCHMARK FOR HYBRID DSM/SPECFEM3D METHOD -# +# # INPUTS : # # 1/ input directoy : ./input_dsm -# containts +# containts # -- Double_para.txt # -- FrqsMpi.txt # -- iasp91 @@ -28,12 +28,12 @@ # -- Par_file # -- STATIONS # -- CMTSOLUTION -# # -# the script runs : -# -# 1/ MESHER -# 2/ DSM to compute tractions on the chunk boundary +# +# the script runs : +# +# 1/ MESHER +# 2/ DSM to compute tractions on the chunk boundary # 3/ SCHOTCH + CREATE DATABASE FOR SPECFEM3D # 4/ ADD DSM TRACTION TO THE SPECFEM3D DATABASE # 5/ RUN SPECFEM3D @@ -41,12 +41,12 @@ # # # -# Vadim Monteiller April 2013. -# -# reference : +# Vadim Monteiller April 2013. +# +# reference : # "A hybrid method to compute short-period synthetic seismograms of teleseismic body waves in a 3-D regional model" # Monteiller, V; Chevrot, S; Komatitsch, D; Fuji, N -# GEOPHYSICAL JOURNAL INTERNATIONAL Volume:192 Issue:1 Pages:230-247 DOI:10.1093/gji/ggs006 Published: JAN 2013 +# GEOPHYSICAL JOURNAL INTERNATIONAL Volume:192 Issue:1 Pages:230-247 DOI:10.1093/gji/ggs006 Published: JAN 2013 # ##################################################################################################################### @@ -61,27 +61,27 @@ declare -i NPROC NPROC_MINUS_ONE # NUMBER OF MPI PROCESSES NPROC=32 -# ENTER OPTION FOR MPIRUN +# ENTER OPTION FOR MPIRUN OPTION= # do not change NPROC_MINUS_ONE="$NPROC-1" -# log file for output +# log file for output flog_file=$(pwd)/log.benchmark # choose the movie PREFIX_MOVIE=velocity_Z_it -# directory where SPECFEM3D writes outputs +# directory where SPECFEM3D writes outputs IN_MOVIE=$(pwd)/OUTPUT_FILES/DATABASES_MPI/ -# output movie directory +# output movie directory OUT_MOVIE=$(pwd)/movie -#------- input files creation +#------- input files creation # you must write the absolute path for : xcreate_input -# you must edit and complete : parfile_for_benchmark +# you must edit and complete : parfile_for_benchmark $BIN_DSM/xcreate_inputs_files< $flog_file echo " BENCHMARK RUN " >> $flog_file echo >> $flog_file echo $(date) >> $flog_file -# 1 / ------- create mesh +# 1 / ------- create mesh run_create_mesh @@ -150,7 +150,7 @@ echo $(date) >> $flog_file -# 5 / --------------- run simulation +# 5 / --------------- run simulation echo "" >> $flog_file echo " simulation" >> $flog_file echo $(date) >> $flog_file @@ -167,9 +167,9 @@ echo "" >> $flog_file echo " MAKE movie" >> $flog_file echo $(date) >> $flog_file -create_movie $PREFIX_MOVIE $IN_MOVIE $OUT_MOVIE 25 8500 +create_movie $PREFIX_MOVIE $IN_MOVIE $OUT_MOVIE 25 8500 # to do chane 25 and 8500 echo $(date) >> $flog_file - + diff --git a/utils/DSM_FOR_SPECFEM3D/shells/idirs_ada_benchmark.sh b/utils/DSM_FOR_SPECFEM3D/shells/idirs_ada_benchmark.sh index e46761404..1bca56d0f 100755 --- a/utils/DSM_FOR_SPECFEM3D/shells/idirs_ada_benchmark.sh +++ b/utils/DSM_FOR_SPECFEM3D/shells/idirs_ada_benchmark.sh @@ -39,11 +39,11 @@ # @ wall_clock_limit = 3600 # @ queue -# loading setup fonctions +# loading setup fonctions SHELL_DSM=/smphome/rech/ubv/rubv002/progs/shells_specfem3D_hybrid source $SHELL_DSM/setup.sh -case ${LOADL_STEP_NAME} in +case ${LOADL_STEP_NAME} in #============ Step 1 commands ============ #======= Sequential preprocessing ======== @@ -106,7 +106,7 @@ case ${LOADL_STEP_NAME} in mfput $REP/tractymin.bin . mfput $REP/velymin.bin . - + mfput $REP/tractymax.bin . mfput $REP/velymax.bin . diff --git a/utils/DSM_FOR_SPECFEM3D/shells/idris_ada_compute_tract.sh b/utils/DSM_FOR_SPECFEM3D/shells/idris_ada_compute_tract.sh index 2c4c42e08..78c007d6e 100755 --- a/utils/DSM_FOR_SPECFEM3D/shells/idris_ada_compute_tract.sh +++ b/utils/DSM_FOR_SPECFEM3D/shells/idris_ada_compute_tract.sh @@ -85,9 +85,9 @@ # @ class = archive # @ queue -# loading setup fonctions +# loading setup fonctions -# loading setup fonctions +# loading setup fonctions SHELL_DSM=/smphome/rech/ubv/rubv002/progs/shells_specfem3D_hybrid declare -i NPROC NPROC_MINUS_ONE @@ -98,13 +98,13 @@ NPROC=32 # MPI COMMAND MPIRUN=poe -# ENTER OPTION FOR MPIRUN +# ENTER OPTION FOR MPIRUN OPTION= # do not change NPROC_MINUS_ONE="$NPROC-1" -# log file for output +# log file for output flog_file=$(pwd)/log.benchmark BIN_DSM=/smphome/rech/ubv/rubv002/progs/DSM_FOR_SPECFEM3D/bin/ @@ -118,14 +118,14 @@ export MP_DEBUG_TIMEOUT_SECONDS=84000 -case ${LOADL_STEP_NAME} in +case ${LOADL_STEP_NAME} in #============ Step 1 commands ============ #======= Sequential preprocessing ======== sequential_setup ) set -x cd $TMPDIR - printenv | sort + printenv | sort # on recupere les datas cp ${LOADL_STEP_INITDIR}/input.data.tar.bz2 . tar -jxvf input.data.tar.bz2 @@ -241,14 +241,14 @@ case ${LOADL_STEP_NAME} in move_output_wihtout_change - + # on ecrit les resumtats mfput XMIN.tar.bz2 EV5/. - + mfput XMAX.tar.bz2 EV5/. - + mfput YMIN.tar.bz2 EV5/. - + mfput YMAX.tar.bz2 EV5/. mfput ZMIN.tar.bz2 EV5/. diff --git a/utils/DSM_FOR_SPECFEM3D/shells/idris_ada_run_benchmark_all_process.sh b/utils/DSM_FOR_SPECFEM3D/shells/idris_ada_run_benchmark_all_process.sh index af7a49ba3..24368c41a 100755 --- a/utils/DSM_FOR_SPECFEM3D/shells/idris_ada_run_benchmark_all_process.sh +++ b/utils/DSM_FOR_SPECFEM3D/shells/idris_ada_run_benchmark_all_process.sh @@ -1,4 +1,4 @@ -# ------------ BACTH AND SPECIFIC CLUSTER DIRECTIVES ------ +# ------------ BACTH AND SPECIFIC CLUSTER DIRECTIVES ------ #=========== Global directives =========== # @ job_name = benchmark_hybrid # @ output = $(job_name).$(step_name).$(jobid) @@ -46,7 +46,7 @@ # Repertoire temporaire de travail cd $TMPDIR -# La variable LOADL_STEP_INITDIR est automatiquement positionnee par +# La variable LOADL_STEP_INITDIR est automatiquement positionnee par # LoadLeveler au repertoire dans lequel on tape la commande llsubmit cp $LOADL_STEP_INITDIR/input_data.tar.bz2 . tar -jxvf input_data.tar.bz2 @@ -55,16 +55,16 @@ tar -jxvf input_data.tar.bz2 # # # BENCHMARK FOR HYBRID DSM/SPECFEM3D METHOD -# +# # INPUTS : # # 1/ input directoy : ./input_dsm -# containts +# containts # -- Double_para.txt # -- FrqsMpi.txt # -- iasp91 # -- iasp91_dsm -# -- st +# -- st # # 2/ input file : parfile_for_benchmark # @@ -74,12 +74,12 @@ tar -jxvf input_data.tar.bz2 # -- Par_file # -- STATIONS # -- CMTSOLUTION -# # -# the script runs : -# -# 1/ MESHER -# 2/ DSM to compute tractions on the chunk boundary +# +# the script runs : +# +# 1/ MESHER +# 2/ DSM to compute tractions on the chunk boundary # 3/ SCHOTCH + CREATE DATABASE FOR SPECFEM3D # 4/ ADD DSM TRACTION TO THE SPECFEM3D DATABASE # 5/ RUN SPECFEM3D @@ -87,12 +87,12 @@ tar -jxvf input_data.tar.bz2 # # # -# Vadim Monteiller April 2013. -# -# reference : +# Vadim Monteiller April 2013. +# +# reference : # "A hybrid method to compute short-period synthetic seismograms of teleseismic body waves in a 3-D regional model" # Monteiller, V; Chevrot, S; Komatitsch, D; Fuji, N -# GEOPHYSICAL JOURNAL INTERNATIONAL Volume:192 Issue:1 Pages:230-247 DOI:10.1093/gji/ggs006 Published: JAN 2013 +# GEOPHYSICAL JOURNAL INTERNATIONAL Volume:192 Issue:1 Pages:230-247 DOI:10.1093/gji/ggs006 Published: JAN 2013 # ##################################################################################################################### @@ -106,27 +106,27 @@ declare -i NPROC NPROC_MINUS_ONE # NUMBER OF MPI PROCESSES NPROC=32 -# ENTER OPTION FOR MPIRUN +# ENTER OPTION FOR MPIRUN OPTION= # do not change NPROC_MINUS_ONE="$NPROC-1" -# log file for output +# log file for output flog_file=$(pwd)/log.benchmark # choose the movie PREFIX_MOVIE=velocity_Z_it -# directory where SPECFEM3D writes outputs +# directory where SPECFEM3D writes outputs IN_MOVIE=$(pwd)/OUTPUT_FILES/DATABASES_MPI/ -# output movie directory +# output movie directory OUT_MOVIE=$(pwd)/movie -#------- input files creation +#------- input files creation # you must write the absolute path for : xcreate_input -# you must edit and complete : parfile_for_benchmark +# you must edit and complete : parfile_for_benchmark $HOME_SPECFEM3D/utils/DSM_FOR_SPECFEM3D/bin/xcreate_inputs_files< $flog_file echo " BENCHMARK RUN " >> $flog_file echo >> $flog_file echo $(date) >> $flog_file -# 1 / ------- create mesh +# 1 / ------- create mesh run_create_mesh @@ -195,7 +195,7 @@ echo $(date) >> $flog_file -# 5 / --------------- run simulation +# 5 / --------------- run simulation echo "" >> $flog_file echo " simulation" >> $flog_file echo $(date) >> $flog_file @@ -212,9 +212,9 @@ echo "" >> $flog_file echo " MAKE movie" >> $flog_file echo $(date) >> $flog_file -create_movie $PREFIX_MOVIE $IN_MOVIE $OUT_MOVIE 25 8500 +create_movie $PREFIX_MOVIE $IN_MOVIE $OUT_MOVIE 25 8500 # to do chane 25 and 8500 echo $(date) >> $flog_file - + diff --git a/utils/DSM_FOR_SPECFEM3D/shells/idris_test.sh b/utils/DSM_FOR_SPECFEM3D/shells/idris_test.sh index 734a1ddf4..56cf4896f 100755 --- a/utils/DSM_FOR_SPECFEM3D/shells/idris_test.sh +++ b/utils/DSM_FOR_SPECFEM3D/shells/idris_test.sh @@ -29,9 +29,9 @@ # @ wall_clock_limit = 1200 # @ queue -source /smphome/rech/ubv/rubv002/progs/shells_specfem3D_hybrid/shells_tests.sh +source /smphome/rech/ubv/rubv002/progs/shells_specfem3D_hybrid/shells_tests.sh -case ${LOADL_STEP_NAME} in +case ${LOADL_STEP_NAME} in #============ Step 1 commands ============ #======= Sequential preprocessing ======== diff --git a/utils/DSM_FOR_SPECFEM3D/shells/msub_compute_coef_process.sh b/utils/DSM_FOR_SPECFEM3D/shells/msub_compute_coef_process.sh index e1d92b4ee..32c740a31 100755 --- a/utils/DSM_FOR_SPECFEM3D/shells/msub_compute_coef_process.sh +++ b/utils/DSM_FOR_SPECFEM3D/shells/msub_compute_coef_process.sh @@ -1,28 +1,28 @@ #!/bin/bash -# ------------ BACTH AND SPECIFIC CLUSTER DIRECTIVES ------ +# ------------ BACTH AND SPECIFIC CLUSTER DIRECTIVES ------ #MSUB -r run_write #MSUB -n 2000 -#MSUB -x +#MSUB -x #MSUB -T 10800 #MSUB -q standard #MSUB -o run_write.o -#MSUB -e run_write.e +#MSUB -e run_write.e set -x cd $BRIDGE_MSUB_PWD -# +# ###################################################################################################################### # # # BENCHMARK FOR HYBRID DSM/SPECFEM3D METHOD -# +# # INPUTS : # # 1/ input directoy : ./input_dsm -# containts +# containts # -- Double_para.txt # -- FrqsMpi.txt # -- iasp91 @@ -37,12 +37,12 @@ cd $BRIDGE_MSUB_PWD # -- Par_file # -- STATIONS # -- CMTSOLUTION -# # -# the script runs : -# -# 1/ MESHER -# 2/ DSM to compute tractions on the chunk boundary +# +# the script runs : +# +# 1/ MESHER +# 2/ DSM to compute tractions on the chunk boundary # 3/ SCHOTCH + CREATE DATABASE FOR SPECFEM3D # 4/ ADD DSM TRACTION TO THE SPECFEM3D DATABASE # 5/ RUN SPECFEM3D @@ -50,12 +50,12 @@ cd $BRIDGE_MSUB_PWD # # # -# Vadim Monteiller April 2013. -# -# reference : +# Vadim Monteiller April 2013. +# +# reference : # "A hybrid method to compute short-period synthetic seismograms of teleseismic body waves in a 3-D regional model" # Monteiller, V; Chevrot, S; Komatitsch, D; Fuji, N -# GEOPHYSICAL JOURNAL INTERNATIONAL Volume:192 Issue:1 Pages:230-247 DOI:10.1093/gji/ggs006 Published: JAN 2013 +# GEOPHYSICAL JOURNAL INTERNATIONAL Volume:192 Issue:1 Pages:230-247 DOI:10.1093/gji/ggs006 Published: JAN 2013 # ##################################################################################################################### @@ -69,32 +69,32 @@ declare -i NPROC NPROC_MINUS_ONE # NUMBER OF MPI PROCESSES NPROC=32 -# ENTER OPTION FOR MPIRUN +# ENTER OPTION FOR MPIRUN OPTION= # do not change NPROC_MINUS_ONE="$NPROC-1" -# log file for output +# log file for output flog_file=$(pwd)/log.compute_coef # choose the movie PREFIX_MOVIE=velocity_Z_it -# directory where SPECFEM3D writes outputs +# directory where SPECFEM3D writes outputs IN_MOVIE=$(pwd)/OUTPUT_FILES/DATABASES_MPI/ -# output movie directory +# output movie directory OUT_MOVIE=$(pwd)/movie # # ------------------------ FROM HERE DO NOT CHANGE ANYTHING -------------------- -# ----- load script and path --- +# ----- load script and path --- source params.in source $SCRIPTS/scripts_specfem3D.sh source $SCRIPTS/scripts_dsm.sh -## open the log file +## open the log file echo > $flog_file echo " WRITE COEF " >> $flog_file echo >> $flog_file diff --git a/utils/DSM_FOR_SPECFEM3D/shells/msub_run_benchmark_all_process.sh b/utils/DSM_FOR_SPECFEM3D/shells/msub_run_benchmark_all_process.sh index d5fb26133..38e44cd50 100755 --- a/utils/DSM_FOR_SPECFEM3D/shells/msub_run_benchmark_all_process.sh +++ b/utils/DSM_FOR_SPECFEM3D/shells/msub_run_benchmark_all_process.sh @@ -1,17 +1,17 @@ #!/bin/bash -# ------------ BACTH AND SPECIFIC CLUSTER DIRECTIVES ------ +# ------------ BACTH AND SPECIFIC CLUSTER DIRECTIVES ------ -#MSUB -r Benchmark_couple_SPECFEM3D_DSM # Nom du job +#MSUB -r Benchmark_couple_SPECFEM3D_DSM # Nom du job #MSUB -n 580 #MSUB -N 6 -#MSUB -x +#MSUB -x #MSUB -T 84000 #MSUB -q standard #MSUB -e Benchmark_couple_run.e #MSUB -o Benchmark_couple_run.o -#MSUB -A ra2410 +#MSUB -A ra2410 set -x cd $BRIDGE_MSUB_PWD @@ -20,16 +20,16 @@ cd $BRIDGE_MSUB_PWD # # # BENCHMARK FOR HYBRID DSM/SPECFEM3D METHOD -# +# # INPUTS : # # 1/ input directoy : ./input_dsm -# containts +# containts # -- Double_para.txt # -- FrqsMpi.txt # -- iasp91 # -- iasp91_dsm -# -- st +# -- st # # 2/ input file : parfile_for_benchmark # @@ -39,12 +39,12 @@ cd $BRIDGE_MSUB_PWD # -- Par_file # -- STATIONS # -- CMTSOLUTION -# # -# the script runs : -# -# 1/ MESHER -# 2/ DSM to compute tractions on the chunk boundary +# +# the script runs : +# +# 1/ MESHER +# 2/ DSM to compute tractions on the chunk boundary # 3/ SCHOTCH + CREATE DATABASE FOR SPECFEM3D # 4/ ADD DSM TRACTION TO THE SPECFEM3D DATABASE # 5/ RUN SPECFEM3D @@ -52,12 +52,12 @@ cd $BRIDGE_MSUB_PWD # # # -# Vadim Monteiller April 2013. -# -# reference : +# Vadim Monteiller April 2013. +# +# reference : # "A hybrid method to compute short-period synthetic seismograms of teleseismic body waves in a 3-D regional model" # Monteiller, V; Chevrot, S; Komatitsch, D; Fuji, N -# GEOPHYSICAL JOURNAL INTERNATIONAL Volume:192 Issue:1 Pages:230-247 DOI:10.1093/gji/ggs006 Published: JAN 2013 +# GEOPHYSICAL JOURNAL INTERNATIONAL Volume:192 Issue:1 Pages:230-247 DOI:10.1093/gji/ggs006 Published: JAN 2013 # ##################################################################################################################### @@ -71,27 +71,27 @@ declare -i NPROC NPROC_MINUS_ONE # NUMBER OF MPI PROCESSES NPROC=32 -# ENTER OPTION FOR MPIRUN +# ENTER OPTION FOR MPIRUN OPTION= # do not change NPROC_MINUS_ONE="$NPROC-1" -# log file for output +# log file for output flog_file=$(pwd)/log.benchmark # choose the movie PREFIX_MOVIE=velocity_Z_it -# directory where SPECFEM3D writes outputs +# directory where SPECFEM3D writes outputs IN_MOVIE=$(pwd)/OUTPUT_FILES/DATABASES_MPI/ -# output movie directory +# output movie directory OUT_MOVIE=$(pwd)/movie -#------- input files creation +#------- input files creation # you must write the absolute path for : xcreate_input -# you must edit and complete : parfile_for_benchmark +# you must edit and complete : parfile_for_benchmark $HOME_SPECFEM3D/utils/DSM_FOR_SPECFEM3D/bin/xcreate_inputs_files< $flog_file echo " BENCHMARK RUN " >> $flog_file echo >> $flog_file echo $(date) >> $flog_file -# 1 / ------- create mesh +# 1 / ------- create mesh run_create_mesh @@ -160,7 +160,7 @@ echo $(date) >> $flog_file -# 5 / --------------- run simulation +# 5 / --------------- run simulation echo "" >> $flog_file echo " simulation" >> $flog_file echo $(date) >> $flog_file @@ -177,9 +177,9 @@ echo "" >> $flog_file echo " MAKE movie" >> $flog_file echo $(date) >> $flog_file -create_movie $PREFIX_MOVIE $IN_MOVIE $OUT_MOVIE 25 8500 +create_movie $PREFIX_MOVIE $IN_MOVIE $OUT_MOVIE 25 8500 # to do chane 25 and 8500 echo $(date) >> $flog_file - + diff --git a/utils/DSM_FOR_SPECFEM3D/shells/msub_setup_process.sh b/utils/DSM_FOR_SPECFEM3D/shells/msub_setup_process.sh index 40151b5a4..b65d17a1f 100755 --- a/utils/DSM_FOR_SPECFEM3D/shells/msub_setup_process.sh +++ b/utils/DSM_FOR_SPECFEM3D/shells/msub_setup_process.sh @@ -1,29 +1,29 @@ #!/bin/bash -# ------------ BACTH AND SPECIFIC CLUSTER DIRECTIVES ------ +# ------------ BACTH AND SPECIFIC CLUSTER DIRECTIVES ------ #MSUB -r run_mesh #MSUB -n 1 #MSUB -T 10800 #MSUB -q standard #MSUB -o run_mesh.o -#MSUB -e run_mesh.e +#MSUB -e run_mesh.e set -x cd $BRIDGE_MSUB_PWD -# +# ###################################################################################################################### # # # BENCHMARK FOR HYBRID DSM/SPECFEM3D METHOD -# +# # INPUTS : # # 1/ input directoy : ./input_dsm -# containts +# containts # -- Double_para.txt # -- FrqsMpi.txt # -- iasp91 @@ -38,12 +38,12 @@ cd $BRIDGE_MSUB_PWD # -- Par_file # -- STATIONS # -- CMTSOLUTION -# # -# the script runs : -# -# 1/ MESHER -# 2/ DSM to compute tractions on the chunk boundary +# +# the script runs : +# +# 1/ MESHER +# 2/ DSM to compute tractions on the chunk boundary # 3/ SCHOTCH + CREATE DATABASE FOR SPECFEM3D # 4/ ADD DSM TRACTION TO THE SPECFEM3D DATABASE # 5/ RUN SPECFEM3D @@ -51,12 +51,12 @@ cd $BRIDGE_MSUB_PWD # # # -# Vadim Monteiller April 2013. -# -# reference : +# Vadim Monteiller April 2013. +# +# reference : # "A hybrid method to compute short-period synthetic seismograms of teleseismic body waves in a 3-D regional model" # Monteiller, V; Chevrot, S; Komatitsch, D; Fuji, N -# GEOPHYSICAL JOURNAL INTERNATIONAL Volume:192 Issue:1 Pages:230-247 DOI:10.1093/gji/ggs006 Published: JAN 2013 +# GEOPHYSICAL JOURNAL INTERNATIONAL Volume:192 Issue:1 Pages:230-247 DOI:10.1093/gji/ggs006 Published: JAN 2013 # ##################################################################################################################### @@ -64,34 +64,34 @@ cd $BRIDGE_MSUB_PWD ## ------------------ INPUTS ----------------------------- # DSM BINARY : (to do supprimer peut-etre ca de params.in??) -BIN_DSM=$HOME_SPECFEM3D/utils/DSM_FOR_SPECFEM3D/bin +BIN_DSM=$HOME_SPECFEM3D/utils/DSM_FOR_SPECFEM3D/bin # NBPROC is declared as integer (important do not change) declare -i NPROC NPROC_MINUS_ONE # NUMBER OF MPI PROCESSES NPROC=32 -# ENTER OPTION FOR MPIRUN +# ENTER OPTION FOR MPIRUN OPTION= # do not change NPROC_MINUS_ONE="$NPROC-1" -# log file for output +# log file for output flog_file=$(pwd)/log.benchmark # choose the movie PREFIX_MOVIE=velocity_Z_it -# directory where SPECFEM3D writes outputs +# directory where SPECFEM3D writes outputs IN_MOVIE=$(pwd)/OUTPUT_FILES/DATABASES_MPI/ -# output movie directory +# output movie directory OUT_MOVIE=$(pwd)/movie -#------- input files creation +#------- input files creation # you must write the absolute path for : xcreate_input -# you must edit and complete : parfile_for_benchmark +# you must edit and complete : parfile_for_benchmark $BIN_DSM/xcreate_inputs_files< $flog_file echo " set up " >> $flog_file echo >> $flog_file echo $(date) >> $flog_file -# 1 / ------- create mesh +# 1 / ------- create mesh run_create_mesh - + echo $(date) >> $flog_file - + diff --git a/utils/DSM_FOR_SPECFEM3D/shells/scripts.sh b/utils/DSM_FOR_SPECFEM3D/shells/scripts.sh index cd0987256..6897b53cd 100755 --- a/utils/DSM_FOR_SPECFEM3D/shells/scripts.sh +++ b/utils/DSM_FOR_SPECFEM3D/shells/scripts.sh @@ -13,7 +13,7 @@ make_dir_exp copy_input_files_exp compute_exp_coeff -# faces +# faces make_dir_faces copy_input_files_faces @@ -37,7 +37,7 @@ read_exp_vert inputIASP.infTra fft_vert inputIASP.infTra change_format_vertical -cd ../STZMIN +cd ../STZMIN read_exp_zmin inputIASP.infTra fft_zmin inputIASP.infTra change_format_zmin @@ -50,15 +50,15 @@ move_output } -# 1. Compute expansion coefficients +# 1. Compute expansion coefficients # # NPROC : number of MPI processes # BIN : binary directory -# OTPION: mpirun options +# OTPION: mpirun options # function compute_exp_coeff () { -echo $NPROC +echo $NPROC echo $OPTION echo $BIN/TraPSV_write_ceof_mpi mpirun -np $NPROC $OPTION $BIN/xTraPSV_write_ceof_mpi @@ -78,7 +78,7 @@ rm ascii/* # -# make directories to store expansion coefficients +# make directories to store expansion coefficients # function make_dir_exp () { @@ -90,7 +90,7 @@ mkdir ascii # -# make directories for each face +# make directories for each face # function make_dir_faces () { @@ -158,7 +158,7 @@ mpirun -np $NPROC $OPTION $BIN/TraFFT_MPI_face_zmin $1 # -# change format vertical +# change format vertical # function change_format_vertical () { @@ -176,7 +176,7 @@ mpirun -np $NPROC $OPTION $BIN/ChangeFormat_zmin_disp } # -# move outputs from $OUT (DSM_tractions) to $REP (Tract for SPECFEM) +# move outputs from $OUT (DSM_tractions) to $REP (Tract for SPECFEM) # function move_output () { diff --git a/utils/DSM_FOR_SPECFEM3D/shells/scripts_dsm_PSV.sh b/utils/DSM_FOR_SPECFEM3D/shells/scripts_dsm_PSV.sh index dbd5d13de..e67db706d 100755 --- a/utils/DSM_FOR_SPECFEM3D/shells/scripts_dsm_PSV.sh +++ b/utils/DSM_FOR_SPECFEM3D/shells/scripts_dsm_PSV.sh @@ -8,7 +8,7 @@ function setup_process () $BIN_DSM/xcreate_inputs_files<> $flog_file -# faces +# faces make_dir_faces copy_input_files_faces @@ -78,7 +78,7 @@ echo $(date) >> $flog_file echo >> $flog_file echo "FACE zmin" >> $flog_file echo $(date) >> $flog_file -cd ../STZMIN +cd ../STZMIN read_exp_zmin inputIASP.infTra echo $(date) >> $flog_file fft_zmin inputIASP.infTra @@ -93,15 +93,15 @@ move_output } -# 1. Compute expansion coefficients +# 1. Compute expansion coefficients # # NPROC : number of MPI processes # BIN : binary directory -# OTPION: mpirun options +# OTPION: mpirun options # function compute_exp_coeff () { -echo $NPROC +echo $NPROC echo $OPTION echo $BIN/xTraPSV_write_ceof_mpi_PSV $MPIRUN $OPTION $BIN/xTraPSV_write_ceof_mpi_PSV @@ -121,7 +121,7 @@ rm ascii/* # -# make directories to store expansion coefficients +# make directories to store expansion coefficients # function make_dir_exp () { @@ -133,7 +133,7 @@ mkdir ascii # -# make directories for each face +# make directories for each face # function make_dir_faces () { @@ -201,7 +201,7 @@ $MPIRUN $OPTION $BIN/TraFFT_MPI_face_zmin_PSV $1 # -# change format vertical +# change format vertical # function change_format_vertical () { @@ -219,7 +219,7 @@ $MPIRUN $OPTION $BIN/ChangeFormat_zmin_disp } # -# move outputs from $OUT (DSM_tractions) to $REP (Tract for SPECFEM) +# move outputs from $OUT (DSM_tractions) to $REP (Tract for SPECFEM) # function move_output () { diff --git a/utils/DSM_FOR_SPECFEM3D/shells/scripts_dsm_SH.sh b/utils/DSM_FOR_SPECFEM3D/shells/scripts_dsm_SH.sh index edd8ccdd1..6d13bd643 100755 --- a/utils/DSM_FOR_SPECFEM3D/shells/scripts_dsm_SH.sh +++ b/utils/DSM_FOR_SPECFEM3D/shells/scripts_dsm_SH.sh @@ -8,7 +8,7 @@ function setup_process () $BIN_DSM/xcreate_inputs_files<> $flog_file -# faces +# faces make_dir_faces copy_input_files_faces @@ -78,7 +78,7 @@ echo $(date) >> $flog_file echo >> $flog_file echo "FACE zmin" >> $flog_file echo $(date) >> $flog_file -cd ../STZMIN +cd ../STZMIN read_exp_zmin inputIASP.infTra echo $(date) >> $flog_file fft_zmin inputIASP.infTra @@ -93,15 +93,15 @@ move_output } -# 1. Compute expansion coefficients +# 1. Compute expansion coefficients # # NPROC : number of MPI processes # BIN : binary directory -# OTPION: mpirun options +# OTPION: mpirun options # function compute_exp_coeff () { -echo $NPROC +echo $NPROC echo $OPTION echo $BIN/xTraPSV_write_ceof_mpi_SH $MPIRUN $OPTION $BIN/xTraPSV_write_ceof_mpi_SH @@ -121,7 +121,7 @@ rm ascii/* # -# make directories to store expansion coefficients +# make directories to store expansion coefficients # function make_dir_exp () { @@ -133,7 +133,7 @@ mkdir ascii # -# make directories for each face +# make directories for each face # function make_dir_faces () { @@ -201,7 +201,7 @@ $MPIRUN $OPTION $BIN/TraFFT_MPI_face_zmin_SH $1 # -# change format vertical +# change format vertical # function change_format_vertical () { @@ -219,7 +219,7 @@ $MPIRUN $OPTION $BIN/ChangeFormat_zmin_disp } # -# move outputs from $OUT (DSM_tractions) to $REP (Tract for SPECFEM) +# move outputs from $OUT (DSM_tractions) to $REP (Tract for SPECFEM) # function move_output () { diff --git a/utils/DSM_FOR_SPECFEM3D/shells/scripts_dsm_full.sh b/utils/DSM_FOR_SPECFEM3D/shells/scripts_dsm_full.sh index 900e17181..d911596b5 100755 --- a/utils/DSM_FOR_SPECFEM3D/shells/scripts_dsm_full.sh +++ b/utils/DSM_FOR_SPECFEM3D/shells/scripts_dsm_full.sh @@ -8,7 +8,7 @@ function setup_process () $BIN_DSM/xcreate_inputs_files<> $flog_file -# faces +# faces make_dir_faces copy_input_files_faces @@ -78,7 +78,7 @@ echo $(date) >> $flog_file echo >> $flog_file echo "FACE zmin" >> $flog_file echo $(date) >> $flog_file -cd ../STZMIN +cd ../STZMIN read_exp_zmin inputIASP.infTra echo $(date) >> $flog_file fft_zmin inputIASP.infTra @@ -93,15 +93,15 @@ move_output } -# 1. Compute expansion coefficients +# 1. Compute expansion coefficients # # NPROC : number of MPI processes # BIN : binary directory -# OTPION: mpirun options +# OTPION: mpirun options # function compute_exp_coeff () { -echo $NPROC +echo $NPROC echo $OPTION echo $BIN/xTraPSV_write_ceof_mpi_SH echo $BIN/xTraPSV_write_ceof_mpi_PSV @@ -123,7 +123,7 @@ rm ascii/* # -# make directories to store expansion coefficients +# make directories to store expansion coefficients # function make_dir_exp () { @@ -135,7 +135,7 @@ mkdir ascii # -# make directories for each face +# make directories for each face # function make_dir_faces () { @@ -205,7 +205,7 @@ $MPIRUN $OPTION $BIN/TraFFT_MPI_face_zmin_full $1 # -# change format vertical +# change format vertical # function change_format_vertical () { @@ -223,7 +223,7 @@ $MPIRUN $OPTION $BIN/ChangeFormat_zmin_disp } # -# move outputs from $OUT (DSM_tractions) to $REP (Tract for SPECFEM) +# move outputs from $OUT (DSM_tractions) to $REP (Tract for SPECFEM) # function move_output () { diff --git a/utils/DSM_FOR_SPECFEM3D/shells/scripts_pure_dsm.sh b/utils/DSM_FOR_SPECFEM3D/shells/scripts_pure_dsm.sh index 3da778dcf..fdae406ce 100755 --- a/utils/DSM_FOR_SPECFEM3D/shells/scripts_pure_dsm.sh +++ b/utils/DSM_FOR_SPECFEM3D/shells/scripts_pure_dsm.sh @@ -65,15 +65,15 @@ cp $IN_DSM/$stf $STD/. cp $MESH/recdepth $STD/. cp $MESH/OrigRepSpecfm $STD/. } -# 1. Compute expansion coefficients +# 1. Compute expansion coefficients # # NPROC : number of MPI processes # BIN : binary directory -# OTPION: mpirun options +# OTPION: mpirun options # function compute_exp_coeff () { -echo $NPROC +echo $NPROC echo $OPTION echo $BIN/xTraPSV_write_ceof_mpi mpirun -np $NPROC $OPTION $BIN/xTraPSV_write_ceof_mpi @@ -95,7 +95,7 @@ mpirun -np $NPROC $OPTION $BIN/fft_face_vert $1 } # -# change format vertical +# change format vertical # function change_format_vertical () { diff --git a/utils/DSM_FOR_SPECFEM3D/shells/scripts_specfem3D.sh b/utils/DSM_FOR_SPECFEM3D/shells/scripts_specfem3D.sh index 453908865..9862db9e9 100755 --- a/utils/DSM_FOR_SPECFEM3D/shells/scripts_specfem3D.sh +++ b/utils/DSM_FOR_SPECFEM3D/shells/scripts_specfem3D.sh @@ -117,5 +117,5 @@ done; tar -jcvf $OUT.tar.bz2 $OUT cd .. - + } diff --git a/utils/DSM_FOR_SPECFEM3D/shells/scripts_specfem3D_wangyi.sh b/utils/DSM_FOR_SPECFEM3D/shells/scripts_specfem3D_wangyi.sh index cac584f82..7ced71f18 100755 --- a/utils/DSM_FOR_SPECFEM3D/shells/scripts_specfem3D_wangyi.sh +++ b/utils/DSM_FOR_SPECFEM3D/shells/scripts_specfem3D_wangyi.sh @@ -28,7 +28,7 @@ function run_create_mesh () { # fonction to create MESH for a chunk # the output files for mesh are put in $MESH directory -# +# current_dir=$(pwd) @@ -60,7 +60,7 @@ $MPIRUN $OPTION_SIMU $BINSEM/xgenerate_databases function run_create_tractions_for_specfem () { -cp ParFileInterface bin/. +cp ParFileInterface bin/. ###cd bin echo '!!!!!!!!!!!!!!!!!!!!! SCRPITS 2 !!!!!!!!!!!!!!!!' @@ -138,5 +138,5 @@ done; tar -jcvf $OUT.tar.bz2 $OUT cd .. - + } diff --git a/utils/DSM_FOR_SPECFEM3D/shells/shells_for_FWI/functions_general.sh b/utils/DSM_FOR_SPECFEM3D/shells/shells_for_FWI/functions_general.sh index 180f631d9..bb070308b 100755 --- a/utils/DSM_FOR_SPECFEM3D/shells/shells_for_FWI/functions_general.sh +++ b/utils/DSM_FOR_SPECFEM3D/shells/shells_for_FWI/functions_general.sh @@ -39,7 +39,7 @@ done #============================================================================ function copy_initial_database () { -cp $DATABASES_INIT_MODEL/* OUTPUT_FILES/DATABASES_MPI/. +cp $DATABASES_INIT_MODEL/* OUTPUT_FILES/DATABASES_MPI/. } #============================================================================ function copy_current_database () diff --git a/utils/DSM_FOR_SPECFEM3D/shells/shells_for_FWI/functions_optimisation.sh b/utils/DSM_FOR_SPECFEM3D/shells/shells_for_FWI/functions_optimisation.sh index caf3bee98..025b198d2 100755 --- a/utils/DSM_FOR_SPECFEM3D/shells/shells_for_FWI/functions_optimisation.sh +++ b/utils/DSM_FOR_SPECFEM3D/shells/shells_for_FWI/functions_optimisation.sh @@ -5,7 +5,7 @@ function compute_direction () # arguments : $1 = iter # $2 = 'alpha', 'beta' or 'gamma' # $3 = long_liss -# $4 = long_lissv +# $4 = long_lissv # $5 = sigma # cd bin @@ -21,7 +21,7 @@ cd .. function gradient_v_2_gradient_poisson () { # -# argument $1 : iter or -1 when linear search is used +# argument $1 : iter or -1 when linear search is used # cd bin @@ -62,7 +62,7 @@ while [ "$ssiter" -le "$nssiter" ] ; do # on copie la base de donnee sauvee cp ./OUTPUT_FILES/DATABASES_MPI_CURRENT/* ./OUTPUT_FILES/DATABASES_MPI/. - update_model $pas + update_model $pas forward_simu ss_iter @@ -88,7 +88,7 @@ while [ "$ssiter" -le "$nssiter" ] ; do echo $tg " " $td " " $pas > t_guess.txt fin=$(< fin) - # sortie + # sortie cd .. ssiter="$ssiter+1" @@ -123,14 +123,14 @@ cd bin # 1. on projette la direction de descente de la grille tomo a la grille SEM $MPIRUN $OPTION_MPI $HYBRID_BINNARY/xproject_sem 0 $SLICE #mpirun -np $NPROC ./xproject_sem 0 $SLICE -# on calcule le nouveau modèle +# on calcule le nouveau modele $MPIRUN $OPTION_MPI $HYBRID_BINNARY/xmodel_update $1 #mpirun -np $NPROC ./xmodel_update $1 cd .. } #================================================================================== function compute_adjoint_source_FWI () -{ +{ cd bin cp ../DATA/define_adjoint_sources_for_FWI.par define_adjoint_sources.par isrc=1 diff --git a/utils/DSM_FOR_SPECFEM3D/shells/shells_for_FWI/functions_set_up.sh b/utils/DSM_FOR_SPECFEM3D/shells/shells_for_FWI/functions_set_up.sh index 4184011f0..d2d22b416 100755 --- a/utils/DSM_FOR_SPECFEM3D/shells/shells_for_FWI/functions_set_up.sh +++ b/utils/DSM_FOR_SPECFEM3D/shells/shells_for_FWI/functions_set_up.sh @@ -18,5 +18,5 @@ bash ./commande_linux.sh rm liste.txt rm commande_linux.sh -cd .. +cd .. } diff --git a/utils/DSM_FOR_SPECFEM3D/shells/shells_for_FWI/functions_simu_mpi.sh b/utils/DSM_FOR_SPECFEM3D/shells/shells_for_FWI/functions_simu_mpi.sh index 1ca855bc1..adc462c8d 100755 --- a/utils/DSM_FOR_SPECFEM3D/shells/shells_for_FWI/functions_simu_mpi.sh +++ b/utils/DSM_FOR_SPECFEM3D/shells/shells_for_FWI/functions_simu_mpi.sh @@ -4,7 +4,7 @@ function forward_simu () # # arguement $1 is name of output directory where the results are -# saved +# saved # isrc=1 @@ -13,15 +13,15 @@ while [ "$isrc" -le "$nsrc" ]; do # forward simu for earthquake isrc cp ./DATA/Par_file_${isrc} ./DATA/Par_file cd bin - $MPIRUN $OPTION_MPI $HYBRID_BINNARY/xspecfem3D > tmp.out + $MPIRUN $OPTION_MPI $HYBRID_BINNARY/xspecfem3D > tmp.out cd .. - # copy and save outputs + # copy and save outputs mkdir -p in_out_files_${isrc}/OUTPUT_FILES/$1 - mv OUTPUT_FILES/* in_out_files_${isrc}/OUTPUT_FILES/$1/. + mv OUTPUT_FILES/* in_out_files_${isrc}/OUTPUT_FILES/$1/. cp in_out_files_${isrc}/OUTPUT_FILES/$1/*semd in_out_files_${isrc}/OUTPUT_FILES/. - # save direct field to prepare adjoint simu + # save direct field to prepare adjoint simu mv OUTPUT_FILES/DATABASES_MPI/*save_forward_arrays.bin $TRACTION/$EARTHQUAKE${isrc}/. mv OUTPUT_FILES/DATABASES_MPI/*_absorb_field.bin $TRACTION/$EARTHQUAKE${isrc}/. @@ -36,15 +36,15 @@ isrc=1 while [ "$isrc" -le "$nsrc" ]; do # copy adjoint source - cp in_out_files_${isrc}/OUTPUT_FILES/WF/*.adj ./in_out_files/SEM/. + cp in_out_files_${isrc}/OUTPUT_FILES/WF/*.adj ./in_out_files/SEM/. # forward simu for earthquake isrc cp ./DATA/Par_file_adj_${isrc} ./DATA/Par_file cd bin $MPIRUN $OPTION_MPI $SEM_BINNARY/xspecfem3D > tmp.out cd .. - - # save kernel + + # save kernel mv ./OUTPUT_FILES/DATABASES_MPI/*kernel.bin in_out_files_${isrc}/OUTPUT_FILES/WF/. mv ./OUTPUT_FILES/DATABASES_MPI/*vp.bin in_out_files_${isrc}/OUTPUT_FILES/WF/. mv ./OUTPUT_FILES/DATABASES_MPI/*vs.bin in_out_files_${isrc}/OUTPUT_FILES/WF/. @@ -66,18 +66,18 @@ cd bin echo $nsrc > path_file_for_gradient_0_alpha.par while [ "$isrc" -le "$nsrc" ]; do - + IN=../in_out_files_${isrc}/OUTPUT_FILES/WF/ OUT=../in_out_files_${isrc}/OUTPUT_FILES/WF/ echo $OUT >> path_file_for_gradient_0_alpha.par $MPIRUN $OPTION_MPI $HYBRID_BINNARY/xproject_tomo_grid 0 $SLICE $PREFIX0 $IN $OUT 0 - mv data_tomo.bin $OUT/grad_alpha_$1.bin + mv data_tomo.bin $OUT/grad_alpha_$1.bin isrc="$isrc+1" -done +done echo $nsrc > path_file_for_gradient_0_beta.par diff --git a/utils/DSM_FOR_SPECFEM3D/shells/shells_for_FWI/msub_lance_invesion_gamma.sh b/utils/DSM_FOR_SPECFEM3D/shells/shells_for_FWI/msub_lance_invesion_gamma.sh index 54fe9b915..27d75ae92 100755 --- a/utils/DSM_FOR_SPECFEM3D/shells/shells_for_FWI/msub_lance_invesion_gamma.sh +++ b/utils/DSM_FOR_SPECFEM3D/shells/shells_for_FWI/msub_lance_invesion_gamma.sh @@ -5,14 +5,14 @@ #MSUB -T 84000 #MSUB -q standard #MSUB -o run_inversion.o -#MSUB -e run_inversion.e +#MSUB -e run_inversion.e # # set -x cd $BRIDGE_MSUB_PWD # -## Chargement des modules module load ... +## Chargement des modules module load ... # load parameters source ./global_parameters.in diff --git a/utils/DSM_FOR_SPECFEM3D/shells/shells_for_FWI/msub_lance_simu.sh b/utils/DSM_FOR_SPECFEM3D/shells/shells_for_FWI/msub_lance_simu.sh index 7a41fecac..0c14dd7f4 100755 --- a/utils/DSM_FOR_SPECFEM3D/shells/shells_for_FWI/msub_lance_simu.sh +++ b/utils/DSM_FOR_SPECFEM3D/shells/shells_for_FWI/msub_lance_simu.sh @@ -5,14 +5,14 @@ #MSUB -T 1800 #MSUB -q standard #MSUB -o run_simu.o -#MSUB -e run_simu.e +#MSUB -e run_simu.e # # set -x cd $BRIDGE_MSUB_PWD # -## Chargement des modules module load ... +## Chargement des modules module load ... # load parameters source ./global_parameters.in diff --git a/utils/Visualization/GMT/movie2gif.gmt.pl b/utils/Visualization/GMT/movie2gif.gmt.pl index e3b88a003..bce3e28ae 100755 --- a/utils/Visualization/GMT/movie2gif.gmt.pl +++ b/utils/Visualization/GMT/movie2gif.gmt.pl @@ -42,7 +42,7 @@ sub Usage { if (@ARGV == 0) {Usage();} if (not getopts('m:f:pg2xns:R:d:')) {die("Check options\n");} if ($opt_m) {$cmt_file = $opt_m; - ($elat,$elon) = get_cmt_location($cmt_file);} + ($elat,$elon) = get_cmt_location($cmt_file);} if (not defined $opt_f) {die("give the start and end of frame\n");} ($start,$end) = split(/\//,$opt_f); diff --git a/utils/Visualization/GMT/plot_shakemap.gmt.pl b/utils/Visualization/GMT/plot_shakemap.gmt.pl index e418ef1e2..89a4c8244 100755 --- a/utils/Visualization/GMT/plot_shakemap.gmt.pl +++ b/utils/Visualization/GMT/plot_shakemap.gmt.pl @@ -109,7 +109,7 @@ sub convert_linear { ($v1,$r1,$g1,$b1,$v2,$r2,$g2,$b2) = split(" ",$line); $v1 = $v1 ** $power, $v2 = $v2 ** $power; printf CPT2 ("%-10.8f\t%s\t%s\t%s\t%-10.8f\t%s\t%s\t%s\n", - $v1,$r1,$g1,$b1,$v2,$r2,$g2,$b2); + $v1,$r1,$g1,$b1,$v2,$r2,$g2,$b2); }else {print CPT2 "$line";} } close(CPT2); diff --git a/utils/Visualization/Paraview/mesh2vtu.pl b/utils/Visualization/Paraview/mesh2vtu.pl index c3963400f..af1e1a5db 100755 --- a/utils/Visualization/Paraview/mesh2vtu.pl +++ b/utils/Visualization/Paraview/mesh2vtu.pl @@ -32,7 +32,7 @@ sub Usage { This is a wrapper around mesh2vtu Brian Savage 6/26/2004 - + END exit(-1); } diff --git a/utils/Visualization/Paraview/mesh2vtu/cell2vtu.pl b/utils/Visualization/Paraview/mesh2vtu/cell2vtu.pl index e025d86c6..1b230755e 100755 --- a/utils/Visualization/Paraview/mesh2vtu/cell2vtu.pl +++ b/utils/Visualization/Paraview/mesh2vtu/cell2vtu.pl @@ -29,7 +29,7 @@ sub Usage { This is a wrapper around cell2vtu Brian Savage 6/26/2004 - + END exit(-1); } diff --git a/utils/Visualization/Paraview/mesh2vtu/century2xyz.pl b/utils/Visualization/Paraview/mesh2vtu/century2xyz.pl index 82d91bc40..8b7ffc77d 100755 --- a/utils/Visualization/Paraview/mesh2vtu/century2xyz.pl +++ b/utils/Visualization/Paraview/mesh2vtu/century2xyz.pl @@ -23,7 +23,7 @@ sub lat_lon_depth_2_xyz { $theta = ($PI/2.0) - atan(0.99329534*tan($lat*$D2R)); $phi = $lon * $D2R; $r0 = 1.0; - + $r = ($R_EARTH_KM - $depth) / $R_EARTH_KM; $x = $r * sin($theta) * cos($phi); $y = $r * sin($theta) * sin($phi); diff --git a/utils/Visualization/Paraview/mesh2vtu/mesh2vtu.pl b/utils/Visualization/Paraview/mesh2vtu/mesh2vtu.pl index 880b34277..f07f64e8a 100755 --- a/utils/Visualization/Paraview/mesh2vtu/mesh2vtu.pl +++ b/utils/Visualization/Paraview/mesh2vtu/mesh2vtu.pl @@ -29,7 +29,7 @@ sub Usage { This is a wrapper around mesh2vtu Brian Savage 6/26/2004 - + END exit(-1); } diff --git a/utils/Visualization/Paraview/mesh2vtu/points2vtu.pl b/utils/Visualization/Paraview/mesh2vtu/points2vtu.pl index 6d0dcd7f6..1fe495b78 100755 --- a/utils/Visualization/Paraview/mesh2vtu/points2vtu.pl +++ b/utils/Visualization/Paraview/mesh2vtu/points2vtu.pl @@ -19,15 +19,15 @@ sub Usage { -L - input is in lon lat depth scalar Input ascii files have this structure: - number_of_points - x_1 y_1 z_1 scalar_1 + number_of_points + x_1 y_1 z_1 scalar_1 ... - x_n y_n z_n scalar_n + x_n y_n z_n scalar_n This is a wrapper around $ugrid Brian Savage 6/26/2004 - + END exit(-1); } @@ -77,7 +77,7 @@ sub lat_lon_depth_2_xyz { $theta = ($PI/2.0) - atan(0.99329534*tan($lat*$D2R)); $phi = $lon * $D2R; $r0 = 1.0; - + $r = ($R_EARTH_KM - $depth) / $R_EARTH_KM; $x = $r * sin($theta) * cos($phi); $y = $r * sin($theta) * sin($phi); diff --git a/utils/Visualization/Paraview/mesh2vtu/surf2vtu.pl b/utils/Visualization/Paraview/mesh2vtu/surf2vtu.pl index 518abc08b..297b3a6ac 100755 --- a/utils/Visualization/Paraview/mesh2vtu/surf2vtu.pl +++ b/utils/Visualization/Paraview/mesh2vtu/surf2vtu.pl @@ -30,7 +30,7 @@ sub Usage { Brian Savage 6/26/2004 Qinya Liu 9/29/2005 modified to deal with quad elements - + END exit(-1); } diff --git a/utils/Visualization/Paraview/visualize_gold/src/cfunc4fortran.c b/utils/Visualization/Paraview/visualize_gold/src/cfunc4fortran.c index 4764451b5..f1760be5b 100644 --- a/utils/Visualization/Paraview/visualize_gold/src/cfunc4fortran.c +++ b/utils/Visualization/Paraview/visualize_gold/src/cfunc4fortran.c @@ -1,5 +1,5 @@ -/* Functions below are intended to be called from fortran routines to write -binary files. +/* Functions below are intended to be called from fortran routines to write +binary files. - First, any number of files (usually 1) are opened using: call open_file(filename, fd) @@ -7,7 +7,7 @@ binary files. written to the file/s corresponding to the file descriptor fd using, e.g., call write_string(string,fd) or call write_integer(integer,fd) or - call write_float(float,fd) + call write_float(float,fd) - Then the file/s are closed using: close_file(fd) ! COMPILE @@ -28,14 +28,14 @@ binary files. /* fname: file name */ /* fd : file descriptor */ - + /* open file to read as a file descriptor (not FILE pointer!)*/ void open_file2read_(char *fname, int *fd) { *fd = open(fname, O_RDONLY, 0); if(*fd == -1) { fprintf(stderr, "ERROR: file %s cannot be opened!\n", fname); exit(-1); - } + } } /* open file to write as a file descriptor (not FILE pointer!)*/ @@ -44,7 +44,7 @@ void open_file2write_(char *fname, int *fd) { if(*fd == -1) { fprintf(stderr, "ERROR: file %s cannot be opened!\n", fname); exit(-1); - } + } } /* open file to append as a file descriptor (not FILE pointer!)*/ @@ -53,7 +53,7 @@ void open_file2append_(char *fname, int *fd) { if(*fd == -1) { fprintf(stderr, "ERROR: file %s cannot be opened!\n", fname); exit(-1); - } + } } /* close file */ @@ -73,7 +73,7 @@ void close_delete_file_(char *fname, int *fd) { } /* write a string */ -void write_string_(char *string, int *fd) { +void write_string_(char *string, int *fd) { int slen; slen=strlen(string); write(*fd, string, slen); @@ -107,7 +107,7 @@ void read_float_(float *z, int *fd) { /* This function determines the byte order of the processor architecture source: http://www.ibm.com/developerworks/aix/library/au-endianc/index.html?ca=drs- -Use a character pointer to the bytes of an int and then check its first byte to +Use a character pointer to the bytes of an int and then check its first byte to see if it is 0 or 1. HISTORY Hom Nath Gharti diff --git a/utils/Visualization/Paraview/visualize_gold/src/read_input.f90 b/utils/Visualization/Paraview/visualize_gold/src/read_input.f90 index 531f39332..9f25fbc66 100644 --- a/utils/Visualization/Paraview/visualize_gold/src/read_input.f90 +++ b/utils/Visualization/Paraview/visualize_gold/src/read_input.f90 @@ -2,7 +2,7 @@ ! REVISION: ! April 09,2010, Hom Nath Gharti ! FEEDBACK: -! homnath_AT_norsar_DOT_no +! homnath_AT_norsar_DOT_no subroutine read_input (inp_fname) use visualize_par use string_process @@ -41,10 +41,10 @@ subroutine read_input (inp_fname) do read(11,'(a)',iostat=ios)line ! This will read a line and proceed to next line if (ios/=0)exit - + ! check for blank and comment line - if (isblank(line) .or. iscomment(line,'#'))cycle - + if (isblank(line) .or. iscomment(line,'#'))cycle + ! look for line continuation tag=trim(line) call last_char(line,tmp_char,ind) @@ -52,9 +52,9 @@ subroutine read_input (inp_fname) slen=len(line) tag=trim(line(1:ind-1)) read(11,'(a)',iostat=ios)line ! This will read a line and proceed to next line - tag=trim(tag)//trim(line) + tag=trim(tag)//trim(line) endif - + call first_token(tag,token) ! read input information if (trim(token)=='input:')then @@ -68,9 +68,9 @@ subroutine read_input (inp_fname) inp_ncomp=get_integer('ncomp',args,narg); allocate(inp_head(inp_ncomp)) if (inp_ncomp==1)then inp_head=get_string('head',args,narg) - elseif (inp_ncomp==3)then ! vector + else if (inp_ncomp==3)then ! vector inp_head=get_string_vect('head',inp_ncomp,args,narg) - elseif (inp_ncomp==6)then ! tensor + else if (inp_ncomp==6)then ! tensor inp_head=get_string_vect('head',inp_ncomp,args,narg) else write(*,'(/,a)')'ERROR: wrong ncomp value in input: line!' @@ -79,49 +79,49 @@ subroutine read_input (inp_fname) inp_ext=get_string('ext',args,narg); inp_ext='.'//trim(inp_ext) dat_topo=get_integer('topo',args,narg) !print*,narg,arg - input_stat=0 - cycle + input_stat=0 + cycle endif - + ! read output information if (trim(token)=='output:')then call split_string(tag,',',args,narg) - !out_path=get_string('path',args,narg) + !out_path=get_string('path',args,narg) call seek_string('path',strval,args,narg) if (.not. isblank(strval))out_path=trim(strval) out_ncomp=get_integer('ncomp',args,narg) !stop out_head=get_string('head',args,narg) - out_vname=get_string('vname',args,narg) + out_vname=get_string('vname',args,narg) out_res=get_integer('res',args,narg) out_format=get_integer('form',args,narg) !print*,narg,arg - output_stat=0 - cycle + output_stat=0 + cycle endif - + ! read processor information if (trim(token)=='procinfo:')then - call split_string(tag,',',args,narg) + call split_string(tag,',',args,narg) proc_head=get_string('head',args,narg) - proc_width=get_integer('width',args,narg) + proc_width=get_integer('width',args,narg) out_nslice=get_integer('nslice',args,narg) slice_npmax=get_integer('npmax',args,narg) allocate(slice_nproc(out_nslice)) - allocate(slice_proc_list(out_nslice,slice_npmax)) + allocate(slice_proc_list(out_nslice,slice_npmax)) if (out_format==1 .and. out_nslice>1)then ! allocate memory for server_name and server_exec allocate(server_name(out_nslice)) allocate(server_exec(out_nslice)) - endif - procinfo_stat=0 - cycle + endif + procinfo_stat=0 + cycle endif - + ! read processor list if (trim(token)=='proclist:')then proclist_stat=-1 - call split_string(tag,',',args,narg) + call split_string(tag,',',args,narg) slice_count1=slice_count1+1 if (slice_count1>out_nslice)then write(*,'(/,a)')'ERROR: number of slices exceeds the actual number!' @@ -131,10 +131,10 @@ subroutine read_input (inp_fname) proc_mode=get_integer('mode',args,narg) if (proc_mode==0)then slice_proc_list(slice_count1,1:slice_nproc(slice_count1)) & - =get_integer_vect('list',slice_nproc(slice_count1),args,narg) - elseif (proc_mode==1)then ! Indicial + =get_integer_vect('list',slice_nproc(slice_count1),args,narg) + else if (proc_mode==1)then ! Indicial proc_ind=get_integer_vect('list',3,args,narg) ! start, end, step - + proc_count=0 do i_proc=proc_ind(1),proc_ind(2),proc_ind(3) proc_count=proc_count+1 @@ -145,32 +145,32 @@ subroutine read_input (inp_fname) slice_proc_list(slice_count1,proc_count)=i_proc enddo slice_nproc(slice_count1)=proc_count - + else write(*,'(/,a)')'ERROR: wrong proc_mode value!' stop - endif - - proclist_stat=0 - cycle + endif + + proclist_stat=0 + cycle endif - + ! read server information - if (output_stat==0 .and. out_format==1 .and. out_nslice>1)then - if (trim(token)=='server:')then - server_stat=-1 + if (output_stat==0 .and. out_format==1 .and. out_nslice>1)then + if (trim(token)=='server:')then + server_stat=-1 call split_string(tag,',',args,narg) slice_count2=slice_count2+1 if (slice_count2>out_nslice)then write(*,'(/,a)')'ERROR: number of slices exceeds the actual number!' stop - endif + endif server_name(slice_count2)=get_string('name',args,narg) - server_exec(slice_count2)=get_string('exec',args,narg) - server_stat=0 - cycle + server_exec(slice_count2)=get_string('exec',args,narg) + server_stat=0 + cycle endif - endif + endif enddo ! do @@ -191,7 +191,7 @@ subroutine read_input (inp_fname) if (out_format==1 .and. slice_count2==1 .and. out_nslice>1)then ! set server name and executable for all other server_name(2:out_nslice)=server_name(1) - server_exec(2:out_nslice)=server_exec(1) + server_exec(2:out_nslice)=server_exec(1) endif ! check input status diff --git a/utils/Visualization/Paraview/visualize_gold/src/string_process.f90 b/utils/Visualization/Paraview/visualize_gold/src/string_process.f90 index 6d2974f49..f46b05f9e 100644 --- a/utils/Visualization/Paraview/visualize_gold/src/string_process.f90 +++ b/utils/Visualization/Paraview/visualize_gold/src/string_process.f90 @@ -133,7 +133,7 @@ subroutine split_string(str,delm,args,narg) slen=len_trim(str) tmp_str=trim(str) -! find and count indices of all delimeters +! find and count indices of all delimeters narg=0 do i=1,slen if(tmp_str(i:i)==delm)then @@ -156,19 +156,19 @@ end subroutine split_string !===================================================== ! get string value from string list which contain a character '=' that separates -! variable name and variable vlue +! variable name and variable vlue character(len=80) function get_string(vname,slist,nvar) character(len=*),intent(in) :: vname character(len=*),dimension(*) :: slist integer,intent(in) :: nvar -character(len=80),dimension(2) :: args +character(len=80),dimension(2) :: args integer :: i,narg do i=1,nvar call split_string(slist(i),'=',args,narg) if (narg/=2)cycle if (vname==trim(adjustl(args(1))))then - read(args(2),*)get_string + read(args(2),*)get_string return endif enddo @@ -185,7 +185,7 @@ subroutine seek_string(vname,strval,slist,nvar) character(len=*),intent(out) :: strval character(len=*),dimension(*) :: slist integer,intent(in) :: nvar -character(len=80),dimension(2) :: args +character(len=80),dimension(2) :: args integer :: i,narg strval='' @@ -213,7 +213,7 @@ function get_string_vect(vname,n,slist,nvar) integer,intent(in) :: n character(len=*),dimension(*),intent(in) :: slist integer,intent(in) :: nvar -character(len=80),dimension(2) :: args +character(len=80),dimension(2) :: args integer :: i,narg do i=1,nvar @@ -236,7 +236,7 @@ integer function get_integer(vname,slist,nvar) character(len=*),intent(in) :: vname character(len=*),dimension(*),intent(in) :: slist integer,intent(in) :: nvar -character(len=80),dimension(2) :: args +character(len=80),dimension(2) :: args integer :: i,narg do i=1,nvar @@ -262,7 +262,7 @@ function get_integer_vect(vname,n,slist,nvar) character(len=*),intent(in) :: vname character(len=*),dimension(*),intent(in) :: slist integer,intent(in) :: nvar -character(len=80),dimension(2) :: args +character(len=80),dimension(2) :: args integer :: i,narg do i=1,nvar @@ -285,7 +285,7 @@ real function get_real(vname,slist,nvar) character(len=*),intent(in) :: vname character(len=*),dimension(*),intent(in) :: slist integer,intent(in) :: nvar -character(len=80),dimension(2) :: args +character(len=80),dimension(2) :: args integer :: i,narg do i=1,nvar diff --git a/utils/Visualization/Paraview/visualize_gold/src/visualize.f90 b/utils/Visualization/Paraview/visualize_gold/src/visualize.f90 index c5641777a..36b774d04 100644 --- a/utils/Visualization/Paraview/visualize_gold/src/visualize.f90 +++ b/utils/Visualization/Paraview/visualize_gold/src/visualize.f90 @@ -25,12 +25,12 @@ program visualize ! This programs writes Ensight Gold binary file collecting binary mesh and volume data -! files produced by SPECFEM3D. The Ensight Gold file can then be visualized in +! files produced by SPECFEM3D. The Ensight Gold file can then be visualized in ! VTK/ParaView. See http://www.vtk.org and http://www.paraview.org for details. !------------------------------------------ ! DEPENDENCY: ! cfunc4fortran.c, visualize_par.f90, visualize_collect.f90, write_ensight.f90, -! write_vtu.f90 +! write_vtu.f90 ! COMPILE ! >> make ! USAGE @@ -42,42 +42,42 @@ program visualize ! Mar 10,2010 (NORSAR) ! FEEDBACK: ! homnath_AT_norsar_DOT_no -!------------------------------------------ - +!------------------------------------------ + use visualize_par implicit none integer :: i_slice -character(len=80) :: inp_fname - +character(len=80) :: inp_fname + !write(*,*)iargc() if (iargc() <= 0) then write(*,'(/,a)')'ERROR: no input file!' stop! counts total number of nodes and elementsp endif - + write(*,'(a)',advance='no')'reading main input file...' call getarg(1,inp_fname) - + call read_input(inp_fname) write(*,'(a)')'complete!' - + ! check and display key input parameters...' if (out_res == 0) then NENOD_OUT = 8 -elseif (out_res == 1) then +else if (out_res == 1) then NENOD_OUT = 20 -elseif (out_res == 2) then +else if (out_res == 2) then NENOD_OUT = 8 else write(*,'(/,a)')'ERROR: wrong out_res value!' stop -endif +endif if (out_ncomp > inp_ncomp)then write(*,'(/,a)')'ERROR: number of components for output cannot be greater than for input!' stop -elseif (out_ncomp>1 .and. out_ncomp /= inp_ncomp)then +else if (out_ncomp>1 .and. out_ncomp /= inp_ncomp)then write(*,'(/,a)')'ERROR: not supported components transformation!' stop endif @@ -89,9 +89,9 @@ program visualize write(*,*)'input directory:',inp_path if (inp_ncomp==1) then write(*,*) 'input data type: SCALAR' -elseif (inp_ncomp==3) then +else if (inp_ncomp==3) then write(*,*) 'input data type: VECTOR' -elseif (inp_ncomp==6) then +else if (inp_ncomp==6) then write(*,*) 'input data type: 9C SYMMETRIC TENSOR' else write(*,'(/,a)')'ERROR: unsupported data type!' @@ -100,9 +100,9 @@ program visualize write(*,*)'output directory:',out_path if (out_ncomp==1) then write(*,*) 'output data type: SCALAR' -elseif (out_ncomp==3) then +else if (out_ncomp==3) then write(*,*) 'output data type: VECTOR' -elseif (out_ncomp==6) then +else if (out_ncomp==6) then write(*,*) 'output data type: 9C SYMMETRIC TENSOR' else write(*,'(/,a)')'ERROR: unsupported data type!' @@ -110,7 +110,7 @@ program visualize endif if (out_format==0) then write(*,*)'output format: VTK' -elseif (out_format==1) then +else if (out_format==1) then write(*,*)'output format: Ensight Gold' else write(*,'(/,a)')'ERROR: unsupported output format!' @@ -118,9 +118,9 @@ program visualize endif if (out_res==0) then write(*,*)'resolution: LOW' -elseif (out_res==1) then +else if (out_res==1) then write(*,*)'resolution: MEDIUM' -elseif (out_res==2) then +else if (out_res==2) then write(*,*)'resolution: HIGH' else write(*,'(/,a)')'ERROR: unsupported resolution!' @@ -128,30 +128,30 @@ program visualize endif write(*,*)'number of output slices: ',out_nslice - + write(*,'(a)')'-------------------------------' write(*,'(a)',advance='no')'counting meshes...' - + ! count total number of nodes and elements in all slices allocate(slice_nnode(out_nslice)) allocate(slice_nelmt(out_nslice)) ! Loop over output slices -do i_slice=1,out_nslice - +do i_slice=1,out_nslice + slice_nnode(i_slice) = 0 slice_nelmt(i_slice) = 0 - + call cvd_count_totals_ext_mesh(slice_nproc(i_slice), & slice_proc_list(i_slice,1:slice_nproc(i_slice)),proc_width, & - inp_path,slice_nnode(i_slice),slice_nelmt(i_slice),out_res) - !write(*,*)i_slice,slice_nnode(i_slice),slice_nelmt(i_slice) + inp_path,slice_nnode(i_slice),slice_nelmt(i_slice),out_res) + !write(*,*)i_slice,slice_nnode(i_slice),slice_nelmt(i_slice) enddo write(*,'(a)')'complete!' - + if (out_format==0)then ! VTK files call write_vtu() -elseif (out_format==1)then +else if (out_format==1)then ! Ensight Gold files call write_ensight() else @@ -159,5 +159,5 @@ program visualize stop endif write(*,'(a)')'-------------------------------' - + end program visualize diff --git a/utils/Visualization/Paraview/visualize_gold/src/visualize_collect.f90 b/utils/Visualization/Paraview/visualize_gold/src/visualize_collect.f90 index 1928ba92e..70186ebda 100644 --- a/utils/Visualization/Paraview/visualize_gold/src/visualize_collect.f90 +++ b/utils/Visualization/Paraview/visualize_gold/src/visualize_collect.f90 @@ -55,15 +55,15 @@ subroutine cvd_count_totals_ext_mesh(nproc,proc_list,proc_width,inp_dir,& elmt_count = 0 write(tmp_str,*)proc_width -write(proc_width_str,*)trim(adjustl(tmp_str))//'.'//trim(adjustl(tmp_str)) +write(proc_width_str,*)trim(adjustl(tmp_str))//'.'//trim(adjustl(tmp_str)) format_str='(a,i'//trim(adjustl(proc_width_str))//',a)' do i_proc = 1, nproc ! gets number of elements and points for this slice iproc = proc_list(i_proc) - - write(mesh_fname,fmt=format_str) trim(inp_dir)//'/proc',iproc,'_external_mesh.bin' + + write(mesh_fname,fmt=format_str) trim(inp_dir)//'/proc',iproc,'_external_mesh.bin' open(unit=27,file=trim(mesh_fname),status='old',action='read',form='unformatted',iostat=ios) if (ios /= 0) then write(*,'(/,a)')'ERROR: file '//trim(mesh_fname)//' cannot be opend!' @@ -71,29 +71,29 @@ subroutine cvd_count_totals_ext_mesh(nproc,proc_list,proc_width,inp_dir,& endif read(27) NSPEC_AB - read(27) NGLOB_AB + read(27) NGLOB_AB ! gets ibool if(out_res/=2) then allocate(ibool(NGLLX,NGLLY,NGLLZ,NSPEC_AB)) read(27) ibool endif - close(27) - + close(27) + ! calculates totals if(out_res==2) then ! total number of global points node_count = node_count + NGLOB_AB ! total number of elements - ! each spectral elements gets subdivided by GLL points, + ! each spectral elements gets subdivided by GLL points, ! which form (NGLLX-1)*(NGLLY-1)*(NGLLZ-1) sub-elements - nelement = NSPEC_AB * (NGLLX-1) * (NGLLY-1) * (NGLLZ-1) + nelement = NSPEC_AB * (NGLLX-1) * (NGLLY-1) * (NGLLZ-1) elmt_count = elmt_count + nelement - elseif (out_res==1)then ! Medium resolution + else if (out_res==1)then ! Medium resolution ! mark element corners (global AVS or DX points) - allocate(mask_ibool(NGLOB_AB)) + allocate(mask_ibool(NGLOB_AB)) mask_ibool = .false. do i_spec=1,NSPEC_AB ! Bottom corners @@ -146,19 +146,19 @@ subroutine cvd_count_totals_ext_mesh(nproc,proc_list,proc_width,inp_dir,& !mask_ibool(iglob18) = .true. !mask_ibool(iglob19) = .true. !mask_ibool(iglob20) = .true. - enddo + enddo ! count global number of AVS or DX points - npoint = count(mask_ibool(:)) + npoint = count(mask_ibool(:)) node_count = node_count + npoint - + ! total number of spectral elements elmt_count = elmt_count + NSPEC_AB deallocate(mask_ibool) - elseif (out_res==0)then ! + else if (out_res==0)then ! ! mark element corners (global AVS or DX points) - allocate(mask_ibool(NGLOB_AB)) + allocate(mask_ibool(NGLOB_AB)) mask_ibool = .false. do i_spec=1,NSPEC_AB iglob(1)=ibool(1,1,1,i_spec) @@ -177,13 +177,13 @@ subroutine cvd_count_totals_ext_mesh(nproc,proc_list,proc_width,inp_dir,& !mask_ibool(iglob6) = .true. !mask_ibool(iglob7) = .true. !mask_ibool(iglob8) = .true. - enddo + enddo ! count global number of AVS or DX points - npoint = count(mask_ibool(:)) + npoint = count(mask_ibool(:)) node_count = node_count + npoint - + ! total number of spectral elements elmt_count = elmt_count + NSPEC_AB deallocate(mask_ibool) @@ -194,10 +194,10 @@ subroutine cvd_count_totals_ext_mesh(nproc,proc_list,proc_width,inp_dir,& if(out_res/=2) then deallocate(ibool) endif - + enddo - -end subroutine cvd_count_totals_ext_mesh + +end subroutine cvd_count_totals_ext_mesh !============================================================= @@ -223,7 +223,7 @@ subroutine cvd_write_corners_only(NSPEC_AB,NGLOB_AB,ibool,xstore,ystore,zstore,& integer,dimension(NENOD_OUT) :: iglob integer :: fd_x, fd_y, fd_z -! writes our corner point locations +! writes our corner point locations allocate(mask_ibool(NGLOB_AB)) mask_ibool(:) = .false. numpoin = 0 @@ -236,7 +236,7 @@ subroutine cvd_write_corners_only(NSPEC_AB,NGLOB_AB,ibool,xstore,ystore,zstore,& iglob(6)=ibool(NGLLX,1,NGLLZ,i_spec) iglob(7)=ibool(NGLLX,NGLLY,NGLLZ,i_spec) iglob(8)=ibool(1,NGLLY,NGLLZ,i_spec) - + do i_node=1,NENOD_OUT if(.not. mask_ibool(iglob(i_node))) then numpoin = numpoin + 1 @@ -246,13 +246,13 @@ subroutine cvd_write_corners_only(NSPEC_AB,NGLOB_AB,ibool,xstore,ystore,zstore,& call write_real(x,fd_x) call write_real(y,fd_y) call write_real(z,fd_z) - + mask_ibool(iglob(i_node)) = .true. endif enddo enddo ! i_spec - !stop + !stop end subroutine cvd_write_corners_only !============================================================= @@ -275,9 +275,9 @@ subroutine cvd_write_hexa20_only(NSPEC_AB,NGLOB_AB,ibool,xstore,ystore,zstore,& real :: x, y, z integer :: i_spec integer,dimension(NENOD_OUT) :: iglob -integer :: fd_x, fd_y, fd_z +integer :: fd_x, fd_y, fd_z -! writes our corner point locations +! writes our corner point locations allocate(mask_ibool(NGLOB_AB)) mask_ibool(:) = .false. numpoin = 0 @@ -321,13 +321,13 @@ subroutine cvd_write_hexa20_only(NSPEC_AB,NGLOB_AB,ibool,xstore,ystore,zstore,& call write_real(x,fd_x) call write_real(y,fd_y) call write_real(z,fd_z) - + mask_ibool(iglob(i_node)) = .true. endif - enddo + enddo enddo ! i_spec - !stop + !stop end subroutine cvd_write_hexa20_only !============================================================= @@ -368,7 +368,7 @@ subroutine cvd_write_GLL_points_only(NSPEC_AB,NGLOB_AB,ibool,xstore,ystore,zstor z = zstore(iglob1) call write_real(x,fd_x) call write_real(y,fd_y) - call write_real(z,fd_z) + call write_real(z,fd_z) mask_ibool(iglob1) = .true. endif enddo ! i @@ -389,7 +389,7 @@ subroutine cvd_write_corners_data(NSPEC_AB,NGLOB_AB,ibool,dat,& !include 'constants.h' integer,intent(in) :: NSPEC_AB,NGLOB_AB -integer,dimension(NGLLX,NGLLY,NGLLZ,NSPEC_AB),intent(in) :: ibool +integer,dimension(NGLLX,NGLLY,NGLLZ,NSPEC_AB),intent(in) :: ibool real,dimension(NGLLY,NGLLY,NGLLZ,NSPEC_AB),intent(in) :: dat integer:: i_node,numpoin @@ -401,7 +401,7 @@ subroutine cvd_write_corners_data(NSPEC_AB,NGLOB_AB,ibool,dat,& real,dimension(NENOD_OUT) :: tmp_dat integer :: fd -! writes out corner point locations +! writes out corner point locations allocate(mask_ibool(NGLOB_AB)) mask_ibool(:) = .false. numpoin = 0 @@ -414,7 +414,7 @@ subroutine cvd_write_corners_data(NSPEC_AB,NGLOB_AB,ibool,dat,& iglob(6)=ibool(NGLLX,1,NGLLZ,i_spec) iglob(7)=ibool(NGLLX,NGLLY,NGLLZ,i_spec) iglob(8)=ibool(1,NGLLY,NGLLZ,i_spec) - + ! Nodal data in a element tmp_dat(1)=dat(1,1,1,i_spec) tmp_dat(2)=dat(NGLLX,1,1,i_spec) @@ -424,7 +424,7 @@ subroutine cvd_write_corners_data(NSPEC_AB,NGLOB_AB,ibool,dat,& tmp_dat(6)=dat(NGLLX,1,NGLLZ,i_spec) tmp_dat(7)=dat(NGLLX,NGLLY,NGLLZ,i_spec) tmp_dat(8)=dat(1,NGLLY,NGLLZ,i_spec) - + do i_node=1,NENOD_OUT if(.not. mask_ibool(iglob(i_node))) then numpoin = numpoin + 1 @@ -432,9 +432,9 @@ subroutine cvd_write_corners_data(NSPEC_AB,NGLOB_AB,ibool,dat,& mask_ibool(iglob(i_node)) = .true. endif enddo - + enddo ! i_spec - + end subroutine cvd_write_corners_data !============================================================= @@ -448,7 +448,7 @@ subroutine cvd_write_corners_data_glob(NSPEC_AB,NGLOB_AB,ibool,dat,& !include 'constants.h' integer,intent(in) :: NSPEC_AB,NGLOB_AB -integer,dimension(NGLLX,NGLLY,NGLLZ,NSPEC_AB),intent(in) :: ibool +integer,dimension(NGLLX,NGLLY,NGLLZ,NSPEC_AB),intent(in) :: ibool real,dimension(NGLOB_AB),intent(in) :: dat integer:: i_node,numpoin @@ -459,7 +459,7 @@ subroutine cvd_write_corners_data_glob(NSPEC_AB,NGLOB_AB,ibool,dat,& integer,dimension(NENOD_OUT) :: iglob integer :: fd -! writes out corner point locations +! writes out corner point locations allocate(mask_ibool(NGLOB_AB)) mask_ibool(:) = .false. numpoin = 0 @@ -472,7 +472,7 @@ subroutine cvd_write_corners_data_glob(NSPEC_AB,NGLOB_AB,ibool,dat,& iglob(6)=ibool(NGLLX,1,NGLLZ,i_spec) iglob(7)=ibool(NGLLX,NGLLY,NGLLZ,i_spec) iglob(8)=ibool(1,NGLLY,NGLLZ,i_spec) - + do i_node=1,NENOD_OUT if(.not. mask_ibool(iglob(i_node))) then numpoin = numpoin + 1 @@ -482,7 +482,7 @@ subroutine cvd_write_corners_data_glob(NSPEC_AB,NGLOB_AB,ibool,dat,& enddo enddo ! i_spec - + end subroutine cvd_write_corners_data_glob !============================================================= @@ -496,7 +496,7 @@ subroutine cvd_write_hexa20_data(NSPEC_AB,NGLOB_AB,ibool,dat,& !include 'constants.h' integer,intent(in) :: NSPEC_AB,NGLOB_AB -integer,dimension(NGLLX,NGLLY,NGLLZ,NSPEC_AB),intent(in) :: ibool +integer,dimension(NGLLX,NGLLY,NGLLZ,NSPEC_AB),intent(in) :: ibool real,dimension(NGLLY,NGLLY,NGLLZ,NSPEC_AB),intent(in) :: dat integer:: i_node,numpoin @@ -508,7 +508,7 @@ subroutine cvd_write_hexa20_data(NSPEC_AB,NGLOB_AB,ibool,dat,& real,dimension(NENOD_OUT) :: tmp_dat integer :: fd -! writes out corner point locations +! writes out corner point locations allocate(mask_ibool(NGLOB_AB)) mask_ibool(:) = .false. numpoin = 0 @@ -542,7 +542,7 @@ subroutine cvd_write_hexa20_data(NSPEC_AB,NGLOB_AB,ibool,dat,& iglob(18)=ibool(NGLLX,1,NGLLZ_MID,i_spec) iglob(19)=ibool(NGLLX,NGLLY,NGLLZ_MID,i_spec) iglob(20)=ibool(1,NGLLY,NGLLZ_MID,i_spec) - + ! Nodal data in a element ! Bottom corners tmp_dat(1)=dat(1,1,1,i_spec) @@ -573,17 +573,17 @@ subroutine cvd_write_hexa20_data(NSPEC_AB,NGLOB_AB,ibool,dat,& tmp_dat(18)=dat(NGLLX,1,NGLLZ_MID,i_spec) tmp_dat(19)=dat(NGLLX,NGLLY,NGLLZ_MID,i_spec) tmp_dat(20)=dat(1,NGLLY,NGLLZ_MID,i_spec) - + do i_node=1,NENOD_OUT if(.not. mask_ibool(iglob(i_node))) then numpoin = numpoin + 1 call write_real(tmp_dat(i_node),fd) mask_ibool(iglob(i_node)) = .true. endif - enddo - + enddo + enddo ! i_spec - + end subroutine cvd_write_hexa20_data !============================================================= @@ -597,7 +597,7 @@ subroutine cvd_write_hexa20_data_glob(NSPEC_AB,NGLOB_AB,ibool,dat,& !include 'constants.h' integer,intent(in) :: NSPEC_AB,NGLOB_AB -integer,dimension(NGLLX,NGLLY,NGLLZ,NSPEC_AB),intent(in) :: ibool +integer,dimension(NGLLX,NGLLY,NGLLZ,NSPEC_AB),intent(in) :: ibool real,dimension(NGLOB_AB),intent(in) :: dat integer:: i_node,numpoin @@ -608,7 +608,7 @@ subroutine cvd_write_hexa20_data_glob(NSPEC_AB,NGLOB_AB,ibool,dat,& integer,dimension(NENOD_OUT) :: iglob integer :: fd -! writes out corner point locations +! writes out corner point locations allocate(mask_ibool(NGLOB_AB)) mask_ibool(:) = .false. numpoin = 0 @@ -649,12 +649,12 @@ subroutine cvd_write_hexa20_data_glob(NSPEC_AB,NGLOB_AB,ibool,dat,& call write_real(dat(iglob(i_node)),fd) mask_ibool(iglob(i_node)) = .true. endif - enddo + enddo enddo ! i_spec - + end subroutine cvd_write_hexa20_data_glob -!============================================================= +!============================================================= subroutine cvd_write_GLL_points_data(NSPEC_AB,NGLOB_AB,ibool,dat,& numpoin,fd) @@ -666,7 +666,7 @@ subroutine cvd_write_GLL_points_data(NSPEC_AB,NGLOB_AB,ibool,dat,& !include 'constants.h' integer,intent(in) :: NSPEC_AB,NGLOB_AB -integer,dimension(NGLLX,NGLLY,NGLLZ,NSPEC_AB),intent(in) :: ibool +integer,dimension(NGLLX,NGLLY,NGLLZ,NSPEC_AB),intent(in) :: ibool real,dimension(NGLLY,NGLLY,NGLLZ,NSPEC_AB),intent(in) :: dat integer:: numpoin @@ -686,7 +686,7 @@ subroutine cvd_write_GLL_points_data(NSPEC_AB,NGLOB_AB,ibool,dat,& do i = 1, NGLLX iglob1 = ibool(i,j,k,i_spec) if(.not. mask_ibool(iglob1)) then - numpoin = numpoin + 1 + numpoin = numpoin + 1 call write_real(dat(i,j,k,i_spec),fd) mask_ibool(iglob1) = .true. endif @@ -695,7 +695,7 @@ subroutine cvd_write_GLL_points_data(NSPEC_AB,NGLOB_AB,ibool,dat,& enddo ! k enddo !i_spec -end subroutine cvd_write_GLL_points_data +end subroutine cvd_write_GLL_points_data !============================================================= subroutine cvd_write_GLL_points_data_glob(NSPEC_AB,NGLOB_AB,ibool,dat,& @@ -708,7 +708,7 @@ subroutine cvd_write_GLL_points_data_glob(NSPEC_AB,NGLOB_AB,ibool,dat,& !include 'constants.h' integer,intent(in) :: NSPEC_AB,NGLOB_AB -integer,dimension(NGLLX,NGLLY,NGLLZ,NSPEC_AB),intent(in) :: ibool +integer,dimension(NGLLX,NGLLY,NGLLZ,NSPEC_AB),intent(in) :: ibool real,dimension(NGLOB_AB),intent(in) :: dat integer:: numpoin @@ -728,7 +728,7 @@ subroutine cvd_write_GLL_points_data_glob(NSPEC_AB,NGLOB_AB,ibool,dat,& do i = 1, NGLLX iglob1 = ibool(i,j,k,i_spec) if(.not. mask_ibool(iglob1)) then - numpoin = numpoin + 1 + numpoin = numpoin + 1 call write_real(dat(iglob1),fd) mask_ibool(iglob1) = .true. endif @@ -737,7 +737,7 @@ subroutine cvd_write_GLL_points_data_glob(NSPEC_AB,NGLOB_AB,ibool,dat,& enddo ! k enddo !i_spec -end subroutine cvd_write_GLL_points_data_glob +end subroutine cvd_write_GLL_points_data_glob !============================================================= ! writes out locations of spectral element corners only @@ -755,8 +755,8 @@ subroutine cvd_write_corner_elements(NSPEC_AB,NGLOB_AB,ibool,& ! local parameters logical,dimension(:),allocatable :: mask_ibool -integer,dimension(:),allocatable :: num_ibool -integer :: i_spec +integer,dimension(:),allocatable :: num_ibool +integer :: i_spec integer,dimension(NENOD_OUT) :: iglob integer :: inode integer :: fd @@ -766,8 +766,8 @@ subroutine cvd_write_corner_elements(NSPEC_AB,NGLOB_AB,ibool,& allocate(num_ibool(NGLOB_AB)) mask_ibool(:) = .false. num_ibool(:) = 0 -numpoin = 0 -do i_spec=1,NSPEC_AB +numpoin = 0 +do i_spec=1,NSPEC_AB ! gets corner indices iglob(1)=ibool(1,1,1,i_spec) iglob(2)=ibool(NGLLX,1,1,i_spec) @@ -783,7 +783,7 @@ subroutine cvd_write_corner_elements(NSPEC_AB,NGLOB_AB,ibool,& if(.not. mask_ibool(iglob(i_node))) then numpoin = numpoin + 1 num_ibool(iglob(i_node)) = numpoin - mask_ibool(iglob(i_node)) = .true. + mask_ibool(iglob(i_node)) = .true. endif enddo do i_node=1,NENOD_OUT @@ -797,8 +797,8 @@ subroutine cvd_write_corner_elements(NSPEC_AB,NGLOB_AB,ibool,& ! updates points written np = np + numpoin - -end subroutine cvd_write_corner_elements + +end subroutine cvd_write_corner_elements !============================================================= ! writes out locations of spectral element corners only @@ -816,10 +816,10 @@ subroutine cvd_write_hexa20_elements(NSPEC_AB,NGLOB_AB,ibool,& ! local parameters logical,dimension(:),allocatable :: mask_ibool -integer,dimension(:),allocatable :: num_ibool -integer :: i_spec +integer,dimension(:),allocatable :: num_ibool +integer :: i_spec integer,dimension(NENOD_OUT) :: iglob -integer :: inode +integer :: inode integer :: fd ! writes out element indices @@ -827,8 +827,8 @@ subroutine cvd_write_hexa20_elements(NSPEC_AB,NGLOB_AB,ibool,& allocate(num_ibool(NGLOB_AB)) mask_ibool(:) = .false. num_ibool(:) = 0 -numpoin = 0 -do i_spec=1,NSPEC_AB +numpoin = 0 +do i_spec=1,NSPEC_AB ! Bottom corners iglob(1)=ibool(1,1,1,i_spec) iglob(2)=ibool(NGLLX,1,1,i_spec) @@ -864,14 +864,14 @@ subroutine cvd_write_hexa20_elements(NSPEC_AB,NGLOB_AB,ibool,& if(.not. mask_ibool(iglob(i_node))) then numpoin = numpoin + 1 num_ibool(iglob(i_node)) = numpoin - mask_ibool(iglob(i_node)) = .true. + mask_ibool(iglob(i_node)) = .true. endif enddo do i_node=1,NENOD_OUT inode = num_ibool(iglob(i_node)) + np ! -1 call write_integer(inode,fd) enddo - + enddo ! elements written @@ -879,15 +879,15 @@ subroutine cvd_write_hexa20_elements(NSPEC_AB,NGLOB_AB,ibool,& ! updates points written np = np + numpoin - -end subroutine cvd_write_hexa20_elements + +end subroutine cvd_write_hexa20_elements !============================================================= subroutine cvd_write_GLL_elements(NSPEC_AB,NGLOB_AB,ibool, & np,nelement,numpoin,fd) -! writes out indices of elements given by GLL points +! writes out indices of elements given by GLL points use visualize_constants implicit none @@ -899,7 +899,7 @@ subroutine cvd_write_GLL_elements(NSPEC_AB,NGLOB_AB,ibool, & ! local parameters logical,dimension(:),allocatable :: mask_ibool -integer,dimension(:),allocatable :: num_ibool +integer,dimension(:),allocatable :: num_ibool integer :: i_spec,i,j,k integer,dimension(NENOD_OUT) :: iglob integer :: iglob1,inode @@ -910,7 +910,7 @@ subroutine cvd_write_GLL_elements(NSPEC_AB,NGLOB_AB,ibool, & allocate(num_ibool(NGLOB_AB)) mask_ibool(:) = .false. num_ibool(:) = 0 -numpoin = 0 +numpoin = 0 do i_spec=1,NSPEC_AB do k = 1, NGLLZ do j = 1, NGLLY @@ -948,7 +948,7 @@ subroutine cvd_write_GLL_elements(NSPEC_AB,NGLOB_AB,ibool, & enddo enddo ! elements written -nelement = NSPEC_AB * (NGLLX-1) * (NGLLY-1) * (NGLLZ-1) +nelement = NSPEC_AB * (NGLLX-1) * (NGLLY-1) * (NGLLZ-1) ! updates points written np = np + numpoin @@ -987,7 +987,7 @@ subroutine cvd_write_corners(NSPEC_AB,NGLOB_AB,ibool,xstore,ystore,zstore,dat,& call write_integer(npp) endif -! writes our corner point locations +! writes our corner point locations allocate(mask_ibool(NGLOB_AB)) mask_ibool(:) = .false. numpoin = 0 @@ -1000,7 +1000,7 @@ subroutine cvd_write_corners(NSPEC_AB,NGLOB_AB,ibool,xstore,ystore,zstore,dat,& iglob(6)=ibool(NGLLX,1,NGLLZ,i_spec) iglob(7)=ibool(NGLLX,NGLLY,NGLLZ,i_spec) iglob(8)=ibool(1,NGLLY,NGLLZ,i_spec) - + tmp_dat(1)=dat(1,1,1,i_spec) tmp_dat(2)=dat(NGLLX,1,1,i_spec) tmp_dat(3)=dat(NGLLX,NGLLY,1,i_spec) @@ -1009,7 +1009,7 @@ subroutine cvd_write_corners(NSPEC_AB,NGLOB_AB,ibool,xstore,ystore,zstore,dat,& tmp_dat(6)=dat(NGLLX,1,NGLLZ,i_spec) tmp_dat(7)=dat(NGLLX,NGLLY,NGLLZ,i_spec) tmp_dat(8)=dat(1,NGLLY,NGLLZ,i_spec) - + do i_node=1,NENOD_OUT if(.not. mask_ibool(iglob(i_node))) then numpoin = numpoin + 1 @@ -1025,7 +1025,7 @@ subroutine cvd_write_corners(NSPEC_AB,NGLOB_AB,ibool,xstore,ystore,zstore,dat,& enddo enddo ! i_spec - + end subroutine cvd_write_corners !============================================================= @@ -1082,4 +1082,4 @@ subroutine cvd_write_GLL_points(NSPEC_AB,NGLOB_AB,ibool,xstore,ystore,zstore,dat end subroutine cvd_write_GLL_points !============================================================= - + diff --git a/utils/Visualization/Paraview/visualize_gold/src/visualize_par.f90 b/utils/Visualization/Paraview/visualize_gold/src/visualize_par.f90 index 6ca495ec2..debbe3301 100644 --- a/utils/Visualization/Paraview/visualize_gold/src/visualize_par.f90 +++ b/utils/Visualization/Paraview/visualize_gold/src/visualize_par.f90 @@ -51,7 +51,7 @@ module visualize_constants integer, parameter :: NDIM = 3 integer, parameter :: NGNOD = 8 !---------------------------------------------- - + integer, parameter :: SIZE_INT = 4 integer, parameter :: SIZE_FLOAT = 4 character(len=1),parameter :: CR = achar(13) ! Carriage-return for overwriting @@ -63,13 +63,13 @@ end module visualize_constants module visualize_par use visualize_constants -implicit none +implicit none ! mesh coordinates real(kind=CUSTOM_REAL),dimension(:),allocatable :: xstore, ystore, zstore integer, dimension(:,:,:,:),allocatable :: ibool -integer :: NSPEC_AB, NGLOB_AB +integer :: NSPEC_AB, NGLOB_AB ! input information integer :: inp_ncomp @@ -82,7 +82,7 @@ module visualize_par ! output information integer :: out_format,out_ncomp,out_res,out_nslice character(len=20) :: out_ext -character(len=80) :: out_path,out_fname,out_head,out_vname +character(len=80) :: out_path,out_fname,out_head,out_vname ! File descriptors integer :: fd,fd_con,fd_x,fd_y,fd_z @@ -92,16 +92,16 @@ module visualize_par ! processor and slice infromation integer :: proc_width character(len=20) :: proc_form,proc_width_str -character(len=60) :: proc_head -integer,dimension(:),allocatable :: slice_nnode,slice_nelmt ! Number of nodes and element in output slice +character(len=60) :: proc_head +integer,dimension(:),allocatable :: slice_nnode,slice_nelmt ! Number of nodes and element in output slice integer,allocatable,dimension(:,:) :: slice_proc_list ! Procesor list in ouput slice integer,allocatable,dimension(:) :: slice_nproc ! Number of input procesors in output slice character(len=60),allocatable,dimension(:) :: server_name, server_exec -character(len=80) :: format_str1,format_str2,format_str3,num_str1,num_str2,tmp_str -real :: tmp_real +character(len=80) :: format_str1,format_str2,format_str3,num_str1,num_str2,tmp_str +real :: tmp_real integer :: tmp_int end module visualize_par !===================================================================== - + diff --git a/utils/Visualization/Paraview/visualize_gold/src/write_ensight.f90 b/utils/Visualization/Paraview/visualize_gold/src/write_ensight.f90 index 34eb6dc6b..d654a2af8 100644 --- a/utils/Visualization/Paraview/visualize_gold/src/write_ensight.f90 +++ b/utils/Visualization/Paraview/visualize_gold/src/write_ensight.f90 @@ -24,24 +24,24 @@ !===================================================================== ! Revision: April 06,2010 HNG subroutine write_ensight () - + use visualize_par implicit none - + integer :: ios,i_slice character(len=80) :: file_head !character(len=80),dimension(out_nslice),optional :: server_name, server_exec - + ! Write a Ensight Gold SOS file -if (out_nslice>1)then +if (out_nslice>1)then open(unit=101, file=trim(out_path)// '/' // trim(out_head)//'.sos', status='replace', action='write', iostat=ios) - + write(101,'(a)')'FORMAT' write(101,'(a,/)')'type: master_server gold' write(101,'(a)')'SERVERS' write(101,'(a,i2,/)')'number of servers: ',out_nslice - + ! Loop over output slices do i_slice=1,out_nslice write(101,'(a,i2)')'#Server ',i_slice @@ -55,15 +55,15 @@ subroutine write_ensight () enddo close(101) endif - + write(*,'(a)')'writing ensight gold files...' ! Loop over output slices do i_slice=1,out_nslice - !write(*,*)'slice: ',i_slice + !write(*,*)'slice: ',i_slice ! counts total number of points !nnode = 0 !nelmt = 0 - + !call cvd_count_totals_ext_mesh(slice_nproc(i_slice), & !slice_proc_list(i_slice,1:slice_nproc(i_slice)),proc_width, & !inp_path,nnode,nelmt,out_res) @@ -72,25 +72,25 @@ subroutine write_ensight () !write(*,*)' Total number of elements: ',nelmt ! Ensight Gold files - call write_ensight_serial(i_slice,slice_nproc(i_slice),slice_proc_list(i_slice,1:slice_nproc(i_slice))) -enddo + call write_ensight_serial(i_slice,slice_nproc(i_slice),slice_proc_list(i_slice,1:slice_nproc(i_slice))) +enddo write(*,*) write(*,'(a)')'complete' end subroutine write_ensight !===================================================================== -subroutine write_ensight_serial (i_slice,nproc,proc_list) +subroutine write_ensight_serial (i_slice,nproc,proc_list) use visualize_par implicit none - + integer,intent(in) :: i_slice integer,intent(in) :: nproc integer,dimension(nproc),intent(in) :: proc_list - + character(len=20), parameter :: wild_char='********************' !integer,dimension(6),parameter :: file_unit = (/ 111, 222, 333, 444, 555, 666 /) - + integer :: i,i_t,i_proc,iproc integer :: ios character(len=80) :: geo_file @@ -109,8 +109,8 @@ subroutine write_ensight_serial (i_slice,nproc,proc_list) character(len=20) :: ensight_etype character(len=80) :: inp_fname integer :: nnode,nelmt - -! Ensight element type + +! Ensight element type if (out_res==1)then ! Medium resolution ! 20-noded hexahedra @@ -132,7 +132,7 @@ subroutine write_ensight_serial (i_slice,nproc,proc_list) if (ios /= 0)then write(*,'(/,a)')'ERROR: output file "'//trim(file_head)//'.case'//'" cannot be opened!' stop -endif +endif write(11,'(a)')'FORMAT' write(11,'(a,/)')'type: ensight gold' @@ -143,9 +143,9 @@ subroutine write_ensight_serial (i_slice,nproc,proc_list) write(11,'(a)')'VARIABLE' if (out_ncomp == 1)then write(11,'(a,i10,a,a,a,a,/)')'scalar per node: ',ts,' ',trim(out_vname),' ',trim(file_head)//'_'//wild_char(1:t_width)//'.scl' -elseif (out_ncomp == 3)then +else if (out_ncomp == 3)then write(11,'(a,i10,a,a,a,a,/)')'vector per node: ',ts,' ',trim(out_vname),' ',trim(file_head)//'_'//wild_char(1:t_width)//'.vec' -elseif (out_ncomp == 6)then +else if (out_ncomp == 6)then write(11,'(a,i10,a,a,a,a,/)')'tensor symm per node: ',ts,' ',trim(out_vname),' ', & trim(file_head)//wild_char(1:t_width)//'.tns' else @@ -159,7 +159,7 @@ subroutine write_ensight_serial (i_slice,nproc,proc_list) write(11,'(a,i10)')'filename start number:',t_start write(11,'(a,i10)')'filename increment:',t_inc write(11,'(a)',advance='no')'time values: ' - + do i=1,t_nstep write(11,'(e12.5)',advance='yes')(t_start+(i-1)*t_inc)*DT enddo @@ -167,23 +167,23 @@ subroutine write_ensight_serial (i_slice,nproc,proc_list) !write(*,'(a)')'complete!' !write(*,'(a)',advance='no')'writing Ensight mesh file...' - + !write(*,*) 'Slice list: ' !write(*,*) proc_list(1:nproc) ! open Ensight Gold geo file to store mesh data geo_file = trim(out_path) // '/' // trim(file_head)//'.geo' !; write(*,*)geo_file -call open_file2write(trim(geo_file)//char(0),fd) - -npart=1 +call open_file2write(trim(geo_file)//char(0),fd) + +npart=1 !write(*,*)nnode,nelmt buffer='C Binary' call write_string(buffer//char(0),fd) buffer='Created by write_ensight Routine' call write_string(buffer//char(0),fd) -buffer='specfem3d_sesame' +buffer='specfem3d_sesame' call write_string(buffer//char(0),fd) -buffer='node id off' +buffer='node id off' call write_string(buffer//char(0),fd) buffer='element id off' call write_string(buffer//char(0),fd) @@ -193,18 +193,18 @@ subroutine write_ensight_serial (i_slice,nproc,proc_list) ! call write_float(real(extent(i,j)),fd) ! enddo !enddo -buffer='part' +buffer='part' call write_string(buffer//char(0),fd) call write_integer(npart,fd) buffer='unstructured meshes' call write_string(buffer//char(0),fd) -buffer='coordinates' +buffer='coordinates' call write_string(buffer//char(0),fd) call write_integer(slice_nnode(i_slice),fd) - -! writes point and scalar information + +! writes point and scalar information ! loops over slices (process partitions) -node_count = 0 +node_count = 0 ! Open temporary files to store coordinates call open_file2write('../tmp/tmp_x'//char(0),fd_x) @@ -212,10 +212,10 @@ subroutine write_ensight_serial (i_slice,nproc,proc_list) call open_file2write('../tmp/tmp_z'//char(0),fd_z) write(tmp_str,*)proc_width -write(proc_width_str,*)trim(adjustl(tmp_str))//'.'//trim(adjustl(tmp_str)) +write(proc_width_str,*)trim(adjustl(tmp_str))//'.'//trim(adjustl(tmp_str)) format_str1='(a,i'//trim(adjustl(proc_width_str))//',a)' write(tmp_str,*)t_width -write(t_width_str,*)trim(adjustl(tmp_str))//'.'//trim(adjustl(tmp_str)) +write(t_width_str,*)trim(adjustl(tmp_str))//'.'//trim(adjustl(tmp_str)) format_str2='(a,i'//trim(adjustl(proc_width_str))//',a,i'//trim(adjustl(t_width_str))//',a)' do i_proc = 1, nproc @@ -225,35 +225,35 @@ subroutine write_ensight_serial (i_slice,nproc,proc_list) !write(*,*) 'Reading slice ', iproc ! gets number of elements and global points for this partition - write(mesh_file,fmt=format_str1) trim(inp_path)//'/proc',iproc,'_external_mesh.bin' + write(mesh_file,fmt=format_str1) trim(inp_path)//'/proc',iproc,'_external_mesh.bin' open(unit=27,file=trim(mesh_file),status='old',action='read',form='unformatted',iostat=ios) if (ios /= 0) then write(*,'(/,a)')'ERROR: file '//trim(mesh_file)//' cannot be opened!' stop - endif + endif read(27) NSPEC_AB - read(27) NGLOB_AB + read(27) NGLOB_AB ! ibool file allocate(ibool(NGLLX,NGLLY,NGLLZ,NSPEC_AB)) - read(27) ibool + read(27) ibool ! global point arrays - allocate(xstore(NGLOB_AB),ystore(NGLOB_AB),zstore(NGLOB_AB)) + allocate(xstore(NGLOB_AB),ystore(NGLOB_AB),zstore(NGLOB_AB)) read(27) xstore read(27) ystore read(27) zstore - close(27) - + close(27) + ! writes point coordinates and scalar value to mesh file if (out_res==0)then ! writes out element corners only call cvd_write_corners_only(NSPEC_AB,NGLOB_AB,ibool,xstore,ystore,zstore, & nnode,fd_x,fd_y,fd_z) - elseif (out_res==1)then + else if (out_res==1)then ! writes out element corners only call cvd_write_hexa20_only(NSPEC_AB,NGLOB_AB,ibool,xstore,ystore,zstore, & nnode,fd_x,fd_y,fd_z) - elseif (out_res==2)then + else if (out_res==2)then ! high resolution, all GLL points call cvd_write_GLL_points_only(NSPEC_AB,NGLOB_AB,ibool,xstore,ystore,zstore,& nnode,fd_x,fd_y,fd_z) @@ -261,15 +261,15 @@ subroutine write_ensight_serial (i_slice,nproc,proc_list) write(*,'(/,a)')'ERROR: wrong out_res value!' stop endif - + !write(*,*)' points:',node_count,nnode - + ! stores total number of points written node_count = node_count + nnode ! cleans up memory allocations deallocate(ibool,xstore,ystore,zstore) - + enddo ! all slices for points call close_file(fd_x) call close_file(fd_y) @@ -289,7 +289,7 @@ subroutine write_ensight_serial (i_slice,nproc,proc_list) call read_float(tmp_real,fd_x) !write(*,*)'new:',tmp_real !stop - call write_float(tmp_real,fd) + call write_float(tmp_real,fd) enddo call close_delete_file('../tmp/tmp_x'//char(0),fd_x) @@ -298,14 +298,14 @@ subroutine write_ensight_serial (i_slice,nproc,proc_list) call open_file2read('../tmp/tmp_y'//char(0),fd_y) do i=1,slice_nnode(i_slice) call read_float(tmp_real,fd_y) - call write_float(tmp_real,fd) + call write_float(tmp_real,fd) enddo call close_delete_file('../tmp/tmp_y'//char(0),fd_y) call open_file2read('../tmp/tmp_z'//char(0),fd_z) do i=1,slice_nnode(i_slice) call read_float(tmp_real,fd_z) - call write_float(tmp_real,fd) + call write_float(tmp_real,fd) enddo call close_delete_file('../tmp/tmp_z'//char(0),fd_z) @@ -321,14 +321,14 @@ subroutine write_ensight_serial (i_slice,nproc,proc_list) iproc = proc_list(i_proc) ! gets number of elements and global points for this partition - write(mesh_file,fmt=format_str1) trim(inp_path)//'/proc',iproc,'_external_mesh.bin' + write(mesh_file,fmt=format_str1) trim(inp_path)//'/proc',iproc,'_external_mesh.bin' open(unit=27,file=trim(mesh_file),status='old',action='read',form='unformatted',iostat=ios) if (ios /= 0) then write(*,'(/,a)')'ERROR: file '//trim(mesh_file)//' cannot be opened!' stop - endif + endif read(27) NSPEC_AB - read(27) NGLOB_AB + read(27) NGLOB_AB ! ibool file allocate(ibool(NGLLX,NGLLY,NGLLZ,NSPEC_AB)) read(27) ibool @@ -338,23 +338,23 @@ subroutine write_ensight_serial (i_slice,nproc,proc_list) if (out_res==0) then ! spectral elements call cvd_write_corner_elements(NSPEC_AB,NGLOB_AB,ibool, & - node_count,nelmt,nnode,fd) - elseif (out_res==1) then + node_count,nelmt,nnode,fd) + else if (out_res==1) then ! spectral elements call cvd_write_hexa20_elements(NSPEC_AB,NGLOB_AB,ibool, & node_count,nelmt,nnode,fd) - elseif (out_res==2)then + else if (out_res==2)then ! subdivided spectral elements call cvd_write_GLL_elements(NSPEC_AB,NGLOB_AB,ibool, & - node_count,nelmt,nnode,fd) + node_count,nelmt,nnode,fd) else write(*,'(/,a)')'ERROR: wrong out_res value!' stop endif - + !write(*,*)' elements:',elmt_count,nelmt !write(*,*)' points : ',node_count,nnode - + elmt_count = elmt_count + nelmt deallocate(ibool) @@ -365,14 +365,14 @@ subroutine write_ensight_serial (i_slice,nproc,proc_list) call close_file(fd) ! checks with total number of elements -if (elmt_count /= slice_nelmt(i_slice)) then +if (elmt_count /= slice_nelmt(i_slice)) then !write(*,'(/,a)')'ERROR: number of elements counted:',elmt_count,'total:',slice_nelmt(i_slice) write(*,'(/,a)')'ERROR: number of total elements are not consistent!' stop endif !write(*,*) 'Total number of elements: ', elmt_count -!write(*,'(a)')'complete!' +!write(*,'(a)')'complete!' !write(*,*) 'Done writing '//trim(geo_file) @@ -386,21 +386,21 @@ subroutine write_ensight_serial (i_slice,nproc,proc_list) if (out_ncomp==1) then out_ext='.scl' -elseif (out_ncomp==3) then +else if (out_ncomp==3) then out_ext='.vec' -elseif (out_ncomp==6) then +else if (out_ncomp==6) then out_ext='.tns' else write(*,'(/,a,i5,a)')'ERROR: number of components ',out_ncomp,' not supported!' stop -endif +endif !write(*,'(a)',advance='no')'time step: ' do i_t=1,t_nstep tstep=t_start + (i_t-1)*t_inc ! Open Ensight Gold data file to store data - write(out_fname,fmt=format_str1)trim(out_path) // '/'//trim(file_head)//'_',tstep,trim(out_ext) + write(out_fname,fmt=format_str1)trim(out_path) // '/'//trim(file_head)//'_',tstep,trim(out_ext) npart=1; call open_file2write(trim(out_fname)//char(0),fd) buffer='Scalar data' @@ -414,7 +414,7 @@ subroutine write_ensight_serial (i_slice,nproc,proc_list) !Open temporary files to store data !call open_file2write('tmp_val'//char(0),fd_x) - + if (out_ncomp>1) then do i_comp=1,out_ncomp @@ -423,19 +423,19 @@ subroutine write_ensight_serial (i_slice,nproc,proc_list) iproc = proc_list(i_proc) - write(mesh_file,fmt=format_str1) trim(inp_path)//'/proc',iproc,'_external_mesh.bin' + write(mesh_file,fmt=format_str1) trim(inp_path)//'/proc',iproc,'_external_mesh.bin' open(unit=27,file=trim(mesh_file),status='old',action='read',form='unformatted') read(27) NSPEC_AB read(27) NGLOB_AB - + ! ibool file - allocate(ibool(NGLLX,NGLLY,NGLLZ,NSPEC_AB)) + allocate(ibool(NGLLX,NGLLY,NGLLZ,NSPEC_AB)) read(27) ibool close(27) if (dat_topo == 0)then - allocate(dat(NGLLX,NGLLY,NGLLZ,NSPEC_AB)) + allocate(dat(NGLLX,NGLLY,NGLLZ,NSPEC_AB)) - ! data file + ! data file write(inp_fname,fmt=format_str2)trim(out_path)//'/'//trim(proc_head), & iproc,trim(inp_head(i_comp)),tstep,trim(inp_ext) open(unit = 11,file = trim(inp_fname),status='old',& @@ -444,17 +444,17 @@ subroutine write_ensight_serial (i_slice,nproc,proc_list) write(*,*)'Error opening '//trim(inp_fname) stop endif - - read(11) dat - + + read(11) dat + ! writes point coordinates and scalar value to mesh file - if (out_res==0) then + if (out_res==0) then call cvd_write_corners_data(NSPEC_AB,NGLOB_AB,ibool,real(dat), & - nnode,fd) - elseif (out_res==1) then + nnode,fd) + else if (out_res==1) then call cvd_write_hexa20_data(NSPEC_AB,NGLOB_AB,ibool,real(dat), & nnode,fd) - elseif (out_res==2) then + else if (out_res==2) then call cvd_write_GLL_points_data(NSPEC_AB,NGLOB_AB,ibool,real(dat), & nnode,fd) else @@ -463,10 +463,10 @@ subroutine write_ensight_serial (i_slice,nproc,proc_list) endif ! cleans up memory allocations deallocate(dat) - elseif (dat_topo==1)then - allocate(dat_glob(NGLOB_AB)) + else if (dat_topo==1)then + allocate(dat_glob(NGLOB_AB)) - ! data file + ! data file write(inp_fname,fmt=format_str2)trim(out_path)//'/'//trim(proc_head), & iproc,trim(inp_head(i_comp)),tstep,trim(inp_ext) open(unit = 11,file = trim(inp_fname),status='old',& @@ -475,17 +475,17 @@ subroutine write_ensight_serial (i_slice,nproc,proc_list) write(*,*)'Error opening ',trim(inp_fname) stop endif - - read(11) dat_glob - + + read(11) dat_glob + ! writes point coordinates and scalar value to mesh file - if (out_res==0) then + if (out_res==0) then call cvd_write_corners_data_glob(NSPEC_AB,NGLOB_AB,ibool,real(dat_glob), & - nnode,fd) - elseif (out_res==1) then + nnode,fd) + else if (out_res==1) then call cvd_write_hexa20_data_glob(NSPEC_AB,NGLOB_AB,ibool,real(dat_glob), & nnode,fd) - elseif (out_res==2) then + else if (out_res==2) then call cvd_write_GLL_points_data_glob(NSPEC_AB,NGLOB_AB,ibool,real(dat_glob), & nnode,fd) else @@ -496,12 +496,12 @@ subroutine write_ensight_serial (i_slice,nproc,proc_list) deallocate(dat_glob) endif ! if dat_topo == 0 deallocate(ibool) - + !write(*,*)' points:',node_count,nnode - + ! stores total number of points written - node_count = node_count + nnode - + node_count = node_count + nnode + enddo ! i_proc = 1, nproc if (node_count /= slice_nnode(i_slice))then write(*,'(/,a)')'Error: Number of total points are not consistent' @@ -514,22 +514,22 @@ subroutine write_ensight_serial (i_slice,nproc,proc_list) iproc = proc_list(i_proc) - write(mesh_file,fmt=format_str1) trim(inp_path)//'/proc',iproc,'_external_mesh.bin' + write(mesh_file,fmt=format_str1) trim(inp_path)//'/proc',iproc,'_external_mesh.bin' open(unit=27,file=trim(mesh_file),status='old',action='read',form='unformatted') read(27) NSPEC_AB read(27) NGLOB_AB - + ! ibool file - allocate(ibool(NGLLX,NGLLY,NGLLZ,NSPEC_AB)) + allocate(ibool(NGLLX,NGLLY,NGLLZ,NSPEC_AB)) read(27) ibool close(27) - + if (dat_topo==0)then allocate(tmp_dat(NGLLX,NGLLY,NGLLZ,NSPEC_AB)) - allocate(dat(NGLLX,NGLLY,NGLLZ,NSPEC_AB)) + allocate(dat(NGLLX,NGLLY,NGLLZ,NSPEC_AB)) tmp_dat=0.0 - do i_comp=1,inp_ncomp - ! data file + do i_comp=1,inp_ncomp + ! data file write(inp_fname,fmt=format_str2)trim(out_path)//'/'//trim(proc_head), & iproc,trim(inp_head(i_comp)),tstep,trim(inp_ext) open(unit = 222,file = trim(inp_fname),status='old',& @@ -538,7 +538,7 @@ subroutine write_ensight_serial (i_slice,nproc,proc_list) write(*,*)'Error opening '//trim(inp_fname) stop endif - + read(222) dat close(222) tmp_dat=tmp_dat+real(dat) @@ -546,16 +546,16 @@ subroutine write_ensight_serial (i_slice,nproc,proc_list) enddo if (inp_ncomp==3 .and. out_ncomp==1)then tmp_dat=0.5*tmp_dat ! Equivalent to S-wave potential - endif - + endif + ! writes point coordinates and scalar value to mesh file - if (out_res==0) then + if (out_res==0) then call cvd_write_corners_data(NSPEC_AB,NGLOB_AB,ibool,tmp_dat, & - nnode,fd) - elseif (out_res==1) then + nnode,fd) + else if (out_res==1) then call cvd_write_hexa20_data(NSPEC_AB,NGLOB_AB,ibool,tmp_dat, & nnode,fd) - elseif (out_res==2) then + else if (out_res==2) then call cvd_write_GLL_points_data(NSPEC_AB,NGLOB_AB,ibool,tmp_dat, & nnode,fd) else @@ -564,12 +564,12 @@ subroutine write_ensight_serial (i_slice,nproc,proc_list) endif ! cleans up memory allocations deallocate(ibool,dat,tmp_dat) - elseif (dat_topo==1)then + else if (dat_topo==1)then allocate(tmp_dat_glob(NGLOB_AB)) - allocate(dat_glob(NGLOB_AB)) + allocate(dat_glob(NGLOB_AB)) tmp_dat=0.0 - do i_comp=1,inp_ncomp - ! data file + do i_comp=1,inp_ncomp + ! data file write(inp_fname,fmt=format_str2)trim(out_path)//'/'//trim(proc_head), & iproc,trim(inp_head(i_comp)),tstep,trim(inp_ext) open(unit = 11,file = trim(inp_fname),status='old',& @@ -578,23 +578,23 @@ subroutine write_ensight_serial (i_slice,nproc,proc_list) write(*,'(/,a)')'ERROR: opening '//trim(inp_fname) stop endif - + read(11) dat_glob tmp_dat_glob=tmp_dat_glob+real(dat_glob) !write(*,*)inp_fname enddo if (inp_ncomp==3 .and. out_ncomp==1)then tmp_dat_glob=0.5*tmp_dat_glob ! Equivalent to S-wave potential - endif - + endif + ! writes point coordinates and scalar value to mesh file - if (out_res==0) then + if (out_res==0) then call cvd_write_corners_data_glob(NSPEC_AB,NGLOB_AB,ibool,tmp_dat_glob, & - nnode,fd) - elseif (out_res==1) then + nnode,fd) + else if (out_res==1) then call cvd_write_hexa20_data_glob(NSPEC_AB,NGLOB_AB,ibool,tmp_dat_glob, & nnode,fd) - elseif (out_res==2) then + else if (out_res==2) then call cvd_write_GLL_points_data_glob(NSPEC_AB,NGLOB_AB,ibool,tmp_dat_glob, & nnode,fd) else @@ -604,13 +604,13 @@ subroutine write_ensight_serial (i_slice,nproc,proc_list) ! cleans up memory allocations deallocate(ibool,dat_glob,tmp_dat_glob) endif ! if dat_topo == 0 - + !write(*,*)' points:',node_count,nnode - + ! stores total number of points written node_count = node_count + nnode - - + + enddo ! i_proc = 1, nproc if (node_count /= slice_nnode(i_slice)) then @@ -625,11 +625,11 @@ subroutine write_ensight_serial (i_slice,nproc,proc_list) ! Display progress write(*,fmt=format_str3,advance='no')CR,' slice: ',i_slice,'/',out_nslice,', time step: ',i_t,'/',t_nstep - + enddo ! do i_t=1,t_nstep !write(*,'(a)')' complete!' end subroutine write_ensight_serial !============================================================= - + diff --git a/utils/Visualization/Paraview/visualize_gold/src/write_vtu.f90 b/utils/Visualization/Paraview/visualize_gold/src/write_vtu.f90 index 1d3fad35e..3921b6c3d 100644 --- a/utils/Visualization/Paraview/visualize_gold/src/write_vtu.f90 +++ b/utils/Visualization/Paraview/visualize_gold/src/write_vtu.f90 @@ -1,11 +1,11 @@ subroutine write_vtu ! This programs writes vtu (VTK binary unstructed data file) -! files produced by SPECFEM3D. The vtu file can then be visualized in +! files produced by SPECFEM3D. The vtu file can then be visualized in ! VTK/ParaView. See http://www.vtk.org and http://www.paraview.org for details. !------------------------------------------ ! DEPENDENCY: -! cfunc4fortran.c, visualize_par.f90, visualize_collect.f90 +! cfunc4fortran.c, visualize_par.f90, visualize_collect.f90 ! COMPILE ! >> gfortran -c write_vtu ! USAGE @@ -27,7 +27,7 @@ subroutine write_vtu integer :: endian integer,dimension(10) :: bytes,off integer,parameter :: LE=0,BE=1 -integer :: i,j,i_t,i_proc,iproc,i_slice +integer :: i,j,i_t,i_proc,iproc,i_slice integer :: ios integer :: tstep integer :: node_count,elmt_count @@ -35,7 +35,7 @@ subroutine write_vtu ! data must be of dimension: (NGLLX,NGLLY,NGLLZ,NSPEC_AB) real(kind=CUSTOM_REAL),dimension(:,:,:,:),allocatable :: dat -real(kind=CUSTOM_REAL),dimension(:),allocatable :: dat_glob +real(kind=CUSTOM_REAL),dimension(:),allocatable :: dat_glob real(kind=4),dimension(:,:,:,:),allocatable :: tmp_dat real(kind=4),dimension(:),allocatable :: tmp_rvect,tmp_dat_glob @@ -44,14 +44,14 @@ subroutine write_vtu character(len=256) :: buffer,pvd_file,pvtu_file,vtu_file,mesh_file integer,parameter :: pvd_unit=11,pvtu_unit=22,vtu_unit=33 character(len=80) :: file_head,inp_fname -integer :: nnode,nelmt,tmp_nnode !,tmp_nelmt +integer :: nnode,nelmt,tmp_nnode !,tmp_nelmt write(*,'(a)')'writing VTK files...' ! Determine the Endianness of the Architecture call get_endian(endian) if(endian == LE)then byte_order='LittleEndian' -elseif(endian == BE)then +else if(endian == BE)then byte_order='BigEndian' else write(*,'(/,a)')'ERROR: illegal endianness!' @@ -70,10 +70,10 @@ subroutine write_vtu endif write(tmp_str,*)proc_width -write(proc_width_str,*)trim(adjustl(tmp_str))//'.'//trim(adjustl(tmp_str)) +write(proc_width_str,*)trim(adjustl(tmp_str))//'.'//trim(adjustl(tmp_str)) write(tmp_str,*)t_width write(t_width_str,*)trim(adjustl(tmp_str))//'.'//trim(adjustl(tmp_str)) -format_str1='(a,i'//trim(adjustl(proc_width_str))//',a)' +format_str1='(a,i'//trim(adjustl(proc_width_str))//',a)' format_str2='(a,i'//trim(adjustl(proc_width_str))//',a,i'//trim(adjustl(t_width_str))//',a)' ! Format for progress display @@ -104,20 +104,20 @@ subroutine write_vtu do i_t=1,t_nstep tstep=t_start + (i_t-1)*t_inc - - ! create pvtu file name + + ! create pvtu file name write(pvtu_file,fmt=format_str1)trim(out_head)//'_',tstep,'.pvtu' - - ! collect pvtu file name in pvd file + + ! collect pvtu file name in pvd file write(num_str1,'(f16.6)')(t_start+(i_t-1)*t_inc)*dt ! Change format here if time is so big and so tiny buffer='' write(pvd_unit,'(a)')trim(buffer) - + ! open pvtu file - pvtu_file = trim(out_path) // '/' // trim(pvtu_file) + pvtu_file = trim(out_path) // '/' // trim(pvtu_file) open(unit=pvtu_unit, file=trim(pvtu_file), action='write', status='replace') ! write headers - + buffer='' write(pvtu_unit,'(a)')trim(buffer) buffer=''; @@ -152,36 +152,36 @@ subroutine write_vtu write(pvtu_unit,'(a)')trim(buffer) buffer='' write(pvtu_unit,'(a)')trim(buffer) - + buffer='' write(pvtu_unit,'(a)')trim(buffer) buffer='' - write(pvtu_unit,'(a)')trim(buffer) - - + write(pvtu_unit,'(a)')trim(buffer) + + do i_slice=1,out_nslice ! out processors - + ! counts total number of points in each slice !slice_nnode(i_slice) = 0 !slice_nelmt(i_slice) = 0 - + !call cvd_count_totals_ext_mesh(slice_nproc(i_slice), & !slice_proc_list(i_slice,1:slice_nproc(i_slice)),proc_width, & !inp_path,nnode,nelmt,out_res) !write(*,'(a)')'complete!' !write(*,*)' Total number of nodes: ',nnode !write(*,*)' Total number of elements: ',nelmt - + !slice_nnode(i_slice)=nnode !slice_nelmt(i_slice)=nelmt - + ! Compute bytes and offsets bytes(1) = (ndim*slice_nnode(i_slice))*size_float ! Coordinates bytes(2) = (NENOD_OUT*slice_nelmt(i_slice))*size_int ! Connectivity bytes(3) = (slice_nelmt(i_slice))*size_int ! Offsets bytes(4) = (slice_nelmt(i_slice))*size_int ! Types - bytes(5) = (out_ncomp*slice_nnode(i_slice))*size_float ! Nodal values - + bytes(5) = (out_ncomp*slice_nnode(i_slice))*size_float ! Nodal values + off(1)=0; ! 1st offset do i=1,plot_nvar if(i < plot_nvar)then @@ -189,25 +189,25 @@ subroutine write_vtu endif bytes(i)=bytes(i)+size_int enddo - + ! create vtu file write(tmp_str,*)i_slice - file_head=trim(out_head)//'_server'//trim(adjustl(tmp_str)) + file_head=trim(out_head)//'_server'//trim(adjustl(tmp_str)) write(out_fname,fmt=format_str1)trim(file_head)//'_',tstep,trim(out_ext) !write(*,*)tstep,trim(out_fname) - ! write vtu file to pvtu file + ! write vtu file to pvtu file buffer='' - write(pvtu_unit,'(a)')trim(buffer) + write(pvtu_unit,'(a)')trim(buffer) ! open vtu file - vtu_file = trim(out_path) // '/' // trim(out_fname) + vtu_file = trim(out_path) // '/' // trim(out_fname) open(unit=vtu_unit, file=trim(vtu_file), action='write', status='replace',iostat=ios) !write(*,*)trim(vtu_file),vtu_unit if (ios/=0)then write(*,'(/,a)')'ERROR: file '//trim(vtu_file)//' cannot be opened!' stop endif - + ! write header buffer='' write(vtu_unit,'(a)')trim(buffer) @@ -215,7 +215,7 @@ subroutine write_vtu write(vtu_unit,'(a)')trim(buffer) buffer='' write(vtu_unit,'(a)')trim(buffer) - write(num_str1,*)slice_nnode(i_slice); write(num_str2,*)slice_nelmt(i_slice); + write(num_str1,*)slice_nnode(i_slice); write(num_str2,*)slice_nelmt(i_slice); buffer='' write(vtu_unit,'(a)')trim(buffer) buffer='' @@ -245,7 +245,7 @@ subroutine write_vtu '" format="appended" offset="'//trim(adjustl(num_str1))//'"/>' write(vtu_unit,'(a)')trim(buffer) buffer='' - write(vtu_unit,'(a)')trim(buffer) + write(vtu_unit,'(a)')trim(buffer) buffer='' write(vtu_unit,'(a)')trim(buffer) buffer='' @@ -259,7 +259,7 @@ subroutine write_vtu buffer='_' write(vtu_unit,'(a)',advance='no')trim(buffer) close(vtu_unit) - + if (i_t==1)then ! open temporary files to store coordinates write(tmp_str,*)i_slice @@ -268,46 +268,46 @@ subroutine write_vtu call open_file2write('../tmp/tmp_z_slice'//trim(adjustl(tmp_str))//char(0),fd_z) ! open temporary files to store connectivity list call open_file2write('../tmp/tmp_con_slice'//trim(adjustl(tmp_str))//char(0),fd_con) - + ! open mesh files and store mesh data tmp_nnode = 0 elmt_count = 0 node_count = 0 do i_proc = 1, slice_nproc(i_slice) - iproc = slice_proc_list(i_slice,i_proc) + iproc = slice_proc_list(i_slice,i_proc) ! Read and store mesh data - write(mesh_file,fmt=format_str1) trim(inp_path)//'/proc',iproc,'_external_mesh.bin' + write(mesh_file,fmt=format_str1) trim(inp_path)//'/proc',iproc,'_external_mesh.bin' open(unit=27,file=trim(mesh_file),status='old',action='read',form='unformatted',iostat=ios) if (ios /= 0) then write(*,'(/,a)')'ERROR: file '//trim(mesh_file)//' cannot be opened!' stop endif read(27) NSPEC_AB - read(27) NGLOB_AB - + read(27) NGLOB_AB + ! ibool file - allocate(ibool(NGLLX,NGLLY,NGLLZ,NSPEC_AB)) - read(27) ibool - + allocate(ibool(NGLLX,NGLLY,NGLLZ,NSPEC_AB)) + read(27) ibool + ! global point arrays - allocate(xstore(NGLOB_AB),ystore(NGLOB_AB),zstore(NGLOB_AB)) + allocate(xstore(NGLOB_AB),ystore(NGLOB_AB),zstore(NGLOB_AB)) read(27) xstore read(27) ystore read(27) zstore - close(27) - + close(27) + ! writes point coordinates and scalar value to mesh file if (out_res==0) then ! writes out element corners only call cvd_write_corners_only(NSPEC_AB,NGLOB_AB,ibool,xstore,ystore,zstore, & nnode,fd_x,fd_y,fd_z) - elseif (out_res==1)then + else if (out_res==1)then ! writes out element corners only call cvd_write_hexa20_only(NSPEC_AB,NGLOB_AB,ibool,xstore,ystore,zstore, & nnode,fd_x,fd_y,fd_z) - elseif(out_res==2)then + else if(out_res==2)then ! high resolution, all GLL points call cvd_write_GLL_points_only(NSPEC_AB,NGLOB_AB,ibool,xstore,ystore,zstore,& nnode,fd_x,fd_y,fd_z) @@ -315,36 +315,36 @@ subroutine write_vtu write(*,'(/,a)')'ERROR: wrong out_res value!' stop endif - + !write(*,*)' points:',node_count,nnode - + ! stores total number of points written tmp_nnode = tmp_nnode + nnode ! cleans up memory allocations deallocate(xstore,ystore,zstore) - - ! Read and store connectivity list + + ! Read and store connectivity list ! writes out element corner indices if(out_res==0) then ! spectral elements call cvd_write_corner_elements(NSPEC_AB,NGLOB_AB,ibool, & node_count,nelmt,nnode,fd_con) - elseif (out_res==1) then + else if (out_res==1) then ! spectral elements call cvd_write_hexa20_elements(NSPEC_AB,NGLOB_AB,ibool, & node_count,nelmt,nnode,fd_con) - elseif(out_res==2)then + else if(out_res==2)then ! subdivided spectral elements call cvd_write_GLL_elements(NSPEC_AB,NGLOB_AB,ibool, & - node_count,nelmt,nnode,fd_con) + node_count,nelmt,nnode,fd_con) else write(*,'(/,a)')'ERROR: wrong out_res value!' stop endif deallocate(ibool) - + !write(*,*)' elements:',elmt_count,nelmt !write(*,*)' points : ',node_count,nnode !write(*,*)tmp_nnode,node_count @@ -352,33 +352,33 @@ subroutine write_vtu write(*,'(/,a)')'ERROR: inconsistent number of nodes!' stop endif - + !write(*,*)node_count - !node_count = node_count + nnode - elmt_count = elmt_count + nelmt - + !node_count = node_count + nnode + elmt_count = elmt_count + nelmt + enddo ! i_proc ! close temporary files call close_file(fd_x) call close_file(fd_y) call close_file(fd_z) call close_file(fd_con) - + !write(*,*)node_count,slice_nnode(i_slice) if (node_count /= slice_nnode(i_slice)) stop 'Error: Number of total points are not consistent' ! checks with total number of elements - if (elmt_count /= slice_nelmt(i_slice)) then + if (elmt_count /= slice_nelmt(i_slice)) then !write(*,'(/,a)')'ERROR: number of elements counted:',elmt_count,'total:',slice_nelmt(i_slice) write(*,*)'Number of total elements are not consistent!' stop endif endif - + !write(*,*)trim(vtu_file) - ! write coordinates to vtu file - call open_file2append(trim(vtu_file)//char(0),fd) + ! write coordinates to vtu file + call open_file2append(trim(vtu_file)//char(0),fd) !write(*,*)'hi' - call write_integer(bytes(1),fd) + call write_integer(bytes(1),fd) write(tmp_str,*)i_slice call open_file2read('../tmp/tmp_x_slice'//trim(adjustl(tmp_str))//char(0),fd_x) call open_file2read('../tmp/tmp_y_slice'//trim(adjustl(tmp_str))//char(0),fd_y) @@ -386,15 +386,15 @@ subroutine write_vtu do i=1,slice_nnode(i_slice) call read_float(tmp_real,fd_x); call write_float(tmp_real,fd) call read_float(tmp_real,fd_y); call write_float(tmp_real,fd) - call read_float(tmp_real,fd_z); call write_float(tmp_real,fd) - enddo + call read_float(tmp_real,fd_z); call write_float(tmp_real,fd) + enddo call close_file(fd_x) call close_file(fd_y) - call close_file(fd_z) - + call close_file(fd_z) + ! write connectivity to vtu file - call write_integer(bytes(2),fd) - call open_file2read('../tmp/tmp_con_slice'//trim(adjustl(tmp_str))//char(0),fd_con) + call write_integer(bytes(2),fd) + call open_file2read('../tmp/tmp_con_slice'//trim(adjustl(tmp_str))//char(0),fd_con) do i=1,slice_nelmt(i_slice) do j=1,NENOD_OUT call read_integer(tmp_int,fd_con) @@ -402,10 +402,10 @@ subroutine write_vtu !write(*,*)tmp_int-1 enddo enddo - call close_file(fd_con) + call close_file(fd_con) ! write offsets - call write_integer(bytes(3),fd) + call write_integer(bytes(3),fd) tmp_int=0 do i=1,slice_nelmt(i_slice) tmp_int=tmp_int+NENOD_OUT @@ -413,14 +413,14 @@ subroutine write_vtu enddo ! Write element types - call write_integer(bytes(4),fd) - do i=1,slice_nelmt(i_slice) + call write_integer(bytes(4),fd) + do i=1,slice_nelmt(i_slice) call write_integer(vtk_etype,fd) - enddo - + enddo + ! write data to vtu file call write_integer(bytes(5),fd) - + if (out_ncomp>1)then ! vector or tensor data if (i_t==1)then allocate(fd_array(out_ncomp)) @@ -434,27 +434,27 @@ subroutine write_vtu node_count=0 do i_proc = 1, slice_nproc(i_slice) - iproc=slice_proc_list(i_slice,i_proc) + iproc=slice_proc_list(i_slice,i_proc) ! gets number of elements and global points for this partition - write(mesh_file,fmt=format_str1) trim(inp_path)//'/proc',iproc,'_external_mesh.bin' + write(mesh_file,fmt=format_str1) trim(inp_path)//'/proc',iproc,'_external_mesh.bin' open(unit=27,file=trim(mesh_file),status='old',action='read',form='unformatted',iostat=ios) if (ios /= 0) then write(*,'(/,a)')'ERROR: file '//trim(mesh_file)//' cannot be opened!' stop endif read(27) NSPEC_AB - read(27) NGLOB_AB + read(27) NGLOB_AB ! ibool file - allocate(ibool(NGLLX,NGLLY,NGLLZ,NSPEC_AB)) + allocate(ibool(NGLLX,NGLLY,NGLLZ,NSPEC_AB)) read(27) ibool close(27) - - if (dat_topo==0)then ! Data from local points - allocate(dat(NGLLX,NGLLY,NGLLZ,NSPEC_AB)) - - do i_comp=1,inp_ncomp - ! data file + + if (dat_topo==0)then ! Data from local points + allocate(dat(NGLLX,NGLLY,NGLLZ,NSPEC_AB)) + + do i_comp=1,inp_ncomp + ! data file write(inp_fname,fmt=format_str2)trim(out_path)//'/'//trim(proc_head), & iproc,trim(inp_head(i_comp)),tstep,trim(inp_ext) open(unit = 222,file = trim(inp_fname),status='old',& @@ -463,34 +463,34 @@ subroutine write_vtu write(*,'(/,a)')'ERROR: opening '//trim(inp_fname) stop endif - + read(222) dat close(222) - + ! writes point data to file - if (out_res==0) then + if (out_res==0) then call cvd_write_corners_data(NSPEC_AB,NGLOB_AB,ibool,real(dat), & - nnode,fd_array(i_comp)) - elseif (out_res==1) then + nnode,fd_array(i_comp)) + else if (out_res==1) then call cvd_write_hexa20_data(NSPEC_AB,NGLOB_AB,ibool,real(dat), & nnode,fd_array(i_comp)) - elseif (out_res==2) then + else if (out_res==2) then call cvd_write_GLL_points_data(NSPEC_AB,NGLOB_AB,ibool,real(dat), & nnode,fd_array(i_comp)) else write(*,'(/,a)')'ERROR: wrong out_res value!' stop - endif - + endif + enddo ! i_comp ! cleans up memory allocations - deallocate(dat) - - elseif (dat_topo==1)then ! Data from global points - allocate(dat_glob(NGLOB_AB)) - - do i_comp=1,inp_ncomp - ! data file + deallocate(dat) + + else if (dat_topo==1)then ! Data from global points + allocate(dat_glob(NGLOB_AB)) + + do i_comp=1,inp_ncomp + ! data file write(inp_fname,fmt=format_str2)trim(out_path)//'/'//trim(proc_head), & iproc,trim(inp_head(i_comp)),tstep,trim(inp_ext) open(unit = 11,file = trim(inp_fname),status='old',& @@ -499,17 +499,17 @@ subroutine write_vtu write(*,'(/,a)')'ERROR: opening '//trim(inp_fname) stop endif - + read(11) dat_glob - + ! writes point coordinates and scalar value to mesh file - if (out_res==0) then + if (out_res==0) then call cvd_write_corners_data_glob(NSPEC_AB,NGLOB_AB,ibool,real(dat_glob), & - nnode,fd_array(i_comp)) - elseif (out_res==1) then + nnode,fd_array(i_comp)) + else if (out_res==1) then call cvd_write_hexa20_data_glob(NSPEC_AB,NGLOB_AB,ibool,real(dat_glob), & nnode,fd_array(i_comp)) - elseif (out_res==2) then + else if (out_res==2) then call cvd_write_GLL_points_data_glob(NSPEC_AB,NGLOB_AB,ibool,real(dat_glob), & nnode,fd_array(i_comp)) else @@ -517,29 +517,29 @@ subroutine write_vtu stop endif enddo ! i_comp - - + + ! cleans up memory allocations deallocate(dat_glob) endif ! if dat_topo == 0 - deallocate(ibool) - + deallocate(ibool) + !write(*,*)' points:',node_count,nnode - + ! stores total number of points written node_count = node_count + nnode - + enddo ! i_proc = 1, nproc if (node_count /= slice_nnode(i_slice))then write(*,'(/,a)')'Error: Number of total points are not consistent' stop endif - + ! close temporary files do i_comp=1,out_ncomp call close_file(fd_array(i_comp)) enddo - + ! open temporary files to read do i_comp=1,out_ncomp write(tmp_str,*)i_comp @@ -553,15 +553,15 @@ subroutine write_vtu call write_float(tmp_real,fd) enddo enddo - elseif (out_ncomp==6)then + else if (out_ncomp==6)then ! 9-component symmetric tensor do i=1,slice_nnode(i_slice) do i_comp=1,out_ncomp - call read_float(tmp_rvect(i_comp),fd_array(i_slice)) + call read_float(tmp_rvect(i_comp),fd_array(i_slice)) enddo call write_float(tmp_rvect(1),fd); call write_float(tmp_rvect(4),fd); call write_float(tmp_rvect(5),fd) call write_float(tmp_rvect(4),fd); call write_float(tmp_rvect(2),fd); call write_float(tmp_rvect(6),fd) - call write_float(tmp_rvect(5),fd); call write_float(tmp_rvect(6),fd); call write_float(tmp_rvect(3),fd) + call write_float(tmp_rvect(5),fd); call write_float(tmp_rvect(6),fd); call write_float(tmp_rvect(3),fd) enddo else write(*,'(/,a)')'ERROR: wrong out_ncomp value!' @@ -571,33 +571,33 @@ subroutine write_vtu do i_comp=1,out_ncomp call close_file(fd_array(i_comp)) enddo - else ! out_ncomp - + else ! out_ncomp + node_count=0 do i_proc = 1, slice_nproc(i_slice) - iproc=slice_proc_list(i_slice,i_proc) + iproc=slice_proc_list(i_slice,i_proc) ! gets number of elements and global points for this partition - write(mesh_file,fmt=format_str1) trim(inp_path)//'/proc',iproc,'_external_mesh.bin' + write(mesh_file,fmt=format_str1) trim(inp_path)//'/proc',iproc,'_external_mesh.bin' open(unit=27,file=trim(mesh_file),status='old',action='read',form='unformatted',iostat=ios) if (ios /= 0) then write(*,'(/,a)')'ERROR: file '//trim(mesh_file)//' cannot be opened!' stop endif read(27) NSPEC_AB - read(27) NGLOB_AB + read(27) NGLOB_AB ! ibool file - allocate(ibool(NGLLX,NGLLY,NGLLZ,NSPEC_AB)) + allocate(ibool(NGLLX,NGLLY,NGLLZ,NSPEC_AB)) read(27) ibool close(27) - + if (dat_topo==0)then ! Data from local points allocate(tmp_dat(NGLLX,NGLLY,NGLLZ,NSPEC_AB)) - allocate(dat(NGLLX,NGLLY,NGLLZ,NSPEC_AB)) + allocate(dat(NGLLX,NGLLY,NGLLZ,NSPEC_AB)) tmp_dat=0.0 - do i_comp=1,inp_ncomp - ! data file + do i_comp=1,inp_ncomp + ! data file write(inp_fname,fmt=format_str2)trim(out_path)//'/'//trim(proc_head), & iproc,trim(inp_head(i_comp)),tstep,trim(inp_ext) open(unit = 222,file = trim(inp_fname),status='old',& @@ -606,7 +606,7 @@ subroutine write_vtu write(*,'(/,a)')'ERROR: opening '//trim(inp_fname) stop endif - + read(222) dat close(222) tmp_dat=tmp_dat+real(dat) @@ -614,16 +614,16 @@ subroutine write_vtu enddo if (inp_ncomp==3 .and. out_ncomp==1)then tmp_dat=0.5*tmp_dat ! Equivalent to S-wave potential - endif - + endif + ! writes point data to file - if (out_res==0) then + if (out_res==0) then call cvd_write_corners_data(NSPEC_AB,NGLOB_AB,ibool,tmp_dat, & - nnode,fd) - elseif (out_res==1) then + nnode,fd) + else if (out_res==1) then call cvd_write_hexa20_data(NSPEC_AB,NGLOB_AB,ibool,tmp_dat, & nnode,fd) - elseif (out_res==2) then + else if (out_res==2) then call cvd_write_GLL_points_data(NSPEC_AB,NGLOB_AB,ibool,tmp_dat, & nnode,fd) else @@ -632,12 +632,12 @@ subroutine write_vtu endif ! cleans up memory allocations deallocate(ibool,dat,tmp_dat) - elseif (dat_topo==1)then ! Data from global points + else if (dat_topo==1)then ! Data from global points allocate(tmp_dat_glob(NGLOB_AB)) - allocate(dat_glob(NGLOB_AB)) + allocate(dat_glob(NGLOB_AB)) tmp_dat=0.0 - do i_comp=1,inp_ncomp - ! data file + do i_comp=1,inp_ncomp + ! data file write(inp_fname,fmt=format_str2)trim(out_path)//'/'//trim(proc_head), & iproc,trim(inp_head(i_comp)),tstep,trim(inp_ext) open(unit = 11,file = trim(inp_fname),status='old',& @@ -646,23 +646,23 @@ subroutine write_vtu write(*,'(/,a)')'ERROR: opening '//trim(inp_fname) stop endif - + read(11) dat_glob tmp_dat_glob=tmp_dat_glob+real(dat_glob) !write(*,*)inp_fname enddo if (inp_ncomp==3 .and. out_ncomp==1)then tmp_dat_glob=0.5*tmp_dat_glob ! Equivalent to S-wave potential - endif - + endif + ! writes point coordinates and scalar value to mesh file - if (out_res==0) then + if (out_res==0) then call cvd_write_corners_data_glob(NSPEC_AB,NGLOB_AB,ibool,tmp_dat_glob, & - nnode,fd) - elseif (out_res==1) then + nnode,fd) + else if (out_res==1) then call cvd_write_hexa20_data_glob(NSPEC_AB,NGLOB_AB,ibool,tmp_dat_glob, & nnode,fd) - elseif (out_res==2) then + else if (out_res==2) then call cvd_write_GLL_points_data_glob(NSPEC_AB,NGLOB_AB,ibool,tmp_dat_glob, & nnode,fd) else @@ -671,14 +671,14 @@ subroutine write_vtu endif ! cleans up memory allocations deallocate(ibool,dat_glob,tmp_dat_glob) - endif ! if dat_topo == 0 - + endif ! if dat_topo == 0 + !write(*,*)' points:',node_count,nnode - + ! stores total number of points written node_count = node_count + nnode - - enddo ! i_proc = 1, nproc + + enddo ! i_proc = 1, nproc call close_file(fd) if (node_count /= slice_nnode(i_slice))then write(*,'(/,a)')'Error: Number of total points are not consistent' @@ -687,30 +687,30 @@ subroutine write_vtu endif ! out_ncomp ! Write post header for vtu file - open(unit=vtu_unit, file=trim(vtu_file), action='write', status='old',position='append') - write(vtu_unit,*) ! Write new line + open(unit=vtu_unit, file=trim(vtu_file), action='write', status='old',position='append') + write(vtu_unit,*) ! Write new line buffer='' write(vtu_unit,'(a)')trim(buffer) buffer='' write(vtu_unit,'(a)')trim(buffer) close(vtu_unit); - + ! Display progress write(*,fmt=format_str3,advance='no')CR,' slice: ',i_slice,'/',out_nslice,', time step: ',i_t,'/',t_nstep - + enddo ! do i_slice - - ! Write post header for pvtu file + + ! Write post header for pvtu file buffer='' write(pvtu_unit,'(a)')trim(buffer) buffer='' write(pvtu_unit,'(a)')trim(buffer) close(pvtu_unit); - + ! Display progress !write(*,fmt=format_str3,advance='no')CR,'writing VTK files... ',i_t,'/',t_nstep - -enddo ! i_t + +enddo ! i_t ! write post header for pvd file buffer='' @@ -720,7 +720,7 @@ subroutine write_vtu close(pvd_unit); ! delete temporary mesh files -do i_slice=1,out_nslice +do i_slice=1,out_nslice write(tmp_str,*)i_slice call delete_file('../tmp/tmp_x_slice'//trim(adjustl(tmp_str))//char(0)) call delete_file('../tmp/tmp_y_slice'//trim(adjustl(tmp_str))//char(0)) diff --git a/utils/Visualization/opendx_AVS/filter_holly.csh b/utils/Visualization/opendx_AVS/filter_holly.csh index ef19657e4..40d9383a4 100755 --- a/utils/Visualization/opendx_AVS/filter_holly.csh +++ b/utils/Visualization/opendx_AVS/filter_holly.csh @@ -1,4 +1,4 @@ -#!/bin/csh +#!/bin/csh sed -e '1,$s/D-00/e-/g' < gmt_shaking_hollywood_veloc.irreg > tutu mv tutu gmt_shaking_hollywood_veloc.irreg diff --git a/utils/Visualization/visualize_chunk_of_the_earth_with_MEDIT/HEX27/visualize_HEX27_chunk_w_medit.f90 b/utils/Visualization/visualize_chunk_of_the_earth_with_MEDIT/HEX27/visualize_HEX27_chunk_w_medit.f90 index 4a7b7b64c..1637ae0cc 100755 --- a/utils/Visualization/visualize_chunk_of_the_earth_with_MEDIT/HEX27/visualize_HEX27_chunk_w_medit.f90 +++ b/utils/Visualization/visualize_chunk_of_the_earth_with_MEDIT/HEX27/visualize_HEX27_chunk_w_medit.f90 @@ -40,7 +40,7 @@ PROGRAM visualize_HEX27_chunk_w_medit DO i=1,np READ(10,*) nsph, p1, p2, p3 WRITE(20,*) p1, p2, p3, 1 - ENDDO + enddo WRITE(20,*) ' ' WRITE(20,*) 'Quadrilaterals' @@ -53,42 +53,42 @@ PROGRAM visualize_HEX27_chunk_w_medit WRITE(20,*) sf5, sf2, sf6, sf9, 2 WRITE(20,*) sf9, sf6, sf3, sf7, 2 WRITE(20,*) sf8, sf9, sf7, sf4, 2 - ENDDO + enddo DO i=1,nq2 READ(32,*) nsph, sf1, sf2, sf3, sf4, sf5, sf6, sf7, sf8, sf9 WRITE(20,*) sf1, sf5, sf9, sf8, 2 WRITE(20,*) sf5, sf2, sf6, sf9, 2 WRITE(20,*) sf9, sf6, sf3, sf7, 2 WRITE(20,*) sf8, sf9, sf7, sf4, 2 - ENDDO + enddo DO i=1,nq3 READ(33,*) nsph, sf1, sf2, sf3, sf4, sf5, sf6, sf7, sf8, sf9 WRITE(20,*) sf1, sf5, sf9, sf8, 2 WRITE(20,*) sf5, sf2, sf6, sf9, 2 WRITE(20,*) sf9, sf6, sf3, sf7, 2 WRITE(20,*) sf8, sf9, sf7, sf4, 2 - ENDDO + enddo DO i=1,nq4 READ(34,*) nsph, sf1, sf2, sf3, sf4, sf5, sf6, sf7, sf8, sf9 WRITE(20,*) sf1, sf5, sf9, sf8, 2 WRITE(20,*) sf5, sf2, sf6, sf9, 2 WRITE(20,*) sf9, sf6, sf3, sf7, 2 WRITE(20,*) sf8, sf9, sf7, sf4, 2 - ENDDO + enddo DO i=1,nq5 READ(35,*) nsph, sf1, sf2, sf3, sf4, sf5, sf6, sf7, sf8, sf9 WRITE(20,*) sf1, sf5, sf9, sf8, 2 WRITE(20,*) sf5, sf2, sf6, sf9, 2 WRITE(20,*) sf9, sf6, sf3, sf7, 2 WRITE(20,*) sf8, sf9, sf7, sf4, 2 - ENDDO + enddo DO i=1,nq6 READ(36,*) nsph, sf1, sf2, sf3, sf4, sf5, sf6, sf7, sf8, sf9 WRITE(20,*) sf1, sf5, sf9, sf8, 3 WRITE(20,*) sf5, sf2, sf6, sf9, 3 WRITE(20,*) sf9, sf6, sf3, sf7, 3 WRITE(20,*) sf8, sf9, sf7, sf4, 3 - ENDDO + enddo WRITE(20,*) ' ' WRITE(20,*) 'Hexahedra' @@ -106,8 +106,8 @@ PROGRAM visualize_HEX27_chunk_w_medit WRITE(20,*) s22, s14, s23, s27, s17, s6 , s18, s26, 1 WRITE(20,*) s27, s23, s15, s24, s26, s18, s7 , s19, 1 WRITE(20,*) s25, s27, s24, s16, s20, s26, s19, s8 , 1 - ENDDO - + enddo + WRITE(20,*) ' ' WRITE(20,*) 'End' diff --git a/utils/Visualization/visualize_chunk_of_the_earth_with_MEDIT/HEX8/visualize_HEX8_chunk_w_medit.f90 b/utils/Visualization/visualize_chunk_of_the_earth_with_MEDIT/HEX8/visualize_HEX8_chunk_w_medit.f90 index d487f3d7c..739d89bf9 100755 --- a/utils/Visualization/visualize_chunk_of_the_earth_with_MEDIT/HEX8/visualize_HEX8_chunk_w_medit.f90 +++ b/utils/Visualization/visualize_chunk_of_the_earth_with_MEDIT/HEX8/visualize_HEX8_chunk_w_medit.f90 @@ -38,7 +38,7 @@ PROGRAM visualize_HEX8_chunk_w_medit DO i=1,np READ(10,*) nsph, p1, p2, p3 WRITE(20,*) p1, p2, p3, 1 - ENDDO + enddo WRITE(20,*) ' ' WRITE(20,*) 'Quadrilaterals' @@ -48,27 +48,27 @@ PROGRAM visualize_HEX8_chunk_w_medit DO i=1,nq1 READ(31,*) nsph, sf1, sf2, sf3, sf4 WRITE(20,*) sf1, sf2, sf3, sf4, 2 - ENDDO + enddo DO i=1,nq2 READ(32,*) nsph, sf1, sf2, sf3, sf4 WRITE(20,*) sf1, sf2, sf3, sf4, 2 - ENDDO + enddo DO i=1,nq3 READ(33,*) nsph, sf1, sf2, sf3, sf4 WRITE(20,*) sf1, sf2, sf3, sf4, 2 - ENDDO + enddo DO i=1,nq4 READ(34,*) nsph, sf1, sf2, sf3, sf4 WRITE(20,*) sf1, sf2, sf3, sf4, 2 - ENDDO + enddo DO i=1,nq5 READ(35,*) nsph, sf1, sf2, sf3, sf4 WRITE(20,*) sf1, sf2, sf3, sf4, 2 - ENDDO + enddo DO i=1,nq6 READ(36,*) nsph, sf1, sf2, sf3, sf4 WRITE(20,*) sf1, sf2, sf3, sf4, 3 - ENDDO + enddo WRITE(20,*) ' ' WRITE(20,*) 'Hexahedra' @@ -77,8 +77,8 @@ PROGRAM visualize_HEX8_chunk_w_medit DO i=1,nhex READ(11,*) nsph, s1, s2, s3, s4, s5, s6, s7, s8 WRITE(20,*) s1, s2, s3, s4, s5, s6, s7, s8, 1 - ENDDO - + enddo + WRITE(20,*) ' ' WRITE(20,*) 'End' diff --git a/utils/Visualization/vtk_scripts/view_model.pl b/utils/Visualization/vtk_scripts/view_model.pl index b944f3f84..a098464ee 100755 --- a/utils/Visualization/vtk_scripts/view_model.pl +++ b/utils/Visualization/vtk_scripts/view_model.pl @@ -39,9 +39,9 @@ $z_center = ($utm_zmin + $utm_zmax)/2; # increment between cross sections -$dxinc = 50000; # meters -$dyinc = 50000; # meters -$dzinc = 5000; # meters +$dxinc = 50000; # meters +$dyinc = 50000; # meters +$dzinc = 5000; # meters # number of cuts $Nx = int($xran/$dxinc) + 1; @@ -110,7 +110,7 @@ # file name $filename = sprintf("${tcl_tag}_%2.2i.ps",$i); - print SED "/writer SetFileName/s/SetFileName.*\$/SetFileName \"$filename\"/ \n"; + print SED "/writer SetFileName/s/SetFileName.*\$/SetFileName \"$filename\"/ \n"; # close SED file close(SED); @@ -177,7 +177,7 @@ # open file for replacing the cross-section line open(SED,">sed.txt"); - + # file names print SED "/kReader1 SetFileName/s/SetFileName.*\$/SetFileName $file1/ \n"; print SED "/kReader2 SetFileName/s/SetFileName.*\$/SetFileName $file2/ \n"; @@ -219,7 +219,7 @@ # file name $filename = sprintf("${tcl_tag}_%2.2i.ps",$i); - print SED "/writer SetFileName/s/SetFileName.*\$/SetFileName \"$filename\"/ \n"; + print SED "/writer SetFileName/s/SetFileName.*\$/SetFileName \"$filename\"/ \n"; # close SED file close(SED); diff --git a/utils/clean_listings_specfem.pl b/utils/clean_listings_specfem.pl index c17948ba3..1dbd8e10b 100755 --- a/utils/clean_listings_specfem.pl +++ b/utils/clean_listings_specfem.pl @@ -11,11 +11,11 @@ # This Perl script (below), which we developed ourselves and cannot hurt anyway, and which BuildBot runs on the three source codes. -# Basic, but replaces all tabs, removes useless white spaces, switches all comparison operators to their modern syntax +# Basic, but replaces all tabs, removes useless white spaces, switches all comparison operators to their modern syntax # (changing .GE. to >= and so on), and a few other useful things. # It does not analyze indenting though. -# For C files we could use "A-Style" instead ( http://astyle.sourceforge.net/ ) as we mentioned (I am not sure if it +# For C files we could use "A-Style" instead ( http://astyle.sourceforge.net/ ) as we mentioned (I am not sure if it # handles CUDA in addition to C; it does NOT support Fortran for sure). # -------------------- @@ -23,15 +23,15 @@ # For Fortran: # https://www.freelancer.com/projects/Python-Fortran/Fortran-source-code-beautifier-Python.html -# Quote from that page: "NOTE: as example of beautiful Fortran code refer to http://www.cp2k.org/. By the way, as part of +# Quote from that page: "NOTE: as example of beautiful Fortran code refer to http://www.cp2k.org/. By the way, as part of # CP2K there is Python normalizer which performs good Fortran beautification and can be used as a baseline." # http://www.cp2k.org # http://www.cp2k.org/dev:codingconventions # It contains a Python script called prettify.py, which calls another Python program called normalizeFortranFile.py. -# We could try it (I am not sure I like their idea of converting all Fortran keywords to uppercase, but I think there is +# We could try it (I am not sure I like their idea of converting all Fortran keywords to uppercase, but I think there is # a flag to turn that off). -# Not clear if it takes care of indenting, it probably does but we should check (if not then it is probably not very +# Not clear if it takes care of indenting, it probably does but we should check (if not then it is probably not very # useful for SPECFEM because my simple Perl script below is then probably sufficient). # -------------------- @@ -40,8 +40,8 @@ # http://dev.eclipse.org/mhonarc/lists/photran/msg01767.html # http://www.ifremer.fr/ditigo/molagnon/fortran90/ -# Was nice, but written in 2001 and unsupported since then (although the language has not changed that much since then, -# thus it may not be a problem; but Fortran2003 has a few extra keywords, and it seems this package only supports F90 but +# Was nice, but written in 2001 and unsupported since then (although the language has not changed that much since then, +# thus it may not be a problem; but Fortran2003 has a few extra keywords, and it seems this package only supports F90 but # not F95, which we use a lot). # I would tend to favor the Python program above because it is actively maintained and was written much more recently. # And it is used routinely by CP2K developers, CP2K being a well-known open-source project for molecular dynamics. @@ -68,16 +68,18 @@ # -# Clean spaces, tabs and other non-standard or obsolete things in f90 files +# Clean spaces, tabs and other non-standard or obsolete things in Fortran files # # Author : Dimitri Komatitsch, EPS - Harvard University, USA, January 1998 # # -# read and clean all f90 files in the current directory and subdirectories +# read and clean all Fortran files in the current directory and subdirectories # - @objects = `ls *.f90 *.F90 *.h *.h.in *.fh */*.f90 */*.F90 */*.h */*.h.in */*.fh */*/*.f90 */*/*.F90 */*/*.h */*/*.h.in */*/*.fh */*/*/*.f90 */*/*/*.F90 */*/*/*.h */*/*/*.h.in */*/*/*.fh`; +# @objects = `ls *.f90 *.F90 *.h *.h.in *.fh */*.f90 */*.F90 */*.h */*.h.in */*.fh */*/*.f90 */*/*.F90 */*/*.h */*/*.h.in */*/*.fh */*/*/*.f90 */*/*/*.F90 */*/*/*.h */*/*/*.h.in */*/*/*.fh`; +# when using this "find" command from Perl we need to use \\ instead of \ below otherwise Perl tries to interpret it + @objects = `find . -name '.git' -prune -o -name 'm4' -prune -o -path './utils/ADJOINT_TOMOGRAPHY_TOOLS/flexwin' -prune -o -type f -regextype posix-extended -regex '.*\\.(fh|f90|F90|h|h\\.in)' -print`; foreach $name (@objects) { chop $name; @@ -130,55 +132,19 @@ ################################################################################################ # -# Clean spaces in C files +# Clean spaces in different ASCII files # # Author : Dimitri Komatitsch, EPS - Harvard University, USA, January 1998 # # -# read and clean all C and CUDA files in the current directory +# read and clean all these files in the current directory and subdirectories # - @objects = `ls *.c *.cu *.h *.h.in *.fh */*.c */*.cu */*.h */*.h.in */*.fh */*/*.c */*/*.cu */*/*.h */*/*.h.in */*/*.fh */*/*/*.c */*/*/*.cu */*/*/*.h */*/*/*.h.in */*/*/*.fh`; - - foreach $name (@objects) { - chop $name; -# change tabs to white spaces - system("expand -2 < $name > _____temp08_____"); - $cname = $name; - print STDOUT "Cleaning $cname ...\n"; - - open(FILEDEPART,"<_____temp08_____"); - open(FILEC,">$cname"); - -# open the input C file - while($line = ) { - -# suppress trailing white spaces and carriage return - $line =~ s/\s*$//; - - print FILEC "$line\n"; - - } - - close(FILEDEPART); - close(FILEC); - - } - - system("rm -f _____temp08_____"); - -################################################################################################ -################################################################################################ -################################################################################################ - -# -# Clean spaces in text and LaTeX files -# -# Author : Dimitri Komatitsch, EPS - Harvard University, USA, January 1998 -# - - @objects = `ls *.txt */*.txt */*/*.txt */*/*/*.txt */*.tex */*/*.tex */*/*/*.tex `; +# @objects = `ls *.c *.cu *.h *.h.in *.fh */*.c */*.cu */*.h */*.h.in */*.fh */*/*.c */*/*.cu */*/*.h */*/*.h.in */*/*.fh */*/*/*.c */*/*/*.cu */*/*/*.h */*/*/*.h.in */*/*/*.fh`; +# when using this "find" command from Perl we need to use \\ instead of \ below otherwise Perl tries to interpret it +# purposely excluding Python files from this list, since (I think) Python can use tabs for indentation (?) and thus they should not be converted to two spaces (?) + @objects = `find . -type f -name \\*Par_file\\* -print -o -name '.git' -prune -o -name 'm4' -prune -o -path './utils/ADJOINT_TOMOGRAPHY_TOOLS/flexwin' -prune -o -type f -regextype posix-extended -regex '.*\\.(bash|c|csh|cu|fh|f90|F90|h|h\\.in|pl|tex|txt|sh)' -print`; foreach $name (@objects) { chop $name; @@ -214,10 +180,14 @@ # # Clean all accented letters and non-ASCII characters to remain portable # -# Authors : David Luet, Princeton University, USA and Dimitri Komatitsch, CNRS, France, January 2015 +# Authors : David Luet, Princeton University, USA and Dimitri Komatitsch, CNRS, France, February 2015; "find" command from Elliott Sales de Andrade # - @objects = `ls *.txt *.c *.cu *.h *.h.in *.fh */*.c */*.cu */*.h */*.h.in */*.fh */*/*.c */*/*.cu */*/*.h */*/*.h.in */*/*.fh */*/*/*.c */*/*/*.cu */*/*/*.h */*/*/*.h.in */*/*/*.fh *.f90 *.F90 *.h *.h.in *.fh */*.f90 */*.F90 */*.h */*.h.in */*.fh */*/*.f90 */*/*.F90 */*/*.h */*/*.h.in */*/*.fh */*/*/*.f90 */*/*/*.F90 */*/*/*.h */*/*/*.h.in */*/*/*.fh */*.txt */*/*.txt */*/*/*.txt */*.tex */*/*.tex */*/*/*.tex */*.sh */*/*.sh */*/*/*.sh */*.csh */*/*.csh */*/*/*.csh */*.bash */*/*.bash */*/*/*.bash */*.pl */*/*.pl */*/*/*.pl `; +# @objects = `ls *.txt *.c *.cu *.h *.h.in *.fh */*.c */*.cu */*.h */*.h.in */*.fh */*/*.c */*/*.cu */*/*.h */*/*.h.in */*/*.fh */*/*/*.c */*/*/*.cu */*/*/*.h */*/*/*.h.in */*/*/*.fh *.f90 *.F90 *.h *.h.in *.fh */*.f90 */*.F90 */*.h */*.h.in */*.fh */*/*.f90 */*/*.F90 */*/*.h */*/*.h.in */*/*.fh */*/*/*.f90 */*/*/*.F90 */*/*/*.h */*/*/*.h.in */*/*/*.fh */*.txt */*/*.txt */*/*/*.txt */*.tex */*/*.tex */*/*/*.tex *.sh */*.sh */*/*.sh */*/*/*.sh *.csh */*.csh */*/*.csh */*/*/*.csh *.bash */*.bash */*/*.bash */*/*/*.bash *.pl */*.pl */*/*.pl */*/*/*.pl *.py */*.py */*/*.py */*/*/*.py`; +# when using this "find" command from Perl we need to use \\ instead of \ below otherwise Perl tries to interpret it + @objects = `find . -type f -name \\*Par_file\\* -print -o -name '.git' -prune -o -name 'm4' -prune -o -path './utils/ADJOINT_TOMOGRAPHY_TOOLS/flexwin' -prune -o -type f -regextype posix-extended -regex '.*\\.(bash|c|csh|cu|fh|f90|F90|h|h\\.in|pl|py|tex|txt|sh)' -print`; + + system("rm -f _____temp08_____ _____temp09_____"); foreach $name (@objects) { chop $name; @@ -229,5 +199,5 @@ } - system("rm -f _____temp08_____ _____temp09_____"); + system("rm -f _____temp08_____ _____temp09_____"); diff --git a/utils/convolve_source_timefunction.csh b/utils/convolve_source_timefunction.csh index 06dd13926..d85d25faf 100755 --- a/utils/convolve_source_timefunction.csh +++ b/utils/convolve_source_timefunction.csh @@ -11,11 +11,11 @@ set use_triangle_source = ".false." # Use .true. for a triangle and .false. for ########### DO NOT CHANGE ANYTHING BELOW ########### foreach file ( $* ) # Loop on all files (and directories) given in argument - + set nlines = `wc -l $file` # nlines is the number of lines in the file considered - echo $nlines > input_convolve_code.txt # Create a new temp file input_convolve_code.txt (or recreate it if it exists) and write nlines on it + echo $nlines > input_convolve_code.txt # Create a new temp file input_convolve_code.txt (or recreate it if it exists) and write nlines on it echo $half_duration_triangle >> input_convolve_code.txt # Write half_duration_triangle after that... - echo $use_triangle_source >> input_convolve_code.txt # ... and write .true. or false at the end depending on the source chosen + echo $use_triangle_source >> input_convolve_code.txt # ... and write .true. or false at the end depending on the source chosen echo convolving $file with half_duration_triangle = $half_duration_triangle using lines $nlines # A small print $SPECFEM_PATH/bin/xconvolve_source_timefunction < $file > ${file}.convolved # Execute xconvolve_source_timefunction with argument $file and write the output on ${file}.convolved rm input_convolve_code.txt # Remove the temp file input_convolve_code.txt diff --git a/utils/create_specfem3D_gpu_cuda_method_stubs.pl b/utils/create_specfem3D_gpu_cuda_method_stubs.pl index fe562457e..5543df0eb 100755 --- a/utils/create_specfem3D_gpu_cuda_method_stubs.pl +++ b/utils/create_specfem3D_gpu_cuda_method_stubs.pl @@ -4,7 +4,7 @@ # Script to extract the function declarations in cuda files # # -# usage: ./ceate_specfem3D_gpu_cuda_method_stubs.pl +# usage: ./ceate_specfem3D_gpu_cuda_method_stubs.pl # run in directory root SPECFEM3D/ # @@ -64,45 +64,45 @@ END @objects = `ls src/cuda/*.cu`; -foreach $name (@objects) { +foreach $name (@objects) { chop $name; print "extracting word in file $name ...\n"; - print IOUT "\n//\n// $name\n//\n\n"; - + print IOUT "\n//\n// $name\n//\n\n"; + # change tabs to white spaces - system("expand -2 < $name > _____temp_tutu01_____"); + system("expand -2 < $name > _____temp_tutu01_____"); open(IIN,"<_____temp_tutu01_____"); - + # open the source file $success = 1; $do_extract = 0; while($line = ) { chop $line; - + # suppress trailing white spaces and carriage return $line =~ s/\s*$//; - + # change the version number and copyright information # $line =~ s#\(c\) California Institute of Technology and University of Pau, October 2007#\(c\) California Institute of Technology and University of Pau, November 2007#og; # $line =~ s#rmass_sigma#rmass_time_integral_of_sigma#og; - + if($line =~ /extern "C"/){ - # new function declaration starts + # new function declaration starts #print "$line\n"; - if( $line =~/FC_FUNC/ ){ + if( $line =~/FC_FUNC/ ){ # function declaration on same line as extern, ask for line skip print "problem: please add a line break after extern 'C' here:"; print "$line\n"; $success = 0; - close(IIN); + close(IIN); exit; } $do_extract = 1; - next; + next; } - + # extract section if($do_extract == 1 ){ # function declaration @@ -117,12 +117,12 @@ END $do_extract = 0; }else{ # write line to the output file - print IOUT "$line\n"; + print IOUT "$line\n"; } next; } } - close(IIN); + close(IIN); if( $success == 0 ){ exit; } } diff --git a/utils/sac2000_alpha_convert/script_filter_sac_all.csh b/utils/sac2000_alpha_convert/script_filter_sac_all.csh index 8020bb7ea..669fab4d4 100644 --- a/utils/sac2000_alpha_convert/script_filter_sac_all.csh +++ b/utils/sac2000_alpha_convert/script_filter_sac_all.csh @@ -6,7 +6,7 @@ foreach file ($*) echo $file - sac2000 << FIN + sac2000 << FIN qdp off read alpha ${file} bandpass butter corners 0.1 1.0 npoles 4 passes 2 diff --git a/utils/seis_process/phtimes.csh b/utils/seis_process/phtimes.csh index b550c8aec..5eb7a6e6a 100755 --- a/utils/seis_process/phtimes.csh +++ b/utils/seis_process/phtimes.csh @@ -1,6 +1,6 @@ #!/bin/csh # -# script to output travel times +# script to output travel times # based on iaspei-tau package # intended to work for P and S phases # @@ -8,9 +8,9 @@ # # e.g. ./phtimes.csh 611 52.474 P # ./phtimes.csh 611 52.474 S -# +# ########################################### -# MODEL PARAMETER +# MODEL PARAMETER # locates your IASPEI-TAU installation set dir="/opt/seismo-util/source/iaspei-tau" @@ -53,8 +53,8 @@ $delta -1 EOF -# outputs single line with phase name and traveltime +# outputs single line with phase name and traveltime fgrep -A 1 "#" tmp.log | tail -n 1 | awk '{print $3,$4}' -# in case of problems, see the created tmp.log for further informations \ No newline at end of file +# in case of problems, see the created tmp.log for further informations diff --git a/utils/seis_process/process_data.pl b/utils/seis_process/process_data.pl index 86049dade..44c99cf10 100755 --- a/utils/seis_process/process_data.pl +++ b/utils/seis_process/process_data.pl @@ -33,7 +33,7 @@ sub Usage{ data_sac_files --- names of the data sac files to be processed Notice: - 1. We require that polezero files in the same directory as the sac + 1. We require that polezero files in the same directory as the sac data files which is generally satisfied. We require that resp dir be specified even if it is current(.). All needed info is taken from sac headers @@ -42,10 +42,10 @@ sub Usage{ 4. For BH? components, please set -s 20, otherwise interpolation to 1 sample/second will be performed - NOTE: Please make sure that SAC, saclst and IASP91 packages are installed properly on + NOTE: Please make sure that SAC, saclst and IASP91 packages are installed properly on your system, and that all related env variables are set properly before running the script. - + Qinya Liu, originally written in Oct 2002; updated in Jan 2011 END exit(1); @@ -60,7 +60,7 @@ END if ($opt_R and not -d $opt_R) {die("Check if dir $opt_R exists\n");} if ($opt_t) {($tmin, $tmax) = split(/\//,$opt_t); - $f1 = 1./$tmax; $f2=1./$tmin;} + $f1 = 1./$tmax; $f2=1./$tmin;} if ($opt_d) { $out_dir=$opt_d; if (not -d $out_dir) {mkdir($out_dir,0777);} } @@ -136,7 +136,7 @@ END print SAC "echo on\n"; print SAC "r $outfile\n";} - if ($opt_l){ # cut record + if ($opt_l){ # cut record print " Cut the record from o+$lmin to o+$lmax\n"; (undef,$tmp_o)=split(" ",`$saclst o f $outfile`); if (abs($tmp_o-$undef) < $eps) {die("O has not been set to cut record\n");} @@ -170,17 +170,17 @@ END chomp($pzfile); if (!-f $pzfile) {print " **** No pzfile $pzfile **** \n"; $no_resp=1;} else {print " Transfer instrument response using pz file $pzfile\n"; - printf SAC ("trans from polezero s %20s to none freq %12.6f%12.6f%12.6f%12.6f \n", - $pzfile,$f0,$f1,$f2,$f3);} + printf SAC ("trans from polezero s %20s to none freq %12.6f%12.6f%12.6f%12.6f \n", + $pzfile,$f0,$f1,$f2,$f3);} } else { # assume resp file in opt_R @respfiles=glob("$opt_R/${network}.${sta}.${khole}.${comp}*.RESP"); $respfile = find_resp_file($outfile,@respfiles); if (! -f $respfile or @respfiles == 0) {print " **** No respfile $respfiles for $network, $sta, $khole, $comp ****\n"; $no_resp=1;} else { - print " Transfer instrument response using response file $respfile\n"; - printf SAC ("trans from evalresp fname $respfile to none freq %12.6f%12.6f%12.6f%12.6f \n", - $f0,$f1,$f2,$f3); - printf SAC "mul 1e-9\n"; }} + print " Transfer instrument response using response file $respfile\n"; + printf SAC ("trans from evalresp fname $respfile to none freq %12.6f%12.6f%12.6f%12.6f \n", + $f0,$f1,$f2,$f3); + printf SAC "mul 1e-9\n"; }} printf SAC " rtrend\n rmean\n taper width $opt_T\n"; } @@ -217,7 +217,7 @@ END print SAC "echo off\nquit\n"; close(SAC); if ($no_resp and defined $opt_d) { - print "Deleting $outfile\n"; + print "Deleting $outfile\n"; system("rm -f $outfile");} } print " Done! \n"; diff --git a/utils/seis_process/process_syn.pl b/utils/seis_process/process_syn.pl index 8c25e49f6..358dfdfa7 100755 --- a/utils/seis_process/process_syn.pl +++ b/utils/seis_process/process_syn.pl @@ -33,11 +33,11 @@ sub Usage{ names of files -- name of syn files to be processed - NOTE: Please make sure that SAC, saclst and IASP91 packages are installed properly on + NOTE: Please make sure that SAC, saclst and IASP91 packages are installed properly on your system, and that all the environment variables are set properly before running the script. - + Qinya Liu, originally written in Oct 2002, most recently updated in Feb 2010. END @@ -55,7 +55,7 @@ END if (!$opt_P) {$poles=4;$pass=2;} else{($poles,$pass)=split(/\//,$opt_P); if(not defined $pass or $pass<1){$pass=2;}} -if ($opt_l) {($lmin,$lmax) = split(/\//,$opt_l);} +if ($opt_l) {($lmin,$lmax) = split(/\//,$opt_l);} else {$lmin = 0; $lmax = 3600;} if ($opt_a and not -f $opt_a) {$opt_a="/opt/seismo/data/STATIONS";} if ($opt_o and not $opt_m) {die("Specify centroid time first\n");} @@ -88,7 +88,7 @@ END foreach $file (@ARGV) { - print "\nProcessing file $file\n"; + print "\nProcessing file $file\n"; if (! -f $file) {die(" No such file : $file\n");} # transfer ascii file to sac file according to name of files @@ -170,7 +170,7 @@ END else { printf SAC ("bp n $poles p $pass co %10.5f %10.5f\n",$f1,$f2);} print SAC "rtrend\n rmean\n taper\n";} - + if ($opt_i) {# convolve with instrument response print "Convolving instrument response...\n"; $pzfile="SAC_PZs_${net}_${sta}_${comp}_"; diff --git a/utils/solver_classical_serial_Fortran_or_C_no_MPI/make_all_C.csh b/utils/solver_classical_serial_Fortran_or_C_no_MPI/make_all_C.csh index b2fe92fd4..13e2b2101 100755 --- a/utils/solver_classical_serial_Fortran_or_C_no_MPI/make_all_C.csh +++ b/utils/solver_classical_serial_Fortran_or_C_no_MPI/make_all_C.csh @@ -19,7 +19,7 @@ ifort -o xspecfem3D_C -O3 -xSSE4.1 -ftz -implicitnone -warn truncated_source -wa # gcc -c -fbounds-check -Wall -fno-trapping-math -fno-signaling-nans -std=gnu99 -O3 serial_specfem3D_single_with_Deville.c # gfortran -o xspecfem3D_C -O3 -std=f95 -fimplicit-none -frange-check -O3 -pedantic -pedantic-errors -Waliasing -Wampersand -Wline-truncation -Wsurprising -Wunderflow -fno-trapping-math serial_specfem3D_single_with_Deville.o read_arrays_solver.f90 -# g++ -fno-trapping-math -O3 -o xspecfem3D_C serial_specfem3D_single_with_Deville.c -lm +# g++ -fno-trapping-math -O3 -o xspecfem3D_C serial_specfem3D_single_with_Deville.c -lm # pgcc -fast -Mnobounds -Minline -Mneginfo -Knoieee -Minform=warn -fastsse -tp amd64e -o xspecfem3D_C serial_specfem3D_single_with_Deville.c -lm diff --git a/utils/solver_classical_serial_Fortran_or_C_no_MPI/mesher_for_serial/DATA/Par_file b/utils/solver_classical_serial_Fortran_or_C_no_MPI/mesher_for_serial/DATA/Par_file index 934053d35..1bc37051d 100644 --- a/utils/solver_classical_serial_Fortran_or_C_no_MPI/mesher_for_serial/DATA/Par_file +++ b/utils/solver_classical_serial_Fortran_or_C_no_MPI/mesher_for_serial/DATA/Par_file @@ -111,7 +111,7 @@ RECEIVERS_CAN_BE_BURIED = .false. # print source time function PRINT_SOURCE_TIME_FUNCTION = .false. -# set to true to use GPUs +# set to true to use GPUs GPU_MODE = .false. # ADIOS Options for I/Os diff --git a/utils/solver_classical_serial_Fortran_or_C_no_MPI/mesher_for_serial/DATA/Par_file_001GPUs_run_it_in_serial b/utils/solver_classical_serial_Fortran_or_C_no_MPI/mesher_for_serial/DATA/Par_file_001GPUs_run_it_in_serial index d038f4c95..e0f7b363f 100644 --- a/utils/solver_classical_serial_Fortran_or_C_no_MPI/mesher_for_serial/DATA/Par_file_001GPUs_run_it_in_serial +++ b/utils/solver_classical_serial_Fortran_or_C_no_MPI/mesher_for_serial/DATA/Par_file_001GPUs_run_it_in_serial @@ -111,6 +111,6 @@ RECEIVERS_CAN_BE_BURIED = .false. # print source time function PRINT_SOURCE_TIME_FUNCTION = .false. -# set to true to use GPUs +# set to true to use GPUs GPU_MODE = .false. diff --git a/utils/solver_classical_serial_Fortran_or_C_no_MPI/mesher_for_serial/DATA/Par_file_004GPUs b/utils/solver_classical_serial_Fortran_or_C_no_MPI/mesher_for_serial/DATA/Par_file_004GPUs index b78935fb5..25861aab9 100644 --- a/utils/solver_classical_serial_Fortran_or_C_no_MPI/mesher_for_serial/DATA/Par_file_004GPUs +++ b/utils/solver_classical_serial_Fortran_or_C_no_MPI/mesher_for_serial/DATA/Par_file_004GPUs @@ -111,6 +111,6 @@ RECEIVERS_CAN_BE_BURIED = .false. # print source time function PRINT_SOURCE_TIME_FUNCTION = .false. -# set to true to use GPUs +# set to true to use GPUs GPU_MODE = .false. diff --git a/utils/solver_classical_serial_Fortran_or_C_no_MPI/mesher_for_serial/DATA/Par_file_016GPUs b/utils/solver_classical_serial_Fortran_or_C_no_MPI/mesher_for_serial/DATA/Par_file_016GPUs index d038f4c95..e0f7b363f 100644 --- a/utils/solver_classical_serial_Fortran_or_C_no_MPI/mesher_for_serial/DATA/Par_file_016GPUs +++ b/utils/solver_classical_serial_Fortran_or_C_no_MPI/mesher_for_serial/DATA/Par_file_016GPUs @@ -111,6 +111,6 @@ RECEIVERS_CAN_BE_BURIED = .false. # print source time function PRINT_SOURCE_TIME_FUNCTION = .false. -# set to true to use GPUs +# set to true to use GPUs GPU_MODE = .false. diff --git a/utils/solver_classical_serial_Fortran_or_C_no_MPI/mesher_for_serial/DATA/Par_file_64slices_validation_test_JCP_paper_multiGPU b/utils/solver_classical_serial_Fortran_or_C_no_MPI/mesher_for_serial/DATA/Par_file_64slices_validation_test_JCP_paper_multiGPU index 4c482fc09..cffdb4539 100644 --- a/utils/solver_classical_serial_Fortran_or_C_no_MPI/mesher_for_serial/DATA/Par_file_64slices_validation_test_JCP_paper_multiGPU +++ b/utils/solver_classical_serial_Fortran_or_C_no_MPI/mesher_for_serial/DATA/Par_file_64slices_validation_test_JCP_paper_multiGPU @@ -111,6 +111,6 @@ RECEIVERS_CAN_BE_BURIED = .false. # print source time function PRINT_SOURCE_TIME_FUNCTION = .false. -# set to true to use GPUs +# set to true to use GPUs GPU_MODE = .false. diff --git a/utils/solver_classical_serial_Fortran_or_C_no_MPI/mesher_for_serial/DATA/Par_file_OK_192GPUs_90percent_of_4GB b/utils/solver_classical_serial_Fortran_or_C_no_MPI/mesher_for_serial/DATA/Par_file_OK_192GPUs_90percent_of_4GB index 1c893307e..eaacfb355 100644 --- a/utils/solver_classical_serial_Fortran_or_C_no_MPI/mesher_for_serial/DATA/Par_file_OK_192GPUs_90percent_of_4GB +++ b/utils/solver_classical_serial_Fortran_or_C_no_MPI/mesher_for_serial/DATA/Par_file_OK_192GPUs_90percent_of_4GB @@ -111,6 +111,6 @@ RECEIVERS_CAN_BE_BURIED = .false. # print source time function PRINT_SOURCE_TIME_FUNCTION = .false. -# set to true to use GPUs +# set to true to use GPUs GPU_MODE = .false. diff --git a/utils/unused_routines/create_movie_GMT/movie2gif.pl b/utils/unused_routines/create_movie_GMT/movie2gif.pl index 3643b2feb..ef34e0e9d 100755 --- a/utils/unused_routines/create_movie_GMT/movie2gif.pl +++ b/utils/unused_routines/create_movie_GMT/movie2gif.pl @@ -18,7 +18,7 @@ sub Usage { -p add topography to the plot -2 2d plot, otherwise 3d plot -s station name file to plot - -n -- run nearneighbor command to interpolate xyz file into grd file, + -n -- run nearneighbor command to interpolate xyz file into grd file, since this is the step that takes most of the time, you can choose to skip this step if you have already run it. -d -- distance to average for nearneighbor command option -S (default 5 km) @@ -26,14 +26,14 @@ sub Usage { EOF exit(1); -} +} #$bindir = "/opt/seismo-util/source/basin_inversion/bin"; if (@ARGV == 0) {Usage();} if (not getopts('m:f:pg2xns:R:d:')) {die("Check options\n");} if ($opt_m) {$cmt_file = $opt_m; - ($elat,$elon) = get_cmt_location($cmt_file);} + ($elat,$elon) = get_cmt_location($cmt_file);} if (not defined $opt_f) {die("give the start and end of frame\n");} ($start,$end) = split(/\//,$opt_f); @@ -153,8 +153,8 @@ sub Usage { print CSH "psxy $JM $R -M -W2 -K -O -P -V $fault_file >> $ps_file\n"; if ($opt_m) {print CSH "psxy $JM $R -Sa0.15 -W1 -G255/0/0 -K -O -P -V <> $ps_file\n$elon $elat\nEOF\n";} if ($opt_s) { - print CSH "awk '{print \$4, \$3}' sta.tmp | psxy $JM $R -St0.12 -W0.8 -G0/255/0 -K -O -P -V >> $ps_file\n"; - print CSH "awk '{print \$4, \$3+0.1, 12, 0, 4, \"CM\", \$1}' sta.tmp | pstext $JM $R -G0/0/255 -N -P -K -O -V >> $ps_file \n"; + print CSH "awk '{print \$4, \$3}' sta.tmp | psxy $JM $R -St0.12 -W0.8 -G0/255/0 -K -O -P -V >> $ps_file\n"; + print CSH "awk '{print \$4, \$3+0.1, 12, 0, 4, \"CM\", \$1}' sta.tmp | pstext $JM $R -G0/0/255 -N -P -K -O -V >> $ps_file \n"; } print CSH "pstext $JM $R -N -W255/255/255 -O -P -V <>$ps_file \n -114.8 36.5 12 0 0 RT time = $time s \nEOF\n"; } else { diff --git a/utils/unused_routines/create_movie_GMT/plot_shakemap.pl b/utils/unused_routines/create_movie_GMT/plot_shakemap.pl index 190486e8a..f755b104d 100755 --- a/utils/unused_routines/create_movie_GMT/plot_shakemap.pl +++ b/utils/unused_routines/create_movie_GMT/plot_shakemap.pl @@ -94,7 +94,7 @@ sub convert_linear { ($v1,$r1,$g1,$b1,$v2,$r2,$g2,$b2) = split(" ",$line); $v1 = $v1 ** $power, $v2 = $v2 ** $power; printf CPT2 ("%-10.8f\t%s\t%s\t%s\t%-10.8f\t%s\t%s\t%s\n", - $v1,$r1,$g1,$b1,$v2,$r2,$g2,$b2); + $v1,$r1,$g1,$b1,$v2,$r2,$g2,$b2); }else {print CPT2 "$line";} } close(CPT2); diff --git a/utils/unused_routines/decimate_mesh/gen_all.sh b/utils/unused_routines/decimate_mesh/gen_all.sh index 5d330d81d..1390bb70a 100755 --- a/utils/unused_routines/decimate_mesh/gen_all.sh +++ b/utils/unused_routines/decimate_mesh/gen_all.sh @@ -1,13 +1,13 @@ #!/bin/sh -# Generates the mesh, nodes_coords and mat files from a given Abaqus one. +# Generates the mesh, nodes_coords and mat files from a given Abaqus one. # The "filename" variable holds the name of the Abaqus file. filename="HOMO_3D_lisse_300" -nbElems=$(tail -1 $filename | awk -F\, '{print $1}') +nbElems=$(tail -1 $filename | awk -F\, '{print $1}') echo $nbElems > mesh nb=$(cat mesh) tail -$nb $filename | awk -F\, '{print $2 $3 $4 $5 $6 $7 $8 $9}' >> mesh -nbLines=$(wc -l $filename | awk '{print $1}') +nbLines=$(wc -l $filename | awk '{print $1}') nbNodes=$(($nbLines-$nbElems-4)) echo $nbNodes > nodes_coords head -$(($nbNodes+3)) $filename | tail -$nbNodes | awk -F\, '{print $2 $3 $4}' >> nodes_coords @@ -15,4 +15,4 @@ echo 1 > mat for i in `seq 2 $nbNodes`; do echo 1 >> mat -done +done diff --git a/utils/unused_routines/decimate_mesh/gen_mat.sh b/utils/unused_routines/decimate_mesh/gen_mat.sh index 7fbbce62b..1ceee86f8 100755 --- a/utils/unused_routines/decimate_mesh/gen_mat.sh +++ b/utils/unused_routines/decimate_mesh/gen_mat.sh @@ -4,4 +4,4 @@ echo 1 > mat for i in `seq 2 98695`; do echo 1 >> mat -done +done diff --git a/utils/unused_routines/from_old_DATA/hauksson_model/runall.csh b/utils/unused_routines/from_old_DATA/hauksson_model/runall.csh index 223f7015a..2f23b75b9 100644 --- a/utils/unused_routines/from_old_DATA/hauksson_model/runall.csh +++ b/utils/unused_routines/from_old_DATA/hauksson_model/runall.csh @@ -2,15 +2,15 @@ pgf90 -fast -o xdens densify_hauksson_ori.f90 xdens < hauksson_new_format.dat > hauksson_denser.dat -pgf90 -fast -o xregrid regrid_hauksson_regular.f90 +pgf90 -fast -o xregrid regrid_hauksson_regular.f90 xregrid < hauksson_denser.dat > hauksson_final_grid_raw.dat pgf90 -fast -o xshow show_hauksson_regrid_dx.f90 -./xshow < hauksson_final_grid_raw.dat > final_regular_raw.dx +./xshow < hauksson_final_grid_raw.dat > final_regular_raw.dx pgf90 -fast -o xsmooth smooth_final_hauksson.f90 ./xsmooth < hauksson_final_grid_raw.dat > hauksson_final_grid_smooth.dat pgf90 -fast -o xshow show_hauksson_regrid_dx.f90 -./xshow < hauksson_final_grid_smooth.dat > final_regular_smooth.dx +./xshow < hauksson_final_grid_smooth.dat > final_regular_smooth.dx diff --git a/utils/unused_routines/from_old_DATA/lin_model/runall.csh b/utils/unused_routines/from_old_DATA/lin_model/runall.csh index c62420f20..aef0fee44 100644 --- a/utils/unused_routines/from_old_DATA/lin_model/runall.csh +++ b/utils/unused_routines/from_old_DATA/lin_model/runall.csh @@ -2,7 +2,7 @@ pgf90 -fast -o xdens densify_hauksson_ori.f90 xdens < lin_new_format.dat > lin_denser.dat -pgf90 -fast -o xregrid regrid_hauksson_regular.f90 +pgf90 -fast -o xregrid regrid_hauksson_regular.f90 xregrid < lin_denser.dat > lin_final_grid_raw.dat pgf90 -fast -o xsmooth smooth_final_hauksson.f90 diff --git a/utils/unused_routines/source_models/convert_finite_sources/convert_Wald_CMTSOLUTION_Northridge.f90 b/utils/unused_routines/source_models/convert_finite_sources/convert_Wald_CMTSOLUTION_Northridge.f90 index d3479f70d..4ee367053 100644 --- a/utils/unused_routines/source_models/convert_finite_sources/convert_Wald_CMTSOLUTION_Northridge.f90 +++ b/utils/unused_routines/source_models/convert_finite_sources/convert_Wald_CMTSOLUTION_Northridge.f90 @@ -752,9 +752,9 @@ subroutine ar2pt(am,am0,am1,e,am0b,px,py,pz,tx,ty,tz,bx,by,bz & ! ierr error indicator (OUTPUT) ! ! errors: -! 1 input tensor not symmetrical: am(1,2).ne.am(2,1) -! 2 input tensor not symmetrical: am(1,3).ne.am(3,1) -! 3 input tensor not symmetrical: am(2,3).ne.am(3,2) +! 1 input tensor not symmetrical: am(1,2)/=am(2,1) +! 2 input tensor not symmetrical: am(1,3)/=am(3,1) +! 3 input tensor not symmetrical: am(2,3)/=am(3,2) ! implicit none !------------------------------------------------------------------------------- @@ -937,9 +937,9 @@ subroutine ar2ha(am,amo,ierr) ! ierr error indicator (OUTPUT) ! ! errors: -! 1 input tensor not symmetrical: am(1,2).ne.am(2,1) -! 2 input tensor not symmetrical: am(1,3).ne.am(3,1) -! 3 input tensor not symmetrical: am(2,3).ne.am(3,2) +! 1 input tensor not symmetrical: am(1,2)/=am(2,1) +! 2 input tensor not symmetrical: am(1,3)/=am(3,1) +! 3 input tensor not symmetrical: am(2,3)/=am(3,2) ! implicit none !------------------------------------------------------------------------------- @@ -1301,9 +1301,9 @@ subroutine ar2plp(am,am0,am1,e,am0b,phia,deltaa,alama,slipa, & ! ierr error indicator (OUTPUT) ! ! errors: -! 1 input tensor not symmetrical: am(1,2).ne.am(2,1) -! 2 input tensor not symmetrical: am(1,3).ne.am(3,1) -! 3 input tensor not symmetrical: am(2,3).ne.am(3,2) +! 1 input tensor not symmetrical: am(1,2)/=am(2,1) +! 2 input tensor not symmetrical: am(1,3)/=am(3,1) +! 3 input tensor not symmetrical: am(2,3)/=am(3,2) ! 5,6,7,8,9,10 internal errors ! implicit none @@ -1425,9 +1425,9 @@ subroutine ha2plp(am,am0,am1,e,am0b,strika,dipa,rakea,slipa, & ! ierr error indicator (OUTPUT) ! ! errors: -! 1 input tensor not symmetrical: am(1,2).ne.am(2,1) -! 2 input tensor not symmetrical: am(1,3).ne.am(3,1) -! 3 input tensor not symmetrical: am(2,3).ne.am(3,2) +! 1 input tensor not symmetrical: am(1,2)/=am(2,1) +! 2 input tensor not symmetrical: am(1,3)/=am(3,1) +! 3 input tensor not symmetrical: am(2,3)/=am(3,2) ! 5,6,7,8,9,10 internal errors ! implicit none