DataGeneratorClassification
-
class DataGeneratorClassification : public DataGeneratorBase
Subclassed by DataGeneratorClassification1D, DataGeneratorClassification2D
Public Functions
-
DataGeneratorClassification(Config *settings)
Class constructor. Generates training data for neural network approaches using spherical harmonics and an entropy functional and the quadrature specified by the options file.
- Parameters:
settings – config class with global information
-
virtual void ComputeTrainingData() override
computes the training data set. Realizable set is sampled uniformly. Prototype: 1D, u in [0,100]
Protected Functions
-
virtual void PrintTrainingData() override = 0
: Print computed training data to csv file and screen
-
virtual void ComputeMoments() override = 0
Pre-Compute Moments at all quadrature points.
-
void ClassifyDensity()
Checks, if the pdf of each Lagrange multiplier is within the KL distance of the maxwellian.
-
double ComputeKLDivergence(Vector &f1, Vector &f2)
Computes the Kullback Leibler Divergence of the pdfs f1 and f2.
Both pdfs are evaluated at their quadrature points and must have length _nq.
- Parameters:
f1 – Evaluation of the first pdf at the quadrature points.
f2 – Evaluation of the second pdf at the quadrature points.
-
Vector ComputeMaxwellian(double rho, double u, double T)
Evaluates the Maxwellian at the quadrature points of _quadrature.
Computes the kinetic density from the given Lagrange multipliers alpha at the quadrature points. f = exp(alpha*m) and stores it in _kineticDensity
- Parameters:
rho – Density.
u – Bulk velocity.
T – Temperature.
-
void ReconstructKineticDensity()
Sample Lagrange multipliers alpha, with mean values corresponding to a maxwellian distribution.
-
virtual void SampleMultiplierAlpha() override = 0
Sample Lagrange multipliers alpha.
Protected Attributes
-
Vector _pdfClassification
One-hot vector with classification, if kinetic pdf is within or outside KL Divergence threshold.
-
Vector _maxwellian
Maxwellian pdf evaluated at the quadrature points.
-
double _maxVelocity
Bound of the velocity domain (1D)
-
VectorVector _kineticDensity
vector if sampled kinetic densities, evaluated at quadrature points
-
DataGeneratorClassification(Config *settings)