Commit b2c250f0 authored by GILLES Sebastien's avatar GILLES Sebastien

#1217 Add tests and model instances to the CMake build.

parent 8cba321c
......@@ -63,11 +63,7 @@ endif()
# ===================================================================================================================
project( "MoReFEM_CMAKE")
MESSAGE("CC: " ${CC})
MESSAGE("CMAKE_C_COMPILER: " ${CMAKE_C_COMPILER})
set_property(GLOBAL PROPERTY USE_FOLDERS OFF)
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
set(CMAKE_CXX_STANDARD 17)
......
......@@ -86,7 +86,7 @@ def GenerateInModule(morefem_directory, subdirectory, module_alias, ignore_list
if __name__ == "__main__":
morefem_path = "${HOME}/Codes/Morefem"
morefem_path = "${HOME}/Codes/Morefem/CoreLibrary"
GenerateInModule(morefem_path, "Utilities", "MOREFEM_UTILITIES", None)
GenerateInModule(morefem_path, "ThirdParty", "MOREFEM_UTILITIES", ['Tclap', 'Legacy'])
......@@ -99,7 +99,6 @@ if __name__ == "__main__":
GenerateInModule(morefem_path, "ParameterInstances", "MOREFEM_PARAM_INSTANCES")
GenerateInModule(morefem_path, "FormulationSolver", "MOREFEM_FORMULATION_SOLVER")
GenerateInModule(morefem_path, "Model", "MOREFEM_MODEL")
GenerateInModule(morefem_path, "PostProcessing", "MOREFEM_POST_PROCESSING")
......@@ -54,8 +54,7 @@ include(FormulationSolver/SourceList.cmake)
include(Model/SourceList.cmake)
# add_library(morefem_post_processing ${LIBRARY_TYPE} "")
# target_link_libraries(morefem_post_processing ${MOREFEM_COMMON_DEP})
# include(PostProcessing/SourceList.cmake)
include(PostProcessing/CMakeLists.txt)
include(ModelInstances/CMakeLists.txt)
\ No newline at end of file
include(ModelInstances/CMakeLists.txt)
include(Test/CMakeLists.txt)
\ No newline at end of file
set(MOREFEM_POST_PROCESSING MoReFEMPostProcessing_lib)
add_library(MoReFEMPostProcessing_lib ${LIBRARY_TYPE} "")
target_sources(MoReFEMPostProcessing_lib
PRIVATE
"${CMAKE_CURRENT_LIST_DIR}/PostProcessing.cpp" /
PUBLIC
"${CMAKE_CURRENT_LIST_DIR}/PostProcessing.hpp" /
"${CMAKE_CURRENT_LIST_DIR}/PostProcessing.hxx" /
)
include(${CMAKE_CURRENT_LIST_DIR}/ConvertLinearAlgebra/CMakeLists.txt)
include(${CMAKE_CURRENT_LIST_DIR}/File/CMakeLists.txt)
include(${CMAKE_CURRENT_LIST_DIR}/Exceptions/CMakeLists.txt)
include(${CMAKE_CURRENT_LIST_DIR}/OutputFormat/CMakeLists.txt)
include(${CMAKE_CURRENT_LIST_DIR}/Data/CMakeLists.txt)
include(${CMAKE_CURRENT_LIST_DIR}/RefineMeshQuadranglesSpectral/CMakeLists.txt)
include(${CMAKE_CURRENT_LIST_DIR}/OutputDeformedMesh/CMakeLists.txt)
target_sources(${MOREFEM_POST_PROCESSING}
PRIVATE
"${CMAKE_CURRENT_LIST_DIR}/PostProcessing.cpp" /
"${CMAKE_CURRENT_LIST_DIR}/main_convert_matrix_to_freefem.cpp" /
"${CMAKE_CURRENT_LIST_DIR}/main_refined_mesh_output.cpp" /
PUBLIC
"${CMAKE_CURRENT_LIST_DIR}/PostProcessing.hpp" /
"${CMAKE_CURRENT_LIST_DIR}/PostProcessing.hxx" /
)
include(${CMAKE_CURRENT_LIST_DIR}/ConvertLinearAlgebra/SourceList.cmake)
include(${CMAKE_CURRENT_LIST_DIR}/File/SourceList.cmake)
include(${CMAKE_CURRENT_LIST_DIR}/Exceptions/SourceList.cmake)
include(${CMAKE_CURRENT_LIST_DIR}/OutputFormat/SourceList.cmake)
include(${CMAKE_CURRENT_LIST_DIR}/Data/SourceList.cmake)
include(${CMAKE_CURRENT_LIST_DIR}/RefineMeshQuadranglesSpectral/SourceList.cmake)
include(${CMAKE_CURRENT_LIST_DIR}/OutputDeformedMesh/SourceList.cmake)
add_library(MoReFEM_test_tools ${LIBRARY_TYPE} "")
include(${CMAKE_CURRENT_LIST_DIR}/Tools/CMakeLists.txt)
include(${CMAKE_CURRENT_LIST_DIR}/Utilities/CMakeLists.txt)
include(${CMAKE_CURRENT_LIST_DIR}/Core/CMakeLists.txt)
include(${CMAKE_CURRENT_LIST_DIR}/Geometry/CMakeLists.txt)
include(${CMAKE_CURRENT_LIST_DIR}/Ondomatic/CMakeLists.txt)
include(${CMAKE_CURRENT_LIST_DIR}/Operators/CMakeLists.txt)
include(${CMAKE_CURRENT_LIST_DIR}/Parameter/CMakeLists.txt)
include(${CMAKE_CURRENT_LIST_DIR}/ThirdParty/CMakeLists.txt)
include(${CMAKE_CURRENT_LIST_DIR}/VariableTimeStep/CMakeLists.txt)
\ No newline at end of file
add_executable(MoReFEMTestVariableTimeStep
${CMAKE_CURRENT_LIST_DIR}/main.cpp
${CMAKE_CURRENT_LIST_DIR}/Model.cpp
${CMAKE_CURRENT_LIST_DIR}/Model.hpp
${CMAKE_CURRENT_LIST_DIR}/Model.hxx
${CMAKE_CURRENT_LIST_DIR}/InputParameterList.hpp
)
target_link_libraries(MoReFEMTestVariableTimeStep
${MOREFEM_MODEL})
\ No newline at end of file
include(${CMAKE_CURRENT_LIST_DIR}/Coloring/CMakeLists.txt)
include(${CMAKE_CURRENT_LIST_DIR}/CoordsInParallel/CMakeLists.txt)
include(${CMAKE_CURRENT_LIST_DIR}/DomainListInCoords/CMakeLists.txt)
include(${CMAKE_CURRENT_LIST_DIR}/LightweightDomainList/CMakeLists.txt)
include(${CMAKE_CURRENT_LIST_DIR}/Movemesh/CMakeLists.txt)
include(${CMAKE_CURRENT_LIST_DIR}/NcoordInDomain/CMakeLists.txt)
add_executable(MoReFEMTestColoring
${CMAKE_CURRENT_LIST_DIR}/InputParameterList.hpp
${CMAKE_CURRENT_LIST_DIR}/Model.cpp
${CMAKE_CURRENT_LIST_DIR}/Model.hpp
${CMAKE_CURRENT_LIST_DIR}/Model.hxx
${CMAKE_CURRENT_LIST_DIR}/main_test_coloring.cpp
)
target_link_libraries(MoReFEMTestColoring
${MOREFEM_MODEL})
\ No newline at end of file
add_executable(MoReFEMTestCoordsInParallel
${CMAKE_CURRENT_LIST_DIR}/InputParameterList.hpp
${CMAKE_CURRENT_LIST_DIR}/Model.cpp
${CMAKE_CURRENT_LIST_DIR}/Model.hpp
${CMAKE_CURRENT_LIST_DIR}/Model.hxx
${CMAKE_CURRENT_LIST_DIR}/main.cpp
)
target_link_libraries(MoReFEMTestCoordsInParallel
${MOREFEM_MODEL})
\ No newline at end of file
add_executable(MoReFEMTestDomainListInCoords
${CMAKE_CURRENT_LIST_DIR}/InputParameterList.hpp
${CMAKE_CURRENT_LIST_DIR}/Model.cpp
${CMAKE_CURRENT_LIST_DIR}/Model.hpp
${CMAKE_CURRENT_LIST_DIR}/Model.hxx
${CMAKE_CURRENT_LIST_DIR}/main.cpp
)
target_link_libraries(MoReFEMTestDomainListInCoords
${MOREFEM_MODEL})
\ No newline at end of file
add_executable(MoReFEMTestLightweightDomainList
${CMAKE_CURRENT_LIST_DIR}/InputParameterList.hpp
${CMAKE_CURRENT_LIST_DIR}/Model.cpp
${CMAKE_CURRENT_LIST_DIR}/Model.hpp
${CMAKE_CURRENT_LIST_DIR}/Model.hxx
${CMAKE_CURRENT_LIST_DIR}/main_test_lightweight_domain_list.cpp
)
target_link_libraries(MoReFEMTestLightweightDomainList
${MOREFEM_MODEL})
\ No newline at end of file
add_executable(MoReFEMTestMovemesh
${CMAKE_CURRENT_LIST_DIR}/InputParameterList.hpp
${CMAKE_CURRENT_LIST_DIR}/Model.cpp
${CMAKE_CURRENT_LIST_DIR}/Model.hpp
${CMAKE_CURRENT_LIST_DIR}/Model.hxx
${CMAKE_CURRENT_LIST_DIR}/main.cpp
)
target_link_libraries(MoReFEMTestMovemesh
${MOREFEM_MODEL})
\ No newline at end of file
add_executable(MoReFEMTestNcoordInDomain
${CMAKE_CURRENT_LIST_DIR}/InputParameterList.hpp
${CMAKE_CURRENT_LIST_DIR}/Model.cpp
${CMAKE_CURRENT_LIST_DIR}/Model.hpp
${CMAKE_CURRENT_LIST_DIR}/Model.hxx
${CMAKE_CURRENT_LIST_DIR}/main.cpp
)
target_link_libraries(MoReFEMTestNcoordInDomain
${MOREFEM_MODEL})
\ No newline at end of file
......@@ -30,7 +30,8 @@ int main(int argc, char** argv)
auto& manager = Internal::MeshNS::GeometricMeshRegionManager::CreateOrGetInstance();
manager.Create(1,
Utilities::EnvironmentNS::SubstituteValues("${HOME}/Codes/MoReFEM/Data/Mesh/elasticity_Nx50_Ny20_force_label.mesh"),
Utilities::EnvironmentNS
::SubstituteValues("${HOME}/Codes/MoReFEM/Data/Mesh/elasticity_Nx50_Ny20_force_label.mesh"),
2,
::MoReFEM::MeshNS::Format::Medit,
1.,
......
add_executable(MoReFEMTestOndomatic
${CMAKE_CURRENT_LIST_DIR}/InputParameterList.hpp
${CMAKE_CURRENT_LIST_DIR}/Model.cpp
${CMAKE_CURRENT_LIST_DIR}/Model.hpp
${CMAKE_CURRENT_LIST_DIR}/Model.hxx
${CMAKE_CURRENT_LIST_DIR}/VariationalFormulation.cpp
${CMAKE_CURRENT_LIST_DIR}/VariationalFormulation.hpp
${CMAKE_CURRENT_LIST_DIR}/VariationalFormulation.hxx
${CMAKE_CURRENT_LIST_DIR}/main.cpp
)
target_link_libraries(MoReFEMTestOndomatic
${MOREFEM_MODEL})
\ No newline at end of file
include(${CMAKE_CURRENT_LIST_DIR}/ConformProjector/CMakeLists.txt)
include(${CMAKE_CURRENT_LIST_DIR}/NonConformInterpolator/CMakeLists.txt)
include(${CMAKE_CURRENT_LIST_DIR}/P1_to_HigherOrder/CMakeLists.txt)
include(${CMAKE_CURRENT_LIST_DIR}/TestFunctions/CMakeLists.txt)
add_executable(MoReFEMTestConformProjector
${CMAKE_CURRENT_LIST_DIR}/InputParameterList.hpp
${CMAKE_CURRENT_LIST_DIR}/Model.cpp
${CMAKE_CURRENT_LIST_DIR}/Model.hpp
${CMAKE_CURRENT_LIST_DIR}/Model.hxx
${CMAKE_CURRENT_LIST_DIR}/main.cpp
)
target_link_libraries(MoReFEMTestConformProjector
${MOREFEM_MODEL})
\ No newline at end of file
include(${CMAKE_CURRENT_LIST_DIR}/FromVertexMatching/CMakeLists.txt)
\ No newline at end of file
add_executable(MoReFEMTestFromVertexMatching
${CMAKE_CURRENT_LIST_DIR}/CheckInterpolator.cpp
${CMAKE_CURRENT_LIST_DIR}/CheckInterpolator.hpp
${CMAKE_CURRENT_LIST_DIR}/CheckInterpolator.hxx
${CMAKE_CURRENT_LIST_DIR}/InputParameterList.hpp
${CMAKE_CURRENT_LIST_DIR}/Model.cpp
${CMAKE_CURRENT_LIST_DIR}/Model.hpp
${CMAKE_CURRENT_LIST_DIR}/Model.hxx
${CMAKE_CURRENT_LIST_DIR}/main.cpp
)
target_link_libraries(MoReFEMTestFromVertexMatching
${MOREFEM_MODEL}
MoReFEMPostProcessing_lib)
\ No newline at end of file
add_executable(MoReFEMTestP1_to_P1b
${CMAKE_CURRENT_LIST_DIR}/InputParameterList.hpp
${CMAKE_CURRENT_LIST_DIR}/Model.hpp
${CMAKE_CURRENT_LIST_DIR}/Model.hxx
${CMAKE_CURRENT_LIST_DIR}/main_interpolator_P1_P1b.cpp
)
target_link_libraries(MoReFEMTestP1_to_P1b
${MOREFEM_MODEL})
add_executable(MoReFEMTestP1_to_P2
${CMAKE_CURRENT_LIST_DIR}/InputParameterList.hpp
${CMAKE_CURRENT_LIST_DIR}/Model.hpp
${CMAKE_CURRENT_LIST_DIR}/Model.hxx
${CMAKE_CURRENT_LIST_DIR}/main_interpolator_P1_P2.cpp
)
target_link_libraries(MoReFEMTestP1_to_P2
${MOREFEM_MODEL})
\ No newline at end of file
add_executable(MoReFEMTestOperatorTestFunctions
${CMAKE_CURRENT_LIST_DIR}/ExpectedResults.cpp
${CMAKE_CURRENT_LIST_DIR}/ExpectedResults.hpp
${CMAKE_CURRENT_LIST_DIR}/ExpectedResults.hxx
${CMAKE_CURRENT_LIST_DIR}/ExpectedResults_1D.cpp
${CMAKE_CURRENT_LIST_DIR}/ExpectedResults_2D.cpp
${CMAKE_CURRENT_LIST_DIR}/ExpectedResults_3D.cpp
${CMAKE_CURRENT_LIST_DIR}/InputParameterList.hpp
${CMAKE_CURRENT_LIST_DIR}/Model.cpp
${CMAKE_CURRENT_LIST_DIR}/Model.hpp
${CMAKE_CURRENT_LIST_DIR}/Model.hxx
${CMAKE_CURRENT_LIST_DIR}/VariationalFormulation.cpp
${CMAKE_CURRENT_LIST_DIR}/VariationalFormulation.hpp
${CMAKE_CURRENT_LIST_DIR}/VariationalFormulation.hxx
${CMAKE_CURRENT_LIST_DIR}/VariationalFormulationInit.cpp
${CMAKE_CURRENT_LIST_DIR}/main.cpp
)
target_link_libraries(MoReFEMTestOperatorTestFunctions
${MOREFEM_MODEL}
MoReFEM_test_tools)
\ No newline at end of file
add_executable(MoReFEMTestParameterAtDof
${CMAKE_CURRENT_LIST_DIR}/InputParameterList.hpp
${CMAKE_CURRENT_LIST_DIR}/Model.cpp
${CMAKE_CURRENT_LIST_DIR}/Model.hpp
${CMAKE_CURRENT_LIST_DIR}/Model.hxx
${CMAKE_CURRENT_LIST_DIR}/main.cpp
)
target_link_libraries(MoReFEMTestParameterAtDof
${MOREFEM_MODEL})
\ No newline at end of file
include(${CMAKE_CURRENT_LIST_DIR}/AtDof/CMakeLists.txt)
include(${CMAKE_CURRENT_LIST_DIR}/TimeDependency/CMakeLists.txt)
add_executable(MoReFEMTestParameterTimeDependancy
${CMAKE_CURRENT_LIST_DIR}/InputParameterList.hpp
${CMAKE_CURRENT_LIST_DIR}/Model.cpp
${CMAKE_CURRENT_LIST_DIR}/Model.hpp
${CMAKE_CURRENT_LIST_DIR}/Model.hxx
${CMAKE_CURRENT_LIST_DIR}/main.cpp
)
target_link_libraries(MoReFEMTestParameterTimeDependancy
${MOREFEM_MODEL})
\ No newline at end of file
include(${CMAKE_CURRENT_LIST_DIR}/Mpi/CMakeLists.txt)
\ No newline at end of file
include(${CMAKE_CURRENT_LIST_DIR}/ErrorHandling/CMakeLists.txt)
include(${CMAKE_CURRENT_LIST_DIR}/Functions/CMakeLists.txt)
include(${CMAKE_CURRENT_LIST_DIR}/SendReceive/CMakeLists.txt)
\ No newline at end of file
add_executable(MoReFEMTestMpiErrorHandling
${CMAKE_CURRENT_LIST_DIR}/InputParameterList.hpp
${CMAKE_CURRENT_LIST_DIR}/main.cpp
)
target_link_libraries(MoReFEMTestMpiErrorHandling
${MOREFEM_MODEL})
\ No newline at end of file
add_executable(MoReFEMTestMpiFunctions
${CMAKE_CURRENT_LIST_DIR}/InputParameterList.hpp
${CMAKE_CURRENT_LIST_DIR}/main.cpp
)
target_link_libraries(MoReFEMTestMpiFunctions
${MOREFEM_MODEL})
\ No newline at end of file
add_executable(MoReFEMTestMpiSendReceiveSingleValue
${CMAKE_CURRENT_LIST_DIR}/InputParameterList.hpp
${CMAKE_CURRENT_LIST_DIR}/main_single_value.cpp
)
target_link_libraries(MoReFEMTestMpiSendReceiveSingleValue
${MOREFEM_MODEL})
add_executable(MoReFEMTestMpiSendReceiveArray
${CMAKE_CURRENT_LIST_DIR}/InputParameterList.hpp
${CMAKE_CURRENT_LIST_DIR}/main_array.cpp
)
target_link_libraries(MoReFEMTestMpiSendReceiveArray
${MOREFEM_MODEL})
\ No newline at end of file
target_sources(MoReFEM_test_tools
PRIVATE
"${CMAKE_CURRENT_LIST_DIR}/TestLinearAlgebra.cpp" /
PUBLIC
"${CMAKE_CURRENT_LIST_DIR}/TestLinearAlgebra.hpp" /
"${CMAKE_CURRENT_LIST_DIR}/TestLinearAlgebra.hxx" /
)
\ No newline at end of file
include(${CMAKE_CURRENT_LIST_DIR}/InputParameterList/CMakeLists.txt)
\ No newline at end of file
add_executable(MoReFEMTestInputParameterList
${CMAKE_CURRENT_LIST_DIR}/main.cpp
${CMAKE_CURRENT_LIST_DIR}/InputParameterList.hpp
)
target_link_libraries(MoReFEMTestInputParameterList
${MOREFEM_MODEL})
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment