Commit 2e1ff747 authored by Steffen Schotthöfer's avatar Steffen Schotthöfer
Browse files

Merge branch 'develop' of git.scc.kit.edu:rtsn/rtsn into develop

parents 434d5e53 8e1bd779
Pipeline #145305 passed with stage
in 20 minutes and 29 seconds
......@@ -8,7 +8,7 @@ unit_tests:
script:
- git submodule update --init --recursive
- cd code/build/debug
- cmake -G Ninja -DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTS=ON ../../
- cmake -G Ninja -DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTING=ON -DBUILD_CODE_COV=ON ../../
- ninja
- OMP_NUM_THREADS=1 ./unit_tests -r junit > unit_tests_report.xml
- gcovr -e ../../ext/ -e ../../tests/ -r ../../
......
......@@ -7,9 +7,6 @@
[submodule "code/ext/blaze"]
path = code/ext/blaze
url = https://bitbucket.org/blaze-lib/blaze.git
[submodule "code/ext/parmetis"]
path = code/ext/parmetis
url = https://github.com/slydex/parmetis.git
[submodule "code/ext/neuralEntropy"]
path = code/ext/neuralEntropy
url = https://github.com/ScSteffen/neuralEntropy.git
cmake_minimum_required( VERSION 3.12.4 )
cmake_minimum_required( VERSION 3.16 )
project( KiT-RT VERSION 0.1.0 LANGUAGES CXX )
### OPTIONS #####################################
option( BUILD_TESTS "builds all available unit tests" OFF )
option( BUILD_TESTING "builds all available unit tests" OFF )
option( BUILD_GUI "additionally builds a user interface" OFF )
option( BUILD_DOC "builds Doxygen and Sphinx documentation" OFF )
option( BUILD_UNITY "enables unity build for faster compile times" ON )
option( BUILD_CODE_COV "enables compiler option required for code coverage analysis" OFF )
#################################################
......@@ -14,6 +16,11 @@ set( CMAKE_CXX_STANDARD_REQUIRED ON )
set( KITRT_RELEASE_OPTIONS -march=native -w )
set( KITRT_RELWITHDEBINFO_OPTIONS -march=native -pg -no-pie )
set( KITRT_DEBUG_OPTIONS -Wall -Wextra -Wpedantic )
if( BUILD_UNITY AND NOT BUILD_CODE_COV )
message( STATUS "Unity build enabled" )
set( CMAKE_UNITY_BUILD ON )
set( CMAKE_UNITY_BUILD_BATCH_SIZE 0 )
endif()
#################################################
......@@ -49,17 +56,10 @@ endif()
include( blaze-cache-config )
include_directories( ${CMAKE_SOURCE_DIR}/ext/blaze )
add_compile_definitions( METIS_EXPORT= )
set( DISABLE_PARMETIS_PROGRAMS ON )
set( ParMETIS_PATH ${CMAKE_CURRENT_SOURCE_DIR}/ext/parmetis )
include_directories( ${ParMETIS_PATH}/include )
include_directories( ${ParMETIS_PATH}/metis/include )
add_subdirectory( ${ParMETIS_PATH} )
include_directories( ${CMAKE_SOURCE_DIR}/ext/cpptoml/include )
include_directories( ${CMAKE_SOURCE_DIR}/ext/spdlog/include )
set( CORE_LIBRARIES ${Python3_LIBRARIES} ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES} ${MPI_LIBRARIES} ${VTK_LIBRARIES} OpenMP::OpenMP_CXX parmetis -lstdc++fs )
set( CORE_LIBRARIES ${Python3_LIBRARIES} ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES} ${MPI_LIBRARIES} ${VTK_LIBRARIES} OpenMP::OpenMP_CXX -lstdc++fs )
#################################################
......@@ -94,7 +94,7 @@ target_compile_options( ${CMAKE_PROJECT_NAME} PUBLIC "$<$<CONFIG:RELEASE>:${KITR
### BUILD UNIT TESTS ############################
if( BUILD_TESTS )
if( BUILD_TESTING )
include( CTest )
set( CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/ext/Catch2/contrib ${CMAKE_MODULE_PATH} )
include( Catch )
......@@ -110,10 +110,16 @@ if( BUILD_TESTS )
target_compile_definitions( unit_tests PUBLIC TESTS_PATH="${CMAKE_SOURCE_DIR}/tests/" )
target_link_libraries( unit_tests Catch ${CORE_LIBRARIES} )
target_compile_options( unit_tests PUBLIC "$<$<CONFIG:DEBUG>:${KITRT_DEBUG_OPTIONS}>" )
if( CMAKE_COMPILER_IS_GNUCXX )
set( CODE_COVERAGE_OPTIONS --coverage -g -O0 -w )
target_compile_options( unit_tests PUBLIC "$<$<CONFIG:DEBUG>:${CODE_COVERAGE_OPTIONS}>" )
target_link_libraries( unit_tests Catch gcov )
if( BUILD_CODE_COV )
if( CMAKE_COMPILER_IS_GNUCXX )
set( CODE_COVERAGE_OPTIONS --coverage -g -O0 -w )
target_compile_options( unit_tests PUBLIC "$<$<CONFIG:DEBUG>:${CODE_COVERAGE_OPTIONS}>" )
target_link_libraries( unit_tests Catch gcov )
else()
message( FATAL_ERROR "Code coverage is currently only supported for gcc!" )
endif()
else()
target_link_libraries( unit_tests Catch )
endif()
target_compile_options( unit_tests PUBLIC "$<$<CONFIG:RELWITHDEBINFO>:${KITRT_RELWITHDEBINFO_OPTIONS}>" )
target_compile_options( unit_tests PUBLIC "$<$<CONFIG:RELEASE>:${KITRT_RELEASE_OPTIONS}>" )
......@@ -153,7 +159,7 @@ if( BUILD_DOC )
set( DOXYGEN_INPUT_DIR ${PROJECT_SOURCE_DIR} )
set( DOXYGEN_OUTPUT_DIR ${CMAKE_CURRENT_BINARY_DIR}/docs/doxygen )
set( DOXYGEN_INDEX_FILE ${DOXYGEN_OUTPUT_DIR}/html/index.html )
set( DOXYGEN_INDEX_FILE ${DOXYGEN_OUTPUT_DIR}/xml/index.xml )
set( DOXYFILE_IN ${CMAKE_CURRENT_SOURCE_DIR}/../doc/Doxyfile.in )
set( DOXYFILE_OUT ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile )
configure_file( ${DOXYFILE_IN} ${DOXYFILE_OUT} @ONLY )
......
Subproject commit e1eab3b76738638e7db7a5f2bd62e72c923c717a
Subproject commit c17aef38149a57d92781c91643375fd891d2a4cb
Subproject commit 263c94a262be616484b0bbeb33a6677411f25fbb
/*!
* @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
......@@ -27,7 +27,7 @@ class OptionBase;
class Config
{
private:
std::string _fileName; /*!< @rief Name of the current file without extension */
std::string _fileName; /*!< @brief Name of the current file without extension */
bool _baseConfig;
// int _commRank, _commSize; /*!< @brief MPI rank and size.*/ // Not yet used!!
......@@ -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*/
......@@ -125,8 +125,9 @@ class Config
bool _dataGeneratorMode;
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 */
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 */
// --- Parsing Functionality and Initializing of Options ---
/*!
......@@ -162,9 +163,9 @@ class Config
/*!
* @brief breaks an input line from the config file into a set of tokens
* @param[in] str - the input line string
* @param[out] option_name - the name of the option found at the beginning of the line
* @param[out] option_value - the tokens found after the "=" sign on the line
* @param str the input line string
* @param option_name the name of the option found at the beginning of the line
* @param option_value the tokens found after the "=" sign on the line
* @return false if the line is empty or a commment, true otherwise
*/
bool TokenizeString( std::string& str, std::string& option_name, std::vector<std::string>& option_value );
......@@ -298,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; }
......@@ -324,14 +325,17 @@ class Config
unsigned long inline GetMaxValFirstMoment() { return _maxValFirstMoment; }
double GetRealizableSetEpsilonU0() { return _RealizableSetEpsilonU0; }
double GetRealizableSetEpsilonU1() { return _RealizableSetEpsilonU1; }
bool inline GetNormalizedSampling() { return _normalizedSampling; }
// ---- Setters for option structure
// This section is dangerous
// Quadrature Structure
void SetNQuadPoints( unsigned nq ) { _nQuadPoints = nq; } /*! @brief Never change the nq! This is only for the test framework. */
void SetQuadName( QUAD_NAME quadName ) { _quadName = quadName; } /*! @brief Never change the quadName! This is only for the test framework. */
void SetQuadOrder( unsigned quadOrder ) { _quadOrder = quadOrder; } /*! @brief Never change the quadOrder! This is only for the test framework. */
void SetSNAllGaussPts( bool useall ) { _allGaussPts = useall; } /*! @brief Never change the this! This is only for the test framework. */
void SetNQuadPoints( unsigned nq ) { _nQuadPoints = nq; } /*!< @brief Never change the nq! This is only for the test framework. */
void SetQuadName( QUAD_NAME quadName ) { _quadName = quadName; } /*!< @brief Never change the quadName! This is only for the test framework. */
void SetQuadOrder( unsigned quadOrder ) {
_quadOrder = quadOrder;
} /*!< @brief Never change the quadOrder! This is only for the test framework. */
void SetSNAllGaussPts( bool useall ) { _allGaussPts = useall; } /*!< @brief Never change the this! This is only for the test framework. */
// Mesh Structure
void SetNCells( unsigned nCells ) { _nCells = nCells; }
};
......
/*!
* \file GlobalConstants.h
* \file globalconstants.h
* \brief All global defined (physical) constants, enums etc
* \author <blank>
* \version 0.0
*
*/
......@@ -59,6 +58,7 @@ enum QUAD_NAME {
QUAD_MonteCarlo,
QUAD_GaussLegendreTensorized,
QUAD_GaussLegendre1D,
QUAD_GaussLegendreTensorized2D,
QUAD_LevelSymmetric,
QUAD_Lebedev,
QUAD_LDFESA,
......
......@@ -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 cells (the mesh used for the computation)
*/
void ExportVTK( const std::string fileName,
const std::vector<std::vector<std::vector<double>>>& outputFields,
......
......@@ -10,59 +10,55 @@
#include <omp.h>
#include <vector>
#include "metis.h"
#include "parmetis.h"
#include "toolboxes/errormessages.h"
#include "toolboxes/reconstructor.h"
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 */
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*/
/*! @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 +70,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
......@@ -90,10 +86,6 @@ class Mesh
* @return dimension: numCells */
const std::vector<double>& GetCellAreas() const;
/*! @brief Return the color/ID of the mesh partition
* @return dimension: numCells */
const std::vector<unsigned>& GetPartitionIDs() const;
/*! @brief Returns the neighbor cell IDs for every cell
* @return dimension: numCells x numNodes */
const std::vector<std::vector<unsigned>>& GetNeighbours() const;
......@@ -122,13 +114,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.
/*! @brief Structured 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)
......
/*!
* \file OptionStructure.h
* \brief Classes for different Options in rtsn
* \author S. Schotthoefer
*
* Disclaimer: This class structure was copied and modifed with open source permission from SU2 v7.0.3 https://su2code.github.io/
* \file optionstructure.h
* \brief Classes for different Options in KiT-RT
*/
#ifndef OPTION_STRUCTURE_H
......@@ -19,28 +16,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 +51,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 +67,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 +83,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 +99,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 +115,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 +131,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 +147,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 +166,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 +209,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,33 @@ 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.
* z must be in domain of the duaö functional
/*! @brief computes the dual of the entropy functional
* @param y point where the dual of the functional should be evaluated.
* y 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
// * 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 */
// 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;
virtual double EntropyPrimeDual( double y ) = 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;
};
......
......@@ -5,7 +5,7 @@
class LaxFriedrichsFlux : public NumericalFlux
{
double _dt;
// double _dt;
public:
/**
......
......@@ -20,19 +20,18 @@ class NumericalFlux
virtual double Flux( const Vector& Omega, double psiL, double psiR, const Vector& n ) const = 0;
/**
* @brief Flux : Computes <Steger Warming> upwinding scheme for given flux jacobians of the PN Solver at a given edge and stores it in
* resultFlux
* @param AxPlus : Positive part of the flux jacobian in x direction
* @param AxMinus : Negative part of the flux jacobian in x direction
* @param AyPlus : Positive part of the flux jacobian in y direction
* @param AyMinus : Negative part of the flux jacobian in y direction
* @param AzPlus : Positive part of the flux jacobian in z direction
* @param AzMinus : Negative part of the flux jacobian in z direction
* @param psiL : Solution state of left hand side control volume
* @param psiR : Solution state of right hand side control volume