Skip to content

Commit 8a98fed

Browse files
authored
Merge pull request #147 from OpenSEMBA/dev
Dev
2 parents 59d1430 + f59f6ef commit 8a98fed

File tree

9 files changed

+49
-23
lines changed

9 files changed

+49
-23
lines changed

.github/workflows/ubuntu.yml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ jobs:
2424
mpi: ["Yes", "No"]
2525
mtln: ["Yes"]
2626
hdf: ["Yes"]
27+
double-precision: ["No"]
2728

2829
include:
2930
- os: ubuntu-22.04
@@ -32,18 +33,28 @@ jobs:
3233
mpi: "No"
3334
mtln: "No"
3435
hdf: "Yes"
36+
double-precision: "No"
37+
3538
- os: ubuntu-latest
3639
compiler: {name: 'nvidia-hpc', version: '24.5'}
3740
build-type: "Release"
3841
mpi: "No"
3942
mtln: "No"
4043
hdf: "No"
41-
44+
double-precision: "No"
45+
46+
- os: ubuntu-latest
47+
compiler: {name: 'intel', version: '2024.2'}
48+
build-type: "Release"
49+
mpi: "Yes"
50+
mtln: "No"
51+
hdf: "Yes"
52+
double-precision: "Yes"
4253

4354
fail-fast: false
4455

4556
runs-on: ${{ matrix.os }}
46-
name: ${{matrix.os}} / ${{matrix.compiler.name}} / ${{matrix.build-type}}-mpi(${{matrix.mpi}})-mtln(${{matrix.mtln}})-hdf(${{matrix.hdf}})
57+
name: ${{matrix.os}} / ${{matrix.compiler.name}} / ${{matrix.build-type}}-mpi(${{matrix.mpi}})-mtln(${{matrix.mtln}})-hdf(${{matrix.hdf}})-double(${{matrix.double-precision}})
4758

4859
steps:
4960
- name: Checkout
@@ -80,7 +91,8 @@ jobs:
8091
-DCMAKE_BUILD_TYPE=${{matrix.build-type}} \
8192
-DSEMBA_FDTD_ENABLE_MPI=${{matrix.mpi}} \
8293
-DSEMBA_FDTD_ENABLE_HDF=${{matrix.hdf}} \
83-
-DSEMBA_FDTD_ENABLE_MTLN=${{matrix.mtln}}
94+
-DSEMBA_FDTD_ENABLE_MTLN=${{matrix.mtln}} \
95+
-DSEMBA_FDTD_ENABLE_DOUBLE_PRECISION=${{matrix.double-precision}}
8496
cmake --build build -j
8597
8698
- name: Run unit tests

.github/workflows/windows.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,12 @@ jobs:
2323
mpi: ["No"]
2424
mtln: ["Yes"]
2525
hdf: ["Yes"]
26+
double-precision: ["Yes", "No"]
2627

2728
fail-fast: false
2829
runs-on: ${{matrix.os}}
2930

30-
name: ${{matrix.os}} / ${{matrix.compiler.name}} / ${{matrix.build-type}}-mpi(${{matrix.mpi}})-mtln(${{matrix.mtln}})-hdf(${{matrix.hdf}})
31+
name: ${{matrix.os}} / ${{matrix.compiler.name}} / ${{matrix.build-type}}-mpi(${{matrix.mpi}})-mtln(${{matrix.mtln}})-hdf(${{matrix.hdf}})-double(${{matrix.double-precision}})
3132

3233
steps:
3334

@@ -61,7 +62,8 @@ jobs:
6162
-DCMAKE_BUILD_TYPE=${{matrix.build-type}} \
6263
-DSEMBA_FDTD_ENABLE_MPI=${{matrix.mpi}} \
6364
-DSEMBA_FDTD_ENABLE_HDF=${{matrix.hdf}} \
64-
-DSEMBA_FDTD_ENABLE_MTLN=${{matrix.mtln}}
65+
-DSEMBA_FDTD_ENABLE_MTLN=${{matrix.mtln}} \
66+
-DSEMBA_FDTD_ENABLE_DOUBLE_PRECISION=${{matrix.double-precision}}
6567
cmake --build build -j
6668
6769
- name: Run unit tests

CMakeLists.txt

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,24 +15,32 @@ option(SEMBA_FDTD_ENABLE_MPI "Use MPI" OFF)
1515
option(SEMBA_FDTD_ENABLE_HDF "Use HDF" ON)
1616
option(SEMBA_FDTD_ENABLE_MTLN "Use MTLN" ON)
1717
option(SEMBA_FDTD_ENABLE_SMBJSON "Use smbjson" ON)
18+
option(SEMBA_FDTD_ENABLE_DOUBLE_PRECISION "Use double precision (CompileWithReal8)" OFF)
1819
option(SEMBA_FDTD_ENABLE_TEST "Compile tests" ON)
1920

2021
option(SEMBA_FDTD_EXECUTABLE "Compiles executable" ON)
21-
option(SEMBA_FDTD_MAIN_LIB "Compiles main library" ON)
22-
option(SEMBA_FDTD_COMPONENTS_LIB "Compiles components library" ON)
23-
option(SEMBA_FDTD_OUTPUTS_LIB "Compiles outputs library" ON)
22+
option(SEMBA_FDTD_MAIN_LIB "Compiles main library" ON)
23+
option(SEMBA_FDTD_COMPONENTS_LIB "Compiles components library" ON)
24+
option(SEMBA_FDTD_OUTPUTS_LIB "Compiles outputs library" ON)
2425

2526
if(SEMBA_FDTD_ENABLE_SMBJSON)
2627
add_definitions(-DCompileWithSMBJSON)
2728
endif()
2829
if (SEMBA_FDTD_ENABLE_MTLN)
2930
add_definitions(-DCompileWithMTLN)
3031
endif()
32+
if (SEMBA_FDTD_ENABLE_DOUBLE_PRECISION)
33+
add_definitions(-DCompileWithReal8)
34+
else()
35+
add_definitions(-DCompileWithReal4)
36+
endif()
3137
add_definitions(
3238
-DCompileWithInt2
33-
-DCompileWithReal4
3439
-DCompileWithOpenMP
3540
)
41+
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
42+
add_definitions(-DCompileWithDebug)
43+
endif()
3644

3745
include("${CMAKE_CURRENT_SOURCE_DIR}/set_precompiled_libraries.cmake")
3846

src_main_pub/interpreta_switches.F90

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -253,8 +253,7 @@ subroutine interpreta(l,statuse)
253253
l%opcionespararesumeo = trim (adjustl(l%opcionespararesumeo)) // ' ' // trim (adjustl(l%chain)) // ' ' // trim (adjustl(f))
254254
mpidirset=.true.
255255
endif
256-
257-
!!!!!!!#ifndef CompileWithGamusino
256+
258257
case ('-pause')
259258
i = i + 1
260259
CALL getcommandargument (l%chaininput, i, f, l%length, statuse)
@@ -369,7 +368,6 @@ subroutine interpreta(l,statuse)
369368
CASE ('-clip')
370369
l%CLIPREGION = .TRUE.
371370
l%opcionespararesumeo = trim (adjustl(l%opcionespararesumeo)) // ' ' // trim (adjustl(l%chain))
372-
!endif del compileWithGamusino
373371
!!!!#endif
374372
!
375373

src_main_pub/version.F90

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
module version
2-
character (128), parameter :: compdate= __DATE__ // " " // __TIME__
3-
character(128), parameter :: dataversion=&
4-
'SEMBA-FDTD Version v1.0. Compiled on: ' // trim(adjustl(compdate))
2+
character(128), parameter :: compilation_date= __DATE__ // " " // __TIME__
3+
#ifdef CompileWithDebug
4+
character(128), parameter :: compilation_mode='Debug build'
5+
#else
6+
character(128), parameter :: compilation_mode='Release build'
7+
#endif
8+
character(128), parameter :: dataversion = &
9+
'SEMBA-FDTD. '// trim(adjustl(compilation_mode)) // &
10+
', compiled on: ' // trim(adjustl(compilation_date))
511
end module version

test/smbjson/test_read_dielectricSlab.F90

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ function expectedProblemDescription() result (expected)
5454
expected%front%tipoFrontera(F_XU) = F_PEC
5555
expected%front%tipoFrontera(F_YL) = F_PMC
5656
expected%front%tipoFrontera(F_YU) = F_PMC
57-
expected%front%tipoFrontera(F_ZL) = F_PML
58-
expected%front%tipoFrontera(F_ZU) = F_PML
57+
expected%front%tipoFrontera(F_ZL) = F_MUR
58+
expected%front%tipoFrontera(F_ZU) = F_MUR
5959

6060
! Expected sources.
6161
allocate(expected%plnSrc%collection(1))

test/smbjson/test_read_thinSlot.F90

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ function expectedProblemDescription() result (expected)
5454
expected%front%tipoFrontera(F_XU) = F_PER
5555
expected%front%tipoFrontera(F_YL) = F_PER
5656
expected%front%tipoFrontera(F_YU) = F_PER
57-
expected%front%tipoFrontera(F_ZL) = F_PML
58-
expected%front%tipoFrontera(F_ZU) = F_PML
57+
expected%front%tipoFrontera(F_ZL) = F_MUR
58+
expected%front%tipoFrontera(F_ZU) = F_MUR
5959

6060
! Expected sources.
6161
allocate(expected%plnSrc%collection(1))

testData/input_examples/dielectric_slab.fdtd.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
"xUpper": {"type": "pec"},
1313
"yLower": {"type": "pmc"},
1414
"yUpper": {"type": "pmc"},
15-
"zLower": {"type": "pml"},
16-
"zUpper": {"type": "pml"}
15+
"zLower": {"type": "mur"},
16+
"zUpper": {"type": "mur"}
1717
},
1818

1919
"mesh": {

testData/input_examples/thinSlot.fdtd.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
"xUpper": {"type": "periodic"},
1313
"yLower": {"type": "periodic"},
1414
"yUpper": {"type": "periodic"},
15-
"zLower": {"type": "pml"},
16-
"zUpper": {"type": "pml"}
15+
"zLower": {"type": "mur"},
16+
"zUpper": {"type": "mur"}
1717
},
1818

1919
"mesh": {

0 commit comments

Comments
 (0)