Skip to content

Commit

Permalink
Merge pull request #4 from KATRIN-Experiment/master
Browse files Browse the repository at this point in the history
update to Kassiopeia 3.3.2
  • Loading branch information
pslocum authored Jun 16, 2017
2 parents f2a78b7 + 614862d commit 38533ef
Show file tree
Hide file tree
Showing 1,600 changed files with 91,520 additions and 60,700 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ CMakeFiles/
.idea/
*.kdev4*
home/
Makefile
CTestTestfile.cmake
cmake_install.cmake
*Config.cmake
Expand All @@ -29,3 +28,4 @@ cmake_install.cmake
*.vtp
*.vti
*.pyc
.ipynb_checkpoints/
9 changes: 0 additions & 9 deletions AUTHORS

This file was deleted.

54 changes: 24 additions & 30 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake_minimum_required( VERSION 2.8.6 )

project( Kassiopeia )
project( Kasper )

set( CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/Kommon/cmake )
include( KasperDefaults )
Expand Down Expand Up @@ -34,13 +34,13 @@ set( BUILD_KOMMON_DESC "Build Kommon" )
option( BUILD_KOMMON ${BUILD_KOMMON_DESC} ON )

set( BUILD_KGEOBAG_DESC "Build KGeoBag [geometry system]" )
option( BUILD_KGEOBAG ${BUILD_KGEOBAG_DESC} OFF )
option( BUILD_KGEOBAG ${BUILD_KGEOBAG_DESC} ON )

set( BUILD_KEMFIELD_DESC "Build KEMField [electromagnetic simulation system]" )
option( BUILD_KEMFIELD ${BUILD_KEMFIELD_DESC} OFF )
option( BUILD_KEMFIELD ${BUILD_KEMFIELD_DESC} ON )

set( BUILD_KASSIOPEIA_DESC "Build Kassiopeia [particle tracking simulation system]" )
option( BUILD_KASSIOPEIA ${BUILD_KASSIOPEIA_DESC} OFF )
option( BUILD_KASSIOPEIA ${BUILD_KASSIOPEIA_DESC} ON )

#set( CMAKE_C_FLAGS ${CMAKE_C_FLAGS_INIT} )
#set( CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS_INIT} )
Expand All @@ -50,7 +50,7 @@ if (CMAKE_BUILD_TYPE MATCHES Rel)
option( COMPILER_TUNE_OPTIONS "Enable additional tuning options [compiles for local CPU, use with care!]" OFF )
if( COMPILER_TUNE_OPTIONS )
# these are advanced options for GCC which might improve performance ... or break everything - use with care!
set( TUNING_OPTIONS "-funroll-loops -march=native -mtune=native -mfpmath=sse" )
set( TUNING_OPTIONS "-march=native -mfpmath=sse -funroll-loops" )
set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${TUNING_OPTIONS}" )
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TUNING_OPTIONS}" )
endif()
Expand All @@ -74,7 +74,7 @@ if (CMAKE_COMPILER_IS_GNUCXX)
set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -ftrack-macro-expansion=1" )
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ftrack-macro-expansion=1" )
endif( GCC_REDUCE_MEMORY )

option( GCC_ENABLE_PIPES "Use pipes to speed up compiling with GCC by adding the -pipe flag" OFF )
if( GCC_ENABLE_PIPES )
set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pipe" )
Expand All @@ -84,44 +84,31 @@ endif()

mark_as_advanced( CLEAR CMAKE_VERBOSE_MAKEFILE )


# Global dependency options
option( KASPER_USE_BOOST "Build Boost dependent modules" OFF )
option( KASPER_USE_ROOT "Build ROOT dependent modules" ON )
option( KASPER_USE_GSL "Build GSL dependent modules" OFF )
option( KASPER_USE_VTK "Build VTK dependent modules" OFF )
option( KASPER_USE_TBB "Build TBB dependent modules" OFF )

# Make sure all dependencies are being built
# Every module must be listed before its dependencies and activate ONLY its
# direct dependencies.


if( BUILD_KASSIOPEIA )
set( BUILD_KOMMON ON CACHE BOOL "${BUILD_KOMMON_DESC} (Required)" FORCE )
set( BUILD_KGEOBAG ON CACHE BOOL "${BUILD_KGEOBAG_DESC} (Required)" FORCE )
set( BUILD_KEMFIELD ON CACHE BOOL "${BUILD_KEMFIELD_DESC} (Required)" FORCE )

set( Kommon_USE_GSL ON CACHE BOOL "(Required)" FORCE )
if( Kassiopeia_USE_ROOT )
set( Kommon_USE_ROOT ON CACHE BOOL "(Required)" FORCE )
set( KGeoBag_USE_ROOT ON CACHE BOOL "(Required)" FORCE )
endif( Kassiopeia_USE_ROOT )

if( Kassiopeia_USE_VTK )
set( Kommon_USE_VTK ON CACHE BOOL "(Required)" FORCE )
set( KGeoBag_USE_VTK ON CACHE BOOL "(Required)" FORCE )
endif( Kassiopeia_USE_VTK )
set( KASPER_USE_GSL ON CACHE BOOL "(Required)" FORCE )
endif()

if( BUILD_KGEOBAG )
set( BUILD_KOMMON ON CACHE BOOL "${BUILD_KOMMON_DESC} (Required)" FORCE )

set( Kommon_USE_GSL ON CACHE BOOL "(Required)" FORCE )

if( KGeoBag_USE_ROOT )
set( Kommon_USE_ROOT ON CACHE BOOL "(Required)" FORCE )
endif( KGeoBag_USE_ROOT )

if( KGeoBag_USE_VTK )
set( Kommon_USE_VTK ON CACHE BOOL "(Required)" FORCE )
endif( KGeoBag_USE_VTK )
set( KASPER_USE_GSL ON CACHE BOOL "(Required)" FORCE )
endif()



# Build modules
# The order seems to matter! Please place dependent modules at the end.

Expand All @@ -141,7 +128,14 @@ if( BUILD_KASSIOPEIA )
add_subdirectory( Kassiopeia )
endif()

if( BUILD_KTEMPLATE )
add_subdirectory( KTemplate )
endif()

#add_subdirectory( Documentation )

install( EXPORT KasperTargets DESTINATION ${CMAKE_INSTALL_DIR} )

configure_file( Kommon/kasperenv.sh ${CMAKE_CURRENT_BINARY_DIR}/kasperenv.sh @ONLY )
install( PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/kasperenv.sh DESTINATION ${BIN_INSTALL_DIR} )
configure_file( Kommon/create_kasper_user_directory.sh ${CMAKE_CURRENT_BINARY_DIR}/create_kasper_user_directory.sh @ONLY )
install( PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/kasperenv.sh ${CMAKE_CURRENT_BINARY_DIR}/create_kasper_user_directory.sh DESTINATION ${BIN_INSTALL_DIR} )
39 changes: 33 additions & 6 deletions KEMField/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,24 @@ kasper_module_paths( KEMField )

kasper_find_module(Kommon)

#option (@PROJECT_NAME@_USE_VTK "Enables the use of VTK for visualization" OFF)
set (@PROJECT_NAME@_USE_VTK ${KASPER_USE_VTK})
if (@PROJECT_NAME@_USE_VTK)
kasper_find_vtk()
endif()

#option (@PROJECT_NAME@_USE_ROOT "Link against ROOT" OFF)
set (@PROJECT_NAME@_USE_ROOT ${KASPER_USE_ROOT})
if (@PROJECT_NAME@_USE_ROOT)
find_package(ROOT REQUIRED)
endif()

#option (KEMField_USE_GSL "Use GSL" OFF)
set (@PROJECT_NAME@_USE_GSL ${KASPER_USE_GSL})
if (@PROJECT_NAME@_USE_GSL)
find_package(GSL REQUIRED)
endif ()

# Input files
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/data)

Expand All @@ -33,6 +51,7 @@ add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/data)
# Otherwise you will encounter strange linker or even compiler errors.
set (SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/Source/2.0)
add_subdirectory(${SOURCE}/Core)
add_subdirectory(${SOURCE}/Exceptions)
add_subdirectory(${SOURCE}/IO/HashGenerator)
add_subdirectory(${SOURCE}/IO/StructuredASCII)
add_subdirectory(${SOURCE}/IO/Streamers)
Expand All @@ -42,15 +61,14 @@ add_subdirectory(${SOURCE}/Math/Array)
add_subdirectory(${SOURCE}/Math/Utilities)
add_subdirectory(${SOURCE}/Math/VectorMath)
add_subdirectory(${SOURCE}/Surfaces)
add_subdirectory(${SOURCE}/FieldSolvers/Core)
add_subdirectory(${SOURCE}/BoundaryIntegrals/Core)
add_subdirectory(${SOURCE}/BoundaryIntegrals/Electrostatic)
add_subdirectory(${SOURCE}/ExternalFields/Electrostatic)
add_subdirectory(${SOURCE}/ExternalFields/Electromagnets)
add_subdirectory(${SOURCE}/LinearAlgebra/Core)
add_subdirectory(${SOURCE}/LinearAlgebra/Solvers)
add_subdirectory(${SOURCE}/LinearAlgebra/Preconditioners)
add_subdirectory(${SOURCE}/LinearAlgebra/Visitors)
add_subdirectory(${SOURCE}/FieldSolvers/Core)
add_subdirectory(${SOURCE}/ExternalFields/Electromagnets)
add_subdirectory(${SOURCE}/FieldSolvers/Integrating)
add_subdirectory(${SOURCE}/FieldSolvers/ZonalHarmonic/Generator)
add_subdirectory(${SOURCE}/FieldSolvers/ZonalHarmonic/Solver)
Expand All @@ -62,18 +80,27 @@ add_subdirectory(${SOURCE}/FastMultipole/Electrostatics)
add_subdirectory(${SOURCE}/FastMultipole/Interface/Extraction)
add_subdirectory(${SOURCE}/FastMultipole/Interface/BoundaryIntegrals)
add_subdirectory(${SOURCE}/FastMultipole/Interface/FieldSolvers)
add_subdirectory(${SOURCE}/Visualization)
add_subdirectory(${SOURCE}/Plugins/CUDA)
add_subdirectory(${SOURCE}/Plugins/OpenCL)
add_subdirectory(${SOURCE}/Visualization)
add_subdirectory(${SOURCE}/Plugins/VTK)
add_subdirectory(${SOURCE}/FastMultipole/Utility)
add_subdirectory(${SOURCE}/Plugins/PETSc)
add_subdirectory(${SOURCE}/Interface/BoundaryIntegrators/Electric)
add_subdirectory(${SOURCE}/Interface/ChargeDensitySolvers/Electric)
add_subdirectory(${SOURCE}/Interface/FieldSolvers/Electric)
add_subdirectory(${SOURCE}/Interface/FieldSolvers/Magnetic)
add_subdirectory(${SOURCE}/Interface/Fields/Magnetic)
add_subdirectory(${SOURCE}/Interface/Fields/Electric)
add_subdirectory(${SOURCE}/Plugins/KGeoBag)
add_subdirectory(${SOURCE}/Plugins/VTK)
add_subdirectory(${SOURCE}/Plugins/VTKPart2)
add_subdirectory(${SOURCE}/Plugins/Bindings)
add_subdirectory(${SOURCE}/Plugins/Root)
add_subdirectory(${SOURCE}/FastMultipole/Utility)
add_subdirectory(${SOURCE}/Applications)
add_subdirectory(${SOURCE}/Tests)
add_subdirectory(${SOURCE}/FastMultipole/Test)
add_subdirectory(${SOURCE}/FastMultipole/Applications)
add_subdirectory(${SOURCE}/XML)

kasper_install_module()

Expand Down
7 changes: 3 additions & 4 deletions KEMField/ModuleConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ set(@PROJECT_NAME@_FOUND TRUE)
# Update this section

# The extra libraries one has to link against
set(DEPENDS_LIBRARIES )

set(@PROJECT_NAME@_DEPENDS @Kommon_LIBRARIES@ @Kommon_Vtk_LIBRARIES@ @ROOT_LIBRARIES@)
list(REMOVE_DUPLICATES @PROJECT_NAME@_DEPENDS)
# End

set(@PROJECT_NAME@_VERSION_MAJOR @MODULE_VERSION_MAJOR@)
Expand All @@ -20,9 +20,8 @@ set(@PROJECT_NAME@_VERSION @MODULE_VERSION@)

set(@PROJECT_NAME@_CFLAGS @MODULE_CFLAGS@)
set(@PROJECT_NAME@_INCLUDE_DIRS @MODULE_INCLUDE_DIRS@)
set(@PROJECT_NAME@_LIBRARIES @MODULE_TARGETS@ @ROOT_LIBRARIES@)
set(@PROJECT_NAME@_LIBRARIES @MODULE_TARGETS@ )
foreach(LIB @MODULE_TARGETS@)
set(@PROJECT_NAME@_LIBRARIES_MPI "${@PROJECT_NAME@_LIBRARIES_MPI} ${LIB}_mpi")
endforeach(LIB)
set(@PROJECT_NAME@_LIBRARIES_MPI "${@PROJECT_NAME@_LIBRARIES_MPI} @ROOT_LIBRARIES@")
mark_as_advanced(@PROJECT_NAME@_DIR)
8 changes: 3 additions & 5 deletions KEMField/ModuleConfigInstalled.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@ set(@PROJECT_NAME@_FOUND TRUE)

# Update this section

set(DEPENDS_LIBRARIES )
# The CMake names of the libraries in your module

set(@PROJECT_NAME@_DEPENDS @Kommon_LIBRARIES@ @Kommon_Vtk_LIBRARIES@ @ROOT_LIBRARIES@)
list(REMOVE_DUPLICATES @PROJECT_NAME@_DEPENDS)
# End

set(@PROJECT_NAME@_VERSION_MAJOR @MODULE_VERSION_MAJOR@)
Expand All @@ -28,9 +27,8 @@ endif()

set(@PROJECT_NAME@_CFLAGS @MODULE_CFLAGS@)
set(@PROJECT_NAME@_INCLUDE_DIRS @INSTALLED_INCLUDE_DIRS@)
set(@PROJECT_NAME@_LIBRARIES @MODULE_TARGETS@ @ROOT_LIBRARIES@)
set(@PROJECT_NAME@_LIBRARIES @MODULE_TARGETS@ )
set(@PROJECT_NAME@_MPI_LIBRARIES "-L@CMAKE_INSTALL_PREFIX@/lib")
foreach(LIB @MODULE_TARGETS@)
set(@PROJECT_NAME@_MPI_LIBRARIES "${@PROJECT_NAME@_MPI_LIBRARIES} -l${LIB}_mpi")
endforeach(LIB)
set(@PROJECT_NAME@_MPI_LIBRARIES "${@PROJECT_NAME@_MPI_LIBRARIES} @ROOT_LIBRARIES@")
Loading

0 comments on commit 38533ef

Please sign in to comment.