110 m_log <<
"WARNING: Empty body of AcaSolver::time() called" << std::endl;
170 std::array<MFloat, nDim> coord;
171 for(
MInt dir = 0; dir < nDim; dir++) {
180 if(globalObserverId < remainderObs * (minNoObsPerDomain + 1)) {
181 return globalObserverId / (minNoObsPerDomain + 1);
183 return (globalObserverId - remainderObs) / minNoObsPerDomain;
204 m_log << msg << std::endl;
205 if(
domainId() == 0) std::cout << msg << std::endl;
231 const MBool inPlace);
272 std::vector<std::unique_ptr<AcaPostProcessing>>
m_post;
456 static constexpr const MInt W = nDim - 1;
458 static constexpr const MInt P = nDim + 1;
461 static constexpr const MInt FX = nDim + 2;
462 static constexpr const MInt FY = nDim + 3;
463 static constexpr const MInt FZ = 2 * nDim + 1;
464 static constexpr const MInt Q = 2 * nDim + 2;
481 static constexpr const MInt W = nDim - 1;
483 static constexpr const MInt P = nDim + 1;
508 static constexpr const MInt WP = nDim - 1;
511 static constexpr const MInt FX = nDim + 1;
512 static constexpr const MInt FY = nDim + 2;
513 static constexpr const MInt FZ = 2 * nDim;
514 static constexpr const MInt Q = 2 * nDim + 1;
Acoustic extrapolation of near/near-far field data to the true far-field using an integral method (cu...
std::array< MInt, Timers::_count > m_timers
MInt getObserverDomainId(const MInt globalObserverId)
Get domain id of (global) observer.
virtual void saveSolverSolution(const MBool, const MBool)
void transformCoordinatesToFlowDirection3D(MFloat *const fX, MFloat *const fY, MFloat *const fZ)
MInt m_noPostprocessingOps
Post Processing of observer signals.
MBool m_generateObservers
Enable observer point generation (instead of reading from file)
void readNoSegmentsAndSamples(const MInt surfaceId, MInt &noSegments, MInt &noSamples, MString &inputFileName)
Read the number of segments and samples for the given surface id.
void generateSurfaceData()
Generation of analytical input data.
MInt m_sampleStride
Stride of used samples in input data files.
MFloat a_globalObserverCoordinate(const MInt globalObserverId, const MInt dir)
Accessor for global observer coordinates.
MInt m_noComplexVariables
void loadObserverSignals()
Load the observer signals from a file for further postprocessing.
void applySymmetryBc(const std::array< MFloat, nDim > coord, MFloat *const p_complexVariables)
Symmetry boundary condition.
MFloat m_cInfty
Non-dimensionalization variables.
void initConversionFactors()
Initialize the conversion factors required to convert between.
MInt noSamples()
Return number of samples (i.e. number of time steps)
void interpolateFromSourceToObserverTime(const MFloat distMinObservers, MFloat *const p_perturbedFWH)
Interpolate the observer pressure signal from source time to observer time using the advanced time ap...
std::vector< MInt > m_postprocessingOps
void storeSurfaceData(const MInt surfaceId)
Store the surface data. Note: used for validating the data input and for the output of generated data...
maia::acoustic::SourceParameters m_sourceParameters
Parameter vector.
std::vector< MInt > m_noSurfaceElements
Number of (local) surface elements for each surface.
static constexpr MFloat m_gamma
MFloat m_lambdaZero
Wave length lambda.
MBool m_generateSurfaceData
Enable generation of analytical surface data.
void calcObsPressureAnalytic()
MInt a_globalObserverId(const MInt localObserverId)
Return global observer id.
void genQuadrupoleAnalytic2D(const MFloat *coord, const SourceParameters ¶m, SourceVars &vars)
Quadrupole.
std::vector< MFloat > m_times
Storage for times and frequencies.
MInt m_offsetObserver
Collector for (local) observer data.
void combineSurfaceIntegralsInTime(const MInt globalObserverId, MFloat *const p_perturbedFWH)
Combine the FWH surface integrals of the time domain method of all ranks.
void genDipoleAnalytic2D(const MFloat *coord, const SourceParameters ¶m, SourceVars &vars)
Dipole.
MInt m_noGlobalObservers
Number of samples.
MBool m_allowMultipleSurfacesPerRank
Allow multiple surfaces per rank.
MFloat time() const override
Return the time.
std::array< MFloat, nDim > getGlobalObserverCoordinates(const MInt globalObserverId)
Accessor for global observer coordinates.
void checkNoSamplesPotencyOfTwo()
void changeDimensionsObserverData()
ObserverDataCollector m_observerData
Coordinates of (global) observer points.
void calcSurfaceIntegralsAtSourceTime(const MInt globalObserverId)
Calculate the FWH surface integrals for a certain observer using the time-domain formulation.
MInt totalNoSurfaceElements()
Return total number of (local) surfaces elements.
MInt m_sampleOffset
Offset in input data files from which to start reading samples.
MInt m_acousticMethod
Acoustic extrapolation method to use, see enum ExtrapolationMethods in enums.h.
std::vector< MFloat > m_surfaceWeightingFactor
Weighting factor for each surface (for surface averaging)
MInt m_transformationType
Fourier type.
MFloat calcTimeDerivative(const MInt segmentId, const MInt varId, const MInt tau)
std::vector< MString > m_surfaceInputFileName
Surface input file names that were used for sampling.
MInt noSurfaces()
Return number of surfaces.
std::vector< AcaSymBc > m_symBc
void transformBackToOriginalCoordinate2D(MFloat *const fX, MFloat *const fY)
MInt a_localObserverId(const MInt globalObserverId)
Return local observer id.
MBool isActive() const override
MBool m_useMergedInputFile
void genQuadrupoleAnalytic3D(const MFloat *coord, const SourceParameters ¶m, SourceVars &vars)
3D quadrupole analytic
void setNumericalProperties()
Read/set all numerical properties.
void generateSurfaceCircle(const MInt sId)
Generate a circular surface in 2D.
void distributeObservers()
Distribute observers on all ranks.
MInt m_noSurfaces
Number of surfaces.
MInt noObservers()
Return local number of observer points.
void calcSourceTermsFwhTime(const MInt segmentId)
Calculate FWH source terms for the time domain FWH formulation Reference: [1] Brentner,...
void genDipoleAnalytic3D(const MFloat *coord, const SourceParameters ¶m, SourceVars &vars)
3D dipole analytic
void postprocessObserverSignals()
Postprocessing of observer signals.
MInt noVariables() const override
Return the number of variables.
std::vector< MInt > m_surfaceIds
Ids of the surface input file.
void calcFrequencies()
Calculate the frequencies.
void genMonopoleAnalytic3D(const MFloat *coord, const SourceParameters ¶m, SourceVars &vars)
3D analytic monopole generation
void calcSurfaceIntegralsForObserver(const std::array< MFloat, nDim > coord, MFloat *const p_complexVariables)
Calculate the FWH surface integrals for a certain observer location.
MBool solutionStep() override
Main compute method to perform acoustic far-field prediction.
MInt m_inputFileIndexStart
std::vector< MInt > m_surfaceElementOffsets
Local surface element offsets for each surface.
void calculateObserverInFrequency()
Calculate the observer signals in frequency domain.
MBool m_FastFourier
Can FFT be used?
std::array< MFloat, nDim *nDim > m_transformationMatrix
Number of local observer.
std::map< MString, MInt > m_inputVars
Set of input variables.
void windowAndTransformSources()
Apply window function to source terms and transform into frequency domain.
struct AcaSolver::ConversionFactors m_input2Aca
void generateSurfacePlane(const MInt sId)
Generate a surface plane (Cartesian).
void DiscreteFourierTransform(MFloat *dataArray, const MInt size, const MInt dir, MFloat *result, const MBool inPlace)
Discrete Fourier transform (computational expensive O(n^2) instead of O(n*logn) compared to FFT)
void generateSurfaces()
Generation of surfaces.
MFloat m_MaDim
Mach number used for change of nondimensionalization.
void saveObserverSignals()
Save the observer signals. Save observer data: 1. pressure data in time domain and 2....
std::vector< MFloat > m_frequencies
void calcSourceTerms()
Main compute functions.
void genMonopoleAnalytic2D(const MFloat *coord, const SourceParameters ¶m, SourceVars &vars)
Monopole.
MInt localSurfaceOffset(const MInt sId)
Return local offset of a surface in m_surfaceData.
MInt noInternalCells() const override
Return the number of internal cells within this solver.
void changeDimensionsSurfaceData()
Change of the non-dimensionalization of input data from the stagnation state (0) non-dim....
void calcMinDistanceForObservers(MFloat *const distMinObservers)
Find the minimum distance from the surface elements to the observers.
MFloat m_MaVec[3]
Mach vector.
MInt m_windowType
Window type.
MInt m_noObservers
Offset of local observer.
void finalizeInitSolver() override
void printMessage(const MString msg)
Info functions.
void readSurfaceData()
Read the surface data (or generate for an analytical case)
MFloat m_dt
Constant time step size.
MInt m_totalNoSamples
Total number of samples in input data files.
void readSurfaceDataFromFile(const MInt surfaceId)
Read the data for one surface.
MInt readNoSegmentsSurfaceGeneration(const MInt sId, std::vector< MInt > &noSegments, const MInt lengthCheck=-1)
Determine the number of segments to be generated for a surface, returns the total number of segments ...
void initTimers()
Initialize solver timers.
void initParallelization()
Initialize parallelization (distribution of surface segments on all domains)
MString m_observerFileName
File containing observer points.
MInt globalNoObservers()
Return number of observer points.
SurfaceDataCollector m_surfaceData
Collector for surface data.
void initSolver() override
Initialize solver.
void averageTimer()
Average all FWH timer over participating ranks.
MFloat m_windowNormFactor
Normalization factor of window.
void initObserverPoints()
Initialize observer points.
std::vector< MFloat > m_rmsP_Analytic
Analytic rms pressure for accuracy function.
void genVortexConvectionAnalytic2D(const MFloat *obsCoord, const SourceParameters &m_sourceParameters, SourceVars &sourceVars)
Inviscid vortex convection.
std::vector< MInt > m_noDomainsSurface
Surface local number of domains.
MInt m_acaResultsNondimMode
MBool m_acaPostprocessingMode
void backtransformObservers()
Backtransform the observer frequency signals into the time domain.
MString m_outputFilePrefix
Input directory.
maia::acoustic::SourceParameters SourceParameters
std::vector< MInt > m_noSurfaceElementsGlobal
Total number of surface elements for each surface.
std::vector< MFloat > m_globalObserverCoordinates
MBool m_storeSurfaceData
Prefix for all output files.
void windowAndTransformObservers()
Apply window function to the observer time series data and transform it into frequency domain.
struct AcaSolver::ConversionFactors m_aca2Output
MInt m_noSamples
Number of samples.
void transformCoordinatesToFlowDirection2D(MFloat *const fX, MFloat *const fY)
Coordinate transformation.
MInt noSurfaceElements(const MInt surfaceId)
Return number of (local) surfaces elements for a surface.
void preTimeStep() override
std::vector< MInt > m_domainIdSurface
Surface local domain id.
std::vector< MFloat > m_Analyticfreq
Analytic Fourier Transformation, also used for Validation.
maia::acoustic::SourceVars SourceVars
MBool hasSurface(const MInt surfaceId)
Return if this rank has data of this surface.
void calcWindowFactors(MFloat *const p_window)
Compute the window function factors and the normalization factor.
std::vector< std::unique_ptr< AcaPostProcessing > > m_post
void setInputOutputProperties()
Read/set all I/O related properties.
MFloat m_omega_factor
Omega factor.
void FastFourierTransform(MFloat *dataArray, const MInt size, const MInt dir, MFloat *result, const MBool inPlace)
Functions for Fourier Transformation.
void calculateObserverInTime()
Calculate the observer signals in time domain.
MInt observerOffset()
Return local number of observer points.
std::vector< MPI_Comm > m_mpiCommSurface
Surface local MPI communicators.
MString getSurfaceDataFileName(const MInt surfaceId, const MInt fileNo)
IO methods.
void transformBackToOriginalCoordinate3D(MFloat *const fX, MFloat *const fY, MFloat *const fZ)
void combineSurfaceIntegrals(const MInt globalObserverId, MFloat *const p_complexVariables)
Combine the FWH surface integrals of all ranks.
void calcSourceTermsFwhFreq(const MInt segmentId)
Source term compute kernels.
MInt m_sourceType
Source Type.
MString m_acaPostprocessingFile
Parent class of all solvers This class is the base for all solvers. I.e. all solver class (e....
virtual MInt domainId() const
Return the domainId (rank)
MInt solverId() const
Return the solverId.
virtual MInt noDomains() const
Class that represents DG element collector.
Class that represents DG element collector.
std::basic_string< char > MString
Namespace for auxiliary functions/classes.
Hold data for symmetry boundary condition.
std::array< MFloat, nDim > origin
std::array< MFloat, nDim > normal
Conversion-Factors for the input conversion.
static constexpr const MInt FFT
static constexpr const MInt DFT
static constexpr const MInt WP
static constexpr const MInt FX
static constexpr const MInt FZ
static constexpr const MInt FY_C
static constexpr const MInt Q
static constexpr const MInt UP
static constexpr const MInt noVars
static constexpr const MInt Q_C
static constexpr const MInt FZ_C
static constexpr const MInt noComplexVars
static constexpr const MInt FY
static constexpr const MInt VP
static constexpr const MInt FX_C
static constexpr const MInt surfMZ
static constexpr const MInt srcLY
static constexpr const MInt fwhPP
static constexpr const MInt surfMX
static constexpr const MInt noVars
static constexpr const MInt timeObs
static constexpr const MInt V
static constexpr const MInt srcUn
static constexpr const MInt W
static constexpr const MInt U
static constexpr const MInt RHO
static constexpr const MInt srcLZ
static constexpr const MInt srcLX
static constexpr const MInt surfMY
static constexpr const MInt P
static constexpr const MInt FX
static constexpr const MInt W
static constexpr const MInt noVars
static constexpr const MInt V
static constexpr const MInt Q
static constexpr const MInt Q_C
static constexpr const MInt RHO
static constexpr const MInt FZ_C
static constexpr const MInt P
static constexpr const MInt FZ
static constexpr const MInt FY
static constexpr const MInt U
static constexpr const MInt noComplexVars
static constexpr const MInt FY_C
static constexpr const MInt FX_C
static constexpr const MInt RMS_PRESSURE
static constexpr const MInt OASPL
static constexpr const MInt pABS
static constexpr const MInt SPL
static constexpr const MInt calcObsPress
static constexpr const MInt MODHANNING
static constexpr const MInt HANNING
static constexpr const MInt NONE
static constexpr const MInt HAMMING
static const std::array< MString, 4 > windowNames
Parameter for analytical acoustic source terms.
@ WindowAndTransformSources
@ CombineSurfaceIntegrals