1
0
Fork 0
mirror of https://github.com/gwm17/catima.git synced 2024-11-22 18:28:51 -05:00

docs rearranged

This commit is contained in:
hrocho 2019-10-22 19:34:09 +02:00
parent 06c8bf36ac
commit 0a8578a4f8
8 changed files with 201 additions and 2449 deletions

View File

@ -5,7 +5,7 @@ project(catima)
option(BUILD_SHARED_LIBS "build as shared library" ON) option(BUILD_SHARED_LIBS "build as shared library" ON)
option(PYTHON_MODULE "compile the Catima python module(requires numpy and cython installed)" OFF) option(PYTHON_MODULE "compile the Catima python module(requires numpy and cython installed)" OFF)
option(TESTS "build tests" OFF) option(TESTS "build tests" OFF)
option(EXAMPLES "build examples" ON) option(EXAMPLES "build examples" OFF)
option(APPS "build catima applications" ON) option(APPS "build catima applications" ON)
option(GLOBAL "build with global, sources are required" OFF) option(GLOBAL "build with global, sources are required" OFF)
option(REACTIONS "enable/disable nuclear reaction rate" ON) option(REACTIONS "enable/disable nuclear reaction rate" ON)
@ -14,7 +14,6 @@ option(GSL_INTEGRATION "use GSL integration" OFF)
option(GSL_INTERPOLATION "use GSL inteRPOLATION" OFF) option(GSL_INTERPOLATION "use GSL inteRPOLATION" OFF)
option(THIN_TARGET_APPROXIMATION "thin target approximation" ON) option(THIN_TARGET_APPROXIMATION "thin target approximation" ON)
option(GENERATE_DATA "make data tables generator" OFF) option(GENERATE_DATA "make data tables generator" OFF)
option(DOCS "build documentation (requires doxygen)" OFF)
######## build type ############ ######## build type ############
if(NOT CMAKE_BUILD_TYPE STREQUAL "Debug") if(NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
@ -83,7 +82,7 @@ set_target_properties(catima PROPERTIES
target_link_libraries(catima ${EXTRA_LIBS}) target_link_libraries(catima ${EXTRA_LIBS})
target_include_directories(catima target_include_directories(catima
PUBLIC $<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/include> PUBLIC $<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/include>
$<BUILD_INTERFACE:${GSL_INCLUDE_DIRS}> $<BUILD_INTERFACE:${GSL_INCLUDE_DIRS}>
) )
@ -92,7 +91,7 @@ add_library(catima::catima ALIAS catima)
FILE(COPY ${HEADERS} DESTINATION ${PROJECT_BINARY_DIR}/include/catima) FILE(COPY ${HEADERS} DESTINATION ${PROJECT_BINARY_DIR}/include/catima)
# the compiler used for C++ files # the compiler used for C++ files
MESSAGE( STATUS "CMAKE_CXX_COMPILER: " ${CMAKE_CXX_COMPILER} ) MESSAGE( STATUS "CMAKE_CXX_COMPILER: " ${CMAKE_CXX_COMPILER} )
######## for python module ######## for python module
@ -102,7 +101,7 @@ if(PYTHONINTERP_FOUND)
endif() endif()
if(PYTHON_MODULE) if(PYTHON_MODULE)
if(NOT PYTHONINTERP_FOUND) if(NOT PYTHONINTERP_FOUND)
MESSAGE(SEND_ERROR "Python is required to build nurex python modules") MESSAGE(SEND_ERROR "Python is required to build nurex python modules")
endif(NOT PYTHONINTERP_FOUND) endif(NOT PYTHONINTERP_FOUND)
find_package(pybind11 REQUIRED) find_package(pybind11 REQUIRED)
set(PYBIND11_CPP_STANDARD -std=c++14) set(PYBIND11_CPP_STANDARD -std=c++14)
@ -133,7 +132,7 @@ add_executable(generate_ls_coeff utils/generator.cpp)
target_link_libraries(generate_ls_coeff catima) target_link_libraries(generate_ls_coeff catima)
#add_custom_command( #add_custom_command(
# OUTPUT ${CMAKE_CURRENT_BINARY_DIR/include/generated_LS_coeff.h} # OUTPUT ${CMAKE_CURRENT_BINARY_DIR/include/generated_LS_coeff.h}
# COMMAND # COMMAND
#) #)
endif(GENERATE_DATA) endif(GENERATE_DATA)
@ -141,8 +140,8 @@ endif(GENERATE_DATA)
if(DOCS) if(DOCS)
find_package(Doxygen REQUIRED) find_package(Doxygen REQUIRED)
if(DOXYGEN_FOUND) if(DOXYGEN_FOUND)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/doxygen.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/docs/doxygen.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY)
add_custom_target(docs add_custom_target(docs
COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile COMMENT "Generating API documentation with Doxygen" VERBATIM ) COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile COMMENT "Generating API documentation with Doxygen" VERBATIM )
endif(DOXYGEN_FOUND) endif(DOXYGEN_FOUND)
endif(DOCS) endif(DOCS)
@ -159,14 +158,14 @@ install (TARGETS catima
EXPORT catimaConfig EXPORT catimaConfig
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
install (FILES ${headers} DESTINATION include/catima) install (FILES ${headers} DESTINATION include/catima)
install(EXPORT catimaConfig install(EXPORT catimaConfig
NAMESPACE catima:: NAMESPACE catima::
DESTINATION lib/cmake/catima DESTINATION lib/cmake/catima
) )
export(TARGETS catima NAMESPACE catima:: FILE catimaConfig.cmake) export(TARGETS catima NAMESPACE catima:: FILE catimaConfig.cmake)
export(PACKAGE catima) export(PACKAGE catima)

View File

@ -7,7 +7,7 @@ C++ library for caclulalaton of energy loss, range, angular scattering and time
The library is based on physics used in the ATIMA code,however its not 100% copy of ATIMA physics. The library is based on physics used in the ATIMA code,however its not 100% copy of ATIMA physics.
see CREDITS for more details. see CREDITS for more details.
The WebAtima UI to this library can be found here: The WebAtima UI to this library can be found here:
* https://web-docs.gsi.de/~aprochaz/webatima (only inside GSI) * https://web-docs.gsi.de/~aprochaz/webatima (only inside GSI)
* https://isotopea.com/webatima * https://isotopea.com/webatima
@ -22,6 +22,15 @@ CMake is used to build the library. For default build use:
> make > make
``` ```
after the compilation the libraries and headers must be either installed system-wide by make install or PATH and LD_LIBRARY_PATH must be adjusted to point to headers and library files.
The default install path can be change, ie: cmake -DCMAKE_INSTALL_PREFIX=/opt/catima
the option to system-wide installation is to adjust library path and include paths.
This can be done sourcing the init.sh file, which is generated in the build directory:
```
> source init.sh
```
cmake options cmake options
------------- -------------
compile options, enable or disable with cmake: compile options, enable or disable with cmake:
@ -30,21 +39,15 @@ compile options, enable or disable with cmake:
available options: available options:
* BUILD_SHARED_LIBS - if ON shared library is build, otherwise static * BUILD_SHARED_LIBS - if ON shared library is build, otherwise static
* PYTHON_MODULE - enable/disable building of the python bindigs, pybind11 is required to build the catima python module, default OFF * PYTHON_MODULE - enable/disable building of the python bindigs, pybind11 is required to build the catima python module, default OFF
* TESTS - build tests * APPS - build command line app, default ON
* EXAMPLES - build examples * TESTS - build tests, default OFF
* EXAMPLES - build examples, default OFF
* DOCS - prepare doxygen documentation (after cmake, __make docs__ needs to be executed) * DOCS - prepare doxygen documentation (after cmake, __make docs__ needs to be executed)
* GENERATE_DATA - makes program to re-generate precalculated tables (ie precalculated LS coefficients), default:OFF * GENERATE_DATA - makes program to re-generate precalculated tables (ie precalculated LS coefficients), default:OFF
* THIN_TARGET_APPROXIMATION - compile the library with thin target approximation, default: ON * THIN_TARGET_APPROXIMATION - compile the library with thin target approximation, default: ON
* GSL_INTEGRATION - use GSL integration functions, otherwise use built-in integrator, default: OFF * GSL_INTEGRATION - use GSL integration functions, otherwise use built-in integrator, default: OFF
* GLOBAL - compile with GLOBAL code (source not included at the moment, needs to be manually added to __global__ directory, default:OFF) * GLOBAL - compile with GLOBAL code (source not included at the moment, needs to be manually added to __global__ directory, default:OFF)
* STORE_SPLINES - store splines in cache, if disabled datapoints are stored and splines are recreated, default ON
ie: ie:
> cmake -DPYTHON_MODULE=ON -DEXAMPLES=ON ../ > cmake -DPYTHON_MODULE=ON -DEXAMPLES=ON ../
after the compilation the libraries and headers must be either installed system-wide by make install or PATH and LD_LIBRARY_PATH must be adjusted to point to headers and library files.
The default install path can be change, ie: cmake -DCMAKE_INSTALL_PREFIX=/opt/catima
the option to system-wide installation is to adjust library path and include paths.
This can be done sourcing the init.sh file, which is generated in the build directory:
> source init.sh

21
docs/Doxyfile Normal file
View File

@ -0,0 +1,21 @@
PROJECT_NAME = catima
INPUT = ../.
RECURSIVE = NO
GENERATE_HTML = NO
GENERATE_LATEX = NO
GENERATE_XML = YES
XML_OUTPUT = build/doxygenxml
XML_PROGRAMLISTING = YES
MACRO_EXPANSION = YES
EXPAND_ONLY_PREDEF = YES
ALIASES = "rst=\verbatim embed:rst"
ALIASES += "endrst=\endverbatim"
QUIET = YES
WARNINGS = YES
WARN_IF_UNDOCUMENTED = NO
JAVADOC_AUTOBRIEF = NO

23
docs/Makefile Normal file
View File

@ -0,0 +1,23 @@
# Minimal makefile for Sphinx documentation
#
# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = ./
BUILDDIR = build
# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
.PHONY: help Makefile doxy
# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile doxy
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
doxy:
doxygen

52
docs/README.md Normal file
View File

@ -0,0 +1,52 @@
CATima
=======
C++ library for caclulalaton of energy loss, range, angular scattering and time of flight of the particle passing through matter.
The library is based on physics used in the ATIMA code,however its not 100% copy of ATIMA physics.
see CREDITS for more details.
The WebAtima UI to this library can be found here:
* https://web-docs.gsi.de/~aprochaz/webatima (only inside GSI)
* https://isotopea.com/webatima
Installation
------------
CMake is used to build the library. For default build use:
```
> mkdir build
> cd build
> cmake ../
> make
```
after the compilation the libraries and headers must be either installed system-wide by make install or PATH and LD_LIBRARY_PATH must be adjusted to point to headers and library files.
The default install path can be change, ie: cmake -DCMAKE_INSTALL_PREFIX=/opt/catima
Alternative to the system-wide installation is to adjust library path and include paths.
This can be done sourcing the init.sh file, which is generated in the build directory:
```
source init.sh
```
cmake options
-------------
compile options, enable or disable with cmake:
> cmake ../ -D[OPTION]
available options:
* BUILD_SHARED_LIBS - if ON shared library is build, otherwise static
* PYTHON_MODULE - enable/disable building of the python bindigs, pybind11 is required to build the catima python module, default OFF
* APPS - build command line app, default ON
* TESTS - build tests, default OFF
* EXAMPLES - build examples, default OFF
* DOCS - prepare doxygen documentation (after cmake, __make docs__ needs to be executed)
* GENERATE_DATA - makes program to re-generate precalculated tables (ie precalculated LS coefficients), default:OFF
* THIN_TARGET_APPROXIMATION - compile the library with thin target approximation, default: ON
* GSL_INTEGRATION - use GSL integration functions, otherwise use built-in integrator, default: OFF
* GLOBAL - compile with GLOBAL code (source not included at the moment, needs to be manually added to __global__ directory, default:OFF)
* STORE_SPLINES - store splines in cache, if disabled datapoints are stored and splines are recreated, default ON
ie:
> cmake -DPYTHON_MODULE=ON -DEXAMPLES=ON ../

56
docs/conf.py Normal file
View File

@ -0,0 +1,56 @@
# Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Path setup --------------------------------------------------------------
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
# import os
# import sys
# sys.path.insert(0, os.path.abspath('.'))
# -- Project information -----------------------------------------------------
project = 'Catima'
copyright = '2017, A. Prochazka'
author = 'A. Prochazka'
# -- General configuration ---------------------------------------------------
extensions = [
'recommonmark',
'breathe'
]
breathe_projects = {'nurex':'build/doxygenxml/'}
breathe_default_project = 'catima'
breathe_domain_by_extenstion = {'h':'cpp'}
primary_domain = 'cpp'
highlight_language = 'cpp'
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = []
# -- Options for HTML output -------------------------------------------------
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'sphinx_rtd_theme'
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']

26
docs/index.rst Normal file
View File

@ -0,0 +1,26 @@
Catima's documentation
======================
C++ library for caclulalaton of energy loss, range, angular scattering and time of flight of the particle passing through matter.
The library is based on physics used in the ATIMA code,however its not 100% copy of ATIMA physics.
see CREDITS for more details.
The WebAtima UI to this library can be found here:
* https://isotopea.com/webatima
Content
-------
.. toctree::
:maxdepth: 1
:caption: Installation
README
Indices and tables
==================
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`

2428
doxygen.in

File diff suppressed because it is too large Load Diff