From 5592652761398bf11ebce0b5abdcf9cbea1c8e2a Mon Sep 17 00:00:00 2001 From: Luis Manuel Diaz Angulo Date: Mon, 11 Nov 2024 16:38:16 +0100 Subject: [PATCH] Removes CompileWithWires flag --- CMakeLists.txt | 1 - src_main_pub/errorreport.F90 | 20 ------------ src_main_pub/interpreta_switches.F90 | 16 ---------- src_main_pub/mpicomm.F90 | 12 +------ src_main_pub/observation.F90 | 47 ++++++---------------------- src_main_pub/resuming.F90 | 8 ----- src_main_pub/semba_fdtd.F90 | 3 -- src_main_pub/timestepping.F90 | 31 ++++-------------- src_wires_pub/wires.F90 | 3 -- 9 files changed, 16 insertions(+), 125 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ecc0f2d3..12b21ec7 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -142,7 +142,6 @@ add_definitions( -DCompileWithInt2 -DCompileWithReal4 -DCompileWithOpenMP --DCompileWithWires ) diff --git a/src_main_pub/errorreport.F90 b/src_main_pub/errorreport.F90 index deacb9b6..1f053128 100755 --- a/src_main_pub/errorreport.F90 +++ b/src_main_pub/errorreport.F90 @@ -306,24 +306,6 @@ subroutine ReportExistence(sgg,layoutnumber,size,thereare,mur_second,MurAfterPML call stoponerror(layoutnumber,size,buff) #endif endif - ! - If (thereare%Wires) then -#ifdef CompileWithWires - continue -#else -#ifdef CompileWithBerengerWires - continue -#else -#ifdef CompileWithSlantedWires - continue -#else - buff=trim(adjustl(whoami))//' WIREs unsupported. Recompile' - call stoponerror(layoutnumber,size,buff) -#endif -#endif -#endif - endif - ! !!!!!!!!!!!!! if (thereAre%MagneticMedia) then buff=' has special H-media' @@ -378,12 +360,10 @@ subroutine ReportExistence(sgg,layoutnumber,size,thereare,mur_second,MurAfterPML buff= ' has magnetic dispersives' call warnerrreport(buff) endif -#ifdef CompileWithWires If (thereare%Wires) then buff= ' has Holland WIREs' call warnerrreport(buff) endif -#endif #ifdef CompileWithBerengerWires If (thereare%Wires) then buff= ' has Multi-WIREs' diff --git a/src_main_pub/interpreta_switches.F90 b/src_main_pub/interpreta_switches.F90 index 855d3057..b3a5a542 100755 --- a/src_main_pub/interpreta_switches.F90 +++ b/src_main_pub/interpreta_switches.F90 @@ -694,7 +694,6 @@ subroutine interpreta(l,statuse) l%opcionespararesumeo = trim (adjustl(l%opcionespararesumeo)) // ' ' // trim (adjustl(l%chain)) CASE ('-saveall') l%saveall = .TRUE. -#ifdef CompileWithWires CASE ('-attw') i = i + 1 CALL getcommandargument (l%chaininput, i, f, l%length, statuse) @@ -837,14 +836,12 @@ subroutine interpreta(l,statuse) endif end select #endif -#ifdef CompileWithWires select case (trim(adjustl(l%wiresflavor))) case ('berenger','slanted','experimental','transition') if (l%wirethickness/=1) then CALL stoponerror (l%layoutnumber, l%size, 'Thickness>1 unsupported for this wireflavor',.true.); statuse=-1; !goto 668 endif end select -#endif #ifndef CompileWithBerengerWires select case (trim(adjustl(l%wiresflavor))) case ('berenger') @@ -884,7 +881,6 @@ subroutine interpreta(l,statuse) GO TO 180 179 CALL stoponerror (l%layoutnumber, l%size, 'Invalid inductance order',.true.); statuse=-1; !goto 668 180 l%opcionespararesumeo = trim (adjustl(l%opcionespararesumeo)) // ' ' // trim (adjustl(l%chain)) // ' ' // trim (adjustl(f)) -#endif CASE ('-prefix') i = i + 1 CALL getcommandargument (l%chaininput, i, f, l%length, statuse) @@ -1552,16 +1548,13 @@ subroutine print_help(l) CALL print11 (l%layoutnumber, '& sigma=factor * maximum_PML_sigma, depth= # layers ') CALL print11 (l%layoutnumber, '-mur1 : Supplement PMLs with 1st order Mur ABCs ') CALL print11 (l%layoutnumber, '-mur2 : Supplement PMLs with 2nd order Mur ABCs ') -#ifdef CompileWithWires CALL print11 (l%layoutnumber, '-wiresflavor {holland.or.old} : model for the wires ') -#endif #ifdef CompileWithBerengerWires CALL print11 (l%layoutnumber, '-wiresflavor {berenger} : model for the wires ') #endif #ifdef CompileWithSlantedWires CALL print11 (l%layoutnumber, '-wiresflavor {new/Slanted.or.experimental.or.slanted/transition/semistructured l%precision} : model for the wires ') #endif -#ifdef CompileWithWires CALL print11 (l%layoutnumber, '& (default '//trim(adjustl(l%wiresflavor))//') ') CALL print11 (l%layoutnumber, '-mtlnwires : Use mtln solver to advance wires currents ') CALL print11 (l%layoutnumber, '-notaparrabos : Do not remove extra double tails at the end of the wires ') @@ -1599,7 +1592,6 @@ subroutine print_help(l) CALL print11 (l%layoutnumber, '-maxwireradius number : Bounds globally the wire radius ') CALL print11 (l%layoutnumber, '-clip : Permits to clip a bigger problem truncating wires.') CALL print11 (l%layoutnumber, '-wirecrank : Uses Crank-Nicolson for wires (development) ') -#endif CALL print11 (l%layoutnumber, '-noNF2FF string : Supress a NF2FF plane for calculation ') CALL print11 (l%layoutnumber, '& String can be: up, down, left, right, back , front') CALL print11 (l%layoutnumber, '-NF2FFDecim : Uses decimation in NF2FF calculation (faster). ') @@ -1693,11 +1685,7 @@ subroutine print_help(l) #else !CALL print11 (l%layoutnumber, 'UNSUPPORTED: Isotropic Multilayer Skin-depth Materials (l%mibc)') #endif -#ifdef CompileWithWires CALL print11 (l%layoutnumber, 'SUPPORTED: Loaded and grounded thin-wires with juntions') -#else - !CALL print11 (l%layoutnumber, 'UNSUPPORTED: Loaded and grounded thin-wires with juntions') -#endif CALL print11 (l%layoutnumber, 'SUPPORTED: Nodal hard/soft electric and magnetic sources') #ifdef CompileWithHDF CALL print11 (l%layoutnumber, 'SUPPORTED: .xdmf+.h5 probes ') @@ -1719,11 +1707,7 @@ subroutine print_help(l) #else !CALL print11 (l%layoutnumber, 'UNSUPPORTED: Permittivity scaling accelerations') #endif -#ifdef CompileWithWires CALL print11 (l%layoutnumber, 'SUPPORTED: Holland Wires') -#else - !CALL print11 (l%layoutnumber, 'UNSUPPORTED: Holland Wires') -#endif #ifdef CompileWithBerengerWires CALL print11 (l%layoutnumber, 'SUPPORTED: Multi-Wires') #else diff --git a/src_main_pub/mpicomm.F90 b/src_main_pub/mpicomm.F90 index 035aab2f..f749c4fb 100755 --- a/src_main_pub/mpicomm.F90 +++ b/src_main_pub/mpicomm.F90 @@ -32,17 +32,13 @@ module MPIcomm Use Report use fdetypes -#ifdef CompileWithWires use wiresHolland_constants use HollandWires -#endif implicit none private -#ifdef CompileWithWires type(Thinwires_t), pointer :: HwiresMPI -#endif Type buffer_t @@ -68,10 +64,8 @@ module MPIcomm public FlushMPI_E,FlushMPI_H,InitMPI,MPIupdateMin, InitGeneralMPI,MPIdivide public MPIupdateBloques, MPIinitSubcomm -#ifdef CompileWithWires !public InitWiresMPI public newInitWiresMPI,NewFlushWiresMPI -#endif public InitExtraFlushMPI @@ -649,7 +643,7 @@ subroutine FlushMPI_E(sggalloc,layoutnumber,size, Ex,Ey,Ez) ! -#ifdef CompileWithWires + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! new routine: works without the MediaMatrix Info ! supports multiwires @@ -1219,10 +1213,6 @@ subroutine FlushWiresMPIorigindexInfo(layoutnumber,size) !!! return !!!end subroutine newFlushWiresMPIindexmedInfo -#endif - !del compilewithwires - - subroutine InitExtraFlushMPI (layoutnumber,sggsweep,sggalloc,med,nummed,sggmiez,sggMiHz) type (XYZlimit_t), dimension(1:6) :: sggalloc,sggsweep integer (kind=4) :: layoutnumber diff --git a/src_main_pub/observation.F90 b/src_main_pub/observation.F90 index 32708936..002ad58e 100755 --- a/src_main_pub/observation.F90 +++ b/src_main_pub/observation.F90 @@ -33,14 +33,13 @@ module Observa use MPIcomm #endif -#ifdef CompileWithWires use wiresHolland_constants use HollandWires + #ifdef CompileWithMTLN use Wire_bundles_mtln_mod use mtln_solver_mod , mtln_solver_t => mtln_t #endif -#endif #ifdef CompileWithBerengerWires use WiresBerenger #endif @@ -66,9 +65,9 @@ module Observa complex( kind = CKIND), dimension( :,:), allocatable :: valorComplex_Hx,valorComplex_Hy,valorComplex_Hz end type Serialized_t type item_t -#ifdef CompileWithWires - type (CurrentSegments), pointer :: segmento !segmento de hilo que se observa si lo hubiere -#endif + + type (CurrentSegments), pointer :: segmento !segmento de hilo que se observa si lo hubiere + #ifdef CompileWithBerengerWires type (TSegment) , pointer :: segmento_Berenger !segmento de hilo que se observa si lo hubiere #endif @@ -105,11 +104,7 @@ module Observa complex( kind = CKIND), dimension( :), allocatable :: auxExp_E,auxExp_H,dftEntrada !para sondas freqdomain end type output_t - - -#ifdef CompileWithWires type(Thinwires_t), pointer :: Hwireslocal -#endif #ifdef CompileWithBerengerWires type(TWires) , pointer :: Hwireslocal_Berenger #endif @@ -477,12 +472,10 @@ subroutine InitObservation(sgg,sggMiEx,sggMiEy,sggMiEz,sggMiHx,sggMiHy,sggMiHz,s 9138 if(my_iostat /= 0) write(*,fmt='(a)',advance='no') '.' !!if(my_iostat /= 0) print '(i5,a1,i4,2x,a)',9138,'.',layoutnumber,trim(adjustl(nEntradaRoot))//'_Outputrequests_'//trim(adjustl(whoamishort))//'.txt' open (19,file=trim(adjustl(nEntradaRoot))//'_Outputrequests_'//trim(adjustl(whoamishort))//'.txt',err=9138,iostat=my_iostat,status='new',action='write') -#ifdef CompileWithWires if ((trim(adjustl(wiresflavor))=='holland') .or. & (trim(adjustl(wiresflavor))=='transition')) then if (Therearewires) Hwireslocal => GetHwires() endif -#endif #ifdef CompileWithBerengerWires if (trim(adjustl(wiresflavor))=='berenger') then if (Therearewires) Hwireslocal_Berenger => GetHwires_Berenger() @@ -754,7 +747,7 @@ subroutine InitObservation(sgg,sggMiEx,sggMiEy,sggMiEz,sggMiHx,sggMiHy,sggMiHz,s endif allocate (output(ii)%item(i)%valor(0 : BuffObse)) output(ii)%item(i)%valor(0 : BuffObse)=0.0_RKIND -#ifdef CompileWithWires + if ((trim(adjustl(wiresflavor))=='holland') .or. & (trim(adjustl(wiresflavor))=='transition')) then found=.false. @@ -819,7 +812,7 @@ subroutine InitObservation(sgg,sggMiEx,sggMiEy,sggMiEz,sggMiHx,sggMiHy,sggMiHz,s CALL WarnErrReport (buff,.true.) endif endif -#endif + #ifdef CompileWithBerengerWires if (trim(adjustl(wiresflavor))=='berenger') then found=.false. @@ -1304,9 +1297,7 @@ subroutine InitObservation(sgg,sggMiEx,sggMiEy,sggMiEz,sggMiHx,sggMiHy,sggMiHz,s call nodalvtk(sgg,sggMiEx,sggMiEy,sggMiEz,sggMiHx,sggMiHy,sggMiHz,sggMtag, & init,geom,asigna,electric,magnetic,conta,i,ii,output,Ntimeforvolumic) -#ifdef CompileWithWires call wirebundlesvtk(sgg,init,geom,asigna,conta,i,ii,output,Ntimeforvolumic,wiresflavor,sggMtag) -#endif endif !!! do kkk=sgg%Observation(ii)%P(i)%ZI, sgg%Observation(ii)%P(i)%ZE @@ -1613,9 +1604,7 @@ subroutine InitObservation(sgg,sggMiEx,sggMiEy,sggMiEz,sggMiHx,sggMiHy,sggMiHz,s INIT=.false.; geom=.true. ; asigna=.false.; magnetic=.false. ; electric=.true. call nodalvtk(sgg,sggMiEx,sggMiEy,sggMiEz,sggMiHx,sggMiHy,sggMiHz,sggMtag,& init,geom,asigna,electric,magnetic,conta,i,ii,output,Ntimeforvolumic) -#ifdef CompileWithWires call wirebundlesvtk(sgg,init,geom,asigna,conta,i,ii,output,Ntimeforvolumic,wiresflavor,sggMtag) -#endif endif !!! do kkk=sgg%Observation(ii)%P(i)%ZI, sgg%Observation(ii)%P(i)%ZE @@ -2671,9 +2660,8 @@ subroutine UpdateObservation(sgg,sggMiEx,sggMiEy,sggMiEz,sggMiHx,sggMiHy,sggMiHz real (kind = RKIND) :: jx,jy,jz integer(kind=4) :: conta !para realmente dar tangenciales de campos en los medios superficiales character(len=*), INTENT(in) :: wiresflavor -#ifdef CompileWithWires + type( CurrentSegments), pointer :: segmDumm !segmento de hilo que se observa si lo hubiere -#endif ! #ifdef CompileWithBerengerWires type(TSegment) , pointer :: segmDumm_Berenger !segmento de hilo que se observa si lo hubiere @@ -2876,8 +2864,8 @@ subroutine UpdateObservation(sgg,sggMiEx,sggMiEy,sggMiEz,sggMiHx,sggMiHy,sggMiHz output( ii)%item( i)%valor(nTime-nInit) + & (Ey( i1_m, JJJ_m, k1_m) - Ey( i2_m+1, JJJ_m, k1_m)) * dye( JJJ_m ) enddo + case( iJx, iJy, iJz) -#ifdef CompileWithWires if ((trim(adjustl(wiresflavor))=='holland') .or. & (trim(adjustl(wiresflavor))=='transition')) then output( ii)%item( i)%valor(nTime-nInit) = 0.0_RKIND !wipe value @@ -2908,7 +2896,7 @@ subroutine UpdateObservation(sgg,sggMiEx,sggMiEy,sggMiEz,sggMiHx,sggMiHy,sggMiHz endif !!!!!!!!!!!!!!!!!! endif -#endif + #ifdef CompileWithBerengerWires if (trim(adjustl(wiresflavor))=='berenger') then SegmDumm_Berenger => output( ii)%item( i)%Segmento_Berenger @@ -3453,9 +3441,7 @@ subroutine UpdateObservation(sgg,sggMiEx,sggMiEy,sggMiEz,sggMiHx,sggMiHy,sggMiHz call nodalvtk(sgg,sggMiEx,sggMiEy,sggMiEz,sggMiHx,sggMiHy,sggMiHz,sggMtag,& init,geom,asigna,electric,magnetic,conta,i,ii,output,Ntimeforvolumic) -#ifdef CompileWithWires call wirebundlesvtk(sgg,init,geom,asigna,conta,i,ii,output,Ntimeforvolumic,wiresflavor,sggMtag) -#endif endif !!! do KKK = k1, k2 @@ -4114,8 +4100,6 @@ subroutine FlushObservationFiles(sgg,nInit,FinalInstant,layoutnumber,size, dxe,d endif endif ! - -#ifdef CompileWithWires case(iJx,iJy,iJz) if (singlefilewrite) then unidad=output(ii)%item(i)%unitmaster @@ -4133,7 +4117,6 @@ subroutine FlushObservationFiles(sgg,nInit,FinalInstant,layoutnumber,size, dxe,d output(ii)%item(i)%valor4(n-nInit) , & ! Vminus output(ii)%item(i)%valor5(n-nInit) ! vplus-vminus endif -#endif end select endif endif @@ -4432,10 +4415,8 @@ subroutine DestroyObservation(sgg) field=sgg%observation(ii)%P(i)%what select case(field) case (iJx,iJy,iJz) -#ifdef CompileWithWires deallocate (output(ii)%item(i)%valor) deallocate (output(ii)%item(i)%valor2,output(ii)%item(i)%valor3,output(ii)%item(i)%valor4,output(ii)%item(i)%valor5) !en caso de hilos se necesitan -#endif case (iBloqueJx,iBloqueJy,iBloqueMx,iBloqueMy) deallocate (output(ii)%item(i)%valor) #ifdef CompileWithMPI @@ -5153,9 +5134,6 @@ subroutine nodalvtk(sgg,sggMiEx,sggMiEy,sggMiEz,sggMiHx,sggMiHy,sggMiHz,sggMtag, return end subroutine - - -#ifdef CompileWithWires subroutine wirebundlesvtk(sgg,init,geom,asigna,conta,i,ii,output,Ntimeforvolumic,wiresflavor,sggMtag) type (SGGFDTDINFO), intent(IN) :: sgg @@ -5181,12 +5159,10 @@ subroutine wirebundlesvtk(sgg,init,geom,asigna,conta,i,ii,output,Ntimeforvolumic !print *,'----antes wires init,geom,asigna,conta,i,ii',init,geom,asigna,conta,i,ii if (init) then -#ifdef CompileWithWires if ((trim(adjustl(wiresflavor))=='holland') .or. & (trim(adjustl(wiresflavor))=='transition')) then Hwireslocal => GetHwires() endif -#endif #ifdef CompileWithBerengerWires if (trim(adjustl(wiresflavor))=='berenger') then Hwireslocal_Berenger => GetHwires_Berenger() @@ -5241,7 +5217,6 @@ subroutine wirebundlesvtk(sgg,init,geom,asigna,conta,i,ii,output,Ntimeforvolumic endif endif #endif -#ifdef CompileWithWires if ((trim(adjustl(wiresflavor))=='holland') .or. & (trim(adjustl(wiresflavor))=='transition')) then if (geom) then @@ -5285,7 +5260,6 @@ subroutine wirebundlesvtk(sgg,init,geom,asigna,conta,i,ii,output,Ntimeforvolumic end do endif endif -#endif #ifdef CompileWithSlantedWires if ((trim(adjustl(wiresflavor))=='slanted').or.(trim(adjustl(wiresflavor))=='semistructured')) then !parsea los hilos @@ -5335,9 +5309,6 @@ subroutine wirebundlesvtk(sgg,init,geom,asigna,conta,i,ii,output,Ntimeforvolumic return end subroutine -#endif - - !!!!!!!!!!!!!!!!!!!!!!!!!!!! !Function to publish the private output data (used in postprocess) !!!!!!!!!!!!!!!!!!!!!!!!!!!! diff --git a/src_main_pub/resuming.F90 b/src_main_pub/resuming.F90 index d2bbb6e9..db831128 100755 --- a/src_main_pub/resuming.F90 +++ b/src_main_pub/resuming.F90 @@ -44,11 +44,7 @@ module resuming use EDispersives use MDispersives use farfield_m - - !Wires Thin Module -#ifdef CompileWithWires use HollandWires -#endif #ifdef CompileWithBerengerWires use WiresBerenger #ifdef CompileWithMPI @@ -278,7 +274,6 @@ subroutine flush_and_save_resume(sgg, b, layoutnumber, size, nentradaroot, nresu #ifdef CompileWithMPI !do an update of the currents to later read the currents OK if (size>1) then -#ifdef CompileWithWires if ((trim(adjustl(wiresflavor))=='holland') .or. & (trim(adjustl(wiresflavor))=='transition')) then if ((size>1).and.(thereare%wires)) then @@ -290,7 +285,6 @@ subroutine flush_and_save_resume(sgg, b, layoutnumber, size, nentradaroot, nresu endif #endif endif -#endif #ifdef CompileWithBerengerWires if (trim(adjustl(wiresflavor))=='berenger') then call FlushWiresMPI_Berenger(layoutnumber,size) @@ -301,12 +295,10 @@ subroutine flush_and_save_resume(sgg, b, layoutnumber, size, nentradaroot, nresu #endif if( Thereare%Wires) then -#ifdef CompileWithWires if ((trim(adjustl(wiresflavor))=='holland') .or. & (trim(adjustl(wiresflavor))=='transition')) then call StoreFieldsWires endif -#endif #ifdef CompileWithBerengerWires if (trim(adjustl(wiresflavor))=='berenger') then call StoreFieldsWires_Berenger diff --git a/src_main_pub/semba_fdtd.F90 b/src_main_pub/semba_fdtd.F90 index bcdd3d6d..b6bcaa0e 100755 --- a/src_main_pub/semba_fdtd.F90 +++ b/src_main_pub/semba_fdtd.F90 @@ -616,9 +616,6 @@ PROGRAM SEMBA_FDTD_launcher !check that simulation can actually be done for the kind of media requested DO i = 1, sgg%nummedia IF (sgg%Med(i)%Is%ThinWire) THEN -#ifndef CompileWithWires - CALL stoponerror (l%layoutnumber, l%size, 'Wires without wire support. Recompile!') -#endif #ifndef CompileWithBerengerWires if ((l%wiresflavor=='berenger')) then CALL stoponerror (l%layoutnumber, l%size, 'Berenger Wires without support. Recompile!') diff --git a/src_main_pub/timestepping.F90 b/src_main_pub/timestepping.F90 index 1c35e655..93fd51c4 100755 --- a/src_main_pub/timestepping.F90 +++ b/src_main_pub/timestepping.F90 @@ -73,14 +73,11 @@ module Solver use EDispersives use MDispersives use Anisotropic -#ifdef CompileWithWires use HollandWires -#endif -#ifdef CompileWithWires + #ifdef CompileWithMTLN use Wire_bundles_mtln_mod #endif -#endif #ifdef CompileWithBerengerWires use WiresBerenger @@ -88,6 +85,7 @@ module Solver use WiresBerenger_MPI #endif #endif + #ifdef CompileWithSlantedWires use WiresSlanted use estructura_slanted_m @@ -729,7 +727,6 @@ subroutine launch_simulation(sgg,sggMtag,sggMiNo,sggMiEx,sggMiEy,sggMiEz,sggMiHx ! one more MM for right adjancencies dtcritico=sgg%dt -#ifdef CompileWithWires if ((trim(adjustl(wiresflavor))=='holland') .or. & (trim(adjustl(wiresflavor))=='transition')) then #ifdef CompileWithMPI @@ -752,7 +749,6 @@ subroutine launch_simulation(sgg,sggMtag,sggMiNo,sggMiEx,sggMiEy,sggMiEz,sggMiHx endif endif -#endif #ifdef CompileWithBerengerWires if (trim(adjustl(wiresflavor))=='berenger') then @@ -843,8 +839,6 @@ subroutine launch_simulation(sgg,sggMtag,sggMiNo,sggMiEx,sggMiEy,sggMiEz,sggMiHx call MPI_Barrier(SUBCOMM_MPI,ierr) #endif - -#ifdef CompileWithWires if (use_mtln_wires) then #ifdef CompileWithMTLN call InitWires_mtln(sgg,Ex,Ey,Ez,eps0, mu0, mtln_parsed,thereAre%MTLNbundles) @@ -852,7 +846,6 @@ subroutine launch_simulation(sgg,sggMtag,sggMiNo,sggMiEx,sggMiEy,sggMiEz,sggMiHx write(buff,'(a)') 'WIR_ERROR: Executable was not compiled with MTLN modules.' #endif endif -#endif !Anisotropic #ifdef CompileWithMPI @@ -1093,7 +1086,7 @@ subroutine launch_simulation(sgg,sggMtag,sggMiNo,sggMiEx,sggMiEy,sggMiEz,sggMiHx Ex,Ey,Ez,Hx,Hy,Hz) call MPI_Barrier(SUBCOMM_MPI,ierr) write(dubuf,*) '[OK]'; call print11(layoutnumber,dubuf) -#ifdef CompileWithWires + !this modifies the initwires stuff and must be called after initwires (typically at the end) !llamalo siempre aunque no HAYA WIRES!!! para que no se quede colgado en hilos terminales if ((trim(adjustl(wiresflavor))=='holland') .or. & @@ -1103,7 +1096,7 @@ subroutine launch_simulation(sgg,sggMtag,sggMiNo,sggMiEx,sggMiEy,sggMiEz,sggMiHx call MPI_Barrier(SUBCOMM_MPI,ierr) write(dubuf,*) '[OK]'; call print11(layoutnumber,dubuf) endif -#endif + #ifdef CompileWithBerengerWires if (trim(adjustl(wiresflavor))=='berenger') then write(dubuf,*) 'Init MPI Multi-Wires...'; call print11(layoutnumber,dubuf) @@ -1123,12 +1116,11 @@ subroutine launch_simulation(sgg,sggMtag,sggMiNo,sggMiEx,sggMiEy,sggMiEz,sggMiHx !must be called now in case the MPI has changed the connectivity info -#ifdef CompileWithWires if ((trim(adjustl(wiresflavor))=='holland') .or. & (trim(adjustl(wiresflavor))=='transition')) then call ReportWireJunctions(layoutnumber,size,thereare%wires,sgg%Sweep(iHz)%ZI, sgg%Sweep(iHz)%ZE,groundwires,strictOLD,verbose) endif -#endif + #ifdef CompileWithBerengerWires if (trim(adjustl(wiresflavor))=='berenger') then call ReportWireJunctionsBerenger(layoutnumber,size,thereare%wires,sgg%Sweep(iHz)%ZI, sgg%Sweep(iHz)%ZE,groundwires,strictOLD,verbose) @@ -1185,7 +1177,6 @@ subroutine launch_simulation(sgg,sggMtag,sggMiNo,sggMiEx,sggMiEy,sggMiEz,sggMiHx call MPI_Barrier(SUBCOMM_MPI,ierr) call FlushMPI_H_Cray endif -#ifdef CompileWithWires if ((trim(adjustl(wiresflavor))=='holland') .or. & (trim(adjustl(wiresflavor))=='transition')) then if ((size>1).and.(thereare%wires)) then @@ -1197,7 +1188,7 @@ subroutine launch_simulation(sgg,sggMtag,sggMiNo,sggMiEx,sggMiEy,sggMiEz,sggMiHx endif #endif endif -#endif + #ifdef CompileWithBerengerWires if (trim(adjustl(wiresflavor))=='berenger') then if ((size>1).and.(thereare%wires)) call FlushWiresMPI_Berenger(layoutnumber,size) @@ -1386,7 +1377,6 @@ subroutine launch_simulation(sgg,sggMtag,sggMiNo,sggMiEx,sggMiEy,sggMiEz,sggMiHx !******************************************************************************* !******************************************************************************* !!!lamo aqui los hilos por coherencia con las PML que deben absorber los campos creados por los hilos -#ifdef CompileWithWires !Wires (only updated here. No need to update in the H-field part) if (( (trim(adjustl(wiresflavor))=='holland') .or. & (trim(adjustl(wiresflavor))=='transition')) .and. .not. use_mtln_wires) then @@ -1404,7 +1394,6 @@ subroutine launch_simulation(sgg,sggMtag,sggMiNo,sggMiEx,sggMiEy,sggMiEz,sggMiHx endif endif endif -#endif #ifdef CompileWithBerengerWires if (trim(adjustl(wiresflavor))=='berenger') then IF (Thereare%Wires) call AdvanceWiresE_Berenger(sgg,n) @@ -1417,7 +1406,6 @@ subroutine launch_simulation(sgg,sggMtag,sggMiNo,sggMiEx,sggMiEy,sggMiEz,sggMiHx call AdvanceWiresE_Slanted(sgg,n) endif #endif -#ifdef CompileWithWires if (use_mtln_wires) then #ifdef CompileWithMTLN call AdvanceWiresE_mtln(sgg,Idxh,Idyh,Idzh,eps0,mu0) @@ -1425,7 +1413,6 @@ subroutine launch_simulation(sgg,sggMtag,sggMiNo,sggMiEx,sggMiEy,sggMiEz,sggMiHx write(buff,'(a)') 'WIR_ERROR: Executable was not compiled with MTLN modules.' #endif end if -#endif If (Thereare%PMLbodies) then !waveport absorbers call AdvancePMLbodyE endif @@ -1660,7 +1647,6 @@ subroutine launch_simulation(sgg,sggMtag,sggMiNo,sggMiEx,sggMiEy,sggMiEz,sggMiHx !Must be called here again at the end to enforce any of the previous changes !Posible Wire for thickwires advancing in the H-field part -#ifdef CompileWithWires !Wires (only updated here. No need to update in the H-field part) if ((trim(adjustl(wiresflavor))=='holland') .or. & (trim(adjustl(wiresflavor))=='transition')) then @@ -1672,7 +1658,6 @@ subroutine launch_simulation(sgg,sggMtag,sggMiNo,sggMiEx,sggMiEy,sggMiEz,sggMiHx endif endif endif -#endif !PMC BORDERS H-field advancing (duplicates the H-fields at the interface changing their sign) If (Thereare%PMCBorders) call MinusCloneMagneticPMC(sgg%alloc,sgg%Border,Hx,Hy,Hz,sgg%sweep,layoutnumber,size) !Periodic BORDERS H-field mirroring @@ -1707,7 +1692,6 @@ subroutine launch_simulation(sgg,sggMtag,sggMiNo,sggMiEx,sggMiEy,sggMiEz,sggMiHx call MPI_Barrier(SUBCOMM_MPI,ierr) call FlushMPI_H_Cray endif -#ifdef CompileWithWires if ((trim(adjustl(wiresflavor))=='holland') .or. & (trim(adjustl(wiresflavor))=='transition')) then if ((size>1).and.(thereare%wires)) then @@ -1719,7 +1703,6 @@ subroutine launch_simulation(sgg,sggMtag,sggMiNo,sggMiEx,sggMiEy,sggMiEz,sggMiHx endif #endif endif -#endif #ifdef CompileWithBerengerWires if (trim(adjustl(wiresflavor))=='berenger') then if ((size>1).and.(thereare%wires)) call FlushWiresMPI_Berenger(layoutnumber,size) @@ -3232,12 +3215,10 @@ subroutine Destroy_All_exceptSGGMxx(sgg,Ex, Ey, Ez, Hx, Hy, Hz,G1,G2,GM1,GM2,dxe call destroyLumped(sgg) call DestroyEDispersives(sgg) call DestroyMDispersives(sgg) -#ifdef CompileWithWires if ((trim(adjustl(wiresflavor))=='holland') .or. & (trim(adjustl(wiresflavor))=='transition')) then call DestroyWires(sgg) endif -#endif #ifdef CompileWithBerengerWires if (trim(adjustl(wiresflavor))=='berenger') then call DestroyWires_Berenger(sgg) diff --git a/src_wires_pub/wires.F90 b/src_wires_pub/wires.F90 index bbd48c93..aa41b5d6 100755 --- a/src_wires_pub/wires.F90 +++ b/src_wires_pub/wires.F90 @@ -28,7 +28,6 @@ module HollandWires ! -#ifdef CompileWithWires use report use fdetypes @@ -7031,7 +7030,5 @@ subroutine wiresconstantes(fieldtotl,dummy,G2,sgg) end subroutine wiresconstantes -#endif - !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! end module HollandWires