Skip to content

Commit

Permalink
Merge branch 'mylittlengs_docu' into 'master'
Browse files Browse the repository at this point in the history
Mylittlengs docu

See merge request jschoeberl/ngsolve!276
  • Loading branch information
JSchoeberl committed Dec 15, 2017
2 parents 0a6489c + a53732e commit 419f36b
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
@@ -1 +1,2 @@
*~
/docs/mylittlengs
24 changes: 24 additions & 0 deletions docs/CMakeLists.txt
@@ -1,6 +1,26 @@
if (NETGEN_USE_PYTHON)
find_package(Sphinx)
if(SPHINX_FOUND)

# windows cannot handle symlinks and therefore not build c++ docu
if(NOT WIN32)
ExternalProject_Add(
mylittlengs
GIT_REPOSITORY https://github.com/NGSolve/mylittlengsolve.git
TIMEOUT 10
UPDATE_COMMAND ${GIT_EXECUTABLE} pull
CONFIGURE_COMMAND ""
BUILD_COMMAND ""
INSTALL_COMMAND ""
)
ExternalProject_Get_Property(mylittlengs source_dir)

add_custom_target(link_mylittlengs
COMMAND ${CMAKE_COMMAND} -E create_symlink "${source_dir}" "${CMAKE_CURRENT_SOURCE_DIR}/mylittlengs"
)
add_dependencies(link_mylittlengs mylittlengs)
endif(NOT WIN32)

# configured documentation tools and intermediate build results
set(BINARY_BUILD_DIR "${CMAKE_CURRENT_BINARY_DIR}/_build")

Expand Down Expand Up @@ -36,6 +56,10 @@ if (NETGEN_USE_PYTHON)
"${SPHINX_OUTPUT_DIR}/latex"
COMMENT "Building Latex documentation with Sphinx")

if(NOT WIN32)
add_dependencies(docs link_mylittlengs)
add_dependencies(docs_latex link_mylittlengs)
endif(NOT WIN32)

message("Sphinx found, you can build the documentation with make docu")
else(SPHINX_FOUND)
Expand Down
4 changes: 3 additions & 1 deletion docs/conf.py
Expand Up @@ -33,7 +33,7 @@
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
# extensions = ["sphinx.ext.autodoc","numpydoc","sphinx.ext.autosummary","sphinx.ext.napoleon","sphinx.ext.intersphinx"]
extensions = ["sphinx.ext.autodoc","sphinx.ext.mathjax"]
extensions = ["sphinx.ext.autodoc","sphinx.ext.mathjax","sphinx.ext.todo"]


# autosummary_generate = True
Expand Down Expand Up @@ -181,5 +181,7 @@
"""

todo_include_todos = True

def setup(app):
app.add_stylesheet("custom.css")
2 changes: 1 addition & 1 deletion docs/how_to/howto_definedon.rst
@@ -1,5 +1,5 @@
Spaces and forms on sub-domains
======================
=================================

We can define finite element spaces and forms on sub-domains. This is in particular useful for multi-physics.

Expand Down
8 changes: 8 additions & 0 deletions docs/index.rst
Expand Up @@ -75,6 +75,14 @@ interface to Python is inspired by the `FEniCS project <https://fenicsproject.or

.. * [Iterating over elements]
.. include:: mylittlengs/README.rst

.. toctree::
:maxdepth: 1
:caption: C++ Tutorials

mylittlengs/1_Basic/basic
mylittlengs/2_Advanced/advanced

.. toctree::
:maxdepth: 1
Expand Down

0 comments on commit 419f36b

Please sign in to comment.