Skip to content

Commit

Permalink
Removes CompileWithWires flag
Browse files Browse the repository at this point in the history
  • Loading branch information
lmdiazangulo committed Nov 11, 2024
1 parent de0fe17 commit 5592652
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 125 deletions.
1 change: 0 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,6 @@ add_definitions(
-DCompileWithInt2
-DCompileWithReal4
-DCompileWithOpenMP
-DCompileWithWires
)


20 changes: 0 additions & 20 deletions src_main_pub/errorreport.F90
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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'
Expand Down
16 changes: 0 additions & 16 deletions src_main_pub/interpreta_switches.F90
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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')
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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 ')
Expand Down Expand Up @@ -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). ')
Expand Down Expand Up @@ -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 ')
Expand All @@ -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
Expand Down
12 changes: 1 addition & 11 deletions src_main_pub/mpicomm.F90
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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


Expand Down Expand Up @@ -649,7 +643,7 @@ subroutine FlushMPI_E(sggalloc,layoutnumber,size, Ex,Ey,Ez)
!


#ifdef CompileWithWires

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
! new routine: works without the MediaMatrix Info
! supports multiwires
Expand Down Expand Up @@ -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
Expand Down
47 changes: 9 additions & 38 deletions src_main_pub/observation.F90
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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()
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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)
!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Expand Down
Loading

0 comments on commit 5592652

Please sign in to comment.