Skip to content

Commit 9ca2675

Browse files
authored
Merge pull request #251 from OpenSEMBA/dev
Propagates changes from PR#250 to main
2 parents f47ef42 + cdb6d87 commit 9ca2675

File tree

74 files changed

+795347
-468
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+795347
-468
lines changed

.github/workflows/automatic-release-ubuntu-gnu.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ jobs:
1212
strategy:
1313
matrix:
1414
build-type: ["Release"]
15-
mpi: ["No"]
16-
mtln: ["Yes"]
17-
hdf: ["Yes"]
15+
mpi: ["OFF"]
16+
mtln: ["ON"]
17+
hdf: ["ON"]
1818

1919
steps:
2020
- name: Checkout

.github/workflows/automatic-release-windows-intelLLVM.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ jobs:
1212
strategy:
1313
matrix:
1414
build-type: ["Release"]
15-
mpi: ["No"]
16-
mtln: ["Yes"]
17-
hdf: ["Yes"]
15+
mpi: ["OFF"]
16+
mtln: ["ON"]
17+
hdf: ["ON"]
1818

1919
steps:
2020

.github/workflows/ubuntu.yml

Lines changed: 13 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -25,44 +25,28 @@ jobs:
2525
{name: 'gcc', version: 11}
2626
]
2727
build-type: ["Release"]
28-
mpi: ["Yes", "No"]
29-
mtln: ["Yes", "No"]
30-
hdf: ["Yes"]
31-
double-precision: ["No"]
28+
mpi: ["ON", "OFF"]
29+
mtln: ["ON", "OFF"]
30+
hdf: ["ON"]
31+
double-precision: ["OFF"]
3232

3333
include:
34-
- os: ubuntu-22.04
35-
compiler: {name: 'intel-classic', version: '2021.10'}
36-
build-type: "Release"
37-
mpi: "No"
38-
mtln: "No"
39-
hdf: "Yes"
40-
double-precision: "No"
41-
42-
# - os: ubuntu-22.04
43-
# compiler: {name: 'intel-classic', version: '2021.10'}
44-
# build-type: "Release"
45-
# mpi: "No"
46-
# mtln: "Yes"
47-
# hdf: "Yes"
48-
# double-precision: "No"
49-
5034
# Disable by lack of space on github action
5135
# - os: ubuntu-latest
5236
# compiler: {name: 'nvidia-hpc', version: '24.5'}
5337
# build-type: "Release"
54-
# mpi: "No"
55-
# mtln: "No"
56-
# hdf: "No"
57-
# double-precision: "No"
38+
# mpi: "OFF"
39+
# mtln: "OFF"
40+
# hdf: "OFF"
41+
# double-precision: "OFF"
5842

5943
- os: ubuntu-latest # This is the only test with double precision.
6044
compiler: {name: 'intel', version: '2025.1'}
6145
build-type: "Release"
62-
mpi: "Yes"
63-
mtln: "No"
64-
hdf: "Yes"
65-
double-precision: "Yes"
46+
mpi: "ON"
47+
mtln: "OFF"
48+
hdf: "ON"
49+
double-precision: "ON"
6650

6751
fail-fast: false
6852

@@ -80,7 +64,7 @@ jobs:
8064
run: python -m pip install -r requirements.txt
8165

8266
- name: Setup MPI
83-
if: matrix.mpi=='Yes' && matrix.compiler.name=='intel'
67+
if: matrix.mpi=='ON' && matrix.compiler.name=='intel'
8468
uses: mpi4py/setup-mpi@v1
8569
with:
8670
mpi: 'intelmpi'

.github/workflows/windows.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ jobs:
2424
os: [windows-latest]
2525
compiler: [ {name: 'intel', version: '2025.0'} ]
2626
build-type: ["Release"]
27-
mpi: ["No"]
28-
mtln: ["Yes", "No"]
29-
hdf: ["Yes"]
30-
double-precision: ["Yes", "No"]
27+
mpi: ["OFF"]
28+
mtln: ["ON", "OFF"]
29+
hdf: ["ON"]
30+
double-precision: ["ON", "OFF"]
3131

3232
fail-fast: false
3333
runs-on: ${{matrix.os}}

CMakeLists.txt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,12 @@ option(SEMBA_FDTD_ENABLE_DOUBLE_PRECISION "Use double precision (CompileWithReal
2121
option(SEMBA_FDTD_ENABLE_TEST "Compile tests" ON)
2222

2323
option(SEMBA_FDTD_ENABLE_INTEL_XHOST_OPTIMIZATION "When compiling in Release, enables the -xHost optimization flag (not supported in github actions)" OFF)
24-
option(SEMBA_FDTD_ENABLE_INTEL_IPO "When compiling in Release, enables the interprocedural optimization" ON)
24+
option(SEMBA_FDTD_ENABLE_INTEL_IPO "When compiling in Release, enables the interprocedural optimization" OFF)
2525

2626
option(SEMBA_FDTD_EXECUTABLE "Compiles executable" ON)
2727
option(SEMBA_FDTD_MAIN_LIB "Compiles main library" ON)
2828
option(SEMBA_FDTD_COMPONENTS_LIB "Compiles components library" ON)
2929
option(SEMBA_FDTD_OUTPUTS_LIB "Compiles outputs library" ON)
30-
3130
# Compilation defines.
3231
if(SEMBA_FDTD_ENABLE_SMBJSON)
3332
add_definitions(-DCompileWithSMBJSON)
@@ -156,6 +155,7 @@ add_library(semba-types
156155
"src_main_pub/nfde_types.F90"
157156
"src_main_pub/fdetypes.F90"
158157
"src_mtln/mtln_types.F90"
158+
"src_conformal/conformal_types.F90"
159159
"src_wires_pub/wires_types.F90"
160160
"src_main_pub/lumped_types.F90"
161161
)
@@ -186,6 +186,9 @@ if (SEMBA_FDTD_ENABLE_MTLN)
186186
endif()
187187
endif()
188188

189+
add_subdirectory(src_conformal)
190+
set(CONFORMAL_LIBRARIES conformal)
191+
189192
if (SEMBA_FDTD_ENABLE_TEST)
190193
add_subdirectory(external/googletest/)
191194
add_subdirectory(test)

CMakePresets.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"inherits": "dbg",
2323
"binaryDir": "build-dbg-nomtln/",
2424
"cacheVariables": {
25-
"SEMBA_FDTD_ENABLE_MTLN": "No"
25+
"SEMBA_FDTD_ENABLE_MTLN": "OFF"
2626
}
2727
}
2828
]

doc/development.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ You can compile HDF5 for your specific platform downloading the latest sources f
2929
Extract to a folder and build and install with the following commands
3030

3131
```shell
32-
cmake -S . -B build -DHDF5_BUILD_FORTRAN=YES -DHDF5_ENABLE_Z_LIB_SUPPORT=NO --fresh
32+
cmake -S . -B build -DHDF5_BUILD_FORTRAN=ON -DHDF5_ENABLE_Z_LIB_SUPPORT=NO --fresh
3333
cmake --build build -j
3434
cmake --install build --prefix ~/hdf5-installed
3535
```
@@ -110,10 +110,10 @@ Open a command prompt with OneAPI variables initialised, to do this open a new c
110110

111111
This will load the OneAPI environment for x64.
112112

113-
Navigate to the fdtd root folder, choose between "Debug"/"Release" for `-DCMAKE_BUILD_TYPE`, and "Yes"/"No" for `-DSEMBA_FDTD_ENABLE_MPI`, for example, a Release version with MPI Support would be:
113+
Navigate to the fdtd root folder, choose between "Debug"/"Release" for `-DCMAKE_BUILD_TYPE`, and "ON"/"OFF" for `-DSEMBA_FDTD_ENABLE_MPI`, for example, a Release version with MPI Support would be:
114114

115115
```shell
116-
cmake -S . -B build -GNinja -DCMAKE_BUILD_TYPE=Release -DSEMBA_FDTD_ENABLE_MPI=Yes
116+
cmake -S . -B build -GNinja -DCMAKE_BUILD_TYPE=Release -DSEMBA_FDTD_ENABLE_MPI=ON
117117
```
118118

119119
Then,

doc/smbjson.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,10 @@ The `elements` entry contains an array of JSON objects, each of which represents
169169
+ `node`, representing a point in space. Elements with this type include a `<coordinateIds>` entry which is an array of a single integer representing the `id` of a coordinate and which must exist in the within the `mesh` `coordinates` list.
170170
+ `polyline`, representing an oriented collection of segments. It must contain a list `<coordinateIds>` with at least two coordinates.
171171
+ `cell`, containing a list of one or more `<intervals>` defined following the [interval convention](#the-interval-convention).
172+
+ + If `cell` represents a conformal element it will contain a list of zero or more <intervals> and a list of <triangles>, describing a close outwards-pointing surface.
173+
+ + In this case, the `cell` must contain an entry `subtype`, which can be `surface` or `volume`, according to the dimension of the geometrical entity.
174+
175+
172176

173177
Below there is an example of a mesh object which includes several types of elements.
174178

@@ -187,6 +191,7 @@ Below there is an example of a mesh object which includes several types of eleme
187191
{"id": 1, "type": "node", "coordinateIds": [2]},
188192
{"id": 2, "type": "polyline", "coordinateIds": [1, 2, 3] },
189193
{"id": 3, "type": "cell", "intervals": [ [ [1, 1, 1], [19, 19, 21] ] ] }
194+
{"id": 4, "type": "conformalVolume", "intervals": [ [ [1, 1, 1], [19, 19, 21] ] ], "triangles" : [[1,2,3]] }
190195
]
191196
}
192197
```
@@ -237,6 +242,9 @@ An interval allows specifying regions within the grid which can be a point, an o
237242
]
238243
}
239244
```
245+
##### Triangles
246+
247+
Each triangle is a list of three `<coordinateId>`, representing the vertices of the triangle. Vertices have to be oriented so the normal of each triangle points outwards the volume.
240248

241249
## `[materials]`
242250
This entry is an array formed by all the physical models contained in the simulation. Each object within the array must contain:

src_conformal/CMakeLists.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
message(STATUS "Creating build system for conformal")
2+
3+
set(CMAKE_Fortran_MODULE_DIRECTORY ${CMAKE_BINARY_DIR}/mod)
4+
5+
add_library(conformal
6+
"cell_map.F90"
7+
"conformal.F90"
8+
"geometry.F90"
9+
)
10+
11+
target_link_libraries(conformal PRIVATE semba-types fhash)

0 commit comments

Comments
 (0)