Commit 0160f3c0 authored by niklas.baumgarten's avatar niklas.baumgarten
Browse files

adapted test structure to project structure

parent b210acda
Pipeline #157233 passed with stages
in 11 minutes and 28 seconds
......@@ -9,27 +9,30 @@ file(MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/mluq/tests/data/vtu)
file(MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/mluq/tests/log)
# ------- Unit Tests -------
add_mpp_test(generators/TestPlotting GENERATORS)
add_mpp_test(generators/TestNormalDistribution GENERATORS)
add_mpp_test(generators/TestUniformDistribution GENERATORS)
add_mpp_test(generators/TestCirculantEmbedding GENERATORS)
add_mpp_test(generators/TestSymmetricCovariance GENERATORS)
add_mpp_test(generators/TestSparseGridGenerator GENERATORS)
add_mpp_test(generators/TestHybridFluxGenerator GENERATORS)
#add_mpp_test(generators/TestHybridFluxGenerator GENERATORS)
# Add tests for problems!
add_mpp_test(pdesolvers/TestPDESolver PDESOLVERS)
add_mpp_test(pdesolvers/TestPlotting PDESOLVERS)
add_mpp_test(estimators/datastructure/TestLevelMaps ESTIMATORS)
add_mpp_test(estimators/datastructure/TestExponents ESTIMATORS)
add_mpp_test(estimators/datastructure/TestMultilevelErrors ESTIMATORS)
# ------- MPI Tests -------
add_mpi_test(generators/TestSPRNG5 GENERATORS)
add_mpp_test(pdesolver/TestPDESolver PDESOLVERS)
add_mpi_test(pdesolvers/TestPDESolver PDESOLVERS)
# ------- MPI Tests -------
add_mpi_test(TestMain ESTIMATORS)
add_mpi_test(generators/TestSPRNG5 ESTIMATORS)
add_mpi_test(estimators/TestMonteCarlo ESTIMATORS)
add_mpi_test(estimators/TestMultilevelMonteCarlo ESTIMATORS)
add_mpi_test(pdesolver/TestPDESolver PDESOLVERS)
add_mpi_test(estimators/datastructure/TestWelfordAggregate ESTIMATORS)
\ No newline at end of file
add_mpi_test(estimators/datastructure/TestWelfordAggregate ESTIMATORS)
add_mpi_test(TestMain ESTIMATORS)
#include "generators/algorithms/HybridFluxGenerator.hpp"
#include "HybridFluxGenerator.hpp"
#include "MeshesCreator.hpp"
#include "TestEnvironment.hpp"
......@@ -10,39 +10,34 @@ namespace fs = std::filesystem;
class TestHybridFluxGenerator : public Test {
protected:
SampleID id;
SampleID id;
Meshes *meshes;
std::unique_ptr<Meshes> meshes;
HybridFaceNormalFluxGenerator faceNormalFluxGen;
HybridFaceNormalFluxGenerator faceNormalFluxGen;
HybridCellFluxGenerator cellFluxGen;
HybridCellFluxGenerator cellFluxGen;
TestHybridFluxGenerator() :
id(SampleID(6, false, 0)),
meshes(MeshesCreator("Interval").
WithPLevel(id.level.coarse).
WithLevel(id.level.fine).
Create()),
faceNormalFluxGen(HybridFaceNormalFluxGenerator(*meshes)),
cellFluxGen(HybridCellFluxGenerator(*meshes, faceNormalFluxGen)) {}
void TearDown() override {
delete meshes;
}
TestHybridFluxGenerator() :
id(SampleID(6, 0, false)),
meshes(MeshesCreator("Interval").
WithPLevel(id.level()).
WithLevel(id.level()).
CreateUnique()),
faceNormalFluxGen(HybridFaceNormalFluxGenerator(*meshes)),
cellFluxGen(HybridCellFluxGenerator(*meshes, faceNormalFluxGen)) {}
};
TEST_F(TestHybridFluxGenerator, TestDrawSample) {
faceNormalFluxGen.DrawSample(id);
cellFluxGen.DrawSample(id);
// faceNormalGen.solutionFaceFlux->U.
faceNormalFluxGen.DrawSample(id);
cellFluxGen.DrawSample(id);
}
int main(int argc, char **argv) {
return MppTest(
MppTestBuilder(argc, argv).
WithConfigEntry("GeneratorVerbose", 1).
WithScreenLogging().
WithPPM()
).RUN_ALL_MPP_TESTS();
return MppTest(
MppTestBuilder(argc, argv).
WithConfigEntry("GeneratorVerbose", 1).
WithScreenLogging().
WithPPM()
).RUN_ALL_MPP_TESTS();
}
\ No newline at end of file
Supports Markdown
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