]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
new perl script for instatiating templates
authorkanschat <kanschat@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 1 Dec 2011 21:43:44 +0000 (21:43 +0000)
committerkanschat <kanschat@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 1 Dec 2011 21:43:44 +0000 (21:43 +0000)
git-svn-id: https://svn.dealii.org/trunk@24784 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/common/dealiitemplates.pm.in [new file with mode: 0644]
deal.II/configure
deal.II/configure.in

diff --git a/deal.II/common/dealiitemplates.pm.in b/deal.II/common/dealiitemplates.pm.in
new file mode 100644 (file)
index 0000000..126d598
--- /dev/null
@@ -0,0 +1,93 @@
+######################################################################
+# Definitions for vectors of common template instantiations
+######################################################################
+package dealiitemplates;
+
+use strict;
+use warnings;
+
+BEGIN {
+    use Exporter();
+    our @ISA = qw(Exporter);
+    our @EXPORT = qw(@dimensions @dofhandlers @dofhandler_templates
+                     @real_scalars @complex_scalars @all_scalars
+                     @deal_vector_templates @deal_vectors @deal_real_vectors @deal_complex_vectors
+                     @trilinos_vectors @petsc_vectors
+                     @sequential_vectors @parallel_vectors
+                     @sparsity_patterns);
+}
+our @EXPORT;
+our $t;
+
+# Dimensions
+our @dimensions = (1,2,3);
+
+# DoFHandlers
+our @dofhandler_templates = qw(DoFHandler hp::DoFHandler MGDoFHandler);
+our @dofhandlers = map { $t = $_ ; map { "$_<$t>" } @dofhandler_templates } @dimensions;
+
+# All possible number types
+our @real_scalars = ('float', 'double', 'long double');
+our @complex_scalars = map { "std::complex<$_>" } @real_scalars;
+our @all_scalars = (@real_scalars, @complex_scalars);
+
+# The vectors built into deal.II
+our @deal_vector_templates = qw(Vector BlockVector);
+our @deal_real_vectors = map { $t = $_ ; map { "$_<$t >" } @deal_vector_templates } @real_scalars;
+our @deal_complex_vectors = map { $t = $_ ; map { "$_<$t >" } @deal_vector_templates } @complex_scalars;
+our @deal_vectors = (@deal_real_vectors, @deal_complex_vectors);
+
+### Array of all sequential vectors, which includes deal.II vectors.
+our @sequential_vectors = @deal_real_vectors;
+
+### Array of all parallel vectors. None of those yet.
+our @parallel_vectors;
+
+######################################################################
+# Configured arrays start here.
+######################################################################
+# For each of those, first set up a temporary array with parameters
+# replaced by autoconf. Then, copy into the actual array, omitting all
+# empty strings.
+######################################################################
+our @tmp;
+
+@tmp = ('@DEAL_II_EXPAND_TRILINOS_VECTOR@',
+       '@DEAL_II_EXPAND_TRILINOS_BLOCKVECTOR@',
+       '');
+our @trilinos_vectors = grep {!/^$/} @tmp;
+push(@sequential_vectors, @trilinos_vectors);
+
+@tmp = ('@DEAL_II_EXPAND_TRILINOS_MPI_VECTOR@',
+       '@DEAL_II_EXPAND_TRILINOS_MPI_BLOCKVECTOR@',
+       '');
+push (@trilinos_vectors, grep {!/^$/} @tmp);
+push (@parallel_vectors, grep {!/^$/} @tmp);
+
+######################################################################
+
+@tmp = ('@DEAL_II_EXPAND_PETSC_VECTOR@',
+       '@DEAL_II_EXPAND_PETSC_BLOCKVECTOR@',
+       '');
+our @petsc_vectors = grep {!/^$/} @tmp;
+push(@sequential_vectors, @petsc_vectors);
+
+@tmp = ('@DEAL_II_EXPAND_PETSC_MPI_VECTOR@',
+       '@DEAL_II_EXPAND_PETSC_MPI_BLOCKVECTOR@',
+       '');
+push (@petsc_vectors, grep {!/^$/} @tmp);
+push (@parallel_vectors, grep {!/^$/} @tmp);
+
+######################################################################
+
+@tmp = qw(SparsityPattern
+          CompressedSparsityPattern
+          CompressedSetSparsityPattern
+          CompressedSimpleSparsityPattern
+          @DEAL_II_EXPAND_TRILINOS_SPARSITY_PATTERN@
+          BlockSparsityPattern
+          BlockCompressedSparsityPattern
+          BlockCompressedSetSparsityPattern
+          BlockCompressedSimpleSparsityPattern
+          @DEAL_II_EXPAND_TRILINOS_BLOCK_SPARSITY_PATTERN@);
+our @sparsity_patterns = grep {!/^$/} @tmp;
index ebb640e383c112b8e10c7dd15c7af598cd134fe4..e36ff27349c0331cd75d53b050d91a3b09eafbd8 100755 (executable)
@@ -13884,7 +13884,8 @@ process_files="common/Make.global_options
                common/scripts/make_dependencies.pl
               common/scripts/make_todo.pl
               Version
-               common/template-arguments"
+               common/template-arguments
+               common/dealiitemplates.pm"
 
 if test -d doc ; then
   process_files="${process_files}
index 90dec2dfdb52fd5eca960db7b291a385245efc56..af6240b628524425569ca496b7945c18b69d89de 100644 (file)
@@ -873,7 +873,8 @@ process_files="common/Make.global_options
                common/scripts/make_dependencies.pl
               common/scripts/make_todo.pl
               Version
-               common/template-arguments"
+               common/template-arguments
+               common/dealiitemplates.pm"
 
 dnl Also replace stuff in the doc/ files, but we can't rely on
 dnl their presence because we package the .nodoc.tar.gz files

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.