Skip to content

Commit ffa9de7

Browse files
authored
Remove FSI compile option (#1360)
1 parent 58026df commit ffa9de7

File tree

6 files changed

+19
-28
lines changed

6 files changed

+19
-28
lines changed

CMakeLists.txt

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,7 @@ option(ENABLE_HYPRE "Use HYPRE Solver library" ON)
1616
option(ENABLE_TRILINOS_SOLVERS "Use Trilinos Solvers" ON)
1717

1818
option(ENABLE_OPENFAST
19-
"Use OPENFAST tpl to get actuator line positions and forces" OFF)
20-
cmake_dependent_option(ENABLE_OPENFAST_FSI "Temporary option while FSI features are not merged into main OpenFAST"
21-
OFF "ENABLE_OPENFAST" OFF)
19+
"Use OPENFAST TPL to get actuator line positions and forces" OFF)
2220
option(ENABLE_PARAVIEW_CATALYST
2321
"Enable ParaView Catalyst. Requires external installation of Trilinos Catalyst IOSS adapter."
2422
OFF)
@@ -173,9 +171,6 @@ if(ENABLE_TRILINOS_SOLVERS)
173171
endif()
174172

175173
########################## OPENFAST ####################################
176-
if(ENABLE_OPENFAST_FSI)
177-
target_compile_definitions(nalu PUBLIC NALU_USES_OPENFAST_FSI)
178-
endif()
179174
if(ENABLE_OPENFAST)
180175
set(CMAKE_PREFIX_PATH ${OpenFAST_DIR} ${CMAKE_PREFIX_PATH})
181176
enable_language(Fortran)

src/aero/AeroContainer.C

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#include <aero/AeroContainer.h>
1010
#include <NaluEnv.h>
1111
#include <NaluParsingHelper.h>
12-
#ifdef NALU_USES_OPENFAST_FSI
12+
#ifdef NALU_USES_OPENFAST
1313
#include "aero/fsi/OpenfastFSI.h"
1414
#endif
1515
#include <FieldTypeDef.h>
@@ -20,15 +20,15 @@ namespace nalu {
2020
void
2121
AeroContainer::clean_up()
2222
{
23-
#ifdef NALU_USES_OPENFAST_FSI
23+
#ifdef NALU_USES_OPENFAST
2424
if (has_fsi())
2525
fsiContainer_->end_openfast();
2626
#endif
2727
}
2828

2929
AeroContainer::~AeroContainer()
3030
{
31-
#ifdef NALU_USES_OPENFAST_FSI
31+
#ifdef NALU_USES_OPENFAST
3232
if (has_fsi()) {
3333
delete fsiContainer_;
3434
}
@@ -49,7 +49,7 @@ AeroContainer::AeroContainer(const YAML::Node& node) : fsiContainer_(nullptr)
4949
// std::vector<const YAML::Node*> foundFsi;
5050
// NaluParsingHelper::find_nodes_given_key("openfast_fsi", node, foundFsi);
5151
if (node["openfast_fsi"]) {
52-
#ifdef NALU_USES_OPENFAST_FSI
52+
#ifdef NALU_USES_OPENFAST
5353
// if (foundFsi.size() != 1)
5454
// throw std::runtime_error(
5555
// "look_ahead_and_create::error: Too many openfast_fsi blocks");
@@ -88,7 +88,7 @@ AeroContainer::setup(double timeStep, std::shared_ptr<stk::mesh::BulkData> bulk)
8888
if (has_actuators()) {
8989
actuatorModel_.setup(timeStep, *bulk_);
9090
}
91-
#ifdef NALU_USES_OPENFAST_FSI
91+
#ifdef NALU_USES_OPENFAST
9292
if (has_fsi()) {
9393
fsiContainer_->setup(timeStep, bulk_);
9494
}
@@ -101,7 +101,7 @@ AeroContainer::init(double currentTime, double restartFrequency)
101101
if (has_actuators()) {
102102
actuatorModel_.init(*bulk_);
103103
}
104-
#ifdef NALU_USES_OPENFAST_FSI
104+
#ifdef NALU_USES_OPENFAST
105105
if (has_fsi()) {
106106
fsiContainer_->initialize(restartFrequency, currentTime);
107107
}
@@ -122,7 +122,7 @@ void
122122
AeroContainer::update_displacements(
123123
const double currentTime, bool updateCC, bool predict)
124124
{
125-
#ifdef NALU_USES_OPENFAST_FSI
125+
#ifdef NALU_USES_OPENFAST
126126
if (has_fsi()) {
127127
NaluEnv::self().naluOutputP0()
128128
<< "Calling update displacements inside AeroContainer" << std::endl;
@@ -141,7 +141,7 @@ void
141141
AeroContainer::predict_model_time_step(const double currentTime)
142142
{
143143
(void)currentTime;
144-
#ifdef NALU_USES_OPENFAST_FSI
144+
#ifdef NALU_USES_OPENFAST
145145
if (has_fsi()) {
146146
fsiContainer_->predict_struct_timestep(currentTime);
147147
}
@@ -153,7 +153,7 @@ AeroContainer::predict_model_time_step(const double currentTime)
153153
void
154154
AeroContainer::advance_model_time_step(const double currentTime)
155155
{
156-
#ifdef NALU_USES_OPENFAST_FSI
156+
#ifdef NALU_USES_OPENFAST
157157
if (has_fsi()) {
158158
fsiContainer_->advance_struct_timestep(currentTime);
159159
}
@@ -165,7 +165,7 @@ AeroContainer::advance_model_time_step(const double currentTime)
165165
void
166166
AeroContainer::compute_div_mesh_velocity()
167167
{
168-
#ifdef NALU_USES_OPENFAST_FSI
168+
#ifdef NALU_USES_OPENFAST
169169
if (has_fsi()) {
170170
fsiContainer_->compute_div_mesh_velocity();
171171
}
@@ -176,7 +176,7 @@ const stk::mesh::PartVector
176176
AeroContainer::fsi_parts()
177177
{
178178
stk::mesh::PartVector all_part_vec;
179-
#ifdef NALU_USES_OPENFAST_FSI
179+
#ifdef NALU_USES_OPENFAST
180180
if (has_fsi()) {
181181
auto n_turbines = fsiContainer_->get_nTurbinesGlob();
182182
for (auto i_turb = 0; i_turb < n_turbines; i_turb++) {
@@ -193,7 +193,7 @@ const stk::mesh::PartVector
193193
AeroContainer::fsi_bndry_parts()
194194
{
195195
stk::mesh::PartVector all_bndry_part_vec;
196-
#ifdef NALU_USES_OPENFAST_FSI
196+
#ifdef NALU_USES_OPENFAST
197197
if (has_fsi()) {
198198
auto n_turbines = fsiContainer_->get_nTurbinesGlob();
199199
for (auto i_turb = 0; i_turb < n_turbines; i_turb++) {
@@ -211,7 +211,7 @@ const std::vector<std::string>
211211
AeroContainer::fsi_bndry_part_names()
212212
{
213213
std::vector<std::string> bndry_part_names;
214-
#ifdef NALU_USES_OPENFAST_FSI
214+
#ifdef NALU_USES_OPENFAST
215215
if (has_fsi()) {
216216
auto n_turbines = fsiContainer_->get_nTurbinesGlob();
217217
for (auto i_turb = 0; i_turb < n_turbines; i_turb++) {
@@ -228,7 +228,7 @@ AeroContainer::fsi_bndry_part_names()
228228
double
229229
AeroContainer::openfast_accumulated_time()
230230
{
231-
#ifdef NALU_USES_OPENFAST_FSI
231+
#ifdef NALU_USES_OPENFAST
232232
if (has_fsi())
233233
return fsiContainer_->total_openfastfsi_execution_time();
234234
else
@@ -240,7 +240,7 @@ AeroContainer::openfast_accumulated_time()
240240
double
241241
AeroContainer::nalu_fsi_accumulated_time()
242242
{
243-
#ifdef NALU_USES_OPENFAST_FSI
243+
#ifdef NALU_USES_OPENFAST
244244
if (has_fsi())
245245
return fsiContainer_->total_nalu_fsi_execution_time();
246246
else

src/aero/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ target_sources(nalu PRIVATE
44

55
add_subdirectory(actuator)
66

7-
if(ENABLE_OPENFAST_FSI)
7+
if(ENABLE_OPENFAST)
88
add_subdirectory(fsi)
99
endif()
1010

src/aero/actuator/ActuatorParsingFAST.C

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -166,10 +166,8 @@ actuator_FAST_parse(const YAML::Node& y_node, const ActuatorMeta& actMeta)
166166
// TODO Do we need this for anything in FSI?
167167
/* get_required(y_actuator, "restartFreq", fi.restartFreq); */
168168
int* restartFreq;
169-
#ifdef NALU_USES_OPENFAST_FSI
169+
#ifdef NALU_USES_OPENFAST
170170
restartFreq = &fi.restartFreq;
171-
#else
172-
restartFreq = &fi.nEveryCheckPoint;
173171
#endif
174172
get_required(y_actuator, "n_every_checkpoint", *restartFreq);
175173
get_required(y_actuator, "dt_fast", fi.dtFAST);

unit_tests/actuator/UnitTestActuatorBulkFAST.C

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,7 @@ TEST_F(ActuatorBulkFastTests, initializeActuatorBulk)
5858
ASSERT_EQ(fi.nTurbinesGlob, 1);
5959
ASSERT_EQ(fi.tStart, 0.0);
6060
ASSERT_EQ(fi.simStart, fast::init);
61-
#ifdef NALU_USES_OPENFAST_FSI
6261
ASSERT_EQ(fi.restartFreq, 1);
63-
#endif
6462
ASSERT_EQ(fi.dtFAST, 0.00625);
6563
ASSERT_EQ(fi.tMax, 0.3625);
6664

unit_tests/aero/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ target_sources(${utest_ex_name} PRIVATE
55
${CMAKE_CURRENT_SOURCE_DIR}/UnitTestPt2Line.C
66
)
77

8-
if(ENABLE_OPENFAST_FSI)
8+
if(ENABLE_OPENFAST)
99
target_sources(${utest_ex_name} PRIVATE
1010
${CMAKE_CURRENT_SOURCE_DIR}/UnitTestFSIturbine.C
1111
)

0 commit comments

Comments
 (0)