Commit 61f75dff authored by Steffen Schotthöfer's avatar Steffen Schotthöfer
Browse files

regex changes formatting. More documentation


Former-commit-id: 6e5e6011
parent 89734691
/*!
* @file config.h
* @brief: Class to handle all options and their pre and postprocessing.
* @brief Class to handle all options and their pre and postprocessing.
* DO NOT CREATE SETTERS FOR THIS CLASS! ALL OPTIONS ARE CONSTANT (after SetPostprocessing).
*
* @author S. Schotthöfer
......@@ -48,8 +48,8 @@ class Config
unsigned _nQuadPoints;
// Mesh
unsigned _nCells; /*!< @brief: Number of cells in the mesh */
unsigned short _dim; /*!< @brief: spatial dimensionality of the mesh/test case */
unsigned _nCells; /*!< @brief Number of cells in the mesh */
unsigned short _dim; /*!< @brief spatial dimensionality of the mesh/test case */
// Boundary Conditions
/*!< @brief List of all Pairs (marker, BOUNDARY_TYPE), e.g. (farfield,DIRICHLET).
......@@ -95,7 +95,7 @@ class Config
KERNEL_NAME _kernelName; /*!< @brief Scattering Kernel Name*/
// Spherical Basis
SPHERICAL_BASIS_NAME _sphericalBasisName; /*!< @brief: Name of the basis on the unit sphere */
SPHERICAL_BASIS_NAME _sphericalBasisName; /*!< @brief Name of the basis on the unit sphere */
// Optimizer
OPTIMIZER_NAME _entropyOptimizerName; /*!< @brief Choice of optimizer */
......@@ -106,7 +106,7 @@ class Config
bool _newtonFastMode; /*!< @brief If true, we skip the NewtonOptimizer for quadratic entropy and assign alpha = u */
// NeuralModel
unsigned short _neuralModel; /*!< @brief: Version number of the employed neural model */
unsigned short _neuralModel; /*!< @brief Version number of the employed neural model */
// Output Options
unsigned short _nVolumeOutput; /*!< @brief Number of volume outputs */
std::vector<VOLUME_OUTPUT> _volumeOutput; /*!< @brief Output groups for volume output*/
......@@ -126,8 +126,8 @@ class Config
unsigned long _tainingSetSize; /*!< @brief Size of training data set for data generator */
unsigned long _maxValFirstMoment; /*!< @brief Size of training data set for data generator */
double _RealizableSetEpsilonU0; /*!< @brief Distance to 0 of the sampled moments to the boundary of the realizable set */
double _RealizableSetEpsilonU1; /*!< @brief: norm(u_1)/u_0 !< _RealizableSetEpsilonU1 */
bool _normalizedSampling; /*!< @brief: Flag for sampling of normalized moments, i.e. u_0 =1 */
double _RealizableSetEpsilonU1; /*!< @brief norm(u_1)/u_0 !< _RealizableSetEpsilonU1 */
bool _normalizedSampling; /*!< @brief Flag for sampling of normalized moments, i.e. u_0 =1 */
// --- Parsing Functionality and Initializing of Options ---
/*!
......@@ -299,7 +299,7 @@ class Config
unsigned short inline GetNeuralModel() { return _neuralModel; }
// Boundary Conditions
BOUNDARY_TYPE GetBoundaryType( std::string nameMarker ) const; /*! @brief Get Boundary Type of given marker */
BOUNDARY_TYPE GetBoundaryType( std::string nameMarker ) const; /*!< @brief Get Boundary Type of given marker */
// Scattering Kernel
KERNEL_NAME inline GetKernelName() const { return _kernelName; }
......
......@@ -9,11 +9,11 @@
class Config;
class Mesh;
/*! @brief: Function to export solver Volume output to VTK file.
* @param: filename: Filename of output file
* @param: outputFields: numerical output of the solver. Dimensions: (OutputGroupSize, OutputFieldSize, NumberMeshCells)
* @param: outputFieldNames: names of the outputfields. Dimensions: (OutputGroupSize, OutputFieldSize)
* @param: mesh: Mesh with <NumberMeshCells> cells (the mesh used for the computation)
/*! @brief Function to export solver Volume output to VTK file.
* @param filename: Filename of output file
* @param outputFields: numerical output of the solver. Dimensions: (OutputGroupSize, OutputFieldSize, NumberMeshCells)
* @param outputFieldNames: names of the outputfields. Dimensions: (OutputGroupSize, OutputFieldSize)
* @param mesh: Mesh with <NumberMeshCells> cells (the mesh used for the computation)
*/
void ExportVTK( const std::string fileName,
const std::vector<std::vector<std::vector<double>>>& outputFields,
......
......@@ -18,51 +18,51 @@
class Mesh
{
protected:
const unsigned _dim; /*! @brief: spatial dimension of the mesh, i.e. 1D,2D,3D */
const unsigned _numCells; /*! @brief: number of cells in the mesh */
const unsigned _numNodes; /*! @brief: number of nodes in the mesh (for node centered view)*/
const unsigned _numNodesPerCell; /*! @brief: number of nodes per cell */
const unsigned _numBoundaries; /*! @brief: number of boundary cells in the mesh */
const unsigned _ghostCellID; /*! @brief: Id of the ghost cell. (we use only one ghost cell). equal to _numCells and therefore has the ID of the
const unsigned _dim; /*!< @brief spatial dimension of the mesh, i.e. 1D,2D,3D */
const unsigned _numCells; /*!< @brief number of cells in the mesh */
const unsigned _numNodes; /*!< @brief number of nodes in the mesh (for node centered view)*/
const unsigned _numNodesPerCell; /*!< @brief number of nodes per cell */
const unsigned _numBoundaries; /*!< @brief number of boundary cells in the mesh */
const unsigned _ghostCellID; /*!< @brief Id of the ghost cell. (we use only one ghost cell). equal to _numCells and therefore has the ID of the
last cell + 1 */
unsigned _numNodesPerBoundary;
std::vector<std::pair<double, double>> _bounds; // ???
std::vector<Vector> _nodes; /*! @brief: nodes in the mesh. dimension:_numNodes<_dim> */
std::vector<std::vector<unsigned>> _cells; /*! @brief: cells in the mesh. dimension:_numCells<_numNodesPerCell> */
std::vector<Vector> _nodes; /*!< @brief nodes in the mesh. dimension:_numNodes<_dim> */
std::vector<std::vector<unsigned>> _cells; /*!< @brief cells in the mesh. dimension:_numCells<_numNodesPerCell> */
/*! @brief: boundary cells in the mesh. Pair defines boundary type of the boundary nodes of the cell. numBoundaries<(1,numBoundaryNodes)>*/
/*! @brief boundary cells in the mesh. Pair defines boundary type of the boundary nodes of the cell. numBoundaries<(1,numBoundaryNodes)>*/
std::vector<std::pair<BOUNDARY_TYPE, std::vector<unsigned>>> _boundaries;
std::vector<double> _cellAreas; /*! @brief: cell areas of the mesh. dimension: numCells*/
std::vector<Vector> _cellMidPoints; /*! @brief: cell midpoints of the mesh. dimension: numCells<dim>*/
std::vector<std::vector<unsigned>> _cellNeighbors; /*! @brief: neighbors of each cell. dimension: numCells<numNodesPerCell>*/
std::vector<double> _cellAreas; /*!< @brief cell areas of the mesh. dimension: numCells*/
std::vector<Vector> _cellMidPoints; /*!< @brief cell midpoints of the mesh. dimension: numCells<dim>*/
std::vector<std::vector<unsigned>> _cellNeighbors; /*!< @brief neighbors of each cell. dimension: numCells<numNodesPerCell>*/
/*! @brief: outward facing normals of each side of each cell. dimension: numCells<numNodesPerCell<dim>>, all
/*! @brief outward facing normals of each side of each cell. dimension: numCells<numNodesPerCell<dim>>, all
normals are facing away from the cell center, and scaled with the edge length */
std::vector<std::vector<Vector>> _cellNormals;
/*! @brief: Tags each cell with its boundary type. None means no boundary. dimension: numCells */
/*! @brief Tags each cell with its boundary type. None means no boundary. dimension: numCells */
std::vector<BOUNDARY_TYPE> _cellBoundaryTypes;
std::vector<unsigned> _colors; /*! @brief: Color of each cell (for MPI mesh partitioning). dimension: numCells */
blaze::CompressedMatrix<bool> _nodeNeighbors; /*! @brief: neighborshood relationship of nodes for (par-)metis */
std::vector<unsigned> _colors; /*!< @brief Color of each cell (for MPI mesh partitioning). dimension: numCells */
blaze::CompressedMatrix<bool> _nodeNeighbors; /*!< @brief neighborshood relationship of nodes for (par-)metis */
void ComputeCellAreas(); /*! @brief: Computes only the areas of the mesh cells. Write to _cellAreas. */
void ComputeCellMidpoints(); /*! @brief: Compute only the midpoints of the cells. Write to _cellMidPoints*/
void ComputeConnectivity(); /*! @brief: Computes _cellNeighbors and _nodeNeighbors, i.e. neighborship relation in mesh*/
void ComputePartitioning(); /*! @brief: Computes local partitioning for openMP */
void ComputeCellAreas(); /*!< @brief Computes only the areas of the mesh cells. Write to _cellAreas. */
void ComputeCellMidpoints(); /*!< @brief Compute only the midpoints of the cells. Write to _cellMidPoints*/
void ComputeConnectivity(); /*!< @brief Computes _cellNeighbors and _nodeNeighbors, i.e. neighborship relation in mesh*/
void ComputePartitioning(); /*!< @brief Computes local partitioning for openMP */
/*! @brief: Computes outward facing normal of two neighboring nodes nodeA and nodeB with common cellCellcenter.
/*! @brief Computes outward facing normal of two neighboring nodes nodeA and nodeB with common cellCellcenter.
* Normals are scaled with their respective edge length
* @param: nodeA: first node
* @param: nodeB: neighboring node to nodeA
* @param: cellCenter: Center of the cell that has nodeA and nodeB as nodes.
* @return: outward facing normal */
* @param nodeA: first node
* @param nodeB: neighboring node to nodeA
* @param cellCenter: Center of the cell that has nodeA and nodeB as nodes.
* @return outward facing normal */
Vector ComputeOutwardFacingNormal( const Vector& nodeA, const Vector& nodeB, const Vector& cellCenter );
void ComputeBounds(); /*! @brief: Computes the spatial bounds of a 2D domain. */
void ComputeBounds(); /*!< @brief Computes the spatial bounds of a 2D domain. */
public:
Mesh() = delete; // no default constructor
/*! @brief: Constructor of mesh. Needs nodes, cells, and boundary descriptions as specified above.
/*! @brief Constructor of mesh. Needs nodes, cells, and boundary descriptions as specified above.
* See LoadSU2MeshFromFile in io.cpp for setup information*/
Mesh( std::vector<Vector> nodes,
std::vector<std::vector<unsigned>> cells,
......@@ -74,8 +74,8 @@ class Mesh
inline unsigned GetNumNodes() const { return _numNodes; }
inline unsigned GetNumNodesPerCell() const { return _numNodesPerCell; }
/*! @brief: Returns all node coordinates
* @return: dimension: numNodes x dim */
/*! @brief Returns all node coordinates
* @return dimension: numNodes x dim */
const std::vector<Vector>& GetNodes() const;
/*! @brief Returns the mid point coordinates of each cell
......@@ -122,13 +122,13 @@ class Mesh
// Not used
void ComputeSlopes( unsigned nq, VectorVector& psiDerX, VectorVector& psiDerY, const VectorVector& psi ) const;
/*! @brief:Structured mesh slope reconstruction with flux limiters.
/*! @briefStructured mesh slope reconstruction with flux limiters.
* @param nq is number of quadrature points
* @param psiDerX is slope in x direction (gets computed. Slope is stored here)
* @param psiDerY is slope in y direction (gets computed. Slope is stored here)
* @param psi is solution for which slope is computed */
void ReconstructSlopesS( unsigned nq, VectorVector& psiDerX, VectorVector& psiDerY, const VectorVector& psi ) const;
/*! @brief: Use gauss theorem and limiters. For unstructured mesh *
/*! @brief Use gauss theorem and limiters. For unstructured mesh *
* @param nq is number of quadrature points
* @param psiDerX is slope in x direction (gets computed. Slope is stored here)
* @param psiDerY is slope in y direction (gets computed. Slope is stored here)
......
......@@ -19,28 +19,28 @@ class OptionBase
{
private:
std::vector<std::string> _value; /*! @brief: String name of the option */
std::vector<std::string> _value; /*!< @brief String name of the option */
public:
OptionBase() {}
virtual ~OptionBase() = 0;
virtual std::string SetValue( std::vector<std::string> value ); /*! @brief: Set string name of the option */
virtual std::string SetValue( std::vector<std::string> value ); /*!< @brief Set string name of the option */
std::vector<std::string> GetValue(); /*! @brief: Get string name of the option */
std::vector<std::string> GetValue(); /*!< @brief Get string name of the option */
virtual void SetDefault() = 0; /*! @brief: Set default name for the option */
/*! @brief: Check if an option is defined multiple times in a config file, if yes, return a string stating this. */
virtual void SetDefault() = 0; /*!< @brief Set default name for the option */
/*! @brief Check if an option is defined multiple times in a config file, if yes, return a string stating this. */
std::string OptionCheckMultipleValues( std::vector<std::string>& option_value, std::string type_id, std::string option_name );
/*! @brief: If a bad value for an option is detected, this function creates the corresponding output string. */
/*! @brief If a bad value for an option is detected, this function creates the corresponding output string. */
std::string BadValue( std::vector<std::string>& option_value, std::string type_id, std::string option_name );
};
class OptionDouble : public OptionBase
{
double& _field; /*! @brief: Reference to the double field value */
double _def; /*! @brief: Default value */
std::string _name; /*! @brief: String identifier for the option */
double& _field; /*!< @brief Reference to the double field value */
double _def; /*!< @brief Default value */
std::string _name; /*!< @brief String identifier for the option */
public:
OptionDouble( std::string option_field_name, double& option_field, double default_value );
......@@ -54,9 +54,9 @@ class OptionDouble : public OptionBase
class OptionString : public OptionBase
{
std::string& _field; /*! @brief: Reference to the string field value */
std::string _def; /*! @brief: Default value */
std::string _name; /*! @brief: string identifier for the option */
std::string& _field; /*!< @brief Reference to the string field value */
std::string _def; /*!< @brief Default value */
std::string _name; /*!< @brief string identifier for the option */
public:
OptionString( std::string option_field_name, std::string& option_field, std::string default_value );
......@@ -70,9 +70,9 @@ class OptionString : public OptionBase
class OptionInt : public OptionBase
{
int& _field; /*! @brief: Reference to the int field value */
int _def; /*! @brief: Default value */
std::string _name; /*! @brief: string identifier for the option */
int& _field; /*!< @brief Reference to the int field value */
int _def; /*!< @brief Default value */
std::string _name; /*!< @brief string identifier for the option */
public:
OptionInt( std::string option_field_name, int& option_field, int default_value );
......@@ -86,9 +86,9 @@ class OptionInt : public OptionBase
class OptionULong : public OptionBase
{
unsigned long& _field; /*! @brief: Reference to the unsigned long field value */
unsigned long _def; /*! @brief: Default value */
std::string _name; /*! @brief: string identifier for the option */
unsigned long& _field; /*!< @brief Reference to the unsigned long field value */
unsigned long _def; /*!< @brief Default value */
std::string _name; /*!< @brief string identifier for the option */
public:
OptionULong( std::string option_field_name, unsigned long& option_field, unsigned long default_value );
......@@ -102,9 +102,9 @@ class OptionULong : public OptionBase
class OptionUShort : public OptionBase
{
unsigned short& _field; /*! @brief: Reference to the unsigned short field value */
unsigned short _def; /*! @brief: Default value */
std::string _name; /*! @brief: string identifier for the option */
unsigned short& _field; /*!< @brief Reference to the unsigned short field value */
unsigned short _def; /*!< @brief Default value */
std::string _name; /*!< @brief string identifier for the option */
public:
OptionUShort( std::string option_field_name, unsigned short& option_field, unsigned short default_value );
......@@ -118,9 +118,9 @@ class OptionUShort : public OptionBase
class OptionLong : public OptionBase
{
long& _field; /*! @brief: Reference to the long field value */
long _def; /*! @brief: Default value */
std::string _name; /*! @brief: string identifier for the option */
long& _field; /*!< @brief Reference to the long field value */
long _def; /*!< @brief Default value */
std::string _name; /*!< @brief string identifier for the option */
public:
OptionLong( std::string option_field_name, long& option_field, long default_value );
......@@ -134,9 +134,9 @@ class OptionLong : public OptionBase
class OptionBool : public OptionBase
{
bool& _field; /*! @brief: Reference to the bool field value */
bool _def; /*! @brief: Default value */
std::string _name; /*! @brief: string identifier for the option */
bool& _field; /*!< @brief Reference to the bool field value */
bool _def; /*!< @brief Default value */
std::string _name; /*!< @brief string identifier for the option */
public:
OptionBool( std::string option_field_name, bool& option_field, bool default_value );
......@@ -150,9 +150,9 @@ class OptionBool : public OptionBase
class OptionStringList : public OptionBase
{
std::vector<std::string>& _field; /*! @brief: Reference to the string list field value. no default value */
std::string _name; /*! @brief: string identifier for the option */
unsigned short& _size; /*! @brief: Size of string list */
std::vector<std::string>& _field; /*!< @brief Reference to the string list field value. no default value */
std::string _name; /*!< @brief string identifier for the option */
unsigned short& _size; /*!< @brief Size of string list */
public:
OptionStringList( std::string option_field_name, unsigned short& list_size, std::vector<std::string>& option_field );
......@@ -169,10 +169,10 @@ class OptionStringList : public OptionBase
template <class Tenum> class OptionEnum : public OptionBase
{
std::map<std::string, Tenum> _map; /*! @brief: Map <String name of the option in cfg file, enum field name of cpp framework> */
Tenum& _field; /*! @brief: Reference to the enum fieldname */
Tenum _def; /*! @brief: Default value */
std::string _name; /*! @brief: string identifier for the option */
std::map<std::string, Tenum> _map; /*!< @brief Map <String name of the option in cfg file, enum field name of cpp framework> */
Tenum& _field; /*!< @brief Reference to the enum fieldname */
Tenum _def; /*!< @brief Default value */
std::string _name; /*!< @brief string identifier for the option */
public:
OptionEnum( std::string option_field_name, const std::map<std::string, Tenum> m, Tenum& option_field, Tenum default_value )
......@@ -212,10 +212,10 @@ template <class Tenum> class OptionEnum : public OptionBase
template <class Tenum> class OptionEnumList : public OptionBase
{
std::map<std::string, Tenum> _map; /*! @brief: Map <String name of the option in cfg file, enum field name of cpp framework> */
std::vector<Tenum>& _field; /*! @brief: Reference to the enum list fieldname. No default value */
std::string _name; /*! @brief: string identifier for the option */
unsigned short& _size; /*! @brief: Size of enum list */
std::map<std::string, Tenum> _map; /*!< @brief Map <String name of the option in cfg file, enum field name of cpp framework> */
std::vector<Tenum>& _field; /*!< @brief Reference to the enum list fieldname. No default value */
std::string _name; /*!< @brief string identifier for the option */
unsigned short& _size; /*!< @brief Size of enum list */
public:
OptionEnumList( std::string option_field_name, const std::map<std::string, Tenum> m, std::vector<Tenum>& option_field, unsigned short& list_size )
......
......@@ -13,40 +13,40 @@ class EntropyBase
static EntropyBase* Create( Config* settings );
/*! @brief: computes the entropy functional
* @param: z = point where the functional should be evaluated.
/*! @brief computes the entropy functional
* @param z = point where the functional should be evaluated.
* z must be in domain of the functional
* @returns: value of entropy functional at z */
virtual double Entropy( double z ) = 0;
/*! @brief: computes eta'(z).z must be in domain of the functional.
* @param: z = point where the derivative should be evaluated. */
/*! @brief computes eta'(z).z must be in domain of the functional.
* @param z = point where the derivative should be evaluated. */
virtual double EntropyPrime( double z ) = 0;
/*! @brief: computes the dual of the entropy functional
* @param: z = point where the dual of the functional should be evaluated.
/*! @brief computes the dual of the entropy functional
* @param z = point where the dual of the functional should be evaluated.
* z must be in domain of the duaö functional
* @returns: value of entropy functional at z */
virtual double EntropyDual( double y ) = 0;
// /*! @brief: computes m*eta_*'(alpha*m). alpha*m must be in domain of the functional
// /*! @brief computes m*eta_*'(alpha*m). alpha*m must be in domain of the functional
// * alpha, m and grad must be of same size.
// * @param: alpha = point where the derivative should be evaluated.
// * @param: m = moment vector
// * @param: grad: vector in which the resulting gradient is stored */
// * @param alpha = point where the derivative should be evaluated.
// * @param m = moment vector
// * @param grad: vector in which the resulting gradient is stored */
// virtual void EntropyPrimeDual( Vector& alpha, Vector& m, Vector& grad ) = 0;
/*! @brief: computes eta_*'(y).
* @param: y = point where the derivative should be evaluated.
/*! @brief computes eta_*'(y).
* @param y = point where the derivative should be evaluated.
* @returns: value of the derivative of the entropy functional at y */
virtual double EntropyPrimeDual( double z ) = 0;
/*! @brief: computes the hessian of the dual entropy functional
* @param: y = point where the hessian should be evaluated;
/*! @brief computes the hessian of the dual entropy functional
* @param y = point where the hessian should be evaluated;
* @returns: value of the hessian at y */
virtual double EntropyHessianDual( double y ) = 0;
/*! @brief: checks, if value is in domain of entropy */
/*! @brief checks, if value is in domain of entropy */
virtual bool CheckDomain( double z ) = 0;
};
......
......@@ -19,19 +19,19 @@ class ScatteringKernel
ScatteringKernel() = delete;
protected:
QuadratureBase* _quad; /*! @brief: Pointer to the quadrature used to compute the scattering integral */
QuadratureBase* _quad; /*!< @brief Pointer to the quadrature used to compute the scattering integral */
public:
/*! @brief: Copies the pointer of quad. Does not create an own quad */
/*! @brief Copies the pointer of quad. Does not create an own quad */
ScatteringKernel( QuadratureBase* quad );
virtual ~ScatteringKernel();
/*! @brief: Computes the scattering kernel and for the whole SN system and stores it in a Matrix
@return: Matrix with discretized scattering kernel */
/*! @brief Computes the scattering kernel and for the whole SN system and stores it in a Matrix
@return Matrix with discretized scattering kernel */
virtual Matrix GetScatteringKernel() = 0;
/*! @brief: Creates an object of the child class of ScatteringKernelBase corresponding to the enum KERNEL_NAME */
/*! @brief Creates an object of the child class of ScatteringKernelBase corresponding to the enum KERNEL_NAME */
static ScatteringKernel* CreateScatteringKernel( KERNEL_NAME name, QuadratureBase* quad );
};
......
......@@ -20,28 +20,28 @@ class MLOptimizer : public OptimizerBase
void SolveMultiCell( VectorVector& lambda, VectorVector& u, const VectorVector& moments ) override;
private:
/*! @brief: Calls the tensorflow neural network for the entropy closure
* @param: inputDim : dimension of moment vector for a single cell
* @param: double* nnInput : moment vector as double array
* @return: Lagrange multiplyer alpha with size input_size
/*! @brief Calls the tensorflow neural network for the entropy closure
* @param inputDim : dimension of moment vector for a single cell
* @param double* nnInput : moment vector as double array
* @return Lagrange multiplyer alpha with size input_size
*/
double* callNetwork( const unsigned inputDim, double* nnInput );
/*! @brief: Calls the tensorflow neural network for the entropy closure for the whole mesh
* @param: batchSize : number of cells in the mesh ==> batchsize for the network
* @param: inputDim : dimension of moment vector for a single cell
* @param: double* nnInput : moment vector as double array
* @return: Lagrange multiplyer alpha with size input_size
/*! @brief Calls the tensorflow neural network for the entropy closure for the whole mesh
* @param batchSize : number of cells in the mesh ==> batchsize for the network
* @param inputDim : dimension of moment vector for a single cell
* @param double* nnInput : moment vector as double array
* @return Lagrange multiplyer alpha with size input_size
*/
double* callNetworkMultiCell( const unsigned batchSize, const unsigned inputDim, double* nnInput );
/*! @brief: Initializes the Python module. Sets Path for Python, references Python module */
/*! @brief Initializes the Python module. Sets Path for Python, references Python module */
void initializePython();
/*! @brief: Initilizes numpy python module. */
/*! @brief Initilizes numpy python module. */
void initNumpy();
/*! @brief: Calls Python Funaction to initialize the tensorflow network. */
/*! @brief Calls Python Funaction to initialize the tensorflow network. */
void initializeNetwork();
/*! @brief: Finalizes the Python module. Dereferences Python */
/*! @brief Finalizes the Python module. Dereferences Python */
void finalizePython();
// Python members
......
......@@ -21,27 +21,27 @@ class NewtonOptimizer : public OptimizerBase
void Solve( Vector& alpha, Vector& sol, const VectorVector& moments, unsigned idx_cell = 0 ) override;
void SolveMultiCell( VectorVector& alpha, VectorVector& sol, const VectorVector& moments ) override;
/*! @brief: Computes the objective function
/*! @brief Computes the objective function
grad = <eta(alpha*m)> - alpha*sol */
double ComputeObjFunc( Vector& alpha, Vector& sol, const VectorVector& moments );
private:
/*! @brief: Computes gradient of objective function and stores it in grad
/*! @brief Computes gradient of objective function and stores it in grad
grad = <m*eta*'(alpha*m)> - sol */
void ComputeGradient( Vector& alpha, Vector& sol, const VectorVector& moments, Vector& grad );
/*! @brief: Computes hessian of objective function and stores it in hessian
/*! @brief Computes hessian of objective function and stores it in hessian
grad = <mXm*eta*'(alpha*m)> */
void ComputeHessian( Vector& alpha, const VectorVector& moments, Matrix& hessian );
QuadratureBase* _quadrature; /*! @brief: used quadrature */ // THis is memory doubling! Try to use a pointer.
unsigned _nq; /*! @brief: number of quadrature points */
Vector _weights; /*! @brief quadrature weights, dim(_weights) = (_nq) */
QuadratureBase* _quadrature; /*!< @brief used quadrature */ // THis is memory doubling! Try to use a pointer.
unsigned _nq; /*!< @brief number of quadrature points */
Vector _weights; /*!< @brief quadrature weights, dim(_weights) = (_nq) */
double _epsilon; /*! @brief: Termination criterion for newton optimizer */
unsigned short _maxIterations; /*! @brief: Max iterations of the newton solver */
double _alpha; /*! @brief: Newton Step Size */
unsigned short _maxLineSearches; /*! @brief: Max amount of line searches for Newton Algo */
double _epsilon; /*!< @brief Termination criterion for newton optimizer */
unsigned short _maxIterations; /*!< @brief Max iterations of the newton solver */
double _alpha; /*!< @brief Newton Step Size */
unsigned short _maxLineSearches; /*!< @brief Max amount of line searches for Newton Algo */
};
#endif // NEWTONOPTIMIZER_H
......@@ -20,19 +20,19 @@ class OptimizerBase
virtual ~OptimizerBase();
/*! @brief: Optimizer creator: Depending on the chosen option, this function creates an object of the chosen child class of OptimizerBase */
/*! @brief Optimizer creator: Depending on the chosen option, this function creates an object of the chosen child class of OptimizerBase */
static OptimizerBase* Create( Config* settings );
/*! @brief : Computes the optimal Lagrange multilpiers for the dual entropy minimization problem
* @param : Vector u = pointer to vector of given moments. // Maybe use pointer for performance?
* @return : Vector alpha = optimal lagrange multipliers. Has the same length as Vector u. */
/*! @brief Computes the optimal Lagrange multilpiers for the dual entropy minimization problem
* @param Vector u = pointer to vector of given moments. // Maybe use pointer for performance?
* @return Vector alpha = optimal lagrange multipliers. Has the same length as Vector u. */
virtual void Solve( Vector& lambda, Vector& u, const VectorVector& moments, unsigned idx_cell = 0 ) = 0;
virtual void SolveMultiCell( VectorVector& lambda, VectorVector& u, const VectorVector& moments ) = 0;
protected:
EntropyBase* _entropy; /*! @brief: Class to handle entropy functional evaluations */
Config* _settings; /*! @biref: Pointer to settings class of the solver */
EntropyBase* _entropy; /*!< @brief Class to handle entropy functional evaluations */
Config* _settings; /*!< @biref: Pointer to settings class of the solver */
};
#endif // OPTIMIZERBASE_H
......@@ -6,13 +6,13 @@
class Checkerboard_SN : public ProblemBase
{
private:
Vector _scatteringXS; /*! @brief Vector of scattering crosssections */
Vector _totalXS; /*! @brief Vector of total crosssections */
Vector _scatteringXS; /*!< @brief Vector of scattering crosssections */
Vector _totalXS; /*!< @brief Vector of total crosssections */
Checkerboard_SN() = delete;
bool isAbsorption( const Vector& pos ) const; /*! @return True if pos is in absorption region, False otherwise */
bool isSource( const Vector& pos ) const; /*! @return True if pos is in source region, False otherwise */
bool isAbsorption( const Vector& pos ) const; /*!< @return True if pos is in absorption region, False otherwise */
bool isSource( const Vector& pos ) const; /*!< @return True if pos is in source region, False otherwise */
public:
Checkerboard_SN( Config* settings, Mesh* mesh );
......@@ -27,13 +27,13 @@ class Checkerboard_SN : public ProblemBase
class Checkerboard_PN : public ProblemBase
{
private:
Vector _scatteringXS; /*! @brief Vector of scattering crosssections len: numCells */
Vector _totalXS; /*! @brief Vector of total crosssections. len: numCells*/
Vector _scatteringXS; /*!< @brief Vector of scattering crosssections len: numCells */
Vector _totalXS; /*!< @brief Vector of total crosssections. len: numCells*/
Checkerboard_PN() = delete;
bool isAbsorption( const Vector& pos ) const; /*! @return True if pos is in absorption region, False otherwise */
bool isSource( const Vector& pos ) const; /*! @return True if pos is in source region, False otherwise */
bool isAbsorption( const Vector& pos ) const; /*!< @return True if pos is in absorption region, False otherwise */
bool isSource( const Vector& pos ) const; /*!< @return True if pos is in source region, False otherwise */
/**
* @brief Gets the global index for given order l of Legendre polynomials and given
......
......@@ -25,7 +25,7 @@ class Config;
class ICRU
{
private:
Config* _settings; /*! @brief: Pointer to settings file of the solver */
Config* _settings; /*!< @brief Pointer to settings file of the solver */
const unsigned materialID = 278;
const ParticleType particle = ParticleType::ELECTRON;
......@@ -65,8 +65,8 @@ class ICRU
double _BETA2;
double _R1;
Vector _E, /*! @brief: User queried Energy */
_QMU; /*! @brief:User queried mu */
Vector _E, /*! @brief User queried Energy */
_QMU; /*!< @briefUser queried mu */
std::vector<double> _ET, _ETL;
std::vector<double> _XMU, /* angular variable mu of dataset */
......@@ -104,7 +104,7 @@ class ICRU
ICRU() = delete;
public:
/*! @brief: Constructor of ICRU class
/*! @brief Constructor of ICRU class
* @arg: Vector& mu, = Vector of angles
* @arg: Vector& energy, = Vector of energies
* @arg: Config* settings = pointer to programm settings class
......@@ -113,18 +113,18 @@ class ICRU
~ICRU(){};
/*! @brief: Computes the angular scattering cross sections and integrated XS by interpolating tabular data
/*! @brief Computes the angular scattering cross sections and integrated XS by interpolating tabular data
* @arg: Matrix& angularXS = Matrix where the angular XS will be saved
* @arg: Vector& integratedXS = Vector, where the integratedXS will be saved
* @returns: void */
void GetAngularScatteringXS( Matrix& angularXS, Vector& integratedXS );