]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
simpler loops
authorkanschat <kanschat@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 7 Dec 2011 19:56:29 +0000 (19:56 +0000)
committerkanschat <kanschat@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 7 Dec 2011 19:56:29 +0000 (19:56 +0000)
git-svn-id: https://svn.dealii.org/trunk@24801 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/source/lac/constraint_matrix.pl

index b12bd001d1bd1d1a3adfa43a17eb9a51e390ffb2..a23637e34ca171aa958a4ef836bbb941ade76eff 100644 (file)
@@ -20,11 +20,6 @@ template void ConstraintMatrix::distribute_local_to_global<V1 > (
     const Vector<double>&, const std::vector<unsigned int> &, V1&, const FullMatrix<double>&) const;
 template void ConstraintMatrix::distribute<V1 >(const V1 &, V1&) const;
 template void ConstraintMatrix::distribute<V1 >(V1 &) const;
-EOT
-    ;
-
-my $scalar_vector_functions = <<'EOT'
-
 EOT
     ;
 
@@ -50,25 +45,6 @@ EOT
 # End of definitions, now come the loops
 ######################################################################
 
-foreach my $v (@sequential_vectors)
-{
-    my $t = $vector_functions;
-    $t =~ s/V1/$v/g;
-    print $t;
-    
-}
-
-foreach my $r1 (@real_scalars)
-{
-    my $t = $scalar_functions;
-    $t =~ s/S1/$r1/g;
-    print $t;
-    
-    foreach my $r2 (@real_scalars)
-    {
-       my $t = $scalar_scalar_functions;
-       $t =~ s/S1/$r1/g;
-       $t =~ s/S2/$r2/g;
-       print $t
-    }
-}
+multisubst($vector_functions, ['V1'], \@sequential_vectors);
+multisubst($scalar_functions, ['S1'], \@real_scalars);
+multisubst($scalar_scalar_functions, ['S1','S2'], \@real_scalars, \@real_scalars);

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.