Skip to content

Commit 547d3f9

Browse files
authored
Merge pull request #37 from OpenSEMBA/dev
Dev
2 parents 1ada04c + 7c9f0e3 commit 547d3f9

27 files changed

+22105
-130
lines changed
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: "Ubuntu | Build and tests"
2+
3+
permissions:
4+
actions: write
5+
6+
on:
7+
push:
8+
branches:
9+
- master
10+
- dev
11+
pull_request:
12+
branches:
13+
- dev
14+
15+
workflow_dispatch:
16+
17+
env:
18+
PULMTLN_TOP_DIR: pulmtln
19+
MFEM_TOP_DIR: mfem
20+
21+
jobs:
22+
builds-and-tests:
23+
strategy:
24+
matrix:
25+
os: [ubuntu-latest]
26+
target: [opt]
27+
28+
name: ${{ matrix.os }}-${{ matrix.target }}
29+
30+
runs-on: ${{ matrix.os }}
31+
32+
steps:
33+
- name: checkout PULMTLN
34+
uses: actions/checkout@v3
35+
with:
36+
path: ${{ env.PULMTLN_TOP_DIR }}
37+
ssh-key: ${{secrets.PULMTLN_SSH_KEY}}
38+
submodules: 'recursive'
39+
40+
- name: getcmake
41+
uses: lukka/get-cmake@latest
42+
43+
- name: Setup vcpkg (it does not install any package yet)
44+
uses: lukka/run-vcpkg@v11
45+
with:
46+
vcpkgGitCommitId: 42bb0d9e8d4cf33485afb9ee2229150f79f61a1f
47+
vcpkgJsonGlob: 'pulmtln/vcpkg.json'
48+
49+
- name: Configuring PULMTLN
50+
env:
51+
MFEM_PACKAGE: ${{ github.workspace }}/${{env.MFEM_TOP_DIR}}/build
52+
run: |
53+
cmake --preset "gnu" -S pulmtln -B pulmtln/build
54+
55+
- name: Building PULMTLN
56+
run: |
57+
cmake --build pulmtln/build/
58+
59+
- name: test PULMTLN
60+
run: cd pulmtln && build/bin/pulmtln_tests
61+
62+

.github/workflows/windows-automated-releases.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
- name: Setup vcpkg (it does not install any package yet)
4444
uses: lukka/run-vcpkg@v11
4545
with:
46-
vcpkgGitCommitId: 42bb0d9e8d4cf33485afb9ee2229150f79f61a1f
46+
vcpkgGitCommitId: 120deac3062162151622ca4860575a33844ba10b
4747
vcpkgJsonGlob: 'pulmtln/vcpkg.json'
4848

4949
- name: cache MFEM
@@ -114,15 +114,15 @@ jobs:
114114
115115
- name: Create .tar file
116116
run: |
117-
cd pulmtln && tar -czvf pulmtln-windows.tar.gz dist/*
117+
cd pulmtln && tar -czvf tulip-windows.tar.gz dist/*
118118
119119
120120
- name: Generating release
121121
uses: "marvinpinto/action-automatic-releases@latest"
122122
with:
123123
repo_token: "${{ secrets.GITHUB_TOKEN }}"
124-
automatic_release_tag: "latest-windows-pulmtln"
124+
automatic_release_tag: "latest-windows-tulip"
125125
prerelease: false
126-
title: "${{ steps.date.outputs.date }} Windows Pulmtln"
126+
title: "${{ steps.date.outputs.date }} Windows TULIP"
127127
files: |
128-
pulmtln/pulmtln-windows.tar.gz
128+
pulmtln/tulip-windows.tar.gz

.github/workflows/builds-and-tests.yml renamed to .github/workflows/windows-builds-and-tests.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: "Tests"
1+
name: "Windows | Build and tests"
22

33
permissions:
44
actions: write
@@ -47,7 +47,7 @@ jobs:
4747
- name: Setup vcpkg (it does not install any package yet)
4848
uses: lukka/run-vcpkg@v11
4949
with:
50-
vcpkgGitCommitId: 42bb0d9e8d4cf33485afb9ee2229150f79f61a1f
50+
vcpkgGitCommitId: 120deac3062162151622ca4860575a33844ba10b
5151
vcpkgJsonGlob: 'pulmtln/vcpkg.json'
5252

5353
- name: cache MFEM
@@ -80,9 +80,6 @@ jobs:
8080
metis-dir: ${{ env.METIS_TOP_DIR }}
8181
mfem-dir: ${{ env.MFEM_TOP_DIR }}
8282

83-
# - name: Setup tmate session
84-
# uses: mxschmitt/action-tmate@v3
85-
8683
- name: Configuring PULMTLN
8784
env:
8885
MFEM_PACKAGE: ${{ github.workspace }}/${{env.MFEM_TOP_DIR}}/build

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,3 +67,4 @@ __pycache__/
6767
/testData/lansink2024_single_wire/lansink2024_single_wire.areas.json
6868
/testData/lansink2024_fdtd_cell/calculations.py
6969
/testData/lansink2024/inCellPotentials.out.json
70+
/XMLGoogleTestResults.xml

.gitmodules

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[submodule "external/mfem-geg"]
22
path = external/mfem-geg
3-
url = git@github.com:opensemba/mfem.git
3+
url = https://github.com/OpenSEMBA/mfem.git
44
ignore = dirty
55
[submodule "external/step2gmsh"]
66
path = external/step2gmsh
7-
url = git@github.com:OpenSEMBA/step2gmsh.git
7+
url = https://github.com/OpenSEMBA/step2gmsh.git

CMakeLists.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,14 @@ project(${PROJECT_NAME})
1818

1919
set(CMAKE_CXX_STANDARD 17)
2020

21+
option(TULIP_USE_MFEM_AS_SUBDIRECTORY "Uses MFEM as subdirectory rather than package" OFF)
22+
if (TULIP_USE_MFEM_AS_SUBDIRECTORY)
23+
add_subdirectory(external/mfem-geg/)
24+
else ()
25+
find_package(MFEM CONFIG REQUIRED)
26+
include_directories(${MFEM_INCLUDE_DIRS})
27+
endif()
28+
2129
include_directories(src/)
2230

2331
add_subdirectory(src)

CMakePresets.json

Lines changed: 50 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,55 @@
11
{
2-
"version": 6,
3-
"cmakeMinimumRequired": {
4-
"major": 3,
5-
"minor": 21,
6-
"patch": 0
7-
},
8-
"configurePresets": [
9-
{
10-
"name": "msbuild-vcpkg",
11-
"displayName": "MSBuild (vcpkg toolchain) Configure Settings",
12-
"description": "Configure with VS generators and with vcpkg toolchain",
13-
"binaryDir": "${sourceDir}/builds/${presetName}",
14-
"generator": "Visual Studio 17 2022",
15-
"architecture": {
16-
"strategy": "set",
17-
"value": "x64"
2+
"version": 6,
3+
"cmakeMinimumRequired": {
4+
"major": 3,
5+
"minor": 21,
6+
"patch": 0
7+
},
8+
"configurePresets": [
9+
{
10+
"name": "default",
11+
"hidden": true,
12+
"binaryDir": "build/",
13+
"cacheVariables": {
14+
"CMAKE_TOOLCHAIN_FILE": {
15+
"type": "FILEPATH",
16+
"value": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake"
1817
},
19-
"cacheVariables": {
20-
"CMAKE_TOOLCHAIN_FILE": {
21-
"type": "FILEPATH",
22-
"value": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake"
23-
},
24-
"CMAKE_PREFIX_PATH": {
25-
"type": "FILEPATH",
26-
"value": "$env{MFEM_PACKAGE}"
27-
}
18+
"CMAKE_PREFIX_PATH": {
19+
"type": "FILEPATH",
20+
"value": "$env{MFEM_PACKAGE}"
2821
}
2922
}
30-
],
31-
"buildPresets": [
32-
{
33-
"name": "msbuild-vcpkg-dbg",
34-
"configurePreset": "msbuild-vcpkg",
35-
"displayName": "Build MSBuild",
36-
"description": "Build with MSBuild (VS)"
23+
},
24+
{
25+
"name": "msbuild-vcpkg",
26+
"inherits": "default",
27+
"displayName": "MSBuild (vcpkg toolchain) Configure Settings",
28+
"description": "Configure with VS generators and with vcpkg toolchain",
29+
"binaryDir": "${sourceDir}/builds/${presetName}",
30+
"generator": "Visual Studio 17 2022",
31+
"architecture": {
32+
"strategy": "set",
33+
"value": "x64"
34+
}
35+
},
36+
{
37+
"name": "gnu",
38+
"displayName": "GNU g++ compiler",
39+
"inherits": "default",
40+
"cacheVariables": {
41+
"TULIP_USE_MFEM_AS_SUBDIRECTORY": true,
42+
"MFEM_ENABLE_TESTING": false,
43+
"MFEM_USE_OPENMP": true
3744
}
38-
]
39-
}
45+
}
46+
],
47+
"buildPresets": [
48+
{
49+
"name": "msbuild-vcpkg-dbg",
50+
"configurePreset": "msbuild-vcpkg",
51+
"displayName": "Build MSBuild",
52+
"description": "Build with MSBuild (VS)"
53+
}
54+
]
55+
}

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Tulip
2-
[![Tests](https://github.com/lmdiazangulo/pulmtln/actions/workflows/builds-and-tests.yml/badge.svg)](https://github.com/lmdiazangulo/pulmtln/actions/workflows/builds-and-tests.yml)
2+
[![Windows | Build and tests](https://github.com/OpenSEMBA/tulip/actions/workflows/windows-builds-and-tests.yml/badge.svg)](https://github.com/OpenSEMBA/tulip/actions/workflows/windows-builds-and-tests.yml)
3+
4+
[![Ubuntu | Build and tests](https://github.com/OpenSEMBA/tulip/actions/workflows/ubuntu-builds-and-tests.yml/badge.svg)](https://github.com/OpenSEMBA/tulip/actions/workflows/ubuntu-builds-and-tests.yml)
35

46
**Tulip** (**T**ransmission line **u**nit **l**ength conductors and **i**n-cell **p**arameters) is a solver to obtain the _per unit length_ (PUL) $C$ and $L$ matrices which characterize electromagnetic propagation within a multiconductor tranmission line (MTL). Tulip is based on finite element methods to solver an electroestatic problem for each conductor. Some of its features are:
57
- Calculation of p.u.l $C$ and $L$ matrices.

src/CMakeLists.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,6 @@ message(STATUS "Creating build system for ${LIBRARY_NAME}")
55

66
find_package(nlohmann_json CONFIG REQUIRED)
77

8-
find_package(MFEM CONFIG REQUIRED)
9-
include_directories(${MFEM_INCLUDE_DIRS})
10-
11-
128
find_package(Boost REQUIRED graph program_options)
139
include_directories(${Boost_INCLUDE_DIRS})
1410

0 commit comments

Comments
 (0)