Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
80 commits
Select commit Hold shift + click to select a range
07a2f6e
Fix #180: readPlanewave segfaults on empty elementIds
lmdiazangulo Mar 13, 2026
5364f0e
Adds deployment helper files
lmdiazangulo Mar 13, 2026
0667f64
Fix #124 - Replace `size` as variable name
lmdiazangulo Mar 13, 2026
8aad834
Merge remote-tracking branch 'origin/dev' into 180-readPlanewave-empt…
lmdiazangulo Mar 14, 2026
a217ed1
Merge remote-tracking branch 'origin/dev' into 124-avoid-using-name-s…
lmdiazangulo Mar 14, 2026
4944556
Refactor installation script to include Intel oneAPI compiler and MPI…
lmdiazangulo Mar 14, 2026
52a3fbc
Initial plan
Copilot Mar 16, 2026
2343d5b
Add kind=rkind to all real variable declarations in src_mtln modules
Copilot Mar 16, 2026
2d99606
Fix dispersive.F90: use 0.0_rkind in allocate source= expressions
Copilot Mar 19, 2026
3af866b
Merge remote-tracking branch 'origin/dev' into copilot/fix-mtln-solve…
Copilot Mar 19, 2026
07b4017
add missing rkind to allocate source values
Alberto-o Mar 20, 2026
f54cdbe
Adds missing rkind
Alberto-o Mar 20, 2026
39abfbc
More missing kinds
Alberto-o Mar 20, 2026
be98207
yet another minor for kinds
Alberto-o Mar 20, 2026
4e55526
add comparison interface for rkind
Alberto-o Mar 20, 2026
5730ba8
Fix checkNear calls in test modules: real(kind=rkind) vars and _rkind…
Copilot Mar 20, 2026
f3d3b80
MInor fixes for time kind
Alberto-o Mar 20, 2026
40c0566
Adds checkNear interface for kindtime
Alberto-o Mar 20, 2026
ea2ca8a
minor
Alberto-o Mar 20, 2026
9bc5a1a
Minor
Alberto-o Mar 20, 2026
6061a56
Merge remote-tracking branch 'origin/dev' into 124-avoid-using-name-s…
Alberto-o Mar 20, 2026
4d686cd
Minor
Alberto-o Mar 20, 2026
b2c0aae
Testing tweak
Alberto-o Mar 20, 2026
bd20fba
Removes checkNear_time from interface. Problem with equality of kinds
Alberto-o Mar 20, 2026
5e39bcf
Missing kind
Alberto-o Mar 20, 2026
2fbddba
More kinds
Alberto-o Mar 20, 2026
0e59cd9
Merge pull request #306 from OpenSEMBA/124-avoid-using-name-size-for-…
lmdiazangulo Mar 20, 2026
5f32d39
Merge pull request #332 from OpenSEMBA/dev
lmdiazangulo Mar 20, 2026
37af2aa
Fix array constructor kind mismatch in test_multipolar_expansion.F90 …
Copilot Mar 20, 2026
5124742
Fix all array constructor kind mismatches in MTLN test files (compreh…
Copilot Mar 20, 2026
2b42437
Remove accidentally committed build2 directory, add to .gitignore
Copilot Mar 20, 2026
72f31ed
Remove accidentally committed build2 directory and add to .gitignore
Copilot Mar 20, 2026
11b77c2
Clean up: remove build2 artifacts
Copilot Mar 20, 2026
f655cee
Fix kind mismatch in SOURCE= allocate in smbjson_testingTools
lmdiazangulo Mar 21, 2026
bac4f7a
Fix character buffer overflow for double-precision writes in circuit.F90
Copilot Mar 22, 2026
2c03739
Merge pull request #307 from OpenSEMBA/deployment
lmdiazangulo Mar 23, 2026
f3000e3
Fixes for rkind in windows
Alberto-o Mar 23, 2026
3a1b8a8
Merge remote-tracking branch 'origin/dev' into copilot/fix-mtln-solve…
Alberto-o Mar 23, 2026
edf1c1e
Character length for spice RLC values was not long enough after chang…
Alberto-o Mar 23, 2026
9bc8650
Refactor Probe class item retrieval and update test cases for improve…
lmdiazangulo Mar 24, 2026
e33463a
Merge remote-tracking branch 'origin/dev' into 180-readPlanewave-empt…
lmdiazangulo Mar 24, 2026
9b426d8
Adds test for simple cabin initialization.
lmdiazangulo Mar 24, 2026
16e1737
Fixes error in smbjson
Alberto-o Mar 24, 2026
0cdd238
Adds extra case for MPI
lmdiazangulo Mar 24, 2026
3254fd8
Merge branch 'simple-cabin-case-failing-with-mtln' of github.com:Open…
lmdiazangulo Mar 24, 2026
c3343f2
Fixes line break when writing MTLN probes in double precision
lmdiazangulo Mar 24, 2026
81f256b
Merge pull request #305 from OpenSEMBA/180-readPlanewave-empty-elementId
lmdiazangulo Mar 24, 2026
0844372
Merge pull request #322 from OpenSEMBA/copilot/fix-mtln-solver-real-v…
lmdiazangulo Mar 24, 2026
f7f08c3
Merge remote-tracking branch 'origin/dev' into tests-time-domain-defa…
Alberto-o Mar 24, 2026
c763280
exchanges updateProbes and advanceTime operations. Time advances last
Alberto-o Mar 24, 2026
f84075f
Minor to have same number of time points in probes
Alberto-o Mar 24, 2026
b7bcfdc
minor
Alberto-o Mar 24, 2026
d8d4894
Changes to avoid errors in mtl objects creation when bundle is not in…
Alberto-o Mar 25, 2026
031d0c1
Merge remote-tracking branch 'origin/dev' into simple-cabin-case-fail…
Alberto-o Mar 25, 2026
2432087
Minor for non mpi compilation
Alberto-o Mar 25, 2026
0cd664e
Minor fix in two tests
Alberto-o Mar 25, 2026
7c7fc56
Minor, repeated variable declaration
Alberto-o Mar 25, 2026
14b2aaf
Some test simplification
Alberto-o Mar 25, 2026
29bdd13
Weird, some 0.0 with no kind missing
Alberto-o Mar 25, 2026
dd3c642
Removes sgbc and nodal source repeated tests
Alberto-o Mar 25, 2026
bf089a8
updates test
Alberto-o Mar 25, 2026
9168981
temporarily mark skip for lineIntegralProbe
Alberto-o Mar 25, 2026
2f11cf2
Minor in json
Alberto-o Mar 26, 2026
41d60bd
Changes generator multplier to make field application as in mtln
Alberto-o Mar 26, 2026
a0b41db
Removes limitation on voltage source position
Alberto-o Mar 26, 2026
a52124b
Adds test to check current orientation depending on generator position
Alberto-o Mar 26, 2026
b9a17ff
Fixes test with bulk probe
Alberto-o Mar 26, 2026
4b56f75
Makes label for generators in fdetypes. Updates documentation
Alberto-o Mar 26, 2026
97068d1
Several changes:
Alberto-o Mar 27, 2026
0cf6694
Merge pull request #335 from OpenSEMBA/simple-cabin-case-failing-with…
lmdiazangulo Mar 27, 2026
6b802da
Merge remote-tracking branch 'origin/dev' into 340-criteria-current-d…
Alberto-o Mar 27, 2026
c95f649
Merge pull request #341 from OpenSEMBA/340-criteria-current-direction
Alberto-o Mar 27, 2026
c48bd57
minor, removes outdated assert
Alberto-o Mar 27, 2026
7b26b94
Merge remote-tracking branch 'origin/dev' into tests-time-domain-defa…
Alberto-o Mar 27, 2026
e411351
Minor
Alberto-o Mar 27, 2026
5c85b05
Merge pull request #334 from OpenSEMBA/tests-time-domain-default-beha…
lmdiazangulo Mar 27, 2026
10a28b1
Merge remote-tracking branch 'origin/dev' into 290-merge-repeated-tests
Alberto-o Mar 27, 2026
b72ef7f
Merge remote-tracking branch 'origin/dev' into 290-merge-repeated-tes…
Alberto-o Mar 27, 2026
504181d
Fiexes json (had been changed during tests). Addresses some copilot …
Alberto-o Mar 27, 2026
699c339
Merge pull request #338 from OpenSEMBA/290-merge-repeated-tests
Alberto-o Mar 27, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,5 @@ fort.17
src_main_pub/version.F90
git_info.txt

.venv/
.venv/build2/
build2/
34 changes: 34 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations.
// Extension identifier format: ${publisher}.${name}. Example: vscode.csharp

// List of extensions which should be recommended for users of this workspace.
"recommendations": [
// Fortran language support and linting
"fortran-lang.linter-gfortran",

// CMake support
"ms-vscode.cmake-tools",
"twxs.cmake",

// C++ tools (used alongside Fortran in this project)
"ms-vscode.cpptools",
"ms-vscode.cpp-devtools",

// Testing
"matepek.vscode-catch2-test-adapter",
"fredericbonnet.cmake-test-adapter",

// Git
"mhutchie.git-graph",
"github.vscode-pull-request-github",

// GitHub Copilot
"github.copilot",
"github.copilot-chat"
],
// List of extensions recommended by VS Code that should not be recommended for users of this workspace.
"unwantedRecommendations": [

]
}
10 changes: 10 additions & 0 deletions doc/fdtdjson.md
Original file line number Diff line number Diff line change
Expand Up @@ -821,6 +821,16 @@ A `generator` source must be located on a single `node` whose `coordinateId` is
}
```

Using classic wires, generators can be located on any node of the lines. Using MTLN wires there are some restrictions:

| Syntax | `unshieldedMultiwire` | `shieldedMultiwire` |
| :--- | :--- | :--- |
| Voltage | Only wire extremes | Any point |
| Current | Any point | Only wire extremes |

In case a generator is on a wire extreme, the current direction will be from the generator in the direction of the other wire extreme. If the generator is on an interior wire point, the current direction will be oriented as the wire.


In case the generator is located at the junction (connection point) of two of more lines, the `node` shared by the lines will share the same `coordinateId`. If more than two lines are connected together, it is necessary to know to which of the lines the generator is connected to. The entry `[attachedToLineId]` is an integer which refers to the `elementId` of the `polyline` the source is connected to.

**Example:**
Expand Down
30 changes: 0 additions & 30 deletions scripts/install-intel.sh

This file was deleted.

66 changes: 66 additions & 0 deletions scripts/install-packages.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
#!/bin/bash
# Install script for ugrfdtd development environment
# Generated for Ubuntu 24.04 LTS (Noble Numbat) x86_64

set -e

echo "=== Updating package lists ==="
sudo apt update

echo "=== Installing build tools ==="
sudo apt install -y \
build-essential \
cmake \
ninja-build \
git \
gdb \
pkg-config

echo "=== Installing Fortran compiler ==="
sudo apt install -y \
gfortran

echo "=== Installing MPI ==="
sudo apt install -y \
libopenmpi-dev \
openmpi-bin \
openmpi-common

echo "=== Installing HDF5 ==="
sudo apt install -y \
libhdf5-dev \
hdf5-helpers

echo "=== Installing Python development tools ==="
sudo apt install -y \
python3-dev \
python3-pip


echo "=== Installing Python packages ==="
pip3 install --break-system-packages fortls

COMPILER_VERSION="2025.1"

echo "=== Adding Intel oneAPI apt repository ==="
KEY="GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB"
curl -fsSL "https://apt.repos.intel.com/intel-gpg-keys/$KEY" \
| sudo apt-key add -
echo "deb https://apt.repos.intel.com/oneapi all main" \
| sudo tee /etc/apt/sources.list.d/oneAPI.list
sudo apt-get update -q

echo "=== Installing Intel Fortran + C/C++ compilers (${COMPILER_VERSION}) ==="
sudo apt-get install -y \
intel-oneapi-compiler-fortran-${COMPILER_VERSION} \
intel-oneapi-compiler-dpcpp-cpp-${COMPILER_VERSION}

echo "=== Installing Intel MPI ==="
sudo apt-get install -y \
intel-oneapi-mpi \
intel-oneapi-mpi-devel

echo ""
echo "=== All packages installed successfully ==="
echo "Source the Intel environment before building:"
echo " source /opt/intel/oneapi/setvars.sh"
4 changes: 2 additions & 2 deletions src_conformal/conformal.F90
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ function addEdgeMedia(edges, edge_ratios) result(res)
allocate(res(i)%edges(size(filtered_edges)))
res(i)%edges = filtered_edges
res(i)%ratio = edge_ratios(i)
res(i)%size = size(filtered_edges)
res(i)%n_elements = size(filtered_edges)
end do
end function

Expand All @@ -102,7 +102,7 @@ function addFaceMedia(faces, face_ratios) result(res)
allocate(res(i)%faces(size(filtered_faces)))
res(i)%faces = filtered_faces
res(i)%ratio = face_ratios(i)
res(i)%size = size(filtered_faces)
res(i)%n_elements = size(filtered_faces)
end do

end function
Expand Down
12 changes: 6 additions & 6 deletions src_json_parser/parser_tools.F90
Original file line number Diff line number Diff line change
Expand Up @@ -194,20 +194,20 @@ function getPixelFromElementId(mesh, id) result(res)

function vectorToDiagonalMatrix(vector) result(res)
real(kind=RKIND), dimension(:), intent(in) :: vector
real, dimension(:, :), allocatable :: res
real(kind=rkind), dimension(:, :), allocatable :: res
integer :: i, n
n = size(vector, 1)
allocate(res(n,n), source = 0.0)
allocate(res(n,n), source = 0.0_rkind)
do i = 1, n
res(i,i) = real(vector(i))
res(i,i) = vector(i)
end do
end function

function scalarToMatrix(scalar) result(res)
real(kind=RKIND), intent(in) :: scalar
real, dimension(:, :), allocatable :: res
allocate(res(1,1), source = 0.0)
res(1,1) = real(scalar)
real(kind=rkind), dimension(:, :), allocatable :: res
allocate(res(1,1), source = 0.0_rkind)
res(1,1) = scalar
end function

subroutine splitLineIntoWords(line, words)
Expand Down
56 changes: 41 additions & 15 deletions src_json_parser/smbjson.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1033,9 +1033,11 @@ function readPlanewave(pw) result (res)
res%beta = this%getRealAt(pw, J_SRC_PW_POLARIZATION//'.'//J_SRC_PW_PHI)

block
type(cell_interval_t), dimension(:), allocatable :: cellIntervals
type(coords_t), dimension(:), allocatable :: nfdeCoords
nfdeCoords = &
cellIntervalsToCoords(this%getSingleVolumeInElementsIds(pw))
cellIntervals = this%getSingleVolumeInElementsIds(pw)
if (size(cellIntervals) == 0) return
nfdeCoords = cellIntervalsToCoords(cellIntervals)
res%coor1 = [nfdeCoords(1)%Xi, nfdeCoords(1)%Yi, nfdeCoords(1)%Zi]
res%coor2 = [nfdeCoords(1)%Xe, nfdeCoords(1)%Ye, nfdeCoords(1)%Ze]
end block
Expand Down Expand Up @@ -2072,19 +2074,30 @@ function readGeneratorOnThinWire(linels, plineElemIds) result(res)

select case(this%getStrAt(genSrcs(i)%p, J_FIELD))
case (J_FIELD_VOLTAGE)
res(position)%srctype = "VOLT"
res(position)%srcfile = this%getStrAt(genSrcs(i)%p, J_SRC_MAGNITUDE_FILE)
res(position)%multiplier = 1.0_RKIND
res(position)%srctype = F_SOURCE_VOLTAGE
case (J_FIELD_CURRENT)
res(position)%srctype = "CURR"
res(position)%srcfile = this%getStrAt(genSrcs(i)%p, J_SRC_MAGNITUDE_FILE)
res(position)%multiplier = 1.0_RKIND
case default
res(position)%srctype = F_SOURCE_CURRENT
case default
call WarnErrReport('Field block of source of type generator must be current or voltage', .true.)
end select
res(position)%srcfile = this%getStrAt(genSrcs(i)%p, J_SRC_MAGNITUDE_FILE)
res(position)%multiplier = 1.0_RKIND*orientFieldFromGenerator(linels, position)

end do
end block
end function

function orientFieldFromGenerator(linels, position) result(res)
type(linel_t), dimension(:), intent(in) :: linels
integer :: position
integer :: res
if (position == 1) then
res = sign(1,linels(position)%orientation)
else if (position == size(linels)) then
res = -sign(1,linels(position)%orientation)
else
res = sign(1,linels(position)%orientation)
end if

end function

Expand Down Expand Up @@ -3771,10 +3784,10 @@ subroutine assignPULProperties(res, mat, n)
type(shielded_multiwire_t), intent(inout) :: res
type(json_value_ptr_t) :: mat
integer, intent(in) :: n
real, dimension(:,:), allocatable :: null_matrix
real(kind=rkind), dimension(:,:), allocatable :: null_matrix
logical :: found

allocate(null_matrix(n,n), source = 0.0)
allocate(null_matrix(n,n), source = 0.0_rkind)
if (this%existsAt(mat%p, J_MAT_MULTIWIRE_INDUCTANCE)) then
res%inductance_per_meter = this%getMatrixAt(mat%p, J_MAT_MULTIWIRE_INDUCTANCE,found)
else
Expand Down Expand Up @@ -3808,14 +3821,14 @@ subroutine assignInCellProperties(res, mat, n)
type(json_value), pointer :: multipolarExpansionPtr
integer, intent(in) :: n
integer :: m
real, dimension(:,:), allocatable :: null_matrix
real(kind=rkind), dimension(:,:), allocatable :: null_matrix
logical :: found
logical :: areFixedInCell
logical :: areMultipolarInCell
logical :: hasRadius
real(kind=RKIND), dimension(:), allocatable :: r, c

allocate(null_matrix(n,n), source = 0.0)
allocate(null_matrix(n,n), source = 0.0_rkind)

areFixedInCell = &
this%existsAt(mat%p, J_MAT_MULTIWIRE_INDUCTANCE) .and. &
Expand Down Expand Up @@ -3978,7 +3991,7 @@ function buildSegments(j_cable, despl) result(res)
case(DIR_Y)
res(i)%dualBox = getdualBoxZX(res(i), despl)
res(i)%d1 = despl%desZ(res(i)%z-1)
res(i)%d1 = despl%desX(res(i)%x-1)
res(i)%d2 = despl%desX(res(i)%x-1)
case(DIR_Z)
res(i)%dualBox = getdualBoxXY(res(i), despl)
res(i)%d1 = despl%desX(res(i)%x-1)
Expand Down Expand Up @@ -4043,7 +4056,7 @@ function getdualBoxZX(segment, despl) result (res)
function buildStepSize(segments, despl) result(res)
type(segment_t), dimension(:), allocatable :: segments
type(Desplazamiento_t), intent(in) :: despl
real, allocatable, dimension(:) :: res
real(kind=rkind), allocatable, dimension(:) :: res
integer :: i, or
allocate(res(size(segments)))
do i = 1, size(segments)
Expand Down Expand Up @@ -4388,19 +4401,32 @@ function getSingleVolumeInElementsIds(this, pw) result (res)
elemIds = this%getIntsAt(pw, J_ELEMENTIDS, found=found)
if (.not. found) then
call WarnErrReport("Error reading single volume elementIds label not found.", .true.)
allocate(res(0))
return
end if
if (size(elemIds) == 0) then
call WarnErrReport("Entity elementIds must not be empty.", .true.)
allocate(res(0))
return
end if
if (size(elemIds) /= 1) then
call WarnErrReport("Entity must contain a single elementId.", .true.)
allocate(res(0))
return
end if
cellRegion = this%mesh%getCellRegion(elemIds(1), found)
if (.not. found) then
write(errorMsg, *) "Entity elementId ", elemIds(1), " not found."
call WarnErrReport(errorMsg, .true.)
allocate(res(0))
return
end if
res = cellRegion%getIntervalsOfType(CELL_TYPE_VOXEL)
if (size(res) /= 1) then
write(errorMsg, *) "Entity must contain a single cell region defining a volume."
call WarnErrReport(errorMsg, .true.)
allocate(res(0))
return
end if
end function

Expand Down
Loading
Loading