Skip to content

Commit

Permalink
Fix Actuator logic so that code builds when OpenFAST is disabled
Browse files Browse the repository at this point in the history
Fixes #574
  • Loading branch information
sayerhs committed Apr 28, 2020
1 parent 0fae3f8 commit a3fd9cc
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
8 changes: 8 additions & 0 deletions src/Realm.C
Original file line number Diff line number Diff line change
Expand Up @@ -983,6 +983,7 @@ Realm::setup_post_processing_algorithms()

if (NULL != actuatorMeta_)
{
#ifdef NALU_USES_OPENFAST
switch(actuatorMeta_->actuatorType_){
case(ActuatorType::ActLineFASTNGP):{
actuatorBulk_ = make_unique<ActuatorBulkFAST>(*actuatorMeta_.get(),
Expand All @@ -998,6 +999,9 @@ Realm::setup_post_processing_algorithms()
ThrowErrorMsg("Unsupported actuator type");
}
}
#else
ThrowErrorMsg("Actuator methods require OpenFAST");
#endif
}

// check for norm nodal fields
Expand Down Expand Up @@ -2319,6 +2323,7 @@ Realm::initialize_post_processing_algorithms()

if (NULL != actuatorMeta_)
{
#ifdef NALU_USES_OPENFAST
switch(actuatorMeta_->actuatorType_){
case(ActuatorType::ActLineFASTNGP):
case(ActuatorType::ActDiskFASTNGP):
Expand All @@ -2329,6 +2334,9 @@ Realm::initialize_post_processing_algorithms()
ThrowErrorMsg("Unsupported actuator type");
}
}
#else
ThrowErrorMsg("Actuator requires OpenFAST");
#endif
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/actuator/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ target_sources(nalu PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/ActuatorParsing.C
${CMAKE_CURRENT_SOURCE_DIR}/ActuatorSearch.C
${CMAKE_CURRENT_SOURCE_DIR}/ActuatorFunctors.C
${CMAKE_CURRENT_SOURCE_DIR}/UtilitiesActuator.C
)

if(ENABLE_OPENFAST)
target_sources(nalu PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/UtilitiesActuator.C
${CMAKE_CURRENT_SOURCE_DIR}/ActuatorFAST.C
${CMAKE_CURRENT_SOURCE_DIR}/ActuatorLineFAST.C
${CMAKE_CURRENT_SOURCE_DIR}/ActuatorDiskFAST.C
Expand All @@ -18,4 +18,4 @@ if(ENABLE_OPENFAST)
${CMAKE_CURRENT_SOURCE_DIR}/ActuatorExecutorsFASTNgp.C
${CMAKE_CURRENT_SOURCE_DIR}/ActuatorBulkDiskFAST.C
)
endif()
endif()

0 comments on commit a3fd9cc

Please sign in to comment.