diff --git a/docs/CMakeLists.txt b/docs/CMakeLists.txt index 666f0a3f85c13c0b565bf371a413e9c022271007..ee2de3d20046577986e4550a88859f30b93a2665 100644 --- a/docs/CMakeLists.txt +++ b/docs/CMakeLists.txt @@ -17,6 +17,7 @@ find_package(Sphinx REQUIRED) #if(NOT ${BREATHE_NOT_FOUND} EQUAL 0) # message( FATAL_ERROR "Python \"breathe\" package not found") #endif() +# todo(s.schulz): Also find recommonmark #do we need to make sure sphinx_rtd_theme is installed? # Find all public headers @@ -37,10 +38,6 @@ set(DOXYGEN_USE_MDFILE_AS_MAINPAGE ${PROJECT_SOURCE_DIR}/README.md) # configure doxygen config file configure_file(${DOXYFILE_IN} ${DOXYFILE_OUT} @ONLY) -set(SPHINX_IN ${CMAKE_CURRENT_SOURCE_DIR}/conf.py.in) -set(SPHINX_OUT ${CMAKE_CURRENT_BINARY_DIR}/conf.py) -configure_file(${SPHINX_IN} ${SPHINX_OUT} @ONLY) - # create doxygen output directory file(MAKE_DIRECTORY ${DOXYGEN_OUTPUT_DIR}) @@ -60,12 +57,17 @@ set(SPHINX_SOURCE ${CMAKE_CURRENT_SOURCE_DIR}) set(SPHINX_BUILD ${CMAKE_CURRENT_BINARY_DIR}/sphinx) set(SPHINX_INDEX_FILE ${SPHINX_BUILD}/index.html) +set(SPHINX_IN ${CMAKE_CURRENT_SOURCE_DIR}/conf.py.in) +set(SPHINX_OUT ${CMAKE_CURRENT_BINARY_DIR}/conf.py) +set(SPHINX_BREATHE_PROJECT_PATH ${DOXYGEN_OUTPUT_DIR}/xml) +configure_file(${SPHINX_IN} ${SPHINX_OUT} @ONLY) + +# todo(s.schulz): Add dependencies to all .rst files add_custom_command(OUTPUT ${SPHINX_INDEX_FILE} COMMAND ${SPHINX_EXECUTABLE} -b html - -Dbreathe_projects.ALL=${DOXYGEN_OUTPUT_DIR}/xml - -c "${CMAKE_CURRENT_BINARY_DIR}" + -c "${CMAKE_CURRENT_BINARY_DIR}" ${SPHINX_SOURCE} ${SPHINX_BUILD} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} DEPENDS diff --git a/docs/api/ALL.rst b/docs/api/ALL.rst new file mode 100644 index 0000000000000000000000000000000000000000..b91fc10ec25d21e7946952baa34f9d7525a1548a --- /dev/null +++ b/docs/api/ALL.rst @@ -0,0 +1,8 @@ +.. _ALLClass: + +ALL class +========= + +.. doxygenclass:: ALL::ALL + +.. vim: et sw=2 ts=2 tw=74 spell spelllang=en_us: diff --git a/docs/api/ALL_Point.rst b/docs/api/ALL_Point.rst new file mode 100644 index 0000000000000000000000000000000000000000..1ff5eaa6366e48e54170e22e0d26449b9228da1e --- /dev/null +++ b/docs/api/ALL_Point.rst @@ -0,0 +1,8 @@ +.. _PointClass: + +Point class +=========== + +.. doxygenclass:: ALL::Point + +.. vim: et sw=2 ts=2 tw=74 spell spelllang=en_us: diff --git a/docs/api/ALL_module.rst b/docs/api/ALL_module.rst new file mode 100644 index 0000000000000000000000000000000000000000..6d889eba04631945da726cf9470c16ee0b46876e --- /dev/null +++ b/docs/api/ALL_module.rst @@ -0,0 +1,87 @@ +.. _ALLModule: + +ALL Fortran module +================== + +Due to the case insensitive nature of Fortran and the used toolchain +(doxygen and sphinx), all variables and function names are lowercase on +this page. We do, however, use only upper case for global constants, such +as the load balancing methods (``ALL_STAGGERED`` etc.) and the function +names are usually written similarly to MPI as ``ALL_get_work``. The object +is of ``type(ALL_t)``. + +Methods +------- +Available methods are: + +.. doxygenvariable:: all_histogram +.. doxygenvariable:: all_staggered +.. doxygenvariable:: all_tensor +.. doxygenvariable:: all_unstructured +.. doxygenvariable:: all_voronoi + + +Errors +------ +The exceptions map to the following error constants: + +.. doxygenvariable:: all_error_filesystem +.. doxygenvariable:: all_error_generic +.. doxygenvariable:: all_error_internal +.. doxygenvariable:: all_error_invalidargument +.. doxygenvariable:: all_error_invalidcommtype +.. doxygenvariable:: all_error_outofbounds +.. doxygenvariable:: all_error_pointdimensionmissmatch + +And the error message is returned in a string of length +``ALL_ERROR_LENGTH``. + +Functions +--------- +These function all have a corresponding call in the object, with the +``ALL_`` stripped from the function name. So with an object named +``balancer`` the function ``ALL_get_work(balancer, work)`` is identical to +``balancer%get_work(work)``. The following functions are available: + +.. doxygenfunction:: all_balance +.. doxygenfunction:: all_finalize +.. doxygenfunction:: all_setup + +Getters +******* +.. doxygenfunction:: all_get_dimension +.. doxygenfunction:: all_get_gamma +.. doxygenfunction:: all_get_length_of_work +.. doxygenfunction:: all_get_neighbors +.. doxygenfunction:: all_get_number_of_neighbors +.. doxygenfunction:: all_get_number_of_vertices +.. doxygenfunction:: all_get_prev_vertices +.. doxygenfunction:: all_get_vertices +.. doxygenfunction:: all_get_vertices_alloc +.. doxygenfunction:: all_get_work +.. doxygenfunction:: all_get_work_array + +Setters +******* +.. doxygenfunction:: all_set_gamma +.. doxygenfunction:: all_set_method_data_histgram +.. doxygenfunction:: all_set_min_domain_size +.. doxygenfunction:: all_set_proc_grid_params +.. doxygenfunction:: all_set_proc_tag +.. doxygenfunction:: all_set_sys_size +.. doxygenfunction:: all_set_vertices +.. doxygenfunction:: all_set_work +.. doxygenfunction:: all_set_work_multi + +Output +****** +.. doxygenfunction:: all_print_vtk_outlines +.. doxygenfunction:: all_print_vtk_vertices + +Error handling +************** +.. doxygenfunction:: all_error +.. doxygenfunction:: all_error_description +.. doxygenfunction:: all_reset_error + +.. vim: et sw=2 ts=2 tw=74 spell spelllang=en_us: diff --git a/docs/api/CustomExceptions.rst b/docs/api/CustomExceptions.rst new file mode 100644 index 0000000000000000000000000000000000000000..d6d55b12e66b250ec439fa2a2881270bfaf1a652 --- /dev/null +++ b/docs/api/CustomExceptions.rst @@ -0,0 +1,44 @@ +.. _CustomExceptions: + +Custom Exceptions +================= + +The library may throw one of these exceptions, which are all based on +``ALL::CustomException``. + +``CustomException`` +------------------- +.. doxygenstruct:: ALL::CustomException + :outline: + +``FilesystemErrorException`` +**************************** +.. doxygenstruct:: ALL::FilesystemErrorException + :outline: + +``InternalErrorException`` +**************************** +.. doxygenstruct:: ALL::InternalErrorException + :outline: + +``InvalidArgumentException`` +**************************** +.. doxygenstruct:: ALL::InvalidArgumentException + :outline: + +``InvalidCommTypeException`` +**************************** +.. doxygenstruct:: ALL::InvalidCommTypeException + :outline: + +``OutOfBoundsException`` +**************************** +.. doxygenstruct:: ALL::OutOfBoundsException + :outline: + +``PointDimensionMissmatchException`` +**************************** +.. doxygenstruct:: ALL::PointDimensionMissmatchException + :outline: + +.. vim: et sw=2 ts=2 tw=74 spell spelllang=en_us: diff --git a/docs/api/index.rst b/docs/api/index.rst new file mode 100644 index 0000000000000000000000000000000000000000..b64f7c3076ef0eea794985a57a54c45fb4f02776 --- /dev/null +++ b/docs/api/index.rst @@ -0,0 +1,16 @@ +Public API Reference +==================== + +.. toctree:: + :maxdepth: 2 + :caption: API + + ALL.rst + CustomExceptions.rst + ALL_Point.rst + ALL_module.rst + +These pages should give a short overview of the public API + + +.. vim: et sw=2 ts=2 tw=74 spell spelllang=en_us: diff --git a/docs/classes/ALL.rst b/docs/classes/ALL.rst deleted file mode 100644 index 468be03d19874715e434dde8e80fcb833a73f7c7..0000000000000000000000000000000000000000 --- a/docs/classes/ALL.rst +++ /dev/null @@ -1,9 +0,0 @@ -=== -ALL -=== - -.. doxygenclass:: ALL::ALL - :members: - :protected-members: - :private-members: - :undoc-members: diff --git a/docs/classes/ALL_Functions.rst b/docs/classes/ALL_Functions.rst deleted file mode 100644 index 4e7289629167e22ae05daa02f7fd92576d215e26..0000000000000000000000000000000000000000 --- a/docs/classes/ALL_Functions.rst +++ /dev/null @@ -1,7 +0,0 @@ -====================== -ALL_Functions overview -====================== - -.. doxygennamespace:: ALL::Functions - :project: ALL - diff --git a/docs/classes/ALL_Histogram.rst b/docs/classes/ALL_Histogram.rst deleted file mode 100644 index 8e2fafa05b06737f76c26a34fc587a9fdb2252dd..0000000000000000000000000000000000000000 --- a/docs/classes/ALL_Histogram.rst +++ /dev/null @@ -1,10 +0,0 @@ -============= -ALL_Histogram -============= - -.. doxygenclass:: ALL::Histogram_LB - :members: - :protected-members: - :private-members: - :undoc-members: - diff --git a/docs/classes/ALL_LB.rst b/docs/classes/ALL_LB.rst deleted file mode 100644 index d065513c098499ef66e31d42dce97b227fa48c12..0000000000000000000000000000000000000000 --- a/docs/classes/ALL_LB.rst +++ /dev/null @@ -1,9 +0,0 @@ -============= -ALL_LB -============= - -.. doxygenclass:: ALL::LB - :members: - :protected-members: - :private-members: - :undoc-members: diff --git a/docs/classes/ALL_Point.rst b/docs/classes/ALL_Point.rst deleted file mode 100644 index 76a95c0fbf2d16549531d33d9811d860491995d3..0000000000000000000000000000000000000000 --- a/docs/classes/ALL_Point.rst +++ /dev/null @@ -1,9 +0,0 @@ -============= -ALL_Point -============= - -.. doxygenclass:: ALL::Point - :members: - :protected-members: - :private-members: - :undoc-members: diff --git a/docs/classes/ALL_Staggered.rst b/docs/classes/ALL_Staggered.rst deleted file mode 100644 index 2889690c8d5762f081524f86c5f2753d03257426..0000000000000000000000000000000000000000 --- a/docs/classes/ALL_Staggered.rst +++ /dev/null @@ -1,10 +0,0 @@ -============= -ALL_Staggered -============= - -.. doxygenclass:: ALL::Staggered_LB - :members: - :protected-members: - :private-members: - :undoc-members: - diff --git a/docs/classes/ALL_Tensor.rst b/docs/classes/ALL_Tensor.rst deleted file mode 100644 index 5386fc0ebd880908587e1befe31a78f61055ca0b..0000000000000000000000000000000000000000 --- a/docs/classes/ALL_Tensor.rst +++ /dev/null @@ -1,9 +0,0 @@ -========== -ALL_Tensor -========== - -.. doxygenclass:: ALL::Tensor_LB - :members: - :private-members: - :protected-members: - :undoc-members: diff --git a/docs/classes/ALL_Voronoi.rst b/docs/classes/ALL_Voronoi.rst deleted file mode 100644 index 03bd94009ba0b9235d012cc8c7322d3c9bbd185e..0000000000000000000000000000000000000000 --- a/docs/classes/ALL_Voronoi.rst +++ /dev/null @@ -1,9 +0,0 @@ -=========== -ALL_Voronoi -=========== - -.. doxygenclass:: ALL::Voronoi_LB - :members: - :private-members: - :protected-members: - :undoc-members: diff --git a/docs/conf.py.in b/docs/conf.py.in index 1a8868ae854b8a31dd3896b42a8dd104550b3f38..f43ddc6fafc0306475fd7b72cfd91d2e78e8c350 100644 --- a/docs/conf.py.in +++ b/docs/conf.py.in @@ -13,13 +13,16 @@ # import os # import sys # sys.path.insert(0, os.path.abspath('.')) +from recommonmark.parser import CommonMarkParser # -- Project information ----------------------------------------------------- -project = 'ALL' +project = '@PROJECT_NAME@' copyright = '2020, Rene Halver, Forschungszentrum Juelich GmbH' author = 'Rene Halver' +version = '@PROJECT_VERSION_MAJOR@.@PROJECT_VERSION_MINOR@' +release = '@PROJECT_VERSION_MAJOR@.@PROJECT_VERSION_MINOR@.@PROJECT_VERSION_PATCH@' # -- General configuration --------------------------------------------------- @@ -32,6 +35,9 @@ extensions = [ "breathe" ] # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] +source_parseres = { '.md': CommonMarkParser } +source_suffix = ['.rst', '.md'] + # 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. @@ -50,5 +56,12 @@ html_theme = 'sphinx_rtd_theme' # so a file named "default.css" will overwrite the builtin "default.css". html_static_path = ['_static'] +html_theme_options = { + 'sticky_navigation': True, + 'style_external_links': True, +} + # Breath Config -breathe_default_project = "ALL" \ No newline at end of file +breathe_projects = {"ALL":"@SPHINX_BREATHE_PROJECT_PATH@"} +breathe_default_project = "ALL" +breathe_default_members = ('members', 'undoc-members') diff --git a/docs/full/complete.rst b/docs/full/complete.rst deleted file mode 100644 index 0155ae66a342c030ae1609ac485940a1c7182d99..0000000000000000000000000000000000000000 --- a/docs/full/complete.rst +++ /dev/null @@ -1,7 +0,0 @@ -.. .. _classes/FullDocumentation - -.. ================== -.. Full Documentation -.. ================== - -.. .. doxygenindex:: \ No newline at end of file diff --git a/docs/index.rst b/docs/index.rst index 55c09b18cf0061cddef79202748ee12138180757..71ffe992170636f983b2553d42a426052b1c53f2 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -3,22 +3,16 @@ You can adapt this file completely to your liking, but it should at least contain the root `toctree` directive. -Welcome to ALL auto generated documentation! -============================================ +Welcome to the documentation of ALL +=================================== .. toctree:: - :maxdepth: 2 - :caption: Contents: - :glob: + :maxdepth: 2 + :caption: Contents: - classes/* + api/index.rst -.. .. toctree:: -.. :maxdepth: 2 -.. :caption: Full documentation: -.. :glob: - -.. full/* +todo(s.schulz): Link to doxygen documentation. Indices and tables ================== @@ -28,3 +22,4 @@ Indices and tables .. * :ref:`modindex` +.. vim: et sw=2 ts=2 tw=74 spell spelllang=en_us: