MAIA bb96820c
Multiphysics at AIA
Loading...
Searching...
No Matches
postprocessing.h
Go to the documentation of this file.
1// Copyright (C) 2024 The m-AIA AUTHORS
2//
3// This file is part of m-AIA (https://git.rwth-aachen.de/aia/m-AIA/m-AIA)
4//
5// SPDX-License-Identifier: LGPL-3.0-only
6
7#ifndef POSTPROCESSING_H_
8#define POSTPROCESSING_H_
9
10#include <array>
11#include <map>
12#include <set>
13#include <vector>
14
16#include "GRID/cartesiangrid.h"
18#include "globals.h"
19#include "postdata.h"
20#include "solver.h"
21
22// Forward declarations
23template <MInt nDim>
24class CartesianGrid;
25
26
33 MBool operator()(const MFloat& left, const MFloat& right) const {
34 return ((left < right) && (std::fabs(left - right) > 1000 * MFloatEps));
35 }
36};
37
44 MBool operator()(const std::pair<MFloat, MFloat>& left, const std::pair<MFloat, MFloat>& right) const {
45 if(left.first < right.first) {
46 return true;
47 } else if(approx(left.first, right.first, 100 * MFloatEps)) {
48 if(left.second < right.second) {
49 return true;
50 } else {
51 return false;
52 }
53 } else {
54 return false;
55 }
56 }
57};
58
59
61 public:
62 PostProcessingInterface(const MInt postprocessingId_) : m_postprocessingId(postprocessingId_){};
63 virtual ~PostProcessingInterface() = default;
64
67
68 // virtual void postprocessPreInit() = 0;
69 virtual void initPostProcessing() = 0;
70 virtual void postprocessPreSolve() = 0;
71 virtual void postprocessPostSolve() = 0;
72 virtual void postprocessInSolve(MBool finalTimeStep) = 0;
73 virtual void postprocessSolution() = 0;
74 // to access timer functions in PostProcessingController
75 virtual Solver* mSolver() const = 0;
76
79
80 protected:
82};
83
84template <MInt nDim, class ppType>
86 public:
88 using Cell = typename PPGrid::Cell;
91
92 // Constructor
93 PostProcessing(MInt postprocessingId_, PostData<nDim>* data) : PostProcessingInterface(postprocessingId_) {
94 m_postData = data;
95 }
96
98
99 // void postprocessPreInit() override;
100 void initPostProcessing() override;
101 void postprocessPreSolve() override;
102 void postprocessPostSolve() override;
103 void postprocessInSolve(MBool finalTimeStep) override;
104 void postprocessSolution() override;
105 // to access timer functions in PostProcessingController
106 Solver* mSolver() const override { return static_cast<Solver*>(&pp->solver()); };
107
108 Data& postData() const { return *m_postData; }
109
110 protected:
111 MBool isActive() const { return pp->solver().grid().isActive(); };
112
114
124
127
129 virtual void probeLinePeriodic() { TERMM(1, "Not implemented for this solverType"); };
130 virtual void probeLinePeriodicPost();
131
132 virtual void initSprayData();
133 virtual void computeSprayData() { TERMM(1, "Not implemented for this solverType"); };
134 virtual void writeSprayData() { TERMM(1, "Not implemented for this solverType"); };
135
136 // implemented in PostProcessingLpt
137 virtual void initLPTSolutionFile() { TERMM(1, "Not implemented for this solverType"); };
138 virtual void writeLPTSolutionFile() { TERMM(1, "Not implemented for this solverType"); };
139 virtual void initParticleStatistics() { TERMM(1, "Not implemented for this solverType"); };
140 virtual void computeParticleStatistics() { TERMM(1, "Not implemented for this solverType"); };
141
142 // implemented in PostProcessingLbLpt
143 virtual void initPLIsoTurbulenceStatistics() { TERMM(1, "Not implemented for this solverType"); };
144 virtual void computePLIsoTurbulenceStatistics() { TERMM(1, "Not implemented for this solverType"); };
145
146 // allocates memory for average pre/in/post
147 virtual void initAverageVariables();
148
150 void averageSolutions();
152 template <MBool inSolution = false>
159
160 // implemented in PostProcessingLb
161 virtual void initPointSamplingData() { TERMM(1, "Not implemented for this solverType"); };
162 virtual void savePointSamplingData() { TERMM(1, "Not implemented for this solverType"); };
163 virtual void initSurfaceSamplingData() { TERMM(1, "Not implemented for this solverType"); };
164 virtual void saveSurfaceSamplingData() { TERMM(1, "Not implemented for this solverType"); };
165 virtual void initVolumeSamplingData() { TERMM(1, "Not implemented for this solverType"); };
166 virtual void saveVolumeSamplingData() { TERMM(1, "Not implemented for this solverType"); };
167 virtual void initIsoTurbulenceStatistics() { TERMM(1, "Not implemented for this solverType"); };
168 virtual void computeIsoTurbulenceStatistics() { TERMM(1, "Not implemented for this solverType"); };
169
172
175 void createCellToMap1D(std::map<MFloat, MInt, coord_comp_1d_>& coordinates,
176 std::map<MFloat, MFloat, coord_comp_1d_>& cell_to_map);
177 void createCellToMap2D(std::map<std::pair<MFloat, MFloat>, MInt, coord_comp_2d_>& coordinates,
178 std::map<std::pair<MFloat, MFloat>, std::pair<MFloat, MFloat>, coord_comp_2d_>& cell_to_map);
179
180 void probeLine();
187
189 void findContainingCell(const MFloat* coord, MInt& cellId);
194
195 virtual void initMovingAverage();
198
199 void initCorrelation();
202
204 void movePointsToGrid(MFloat* in_points, MInt in_noPoints, MInt in_moveType);
205
206 void getSampleVariables(MInt cellId, const MFloat*& vars, MBool mode);
207 void getSampleVariables(MInt const cellId, std::vector<MFloat>& vars);
208 void calcSamplingVar(const MInt cellId, const MInt sampleVarId, MFloat* const vars);
209
210 void saveSliceAiaFileFormat(const MInt step, const MInt noVars, MFloatScratchSpace& vars, const MInt sliceId);
211
212 // TODO labels:POST This is a very inefficient way of doing. Here, the derivative of ALL vars in ALL directions are
213 // calculated. Only trace of velocity gradient is needed !
214 MFloat calcDivergence(const MInt cellIdSolver) {
215 const MInt noVariables = pp->solver().noVariables();
216 std::vector<MFloat> cellVarsDeriv(noVariables * nDim);
217 MFloat divergence = 0.0;
218 if(pp->getSampleVarsDerivatives(cellIdSolver, cellVarsDeriv)) {
219 const MFloatTensor deriv(cellVarsDeriv.data(), noVariables, nDim);
220 for(MInt d = 0; d < nDim; d++) {
221 divergence += deriv(d, d);
222 }
223 }
224 return divergence;
225 }
226
227 virtual void calcVorticity(const MFloatTensor& deriv, MFloat vorticity[nDim * 2 - 3]) {
228 if constexpr(nDim == 2) {
229 vorticity[0] = deriv(1, 0) - deriv(0, 1);
230 } else { //(nDim ==3)
231 vorticity[0] = deriv(2, 1) - deriv(1, 2);
232 vorticity[1] = deriv(0, 2) - deriv(2, 0);
233 vorticity[2] = deriv(1, 0) - deriv(0, 1);
234 }
235 }
236 // not implemented for LB
237 virtual void getVorticity(MFloat* const vorticity) {
238 std::ignore = vorticity;
239 TERMM(1, "Not implemented for this solverType");
240 };
241 virtual void getVorticityT(MFloat* const vorticity) {
242 std::ignore = vorticity;
243 TERMM(1, "Not implemented for this solverType");
244 };
245 virtual void getPrimitiveVariables(MInt, MFloat*, MFloat*, MInt) { TERMM(1, "Not implemented for this solverType"); };
246
247 virtual void
249 TERMM(1, "Not implemented for this solverType");
250 }
251
252 void getSampleVarsDerivatives(const MInt cellId, const MFloat*& vars) {
253 std::ignore = cellId;
254 vars = nullptr;
255 // TERMM(1, "Not implemented for this solverType");
256 };
257 MBool getSampleVarsDerivatives(const MInt /*cellId*/, std::vector<MFloat>& /*vars*/) {
258 return false; // = not implemented for this solver
259 // TERMM(1, "Not implemented for this solverType");
260 };
261 virtual MFloat& vorticityAtCell(const MInt cellId, const MInt dir) {
262 std::ignore = cellId;
263 std::ignore = dir;
264 TERMM(1, "Not implemented for this solverType");
265 };
266 virtual MFloat getBoundaryHeatFlux(const MInt cellId) const {
267 std::ignore = cellId;
268 TERMM(1, "Not implemented for this solver");
269 };
270 virtual void getPrimitiveVarNames(MString* names) const {
271 std::ignore = names;
272 TERMM(1, "Not implemented for this solverType");
273 };
274
277
278 // this vector holds all the functions to be called
279 // it is initialized with three entries (each position of postprocessing)
280 typedef void (PostProcessing::*tpost)();
281 typedef std::vector<tpost> tvecpost;
283 std::vector<tvecpost> m_postprocessingMethods;
284 std::vector<std::vector<MString>> m_postprocessingMethodsDesc;
285
286 // Relevant for CAA simulations
287 void neededMeanVarsForSourceTerm(const MInt sourceTerm, std::vector<MInt>& meanVars) const;
288
289 public:
294
295 private:
296 // Status of postprocessPreInit()
297 /* MBool m_isPreInitialized = false; */
298
300 ppType* pp = static_cast<ppType*>(this);
301
302 // PP_ToDo-GridProxy:change this to proxy of postData and check that it is still working
303 // -> create new testcases
305
306 protected:
307 // Pointer to PostData class
308 Data* m_postData = nullptr;
309
311 if(m_postData == nullptr ||
312 // necessary for postprocessing without postdata
313 postData().m_solverId == pp->solver().m_solverId) {
314 return false;
315 } else {
316 return postData().isMeanFile();
317 }
318 }
319
320 // Number of variables of the corresponding solver
322
323 // Averaging variables
324 // MFloat** m_summedVars = nullptr;
325 // MFloat** m_square = nullptr;
326 // MFloat** m_cube = nullptr;
327 // MFloat** m_fourth = nullptr;
332 // not used in any testcase
334
335 // Kahan summation
336 // not used in any testcase
338 // MFloat** m_cSum = nullptr;
339 // MFloat** m_ySum = nullptr;
340 // MFloat** m_tSum = nullptr;
341 // MFloat** m_cSquare = nullptr;
342 // MFloat** m_ySquare = nullptr;
343 // MFloat** m_tSquare = nullptr;
344 // MFloat** m_cCube = nullptr;
345 // MFloat** m_yCube = nullptr;
346 // MFloat** m_tCube = nullptr;
347 // MFloat** m_cFourth = nullptr;
348 // MFloat** m_yFourth = nullptr;
349 // MFloat** m_tFourth = nullptr;
350
352
353 // spanwise average
354 std::vector<MInt>* m_cell2globalIndex = nullptr;
358 // MFloat* m_globalPosX = nullptr;
359 // MFloat* m_globalPosY = nullptr;
360 // MInt* m_globalCountZ = nullptr;
361 std::multimap<MFloat, MFloat> m_sliceGlobalPositions;
362
366
367 // moving average
376
377 // spatial averaging
387
388 std::map<MFloat, MInt, coord_comp_1d_> m_spatialLineCoordinates;
389 std::map<MFloat, MFloat, coord_comp_1d_> m_spatialLineCellToMap;
390
391 std::map<MFloat, MInt, coord_comp_1d_> m_spatialGlobalLineCoordinates;
392 std::map<MFloat, MFloat, coord_comp_1d_> m_spatialGlobalLineCellToMap;
393
397
398 std::map<std::pair<MFloat, MFloat>, MInt, coord_comp_2d_> m_spatialPlaneCoordinates;
399 std::map<std::pair<MFloat, MFloat>, std::pair<MFloat, MFloat>, coord_comp_2d_> m_spatialPlaneCellToMap;
400
401 std::map<std::pair<MFloat, MFloat>, MInt, coord_comp_2d_> m_spatialGlobalPlaneCoordinates;
402 std::map<std::pair<MFloat, MFloat>, std::pair<MFloat, MFloat>, coord_comp_2d_> m_spatialGlobalPlaneCellToMap;
403
407
408 // line probing
413 MInt** m_probeLineIds = nullptr;
419 // line time step properties
423
424 // line probe correlation
442
443 // line probe averaging
449 // MFloat*** m_globalProbeLineAverageRMS = nullptr;
454
455 // slice probing
476 // slice time step properties
480
482 std::vector<MInt> m_sliceVarIds{};
484 std::vector<MInt> m_noSliceVars{};
486 std::vector<std::vector<MString>> m_sliceVarNames{};
487
489 MInt* m_minLvlIds = nullptr;
490
491 // arbitrary probing
494
495 // arbitrary line probing
501 MInt* m_arbLineFull = nullptr;
504 MInt** m_arbLineIds = nullptr;
507
508 // arbitrary slice probing
514 MInt** m_arbSliceIds = nullptr;
517
518 // loading file for averaging
520
521 // genereal purpose
522 // PP_ToDo-LB:delete this
523 MFloat** m_localVars = nullptr;
524
525 // averaging
530
535
536 // Reynolds stresses
538
539 // probing
543 std::ofstream* m_probeFileStreams = nullptr;
547
548 // Point data
553 std::vector<MFloat> m_pdPoints;
554 std::vector<MInt> m_pdCells;
555 std::vector<MFloat> m_pdVars;
557
558 // spray data
563
564 MFloat** m_particleCV = nullptr;
566 MFloat** m_sprayStat = nullptr;
567 MFloat** m_sprayTimes = nullptr;
569
570 MFloat** m_vapourCV = nullptr;
571 MFloat** m_vapourPen = nullptr;
572
573 // LPT solution file
576
578
579 // Relevant for CAA simulations
580 // List of active source terms
581 std::vector<MInt> m_activeSourceTerms{};
582 // Hold indices for source terms
583 struct ST {
584 static constexpr const MInt Q_mI = 0;
585 static constexpr const MInt Q_mI_linear = 1;
586 static constexpr const MInt Q_mII = 2;
587 static constexpr const MInt Q_mIII = 3;
588 static constexpr const MInt Q_mIV = 4;
589 static constexpr const MInt Q_c = 5;
590 static constexpr const MInt Q_e = 6;
591
592 static constexpr const MInt totalNoSourceTerms = 7;
593 };
594
595 // Source term names corresponding to ST
596 std::array<MString, ST::totalNoSourceTerms> s_sourceTermNames = {
597 {"q_mI", "q_mI_linear", "q_mII", "q_mIII", "q_mIV", "q_c", "q_e"}};
598
599 // List of active mean variables for all active source terms
600 std::set<MInt> m_activeMeanVars{};
601 // Hold indices for mean variables
602 struct MV {
603 // Mean Lamb vector
604 static constexpr const MInt LAMB0 = 0;
605
606 // Mean vorticity
607 static constexpr const MInt VORT0 = 1;
608
609 // du/dx, du/dy, dw/dz for the divergence
610 static constexpr const MInt DU = 2;
611
612 // Mean gradient of rho
613 static constexpr const MInt DRHO = 3;
614
615 // Mean gradient of p
616 static constexpr const MInt DP = 4;
617
618 // Mean gradient of rho*div(u)
619 static constexpr const MInt RHODIVU = 5;
620
621 // Mean gradient of u*grad(rho)
622 static constexpr const MInt UGRADRHO = 6;
623
624 // Mean of (gradient of p divided by rho)
625 static constexpr const MInt GRADPRHO = 7;
626
627 // Mean gradients of velocity components (contains MV::DU)
628 static constexpr const MInt GRADU = 8;
629
630 // Sum of products of velocity and velocity gradients:
631 // u * grad(u) + v * grad(v) + w * grad(w)
632 static constexpr const MInt UGRADU = 9;
633 };
634};
635
636
637#endif // POSTPROCESSING_H_
typename Tree::Cell Cell
Definition: cartesiangrid.h:80
Definition: postdata.h:23
MBool isMeanFile() const
Definition: postdata.h:177
virtual void saveVolumeSamplingData()
MBool isActive() const
Solver * mSolver() const override
virtual void averageSolutionsInSolve()
std::vector< MInt > m_noSliceVars
Number of variables for each slice variable.
virtual void getVorticityT(MFloat *const vorticity)
void initTimeStepProperties()
Initializes timestep properties for postprocessing.
MBool m_computeAndSaveMean
MInt * m_noCorrelationIds
MFloat ** m_localVars
std::map< MFloat, MFloat, coord_comp_1d_ > m_spatialGlobalLineCellToMap
MInt * m_arbLineOffsets
virtual void initSurfaceSamplingData()
virtual void computePLIsoTurbulenceStatistics()
void probeSlicePost()
MInt * m_globalNoProbeLineIds
MInt * m_correlationVariableIndex
std::ofstream * m_probeFileStreams
MInt m_spatialLineNoCells
std::vector< std::vector< MString > > m_postprocessingMethodsDesc
MInt * m_probeLineDirection
std::vector< MInt > m_activeSourceTerms
std::map< std::pair< MFloat, MFloat >, MInt, coord_comp_2d_ > m_spatialGlobalPlaneCoordinates
MInt m_noArbLines
virtual void getPrimitiveVariables(MInt, MFloat *, MFloat *, MInt)
MBool m_averageSpeedOfSound
void createCellToMap1D(std::map< MFloat, MInt, coord_comp_1d_ > &coordinates, std::map< MFloat, MFloat, coord_comp_1d_ > &cell_to_map)
void averageSolutions()
Averages solutions.
std::set< MInt > m_activeMeanVars
MBool m_square
virtual void initSprayData()
virtual void initParticleStatistics()
MInt * m_globalNoArbSlicePoints
MInt ** m_noGlobalProbeLineIds
MInt m_noSpeedOfSoundVars
MFloat ** m_globalCorrelationPositions
MBool m_skewness
MString m_pdFileName
void probeSlice()
void getSampleVariables(MInt const cellId, std::vector< MFloat > &vars)
void initProbeLine()
Initializes properties and memory for line probing.
MInt m_probeLineInterval
MString m_ReStressesAverageFileName
MInt ** m_probeLineAverageCoordinatesSign
void probeArbitrarySlicePost()
void transferSensorWeights()
MInt * m_arbLineFull
MFloat m_gamma
MFloat ** m_sprayStat
MInt m_probeSliceStartTimestep
MInt * m_spatialRecvcnts
MInt m_averageStopTimestep
MInt * m_probeLineOffsets
MInt m_movePointsToGrid
MInt * m_noProbeSliceMaxNoHilbertIds
std::vector< tpost > tvecpost
void initProbeSlice()
Initializes properties and memory for slice probing.
MInt m_pdStopTimestep
MInt m_probeSliceInterval
MFloat ** m_globalCorrelationExchangeVar
MInt * m_probeSliceDir
void probeLinePre()
void probeLine()
MFloat ** m_sliceAverage
MInt ** m_noProbeLineAverageIds
std::map< std::pair< MFloat, MFloat >, std::pair< MFloat, MFloat >, coord_comp_2d_ > m_spatialPlaneCellToMap
MBool m_needVorticity
virtual void initMovingAverage()
Initializes properties and allocates memory for moving averaging.
MFloat * m_probeSliceCoordinate
void pp_saveCoarseSolution()
MString m_solverType
MInt ** m_globalNoProbeLineAverageIds
void initProbeArbitraryLine()
initializes properties and data for arbitrary line probing
virtual void getPrimitiveVarNames(MString *names) const
MString * m_probeSliceGridNames
MInt m_noVariables
MInt m_probeLineStartTimestep
void movePointsToGrid(MFloat *in_points, MInt in_noPoints, MInt in_moveType)
std::map< std::pair< MFloat, MFloat >, MInt, coord_comp_2d_ > m_spatialPlaneCoordinates
MInt ** m_noProbeSliceHilbertInfo
void initProbeLinePeriodic()
MString * m_sliceAxis
void initProbeArbitrarySlice()
initializes properties and data for arbitrary slice probing
MBool m_statisticCombustionAnalysis
MInt ** m_probeLineIds
MInt m_probeSliceStopTimestep
MBool m_averageVorticity
Data & postData() const
void initProbePoint()
Initializes properties for point probing.
MInt * m_arbSliceOffsets
void createCellToMap2D(std::map< std::pair< MFloat, MFloat >, MInt, coord_comp_2d_ > &coordinates, std::map< std::pair< MFloat, MFloat >, std::pair< MFloat, MFloat >, coord_comp_2d_ > &cell_to_map)
MInt ** m_noGlobalProbeSliceIds
virtual void initAverageVariables()
allocates memory for averageSolutions() and averageSolutionsInSolve()
MInt * m_moveLinePointsToGrid
MInt m_probeLineStopTimestep
void computeAndSaveDivergence()
std::vector< MFloat > m_pdPoints
MFloat *** m_globalProbeLineAverageVars
void averageSolutionsSlice()
virtual MFloat & vorticityAtCell(const MInt cellId, const MInt dir)
virtual void computeAcousticSourceTermQe(MFloatScratchSpace &, MFloatScratchSpace &, MFloatScratchSpace &, MFloatScratchSpace &)
MFloat *** m_probeLineAveragePositions
MFloat ** m_correlationExchangeVarRMS
MBool m_correlation
MInt * m_noProbeSliceNoHilbertIds
MFloat ** m_globalCorrelationExchangeVarMean
void probeArbitrarySlice()
void initCorrelation()
std::vector< std::vector< MString > > m_sliceVarNames
List of variable names for each slice variable.
void initSpatialAveraging()
MInt ** m_arbSliceIds
virtual void saveSurfaceSamplingData()
virtual void getVorticity(MFloat *const vorticity)
virtual void writeSprayData()
virtual void writeLPTSolutionFile()
MInt * m_probeLineAverageDirection
void probeArbitraryLinePost()
MFloat m_spatialLvlWeight[20]
MFloat ** m_particlePen
MFloat * m_arbSlicePoints
Data * m_postData
MInt m_averageStartTimestep
typename maia::grid::Proxy< nDim > GridProxy
MBool isMeanFile()
MFloat ** m_particleCV
MInt * m_noArbSlicePoints
MInt m_noLocalVars
void postprocessInSolve(MBool finalTimeStep) override
virtual void initPointSamplingData()
MFloat ** m_correlationCoordinates
std::map< MFloat, MInt, coord_comp_1d_ > m_spatialGlobalLineCoordinates
MString * m_movAvgVarNames
virtual void probeLinePeriodicPost()
MInt * m_noProbeSliceIds
std::map< std::pair< MFloat, MFloat >, std::pair< MFloat, MFloat >, coord_comp_2d_ > m_spatialGlobalPlaneCellToMap
std::vector< MInt > m_sliceVarIds
List of slice variables.
MInt m_movAvgNoVariables
MInt * m_noArbLineIds
MInt m_movingAverageStartTimestep
MFloat ** m_correlationPositions
MInt * m_probeSliceOffsets
MBool m_forceOutput
PostProcessing(MInt postprocessingId_, PostData< nDim > *data)
void initAverageSolutionsSlice()
Initializes properties for slice averaging.
MInt * m_minLvlIds
virtual void calcVorticity(const MFloatTensor &deriv, MFloat vorticity[nDim *2 - 3])
void spatialAveragingPost()
void initWritePointData()
MInt m_noProbeLines
void postprocessPostSolve() override
virtual void initLPTSolutionFile()
MInt * m_globalNoArbLineIds
MFloat * m_sliceIntercept
void postprocessSolution() override
MInt * m_globalNoProbeSliceIds
MFloat ** m_probeLinePositions
MBool getSampleVarsDerivatives(const MInt, std::vector< MFloat > &)
GridProxy * m_gridProxy
void initPostProcessing() override
Reads all required properties in and prepares for postprocessing.
MInt * m_arbLineHasNewDistribution
virtual void initAveragingProperties()
Initialize properties relevant for temporal averaging.
std::vector< MInt > m_pdCells
void computeAndSaveMean()
MInt m_spatialDirection2
void getSampleVarsDerivatives(const MInt cellId, const MFloat *&vars)
MInt m_movingAverageDataPoints
MInt ** m_globalCorrelationIds
void calcSamplingVar(const MInt cellId, const MInt sampleVarId, MFloat *const vars)
MFloat ** m_correlationExchangeVar
MInt * m_spatialVarsRecvcnts
MInt ** m_correlationIds
void initTimeStepPropertiesSlice()
MInt m_movingAverageInterval
MInt m_noProbePoints
MInt m_pdNoPoints
MFloat ** m_movAvgVariables
MInt m_sprayDataStep
MBool m_optimizedSliceIo
MInt m_noCorrelationLines
MInt m_spatialCoordSum
MFloat m_spatialWeightSinglePoint
MInt m_sprayWriteInterval
MFloat ** m_probeSlicePositions
MInt m_probeInterval
std::vector< MInt > * m_cell2globalIndex
MInt * m_probeCellIds
MInt m_movingAverageCounter
void neededMeanVarsForSourceTerm(const MInt sourceTerm, std::vector< MInt > &meanVars) const
MInt * m_correlationDirection
MBool m_kurtosis
void movingAverage()
MInt m_noProbeLineAverageSteps
std::vector< tvecpost > m_postprocessingMethods
MInt m_pdStartTimestep
void findClosestProbePointsGridCells()
void collectMinLvlCells()
MFloat * m_arbSlicePointsDistribution
MFloat * m_spatialLineAllVars
MInt * m_noProbeLineIds
MInt *** m_probeLineAverageIds
MInt m_globalnoSlicePositions
virtual void initIsoTurbulenceStatistics()
MInt findNearestGridCell(const MFloat *coord)
void spatialAveraging()
MInt m_sprayComputeInterval
void probeLinePost()
MInt * m_probeLinePeriodic
MInt m_averageInterval
void findContainingCell(const MFloat *coord, MInt &cellId)
MBool m_useKahan
virtual void computeSprayData()
MInt m_restartTimeStep
void postprocessPreSolve() override
MInt ** m_correlationIndexMapping
std::multimap< MFloat, MFloat > m_sliceGlobalPositions
std::array< MString, ST::totalNoSourceTerms > s_sourceTermNames
MFloat * m_spatialPlaneAllCoord
MFloat ** m_sprayTimes
MBool m_twoPass
virtual void initPLIsoTurbulenceStatistics()
virtual void computeIsoTurbulenceStatistics()
MFloat ** m_arbLineCoordinates
MFloat * m_arbLinePointsDistribution
MInt * m_spatialDispls
MInt m_noProbeSlices
MBool m_averageRestart
tvecpost m_postprocessingSolution
MFloat * m_spatialPlaneAllVars
MString * m_postprocessingOps
MInt ** m_probeSliceIds
MString m_postprocessFileName
std::map< MFloat, MInt, coord_comp_1d_ > m_spatialLineCoordinates
MFloat calcDivergence(const MInt cellIdSolver)
MFloat * m_spatialLineAllCoord
typename PPGrid::Cell Cell
MInt m_noAveragedVorticities
void probeArbitraryLine()
virtual MFloat getBoundaryHeatFlux(const MInt cellId) const
MInt m_noMinLvlIds
MInt m_movingAverageStopTimestep
MInt ** m_arbLineIds
MBool m_acousticAnalysis
std::map< MFloat, MFloat, coord_comp_1d_ > m_spatialLineCellToMap
MFloat * m_arbLinePoints
~PostProcessing()
Destructor for the massive paralle postprocessing solver.
virtual void probeLinePeriodic()
MInt m_spatialPlaneNoCells
virtual void computeParticleStatistics()
MFloat ** m_globalCorrelationExchangeVarRMS
MInt * m_noProbeSliceMaxNoContHilbertIds
MFloat ** m_injectionData
MString m_probePath
MInt m_LPTSolutionInterval
MInt m_noSourceVars
MBool m_sliceAiaFileFormat
MInt * m_spatialVarsDispls
MFloat ** m_correlationExchangeVarMean
MInt * m_noPeriodicSliceCells
MFloat ** m_probeCoordinates
MFloat ** m_probeLineCoordinates
MInt * m_noProbeSliceNoContHilbertIds
void probeSlicePre()
virtual void savePointSamplingData()
MFloat ** m_arbSliceCoordinates
void initPeriodicSliceAverage()
Initializes the periodic averaging on a slice.
MInt m_spatialDirection1
std::vector< MFloat > m_pdVars
MInt m_pdRestartInterval
void probeSliceIn()
void getSampleVariables(MInt cellId, const MFloat *&vars, MBool mode)
MInt ** m_noProbeSliceContHilbertInfo
MFloat ** m_probeLineAverageCoordinates
void probeLocation()
MInt m_sprayDataSize
MInt * m_globalNoCorrelationIds
void initReduceToLevelAvg()
Initializes properties for grid level reduction.
MInt m_noArbSlices
ppType * pp
CRTP.
void movingAveragePost()
MFloat ** m_vapourCV
void(PostProcessing::* tpost)()
virtual void initVolumeSamplingData()
MBool m_spatialAveraging
void initTimeStepPropertiesLine()
MInt m_probeWriteInterval
void writePointData()
void periodicSliceAverage()
MInt m_noPostprocessingOps
void saveSliceAiaFileFormat(const MInt step, const MInt noVars, MFloatScratchSpace &vars, const MInt sliceId)
MFloat ** m_vapourPen
PostProcessingInterface(const MInt postprocessingId_)
virtual void initPostProcessing()=0
PostProcessingInterface & operator=(const PostProcessingInterface &)=delete
virtual void postprocessInSolve(MBool finalTimeStep)=0
MInt a_postprocessingId() const
virtual void postprocessPreSolve()=0
MBool m_finalTimeStep
PostProcessingInterface(const PostProcessingInterface &)=delete
MInt m_postprocessingId
virtual void postprocessSolution()=0
virtual ~PostProcessingInterface()=default
virtual void postprocessPostSolve()=0
virtual Solver * mSolver() const =0
This class is a ScratchSpace.
Definition: scratch.h:758
Parent class of all solvers This class is the base for all solvers. I.e. all solver class (e....
Definition: solver.h:29
MBool approx(const T &, const U &, const T)
Definition: functions.h:272
int32_t MInt
Definition: maiatypes.h:62
std::basic_string< char > MString
Definition: maiatypes.h:55
double MFloat
Definition: maiatypes.h:52
bool MBool
Definition: maiatypes.h:58
static constexpr const MInt UGRADU
static constexpr const MInt DP
static constexpr const MInt GRADU
static constexpr const MInt UGRADRHO
static constexpr const MInt RHODIVU
static constexpr const MInt GRADPRHO
static constexpr const MInt DRHO
static constexpr const MInt DU
static constexpr const MInt LAMB0
static constexpr const MInt VORT0
static constexpr const MInt totalNoSourceTerms
static constexpr const MInt Q_mIV
static constexpr const MInt Q_e
static constexpr const MInt Q_mI
static constexpr const MInt Q_mI_linear
static constexpr const MInt Q_mIII
static constexpr const MInt Q_mII
static constexpr const MInt Q_c
compare struct for 1D coordinates
MBool operator()(const MFloat &left, const MFloat &right) const
compare struct for 2D coordinates
MBool operator()(const std::pair< MFloat, MFloat > &left, const std::pair< MFloat, MFloat > &right) const