Commit 2de8b132 authored by jannick.wolters's avatar jannick.wolters
Browse files

updated parmetis submodule; modified CMakeLists.txt for better blas/blaze...

updated parmetis submodule; modified CMakeLists.txt for better blas/blaze support; updated uml diagram and readme.md
parent 949dad06
Pipeline #89387 passed with stages
in 18 minutes and 9 seconds
......@@ -77,7 +77,7 @@ tar xzf VTK-8.2.0.tar.gz
mkdir VTK-build
cd VTK-build
cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_DOCUMENTATION=OFF -DBUILD_TESTING=OFF -DCMAKE_INSTALL_PREFIX=~/VTK-install ../VTK-8.2.0
make -j10
make -j
make install
cd -
rm -r VTK-8.2.0 VTK-build
......@@ -95,10 +95,6 @@ Append `HINTS VTK_INSTALL_DIR` to the `find_package( VTK ... )` line in the CMak
```bash
find_package( VTK REQUIRED COMPONENTS vtkIOGeometry vtkFiltersCore HINTS ~/VTK-install )
```
As a temporary fix, also set the `BLAZE_BLAS_MODE` preprocessor definition to `0`
```bash
add_compile_definitions( BLAZE_BLAS_MODE=0 )
```
Compile it
```bash
......@@ -107,7 +103,7 @@ module load compiler/gnu/9.2
module load mpi/openmpi/4.0
cd code/build/release/
cmake -DCMAKE_BUILD_TYPE=Release ../../
make -j10
make -j
```
---
......
......@@ -3,9 +3,9 @@ project( RTSN VERSION 0.1.0 LANGUAGES CXX )
set( CMAKE_CXX_STANDARD 17 )
set( CMAKE_CXX_STANDARD_REQUIRED ON )
set( CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -march=native -Wno-dev" CACHE STRING "Flags used by the compiler during release builds." FORCE )
set( CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -march=native -pg -no-pie" CACHE STRING "Flags used by the compiler during release builds with debug information." FORCE )
set( CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0 -Wall -Werror" CACHE STRING "Flags used by the compiler during debug builds." FORCE )
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 -Werror" )
set( CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/bin" )
......@@ -25,8 +25,18 @@ include_directories( ${MPI_INCLUDE_PATH} )
find_package( LAPACK REQUIRED )
include_directories( ${LAPACK_INCLUDE_DIR} )
find_package( BLAS )
if( BLAS_FOUND )
message( STATUS "Blaze: BLAS mode enabled" )
add_compile_definitions( BLAZE_BLAS_MODE=1 )
include_directories( ${BLAS_INCLUDE_DIR} )
else()
message( STATUS "Blaze: BLAS mode disabled" )
add_compile_definitions( BLAZE_BLAS_MODE=0 )
endif()
add_compile_definitions( BLAZE_USE_SHARED_MEMORY_PARALLELIZATION=0 )
add_compile_definitions( BLAZE_BLAS_MODE=1 )
set(flag 1)
if (WIN32)
execute_process(COMMAND wmic cpu get L3CacheSize
......@@ -97,7 +107,7 @@ 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( "-- Blaze: Automatic Cache Size Configuration = ${BLAZE_CACHE_SIZE} KiB" )
message( STATUS "Blaze: Automatic Cache Size Configuration = ${BLAZE_CACHE_SIZE} KiB" )
include_directories( ${CMAKE_SOURCE_DIR}/ext/blaze )
add_compile_definitions( METIS_EXPORT= )
......@@ -120,7 +130,7 @@ execute_process(
)
add_compile_definitions( GIT_HASH="${GIT_HASH}" )
set( CORE_LIBRARIES ${LAPACK_LIBRARIES} ${MPI_LIBRARIES} ${VTK_LIBRARIES} parmetis -lstdc++fs )
set( CORE_LIBRARIES ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES} ${MPI_LIBRARIES} ${VTK_LIBRARIES} parmetis -lstdc++fs )
target_link_libraries( ${CMAKE_PROJECT_NAME} ${CORE_LIBRARIES} )
......
Subproject commit e68c8e3947f9383e28cb8623d116ca996b3651a9
Subproject commit 54affdf3f9e1d55c0047c0401401da308aea8878
......@@ -6,6 +6,115 @@
/' Objects '/
abstract class COptionUShort {
+COptionUShort(std::string option_field_name, unsigned short& option_field, unsigned short default_value)
+~COptionUShort()
+SetValue(std::vector<std::string> option_value) : std::string
-_name : std::string
-_def : unsigned short
-_field : unsigned short&
+SetDefault() : void
}
class Checkerboard {
-Checkerboard()
+Checkerboard(Config* settings, Mesh* mesh)
+~Checkerboard()
-_scatteringXS : Vector
-_totalXS : Vector
+GetScatteringXS(const std::vector<double>& energies) : VectorVector
+GetTotalXS(const std::vector<double>& energies) : VectorVector
+SetupIC() : VectorVector
-isAbsorption(const Vector& pos) : bool {query}
-isSource(const Vector& pos) : bool {query}
+GetExternalSource(const std::vector<double>& energies) : std::vector<VectorVector>
+GetStoppingPower(const std::vector<double>& energies) : std::vector<double>
}
class Config {
+Config(char case_filename)
+~Config(void)
+GetBoundaryType(std::string nameMarker) : BOUNDARY_TYPE {query}
+GetKernelName() : KERNEL_NAME {query}
-_kernelName : KERNEL_NAME
+GetProblemName() : PROBLEM_NAME {query}
-_problemName : PROBLEM_NAME
+GetQuadName() : QUAD_NAME {query}
-_quadName : QUAD_NAME
-TokenizeString(std::string& str, std::string& option_name, std::vector<std::string>& option_value) : bool
-_baseConfig : bool
+GetCFL() : double {query}
+GetTEnd() : double {query}
-_CFL : double
-_tEnd : double
-_commRank : int
-_commSize : int
-_optionMap : std::map<std::string, OptionBase*>
-_allOptions : std::map<std::string, bool>
+GetLogDir() : std::string {query}
+GetMeshFile() : std::string {query}
+GetOutputDir() : std::string {query}
+GetOutputFile() : std::string {query}
-_fileName : std::string
-_inputDir : std::string
-_logDir : std::string
-_meshFile : std::string
-_outputDir : std::string
-_outputFile : std::string
-_boundaries : std::vector<std::pair<std::string, BOUNDARY_TYPE> >
-_MarkerDirichlet : std::vector<std::string>
-_MarkerNeumann : std::vector<std::string>
+GetNCells() : unsigned
+GetNQuadPoints() : unsigned
-_nCells : unsigned
-_nQuadPoints : unsigned
+GetQuadOrder() : unsigned short {query}
-_nMarkerDirichlet : unsigned short
-_nMarkerNeumann : unsigned short
-_quadOrder : unsigned short
-AddBoolOption(const std::string name, bool& option_field, bool default_value) : void
-AddDoubleOption(const std::string name, double& option_field, double default_value) : void
-AddEnumOption(const std::string name, Tenum& option_field, const std::map<std::string, Tenum>& enum_map, Tenum default_value) : void
-AddIntegerOption(const std::string name, int& option_field, int default_value) : void
-AddLongOption(const std::string name, long& option_field, long default_value) : void
-AddStringListOption(const std::string name, unsigned short& num_marker, std::vector<std::string>& option_field) : void
-AddStringOption(const std::string name, std::string& option_field, std::string default_value) : void
-AddUnsignedLongOption(const std::string name, unsigned long& option_field, unsigned long default_value) : void
-AddUnsignedShortOption(const std::string name, unsigned short& option_field, unsigned short default_value) : void
-InitLogger(spdlog::level::level_enum terminalLogLvl, spdlog::level::level_enum fileLogLvl) : void
-SetConfigOptions(void) : void
-SetConfigParsing(char case_filename) : void
-SetDefault(void) : void
+SetNCells(unsigned nCells) : void
+SetNQuadPoints(unsigned nq) : void
-SetOutput(void) : void
-SetPointersNull(void) : void
-SetPostprocessing(void) : void
}
class ElectronRT {
-ElectronRT()
+ElectronRT(Config* settings, Mesh* mesh)
+~ElectronRT()
+GetScatteringXS(const std::vector<double>& energies) : VectorVector
+GetTotalXS(const std::vector<double>& energies) : VectorVector
+SetupIC() : VectorVector
+GetExternalSource(const std::vector<double>& energies) : std::vector<VectorVector>
+GetStoppingPower(const std::vector<double>& energies) : std::vector<double>
-LoadXSH20(std::string fileSigmaS, std::string fileSigmaT) : void
}
class ErrorMessages {
+ErrorMessages()
+{static} Error(std::string ErrorMsg, std::string FunctionName) : void
+{static} OptionNotSetError(std::string OptionName, std::string FunctionName) : void
}
class LaxFriedrichsFlux {
+LaxFriedrichsFlux(Config* settings)
+Flux(const Vector& Omega, double psiL, double psiR, const Vector& n) : double {query}
......@@ -13,6 +122,18 @@ class LaxFriedrichsFlux {
}
class LineSource {
-LineSource()
+LineSource(Config* settings, Mesh* mesh)
+~LineSource()
+GetScatteringXS(const std::vector<double>& energies) : VectorVector
+GetTotalXS(const std::vector<double>& energies) : VectorVector
+SetupIC() : VectorVector
+GetExternalSource(const std::vector<double>& energies) : std::vector<VectorVector>
+GetStoppingPower(const std::vector<double>& energies) : std::vector<double>
}
class Mesh {
+Mesh()
+Mesh(std::vector<Vector> nodes, std::vector<std::vector<unsigned> > cells, std::vector<std::pair<BOUNDARY_TYPE, std::vector<unsigned> > > boundaries)
......@@ -26,12 +147,12 @@ class Mesh {
#_numNodes : const unsigned
#_numNodesPerCell : const unsigned
#_log : std::shared_ptr<spdlog::logger>
#_cellBoundaryTypes : std::vector<BOUNDARY_TYPE>
+GetBoundaryTypes() : std::vector<BOUNDARY_TYPE>& {query}
#_cellMidPoints : std::vector<Vector>
#_nodes : std::vector<Vector>
+GetCellMidPoints() : std::vector<Vector>& {query}
+GetNodes() : std::vector<Vector>& {query}
#_isBoundaryCell : std::vector<bool>
+GetBoundaryCellArray() : std::vector<bool>& {query}
#_cellAreas : std::vector<double>
+GetCellAreas() : std::vector<double>& {query}
#_boundaries : std::vector<std::pair<BOUNDARY_TYPE, std::vector<unsigned> > >
......@@ -62,6 +183,107 @@ abstract class NumericalFlux {
}
abstract class OptionBase {
+OptionBase()
+{abstract} ~OptionBase()
+SetValue(std::vector<std::string> value) : std::string
+badValue(std::vector<std::string>& option_value, std::string type_id, std::string option_name) : std::string
+optionCheckMultipleValues(std::vector<std::string>& option_value, std::string type_id, std::string option_name) : std::string
+GetValue() : std::vector<std::string>
-_value : std::vector<std::string>
+{abstract} SetDefault() : void
}
abstract class OptionBool {
+OptionBool(std::string option_field_name, bool& option_field, bool default_value)
+~OptionBool()
-_def : bool
-_field : bool&
+SetValue(std::vector<std::string> option_value) : std::string
-_name : std::string
+SetDefault() : void
}
abstract class OptionDouble {
+OptionDouble(std::string option_field_name, double& option_field, double default_value)
+~OptionDouble()
-_def : double
-_field : double&
+SetValue(std::vector<std::string> option_value) : std::string
-_name : std::string
+SetDefault() : void
}
abstract class OptionEnum <template <class Tenum>> {
+OptionEnum(std::string option_field_name, const std::map<std::string, Tenum> m, Tenum& option_field, Tenum default_value)
+~OptionEnum()
-_def : Tenum
-_field : Tenum&
-_map : std::map<std::string, Tenum>
+SetValue(std::vector<std::string> option_value) : std::string
-_name : std::string
+SetDefault() : void
}
abstract class OptionInt {
+OptionInt(std::string option_field_name, int& option_field, int default_value)
+~OptionInt()
-_def : int
-_field : int&
+SetValue(std::vector<std::string> option_value) : std::string
-_name : std::string
+SetDefault() : void
}
abstract class OptionLong {
+OptionLong(std::string option_field_name, long& option_field, long default_value)
+~OptionLong()
-_def : long
-_field : long&
+SetValue(std::vector<std::string> option_value) : std::string
-_name : std::string
+SetDefault() : void
}
abstract class OptionString {
+OptionString(std::string option_field_name, std::string& option_field, std::string default_value)
+~OptionString()
+SetValue(std::vector<std::string> option_value) : std::string
-_def : std::string
-_name : std::string
-_field : std::string&
+SetDefault() : void
}
abstract class OptionStringList {
+OptionStringList(std::string option_field_name, unsigned short& list_size, std::vector<std::string>& option_field)
+~OptionStringList()
+SetValue(std::vector<std::string> option_value) : std::string
-_name : std::string
-_field : std::vector<std::string>&
-_size : unsigned short&
+SetDefault() : void
}
abstract class OptionULong {
+OptionULong(std::string option_field_name, unsigned long& option_field, unsigned long default_value)
+~OptionULong()
+SetValue(std::vector<std::string> option_value) : std::string
-_name : std::string
-_def : unsigned long
-_field : unsigned long&
+SetDefault() : void
}
class Physics {
+Physics(Config* settings)
-_totalxsH2O : Matrix
......@@ -74,6 +296,24 @@ class Physics {
}
abstract class ProblemBase {
+ProblemBase(Config* settings, Mesh* mesh)
#ProblemBase()
+~ProblemBase()
#_settings : Config*
#_mesh : Mesh*
#_physics : Physics*
+{static} Create(Config* settings, Mesh* mesh) : ProblemBase*
+{abstract} GetScatteringXS(const std::vector<double>& energies) : VectorVector
+{abstract} GetTotalXS(const std::vector<double>& energies) : VectorVector
+{abstract} SetupIC() : VectorVector
+{abstract} GetExternalSource(const std::vector<double>& energies) : std::vector<VectorVector>
+{abstract} GetStoppingPower(const std::vector<double>& energies) : std::vector<double>
#_density : std::vector<double>
#_stoppingPower : std::vector<double>
}
class QDummy {
+QDummy(unsigned order)
+~QDummy()
......@@ -189,38 +429,43 @@ class SNSolver {
+SNSolver(Config* settings)
+Save() : void {query}
+Solve() : void
+SolveMPI() : void
}
class SNSolverMPI {
+SNSolverMPI(Config* settings)
+Save() : void {query}
+Solve() : void
}
abstract class Solver {
+Solver(Config* settings)
#_settings : Config*
#_scatteringKernel : Matrix
#_mesh : Mesh*
#_g : NumericalFlux*
#_problem : ProblemBase*
+{static} Create(Config* settings) : Solver*
#_weights : Vector
#_psi : VectorVector
#_quadPoints : VectorVector
#_sigmaS : VectorVector
#_sigmaT : VectorVector
#ComputeTimeStep(double cfl) : double {query}
#_dt : double
#_sigmaSH20 : std::vector<Matrix>
#_boundaryCells : std::vector<bool>
#_dE : double
#_boundaryCells : std::vector<BOUNDARY_TYPE>
#_Q : std::vector<VectorVector>
#_areas : std::vector<double>
#_density : std::vector<double>
#_sH20 : std::vector<double>
#_sigmaTH20 : std::vector<double>
#_energies : std::vector<double>
#_s : std::vector<double>
#_normals : std::vector<std::vector<Vector> >
#_neighbors : std::vector<std::vector<unsigned> >
#_nCells : unsigned
#_nTimeSteps : unsigned
#_nEnergies : unsigned
#_nq : unsigned
#LoadPatientDensity(std::string fileName) : void
#LoadSigmaS(std::string fileName) : void
#LoadSigmaT(std::string fileName) : void
#LoadStoppingPower(std::string fileName) : void
+{abstract} Save() : void {query}
#SetupIC() : void
+{abstract} Solve() : void
}
......@@ -231,6 +476,35 @@ class UpwindFlux {
}
enum BOUNDARY_TYPE {
DIRICHLET
INVALID
NEUMANN
NONE
}
enum KERNEL_NAME {
KERNEL_Isotropic
}
enum PROBLEM_NAME {
PROBLEM_Checkerboard
PROBLEM_ElectronRT
PROBLEM_LineSource
}
enum QUAD_NAME {
QUAD_GaussLegendreTensorized
QUAD_LDFESA
QUAD_Lebedev
QUAD_LevelSymmetric
QUAD_MonteCarlo
}
......@@ -242,6 +516,42 @@ NumericalFlux <|-- LaxFriedrichsFlux
NumericalFlux <|-- UpwindFlux
OptionBase <|-- COptionUShort
OptionBase <|-- OptionBool
OptionBase <|-- OptionDouble
OptionBase <|-- OptionEnum
OptionBase <|-- OptionInt
OptionBase <|-- OptionLong
OptionBase <|-- OptionString
OptionBase <|-- OptionStringList
OptionBase <|-- OptionULong
ProblemBase <|-- Checkerboard
ProblemBase <|-- ElectronRT
ProblemBase <|-- LineSource
QLookupQuadrature <|-- QLDFESA
......@@ -266,17 +576,38 @@ QuadratureBase <|-- QMonteCarlo
Solver <|-- SNSolver
Solver <|-- SNSolverMPI
/' Aggregation relationships '/
Config o-- OptionBase
ProblemBase o-- Config
ProblemBase o-- Mesh
ProblemBase o-- Physics
Solver o-- Config
Solver o-- Mesh
Solver o-- NumericalFlux
Solver o-- ProblemBase
......
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment