]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
bug removed
authorguido <guido@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 10 Nov 2000 11:10:50 +0000 (11:10 +0000)
committerguido <guido@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 10 Nov 2000 11:10:50 +0000 (11:10 +0000)
git-svn-id: https://svn.dealii.org/trunk@3477 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/base/source/function_lib.cc
deal.II/base/source/parameter_handler.cc

index 03eaca928a179d9b8a1a32e64715dcf52bfca440..b27e0e391fb060c49d16b807e427eacdd6b2396c 100644 (file)
@@ -799,7 +799,7 @@ double
 JumpFunction<dim>::value (const Point<dim>   &p,
                          const unsigned int) const
 {
-  double x = steepness*(cosine*p(0)+sine*p(1));
+  double x = steepness*(-cosine*p(0)+sine*p(1));
   return -atan(x);
 }
 
@@ -816,7 +816,7 @@ JumpFunction<dim>::value_list (const vector<Point<dim> > &p,
 
   for (unsigned int i=0;i<p.size();++i)
     {
-      double x = steepness*(cosine*p[i](0)+sine*p[i](1));
+      double x = steepness*(-cosine*p[i](0)+sine*p[i](1));
       values[i] = -atan(x);
     }
 }
@@ -827,7 +827,7 @@ double
 JumpFunction<dim>::laplacian (const Point<dim>   &p,
                              const unsigned int) const
 {
-  double x = steepness*(cosine*p(0)+sine*p(1));
+  double x = steepness*(-cosine*p(0)+sine*p(1));
   double r = 1+x*x;
   return 2*steepness*steepness*x/(r*r);
 }
@@ -846,7 +846,7 @@ JumpFunction<dim>::laplacian_list (const vector<Point<dim> > &p,
   
   for (unsigned int i=0;i<p.size();++i)
     {
-      double x = steepness*(cosine*p[i](0)+sine*p[i](1));
+      double x = steepness*(-cosine*p[i](0)+sine*p[i](1));
       double r = 1+x*x;
       values[i] = f*x/(r*r);
     }
@@ -859,7 +859,7 @@ Tensor<1,dim>
 JumpFunction<dim>::gradient (const Point<dim>   &p,
                             const unsigned int) const
 {
-  double x = steepness*(cosine*p(0)+sine*p(1));
+  double x = steepness*(-cosine*p(0)+sine*p(1));
   double r = -steepness*(1+x*x);
   Tensor<1,dim> erg;
   erg[0] = cosine*r;
index 94286d487f41d1f856db43840cd68a644e1f1106..9b49941a220ab99c2d60042243200858905ae217 100644 (file)
@@ -775,20 +775,19 @@ void ParameterHandler::log_parameters_section (LogStream           &out)
                                   // traverse entry list
   Section::EntryType::const_iterator ptr;
 
-                                  // first find out the longest entry name
-  unsigned int longest_entry = 0;
-  for (ptr = pd->entries.begin(); ptr != pd->entries.end(); ++ptr)
-    if (ptr->first.length() > longest_entry)
-      longest_entry = ptr->first.length();
-
                                   // print entries one by one
   for (ptr = pd->entries.begin(); ptr != pd->entries.end(); ++ptr)
     {
+      if ((pc->entries.find(ptr->first) != pc->entries.end()) &&
+         (pc->entries[ptr->first].first != pd->entries[ptr->first].first))
                                       // check whether this entry is listed
                                       // in the Changed tree and actually
                                       // differs from the default value
-      out << ptr->first << setw(longest_entry-ptr->first.length()+2) << "= "
-         << ptr->second.first << endl;
+         out << ptr->first << ": "
+             << pc->entries[ptr->first].first << endl;
+      else
+         out << ptr->first << ": "
+             << ptr->second.first << endl;
     };
 
 

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.