## ---------------------------------------------------------------------
##
-## Copyright (C) 2012 - 2015 by the deal.II authors
+## Copyright (C) 2012 - 2016 by the deal.II authors
##
## This file is part of the deal.II library.
##
LIST(APPEND _doxygen_input
${CMAKE_CURRENT_BINARY_DIR}/code-gallery/${_step}.h
)
+ LIST(APPEND _doxygen_input
+ ${CMAKE_CURRENT_BINARY_DIR}/code-gallery/code-gallery.h
+ )
ENDFOREACH()
+
+ LIST(APPEND _doxygen_depend
+ ${CMAKE_CURRENT_BINARY_DIR}/code-gallery/code-gallery.h
+ )
ENDIF()
TO_STRING(_doxygen_image_path_string ${_doxygen_image_path})
"${DEAL_II_CODE_GALLERY_DIRECTORY}/*/doc/author")
STRING(REGEX REPLACE "/+doc/+author" "" _code_gallery_names "${_code_gallery_names}")
- # Now set up targets for each of the code gallery programs
+ FOREACH(_step ${_code_gallery_names})
+ GET_FILENAME_COMPONENT(_step "${_step}" NAME)
+ LIST(APPEND _code_gallery_names_sans_dir "${_step}")
+ ENDFOREACH()
+ # Describe how to build code-gallery.h:
+ ADD_CUSTOM_COMMAND(
+ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/code-gallery.h
+ COMMAND ${PERL_EXECUTABLE}
+ ARGS
+ ${CMAKE_SOURCE_DIR}/doc/doxygen/scripts/code-gallery.pl
+ ${CMAKE_CURRENT_SOURCE_DIR}/code-gallery.h.in
+ ${DEAL_II_CODE_GALLERY_DIRECTORY}
+ ${_code_gallery_names_sans_dir}
+ > ${CMAKE_CURRENT_BINARY_DIR}/code-gallery.h
+ DEPENDS
+ ${CMAKE_SOURCE_DIR}/doc/doxygen/scripts/code-gallery.pl
+ ${CMAKE_CURRENT_SOURCE_DIR}/code-gallery.h.in
+ ${_code_gallery_names}
+ )
+ ADD_CUSTOM_TARGET(build_code-gallery_h
+ DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/code-gallery.h)
+ ADD_DEPENDENCIES(code-gallery build_code-gallery_h)
+
+
+ # Now set up targets for each of the code gallery programs
FOREACH(_step ${_code_gallery_names})
GET_FILENAME_COMPONENT(_step "${_step}" NAME)
MESSAGE(STATUS " Setting up ${_step}")
--- /dev/null
+// ---------------------------------------------------------------------
+//
+// Copyright (C) 2016 by the deal.II authors
+//
+// This file is part of the deal.II library.
+//
+// The deal.II library is free software; you can use it, redistribute
+// it, and/or modify it under the terms of the GNU Lesser General
+// Public License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+// The full text of the license can be found in the file LICENSE at
+// the top level of the deal.II distribution.
+//
+// ---------------------------------------------------------------------
+
+
+/**
+ * @page CodeGallery The deal.II code gallery
+ *
+ * The deal.II code gallery contains a collection of programs based on deal.II
+ * that were contributed by others to serve as starting points for more complex
+ * applications. The code gallery is an extension of the @ref Tutorial "tutorial"
+ * in that the programs are intended to show how applications can be
+ * implemented with deal.II, but without the requirement to have these code
+ * documented at the same, extensive level as used in the tutorial.
+ * Instructions for obtaining the code gallery programs can be found at
+ * http://dealii.org/code-gallery.html .
+ *
+ * @note The programs that form part of the code gallery are contributed by
+ * others and are not part of deal.II itself. The deal.II authors make
+ * no assurances that these programs are documented in any reasonable way,
+ * nor that the programs are in fact correct. Please contact the authors
+ * of the code gallery programs if you have questions.
+ *
+ * The code gallery currently consists of the following programs (with
+ * connections to other programs shown in the graph on the
+ * @ref TutorialConnectionGraph "tutorial page"):
+ *
+@@GALLERY_LIST@@
+ */
--- /dev/null
+## ---------------------------------------------------------------------
+##
+## Copyright (C) 2016 by the deal.II authors
+##
+## This file is part of the deal.II library.
+##
+## The deal.II library is free software; you can use it, redistribute
+## it, and/or modify it under the terms of the GNU Lesser General
+## Public License as published by the Free Software Foundation; either
+## version 2.1 of the License, or (at your option) any later version.
+## The full text of the license can be found in the file LICENSE at
+## the top level of the deal.II distribution.
+##
+## ---------------------------------------------------------------------
+
+use strict;
+
+my $gallery_file = shift;
+open GALLERY, "<$gallery_file";
+
+my $gallery_dir = shift;
+
+
+# Print the first part of gallery.h.in up until the point where we
+# find the line with '@@GALLERY_LIST@@'
+while (my $line = <GALLERY>)
+{
+ last if($line =~ m/\@\@GALLERY_LIST\@\@/);
+ print $line;
+}
+
+# print the list of code gallery programs as a descriptor/description
+# list
+print "<dl>\n";
+foreach my $gallery (sort @ARGV)
+{
+ my $gallery_underscore = $gallery;
+ $gallery_underscore =~ s/-/_/;
+ print " <dt><b>\@ref code_gallery_${gallery_underscore} \"$gallery\"</b></dt>\n";
+ print " <dd>\n";
+ open TOOLTIP, "<$gallery_dir/$gallery/doc/tooltip";
+ while (my $line = <TOOLTIP>) {
+ print " $line";
+ }
+ print " </dd>\n";
+ print "\n";
+}
+print "</dl>\n";
+
+
+# Then print the rest of code-gallery.h.in
+while (my $line = <GALLERY>)
+{
+ print $line;
+}
+close GALLERY;
\@endhtmlonly
-This program consists of the following files (click to inspect):
+This program is part of the \@ref CodeGallery \"deal.II code gallery\" and
+consists of the following files (click to inspect):
";
foreach my $file (@src_files)
// ---------------------------------------------------------------------
//
-// Copyright (C) 2005 - 2015 by the deal.II authors
+// Copyright (C) 2005 - 2016 by the deal.II authors
//
// This file is part of the deal.II library.
//
* synopsis of each program.
* <li> or <b><a href="#topic">grouped by topic</a></b>.
* </ol>
- * Some of the programs also jointly form
- * the <a href="../../doxygen/deal.II/group__geodynamics.html">geodynamics
- * demonstration suite</a>.
*
* The programs are in the <code>examples/</code> directory of your local
* deal.II installation. After compiling the library itself, if you go into
* different directories are based on the
* <a href="../../users/cmakelists.html" target="_top">small program Makefile template</a>.
*
+ * @note Some of the tutorial programs also jointly form
+ * the <a href="../../doxygen/deal.II/group__geodynamics.html">geodynamics
+ * demonstration suite</a>. More, often more complex but less well documented,
+ * deal.II-based programs than the ones that form the tutorial can also be
+ * found in the @ref CodeGallery .
+ *
+ *
* <a name="graph"></a>
+ * @anchor TutorialConnectionGraph
* <h3>Connections between tutorial programs</h3>
*
* The following graph shows the connections between tutorial programs and