Skip to content
Snippets Groups Projects
Commit 8c9de460 authored by Anna Wellmann's avatar Anna Wellmann
Browse files

Merge branch 'refactorSimulation' into 'develop'

Move simulation subroutines into functions

See merge request irmb/VirtualFluids_dev!221
parents fde550c1 c5c72161
No related branches found
No related tags found
1 merge request!221Move simulation subroutines into functions
This diff is collapsed.
......@@ -31,6 +31,7 @@ class EnstrophyAnalyzer;
class BoundaryConditionFactory;
class GridScalingFactory;
class TurbulenceModelFactory;
class Timer;
class Simulation
{
......@@ -44,16 +45,22 @@ public:
void run();
void setFactories(std::unique_ptr<KernelFactory> &&kernelFactory,
std::unique_ptr<PreProcessorFactory> &&preProcessorFactory);
std::unique_ptr<PreProcessorFactory> &&preProcessorFactory);
void setDataWriter(std::shared_ptr<DataWriter> dataWriter);
void addKineticEnergyAnalyzer(uint tAnalyse);
void addEnstrophyAnalyzer(uint tAnalyse);
//! \brief can be used as an alternative to run(), if the simulation needs to be controlled from the outside (e. g. for fluid structure interaction FSI)
void calculateTimestep(uint timestep);
//! \brief needed to initialize the simulation timers if calculateTimestep is used instead of run()
void initTimers();
private:
void init(GridProvider &gridProvider, BoundaryConditionFactory *bcFactory, SPtr<TurbulenceModelFactory> tmFactory, GridScalingFactory *scalingFactory);
void allocNeighborsOffsetsScalesAndBoundaries(GridProvider& gridProvider);
void porousMedia();
void definePMarea(std::shared_ptr<PorousMedia>& pm);
void readAndWriteFiles(uint timestep);
std::unique_ptr<KernelFactory> kernelFactory;
std::shared_ptr<PreProcessorFactory> preProcessorFactory;
......@@ -80,6 +87,13 @@ private:
SPtr<RestartObject> restart_object;
// Timer
std::unique_ptr<Timer> averageTimer;
uint previousTimestepForAveraging;
uint previousTimestepForTurbulenceIntensityCalculation;
uint timestepForMeasuringPoints;
//Forcing Calculation
std::shared_ptr<ForceCalculations> forceCalculator;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment