Config

class Config

Main class for defining the problem; basically this class reads the configuration file, and stores all the information.

Public Functions

Config(std::string case_filename)

Constructor of the class which reads the input file.

~Config(void)

Destructor of the class.

inline std::string GetCTFile() const

Get Value of this option. Please keep alphabetical order within each subcategory.

BOUNDARY_TYPE GetBoundaryType(std::string nameMarker) const

Get Boundary Type of given marker.

inline void SetNQuadPoints(unsigned nq)

Never change the nq! This is only for the test framework.

inline void SetQuadName(QUAD_NAME quadName)

Never change the quadName! This is only for the test framework.

inline void SetQuadOrder(unsigned quadOrder)

Never change the quadOrder! This is only for the test framework.

inline void SetSNAllGaussPts(bool useall)

Never change the this! This is only for the test framework.

Private Functions

void SetDefault(void)

Set default values for all options not yet set.

void SetConfigOptions(void)

Set the config options. ==> Set new config options here.

void SetConfigParsing(std::string case_filename)

Set the config file parsing.

void SetOutput(void)

Config file screen output.

void SetPointersNull(void)

Initializes pointers to null.

void SetPostprocessing(void)

Config file postprocessing.

bool TokenizeString(std::string &str, std::string &option_name, std::vector<std::string> &option_value)

breaks an input line from the config file into a set of tokens

Parameters:
  • str – the input line string

  • option_name – the name of the option found at the beginning of the line

  • option_value – the tokens found after the “=” sign on the line

Returns:

false if the line is empty or a commment, true otherwise

void AddBoolOption(const std::string name, bool &option_field, bool default_value)

addDoubleOption creates a config file parser for an option with the given name whose value can be represented by a su2double.

<

Private Members

std::string _fileName

Name of the current file without extension.

std::string _inputDir

Directory for input files.

std::string _outputDir

Directory for output files.

std::string _outputFile

Name of output file.

std::string _logDir

Directory of log file.

std::string _logFileName

Name of log file.

std::string _meshFile

Name of mesh file.

std::string _ctFile

Name of CT file.

QUAD_NAME _quadName

Quadrature Name.

unsigned short _quadOrder

Quadrature Order.

unsigned _nQuadPoints

Number of quadrature points. (Deprecated)

unsigned _nCells

Number of cells in the mesh.

unsigned short _dim

spatial dimensionality of the mesh/test case

bool _forcedConnectivityWrite

If true, the meshconnectivity is always computed and written to .con file.

bool _loadrestartSolution

If true, the simulation loads a restart solution from file.

unsigned long _saveRestartSolutionFrequency

Frequency for saving restart solution to file.

std::vector<std::pair<std::string, BOUNDARY_TYPE>> _boundaries

List of all Pairs (marker, BOUNDARY_TYPE), e.g. (farfield,DIRICHLET). Each Boundary Conditions must have an entry in enum BOUNDARY_TYPE.

<

unsigned short _nMarkerDirichlet

Number of Dirichlet BC markers. Enum entry: DIRICHLET.

unsigned short _nMarkerNeumann

Number of Neumann BC markers. Enum entry: Neumann.

std::vector<std::string> _MarkerDirichlet

Dirichlet BC markers.

std::vector<std::string> _MarkerNeumann

Neumann BC markers.

double _CFL

CFL Number for Solver.

double _tEnd

Final Time for Simulation.

PROBLEM_NAME _problemName

Name of predefined Problem

SOLVER_NAME _solverName

Name of the used Solver.

ENTROPY_NAME _entropyName

Name of the used Entropy Functional.

unsigned short _maxMomentDegree

Maximal Order of Moments for PN and MN Solver.

unsigned short _reconsOrder

Spatial Order of Accuracy for Solver.

bool _realizabilityRecons

Turns realizability reconstruction on/off for u sampling and MN solver.

bool _isMomentSolver

Flag for the moment base (PN and MN) solvers.

unsigned short _rungeKuttaStages

Specify the number of Runge Kutta time integration stages.

If true, very low entries (10^-10 or smaller) of the flux matrices will be set to zero, to improve floating point accuracy

bool _allGaussPts

If true, the SN Solver uses all Gauss pts in the quadrature.

bool _csd

If true, continuous slowing down approximation will be used.

double _sigmaS

Scattering coeffient for Linesource test case.

double _magQ

Magnitude of Source.

std::string _dataDir

material directory

std::string _hydrogenFile

Name of hydrogen cross section file path.

std::string _oxygenFile

Name of oxygen cross section file path.

std::string _stoppingPowerFile

Name of stopping power file path.

double _dsgnAbsBlue

Absorption in all blue blocks.

double _dsgnScatterWhite

Scattering in all white blocks.

std::vector<double> _dsgnAbsIndividual

Absorption in all 7x7 blocks of the Lattice test case (up left to low right)

unsigned short _nDsgnAbsIndividual

Number of individual blocks. Needs to be 49.

std::vector<double> _dsgnScatterIndividual

Scatter in all 7x7 blocks of the Lattice test case (up left to low right)

unsigned short _nDsgnScatterIndividual

Number of individual blocks. Needs to be 49.

unsigned short _nProbingCellsLineGreenHohlraum

Number SamplingPoints for Hohlraum Green region sampling.

double _posCenterXHohlraum

Center of the Hohlraum Green region.

double _posCenterYHohlraum

Center of the Hohlraum Green region.

double _posRedRightTop

y coord of the top of the right red area

double _posRedLeftTop

y coord of the top of the left red area

double _posRedRightBottom

y coord of the bottom of the right red area

double _posRedLeftBottom

y coord of the bottom of the left red area

double _posRedLeftBorder

pos of the inner border of the left red area

double _posRedRightBorder

pos of the inner border of the right red area

double _maxEnergyCSD

Maximum energy for CSD simulation.

KERNEL_NAME _kernelName

Scattering Kernel Name.

SPHERICAL_BASIS_NAME _sphericalBasisName

Name of the basis on the unit sphere.

OPTIMIZER_NAME _entropyOptimizerName

Choice of optimizer.

bool _entropyDynamicClosure

Flag for dynamic closure ansatz for normalized mn solver.

double _optimizerEpsilon

termination criterion epsilon for Newton Optmizer

unsigned long _newtonIter

Maximal Number of newton iterations.

double _newtonStepSize

Stepsize factor for newton optimizer.

unsigned long _newtonLineSearchIter

Maximal Number of line search iterations for newton optimizer.

bool _newtonFastMode

If true, we skip the NewtonOptimizer for quadratic entropy and assign alpha = u.

double _regularizerGamma

Regularization parameter for the regularized closure.

unsigned short _neuralModel

Version number of the employed neural model.

unsigned short _neuralGamma

Gamma value (regularization parameter) of the employed neural model.

bool _enforceNeuralRotationalSymmetry

Flag if rotational symmtry of model is enforced.

unsigned short _nVolumeOutput

Number of volume outputs.

std::vector<VOLUME_OUTPUT> _volumeOutput

Output groups for volume output.

unsigned short _volumeOutputFrequency

Frequency of vtk write of volume output.

unsigned short _nScreenOutput

Number of screen outputs.

std::vector<SCALAR_OUTPUT> _screenOutput

Output groups for screen output.

unsigned short _screenOutputFrequency

Frequency of screen output.

unsigned short _nHistoryOutput

Number of screen outputs.

std::vector<SCALAR_OUTPUT> _historyOutput

Output groups for screen output.

unsigned short _historyOutputFrequency

Frequency of screen output.

bool _dataGeneratorMode

Check, if data generator mode is active. If yes, no solver is called, but instead the data generator is executed.

<

SAMPLER_NAME _sampler

Sampling mode for regression or classification datasets.

unsigned long _tainingSetSize

Size of training data set for data generator.

bool _sizeByDimension

If true, the value of _trainingSetSize is the number of gridpoints in one dimension.

unsigned long _maxValFirstMoment

Size of training data set for data generator.

double _RealizableSetEpsilonU0

Distance to 0 of the sampled moments to the boundary of the realizable set.

double _RealizableSetEpsilonU1

norm(u_1)/u_0 !< _RealizableSetEpsilonU1

bool _normalizedSampling

Flag for sampling of normalized moments, i.e. u_0 =1.

bool _alphaSampling

Flag for sampling alpha instead of u.

double _alphaBound

The norm boundary for the sampling range of alpha.

double _minEVAlphaSampling

Rejection sampling criterion is a minimal eigenvalue threshold.

bool _sampleUniform

If true, samples uniform, if false, sampleswith cutoff normal distribution.

double _maxSamplingVelocity

The lower bound for the velocity space in the 1D classification sampler.

double _maxSamplingTemperature

The lower bound for the interval to draw temperatures for the 1D classification sampler.

double _minSamplingTemperature

The upper bound for the interval to draw temperatures for the 1D classification sampler.

unsigned short _nTemperatures

The number of sampling temperatures for the kinetic density sampler.