MNSolver

Entropy-closure moment solver.

Source:

  • include/solvers/mnsolver.hpp

  • src/solvers/mnsolver.cpp

class MNSolver : public SolverBase

Subclassed by CSDMNSolver, MNSolverNormalized

Public Functions

MNSolver(Config *settings)

MNSolver constructor.

Parameters:

settingsConfig class that stores all needed information

virtual ~MNSolver()

MNSolver destructor.

Protected Functions

virtual void PrepareVolumeOutput() override

Initializes the output groups and fields of this solver and names the fields.

virtual void WriteVolumeOutput(unsigned idx_iter) override

Function that prepares VTK export and csv export of the current solver iteration.

Parameters:

idx_iter – current (pseudo) time iteration

virtual void FVMUpdate(unsigned idx_iter) override

Computes the finite Volume update step for the current iteration.

Parameters:

idx_iter – current (peudo) time iteration

virtual void FluxUpdate() override

Constructs the flux update for the current iteration and stores it in psiNew.

virtual void IterPreprocessing(unsigned idx_iter) override

Performs preprocessing for the current solver iteration.

Parameters:

idx_iter – current (peudo) time iteration

void ComputeRealizableSolution(unsigned idx_cell)

Corrects the solution _sol[idx_cell] to be realizable w.r.t. the reconstructed entropy (eta’(alpha*m))

Parameters:

idx_cell – cell where the correction happens

void ComputeMoments()

Pre-Compute Moments at all quadrature points.

void ComputeScatterMatrix()

Function for computing and setting up EV matrix for scattering kernel.

virtual void ComputeScalarFlux() override

Computes the radiative flux from the solution vector of the moment system.

Protected Attributes

unsigned _nSystem

Total number of equations in the system.

unsigned short _polyDegreeBasis

Max polynomial degree of the basis.

VectorVector _kineticDensity

Kinetic density at the grid cells. dim: _nCells x _nq.

SphericalBase *_basis

Class to compute and store current spherical harmonics basis.

VectorVector _momentBasis

Moment Vector pre-computed at each quadrature point: dim= _nq x _nTotalEntries.

Vector _scatterMatDiag

Diagonal of the scattering matrix (its a diagonal matrix by construction)

VectorVector _quadPoints

quadrature points, dim(_quadPoints) = (_nq,spatialDim)

Vector _weights

quadrature weights, dim(_weights) = (_nq)

VectorVector _quadPointsSphere

(my,phi), dim(_quadPoints) = (_nq,2)

EntropyBase *_entropy

Class to handle entropy functionals.

VectorVector _alpha

Lagrange Multipliers for Minimal Entropy problem for each gridCell Layout: _nCells x _nTotalEntries.

OptimizerBase *_optimizer

Class to solve minimal entropy problem.