Skip to content

Commit

Permalink
Merge pull request #197 from Exawind/read-windio-yaml
Browse files Browse the repository at this point in the history
Parse a windIO yaml input file and instantiate the turbine structs
  • Loading branch information
faisal-bhuiyan authored Aug 13, 2024
2 parents afea395 + d50dc54 commit 7f2bcb7
Show file tree
Hide file tree
Showing 18 changed files with 3,876 additions and 1,228 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/clang-tidy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,17 @@ jobs:
spack external find
spack install googletest
spack install trilinos@master~mpi~epetra+basker
- name: Cache install yaml-cpp
id: cache-yaml-cpp
uses: actions/cache@v3
with:
path: ${{ github.workspace }}/spack
key: linux-yaml-cpp
- name: Install yaml-cpp
if: steps.cache-yaml-cpp.outputs.cache-hit != 'true'
run: |
source spack/share/spack/setup-env.sh
spack install yaml-cpp
- name: Clone
uses: actions/checkout@v4
with:
Expand All @@ -35,6 +46,7 @@ jobs:
source spack/share/spack/setup-env.sh
spack load trilinos
spack load googletest
spack load yaml-cpp
cd openturbine
mkdir build-clangtidy
cd build-clangtidy
Expand Down
14 changes: 13 additions & 1 deletion .github/workflows/correctness-linux.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,17 @@ jobs:
spack external find
spack install googletest
spack install trilinos@master~mpi~epetra+basker
- name: Cache install yaml-cpp
id: cache-yaml-cpp
uses: actions/cache@v3
with:
path: ${{ github.workspace }}/spack
key: linux-yaml-cpp
- name: Install yaml-cpp
if: steps.cache-yaml-cpp.outputs.cache-hit != 'true'
run: |
source spack/share/spack/setup-env.sh
spack install yaml-cpp
- name: Clone
uses: actions/checkout@v4
with:
Expand All @@ -40,14 +51,15 @@ jobs:
source spack/share/spack/setup-env.sh
spack load trilinos
spack load googletest
spack load yaml-cpp
cd openturbine
mkdir build
cd build
cmake .. \
-DOpenTurbine_ENABLE_SANITIZER_ADDRESS=ON \
-DOpenTurbine_ENABLE_SANITIZER_LEAK=ON \
-DOpenTurbine_ENABLE_SANITIZER_UNDEFINED=ON \
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
cmake --build .
cp src/*.dll tests/unit_tests/
ctest --output-on-failure
14 changes: 13 additions & 1 deletion .github/workflows/correctness-macos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,17 @@ jobs:
spack external find
spack install googletest
spack install trilinos@master~mpi~epetra+basker
- name: Cache install yaml-cpp
id: cache-yaml-cpp
uses: actions/cache@v3
with:
path: ${{ github.workspace }}/spack
key: macos-yaml-cpp
- name: Install yaml-cpp
if: steps.cache-yaml-cpp.outputs.cache-hit != 'true'
run: |
source spack/share/spack/setup-env.sh
spack install yaml-cpp
- name: Clone
uses: actions/checkout@v4
with:
Expand All @@ -38,13 +49,14 @@ jobs:
source spack/share/spack/setup-env.sh
spack load trilinos
spack load googletest
spack load yaml-cpp
cd openturbine
mkdir build
cd build
cmake .. \
-DOpenTurbine_ENABLE_SANITIZER_ADDRESS=ON \
-DOpenTurbine_ENABLE_SANITIZER_UNDEFINED=ON \
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
cmake --build .
cp src/*.dll tests/unit_tests/
ctest --output-on-failure
12 changes: 12 additions & 0 deletions .github/workflows/cppcheck.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,17 @@ jobs:
spack external find
spack install googletest
spack install trilinos@master~mpi~epetra+basker
- name: Cache install yaml-cpp
id: cache-yaml-cpp
uses: actions/cache@v3
with:
path: ${{ github.workspace }}/spack
key: linux-yaml-cpp
- name: Install yaml-cpp
if: steps.cache-yaml-cpp.outputs.cache-hit != 'true'
run: |
source spack/share/spack/setup-env.sh
spack install yaml-cpp
- name: Clone
uses: actions/checkout@v4
with:
Expand All @@ -36,6 +47,7 @@ jobs:
source spack/share/spack/setup-env.sh
spack load trilinos
spack load googletest
spack load yaml-cpp
sudo apt-get install cppcheck
cd openturbine
mkdir build-cppcheck
Expand Down
2 changes: 2 additions & 0 deletions Dependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ function(openturbine_setup_dependencies)

find_package(Amesos2 REQUIRED)

find_package(yaml-cpp REQUIRED)

if(TARGET Kokkos::MKL)
find_package(MKL REQUIRED)
endif()
Expand Down
3 changes: 2 additions & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ target_link_libraries(openturbine_library PRIVATE
target_link_system_libraries(openturbine_library PRIVATE
KokkosKernels::kokkoskernels
Amesos2::amesos2
yaml-cpp
${FS_LIB}
)

Expand All @@ -33,4 +34,4 @@ set_target_properties(DISCON_ROTOR_TEST_CONTROLLER PROPERTIES PREFIX "" SUFFIX "

add_subdirectory(restruct_poc)
add_subdirectory(io)
add_subdirectory(utilities)
add_subdirectory(utilities)
3 changes: 0 additions & 3 deletions src/utilities/controllers/discon_rotor_test_controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,6 @@ void PITCH_CONTROLLER(

// If this is the first call, output the controller input and output file names
if (first_call) {
std::cout << "controller input file: " << accINFILE << std::endl;
std::cout << "controller output file: " << avcOUTNAME << std::endl;

// Set first call to false
first_call = false;
}
Expand Down
2 changes: 1 addition & 1 deletion src/utilities/controllers/turbine_controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ void TurbineController::CallController() {
if (status < 0) {
throw std::runtime_error("Error raised in controller: " + message);
} else if (status > 0) {
std::cout << "Warning from controller: " << message << std::endl;
std::cout << "Warning from controller: " << message << "\n";
}
}

Expand Down
Loading

0 comments on commit 7f2bcb7

Please sign in to comment.