Skip to content

Commit

Permalink
Revert minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
jwallwork23 committed Dec 10, 2024
1 parent 1291ae4 commit 306f8e9
Show file tree
Hide file tree
Showing 7 changed files with 51 additions and 52 deletions.
5 changes: 3 additions & 2 deletions core/src/StructureFactory.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*!
* @file StructureFactory.cpp
*
* @date 10 Dec 2024
* @date Jan 18, 2022
* @author Tim Spain <timothy.spain@nersc.no>
* @author Kacper Kornet <kk562@cam.ac.uk>
*/
Expand All @@ -12,9 +12,10 @@
#include "include/IStructure.hpp"
#include "include/NextsimModule.hpp"

#include "include/ParaGridIO.hpp"
#include "include/RectGridIO.hpp"

#include "include/ParaGridIO.hpp"

#include <ncFile.h>
#include <ncGroup.h>
#include <ncGroupAtt.h>
Expand Down
2 changes: 1 addition & 1 deletion core/src/include/ParaGridIO.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*!
* @file ParaGridIO.hpp
*
* @date 10 Dec 2024
* @date Oct 24, 2022
* @author Tim Spain <timothy.spain@nersc.no>
*/

Expand Down
81 changes: 40 additions & 41 deletions core/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,39 @@ if(ENABLE_MPI)
DEPENDS partition_metadata_3.nc partition_metadata_2.nc
)

add_executable(testRectGrid_MPI3 "RectGrid_test.cpp" "MainMPI.cpp")
target_compile_definitions(
testRectGrid_MPI3
PRIVATE TEST_FILES_DIR=\"${CMAKE_CURRENT_BINARY_DIR}\"
)
target_include_directories(
testRectGrid_MPI3
PRIVATE ${MODEL_INCLUDE_DIR} "${ModulesRoot}/StructureModule"
)
target_link_libraries(testRectGrid_MPI3 PRIVATE nextsimlib doctest::doctest)

add_executable(testParaGrid_MPI2 "ParaGrid_test.cpp" "MainMPI.cpp")
target_compile_definitions(
testParaGrid_MPI2
PRIVATE
USE_MPI
TEST_FILES_DIR=\"${CMAKE_CURRENT_BINARY_DIR}\"
TEST_FILE_SOURCE=\"${CMAKE_CURRENT_SOURCE_DIR}\"
)
target_include_directories(
testParaGrid_MPI2
PRIVATE ${MODEL_INCLUDE_DIR} "${ModulesRoot}/StructureModule"
)
target_link_libraries(testParaGrid_MPI2 PRIVATE nextsimlib doctest::doctest)

add_executable(testConfigOutput_MPI2 "ConfigOutput_test.cpp" "MainMPI.cpp")
target_compile_definitions(
testConfigOutput_MPI2
PRIVATE USE_MPI TEST_FILES_DIR=\"${CMAKE_CURRENT_BINARY_DIR}\"
)
target_include_directories(testConfigOutput_MPI2 PRIVATE ${MODEL_INCLUDE_DIR})
target_link_libraries(testConfigOutput_MPI2 PRIVATE nextsimlib doctest::doctest)

if(ENABLE_XIOS)
file(
CREATE_LINK
Expand All @@ -56,97 +89,63 @@ if(ENABLE_MPI)
"${xios_EXTERNS}/blitz/"
"${xios_EXTERNS}/rapidxml/include"
)
set(MODEL_INCLUDE_DIR "${MODEL_INCLUDE_DIR}" "${XIOS_INCLUDE_LIST}")

add_executable(testXiosCalendar_MPI2 "XiosCalendar_test.cpp" "MainMPI.cpp")
target_compile_definitions(testXiosCalendar_MPI2 PRIVATE USE_XIOS)
target_include_directories(
testXiosCalendar_MPI2
PRIVATE "${MODEL_INCLUDE_DIR}" "${ModulesRoot}/StructureModule"
PRIVATE "${MODEL_INCLUDE_DIR}" "${XIOS_INCLUDE_LIST}" "${ModulesRoot}/StructureModule"
)
target_link_libraries(testXiosCalendar_MPI2 PRIVATE nextsimlib doctest::doctest)

add_executable(testXiosAxis_MPI2 "XiosAxis_test.cpp" "MainMPI.cpp")
target_compile_definitions(testXiosAxis_MPI2 PRIVATE USE_XIOS)
target_include_directories(
testXiosAxis_MPI2
PRIVATE "${MODEL_INCLUDE_DIR}" "${ModulesRoot}/StructureModule"
PRIVATE "${MODEL_INCLUDE_DIR}" "${XIOS_INCLUDE_LIST}" "${ModulesRoot}/StructureModule"
)
target_link_libraries(testXiosAxis_MPI2 PRIVATE nextsimlib doctest::doctest)

add_executable(testXiosDomain_MPI2 "XiosDomain_test.cpp" "MainMPI.cpp")
target_compile_definitions(testXiosDomain_MPI2 PRIVATE USE_XIOS)
target_include_directories(
testXiosDomain_MPI2
PRIVATE "${MODEL_INCLUDE_DIR}" "${ModulesRoot}/StructureModule"
PRIVATE "${MODEL_INCLUDE_DIR}" "${XIOS_INCLUDE_LIST}" "${ModulesRoot}/StructureModule"
)
target_link_libraries(testXiosDomain_MPI2 PRIVATE nextsimlib doctest::doctest)

add_executable(testXiosGrid_MPI2 "XiosGrid_test.cpp" "MainMPI.cpp")
target_compile_definitions(testXiosGrid_MPI2 PRIVATE USE_XIOS)
target_include_directories(
testXiosGrid_MPI2
PRIVATE "${MODEL_INCLUDE_DIR}" "${ModulesRoot}/StructureModule"
PRIVATE "${MODEL_INCLUDE_DIR}" "${XIOS_INCLUDE_LIST}" "${ModulesRoot}/StructureModule"
)
target_link_libraries(testXiosGrid_MPI2 PRIVATE nextsimlib doctest::doctest)

add_executable(testXiosField_MPI2 "XiosField_test.cpp" "MainMPI.cpp")
target_compile_definitions(testXiosField_MPI2 PRIVATE USE_XIOS)
target_include_directories(
testXiosField_MPI2
PRIVATE "${MODEL_INCLUDE_DIR}" "${ModulesRoot}/StructureModule"
PRIVATE "${MODEL_INCLUDE_DIR}" "${XIOS_INCLUDE_LIST}" "${ModulesRoot}/StructureModule"
)
target_link_libraries(testXiosField_MPI2 PRIVATE nextsimlib doctest::doctest)

add_executable(testXiosFile_MPI2 "XiosFile_test.cpp" "MainMPI.cpp")
target_compile_definitions(testXiosFile_MPI2 PRIVATE USE_XIOS)
target_include_directories(
testXiosFile_MPI2
PRIVATE "${MODEL_INCLUDE_DIR}" "${ModulesRoot}/StructureModule"
PRIVATE "${MODEL_INCLUDE_DIR}" "${XIOS_INCLUDE_LIST}" "${ModulesRoot}/StructureModule"
)
target_link_libraries(testXiosFile_MPI2 PRIVATE nextsimlib doctest::doctest)

add_executable(testXiosReadWrite_MPI2 "XiosReadWrite_test.cpp" "MainMPI.cpp")
target_compile_definitions(testXiosReadWrite_MPI2 PRIVATE USE_XIOS)
target_include_directories(
testXiosReadWrite_MPI2
PRIVATE "${MODEL_INCLUDE_DIR}" "${ModulesRoot}/StructureModule"
PRIVATE "${MODEL_INCLUDE_DIR}" "${XIOS_INCLUDE_LIST}" "${ModulesRoot}/StructureModule"
)
target_link_libraries(testXiosReadWrite_MPI2 PRIVATE nextsimlib doctest::doctest)
endif()

add_executable(testRectGrid_MPI3 "RectGrid_test.cpp" "MainMPI.cpp")
target_compile_definitions(
testRectGrid_MPI3
PRIVATE TEST_FILES_DIR=\"${CMAKE_CURRENT_BINARY_DIR}\"
)
target_include_directories(
testRectGrid_MPI3
PRIVATE ${MODEL_INCLUDE_DIR} "${ModulesRoot}/StructureModule"
)
target_link_libraries(testRectGrid_MPI3 PRIVATE nextsimlib doctest::doctest)

add_executable(testParaGrid_MPI2 "ParaGrid_test.cpp" "MainMPI.cpp")
target_compile_definitions(
testParaGrid_MPI2
PRIVATE
USE_MPI
TEST_FILES_DIR=\"${CMAKE_CURRENT_BINARY_DIR}\"
TEST_FILE_SOURCE=\"${CMAKE_CURRENT_SOURCE_DIR}\"
)
target_include_directories(
testParaGrid_MPI2
PRIVATE ${MODEL_INCLUDE_DIR} "${ModulesRoot}/StructureModule"
)
target_link_libraries(testParaGrid_MPI2 PRIVATE nextsimlib doctest::doctest)

add_executable(testConfigOutput_MPI2 "ConfigOutput_test.cpp" "MainMPI.cpp")
target_compile_definitions(
testConfigOutput_MPI2
PRIVATE USE_MPI TEST_FILES_DIR=\"${CMAKE_CURRENT_BINARY_DIR}\"
)
target_include_directories(testConfigOutput_MPI2 PRIVATE ${MODEL_INCLUDE_DIR})
target_link_libraries(testConfigOutput_MPI2 PRIVATE nextsimlib doctest::doctest)
else()
add_executable(testRectGrid "RectGrid_test.cpp")
target_compile_definitions(testRectGrid PRIVATE TEST_FILES_DIR=\"${CMAKE_CURRENT_BINARY_DIR}\")
Expand Down
7 changes: 3 additions & 4 deletions core/test/ParaGrid_test.cpp
Original file line number Diff line number Diff line change
@@ -1,27 +1,26 @@
/*!
* @file ParaGrid_test.cpp
*
* @date 10 Dec 2024
* @date 24 Sep 2024
* @author Tim Spain <timothy.spain@nersc.no>
*/

#include "ModelArray.hpp"
#include <cstdlib>
#ifdef USE_MPI
#include <doctest/extensions/doctest_mpi.h>
#undef INFO
#else
#define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN
#include <doctest/doctest.h>
#endif

#include "include/Configurator.hpp"
#include "include/ConfiguredModule.hpp"
#include "include/IStructure.hpp"
#include "include/NZLevels.hpp"
#include "include/NextsimModule.hpp"
#include "include/ParaGridIO.hpp"
#include "include/ParametricGrid.hpp"
#include "include/IStructure.hpp"
#include "include/NextsimModule.hpp"
#include "include/gridNames.hpp"

#include <cmath>
Expand Down
2 changes: 1 addition & 1 deletion core/test/XiosReadWrite_test.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*!
* @file XiosReadWrite_test.cpp
* @author Joe Wallwork <jw2423@cam.ac.uk>
* @date 10 Dec 2024
* @date 19 Nov 2024
* @brief Tests for XIOS write method
* @details
* This test is designed to test the read and write methods of the C++
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*!
* @file ERA5Atmosphere.cpp
*
* @date 10 Dec 2024
* @date 24 Sep 2024
* @author Tim Spain <timothy.spain@nersc.no>
*/

Expand Down
4 changes: 2 additions & 2 deletions physics/src/modules/OceanBoundaryModule/TOPAZOcean.cpp
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
/*!
* @file TOPAZOcean.cpp
*
* @date 10 Dec 2024
* @date 24 Sep 2024
* @author Tim Spain <timothy.spain@nersc.no>
*/

#include "include/TOPAZOcean.hpp"

#include "include/Finalizer.hpp"
#include "include/IFreezingPoint.hpp"
#include "include/IIceOceanHeatFlux.hpp"
#include "include/IFreezingPoint.hpp"
#include "include/NextsimModule.hpp"
#include "include/ParaGridIO.hpp"
#include "include/constants.hpp"
Expand Down

0 comments on commit 306f8e9

Please # to comment.