Skip to content

Commit 53e2059

Browse files
committed
code cleaning
1 parent bd5bb90 commit 53e2059

File tree

9 files changed

+166
-166
lines changed

9 files changed

+166
-166
lines changed

src/generate_databases/model_gll.f90

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ subroutine model_gll(myrank,nspec,LOCAL_PATH)
180180
rho_vs(:,:,:,:) = rhostore(:,:,:,:) * vs_read(:,:,:,:)
181181

182182
if (ANISOTROPY) then
183-
183+
184184
! c11
185185
if (myrank == 0) write(IMAIN,*) ' reading in: c11.bin'
186186

@@ -284,7 +284,7 @@ subroutine model_gll(myrank,nspec,LOCAL_PATH)
284284

285285
read(IIN) c23store
286286
close(IIN)
287-
287+
288288
! c24
289289
if (myrank == 0) write(IMAIN,*) ' reading in: c24.bin'
290290

@@ -349,7 +349,7 @@ subroutine model_gll(myrank,nspec,LOCAL_PATH)
349349

350350
read(IIN) c34store
351351
close(IIN)
352-
352+
353353
! c35
354354
if (myrank == 0) write(IMAIN,*) ' reading in: c35.bin'
355355

src/gpu/compute_stacey_acoustic_cuda.cu

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ void FC_FUNC_(compute_stacey_acoustic_undoatt_cuda,
282282
GPU_ERROR_CHECKING("compute_stacey_acoustic_undoatt_cuda");
283283
}
284284

285-
extern EXTERN_LANG
285+
extern EXTERN_LANG
286286
void FC_FUNC_(compute_coupled_injection_contribution_ac_device,
287287
COMPUTE_COUPLED_INJECTION_CONTRIBUTION_AC_DEVICE) (long *Mesh_pointer,
288288
realw* b_boundary_injection_potential,
@@ -317,7 +317,7 @@ void FC_FUNC_(compute_coupled_injection_contribution_ac_device,
317317
SAVE_STACEY,mp->d_num_abs_boundary_faces,mp->d_b_boundary_injection_potential
318318
);
319319
}
320-
#endif
320+
#endif
321321
#ifdef USE_HIP
322322
if (run_hip){
323323
hipLaunchKernelGGL(compute_stacey_acoustic_injection_kernel,dim3(grid), dim3(threads), 0, mp->compute_stream,

src/gpu/kernels/compute_stacey_acoustic_kernel.cu

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -321,11 +321,11 @@ __global__ void compute_stacey_acoustic_injection_kernel(const realw* veloc_inj,
321321
nx = abs_boundary_normal[INDEX3(NDIM,NGLL2,0,igll,iface)];
322322
ny = abs_boundary_normal[INDEX3(NDIM,NGLL2,1,igll,iface)];
323323
nz = abs_boundary_normal[INDEX3(NDIM,NGLL2,2,igll,iface)];
324-
325-
// n \cdot u
324+
325+
// n \cdot u
326326
un = ux * nx + uy * ny + uz * nz;
327327
un += chi_dot /(cpl * rhol);
328-
328+
329329
// gets associated, weighted jacobian
330330
jacobianw = abs_boundary_jacobian2Dw[INDEX2(NGLL2,igll,iface)];
331331

src/gpu/kernels/kernel_proto.cu.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -911,7 +911,7 @@ __global__ void compute_stacey_elastic_undoatt_kernel(realw* veloc,
911911
int num_abs_boundary_faces) ;
912912

913913
// nqdu added
914-
__global__ void
914+
__global__ void
915915
compute_stacey_elastic_injection_kernel(const realw* veloc_inj,
916916
const realw* tract_inj,
917917
realw* accel,
@@ -944,7 +944,7 @@ __global__ void compute_stacey_acoustic_injection_kernel(const realw* veloc_inj,
944944
int SAVE_STACEY,
945945
int num_abs_boundary_faces,
946946
field* b_boundary_injection_potential
947-
);
947+
);
948948

949949
//
950950
// src/gpu/kernels/enforce_free_surface_cuda_kernel.cu

src/specfem3D/compute_stacey_acoustic.f90

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -566,7 +566,7 @@ subroutine compute_coupled_injection_contribution_ac(NGLOB_AB,potential_dot_dot_
566566
! point index using table lookup
567567
ipt = ipt_table(igll,iface)
568568

569-
! interpolates velocity/stress
569+
! interpolates velocity/stress
570570
! nqdu NOT CORRECT!!!
571571
! vx_FK = cs1 * Veloc_FK(1,ipt,iim1) + cs2 * Veloc_FK(1,ipt,ii) + cs3 * Veloc_FK(1,ipt,iip1) + cs4 * Veloc_FK(1,ipt,iip2)
572572
! vy_FK = cs1 * Veloc_FK(2,ipt,iim1) + cs2 * Veloc_FK(2,ipt,ii) + cs3 * Veloc_FK(2,ipt,iip1) + cs4 * Veloc_FK(2,ipt,iip2)
@@ -575,7 +575,7 @@ subroutine compute_coupled_injection_contribution_ac(NGLOB_AB,potential_dot_dot_
575575
! tx_FK = cs1 * Tract_FK(1,ipt,iim1) + cs2 * Tract_FK(1,ipt,ii) + cs3 * Tract_FK(1,ipt,iip1) + cs4 * Tract_FK(1,ipt,iip2)
576576
! ty_FK = cs1 * Tract_FK(2,ipt,iim1) + cs2 * Tract_FK(2,ipt,ii) + cs3 * Tract_FK(2,ipt,iip1) + cs4 * Tract_FK(2,ipt,iip2)
577577
! tz_FK = cs1 * Tract_FK(3,ipt,iim1) + cs2 * Tract_FK(3,ipt,ii) + cs3 * Tract_FK(3,ipt,iip1) + cs4 * Tract_FK(3,ipt,iip2)
578-
578+
579579
! now displ/chi_dot are saved in veloc_fk/tract_fk
580580
ux_FK = cs1 * Veloc_FK(1,ipt,iim1) + cs2 * Veloc_FK(1,ipt,ii) + &
581581
cs3 * Veloc_FK(1,ipt,iip1) + cs4 * Veloc_FK(1,ipt,iip2)
@@ -585,7 +585,7 @@ subroutine compute_coupled_injection_contribution_ac(NGLOB_AB,potential_dot_dot_
585585
cs3 * Veloc_FK(3,ipt,iip1) + cs4 * Veloc_FK(3,ipt,iip2)
586586
chi_dot_FK = cs1 * Tract_FK(1,ipt,iim1) + cs2 * Tract_FK(1,ipt,ii) + &
587587
cs3 * Tract_FK(1,ipt,iip1) + cs4 * Tract_FK(1,ipt,iip2)
588-
588+
589589
! velocity
590590
! vx = - vx_FK
591591
! vy = - vy_FK
@@ -642,7 +642,7 @@ subroutine compute_coupled_injection_contribution_ac(NGLOB_AB,potential_dot_dot_
642642
! here, it is added to first undo the factor (rhol*cpl) used to add the velocity contribution to the traction together
643643
! with another (rhol*cpl) used in the expressions of the Sommerfeld condition, where
644644
! absorbl = potential_dot_acoustic(iglob) * jacobianw / cpl / rhol
645-
645+
646646
un = ux*nx + uy*ny + uz*nz
647647
un = un + chi_dot / (rhol * cpl)
648648

@@ -673,25 +673,25 @@ end subroutine compute_coupled_injection_contribution_ac
673673
subroutine compute_coupled_injection_contribution_ac_GPU(iphase,Mesh_pointer)
674674

675675
use constants
676-
676+
677677
use specfem_par, only: SAVE_STACEY,SIMULATION_TYPE
678-
679-
use specfem_par, only: num_abs_boundary_faces
680-
678+
679+
use specfem_par, only: num_abs_boundary_faces
680+
681681
! boundary coupling
682682
use shared_parameters, only: COUPLE_WITH_INJECTION_TECHNIQUE
683683
! boundary injection wavefield parts for saving together with b_absorb_field
684684
use specfem_par_coupling, only: b_boundary_injection_potential
685-
685+
686686
implicit none
687-
687+
688688
! communication overlap
689689
integer,intent(in) :: iphase
690-
690+
691691
! GPU_MODE variables
692692
integer(kind=8),intent(in) :: Mesh_pointer
693693

694-
694+
695695
! safety checks
696696
if (.not. COUPLE_WITH_INJECTION_TECHNIQUE) return
697697

@@ -703,13 +703,13 @@ subroutine compute_coupled_injection_contribution_ac_GPU(iphase,Mesh_pointer)
703703

704704
! only for forward wavefield
705705
if (SIMULATION_TYPE /= 1) return
706-
707-
706+
707+
708708
! compute contribution in device
709-
call compute_coupled_injection_contribution_ac_device(Mesh_pointer,&
710-
b_boundary_injection_potential,&
709+
call compute_coupled_injection_contribution_ac_device(Mesh_pointer, &
710+
b_boundary_injection_potential, &
711711
SAVE_STACEY)
712-
713-
712+
713+
714714
end subroutine compute_coupled_injection_contribution_ac_GPU
715-
715+

src/specfem3D/compute_stacey_viscoelastic.F90

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -616,7 +616,7 @@ subroutine compute_coupled_injection_contribution_el(NGLOB_AB,accel,iphase,it)
616616

617617
! gets velocity & stress for boundary points
618618
select case(INJECTION_TECHNIQUE_TYPE)
619-
!NQDU don't need
619+
!NQDU don't need
620620
! case (INJECTION_TECHNIQUE_IS_DSM)
621621
! ! DSM coupling
622622
! if (old_DSM_coupling_from_Vadim) then
@@ -799,7 +799,7 @@ subroutine compute_coupled_injection_contribution_el_GPU(iphase,Mesh_pointer)
799799

800800
use specfem_par, only: SAVE_STACEY,SIMULATION_TYPE
801801

802-
use specfem_par, only: num_abs_boundary_faces
802+
use specfem_par, only: num_abs_boundary_faces
803803

804804
! boundary coupling
805805
use shared_parameters, only: COUPLE_WITH_INJECTION_TECHNIQUE
@@ -829,7 +829,7 @@ subroutine compute_coupled_injection_contribution_el_GPU(iphase,Mesh_pointer)
829829
if (SIMULATION_TYPE /= 1) return
830830

831831
! compute contribution in device
832-
call compute_coupled_injection_contribution_el_device(Mesh_pointer,b_boundary_injection_field,&
832+
call compute_coupled_injection_contribution_el_device(Mesh_pointer,b_boundary_injection_field, &
833833
SAVE_STACEY)
834834

835835

0 commit comments

Comments
 (0)