Commit fb2bb077 authored by Elias Pipping's avatar Elias Pipping
Browse files

Fix test compilation

dune/common/fassign.hh is gone for good
parent e6290c2b
......@@ -6,7 +6,6 @@
#include <dune/common/fmatrix.hh>
#include <dune/common/fvector.hh>
#include <dune/common/fassign.hh>
#include <dune/tnnmg/nonlinearities/inteuklid.hh>
#include <dune/tnnmg/nonlinearities/pnorm.hh>
......@@ -54,7 +53,7 @@ main()
std::cout << "Testing gradients" << std::endl;
{
MyVector v; v <<= 1.0, 2.0;
MyVector v = { 1.0, 2.0 };
// Since the two functions coincide, so should their derivatives.
MyVector grad_p1_1 = f_p1_1.d(v);
......@@ -70,7 +69,7 @@ main()
}
std::cout << "Testing Hessians" << std::endl;
{
MyVector v; v <<= 1.0, 2.0;
MyVector v = { 1.0, 2.0 };
// Since the two functions coincide, so should their Hessians
MyMatrix hess_p1_1 = f_p1_1.d2(v);
......@@ -81,7 +80,10 @@ main()
// This should be the unit matrix
MyMatrix hess_e = f_e.d2(v);
MyMatrix id; id <<= 1.0, 0.0, Dune::nextRow, 0.0, 1.0;
MyMatrix id = {
{ 1.0, 0.0 },
{ 0.0, 1.0 }
};
std::cout << hess_e << std::endl;
assert(myDiff(hess_e, id) < 1e-10);
}
......@@ -96,7 +98,7 @@ main()
// and second derivative
//
// x |-> |x|^(p-2) id + (p-2)|x|^(p-4) x \otimes x.
MyVector v; v <<= 1.0, 2.0;
MyVector v = { 1.0, 2.0 };
MyPFunctional f_p3_0(3.0, 0.0);
double vnorm = v.two_norm();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment