VirtualFluids 0.2.0
Parallel CFD LBM Solver
Loading...
Searching...
No Matches
TestImp.h
Go to the documentation of this file.
1//=======================================================================================
2// ____ ____ __ ______ __________ __ __ __ __
3// \ \ | | | | | _ \ |___ ___| | | | | / \ | |
4// \ \ | | | | | |_) | | | | | | | / \ | |
5// \ \ | | | | | _ / | | | | | | / /\ \ | |
6// \ \ | | | | | | \ \ | | | \__/ | / ____ \ | |____
7// \ \ | | |__| |__| \__\ |__| \________/ /__/ \__\ |_______|
8// \ \ | | ________________________________________________________________
9// \ \ | | | ______________________________________________________________|
10// \ \| | | | __ __ __ __ ______ _______
11// \ | | |_____ | | | | | | | | | _ \ / _____)
12// \ | | _____| | | | | | | | | | | \ \ \_______
13// \ | | | | |_____ | \_/ | | | | |_/ / _____ |
14// \ _____| |__| |________| \_______/ |__| |______/ (_______/
15//
16// This file is part of VirtualFluids. VirtualFluids is free software: you can
17// redistribute it and/or modify it under the terms of the GNU General Public
18// License as published by the Free Software Foundation, either version 3 of
19// the License, or (at your option) any later version.
20//
21// VirtualFluids is distributed in the hope that it will be useful, but WITHOUT
22// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
23// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
24// for more details.
25//
26// SPDX-License-Identifier: GPL-3.0-or-later
27// SPDX-FileCopyrightText: Copyright © VirtualFluids Project contributors, see AUTHORS.md in root folder
28//
32//=======================================================================================
33#ifndef TEST_IMP_H
34#define TEST_IMP_H
35
36#include "Utilities/Test/Test.h"
37
38#include <vector>
39#include <memory>
40
43class SimulationInfo;
46
47class TestImp : public Test
48{
49public:
50 void run() override;
51 void update() override;
52 TestStatus getTestStatus() override;
53 void makeConsoleOutput() override;
54
55 void addSimulation(std::shared_ptr<NumericalTestSimulation> sim, std::shared_ptr<SimulationInfo> simInfo, std::shared_ptr<PostProcessingStrategy> postProStrategy);
56
57protected:
58 TestImp(std::shared_ptr<ColorConsoleOutput> colorOutput);
59
60 virtual void evaluate() = 0;
61 virtual std::vector<std::string> buildTestOutput() = 0;
62 virtual std::vector<std::string> buildBasicTestOutput() = 0;
63 virtual std::vector<std::string> buildErrorTestOutput() = 0;
64 std::vector<std::string> buildSimulationFailedTestOutput();
65
67
68 std::vector<std::shared_ptr<NumericalTestSimulation> > simulations;
69 std::vector<std::shared_ptr<PostProcessingStrategy> > postProStrategies;
70 std::vector<std::shared_ptr<SimulationInfo> > simInfos;
71 std::vector<bool> simulationRun;
72 std::shared_ptr<ColorConsoleOutput> colorOutput;
74
75private:
76 TestImp() {};
77};
78#endif
Definition Test.h:43
std::vector< bool > simulationRun
Definition TestImp.h:71
std::vector< std::shared_ptr< NumericalTestSimulation > > simulations
Definition TestImp.h:68
std::shared_ptr< ColorConsoleOutput > colorOutput
Definition TestImp.h:72
virtual std::vector< std::string > buildTestOutput()=0
std::vector< std::shared_ptr< PostProcessingStrategy > > postProStrategies
Definition TestImp.h:69
virtual std::vector< std::string > buildErrorTestOutput()=0
std::vector< std::shared_ptr< SimulationInfo > > simInfos
Definition TestImp.h:70
virtual void evaluate()=0
virtual std::vector< std::string > buildBasicTestOutput()=0
TestStatus testStatus
Definition TestImp.h:73
void addSimulation(std::shared_ptr< NumericalTestSimulation > sim, std::shared_ptr< SimulationInfo > simInfo, std::shared_ptr< PostProcessingStrategy > postProStrategy)
Definition TestImp.cpp:84
void update() override
Definition TestImp.cpp:55
void run() override
Definition TestImp.cpp:41
std::vector< std::string > buildSimulationFailedTestOutput()
Definition TestImp.cpp:130
bool CheckAllSimulationRun()
Definition TestImp.cpp:125
TestStatus getTestStatus() override
Definition TestImp.cpp:93
void makeConsoleOutput() override
Definition TestImp.cpp:98
TestStatus
Definition TestStatus.h:36
std::shared_ptr< T > SPtr