From: kanschat Date: Wed, 7 Dec 2011 19:56:29 +0000 (+0000) Subject: simpler loops X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=953184d7b926a72d7ce150d3066608da0ae31d7b;p=dealii-svn.git simpler loops git-svn-id: https://svn.dealii.org/trunk@24801 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/source/lac/constraint_matrix.pl b/deal.II/source/lac/constraint_matrix.pl index b12bd001d1..a23637e34c 100644 --- a/deal.II/source/lac/constraint_matrix.pl +++ b/deal.II/source/lac/constraint_matrix.pl @@ -20,11 +20,6 @@ template void ConstraintMatrix::distribute_local_to_global ( const Vector&, const std::vector &, V1&, const FullMatrix&) const; template void ConstraintMatrix::distribute(const V1 &, V1&) const; template void ConstraintMatrix::distribute(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);