Skip to content
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.

Commit

Permalink
changes in init mtln and in mtln invoking only if .json
Browse files Browse the repository at this point in the history
  • Loading branch information
salvaugres committed Apr 19, 2024
1 parent 6a23b13 commit 08a2533
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 33 deletions.
4 changes: 0 additions & 4 deletions src_main_pub/nfde_types.F90
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,7 @@
MODULE NFDETypes
!
USE FDETYPES
#ifdef CompileWithWires_mtln
USE mtln_types_mod
#endif
!
IMPLICIT NONE
INTEGER (KIND=4), PARAMETER :: RK = RKIND
Expand Down Expand Up @@ -782,9 +780,7 @@ MODULE NFDETypes
TYPE (ThinWires), POINTER :: tWires => NULL ()
TYPE (SlantedWires), POINTER :: sWires => NULL ()
TYPE (ThinSlots), POINTER :: tSlots => NULL ()
#ifdef CompileWithWires_mtln
TYPE (mtln_t), POINTER :: mtln => NULL ()
#endif
END TYPE Parseador

!---> definicion de tipos
Expand Down
22 changes: 4 additions & 18 deletions src_main_pub/semba_fdtd.F90
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,7 @@ PROGRAM SEMBA_FDTD_launcher
USE ParseadorClass
#endif

#ifdef CompileWithWires_mtln
USE smbjson, only: fdtdjson_parser_t => parser_t
#endif
USE Preprocess_m
USE storeData

Expand Down Expand Up @@ -83,9 +81,7 @@ PROGRAM SEMBA_FDTD_launcher
!*************************************************
!
!!!
#ifdef CompileWithWires_mtln
use mtln_solver_mod, mtln_solver_t => mtln_t
#endif
!!!
use interpreta_switches_m
IMPLICIT NONE
Expand Down Expand Up @@ -145,9 +141,7 @@ PROGRAM SEMBA_FDTD_launcher

type (entrada_t) :: l
!!!
#ifdef CompileWithWires_mtln
type (mtln_solver_t) :: mtln_solver
#endif
!!!
logical :: lexis
integer (kind=4) :: my_iostat
Expand Down Expand Up @@ -367,9 +361,7 @@ PROGRAM SEMBA_FDTD_launcher
stop
#endif
elseif (trim(adjustl(l%extension))=='.json') then
#ifdef CompileWithWires_mtln
call cargaFDTDJSON(l%fichin, parser)
#endif
else
print *, 'Neither .nfde nor .json files used as input after -i'
stop
Expand Down Expand Up @@ -872,11 +864,8 @@ PROGRAM SEMBA_FDTD_launcher
l%opcionestotales,l%sgbcfreq,l%sgbcresol,l%sgbccrank,l%sgbcdepth,l%fatalerror,l%fieldtotl,l%permitscaling, &
l%EpsMuTimeScale_input_parameters, &
l%stochastic,l%mpidir,l%verbose,l%precision,l%hopf,l%ficherohopf,l%niapapostprocess,l%planewavecorr, &
l%dontwritevtk,l%experimentalVideal,l%forceresampled,l%factorradius,l%factordelta,l%noconformalmapvtk &
#ifdef CompileWithWires_mtln
,mtln_solver &
#endif
)
l%dontwritevtk,l%experimentalVideal,l%forceresampled,l%factorradius,l%factordelta,l%noconformalmapvtk, &
mtln_solver)

deallocate (sggMiEx, sggMiEy, sggMiEz,sggMiHx, sggMiHy, sggMiHz,sggMiNo,sggMtag)
else
Expand Down Expand Up @@ -1188,7 +1177,6 @@ subroutine cargaNFDE(local_nfde,local_parser)
end subroutine cargaNFDE
#endif

#ifdef CompileWithWires_mtln
subroutine cargaFDTDJSON(filename, parsed)
character(len=1024), intent(in) :: filename
type(Parseador), pointer :: parsed
Expand All @@ -1202,7 +1190,7 @@ subroutine cargaFDTDJSON(filename, parsed)
allocate(parsed)
parsed = parser%readProblemDescription()
end subroutine cargaFDTDJSON
#endif

!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Expand Down Expand Up @@ -1325,10 +1313,8 @@ subroutine NFDE2sgg
CALL read_geomData (sgg,sggMtag,sggMiNo,sggMiEx,sggMiEy,sggMiEz,sggMiHx,sggMiHy,sggMiHz, l%fichin, l%layoutnumber, l%size, SINPML_fullsize, fullsize, parser, &
l%groundwires,l%attfactorc,l%mibc,l%sgbc,l%sgbcDispersive,l%MEDIOEXTRA,maxSourceValue,l%skindepthpre,l%createmapvtk,l%input_conformal_flag,l%CLIPREGION,l%boundwireradius,l%maxwireradius,l%updateshared,l%run_with_dmma, &
eps0,mu0,.false.,l%hay_slanted_wires,l%verbose,l%ignoresamplingerrors,tagtype,l%wiresflavor)
!!!!mtln constructor 100424 !!!solo si es json, si no no existe parser!!
#ifdef CompileWithWires_mtln
!!!!mtln constructor 100424
if (trim(adjustl(l%extension))=='.json') mtln_solver = mtlnCtor(parser%mtln)
#endif
!!!!
WRITE (dubuf,*) '[OK] ENDED NFDE --------> GEOM'
CALL print11 (l%layoutnumber, dubuf)
Expand Down
14 changes: 3 additions & 11 deletions src_main_pub/timestepping.F90
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,8 @@ module Solver
#ifdef CompileWithPrescale
USE P_rescale
#endif

#ifdef CompileWithWires_mtln
use mtln_solver_mod, mtln_solver_t => mtln_t
use Wire_bundles_mtln_mod
#endif
!!
#ifdef CompileWithProfiling
use nvtx
Expand All @@ -145,16 +142,11 @@ subroutine launch_simulation(sgg,sggMtag,sggMiNo,sggMiEx,sggMiEy,sggMiEz,sggMiHx
opcionestotales,sgbcFreq,sgbcresol,sgbccrank,sgbcDepth,fatalerror,fieldtotl,permitscaling, &
EpsMuTimeScale_input_parameters, &
stochastic,mpidir,verbose,precision,hopf,ficherohopf,niapapostprocess,planewavecorr, &
dontwritevtk,experimentalVideal,forceresampled,factorradius,factordelta,noconformalmapvtk &
#ifdef CompileWithWires_mtln
,mtln_solver &
#endif
)
!!!
dontwritevtk,experimentalVideal,forceresampled,factorradius,factordelta,noconformalmapvtk, &
mtln_solver)

#ifdef CompileWithWires_mtln
!!!
type (mtln_solver_t) :: mtln_solver
#endif
!!!
logical :: noconformalmapvtk
logical :: hopf,experimentalVideal,forceresampled
Expand Down
1 change: 1 addition & 0 deletions src_wires_pub/wires_mtln.F90
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ module Wire_bundles_mtln_mod

contains


subroutine InitWires_mtln(sgg,Ex,Ey,Ez,mtln_solver,thereAreMTLNbundles)
type (SGGFDTDINFO), intent(IN), target :: sgg
REAL (KIND=RKIND), intent(inout), target :: &
Expand Down

0 comments on commit 08a2533

Please sign in to comment.