]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Start dependence graph of example steps
authorkanschat <kanschat@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 21 Oct 2009 17:45:18 +0000 (17:45 +0000)
committerkanschat <kanschat@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 21 Oct 2009 17:45:18 +0000 (17:45 +0000)
git-svn-id: https://svn.dealii.org/trunk@19982 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/doc/doxygen/tutorial/Makefile
deal.II/doc/doxygen/tutorial/steps.pl [new file with mode: 0644]

index 6c06fae27c3d37122d7e9778478e16d6fe843572..91b6ae13acd40727f6d5320d1730489d64d55c24 100644 (file)
@@ -4,7 +4,6 @@
 # include paths and global variables
 include ../../../common/Make.global_options
 
-
 # plain names of those files that we shall treat
 example-names = $(notdir $(shell echo $D/examples/step-? \
                                       $D/examples/step-??))
@@ -29,7 +28,14 @@ example-dox-plain  = $(addsuffix _plain.dox,$(gen-example-names))
 example-doxygen     = $(addprefix doxygen/,$(addsuffix .h,$(example-names)))
 
 
+# generate dot file
 
+steps.dot: steps.pl
+       perl $< > $@
+steps.png: steps.dot
+       neato -Tpng -Timap -O $<
+       @mv steps.dot.png steps.png
+       @mv steps.dot.imap steps.imap
 
 
 # a makefile command that extracts the base name of a program
diff --git a/deal.II/doc/doxygen/tutorial/steps.pl b/deal.II/doc/doxygen/tutorial/steps.pl
new file mode 100644 (file)
index 0000000..3a99b9a
--- /dev/null
@@ -0,0 +1,87 @@
+######################################################################
+# $Id$
+######################################################################
+#
+# Copyright (c) the deal.II authors 2009
+#
+######################################################################
+
+use strict;
+
+my $laststep = 38;
+
+my $essential = ',fillcolor="red"';
+my $technique = ',fillcolor="orange"';
+my $application = ',fillcolor="yellow"';
+my $unfinished = ',style="dashed"';
+
+# List of additional node attributes to highlight purpose and state of the example
+
+my %attribute = (
+    1 => $essential,
+    2 => $essential,
+    3 => $essential,
+    4 => $essential,
+    5 => $essential,
+    6 => $essential,
+    7 => $technique,
+    8 => $technique,
+    9 => $technique,
+    10 => $technique,
+    11 => $technique,
+    17 => $technique,
+    35 => $application,
+    38 => $unfinished
+    );
+
+# Print a preamble setting common attributes
+
+print << 'EOT'
+digraph G
+{
+  edge [fontname="FreeSans",fontsize="10",labelfontname="FreeSans",labelfontsize="10",color="black",style="solid"];
+  node [fontname="FreeSans",fontsize="10",shape=record,height=0.2,width=0.4,color="black",fillcolor="white",style="filled"];
+  
+EOT
+    ;
+
+# print all nodes
+
+for (my $i=1; $i<=$laststep;++$i)
+{
+    printf 'Step%02d [label="Step %d", URL="step_%d.html"', $i, $i, $i;
+    print $attribute{$i};
+    print "];\n";
+}
+
+# Print all edges
+# Keep sorted by second node on edge!
+
+print << 'EOT'
+
+    Step01 -> Step02;
+Step02 -> Step03;
+Step03 -> Step04;
+Step04 -> Step05;
+Step05 -> Step06;
+Step06 -> Step07;
+Step06 -> Step08;
+Step06 -> Step09;
+Step06 -> Step10;
+Step10 -> Step11;
+Step06 -> Step12;
+Step05 -> Step16;
+Step12 -> Step38;
+Step38 -> Step12;
+Step06 -> Step13;
+Step06 -> Step14;
+Step06 -> Step15;
+Step06 -> Step16;
+Step06 -> Step17;
+Step08 -> Step18;
+Step06 -> Step19;
+}
+
+EOT
+    ;
+

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.