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);
}
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);
}
}
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);
}
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);
}
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;
// 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;
};