Commit 8c24273f authored by GILLES Sebastien's avatar GILLES Sebastien

#1262 Add testing in CMake.

parent bbd9ae4a
......@@ -115,6 +115,7 @@ set(CMAKE_INSTALL_RPATH "${MOREFEM_INSTALL_DIR}/lib")
# which point to directories outside the build tree to the install RPATH
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH True)
enable_testing()
######################################################
# Walk through Sources directory to find all sources to build.
......
......@@ -46,8 +46,8 @@ namespace MoReFEM
const auto& P1_potential_1_P2_potential_2_numbering_subset =
god_of_dof.GetNumberingSubset(EnumUnderlyingType(NumberingSubsetIndex::P1_potential_1_P2_potential_2));
auto& potential_1_potential_2_system_matrix =
GetNonCstSystemMatrix(potential_1_potential_2_numbering_subset, potential_1_potential_2_numbering_subset);
// auto& potential_1_potential_2_system_matrix =
// GetNonCstSystemMatrix(potential_1_potential_2_numbering_subset, potential_1_potential_2_numbering_subset);
auto& potential_1_system_matrix =
GetNonCstSystemMatrix(potential_1_numbering_subset, potential_1_numbering_subset);
auto& potential_1_test_system_matrix =
......@@ -55,10 +55,10 @@ namespace MoReFEM
potential_1_numbering_subset);
// auto& potential_2_system_matrix =
// GetNonCstSystemMatrix(potential_2_numbering_subset, potential_2_numbering_subset);
auto& potential_3_system_matrix =
GetNonCstSystemMatrix(potential_3_numbering_subset, potential_3_numbering_subset);
auto& potential_1_potential_3_system_matrix =
GetNonCstSystemMatrix(potential_1_numbering_subset, potential_3_numbering_subset);
// auto& potential_3_system_matrix =
// GetNonCstSystemMatrix(potential_3_numbering_subset, potential_3_numbering_subset);
// auto& potential_1_potential_3_system_matrix =
// GetNonCstSystemMatrix(potential_1_numbering_subset, potential_3_numbering_subset);
auto& displacement_potential_1_system_matrix =
GetNonCstSystemMatrix(displacement_potential_1_numbering_subset, displacement_potential_1_numbering_subset);
auto& potential_1_potential_2_potential_4_system_matrix =
......@@ -135,8 +135,6 @@ namespace MoReFEM
"source_operator_potential_1",
__FILE__, __LINE__));
{
GlobalVectorWithCoefficient vector(monolithic_system_rhs, 1.);
source_operator_potential_1_potential_1_->Assemble(std::make_tuple(std::ref(vector)), 0.);
......
include(${CMAKE_CURRENT_LIST_DIR}/Pk2/CMakeLists.txt)
include(${CMAKE_CURRENT_LIST_DIR}/NonlinearMembrane/CMakeLists.txt)
include(${CMAKE_CURRENT_LIST_DIR}/Mass/CMakeLists.txt)
include(${CMAKE_CURRENT_LIST_DIR}/GradGrad/CMakeLists.txt)
\ No newline at end of file
......@@ -31,6 +31,10 @@ target_link_libraries(MoReFEMTestOperatorGradGrad2D MoReFEMTestOperatorGradGrad_
add_executable(MoReFEMTestOperatorGradGrad1D ${CMAKE_CURRENT_LIST_DIR}/main_1D.cpp)
target_link_libraries(MoReFEMTestOperatorGradGrad1D MoReFEMTestOperatorGradGrad_lib)
add_test(TestOperatorGradGrad3D MoReFEMTestOperatorGradGrad3D)
add_test(TestOperatorGradGrad2D MoReFEMTestOperatorGradGrad2D)
add_test(TestOperatorGradGrad1D MoReFEMTestOperatorGradGrad1D)
morefem_install(MoReFEMTestOperatorGradGrad1D MoReFEMTestOperatorGradGrad2D MoReFEMTestOperatorGradGrad3D MoReFEMTestOperatorGradGrad_lib)
......@@ -31,6 +31,10 @@ target_link_libraries(MoReFEMTestOperatorMass2D MoReFEMTestOperatorMass_lib)
add_executable(MoReFEMTestOperatorMass1D ${CMAKE_CURRENT_LIST_DIR}/main_1D.cpp)
target_link_libraries(MoReFEMTestOperatorMass1D MoReFEMTestOperatorMass_lib)
add_test(TestOperatorMass3D MoReFEMTestOperatorMass3D)
add_test(TestOperatorMass2D MoReFEMTestOperatorMass2D)
add_test(TestOperatorMass1D MoReFEMTestOperatorMass1D)
morefem_install(MoReFEMTestOperatorMass1D MoReFEMTestOperatorMass2D MoReFEMTestOperatorMass3D MoReFEMTestOperatorMass_lib)
add_library(TestNonLinearMembrane_lib ${LIBRARY_TYPE} "")
add_library(MoReFEMTestNonLinearMembrane_lib ${LIBRARY_TYPE} "")
target_sources(TestNonLinearMembrane_lib
target_sources(MoReFEMTestNonLinearMembrane_lib
PRIVATE
"${CMAKE_CURRENT_LIST_DIR}/Model.cpp"
"${CMAKE_CURRENT_LIST_DIR}/TestP1P1.cpp"
......@@ -14,15 +14,17 @@ target_sources(TestNonLinearMembrane_lib
"${CMAKE_CURRENT_LIST_DIR}/ExpectedResults.hpp"
)
target_link_libraries(TestNonLinearMembrane_lib
target_link_libraries(MoReFEMTestNonLinearMembrane_lib
${MOREFEM_MODEL}
${ALL_LOAD_FLAG}
MoReFEM_test_tools)
add_executable(TestNonLinearMembrane ${CMAKE_CURRENT_LIST_DIR}/main.cpp)
target_link_libraries(TestNonLinearMembrane
TestNonLinearMembrane_lib)
add_executable(MoReFEMTestNonLinearMembrane ${CMAKE_CURRENT_LIST_DIR}/main.cpp)
target_link_libraries(MoReFEMTestNonLinearMembrane
MoReFEMTestNonLinearMembrane_lib)
morefem_install(TestNonLinearMembrane TestNonLinearMembrane_lib)
add_test(TestNonLinearMembrane MoReFEMTestNonLinearMembrane)
morefem_install(MoReFEMTestNonLinearMembrane MoReFEMTestNonLinearMembrane_lib)
add_executable(MoReFEMTestOperatorPk2
add_executable(MoReFEMTestHyperelasticOperator
${CMAKE_CURRENT_LIST_DIR}/main_3D.cpp
${CMAKE_CURRENT_LIST_DIR}/InputParameterList.hpp
......@@ -14,5 +14,7 @@ add_executable(MoReFEMTestOperatorPk2
${CMAKE_CURRENT_LIST_DIR}/ExpectedResults.hpp
)
target_link_libraries(MoReFEMTestOperatorPk2
target_link_libraries(MoReFEMTestHyperelasticOperator
MoReFEM_test_tools)
add_test(TestHyperelasticOperator MoReFEMTestHyperelasticOperator)
......@@ -8,4 +8,7 @@ target_link_libraries(MoReFEMTestInputParameterList
${MOREFEM_MODEL}
${ALL_LOAD_END_FLAG})
#add_test(TestInputParameterList MoReFEMTestInputParameterList)
morefem_install(MoReFEMTestInputParameterList)
\ No newline at end of file
......@@ -5,4 +5,6 @@ add_executable(MoReFEMTestLuaOptionFile
target_link_libraries(MoReFEMTestLuaOptionFile
${MOREFEM_UTILITIES})
add_test(TestLuaOptionFile MoReFEMTestLuaOptionFile)
morefem_install(MoReFEMTestLuaOptionFile)
......@@ -4,4 +4,6 @@ add_executable(MoReFEMTestTuple
# No target link: tested features are header-only.
add_test(TestUtilitiesTuple MoReFEMTestTuple)
morefem_install(MoReFEMTestTuple)
......@@ -5,4 +5,6 @@ add_executable(MoReFEMTestGetTypeName
target_link_libraries(MoReFEMTestGetTypeName
${MOREFEM_UTILITIES})
add_test(TestGetTypeName MoReFEMTestGetTypeName)
morefem_install(MoReFEMTestGetTypeName)
\ 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