Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

F/md shared example #2584

Merged
merged 8 commits into from
Dec 23, 2024
2 changes: 1 addition & 1 deletion docs/source/user/fast.farm/InputFiles.rst
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ documentation for details on the input file at the farm level.
MoorDyn.

**WrMooringVis** [swithch] Write shared mooring line visualization, at
DT_Mooring timestep
the globale FAST.Farm time step
deslaughter marked this conversation as resolved.
Show resolved Hide resolved


.. _FF:Input:VTK:
Expand Down
19 changes: 10 additions & 9 deletions reg_tests/CTestList.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -121,12 +121,13 @@ function(of_regression_aeroacoustic TESTNAME LABEL)
endfunction(of_regression_aeroacoustic)

# FAST Farm
function(ff_regression TESTNAME LABEL)
function(ff_regression TESTNAME OTHER_FLAGS LABEL)
set(TEST_SCRIPT "${CMAKE_CURRENT_LIST_DIR}/executeFASTFarmRegressionCase.py")
set(FASTFARM_EXECUTABLE "${CTEST_FASTFARM_EXECUTABLE}")
set(SOURCE_DIRECTORY "${CMAKE_CURRENT_LIST_DIR}/..")
set(BUILD_DIRECTORY "${CTEST_BINARY_DIR}/glue-codes/fast-farm")
regression(${TEST_SCRIPT} ${FASTFARM_EXECUTABLE} ${SOURCE_DIRECTORY} ${BUILD_DIRECTORY} " " ${TESTNAME} "${LABEL}" " ")
set(OTHER_FLAGS "${OTHER_FLAGS}") # Set name of file to compare, otherwise default
regression(${TEST_SCRIPT} ${FASTFARM_EXECUTABLE} ${SOURCE_DIRECTORY} ${BUILD_DIRECTORY} " " ${TESTNAME} "${LABEL}" "${OTHER_FLAGS}")
endfunction(ff_regression)

# openfast linearized
Expand Down Expand Up @@ -386,13 +387,13 @@ of_regression_linear("5MW_OC3Mnpl_Linear" "" "openfas

# FAST Farm regression tests
if(BUILD_FASTFARM)
ff_regression("TSinflow" "fastfarm")
ff_regression("LESinflow" "fastfarm")
# ff_regression("Uninflow_curl" "fastfarm")
ff_regression("TSinflow_curl" "fastfarm")
ff_regression("ModAmb_3" "fastfarm")
ff_regression("TSinflowADskSED" "fastfarm;aerodisk;simple-elastodyn")
ff_regression("MD_Shared" "fastfarm;moordyn")
ff_regression("TSinflow" "" "fastfarm")
ff_regression("LESinflow" "" "fastfarm")
# ff_regression("Uninflow_curl" "" "fastfarm")
ff_regression("TSinflow_curl" "" "fastfarm")
ff_regression("ModAmb_3" "" "fastfarm")
ff_regression("TSinflowADskSED" "" "fastfarm;aerodisk;simple-elastodyn")
ff_regression("MD_Shared" "-compFile=FAST.Farm.FarmMD.MD" "fastfarm;moordyn")
endif()

# AeroDyn regression tests
Expand Down
12 changes: 10 additions & 2 deletions reg_tests/executeFASTFarmRegressionCase.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
parser.add_argument("-p", "-plot", dest="plot", action='store_true', help="bool to include plots in failed cases")
parser.add_argument("-n", "-no-exec", dest="noExec", action='store_true', help="bool to prevent execution of the test cases")
parser.add_argument("-v", "-verbose", dest="verbose", action='store_true', help="bool to include verbose system output")
parser.add_argument("-compFile", dest="compFile", metavar="comparison-file", type=str, nargs='?', const='arg_was_not_given', help="File to use for comparison (no extension)")

args = parser.parse_args()

Expand All @@ -66,6 +67,13 @@
plotError = args.plot
noExec = args.noExec
verbose = args.verbose
# file to use for comparison (ending not included)
if args.compFile is None:
compFile = caseName
elif args.compFile == 'arg_was_not_given':
compFile = caseName
else:
compFile = args.compFile

# validate inputs
rtl.validateExeOrExit(executable)
Expand Down Expand Up @@ -129,8 +137,8 @@
sys.exit(returnCode*10)

### Build the filesystem navigation variables for running the regression test
localOutFile = os.path.join(testBuildDirectory, caseName + ".out")
baselineOutFile = os.path.join(targetOutputDirectory, caseName + ".out")
localOutFile = os.path.join(testBuildDirectory, compFile + ".out")
baselineOutFile = os.path.join(targetOutputDirectory, compFile + ".out")
rtl.validateFileOrExit(localOutFile)
rtl.validateFileOrExit(baselineOutFile)

Expand Down