Commit 3f74e783 authored by niklas.baumgarten's avatar niklas.baumgarten
Browse files

moved generator and creating GENERATOR lib

parent cb1622cd
Pipeline #118626 passed with stages
in 7 minutes and 20 seconds
...@@ -50,7 +50,7 @@ include_directories(${PROJECT_SOURCE_DIR}/mlmc/src) ...@@ -50,7 +50,7 @@ include_directories(${PROJECT_SOURCE_DIR}/mlmc/src)
add_subdirectory(mlmc/src) add_subdirectory(mlmc/src)
# Libraries # Libraries
set(MLMC_LIBRARIES PDESOLVER MONTECARLO PROBLEMS sprng fftw3 m ${MPP_LIBRARIES}) set(MLMC_LIBRARIES PDESOLVER MONTECARLO PROBLEMS GENERATORS sprng fftw3 m ${MPP_LIBRARIES})
# Executables # Executables
add_executable(MLMC-M++ mlmc/src/Main.cpp) add_executable(MLMC-M++ mlmc/src/Main.cpp)
......
include_directories(basics) include_directories(basics)
add_subdirectory(basics) add_subdirectory(basics)
include_directories(generators)
add_subdirectory(generators)
include_directories(problems) include_directories(problems)
add_subdirectory(problems) add_subdirectory(problems)
...@@ -9,3 +12,4 @@ add_subdirectory(pdesolver) ...@@ -9,3 +12,4 @@ add_subdirectory(pdesolver)
include_directories(montecarlo) include_directories(montecarlo)
add_subdirectory(montecarlo) add_subdirectory(montecarlo)
...@@ -53,6 +53,11 @@ struct SampleSolution { ...@@ -53,6 +53,11 @@ struct SampleSolution {
Init(); Init();
} }
SampleSolution(Vector U, const SampleID &id) :
id(id), U(U) {
Init();
}
void Init(); void Init();
}; };
......
add_library(GENERATORS STATIC
CirculantEmbedding.cpp
HybridFluxGenerator.cpp
NormalDistribution.cpp
UniformDistribution.cpp
)
target_link_libraries(GENERATORS BASICS sprng ${MPP_LIBRARIES})
...@@ -2,9 +2,5 @@ add_library(PROBLEMS STATIC ...@@ -2,9 +2,5 @@ add_library(PROBLEMS STATIC
IStochasticProblem.cpp IStochasticProblem.cpp
StochasticEllipticProblem.cpp StochasticEllipticProblem.cpp
StochasticTransportProblem.cpp StochasticTransportProblem.cpp
generators/CirculantEmbedding.cpp
generators/HybridFluxGenerator.cpp
generators/NormalDistribution.cpp
generators/UniformDistribution.cpp
) )
target_link_libraries(PROBLEMS BASICS sprng ${MPP_LIBRARIES}) target_link_libraries(PROBLEMS GENERATORS ${MPP_LIBRARIES})
...@@ -23,8 +23,8 @@ endmacro() ...@@ -23,8 +23,8 @@ endmacro()
add_mlmc_test(basics/TestLevel) add_mlmc_test(basics/TestLevel)
add_mlmc_test(basics/TestPlotMap) add_mlmc_test(basics/TestPlotMap)
add_mlmc_test(problems/generators/TestNormalDistribution) add_mlmc_test(generators/TestNormalDistribution)
add_mlmc_test(problems/generators/TestCirculantEmbedding) add_mlmc_test(generators/TestCirculantEmbedding)
add_mlmc_test(montecarlo/TestMonteCarlo) add_mlmc_test(montecarlo/TestMonteCarlo)
add_mlmc_test(pdesolver/TestPDESolver) add_mlmc_test(pdesolver/TestPDESolver)
......
#include "problems/generators/CirculantEmbedding.hpp" #include "generators/CirculantEmbedding.hpp"
#include "TestCirculantEmbedding.hpp" #include "TestCirculantEmbedding.hpp"
#include "TestEnvironment.hpp" #include "TestEnvironment.hpp"
......
#include "problems/generators/NormalDistribution.hpp" #include "generators/NormalDistribution.hpp"
#include "basics/Utilities.hpp" #include "basics/Utilities.hpp"
#include "TestEnvironment.hpp" #include "TestEnvironment.hpp"
......
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