Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Backofen, Rainer
amdis
Commits
063f53f8
Commit
063f53f8
authored
Oct 24, 2016
by
Praetorius, Simon
Browse files
test CMakeLists.txt adopted to current AMDiSConfig.cmake and cmake 2.8.10
parent
09a8e7a8
Changes
6
Hide whitespace changes
Inline
Side-by-side
test/CMakeLists.txt
View file @
063f53f8
project
(
"AMDiS test suite"
)
cmake_minimum_required
(
VERSION
3.
0
)
cmake_minimum_required
(
VERSION
2.8.1
0
)
find_package
(
AMDIS REQUIRED
)
find_package
(
AMDIS REQUIRED
${
COMPONENT
}
)
add_library
(
amdis INTERFACE
)
if
(
AMDIS_INCLUDE_DIRS
)
target_include_directories
(
amdis INTERFACE
${
AMDIS_INCLUDE_DIRS
}
)
endif
(
AMDIS_INCLUDE_DIRS
)
if
(
AMDIS_COMPILEFLAGS
)
target_compile_options
(
amdis INTERFACE
${
AMDIS_COMPILEFLAGS
}
)
endif
(
AMDIS_COMPILEFLAGS
)
target_link_libraries
(
amdis INTERFACE
${
AMDIS_LIBRARIES
}
)
include_directories
(
${
AMDIS_INCLUDE_DIRS
}
)
add_definitions
(
${
AMDIS_COMPILEFLAGS
}
)
enable_testing
()
...
...
test/mpi/CMakeLists.txt
View file @
063f53f8
...
...
@@ -5,7 +5,7 @@ foreach(s ${sources})
get_filename_component
(
swe
${
s
}
NAME_WE
)
add_executable
(
${
swe
}
${
s
}
)
target_link_libraries
(
${
swe
}
amdis
${
Boost_LIBRARIES
}
)
target_link_libraries
(
${
swe
}
${
AMDIS_LIBRARIES
}
${
Boost_LIBRARIES
}
)
list
(
APPEND TEST_DEPENDENCIES
${
swe
}
)
endforeach
(
s
)
...
...
test/other/CMakeLists.txt
View file @
063f53f8
...
...
@@ -8,7 +8,7 @@ endif ()
add_executable
(
test_expr src/Test_Expressions.cc
)
target_link_libraries
(
test_expr
amdis
)
target_link_libraries
(
test_expr
${
AMDIS_LIBRARIES
}
)
if
(
NOT AMDIS_HAS_PARALLEL_DOMAIN
)
add_test
(
NAME RunTestExpr_1d WORKING_DIRECTORY
${
CMAKE_CURRENT_SOURCE_DIR
}
COMMAND test_expr init/test_expr.dat.1d
)
endif
()
...
...
@@ -18,7 +18,7 @@ list(APPEND TEST_DEPENDENCIES test_expr)
add_executable
(
test_basis src/Test_BasisFunction.cc
)
target_link_libraries
(
test_basis
amdis
)
target_link_libraries
(
test_basis
${
AMDIS_LIBRARIES
}
)
if
(
NOT AMDIS_HAS_PARALLEL_DOMAIN
)
add_test
(
NAME RunTestBasis_1d WORKING_DIRECTORY
${
CMAKE_CURRENT_SOURCE_DIR
}
COMMAND test_basis init/test_basisFct.dat.1d
)
endif
()
...
...
@@ -28,20 +28,20 @@ list(APPEND TEST_DEPENDENCIES test_basis)
add_executable
(
test_writer src/Test_Writer.cc
)
target_link_libraries
(
test_writer
amdis
)
target_link_libraries
(
test_writer
${
AMDIS_LIBRARIES
}
)
list
(
APPEND TEST_DEPENDENCIES test_writer
)
add_executable
(
test_arh3 src/Test_Arh3.cc
)
target_link_libraries
(
test_arh3
amdis
)
target_link_libraries
(
test_arh3
${
AMDIS_LIBRARIES
}
)
list
(
APPEND TEST_DEPENDENCIES test_arh3
)
add_executable
(
test_mat_vec src/Test_MatrixVectorOperations.cc
)
target_link_libraries
(
test_mat_vec
amdis
)
target_link_libraries
(
test_mat_vec
${
AMDIS_LIBRARIES
}
)
list
(
APPEND TEST_DEPENDENCIES test_mat_vec
)
add_executable
(
test_problemStat src/Test_ProblemStat.cc
)
target_link_libraries
(
test_problemStat
amdis
)
target_link_libraries
(
test_problemStat
${
AMDIS_LIBRARIES
}
)
if
(
NOT AMDIS_HAS_PARALLEL_DOMAIN
)
add_test
(
NAME RunTestProblemStat_1d WORKING_DIRECTORY
${
CMAKE_CURRENT_SOURCE_DIR
}
COMMAND test_problemStat init/test_problemStat.dat.1d
)
add_test
(
NAME RunTestProblemStat_2d WORKING_DIRECTORY
${
CMAKE_CURRENT_SOURCE_DIR
}
COMMAND test_problemStat init/test_problemStat.dat.2d
)
...
...
@@ -53,7 +53,7 @@ list(APPEND TEST_DEPENDENCIES test_problemStat)
# parallel tests
if
(
AMDIS_HAS_PARALLEL_DOMAIN
)
add_executable
(
test_synch src/Test_Synch.cc
)
target_link_libraries
(
test_synch
amdis
)
target_link_libraries
(
test_synch
${
AMDIS_LIBRARIES
}
)
add_test
(
NAME RunTestSynch_2d WORKING_DIRECTORY
${
CMAKE_CURRENT_SOURCE_DIR
}
COMMAND test_synch init/test_synch.dat.2d
)
add_test
(
NAME RunTestSynch_3d WORKING_DIRECTORY
${
CMAKE_CURRENT_SOURCE_DIR
}
COMMAND test_synch init/test_synch.dat.3d
)
list
(
APPEND TEST_DEPENDENCIES test_synch
)
...
...
@@ -63,17 +63,17 @@ endif (AMDIS_HAS_PARALLEL_DOMAIN)
# tests if AMDiS-Extensions
if
(
AMDIS_NEED_EXTENSIONS
)
add_executable
(
test_bg_mesh src/Test_BackgroundMesh2.cc
)
target_link_libraries
(
test_bg_mesh
amdis
)
target_link_libraries
(
test_bg_mesh
${
AMDIS_LIBRARIES
}
)
add_test
(
NAME RunTestBgMesh WORKING_DIRECTORY
${
CMAKE_CURRENT_SOURCE_DIR
}
COMMAND test_bg_mesh init/test_bg_mesh.dat
)
list
(
APPEND TEST_DEPENDENCIES test_bg_mesh
)
add_executable
(
test_views src/Test_Views.cc
)
target_link_libraries
(
test_views
amdis
)
target_link_libraries
(
test_views
${
AMDIS_LIBRARIES
}
)
add_test
(
NAME RunTestViews_2d WORKING_DIRECTORY
${
CMAKE_CURRENT_SOURCE_DIR
}
COMMAND test_views init/test_views.dat.2d
)
list
(
APPEND TEST_DEPENDENCIES test_views
)
add_executable
(
test_vtk src/Test_Vtk.cc
)
target_link_libraries
(
test_vtk
amdis
)
target_link_libraries
(
test_vtk
${
AMDIS_LIBRARIES
}
)
list
(
APPEND TEST_DEPENDENCIES test_vtk
)
endif
(
AMDIS_NEED_EXTENSIONS
)
...
...
test/seq/CMakeLists.txt
View file @
063f53f8
add_executable
(
test0001 src/test0001.cc
)
target_link_libraries
(
test0001
amdis
${
Boost_LIBRARIES
}
)
add_test
(
NAME RunTest0001 WORKING_DIRECTORY
${
CMAKE_CURRENT_SOURCE_DIR
}
COMMAND test0001 test0001.dat.2d
)
target_link_libraries
(
test0001
${
AMDIS_LIBRARIES
}
${
Boost_LIBRARIES
}
)
add_test
(
NAME RunTest0001 WORKING_DIRECTORY
${
CMAKE_CURRENT_SOURCE_DIR
}
COMMAND test0001
./init/
test0001.dat.2d
)
add_dependencies
(
check test0001
)
...
...
test/seq/init/test0001.dat.2d
View file @
063f53f8
...
...
@@ -9,7 +9,7 @@ ellipt->components: 1
ellipt->polynomial degree[0]: 1
ellipt->solver: cg
ellipt->solver->max iteration: 10
ellipt->solver->max iteration: 10
0
ellipt->solver->tolerance: 1.e-8
ellipt->solver->info: 10
ellipt->solver->left precon: diag
...
...
test/seq/src/test0001.cc
View file @
063f53f8
#define BOOST_TEST_DYN_LINK
#define BOOST_TEST_MODULE 0001
#include
<boost/test/unit_test.hpp>
#include
<cassert>
#include
<AMDiS.h>
using
namespace
AMDiS
;
BOOST_AUTO_TEST_CASE
(
blub
)
int
main
(
int
argc
,
char
**
argv
)
{
FUNCNAME
(
"main"
);
AMDiS
::
init
(
"./init/test0001.dat.2d"
);
AMDiS
::
init
(
argc
,
argv
);
// ===== create and init the scalar problem =====
ProblemStat
ellipt
(
"ellipt"
);
...
...
@@ -19,7 +14,7 @@ BOOST_AUTO_TEST_CASE(blub)
// === create adapt info ===
AdaptInfo
adaptInfo
(
"ellipt->adapt"
,
ellipt
.
getNumComponents
());
BOOST_REQUIRE
(
ellipt
.
getNumComponents
()
==
1
);
assert
(
ellipt
.
getNumComponents
()
==
1
);
// === create adapt ===
AdaptStationary
adapt
(
"ellipt->adapt"
,
ellipt
,
adaptInfo
);
...
...
@@ -37,9 +32,7 @@ BOOST_AUTO_TEST_CASE(blub)
// ===== start adaption loop =====
adapt
.
adapt
();
BOOST_REQUIRE
(
ellipt
.
getFeSpace
()
->
getAdmin
()
->
getUsedSize
()
==
81
);
assert
(
ellipt
.
getFeSpace
()
->
getAdmin
()
->
getUsedSize
()
==
81
);
AMDiS
::
finalize
();
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment