Commit c4473ce5 authored by jannick.wolters's avatar jannick.wolters
Browse files

merged with mergebranch_sprint1 -> should be ready to merge with master now


Former-commit-id: c3931573
parents 17998227 50367b2b
......@@ -321,7 +321,7 @@ TSWLatexianTemp*
### Python ###
# Byte-compiled / optimized / DLL files
__pycache__/
__pycache__/*
*.py[cod]
*$py.class
......@@ -387,6 +387,9 @@ target/
# pyenv
.python-version
# pycharm
.idea/
# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
......@@ -432,6 +435,9 @@ dmypy.json
# Qt Creator autogenerated files
# other
*.cflags
*.cxxflags
# A listing of all the files included in the project
*.files
......
image: rtsn/test:latest
stages:
- build
- unit_tests
build:
stage: build
script:
- git submodule update --init --recursive
- cd code/build/debug
- cmake -G Ninja -DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTING=True ../../
- ninja
timeout: 2h
only:
refs:
- master
- merge_requests
changes:
- "code/include/**/*"
- "code/tests/**/*"
- "code/src/**/*"
- "code/CMakeLists.txt"
- "scripts/Dockerfile"
- ".gitmodules"
unit_tests:
stage: unit_tests
script:
- git submodule update --init --recursive
- cd code/build/release
- cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=True ../../
- cmake -G Ninja -DCMAKE_BUILD_TYPE=Debug ../../
- ninja
- cd ../../bin
- ./unit_tests
timeout: 2h
only:
refs:
- master
- merge_requests
changes:
- "code/include/**/*"
- "code/tests/**/*"
- "code/src/**/*"
- "code/CMakeLists.txt"
- "scripts/Dockerfile"
- ".gitmodules"
- OMP_NUM_THREADS=1 ./unit_tests -r junit > unit_tests_report.xml
- gcovr -e ../../ext/ -e ../../tests/ -r ../../
artifacts:
when: always
paths:
- code/build/release/unit_tests_report.xml
reports:
junit: code/build/release/unit_tests_report.xml
timeout: 4h
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event" || $CI_COMMIT_BRANCH == "master" || $CI_COMMIT_BRANCH == "develop"
changes:
- "code/include/**/*"
- "code/tests/**/*"
- "code/src/**/*"
- "code/CMakeLists.txt"
- "scripts/Dockerfile"
- ".gitmodules"
- if: $CI_PIPELINE_SOURCE == "web"
# RTSN - an HPC Radio Therapy $`S_n`$ framework
[![pipeline status](https://git.scc.kit.edu/rtsn/rtsn/badges/master/pipeline.svg)](https://git.scc.kit.edu/rtsn/rtsn/-/commits/master) [![coverage report](https://git.scc.kit.edu/rtsn/rtsn/badges/master/coverage.svg)](https://git.scc.kit.edu/rtsn/rtsn/-/commits/master)
# KiT-RT - an HPC Radio Therapy $`S_n`$ framework
TBD
## What RTSN is capable of
## What KiT-RT is capable of
### Theory
TBD
### Examples
......@@ -52,17 +54,17 @@ The resulting executable will automatically be placed in the `code/bin` folder.
## Run
### Local
Execute the compiled binary and hand over a valid *TOML*-styled config file.
Execute the compiled binary from the `bin` folder and hand over a valid *TOML*-styled config file.
Example from inside the `code` directory:
```bash
./bin/RTSN input/example.cfg
./KiT-RT ../input/example.cfg
```
In order to run the code in parallel execute:
```bash
OMP_NUM_THREADS=N mpirun -np J ./bin/RTSN input/example.cfg
OMP_NUM_THREADS=N mpirun -np J ./KiT-RT ../input/example.cfg
```
with `N` equal to the number of shared memory threads and `J` equal to the number of distrubuted memory threads.
......@@ -86,8 +88,8 @@ rm -r VTK-8.2.0 VTK-build
Example for build and run on bwUniCluster:
Get the code
```bash
git clone https://git.scc.kit.edu/rtsn/rtsn.git
cd rtsn/
git clone https://git.scc.kit.edu/rtsn/rtsn.git KiT-RT
cd KiT-RT/
git submodule init
git submodule update
```
......@@ -109,13 +111,13 @@ make -j
---
## Tests
In order to also compile the unit tests, add `-DBUILD_TESTING=True` to the cmake command, e.g.:
After compiling the framework as described above just run:
```bash
cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=True ../../
make test
```
The resulting `unit_tests` executable will also be placed in `/bin`.
The `unit_tests` executable will also be placed in in the build folder.
## Continuous Integration (CI)
Every commit on the master branch will trigger a build test and unit tests.
......@@ -145,13 +147,13 @@ This last step requires a preceeding `docker login`. Ask Jannick for login crede
## Code structure
**WARNING: is not created automatically - might be out of date!**
Reverse engineered plantuml diagram of the current code structure:
![Can't load image](doc/rtsn.svg "UML diagram")
![Can't load image](doc/KiT-RT.svg "UML diagram")
<br/><br/>
Was created using [hpp2plantuml](https://github.com/thibaultmarin/hpp2plantuml) and [plantuml](https://plantuml.com/), e.g.:
```bash
cd doc
hpp2plantuml -i "../code/include/*.h" -i "../code/include/*/*.h" -o rtsn.puml
plantuml rtsn.puml -tsvg
hpp2plantuml -i "../code/include/*.h" -i "../code/include/*/*.h" -o KiT-RT.puml
plantuml KiT-RT.puml -tsvg
```
---
......
cmake_minimum_required( VERSION 3.12.4 )
project( RTSN VERSION 0.1.0 LANGUAGES CXX )
project( KiT-RT VERSION 0.1.0 LANGUAGES CXX )
### COMPILER ####################################
set( CMAKE_CXX_STANDARD 17 )
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 )
#################################################
set( CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -march=native -Wno-dev" )
set( CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -march=native -pg -no-pie" )
set( CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0 -Wall" )
set( CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/bin" )
file( GLOB_RECURSE SRCS RELATIVE ${CMAKE_SOURCE_DIR} "src/*.cpp" "include/*.h" )
include_directories( ${CMAKE_SOURCE_DIR}/include )
add_executable( ${CMAKE_PROJECT_NAME} ${SRCS} )
find_package( Python3 COMPONENTS Interpreter Development NumPy REQUIRED )
include_directories( ${Python3_INCLUDE_DIRS} ${Python3_NumPy_INCLUDE_DIRS} )
add_compile_definitions( RTSN_PYTHON_PATH="${CMAKE_SOURCE_DIR}/python" )
### LIBRARIES ###################################
set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH})
find_package( OpenMP REQUIRED )
if( OPENMP_FOUND )
set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}" )
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}" )
endif()
find_package( MPI REQUIRED )
include_directories( ${MPI_INCLUDE_PATH} )
......@@ -30,6 +23,15 @@ find_package( LAPACK REQUIRED )
include_directories( ${LAPACK_INCLUDE_DIR} )
find_package( BLAS )
find_package( VTK REQUIRED COMPONENTS vtkIOGeometry vtkFiltersCore )
find_package( Python3 COMPONENTS Interpreter Development NumPy REQUIRED )
include_directories( ${Python3_INCLUDE_DIRS} ${Python3_NumPy_INCLUDE_DIRS} )
add_compile_definitions( KITRT_PYTHON_PATH="${CMAKE_SOURCE_DIR}/python" )
add_compile_definitions( BLAZE_USE_SHARED_MEMORY_PARALLELIZATION=0 )
message( STATUS "Blaze: Shared memory parallelization disabled" )
if( BLAS_FOUND )
message( STATUS "Blaze: BLAS mode enabled" )
add_compile_definitions( BLAZE_BLAS_MODE=1 )
......@@ -38,80 +40,7 @@ else()
message( STATUS "Blaze: BLAS mode disabled" )
add_compile_definitions( BLAZE_BLAS_MODE=0 )
endif()
add_compile_definitions( BLAZE_USE_SHARED_MEMORY_PARALLELIZATION=0 )
set(flag 1)
if (WIN32)
execute_process(COMMAND wmic cpu get L3CacheSize
OUTPUT_VARIABLE tmp
RESULT_VARIABLE flag
ERROR_QUIET)
if (flag)
execute_process(COMMAND wmic cpu get L2CacheSize
OUTPUT_VARIABLE tmp
RESULT_VARIABLE flag
ERROR_QUIET)
endif (flag)
if (flag)
execute_process(COMMAND wmic cpu get L1CacheSize
OUTPUT_VARIABLE tmp
RESULT_VARIABLE flag
ERROR_QUIET)
endif (flag)
endif (WIN32)
if (UNIX)
execute_process(COMMAND cat /sys/devices/system/cpu/cpu0/cache/index3/size
OUTPUT_VARIABLE tmp
RESULT_VARIABLE flag
ERROR_QUIET)
if (flag)
execute_process(COMMAND cat /sys/devices/system/cpu/cpu0/cache/index2/size
OUTPUT_VARIABLE tmp
RESULT_VARIABLE flag
ERROR_QUIET)
endif (flag)
if (flag)
execute_process(COMMAND cat /sys/devices/system/cpu/cpu0/cache/index1/size
OUTPUT_VARIABLE tmp
RESULT_VARIABLE flag
ERROR_QUIET)
endif (flag)
endif (UNIX)
if (APPLE)
execute_process(COMMAND sysctl -n hw.l3cachesize
OUTPUT_VARIABLE tmp
RESULT_VARIABLE flag
ERROR_QUIET)
if (flag)
execute_process(COMMAND sysctl -n hw.l2cachesize
OUTPUT_VARIABLE tmp
RESULT_VARIABLE flag
ERROR_QUIET)
endif (flag)
if (flag)
execute_process(COMMAND sysctl -n hw.l1icachesize
OUTPUT_VARIABLE tmp
RESULT_VARIABLE flag
ERROR_QUIET)
endif (flag)
if (flag EQUAL 0)
math(EXPR tmp ${tmp}/1024) # If successful convert to kibibytes to comply with rest
endif (flag EQUAL 0)
endif (APPLE)
if (flag)
message(WARNING "Cache size not found automatically. Using default value as cache size.")
set(tmp "3072")
endif (flag)
string( REGEX MATCH "([0-9][0-9]+)" tmp ${tmp} )
math( EXPR BLAZE_CACHE_SIZE ${tmp}*1024 )
add_compile_definitions( BLAZE_CACHE_SIZE=${BLAZE_CACHE_SIZE}UL )
message( STATUS "Blaze: Automatic Cache Size Configuration = ${BLAZE_CACHE_SIZE} KiB" )
include( blaze-cache-config )
include_directories( ${CMAKE_SOURCE_DIR}/ext/blaze )
add_compile_definitions( METIS_EXPORT= )
......@@ -121,12 +50,14 @@ include_directories( ${ParMETIS_PATH}/include )
include_directories( ${ParMETIS_PATH}/metis/include )
add_subdirectory( ${ParMETIS_PATH} )
find_package( VTK REQUIRED COMPONENTS vtkIOGeometry vtkFiltersCore HINTS /home/pia/vtk-inst/include/vtk-8.2)
include(${VTK_USE_FILE})
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 )
#################################################
### MISC ########################################
execute_process(
COMMAND git rev-parse HEAD
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
......@@ -134,17 +65,42 @@ execute_process(
OUTPUT_STRIP_TRAILING_WHITESPACE
)
add_compile_definitions( GIT_HASH="${GIT_HASH}" )
#################################################
set( CORE_LIBRARIES ${Python3_LIBRARIES} ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES} ${MPI_LIBRARIES} ${VTK_LIBRARIES} OpenMP::OpenMP_CXX parmetis -lstdc++fs )
### BUILD KIT-RT ################################
file( GLOB_RECURSE SRCS RELATIVE ${CMAKE_SOURCE_DIR} "src/*.cpp" "include/*.h" )
include_directories( ${CMAKE_SOURCE_DIR}/include )
add_executable( ${CMAKE_PROJECT_NAME} ${SRCS} ${EXT_SRCS} )
target_link_libraries( ${CMAKE_PROJECT_NAME} ${CORE_LIBRARIES} )
if( BUILD_TESTING )
add_compile_definitions( BUILD_TESTING=1 )
add_subdirectory( ${CMAKE_SOURCE_DIR}/ext/Catch2 )
include_directories( ${CMAKE_SOURCE_DIR}/ext/Catch2/single_include/catch2 )
file( GLOB_RECURSE TEST_SRCS RELATIVE ${CMAKE_SOURCE_DIR} "tests/*.cpp" )
list( REMOVE_ITEM SRCS "src/main.cpp" )
add_executable( unit_tests ${SRCS} ${TEST_SRCS} )
target_link_libraries( unit_tests ${CORE_LIBRARIES} )
set_target_properties( ${CMAKE_PROJECT_NAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/bin" )
target_compile_options( ${CMAKE_PROJECT_NAME} PUBLIC "$<$<CONFIG:DEBUG>:${KITRT_DEBUG_OPTIONS}>" )
target_compile_options( ${CMAKE_PROJECT_NAME} PUBLIC "$<$<CONFIG:RELWITHDEBINFO>:${KITRT_RELWITHDEBINFO_OPTIONS}>" )
target_compile_options( ${CMAKE_PROJECT_NAME} PUBLIC "$<$<CONFIG:RELEASE>:${KITRT_RELEASE_OPTIONS}>" )
#################################################
### BUILD UNIT TESTS ############################
include( CTest )
set( CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/ext/Catch2/contrib ${CMAKE_MODULE_PATH} )
include( Catch )
set( CATCH_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/ext/Catch2/single_include/catch2 )
add_compile_definitions( BUILD_TESTING )
add_compile_definitions( TESTS_PATH="${CMAKE_SOURCE_DIR}/tests/" )
add_library( Catch INTERFACE )
target_include_directories( Catch INTERFACE ${CATCH_INCLUDE_DIR} )
file( GLOB_RECURSE TEST_SRCS RELATIVE ${CMAKE_SOURCE_DIR} "tests/*.cpp" )
list( REMOVE_ITEM SRCS "src/main.cpp" )
add_executable( unit_tests ${TEST_SRCS} ${SRCS} ${EXT_SRCS} )
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 )
endif()
target_compile_options( unit_tests PUBLIC "$<$<CONFIG:RELWITHDEBINFO>:${KITRT_RELWITHDEBINFO_OPTIONS}>" )
target_compile_options( unit_tests PUBLIC "$<$<CONFIG:RELEASE>:${KITRT_RELEASE_OPTIONS}>" )
catch_discover_tests( unit_tests )
enable_testing()
#################################################
set(flag 1)
if (WIN32)
execute_process(COMMAND wmic cpu get L3CacheSize
OUTPUT_VARIABLE tmp
RESULT_VARIABLE flag
ERROR_QUIET)
if (flag)
execute_process(COMMAND wmic cpu get L2CacheSize
OUTPUT_VARIABLE tmp
RESULT_VARIABLE flag
ERROR_QUIET)
endif (flag)
if (flag)
execute_process(COMMAND wmic cpu get L1CacheSize
OUTPUT_VARIABLE tmp
RESULT_VARIABLE flag
ERROR_QUIET)
endif (flag)
endif (WIN32)
if (UNIX)
execute_process(COMMAND cat /sys/devices/system/cpu/cpu0/cache/index3/size
OUTPUT_VARIABLE tmp
RESULT_VARIABLE flag
ERROR_QUIET)
if (flag)
execute_process(COMMAND cat /sys/devices/system/cpu/cpu0/cache/index2/size
OUTPUT_VARIABLE tmp
RESULT_VARIABLE flag
ERROR_QUIET)
endif (flag)
if (flag)
execute_process(COMMAND cat /sys/devices/system/cpu/cpu0/cache/index1/size
OUTPUT_VARIABLE tmp
RESULT_VARIABLE flag
ERROR_QUIET)
endif (flag)
endif (UNIX)
if (APPLE)
execute_process(COMMAND sysctl -n hw.l3cachesize
OUTPUT_VARIABLE tmp
RESULT_VARIABLE flag
ERROR_QUIET)
if (flag)
execute_process(COMMAND sysctl -n hw.l2cachesize
OUTPUT_VARIABLE tmp
RESULT_VARIABLE flag
ERROR_QUIET)
endif (flag)
if (flag)
execute_process(COMMAND sysctl -n hw.l1icachesize
OUTPUT_VARIABLE tmp
RESULT_VARIABLE flag
ERROR_QUIET)
endif (flag)
if (flag EQUAL 0)
math(EXPR tmp ${tmp}/1024) # If successful convert to kibibytes to comply with rest
endif (flag EQUAL 0)
endif (APPLE)
if (flag)
message(WARNING "Cache size not found automatically. Using default value as cache size.")
set(tmp "3072")
endif (flag)
string( REGEX MATCH "([0-9][0-9]+)" tmp ${tmp} )
math( EXPR BLAZE_CACHE_SIZE ${tmp}*1024 )
add_compile_definitions( BLAZE_CACHE_SIZE=${BLAZE_CACHE_SIZE}UL )
message( STATUS "Blaze: Automatic Cache Size Configuration = ${BLAZE_CACHE_SIZE} KiB" )
Subproject commit 255aa5f2afe1a622c97422f65ace6ca915be0d8d
Subproject commit ff349a50bfc6214b4081f4ca63c7de35e2162f60
blaze @ 0380370f
Subproject commit 965fdd13a3e87c7c398054d39add0c14fe3779de
Subproject commit 0380370f0626de2ad0ec7ea815803e22bbf6b42e
Subproject commit fba1fa6b493d5030d2adfd4f04c98ff75bd5b8cf
Subproject commit 263c94a262be616484b0bbeb33a6677411f25fbb
Subproject commit cca004efe4e66136a5f9f37e007d28a23bb729e0
Subproject commit cbe9448650176797739dbab13961ef4c07f4290f
......@@ -34,12 +34,13 @@ class Config
// --- Options ---
// File Structure
std::string _inputDir; /*!< @brief Directory for input files*/
std::string _outputDir; /*!< @brief Directory for output files*/
std::string _outputFile; /*!< @brief Name of output file*/
std::string _logDir; /*!< @brief Directory of log file*/
std::string _meshFile; /*!< @brief Name of mesh file*/
std::string _ctFile; /*!< @brief Name of CT file*/
std::string _inputDir; /*!< @brief Directory for input files*/
std::string _outputDir; /*!< @brief Directory for output files*/
std::string _outputFile; /*!< @brief Name of output file*/
std::string _logDir; /*!< @brief Directory of log file*/
std::string _logFileName; /*!< @brief Name of log file*/
std::string _meshFile; /*!< @brief Name of mesh file*/
std::string _ctFile; /*!< @brief Name of CT file*/
// Quadrature
QUAD_NAME _quadName; /*!< @brief Quadrature Name*/
......@@ -58,9 +59,13 @@ class Config
unsigned short _maxMomentDegree; /*!< @brief Maximal Order of Moments for PN and MN Solver */
unsigned short _reconsOrder; /*!< @brief Spatial Order of Accuracy for Solver */
// Linesource
double _sigmaS; /*!< @brief Scattering coeffient for Linesource test case */
/*!< @brief If true, very low entries (10^-10 or smaller) of the flux matrices will be set to zero,
* to improve floating point accuracy */
bool _cleanFluxMat;
bool _allGaussPts; /*!< @brief If true, the SN Solver uses all Gauss pts in the quadrature */
bool _csd; /*!< @brief If true, continuous slowing down approximation will be used */
std::string _hydrogenFile; /*!< @brief Name of hydrogen cross section file */
......@@ -86,6 +91,19 @@ class Config
unsigned short _newtonLineSearchIter; /*!< @brief Maximal Number of line search iterations for newton optimizer */
bool _newtonFastMode; /*!< @brief If true, we skip the NewtonOptimizer for quadratic entropy and assign alpha = u */
// Output Options
unsigned short _nVolumeOutput; /*!< @brief Number of volume outputs */
std::vector<VOLUME_OUTPUT> _volumeOutput; /*!< @brief Output groups for volume output*/
unsigned short _volumeOutputFrequency; /*!< @brief Frequency of vtk write of volume output*/
unsigned short _nScreenOutput; /*!< @brief Number of screen outputs */
std::vector<SCALAR_OUTPUT> _screenOutput; /*!< @brief Output groups for screen output*/
unsigned short _screenOutputFrequency; /*!< @brief Frequency of screen output*/
unsigned short _nHistoryOutput; /*!< @brief Number of screen outputs */
std::vector<SCALAR_OUTPUT> _historyOutput; /*!< @brief Output groups for screen output*/
unsigned short _historyOutputFrequency; /*!< @brief Frequency of screen output*/
// --- Parsing Functionality and Initializing of Options ---
/*!
* @brief Set default values for all options not yet set.
......@@ -175,7 +193,13 @@ class Config
void AddEnumOption( const std::string name, Tenum& option_field, const std::map<std::string, Tenum>& enum_map, Tenum default_value );
// List Options
void AddStringListOption( const std::string name, unsigned short& num_marker, std::vector<std::string>& option_field );
void AddStringListOption( const std::string name, unsigned short& input_size, std::vector<std::string>& option_field );
template <class Tenum>
void AddEnumListOption( const std::string name,
unsigned short& num_marker,
std::vector<Tenum>& option_field,
const std::map<std::string, Tenum>& enum_map );
// Initialize the cmdline and file logger
void InitLogger();
......@@ -198,43 +222,45 @@ class Config
* Please keep alphabetical order within each subcategory
*/
// File structure
std::string inline GetCTFile() const { return std::filesystem::path( _ctFile ).lexically_normal(); }
std::string inline GetHydrogenFile() const { return std::filesystem::path( _hydrogenFile ).lexically_normal(); }
std::string inline GetLogDir() const { return std::filesystem::path( _logDir ).lexically_normal(); }
std::string inline GetLogFile() const { return std::filesystem::path( _logFileName ).lexically_normal(); }
std::string inline GetMeshFile() const { return std::filesystem::path( _meshFile ).lexically_normal(); }
std::string inline GetOutputDir() const { return std::filesystem::path( _outputDir ).lexically_normal(); }
std::string inline GetOutputFile() const { return std::filesystem::path( _outputFile ).lexically_normal(); }
std::string inline GetLogDir() const { return std::filesystem::path( _logDir ).lexically_normal(); }
std::string inline GetCTFile() const { return std::filesystem::path( _ctFile ).lexically_normal(); }
std::string inline GetHydrogenFile() const { return std::filesystem::path( _hydrogenFile ).lexically_normal(); }
std::string inline GetOxygenFile() const { return std::filesystem::path( _oxygenFile ).lexically_normal(); }
// Quadrature Structure
unsigned GetNQuadPoints() { return _nQuadPoints; }
QUAD_NAME inline GetQuadName() const { return _quadName; }
unsigned short inline GetQuadOrder() const { return _quadOrder; }
void SetNQuadPoints( unsigned nq ) { _nQuadPoints = nq; }
unsigned GetNQuadPoints() { return _nQuadPoints; }
// Mesh Structure
void SetNCells( unsigned nCells ) { _nCells = nCells; }
unsigned GetNCells() { return _nCells; }
// Solver Structure
unsigned short inline GetMaxMomentDegree() const { return _maxMomentDegree; }
double inline GetCFL() const { return _CFL; }
double inline GetTEnd() const { return _tEnd; }
bool inline GetCleanFluxMat() const { return _cleanFluxMat; }
ENTROPY_NAME inline GetEntropyName() const { return _entropyName; }
unsigned short inline GetMaxMomentDegree() const { return _maxMomentDegree; }
PROBLEM_NAME inline GetProblemName() const { return _problemName; }
unsigned inline GetReconsOrder() { return _reconsOrder; }
SOLVER_NAME inline GetSolverName() const { return _solverName; }
ENTROPY_NAME inline GetEntropyName() const { return _entropyName; }
bool inline GetCleanFluxMat() const { return _cleanFluxMat; }
unsigned GetReconsOrder() { return _reconsOrder; }
bool inline IsCSD() const { return _csd; }
unsigned inline GetMaxMomentDegree() { return _maxMomentDegree; }
double inline GetTEnd() const { return _tEnd; }
bool inline GetSNAllGaussPts() const { return _allGaussPts; }
bool inline GetIsCSD() const { return _csd; }
// Linesource
double inline GetSigmaS() const { return _sigmaS; }
// Optimizer
OPTIMIZER_NAME inline GetOptimizerName() const { return _entropyOptimizerName; }
double inline GetNewtonOptimizerEpsilon() const { return _optimizerEpsilon; }
unsigned inline GetNewtonIter() const { return _newtonIter; }
double inline GetNewtonStepSize() const { return _newtonStepSize; }
unsigned inline GetMaxLineSearches() const { return _newtonLineSearchIter; }
unsigned inline GetNewtonMaxLineSearches() const { return _newtonLineSearchIter; }
bool inline GetNewtonFastMode() const { return _newtonFastMode; }
OPTIMIZER_NAME inline GetOptimizerName() const { return _entropyOptimizerName; }
// Boundary Conditions
BOUNDARY_TYPE GetBoundaryType( std::string nameMarker ) const; /*! @brief Get Boundary Type of given marker */
......@@ -243,6 +269,26 @@ class Config
KERNEL_NAME inline GetKernelName() const { return _kernelName; }
// Output Structure
std::vector<VOLUME_OUTPUT> inline GetVolumeOutput() { return _volumeOutput; }
unsigned short inline GetNVolumeOutput() { return _nVolumeOutput; }
unsigned short inline GetVolumeOutputFrequency() { return _volumeOutputFrequency; }
std::vector<SCALAR_OUTPUT> inline GetScreenOutput() { return _screenOutput; }
unsigned short inline GetNScreenOutput() { return _nScreenOutput; }
unsigned short inline GetScreenOutputFrequency() { return _screenOutputFrequency; }
std::vector<SCALAR_OUTPUT> inline GetHistoryOutput() { return _historyOutput; }
unsigned short inline GetNHistoryOutput() { return _nHistoryOutput; }
unsigned short inline GetHistoryOutputFrequency() { return _historyOutputFrequency; }
// ---- Setters for option structure
// Quadrature Structure
void SetNQuadPoints( unsigned nq ) { _nQuadPoints = nq; }
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; }
};