Commit 90c24f59 authored by niklas.baumgarten's avatar niklas.baumgarten

adaption to 165

parent c0656fe1
......@@ -31,18 +31,15 @@ include_directories(${PROJECT_SOURCE_DIR}/mlmc/src)
# Subdirectories
add_subdirectory(mlmc/src)
# Libraries
set(MLMC_LIBRARIES PDESOLVER MONTECARLO PROBLEMS GENERATORS sprng fftw3 m MPP_LIBRARIES)
# Executables
add_executable(MLMC-M++ mlmc/src/Main.cpp)
# Linking
target_link_libraries(MLMC-M++ ${MLMC_LIBRARIES})
target_link_libraries(MLMC-M++ MONTECARLO)
# Tests
if (BUILD_MLMC_TESTS)
include_directories(mlmc/tests)
include_directories(mlmc/tests/)
add_subdirectory(mlmc/tests/)
endif ()
......
......@@ -12,4 +12,3 @@ add_subdirectory(pdesolver)
include_directories(montecarlo)
add_subdirectory(montecarlo)
......@@ -4,4 +4,4 @@ add_library(BASICS STATIC
PlotMap.cpp
Utilities.cpp
)
target_link_libraries(BASICS fftw3)
\ No newline at end of file
target_link_libraries(BASICS fftw3 MPP_LIBRARIES)
\ No newline at end of file
......@@ -5,4 +5,4 @@ add_library(GENERATORS STATIC
algorithms/NormalDistribution.cpp
algorithms/UniformDistribution.cpp
)
target_link_libraries(GENERATORS BASICS PDESOLVER sprng ${MPP_LIBRARIES})
target_link_libraries(GENERATORS BASICS PDESOLVER sprng MPP_LIBRARIES)
......@@ -6,4 +6,4 @@ add_library(MONTECARLO STATIC
datastructure/EmpiricMeasures.cpp
datastructure/EmpiricMeasureLevelMaps.cpp
)
target_link_libraries(MONTECARLO ${MLMC_LIBRARIES})
target_link_libraries(MONTECARLO PDESOLVER MPP_LIBRARIES)
......@@ -9,4 +9,4 @@ add_library(PDESOLVER STATIC
assembling/PGReactionAssemble.cpp
assembling/DGReactionAssemble.cpp
)
target_link_libraries(PDESOLVER PROBLEMS ${MPP_LIBRARIES})
\ No newline at end of file
target_link_libraries(PDESOLVER PROBLEMS MPP_LIBRARIES)
\ No newline at end of file
......@@ -8,35 +8,25 @@ file(MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/mlmc/tests/data/py)
file(MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/mlmc/tests/data/vtu)
file(MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/mlmc/tests/log)
# ------- Tests Macro -------
macro(add_mlmc_test testpath)
# To remove pathnames infront of testname
string(FIND ${testpath} "/" pos REVERSE)
MATH(EXPR pos "${pos}+1")
string(SUBSTRING ${testpath} ${pos} -1 testname)
add_executable(${testname} ${testpath}.cpp)
target_link_libraries(${testname} ${MLMC_TEST_LIBRARIES})
add_test(${testname} ${testname})
endmacro()
# ------- Unit Tests -------
add_mlmc_test(basics/TestLevel)
add_mlmc_test(basics/TestPlotMap)
add_mpp_test(basics/TestLevel BASICS)
add_mpp_test(basics/TestPlotMap BASICS)
add_mpp_test(generators/TestNormalDistribution GENERATORS)
add_mpp_test(generators/TestCirculantEmbedding GENERATORS)
add_mpp_test(generators/TestHybridFluxGenerator GENERATORS)
add_mlmc_test(generators/TestNormalDistribution)
add_mlmc_test(generators/TestCirculantEmbedding)
add_mlmc_test(generators/TestHybridFluxGenerator)
add_mpp_test(montecarlo/TestMonteCarlo MONTECARLO)
add_mpp_test(montecarlo/datastructure/TestEmpiricMeasureLevelMaps MONTECARLO)
add_mpp_test(montecarlo/datastructure/TestExponents MONTECARLO)
add_mpp_test(montecarlo/datastructure/TestErrors MONTECARLO)
add_mlmc_test(montecarlo/TestMonteCarlo)
add_mlmc_test(pdesolver/TestPDESolver)
add_mlmc_test(montecarlo/datastructure/TestEmpiricMeasureLevelMaps)
add_mlmc_test(montecarlo/datastructure/TestExponents)
add_mlmc_test(montecarlo/datastructure/TestErrors)
add_mpp_test(pdesolver/TestPDESolver PDESOLVER)
# ------- Integration Tests -------
add_executable(TestMain TestMain.cpp)
target_link_libraries(TestMain ${MLMC_TEST_LIBRARIES})
target_link_libraries(TestMain MONTECARLO LIB_TEST)
add_executable(TestParallelization TestParallelization.cpp)
target_link_libraries(TestParallelization ${MLMC_TEST_LIBRARIES})
#add_executable(TestParallelization TestParallelization.cpp)
#target_link_libraries(TestParallelization ${MLMC_TEST_LIBRARIES})
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