Skip to content
Snippets Groups Projects
Commit c9205ac9 authored by Elias Pipping's avatar Elias Pipping Committed by Elias Pipping
Browse files

Strip Dune:: from anything within that namespace

parent 56a6b697
No related branches found
No related tags found
No related merge requests found
......@@ -15,8 +15,8 @@
namespace Dune {
template <int dimension> class MyNonlinearity {
public:
typedef Dune::FieldVector<double, dimension> VectorType;
typedef Dune::FieldMatrix<double, dimension, dimension> MatrixType;
typedef FieldVector<double, dimension> VectorType;
typedef FieldMatrix<double, dimension, dimension> MatrixType;
MyNonlinearity(NiceFunction const &func) : func_(func) {}
......
......@@ -16,8 +16,8 @@
namespace Dune {
template <int dimension> class SampleFunctional {
public:
typedef Dune::FieldVector<double, dimension> SmallVector;
typedef Dune::FieldMatrix<double, dimension, dimension> SmallMatrix;
typedef FieldVector<double, dimension> SmallVector;
typedef FieldMatrix<double, dimension, dimension> SmallMatrix;
typedef MyNonlinearity<dimension> NonlinearityType;
......@@ -64,19 +64,19 @@ template <int dimension> class SampleFunctional {
return;
} else if (pgx >= 0 && mgx >= 0) {
ret = pg;
Dune::dverb << "## Directional derivative (as per scalar product w/ "
"semigradient): " << -(ret * mg)
<< " (coordinates of the restriction)" << std::endl;
dverb << "## Directional derivative (as per scalar product w/ "
"semigradient): " << -(ret * mg)
<< " (coordinates of the restriction)" << std::endl;
} else if (pgx <= 0 && mgx <= 0) {
ret = mg;
Dune::dverb << "## Directional derivative (as per scalar product w/ "
"semigradient): " << -(ret * pg)
<< " (coordinates of the restriction)" << std::endl;
dverb << "## Directional derivative (as per scalar product w/ "
"semigradient): " << -(ret * pg)
<< " (coordinates of the restriction)" << std::endl;
} else {
ret = project(smoothGradient(x), x);
Dune::dverb << "## Directional derivative (as per scalar product w/ "
"semigradient): " << -(ret * ret)
<< " (coordinates of the restriction)" << std::endl;
dverb << "## Directional derivative (as per scalar product w/ "
"semigradient): " << -(ret * ret)
<< " (coordinates of the restriction)" << std::endl;
}
ret *= -1;
}
......@@ -156,7 +156,7 @@ void minimise(const Functional J, const typename Functional::SmallVector x,
{ // Debug
Interval<double> D;
JRest.subDiff(0, D);
Dune::dverb
dverb
<< "## Directional derivative (as per subdifferential of restriction): "
<< D[1] << " (coordinates of the restriction)" << std::endl;
assert(D[1] <=
......@@ -168,8 +168,8 @@ void minimise(const Functional J, const typename Functional::SmallVector x,
int count;
// FIXME: The value of x_old should not matter if the factor is 1.0, correct?
double const stepsize = bisection.minimize(JRest, 0.0, 1.0, count);
Dune::dverb << "Number of iterations in the bisection method: " << count
<< std::endl;
dverb << "Number of iterations in the bisection method: " << count
<< std::endl;
;
corr = descDir;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment