[cig-commits] commit: Last commit before 0.9.5 rewrites

Mercurial hg at geodynamics.org
Wed Dec 9 20:51:04 PST 2009


changeset:   90:78b5d545a3d7
user:        Marc Spiegelman <mspieg at ldeo.columbia.edu>
date:        Sat Dec 05 00:43:06 2009 -0500
files:       MADDs-4/cpp/SemiLagrangianRHS2D.cpp MADDs-4/cpp/SemiLagrangianRHS2D.ufl MADDs-4/cpp/SemiLagrangianRHS3D.cpp MADDs-4/cpp/SemiLagrangianRHS3D.ufl MADDs-4/cpp/SolitaryWave2D.cpp MADDs-4/cpp/SolitaryWave2D.ufl MADDs-4/cpp/SolitaryWave3D.cpp MADDs-4/cpp/SolitaryWave3D.ufl MADDs-4/python/PySolwave/magma1d.pyc MADDs-4/python/PySolwave/magmasinc.pyc MADDs-4/python/PySolwave/sinc_eo.pyc MADDs-4/python/PySolwave/sincmats.pyc MADDs-5/MADDs-5a/cpp/MeltFlux.h
description:
Last commit before 0.9.5 rewrites


diff -r d848f74fedd2 -r 78b5d545a3d7 MADDs-4/cpp/SemiLagrangianRHS2D.cpp
--- a/MADDs-4/cpp/SemiLagrangianRHS2D.cpp	Fri Dec 04 21:18:03 2009 -0500
+++ b/MADDs-4/cpp/SemiLagrangianRHS2D.cpp	Sat Dec 05 00:43:06 2009 -0500
@@ -15,7 +15,7 @@ UFC_SemiLagrangianRHS2DLinearForm_finite
 /// Return a string identifying the finite element
 const char* UFC_SemiLagrangianRHS2DLinearForm_finite_element_0::signature() const
 {
-    return "FiniteElement('Lagrange', 'triangle', 1)";
+    return "FiniteElement('Lagrange', 'triangle', 2)";
 }
 
 /// Return the cell shape
@@ -27,7 +27,7 @@ ufc::shape UFC_SemiLagrangianRHS2DLinear
 /// Return the dimension of the finite element function space
 unsigned int UFC_SemiLagrangianRHS2DLinearForm_finite_element_0::space_dimension() const
 {
-    return 3;
+    return 6;
 }
 
 /// Return the rank of the value space
@@ -86,34 +86,48 @@ void UFC_SemiLagrangianRHS2DLinearForm_f
     // Generate scalings
     const double scalings_y_0 = 1;
     const double scalings_y_1 = scalings_y_0*(0.5 - 0.5*y);
+    const double scalings_y_2 = scalings_y_1*(0.5 - 0.5*y);
     
     // Compute psitilde_a
     const double psitilde_a_0 = 1;
     const double psitilde_a_1 = x;
+    const double psitilde_a_2 = 1.5*x*psitilde_a_1 - 0.5*psitilde_a_0;
     
     // Compute psitilde_bs
     const double psitilde_bs_0_0 = 1;
     const double psitilde_bs_0_1 = 1.5*y + 0.5;
+    const double psitilde_bs_0_2 = 0.111111111111111*psitilde_bs_0_1 + 1.66666666666667*y*psitilde_bs_0_1 - 0.555555555555556*psitilde_bs_0_0;
     const double psitilde_bs_1_0 = 1;
+    const double psitilde_bs_1_1 = 2.5*y + 1.5;
+    const double psitilde_bs_2_0 = 1;
     
     // Compute basisvalues
     const double basisvalue0 = 0.707106781186548*psitilde_a_0*scalings_y_0*psitilde_bs_0_0;
     const double basisvalue1 = 1.73205080756888*psitilde_a_1*scalings_y_1*psitilde_bs_1_0;
     const double basisvalue2 = psitilde_a_0*scalings_y_0*psitilde_bs_0_1;
+    const double basisvalue3 = 2.73861278752583*psitilde_a_2*scalings_y_2*psitilde_bs_2_0;
+    const double basisvalue4 = 2.12132034355964*psitilde_a_1*scalings_y_1*psitilde_bs_1_1;
+    const double basisvalue5 = 1.22474487139159*psitilde_a_0*scalings_y_0*psitilde_bs_0_2;
     
     // Table(s) of coefficients
-    const static double coefficients0[3][3] = \
-    {{0.471404520791032, -0.288675134594813, -0.166666666666667},
-    {0.471404520791032, 0.288675134594813, -0.166666666666667},
-    {0.471404520791032, 0, 0.333333333333333}};
+    const static double coefficients0[6][6] = \
+    {{0, -0.173205080756888, -0.1, 0.121716123890037, 0.0942809041582064, 0.0544331053951817},
+    {0, 0.173205080756888, -0.1, 0.121716123890037, -0.0942809041582063, 0.0544331053951818},
+    {0, 0, 0.2, 0, 0, 0.163299316185545},
+    {0.471404520791032, 0.23094010767585, 0.133333333333333, 0, 0.188561808316413, -0.163299316185545},
+    {0.471404520791032, -0.23094010767585, 0.133333333333333, 0, -0.188561808316413, -0.163299316185545},
+    {0.471404520791032, 0, -0.266666666666667, -0.243432247780074, 0, 0.0544331053951817}};
     
     // Extract relevant coefficients
     const double coeff0_0 = coefficients0[dof][0];
     const double coeff0_1 = coefficients0[dof][1];
     const double coeff0_2 = coefficients0[dof][2];
+    const double coeff0_3 = coefficients0[dof][3];
+    const double coeff0_4 = coefficients0[dof][4];
+    const double coeff0_5 = coefficients0[dof][5];
     
     // Compute value(s)
-    *values = coeff0_0*basisvalue0 + coeff0_1*basisvalue1 + coeff0_2*basisvalue2;
+    *values = coeff0_0*basisvalue0 + coeff0_1*basisvalue1 + coeff0_2*basisvalue2 + coeff0_3*basisvalue3 + coeff0_4*basisvalue4 + coeff0_5*basisvalue5;
 }
 
 /// Evaluate all basis functions at given point in cell
@@ -229,38 +243,55 @@ void UFC_SemiLagrangianRHS2DLinearForm_f
     // Generate scalings
     const double scalings_y_0 = 1;
     const double scalings_y_1 = scalings_y_0*(0.5 - 0.5*y);
+    const double scalings_y_2 = scalings_y_1*(0.5 - 0.5*y);
     
     // Compute psitilde_a
     const double psitilde_a_0 = 1;
     const double psitilde_a_1 = x;
+    const double psitilde_a_2 = 1.5*x*psitilde_a_1 - 0.5*psitilde_a_0;
     
     // Compute psitilde_bs
     const double psitilde_bs_0_0 = 1;
     const double psitilde_bs_0_1 = 1.5*y + 0.5;
+    const double psitilde_bs_0_2 = 0.111111111111111*psitilde_bs_0_1 + 1.66666666666667*y*psitilde_bs_0_1 - 0.555555555555556*psitilde_bs_0_0;
     const double psitilde_bs_1_0 = 1;
+    const double psitilde_bs_1_1 = 2.5*y + 1.5;
+    const double psitilde_bs_2_0 = 1;
     
     // Compute basisvalues
     const double basisvalue0 = 0.707106781186548*psitilde_a_0*scalings_y_0*psitilde_bs_0_0;
     const double basisvalue1 = 1.73205080756888*psitilde_a_1*scalings_y_1*psitilde_bs_1_0;
     const double basisvalue2 = psitilde_a_0*scalings_y_0*psitilde_bs_0_1;
+    const double basisvalue3 = 2.73861278752583*psitilde_a_2*scalings_y_2*psitilde_bs_2_0;
+    const double basisvalue4 = 2.12132034355964*psitilde_a_1*scalings_y_1*psitilde_bs_1_1;
+    const double basisvalue5 = 1.22474487139159*psitilde_a_0*scalings_y_0*psitilde_bs_0_2;
     
     // Table(s) of coefficients
-    const static double coefficients0[3][3] = \
-    {{0.471404520791032, -0.288675134594813, -0.166666666666667},
-    {0.471404520791032, 0.288675134594813, -0.166666666666667},
-    {0.471404520791032, 0, 0.333333333333333}};
+    const static double coefficients0[6][6] = \
+    {{0, -0.173205080756888, -0.1, 0.121716123890037, 0.0942809041582064, 0.0544331053951817},
+    {0, 0.173205080756888, -0.1, 0.121716123890037, -0.0942809041582063, 0.0544331053951818},
+    {0, 0, 0.2, 0, 0, 0.163299316185545},
+    {0.471404520791032, 0.23094010767585, 0.133333333333333, 0, 0.188561808316413, -0.163299316185545},
+    {0.471404520791032, -0.23094010767585, 0.133333333333333, 0, -0.188561808316413, -0.163299316185545},
+    {0.471404520791032, 0, -0.266666666666667, -0.243432247780074, 0, 0.0544331053951817}};
     
     // Interesting (new) part
     // Tables of derivatives of the polynomial base (transpose)
-    const static double dmats0[3][3] = \
-    {{0, 0, 0},
-    {4.89897948556636, 0, 0},
-    {0, 0, 0}};
+    const static double dmats0[6][6] = \
+    {{0, 0, 0, 0, 0, 0},
+    {4.89897948556636, 0, 0, 0, 0, 0},
+    {0, 0, 0, 0, 0, 0},
+    {0, 9.48683298050514, 0, 0, 0, 0},
+    {4, 0, 7.07106781186548, 0, 0, 0},
+    {0, 0, 0, 0, 0, 0}};
     
-    const static double dmats1[3][3] = \
-    {{0, 0, 0},
-    {2.44948974278318, 0, 0},
-    {4.24264068711928, 0, 0}};
+    const static double dmats1[6][6] = \
+    {{0, 0, 0, 0, 0, 0},
+    {2.44948974278318, 0, 0, 0, 0, 0},
+    {4.24264068711928, 0, 0, 0, 0, 0},
+    {2.58198889747161, 4.74341649025257, -0.912870929175277, 0, 0, 0},
+    {2, 6.12372435695795, 3.53553390593274, 0, 0, 0},
+    {-2.3094010767585, 0, 8.16496580927726, 0, 0, 0}};
     
     // Compute reference derivatives
     // Declare pointer to array of derivatives on FIAT element
@@ -270,11 +301,17 @@ void UFC_SemiLagrangianRHS2DLinearForm_f
     double coeff0_0 = 0;
     double coeff0_1 = 0;
     double coeff0_2 = 0;
+    double coeff0_3 = 0;
+    double coeff0_4 = 0;
+    double coeff0_5 = 0;
     
     // Declare new coefficients
     double new_coeff0_0 = 0;
     double new_coeff0_1 = 0;
     double new_coeff0_2 = 0;
+    double new_coeff0_3 = 0;
+    double new_coeff0_4 = 0;
+    double new_coeff0_5 = 0;
     
     // Loop possible derivatives
     for (unsigned int deriv_num = 0; deriv_num < num_derivatives; deriv_num++)
@@ -283,6 +320,9 @@ void UFC_SemiLagrangianRHS2DLinearForm_f
       new_coeff0_0 = coefficients0[dof][0];
       new_coeff0_1 = coefficients0[dof][1];
       new_coeff0_2 = coefficients0[dof][2];
+      new_coeff0_3 = coefficients0[dof][3];
+      new_coeff0_4 = coefficients0[dof][4];
+      new_coeff0_5 = coefficients0[dof][5];
     
       // Loop derivative order
       for (unsigned int j = 0; j < n; j++)
@@ -291,23 +331,32 @@ void UFC_SemiLagrangianRHS2DLinearForm_f
         coeff0_0 = new_coeff0_0;
         coeff0_1 = new_coeff0_1;
         coeff0_2 = new_coeff0_2;
+        coeff0_3 = new_coeff0_3;
+        coeff0_4 = new_coeff0_4;
+        coeff0_5 = new_coeff0_5;
     
         if(combinations[deriv_num][j] == 0)
         {
-          new_coeff0_0 = coeff0_0*dmats0[0][0] + coeff0_1*dmats0[1][0] + coeff0_2*dmats0[2][0];
-          new_coeff0_1 = coeff0_0*dmats0[0][1] + coeff0_1*dmats0[1][1] + coeff0_2*dmats0[2][1];
-          new_coeff0_2 = coeff0_0*dmats0[0][2] + coeff0_1*dmats0[1][2] + coeff0_2*dmats0[2][2];
+          new_coeff0_0 = coeff0_0*dmats0[0][0] + coeff0_1*dmats0[1][0] + coeff0_2*dmats0[2][0] + coeff0_3*dmats0[3][0] + coeff0_4*dmats0[4][0] + coeff0_5*dmats0[5][0];
+          new_coeff0_1 = coeff0_0*dmats0[0][1] + coeff0_1*dmats0[1][1] + coeff0_2*dmats0[2][1] + coeff0_3*dmats0[3][1] + coeff0_4*dmats0[4][1] + coeff0_5*dmats0[5][1];
+          new_coeff0_2 = coeff0_0*dmats0[0][2] + coeff0_1*dmats0[1][2] + coeff0_2*dmats0[2][2] + coeff0_3*dmats0[3][2] + coeff0_4*dmats0[4][2] + coeff0_5*dmats0[5][2];
+          new_coeff0_3 = coeff0_0*dmats0[0][3] + coeff0_1*dmats0[1][3] + coeff0_2*dmats0[2][3] + coeff0_3*dmats0[3][3] + coeff0_4*dmats0[4][3] + coeff0_5*dmats0[5][3];
+          new_coeff0_4 = coeff0_0*dmats0[0][4] + coeff0_1*dmats0[1][4] + coeff0_2*dmats0[2][4] + coeff0_3*dmats0[3][4] + coeff0_4*dmats0[4][4] + coeff0_5*dmats0[5][4];
+          new_coeff0_5 = coeff0_0*dmats0[0][5] + coeff0_1*dmats0[1][5] + coeff0_2*dmats0[2][5] + coeff0_3*dmats0[3][5] + coeff0_4*dmats0[4][5] + coeff0_5*dmats0[5][5];
         }
         if(combinations[deriv_num][j] == 1)
         {
-          new_coeff0_0 = coeff0_0*dmats1[0][0] + coeff0_1*dmats1[1][0] + coeff0_2*dmats1[2][0];
-          new_coeff0_1 = coeff0_0*dmats1[0][1] + coeff0_1*dmats1[1][1] + coeff0_2*dmats1[2][1];
-          new_coeff0_2 = coeff0_0*dmats1[0][2] + coeff0_1*dmats1[1][2] + coeff0_2*dmats1[2][2];
+          new_coeff0_0 = coeff0_0*dmats1[0][0] + coeff0_1*dmats1[1][0] + coeff0_2*dmats1[2][0] + coeff0_3*dmats1[3][0] + coeff0_4*dmats1[4][0] + coeff0_5*dmats1[5][0];
+          new_coeff0_1 = coeff0_0*dmats1[0][1] + coeff0_1*dmats1[1][1] + coeff0_2*dmats1[2][1] + coeff0_3*dmats1[3][1] + coeff0_4*dmats1[4][1] + coeff0_5*dmats1[5][1];
+          new_coeff0_2 = coeff0_0*dmats1[0][2] + coeff0_1*dmats1[1][2] + coeff0_2*dmats1[2][2] + coeff0_3*dmats1[3][2] + coeff0_4*dmats1[4][2] + coeff0_5*dmats1[5][2];
+          new_coeff0_3 = coeff0_0*dmats1[0][3] + coeff0_1*dmats1[1][3] + coeff0_2*dmats1[2][3] + coeff0_3*dmats1[3][3] + coeff0_4*dmats1[4][3] + coeff0_5*dmats1[5][3];
+          new_coeff0_4 = coeff0_0*dmats1[0][4] + coeff0_1*dmats1[1][4] + coeff0_2*dmats1[2][4] + coeff0_3*dmats1[3][4] + coeff0_4*dmats1[4][4] + coeff0_5*dmats1[5][4];
+          new_coeff0_5 = coeff0_0*dmats1[0][5] + coeff0_1*dmats1[1][5] + coeff0_2*dmats1[2][5] + coeff0_3*dmats1[3][5] + coeff0_4*dmats1[4][5] + coeff0_5*dmats1[5][5];
         }
     
       }
       // Compute derivatives on reference element as dot product of coefficients and basisvalues
-      derivatives[deriv_num] = new_coeff0_0*basisvalue0 + new_coeff0_1*basisvalue1 + new_coeff0_2*basisvalue2;
+      derivatives[deriv_num] = new_coeff0_0*basisvalue0 + new_coeff0_1*basisvalue1 + new_coeff0_2*basisvalue2 + new_coeff0_3*basisvalue3 + new_coeff0_4*basisvalue4 + new_coeff0_5*basisvalue5;
     }
     
     // Transform derivatives back to physical element
@@ -347,9 +396,9 @@ double UFC_SemiLagrangianRHS2DLinearForm
                                    const ufc::cell& c) const
 {
     // The reference points, direction and weights:
-    const static double X[3][1][2] = {{{0, 0}}, {{1, 0}}, {{0, 1}}};
-    const static double W[3][1] = {{1}, {1}, {1}};
-    const static double D[3][1][1] = {{{1}}, {{1}}, {{1}}};
+    const static double X[6][1][2] = {{{0, 0}}, {{1, 0}}, {{0, 1}}, {{0.5, 0.5}}, {{0, 0.5}}, {{0.5, 0}}};
+    const static double W[6][1] = {{1}, {1}, {1}, {1}, {1}, {1}};
+    const static double D[6][1][1] = {{{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}};
     
     const double * const * x = c.coordinates;
     double result = 0.0;
@@ -429,7 +478,7 @@ UFC_SemiLagrangianRHS2DLinearForm_finite
 /// Return a string identifying the finite element
 const char* UFC_SemiLagrangianRHS2DLinearForm_finite_element_1::signature() const
 {
-    return "Quadrature element with 4 quadrature point(s) (2x2) on a triangle";
+    return "Quadrature element with 9 quadrature point(s) (3x3) on a triangle";
 }
 
 /// Return the cell shape
@@ -441,7 +490,7 @@ ufc::shape UFC_SemiLagrangianRHS2DLinear
 /// Return the dimension of the finite element function space
 unsigned int UFC_SemiLagrangianRHS2DLinearForm_finite_element_1::space_dimension() const
 {
-    return 4;
+    return 9;
 }
 
 /// Return the rank of the value space
@@ -498,9 +547,9 @@ double UFC_SemiLagrangianRHS2DLinearForm
                                    const ufc::cell& c) const
 {
     // The reference points, direction and weights:
-    const static double X[4][1][2] = {{{0.178558728263616, 0.155051025721682}}, {{0.0750311102226081, 0.644948974278318}}, {{0.666390246014701, 0.155051025721682}}, {{0.280019915499074, 0.644948974278318}}};
-    const static double W[4][1] = {{1}, {1}, {1}, {1}};
-    const static double D[4][1][1] = {{{1}}, {{1}}, {{1}}, {{1}}};
+    const static double X[9][1][2] = {{{0.102717654809626, 0.088587959512704}}, {{0.0665540678391645, 0.409466864440735}}, {{0.0239311322870806, 0.787659461760847}}, {{0.455706020243648, 0.088587959512704}}, {{0.295266567779633, 0.409466864440735}}, {{0.106170269119576, 0.787659461760847}}, {{0.80869438567767, 0.088587959512704}}, {{0.523979067720101, 0.409466864440735}}, {{0.188409405952072, 0.787659461760847}}};
+    const static double W[9][1] = {{1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}};
+    const static double D[9][1][1] = {{{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}};
     
     const double * const * x = c.coordinates;
     double result = 0.0;
@@ -576,7 +625,7 @@ UFC_SemiLagrangianRHS2DLinearForm_dof_ma
 /// Return a string identifying the dof map
 const char* UFC_SemiLagrangianRHS2DLinearForm_dof_map_0::signature() const
 {
-    return "FFC dof map for FiniteElement('Lagrange', 'triangle', 1)";
+    return "FFC dof map for FiniteElement('Lagrange', 'triangle', 2)";
 }
 
 /// Return true iff mesh entities of topological dimension d are needed
@@ -588,7 +637,7 @@ bool UFC_SemiLagrangianRHS2DLinearForm_d
       return true;
       break;
     case 1:
-      return false;
+      return true;
       break;
     case 2:
       return false;
@@ -600,7 +649,7 @@ bool UFC_SemiLagrangianRHS2DLinearForm_d
 /// Initialize dof map for mesh (return true iff init_cell() is needed)
 bool UFC_SemiLagrangianRHS2DLinearForm_dof_map_0::init_mesh(const ufc::mesh& m)
 {
-    __global_dimension = m.num_entities[0];
+    __global_dimension = m.num_entities[0] + m.num_entities[1];
     return false;
 }
 
@@ -626,7 +675,7 @@ unsigned int UFC_SemiLagrangianRHS2DLine
 /// Return the dimension of the local finite element function space
 unsigned int UFC_SemiLagrangianRHS2DLinearForm_dof_map_0::local_dimension() const
 {
-    return 3;
+    return 6;
 }
 
 // Return the geometric dimension of the coordinates this dof map provides
@@ -638,7 +687,7 @@ unsigned int UFC_SemiLagrangianRHS2DLine
 /// Return the number of dofs on each cell facet
 unsigned int UFC_SemiLagrangianRHS2DLinearForm_dof_map_0::num_facet_dofs() const
 {
-    return 2;
+    return 3;
 }
 
 /// Return the number of dofs associated with each cell entity of dimension d
@@ -655,6 +704,10 @@ void UFC_SemiLagrangianRHS2DLinearForm_d
     dofs[0] = c.entity_indices[0][0];
     dofs[1] = c.entity_indices[0][1];
     dofs[2] = c.entity_indices[0][2];
+    unsigned int offset = m.num_entities[0];
+    dofs[3] = offset + c.entity_indices[1][0];
+    dofs[4] = offset + c.entity_indices[1][1];
+    dofs[5] = offset + c.entity_indices[1][2];
 }
 
 /// Tabulate the local-to-local mapping from facet dofs to cell dofs
@@ -666,14 +719,17 @@ void UFC_SemiLagrangianRHS2DLinearForm_d
     case 0:
       dofs[0] = 1;
       dofs[1] = 2;
+      dofs[2] = 3;
       break;
     case 1:
       dofs[0] = 0;
       dofs[1] = 2;
+      dofs[2] = 4;
       break;
     case 2:
       dofs[0] = 0;
       dofs[1] = 1;
+      dofs[2] = 5;
       break;
     }
 }
@@ -696,6 +752,12 @@ void UFC_SemiLagrangianRHS2DLinearForm_d
     coordinates[1][1] = x[1][1];
     coordinates[2][0] = x[2][0];
     coordinates[2][1] = x[2][1];
+    coordinates[3][0] = 0.5*x[1][0] + 0.5*x[2][0];
+    coordinates[3][1] = 0.5*x[1][1] + 0.5*x[2][1];
+    coordinates[4][0] = 0.5*x[0][0] + 0.5*x[2][0];
+    coordinates[4][1] = 0.5*x[0][1] + 0.5*x[2][1];
+    coordinates[5][0] = 0.5*x[0][0] + 0.5*x[1][0];
+    coordinates[5][1] = 0.5*x[0][1] + 0.5*x[1][1];
 }
 
 /// Return the number of sub dof maps (for a mixed element)
@@ -726,7 +788,7 @@ UFC_SemiLagrangianRHS2DLinearForm_dof_ma
 /// Return a string identifying the dof map
 const char* UFC_SemiLagrangianRHS2DLinearForm_dof_map_1::signature() const
 {
-    return "FFC dof map for Quadrature element with 4 quadrature point(s) (2x2) on a triangle";
+    return "FFC dof map for Quadrature element with 9 quadrature point(s) (3x3) on a triangle";
 }
 
 /// Return true iff mesh entities of topological dimension d are needed
@@ -750,7 +812,7 @@ bool UFC_SemiLagrangianRHS2DLinearForm_d
 /// Initialize dof map for mesh (return true iff init_cell() is needed)
 bool UFC_SemiLagrangianRHS2DLinearForm_dof_map_1::init_mesh(const ufc::mesh& m)
 {
-    __global_dimension = 4*m.num_entities[2];
+    __global_dimension = 9*m.num_entities[2];
     return false;
 }
 
@@ -776,7 +838,7 @@ unsigned int UFC_SemiLagrangianRHS2DLine
 /// Return the dimension of the local finite element function space
 unsigned int UFC_SemiLagrangianRHS2DLinearForm_dof_map_1::local_dimension() const
 {
-    return 4;
+    return 9;
 }
 
 // Return the geometric dimension of the coordinates this dof map provides
@@ -802,10 +864,15 @@ void UFC_SemiLagrangianRHS2DLinearForm_d
                                   const ufc::mesh& m,
                                   const ufc::cell& c) const
 {
-    dofs[0] = 4*c.entity_indices[2][0];
-    dofs[1] = 4*c.entity_indices[2][0] + 1;
-    dofs[2] = 4*c.entity_indices[2][0] + 2;
-    dofs[3] = 4*c.entity_indices[2][0] + 3;
+    dofs[0] = 9*c.entity_indices[2][0];
+    dofs[1] = 9*c.entity_indices[2][0] + 1;
+    dofs[2] = 9*c.entity_indices[2][0] + 2;
+    dofs[3] = 9*c.entity_indices[2][0] + 3;
+    dofs[4] = 9*c.entity_indices[2][0] + 4;
+    dofs[5] = 9*c.entity_indices[2][0] + 5;
+    dofs[6] = 9*c.entity_indices[2][0] + 6;
+    dofs[7] = 9*c.entity_indices[2][0] + 7;
+    dofs[8] = 9*c.entity_indices[2][0] + 8;
 }
 
 /// Tabulate the local-to-local mapping from facet dofs to cell dofs
@@ -838,14 +905,24 @@ void UFC_SemiLagrangianRHS2DLinearForm_d
                                          const ufc::cell& c) const
 {
     const double * const * x = c.coordinates;
-    coordinates[0][0] = 0.666390246014701*x[0][0] + 0.178558728263616*x[1][0] + 0.155051025721682*x[2][0];
-    coordinates[0][1] = 0.666390246014701*x[0][1] + 0.178558728263616*x[1][1] + 0.155051025721682*x[2][1];
-    coordinates[1][0] = 0.280019915499074*x[0][0] + 0.0750311102226082*x[1][0] + 0.644948974278318*x[2][0];
-    coordinates[1][1] = 0.280019915499074*x[0][1] + 0.0750311102226082*x[1][1] + 0.644948974278318*x[2][1];
-    coordinates[2][0] = 0.178558728263616*x[0][0] + 0.666390246014701*x[1][0] + 0.155051025721682*x[2][0];
-    coordinates[2][1] = 0.178558728263616*x[0][1] + 0.666390246014701*x[1][1] + 0.155051025721682*x[2][1];
-    coordinates[3][0] = 0.0750311102226081*x[0][0] + 0.280019915499074*x[1][0] + 0.644948974278318*x[2][0];
-    coordinates[3][1] = 0.0750311102226081*x[0][1] + 0.280019915499074*x[1][1] + 0.644948974278318*x[2][1];
+    coordinates[0][0] = 0.80869438567767*x[0][0] + 0.102717654809626*x[1][0] + 0.088587959512704*x[2][0];
+    coordinates[0][1] = 0.80869438567767*x[0][1] + 0.102717654809626*x[1][1] + 0.088587959512704*x[2][1];
+    coordinates[1][0] = 0.523979067720101*x[0][0] + 0.0665540678391645*x[1][0] + 0.409466864440735*x[2][0];
+    coordinates[1][1] = 0.523979067720101*x[0][1] + 0.0665540678391645*x[1][1] + 0.409466864440735*x[2][1];
+    coordinates[2][0] = 0.188409405952072*x[0][0] + 0.0239311322870807*x[1][0] + 0.787659461760847*x[2][0];
+    coordinates[2][1] = 0.188409405952072*x[0][1] + 0.0239311322870807*x[1][1] + 0.787659461760847*x[2][1];
+    coordinates[3][0] = 0.455706020243648*x[0][0] + 0.455706020243648*x[1][0] + 0.088587959512704*x[2][0];
+    coordinates[3][1] = 0.455706020243648*x[0][1] + 0.455706020243648*x[1][1] + 0.088587959512704*x[2][1];
+    coordinates[4][0] = 0.295266567779633*x[0][0] + 0.295266567779633*x[1][0] + 0.409466864440735*x[2][0];
+    coordinates[4][1] = 0.295266567779633*x[0][1] + 0.295266567779633*x[1][1] + 0.409466864440735*x[2][1];
+    coordinates[5][0] = 0.106170269119577*x[0][0] + 0.106170269119577*x[1][0] + 0.787659461760847*x[2][0];
+    coordinates[5][1] = 0.106170269119577*x[0][1] + 0.106170269119577*x[1][1] + 0.787659461760847*x[2][1];
+    coordinates[6][0] = 0.102717654809626*x[0][0] + 0.80869438567767*x[1][0] + 0.088587959512704*x[2][0];
+    coordinates[6][1] = 0.102717654809626*x[0][1] + 0.80869438567767*x[1][1] + 0.088587959512704*x[2][1];
+    coordinates[7][0] = 0.0665540678391645*x[0][0] + 0.523979067720101*x[1][0] + 0.409466864440735*x[2][0];
+    coordinates[7][1] = 0.0665540678391645*x[0][1] + 0.523979067720101*x[1][1] + 0.409466864440735*x[2][1];
+    coordinates[8][0] = 0.0239311322870807*x[0][0] + 0.188409405952072*x[1][0] + 0.787659461760847*x[2][0];
+    coordinates[8][1] = 0.0239311322870807*x[0][1] + 0.188409405952072*x[1][1] + 0.787659461760847*x[2][1];
 }
 
 /// Return the number of sub dof maps (for a mixed element)
@@ -897,34 +974,39 @@ void UFC_SemiLagrangianRHS2DLinearForm_c
     
     
     // Array of quadrature weights
-    const static double W4[4] = {0.159020690871988, 0.0909793091280113, 0.159020690871988, 0.0909793091280113};
+    const static double W9[9] = {0.0558144204830443, 0.063678085099885, 0.0193963833059595, 0.0893030727728709, 0.101884936159816, 0.0310342132895351, 0.0558144204830443, 0.063678085099885, 0.0193963833059595};
     
     
-    const static double FE0[4][3] = \
-    {{0.666390246014701, 0.178558728263616, 0.155051025721682},
-    {0.280019915499074, 0.0750311102226082, 0.644948974278318},
-    {0.178558728263616, 0.666390246014701, 0.155051025721682},
-    {0.0750311102226081, 0.280019915499074, 0.644948974278318}};
+    const static double FE0[9][6] = \
+    {{0.499278833175498, -0.0816158215904472, -0.072892306371455, 0.0363981897820602, 0.286562341986258, 0.332268763018087},
+    {0.0251290590975512, -0.0576951799472843, -0.0741406382908806, 0.109006741895515, 0.858208263567716, 0.139491753677383},
+    {-0.117413197449647, -0.022785734101997, 0.453155393641927, 0.0753983311062782, 0.593609805131561, 0.0180354016718773},
+    {-0.0403700664710397, -0.0403700664710397, -0.072892306371455, 0.161480265884159, 0.161480265884159, 0.830671907545216},
+    {-0.120901875682904, -0.120901875682904, -0.0741406382908806, 0.483607502731615, 0.483607502731615, 0.348729384193458},
+    {-0.0836260170297298, -0.0836260170297298, 0.453155393641927, 0.33450406811892, 0.33450406811892, 0.0450885041796933},
+    {-0.0816158215904471, 0.499278833175498, -0.072892306371455, 0.286562341986258, 0.0363981897820602, 0.332268763018087},
+    {-0.0576951799472841, 0.0251290590975512, -0.0741406382908806, 0.858208263567716, 0.109006741895515, 0.139491753677383},
+    {-0.022785734101997, -0.117413197449647, 0.453155393641927, 0.593609805131561, 0.0753983311062783, 0.0180354016718774}};
     
     // Number of operations to compute geometry constants: 1
     const double G0 =  - det;
     
     // Compute element tensor using UFL quadrature representation
     // Optimisations: ('simplify expressions', True), ('ignore zero tables', True), ('non zero columns', True), ('remove zero terms', True), ('ignore ones', True)
-    // Total number of operations to compute element tensor: 33
+    // Total number of operations to compute element tensor: 127
     
     // Loop quadrature points for integral
-    // Number of operations to compute element tensor for following IP loop = 32
-    for (unsigned int ip = 0; ip < 4; ip++)
+    // Number of operations to compute element tensor for following IP loop = 126
+    for (unsigned int ip = 0; ip < 9; ip++)
     {
       
       // Number of operations to compute ip constants: 2
       // Number of operations: 2
-      const double Gip0 = W4[ip]*w[0][ip]*G0;
+      const double Gip0 = W9[ip]*w[0][ip]*G0;
       
       
-      // Number of operations for primary indices = 6
-      for (unsigned int j = 0; j < 3; j++)
+      // Number of operations for primary indices = 12
+      for (unsigned int j = 0; j < 6; j++)
       {
         // Number of operations to compute entry = 2
         A[j] += FE0[ip][j]*Gip0;
@@ -953,6 +1035,9 @@ void UFC_SemiLagrangianRHS2DLinearForm_c
     A[0] = 0;
     A[1] = 0;
     A[2] = 0;
+    A[3] = 0;
+    A[4] = 0;
+    A[5] = 0;
     
     // Add all contributions to element tensor
     integral_0_quadrature.tabulate_tensor(A, w, c);
@@ -973,7 +1058,7 @@ UFC_SemiLagrangianRHS2DLinearForm::~UFC_
 /// Return a string identifying the form
 const char* UFC_SemiLagrangianRHS2DLinearForm::signature() const
 {
-    return "Form([Integral(Product(Function(FiniteElement('Quadrature', Cell('triangle', 1), 2), 0), Product(IntValue(-1, (), (), {}), BasisFunction(FiniteElement('Lagrange', Cell('triangle', 1), 1), 0))), Measure('cell', 0, {'ffc_representation': 'quadrature', 'quadrature_order': 2}))])";
+    return "Form([Integral(Product(Function(FiniteElement('Quadrature', Cell('triangle', 1), 4), 0), Product(IntValue(-1, (), (), {}), BasisFunction(FiniteElement('Lagrange', Cell('triangle', 1), 2), 0))), Measure('cell', 0, {'ffc_representation': 'quadrature', 'quadrature_order': 4}))])";
 }
 
 /// Return the rank of the global tensor (r)
diff -r d848f74fedd2 -r 78b5d545a3d7 MADDs-4/cpp/SemiLagrangianRHS2D.ufl
--- a/MADDs-4/cpp/SemiLagrangianRHS2D.ufl	Fri Dec 04 21:18:03 2009 -0500
+++ b/MADDs-4/cpp/SemiLagrangianRHS2D.ufl	Sat Dec 05 00:43:06 2009 -0500
@@ -1,1 +1,1 @@ forms/SemiLagrangianRHS2D_P1.ufl
-forms/SemiLagrangianRHS2D_P1.ufl
\ No newline at end of file
+forms/SemiLagrangianRHS2D_P2.ufl
\ No newline at end of file
diff -r d848f74fedd2 -r 78b5d545a3d7 MADDs-4/cpp/SemiLagrangianRHS3D.cpp
--- a/MADDs-4/cpp/SemiLagrangianRHS3D.cpp	Fri Dec 04 21:18:03 2009 -0500
+++ b/MADDs-4/cpp/SemiLagrangianRHS3D.cpp	Sat Dec 05 00:43:06 2009 -0500
@@ -15,7 +15,7 @@ UFC_SemiLagrangianRHS3DLinearForm_finite
 /// Return a string identifying the finite element
 const char* UFC_SemiLagrangianRHS3DLinearForm_finite_element_0::signature() const
 {
-    return "FiniteElement('Lagrange', 'tetrahedron', 1)";
+    return "FiniteElement('Lagrange', 'tetrahedron', 2)";
 }
 
 /// Return the cell shape
@@ -27,7 +27,7 @@ ufc::shape UFC_SemiLagrangianRHS3DLinear
 /// Return the dimension of the finite element function space
 unsigned int UFC_SemiLagrangianRHS3DLinearForm_finite_element_0::space_dimension() const
 {
-    return 4;
+    return 10;
 }
 
 /// Return the rank of the value space
@@ -118,45 +118,75 @@ void UFC_SemiLagrangianRHS3DLinearForm_f
     // Generate scalings
     const double scalings_y_0 = 1;
     const double scalings_y_1 = scalings_y_0*(0.5 - 0.5*y);
+    const double scalings_y_2 = scalings_y_1*(0.5 - 0.5*y);
     const double scalings_z_0 = 1;
     const double scalings_z_1 = scalings_z_0*(0.5 - 0.5*z);
+    const double scalings_z_2 = scalings_z_1*(0.5 - 0.5*z);
     
     // Compute psitilde_a
     const double psitilde_a_0 = 1;
     const double psitilde_a_1 = x;
+    const double psitilde_a_2 = 1.5*x*psitilde_a_1 - 0.5*psitilde_a_0;
     
     // Compute psitilde_bs
     const double psitilde_bs_0_0 = 1;
     const double psitilde_bs_0_1 = 1.5*y + 0.5;
+    const double psitilde_bs_0_2 = 0.111111111111111*psitilde_bs_0_1 + 1.66666666666667*y*psitilde_bs_0_1 - 0.555555555555556*psitilde_bs_0_0;
     const double psitilde_bs_1_0 = 1;
+    const double psitilde_bs_1_1 = 2.5*y + 1.5;
+    const double psitilde_bs_2_0 = 1;
     
     // Compute psitilde_cs
     const double psitilde_cs_00_0 = 1;
     const double psitilde_cs_00_1 = 2*z + 1;
+    const double psitilde_cs_00_2 = 0.3125*psitilde_cs_00_1 + 1.875*z*psitilde_cs_00_1 - 0.5625*psitilde_cs_00_0;
     const double psitilde_cs_01_0 = 1;
+    const double psitilde_cs_01_1 = 3*z + 2;
+    const double psitilde_cs_02_0 = 1;
     const double psitilde_cs_10_0 = 1;
+    const double psitilde_cs_10_1 = 3*z + 2;
+    const double psitilde_cs_11_0 = 1;
+    const double psitilde_cs_20_0 = 1;
     
     // Compute basisvalues
     const double basisvalue0 = 0.866025403784439*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_0;
     const double basisvalue1 = 2.73861278752583*psitilde_a_1*scalings_y_1*psitilde_bs_1_0*scalings_z_1*psitilde_cs_10_0;
     const double basisvalue2 = 1.58113883008419*psitilde_a_0*scalings_y_0*psitilde_bs_0_1*scalings_z_1*psitilde_cs_01_0;
     const double basisvalue3 = 1.11803398874989*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_1;
+    const double basisvalue4 = 5.1234753829798*psitilde_a_2*scalings_y_2*psitilde_bs_2_0*scalings_z_2*psitilde_cs_20_0;
+    const double basisvalue5 = 3.96862696659689*psitilde_a_1*scalings_y_1*psitilde_bs_1_1*scalings_z_2*psitilde_cs_11_0;
+    const double basisvalue6 = 2.29128784747792*psitilde_a_0*scalings_y_0*psitilde_bs_0_2*scalings_z_2*psitilde_cs_02_0;
+    const double basisvalue7 = 3.24037034920393*psitilde_a_1*scalings_y_1*psitilde_bs_1_0*scalings_z_1*psitilde_cs_10_1;
+    const double basisvalue8 = 1.87082869338697*psitilde_a_0*scalings_y_0*psitilde_bs_0_1*scalings_z_1*psitilde_cs_01_1;
+    const double basisvalue9 = 1.3228756555323*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_2;
     
     // Table(s) of coefficients
-    const static double coefficients0[4][4] = \
-    {{0.288675134594813, -0.182574185835055, -0.105409255338946, -0.074535599249993},
-    {0.288675134594813, 0.182574185835055, -0.105409255338946, -0.074535599249993},
-    {0.288675134594813, 0, 0.210818510677892, -0.074535599249993},
-    {0.288675134594813, 0, 0, 0.223606797749979}};
+    const static double coefficients0[10][10] = \
+    {{-0.0577350269189626, -0.0608580619450185, -0.0351364184463153, -0.0248451997499977, 0.0650600048632355, 0.0503952630678969, 0.0290957186981323, 0.0411475599898912, 0.0237565548366599, 0.0167984210226323},
+    {-0.0577350269189625, 0.0608580619450185, -0.0351364184463153, -0.0248451997499977, 0.0650600048632355, -0.050395263067897, 0.0290957186981323, -0.0411475599898912, 0.0237565548366599, 0.0167984210226323},
+    {-0.0577350269189625, 0, 0.0702728368926306, -0.0248451997499977, 0, 0, 0.0872871560943969, 0, -0.0475131096733199, 0.0167984210226323},
+    {-0.0577350269189626, 0, 0, 0.074535599249993, 0, 0, 0, 0, 0, 0.100790526135794},
+    {0.23094010767585, 0, 0.140545673785261, 0.0993807989999906, 0, 0, 0, 0, 0.1187827741833, -0.0671936840905293},
+    {0.230940107675851, 0.121716123890037, -0.0702728368926306, 0.0993807989999907, 0, 0, 0, 0.102868899974728, -0.0593913870916499, -0.0671936840905293},
+    {0.23094010767585, 0.121716123890037, 0.0702728368926307, -0.0993807989999907, 0, 0.100790526135794, -0.087287156094397, -0.0205737799949456, -0.01187827741833, 0.0167984210226323},
+    {0.23094010767585, -0.121716123890037, -0.0702728368926307, 0.0993807989999906, 0, 0, 0, -0.102868899974728, -0.0593913870916499, -0.0671936840905293},
+    {0.23094010767585, -0.121716123890037, 0.0702728368926306, -0.0993807989999906, 0, -0.100790526135794, -0.0872871560943969, 0.0205737799949456, -0.01187827741833, 0.0167984210226323},
+    {0.23094010767585, 0, -0.140545673785261, -0.0993807989999906, -0.130120009726471, 0, 0.0290957186981323, 0, 0.02375655483666, 0.0167984210226323}};
     
     // Extract relevant coefficients
     const double coeff0_0 = coefficients0[dof][0];
     const double coeff0_1 = coefficients0[dof][1];
     const double coeff0_2 = coefficients0[dof][2];
     const double coeff0_3 = coefficients0[dof][3];
+    const double coeff0_4 = coefficients0[dof][4];
+    const double coeff0_5 = coefficients0[dof][5];
+    const double coeff0_6 = coefficients0[dof][6];
+    const double coeff0_7 = coefficients0[dof][7];
+    const double coeff0_8 = coefficients0[dof][8];
+    const double coeff0_9 = coefficients0[dof][9];
     
     // Compute value(s)
-    *values = coeff0_0*basisvalue0 + coeff0_1*basisvalue1 + coeff0_2*basisvalue2 + coeff0_3*basisvalue3;
+    *values = coeff0_0*basisvalue0 + coeff0_1*basisvalue1 + coeff0_2*basisvalue2 + coeff0_3*basisvalue3 + coeff0_4*basisvalue4 + coeff0_5*basisvalue5 + coeff0_6*basisvalue6 + coeff0_7*basisvalue7 + coeff0_8*basisvalue8 + coeff0_9*basisvalue9;
 }
 
 /// Evaluate all basis functions at given point in cell
@@ -304,56 +334,98 @@ void UFC_SemiLagrangianRHS3DLinearForm_f
     // Generate scalings
     const double scalings_y_0 = 1;
     const double scalings_y_1 = scalings_y_0*(0.5 - 0.5*y);
+    const double scalings_y_2 = scalings_y_1*(0.5 - 0.5*y);
     const double scalings_z_0 = 1;
     const double scalings_z_1 = scalings_z_0*(0.5 - 0.5*z);
+    const double scalings_z_2 = scalings_z_1*(0.5 - 0.5*z);
     
     // Compute psitilde_a
     const double psitilde_a_0 = 1;
     const double psitilde_a_1 = x;
+    const double psitilde_a_2 = 1.5*x*psitilde_a_1 - 0.5*psitilde_a_0;
     
     // Compute psitilde_bs
     const double psitilde_bs_0_0 = 1;
     const double psitilde_bs_0_1 = 1.5*y + 0.5;
+    const double psitilde_bs_0_2 = 0.111111111111111*psitilde_bs_0_1 + 1.66666666666667*y*psitilde_bs_0_1 - 0.555555555555556*psitilde_bs_0_0;
     const double psitilde_bs_1_0 = 1;
+    const double psitilde_bs_1_1 = 2.5*y + 1.5;
+    const double psitilde_bs_2_0 = 1;
     
     // Compute psitilde_cs
     const double psitilde_cs_00_0 = 1;
     const double psitilde_cs_00_1 = 2*z + 1;
+    const double psitilde_cs_00_2 = 0.3125*psitilde_cs_00_1 + 1.875*z*psitilde_cs_00_1 - 0.5625*psitilde_cs_00_0;
     const double psitilde_cs_01_0 = 1;
+    const double psitilde_cs_01_1 = 3*z + 2;
+    const double psitilde_cs_02_0 = 1;
     const double psitilde_cs_10_0 = 1;
+    const double psitilde_cs_10_1 = 3*z + 2;
+    const double psitilde_cs_11_0 = 1;
+    const double psitilde_cs_20_0 = 1;
     
     // Compute basisvalues
     const double basisvalue0 = 0.866025403784439*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_0;
     const double basisvalue1 = 2.73861278752583*psitilde_a_1*scalings_y_1*psitilde_bs_1_0*scalings_z_1*psitilde_cs_10_0;
     const double basisvalue2 = 1.58113883008419*psitilde_a_0*scalings_y_0*psitilde_bs_0_1*scalings_z_1*psitilde_cs_01_0;
     const double basisvalue3 = 1.11803398874989*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_1;
+    const double basisvalue4 = 5.1234753829798*psitilde_a_2*scalings_y_2*psitilde_bs_2_0*scalings_z_2*psitilde_cs_20_0;
+    const double basisvalue5 = 3.96862696659689*psitilde_a_1*scalings_y_1*psitilde_bs_1_1*scalings_z_2*psitilde_cs_11_0;
+    const double basisvalue6 = 2.29128784747792*psitilde_a_0*scalings_y_0*psitilde_bs_0_2*scalings_z_2*psitilde_cs_02_0;
+    const double basisvalue7 = 3.24037034920393*psitilde_a_1*scalings_y_1*psitilde_bs_1_0*scalings_z_1*psitilde_cs_10_1;
+    const double basisvalue8 = 1.87082869338697*psitilde_a_0*scalings_y_0*psitilde_bs_0_1*scalings_z_1*psitilde_cs_01_1;
+    const double basisvalue9 = 1.3228756555323*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_2;
     
     // Table(s) of coefficients
-    const static double coefficients0[4][4] = \
-    {{0.288675134594813, -0.182574185835055, -0.105409255338946, -0.074535599249993},
-    {0.288675134594813, 0.182574185835055, -0.105409255338946, -0.074535599249993},
-    {0.288675134594813, 0, 0.210818510677892, -0.074535599249993},
-    {0.288675134594813, 0, 0, 0.223606797749979}};
+    const static double coefficients0[10][10] = \
+    {{-0.0577350269189626, -0.0608580619450185, -0.0351364184463153, -0.0248451997499977, 0.0650600048632355, 0.0503952630678969, 0.0290957186981323, 0.0411475599898912, 0.0237565548366599, 0.0167984210226323},
+    {-0.0577350269189625, 0.0608580619450185, -0.0351364184463153, -0.0248451997499977, 0.0650600048632355, -0.050395263067897, 0.0290957186981323, -0.0411475599898912, 0.0237565548366599, 0.0167984210226323},
+    {-0.0577350269189625, 0, 0.0702728368926306, -0.0248451997499977, 0, 0, 0.0872871560943969, 0, -0.0475131096733199, 0.0167984210226323},
+    {-0.0577350269189626, 0, 0, 0.074535599249993, 0, 0, 0, 0, 0, 0.100790526135794},
+    {0.23094010767585, 0, 0.140545673785261, 0.0993807989999906, 0, 0, 0, 0, 0.1187827741833, -0.0671936840905293},
+    {0.230940107675851, 0.121716123890037, -0.0702728368926306, 0.0993807989999907, 0, 0, 0, 0.102868899974728, -0.0593913870916499, -0.0671936840905293},
+    {0.23094010767585, 0.121716123890037, 0.0702728368926307, -0.0993807989999907, 0, 0.100790526135794, -0.087287156094397, -0.0205737799949456, -0.01187827741833, 0.0167984210226323},
+    {0.23094010767585, -0.121716123890037, -0.0702728368926307, 0.0993807989999906, 0, 0, 0, -0.102868899974728, -0.0593913870916499, -0.0671936840905293},
+    {0.23094010767585, -0.121716123890037, 0.0702728368926306, -0.0993807989999906, 0, -0.100790526135794, -0.0872871560943969, 0.0205737799949456, -0.01187827741833, 0.0167984210226323},
+    {0.23094010767585, 0, -0.140545673785261, -0.0993807989999906, -0.130120009726471, 0, 0.0290957186981323, 0, 0.02375655483666, 0.0167984210226323}};
     
     // Interesting (new) part
     // Tables of derivatives of the polynomial base (transpose)
-    const static double dmats0[4][4] = \
-    {{0, 0, 0, 0},
-    {6.32455532033676, 0, 0, 0},
-    {0, 0, 0, 0},
-    {0, 0, 0, 0}};
+    const static double dmats0[10][10] = \
+    {{0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {6.32455532033676, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {0, 11.2249721603218, 0, 0, 0, 0, 0, 0, 0, 0},
+    {4.58257569495584, 0, 8.36660026534076, -1.18321595661992, 0, 0, 0, 0, 0, 0},
+    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {3.74165738677394, 0, 0, 8.69482604771366, 0, 0, 0, 0, 0, 0},
+    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
     
-    const static double dmats1[4][4] = \
-    {{0, 0, 0, 0},
-    {3.16227766016838, 0, 0, 0},
-    {5.47722557505166, 0, 0, 0},
-    {0, 0, 0, 0}};
+    const static double dmats1[10][10] = \
+    {{0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {3.16227766016838, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {5.47722557505166, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {2.95803989154981, 5.61248608016091, -1.08012344973464, -0.763762615825974, 0, 0, 0, 0, 0, 0},
+    {2.29128784747792, 7.24568837309472, 4.18330013267038, -0.591607978309962, 0, 0, 0, 0, 0, 0},
+    {-2.64575131106459, 0, 9.66091783079296, 0.683130051063974, 0, 0, 0, 0, 0, 0},
+    {1.87082869338697, 0, 0, 4.34741302385683, 0, 0, 0, 0, 0, 0},
+    {3.24037034920393, 0, 0, 7.52994023880668, 0, 0, 0, 0, 0, 0},
+    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
     
-    const static double dmats2[4][4] = \
-    {{0, 0, 0, 0},
-    {3.16227766016838, 0, 0, 0},
-    {1.82574185835055, 0, 0, 0},
-    {5.16397779494322, 0, 0, 0}};
+    const static double dmats2[10][10] = \
+    {{0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {3.16227766016838, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {1.82574185835055, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {5.16397779494322, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {2.95803989154981, 5.61248608016091, -1.08012344973464, -0.763762615825974, 0, 0, 0, 0, 0, 0},
+    {2.29128784747792, 1.44913767461894, 4.18330013267038, -0.591607978309962, 0, 0, 0, 0, 0, 0},
+    {1.32287565553229, 0, 3.86436713231718, -0.341565025531986, 0, 0, 0, 0, 0, 0},
+    {1.87082869338697, 7.09929573971954, 0, 4.34741302385683, 0, 0, 0, 0, 0, 0},
+    {1.08012344973464, 0, 7.09929573971954, 2.50998007960223, 0, 0, 0, 0, 0, 0},
+    {-3.81881307912987, 0, 0, 8.87411967464942, 0, 0, 0, 0, 0, 0}};
     
     // Compute reference derivatives
     // Declare pointer to array of derivatives on FIAT element
@@ -364,12 +436,24 @@ void UFC_SemiLagrangianRHS3DLinearForm_f
     double coeff0_1 = 0;
     double coeff0_2 = 0;
     double coeff0_3 = 0;
+    double coeff0_4 = 0;
+    double coeff0_5 = 0;
+    double coeff0_6 = 0;
+    double coeff0_7 = 0;
+    double coeff0_8 = 0;
+    double coeff0_9 = 0;
     
     // Declare new coefficients
     double new_coeff0_0 = 0;
     double new_coeff0_1 = 0;
     double new_coeff0_2 = 0;
     double new_coeff0_3 = 0;
+    double new_coeff0_4 = 0;
+    double new_coeff0_5 = 0;
+    double new_coeff0_6 = 0;
+    double new_coeff0_7 = 0;
+    double new_coeff0_8 = 0;
+    double new_coeff0_9 = 0;
     
     // Loop possible derivatives
     for (unsigned int deriv_num = 0; deriv_num < num_derivatives; deriv_num++)
@@ -379,6 +463,12 @@ void UFC_SemiLagrangianRHS3DLinearForm_f
       new_coeff0_1 = coefficients0[dof][1];
       new_coeff0_2 = coefficients0[dof][2];
       new_coeff0_3 = coefficients0[dof][3];
+      new_coeff0_4 = coefficients0[dof][4];
+      new_coeff0_5 = coefficients0[dof][5];
+      new_coeff0_6 = coefficients0[dof][6];
+      new_coeff0_7 = coefficients0[dof][7];
+      new_coeff0_8 = coefficients0[dof][8];
+      new_coeff0_9 = coefficients0[dof][9];
     
       // Loop derivative order
       for (unsigned int j = 0; j < n; j++)
@@ -388,32 +478,56 @@ void UFC_SemiLagrangianRHS3DLinearForm_f
         coeff0_1 = new_coeff0_1;
         coeff0_2 = new_coeff0_2;
         coeff0_3 = new_coeff0_3;
+        coeff0_4 = new_coeff0_4;
+        coeff0_5 = new_coeff0_5;
+        coeff0_6 = new_coeff0_6;
+        coeff0_7 = new_coeff0_7;
+        coeff0_8 = new_coeff0_8;
+        coeff0_9 = new_coeff0_9;
     
         if(combinations[deriv_num][j] == 0)
         {
-          new_coeff0_0 = coeff0_0*dmats0[0][0] + coeff0_1*dmats0[1][0] + coeff0_2*dmats0[2][0] + coeff0_3*dmats0[3][0];
-          new_coeff0_1 = coeff0_0*dmats0[0][1] + coeff0_1*dmats0[1][1] + coeff0_2*dmats0[2][1] + coeff0_3*dmats0[3][1];
-          new_coeff0_2 = coeff0_0*dmats0[0][2] + coeff0_1*dmats0[1][2] + coeff0_2*dmats0[2][2] + coeff0_3*dmats0[3][2];
-          new_coeff0_3 = coeff0_0*dmats0[0][3] + coeff0_1*dmats0[1][3] + coeff0_2*dmats0[2][3] + coeff0_3*dmats0[3][3];
+          new_coeff0_0 = coeff0_0*dmats0[0][0] + coeff0_1*dmats0[1][0] + coeff0_2*dmats0[2][0] + coeff0_3*dmats0[3][0] + coeff0_4*dmats0[4][0] + coeff0_5*dmats0[5][0] + coeff0_6*dmats0[6][0] + coeff0_7*dmats0[7][0] + coeff0_8*dmats0[8][0] + coeff0_9*dmats0[9][0];
+          new_coeff0_1 = coeff0_0*dmats0[0][1] + coeff0_1*dmats0[1][1] + coeff0_2*dmats0[2][1] + coeff0_3*dmats0[3][1] + coeff0_4*dmats0[4][1] + coeff0_5*dmats0[5][1] + coeff0_6*dmats0[6][1] + coeff0_7*dmats0[7][1] + coeff0_8*dmats0[8][1] + coeff0_9*dmats0[9][1];
+          new_coeff0_2 = coeff0_0*dmats0[0][2] + coeff0_1*dmats0[1][2] + coeff0_2*dmats0[2][2] + coeff0_3*dmats0[3][2] + coeff0_4*dmats0[4][2] + coeff0_5*dmats0[5][2] + coeff0_6*dmats0[6][2] + coeff0_7*dmats0[7][2] + coeff0_8*dmats0[8][2] + coeff0_9*dmats0[9][2];
+          new_coeff0_3 = coeff0_0*dmats0[0][3] + coeff0_1*dmats0[1][3] + coeff0_2*dmats0[2][3] + coeff0_3*dmats0[3][3] + coeff0_4*dmats0[4][3] + coeff0_5*dmats0[5][3] + coeff0_6*dmats0[6][3] + coeff0_7*dmats0[7][3] + coeff0_8*dmats0[8][3] + coeff0_9*dmats0[9][3];
+          new_coeff0_4 = coeff0_0*dmats0[0][4] + coeff0_1*dmats0[1][4] + coeff0_2*dmats0[2][4] + coeff0_3*dmats0[3][4] + coeff0_4*dmats0[4][4] + coeff0_5*dmats0[5][4] + coeff0_6*dmats0[6][4] + coeff0_7*dmats0[7][4] + coeff0_8*dmats0[8][4] + coeff0_9*dmats0[9][4];
+          new_coeff0_5 = coeff0_0*dmats0[0][5] + coeff0_1*dmats0[1][5] + coeff0_2*dmats0[2][5] + coeff0_3*dmats0[3][5] + coeff0_4*dmats0[4][5] + coeff0_5*dmats0[5][5] + coeff0_6*dmats0[6][5] + coeff0_7*dmats0[7][5] + coeff0_8*dmats0[8][5] + coeff0_9*dmats0[9][5];
+          new_coeff0_6 = coeff0_0*dmats0[0][6] + coeff0_1*dmats0[1][6] + coeff0_2*dmats0[2][6] + coeff0_3*dmats0[3][6] + coeff0_4*dmats0[4][6] + coeff0_5*dmats0[5][6] + coeff0_6*dmats0[6][6] + coeff0_7*dmats0[7][6] + coeff0_8*dmats0[8][6] + coeff0_9*dmats0[9][6];
+          new_coeff0_7 = coeff0_0*dmats0[0][7] + coeff0_1*dmats0[1][7] + coeff0_2*dmats0[2][7] + coeff0_3*dmats0[3][7] + coeff0_4*dmats0[4][7] + coeff0_5*dmats0[5][7] + coeff0_6*dmats0[6][7] + coeff0_7*dmats0[7][7] + coeff0_8*dmats0[8][7] + coeff0_9*dmats0[9][7];
+          new_coeff0_8 = coeff0_0*dmats0[0][8] + coeff0_1*dmats0[1][8] + coeff0_2*dmats0[2][8] + coeff0_3*dmats0[3][8] + coeff0_4*dmats0[4][8] + coeff0_5*dmats0[5][8] + coeff0_6*dmats0[6][8] + coeff0_7*dmats0[7][8] + coeff0_8*dmats0[8][8] + coeff0_9*dmats0[9][8];
+          new_coeff0_9 = coeff0_0*dmats0[0][9] + coeff0_1*dmats0[1][9] + coeff0_2*dmats0[2][9] + coeff0_3*dmats0[3][9] + coeff0_4*dmats0[4][9] + coeff0_5*dmats0[5][9] + coeff0_6*dmats0[6][9] + coeff0_7*dmats0[7][9] + coeff0_8*dmats0[8][9] + coeff0_9*dmats0[9][9];
         }
         if(combinations[deriv_num][j] == 1)
         {
-          new_coeff0_0 = coeff0_0*dmats1[0][0] + coeff0_1*dmats1[1][0] + coeff0_2*dmats1[2][0] + coeff0_3*dmats1[3][0];
-          new_coeff0_1 = coeff0_0*dmats1[0][1] + coeff0_1*dmats1[1][1] + coeff0_2*dmats1[2][1] + coeff0_3*dmats1[3][1];
-          new_coeff0_2 = coeff0_0*dmats1[0][2] + coeff0_1*dmats1[1][2] + coeff0_2*dmats1[2][2] + coeff0_3*dmats1[3][2];
-          new_coeff0_3 = coeff0_0*dmats1[0][3] + coeff0_1*dmats1[1][3] + coeff0_2*dmats1[2][3] + coeff0_3*dmats1[3][3];
+          new_coeff0_0 = coeff0_0*dmats1[0][0] + coeff0_1*dmats1[1][0] + coeff0_2*dmats1[2][0] + coeff0_3*dmats1[3][0] + coeff0_4*dmats1[4][0] + coeff0_5*dmats1[5][0] + coeff0_6*dmats1[6][0] + coeff0_7*dmats1[7][0] + coeff0_8*dmats1[8][0] + coeff0_9*dmats1[9][0];
+          new_coeff0_1 = coeff0_0*dmats1[0][1] + coeff0_1*dmats1[1][1] + coeff0_2*dmats1[2][1] + coeff0_3*dmats1[3][1] + coeff0_4*dmats1[4][1] + coeff0_5*dmats1[5][1] + coeff0_6*dmats1[6][1] + coeff0_7*dmats1[7][1] + coeff0_8*dmats1[8][1] + coeff0_9*dmats1[9][1];
+          new_coeff0_2 = coeff0_0*dmats1[0][2] + coeff0_1*dmats1[1][2] + coeff0_2*dmats1[2][2] + coeff0_3*dmats1[3][2] + coeff0_4*dmats1[4][2] + coeff0_5*dmats1[5][2] + coeff0_6*dmats1[6][2] + coeff0_7*dmats1[7][2] + coeff0_8*dmats1[8][2] + coeff0_9*dmats1[9][2];
+          new_coeff0_3 = coeff0_0*dmats1[0][3] + coeff0_1*dmats1[1][3] + coeff0_2*dmats1[2][3] + coeff0_3*dmats1[3][3] + coeff0_4*dmats1[4][3] + coeff0_5*dmats1[5][3] + coeff0_6*dmats1[6][3] + coeff0_7*dmats1[7][3] + coeff0_8*dmats1[8][3] + coeff0_9*dmats1[9][3];
+          new_coeff0_4 = coeff0_0*dmats1[0][4] + coeff0_1*dmats1[1][4] + coeff0_2*dmats1[2][4] + coeff0_3*dmats1[3][4] + coeff0_4*dmats1[4][4] + coeff0_5*dmats1[5][4] + coeff0_6*dmats1[6][4] + coeff0_7*dmats1[7][4] + coeff0_8*dmats1[8][4] + coeff0_9*dmats1[9][4];
+          new_coeff0_5 = coeff0_0*dmats1[0][5] + coeff0_1*dmats1[1][5] + coeff0_2*dmats1[2][5] + coeff0_3*dmats1[3][5] + coeff0_4*dmats1[4][5] + coeff0_5*dmats1[5][5] + coeff0_6*dmats1[6][5] + coeff0_7*dmats1[7][5] + coeff0_8*dmats1[8][5] + coeff0_9*dmats1[9][5];
+          new_coeff0_6 = coeff0_0*dmats1[0][6] + coeff0_1*dmats1[1][6] + coeff0_2*dmats1[2][6] + coeff0_3*dmats1[3][6] + coeff0_4*dmats1[4][6] + coeff0_5*dmats1[5][6] + coeff0_6*dmats1[6][6] + coeff0_7*dmats1[7][6] + coeff0_8*dmats1[8][6] + coeff0_9*dmats1[9][6];
+          new_coeff0_7 = coeff0_0*dmats1[0][7] + coeff0_1*dmats1[1][7] + coeff0_2*dmats1[2][7] + coeff0_3*dmats1[3][7] + coeff0_4*dmats1[4][7] + coeff0_5*dmats1[5][7] + coeff0_6*dmats1[6][7] + coeff0_7*dmats1[7][7] + coeff0_8*dmats1[8][7] + coeff0_9*dmats1[9][7];
+          new_coeff0_8 = coeff0_0*dmats1[0][8] + coeff0_1*dmats1[1][8] + coeff0_2*dmats1[2][8] + coeff0_3*dmats1[3][8] + coeff0_4*dmats1[4][8] + coeff0_5*dmats1[5][8] + coeff0_6*dmats1[6][8] + coeff0_7*dmats1[7][8] + coeff0_8*dmats1[8][8] + coeff0_9*dmats1[9][8];
+          new_coeff0_9 = coeff0_0*dmats1[0][9] + coeff0_1*dmats1[1][9] + coeff0_2*dmats1[2][9] + coeff0_3*dmats1[3][9] + coeff0_4*dmats1[4][9] + coeff0_5*dmats1[5][9] + coeff0_6*dmats1[6][9] + coeff0_7*dmats1[7][9] + coeff0_8*dmats1[8][9] + coeff0_9*dmats1[9][9];
         }
         if(combinations[deriv_num][j] == 2)
         {
-          new_coeff0_0 = coeff0_0*dmats2[0][0] + coeff0_1*dmats2[1][0] + coeff0_2*dmats2[2][0] + coeff0_3*dmats2[3][0];
-          new_coeff0_1 = coeff0_0*dmats2[0][1] + coeff0_1*dmats2[1][1] + coeff0_2*dmats2[2][1] + coeff0_3*dmats2[3][1];
-          new_coeff0_2 = coeff0_0*dmats2[0][2] + coeff0_1*dmats2[1][2] + coeff0_2*dmats2[2][2] + coeff0_3*dmats2[3][2];
-          new_coeff0_3 = coeff0_0*dmats2[0][3] + coeff0_1*dmats2[1][3] + coeff0_2*dmats2[2][3] + coeff0_3*dmats2[3][3];
+          new_coeff0_0 = coeff0_0*dmats2[0][0] + coeff0_1*dmats2[1][0] + coeff0_2*dmats2[2][0] + coeff0_3*dmats2[3][0] + coeff0_4*dmats2[4][0] + coeff0_5*dmats2[5][0] + coeff0_6*dmats2[6][0] + coeff0_7*dmats2[7][0] + coeff0_8*dmats2[8][0] + coeff0_9*dmats2[9][0];
+          new_coeff0_1 = coeff0_0*dmats2[0][1] + coeff0_1*dmats2[1][1] + coeff0_2*dmats2[2][1] + coeff0_3*dmats2[3][1] + coeff0_4*dmats2[4][1] + coeff0_5*dmats2[5][1] + coeff0_6*dmats2[6][1] + coeff0_7*dmats2[7][1] + coeff0_8*dmats2[8][1] + coeff0_9*dmats2[9][1];
+          new_coeff0_2 = coeff0_0*dmats2[0][2] + coeff0_1*dmats2[1][2] + coeff0_2*dmats2[2][2] + coeff0_3*dmats2[3][2] + coeff0_4*dmats2[4][2] + coeff0_5*dmats2[5][2] + coeff0_6*dmats2[6][2] + coeff0_7*dmats2[7][2] + coeff0_8*dmats2[8][2] + coeff0_9*dmats2[9][2];
+          new_coeff0_3 = coeff0_0*dmats2[0][3] + coeff0_1*dmats2[1][3] + coeff0_2*dmats2[2][3] + coeff0_3*dmats2[3][3] + coeff0_4*dmats2[4][3] + coeff0_5*dmats2[5][3] + coeff0_6*dmats2[6][3] + coeff0_7*dmats2[7][3] + coeff0_8*dmats2[8][3] + coeff0_9*dmats2[9][3];
+          new_coeff0_4 = coeff0_0*dmats2[0][4] + coeff0_1*dmats2[1][4] + coeff0_2*dmats2[2][4] + coeff0_3*dmats2[3][4] + coeff0_4*dmats2[4][4] + coeff0_5*dmats2[5][4] + coeff0_6*dmats2[6][4] + coeff0_7*dmats2[7][4] + coeff0_8*dmats2[8][4] + coeff0_9*dmats2[9][4];
+          new_coeff0_5 = coeff0_0*dmats2[0][5] + coeff0_1*dmats2[1][5] + coeff0_2*dmats2[2][5] + coeff0_3*dmats2[3][5] + coeff0_4*dmats2[4][5] + coeff0_5*dmats2[5][5] + coeff0_6*dmats2[6][5] + coeff0_7*dmats2[7][5] + coeff0_8*dmats2[8][5] + coeff0_9*dmats2[9][5];
+          new_coeff0_6 = coeff0_0*dmats2[0][6] + coeff0_1*dmats2[1][6] + coeff0_2*dmats2[2][6] + coeff0_3*dmats2[3][6] + coeff0_4*dmats2[4][6] + coeff0_5*dmats2[5][6] + coeff0_6*dmats2[6][6] + coeff0_7*dmats2[7][6] + coeff0_8*dmats2[8][6] + coeff0_9*dmats2[9][6];
+          new_coeff0_7 = coeff0_0*dmats2[0][7] + coeff0_1*dmats2[1][7] + coeff0_2*dmats2[2][7] + coeff0_3*dmats2[3][7] + coeff0_4*dmats2[4][7] + coeff0_5*dmats2[5][7] + coeff0_6*dmats2[6][7] + coeff0_7*dmats2[7][7] + coeff0_8*dmats2[8][7] + coeff0_9*dmats2[9][7];
+          new_coeff0_8 = coeff0_0*dmats2[0][8] + coeff0_1*dmats2[1][8] + coeff0_2*dmats2[2][8] + coeff0_3*dmats2[3][8] + coeff0_4*dmats2[4][8] + coeff0_5*dmats2[5][8] + coeff0_6*dmats2[6][8] + coeff0_7*dmats2[7][8] + coeff0_8*dmats2[8][8] + coeff0_9*dmats2[9][8];
+          new_coeff0_9 = coeff0_0*dmats2[0][9] + coeff0_1*dmats2[1][9] + coeff0_2*dmats2[2][9] + coeff0_3*dmats2[3][9] + coeff0_4*dmats2[4][9] + coeff0_5*dmats2[5][9] + coeff0_6*dmats2[6][9] + coeff0_7*dmats2[7][9] + coeff0_8*dmats2[8][9] + coeff0_9*dmats2[9][9];
         }
     
       }
       // Compute derivatives on reference element as dot product of coefficients and basisvalues
-      derivatives[deriv_num] = new_coeff0_0*basisvalue0 + new_coeff0_1*basisvalue1 + new_coeff0_2*basisvalue2 + new_coeff0_3*basisvalue3;
+      derivatives[deriv_num] = new_coeff0_0*basisvalue0 + new_coeff0_1*basisvalue1 + new_coeff0_2*basisvalue2 + new_coeff0_3*basisvalue3 + new_coeff0_4*basisvalue4 + new_coeff0_5*basisvalue5 + new_coeff0_6*basisvalue6 + new_coeff0_7*basisvalue7 + new_coeff0_8*basisvalue8 + new_coeff0_9*basisvalue9;
     }
     
     // Transform derivatives back to physical element
@@ -453,9 +567,9 @@ double UFC_SemiLagrangianRHS3DLinearForm
                                    const ufc::cell& c) const
 {
     // The reference points, direction and weights:
-    const static double X[4][1][3] = {{{0, 0, 0}}, {{1, 0, 0}}, {{0, 1, 0}}, {{0, 0, 1}}};
-    const static double W[4][1] = {{1}, {1}, {1}, {1}};
-    const static double D[4][1][1] = {{{1}}, {{1}}, {{1}}, {{1}}};
+    const static double X[10][1][3] = {{{0, 0, 0}}, {{1, 0, 0}}, {{0, 1, 0}}, {{0, 0, 1}}, {{0, 0.5, 0.5}}, {{0.5, 0, 0.5}}, {{0.5, 0.5, 0}}, {{0, 0, 0.5}}, {{0, 0.5, 0}}, {{0.5, 0, 0}}};
+    const static double W[10][1] = {{1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}};
+    const static double D[10][1][1] = {{{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}};
     
     const double * const * x = c.coordinates;
     double result = 0.0;
@@ -538,7 +652,7 @@ UFC_SemiLagrangianRHS3DLinearForm_finite
 /// Return a string identifying the finite element
 const char* UFC_SemiLagrangianRHS3DLinearForm_finite_element_1::signature() const
 {
-    return "Quadrature element with 8 quadrature point(s) (2x2x2) on a tetrahedron";
+    return "Quadrature element with 27 quadrature point(s) (3x3x3) on a tetrahedron";
 }
 
 /// Return the cell shape
@@ -550,7 +664,7 @@ ufc::shape UFC_SemiLagrangianRHS3DLinear
 /// Return the dimension of the finite element function space
 unsigned int UFC_SemiLagrangianRHS3DLinearForm_finite_element_1::space_dimension() const
 {
-    return 8;
+    return 27;
 }
 
 /// Return the rank of the value space
@@ -607,9 +721,9 @@ double UFC_SemiLagrangianRHS3DLinearForm
                                    const ufc::cell& c) const
 {
     // The reference points, direction and weights:
-    const static double X[8][1][3] = {{{0.156682637336818, 0.136054976802846, 0.122514822655441}}, {{0.0813956670146703, 0.0706797241593969, 0.544151844011225}}, {{0.0658386870600444, 0.565933165072801, 0.122514822655441}}, {{0.0342027932367664, 0.293998800631623, 0.544151844011225}}, {{0.584747563204894, 0.136054976802846, 0.122514822655441}}, {{0.303772764814708, 0.0706797241593969, 0.544151844011225}}, {{0.245713325211713, 0.565933165072801, 0.122514822655441}}, {{0.127646562120385, 0.293998800631623, 0.544151844011225}}};
-    const static double W[8][1] = {{1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}};
-    const static double D[8][1][1] = {{{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}};
+    const static double X[27][1][3] = {{{0.0952198798417149, 0.0821215678634425, 0.0729940240731498}}, {{0.0670742417520586, 0.0578476039361427, 0.347003766038352}}, {{0.0303014811742758, 0.0261332522867349, 0.705002209888498}}, {{0.0616960186091465, 0.379578230280591, 0.0729940240731498}}, {{0.0434595556538024, 0.267380320411884, 0.347003766038352}}, {{0.0196333029354845, 0.120791820133903, 0.705002209888498}}, {{0.0221843026408197, 0.730165028047632, 0.0729940240731498}}, {{0.0156269392579017, 0.514338662174092, 0.347003766038352}}, {{0.00705963113955477, 0.232357800579865, 0.705002209888498}}, {{0.422442204031704, 0.0821215678634425, 0.0729940240731498}}, {{0.297574315012753, 0.0578476039361427, 0.347003766038352}}, {{0.134432268912383, 0.0261332522867349, 0.705002209888498}}, {{0.27371387282313, 0.379578230280591, 0.0729940240731498}}, {{0.192807956774882, 0.267380320411884, 0.347003766038352}}, {{0.0871029849887995, 0.120791820133903, 0.705002209888498}}, {{0.0984204739396093, 0.730165028047632, 0.0729940240731498}}, {{0.0693287858937781, 0.514338662174092, 0.347003766038352}}, {{0.0313199947658185, 0.232357800579865, 0.705002209888498}}, {{0.749664528221693, 0.0821215678634425, 0.0729940240731498}}, {{0.528074388273447, 0.0578476039361427, 0.347003766038352}}, {{0.238563056650491, 0.0261332522867349, 0.705002209888498}}, {{0.485731727037113, 0.379578230280591, 0.0729940240731498}}, {{0.342156357895961, 0.267380320411884, 0.347003766038352}}, {{0.154572667042115, 0.120791820133903, 0.705002209888498}}, {{0.174656645238399, 0.730165028047632, 0.0729940240731498}}, {{0.123030632529655, 0.514338662174092, 0.347003766038352}}, {{0.0555803583920821, 0.232357800579865, 0.705002209888498}}};
+    const static double W[27][1] = {{1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}};
+    const static double D[27][1][1] = {{{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}};
     
     const double * const * x = c.coordinates;
     double result = 0.0;
@@ -687,7 +801,7 @@ UFC_SemiLagrangianRHS3DLinearForm_dof_ma
 /// Return a string identifying the dof map
 const char* UFC_SemiLagrangianRHS3DLinearForm_dof_map_0::signature() const
 {
-    return "FFC dof map for FiniteElement('Lagrange', 'tetrahedron', 1)";
+    return "FFC dof map for FiniteElement('Lagrange', 'tetrahedron', 2)";
 }
 
 /// Return true iff mesh entities of topological dimension d are needed
@@ -699,7 +813,7 @@ bool UFC_SemiLagrangianRHS3DLinearForm_d
       return true;
       break;
     case 1:
-      return false;
+      return true;
       break;
     case 2:
       return false;
@@ -714,7 +828,7 @@ bool UFC_SemiLagrangianRHS3DLinearForm_d
 /// Initialize dof map for mesh (return true iff init_cell() is needed)
 bool UFC_SemiLagrangianRHS3DLinearForm_dof_map_0::init_mesh(const ufc::mesh& m)
 {
-    __global_dimension = m.num_entities[0];
+    __global_dimension = m.num_entities[0] + m.num_entities[1];
     return false;
 }
 
@@ -740,7 +854,7 @@ unsigned int UFC_SemiLagrangianRHS3DLine
 /// Return the dimension of the local finite element function space
 unsigned int UFC_SemiLagrangianRHS3DLinearForm_dof_map_0::local_dimension() const
 {
-    return 4;
+    return 10;
 }
 
 // Return the geometric dimension of the coordinates this dof map provides
@@ -752,7 +866,7 @@ unsigned int UFC_SemiLagrangianRHS3DLine
 /// Return the number of dofs on each cell facet
 unsigned int UFC_SemiLagrangianRHS3DLinearForm_dof_map_0::num_facet_dofs() const
 {
-    return 3;
+    return 6;
 }
 
 /// Return the number of dofs associated with each cell entity of dimension d
@@ -770,6 +884,13 @@ void UFC_SemiLagrangianRHS3DLinearForm_d
     dofs[1] = c.entity_indices[0][1];
     dofs[2] = c.entity_indices[0][2];
     dofs[3] = c.entity_indices[0][3];
+    unsigned int offset = m.num_entities[0];
+    dofs[4] = offset + c.entity_indices[1][0];
+    dofs[5] = offset + c.entity_indices[1][1];
+    dofs[6] = offset + c.entity_indices[1][2];
+    dofs[7] = offset + c.entity_indices[1][3];
+    dofs[8] = offset + c.entity_indices[1][4];
+    dofs[9] = offset + c.entity_indices[1][5];
 }
 
 /// Tabulate the local-to-local mapping from facet dofs to cell dofs
@@ -782,21 +903,33 @@ void UFC_SemiLagrangianRHS3DLinearForm_d
       dofs[0] = 1;
       dofs[1] = 2;
       dofs[2] = 3;
+      dofs[3] = 4;
+      dofs[4] = 5;
+      dofs[5] = 6;
       break;
     case 1:
       dofs[0] = 0;
       dofs[1] = 2;
       dofs[2] = 3;
+      dofs[3] = 4;
+      dofs[4] = 7;
+      dofs[5] = 8;
       break;
     case 2:
       dofs[0] = 0;
       dofs[1] = 1;
       dofs[2] = 3;
+      dofs[3] = 5;
+      dofs[4] = 7;
+      dofs[5] = 9;
       break;
     case 3:
       dofs[0] = 0;
       dofs[1] = 1;
       dofs[2] = 2;
+      dofs[3] = 6;
+      dofs[4] = 8;
+      dofs[5] = 9;
       break;
     }
 }
@@ -825,6 +958,24 @@ void UFC_SemiLagrangianRHS3DLinearForm_d
     coordinates[3][0] = x[3][0];
     coordinates[3][1] = x[3][1];
     coordinates[3][2] = x[3][2];
+    coordinates[4][0] = 0.5*x[2][0] + 0.5*x[3][0];
+    coordinates[4][1] = 0.5*x[2][1] + 0.5*x[3][1];
+    coordinates[4][2] = 0.5*x[2][2] + 0.5*x[3][2];
+    coordinates[5][0] = 0.5*x[1][0] + 0.5*x[3][0];
+    coordinates[5][1] = 0.5*x[1][1] + 0.5*x[3][1];
+    coordinates[5][2] = 0.5*x[1][2] + 0.5*x[3][2];
+    coordinates[6][0] = 0.5*x[1][0] + 0.5*x[2][0];
+    coordinates[6][1] = 0.5*x[1][1] + 0.5*x[2][1];
+    coordinates[6][2] = 0.5*x[1][2] + 0.5*x[2][2];
+    coordinates[7][0] = 0.5*x[0][0] + 0.5*x[3][0];
+    coordinates[7][1] = 0.5*x[0][1] + 0.5*x[3][1];
+    coordinates[7][2] = 0.5*x[0][2] + 0.5*x[3][2];
+    coordinates[8][0] = 0.5*x[0][0] + 0.5*x[2][0];
+    coordinates[8][1] = 0.5*x[0][1] + 0.5*x[2][1];
+    coordinates[8][2] = 0.5*x[0][2] + 0.5*x[2][2];
+    coordinates[9][0] = 0.5*x[0][0] + 0.5*x[1][0];
+    coordinates[9][1] = 0.5*x[0][1] + 0.5*x[1][1];
+    coordinates[9][2] = 0.5*x[0][2] + 0.5*x[1][2];
 }
 
 /// Return the number of sub dof maps (for a mixed element)
@@ -855,7 +1006,7 @@ UFC_SemiLagrangianRHS3DLinearForm_dof_ma
 /// Return a string identifying the dof map
 const char* UFC_SemiLagrangianRHS3DLinearForm_dof_map_1::signature() const
 {
-    return "FFC dof map for Quadrature element with 8 quadrature point(s) (2x2x2) on a tetrahedron";
+    return "FFC dof map for Quadrature element with 27 quadrature point(s) (3x3x3) on a tetrahedron";
 }
 
 /// Return true iff mesh entities of topological dimension d are needed
@@ -882,7 +1033,7 @@ bool UFC_SemiLagrangianRHS3DLinearForm_d
 /// Initialize dof map for mesh (return true iff init_cell() is needed)
 bool UFC_SemiLagrangianRHS3DLinearForm_dof_map_1::init_mesh(const ufc::mesh& m)
 {
-    __global_dimension = 8*m.num_entities[3];
+    __global_dimension = 27*m.num_entities[3];
     return false;
 }
 
@@ -908,7 +1059,7 @@ unsigned int UFC_SemiLagrangianRHS3DLine
 /// Return the dimension of the local finite element function space
 unsigned int UFC_SemiLagrangianRHS3DLinearForm_dof_map_1::local_dimension() const
 {
-    return 8;
+    return 27;
 }
 
 // Return the geometric dimension of the coordinates this dof map provides
@@ -934,14 +1085,33 @@ void UFC_SemiLagrangianRHS3DLinearForm_d
                                   const ufc::mesh& m,
                                   const ufc::cell& c) const
 {
-    dofs[0] = 8*c.entity_indices[3][0];
-    dofs[1] = 8*c.entity_indices[3][0] + 1;
-    dofs[2] = 8*c.entity_indices[3][0] + 2;
-    dofs[3] = 8*c.entity_indices[3][0] + 3;
-    dofs[4] = 8*c.entity_indices[3][0] + 4;
-    dofs[5] = 8*c.entity_indices[3][0] + 5;
-    dofs[6] = 8*c.entity_indices[3][0] + 6;
-    dofs[7] = 8*c.entity_indices[3][0] + 7;
+    dofs[0] = 27*c.entity_indices[3][0];
+    dofs[1] = 27*c.entity_indices[3][0] + 1;
+    dofs[2] = 27*c.entity_indices[3][0] + 2;
+    dofs[3] = 27*c.entity_indices[3][0] + 3;
+    dofs[4] = 27*c.entity_indices[3][0] + 4;
+    dofs[5] = 27*c.entity_indices[3][0] + 5;
+    dofs[6] = 27*c.entity_indices[3][0] + 6;
+    dofs[7] = 27*c.entity_indices[3][0] + 7;
+    dofs[8] = 27*c.entity_indices[3][0] + 8;
+    dofs[9] = 27*c.entity_indices[3][0] + 9;
+    dofs[10] = 27*c.entity_indices[3][0] + 10;
+    dofs[11] = 27*c.entity_indices[3][0] + 11;
+    dofs[12] = 27*c.entity_indices[3][0] + 12;
+    dofs[13] = 27*c.entity_indices[3][0] + 13;
+    dofs[14] = 27*c.entity_indices[3][0] + 14;
+    dofs[15] = 27*c.entity_indices[3][0] + 15;
+    dofs[16] = 27*c.entity_indices[3][0] + 16;
+    dofs[17] = 27*c.entity_indices[3][0] + 17;
+    dofs[18] = 27*c.entity_indices[3][0] + 18;
+    dofs[19] = 27*c.entity_indices[3][0] + 19;
+    dofs[20] = 27*c.entity_indices[3][0] + 20;
+    dofs[21] = 27*c.entity_indices[3][0] + 21;
+    dofs[22] = 27*c.entity_indices[3][0] + 22;
+    dofs[23] = 27*c.entity_indices[3][0] + 23;
+    dofs[24] = 27*c.entity_indices[3][0] + 24;
+    dofs[25] = 27*c.entity_indices[3][0] + 25;
+    dofs[26] = 27*c.entity_indices[3][0] + 26;
 }
 
 /// Tabulate the local-to-local mapping from facet dofs to cell dofs
@@ -977,30 +1147,87 @@ void UFC_SemiLagrangianRHS3DLinearForm_d
                                          const ufc::cell& c) const
 {
     const double * const * x = c.coordinates;
-    coordinates[0][0] = 0.584747563204894*x[0][0] + 0.156682637336818*x[1][0] + 0.136054976802846*x[2][0] + 0.122514822655441*x[3][0];
-    coordinates[0][1] = 0.584747563204894*x[0][1] + 0.156682637336818*x[1][1] + 0.136054976802846*x[2][1] + 0.122514822655441*x[3][1];
-    coordinates[0][2] = 0.584747563204894*x[0][2] + 0.156682637336818*x[1][2] + 0.136054976802846*x[2][2] + 0.122514822655441*x[3][2];
-    coordinates[1][0] = 0.303772764814707*x[0][0] + 0.0813956670146703*x[1][0] + 0.0706797241593969*x[2][0] + 0.544151844011225*x[3][0];
-    coordinates[1][1] = 0.303772764814707*x[0][1] + 0.0813956670146703*x[1][1] + 0.0706797241593969*x[2][1] + 0.544151844011225*x[3][1];
-    coordinates[1][2] = 0.303772764814707*x[0][2] + 0.0813956670146703*x[1][2] + 0.0706797241593969*x[2][2] + 0.544151844011225*x[3][2];
-    coordinates[2][0] = 0.245713325211713*x[0][0] + 0.0658386870600444*x[1][0] + 0.565933165072801*x[2][0] + 0.122514822655441*x[3][0];
-    coordinates[2][1] = 0.245713325211713*x[0][1] + 0.0658386870600444*x[1][1] + 0.565933165072801*x[2][1] + 0.122514822655441*x[3][1];
-    coordinates[2][2] = 0.245713325211713*x[0][2] + 0.0658386870600444*x[1][2] + 0.565933165072801*x[2][2] + 0.122514822655441*x[3][2];
-    coordinates[3][0] = 0.127646562120385*x[0][0] + 0.0342027932367665*x[1][0] + 0.293998800631623*x[2][0] + 0.544151844011225*x[3][0];
-    coordinates[3][1] = 0.127646562120385*x[0][1] + 0.0342027932367665*x[1][1] + 0.293998800631623*x[2][1] + 0.544151844011225*x[3][1];
-    coordinates[3][2] = 0.127646562120385*x[0][2] + 0.0342027932367665*x[1][2] + 0.293998800631623*x[2][2] + 0.544151844011225*x[3][2];
-    coordinates[4][0] = 0.156682637336818*x[0][0] + 0.584747563204894*x[1][0] + 0.136054976802846*x[2][0] + 0.122514822655441*x[3][0];
-    coordinates[4][1] = 0.156682637336818*x[0][1] + 0.584747563204894*x[1][1] + 0.136054976802846*x[2][1] + 0.122514822655441*x[3][1];
-    coordinates[4][2] = 0.156682637336818*x[0][2] + 0.584747563204894*x[1][2] + 0.136054976802846*x[2][2] + 0.122514822655441*x[3][2];
-    coordinates[5][0] = 0.0813956670146703*x[0][0] + 0.303772764814707*x[1][0] + 0.0706797241593969*x[2][0] + 0.544151844011225*x[3][0];
-    coordinates[5][1] = 0.0813956670146703*x[0][1] + 0.303772764814707*x[1][1] + 0.0706797241593969*x[2][1] + 0.544151844011225*x[3][1];
-    coordinates[5][2] = 0.0813956670146703*x[0][2] + 0.303772764814707*x[1][2] + 0.0706797241593969*x[2][2] + 0.544151844011225*x[3][2];
-    coordinates[6][0] = 0.0658386870600443*x[0][0] + 0.245713325211713*x[1][0] + 0.565933165072801*x[2][0] + 0.122514822655441*x[3][0];
-    coordinates[6][1] = 0.0658386870600443*x[0][1] + 0.245713325211713*x[1][1] + 0.565933165072801*x[2][1] + 0.122514822655441*x[3][1];
-    coordinates[6][2] = 0.0658386870600443*x[0][2] + 0.245713325211713*x[1][2] + 0.565933165072801*x[2][2] + 0.122514822655441*x[3][2];
-    coordinates[7][0] = 0.0342027932367664*x[0][0] + 0.127646562120385*x[1][0] + 0.293998800631623*x[2][0] + 0.544151844011225*x[3][0];
-    coordinates[7][1] = 0.0342027932367664*x[0][1] + 0.127646562120385*x[1][1] + 0.293998800631623*x[2][1] + 0.544151844011225*x[3][1];
-    coordinates[7][2] = 0.0342027932367664*x[0][2] + 0.127646562120385*x[1][2] + 0.293998800631623*x[2][2] + 0.544151844011225*x[3][2];
+    coordinates[0][0] = 0.749664528221693*x[0][0] + 0.0952198798417149*x[1][0] + 0.0821215678634425*x[2][0] + 0.0729940240731498*x[3][0];
+    coordinates[0][1] = 0.749664528221693*x[0][1] + 0.0952198798417149*x[1][1] + 0.0821215678634425*x[2][1] + 0.0729940240731498*x[3][1];
+    coordinates[0][2] = 0.749664528221693*x[0][2] + 0.0952198798417149*x[1][2] + 0.0821215678634425*x[2][2] + 0.0729940240731498*x[3][2];
+    coordinates[1][0] = 0.528074388273447*x[0][0] + 0.0670742417520585*x[1][0] + 0.0578476039361427*x[2][0] + 0.347003766038352*x[3][0];
+    coordinates[1][1] = 0.528074388273447*x[0][1] + 0.0670742417520585*x[1][1] + 0.0578476039361427*x[2][1] + 0.347003766038352*x[3][1];
+    coordinates[1][2] = 0.528074388273447*x[0][2] + 0.0670742417520585*x[1][2] + 0.0578476039361427*x[2][2] + 0.347003766038352*x[3][2];
+    coordinates[2][0] = 0.238563056650491*x[0][0] + 0.0303014811742758*x[1][0] + 0.0261332522867348*x[2][0] + 0.705002209888498*x[3][0];
+    coordinates[2][1] = 0.238563056650491*x[0][1] + 0.0303014811742758*x[1][1] + 0.0261332522867348*x[2][1] + 0.705002209888498*x[3][1];
+    coordinates[2][2] = 0.238563056650491*x[0][2] + 0.0303014811742758*x[1][2] + 0.0261332522867348*x[2][2] + 0.705002209888498*x[3][2];
+    coordinates[3][0] = 0.485731727037113*x[0][0] + 0.0616960186091464*x[1][0] + 0.379578230280591*x[2][0] + 0.0729940240731498*x[3][0];
+    coordinates[3][1] = 0.485731727037113*x[0][1] + 0.0616960186091464*x[1][1] + 0.379578230280591*x[2][1] + 0.0729940240731498*x[3][1];
+    coordinates[3][2] = 0.485731727037113*x[0][2] + 0.0616960186091464*x[1][2] + 0.379578230280591*x[2][2] + 0.0729940240731498*x[3][2];
+    coordinates[4][0] = 0.342156357895961*x[0][0] + 0.0434595556538024*x[1][0] + 0.267380320411884*x[2][0] + 0.347003766038352*x[3][0];
+    coordinates[4][1] = 0.342156357895961*x[0][1] + 0.0434595556538024*x[1][1] + 0.267380320411884*x[2][1] + 0.347003766038352*x[3][1];
+    coordinates[4][2] = 0.342156357895961*x[0][2] + 0.0434595556538024*x[1][2] + 0.267380320411884*x[2][2] + 0.347003766038352*x[3][2];
+    coordinates[5][0] = 0.154572667042115*x[0][0] + 0.0196333029354845*x[1][0] + 0.120791820133903*x[2][0] + 0.705002209888498*x[3][0];
+    coordinates[5][1] = 0.154572667042115*x[0][1] + 0.0196333029354845*x[1][1] + 0.120791820133903*x[2][1] + 0.705002209888498*x[3][1];
+    coordinates[5][2] = 0.154572667042115*x[0][2] + 0.0196333029354845*x[1][2] + 0.120791820133903*x[2][2] + 0.705002209888498*x[3][2];
+    coordinates[6][0] = 0.174656645238399*x[0][0] + 0.0221843026408197*x[1][0] + 0.730165028047632*x[2][0] + 0.0729940240731498*x[3][0];
+    coordinates[6][1] = 0.174656645238399*x[0][1] + 0.0221843026408197*x[1][1] + 0.730165028047632*x[2][1] + 0.0729940240731498*x[3][1];
+    coordinates[6][2] = 0.174656645238399*x[0][2] + 0.0221843026408197*x[1][2] + 0.730165028047632*x[2][2] + 0.0729940240731498*x[3][2];
+    coordinates[7][0] = 0.123030632529655*x[0][0] + 0.0156269392579016*x[1][0] + 0.514338662174092*x[2][0] + 0.347003766038352*x[3][0];
+    coordinates[7][1] = 0.123030632529655*x[0][1] + 0.0156269392579016*x[1][1] + 0.514338662174092*x[2][1] + 0.347003766038352*x[3][1];
+    coordinates[7][2] = 0.123030632529655*x[0][2] + 0.0156269392579016*x[1][2] + 0.514338662174092*x[2][2] + 0.347003766038352*x[3][2];
+    coordinates[8][0] = 0.0555803583920822*x[0][0] + 0.0070596311395548*x[1][0] + 0.232357800579865*x[2][0] + 0.705002209888498*x[3][0];
+    coordinates[8][1] = 0.0555803583920822*x[0][1] + 0.0070596311395548*x[1][1] + 0.232357800579865*x[2][1] + 0.705002209888498*x[3][1];
+    coordinates[8][2] = 0.0555803583920822*x[0][2] + 0.0070596311395548*x[1][2] + 0.232357800579865*x[2][2] + 0.705002209888498*x[3][2];
+    coordinates[9][0] = 0.422442204031704*x[0][0] + 0.422442204031704*x[1][0] + 0.0821215678634425*x[2][0] + 0.0729940240731498*x[3][0];
+    coordinates[9][1] = 0.422442204031704*x[0][1] + 0.422442204031704*x[1][1] + 0.0821215678634425*x[2][1] + 0.0729940240731498*x[3][1];
+    coordinates[9][2] = 0.422442204031704*x[0][2] + 0.422442204031704*x[1][2] + 0.0821215678634425*x[2][2] + 0.0729940240731498*x[3][2];
+    coordinates[10][0] = 0.297574315012753*x[0][0] + 0.297574315012753*x[1][0] + 0.0578476039361427*x[2][0] + 0.347003766038352*x[3][0];
+    coordinates[10][1] = 0.297574315012753*x[0][1] + 0.297574315012753*x[1][1] + 0.0578476039361427*x[2][1] + 0.347003766038352*x[3][1];
+    coordinates[10][2] = 0.297574315012753*x[0][2] + 0.297574315012753*x[1][2] + 0.0578476039361427*x[2][2] + 0.347003766038352*x[3][2];
+    coordinates[11][0] = 0.134432268912383*x[0][0] + 0.134432268912383*x[1][0] + 0.0261332522867348*x[2][0] + 0.705002209888498*x[3][0];
+    coordinates[11][1] = 0.134432268912383*x[0][1] + 0.134432268912383*x[1][1] + 0.0261332522867348*x[2][1] + 0.705002209888498*x[3][1];
+    coordinates[11][2] = 0.134432268912383*x[0][2] + 0.134432268912383*x[1][2] + 0.0261332522867348*x[2][2] + 0.705002209888498*x[3][2];
+    coordinates[12][0] = 0.27371387282313*x[0][0] + 0.27371387282313*x[1][0] + 0.379578230280591*x[2][0] + 0.0729940240731498*x[3][0];
+    coordinates[12][1] = 0.27371387282313*x[0][1] + 0.27371387282313*x[1][1] + 0.379578230280591*x[2][1] + 0.0729940240731498*x[3][1];
+    coordinates[12][2] = 0.27371387282313*x[0][2] + 0.27371387282313*x[1][2] + 0.379578230280591*x[2][2] + 0.0729940240731498*x[3][2];
+    coordinates[13][0] = 0.192807956774882*x[0][0] + 0.192807956774882*x[1][0] + 0.267380320411884*x[2][0] + 0.347003766038352*x[3][0];
+    coordinates[13][1] = 0.192807956774882*x[0][1] + 0.192807956774882*x[1][1] + 0.267380320411884*x[2][1] + 0.347003766038352*x[3][1];
+    coordinates[13][2] = 0.192807956774882*x[0][2] + 0.192807956774882*x[1][2] + 0.267380320411884*x[2][2] + 0.347003766038352*x[3][2];
+    coordinates[14][0] = 0.0871029849887995*x[0][0] + 0.0871029849887995*x[1][0] + 0.120791820133903*x[2][0] + 0.705002209888498*x[3][0];
+    coordinates[14][1] = 0.0871029849887995*x[0][1] + 0.0871029849887995*x[1][1] + 0.120791820133903*x[2][1] + 0.705002209888498*x[3][1];
+    coordinates[14][2] = 0.0871029849887995*x[0][2] + 0.0871029849887995*x[1][2] + 0.120791820133903*x[2][2] + 0.705002209888498*x[3][2];
+    coordinates[15][0] = 0.0984204739396093*x[0][0] + 0.0984204739396093*x[1][0] + 0.730165028047632*x[2][0] + 0.0729940240731498*x[3][0];
+    coordinates[15][1] = 0.0984204739396093*x[0][1] + 0.0984204739396093*x[1][1] + 0.730165028047632*x[2][1] + 0.0729940240731498*x[3][1];
+    coordinates[15][2] = 0.0984204739396093*x[0][2] + 0.0984204739396093*x[1][2] + 0.730165028047632*x[2][2] + 0.0729940240731498*x[3][2];
+    coordinates[16][0] = 0.0693287858937781*x[0][0] + 0.0693287858937781*x[1][0] + 0.514338662174092*x[2][0] + 0.347003766038352*x[3][0];
+    coordinates[16][1] = 0.0693287858937781*x[0][1] + 0.0693287858937781*x[1][1] + 0.514338662174092*x[2][1] + 0.347003766038352*x[3][1];
+    coordinates[16][2] = 0.0693287858937781*x[0][2] + 0.0693287858937781*x[1][2] + 0.514338662174092*x[2][2] + 0.347003766038352*x[3][2];
+    coordinates[17][0] = 0.0313199947658185*x[0][0] + 0.0313199947658185*x[1][0] + 0.232357800579865*x[2][0] + 0.705002209888498*x[3][0];
+    coordinates[17][1] = 0.0313199947658185*x[0][1] + 0.0313199947658185*x[1][1] + 0.232357800579865*x[2][1] + 0.705002209888498*x[3][1];
+    coordinates[17][2] = 0.0313199947658185*x[0][2] + 0.0313199947658185*x[1][2] + 0.232357800579865*x[2][2] + 0.705002209888498*x[3][2];
+    coordinates[18][0] = 0.0952198798417148*x[0][0] + 0.749664528221693*x[1][0] + 0.0821215678634425*x[2][0] + 0.0729940240731498*x[3][0];
+    coordinates[18][1] = 0.0952198798417148*x[0][1] + 0.749664528221693*x[1][1] + 0.0821215678634425*x[2][1] + 0.0729940240731498*x[3][1];
+    coordinates[18][2] = 0.0952198798417148*x[0][2] + 0.749664528221693*x[1][2] + 0.0821215678634425*x[2][2] + 0.0729940240731498*x[3][2];
+    coordinates[19][0] = 0.0670742417520584*x[0][0] + 0.528074388273447*x[1][0] + 0.0578476039361427*x[2][0] + 0.347003766038352*x[3][0];
+    coordinates[19][1] = 0.0670742417520584*x[0][1] + 0.528074388273447*x[1][1] + 0.0578476039361427*x[2][1] + 0.347003766038352*x[3][1];
+    coordinates[19][2] = 0.0670742417520584*x[0][2] + 0.528074388273447*x[1][2] + 0.0578476039361427*x[2][2] + 0.347003766038352*x[3][2];
+    coordinates[20][0] = 0.0303014811742758*x[0][0] + 0.238563056650491*x[1][0] + 0.0261332522867348*x[2][0] + 0.705002209888498*x[3][0];
+    coordinates[20][1] = 0.0303014811742758*x[0][1] + 0.238563056650491*x[1][1] + 0.0261332522867348*x[2][1] + 0.705002209888498*x[3][1];
+    coordinates[20][2] = 0.0303014811742758*x[0][2] + 0.238563056650491*x[1][2] + 0.0261332522867348*x[2][2] + 0.705002209888498*x[3][2];
+    coordinates[21][0] = 0.0616960186091463*x[0][0] + 0.485731727037113*x[1][0] + 0.379578230280591*x[2][0] + 0.0729940240731498*x[3][0];
+    coordinates[21][1] = 0.0616960186091463*x[0][1] + 0.485731727037113*x[1][1] + 0.379578230280591*x[2][1] + 0.0729940240731498*x[3][1];
+    coordinates[21][2] = 0.0616960186091463*x[0][2] + 0.485731727037113*x[1][2] + 0.379578230280591*x[2][2] + 0.0729940240731498*x[3][2];
+    coordinates[22][0] = 0.0434595556538024*x[0][0] + 0.342156357895961*x[1][0] + 0.267380320411884*x[2][0] + 0.347003766038352*x[3][0];
+    coordinates[22][1] = 0.0434595556538024*x[0][1] + 0.342156357895961*x[1][1] + 0.267380320411884*x[2][1] + 0.347003766038352*x[3][1];
+    coordinates[22][2] = 0.0434595556538024*x[0][2] + 0.342156357895961*x[1][2] + 0.267380320411884*x[2][2] + 0.347003766038352*x[3][2];
+    coordinates[23][0] = 0.0196333029354845*x[0][0] + 0.154572667042115*x[1][0] + 0.120791820133903*x[2][0] + 0.705002209888498*x[3][0];
+    coordinates[23][1] = 0.0196333029354845*x[0][1] + 0.154572667042115*x[1][1] + 0.120791820133903*x[2][1] + 0.705002209888498*x[3][1];
+    coordinates[23][2] = 0.0196333029354845*x[0][2] + 0.154572667042115*x[1][2] + 0.120791820133903*x[2][2] + 0.705002209888498*x[3][2];
+    coordinates[24][0] = 0.0221843026408197*x[0][0] + 0.174656645238399*x[1][0] + 0.730165028047632*x[2][0] + 0.0729940240731498*x[3][0];
+    coordinates[24][1] = 0.0221843026408197*x[0][1] + 0.174656645238399*x[1][1] + 0.730165028047632*x[2][1] + 0.0729940240731498*x[3][1];
+    coordinates[24][2] = 0.0221843026408197*x[0][2] + 0.174656645238399*x[1][2] + 0.730165028047632*x[2][2] + 0.0729940240731498*x[3][2];
+    coordinates[25][0] = 0.0156269392579016*x[0][0] + 0.123030632529655*x[1][0] + 0.514338662174092*x[2][0] + 0.347003766038352*x[3][0];
+    coordinates[25][1] = 0.0156269392579016*x[0][1] + 0.123030632529655*x[1][1] + 0.514338662174092*x[2][1] + 0.347003766038352*x[3][1];
+    coordinates[25][2] = 0.0156269392579016*x[0][2] + 0.123030632529655*x[1][2] + 0.514338662174092*x[2][2] + 0.347003766038352*x[3][2];
+    coordinates[26][0] = 0.00705963113955482*x[0][0] + 0.0555803583920822*x[1][0] + 0.232357800579865*x[2][0] + 0.705002209888498*x[3][0];
+    coordinates[26][1] = 0.00705963113955482*x[0][1] + 0.0555803583920822*x[1][1] + 0.232357800579865*x[2][1] + 0.705002209888498*x[3][1];
+    coordinates[26][2] = 0.00705963113955482*x[0][2] + 0.0555803583920822*x[1][2] + 0.232357800579865*x[2][2] + 0.705002209888498*x[3][2];
 }
 
 /// Return the number of sub dof maps (for a mixed element)
@@ -1064,38 +1291,57 @@ void UFC_SemiLagrangianRHS3DLinearForm_c
     
     
     // Array of quadrature weights
-    const static double W8[8] = {0.0369798563588528, 0.0160270405984766, 0.021157006454524, 0.00916942992147972, 0.0369798563588528, 0.0160270405984766, 0.021157006454524, 0.00916942992147972};
+    const static double W27[27] = {0.00877047492965105, 0.00816265076654668, 0.0016716811314837, 0.0100061425721761, 0.00931268237947044, 0.00190720341498178, 0.00304787709051818, 0.00283664869563092, 0.000580935315837384, 0.0140327598874417, 0.0130602412264747, 0.00267468981037392, 0.0160098281154818, 0.0149002918071527, 0.00305152546397085, 0.0048766033448291, 0.00453863791300947, 0.000929496505339815, 0.00877047492965105, 0.00816265076654668, 0.0016716811314837, 0.0100061425721761, 0.00931268237947044, 0.00190720341498178, 0.00304787709051818, 0.00283664869563092, 0.000580935315837384};
     
     
-    const static double FE1[8][4] = \
-    {{0.584747563204894, 0.156682637336818, 0.136054976802846, 0.122514822655441},
-    {0.303772764814707, 0.0813956670146703, 0.0706797241593969, 0.544151844011225},
-    {0.245713325211713, 0.0658386870600444, 0.565933165072801, 0.122514822655441},
-    {0.127646562120385, 0.0342027932367665, 0.293998800631623, 0.544151844011225},
-    {0.156682637336818, 0.584747563204894, 0.136054976802846, 0.122514822655441},
-    {0.0813956670146703, 0.303772764814707, 0.0706797241593969, 0.544151844011225},
-    {0.0658386870600443, 0.245713325211713, 0.565933165072801, 0.122514822655441},
-    {0.0342027932367664, 0.127646562120385, 0.293998800631623, 0.544151844011225}};
+    const static double FE1[27][10] = \
+    {{0.374329281526014, -0.0770862288075737, -0.0686336640467425, -0.0623377689723666, 0.0239775348061957, 0.0278019288056344, 0.031278423297481, 0.218884122479203, 0.246254505716693, 0.285531865195462},
+    {0.0296507308273034, -0.0580763339388314, -0.051154913373837, -0.106180538748753, 0.080293345688546, 0.0931000579685249, 0.0155203366847607, 0.73297520591714, 0.122191352246653, 0.141680756728494},
+    {-0.12473839265364, -0.0284651216515657, -0.0247673585365706, 0.289054022006834, 0.073696002454887, 0.0854504447630367, 0.00316750500875634, 0.672749928545405, 0.0249377141829676, 0.0289152558798902},
+    {-0.0138611057361999, -0.0540832211847061, -0.0914189644747005, -0.0623377689723666, 0.11082776991498, 0.0180137626702943, 0.0936738622360728, 0.141822053505759, 0.737492757359529, 0.119870854681338},
+    {-0.108014411398703, -0.0396820896985505, -0.12439584892476, -0.106180538748753, 0.37112791258986, 0.0603225179288914, 0.0464809196626873, 0.474918179055459, 0.365943506420742, 0.0594798531131275},
+    {-0.10678724824909, -0.0188623697671714, -0.0916104925113804, 0.289054022006834, 0.340634000523421, 0.0553660878277078, 0.00948616958726982, 0.435896287412199, 0.0746844551798748, 0.0121390879903345},
+    {-0.113646757786535, -0.0212000160735007, 0.336116908319966, -0.0623377689723666, 0.213190734538724, 0.00647728608404027, 0.0647928078398051, 0.050995565468269, 0.510112697076803, 0.0154985435047957},
+    {-0.0927575594483608, -0.0151385367967613, 0.0147498566399773, -0.106180538748753, 0.71390981117415, 0.0216904270965779, 0.0321501561271397, 0.170768371303483, 0.253117643766939, 0.00769036888560861},
+    {-0.0494020059140976, -0.00695995435590164, -0.12437750559924, 0.289054022006834, 0.655251051574542, 0.0199082222175353, 0.00656144145796828, 0.156737101971251, 0.0516581193256994, 0.00156950731540954},
+    {-0.0655273725373765, -0.0655273725373763, -0.0686336640467425, -0.0623377689723666, 0.0239775348061957, 0.123343025642419, 0.138766464507087, 0.123343025642419, 0.138766464507087, 0.713829662988655},
+    {-0.120473369102135, -0.120473369102135, -0.051154913373837, -0.106180538748753, 0.080293345688546, 0.413037631942832, 0.0688558444657068, 0.413037631942832, 0.0688558444657067, 0.354201891821236},
+    {-0.0982881990625207, -0.0982881990625206, -0.0247673585365706, 0.289054022006834, 0.073696002454887, 0.379100186654221, 0.014052609595862, 0.379100186654221, 0.014052609595862, 0.0722881396997255},
+    {-0.123875304471457, -0.123875304471457, -0.0914189644747004, -0.0623377689723666, 0.11082776991498, 0.0799179080880265, 0.415583309797801, 0.0799179080880263, 0.415583309797801, 0.299677136703346},
+    {-0.118458140383472, -0.118458140383472, -0.12439584892476, -0.106180538748753, 0.37112791258986, 0.267620348492175, 0.206212213041715, 0.267620348492175, 0.206212213041715, 0.148699632782819},
+    {-0.0719291250008815, -0.0719291250008814, -0.0916104925113804, 0.289054022006834, 0.340634000523421, 0.245631187619954, 0.0420853123835723, 0.245631187619953, 0.0420853123835723, 0.0303477199758362},
+    {-0.0790472945586147, -0.0790472945586147, 0.336116908319966, -0.0623377689723666, 0.213190734538724, 0.0287364257761548, 0.287452752458304, 0.0287364257761545, 0.287452752458304, 0.0387463587619893},
+    {-0.0597158247867675, -0.0597158247867675, 0.0147498566399773, -0.106180538748753, 0.71390981117415, 0.0962293992000305, 0.14263389994704, 0.0962293992000302, 0.142633899947039, 0.0192259222140214},
+    {-0.0293581106215567, -0.0293581106215567, -0.12437750559924, 0.289054022006834, 0.655251051574542, 0.0883226620943931, 0.0291097803918338, 0.0883226620943929, 0.0291097803918338, 0.0039237682885237},
+    {-0.0770862288075736, 0.374329281526014, -0.0686336640467425, -0.0623377689723666, 0.0239775348061957, 0.218884122479203, 0.246254505716693, 0.0278019288056342, 0.0312784232974809, 0.285531865195462},
+    {-0.0580763339388314, 0.0296507308273036, -0.051154913373837, -0.106180538748753, 0.080293345688546, 0.73297520591714, 0.122191352246653, 0.0931000579685245, 0.0155203366847606, 0.141680756728494},
+    {-0.0284651216515658, -0.12473839265364, -0.0247673585365706, 0.289054022006834, 0.073696002454887, 0.672749928545405, 0.0249377141829676, 0.0854504447630365, 0.00316750500875629, 0.0289152558798902},
+    {-0.0540832211847061, -0.0138611057361997, -0.0914189644747004, -0.0623377689723666, 0.11082776991498, 0.141822053505759, 0.737492757359529, 0.018013762670294, 0.0936738622360724, 0.119870854681338},
+    {-0.0396820896985505, -0.108014411398703, -0.12439584892476, -0.106180538748753, 0.37112791258986, 0.474918179055459, 0.365943506420742, 0.060322517928891, 0.0464809196626871, 0.0594798531131275},
+    {-0.0188623697671715, -0.10678724824909, -0.0916104925113804, 0.289054022006834, 0.340634000523421, 0.435896287412199, 0.0746844551798748, 0.0553660878277076, 0.00948616958726979, 0.0121390879903345},
+    {-0.0212000160735007, -0.113646757786535, 0.336116908319966, -0.0623377689723666, 0.213190734538724, 0.0509955654682693, 0.510112697076803, 0.00647728608404007, 0.0647928078398048, 0.0154985435047957},
+    {-0.0151385367967613, -0.0927575594483608, 0.0147498566399774, -0.106180538748753, 0.71390981117415, 0.170768371303483, 0.25311764376694, 0.0216904270965777, 0.0321501561271395, 0.00769036888560861},
+    {-0.00695995435590172, -0.0494020059140976, -0.12437750559924, 0.289054022006834, 0.655251051574542, 0.156737101971251, 0.0516581193256993, 0.0199082222175352, 0.00656144145796827, 0.00156950731540955}};
     
     // Number of operations to compute geometry constants: 1
     const double G0 =  - det;
     
     // Compute element tensor using UFL quadrature representation
     // Optimisations: ('simplify expressions', True), ('ignore zero tables', True), ('non zero columns', True), ('remove zero terms', True), ('ignore ones', True)
-    // Total number of operations to compute element tensor: 81
+    // Total number of operations to compute element tensor: 595
     
     // Loop quadrature points for integral
-    // Number of operations to compute element tensor for following IP loop = 80
-    for (unsigned int ip = 0; ip < 8; ip++)
+    // Number of operations to compute element tensor for following IP loop = 594
+    for (unsigned int ip = 0; ip < 27; ip++)
     {
       
       // Number of operations to compute ip constants: 2
       // Number of operations: 2
-      const double Gip0 = W8[ip]*w[0][ip]*G0;
+      const double Gip0 = W27[ip]*w[0][ip]*G0;
       
       
-      // Number of operations for primary indices = 8
-      for (unsigned int j = 0; j < 4; j++)
+      // Number of operations for primary indices = 20
+      for (unsigned int j = 0; j < 10; j++)
       {
         // Number of operations to compute entry = 2
         A[j] += FE1[ip][j]*Gip0;
@@ -1125,6 +1371,12 @@ void UFC_SemiLagrangianRHS3DLinearForm_c
     A[1] = 0;
     A[2] = 0;
     A[3] = 0;
+    A[4] = 0;
+    A[5] = 0;
+    A[6] = 0;
+    A[7] = 0;
+    A[8] = 0;
+    A[9] = 0;
     
     // Add all contributions to element tensor
     integral_0_quadrature.tabulate_tensor(A, w, c);
@@ -1145,7 +1397,7 @@ UFC_SemiLagrangianRHS3DLinearForm::~UFC_
 /// Return a string identifying the form
 const char* UFC_SemiLagrangianRHS3DLinearForm::signature() const
 {
-    return "Form([Integral(Product(Function(FiniteElement('Quadrature', Cell('tetrahedron', 1), 2), 0), Product(IntValue(-1, (), (), {}), BasisFunction(FiniteElement('Lagrange', Cell('tetrahedron', 1), 1), 0))), Measure('cell', 0, {'ffc_representation': 'quadrature', 'quadrature_order': 2}))])";
+    return "Form([Integral(Product(Function(FiniteElement('Quadrature', Cell('tetrahedron', 1), 4), 0), Product(IntValue(-1, (), (), {}), BasisFunction(FiniteElement('Lagrange', Cell('tetrahedron', 1), 2), 0))), Measure('cell', 0, {'ffc_representation': 'quadrature', 'quadrature_order': 4}))])";
 }
 
 /// Return the rank of the global tensor (r)
diff -r d848f74fedd2 -r 78b5d545a3d7 MADDs-4/cpp/SemiLagrangianRHS3D.ufl
--- a/MADDs-4/cpp/SemiLagrangianRHS3D.ufl	Fri Dec 04 21:18:03 2009 -0500
+++ b/MADDs-4/cpp/SemiLagrangianRHS3D.ufl	Sat Dec 05 00:43:06 2009 -0500
@@ -1,1 +1,1 @@ forms/SemiLagrangianRHS3D_P1.ufl
-forms/SemiLagrangianRHS3D_P1.ufl
\ No newline at end of file
+forms/SemiLagrangianRHS3D_P2.ufl
\ No newline at end of file
diff -r d848f74fedd2 -r 78b5d545a3d7 MADDs-4/cpp/SolitaryWave2D.cpp
--- a/MADDs-4/cpp/SolitaryWave2D.cpp	Fri Dec 04 21:18:03 2009 -0500
+++ b/MADDs-4/cpp/SolitaryWave2D.cpp	Sat Dec 05 00:43:06 2009 -0500
@@ -15,7 +15,7 @@ UFC_SolitaryWave2DBilinearForm_finite_el
 /// Return a string identifying the finite element
 const char* UFC_SolitaryWave2DBilinearForm_finite_element_0_0::signature() const
 {
-    return "FiniteElement('Lagrange', 'triangle', 1)";
+    return "FiniteElement('Lagrange', 'triangle', 2)";
 }
 
 /// Return the cell shape
@@ -27,7 +27,7 @@ ufc::shape UFC_SolitaryWave2DBilinearFor
 /// Return the dimension of the finite element function space
 unsigned int UFC_SolitaryWave2DBilinearForm_finite_element_0_0::space_dimension() const
 {
-    return 3;
+    return 6;
 }
 
 /// Return the rank of the value space
@@ -86,34 +86,48 @@ void UFC_SolitaryWave2DBilinearForm_fini
     // Generate scalings
     const double scalings_y_0 = 1;
     const double scalings_y_1 = scalings_y_0*(0.5 - 0.5*y);
-    
-    // Compute psitilde_a
-    const double psitilde_a_0 = 1;
-    const double psitilde_a_1 = x;
-    
-    // Compute psitilde_bs
-    const double psitilde_bs_0_0 = 1;
-    const double psitilde_bs_0_1 = 1.5*y + 0.5;
-    const double psitilde_bs_1_0 = 1;
-    
-    // Compute basisvalues
-    const double basisvalue0 = 0.707106781186548*psitilde_a_0*scalings_y_0*psitilde_bs_0_0;
-    const double basisvalue1 = 1.73205080756888*psitilde_a_1*scalings_y_1*psitilde_bs_1_0;
-    const double basisvalue2 = psitilde_a_0*scalings_y_0*psitilde_bs_0_1;
-    
-    // Table(s) of coefficients
-    const static double coefficients0[3][3] = \
-    {{0.471404520791032, -0.288675134594813, -0.166666666666667},
-    {0.471404520791032, 0.288675134594813, -0.166666666666667},
-    {0.471404520791032, 0, 0.333333333333333}};
+    const double scalings_y_2 = scalings_y_1*(0.5 - 0.5*y);
+    
+    // Compute psitilde_a
+    const double psitilde_a_0 = 1;
+    const double psitilde_a_1 = x;
+    const double psitilde_a_2 = 1.5*x*psitilde_a_1 - 0.5*psitilde_a_0;
+    
+    // Compute psitilde_bs
+    const double psitilde_bs_0_0 = 1;
+    const double psitilde_bs_0_1 = 1.5*y + 0.5;
+    const double psitilde_bs_0_2 = 0.111111111111111*psitilde_bs_0_1 + 1.66666666666667*y*psitilde_bs_0_1 - 0.555555555555556*psitilde_bs_0_0;
+    const double psitilde_bs_1_0 = 1;
+    const double psitilde_bs_1_1 = 2.5*y + 1.5;
+    const double psitilde_bs_2_0 = 1;
+    
+    // Compute basisvalues
+    const double basisvalue0 = 0.707106781186548*psitilde_a_0*scalings_y_0*psitilde_bs_0_0;
+    const double basisvalue1 = 1.73205080756888*psitilde_a_1*scalings_y_1*psitilde_bs_1_0;
+    const double basisvalue2 = psitilde_a_0*scalings_y_0*psitilde_bs_0_1;
+    const double basisvalue3 = 2.73861278752583*psitilde_a_2*scalings_y_2*psitilde_bs_2_0;
+    const double basisvalue4 = 2.12132034355964*psitilde_a_1*scalings_y_1*psitilde_bs_1_1;
+    const double basisvalue5 = 1.22474487139159*psitilde_a_0*scalings_y_0*psitilde_bs_0_2;
+    
+    // Table(s) of coefficients
+    const static double coefficients0[6][6] = \
+    {{0, -0.173205080756888, -0.1, 0.121716123890037, 0.0942809041582064, 0.0544331053951817},
+    {0, 0.173205080756888, -0.1, 0.121716123890037, -0.0942809041582063, 0.0544331053951818},
+    {0, 0, 0.2, 0, 0, 0.163299316185545},
+    {0.471404520791032, 0.23094010767585, 0.133333333333333, 0, 0.188561808316413, -0.163299316185545},
+    {0.471404520791032, -0.23094010767585, 0.133333333333333, 0, -0.188561808316413, -0.163299316185545},
+    {0.471404520791032, 0, -0.266666666666667, -0.243432247780074, 0, 0.0544331053951817}};
     
     // Extract relevant coefficients
     const double coeff0_0 = coefficients0[dof][0];
     const double coeff0_1 = coefficients0[dof][1];
     const double coeff0_2 = coefficients0[dof][2];
-    
-    // Compute value(s)
-    *values = coeff0_0*basisvalue0 + coeff0_1*basisvalue1 + coeff0_2*basisvalue2;
+    const double coeff0_3 = coefficients0[dof][3];
+    const double coeff0_4 = coefficients0[dof][4];
+    const double coeff0_5 = coefficients0[dof][5];
+    
+    // Compute value(s)
+    *values = coeff0_0*basisvalue0 + coeff0_1*basisvalue1 + coeff0_2*basisvalue2 + coeff0_3*basisvalue3 + coeff0_4*basisvalue4 + coeff0_5*basisvalue5;
 }
 
 /// Evaluate all basis functions at given point in cell
@@ -229,38 +243,55 @@ void UFC_SolitaryWave2DBilinearForm_fini
     // Generate scalings
     const double scalings_y_0 = 1;
     const double scalings_y_1 = scalings_y_0*(0.5 - 0.5*y);
-    
-    // Compute psitilde_a
-    const double psitilde_a_0 = 1;
-    const double psitilde_a_1 = x;
-    
-    // Compute psitilde_bs
-    const double psitilde_bs_0_0 = 1;
-    const double psitilde_bs_0_1 = 1.5*y + 0.5;
-    const double psitilde_bs_1_0 = 1;
-    
-    // Compute basisvalues
-    const double basisvalue0 = 0.707106781186548*psitilde_a_0*scalings_y_0*psitilde_bs_0_0;
-    const double basisvalue1 = 1.73205080756888*psitilde_a_1*scalings_y_1*psitilde_bs_1_0;
-    const double basisvalue2 = psitilde_a_0*scalings_y_0*psitilde_bs_0_1;
-    
-    // Table(s) of coefficients
-    const static double coefficients0[3][3] = \
-    {{0.471404520791032, -0.288675134594813, -0.166666666666667},
-    {0.471404520791032, 0.288675134594813, -0.166666666666667},
-    {0.471404520791032, 0, 0.333333333333333}};
-    
-    // Interesting (new) part
-    // Tables of derivatives of the polynomial base (transpose)
-    const static double dmats0[3][3] = \
-    {{0, 0, 0},
-    {4.89897948556636, 0, 0},
-    {0, 0, 0}};
-    
-    const static double dmats1[3][3] = \
-    {{0, 0, 0},
-    {2.44948974278318, 0, 0},
-    {4.24264068711928, 0, 0}};
+    const double scalings_y_2 = scalings_y_1*(0.5 - 0.5*y);
+    
+    // Compute psitilde_a
+    const double psitilde_a_0 = 1;
+    const double psitilde_a_1 = x;
+    const double psitilde_a_2 = 1.5*x*psitilde_a_1 - 0.5*psitilde_a_0;
+    
+    // Compute psitilde_bs
+    const double psitilde_bs_0_0 = 1;
+    const double psitilde_bs_0_1 = 1.5*y + 0.5;
+    const double psitilde_bs_0_2 = 0.111111111111111*psitilde_bs_0_1 + 1.66666666666667*y*psitilde_bs_0_1 - 0.555555555555556*psitilde_bs_0_0;
+    const double psitilde_bs_1_0 = 1;
+    const double psitilde_bs_1_1 = 2.5*y + 1.5;
+    const double psitilde_bs_2_0 = 1;
+    
+    // Compute basisvalues
+    const double basisvalue0 = 0.707106781186548*psitilde_a_0*scalings_y_0*psitilde_bs_0_0;
+    const double basisvalue1 = 1.73205080756888*psitilde_a_1*scalings_y_1*psitilde_bs_1_0;
+    const double basisvalue2 = psitilde_a_0*scalings_y_0*psitilde_bs_0_1;
+    const double basisvalue3 = 2.73861278752583*psitilde_a_2*scalings_y_2*psitilde_bs_2_0;
+    const double basisvalue4 = 2.12132034355964*psitilde_a_1*scalings_y_1*psitilde_bs_1_1;
+    const double basisvalue5 = 1.22474487139159*psitilde_a_0*scalings_y_0*psitilde_bs_0_2;
+    
+    // Table(s) of coefficients
+    const static double coefficients0[6][6] = \
+    {{0, -0.173205080756888, -0.1, 0.121716123890037, 0.0942809041582064, 0.0544331053951817},
+    {0, 0.173205080756888, -0.1, 0.121716123890037, -0.0942809041582063, 0.0544331053951818},
+    {0, 0, 0.2, 0, 0, 0.163299316185545},
+    {0.471404520791032, 0.23094010767585, 0.133333333333333, 0, 0.188561808316413, -0.163299316185545},
+    {0.471404520791032, -0.23094010767585, 0.133333333333333, 0, -0.188561808316413, -0.163299316185545},
+    {0.471404520791032, 0, -0.266666666666667, -0.243432247780074, 0, 0.0544331053951817}};
+    
+    // Interesting (new) part
+    // Tables of derivatives of the polynomial base (transpose)
+    const static double dmats0[6][6] = \
+    {{0, 0, 0, 0, 0, 0},
+    {4.89897948556636, 0, 0, 0, 0, 0},
+    {0, 0, 0, 0, 0, 0},
+    {0, 9.48683298050514, 0, 0, 0, 0},
+    {4, 0, 7.07106781186548, 0, 0, 0},
+    {0, 0, 0, 0, 0, 0}};
+    
+    const static double dmats1[6][6] = \
+    {{0, 0, 0, 0, 0, 0},
+    {2.44948974278318, 0, 0, 0, 0, 0},
+    {4.24264068711928, 0, 0, 0, 0, 0},
+    {2.58198889747161, 4.74341649025257, -0.912870929175277, 0, 0, 0},
+    {2, 6.12372435695795, 3.53553390593274, 0, 0, 0},
+    {-2.3094010767585, 0, 8.16496580927726, 0, 0, 0}};
     
     // Compute reference derivatives
     // Declare pointer to array of derivatives on FIAT element
@@ -270,11 +301,17 @@ void UFC_SolitaryWave2DBilinearForm_fini
     double coeff0_0 = 0;
     double coeff0_1 = 0;
     double coeff0_2 = 0;
+    double coeff0_3 = 0;
+    double coeff0_4 = 0;
+    double coeff0_5 = 0;
     
     // Declare new coefficients
     double new_coeff0_0 = 0;
     double new_coeff0_1 = 0;
     double new_coeff0_2 = 0;
+    double new_coeff0_3 = 0;
+    double new_coeff0_4 = 0;
+    double new_coeff0_5 = 0;
     
     // Loop possible derivatives
     for (unsigned int deriv_num = 0; deriv_num < num_derivatives; deriv_num++)
@@ -283,6 +320,9 @@ void UFC_SolitaryWave2DBilinearForm_fini
       new_coeff0_0 = coefficients0[dof][0];
       new_coeff0_1 = coefficients0[dof][1];
       new_coeff0_2 = coefficients0[dof][2];
+      new_coeff0_3 = coefficients0[dof][3];
+      new_coeff0_4 = coefficients0[dof][4];
+      new_coeff0_5 = coefficients0[dof][5];
     
       // Loop derivative order
       for (unsigned int j = 0; j < n; j++)
@@ -291,23 +331,32 @@ void UFC_SolitaryWave2DBilinearForm_fini
         coeff0_0 = new_coeff0_0;
         coeff0_1 = new_coeff0_1;
         coeff0_2 = new_coeff0_2;
-    
-        if(combinations[deriv_num][j] == 0)
-        {
-          new_coeff0_0 = coeff0_0*dmats0[0][0] + coeff0_1*dmats0[1][0] + coeff0_2*dmats0[2][0];
-          new_coeff0_1 = coeff0_0*dmats0[0][1] + coeff0_1*dmats0[1][1] + coeff0_2*dmats0[2][1];
-          new_coeff0_2 = coeff0_0*dmats0[0][2] + coeff0_1*dmats0[1][2] + coeff0_2*dmats0[2][2];
-        }
-        if(combinations[deriv_num][j] == 1)
-        {
-          new_coeff0_0 = coeff0_0*dmats1[0][0] + coeff0_1*dmats1[1][0] + coeff0_2*dmats1[2][0];
-          new_coeff0_1 = coeff0_0*dmats1[0][1] + coeff0_1*dmats1[1][1] + coeff0_2*dmats1[2][1];
-          new_coeff0_2 = coeff0_0*dmats1[0][2] + coeff0_1*dmats1[1][2] + coeff0_2*dmats1[2][2];
-        }
-    
-      }
-      // Compute derivatives on reference element as dot product of coefficients and basisvalues
-      derivatives[deriv_num] = new_coeff0_0*basisvalue0 + new_coeff0_1*basisvalue1 + new_coeff0_2*basisvalue2;
+        coeff0_3 = new_coeff0_3;
+        coeff0_4 = new_coeff0_4;
+        coeff0_5 = new_coeff0_5;
+    
+        if(combinations[deriv_num][j] == 0)
+        {
+          new_coeff0_0 = coeff0_0*dmats0[0][0] + coeff0_1*dmats0[1][0] + coeff0_2*dmats0[2][0] + coeff0_3*dmats0[3][0] + coeff0_4*dmats0[4][0] + coeff0_5*dmats0[5][0];
+          new_coeff0_1 = coeff0_0*dmats0[0][1] + coeff0_1*dmats0[1][1] + coeff0_2*dmats0[2][1] + coeff0_3*dmats0[3][1] + coeff0_4*dmats0[4][1] + coeff0_5*dmats0[5][1];
+          new_coeff0_2 = coeff0_0*dmats0[0][2] + coeff0_1*dmats0[1][2] + coeff0_2*dmats0[2][2] + coeff0_3*dmats0[3][2] + coeff0_4*dmats0[4][2] + coeff0_5*dmats0[5][2];
+          new_coeff0_3 = coeff0_0*dmats0[0][3] + coeff0_1*dmats0[1][3] + coeff0_2*dmats0[2][3] + coeff0_3*dmats0[3][3] + coeff0_4*dmats0[4][3] + coeff0_5*dmats0[5][3];
+          new_coeff0_4 = coeff0_0*dmats0[0][4] + coeff0_1*dmats0[1][4] + coeff0_2*dmats0[2][4] + coeff0_3*dmats0[3][4] + coeff0_4*dmats0[4][4] + coeff0_5*dmats0[5][4];
+          new_coeff0_5 = coeff0_0*dmats0[0][5] + coeff0_1*dmats0[1][5] + coeff0_2*dmats0[2][5] + coeff0_3*dmats0[3][5] + coeff0_4*dmats0[4][5] + coeff0_5*dmats0[5][5];
+        }
+        if(combinations[deriv_num][j] == 1)
+        {
+          new_coeff0_0 = coeff0_0*dmats1[0][0] + coeff0_1*dmats1[1][0] + coeff0_2*dmats1[2][0] + coeff0_3*dmats1[3][0] + coeff0_4*dmats1[4][0] + coeff0_5*dmats1[5][0];
+          new_coeff0_1 = coeff0_0*dmats1[0][1] + coeff0_1*dmats1[1][1] + coeff0_2*dmats1[2][1] + coeff0_3*dmats1[3][1] + coeff0_4*dmats1[4][1] + coeff0_5*dmats1[5][1];
+          new_coeff0_2 = coeff0_0*dmats1[0][2] + coeff0_1*dmats1[1][2] + coeff0_2*dmats1[2][2] + coeff0_3*dmats1[3][2] + coeff0_4*dmats1[4][2] + coeff0_5*dmats1[5][2];
+          new_coeff0_3 = coeff0_0*dmats1[0][3] + coeff0_1*dmats1[1][3] + coeff0_2*dmats1[2][3] + coeff0_3*dmats1[3][3] + coeff0_4*dmats1[4][3] + coeff0_5*dmats1[5][3];
+          new_coeff0_4 = coeff0_0*dmats1[0][4] + coeff0_1*dmats1[1][4] + coeff0_2*dmats1[2][4] + coeff0_3*dmats1[3][4] + coeff0_4*dmats1[4][4] + coeff0_5*dmats1[5][4];
+          new_coeff0_5 = coeff0_0*dmats1[0][5] + coeff0_1*dmats1[1][5] + coeff0_2*dmats1[2][5] + coeff0_3*dmats1[3][5] + coeff0_4*dmats1[4][5] + coeff0_5*dmats1[5][5];
+        }
+    
+      }
+      // Compute derivatives on reference element as dot product of coefficients and basisvalues
+      derivatives[deriv_num] = new_coeff0_0*basisvalue0 + new_coeff0_1*basisvalue1 + new_coeff0_2*basisvalue2 + new_coeff0_3*basisvalue3 + new_coeff0_4*basisvalue4 + new_coeff0_5*basisvalue5;
     }
     
     // Transform derivatives back to physical element
@@ -347,9 +396,9 @@ double UFC_SolitaryWave2DBilinearForm_fi
                                    const ufc::cell& c) const
 {
     // The reference points, direction and weights:
-    const static double X[3][1][2] = {{{0, 0}}, {{1, 0}}, {{0, 1}}};
-    const static double W[3][1] = {{1}, {1}, {1}};
-    const static double D[3][1][1] = {{{1}}, {{1}}, {{1}}};
+    const static double X[6][1][2] = {{{0, 0}}, {{1, 0}}, {{0, 1}}, {{0.5, 0.5}}, {{0, 0.5}}, {{0.5, 0}}};
+    const static double W[6][1] = {{1}, {1}, {1}, {1}, {1}, {1}};
+    const static double D[6][1][1] = {{{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}};
     
     const double * const * x = c.coordinates;
     double result = 0.0;
@@ -429,7 +478,7 @@ UFC_SolitaryWave2DBilinearForm_finite_el
 /// Return a string identifying the finite element
 const char* UFC_SolitaryWave2DBilinearForm_finite_element_0_1::signature() const
 {
-    return "FiniteElement('Lagrange', 'triangle', 1)";
+    return "FiniteElement('Lagrange', 'triangle', 2)";
 }
 
 /// Return the cell shape
@@ -441,7 +490,7 @@ ufc::shape UFC_SolitaryWave2DBilinearFor
 /// Return the dimension of the finite element function space
 unsigned int UFC_SolitaryWave2DBilinearForm_finite_element_0_1::space_dimension() const
 {
-    return 3;
+    return 6;
 }
 
 /// Return the rank of the value space
@@ -500,34 +549,48 @@ void UFC_SolitaryWave2DBilinearForm_fini
     // Generate scalings
     const double scalings_y_0 = 1;
     const double scalings_y_1 = scalings_y_0*(0.5 - 0.5*y);
-    
-    // Compute psitilde_a
-    const double psitilde_a_0 = 1;
-    const double psitilde_a_1 = x;
-    
-    // Compute psitilde_bs
-    const double psitilde_bs_0_0 = 1;
-    const double psitilde_bs_0_1 = 1.5*y + 0.5;
-    const double psitilde_bs_1_0 = 1;
-    
-    // Compute basisvalues
-    const double basisvalue0 = 0.707106781186548*psitilde_a_0*scalings_y_0*psitilde_bs_0_0;
-    const double basisvalue1 = 1.73205080756888*psitilde_a_1*scalings_y_1*psitilde_bs_1_0;
-    const double basisvalue2 = psitilde_a_0*scalings_y_0*psitilde_bs_0_1;
-    
-    // Table(s) of coefficients
-    const static double coefficients0[3][3] = \
-    {{0.471404520791032, -0.288675134594813, -0.166666666666667},
-    {0.471404520791032, 0.288675134594813, -0.166666666666667},
-    {0.471404520791032, 0, 0.333333333333333}};
+    const double scalings_y_2 = scalings_y_1*(0.5 - 0.5*y);
+    
+    // Compute psitilde_a
+    const double psitilde_a_0 = 1;
+    const double psitilde_a_1 = x;
+    const double psitilde_a_2 = 1.5*x*psitilde_a_1 - 0.5*psitilde_a_0;
+    
+    // Compute psitilde_bs
+    const double psitilde_bs_0_0 = 1;
+    const double psitilde_bs_0_1 = 1.5*y + 0.5;
+    const double psitilde_bs_0_2 = 0.111111111111111*psitilde_bs_0_1 + 1.66666666666667*y*psitilde_bs_0_1 - 0.555555555555556*psitilde_bs_0_0;
+    const double psitilde_bs_1_0 = 1;
+    const double psitilde_bs_1_1 = 2.5*y + 1.5;
+    const double psitilde_bs_2_0 = 1;
+    
+    // Compute basisvalues
+    const double basisvalue0 = 0.707106781186548*psitilde_a_0*scalings_y_0*psitilde_bs_0_0;
+    const double basisvalue1 = 1.73205080756888*psitilde_a_1*scalings_y_1*psitilde_bs_1_0;
+    const double basisvalue2 = psitilde_a_0*scalings_y_0*psitilde_bs_0_1;
+    const double basisvalue3 = 2.73861278752583*psitilde_a_2*scalings_y_2*psitilde_bs_2_0;
+    const double basisvalue4 = 2.12132034355964*psitilde_a_1*scalings_y_1*psitilde_bs_1_1;
+    const double basisvalue5 = 1.22474487139159*psitilde_a_0*scalings_y_0*psitilde_bs_0_2;
+    
+    // Table(s) of coefficients
+    const static double coefficients0[6][6] = \
+    {{0, -0.173205080756888, -0.1, 0.121716123890037, 0.0942809041582064, 0.0544331053951817},
+    {0, 0.173205080756888, -0.1, 0.121716123890037, -0.0942809041582063, 0.0544331053951818},
+    {0, 0, 0.2, 0, 0, 0.163299316185545},
+    {0.471404520791032, 0.23094010767585, 0.133333333333333, 0, 0.188561808316413, -0.163299316185545},
+    {0.471404520791032, -0.23094010767585, 0.133333333333333, 0, -0.188561808316413, -0.163299316185545},
+    {0.471404520791032, 0, -0.266666666666667, -0.243432247780074, 0, 0.0544331053951817}};
     
     // Extract relevant coefficients
     const double coeff0_0 = coefficients0[dof][0];
     const double coeff0_1 = coefficients0[dof][1];
     const double coeff0_2 = coefficients0[dof][2];
-    
-    // Compute value(s)
-    *values = coeff0_0*basisvalue0 + coeff0_1*basisvalue1 + coeff0_2*basisvalue2;
+    const double coeff0_3 = coefficients0[dof][3];
+    const double coeff0_4 = coefficients0[dof][4];
+    const double coeff0_5 = coefficients0[dof][5];
+    
+    // Compute value(s)
+    *values = coeff0_0*basisvalue0 + coeff0_1*basisvalue1 + coeff0_2*basisvalue2 + coeff0_3*basisvalue3 + coeff0_4*basisvalue4 + coeff0_5*basisvalue5;
 }
 
 /// Evaluate all basis functions at given point in cell
@@ -643,38 +706,55 @@ void UFC_SolitaryWave2DBilinearForm_fini
     // Generate scalings
     const double scalings_y_0 = 1;
     const double scalings_y_1 = scalings_y_0*(0.5 - 0.5*y);
-    
-    // Compute psitilde_a
-    const double psitilde_a_0 = 1;
-    const double psitilde_a_1 = x;
-    
-    // Compute psitilde_bs
-    const double psitilde_bs_0_0 = 1;
-    const double psitilde_bs_0_1 = 1.5*y + 0.5;
-    const double psitilde_bs_1_0 = 1;
-    
-    // Compute basisvalues
-    const double basisvalue0 = 0.707106781186548*psitilde_a_0*scalings_y_0*psitilde_bs_0_0;
-    const double basisvalue1 = 1.73205080756888*psitilde_a_1*scalings_y_1*psitilde_bs_1_0;
-    const double basisvalue2 = psitilde_a_0*scalings_y_0*psitilde_bs_0_1;
-    
-    // Table(s) of coefficients
-    const static double coefficients0[3][3] = \
-    {{0.471404520791032, -0.288675134594813, -0.166666666666667},
-    {0.471404520791032, 0.288675134594813, -0.166666666666667},
-    {0.471404520791032, 0, 0.333333333333333}};
-    
-    // Interesting (new) part
-    // Tables of derivatives of the polynomial base (transpose)
-    const static double dmats0[3][3] = \
-    {{0, 0, 0},
-    {4.89897948556636, 0, 0},
-    {0, 0, 0}};
-    
-    const static double dmats1[3][3] = \
-    {{0, 0, 0},
-    {2.44948974278318, 0, 0},
-    {4.24264068711928, 0, 0}};
+    const double scalings_y_2 = scalings_y_1*(0.5 - 0.5*y);
+    
+    // Compute psitilde_a
+    const double psitilde_a_0 = 1;
+    const double psitilde_a_1 = x;
+    const double psitilde_a_2 = 1.5*x*psitilde_a_1 - 0.5*psitilde_a_0;
+    
+    // Compute psitilde_bs
+    const double psitilde_bs_0_0 = 1;
+    const double psitilde_bs_0_1 = 1.5*y + 0.5;
+    const double psitilde_bs_0_2 = 0.111111111111111*psitilde_bs_0_1 + 1.66666666666667*y*psitilde_bs_0_1 - 0.555555555555556*psitilde_bs_0_0;
+    const double psitilde_bs_1_0 = 1;
+    const double psitilde_bs_1_1 = 2.5*y + 1.5;
+    const double psitilde_bs_2_0 = 1;
+    
+    // Compute basisvalues
+    const double basisvalue0 = 0.707106781186548*psitilde_a_0*scalings_y_0*psitilde_bs_0_0;
+    const double basisvalue1 = 1.73205080756888*psitilde_a_1*scalings_y_1*psitilde_bs_1_0;
+    const double basisvalue2 = psitilde_a_0*scalings_y_0*psitilde_bs_0_1;
+    const double basisvalue3 = 2.73861278752583*psitilde_a_2*scalings_y_2*psitilde_bs_2_0;
+    const double basisvalue4 = 2.12132034355964*psitilde_a_1*scalings_y_1*psitilde_bs_1_1;
+    const double basisvalue5 = 1.22474487139159*psitilde_a_0*scalings_y_0*psitilde_bs_0_2;
+    
+    // Table(s) of coefficients
+    const static double coefficients0[6][6] = \
+    {{0, -0.173205080756888, -0.1, 0.121716123890037, 0.0942809041582064, 0.0544331053951817},
+    {0, 0.173205080756888, -0.1, 0.121716123890037, -0.0942809041582063, 0.0544331053951818},
+    {0, 0, 0.2, 0, 0, 0.163299316185545},
+    {0.471404520791032, 0.23094010767585, 0.133333333333333, 0, 0.188561808316413, -0.163299316185545},
+    {0.471404520791032, -0.23094010767585, 0.133333333333333, 0, -0.188561808316413, -0.163299316185545},
+    {0.471404520791032, 0, -0.266666666666667, -0.243432247780074, 0, 0.0544331053951817}};
+    
+    // Interesting (new) part
+    // Tables of derivatives of the polynomial base (transpose)
+    const static double dmats0[6][6] = \
+    {{0, 0, 0, 0, 0, 0},
+    {4.89897948556636, 0, 0, 0, 0, 0},
+    {0, 0, 0, 0, 0, 0},
+    {0, 9.48683298050514, 0, 0, 0, 0},
+    {4, 0, 7.07106781186548, 0, 0, 0},
+    {0, 0, 0, 0, 0, 0}};
+    
+    const static double dmats1[6][6] = \
+    {{0, 0, 0, 0, 0, 0},
+    {2.44948974278318, 0, 0, 0, 0, 0},
+    {4.24264068711928, 0, 0, 0, 0, 0},
+    {2.58198889747161, 4.74341649025257, -0.912870929175277, 0, 0, 0},
+    {2, 6.12372435695795, 3.53553390593274, 0, 0, 0},
+    {-2.3094010767585, 0, 8.16496580927726, 0, 0, 0}};
     
     // Compute reference derivatives
     // Declare pointer to array of derivatives on FIAT element
@@ -684,11 +764,17 @@ void UFC_SolitaryWave2DBilinearForm_fini
     double coeff0_0 = 0;
     double coeff0_1 = 0;
     double coeff0_2 = 0;
+    double coeff0_3 = 0;
+    double coeff0_4 = 0;
+    double coeff0_5 = 0;
     
     // Declare new coefficients
     double new_coeff0_0 = 0;
     double new_coeff0_1 = 0;
     double new_coeff0_2 = 0;
+    double new_coeff0_3 = 0;
+    double new_coeff0_4 = 0;
+    double new_coeff0_5 = 0;
     
     // Loop possible derivatives
     for (unsigned int deriv_num = 0; deriv_num < num_derivatives; deriv_num++)
@@ -697,6 +783,9 @@ void UFC_SolitaryWave2DBilinearForm_fini
       new_coeff0_0 = coefficients0[dof][0];
       new_coeff0_1 = coefficients0[dof][1];
       new_coeff0_2 = coefficients0[dof][2];
+      new_coeff0_3 = coefficients0[dof][3];
+      new_coeff0_4 = coefficients0[dof][4];
+      new_coeff0_5 = coefficients0[dof][5];
     
       // Loop derivative order
       for (unsigned int j = 0; j < n; j++)
@@ -705,23 +794,32 @@ void UFC_SolitaryWave2DBilinearForm_fini
         coeff0_0 = new_coeff0_0;
         coeff0_1 = new_coeff0_1;
         coeff0_2 = new_coeff0_2;
-    
-        if(combinations[deriv_num][j] == 0)
-        {
-          new_coeff0_0 = coeff0_0*dmats0[0][0] + coeff0_1*dmats0[1][0] + coeff0_2*dmats0[2][0];
-          new_coeff0_1 = coeff0_0*dmats0[0][1] + coeff0_1*dmats0[1][1] + coeff0_2*dmats0[2][1];
-          new_coeff0_2 = coeff0_0*dmats0[0][2] + coeff0_1*dmats0[1][2] + coeff0_2*dmats0[2][2];
-        }
-        if(combinations[deriv_num][j] == 1)
-        {
-          new_coeff0_0 = coeff0_0*dmats1[0][0] + coeff0_1*dmats1[1][0] + coeff0_2*dmats1[2][0];
-          new_coeff0_1 = coeff0_0*dmats1[0][1] + coeff0_1*dmats1[1][1] + coeff0_2*dmats1[2][1];
-          new_coeff0_2 = coeff0_0*dmats1[0][2] + coeff0_1*dmats1[1][2] + coeff0_2*dmats1[2][2];
-        }
-    
-      }
-      // Compute derivatives on reference element as dot product of coefficients and basisvalues
-      derivatives[deriv_num] = new_coeff0_0*basisvalue0 + new_coeff0_1*basisvalue1 + new_coeff0_2*basisvalue2;
+        coeff0_3 = new_coeff0_3;
+        coeff0_4 = new_coeff0_4;
+        coeff0_5 = new_coeff0_5;
+    
+        if(combinations[deriv_num][j] == 0)
+        {
+          new_coeff0_0 = coeff0_0*dmats0[0][0] + coeff0_1*dmats0[1][0] + coeff0_2*dmats0[2][0] + coeff0_3*dmats0[3][0] + coeff0_4*dmats0[4][0] + coeff0_5*dmats0[5][0];
+          new_coeff0_1 = coeff0_0*dmats0[0][1] + coeff0_1*dmats0[1][1] + coeff0_2*dmats0[2][1] + coeff0_3*dmats0[3][1] + coeff0_4*dmats0[4][1] + coeff0_5*dmats0[5][1];
+          new_coeff0_2 = coeff0_0*dmats0[0][2] + coeff0_1*dmats0[1][2] + coeff0_2*dmats0[2][2] + coeff0_3*dmats0[3][2] + coeff0_4*dmats0[4][2] + coeff0_5*dmats0[5][2];
+          new_coeff0_3 = coeff0_0*dmats0[0][3] + coeff0_1*dmats0[1][3] + coeff0_2*dmats0[2][3] + coeff0_3*dmats0[3][3] + coeff0_4*dmats0[4][3] + coeff0_5*dmats0[5][3];
+          new_coeff0_4 = coeff0_0*dmats0[0][4] + coeff0_1*dmats0[1][4] + coeff0_2*dmats0[2][4] + coeff0_3*dmats0[3][4] + coeff0_4*dmats0[4][4] + coeff0_5*dmats0[5][4];
+          new_coeff0_5 = coeff0_0*dmats0[0][5] + coeff0_1*dmats0[1][5] + coeff0_2*dmats0[2][5] + coeff0_3*dmats0[3][5] + coeff0_4*dmats0[4][5] + coeff0_5*dmats0[5][5];
+        }
+        if(combinations[deriv_num][j] == 1)
+        {
+          new_coeff0_0 = coeff0_0*dmats1[0][0] + coeff0_1*dmats1[1][0] + coeff0_2*dmats1[2][0] + coeff0_3*dmats1[3][0] + coeff0_4*dmats1[4][0] + coeff0_5*dmats1[5][0];
+          new_coeff0_1 = coeff0_0*dmats1[0][1] + coeff0_1*dmats1[1][1] + coeff0_2*dmats1[2][1] + coeff0_3*dmats1[3][1] + coeff0_4*dmats1[4][1] + coeff0_5*dmats1[5][1];
+          new_coeff0_2 = coeff0_0*dmats1[0][2] + coeff0_1*dmats1[1][2] + coeff0_2*dmats1[2][2] + coeff0_3*dmats1[3][2] + coeff0_4*dmats1[4][2] + coeff0_5*dmats1[5][2];
+          new_coeff0_3 = coeff0_0*dmats1[0][3] + coeff0_1*dmats1[1][3] + coeff0_2*dmats1[2][3] + coeff0_3*dmats1[3][3] + coeff0_4*dmats1[4][3] + coeff0_5*dmats1[5][3];
+          new_coeff0_4 = coeff0_0*dmats1[0][4] + coeff0_1*dmats1[1][4] + coeff0_2*dmats1[2][4] + coeff0_3*dmats1[3][4] + coeff0_4*dmats1[4][4] + coeff0_5*dmats1[5][4];
+          new_coeff0_5 = coeff0_0*dmats1[0][5] + coeff0_1*dmats1[1][5] + coeff0_2*dmats1[2][5] + coeff0_3*dmats1[3][5] + coeff0_4*dmats1[4][5] + coeff0_5*dmats1[5][5];
+        }
+    
+      }
+      // Compute derivatives on reference element as dot product of coefficients and basisvalues
+      derivatives[deriv_num] = new_coeff0_0*basisvalue0 + new_coeff0_1*basisvalue1 + new_coeff0_2*basisvalue2 + new_coeff0_3*basisvalue3 + new_coeff0_4*basisvalue4 + new_coeff0_5*basisvalue5;
     }
     
     // Transform derivatives back to physical element
@@ -761,9 +859,9 @@ double UFC_SolitaryWave2DBilinearForm_fi
                                    const ufc::cell& c) const
 {
     // The reference points, direction and weights:
-    const static double X[3][1][2] = {{{0, 0}}, {{1, 0}}, {{0, 1}}};
-    const static double W[3][1] = {{1}, {1}, {1}};
-    const static double D[3][1][1] = {{{1}}, {{1}}, {{1}}};
+    const static double X[6][1][2] = {{{0, 0}}, {{1, 0}}, {{0, 1}}, {{0.5, 0.5}}, {{0, 0.5}}, {{0.5, 0}}};
+    const static double W[6][1] = {{1}, {1}, {1}, {1}, {1}, {1}};
+    const static double D[6][1][1] = {{{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}};
     
     const double * const * x = c.coordinates;
     double result = 0.0;
@@ -843,7 +941,7 @@ UFC_SolitaryWave2DBilinearForm_finite_el
 /// Return a string identifying the finite element
 const char* UFC_SolitaryWave2DBilinearForm_finite_element_0::signature() const
 {
-    return "MixedElement([FiniteElement('Lagrange', 'triangle', 1), FiniteElement('Lagrange', 'triangle', 1)])";
+    return "MixedElement([FiniteElement('Lagrange', 'triangle', 2), FiniteElement('Lagrange', 'triangle', 2)])";
 }
 
 /// Return the cell shape
@@ -855,7 +953,7 @@ ufc::shape UFC_SolitaryWave2DBilinearFor
 /// Return the dimension of the finite element function space
 unsigned int UFC_SolitaryWave2DBilinearForm_finite_element_0::space_dimension() const
 {
-    return 6;
+    return 12;
 }
 
 /// Return the rank of the value space
@@ -909,7 +1007,7 @@ void UFC_SolitaryWave2DBilinearForm_fini
     values[0] = 0;
     values[1] = 0;
     
-    if (0 <= i && i <= 2)
+    if (0 <= i && i <= 5)
     {
       // Map degree of freedom to element degree of freedom
       const unsigned int dof = i;
@@ -917,72 +1015,100 @@ void UFC_SolitaryWave2DBilinearForm_fini
       // Generate scalings
       const double scalings_y_0 = 1;
       const double scalings_y_1 = scalings_y_0*(0.5 - 0.5*y);
-    
-      // Compute psitilde_a
-      const double psitilde_a_0 = 1;
-      const double psitilde_a_1 = x;
-    
-      // Compute psitilde_bs
-      const double psitilde_bs_0_0 = 1;
-      const double psitilde_bs_0_1 = 1.5*y + 0.5;
-      const double psitilde_bs_1_0 = 1;
-    
-      // Compute basisvalues
-      const double basisvalue0 = 0.707106781186548*psitilde_a_0*scalings_y_0*psitilde_bs_0_0;
-      const double basisvalue1 = 1.73205080756888*psitilde_a_1*scalings_y_1*psitilde_bs_1_0;
-      const double basisvalue2 = psitilde_a_0*scalings_y_0*psitilde_bs_0_1;
-    
-      // Table(s) of coefficients
-      const static double coefficients0[3][3] =   \
-      {{0.471404520791032, -0.288675134594813, -0.166666666666667},
-      {0.471404520791032, 0.288675134594813, -0.166666666666667},
-      {0.471404520791032, 0, 0.333333333333333}};
+      const double scalings_y_2 = scalings_y_1*(0.5 - 0.5*y);
+    
+      // Compute psitilde_a
+      const double psitilde_a_0 = 1;
+      const double psitilde_a_1 = x;
+      const double psitilde_a_2 = 1.5*x*psitilde_a_1 - 0.5*psitilde_a_0;
+    
+      // Compute psitilde_bs
+      const double psitilde_bs_0_0 = 1;
+      const double psitilde_bs_0_1 = 1.5*y + 0.5;
+      const double psitilde_bs_0_2 = 0.111111111111111*psitilde_bs_0_1 + 1.66666666666667*y*psitilde_bs_0_1 - 0.555555555555556*psitilde_bs_0_0;
+      const double psitilde_bs_1_0 = 1;
+      const double psitilde_bs_1_1 = 2.5*y + 1.5;
+      const double psitilde_bs_2_0 = 1;
+    
+      // Compute basisvalues
+      const double basisvalue0 = 0.707106781186548*psitilde_a_0*scalings_y_0*psitilde_bs_0_0;
+      const double basisvalue1 = 1.73205080756888*psitilde_a_1*scalings_y_1*psitilde_bs_1_0;
+      const double basisvalue2 = psitilde_a_0*scalings_y_0*psitilde_bs_0_1;
+      const double basisvalue3 = 2.73861278752583*psitilde_a_2*scalings_y_2*psitilde_bs_2_0;
+      const double basisvalue4 = 2.12132034355964*psitilde_a_1*scalings_y_1*psitilde_bs_1_1;
+      const double basisvalue5 = 1.22474487139159*psitilde_a_0*scalings_y_0*psitilde_bs_0_2;
+    
+      // Table(s) of coefficients
+      const static double coefficients0[6][6] =   \
+      {{0, -0.173205080756888, -0.1, 0.121716123890037, 0.0942809041582064, 0.0544331053951817},
+      {0, 0.173205080756888, -0.1, 0.121716123890037, -0.0942809041582063, 0.0544331053951818},
+      {0, 0, 0.2, 0, 0, 0.163299316185545},
+      {0.471404520791032, 0.23094010767585, 0.133333333333333, 0, 0.188561808316413, -0.163299316185545},
+      {0.471404520791032, -0.23094010767585, 0.133333333333333, 0, -0.188561808316413, -0.163299316185545},
+      {0.471404520791032, 0, -0.266666666666667, -0.243432247780074, 0, 0.0544331053951817}};
     
       // Extract relevant coefficients
       const double coeff0_0 =   coefficients0[dof][0];
       const double coeff0_1 =   coefficients0[dof][1];
       const double coeff0_2 =   coefficients0[dof][2];
+      const double coeff0_3 =   coefficients0[dof][3];
+      const double coeff0_4 =   coefficients0[dof][4];
+      const double coeff0_5 =   coefficients0[dof][5];
     
       // Compute value(s)
-      values[0] = coeff0_0*basisvalue0 + coeff0_1*basisvalue1 + coeff0_2*basisvalue2;
-    }
-    
-    if (3 <= i && i <= 5)
-    {
-      // Map degree of freedom to element degree of freedom
-      const unsigned int dof = i - 3;
-    
-      // Generate scalings
-      const double scalings_y_0 = 1;
-      const double scalings_y_1 = scalings_y_0*(0.5 - 0.5*y);
-    
-      // Compute psitilde_a
-      const double psitilde_a_0 = 1;
-      const double psitilde_a_1 = x;
-    
-      // Compute psitilde_bs
-      const double psitilde_bs_0_0 = 1;
-      const double psitilde_bs_0_1 = 1.5*y + 0.5;
-      const double psitilde_bs_1_0 = 1;
-    
-      // Compute basisvalues
-      const double basisvalue0 = 0.707106781186548*psitilde_a_0*scalings_y_0*psitilde_bs_0_0;
-      const double basisvalue1 = 1.73205080756888*psitilde_a_1*scalings_y_1*psitilde_bs_1_0;
-      const double basisvalue2 = psitilde_a_0*scalings_y_0*psitilde_bs_0_1;
-    
-      // Table(s) of coefficients
-      const static double coefficients0[3][3] =   \
-      {{0.471404520791032, -0.288675134594813, -0.166666666666667},
-      {0.471404520791032, 0.288675134594813, -0.166666666666667},
-      {0.471404520791032, 0, 0.333333333333333}};
+      values[0] = coeff0_0*basisvalue0 + coeff0_1*basisvalue1 + coeff0_2*basisvalue2 + coeff0_3*basisvalue3 + coeff0_4*basisvalue4 + coeff0_5*basisvalue5;
+    }
+    
+    if (6 <= i && i <= 11)
+    {
+      // Map degree of freedom to element degree of freedom
+      const unsigned int dof = i - 6;
+    
+      // Generate scalings
+      const double scalings_y_0 = 1;
+      const double scalings_y_1 = scalings_y_0*(0.5 - 0.5*y);
+      const double scalings_y_2 = scalings_y_1*(0.5 - 0.5*y);
+    
+      // Compute psitilde_a
+      const double psitilde_a_0 = 1;
+      const double psitilde_a_1 = x;
+      const double psitilde_a_2 = 1.5*x*psitilde_a_1 - 0.5*psitilde_a_0;
+    
+      // Compute psitilde_bs
+      const double psitilde_bs_0_0 = 1;
+      const double psitilde_bs_0_1 = 1.5*y + 0.5;
+      const double psitilde_bs_0_2 = 0.111111111111111*psitilde_bs_0_1 + 1.66666666666667*y*psitilde_bs_0_1 - 0.555555555555556*psitilde_bs_0_0;
+      const double psitilde_bs_1_0 = 1;
+      const double psitilde_bs_1_1 = 2.5*y + 1.5;
+      const double psitilde_bs_2_0 = 1;
+    
+      // Compute basisvalues
+      const double basisvalue0 = 0.707106781186548*psitilde_a_0*scalings_y_0*psitilde_bs_0_0;
+      const double basisvalue1 = 1.73205080756888*psitilde_a_1*scalings_y_1*psitilde_bs_1_0;
+      const double basisvalue2 = psitilde_a_0*scalings_y_0*psitilde_bs_0_1;
+      const double basisvalue3 = 2.73861278752583*psitilde_a_2*scalings_y_2*psitilde_bs_2_0;
+      const double basisvalue4 = 2.12132034355964*psitilde_a_1*scalings_y_1*psitilde_bs_1_1;
+      const double basisvalue5 = 1.22474487139159*psitilde_a_0*scalings_y_0*psitilde_bs_0_2;
+    
+      // Table(s) of coefficients
+      const static double coefficients0[6][6] =   \
+      {{0, -0.173205080756888, -0.1, 0.121716123890037, 0.0942809041582064, 0.0544331053951817},
+      {0, 0.173205080756888, -0.1, 0.121716123890037, -0.0942809041582063, 0.0544331053951818},
+      {0, 0, 0.2, 0, 0, 0.163299316185545},
+      {0.471404520791032, 0.23094010767585, 0.133333333333333, 0, 0.188561808316413, -0.163299316185545},
+      {0.471404520791032, -0.23094010767585, 0.133333333333333, 0, -0.188561808316413, -0.163299316185545},
+      {0.471404520791032, 0, -0.266666666666667, -0.243432247780074, 0, 0.0544331053951817}};
     
       // Extract relevant coefficients
       const double coeff0_0 =   coefficients0[dof][0];
       const double coeff0_1 =   coefficients0[dof][1];
       const double coeff0_2 =   coefficients0[dof][2];
+      const double coeff0_3 =   coefficients0[dof][3];
+      const double coeff0_4 =   coefficients0[dof][4];
+      const double coeff0_5 =   coefficients0[dof][5];
     
       // Compute value(s)
-      values[1] = coeff0_0*basisvalue0 + coeff0_1*basisvalue1 + coeff0_2*basisvalue2;
+      values[1] = coeff0_0*basisvalue0 + coeff0_1*basisvalue1 + coeff0_2*basisvalue2 + coeff0_3*basisvalue3 + coeff0_4*basisvalue4 + coeff0_5*basisvalue5;
     }
     
 }
@@ -1094,7 +1220,7 @@ void UFC_SolitaryWave2DBilinearForm_fini
     for (unsigned int j = 0; j < 2*num_derivatives; j++)
       values[j] = 0;
     
-    if (0 <= i && i <= 2)
+    if (0 <= i && i <= 5)
     {
       // Map degree of freedom to element degree of freedom
       const unsigned int dof = i;
@@ -1102,38 +1228,55 @@ void UFC_SolitaryWave2DBilinearForm_fini
       // Generate scalings
       const double scalings_y_0 = 1;
       const double scalings_y_1 = scalings_y_0*(0.5 - 0.5*y);
-    
-      // Compute psitilde_a
-      const double psitilde_a_0 = 1;
-      const double psitilde_a_1 = x;
-    
-      // Compute psitilde_bs
-      const double psitilde_bs_0_0 = 1;
-      const double psitilde_bs_0_1 = 1.5*y + 0.5;
-      const double psitilde_bs_1_0 = 1;
-    
-      // Compute basisvalues
-      const double basisvalue0 = 0.707106781186548*psitilde_a_0*scalings_y_0*psitilde_bs_0_0;
-      const double basisvalue1 = 1.73205080756888*psitilde_a_1*scalings_y_1*psitilde_bs_1_0;
-      const double basisvalue2 = psitilde_a_0*scalings_y_0*psitilde_bs_0_1;
-    
-      // Table(s) of coefficients
-      const static double coefficients0[3][3] =   \
-      {{0.471404520791032, -0.288675134594813, -0.166666666666667},
-      {0.471404520791032, 0.288675134594813, -0.166666666666667},
-      {0.471404520791032, 0, 0.333333333333333}};
+      const double scalings_y_2 = scalings_y_1*(0.5 - 0.5*y);
+    
+      // Compute psitilde_a
+      const double psitilde_a_0 = 1;
+      const double psitilde_a_1 = x;
+      const double psitilde_a_2 = 1.5*x*psitilde_a_1 - 0.5*psitilde_a_0;
+    
+      // Compute psitilde_bs
+      const double psitilde_bs_0_0 = 1;
+      const double psitilde_bs_0_1 = 1.5*y + 0.5;
+      const double psitilde_bs_0_2 = 0.111111111111111*psitilde_bs_0_1 + 1.66666666666667*y*psitilde_bs_0_1 - 0.555555555555556*psitilde_bs_0_0;
+      const double psitilde_bs_1_0 = 1;
+      const double psitilde_bs_1_1 = 2.5*y + 1.5;
+      const double psitilde_bs_2_0 = 1;
+    
+      // Compute basisvalues
+      const double basisvalue0 = 0.707106781186548*psitilde_a_0*scalings_y_0*psitilde_bs_0_0;
+      const double basisvalue1 = 1.73205080756888*psitilde_a_1*scalings_y_1*psitilde_bs_1_0;
+      const double basisvalue2 = psitilde_a_0*scalings_y_0*psitilde_bs_0_1;
+      const double basisvalue3 = 2.73861278752583*psitilde_a_2*scalings_y_2*psitilde_bs_2_0;
+      const double basisvalue4 = 2.12132034355964*psitilde_a_1*scalings_y_1*psitilde_bs_1_1;
+      const double basisvalue5 = 1.22474487139159*psitilde_a_0*scalings_y_0*psitilde_bs_0_2;
+    
+      // Table(s) of coefficients
+      const static double coefficients0[6][6] =   \
+      {{0, -0.173205080756888, -0.1, 0.121716123890037, 0.0942809041582064, 0.0544331053951817},
+      {0, 0.173205080756888, -0.1, 0.121716123890037, -0.0942809041582063, 0.0544331053951818},
+      {0, 0, 0.2, 0, 0, 0.163299316185545},
+      {0.471404520791032, 0.23094010767585, 0.133333333333333, 0, 0.188561808316413, -0.163299316185545},
+      {0.471404520791032, -0.23094010767585, 0.133333333333333, 0, -0.188561808316413, -0.163299316185545},
+      {0.471404520791032, 0, -0.266666666666667, -0.243432247780074, 0, 0.0544331053951817}};
     
       // Interesting (new) part
       // Tables of derivatives of the polynomial base (transpose)
-      const static double dmats0[3][3] =   \
-      {{0, 0, 0},
-      {4.89897948556636, 0, 0},
-      {0, 0, 0}};
-    
-      const static double dmats1[3][3] =   \
-      {{0, 0, 0},
-      {2.44948974278318, 0, 0},
-      {4.24264068711928, 0, 0}};
+      const static double dmats0[6][6] =   \
+      {{0, 0, 0, 0, 0, 0},
+      {4.89897948556636, 0, 0, 0, 0, 0},
+      {0, 0, 0, 0, 0, 0},
+      {0, 9.48683298050514, 0, 0, 0, 0},
+      {4, 0, 7.07106781186548, 0, 0, 0},
+      {0, 0, 0, 0, 0, 0}};
+    
+      const static double dmats1[6][6] =   \
+      {{0, 0, 0, 0, 0, 0},
+      {2.44948974278318, 0, 0, 0, 0, 0},
+      {4.24264068711928, 0, 0, 0, 0, 0},
+      {2.58198889747161, 4.74341649025257, -0.912870929175277, 0, 0, 0},
+      {2, 6.12372435695795, 3.53553390593274, 0, 0, 0},
+      {-2.3094010767585, 0, 8.16496580927726, 0, 0, 0}};
     
       // Compute reference derivatives
       // Declare pointer to array of derivatives on FIAT element
@@ -1143,11 +1286,17 @@ void UFC_SolitaryWave2DBilinearForm_fini
       double coeff0_0 = 0;
       double coeff0_1 = 0;
       double coeff0_2 = 0;
+      double coeff0_3 = 0;
+      double coeff0_4 = 0;
+      double coeff0_5 = 0;
     
       // Declare new coefficients
       double new_coeff0_0 = 0;
       double new_coeff0_1 = 0;
       double new_coeff0_2 = 0;
+      double new_coeff0_3 = 0;
+      double new_coeff0_4 = 0;
+      double new_coeff0_5 = 0;
     
       // Loop possible derivatives
       for (unsigned int deriv_num = 0; deriv_num < num_derivatives; deriv_num++)
@@ -1156,6 +1305,9 @@ void UFC_SolitaryWave2DBilinearForm_fini
         new_coeff0_0 = coefficients0[dof][0];
         new_coeff0_1 = coefficients0[dof][1];
         new_coeff0_2 = coefficients0[dof][2];
+        new_coeff0_3 = coefficients0[dof][3];
+        new_coeff0_4 = coefficients0[dof][4];
+        new_coeff0_5 = coefficients0[dof][5];
     
         // Loop derivative order
         for (unsigned int j = 0; j < n; j++)
@@ -1164,23 +1316,32 @@ void UFC_SolitaryWave2DBilinearForm_fini
           coeff0_0 = new_coeff0_0;
           coeff0_1 = new_coeff0_1;
           coeff0_2 = new_coeff0_2;
+          coeff0_3 = new_coeff0_3;
+          coeff0_4 = new_coeff0_4;
+          coeff0_5 = new_coeff0_5;
     
           if(combinations[deriv_num][j] == 0)
           {
-            new_coeff0_0 = coeff0_0*dmats0[0][0] + coeff0_1*dmats0[1][0] + coeff0_2*dmats0[2][0];
-            new_coeff0_1 = coeff0_0*dmats0[0][1] + coeff0_1*dmats0[1][1] + coeff0_2*dmats0[2][1];
-            new_coeff0_2 = coeff0_0*dmats0[0][2] + coeff0_1*dmats0[1][2] + coeff0_2*dmats0[2][2];
+            new_coeff0_0 = coeff0_0*dmats0[0][0] + coeff0_1*dmats0[1][0] + coeff0_2*dmats0[2][0] + coeff0_3*dmats0[3][0] + coeff0_4*dmats0[4][0] + coeff0_5*dmats0[5][0];
+            new_coeff0_1 = coeff0_0*dmats0[0][1] + coeff0_1*dmats0[1][1] + coeff0_2*dmats0[2][1] + coeff0_3*dmats0[3][1] + coeff0_4*dmats0[4][1] + coeff0_5*dmats0[5][1];
+            new_coeff0_2 = coeff0_0*dmats0[0][2] + coeff0_1*dmats0[1][2] + coeff0_2*dmats0[2][2] + coeff0_3*dmats0[3][2] + coeff0_4*dmats0[4][2] + coeff0_5*dmats0[5][2];
+            new_coeff0_3 = coeff0_0*dmats0[0][3] + coeff0_1*dmats0[1][3] + coeff0_2*dmats0[2][3] + coeff0_3*dmats0[3][3] + coeff0_4*dmats0[4][3] + coeff0_5*dmats0[5][3];
+            new_coeff0_4 = coeff0_0*dmats0[0][4] + coeff0_1*dmats0[1][4] + coeff0_2*dmats0[2][4] + coeff0_3*dmats0[3][4] + coeff0_4*dmats0[4][4] + coeff0_5*dmats0[5][4];
+            new_coeff0_5 = coeff0_0*dmats0[0][5] + coeff0_1*dmats0[1][5] + coeff0_2*dmats0[2][5] + coeff0_3*dmats0[3][5] + coeff0_4*dmats0[4][5] + coeff0_5*dmats0[5][5];
           }
           if(combinations[deriv_num][j] == 1)
           {
-            new_coeff0_0 = coeff0_0*dmats1[0][0] + coeff0_1*dmats1[1][0] + coeff0_2*dmats1[2][0];
-            new_coeff0_1 = coeff0_0*dmats1[0][1] + coeff0_1*dmats1[1][1] + coeff0_2*dmats1[2][1];
-            new_coeff0_2 = coeff0_0*dmats1[0][2] + coeff0_1*dmats1[1][2] + coeff0_2*dmats1[2][2];
+            new_coeff0_0 = coeff0_0*dmats1[0][0] + coeff0_1*dmats1[1][0] + coeff0_2*dmats1[2][0] + coeff0_3*dmats1[3][0] + coeff0_4*dmats1[4][0] + coeff0_5*dmats1[5][0];
+            new_coeff0_1 = coeff0_0*dmats1[0][1] + coeff0_1*dmats1[1][1] + coeff0_2*dmats1[2][1] + coeff0_3*dmats1[3][1] + coeff0_4*dmats1[4][1] + coeff0_5*dmats1[5][1];
+            new_coeff0_2 = coeff0_0*dmats1[0][2] + coeff0_1*dmats1[1][2] + coeff0_2*dmats1[2][2] + coeff0_3*dmats1[3][2] + coeff0_4*dmats1[4][2] + coeff0_5*dmats1[5][2];
+            new_coeff0_3 = coeff0_0*dmats1[0][3] + coeff0_1*dmats1[1][3] + coeff0_2*dmats1[2][3] + coeff0_3*dmats1[3][3] + coeff0_4*dmats1[4][3] + coeff0_5*dmats1[5][3];
+            new_coeff0_4 = coeff0_0*dmats1[0][4] + coeff0_1*dmats1[1][4] + coeff0_2*dmats1[2][4] + coeff0_3*dmats1[3][4] + coeff0_4*dmats1[4][4] + coeff0_5*dmats1[5][4];
+            new_coeff0_5 = coeff0_0*dmats1[0][5] + coeff0_1*dmats1[1][5] + coeff0_2*dmats1[2][5] + coeff0_3*dmats1[3][5] + coeff0_4*dmats1[4][5] + coeff0_5*dmats1[5][5];
           }
     
         }
         // Compute derivatives on reference element as dot product of coefficients and basisvalues
-        derivatives[deriv_num] = new_coeff0_0*basisvalue0 + new_coeff0_1*basisvalue1 + new_coeff0_2*basisvalue2;
+        derivatives[deriv_num] = new_coeff0_0*basisvalue0 + new_coeff0_1*basisvalue1 + new_coeff0_2*basisvalue2 + new_coeff0_3*basisvalue3 + new_coeff0_4*basisvalue4 + new_coeff0_5*basisvalue5;
       }
     
       // Transform derivatives back to physical element
@@ -1205,46 +1366,63 @@ void UFC_SolitaryWave2DBilinearForm_fini
       delete [] transform;
     }
     
-    if (3 <= i && i <= 5)
-    {
-      // Map degree of freedom to element degree of freedom
-      const unsigned int dof = i - 3;
-    
-      // Generate scalings
-      const double scalings_y_0 = 1;
-      const double scalings_y_1 = scalings_y_0*(0.5 - 0.5*y);
-    
-      // Compute psitilde_a
-      const double psitilde_a_0 = 1;
-      const double psitilde_a_1 = x;
-    
-      // Compute psitilde_bs
-      const double psitilde_bs_0_0 = 1;
-      const double psitilde_bs_0_1 = 1.5*y + 0.5;
-      const double psitilde_bs_1_0 = 1;
-    
-      // Compute basisvalues
-      const double basisvalue0 = 0.707106781186548*psitilde_a_0*scalings_y_0*psitilde_bs_0_0;
-      const double basisvalue1 = 1.73205080756888*psitilde_a_1*scalings_y_1*psitilde_bs_1_0;
-      const double basisvalue2 = psitilde_a_0*scalings_y_0*psitilde_bs_0_1;
-    
-      // Table(s) of coefficients
-      const static double coefficients0[3][3] =   \
-      {{0.471404520791032, -0.288675134594813, -0.166666666666667},
-      {0.471404520791032, 0.288675134594813, -0.166666666666667},
-      {0.471404520791032, 0, 0.333333333333333}};
+    if (6 <= i && i <= 11)
+    {
+      // Map degree of freedom to element degree of freedom
+      const unsigned int dof = i - 6;
+    
+      // Generate scalings
+      const double scalings_y_0 = 1;
+      const double scalings_y_1 = scalings_y_0*(0.5 - 0.5*y);
+      const double scalings_y_2 = scalings_y_1*(0.5 - 0.5*y);
+    
+      // Compute psitilde_a
+      const double psitilde_a_0 = 1;
+      const double psitilde_a_1 = x;
+      const double psitilde_a_2 = 1.5*x*psitilde_a_1 - 0.5*psitilde_a_0;
+    
+      // Compute psitilde_bs
+      const double psitilde_bs_0_0 = 1;
+      const double psitilde_bs_0_1 = 1.5*y + 0.5;
+      const double psitilde_bs_0_2 = 0.111111111111111*psitilde_bs_0_1 + 1.66666666666667*y*psitilde_bs_0_1 - 0.555555555555556*psitilde_bs_0_0;
+      const double psitilde_bs_1_0 = 1;
+      const double psitilde_bs_1_1 = 2.5*y + 1.5;
+      const double psitilde_bs_2_0 = 1;
+    
+      // Compute basisvalues
+      const double basisvalue0 = 0.707106781186548*psitilde_a_0*scalings_y_0*psitilde_bs_0_0;
+      const double basisvalue1 = 1.73205080756888*psitilde_a_1*scalings_y_1*psitilde_bs_1_0;
+      const double basisvalue2 = psitilde_a_0*scalings_y_0*psitilde_bs_0_1;
+      const double basisvalue3 = 2.73861278752583*psitilde_a_2*scalings_y_2*psitilde_bs_2_0;
+      const double basisvalue4 = 2.12132034355964*psitilde_a_1*scalings_y_1*psitilde_bs_1_1;
+      const double basisvalue5 = 1.22474487139159*psitilde_a_0*scalings_y_0*psitilde_bs_0_2;
+    
+      // Table(s) of coefficients
+      const static double coefficients0[6][6] =   \
+      {{0, -0.173205080756888, -0.1, 0.121716123890037, 0.0942809041582064, 0.0544331053951817},
+      {0, 0.173205080756888, -0.1, 0.121716123890037, -0.0942809041582063, 0.0544331053951818},
+      {0, 0, 0.2, 0, 0, 0.163299316185545},
+      {0.471404520791032, 0.23094010767585, 0.133333333333333, 0, 0.188561808316413, -0.163299316185545},
+      {0.471404520791032, -0.23094010767585, 0.133333333333333, 0, -0.188561808316413, -0.163299316185545},
+      {0.471404520791032, 0, -0.266666666666667, -0.243432247780074, 0, 0.0544331053951817}};
     
       // Interesting (new) part
       // Tables of derivatives of the polynomial base (transpose)
-      const static double dmats0[3][3] =   \
-      {{0, 0, 0},
-      {4.89897948556636, 0, 0},
-      {0, 0, 0}};
-    
-      const static double dmats1[3][3] =   \
-      {{0, 0, 0},
-      {2.44948974278318, 0, 0},
-      {4.24264068711928, 0, 0}};
+      const static double dmats0[6][6] =   \
+      {{0, 0, 0, 0, 0, 0},
+      {4.89897948556636, 0, 0, 0, 0, 0},
+      {0, 0, 0, 0, 0, 0},
+      {0, 9.48683298050514, 0, 0, 0, 0},
+      {4, 0, 7.07106781186548, 0, 0, 0},
+      {0, 0, 0, 0, 0, 0}};
+    
+      const static double dmats1[6][6] =   \
+      {{0, 0, 0, 0, 0, 0},
+      {2.44948974278318, 0, 0, 0, 0, 0},
+      {4.24264068711928, 0, 0, 0, 0, 0},
+      {2.58198889747161, 4.74341649025257, -0.912870929175277, 0, 0, 0},
+      {2, 6.12372435695795, 3.53553390593274, 0, 0, 0},
+      {-2.3094010767585, 0, 8.16496580927726, 0, 0, 0}};
     
       // Compute reference derivatives
       // Declare pointer to array of derivatives on FIAT element
@@ -1254,11 +1432,17 @@ void UFC_SolitaryWave2DBilinearForm_fini
       double coeff0_0 = 0;
       double coeff0_1 = 0;
       double coeff0_2 = 0;
+      double coeff0_3 = 0;
+      double coeff0_4 = 0;
+      double coeff0_5 = 0;
     
       // Declare new coefficients
       double new_coeff0_0 = 0;
       double new_coeff0_1 = 0;
       double new_coeff0_2 = 0;
+      double new_coeff0_3 = 0;
+      double new_coeff0_4 = 0;
+      double new_coeff0_5 = 0;
     
       // Loop possible derivatives
       for (unsigned int deriv_num = 0; deriv_num < num_derivatives; deriv_num++)
@@ -1267,6 +1451,9 @@ void UFC_SolitaryWave2DBilinearForm_fini
         new_coeff0_0 = coefficients0[dof][0];
         new_coeff0_1 = coefficients0[dof][1];
         new_coeff0_2 = coefficients0[dof][2];
+        new_coeff0_3 = coefficients0[dof][3];
+        new_coeff0_4 = coefficients0[dof][4];
+        new_coeff0_5 = coefficients0[dof][5];
     
         // Loop derivative order
         for (unsigned int j = 0; j < n; j++)
@@ -1275,23 +1462,32 @@ void UFC_SolitaryWave2DBilinearForm_fini
           coeff0_0 = new_coeff0_0;
           coeff0_1 = new_coeff0_1;
           coeff0_2 = new_coeff0_2;
+          coeff0_3 = new_coeff0_3;
+          coeff0_4 = new_coeff0_4;
+          coeff0_5 = new_coeff0_5;
     
           if(combinations[deriv_num][j] == 0)
           {
-            new_coeff0_0 = coeff0_0*dmats0[0][0] + coeff0_1*dmats0[1][0] + coeff0_2*dmats0[2][0];
-            new_coeff0_1 = coeff0_0*dmats0[0][1] + coeff0_1*dmats0[1][1] + coeff0_2*dmats0[2][1];
-            new_coeff0_2 = coeff0_0*dmats0[0][2] + coeff0_1*dmats0[1][2] + coeff0_2*dmats0[2][2];
+            new_coeff0_0 = coeff0_0*dmats0[0][0] + coeff0_1*dmats0[1][0] + coeff0_2*dmats0[2][0] + coeff0_3*dmats0[3][0] + coeff0_4*dmats0[4][0] + coeff0_5*dmats0[5][0];
+            new_coeff0_1 = coeff0_0*dmats0[0][1] + coeff0_1*dmats0[1][1] + coeff0_2*dmats0[2][1] + coeff0_3*dmats0[3][1] + coeff0_4*dmats0[4][1] + coeff0_5*dmats0[5][1];
+            new_coeff0_2 = coeff0_0*dmats0[0][2] + coeff0_1*dmats0[1][2] + coeff0_2*dmats0[2][2] + coeff0_3*dmats0[3][2] + coeff0_4*dmats0[4][2] + coeff0_5*dmats0[5][2];
+            new_coeff0_3 = coeff0_0*dmats0[0][3] + coeff0_1*dmats0[1][3] + coeff0_2*dmats0[2][3] + coeff0_3*dmats0[3][3] + coeff0_4*dmats0[4][3] + coeff0_5*dmats0[5][3];
+            new_coeff0_4 = coeff0_0*dmats0[0][4] + coeff0_1*dmats0[1][4] + coeff0_2*dmats0[2][4] + coeff0_3*dmats0[3][4] + coeff0_4*dmats0[4][4] + coeff0_5*dmats0[5][4];
+            new_coeff0_5 = coeff0_0*dmats0[0][5] + coeff0_1*dmats0[1][5] + coeff0_2*dmats0[2][5] + coeff0_3*dmats0[3][5] + coeff0_4*dmats0[4][5] + coeff0_5*dmats0[5][5];
           }
           if(combinations[deriv_num][j] == 1)
           {
-            new_coeff0_0 = coeff0_0*dmats1[0][0] + coeff0_1*dmats1[1][0] + coeff0_2*dmats1[2][0];
-            new_coeff0_1 = coeff0_0*dmats1[0][1] + coeff0_1*dmats1[1][1] + coeff0_2*dmats1[2][1];
-            new_coeff0_2 = coeff0_0*dmats1[0][2] + coeff0_1*dmats1[1][2] + coeff0_2*dmats1[2][2];
+            new_coeff0_0 = coeff0_0*dmats1[0][0] + coeff0_1*dmats1[1][0] + coeff0_2*dmats1[2][0] + coeff0_3*dmats1[3][0] + coeff0_4*dmats1[4][0] + coeff0_5*dmats1[5][0];
+            new_coeff0_1 = coeff0_0*dmats1[0][1] + coeff0_1*dmats1[1][1] + coeff0_2*dmats1[2][1] + coeff0_3*dmats1[3][1] + coeff0_4*dmats1[4][1] + coeff0_5*dmats1[5][1];
+            new_coeff0_2 = coeff0_0*dmats1[0][2] + coeff0_1*dmats1[1][2] + coeff0_2*dmats1[2][2] + coeff0_3*dmats1[3][2] + coeff0_4*dmats1[4][2] + coeff0_5*dmats1[5][2];
+            new_coeff0_3 = coeff0_0*dmats1[0][3] + coeff0_1*dmats1[1][3] + coeff0_2*dmats1[2][3] + coeff0_3*dmats1[3][3] + coeff0_4*dmats1[4][3] + coeff0_5*dmats1[5][3];
+            new_coeff0_4 = coeff0_0*dmats1[0][4] + coeff0_1*dmats1[1][4] + coeff0_2*dmats1[2][4] + coeff0_3*dmats1[3][4] + coeff0_4*dmats1[4][4] + coeff0_5*dmats1[5][4];
+            new_coeff0_5 = coeff0_0*dmats1[0][5] + coeff0_1*dmats1[1][5] + coeff0_2*dmats1[2][5] + coeff0_3*dmats1[3][5] + coeff0_4*dmats1[4][5] + coeff0_5*dmats1[5][5];
           }
     
         }
         // Compute derivatives on reference element as dot product of coefficients and basisvalues
-        derivatives[deriv_num] = new_coeff0_0*basisvalue0 + new_coeff0_1*basisvalue1 + new_coeff0_2*basisvalue2;
+        derivatives[deriv_num] = new_coeff0_0*basisvalue0 + new_coeff0_1*basisvalue1 + new_coeff0_2*basisvalue2 + new_coeff0_3*basisvalue3 + new_coeff0_4*basisvalue4 + new_coeff0_5*basisvalue5;
       }
     
       // Transform derivatives back to physical element
@@ -1333,9 +1529,9 @@ double UFC_SolitaryWave2DBilinearForm_fi
                                    const ufc::cell& c) const
 {
     // The reference points, direction and weights:
-    const static double X[6][1][2] = {{{0, 0}}, {{1, 0}}, {{0, 1}}, {{0, 0}}, {{1, 0}}, {{0, 1}}};
-    const static double W[6][1] = {{1}, {1}, {1}, {1}, {1}, {1}};
-    const static double D[6][1][2] = {{{1, 0}}, {{1, 0}}, {{1, 0}}, {{0, 1}}, {{0, 1}}, {{0, 1}}};
+    const static double X[12][1][2] = {{{0, 0}}, {{1, 0}}, {{0, 1}}, {{0.5, 0.5}}, {{0, 0.5}}, {{0.5, 0}}, {{0, 0}}, {{1, 0}}, {{0, 1}}, {{0.5, 0.5}}, {{0, 0.5}}, {{0.5, 0}}};
+    const static double W[12][1] = {{1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}};
+    const static double D[12][1][2] = {{{1, 0}}, {{1, 0}}, {{1, 0}}, {{1, 0}}, {{1, 0}}, {{1, 0}}, {{0, 1}}, {{0, 1}}, {{0, 1}}, {{0, 1}}, {{0, 1}}, {{0, 1}}};
     
     const double * const * x = c.coordinates;
     double result = 0.0;
@@ -1386,9 +1582,9 @@ void UFC_SolitaryWave2DBilinearForm_fini
     vertex_values[2] = dof_values[1];
     vertex_values[4] = dof_values[2];
     // Evaluate at vertices and use affine mapping
-    vertex_values[1] = dof_values[3];
-    vertex_values[3] = dof_values[4];
-    vertex_values[5] = dof_values[5];
+    vertex_values[1] = dof_values[6];
+    vertex_values[3] = dof_values[7];
+    vertex_values[5] = dof_values[8];
 }
 
 /// Return the number of sub elements (for a mixed element)
@@ -1428,7 +1624,7 @@ UFC_SolitaryWave2DBilinearForm_finite_el
 /// Return a string identifying the finite element
 const char* UFC_SolitaryWave2DBilinearForm_finite_element_1_0::signature() const
 {
-    return "FiniteElement('Lagrange', 'triangle', 1)";
+    return "FiniteElement('Lagrange', 'triangle', 2)";
 }
 
 /// Return the cell shape
@@ -1440,7 +1636,7 @@ ufc::shape UFC_SolitaryWave2DBilinearFor
 /// Return the dimension of the finite element function space
 unsigned int UFC_SolitaryWave2DBilinearForm_finite_element_1_0::space_dimension() const
 {
-    return 3;
+    return 6;
 }
 
 /// Return the rank of the value space
@@ -1499,34 +1695,48 @@ void UFC_SolitaryWave2DBilinearForm_fini
     // Generate scalings
     const double scalings_y_0 = 1;
     const double scalings_y_1 = scalings_y_0*(0.5 - 0.5*y);
-    
-    // Compute psitilde_a
-    const double psitilde_a_0 = 1;
-    const double psitilde_a_1 = x;
-    
-    // Compute psitilde_bs
-    const double psitilde_bs_0_0 = 1;
-    const double psitilde_bs_0_1 = 1.5*y + 0.5;
-    const double psitilde_bs_1_0 = 1;
-    
-    // Compute basisvalues
-    const double basisvalue0 = 0.707106781186548*psitilde_a_0*scalings_y_0*psitilde_bs_0_0;
-    const double basisvalue1 = 1.73205080756888*psitilde_a_1*scalings_y_1*psitilde_bs_1_0;
-    const double basisvalue2 = psitilde_a_0*scalings_y_0*psitilde_bs_0_1;
-    
-    // Table(s) of coefficients
-    const static double coefficients0[3][3] = \
-    {{0.471404520791032, -0.288675134594813, -0.166666666666667},
-    {0.471404520791032, 0.288675134594813, -0.166666666666667},
-    {0.471404520791032, 0, 0.333333333333333}};
+    const double scalings_y_2 = scalings_y_1*(0.5 - 0.5*y);
+    
+    // Compute psitilde_a
+    const double psitilde_a_0 = 1;
+    const double psitilde_a_1 = x;
+    const double psitilde_a_2 = 1.5*x*psitilde_a_1 - 0.5*psitilde_a_0;
+    
+    // Compute psitilde_bs
+    const double psitilde_bs_0_0 = 1;
+    const double psitilde_bs_0_1 = 1.5*y + 0.5;
+    const double psitilde_bs_0_2 = 0.111111111111111*psitilde_bs_0_1 + 1.66666666666667*y*psitilde_bs_0_1 - 0.555555555555556*psitilde_bs_0_0;
+    const double psitilde_bs_1_0 = 1;
+    const double psitilde_bs_1_1 = 2.5*y + 1.5;
+    const double psitilde_bs_2_0 = 1;
+    
+    // Compute basisvalues
+    const double basisvalue0 = 0.707106781186548*psitilde_a_0*scalings_y_0*psitilde_bs_0_0;
+    const double basisvalue1 = 1.73205080756888*psitilde_a_1*scalings_y_1*psitilde_bs_1_0;
+    const double basisvalue2 = psitilde_a_0*scalings_y_0*psitilde_bs_0_1;
+    const double basisvalue3 = 2.73861278752583*psitilde_a_2*scalings_y_2*psitilde_bs_2_0;
+    const double basisvalue4 = 2.12132034355964*psitilde_a_1*scalings_y_1*psitilde_bs_1_1;
+    const double basisvalue5 = 1.22474487139159*psitilde_a_0*scalings_y_0*psitilde_bs_0_2;
+    
+    // Table(s) of coefficients
+    const static double coefficients0[6][6] = \
+    {{0, -0.173205080756888, -0.1, 0.121716123890037, 0.0942809041582064, 0.0544331053951817},
+    {0, 0.173205080756888, -0.1, 0.121716123890037, -0.0942809041582063, 0.0544331053951818},
+    {0, 0, 0.2, 0, 0, 0.163299316185545},
+    {0.471404520791032, 0.23094010767585, 0.133333333333333, 0, 0.188561808316413, -0.163299316185545},
+    {0.471404520791032, -0.23094010767585, 0.133333333333333, 0, -0.188561808316413, -0.163299316185545},
+    {0.471404520791032, 0, -0.266666666666667, -0.243432247780074, 0, 0.0544331053951817}};
     
     // Extract relevant coefficients
     const double coeff0_0 = coefficients0[dof][0];
     const double coeff0_1 = coefficients0[dof][1];
     const double coeff0_2 = coefficients0[dof][2];
-    
-    // Compute value(s)
-    *values = coeff0_0*basisvalue0 + coeff0_1*basisvalue1 + coeff0_2*basisvalue2;
+    const double coeff0_3 = coefficients0[dof][3];
+    const double coeff0_4 = coefficients0[dof][4];
+    const double coeff0_5 = coefficients0[dof][5];
+    
+    // Compute value(s)
+    *values = coeff0_0*basisvalue0 + coeff0_1*basisvalue1 + coeff0_2*basisvalue2 + coeff0_3*basisvalue3 + coeff0_4*basisvalue4 + coeff0_5*basisvalue5;
 }
 
 /// Evaluate all basis functions at given point in cell
@@ -1642,38 +1852,55 @@ void UFC_SolitaryWave2DBilinearForm_fini
     // Generate scalings
     const double scalings_y_0 = 1;
     const double scalings_y_1 = scalings_y_0*(0.5 - 0.5*y);
-    
-    // Compute psitilde_a
-    const double psitilde_a_0 = 1;
-    const double psitilde_a_1 = x;
-    
-    // Compute psitilde_bs
-    const double psitilde_bs_0_0 = 1;
-    const double psitilde_bs_0_1 = 1.5*y + 0.5;
-    const double psitilde_bs_1_0 = 1;
-    
-    // Compute basisvalues
-    const double basisvalue0 = 0.707106781186548*psitilde_a_0*scalings_y_0*psitilde_bs_0_0;
-    const double basisvalue1 = 1.73205080756888*psitilde_a_1*scalings_y_1*psitilde_bs_1_0;
-    const double basisvalue2 = psitilde_a_0*scalings_y_0*psitilde_bs_0_1;
-    
-    // Table(s) of coefficients
-    const static double coefficients0[3][3] = \
-    {{0.471404520791032, -0.288675134594813, -0.166666666666667},
-    {0.471404520791032, 0.288675134594813, -0.166666666666667},
-    {0.471404520791032, 0, 0.333333333333333}};
-    
-    // Interesting (new) part
-    // Tables of derivatives of the polynomial base (transpose)
-    const static double dmats0[3][3] = \
-    {{0, 0, 0},
-    {4.89897948556636, 0, 0},
-    {0, 0, 0}};
-    
-    const static double dmats1[3][3] = \
-    {{0, 0, 0},
-    {2.44948974278318, 0, 0},
-    {4.24264068711928, 0, 0}};
+    const double scalings_y_2 = scalings_y_1*(0.5 - 0.5*y);
+    
+    // Compute psitilde_a
+    const double psitilde_a_0 = 1;
+    const double psitilde_a_1 = x;
+    const double psitilde_a_2 = 1.5*x*psitilde_a_1 - 0.5*psitilde_a_0;
+    
+    // Compute psitilde_bs
+    const double psitilde_bs_0_0 = 1;
+    const double psitilde_bs_0_1 = 1.5*y + 0.5;
+    const double psitilde_bs_0_2 = 0.111111111111111*psitilde_bs_0_1 + 1.66666666666667*y*psitilde_bs_0_1 - 0.555555555555556*psitilde_bs_0_0;
+    const double psitilde_bs_1_0 = 1;
+    const double psitilde_bs_1_1 = 2.5*y + 1.5;
+    const double psitilde_bs_2_0 = 1;
+    
+    // Compute basisvalues
+    const double basisvalue0 = 0.707106781186548*psitilde_a_0*scalings_y_0*psitilde_bs_0_0;
+    const double basisvalue1 = 1.73205080756888*psitilde_a_1*scalings_y_1*psitilde_bs_1_0;
+    const double basisvalue2 = psitilde_a_0*scalings_y_0*psitilde_bs_0_1;
+    const double basisvalue3 = 2.73861278752583*psitilde_a_2*scalings_y_2*psitilde_bs_2_0;
+    const double basisvalue4 = 2.12132034355964*psitilde_a_1*scalings_y_1*psitilde_bs_1_1;
+    const double basisvalue5 = 1.22474487139159*psitilde_a_0*scalings_y_0*psitilde_bs_0_2;
+    
+    // Table(s) of coefficients
+    const static double coefficients0[6][6] = \
+    {{0, -0.173205080756888, -0.1, 0.121716123890037, 0.0942809041582064, 0.0544331053951817},
+    {0, 0.173205080756888, -0.1, 0.121716123890037, -0.0942809041582063, 0.0544331053951818},
+    {0, 0, 0.2, 0, 0, 0.163299316185545},
+    {0.471404520791032, 0.23094010767585, 0.133333333333333, 0, 0.188561808316413, -0.163299316185545},
+    {0.471404520791032, -0.23094010767585, 0.133333333333333, 0, -0.188561808316413, -0.163299316185545},
+    {0.471404520791032, 0, -0.266666666666667, -0.243432247780074, 0, 0.0544331053951817}};
+    
+    // Interesting (new) part
+    // Tables of derivatives of the polynomial base (transpose)
+    const static double dmats0[6][6] = \
+    {{0, 0, 0, 0, 0, 0},
+    {4.89897948556636, 0, 0, 0, 0, 0},
+    {0, 0, 0, 0, 0, 0},
+    {0, 9.48683298050514, 0, 0, 0, 0},
+    {4, 0, 7.07106781186548, 0, 0, 0},
+    {0, 0, 0, 0, 0, 0}};
+    
+    const static double dmats1[6][6] = \
+    {{0, 0, 0, 0, 0, 0},
+    {2.44948974278318, 0, 0, 0, 0, 0},
+    {4.24264068711928, 0, 0, 0, 0, 0},
+    {2.58198889747161, 4.74341649025257, -0.912870929175277, 0, 0, 0},
+    {2, 6.12372435695795, 3.53553390593274, 0, 0, 0},
+    {-2.3094010767585, 0, 8.16496580927726, 0, 0, 0}};
     
     // Compute reference derivatives
     // Declare pointer to array of derivatives on FIAT element
@@ -1683,11 +1910,17 @@ void UFC_SolitaryWave2DBilinearForm_fini
     double coeff0_0 = 0;
     double coeff0_1 = 0;
     double coeff0_2 = 0;
+    double coeff0_3 = 0;
+    double coeff0_4 = 0;
+    double coeff0_5 = 0;
     
     // Declare new coefficients
     double new_coeff0_0 = 0;
     double new_coeff0_1 = 0;
     double new_coeff0_2 = 0;
+    double new_coeff0_3 = 0;
+    double new_coeff0_4 = 0;
+    double new_coeff0_5 = 0;
     
     // Loop possible derivatives
     for (unsigned int deriv_num = 0; deriv_num < num_derivatives; deriv_num++)
@@ -1696,6 +1929,9 @@ void UFC_SolitaryWave2DBilinearForm_fini
       new_coeff0_0 = coefficients0[dof][0];
       new_coeff0_1 = coefficients0[dof][1];
       new_coeff0_2 = coefficients0[dof][2];
+      new_coeff0_3 = coefficients0[dof][3];
+      new_coeff0_4 = coefficients0[dof][4];
+      new_coeff0_5 = coefficients0[dof][5];
     
       // Loop derivative order
       for (unsigned int j = 0; j < n; j++)
@@ -1704,23 +1940,32 @@ void UFC_SolitaryWave2DBilinearForm_fini
         coeff0_0 = new_coeff0_0;
         coeff0_1 = new_coeff0_1;
         coeff0_2 = new_coeff0_2;
-    
-        if(combinations[deriv_num][j] == 0)
-        {
-          new_coeff0_0 = coeff0_0*dmats0[0][0] + coeff0_1*dmats0[1][0] + coeff0_2*dmats0[2][0];
-          new_coeff0_1 = coeff0_0*dmats0[0][1] + coeff0_1*dmats0[1][1] + coeff0_2*dmats0[2][1];
-          new_coeff0_2 = coeff0_0*dmats0[0][2] + coeff0_1*dmats0[1][2] + coeff0_2*dmats0[2][2];
-        }
-        if(combinations[deriv_num][j] == 1)
-        {
-          new_coeff0_0 = coeff0_0*dmats1[0][0] + coeff0_1*dmats1[1][0] + coeff0_2*dmats1[2][0];
-          new_coeff0_1 = coeff0_0*dmats1[0][1] + coeff0_1*dmats1[1][1] + coeff0_2*dmats1[2][1];
-          new_coeff0_2 = coeff0_0*dmats1[0][2] + coeff0_1*dmats1[1][2] + coeff0_2*dmats1[2][2];
-        }
-    
-      }
-      // Compute derivatives on reference element as dot product of coefficients and basisvalues
-      derivatives[deriv_num] = new_coeff0_0*basisvalue0 + new_coeff0_1*basisvalue1 + new_coeff0_2*basisvalue2;
+        coeff0_3 = new_coeff0_3;
+        coeff0_4 = new_coeff0_4;
+        coeff0_5 = new_coeff0_5;
+    
+        if(combinations[deriv_num][j] == 0)
+        {
+          new_coeff0_0 = coeff0_0*dmats0[0][0] + coeff0_1*dmats0[1][0] + coeff0_2*dmats0[2][0] + coeff0_3*dmats0[3][0] + coeff0_4*dmats0[4][0] + coeff0_5*dmats0[5][0];
+          new_coeff0_1 = coeff0_0*dmats0[0][1] + coeff0_1*dmats0[1][1] + coeff0_2*dmats0[2][1] + coeff0_3*dmats0[3][1] + coeff0_4*dmats0[4][1] + coeff0_5*dmats0[5][1];
+          new_coeff0_2 = coeff0_0*dmats0[0][2] + coeff0_1*dmats0[1][2] + coeff0_2*dmats0[2][2] + coeff0_3*dmats0[3][2] + coeff0_4*dmats0[4][2] + coeff0_5*dmats0[5][2];
+          new_coeff0_3 = coeff0_0*dmats0[0][3] + coeff0_1*dmats0[1][3] + coeff0_2*dmats0[2][3] + coeff0_3*dmats0[3][3] + coeff0_4*dmats0[4][3] + coeff0_5*dmats0[5][3];
+          new_coeff0_4 = coeff0_0*dmats0[0][4] + coeff0_1*dmats0[1][4] + coeff0_2*dmats0[2][4] + coeff0_3*dmats0[3][4] + coeff0_4*dmats0[4][4] + coeff0_5*dmats0[5][4];
+          new_coeff0_5 = coeff0_0*dmats0[0][5] + coeff0_1*dmats0[1][5] + coeff0_2*dmats0[2][5] + coeff0_3*dmats0[3][5] + coeff0_4*dmats0[4][5] + coeff0_5*dmats0[5][5];
+        }
+        if(combinations[deriv_num][j] == 1)
+        {
+          new_coeff0_0 = coeff0_0*dmats1[0][0] + coeff0_1*dmats1[1][0] + coeff0_2*dmats1[2][0] + coeff0_3*dmats1[3][0] + coeff0_4*dmats1[4][0] + coeff0_5*dmats1[5][0];
+          new_coeff0_1 = coeff0_0*dmats1[0][1] + coeff0_1*dmats1[1][1] + coeff0_2*dmats1[2][1] + coeff0_3*dmats1[3][1] + coeff0_4*dmats1[4][1] + coeff0_5*dmats1[5][1];
+          new_coeff0_2 = coeff0_0*dmats1[0][2] + coeff0_1*dmats1[1][2] + coeff0_2*dmats1[2][2] + coeff0_3*dmats1[3][2] + coeff0_4*dmats1[4][2] + coeff0_5*dmats1[5][2];
+          new_coeff0_3 = coeff0_0*dmats1[0][3] + coeff0_1*dmats1[1][3] + coeff0_2*dmats1[2][3] + coeff0_3*dmats1[3][3] + coeff0_4*dmats1[4][3] + coeff0_5*dmats1[5][3];
+          new_coeff0_4 = coeff0_0*dmats1[0][4] + coeff0_1*dmats1[1][4] + coeff0_2*dmats1[2][4] + coeff0_3*dmats1[3][4] + coeff0_4*dmats1[4][4] + coeff0_5*dmats1[5][4];
+          new_coeff0_5 = coeff0_0*dmats1[0][5] + coeff0_1*dmats1[1][5] + coeff0_2*dmats1[2][5] + coeff0_3*dmats1[3][5] + coeff0_4*dmats1[4][5] + coeff0_5*dmats1[5][5];
+        }
+    
+      }
+      // Compute derivatives on reference element as dot product of coefficients and basisvalues
+      derivatives[deriv_num] = new_coeff0_0*basisvalue0 + new_coeff0_1*basisvalue1 + new_coeff0_2*basisvalue2 + new_coeff0_3*basisvalue3 + new_coeff0_4*basisvalue4 + new_coeff0_5*basisvalue5;
     }
     
     // Transform derivatives back to physical element
@@ -1760,9 +2005,9 @@ double UFC_SolitaryWave2DBilinearForm_fi
                                    const ufc::cell& c) const
 {
     // The reference points, direction and weights:
-    const static double X[3][1][2] = {{{0, 0}}, {{1, 0}}, {{0, 1}}};
-    const static double W[3][1] = {{1}, {1}, {1}};
-    const static double D[3][1][1] = {{{1}}, {{1}}, {{1}}};
+    const static double X[6][1][2] = {{{0, 0}}, {{1, 0}}, {{0, 1}}, {{0.5, 0.5}}, {{0, 0.5}}, {{0.5, 0}}};
+    const static double W[6][1] = {{1}, {1}, {1}, {1}, {1}, {1}};
+    const static double D[6][1][1] = {{{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}};
     
     const double * const * x = c.coordinates;
     double result = 0.0;
@@ -1842,7 +2087,7 @@ UFC_SolitaryWave2DBilinearForm_finite_el
 /// Return a string identifying the finite element
 const char* UFC_SolitaryWave2DBilinearForm_finite_element_1_1::signature() const
 {
-    return "FiniteElement('Lagrange', 'triangle', 1)";
+    return "FiniteElement('Lagrange', 'triangle', 2)";
 }
 
 /// Return the cell shape
@@ -1854,7 +2099,7 @@ ufc::shape UFC_SolitaryWave2DBilinearFor
 /// Return the dimension of the finite element function space
 unsigned int UFC_SolitaryWave2DBilinearForm_finite_element_1_1::space_dimension() const
 {
-    return 3;
+    return 6;
 }
 
 /// Return the rank of the value space
@@ -1913,34 +2158,48 @@ void UFC_SolitaryWave2DBilinearForm_fini
     // Generate scalings
     const double scalings_y_0 = 1;
     const double scalings_y_1 = scalings_y_0*(0.5 - 0.5*y);
-    
-    // Compute psitilde_a
-    const double psitilde_a_0 = 1;
-    const double psitilde_a_1 = x;
-    
-    // Compute psitilde_bs
-    const double psitilde_bs_0_0 = 1;
-    const double psitilde_bs_0_1 = 1.5*y + 0.5;
-    const double psitilde_bs_1_0 = 1;
-    
-    // Compute basisvalues
-    const double basisvalue0 = 0.707106781186548*psitilde_a_0*scalings_y_0*psitilde_bs_0_0;
-    const double basisvalue1 = 1.73205080756888*psitilde_a_1*scalings_y_1*psitilde_bs_1_0;
-    const double basisvalue2 = psitilde_a_0*scalings_y_0*psitilde_bs_0_1;
-    
-    // Table(s) of coefficients
-    const static double coefficients0[3][3] = \
-    {{0.471404520791032, -0.288675134594813, -0.166666666666667},
-    {0.471404520791032, 0.288675134594813, -0.166666666666667},
-    {0.471404520791032, 0, 0.333333333333333}};
+    const double scalings_y_2 = scalings_y_1*(0.5 - 0.5*y);
+    
+    // Compute psitilde_a
+    const double psitilde_a_0 = 1;
+    const double psitilde_a_1 = x;
+    const double psitilde_a_2 = 1.5*x*psitilde_a_1 - 0.5*psitilde_a_0;
+    
+    // Compute psitilde_bs
+    const double psitilde_bs_0_0 = 1;
+    const double psitilde_bs_0_1 = 1.5*y + 0.5;
+    const double psitilde_bs_0_2 = 0.111111111111111*psitilde_bs_0_1 + 1.66666666666667*y*psitilde_bs_0_1 - 0.555555555555556*psitilde_bs_0_0;
+    const double psitilde_bs_1_0 = 1;
+    const double psitilde_bs_1_1 = 2.5*y + 1.5;
+    const double psitilde_bs_2_0 = 1;
+    
+    // Compute basisvalues
+    const double basisvalue0 = 0.707106781186548*psitilde_a_0*scalings_y_0*psitilde_bs_0_0;
+    const double basisvalue1 = 1.73205080756888*psitilde_a_1*scalings_y_1*psitilde_bs_1_0;
+    const double basisvalue2 = psitilde_a_0*scalings_y_0*psitilde_bs_0_1;
+    const double basisvalue3 = 2.73861278752583*psitilde_a_2*scalings_y_2*psitilde_bs_2_0;
+    const double basisvalue4 = 2.12132034355964*psitilde_a_1*scalings_y_1*psitilde_bs_1_1;
+    const double basisvalue5 = 1.22474487139159*psitilde_a_0*scalings_y_0*psitilde_bs_0_2;
+    
+    // Table(s) of coefficients
+    const static double coefficients0[6][6] = \
+    {{0, -0.173205080756888, -0.1, 0.121716123890037, 0.0942809041582064, 0.0544331053951817},
+    {0, 0.173205080756888, -0.1, 0.121716123890037, -0.0942809041582063, 0.0544331053951818},
+    {0, 0, 0.2, 0, 0, 0.163299316185545},
+    {0.471404520791032, 0.23094010767585, 0.133333333333333, 0, 0.188561808316413, -0.163299316185545},
+    {0.471404520791032, -0.23094010767585, 0.133333333333333, 0, -0.188561808316413, -0.163299316185545},
+    {0.471404520791032, 0, -0.266666666666667, -0.243432247780074, 0, 0.0544331053951817}};
     
     // Extract relevant coefficients
     const double coeff0_0 = coefficients0[dof][0];
     const double coeff0_1 = coefficients0[dof][1];
     const double coeff0_2 = coefficients0[dof][2];
-    
-    // Compute value(s)
-    *values = coeff0_0*basisvalue0 + coeff0_1*basisvalue1 + coeff0_2*basisvalue2;
+    const double coeff0_3 = coefficients0[dof][3];
+    const double coeff0_4 = coefficients0[dof][4];
+    const double coeff0_5 = coefficients0[dof][5];
+    
+    // Compute value(s)
+    *values = coeff0_0*basisvalue0 + coeff0_1*basisvalue1 + coeff0_2*basisvalue2 + coeff0_3*basisvalue3 + coeff0_4*basisvalue4 + coeff0_5*basisvalue5;
 }
 
 /// Evaluate all basis functions at given point in cell
@@ -2056,38 +2315,55 @@ void UFC_SolitaryWave2DBilinearForm_fini
     // Generate scalings
     const double scalings_y_0 = 1;
     const double scalings_y_1 = scalings_y_0*(0.5 - 0.5*y);
-    
-    // Compute psitilde_a
-    const double psitilde_a_0 = 1;
-    const double psitilde_a_1 = x;
-    
-    // Compute psitilde_bs
-    const double psitilde_bs_0_0 = 1;
-    const double psitilde_bs_0_1 = 1.5*y + 0.5;
-    const double psitilde_bs_1_0 = 1;
-    
-    // Compute basisvalues
-    const double basisvalue0 = 0.707106781186548*psitilde_a_0*scalings_y_0*psitilde_bs_0_0;
-    const double basisvalue1 = 1.73205080756888*psitilde_a_1*scalings_y_1*psitilde_bs_1_0;
-    const double basisvalue2 = psitilde_a_0*scalings_y_0*psitilde_bs_0_1;
-    
-    // Table(s) of coefficients
-    const static double coefficients0[3][3] = \
-    {{0.471404520791032, -0.288675134594813, -0.166666666666667},
-    {0.471404520791032, 0.288675134594813, -0.166666666666667},
-    {0.471404520791032, 0, 0.333333333333333}};
-    
-    // Interesting (new) part
-    // Tables of derivatives of the polynomial base (transpose)
-    const static double dmats0[3][3] = \
-    {{0, 0, 0},
-    {4.89897948556636, 0, 0},
-    {0, 0, 0}};
-    
-    const static double dmats1[3][3] = \
-    {{0, 0, 0},
-    {2.44948974278318, 0, 0},
-    {4.24264068711928, 0, 0}};
+    const double scalings_y_2 = scalings_y_1*(0.5 - 0.5*y);
+    
+    // Compute psitilde_a
+    const double psitilde_a_0 = 1;
+    const double psitilde_a_1 = x;
+    const double psitilde_a_2 = 1.5*x*psitilde_a_1 - 0.5*psitilde_a_0;
+    
+    // Compute psitilde_bs
+    const double psitilde_bs_0_0 = 1;
+    const double psitilde_bs_0_1 = 1.5*y + 0.5;
+    const double psitilde_bs_0_2 = 0.111111111111111*psitilde_bs_0_1 + 1.66666666666667*y*psitilde_bs_0_1 - 0.555555555555556*psitilde_bs_0_0;
+    const double psitilde_bs_1_0 = 1;
+    const double psitilde_bs_1_1 = 2.5*y + 1.5;
+    const double psitilde_bs_2_0 = 1;
+    
+    // Compute basisvalues
+    const double basisvalue0 = 0.707106781186548*psitilde_a_0*scalings_y_0*psitilde_bs_0_0;
+    const double basisvalue1 = 1.73205080756888*psitilde_a_1*scalings_y_1*psitilde_bs_1_0;
+    const double basisvalue2 = psitilde_a_0*scalings_y_0*psitilde_bs_0_1;
+    const double basisvalue3 = 2.73861278752583*psitilde_a_2*scalings_y_2*psitilde_bs_2_0;
+    const double basisvalue4 = 2.12132034355964*psitilde_a_1*scalings_y_1*psitilde_bs_1_1;
+    const double basisvalue5 = 1.22474487139159*psitilde_a_0*scalings_y_0*psitilde_bs_0_2;
+    
+    // Table(s) of coefficients
+    const static double coefficients0[6][6] = \
+    {{0, -0.173205080756888, -0.1, 0.121716123890037, 0.0942809041582064, 0.0544331053951817},
+    {0, 0.173205080756888, -0.1, 0.121716123890037, -0.0942809041582063, 0.0544331053951818},
+    {0, 0, 0.2, 0, 0, 0.163299316185545},
+    {0.471404520791032, 0.23094010767585, 0.133333333333333, 0, 0.188561808316413, -0.163299316185545},
+    {0.471404520791032, -0.23094010767585, 0.133333333333333, 0, -0.188561808316413, -0.163299316185545},
+    {0.471404520791032, 0, -0.266666666666667, -0.243432247780074, 0, 0.0544331053951817}};
+    
+    // Interesting (new) part
+    // Tables of derivatives of the polynomial base (transpose)
+    const static double dmats0[6][6] = \
+    {{0, 0, 0, 0, 0, 0},
+    {4.89897948556636, 0, 0, 0, 0, 0},
+    {0, 0, 0, 0, 0, 0},
+    {0, 9.48683298050514, 0, 0, 0, 0},
+    {4, 0, 7.07106781186548, 0, 0, 0},
+    {0, 0, 0, 0, 0, 0}};
+    
+    const static double dmats1[6][6] = \
+    {{0, 0, 0, 0, 0, 0},
+    {2.44948974278318, 0, 0, 0, 0, 0},
+    {4.24264068711928, 0, 0, 0, 0, 0},
+    {2.58198889747161, 4.74341649025257, -0.912870929175277, 0, 0, 0},
+    {2, 6.12372435695795, 3.53553390593274, 0, 0, 0},
+    {-2.3094010767585, 0, 8.16496580927726, 0, 0, 0}};
     
     // Compute reference derivatives
     // Declare pointer to array of derivatives on FIAT element
@@ -2097,11 +2373,17 @@ void UFC_SolitaryWave2DBilinearForm_fini
     double coeff0_0 = 0;
     double coeff0_1 = 0;
     double coeff0_2 = 0;
+    double coeff0_3 = 0;
+    double coeff0_4 = 0;
+    double coeff0_5 = 0;
     
     // Declare new coefficients
     double new_coeff0_0 = 0;
     double new_coeff0_1 = 0;
     double new_coeff0_2 = 0;
+    double new_coeff0_3 = 0;
+    double new_coeff0_4 = 0;
+    double new_coeff0_5 = 0;
     
     // Loop possible derivatives
     for (unsigned int deriv_num = 0; deriv_num < num_derivatives; deriv_num++)
@@ -2110,6 +2392,9 @@ void UFC_SolitaryWave2DBilinearForm_fini
       new_coeff0_0 = coefficients0[dof][0];
       new_coeff0_1 = coefficients0[dof][1];
       new_coeff0_2 = coefficients0[dof][2];
+      new_coeff0_3 = coefficients0[dof][3];
+      new_coeff0_4 = coefficients0[dof][4];
+      new_coeff0_5 = coefficients0[dof][5];
     
       // Loop derivative order
       for (unsigned int j = 0; j < n; j++)
@@ -2118,23 +2403,32 @@ void UFC_SolitaryWave2DBilinearForm_fini
         coeff0_0 = new_coeff0_0;
         coeff0_1 = new_coeff0_1;
         coeff0_2 = new_coeff0_2;
-    
-        if(combinations[deriv_num][j] == 0)
-        {
-          new_coeff0_0 = coeff0_0*dmats0[0][0] + coeff0_1*dmats0[1][0] + coeff0_2*dmats0[2][0];
-          new_coeff0_1 = coeff0_0*dmats0[0][1] + coeff0_1*dmats0[1][1] + coeff0_2*dmats0[2][1];
-          new_coeff0_2 = coeff0_0*dmats0[0][2] + coeff0_1*dmats0[1][2] + coeff0_2*dmats0[2][2];
-        }
-        if(combinations[deriv_num][j] == 1)
-        {
-          new_coeff0_0 = coeff0_0*dmats1[0][0] + coeff0_1*dmats1[1][0] + coeff0_2*dmats1[2][0];
-          new_coeff0_1 = coeff0_0*dmats1[0][1] + coeff0_1*dmats1[1][1] + coeff0_2*dmats1[2][1];
-          new_coeff0_2 = coeff0_0*dmats1[0][2] + coeff0_1*dmats1[1][2] + coeff0_2*dmats1[2][2];
-        }
-    
-      }
-      // Compute derivatives on reference element as dot product of coefficients and basisvalues
-      derivatives[deriv_num] = new_coeff0_0*basisvalue0 + new_coeff0_1*basisvalue1 + new_coeff0_2*basisvalue2;
+        coeff0_3 = new_coeff0_3;
+        coeff0_4 = new_coeff0_4;
+        coeff0_5 = new_coeff0_5;
+    
+        if(combinations[deriv_num][j] == 0)
+        {
+          new_coeff0_0 = coeff0_0*dmats0[0][0] + coeff0_1*dmats0[1][0] + coeff0_2*dmats0[2][0] + coeff0_3*dmats0[3][0] + coeff0_4*dmats0[4][0] + coeff0_5*dmats0[5][0];
+          new_coeff0_1 = coeff0_0*dmats0[0][1] + coeff0_1*dmats0[1][1] + coeff0_2*dmats0[2][1] + coeff0_3*dmats0[3][1] + coeff0_4*dmats0[4][1] + coeff0_5*dmats0[5][1];
+          new_coeff0_2 = coeff0_0*dmats0[0][2] + coeff0_1*dmats0[1][2] + coeff0_2*dmats0[2][2] + coeff0_3*dmats0[3][2] + coeff0_4*dmats0[4][2] + coeff0_5*dmats0[5][2];
+          new_coeff0_3 = coeff0_0*dmats0[0][3] + coeff0_1*dmats0[1][3] + coeff0_2*dmats0[2][3] + coeff0_3*dmats0[3][3] + coeff0_4*dmats0[4][3] + coeff0_5*dmats0[5][3];
+          new_coeff0_4 = coeff0_0*dmats0[0][4] + coeff0_1*dmats0[1][4] + coeff0_2*dmats0[2][4] + coeff0_3*dmats0[3][4] + coeff0_4*dmats0[4][4] + coeff0_5*dmats0[5][4];
+          new_coeff0_5 = coeff0_0*dmats0[0][5] + coeff0_1*dmats0[1][5] + coeff0_2*dmats0[2][5] + coeff0_3*dmats0[3][5] + coeff0_4*dmats0[4][5] + coeff0_5*dmats0[5][5];
+        }
+        if(combinations[deriv_num][j] == 1)
+        {
+          new_coeff0_0 = coeff0_0*dmats1[0][0] + coeff0_1*dmats1[1][0] + coeff0_2*dmats1[2][0] + coeff0_3*dmats1[3][0] + coeff0_4*dmats1[4][0] + coeff0_5*dmats1[5][0];
+          new_coeff0_1 = coeff0_0*dmats1[0][1] + coeff0_1*dmats1[1][1] + coeff0_2*dmats1[2][1] + coeff0_3*dmats1[3][1] + coeff0_4*dmats1[4][1] + coeff0_5*dmats1[5][1];
+          new_coeff0_2 = coeff0_0*dmats1[0][2] + coeff0_1*dmats1[1][2] + coeff0_2*dmats1[2][2] + coeff0_3*dmats1[3][2] + coeff0_4*dmats1[4][2] + coeff0_5*dmats1[5][2];
+          new_coeff0_3 = coeff0_0*dmats1[0][3] + coeff0_1*dmats1[1][3] + coeff0_2*dmats1[2][3] + coeff0_3*dmats1[3][3] + coeff0_4*dmats1[4][3] + coeff0_5*dmats1[5][3];
+          new_coeff0_4 = coeff0_0*dmats1[0][4] + coeff0_1*dmats1[1][4] + coeff0_2*dmats1[2][4] + coeff0_3*dmats1[3][4] + coeff0_4*dmats1[4][4] + coeff0_5*dmats1[5][4];
+          new_coeff0_5 = coeff0_0*dmats1[0][5] + coeff0_1*dmats1[1][5] + coeff0_2*dmats1[2][5] + coeff0_3*dmats1[3][5] + coeff0_4*dmats1[4][5] + coeff0_5*dmats1[5][5];
+        }
+    
+      }
+      // Compute derivatives on reference element as dot product of coefficients and basisvalues
+      derivatives[deriv_num] = new_coeff0_0*basisvalue0 + new_coeff0_1*basisvalue1 + new_coeff0_2*basisvalue2 + new_coeff0_3*basisvalue3 + new_coeff0_4*basisvalue4 + new_coeff0_5*basisvalue5;
     }
     
     // Transform derivatives back to physical element
@@ -2174,9 +2468,9 @@ double UFC_SolitaryWave2DBilinearForm_fi
                                    const ufc::cell& c) const
 {
     // The reference points, direction and weights:
-    const static double X[3][1][2] = {{{0, 0}}, {{1, 0}}, {{0, 1}}};
-    const static double W[3][1] = {{1}, {1}, {1}};
-    const static double D[3][1][1] = {{{1}}, {{1}}, {{1}}};
+    const static double X[6][1][2] = {{{0, 0}}, {{1, 0}}, {{0, 1}}, {{0.5, 0.5}}, {{0, 0.5}}, {{0.5, 0}}};
+    const static double W[6][1] = {{1}, {1}, {1}, {1}, {1}, {1}};
+    const static double D[6][1][1] = {{{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}};
     
     const double * const * x = c.coordinates;
     double result = 0.0;
@@ -2256,7 +2550,7 @@ UFC_SolitaryWave2DBilinearForm_finite_el
 /// Return a string identifying the finite element
 const char* UFC_SolitaryWave2DBilinearForm_finite_element_1::signature() const
 {
-    return "MixedElement([FiniteElement('Lagrange', 'triangle', 1), FiniteElement('Lagrange', 'triangle', 1)])";
+    return "MixedElement([FiniteElement('Lagrange', 'triangle', 2), FiniteElement('Lagrange', 'triangle', 2)])";
 }
 
 /// Return the cell shape
@@ -2268,7 +2562,7 @@ ufc::shape UFC_SolitaryWave2DBilinearFor
 /// Return the dimension of the finite element function space
 unsigned int UFC_SolitaryWave2DBilinearForm_finite_element_1::space_dimension() const
 {
-    return 6;
+    return 12;
 }
 
 /// Return the rank of the value space
@@ -2322,7 +2616,7 @@ void UFC_SolitaryWave2DBilinearForm_fini
     values[0] = 0;
     values[1] = 0;
     
-    if (0 <= i && i <= 2)
+    if (0 <= i && i <= 5)
     {
       // Map degree of freedom to element degree of freedom
       const unsigned int dof = i;
@@ -2330,72 +2624,100 @@ void UFC_SolitaryWave2DBilinearForm_fini
       // Generate scalings
       const double scalings_y_0 = 1;
       const double scalings_y_1 = scalings_y_0*(0.5 - 0.5*y);
-    
-      // Compute psitilde_a
-      const double psitilde_a_0 = 1;
-      const double psitilde_a_1 = x;
-    
-      // Compute psitilde_bs
-      const double psitilde_bs_0_0 = 1;
-      const double psitilde_bs_0_1 = 1.5*y + 0.5;
-      const double psitilde_bs_1_0 = 1;
-    
-      // Compute basisvalues
-      const double basisvalue0 = 0.707106781186548*psitilde_a_0*scalings_y_0*psitilde_bs_0_0;
-      const double basisvalue1 = 1.73205080756888*psitilde_a_1*scalings_y_1*psitilde_bs_1_0;
-      const double basisvalue2 = psitilde_a_0*scalings_y_0*psitilde_bs_0_1;
-    
-      // Table(s) of coefficients
-      const static double coefficients0[3][3] =   \
-      {{0.471404520791032, -0.288675134594813, -0.166666666666667},
-      {0.471404520791032, 0.288675134594813, -0.166666666666667},
-      {0.471404520791032, 0, 0.333333333333333}};
+      const double scalings_y_2 = scalings_y_1*(0.5 - 0.5*y);
+    
+      // Compute psitilde_a
+      const double psitilde_a_0 = 1;
+      const double psitilde_a_1 = x;
+      const double psitilde_a_2 = 1.5*x*psitilde_a_1 - 0.5*psitilde_a_0;
+    
+      // Compute psitilde_bs
+      const double psitilde_bs_0_0 = 1;
+      const double psitilde_bs_0_1 = 1.5*y + 0.5;
+      const double psitilde_bs_0_2 = 0.111111111111111*psitilde_bs_0_1 + 1.66666666666667*y*psitilde_bs_0_1 - 0.555555555555556*psitilde_bs_0_0;
+      const double psitilde_bs_1_0 = 1;
+      const double psitilde_bs_1_1 = 2.5*y + 1.5;
+      const double psitilde_bs_2_0 = 1;
+    
+      // Compute basisvalues
+      const double basisvalue0 = 0.707106781186548*psitilde_a_0*scalings_y_0*psitilde_bs_0_0;
+      const double basisvalue1 = 1.73205080756888*psitilde_a_1*scalings_y_1*psitilde_bs_1_0;
+      const double basisvalue2 = psitilde_a_0*scalings_y_0*psitilde_bs_0_1;
+      const double basisvalue3 = 2.73861278752583*psitilde_a_2*scalings_y_2*psitilde_bs_2_0;
+      const double basisvalue4 = 2.12132034355964*psitilde_a_1*scalings_y_1*psitilde_bs_1_1;
+      const double basisvalue5 = 1.22474487139159*psitilde_a_0*scalings_y_0*psitilde_bs_0_2;
+    
+      // Table(s) of coefficients
+      const static double coefficients0[6][6] =   \
+      {{0, -0.173205080756888, -0.1, 0.121716123890037, 0.0942809041582064, 0.0544331053951817},
+      {0, 0.173205080756888, -0.1, 0.121716123890037, -0.0942809041582063, 0.0544331053951818},
+      {0, 0, 0.2, 0, 0, 0.163299316185545},
+      {0.471404520791032, 0.23094010767585, 0.133333333333333, 0, 0.188561808316413, -0.163299316185545},
+      {0.471404520791032, -0.23094010767585, 0.133333333333333, 0, -0.188561808316413, -0.163299316185545},
+      {0.471404520791032, 0, -0.266666666666667, -0.243432247780074, 0, 0.0544331053951817}};
     
       // Extract relevant coefficients
       const double coeff0_0 =   coefficients0[dof][0];
       const double coeff0_1 =   coefficients0[dof][1];
       const double coeff0_2 =   coefficients0[dof][2];
+      const double coeff0_3 =   coefficients0[dof][3];
+      const double coeff0_4 =   coefficients0[dof][4];
+      const double coeff0_5 =   coefficients0[dof][5];
     
       // Compute value(s)
-      values[0] = coeff0_0*basisvalue0 + coeff0_1*basisvalue1 + coeff0_2*basisvalue2;
-    }
-    
-    if (3 <= i && i <= 5)
-    {
-      // Map degree of freedom to element degree of freedom
-      const unsigned int dof = i - 3;
-    
-      // Generate scalings
-      const double scalings_y_0 = 1;
-      const double scalings_y_1 = scalings_y_0*(0.5 - 0.5*y);
-    
-      // Compute psitilde_a
-      const double psitilde_a_0 = 1;
-      const double psitilde_a_1 = x;
-    
-      // Compute psitilde_bs
-      const double psitilde_bs_0_0 = 1;
-      const double psitilde_bs_0_1 = 1.5*y + 0.5;
-      const double psitilde_bs_1_0 = 1;
-    
-      // Compute basisvalues
-      const double basisvalue0 = 0.707106781186548*psitilde_a_0*scalings_y_0*psitilde_bs_0_0;
-      const double basisvalue1 = 1.73205080756888*psitilde_a_1*scalings_y_1*psitilde_bs_1_0;
-      const double basisvalue2 = psitilde_a_0*scalings_y_0*psitilde_bs_0_1;
-    
-      // Table(s) of coefficients
-      const static double coefficients0[3][3] =   \
-      {{0.471404520791032, -0.288675134594813, -0.166666666666667},
-      {0.471404520791032, 0.288675134594813, -0.166666666666667},
-      {0.471404520791032, 0, 0.333333333333333}};
+      values[0] = coeff0_0*basisvalue0 + coeff0_1*basisvalue1 + coeff0_2*basisvalue2 + coeff0_3*basisvalue3 + coeff0_4*basisvalue4 + coeff0_5*basisvalue5;
+    }
+    
+    if (6 <= i && i <= 11)
+    {
+      // Map degree of freedom to element degree of freedom
+      const unsigned int dof = i - 6;
+    
+      // Generate scalings
+      const double scalings_y_0 = 1;
+      const double scalings_y_1 = scalings_y_0*(0.5 - 0.5*y);
+      const double scalings_y_2 = scalings_y_1*(0.5 - 0.5*y);
+    
+      // Compute psitilde_a
+      const double psitilde_a_0 = 1;
+      const double psitilde_a_1 = x;
+      const double psitilde_a_2 = 1.5*x*psitilde_a_1 - 0.5*psitilde_a_0;
+    
+      // Compute psitilde_bs
+      const double psitilde_bs_0_0 = 1;
+      const double psitilde_bs_0_1 = 1.5*y + 0.5;
+      const double psitilde_bs_0_2 = 0.111111111111111*psitilde_bs_0_1 + 1.66666666666667*y*psitilde_bs_0_1 - 0.555555555555556*psitilde_bs_0_0;
+      const double psitilde_bs_1_0 = 1;
+      const double psitilde_bs_1_1 = 2.5*y + 1.5;
+      const double psitilde_bs_2_0 = 1;
+    
+      // Compute basisvalues
+      const double basisvalue0 = 0.707106781186548*psitilde_a_0*scalings_y_0*psitilde_bs_0_0;
+      const double basisvalue1 = 1.73205080756888*psitilde_a_1*scalings_y_1*psitilde_bs_1_0;
+      const double basisvalue2 = psitilde_a_0*scalings_y_0*psitilde_bs_0_1;
+      const double basisvalue3 = 2.73861278752583*psitilde_a_2*scalings_y_2*psitilde_bs_2_0;
+      const double basisvalue4 = 2.12132034355964*psitilde_a_1*scalings_y_1*psitilde_bs_1_1;
+      const double basisvalue5 = 1.22474487139159*psitilde_a_0*scalings_y_0*psitilde_bs_0_2;
+    
+      // Table(s) of coefficients
+      const static double coefficients0[6][6] =   \
+      {{0, -0.173205080756888, -0.1, 0.121716123890037, 0.0942809041582064, 0.0544331053951817},
+      {0, 0.173205080756888, -0.1, 0.121716123890037, -0.0942809041582063, 0.0544331053951818},
+      {0, 0, 0.2, 0, 0, 0.163299316185545},
+      {0.471404520791032, 0.23094010767585, 0.133333333333333, 0, 0.188561808316413, -0.163299316185545},
+      {0.471404520791032, -0.23094010767585, 0.133333333333333, 0, -0.188561808316413, -0.163299316185545},
+      {0.471404520791032, 0, -0.266666666666667, -0.243432247780074, 0, 0.0544331053951817}};
     
       // Extract relevant coefficients
       const double coeff0_0 =   coefficients0[dof][0];
       const double coeff0_1 =   coefficients0[dof][1];
       const double coeff0_2 =   coefficients0[dof][2];
+      const double coeff0_3 =   coefficients0[dof][3];
+      const double coeff0_4 =   coefficients0[dof][4];
+      const double coeff0_5 =   coefficients0[dof][5];
     
       // Compute value(s)
-      values[1] = coeff0_0*basisvalue0 + coeff0_1*basisvalue1 + coeff0_2*basisvalue2;
+      values[1] = coeff0_0*basisvalue0 + coeff0_1*basisvalue1 + coeff0_2*basisvalue2 + coeff0_3*basisvalue3 + coeff0_4*basisvalue4 + coeff0_5*basisvalue5;
     }
     
 }
@@ -2507,7 +2829,7 @@ void UFC_SolitaryWave2DBilinearForm_fini
     for (unsigned int j = 0; j < 2*num_derivatives; j++)
       values[j] = 0;
     
-    if (0 <= i && i <= 2)
+    if (0 <= i && i <= 5)
     {
       // Map degree of freedom to element degree of freedom
       const unsigned int dof = i;
@@ -2515,38 +2837,55 @@ void UFC_SolitaryWave2DBilinearForm_fini
       // Generate scalings
       const double scalings_y_0 = 1;
       const double scalings_y_1 = scalings_y_0*(0.5 - 0.5*y);
-    
-      // Compute psitilde_a
-      const double psitilde_a_0 = 1;
-      const double psitilde_a_1 = x;
-    
-      // Compute psitilde_bs
-      const double psitilde_bs_0_0 = 1;
-      const double psitilde_bs_0_1 = 1.5*y + 0.5;
-      const double psitilde_bs_1_0 = 1;
-    
-      // Compute basisvalues
-      const double basisvalue0 = 0.707106781186548*psitilde_a_0*scalings_y_0*psitilde_bs_0_0;
-      const double basisvalue1 = 1.73205080756888*psitilde_a_1*scalings_y_1*psitilde_bs_1_0;
-      const double basisvalue2 = psitilde_a_0*scalings_y_0*psitilde_bs_0_1;
-    
-      // Table(s) of coefficients
-      const static double coefficients0[3][3] =   \
-      {{0.471404520791032, -0.288675134594813, -0.166666666666667},
-      {0.471404520791032, 0.288675134594813, -0.166666666666667},
-      {0.471404520791032, 0, 0.333333333333333}};
+      const double scalings_y_2 = scalings_y_1*(0.5 - 0.5*y);
+    
+      // Compute psitilde_a
+      const double psitilde_a_0 = 1;
+      const double psitilde_a_1 = x;
+      const double psitilde_a_2 = 1.5*x*psitilde_a_1 - 0.5*psitilde_a_0;
+    
+      // Compute psitilde_bs
+      const double psitilde_bs_0_0 = 1;
+      const double psitilde_bs_0_1 = 1.5*y + 0.5;
+      const double psitilde_bs_0_2 = 0.111111111111111*psitilde_bs_0_1 + 1.66666666666667*y*psitilde_bs_0_1 - 0.555555555555556*psitilde_bs_0_0;
+      const double psitilde_bs_1_0 = 1;
+      const double psitilde_bs_1_1 = 2.5*y + 1.5;
+      const double psitilde_bs_2_0 = 1;
+    
+      // Compute basisvalues
+      const double basisvalue0 = 0.707106781186548*psitilde_a_0*scalings_y_0*psitilde_bs_0_0;
+      const double basisvalue1 = 1.73205080756888*psitilde_a_1*scalings_y_1*psitilde_bs_1_0;
+      const double basisvalue2 = psitilde_a_0*scalings_y_0*psitilde_bs_0_1;
+      const double basisvalue3 = 2.73861278752583*psitilde_a_2*scalings_y_2*psitilde_bs_2_0;
+      const double basisvalue4 = 2.12132034355964*psitilde_a_1*scalings_y_1*psitilde_bs_1_1;
+      const double basisvalue5 = 1.22474487139159*psitilde_a_0*scalings_y_0*psitilde_bs_0_2;
+    
+      // Table(s) of coefficients
+      const static double coefficients0[6][6] =   \
+      {{0, -0.173205080756888, -0.1, 0.121716123890037, 0.0942809041582064, 0.0544331053951817},
+      {0, 0.173205080756888, -0.1, 0.121716123890037, -0.0942809041582063, 0.0544331053951818},
+      {0, 0, 0.2, 0, 0, 0.163299316185545},
+      {0.471404520791032, 0.23094010767585, 0.133333333333333, 0, 0.188561808316413, -0.163299316185545},
+      {0.471404520791032, -0.23094010767585, 0.133333333333333, 0, -0.188561808316413, -0.163299316185545},
+      {0.471404520791032, 0, -0.266666666666667, -0.243432247780074, 0, 0.0544331053951817}};
     
       // Interesting (new) part
       // Tables of derivatives of the polynomial base (transpose)
-      const static double dmats0[3][3] =   \
-      {{0, 0, 0},
-      {4.89897948556636, 0, 0},
-      {0, 0, 0}};
-    
-      const static double dmats1[3][3] =   \
-      {{0, 0, 0},
-      {2.44948974278318, 0, 0},
-      {4.24264068711928, 0, 0}};
+      const static double dmats0[6][6] =   \
+      {{0, 0, 0, 0, 0, 0},
+      {4.89897948556636, 0, 0, 0, 0, 0},
+      {0, 0, 0, 0, 0, 0},
+      {0, 9.48683298050514, 0, 0, 0, 0},
+      {4, 0, 7.07106781186548, 0, 0, 0},
+      {0, 0, 0, 0, 0, 0}};
+    
+      const static double dmats1[6][6] =   \
+      {{0, 0, 0, 0, 0, 0},
+      {2.44948974278318, 0, 0, 0, 0, 0},
+      {4.24264068711928, 0, 0, 0, 0, 0},
+      {2.58198889747161, 4.74341649025257, -0.912870929175277, 0, 0, 0},
+      {2, 6.12372435695795, 3.53553390593274, 0, 0, 0},
+      {-2.3094010767585, 0, 8.16496580927726, 0, 0, 0}};
     
       // Compute reference derivatives
       // Declare pointer to array of derivatives on FIAT element
@@ -2556,11 +2895,17 @@ void UFC_SolitaryWave2DBilinearForm_fini
       double coeff0_0 = 0;
       double coeff0_1 = 0;
       double coeff0_2 = 0;
+      double coeff0_3 = 0;
+      double coeff0_4 = 0;
+      double coeff0_5 = 0;
     
       // Declare new coefficients
       double new_coeff0_0 = 0;
       double new_coeff0_1 = 0;
       double new_coeff0_2 = 0;
+      double new_coeff0_3 = 0;
+      double new_coeff0_4 = 0;
+      double new_coeff0_5 = 0;
     
       // Loop possible derivatives
       for (unsigned int deriv_num = 0; deriv_num < num_derivatives; deriv_num++)
@@ -2569,6 +2914,9 @@ void UFC_SolitaryWave2DBilinearForm_fini
         new_coeff0_0 = coefficients0[dof][0];
         new_coeff0_1 = coefficients0[dof][1];
         new_coeff0_2 = coefficients0[dof][2];
+        new_coeff0_3 = coefficients0[dof][3];
+        new_coeff0_4 = coefficients0[dof][4];
+        new_coeff0_5 = coefficients0[dof][5];
     
         // Loop derivative order
         for (unsigned int j = 0; j < n; j++)
@@ -2577,23 +2925,32 @@ void UFC_SolitaryWave2DBilinearForm_fini
           coeff0_0 = new_coeff0_0;
           coeff0_1 = new_coeff0_1;
           coeff0_2 = new_coeff0_2;
+          coeff0_3 = new_coeff0_3;
+          coeff0_4 = new_coeff0_4;
+          coeff0_5 = new_coeff0_5;
     
           if(combinations[deriv_num][j] == 0)
           {
-            new_coeff0_0 = coeff0_0*dmats0[0][0] + coeff0_1*dmats0[1][0] + coeff0_2*dmats0[2][0];
-            new_coeff0_1 = coeff0_0*dmats0[0][1] + coeff0_1*dmats0[1][1] + coeff0_2*dmats0[2][1];
-            new_coeff0_2 = coeff0_0*dmats0[0][2] + coeff0_1*dmats0[1][2] + coeff0_2*dmats0[2][2];
+            new_coeff0_0 = coeff0_0*dmats0[0][0] + coeff0_1*dmats0[1][0] + coeff0_2*dmats0[2][0] + coeff0_3*dmats0[3][0] + coeff0_4*dmats0[4][0] + coeff0_5*dmats0[5][0];
+            new_coeff0_1 = coeff0_0*dmats0[0][1] + coeff0_1*dmats0[1][1] + coeff0_2*dmats0[2][1] + coeff0_3*dmats0[3][1] + coeff0_4*dmats0[4][1] + coeff0_5*dmats0[5][1];
+            new_coeff0_2 = coeff0_0*dmats0[0][2] + coeff0_1*dmats0[1][2] + coeff0_2*dmats0[2][2] + coeff0_3*dmats0[3][2] + coeff0_4*dmats0[4][2] + coeff0_5*dmats0[5][2];
+            new_coeff0_3 = coeff0_0*dmats0[0][3] + coeff0_1*dmats0[1][3] + coeff0_2*dmats0[2][3] + coeff0_3*dmats0[3][3] + coeff0_4*dmats0[4][3] + coeff0_5*dmats0[5][3];
+            new_coeff0_4 = coeff0_0*dmats0[0][4] + coeff0_1*dmats0[1][4] + coeff0_2*dmats0[2][4] + coeff0_3*dmats0[3][4] + coeff0_4*dmats0[4][4] + coeff0_5*dmats0[5][4];
+            new_coeff0_5 = coeff0_0*dmats0[0][5] + coeff0_1*dmats0[1][5] + coeff0_2*dmats0[2][5] + coeff0_3*dmats0[3][5] + coeff0_4*dmats0[4][5] + coeff0_5*dmats0[5][5];
           }
           if(combinations[deriv_num][j] == 1)
           {
-            new_coeff0_0 = coeff0_0*dmats1[0][0] + coeff0_1*dmats1[1][0] + coeff0_2*dmats1[2][0];
-            new_coeff0_1 = coeff0_0*dmats1[0][1] + coeff0_1*dmats1[1][1] + coeff0_2*dmats1[2][1];
-            new_coeff0_2 = coeff0_0*dmats1[0][2] + coeff0_1*dmats1[1][2] + coeff0_2*dmats1[2][2];
+            new_coeff0_0 = coeff0_0*dmats1[0][0] + coeff0_1*dmats1[1][0] + coeff0_2*dmats1[2][0] + coeff0_3*dmats1[3][0] + coeff0_4*dmats1[4][0] + coeff0_5*dmats1[5][0];
+            new_coeff0_1 = coeff0_0*dmats1[0][1] + coeff0_1*dmats1[1][1] + coeff0_2*dmats1[2][1] + coeff0_3*dmats1[3][1] + coeff0_4*dmats1[4][1] + coeff0_5*dmats1[5][1];
+            new_coeff0_2 = coeff0_0*dmats1[0][2] + coeff0_1*dmats1[1][2] + coeff0_2*dmats1[2][2] + coeff0_3*dmats1[3][2] + coeff0_4*dmats1[4][2] + coeff0_5*dmats1[5][2];
+            new_coeff0_3 = coeff0_0*dmats1[0][3] + coeff0_1*dmats1[1][3] + coeff0_2*dmats1[2][3] + coeff0_3*dmats1[3][3] + coeff0_4*dmats1[4][3] + coeff0_5*dmats1[5][3];
+            new_coeff0_4 = coeff0_0*dmats1[0][4] + coeff0_1*dmats1[1][4] + coeff0_2*dmats1[2][4] + coeff0_3*dmats1[3][4] + coeff0_4*dmats1[4][4] + coeff0_5*dmats1[5][4];
+            new_coeff0_5 = coeff0_0*dmats1[0][5] + coeff0_1*dmats1[1][5] + coeff0_2*dmats1[2][5] + coeff0_3*dmats1[3][5] + coeff0_4*dmats1[4][5] + coeff0_5*dmats1[5][5];
           }
     
         }
         // Compute derivatives on reference element as dot product of coefficients and basisvalues
-        derivatives[deriv_num] = new_coeff0_0*basisvalue0 + new_coeff0_1*basisvalue1 + new_coeff0_2*basisvalue2;
+        derivatives[deriv_num] = new_coeff0_0*basisvalue0 + new_coeff0_1*basisvalue1 + new_coeff0_2*basisvalue2 + new_coeff0_3*basisvalue3 + new_coeff0_4*basisvalue4 + new_coeff0_5*basisvalue5;
       }
     
       // Transform derivatives back to physical element
@@ -2618,46 +2975,63 @@ void UFC_SolitaryWave2DBilinearForm_fini
       delete [] transform;
     }
     
-    if (3 <= i && i <= 5)
-    {
-      // Map degree of freedom to element degree of freedom
-      const unsigned int dof = i - 3;
-    
-      // Generate scalings
-      const double scalings_y_0 = 1;
-      const double scalings_y_1 = scalings_y_0*(0.5 - 0.5*y);
-    
-      // Compute psitilde_a
-      const double psitilde_a_0 = 1;
-      const double psitilde_a_1 = x;
-    
-      // Compute psitilde_bs
-      const double psitilde_bs_0_0 = 1;
-      const double psitilde_bs_0_1 = 1.5*y + 0.5;
-      const double psitilde_bs_1_0 = 1;
-    
-      // Compute basisvalues
-      const double basisvalue0 = 0.707106781186548*psitilde_a_0*scalings_y_0*psitilde_bs_0_0;
-      const double basisvalue1 = 1.73205080756888*psitilde_a_1*scalings_y_1*psitilde_bs_1_0;
-      const double basisvalue2 = psitilde_a_0*scalings_y_0*psitilde_bs_0_1;
-    
-      // Table(s) of coefficients
-      const static double coefficients0[3][3] =   \
-      {{0.471404520791032, -0.288675134594813, -0.166666666666667},
-      {0.471404520791032, 0.288675134594813, -0.166666666666667},
-      {0.471404520791032, 0, 0.333333333333333}};
+    if (6 <= i && i <= 11)
+    {
+      // Map degree of freedom to element degree of freedom
+      const unsigned int dof = i - 6;
+    
+      // Generate scalings
+      const double scalings_y_0 = 1;
+      const double scalings_y_1 = scalings_y_0*(0.5 - 0.5*y);
+      const double scalings_y_2 = scalings_y_1*(0.5 - 0.5*y);
+    
+      // Compute psitilde_a
+      const double psitilde_a_0 = 1;
+      const double psitilde_a_1 = x;
+      const double psitilde_a_2 = 1.5*x*psitilde_a_1 - 0.5*psitilde_a_0;
+    
+      // Compute psitilde_bs
+      const double psitilde_bs_0_0 = 1;
+      const double psitilde_bs_0_1 = 1.5*y + 0.5;
+      const double psitilde_bs_0_2 = 0.111111111111111*psitilde_bs_0_1 + 1.66666666666667*y*psitilde_bs_0_1 - 0.555555555555556*psitilde_bs_0_0;
+      const double psitilde_bs_1_0 = 1;
+      const double psitilde_bs_1_1 = 2.5*y + 1.5;
+      const double psitilde_bs_2_0 = 1;
+    
+      // Compute basisvalues
+      const double basisvalue0 = 0.707106781186548*psitilde_a_0*scalings_y_0*psitilde_bs_0_0;
+      const double basisvalue1 = 1.73205080756888*psitilde_a_1*scalings_y_1*psitilde_bs_1_0;
+      const double basisvalue2 = psitilde_a_0*scalings_y_0*psitilde_bs_0_1;
+      const double basisvalue3 = 2.73861278752583*psitilde_a_2*scalings_y_2*psitilde_bs_2_0;
+      const double basisvalue4 = 2.12132034355964*psitilde_a_1*scalings_y_1*psitilde_bs_1_1;
+      const double basisvalue5 = 1.22474487139159*psitilde_a_0*scalings_y_0*psitilde_bs_0_2;
+    
+      // Table(s) of coefficients
+      const static double coefficients0[6][6] =   \
+      {{0, -0.173205080756888, -0.1, 0.121716123890037, 0.0942809041582064, 0.0544331053951817},
+      {0, 0.173205080756888, -0.1, 0.121716123890037, -0.0942809041582063, 0.0544331053951818},
+      {0, 0, 0.2, 0, 0, 0.163299316185545},
+      {0.471404520791032, 0.23094010767585, 0.133333333333333, 0, 0.188561808316413, -0.163299316185545},
+      {0.471404520791032, -0.23094010767585, 0.133333333333333, 0, -0.188561808316413, -0.163299316185545},
+      {0.471404520791032, 0, -0.266666666666667, -0.243432247780074, 0, 0.0544331053951817}};
     
       // Interesting (new) part
       // Tables of derivatives of the polynomial base (transpose)
-      const static double dmats0[3][3] =   \
-      {{0, 0, 0},
-      {4.89897948556636, 0, 0},
-      {0, 0, 0}};
-    
-      const static double dmats1[3][3] =   \
-      {{0, 0, 0},
-      {2.44948974278318, 0, 0},
-      {4.24264068711928, 0, 0}};
+      const static double dmats0[6][6] =   \
+      {{0, 0, 0, 0, 0, 0},
+      {4.89897948556636, 0, 0, 0, 0, 0},
+      {0, 0, 0, 0, 0, 0},
+      {0, 9.48683298050514, 0, 0, 0, 0},
+      {4, 0, 7.07106781186548, 0, 0, 0},
+      {0, 0, 0, 0, 0, 0}};
+    
+      const static double dmats1[6][6] =   \
+      {{0, 0, 0, 0, 0, 0},
+      {2.44948974278318, 0, 0, 0, 0, 0},
+      {4.24264068711928, 0, 0, 0, 0, 0},
+      {2.58198889747161, 4.74341649025257, -0.912870929175277, 0, 0, 0},
+      {2, 6.12372435695795, 3.53553390593274, 0, 0, 0},
+      {-2.3094010767585, 0, 8.16496580927726, 0, 0, 0}};
     
       // Compute reference derivatives
       // Declare pointer to array of derivatives on FIAT element
@@ -2667,11 +3041,17 @@ void UFC_SolitaryWave2DBilinearForm_fini
       double coeff0_0 = 0;
       double coeff0_1 = 0;
       double coeff0_2 = 0;
+      double coeff0_3 = 0;
+      double coeff0_4 = 0;
+      double coeff0_5 = 0;
     
       // Declare new coefficients
       double new_coeff0_0 = 0;
       double new_coeff0_1 = 0;
       double new_coeff0_2 = 0;
+      double new_coeff0_3 = 0;
+      double new_coeff0_4 = 0;
+      double new_coeff0_5 = 0;
     
       // Loop possible derivatives
       for (unsigned int deriv_num = 0; deriv_num < num_derivatives; deriv_num++)
@@ -2680,6 +3060,9 @@ void UFC_SolitaryWave2DBilinearForm_fini
         new_coeff0_0 = coefficients0[dof][0];
         new_coeff0_1 = coefficients0[dof][1];
         new_coeff0_2 = coefficients0[dof][2];
+        new_coeff0_3 = coefficients0[dof][3];
+        new_coeff0_4 = coefficients0[dof][4];
+        new_coeff0_5 = coefficients0[dof][5];
     
         // Loop derivative order
         for (unsigned int j = 0; j < n; j++)
@@ -2688,23 +3071,32 @@ void UFC_SolitaryWave2DBilinearForm_fini
           coeff0_0 = new_coeff0_0;
           coeff0_1 = new_coeff0_1;
           coeff0_2 = new_coeff0_2;
+          coeff0_3 = new_coeff0_3;
+          coeff0_4 = new_coeff0_4;
+          coeff0_5 = new_coeff0_5;
     
           if(combinations[deriv_num][j] == 0)
           {
-            new_coeff0_0 = coeff0_0*dmats0[0][0] + coeff0_1*dmats0[1][0] + coeff0_2*dmats0[2][0];
-            new_coeff0_1 = coeff0_0*dmats0[0][1] + coeff0_1*dmats0[1][1] + coeff0_2*dmats0[2][1];
-            new_coeff0_2 = coeff0_0*dmats0[0][2] + coeff0_1*dmats0[1][2] + coeff0_2*dmats0[2][2];
+            new_coeff0_0 = coeff0_0*dmats0[0][0] + coeff0_1*dmats0[1][0] + coeff0_2*dmats0[2][0] + coeff0_3*dmats0[3][0] + coeff0_4*dmats0[4][0] + coeff0_5*dmats0[5][0];
+            new_coeff0_1 = coeff0_0*dmats0[0][1] + coeff0_1*dmats0[1][1] + coeff0_2*dmats0[2][1] + coeff0_3*dmats0[3][1] + coeff0_4*dmats0[4][1] + coeff0_5*dmats0[5][1];
+            new_coeff0_2 = coeff0_0*dmats0[0][2] + coeff0_1*dmats0[1][2] + coeff0_2*dmats0[2][2] + coeff0_3*dmats0[3][2] + coeff0_4*dmats0[4][2] + coeff0_5*dmats0[5][2];
+            new_coeff0_3 = coeff0_0*dmats0[0][3] + coeff0_1*dmats0[1][3] + coeff0_2*dmats0[2][3] + coeff0_3*dmats0[3][3] + coeff0_4*dmats0[4][3] + coeff0_5*dmats0[5][3];
+            new_coeff0_4 = coeff0_0*dmats0[0][4] + coeff0_1*dmats0[1][4] + coeff0_2*dmats0[2][4] + coeff0_3*dmats0[3][4] + coeff0_4*dmats0[4][4] + coeff0_5*dmats0[5][4];
+            new_coeff0_5 = coeff0_0*dmats0[0][5] + coeff0_1*dmats0[1][5] + coeff0_2*dmats0[2][5] + coeff0_3*dmats0[3][5] + coeff0_4*dmats0[4][5] + coeff0_5*dmats0[5][5];
           }
           if(combinations[deriv_num][j] == 1)
           {
-            new_coeff0_0 = coeff0_0*dmats1[0][0] + coeff0_1*dmats1[1][0] + coeff0_2*dmats1[2][0];
-            new_coeff0_1 = coeff0_0*dmats1[0][1] + coeff0_1*dmats1[1][1] + coeff0_2*dmats1[2][1];
-            new_coeff0_2 = coeff0_0*dmats1[0][2] + coeff0_1*dmats1[1][2] + coeff0_2*dmats1[2][2];
+            new_coeff0_0 = coeff0_0*dmats1[0][0] + coeff0_1*dmats1[1][0] + coeff0_2*dmats1[2][0] + coeff0_3*dmats1[3][0] + coeff0_4*dmats1[4][0] + coeff0_5*dmats1[5][0];
+            new_coeff0_1 = coeff0_0*dmats1[0][1] + coeff0_1*dmats1[1][1] + coeff0_2*dmats1[2][1] + coeff0_3*dmats1[3][1] + coeff0_4*dmats1[4][1] + coeff0_5*dmats1[5][1];
+            new_coeff0_2 = coeff0_0*dmats1[0][2] + coeff0_1*dmats1[1][2] + coeff0_2*dmats1[2][2] + coeff0_3*dmats1[3][2] + coeff0_4*dmats1[4][2] + coeff0_5*dmats1[5][2];
+            new_coeff0_3 = coeff0_0*dmats1[0][3] + coeff0_1*dmats1[1][3] + coeff0_2*dmats1[2][3] + coeff0_3*dmats1[3][3] + coeff0_4*dmats1[4][3] + coeff0_5*dmats1[5][3];
+            new_coeff0_4 = coeff0_0*dmats1[0][4] + coeff0_1*dmats1[1][4] + coeff0_2*dmats1[2][4] + coeff0_3*dmats1[3][4] + coeff0_4*dmats1[4][4] + coeff0_5*dmats1[5][4];
+            new_coeff0_5 = coeff0_0*dmats1[0][5] + coeff0_1*dmats1[1][5] + coeff0_2*dmats1[2][5] + coeff0_3*dmats1[3][5] + coeff0_4*dmats1[4][5] + coeff0_5*dmats1[5][5];
           }
     
         }
         // Compute derivatives on reference element as dot product of coefficients and basisvalues
-        derivatives[deriv_num] = new_coeff0_0*basisvalue0 + new_coeff0_1*basisvalue1 + new_coeff0_2*basisvalue2;
+        derivatives[deriv_num] = new_coeff0_0*basisvalue0 + new_coeff0_1*basisvalue1 + new_coeff0_2*basisvalue2 + new_coeff0_3*basisvalue3 + new_coeff0_4*basisvalue4 + new_coeff0_5*basisvalue5;
       }
     
       // Transform derivatives back to physical element
@@ -2746,9 +3138,9 @@ double UFC_SolitaryWave2DBilinearForm_fi
                                    const ufc::cell& c) const
 {
     // The reference points, direction and weights:
-    const static double X[6][1][2] = {{{0, 0}}, {{1, 0}}, {{0, 1}}, {{0, 0}}, {{1, 0}}, {{0, 1}}};
-    const static double W[6][1] = {{1}, {1}, {1}, {1}, {1}, {1}};
-    const static double D[6][1][2] = {{{1, 0}}, {{1, 0}}, {{1, 0}}, {{0, 1}}, {{0, 1}}, {{0, 1}}};
+    const static double X[12][1][2] = {{{0, 0}}, {{1, 0}}, {{0, 1}}, {{0.5, 0.5}}, {{0, 0.5}}, {{0.5, 0}}, {{0, 0}}, {{1, 0}}, {{0, 1}}, {{0.5, 0.5}}, {{0, 0.5}}, {{0.5, 0}}};
+    const static double W[12][1] = {{1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}};
+    const static double D[12][1][2] = {{{1, 0}}, {{1, 0}}, {{1, 0}}, {{1, 0}}, {{1, 0}}, {{1, 0}}, {{0, 1}}, {{0, 1}}, {{0, 1}}, {{0, 1}}, {{0, 1}}, {{0, 1}}};
     
     const double * const * x = c.coordinates;
     double result = 0.0;
@@ -2799,9 +3191,9 @@ void UFC_SolitaryWave2DBilinearForm_fini
     vertex_values[2] = dof_values[1];
     vertex_values[4] = dof_values[2];
     // Evaluate at vertices and use affine mapping
-    vertex_values[1] = dof_values[3];
-    vertex_values[3] = dof_values[4];
-    vertex_values[5] = dof_values[5];
+    vertex_values[1] = dof_values[6];
+    vertex_values[3] = dof_values[7];
+    vertex_values[5] = dof_values[8];
 }
 
 /// Return the number of sub elements (for a mixed element)
@@ -2841,7 +3233,7 @@ UFC_SolitaryWave2DBilinearForm_finite_el
 /// Return a string identifying the finite element
 const char* UFC_SolitaryWave2DBilinearForm_finite_element_2_0::signature() const
 {
-    return "FiniteElement('Lagrange', 'triangle', 1)";
+    return "FiniteElement('Lagrange', 'triangle', 2)";
 }
 
 /// Return the cell shape
@@ -2853,7 +3245,7 @@ ufc::shape UFC_SolitaryWave2DBilinearFor
 /// Return the dimension of the finite element function space
 unsigned int UFC_SolitaryWave2DBilinearForm_finite_element_2_0::space_dimension() const
 {
-    return 3;
+    return 6;
 }
 
 /// Return the rank of the value space
@@ -2912,34 +3304,48 @@ void UFC_SolitaryWave2DBilinearForm_fini
     // Generate scalings
     const double scalings_y_0 = 1;
     const double scalings_y_1 = scalings_y_0*(0.5 - 0.5*y);
-    
-    // Compute psitilde_a
-    const double psitilde_a_0 = 1;
-    const double psitilde_a_1 = x;
-    
-    // Compute psitilde_bs
-    const double psitilde_bs_0_0 = 1;
-    const double psitilde_bs_0_1 = 1.5*y + 0.5;
-    const double psitilde_bs_1_0 = 1;
-    
-    // Compute basisvalues
-    const double basisvalue0 = 0.707106781186548*psitilde_a_0*scalings_y_0*psitilde_bs_0_0;
-    const double basisvalue1 = 1.73205080756888*psitilde_a_1*scalings_y_1*psitilde_bs_1_0;
-    const double basisvalue2 = psitilde_a_0*scalings_y_0*psitilde_bs_0_1;
-    
-    // Table(s) of coefficients
-    const static double coefficients0[3][3] = \
-    {{0.471404520791032, -0.288675134594813, -0.166666666666667},
-    {0.471404520791032, 0.288675134594813, -0.166666666666667},
-    {0.471404520791032, 0, 0.333333333333333}};
+    const double scalings_y_2 = scalings_y_1*(0.5 - 0.5*y);
+    
+    // Compute psitilde_a
+    const double psitilde_a_0 = 1;
+    const double psitilde_a_1 = x;
+    const double psitilde_a_2 = 1.5*x*psitilde_a_1 - 0.5*psitilde_a_0;
+    
+    // Compute psitilde_bs
+    const double psitilde_bs_0_0 = 1;
+    const double psitilde_bs_0_1 = 1.5*y + 0.5;
+    const double psitilde_bs_0_2 = 0.111111111111111*psitilde_bs_0_1 + 1.66666666666667*y*psitilde_bs_0_1 - 0.555555555555556*psitilde_bs_0_0;
+    const double psitilde_bs_1_0 = 1;
+    const double psitilde_bs_1_1 = 2.5*y + 1.5;
+    const double psitilde_bs_2_0 = 1;
+    
+    // Compute basisvalues
+    const double basisvalue0 = 0.707106781186548*psitilde_a_0*scalings_y_0*psitilde_bs_0_0;
+    const double basisvalue1 = 1.73205080756888*psitilde_a_1*scalings_y_1*psitilde_bs_1_0;
+    const double basisvalue2 = psitilde_a_0*scalings_y_0*psitilde_bs_0_1;
+    const double basisvalue3 = 2.73861278752583*psitilde_a_2*scalings_y_2*psitilde_bs_2_0;
+    const double basisvalue4 = 2.12132034355964*psitilde_a_1*scalings_y_1*psitilde_bs_1_1;
+    const double basisvalue5 = 1.22474487139159*psitilde_a_0*scalings_y_0*psitilde_bs_0_2;
+    
+    // Table(s) of coefficients
+    const static double coefficients0[6][6] = \
+    {{0, -0.173205080756888, -0.1, 0.121716123890037, 0.0942809041582064, 0.0544331053951817},
+    {0, 0.173205080756888, -0.1, 0.121716123890037, -0.0942809041582063, 0.0544331053951818},
+    {0, 0, 0.2, 0, 0, 0.163299316185545},
+    {0.471404520791032, 0.23094010767585, 0.133333333333333, 0, 0.188561808316413, -0.163299316185545},
+    {0.471404520791032, -0.23094010767585, 0.133333333333333, 0, -0.188561808316413, -0.163299316185545},
+    {0.471404520791032, 0, -0.266666666666667, -0.243432247780074, 0, 0.0544331053951817}};
     
     // Extract relevant coefficients
     const double coeff0_0 = coefficients0[dof][0];
     const double coeff0_1 = coefficients0[dof][1];
     const double coeff0_2 = coefficients0[dof][2];
-    
-    // Compute value(s)
-    *values = coeff0_0*basisvalue0 + coeff0_1*basisvalue1 + coeff0_2*basisvalue2;
+    const double coeff0_3 = coefficients0[dof][3];
+    const double coeff0_4 = coefficients0[dof][4];
+    const double coeff0_5 = coefficients0[dof][5];
+    
+    // Compute value(s)
+    *values = coeff0_0*basisvalue0 + coeff0_1*basisvalue1 + coeff0_2*basisvalue2 + coeff0_3*basisvalue3 + coeff0_4*basisvalue4 + coeff0_5*basisvalue5;
 }
 
 /// Evaluate all basis functions at given point in cell
@@ -3055,38 +3461,55 @@ void UFC_SolitaryWave2DBilinearForm_fini
     // Generate scalings
     const double scalings_y_0 = 1;
     const double scalings_y_1 = scalings_y_0*(0.5 - 0.5*y);
-    
-    // Compute psitilde_a
-    const double psitilde_a_0 = 1;
-    const double psitilde_a_1 = x;
-    
-    // Compute psitilde_bs
-    const double psitilde_bs_0_0 = 1;
-    const double psitilde_bs_0_1 = 1.5*y + 0.5;
-    const double psitilde_bs_1_0 = 1;
-    
-    // Compute basisvalues
-    const double basisvalue0 = 0.707106781186548*psitilde_a_0*scalings_y_0*psitilde_bs_0_0;
-    const double basisvalue1 = 1.73205080756888*psitilde_a_1*scalings_y_1*psitilde_bs_1_0;
-    const double basisvalue2 = psitilde_a_0*scalings_y_0*psitilde_bs_0_1;
-    
-    // Table(s) of coefficients
-    const static double coefficients0[3][3] = \
-    {{0.471404520791032, -0.288675134594813, -0.166666666666667},
-    {0.471404520791032, 0.288675134594813, -0.166666666666667},
-    {0.471404520791032, 0, 0.333333333333333}};
-    
-    // Interesting (new) part
-    // Tables of derivatives of the polynomial base (transpose)
-    const static double dmats0[3][3] = \
-    {{0, 0, 0},
-    {4.89897948556636, 0, 0},
-    {0, 0, 0}};
-    
-    const static double dmats1[3][3] = \
-    {{0, 0, 0},
-    {2.44948974278318, 0, 0},
-    {4.24264068711928, 0, 0}};
+    const double scalings_y_2 = scalings_y_1*(0.5 - 0.5*y);
+    
+    // Compute psitilde_a
+    const double psitilde_a_0 = 1;
+    const double psitilde_a_1 = x;
+    const double psitilde_a_2 = 1.5*x*psitilde_a_1 - 0.5*psitilde_a_0;
+    
+    // Compute psitilde_bs
+    const double psitilde_bs_0_0 = 1;
+    const double psitilde_bs_0_1 = 1.5*y + 0.5;
+    const double psitilde_bs_0_2 = 0.111111111111111*psitilde_bs_0_1 + 1.66666666666667*y*psitilde_bs_0_1 - 0.555555555555556*psitilde_bs_0_0;
+    const double psitilde_bs_1_0 = 1;
+    const double psitilde_bs_1_1 = 2.5*y + 1.5;
+    const double psitilde_bs_2_0 = 1;
+    
+    // Compute basisvalues
+    const double basisvalue0 = 0.707106781186548*psitilde_a_0*scalings_y_0*psitilde_bs_0_0;
+    const double basisvalue1 = 1.73205080756888*psitilde_a_1*scalings_y_1*psitilde_bs_1_0;
+    const double basisvalue2 = psitilde_a_0*scalings_y_0*psitilde_bs_0_1;
+    const double basisvalue3 = 2.73861278752583*psitilde_a_2*scalings_y_2*psitilde_bs_2_0;
+    const double basisvalue4 = 2.12132034355964*psitilde_a_1*scalings_y_1*psitilde_bs_1_1;
+    const double basisvalue5 = 1.22474487139159*psitilde_a_0*scalings_y_0*psitilde_bs_0_2;
+    
+    // Table(s) of coefficients
+    const static double coefficients0[6][6] = \
+    {{0, -0.173205080756888, -0.1, 0.121716123890037, 0.0942809041582064, 0.0544331053951817},
+    {0, 0.173205080756888, -0.1, 0.121716123890037, -0.0942809041582063, 0.0544331053951818},
+    {0, 0, 0.2, 0, 0, 0.163299316185545},
+    {0.471404520791032, 0.23094010767585, 0.133333333333333, 0, 0.188561808316413, -0.163299316185545},
+    {0.471404520791032, -0.23094010767585, 0.133333333333333, 0, -0.188561808316413, -0.163299316185545},
+    {0.471404520791032, 0, -0.266666666666667, -0.243432247780074, 0, 0.0544331053951817}};
+    
+    // Interesting (new) part
+    // Tables of derivatives of the polynomial base (transpose)
+    const static double dmats0[6][6] = \
+    {{0, 0, 0, 0, 0, 0},
+    {4.89897948556636, 0, 0, 0, 0, 0},
+    {0, 0, 0, 0, 0, 0},
+    {0, 9.48683298050514, 0, 0, 0, 0},
+    {4, 0, 7.07106781186548, 0, 0, 0},
+    {0, 0, 0, 0, 0, 0}};
+    
+    const static double dmats1[6][6] = \
+    {{0, 0, 0, 0, 0, 0},
+    {2.44948974278318, 0, 0, 0, 0, 0},
+    {4.24264068711928, 0, 0, 0, 0, 0},
+    {2.58198889747161, 4.74341649025257, -0.912870929175277, 0, 0, 0},
+    {2, 6.12372435695795, 3.53553390593274, 0, 0, 0},
+    {-2.3094010767585, 0, 8.16496580927726, 0, 0, 0}};
     
     // Compute reference derivatives
     // Declare pointer to array of derivatives on FIAT element
@@ -3096,11 +3519,17 @@ void UFC_SolitaryWave2DBilinearForm_fini
     double coeff0_0 = 0;
     double coeff0_1 = 0;
     double coeff0_2 = 0;
+    double coeff0_3 = 0;
+    double coeff0_4 = 0;
+    double coeff0_5 = 0;
     
     // Declare new coefficients
     double new_coeff0_0 = 0;
     double new_coeff0_1 = 0;
     double new_coeff0_2 = 0;
+    double new_coeff0_3 = 0;
+    double new_coeff0_4 = 0;
+    double new_coeff0_5 = 0;
     
     // Loop possible derivatives
     for (unsigned int deriv_num = 0; deriv_num < num_derivatives; deriv_num++)
@@ -3109,6 +3538,9 @@ void UFC_SolitaryWave2DBilinearForm_fini
       new_coeff0_0 = coefficients0[dof][0];
       new_coeff0_1 = coefficients0[dof][1];
       new_coeff0_2 = coefficients0[dof][2];
+      new_coeff0_3 = coefficients0[dof][3];
+      new_coeff0_4 = coefficients0[dof][4];
+      new_coeff0_5 = coefficients0[dof][5];
     
       // Loop derivative order
       for (unsigned int j = 0; j < n; j++)
@@ -3117,23 +3549,32 @@ void UFC_SolitaryWave2DBilinearForm_fini
         coeff0_0 = new_coeff0_0;
         coeff0_1 = new_coeff0_1;
         coeff0_2 = new_coeff0_2;
-    
-        if(combinations[deriv_num][j] == 0)
-        {
-          new_coeff0_0 = coeff0_0*dmats0[0][0] + coeff0_1*dmats0[1][0] + coeff0_2*dmats0[2][0];
-          new_coeff0_1 = coeff0_0*dmats0[0][1] + coeff0_1*dmats0[1][1] + coeff0_2*dmats0[2][1];
-          new_coeff0_2 = coeff0_0*dmats0[0][2] + coeff0_1*dmats0[1][2] + coeff0_2*dmats0[2][2];
-        }
-        if(combinations[deriv_num][j] == 1)
-        {
-          new_coeff0_0 = coeff0_0*dmats1[0][0] + coeff0_1*dmats1[1][0] + coeff0_2*dmats1[2][0];
-          new_coeff0_1 = coeff0_0*dmats1[0][1] + coeff0_1*dmats1[1][1] + coeff0_2*dmats1[2][1];
-          new_coeff0_2 = coeff0_0*dmats1[0][2] + coeff0_1*dmats1[1][2] + coeff0_2*dmats1[2][2];
-        }
-    
-      }
-      // Compute derivatives on reference element as dot product of coefficients and basisvalues
-      derivatives[deriv_num] = new_coeff0_0*basisvalue0 + new_coeff0_1*basisvalue1 + new_coeff0_2*basisvalue2;
+        coeff0_3 = new_coeff0_3;
+        coeff0_4 = new_coeff0_4;
+        coeff0_5 = new_coeff0_5;
+    
+        if(combinations[deriv_num][j] == 0)
+        {
+          new_coeff0_0 = coeff0_0*dmats0[0][0] + coeff0_1*dmats0[1][0] + coeff0_2*dmats0[2][0] + coeff0_3*dmats0[3][0] + coeff0_4*dmats0[4][0] + coeff0_5*dmats0[5][0];
+          new_coeff0_1 = coeff0_0*dmats0[0][1] + coeff0_1*dmats0[1][1] + coeff0_2*dmats0[2][1] + coeff0_3*dmats0[3][1] + coeff0_4*dmats0[4][1] + coeff0_5*dmats0[5][1];
+          new_coeff0_2 = coeff0_0*dmats0[0][2] + coeff0_1*dmats0[1][2] + coeff0_2*dmats0[2][2] + coeff0_3*dmats0[3][2] + coeff0_4*dmats0[4][2] + coeff0_5*dmats0[5][2];
+          new_coeff0_3 = coeff0_0*dmats0[0][3] + coeff0_1*dmats0[1][3] + coeff0_2*dmats0[2][3] + coeff0_3*dmats0[3][3] + coeff0_4*dmats0[4][3] + coeff0_5*dmats0[5][3];
+          new_coeff0_4 = coeff0_0*dmats0[0][4] + coeff0_1*dmats0[1][4] + coeff0_2*dmats0[2][4] + coeff0_3*dmats0[3][4] + coeff0_4*dmats0[4][4] + coeff0_5*dmats0[5][4];
+          new_coeff0_5 = coeff0_0*dmats0[0][5] + coeff0_1*dmats0[1][5] + coeff0_2*dmats0[2][5] + coeff0_3*dmats0[3][5] + coeff0_4*dmats0[4][5] + coeff0_5*dmats0[5][5];
+        }
+        if(combinations[deriv_num][j] == 1)
+        {
+          new_coeff0_0 = coeff0_0*dmats1[0][0] + coeff0_1*dmats1[1][0] + coeff0_2*dmats1[2][0] + coeff0_3*dmats1[3][0] + coeff0_4*dmats1[4][0] + coeff0_5*dmats1[5][0];
+          new_coeff0_1 = coeff0_0*dmats1[0][1] + coeff0_1*dmats1[1][1] + coeff0_2*dmats1[2][1] + coeff0_3*dmats1[3][1] + coeff0_4*dmats1[4][1] + coeff0_5*dmats1[5][1];
+          new_coeff0_2 = coeff0_0*dmats1[0][2] + coeff0_1*dmats1[1][2] + coeff0_2*dmats1[2][2] + coeff0_3*dmats1[3][2] + coeff0_4*dmats1[4][2] + coeff0_5*dmats1[5][2];
+          new_coeff0_3 = coeff0_0*dmats1[0][3] + coeff0_1*dmats1[1][3] + coeff0_2*dmats1[2][3] + coeff0_3*dmats1[3][3] + coeff0_4*dmats1[4][3] + coeff0_5*dmats1[5][3];
+          new_coeff0_4 = coeff0_0*dmats1[0][4] + coeff0_1*dmats1[1][4] + coeff0_2*dmats1[2][4] + coeff0_3*dmats1[3][4] + coeff0_4*dmats1[4][4] + coeff0_5*dmats1[5][4];
+          new_coeff0_5 = coeff0_0*dmats1[0][5] + coeff0_1*dmats1[1][5] + coeff0_2*dmats1[2][5] + coeff0_3*dmats1[3][5] + coeff0_4*dmats1[4][5] + coeff0_5*dmats1[5][5];
+        }
+    
+      }
+      // Compute derivatives on reference element as dot product of coefficients and basisvalues
+      derivatives[deriv_num] = new_coeff0_0*basisvalue0 + new_coeff0_1*basisvalue1 + new_coeff0_2*basisvalue2 + new_coeff0_3*basisvalue3 + new_coeff0_4*basisvalue4 + new_coeff0_5*basisvalue5;
     }
     
     // Transform derivatives back to physical element
@@ -3173,9 +3614,9 @@ double UFC_SolitaryWave2DBilinearForm_fi
                                    const ufc::cell& c) const
 {
     // The reference points, direction and weights:
-    const static double X[3][1][2] = {{{0, 0}}, {{1, 0}}, {{0, 1}}};
-    const static double W[3][1] = {{1}, {1}, {1}};
-    const static double D[3][1][1] = {{{1}}, {{1}}, {{1}}};
+    const static double X[6][1][2] = {{{0, 0}}, {{1, 0}}, {{0, 1}}, {{0.5, 0.5}}, {{0, 0.5}}, {{0.5, 0}}};
+    const static double W[6][1] = {{1}, {1}, {1}, {1}, {1}, {1}};
+    const static double D[6][1][1] = {{{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}};
     
     const double * const * x = c.coordinates;
     double result = 0.0;
@@ -3255,7 +3696,7 @@ UFC_SolitaryWave2DBilinearForm_finite_el
 /// Return a string identifying the finite element
 const char* UFC_SolitaryWave2DBilinearForm_finite_element_2_1::signature() const
 {
-    return "FiniteElement('Lagrange', 'triangle', 1)";
+    return "FiniteElement('Lagrange', 'triangle', 2)";
 }
 
 /// Return the cell shape
@@ -3267,7 +3708,7 @@ ufc::shape UFC_SolitaryWave2DBilinearFor
 /// Return the dimension of the finite element function space
 unsigned int UFC_SolitaryWave2DBilinearForm_finite_element_2_1::space_dimension() const
 {
-    return 3;
+    return 6;
 }
 
 /// Return the rank of the value space
@@ -3326,34 +3767,48 @@ void UFC_SolitaryWave2DBilinearForm_fini
     // Generate scalings
     const double scalings_y_0 = 1;
     const double scalings_y_1 = scalings_y_0*(0.5 - 0.5*y);
-    
-    // Compute psitilde_a
-    const double psitilde_a_0 = 1;
-    const double psitilde_a_1 = x;
-    
-    // Compute psitilde_bs
-    const double psitilde_bs_0_0 = 1;
-    const double psitilde_bs_0_1 = 1.5*y + 0.5;
-    const double psitilde_bs_1_0 = 1;
-    
-    // Compute basisvalues
-    const double basisvalue0 = 0.707106781186548*psitilde_a_0*scalings_y_0*psitilde_bs_0_0;
-    const double basisvalue1 = 1.73205080756888*psitilde_a_1*scalings_y_1*psitilde_bs_1_0;
-    const double basisvalue2 = psitilde_a_0*scalings_y_0*psitilde_bs_0_1;
-    
-    // Table(s) of coefficients
-    const static double coefficients0[3][3] = \
-    {{0.471404520791032, -0.288675134594813, -0.166666666666667},
-    {0.471404520791032, 0.288675134594813, -0.166666666666667},
-    {0.471404520791032, 0, 0.333333333333333}};
+    const double scalings_y_2 = scalings_y_1*(0.5 - 0.5*y);
+    
+    // Compute psitilde_a
+    const double psitilde_a_0 = 1;
+    const double psitilde_a_1 = x;
+    const double psitilde_a_2 = 1.5*x*psitilde_a_1 - 0.5*psitilde_a_0;
+    
+    // Compute psitilde_bs
+    const double psitilde_bs_0_0 = 1;
+    const double psitilde_bs_0_1 = 1.5*y + 0.5;
+    const double psitilde_bs_0_2 = 0.111111111111111*psitilde_bs_0_1 + 1.66666666666667*y*psitilde_bs_0_1 - 0.555555555555556*psitilde_bs_0_0;
+    const double psitilde_bs_1_0 = 1;
+    const double psitilde_bs_1_1 = 2.5*y + 1.5;
+    const double psitilde_bs_2_0 = 1;
+    
+    // Compute basisvalues
+    const double basisvalue0 = 0.707106781186548*psitilde_a_0*scalings_y_0*psitilde_bs_0_0;
+    const double basisvalue1 = 1.73205080756888*psitilde_a_1*scalings_y_1*psitilde_bs_1_0;
+    const double basisvalue2 = psitilde_a_0*scalings_y_0*psitilde_bs_0_1;
+    const double basisvalue3 = 2.73861278752583*psitilde_a_2*scalings_y_2*psitilde_bs_2_0;
+    const double basisvalue4 = 2.12132034355964*psitilde_a_1*scalings_y_1*psitilde_bs_1_1;
+    const double basisvalue5 = 1.22474487139159*psitilde_a_0*scalings_y_0*psitilde_bs_0_2;
+    
+    // Table(s) of coefficients
+    const static double coefficients0[6][6] = \
+    {{0, -0.173205080756888, -0.1, 0.121716123890037, 0.0942809041582064, 0.0544331053951817},
+    {0, 0.173205080756888, -0.1, 0.121716123890037, -0.0942809041582063, 0.0544331053951818},
+    {0, 0, 0.2, 0, 0, 0.163299316185545},
+    {0.471404520791032, 0.23094010767585, 0.133333333333333, 0, 0.188561808316413, -0.163299316185545},
+    {0.471404520791032, -0.23094010767585, 0.133333333333333, 0, -0.188561808316413, -0.163299316185545},
+    {0.471404520791032, 0, -0.266666666666667, -0.243432247780074, 0, 0.0544331053951817}};
     
     // Extract relevant coefficients
     const double coeff0_0 = coefficients0[dof][0];
     const double coeff0_1 = coefficients0[dof][1];
     const double coeff0_2 = coefficients0[dof][2];
-    
-    // Compute value(s)
-    *values = coeff0_0*basisvalue0 + coeff0_1*basisvalue1 + coeff0_2*basisvalue2;
+    const double coeff0_3 = coefficients0[dof][3];
+    const double coeff0_4 = coefficients0[dof][4];
+    const double coeff0_5 = coefficients0[dof][5];
+    
+    // Compute value(s)
+    *values = coeff0_0*basisvalue0 + coeff0_1*basisvalue1 + coeff0_2*basisvalue2 + coeff0_3*basisvalue3 + coeff0_4*basisvalue4 + coeff0_5*basisvalue5;
 }
 
 /// Evaluate all basis functions at given point in cell
@@ -3469,38 +3924,55 @@ void UFC_SolitaryWave2DBilinearForm_fini
     // Generate scalings
     const double scalings_y_0 = 1;
     const double scalings_y_1 = scalings_y_0*(0.5 - 0.5*y);
-    
-    // Compute psitilde_a
-    const double psitilde_a_0 = 1;
-    const double psitilde_a_1 = x;
-    
-    // Compute psitilde_bs
-    const double psitilde_bs_0_0 = 1;
-    const double psitilde_bs_0_1 = 1.5*y + 0.5;
-    const double psitilde_bs_1_0 = 1;
-    
-    // Compute basisvalues
-    const double basisvalue0 = 0.707106781186548*psitilde_a_0*scalings_y_0*psitilde_bs_0_0;
-    const double basisvalue1 = 1.73205080756888*psitilde_a_1*scalings_y_1*psitilde_bs_1_0;
-    const double basisvalue2 = psitilde_a_0*scalings_y_0*psitilde_bs_0_1;
-    
-    // Table(s) of coefficients
-    const static double coefficients0[3][3] = \
-    {{0.471404520791032, -0.288675134594813, -0.166666666666667},
-    {0.471404520791032, 0.288675134594813, -0.166666666666667},
-    {0.471404520791032, 0, 0.333333333333333}};
-    
-    // Interesting (new) part
-    // Tables of derivatives of the polynomial base (transpose)
-    const static double dmats0[3][3] = \
-    {{0, 0, 0},
-    {4.89897948556636, 0, 0},
-    {0, 0, 0}};
-    
-    const static double dmats1[3][3] = \
-    {{0, 0, 0},
-    {2.44948974278318, 0, 0},
-    {4.24264068711928, 0, 0}};
+    const double scalings_y_2 = scalings_y_1*(0.5 - 0.5*y);
+    
+    // Compute psitilde_a
+    const double psitilde_a_0 = 1;
+    const double psitilde_a_1 = x;
+    const double psitilde_a_2 = 1.5*x*psitilde_a_1 - 0.5*psitilde_a_0;
+    
+    // Compute psitilde_bs
+    const double psitilde_bs_0_0 = 1;
+    const double psitilde_bs_0_1 = 1.5*y + 0.5;
+    const double psitilde_bs_0_2 = 0.111111111111111*psitilde_bs_0_1 + 1.66666666666667*y*psitilde_bs_0_1 - 0.555555555555556*psitilde_bs_0_0;
+    const double psitilde_bs_1_0 = 1;
+    const double psitilde_bs_1_1 = 2.5*y + 1.5;
+    const double psitilde_bs_2_0 = 1;
+    
+    // Compute basisvalues
+    const double basisvalue0 = 0.707106781186548*psitilde_a_0*scalings_y_0*psitilde_bs_0_0;
+    const double basisvalue1 = 1.73205080756888*psitilde_a_1*scalings_y_1*psitilde_bs_1_0;
+    const double basisvalue2 = psitilde_a_0*scalings_y_0*psitilde_bs_0_1;
+    const double basisvalue3 = 2.73861278752583*psitilde_a_2*scalings_y_2*psitilde_bs_2_0;
+    const double basisvalue4 = 2.12132034355964*psitilde_a_1*scalings_y_1*psitilde_bs_1_1;
+    const double basisvalue5 = 1.22474487139159*psitilde_a_0*scalings_y_0*psitilde_bs_0_2;
+    
+    // Table(s) of coefficients
+    const static double coefficients0[6][6] = \
+    {{0, -0.173205080756888, -0.1, 0.121716123890037, 0.0942809041582064, 0.0544331053951817},
+    {0, 0.173205080756888, -0.1, 0.121716123890037, -0.0942809041582063, 0.0544331053951818},
+    {0, 0, 0.2, 0, 0, 0.163299316185545},
+    {0.471404520791032, 0.23094010767585, 0.133333333333333, 0, 0.188561808316413, -0.163299316185545},
+    {0.471404520791032, -0.23094010767585, 0.133333333333333, 0, -0.188561808316413, -0.163299316185545},
+    {0.471404520791032, 0, -0.266666666666667, -0.243432247780074, 0, 0.0544331053951817}};
+    
+    // Interesting (new) part
+    // Tables of derivatives of the polynomial base (transpose)
+    const static double dmats0[6][6] = \
+    {{0, 0, 0, 0, 0, 0},
+    {4.89897948556636, 0, 0, 0, 0, 0},
+    {0, 0, 0, 0, 0, 0},
+    {0, 9.48683298050514, 0, 0, 0, 0},
+    {4, 0, 7.07106781186548, 0, 0, 0},
+    {0, 0, 0, 0, 0, 0}};
+    
+    const static double dmats1[6][6] = \
+    {{0, 0, 0, 0, 0, 0},
+    {2.44948974278318, 0, 0, 0, 0, 0},
+    {4.24264068711928, 0, 0, 0, 0, 0},
+    {2.58198889747161, 4.74341649025257, -0.912870929175277, 0, 0, 0},
+    {2, 6.12372435695795, 3.53553390593274, 0, 0, 0},
+    {-2.3094010767585, 0, 8.16496580927726, 0, 0, 0}};
     
     // Compute reference derivatives
     // Declare pointer to array of derivatives on FIAT element
@@ -3510,11 +3982,17 @@ void UFC_SolitaryWave2DBilinearForm_fini
     double coeff0_0 = 0;
     double coeff0_1 = 0;
     double coeff0_2 = 0;
+    double coeff0_3 = 0;
+    double coeff0_4 = 0;
+    double coeff0_5 = 0;
     
     // Declare new coefficients
     double new_coeff0_0 = 0;
     double new_coeff0_1 = 0;
     double new_coeff0_2 = 0;
+    double new_coeff0_3 = 0;
+    double new_coeff0_4 = 0;
+    double new_coeff0_5 = 0;
     
     // Loop possible derivatives
     for (unsigned int deriv_num = 0; deriv_num < num_derivatives; deriv_num++)
@@ -3523,6 +4001,9 @@ void UFC_SolitaryWave2DBilinearForm_fini
       new_coeff0_0 = coefficients0[dof][0];
       new_coeff0_1 = coefficients0[dof][1];
       new_coeff0_2 = coefficients0[dof][2];
+      new_coeff0_3 = coefficients0[dof][3];
+      new_coeff0_4 = coefficients0[dof][4];
+      new_coeff0_5 = coefficients0[dof][5];
     
       // Loop derivative order
       for (unsigned int j = 0; j < n; j++)
@@ -3531,23 +4012,32 @@ void UFC_SolitaryWave2DBilinearForm_fini
         coeff0_0 = new_coeff0_0;
         coeff0_1 = new_coeff0_1;
         coeff0_2 = new_coeff0_2;
-    
-        if(combinations[deriv_num][j] == 0)
-        {
-          new_coeff0_0 = coeff0_0*dmats0[0][0] + coeff0_1*dmats0[1][0] + coeff0_2*dmats0[2][0];
-          new_coeff0_1 = coeff0_0*dmats0[0][1] + coeff0_1*dmats0[1][1] + coeff0_2*dmats0[2][1];
-          new_coeff0_2 = coeff0_0*dmats0[0][2] + coeff0_1*dmats0[1][2] + coeff0_2*dmats0[2][2];
-        }
-        if(combinations[deriv_num][j] == 1)
-        {
-          new_coeff0_0 = coeff0_0*dmats1[0][0] + coeff0_1*dmats1[1][0] + coeff0_2*dmats1[2][0];
-          new_coeff0_1 = coeff0_0*dmats1[0][1] + coeff0_1*dmats1[1][1] + coeff0_2*dmats1[2][1];
-          new_coeff0_2 = coeff0_0*dmats1[0][2] + coeff0_1*dmats1[1][2] + coeff0_2*dmats1[2][2];
-        }
-    
-      }
-      // Compute derivatives on reference element as dot product of coefficients and basisvalues
-      derivatives[deriv_num] = new_coeff0_0*basisvalue0 + new_coeff0_1*basisvalue1 + new_coeff0_2*basisvalue2;
+        coeff0_3 = new_coeff0_3;
+        coeff0_4 = new_coeff0_4;
+        coeff0_5 = new_coeff0_5;
+    
+        if(combinations[deriv_num][j] == 0)
+        {
+          new_coeff0_0 = coeff0_0*dmats0[0][0] + coeff0_1*dmats0[1][0] + coeff0_2*dmats0[2][0] + coeff0_3*dmats0[3][0] + coeff0_4*dmats0[4][0] + coeff0_5*dmats0[5][0];
+          new_coeff0_1 = coeff0_0*dmats0[0][1] + coeff0_1*dmats0[1][1] + coeff0_2*dmats0[2][1] + coeff0_3*dmats0[3][1] + coeff0_4*dmats0[4][1] + coeff0_5*dmats0[5][1];
+          new_coeff0_2 = coeff0_0*dmats0[0][2] + coeff0_1*dmats0[1][2] + coeff0_2*dmats0[2][2] + coeff0_3*dmats0[3][2] + coeff0_4*dmats0[4][2] + coeff0_5*dmats0[5][2];
+          new_coeff0_3 = coeff0_0*dmats0[0][3] + coeff0_1*dmats0[1][3] + coeff0_2*dmats0[2][3] + coeff0_3*dmats0[3][3] + coeff0_4*dmats0[4][3] + coeff0_5*dmats0[5][3];
+          new_coeff0_4 = coeff0_0*dmats0[0][4] + coeff0_1*dmats0[1][4] + coeff0_2*dmats0[2][4] + coeff0_3*dmats0[3][4] + coeff0_4*dmats0[4][4] + coeff0_5*dmats0[5][4];
+          new_coeff0_5 = coeff0_0*dmats0[0][5] + coeff0_1*dmats0[1][5] + coeff0_2*dmats0[2][5] + coeff0_3*dmats0[3][5] + coeff0_4*dmats0[4][5] + coeff0_5*dmats0[5][5];
+        }
+        if(combinations[deriv_num][j] == 1)
+        {
+          new_coeff0_0 = coeff0_0*dmats1[0][0] + coeff0_1*dmats1[1][0] + coeff0_2*dmats1[2][0] + coeff0_3*dmats1[3][0] + coeff0_4*dmats1[4][0] + coeff0_5*dmats1[5][0];
+          new_coeff0_1 = coeff0_0*dmats1[0][1] + coeff0_1*dmats1[1][1] + coeff0_2*dmats1[2][1] + coeff0_3*dmats1[3][1] + coeff0_4*dmats1[4][1] + coeff0_5*dmats1[5][1];
+          new_coeff0_2 = coeff0_0*dmats1[0][2] + coeff0_1*dmats1[1][2] + coeff0_2*dmats1[2][2] + coeff0_3*dmats1[3][2] + coeff0_4*dmats1[4][2] + coeff0_5*dmats1[5][2];
+          new_coeff0_3 = coeff0_0*dmats1[0][3] + coeff0_1*dmats1[1][3] + coeff0_2*dmats1[2][3] + coeff0_3*dmats1[3][3] + coeff0_4*dmats1[4][3] + coeff0_5*dmats1[5][3];
+          new_coeff0_4 = coeff0_0*dmats1[0][4] + coeff0_1*dmats1[1][4] + coeff0_2*dmats1[2][4] + coeff0_3*dmats1[3][4] + coeff0_4*dmats1[4][4] + coeff0_5*dmats1[5][4];
+          new_coeff0_5 = coeff0_0*dmats1[0][5] + coeff0_1*dmats1[1][5] + coeff0_2*dmats1[2][5] + coeff0_3*dmats1[3][5] + coeff0_4*dmats1[4][5] + coeff0_5*dmats1[5][5];
+        }
+    
+      }
+      // Compute derivatives on reference element as dot product of coefficients and basisvalues
+      derivatives[deriv_num] = new_coeff0_0*basisvalue0 + new_coeff0_1*basisvalue1 + new_coeff0_2*basisvalue2 + new_coeff0_3*basisvalue3 + new_coeff0_4*basisvalue4 + new_coeff0_5*basisvalue5;
     }
     
     // Transform derivatives back to physical element
@@ -3587,9 +4077,9 @@ double UFC_SolitaryWave2DBilinearForm_fi
                                    const ufc::cell& c) const
 {
     // The reference points, direction and weights:
-    const static double X[3][1][2] = {{{0, 0}}, {{1, 0}}, {{0, 1}}};
-    const static double W[3][1] = {{1}, {1}, {1}};
-    const static double D[3][1][1] = {{{1}}, {{1}}, {{1}}};
+    const static double X[6][1][2] = {{{0, 0}}, {{1, 0}}, {{0, 1}}, {{0.5, 0.5}}, {{0, 0.5}}, {{0.5, 0}}};
+    const static double W[6][1] = {{1}, {1}, {1}, {1}, {1}, {1}};
+    const static double D[6][1][1] = {{{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}};
     
     const double * const * x = c.coordinates;
     double result = 0.0;
@@ -3669,7 +4159,7 @@ UFC_SolitaryWave2DBilinearForm_finite_el
 /// Return a string identifying the finite element
 const char* UFC_SolitaryWave2DBilinearForm_finite_element_2::signature() const
 {
-    return "MixedElement([FiniteElement('Lagrange', 'triangle', 1), FiniteElement('Lagrange', 'triangle', 1)])";
+    return "MixedElement([FiniteElement('Lagrange', 'triangle', 2), FiniteElement('Lagrange', 'triangle', 2)])";
 }
 
 /// Return the cell shape
@@ -3681,7 +4171,7 @@ ufc::shape UFC_SolitaryWave2DBilinearFor
 /// Return the dimension of the finite element function space
 unsigned int UFC_SolitaryWave2DBilinearForm_finite_element_2::space_dimension() const
 {
-    return 6;
+    return 12;
 }
 
 /// Return the rank of the value space
@@ -3735,7 +4225,7 @@ void UFC_SolitaryWave2DBilinearForm_fini
     values[0] = 0;
     values[1] = 0;
     
-    if (0 <= i && i <= 2)
+    if (0 <= i && i <= 5)
     {
       // Map degree of freedom to element degree of freedom
       const unsigned int dof = i;
@@ -3743,72 +4233,100 @@ void UFC_SolitaryWave2DBilinearForm_fini
       // Generate scalings
       const double scalings_y_0 = 1;
       const double scalings_y_1 = scalings_y_0*(0.5 - 0.5*y);
-    
-      // Compute psitilde_a
-      const double psitilde_a_0 = 1;
-      const double psitilde_a_1 = x;
-    
-      // Compute psitilde_bs
-      const double psitilde_bs_0_0 = 1;
-      const double psitilde_bs_0_1 = 1.5*y + 0.5;
-      const double psitilde_bs_1_0 = 1;
-    
-      // Compute basisvalues
-      const double basisvalue0 = 0.707106781186548*psitilde_a_0*scalings_y_0*psitilde_bs_0_0;
-      const double basisvalue1 = 1.73205080756888*psitilde_a_1*scalings_y_1*psitilde_bs_1_0;
-      const double basisvalue2 = psitilde_a_0*scalings_y_0*psitilde_bs_0_1;
-    
-      // Table(s) of coefficients
-      const static double coefficients0[3][3] =   \
-      {{0.471404520791032, -0.288675134594813, -0.166666666666667},
-      {0.471404520791032, 0.288675134594813, -0.166666666666667},
-      {0.471404520791032, 0, 0.333333333333333}};
+      const double scalings_y_2 = scalings_y_1*(0.5 - 0.5*y);
+    
+      // Compute psitilde_a
+      const double psitilde_a_0 = 1;
+      const double psitilde_a_1 = x;
+      const double psitilde_a_2 = 1.5*x*psitilde_a_1 - 0.5*psitilde_a_0;
+    
+      // Compute psitilde_bs
+      const double psitilde_bs_0_0 = 1;
+      const double psitilde_bs_0_1 = 1.5*y + 0.5;
+      const double psitilde_bs_0_2 = 0.111111111111111*psitilde_bs_0_1 + 1.66666666666667*y*psitilde_bs_0_1 - 0.555555555555556*psitilde_bs_0_0;
+      const double psitilde_bs_1_0 = 1;
+      const double psitilde_bs_1_1 = 2.5*y + 1.5;
+      const double psitilde_bs_2_0 = 1;
+    
+      // Compute basisvalues
+      const double basisvalue0 = 0.707106781186548*psitilde_a_0*scalings_y_0*psitilde_bs_0_0;
+      const double basisvalue1 = 1.73205080756888*psitilde_a_1*scalings_y_1*psitilde_bs_1_0;
+      const double basisvalue2 = psitilde_a_0*scalings_y_0*psitilde_bs_0_1;
+      const double basisvalue3 = 2.73861278752583*psitilde_a_2*scalings_y_2*psitilde_bs_2_0;
+      const double basisvalue4 = 2.12132034355964*psitilde_a_1*scalings_y_1*psitilde_bs_1_1;
+      const double basisvalue5 = 1.22474487139159*psitilde_a_0*scalings_y_0*psitilde_bs_0_2;
+    
+      // Table(s) of coefficients
+      const static double coefficients0[6][6] =   \
+      {{0, -0.173205080756888, -0.1, 0.121716123890037, 0.0942809041582064, 0.0544331053951817},
+      {0, 0.173205080756888, -0.1, 0.121716123890037, -0.0942809041582063, 0.0544331053951818},
+      {0, 0, 0.2, 0, 0, 0.163299316185545},
+      {0.471404520791032, 0.23094010767585, 0.133333333333333, 0, 0.188561808316413, -0.163299316185545},
+      {0.471404520791032, -0.23094010767585, 0.133333333333333, 0, -0.188561808316413, -0.163299316185545},
+      {0.471404520791032, 0, -0.266666666666667, -0.243432247780074, 0, 0.0544331053951817}};
     
       // Extract relevant coefficients
       const double coeff0_0 =   coefficients0[dof][0];
       const double coeff0_1 =   coefficients0[dof][1];
       const double coeff0_2 =   coefficients0[dof][2];
+      const double coeff0_3 =   coefficients0[dof][3];
+      const double coeff0_4 =   coefficients0[dof][4];
+      const double coeff0_5 =   coefficients0[dof][5];
     
       // Compute value(s)
-      values[0] = coeff0_0*basisvalue0 + coeff0_1*basisvalue1 + coeff0_2*basisvalue2;
-    }
-    
-    if (3 <= i && i <= 5)
-    {
-      // Map degree of freedom to element degree of freedom
-      const unsigned int dof = i - 3;
-    
-      // Generate scalings
-      const double scalings_y_0 = 1;
-      const double scalings_y_1 = scalings_y_0*(0.5 - 0.5*y);
-    
-      // Compute psitilde_a
-      const double psitilde_a_0 = 1;
-      const double psitilde_a_1 = x;
-    
-      // Compute psitilde_bs
-      const double psitilde_bs_0_0 = 1;
-      const double psitilde_bs_0_1 = 1.5*y + 0.5;
-      const double psitilde_bs_1_0 = 1;
-    
-      // Compute basisvalues
-      const double basisvalue0 = 0.707106781186548*psitilde_a_0*scalings_y_0*psitilde_bs_0_0;
-      const double basisvalue1 = 1.73205080756888*psitilde_a_1*scalings_y_1*psitilde_bs_1_0;
-      const double basisvalue2 = psitilde_a_0*scalings_y_0*psitilde_bs_0_1;
-    
-      // Table(s) of coefficients
-      const static double coefficients0[3][3] =   \
-      {{0.471404520791032, -0.288675134594813, -0.166666666666667},
-      {0.471404520791032, 0.288675134594813, -0.166666666666667},
-      {0.471404520791032, 0, 0.333333333333333}};
+      values[0] = coeff0_0*basisvalue0 + coeff0_1*basisvalue1 + coeff0_2*basisvalue2 + coeff0_3*basisvalue3 + coeff0_4*basisvalue4 + coeff0_5*basisvalue5;
+    }
+    
+    if (6 <= i && i <= 11)
+    {
+      // Map degree of freedom to element degree of freedom
+      const unsigned int dof = i - 6;
+    
+      // Generate scalings
+      const double scalings_y_0 = 1;
+      const double scalings_y_1 = scalings_y_0*(0.5 - 0.5*y);
+      const double scalings_y_2 = scalings_y_1*(0.5 - 0.5*y);
+    
+      // Compute psitilde_a
+      const double psitilde_a_0 = 1;
+      const double psitilde_a_1 = x;
+      const double psitilde_a_2 = 1.5*x*psitilde_a_1 - 0.5*psitilde_a_0;
+    
+      // Compute psitilde_bs
+      const double psitilde_bs_0_0 = 1;
+      const double psitilde_bs_0_1 = 1.5*y + 0.5;
+      const double psitilde_bs_0_2 = 0.111111111111111*psitilde_bs_0_1 + 1.66666666666667*y*psitilde_bs_0_1 - 0.555555555555556*psitilde_bs_0_0;
+      const double psitilde_bs_1_0 = 1;
+      const double psitilde_bs_1_1 = 2.5*y + 1.5;
+      const double psitilde_bs_2_0 = 1;
+    
+      // Compute basisvalues
+      const double basisvalue0 = 0.707106781186548*psitilde_a_0*scalings_y_0*psitilde_bs_0_0;
+      const double basisvalue1 = 1.73205080756888*psitilde_a_1*scalings_y_1*psitilde_bs_1_0;
+      const double basisvalue2 = psitilde_a_0*scalings_y_0*psitilde_bs_0_1;
+      const double basisvalue3 = 2.73861278752583*psitilde_a_2*scalings_y_2*psitilde_bs_2_0;
+      const double basisvalue4 = 2.12132034355964*psitilde_a_1*scalings_y_1*psitilde_bs_1_1;
+      const double basisvalue5 = 1.22474487139159*psitilde_a_0*scalings_y_0*psitilde_bs_0_2;
+    
+      // Table(s) of coefficients
+      const static double coefficients0[6][6] =   \
+      {{0, -0.173205080756888, -0.1, 0.121716123890037, 0.0942809041582064, 0.0544331053951817},
+      {0, 0.173205080756888, -0.1, 0.121716123890037, -0.0942809041582063, 0.0544331053951818},
+      {0, 0, 0.2, 0, 0, 0.163299316185545},
+      {0.471404520791032, 0.23094010767585, 0.133333333333333, 0, 0.188561808316413, -0.163299316185545},
+      {0.471404520791032, -0.23094010767585, 0.133333333333333, 0, -0.188561808316413, -0.163299316185545},
+      {0.471404520791032, 0, -0.266666666666667, -0.243432247780074, 0, 0.0544331053951817}};
     
       // Extract relevant coefficients
       const double coeff0_0 =   coefficients0[dof][0];
       const double coeff0_1 =   coefficients0[dof][1];
       const double coeff0_2 =   coefficients0[dof][2];
+      const double coeff0_3 =   coefficients0[dof][3];
+      const double coeff0_4 =   coefficients0[dof][4];
+      const double coeff0_5 =   coefficients0[dof][5];
     
       // Compute value(s)
-      values[1] = coeff0_0*basisvalue0 + coeff0_1*basisvalue1 + coeff0_2*basisvalue2;
+      values[1] = coeff0_0*basisvalue0 + coeff0_1*basisvalue1 + coeff0_2*basisvalue2 + coeff0_3*basisvalue3 + coeff0_4*basisvalue4 + coeff0_5*basisvalue5;
     }
     
 }
@@ -3920,7 +4438,7 @@ void UFC_SolitaryWave2DBilinearForm_fini
     for (unsigned int j = 0; j < 2*num_derivatives; j++)
       values[j] = 0;
     
-    if (0 <= i && i <= 2)
+    if (0 <= i && i <= 5)
     {
       // Map degree of freedom to element degree of freedom
       const unsigned int dof = i;
@@ -3928,38 +4446,55 @@ void UFC_SolitaryWave2DBilinearForm_fini
       // Generate scalings
       const double scalings_y_0 = 1;
       const double scalings_y_1 = scalings_y_0*(0.5 - 0.5*y);
-    
-      // Compute psitilde_a
-      const double psitilde_a_0 = 1;
-      const double psitilde_a_1 = x;
-    
-      // Compute psitilde_bs
-      const double psitilde_bs_0_0 = 1;
-      const double psitilde_bs_0_1 = 1.5*y + 0.5;
-      const double psitilde_bs_1_0 = 1;
-    
-      // Compute basisvalues
-      const double basisvalue0 = 0.707106781186548*psitilde_a_0*scalings_y_0*psitilde_bs_0_0;
-      const double basisvalue1 = 1.73205080756888*psitilde_a_1*scalings_y_1*psitilde_bs_1_0;
-      const double basisvalue2 = psitilde_a_0*scalings_y_0*psitilde_bs_0_1;
-    
-      // Table(s) of coefficients
-      const static double coefficients0[3][3] =   \
-      {{0.471404520791032, -0.288675134594813, -0.166666666666667},
-      {0.471404520791032, 0.288675134594813, -0.166666666666667},
-      {0.471404520791032, 0, 0.333333333333333}};
+      const double scalings_y_2 = scalings_y_1*(0.5 - 0.5*y);
+    
+      // Compute psitilde_a
+      const double psitilde_a_0 = 1;
+      const double psitilde_a_1 = x;
+      const double psitilde_a_2 = 1.5*x*psitilde_a_1 - 0.5*psitilde_a_0;
+    
+      // Compute psitilde_bs
+      const double psitilde_bs_0_0 = 1;
+      const double psitilde_bs_0_1 = 1.5*y + 0.5;
+      const double psitilde_bs_0_2 = 0.111111111111111*psitilde_bs_0_1 + 1.66666666666667*y*psitilde_bs_0_1 - 0.555555555555556*psitilde_bs_0_0;
+      const double psitilde_bs_1_0 = 1;
+      const double psitilde_bs_1_1 = 2.5*y + 1.5;
+      const double psitilde_bs_2_0 = 1;
+    
+      // Compute basisvalues
+      const double basisvalue0 = 0.707106781186548*psitilde_a_0*scalings_y_0*psitilde_bs_0_0;
+      const double basisvalue1 = 1.73205080756888*psitilde_a_1*scalings_y_1*psitilde_bs_1_0;
+      const double basisvalue2 = psitilde_a_0*scalings_y_0*psitilde_bs_0_1;
+      const double basisvalue3 = 2.73861278752583*psitilde_a_2*scalings_y_2*psitilde_bs_2_0;
+      const double basisvalue4 = 2.12132034355964*psitilde_a_1*scalings_y_1*psitilde_bs_1_1;
+      const double basisvalue5 = 1.22474487139159*psitilde_a_0*scalings_y_0*psitilde_bs_0_2;
+    
+      // Table(s) of coefficients
+      const static double coefficients0[6][6] =   \
+      {{0, -0.173205080756888, -0.1, 0.121716123890037, 0.0942809041582064, 0.0544331053951817},
+      {0, 0.173205080756888, -0.1, 0.121716123890037, -0.0942809041582063, 0.0544331053951818},
+      {0, 0, 0.2, 0, 0, 0.163299316185545},
+      {0.471404520791032, 0.23094010767585, 0.133333333333333, 0, 0.188561808316413, -0.163299316185545},
+      {0.471404520791032, -0.23094010767585, 0.133333333333333, 0, -0.188561808316413, -0.163299316185545},
+      {0.471404520791032, 0, -0.266666666666667, -0.243432247780074, 0, 0.0544331053951817}};
     
       // Interesting (new) part
       // Tables of derivatives of the polynomial base (transpose)
-      const static double dmats0[3][3] =   \
-      {{0, 0, 0},
-      {4.89897948556636, 0, 0},
-      {0, 0, 0}};
-    
-      const static double dmats1[3][3] =   \
-      {{0, 0, 0},
-      {2.44948974278318, 0, 0},
-      {4.24264068711928, 0, 0}};
+      const static double dmats0[6][6] =   \
+      {{0, 0, 0, 0, 0, 0},
+      {4.89897948556636, 0, 0, 0, 0, 0},
+      {0, 0, 0, 0, 0, 0},
+      {0, 9.48683298050514, 0, 0, 0, 0},
+      {4, 0, 7.07106781186548, 0, 0, 0},
+      {0, 0, 0, 0, 0, 0}};
+    
+      const static double dmats1[6][6] =   \
+      {{0, 0, 0, 0, 0, 0},
+      {2.44948974278318, 0, 0, 0, 0, 0},
+      {4.24264068711928, 0, 0, 0, 0, 0},
+      {2.58198889747161, 4.74341649025257, -0.912870929175277, 0, 0, 0},
+      {2, 6.12372435695795, 3.53553390593274, 0, 0, 0},
+      {-2.3094010767585, 0, 8.16496580927726, 0, 0, 0}};
     
       // Compute reference derivatives
       // Declare pointer to array of derivatives on FIAT element
@@ -3969,11 +4504,17 @@ void UFC_SolitaryWave2DBilinearForm_fini
       double coeff0_0 = 0;
       double coeff0_1 = 0;
       double coeff0_2 = 0;
+      double coeff0_3 = 0;
+      double coeff0_4 = 0;
+      double coeff0_5 = 0;
     
       // Declare new coefficients
       double new_coeff0_0 = 0;
       double new_coeff0_1 = 0;
       double new_coeff0_2 = 0;
+      double new_coeff0_3 = 0;
+      double new_coeff0_4 = 0;
+      double new_coeff0_5 = 0;
     
       // Loop possible derivatives
       for (unsigned int deriv_num = 0; deriv_num < num_derivatives; deriv_num++)
@@ -3982,6 +4523,9 @@ void UFC_SolitaryWave2DBilinearForm_fini
         new_coeff0_0 = coefficients0[dof][0];
         new_coeff0_1 = coefficients0[dof][1];
         new_coeff0_2 = coefficients0[dof][2];
+        new_coeff0_3 = coefficients0[dof][3];
+        new_coeff0_4 = coefficients0[dof][4];
+        new_coeff0_5 = coefficients0[dof][5];
     
         // Loop derivative order
         for (unsigned int j = 0; j < n; j++)
@@ -3990,23 +4534,32 @@ void UFC_SolitaryWave2DBilinearForm_fini
           coeff0_0 = new_coeff0_0;
           coeff0_1 = new_coeff0_1;
           coeff0_2 = new_coeff0_2;
+          coeff0_3 = new_coeff0_3;
+          coeff0_4 = new_coeff0_4;
+          coeff0_5 = new_coeff0_5;
     
           if(combinations[deriv_num][j] == 0)
           {
-            new_coeff0_0 = coeff0_0*dmats0[0][0] + coeff0_1*dmats0[1][0] + coeff0_2*dmats0[2][0];
-            new_coeff0_1 = coeff0_0*dmats0[0][1] + coeff0_1*dmats0[1][1] + coeff0_2*dmats0[2][1];
-            new_coeff0_2 = coeff0_0*dmats0[0][2] + coeff0_1*dmats0[1][2] + coeff0_2*dmats0[2][2];
+            new_coeff0_0 = coeff0_0*dmats0[0][0] + coeff0_1*dmats0[1][0] + coeff0_2*dmats0[2][0] + coeff0_3*dmats0[3][0] + coeff0_4*dmats0[4][0] + coeff0_5*dmats0[5][0];
+            new_coeff0_1 = coeff0_0*dmats0[0][1] + coeff0_1*dmats0[1][1] + coeff0_2*dmats0[2][1] + coeff0_3*dmats0[3][1] + coeff0_4*dmats0[4][1] + coeff0_5*dmats0[5][1];
+            new_coeff0_2 = coeff0_0*dmats0[0][2] + coeff0_1*dmats0[1][2] + coeff0_2*dmats0[2][2] + coeff0_3*dmats0[3][2] + coeff0_4*dmats0[4][2] + coeff0_5*dmats0[5][2];
+            new_coeff0_3 = coeff0_0*dmats0[0][3] + coeff0_1*dmats0[1][3] + coeff0_2*dmats0[2][3] + coeff0_3*dmats0[3][3] + coeff0_4*dmats0[4][3] + coeff0_5*dmats0[5][3];
+            new_coeff0_4 = coeff0_0*dmats0[0][4] + coeff0_1*dmats0[1][4] + coeff0_2*dmats0[2][4] + coeff0_3*dmats0[3][4] + coeff0_4*dmats0[4][4] + coeff0_5*dmats0[5][4];
+            new_coeff0_5 = coeff0_0*dmats0[0][5] + coeff0_1*dmats0[1][5] + coeff0_2*dmats0[2][5] + coeff0_3*dmats0[3][5] + coeff0_4*dmats0[4][5] + coeff0_5*dmats0[5][5];
           }
           if(combinations[deriv_num][j] == 1)
           {
-            new_coeff0_0 = coeff0_0*dmats1[0][0] + coeff0_1*dmats1[1][0] + coeff0_2*dmats1[2][0];
-            new_coeff0_1 = coeff0_0*dmats1[0][1] + coeff0_1*dmats1[1][1] + coeff0_2*dmats1[2][1];
-            new_coeff0_2 = coeff0_0*dmats1[0][2] + coeff0_1*dmats1[1][2] + coeff0_2*dmats1[2][2];
+            new_coeff0_0 = coeff0_0*dmats1[0][0] + coeff0_1*dmats1[1][0] + coeff0_2*dmats1[2][0] + coeff0_3*dmats1[3][0] + coeff0_4*dmats1[4][0] + coeff0_5*dmats1[5][0];
+            new_coeff0_1 = coeff0_0*dmats1[0][1] + coeff0_1*dmats1[1][1] + coeff0_2*dmats1[2][1] + coeff0_3*dmats1[3][1] + coeff0_4*dmats1[4][1] + coeff0_5*dmats1[5][1];
+            new_coeff0_2 = coeff0_0*dmats1[0][2] + coeff0_1*dmats1[1][2] + coeff0_2*dmats1[2][2] + coeff0_3*dmats1[3][2] + coeff0_4*dmats1[4][2] + coeff0_5*dmats1[5][2];
+            new_coeff0_3 = coeff0_0*dmats1[0][3] + coeff0_1*dmats1[1][3] + coeff0_2*dmats1[2][3] + coeff0_3*dmats1[3][3] + coeff0_4*dmats1[4][3] + coeff0_5*dmats1[5][3];
+            new_coeff0_4 = coeff0_0*dmats1[0][4] + coeff0_1*dmats1[1][4] + coeff0_2*dmats1[2][4] + coeff0_3*dmats1[3][4] + coeff0_4*dmats1[4][4] + coeff0_5*dmats1[5][4];
+            new_coeff0_5 = coeff0_0*dmats1[0][5] + coeff0_1*dmats1[1][5] + coeff0_2*dmats1[2][5] + coeff0_3*dmats1[3][5] + coeff0_4*dmats1[4][5] + coeff0_5*dmats1[5][5];
           }
     
         }
         // Compute derivatives on reference element as dot product of coefficients and basisvalues
-        derivatives[deriv_num] = new_coeff0_0*basisvalue0 + new_coeff0_1*basisvalue1 + new_coeff0_2*basisvalue2;
+        derivatives[deriv_num] = new_coeff0_0*basisvalue0 + new_coeff0_1*basisvalue1 + new_coeff0_2*basisvalue2 + new_coeff0_3*basisvalue3 + new_coeff0_4*basisvalue4 + new_coeff0_5*basisvalue5;
       }
     
       // Transform derivatives back to physical element
@@ -4031,46 +4584,63 @@ void UFC_SolitaryWave2DBilinearForm_fini
       delete [] transform;
     }
     
-    if (3 <= i && i <= 5)
-    {
-      // Map degree of freedom to element degree of freedom
-      const unsigned int dof = i - 3;
-    
-      // Generate scalings
-      const double scalings_y_0 = 1;
-      const double scalings_y_1 = scalings_y_0*(0.5 - 0.5*y);
-    
-      // Compute psitilde_a
-      const double psitilde_a_0 = 1;
-      const double psitilde_a_1 = x;
-    
-      // Compute psitilde_bs
-      const double psitilde_bs_0_0 = 1;
-      const double psitilde_bs_0_1 = 1.5*y + 0.5;
-      const double psitilde_bs_1_0 = 1;
-    
-      // Compute basisvalues
-      const double basisvalue0 = 0.707106781186548*psitilde_a_0*scalings_y_0*psitilde_bs_0_0;
-      const double basisvalue1 = 1.73205080756888*psitilde_a_1*scalings_y_1*psitilde_bs_1_0;
-      const double basisvalue2 = psitilde_a_0*scalings_y_0*psitilde_bs_0_1;
-    
-      // Table(s) of coefficients
-      const static double coefficients0[3][3] =   \
-      {{0.471404520791032, -0.288675134594813, -0.166666666666667},
-      {0.471404520791032, 0.288675134594813, -0.166666666666667},
-      {0.471404520791032, 0, 0.333333333333333}};
+    if (6 <= i && i <= 11)
+    {
+      // Map degree of freedom to element degree of freedom
+      const unsigned int dof = i - 6;
+    
+      // Generate scalings
+      const double scalings_y_0 = 1;
+      const double scalings_y_1 = scalings_y_0*(0.5 - 0.5*y);
+      const double scalings_y_2 = scalings_y_1*(0.5 - 0.5*y);
+    
+      // Compute psitilde_a
+      const double psitilde_a_0 = 1;
+      const double psitilde_a_1 = x;
+      const double psitilde_a_2 = 1.5*x*psitilde_a_1 - 0.5*psitilde_a_0;
+    
+      // Compute psitilde_bs
+      const double psitilde_bs_0_0 = 1;
+      const double psitilde_bs_0_1 = 1.5*y + 0.5;
+      const double psitilde_bs_0_2 = 0.111111111111111*psitilde_bs_0_1 + 1.66666666666667*y*psitilde_bs_0_1 - 0.555555555555556*psitilde_bs_0_0;
+      const double psitilde_bs_1_0 = 1;
+      const double psitilde_bs_1_1 = 2.5*y + 1.5;
+      const double psitilde_bs_2_0 = 1;
+    
+      // Compute basisvalues
+      const double basisvalue0 = 0.707106781186548*psitilde_a_0*scalings_y_0*psitilde_bs_0_0;
+      const double basisvalue1 = 1.73205080756888*psitilde_a_1*scalings_y_1*psitilde_bs_1_0;
+      const double basisvalue2 = psitilde_a_0*scalings_y_0*psitilde_bs_0_1;
+      const double basisvalue3 = 2.73861278752583*psitilde_a_2*scalings_y_2*psitilde_bs_2_0;
+      const double basisvalue4 = 2.12132034355964*psitilde_a_1*scalings_y_1*psitilde_bs_1_1;
+      const double basisvalue5 = 1.22474487139159*psitilde_a_0*scalings_y_0*psitilde_bs_0_2;
+    
+      // Table(s) of coefficients
+      const static double coefficients0[6][6] =   \
+      {{0, -0.173205080756888, -0.1, 0.121716123890037, 0.0942809041582064, 0.0544331053951817},
+      {0, 0.173205080756888, -0.1, 0.121716123890037, -0.0942809041582063, 0.0544331053951818},
+      {0, 0, 0.2, 0, 0, 0.163299316185545},
+      {0.471404520791032, 0.23094010767585, 0.133333333333333, 0, 0.188561808316413, -0.163299316185545},
+      {0.471404520791032, -0.23094010767585, 0.133333333333333, 0, -0.188561808316413, -0.163299316185545},
+      {0.471404520791032, 0, -0.266666666666667, -0.243432247780074, 0, 0.0544331053951817}};
     
       // Interesting (new) part
       // Tables of derivatives of the polynomial base (transpose)
-      const static double dmats0[3][3] =   \
-      {{0, 0, 0},
-      {4.89897948556636, 0, 0},
-      {0, 0, 0}};
-    
-      const static double dmats1[3][3] =   \
-      {{0, 0, 0},
-      {2.44948974278318, 0, 0},
-      {4.24264068711928, 0, 0}};
+      const static double dmats0[6][6] =   \
+      {{0, 0, 0, 0, 0, 0},
+      {4.89897948556636, 0, 0, 0, 0, 0},
+      {0, 0, 0, 0, 0, 0},
+      {0, 9.48683298050514, 0, 0, 0, 0},
+      {4, 0, 7.07106781186548, 0, 0, 0},
+      {0, 0, 0, 0, 0, 0}};
+    
+      const static double dmats1[6][6] =   \
+      {{0, 0, 0, 0, 0, 0},
+      {2.44948974278318, 0, 0, 0, 0, 0},
+      {4.24264068711928, 0, 0, 0, 0, 0},
+      {2.58198889747161, 4.74341649025257, -0.912870929175277, 0, 0, 0},
+      {2, 6.12372435695795, 3.53553390593274, 0, 0, 0},
+      {-2.3094010767585, 0, 8.16496580927726, 0, 0, 0}};
     
       // Compute reference derivatives
       // Declare pointer to array of derivatives on FIAT element
@@ -4080,11 +4650,17 @@ void UFC_SolitaryWave2DBilinearForm_fini
       double coeff0_0 = 0;
       double coeff0_1 = 0;
       double coeff0_2 = 0;
+      double coeff0_3 = 0;
+      double coeff0_4 = 0;
+      double coeff0_5 = 0;
     
       // Declare new coefficients
       double new_coeff0_0 = 0;
       double new_coeff0_1 = 0;
       double new_coeff0_2 = 0;
+      double new_coeff0_3 = 0;
+      double new_coeff0_4 = 0;
+      double new_coeff0_5 = 0;
     
       // Loop possible derivatives
       for (unsigned int deriv_num = 0; deriv_num < num_derivatives; deriv_num++)
@@ -4093,6 +4669,9 @@ void UFC_SolitaryWave2DBilinearForm_fini
         new_coeff0_0 = coefficients0[dof][0];
         new_coeff0_1 = coefficients0[dof][1];
         new_coeff0_2 = coefficients0[dof][2];
+        new_coeff0_3 = coefficients0[dof][3];
+        new_coeff0_4 = coefficients0[dof][4];
+        new_coeff0_5 = coefficients0[dof][5];
     
         // Loop derivative order
         for (unsigned int j = 0; j < n; j++)
@@ -4101,23 +4680,32 @@ void UFC_SolitaryWave2DBilinearForm_fini
           coeff0_0 = new_coeff0_0;
           coeff0_1 = new_coeff0_1;
           coeff0_2 = new_coeff0_2;
+          coeff0_3 = new_coeff0_3;
+          coeff0_4 = new_coeff0_4;
+          coeff0_5 = new_coeff0_5;
     
           if(combinations[deriv_num][j] == 0)
           {
-            new_coeff0_0 = coeff0_0*dmats0[0][0] + coeff0_1*dmats0[1][0] + coeff0_2*dmats0[2][0];
-            new_coeff0_1 = coeff0_0*dmats0[0][1] + coeff0_1*dmats0[1][1] + coeff0_2*dmats0[2][1];
-            new_coeff0_2 = coeff0_0*dmats0[0][2] + coeff0_1*dmats0[1][2] + coeff0_2*dmats0[2][2];
+            new_coeff0_0 = coeff0_0*dmats0[0][0] + coeff0_1*dmats0[1][0] + coeff0_2*dmats0[2][0] + coeff0_3*dmats0[3][0] + coeff0_4*dmats0[4][0] + coeff0_5*dmats0[5][0];
+            new_coeff0_1 = coeff0_0*dmats0[0][1] + coeff0_1*dmats0[1][1] + coeff0_2*dmats0[2][1] + coeff0_3*dmats0[3][1] + coeff0_4*dmats0[4][1] + coeff0_5*dmats0[5][1];
+            new_coeff0_2 = coeff0_0*dmats0[0][2] + coeff0_1*dmats0[1][2] + coeff0_2*dmats0[2][2] + coeff0_3*dmats0[3][2] + coeff0_4*dmats0[4][2] + coeff0_5*dmats0[5][2];
+            new_coeff0_3 = coeff0_0*dmats0[0][3] + coeff0_1*dmats0[1][3] + coeff0_2*dmats0[2][3] + coeff0_3*dmats0[3][3] + coeff0_4*dmats0[4][3] + coeff0_5*dmats0[5][3];
+            new_coeff0_4 = coeff0_0*dmats0[0][4] + coeff0_1*dmats0[1][4] + coeff0_2*dmats0[2][4] + coeff0_3*dmats0[3][4] + coeff0_4*dmats0[4][4] + coeff0_5*dmats0[5][4];
+            new_coeff0_5 = coeff0_0*dmats0[0][5] + coeff0_1*dmats0[1][5] + coeff0_2*dmats0[2][5] + coeff0_3*dmats0[3][5] + coeff0_4*dmats0[4][5] + coeff0_5*dmats0[5][5];
           }
           if(combinations[deriv_num][j] == 1)
           {
-            new_coeff0_0 = coeff0_0*dmats1[0][0] + coeff0_1*dmats1[1][0] + coeff0_2*dmats1[2][0];
-            new_coeff0_1 = coeff0_0*dmats1[0][1] + coeff0_1*dmats1[1][1] + coeff0_2*dmats1[2][1];
-            new_coeff0_2 = coeff0_0*dmats1[0][2] + coeff0_1*dmats1[1][2] + coeff0_2*dmats1[2][2];
+            new_coeff0_0 = coeff0_0*dmats1[0][0] + coeff0_1*dmats1[1][0] + coeff0_2*dmats1[2][0] + coeff0_3*dmats1[3][0] + coeff0_4*dmats1[4][0] + coeff0_5*dmats1[5][0];
+            new_coeff0_1 = coeff0_0*dmats1[0][1] + coeff0_1*dmats1[1][1] + coeff0_2*dmats1[2][1] + coeff0_3*dmats1[3][1] + coeff0_4*dmats1[4][1] + coeff0_5*dmats1[5][1];
+            new_coeff0_2 = coeff0_0*dmats1[0][2] + coeff0_1*dmats1[1][2] + coeff0_2*dmats1[2][2] + coeff0_3*dmats1[3][2] + coeff0_4*dmats1[4][2] + coeff0_5*dmats1[5][2];
+            new_coeff0_3 = coeff0_0*dmats1[0][3] + coeff0_1*dmats1[1][3] + coeff0_2*dmats1[2][3] + coeff0_3*dmats1[3][3] + coeff0_4*dmats1[4][3] + coeff0_5*dmats1[5][3];
+            new_coeff0_4 = coeff0_0*dmats1[0][4] + coeff0_1*dmats1[1][4] + coeff0_2*dmats1[2][4] + coeff0_3*dmats1[3][4] + coeff0_4*dmats1[4][4] + coeff0_5*dmats1[5][4];
+            new_coeff0_5 = coeff0_0*dmats1[0][5] + coeff0_1*dmats1[1][5] + coeff0_2*dmats1[2][5] + coeff0_3*dmats1[3][5] + coeff0_4*dmats1[4][5] + coeff0_5*dmats1[5][5];
           }
     
         }
         // Compute derivatives on reference element as dot product of coefficients and basisvalues
-        derivatives[deriv_num] = new_coeff0_0*basisvalue0 + new_coeff0_1*basisvalue1 + new_coeff0_2*basisvalue2;
+        derivatives[deriv_num] = new_coeff0_0*basisvalue0 + new_coeff0_1*basisvalue1 + new_coeff0_2*basisvalue2 + new_coeff0_3*basisvalue3 + new_coeff0_4*basisvalue4 + new_coeff0_5*basisvalue5;
       }
     
       // Transform derivatives back to physical element
@@ -4159,9 +4747,9 @@ double UFC_SolitaryWave2DBilinearForm_fi
                                    const ufc::cell& c) const
 {
     // The reference points, direction and weights:
-    const static double X[6][1][2] = {{{0, 0}}, {{1, 0}}, {{0, 1}}, {{0, 0}}, {{1, 0}}, {{0, 1}}};
-    const static double W[6][1] = {{1}, {1}, {1}, {1}, {1}, {1}};
-    const static double D[6][1][2] = {{{1, 0}}, {{1, 0}}, {{1, 0}}, {{0, 1}}, {{0, 1}}, {{0, 1}}};
+    const static double X[12][1][2] = {{{0, 0}}, {{1, 0}}, {{0, 1}}, {{0.5, 0.5}}, {{0, 0.5}}, {{0.5, 0}}, {{0, 0}}, {{1, 0}}, {{0, 1}}, {{0.5, 0.5}}, {{0, 0.5}}, {{0.5, 0}}};
+    const static double W[12][1] = {{1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}};
+    const static double D[12][1][2] = {{{1, 0}}, {{1, 0}}, {{1, 0}}, {{1, 0}}, {{1, 0}}, {{1, 0}}, {{0, 1}}, {{0, 1}}, {{0, 1}}, {{0, 1}}, {{0, 1}}, {{0, 1}}};
     
     const double * const * x = c.coordinates;
     double result = 0.0;
@@ -4212,9 +4800,9 @@ void UFC_SolitaryWave2DBilinearForm_fini
     vertex_values[2] = dof_values[1];
     vertex_values[4] = dof_values[2];
     // Evaluate at vertices and use affine mapping
-    vertex_values[1] = dof_values[3];
-    vertex_values[3] = dof_values[4];
-    vertex_values[5] = dof_values[5];
+    vertex_values[1] = dof_values[6];
+    vertex_values[3] = dof_values[7];
+    vertex_values[5] = dof_values[8];
 }
 
 /// Return the number of sub elements (for a mixed element)
@@ -6290,7 +6878,7 @@ UFC_SolitaryWave2DBilinearForm_dof_map_0
 /// Return a string identifying the dof map
 const char* UFC_SolitaryWave2DBilinearForm_dof_map_0_0::signature() const
 {
-    return "FFC dof map for FiniteElement('Lagrange', 'triangle', 1)";
+    return "FFC dof map for FiniteElement('Lagrange', 'triangle', 2)";
 }
 
 /// Return true iff mesh entities of topological dimension d are needed
@@ -6302,7 +6890,7 @@ bool UFC_SolitaryWave2DBilinearForm_dof_
       return true;
       break;
     case 1:
-      return false;
+      return true;
       break;
     case 2:
       return false;
@@ -6314,7 +6902,7 @@ bool UFC_SolitaryWave2DBilinearForm_dof_
 /// Initialize dof map for mesh (return true iff init_cell() is needed)
 bool UFC_SolitaryWave2DBilinearForm_dof_map_0_0::init_mesh(const ufc::mesh& m)
 {
-    __global_dimension = m.num_entities[0];
+    __global_dimension = m.num_entities[0] + m.num_entities[1];
     return false;
 }
 
@@ -6340,19 +6928,19 @@ unsigned int UFC_SolitaryWave2DBilinearF
 /// Return the dimension of the local finite element function space
 unsigned int UFC_SolitaryWave2DBilinearForm_dof_map_0_0::local_dimension() const
 {
+    return 6;
+}
+
+// Return the geometric dimension of the coordinates this dof map provides
+unsigned int UFC_SolitaryWave2DBilinearForm_dof_map_0_0::geometric_dimension() const
+{
+    return 2;
+}
+
+/// Return the number of dofs on each cell facet
+unsigned int UFC_SolitaryWave2DBilinearForm_dof_map_0_0::num_facet_dofs() const
+{
     return 3;
-}
-
-// Return the geometric dimension of the coordinates this dof map provides
-unsigned int UFC_SolitaryWave2DBilinearForm_dof_map_0_0::geometric_dimension() const
-{
-    return 2;
-}
-
-/// Return the number of dofs on each cell facet
-unsigned int UFC_SolitaryWave2DBilinearForm_dof_map_0_0::num_facet_dofs() const
-{
-    return 2;
 }
 
 /// Return the number of dofs associated with each cell entity of dimension d
@@ -6369,6 +6957,10 @@ void UFC_SolitaryWave2DBilinearForm_dof_
     dofs[0] = c.entity_indices[0][0];
     dofs[1] = c.entity_indices[0][1];
     dofs[2] = c.entity_indices[0][2];
+    unsigned int offset = m.num_entities[0];
+    dofs[3] = offset + c.entity_indices[1][0];
+    dofs[4] = offset + c.entity_indices[1][1];
+    dofs[5] = offset + c.entity_indices[1][2];
 }
 
 /// Tabulate the local-to-local mapping from facet dofs to cell dofs
@@ -6380,14 +6972,17 @@ void UFC_SolitaryWave2DBilinearForm_dof_
     case 0:
       dofs[0] = 1;
       dofs[1] = 2;
-      break;
-    case 1:
-      dofs[0] = 0;
-      dofs[1] = 2;
+      dofs[2] = 3;
+      break;
+    case 1:
+      dofs[0] = 0;
+      dofs[1] = 2;
+      dofs[2] = 4;
       break;
     case 2:
       dofs[0] = 0;
       dofs[1] = 1;
+      dofs[2] = 5;
       break;
     }
 }
@@ -6410,6 +7005,12 @@ void UFC_SolitaryWave2DBilinearForm_dof_
     coordinates[1][1] = x[1][1];
     coordinates[2][0] = x[2][0];
     coordinates[2][1] = x[2][1];
+    coordinates[3][0] = 0.5*x[1][0] + 0.5*x[2][0];
+    coordinates[3][1] = 0.5*x[1][1] + 0.5*x[2][1];
+    coordinates[4][0] = 0.5*x[0][0] + 0.5*x[2][0];
+    coordinates[4][1] = 0.5*x[0][1] + 0.5*x[2][1];
+    coordinates[5][0] = 0.5*x[0][0] + 0.5*x[1][0];
+    coordinates[5][1] = 0.5*x[0][1] + 0.5*x[1][1];
 }
 
 /// Return the number of sub dof maps (for a mixed element)
@@ -6440,7 +7041,7 @@ UFC_SolitaryWave2DBilinearForm_dof_map_0
 /// Return a string identifying the dof map
 const char* UFC_SolitaryWave2DBilinearForm_dof_map_0_1::signature() const
 {
-    return "FFC dof map for FiniteElement('Lagrange', 'triangle', 1)";
+    return "FFC dof map for FiniteElement('Lagrange', 'triangle', 2)";
 }
 
 /// Return true iff mesh entities of topological dimension d are needed
@@ -6452,7 +7053,7 @@ bool UFC_SolitaryWave2DBilinearForm_dof_
       return true;
       break;
     case 1:
-      return false;
+      return true;
       break;
     case 2:
       return false;
@@ -6464,7 +7065,7 @@ bool UFC_SolitaryWave2DBilinearForm_dof_
 /// Initialize dof map for mesh (return true iff init_cell() is needed)
 bool UFC_SolitaryWave2DBilinearForm_dof_map_0_1::init_mesh(const ufc::mesh& m)
 {
-    __global_dimension = m.num_entities[0];
+    __global_dimension = m.num_entities[0] + m.num_entities[1];
     return false;
 }
 
@@ -6490,19 +7091,19 @@ unsigned int UFC_SolitaryWave2DBilinearF
 /// Return the dimension of the local finite element function space
 unsigned int UFC_SolitaryWave2DBilinearForm_dof_map_0_1::local_dimension() const
 {
+    return 6;
+}
+
+// Return the geometric dimension of the coordinates this dof map provides
+unsigned int UFC_SolitaryWave2DBilinearForm_dof_map_0_1::geometric_dimension() const
+{
+    return 2;
+}
+
+/// Return the number of dofs on each cell facet
+unsigned int UFC_SolitaryWave2DBilinearForm_dof_map_0_1::num_facet_dofs() const
+{
     return 3;
-}
-
-// Return the geometric dimension of the coordinates this dof map provides
-unsigned int UFC_SolitaryWave2DBilinearForm_dof_map_0_1::geometric_dimension() const
-{
-    return 2;
-}
-
-/// Return the number of dofs on each cell facet
-unsigned int UFC_SolitaryWave2DBilinearForm_dof_map_0_1::num_facet_dofs() const
-{
-    return 2;
 }
 
 /// Return the number of dofs associated with each cell entity of dimension d
@@ -6519,6 +7120,10 @@ void UFC_SolitaryWave2DBilinearForm_dof_
     dofs[0] = c.entity_indices[0][0];
     dofs[1] = c.entity_indices[0][1];
     dofs[2] = c.entity_indices[0][2];
+    unsigned int offset = m.num_entities[0];
+    dofs[3] = offset + c.entity_indices[1][0];
+    dofs[4] = offset + c.entity_indices[1][1];
+    dofs[5] = offset + c.entity_indices[1][2];
 }
 
 /// Tabulate the local-to-local mapping from facet dofs to cell dofs
@@ -6530,14 +7135,17 @@ void UFC_SolitaryWave2DBilinearForm_dof_
     case 0:
       dofs[0] = 1;
       dofs[1] = 2;
-      break;
-    case 1:
-      dofs[0] = 0;
-      dofs[1] = 2;
+      dofs[2] = 3;
+      break;
+    case 1:
+      dofs[0] = 0;
+      dofs[1] = 2;
+      dofs[2] = 4;
       break;
     case 2:
       dofs[0] = 0;
       dofs[1] = 1;
+      dofs[2] = 5;
       break;
     }
 }
@@ -6560,6 +7168,12 @@ void UFC_SolitaryWave2DBilinearForm_dof_
     coordinates[1][1] = x[1][1];
     coordinates[2][0] = x[2][0];
     coordinates[2][1] = x[2][1];
+    coordinates[3][0] = 0.5*x[1][0] + 0.5*x[2][0];
+    coordinates[3][1] = 0.5*x[1][1] + 0.5*x[2][1];
+    coordinates[4][0] = 0.5*x[0][0] + 0.5*x[2][0];
+    coordinates[4][1] = 0.5*x[0][1] + 0.5*x[2][1];
+    coordinates[5][0] = 0.5*x[0][0] + 0.5*x[1][0];
+    coordinates[5][1] = 0.5*x[0][1] + 0.5*x[1][1];
 }
 
 /// Return the number of sub dof maps (for a mixed element)
@@ -6590,7 +7204,7 @@ UFC_SolitaryWave2DBilinearForm_dof_map_0
 /// Return a string identifying the dof map
 const char* UFC_SolitaryWave2DBilinearForm_dof_map_0::signature() const
 {
-    return "FFC dof map for MixedElement([FiniteElement('Lagrange', 'triangle', 1), FiniteElement('Lagrange', 'triangle', 1)])";
+    return "FFC dof map for MixedElement([FiniteElement('Lagrange', 'triangle', 2), FiniteElement('Lagrange', 'triangle', 2)])";
 }
 
 /// Return true iff mesh entities of topological dimension d are needed
@@ -6602,7 +7216,7 @@ bool UFC_SolitaryWave2DBilinearForm_dof_
       return true;
       break;
     case 1:
-      return false;
+      return true;
       break;
     case 2:
       return false;
@@ -6614,7 +7228,7 @@ bool UFC_SolitaryWave2DBilinearForm_dof_
 /// Initialize dof map for mesh (return true iff init_cell() is needed)
 bool UFC_SolitaryWave2DBilinearForm_dof_map_0::init_mesh(const ufc::mesh& m)
 {
-    __global_dimension = 2*m.num_entities[0];
+    __global_dimension = 2*m.num_entities[0] + 2*m.num_entities[1];
     return false;
 }
 
@@ -6640,7 +7254,7 @@ unsigned int UFC_SolitaryWave2DBilinearF
 /// Return the dimension of the local finite element function space
 unsigned int UFC_SolitaryWave2DBilinearForm_dof_map_0::local_dimension() const
 {
-    return 6;
+    return 12;
 }
 
 // Return the geometric dimension of the coordinates this dof map provides
@@ -6652,7 +7266,7 @@ unsigned int UFC_SolitaryWave2DBilinearF
 /// Return the number of dofs on each cell facet
 unsigned int UFC_SolitaryWave2DBilinearForm_dof_map_0::num_facet_dofs() const
 {
-    return 4;
+    return 6;
 }
 
 /// Return the number of dofs associated with each cell entity of dimension d
@@ -6670,9 +7284,17 @@ void UFC_SolitaryWave2DBilinearForm_dof_
     dofs[1] = c.entity_indices[0][1];
     dofs[2] = c.entity_indices[0][2];
     unsigned int offset = m.num_entities[0];
-    dofs[3] = offset + c.entity_indices[0][0];
-    dofs[4] = offset + c.entity_indices[0][1];
-    dofs[5] = offset + c.entity_indices[0][2];
+    dofs[3] = offset + c.entity_indices[1][0];
+    dofs[4] = offset + c.entity_indices[1][1];
+    dofs[5] = offset + c.entity_indices[1][2];
+    offset = offset + m.num_entities[1];
+    dofs[6] = offset + c.entity_indices[0][0];
+    dofs[7] = offset + c.entity_indices[0][1];
+    dofs[8] = offset + c.entity_indices[0][2];
+    offset = offset + m.num_entities[0];
+    dofs[9] = offset + c.entity_indices[1][0];
+    dofs[10] = offset + c.entity_indices[1][1];
+    dofs[11] = offset + c.entity_indices[1][2];
 }
 
 /// Tabulate the local-to-local mapping from facet dofs to cell dofs
@@ -6684,20 +7306,26 @@ void UFC_SolitaryWave2DBilinearForm_dof_
     case 0:
       dofs[0] = 1;
       dofs[1] = 2;
+      dofs[2] = 3;
+      dofs[3] = 7;
+      dofs[4] = 8;
+      dofs[5] = 9;
+      break;
+    case 1:
+      dofs[0] = 0;
+      dofs[1] = 2;
       dofs[2] = 4;
-      dofs[3] = 5;
-      break;
-    case 1:
-      dofs[0] = 0;
-      dofs[1] = 2;
-      dofs[2] = 3;
-      dofs[3] = 5;
+      dofs[3] = 6;
+      dofs[4] = 8;
+      dofs[5] = 10;
       break;
     case 2:
       dofs[0] = 0;
       dofs[1] = 1;
-      dofs[2] = 3;
-      dofs[3] = 4;
+      dofs[2] = 5;
+      dofs[3] = 6;
+      dofs[4] = 7;
+      dofs[5] = 11;
       break;
     }
 }
@@ -6720,12 +7348,24 @@ void UFC_SolitaryWave2DBilinearForm_dof_
     coordinates[1][1] = x[1][1];
     coordinates[2][0] = x[2][0];
     coordinates[2][1] = x[2][1];
-    coordinates[3][0] = x[0][0];
-    coordinates[3][1] = x[0][1];
-    coordinates[4][0] = x[1][0];
-    coordinates[4][1] = x[1][1];
-    coordinates[5][0] = x[2][0];
-    coordinates[5][1] = x[2][1];
+    coordinates[3][0] = 0.5*x[1][0] + 0.5*x[2][0];
+    coordinates[3][1] = 0.5*x[1][1] + 0.5*x[2][1];
+    coordinates[4][0] = 0.5*x[0][0] + 0.5*x[2][0];
+    coordinates[4][1] = 0.5*x[0][1] + 0.5*x[2][1];
+    coordinates[5][0] = 0.5*x[0][0] + 0.5*x[1][0];
+    coordinates[5][1] = 0.5*x[0][1] + 0.5*x[1][1];
+    coordinates[6][0] = x[0][0];
+    coordinates[6][1] = x[0][1];
+    coordinates[7][0] = x[1][0];
+    coordinates[7][1] = x[1][1];
+    coordinates[8][0] = x[2][0];
+    coordinates[8][1] = x[2][1];
+    coordinates[9][0] = 0.5*x[1][0] + 0.5*x[2][0];
+    coordinates[9][1] = 0.5*x[1][1] + 0.5*x[2][1];
+    coordinates[10][0] = 0.5*x[0][0] + 0.5*x[2][0];
+    coordinates[10][1] = 0.5*x[0][1] + 0.5*x[2][1];
+    coordinates[11][0] = 0.5*x[0][0] + 0.5*x[1][0];
+    coordinates[11][1] = 0.5*x[0][1] + 0.5*x[1][1];
 }
 
 /// Return the number of sub dof maps (for a mixed element)
@@ -6765,7 +7405,7 @@ UFC_SolitaryWave2DBilinearForm_dof_map_1
 /// Return a string identifying the dof map
 const char* UFC_SolitaryWave2DBilinearForm_dof_map_1_0::signature() const
 {
-    return "FFC dof map for FiniteElement('Lagrange', 'triangle', 1)";
+    return "FFC dof map for FiniteElement('Lagrange', 'triangle', 2)";
 }
 
 /// Return true iff mesh entities of topological dimension d are needed
@@ -6777,7 +7417,7 @@ bool UFC_SolitaryWave2DBilinearForm_dof_
       return true;
       break;
     case 1:
-      return false;
+      return true;
       break;
     case 2:
       return false;
@@ -6789,7 +7429,7 @@ bool UFC_SolitaryWave2DBilinearForm_dof_
 /// Initialize dof map for mesh (return true iff init_cell() is needed)
 bool UFC_SolitaryWave2DBilinearForm_dof_map_1_0::init_mesh(const ufc::mesh& m)
 {
-    __global_dimension = m.num_entities[0];
+    __global_dimension = m.num_entities[0] + m.num_entities[1];
     return false;
 }
 
@@ -6815,19 +7455,19 @@ unsigned int UFC_SolitaryWave2DBilinearF
 /// Return the dimension of the local finite element function space
 unsigned int UFC_SolitaryWave2DBilinearForm_dof_map_1_0::local_dimension() const
 {
+    return 6;
+}
+
+// Return the geometric dimension of the coordinates this dof map provides
+unsigned int UFC_SolitaryWave2DBilinearForm_dof_map_1_0::geometric_dimension() const
+{
+    return 2;
+}
+
+/// Return the number of dofs on each cell facet
+unsigned int UFC_SolitaryWave2DBilinearForm_dof_map_1_0::num_facet_dofs() const
+{
     return 3;
-}
-
-// Return the geometric dimension of the coordinates this dof map provides
-unsigned int UFC_SolitaryWave2DBilinearForm_dof_map_1_0::geometric_dimension() const
-{
-    return 2;
-}
-
-/// Return the number of dofs on each cell facet
-unsigned int UFC_SolitaryWave2DBilinearForm_dof_map_1_0::num_facet_dofs() const
-{
-    return 2;
 }
 
 /// Return the number of dofs associated with each cell entity of dimension d
@@ -6844,6 +7484,10 @@ void UFC_SolitaryWave2DBilinearForm_dof_
     dofs[0] = c.entity_indices[0][0];
     dofs[1] = c.entity_indices[0][1];
     dofs[2] = c.entity_indices[0][2];
+    unsigned int offset = m.num_entities[0];
+    dofs[3] = offset + c.entity_indices[1][0];
+    dofs[4] = offset + c.entity_indices[1][1];
+    dofs[5] = offset + c.entity_indices[1][2];
 }
 
 /// Tabulate the local-to-local mapping from facet dofs to cell dofs
@@ -6855,14 +7499,17 @@ void UFC_SolitaryWave2DBilinearForm_dof_
     case 0:
       dofs[0] = 1;
       dofs[1] = 2;
-      break;
-    case 1:
-      dofs[0] = 0;
-      dofs[1] = 2;
+      dofs[2] = 3;
+      break;
+    case 1:
+      dofs[0] = 0;
+      dofs[1] = 2;
+      dofs[2] = 4;
       break;
     case 2:
       dofs[0] = 0;
       dofs[1] = 1;
+      dofs[2] = 5;
       break;
     }
 }
@@ -6885,6 +7532,12 @@ void UFC_SolitaryWave2DBilinearForm_dof_
     coordinates[1][1] = x[1][1];
     coordinates[2][0] = x[2][0];
     coordinates[2][1] = x[2][1];
+    coordinates[3][0] = 0.5*x[1][0] + 0.5*x[2][0];
+    coordinates[3][1] = 0.5*x[1][1] + 0.5*x[2][1];
+    coordinates[4][0] = 0.5*x[0][0] + 0.5*x[2][0];
+    coordinates[4][1] = 0.5*x[0][1] + 0.5*x[2][1];
+    coordinates[5][0] = 0.5*x[0][0] + 0.5*x[1][0];
+    coordinates[5][1] = 0.5*x[0][1] + 0.5*x[1][1];
 }
 
 /// Return the number of sub dof maps (for a mixed element)
@@ -6915,7 +7568,7 @@ UFC_SolitaryWave2DBilinearForm_dof_map_1
 /// Return a string identifying the dof map
 const char* UFC_SolitaryWave2DBilinearForm_dof_map_1_1::signature() const
 {
-    return "FFC dof map for FiniteElement('Lagrange', 'triangle', 1)";
+    return "FFC dof map for FiniteElement('Lagrange', 'triangle', 2)";
 }
 
 /// Return true iff mesh entities of topological dimension d are needed
@@ -6927,7 +7580,7 @@ bool UFC_SolitaryWave2DBilinearForm_dof_
       return true;
       break;
     case 1:
-      return false;
+      return true;
       break;
     case 2:
       return false;
@@ -6939,7 +7592,7 @@ bool UFC_SolitaryWave2DBilinearForm_dof_
 /// Initialize dof map for mesh (return true iff init_cell() is needed)
 bool UFC_SolitaryWave2DBilinearForm_dof_map_1_1::init_mesh(const ufc::mesh& m)
 {
-    __global_dimension = m.num_entities[0];
+    __global_dimension = m.num_entities[0] + m.num_entities[1];
     return false;
 }
 
@@ -6965,19 +7618,19 @@ unsigned int UFC_SolitaryWave2DBilinearF
 /// Return the dimension of the local finite element function space
 unsigned int UFC_SolitaryWave2DBilinearForm_dof_map_1_1::local_dimension() const
 {
+    return 6;
+}
+
+// Return the geometric dimension of the coordinates this dof map provides
+unsigned int UFC_SolitaryWave2DBilinearForm_dof_map_1_1::geometric_dimension() const
+{
+    return 2;
+}
+
+/// Return the number of dofs on each cell facet
+unsigned int UFC_SolitaryWave2DBilinearForm_dof_map_1_1::num_facet_dofs() const
+{
     return 3;
-}
-
-// Return the geometric dimension of the coordinates this dof map provides
-unsigned int UFC_SolitaryWave2DBilinearForm_dof_map_1_1::geometric_dimension() const
-{
-    return 2;
-}
-
-/// Return the number of dofs on each cell facet
-unsigned int UFC_SolitaryWave2DBilinearForm_dof_map_1_1::num_facet_dofs() const
-{
-    return 2;
 }
 
 /// Return the number of dofs associated with each cell entity of dimension d
@@ -6994,6 +7647,10 @@ void UFC_SolitaryWave2DBilinearForm_dof_
     dofs[0] = c.entity_indices[0][0];
     dofs[1] = c.entity_indices[0][1];
     dofs[2] = c.entity_indices[0][2];
+    unsigned int offset = m.num_entities[0];
+    dofs[3] = offset + c.entity_indices[1][0];
+    dofs[4] = offset + c.entity_indices[1][1];
+    dofs[5] = offset + c.entity_indices[1][2];
 }
 
 /// Tabulate the local-to-local mapping from facet dofs to cell dofs
@@ -7005,14 +7662,17 @@ void UFC_SolitaryWave2DBilinearForm_dof_
     case 0:
       dofs[0] = 1;
       dofs[1] = 2;
-      break;
-    case 1:
-      dofs[0] = 0;
-      dofs[1] = 2;
+      dofs[2] = 3;
+      break;
+    case 1:
+      dofs[0] = 0;
+      dofs[1] = 2;
+      dofs[2] = 4;
       break;
     case 2:
       dofs[0] = 0;
       dofs[1] = 1;
+      dofs[2] = 5;
       break;
     }
 }
@@ -7035,6 +7695,12 @@ void UFC_SolitaryWave2DBilinearForm_dof_
     coordinates[1][1] = x[1][1];
     coordinates[2][0] = x[2][0];
     coordinates[2][1] = x[2][1];
+    coordinates[3][0] = 0.5*x[1][0] + 0.5*x[2][0];
+    coordinates[3][1] = 0.5*x[1][1] + 0.5*x[2][1];
+    coordinates[4][0] = 0.5*x[0][0] + 0.5*x[2][0];
+    coordinates[4][1] = 0.5*x[0][1] + 0.5*x[2][1];
+    coordinates[5][0] = 0.5*x[0][0] + 0.5*x[1][0];
+    coordinates[5][1] = 0.5*x[0][1] + 0.5*x[1][1];
 }
 
 /// Return the number of sub dof maps (for a mixed element)
@@ -7065,7 +7731,7 @@ UFC_SolitaryWave2DBilinearForm_dof_map_1
 /// Return a string identifying the dof map
 const char* UFC_SolitaryWave2DBilinearForm_dof_map_1::signature() const
 {
-    return "FFC dof map for MixedElement([FiniteElement('Lagrange', 'triangle', 1), FiniteElement('Lagrange', 'triangle', 1)])";
+    return "FFC dof map for MixedElement([FiniteElement('Lagrange', 'triangle', 2), FiniteElement('Lagrange', 'triangle', 2)])";
 }
 
 /// Return true iff mesh entities of topological dimension d are needed
@@ -7077,7 +7743,7 @@ bool UFC_SolitaryWave2DBilinearForm_dof_
       return true;
       break;
     case 1:
-      return false;
+      return true;
       break;
     case 2:
       return false;
@@ -7089,7 +7755,7 @@ bool UFC_SolitaryWave2DBilinearForm_dof_
 /// Initialize dof map for mesh (return true iff init_cell() is needed)
 bool UFC_SolitaryWave2DBilinearForm_dof_map_1::init_mesh(const ufc::mesh& m)
 {
-    __global_dimension = 2*m.num_entities[0];
+    __global_dimension = 2*m.num_entities[0] + 2*m.num_entities[1];
     return false;
 }
 
@@ -7115,7 +7781,7 @@ unsigned int UFC_SolitaryWave2DBilinearF
 /// Return the dimension of the local finite element function space
 unsigned int UFC_SolitaryWave2DBilinearForm_dof_map_1::local_dimension() const
 {
-    return 6;
+    return 12;
 }
 
 // Return the geometric dimension of the coordinates this dof map provides
@@ -7127,7 +7793,7 @@ unsigned int UFC_SolitaryWave2DBilinearF
 /// Return the number of dofs on each cell facet
 unsigned int UFC_SolitaryWave2DBilinearForm_dof_map_1::num_facet_dofs() const
 {
-    return 4;
+    return 6;
 }
 
 /// Return the number of dofs associated with each cell entity of dimension d
@@ -7145,9 +7811,17 @@ void UFC_SolitaryWave2DBilinearForm_dof_
     dofs[1] = c.entity_indices[0][1];
     dofs[2] = c.entity_indices[0][2];
     unsigned int offset = m.num_entities[0];
-    dofs[3] = offset + c.entity_indices[0][0];
-    dofs[4] = offset + c.entity_indices[0][1];
-    dofs[5] = offset + c.entity_indices[0][2];
+    dofs[3] = offset + c.entity_indices[1][0];
+    dofs[4] = offset + c.entity_indices[1][1];
+    dofs[5] = offset + c.entity_indices[1][2];
+    offset = offset + m.num_entities[1];
+    dofs[6] = offset + c.entity_indices[0][0];
+    dofs[7] = offset + c.entity_indices[0][1];
+    dofs[8] = offset + c.entity_indices[0][2];
+    offset = offset + m.num_entities[0];
+    dofs[9] = offset + c.entity_indices[1][0];
+    dofs[10] = offset + c.entity_indices[1][1];
+    dofs[11] = offset + c.entity_indices[1][2];
 }
 
 /// Tabulate the local-to-local mapping from facet dofs to cell dofs
@@ -7159,20 +7833,26 @@ void UFC_SolitaryWave2DBilinearForm_dof_
     case 0:
       dofs[0] = 1;
       dofs[1] = 2;
+      dofs[2] = 3;
+      dofs[3] = 7;
+      dofs[4] = 8;
+      dofs[5] = 9;
+      break;
+    case 1:
+      dofs[0] = 0;
+      dofs[1] = 2;
       dofs[2] = 4;
-      dofs[3] = 5;
-      break;
-    case 1:
-      dofs[0] = 0;
-      dofs[1] = 2;
-      dofs[2] = 3;
-      dofs[3] = 5;
+      dofs[3] = 6;
+      dofs[4] = 8;
+      dofs[5] = 10;
       break;
     case 2:
       dofs[0] = 0;
       dofs[1] = 1;
-      dofs[2] = 3;
-      dofs[3] = 4;
+      dofs[2] = 5;
+      dofs[3] = 6;
+      dofs[4] = 7;
+      dofs[5] = 11;
       break;
     }
 }
@@ -7195,12 +7875,24 @@ void UFC_SolitaryWave2DBilinearForm_dof_
     coordinates[1][1] = x[1][1];
     coordinates[2][0] = x[2][0];
     coordinates[2][1] = x[2][1];
-    coordinates[3][0] = x[0][0];
-    coordinates[3][1] = x[0][1];
-    coordinates[4][0] = x[1][0];
-    coordinates[4][1] = x[1][1];
-    coordinates[5][0] = x[2][0];
-    coordinates[5][1] = x[2][1];
+    coordinates[3][0] = 0.5*x[1][0] + 0.5*x[2][0];
+    coordinates[3][1] = 0.5*x[1][1] + 0.5*x[2][1];
+    coordinates[4][0] = 0.5*x[0][0] + 0.5*x[2][0];
+    coordinates[4][1] = 0.5*x[0][1] + 0.5*x[2][1];
+    coordinates[5][0] = 0.5*x[0][0] + 0.5*x[1][0];
+    coordinates[5][1] = 0.5*x[0][1] + 0.5*x[1][1];
+    coordinates[6][0] = x[0][0];
+    coordinates[6][1] = x[0][1];
+    coordinates[7][0] = x[1][0];
+    coordinates[7][1] = x[1][1];
+    coordinates[8][0] = x[2][0];
+    coordinates[8][1] = x[2][1];
+    coordinates[9][0] = 0.5*x[1][0] + 0.5*x[2][0];
+    coordinates[9][1] = 0.5*x[1][1] + 0.5*x[2][1];
+    coordinates[10][0] = 0.5*x[0][0] + 0.5*x[2][0];
+    coordinates[10][1] = 0.5*x[0][1] + 0.5*x[2][1];
+    coordinates[11][0] = 0.5*x[0][0] + 0.5*x[1][0];
+    coordinates[11][1] = 0.5*x[0][1] + 0.5*x[1][1];
 }
 
 /// Return the number of sub dof maps (for a mixed element)
@@ -7240,7 +7932,7 @@ UFC_SolitaryWave2DBilinearForm_dof_map_2
 /// Return a string identifying the dof map
 const char* UFC_SolitaryWave2DBilinearForm_dof_map_2_0::signature() const
 {
-    return "FFC dof map for FiniteElement('Lagrange', 'triangle', 1)";
+    return "FFC dof map for FiniteElement('Lagrange', 'triangle', 2)";
 }
 
 /// Return true iff mesh entities of topological dimension d are needed
@@ -7252,7 +7944,7 @@ bool UFC_SolitaryWave2DBilinearForm_dof_
       return true;
       break;
     case 1:
-      return false;
+      return true;
       break;
     case 2:
       return false;
@@ -7264,7 +7956,7 @@ bool UFC_SolitaryWave2DBilinearForm_dof_
 /// Initialize dof map for mesh (return true iff init_cell() is needed)
 bool UFC_SolitaryWave2DBilinearForm_dof_map_2_0::init_mesh(const ufc::mesh& m)
 {
-    __global_dimension = m.num_entities[0];
+    __global_dimension = m.num_entities[0] + m.num_entities[1];
     return false;
 }
 
@@ -7290,19 +7982,19 @@ unsigned int UFC_SolitaryWave2DBilinearF
 /// Return the dimension of the local finite element function space
 unsigned int UFC_SolitaryWave2DBilinearForm_dof_map_2_0::local_dimension() const
 {
+    return 6;
+}
+
+// Return the geometric dimension of the coordinates this dof map provides
+unsigned int UFC_SolitaryWave2DBilinearForm_dof_map_2_0::geometric_dimension() const
+{
+    return 2;
+}
+
+/// Return the number of dofs on each cell facet
+unsigned int UFC_SolitaryWave2DBilinearForm_dof_map_2_0::num_facet_dofs() const
+{
     return 3;
-}
-
-// Return the geometric dimension of the coordinates this dof map provides
-unsigned int UFC_SolitaryWave2DBilinearForm_dof_map_2_0::geometric_dimension() const
-{
-    return 2;
-}
-
-/// Return the number of dofs on each cell facet
-unsigned int UFC_SolitaryWave2DBilinearForm_dof_map_2_0::num_facet_dofs() const
-{
-    return 2;
 }
 
 /// Return the number of dofs associated with each cell entity of dimension d
@@ -7319,6 +8011,10 @@ void UFC_SolitaryWave2DBilinearForm_dof_
     dofs[0] = c.entity_indices[0][0];
     dofs[1] = c.entity_indices[0][1];
     dofs[2] = c.entity_indices[0][2];
+    unsigned int offset = m.num_entities[0];
+    dofs[3] = offset + c.entity_indices[1][0];
+    dofs[4] = offset + c.entity_indices[1][1];
+    dofs[5] = offset + c.entity_indices[1][2];
 }
 
 /// Tabulate the local-to-local mapping from facet dofs to cell dofs
@@ -7330,14 +8026,17 @@ void UFC_SolitaryWave2DBilinearForm_dof_
     case 0:
       dofs[0] = 1;
       dofs[1] = 2;
-      break;
-    case 1:
-      dofs[0] = 0;
-      dofs[1] = 2;
+      dofs[2] = 3;
+      break;
+    case 1:
+      dofs[0] = 0;
+      dofs[1] = 2;
+      dofs[2] = 4;
       break;
     case 2:
       dofs[0] = 0;
       dofs[1] = 1;
+      dofs[2] = 5;
       break;
     }
 }
@@ -7360,6 +8059,12 @@ void UFC_SolitaryWave2DBilinearForm_dof_
     coordinates[1][1] = x[1][1];
     coordinates[2][0] = x[2][0];
     coordinates[2][1] = x[2][1];
+    coordinates[3][0] = 0.5*x[1][0] + 0.5*x[2][0];
+    coordinates[3][1] = 0.5*x[1][1] + 0.5*x[2][1];
+    coordinates[4][0] = 0.5*x[0][0] + 0.5*x[2][0];
+    coordinates[4][1] = 0.5*x[0][1] + 0.5*x[2][1];
+    coordinates[5][0] = 0.5*x[0][0] + 0.5*x[1][0];
+    coordinates[5][1] = 0.5*x[0][1] + 0.5*x[1][1];
 }
 
 /// Return the number of sub dof maps (for a mixed element)
@@ -7390,7 +8095,7 @@ UFC_SolitaryWave2DBilinearForm_dof_map_2
 /// Return a string identifying the dof map
 const char* UFC_SolitaryWave2DBilinearForm_dof_map_2_1::signature() const
 {
-    return "FFC dof map for FiniteElement('Lagrange', 'triangle', 1)";
+    return "FFC dof map for FiniteElement('Lagrange', 'triangle', 2)";
 }
 
 /// Return true iff mesh entities of topological dimension d are needed
@@ -7402,7 +8107,7 @@ bool UFC_SolitaryWave2DBilinearForm_dof_
       return true;
       break;
     case 1:
-      return false;
+      return true;
       break;
     case 2:
       return false;
@@ -7414,7 +8119,7 @@ bool UFC_SolitaryWave2DBilinearForm_dof_
 /// Initialize dof map for mesh (return true iff init_cell() is needed)
 bool UFC_SolitaryWave2DBilinearForm_dof_map_2_1::init_mesh(const ufc::mesh& m)
 {
-    __global_dimension = m.num_entities[0];
+    __global_dimension = m.num_entities[0] + m.num_entities[1];
     return false;
 }
 
@@ -7440,19 +8145,19 @@ unsigned int UFC_SolitaryWave2DBilinearF
 /// Return the dimension of the local finite element function space
 unsigned int UFC_SolitaryWave2DBilinearForm_dof_map_2_1::local_dimension() const
 {
+    return 6;
+}
+
+// Return the geometric dimension of the coordinates this dof map provides
+unsigned int UFC_SolitaryWave2DBilinearForm_dof_map_2_1::geometric_dimension() const
+{
+    return 2;
+}
+
+/// Return the number of dofs on each cell facet
+unsigned int UFC_SolitaryWave2DBilinearForm_dof_map_2_1::num_facet_dofs() const
+{
     return 3;
-}
-
-// Return the geometric dimension of the coordinates this dof map provides
-unsigned int UFC_SolitaryWave2DBilinearForm_dof_map_2_1::geometric_dimension() const
-{
-    return 2;
-}
-
-/// Return the number of dofs on each cell facet
-unsigned int UFC_SolitaryWave2DBilinearForm_dof_map_2_1::num_facet_dofs() const
-{
-    return 2;
 }
 
 /// Return the number of dofs associated with each cell entity of dimension d
@@ -7469,6 +8174,10 @@ void UFC_SolitaryWave2DBilinearForm_dof_
     dofs[0] = c.entity_indices[0][0];
     dofs[1] = c.entity_indices[0][1];
     dofs[2] = c.entity_indices[0][2];
+    unsigned int offset = m.num_entities[0];
+    dofs[3] = offset + c.entity_indices[1][0];
+    dofs[4] = offset + c.entity_indices[1][1];
+    dofs[5] = offset + c.entity_indices[1][2];
 }
 
 /// Tabulate the local-to-local mapping from facet dofs to cell dofs
@@ -7480,14 +8189,17 @@ void UFC_SolitaryWave2DBilinearForm_dof_
     case 0:
       dofs[0] = 1;
       dofs[1] = 2;
-      break;
-    case 1:
-      dofs[0] = 0;
-      dofs[1] = 2;
+      dofs[2] = 3;
+      break;
+    case 1:
+      dofs[0] = 0;
+      dofs[1] = 2;
+      dofs[2] = 4;
       break;
     case 2:
       dofs[0] = 0;
       dofs[1] = 1;
+      dofs[2] = 5;
       break;
     }
 }
@@ -7510,6 +8222,12 @@ void UFC_SolitaryWave2DBilinearForm_dof_
     coordinates[1][1] = x[1][1];
     coordinates[2][0] = x[2][0];
     coordinates[2][1] = x[2][1];
+    coordinates[3][0] = 0.5*x[1][0] + 0.5*x[2][0];
+    coordinates[3][1] = 0.5*x[1][1] + 0.5*x[2][1];
+    coordinates[4][0] = 0.5*x[0][0] + 0.5*x[2][0];
+    coordinates[4][1] = 0.5*x[0][1] + 0.5*x[2][1];
+    coordinates[5][0] = 0.5*x[0][0] + 0.5*x[1][0];
+    coordinates[5][1] = 0.5*x[0][1] + 0.5*x[1][1];
 }
 
 /// Return the number of sub dof maps (for a mixed element)
@@ -7540,7 +8258,7 @@ UFC_SolitaryWave2DBilinearForm_dof_map_2
 /// Return a string identifying the dof map
 const char* UFC_SolitaryWave2DBilinearForm_dof_map_2::signature() const
 {
-    return "FFC dof map for MixedElement([FiniteElement('Lagrange', 'triangle', 1), FiniteElement('Lagrange', 'triangle', 1)])";
+    return "FFC dof map for MixedElement([FiniteElement('Lagrange', 'triangle', 2), FiniteElement('Lagrange', 'triangle', 2)])";
 }
 
 /// Return true iff mesh entities of topological dimension d are needed
@@ -7552,7 +8270,7 @@ bool UFC_SolitaryWave2DBilinearForm_dof_
       return true;
       break;
     case 1:
-      return false;
+      return true;
       break;
     case 2:
       return false;
@@ -7564,7 +8282,7 @@ bool UFC_SolitaryWave2DBilinearForm_dof_
 /// Initialize dof map for mesh (return true iff init_cell() is needed)
 bool UFC_SolitaryWave2DBilinearForm_dof_map_2::init_mesh(const ufc::mesh& m)
 {
-    __global_dimension = 2*m.num_entities[0];
+    __global_dimension = 2*m.num_entities[0] + 2*m.num_entities[1];
     return false;
 }
 
@@ -7590,7 +8308,7 @@ unsigned int UFC_SolitaryWave2DBilinearF
 /// Return the dimension of the local finite element function space
 unsigned int UFC_SolitaryWave2DBilinearForm_dof_map_2::local_dimension() const
 {
-    return 6;
+    return 12;
 }
 
 // Return the geometric dimension of the coordinates this dof map provides
@@ -7602,7 +8320,7 @@ unsigned int UFC_SolitaryWave2DBilinearF
 /// Return the number of dofs on each cell facet
 unsigned int UFC_SolitaryWave2DBilinearForm_dof_map_2::num_facet_dofs() const
 {
-    return 4;
+    return 6;
 }
 
 /// Return the number of dofs associated with each cell entity of dimension d
@@ -7620,9 +8338,17 @@ void UFC_SolitaryWave2DBilinearForm_dof_
     dofs[1] = c.entity_indices[0][1];
     dofs[2] = c.entity_indices[0][2];
     unsigned int offset = m.num_entities[0];
-    dofs[3] = offset + c.entity_indices[0][0];
-    dofs[4] = offset + c.entity_indices[0][1];
-    dofs[5] = offset + c.entity_indices[0][2];
+    dofs[3] = offset + c.entity_indices[1][0];
+    dofs[4] = offset + c.entity_indices[1][1];
+    dofs[5] = offset + c.entity_indices[1][2];
+    offset = offset + m.num_entities[1];
+    dofs[6] = offset + c.entity_indices[0][0];
+    dofs[7] = offset + c.entity_indices[0][1];
+    dofs[8] = offset + c.entity_indices[0][2];
+    offset = offset + m.num_entities[0];
+    dofs[9] = offset + c.entity_indices[1][0];
+    dofs[10] = offset + c.entity_indices[1][1];
+    dofs[11] = offset + c.entity_indices[1][2];
 }
 
 /// Tabulate the local-to-local mapping from facet dofs to cell dofs
@@ -7634,20 +8360,26 @@ void UFC_SolitaryWave2DBilinearForm_dof_
     case 0:
       dofs[0] = 1;
       dofs[1] = 2;
+      dofs[2] = 3;
+      dofs[3] = 7;
+      dofs[4] = 8;
+      dofs[5] = 9;
+      break;
+    case 1:
+      dofs[0] = 0;
+      dofs[1] = 2;
       dofs[2] = 4;
-      dofs[3] = 5;
-      break;
-    case 1:
-      dofs[0] = 0;
-      dofs[1] = 2;
-      dofs[2] = 3;
-      dofs[3] = 5;
+      dofs[3] = 6;
+      dofs[4] = 8;
+      dofs[5] = 10;
       break;
     case 2:
       dofs[0] = 0;
       dofs[1] = 1;
-      dofs[2] = 3;
-      dofs[3] = 4;
+      dofs[2] = 5;
+      dofs[3] = 6;
+      dofs[4] = 7;
+      dofs[5] = 11;
       break;
     }
 }
@@ -7670,12 +8402,24 @@ void UFC_SolitaryWave2DBilinearForm_dof_
     coordinates[1][1] = x[1][1];
     coordinates[2][0] = x[2][0];
     coordinates[2][1] = x[2][1];
-    coordinates[3][0] = x[0][0];
-    coordinates[3][1] = x[0][1];
-    coordinates[4][0] = x[1][0];
-    coordinates[4][1] = x[1][1];
-    coordinates[5][0] = x[2][0];
-    coordinates[5][1] = x[2][1];
+    coordinates[3][0] = 0.5*x[1][0] + 0.5*x[2][0];
+    coordinates[3][1] = 0.5*x[1][1] + 0.5*x[2][1];
+    coordinates[4][0] = 0.5*x[0][0] + 0.5*x[2][0];
+    coordinates[4][1] = 0.5*x[0][1] + 0.5*x[2][1];
+    coordinates[5][0] = 0.5*x[0][0] + 0.5*x[1][0];
+    coordinates[5][1] = 0.5*x[0][1] + 0.5*x[1][1];
+    coordinates[6][0] = x[0][0];
+    coordinates[6][1] = x[0][1];
+    coordinates[7][0] = x[1][0];
+    coordinates[7][1] = x[1][1];
+    coordinates[8][0] = x[2][0];
+    coordinates[8][1] = x[2][1];
+    coordinates[9][0] = 0.5*x[1][0] + 0.5*x[2][0];
+    coordinates[9][1] = 0.5*x[1][1] + 0.5*x[2][1];
+    coordinates[10][0] = 0.5*x[0][0] + 0.5*x[2][0];
+    coordinates[10][1] = 0.5*x[0][1] + 0.5*x[2][1];
+    coordinates[11][0] = 0.5*x[0][0] + 0.5*x[1][0];
+    coordinates[11][1] = 0.5*x[0][1] + 0.5*x[1][1];
 }
 
 /// Return the number of sub dof maps (for a mixed element)
@@ -8458,52 +9202,73 @@ void UFC_SolitaryWave2DBilinearForm_cell
     
     
     // Array of quadrature weights
-    const static double W4[4] = {0.159020690871988, 0.0909793091280113, 0.159020690871988, 0.0909793091280113};
-    
-    
-    const static double FE1_C0[4][3] = \
-    {{0.666390246014701, 0.178558728263616, 0.155051025721682},
-    {0.280019915499074, 0.0750311102226082, 0.644948974278318},
-    {0.178558728263616, 0.666390246014701, 0.155051025721682},
-    {0.0750311102226081, 0.280019915499074, 0.644948974278318}};
-    // Array of non-zero columns
-    static const unsigned int nzc0[3] = {0, 1, 2};
-    // Array of non-zero columns
-    static const unsigned int nzc3[3] = {3, 4, 5};
-    
-    const static double FE1_C1_D01[4][2] = \
-    {{-1, 1},
-    {-1, 1},
-    {-1, 1},
-    {-1, 1}};
-    // Array of non-zero columns
-    static const unsigned int nzc1[2] = {3, 5};
-    // Array of non-zero columns
-    static const unsigned int nzc2[2] = {3, 4};
-    // Array of non-zero columns
-    static const unsigned int nzc4[2] = {0, 2};
-    // Array of non-zero columns
-    static const unsigned int nzc5[2] = {0, 1};
+    const static double W9[9] = {0.0558144204830443, 0.063678085099885, 0.0193963833059595, 0.0893030727728709, 0.101884936159816, 0.0310342132895351, 0.0558144204830443, 0.063678085099885, 0.0193963833059595};
+    
+    
+    const static double FE0_C1_D01[9][5] = \
+    {{-2.23477754271068, -0.645648161949184, 0.410870619238505, 2.88042570465986, -0.410870619238505},
+    {-1.0959162708804, 0.63786745776294, 0.266216271356658, 0.458048813117464, -0.266216271356658},
+    {0.246362376191711, 2.15063784704339, 0.0957245291483235, -2.3970002232351, -0.0957245291483223},
+    {-0.822824080974591, -0.645648161949185, 1.82282408097459, 1.46847224292378, -1.82282408097459},
+    {-0.18106627111853, 0.637867457762939, 1.18106627111853, -0.456801186644408, -1.18106627111853},
+    {0.575318923521695, 2.15063784704339, 0.424681076478307, -2.72595677056508, -0.424681076478306},
+    {0.589129380761496, -0.645648161949184, 3.23477754271068, 0.0565187811876888, -3.23477754271068},
+    {0.733783728643343, 0.637867457762939, 2.0959162708804, -1.37165118640628, -2.0959162708804},
+    {0.904275470851678, 2.15063784704339, 0.75363762380829, -3.05491331789507, -0.753637623808289}};
+    // Array of non-zero columns
+    static const unsigned int nzc0[5] = {6, 8, 9, 10, 11};
+    // Array of non-zero columns
+    static const unsigned int nzc3[5] = {0, 2, 3, 4, 5};
+    
+    const static double FE0_C1_D10[9][5] = \
+    {{-2.23477754271068, -0.589129380761495, 0.354351838050815, -0.354351838050815, 2.82390692347217},
+    {-1.0959162708804, -0.733783728643342, 1.63786745776294, -1.63786745776294, 1.82969999952375},
+    {0.246362376191711, -0.904275470851678, 3.15063784704339, -3.15063784704339, 0.657913094659967},
+    {-0.822824080974592, 0.822824080974592, 0.354351838050816, -0.354351838050816, 0},
+    {-0.18106627111853, 0.181066271118531, 1.63786745776294, -1.63786745776294, 0},
+    {0.575318923521695, -0.575318923521694, 3.15063784704339, -3.15063784704339, 0},
+    {0.589129380761495, 2.23477754271068, 0.354351838050816, -0.354351838050816, -2.82390692347217},
+    {0.733783728643342, 1.0959162708804, 1.63786745776294, -1.63786745776294, -1.82969999952375},
+    {0.904275470851678, -0.246362376191711, 3.15063784704339, -3.15063784704339, -0.657913094659967}};
+    // Array of non-zero columns
+    static const unsigned int nzc1[5] = {6, 7, 9, 10, 11};
+    // Array of non-zero columns
+    static const unsigned int nzc2[5] = {0, 1, 3, 4, 5};
+    
+    const static double FE0_C1[9][6] = \
+    {{0.499278833175498, -0.0816158215904472, -0.072892306371455, 0.0363981897820602, 0.286562341986258, 0.332268763018087},
+    {0.0251290590975512, -0.0576951799472843, -0.0741406382908806, 0.109006741895515, 0.858208263567716, 0.139491753677383},
+    {-0.117413197449647, -0.022785734101997, 0.453155393641927, 0.0753983311062782, 0.593609805131561, 0.0180354016718773},
+    {-0.0403700664710397, -0.0403700664710397, -0.072892306371455, 0.161480265884159, 0.161480265884159, 0.830671907545216},
+    {-0.120901875682904, -0.120901875682904, -0.0741406382908806, 0.483607502731615, 0.483607502731615, 0.348729384193458},
+    {-0.0836260170297298, -0.0836260170297298, 0.453155393641927, 0.33450406811892, 0.33450406811892, 0.0450885041796933},
+    {-0.0816158215904471, 0.499278833175498, -0.072892306371455, 0.286562341986258, 0.0363981897820602, 0.332268763018087},
+    {-0.0576951799472841, 0.0251290590975512, -0.0741406382908806, 0.858208263567716, 0.109006741895515, 0.139491753677383},
+    {-0.022785734101997, -0.117413197449647, 0.453155393641927, 0.593609805131561, 0.0753983311062783, 0.0180354016718774}};
+    // Array of non-zero columns
+    static const unsigned int nzc4[6] = {6, 7, 8, 9, 10, 11};
+    // Array of non-zero columns
+    static const unsigned int nzc5[6] = {0, 1, 2, 3, 4, 5};
     
     // Number of operations to compute geometry constants: 41
-    const double G0 = det*(Jinv_00*Jinv_10 + Jinv_01*Jinv_11);
-    const double G1 = det*(Jinv_10*Jinv_10 + Jinv_11*Jinv_11);
-    const double G2 =  - 0.5*det*w[1][0]*w[2][0];
-    const double G3 = det*(3*Jinv_00*Jinv_00 + 3*Jinv_01*Jinv_01);
-    const double G4 = det*(3*Jinv_00*Jinv_10 + 3*Jinv_01*Jinv_11);
-    const double G5 =  - 3*Jinv_01*det;
-    const double G6 = det*(3*Jinv_10*Jinv_10 + 3*Jinv_11*Jinv_11);
+    const double G0 = det*(Jinv_00*Jinv_00 + Jinv_01*Jinv_01);
+    const double G1 = det*(Jinv_00*Jinv_10 + Jinv_01*Jinv_11);
+    const double G2 = det*(Jinv_10*Jinv_10 + Jinv_11*Jinv_11);
+    const double G3 = det*w[2][0];
+    const double G4 =  - 0.5*det*w[1][0]*w[2][0];
+    const double G5 = det*(3*Jinv_10*Jinv_10 + 3*Jinv_11*Jinv_11);
+    const double G6 = det*(3*Jinv_00*Jinv_10 + 3*Jinv_01*Jinv_11);
     const double G7 =  - 3*Jinv_11*det;
-    const double G8 = det*w[2][0];
-    const double G9 = det*(Jinv_00*Jinv_00 + Jinv_01*Jinv_01);
+    const double G8 = det*(3*Jinv_00*Jinv_00 + 3*Jinv_01*Jinv_01);
+    const double G9 =  - 3*Jinv_01*det;
     
     // Compute element tensor using UFL quadrature representation
     // Optimisations: ('simplify expressions', True), ('ignore zero tables', True), ('non zero columns', True), ('remove zero terms', True), ('ignore ones', True)
-    // Total number of operations to compute element tensor: 873
+    // Total number of operations to compute element tensor: 7826
     
     // Loop quadrature points for integral
-    // Number of operations to compute element tensor for following IP loop = 832
-    for (unsigned int ip = 0; ip < 4; ip++)
+    // Number of operations to compute element tensor for following IP loop = 7785
+    for (unsigned int ip = 0; ip < 9; ip++)
     {
       
       // Function declarations
@@ -8511,84 +9276,84 @@ void UFC_SolitaryWave2DBilinearForm_cell
       double F1 = 0;
       double F2 = 0;
       
-      // Total number of operations to compute function values = 8
-      for (unsigned int r = 0; r < 2; r++)
-      {
-        F1 += FE1_C1_D01[ip][r]*w[0][nzc5[r]];
-        F2 += FE1_C1_D01[ip][r]*w[0][nzc4[r]];
+      // Total number of operations to compute function values = 20
+      for (unsigned int r = 0; r < 5; r++)
+      {
+        F1 += FE0_C1_D10[ip][r]*w[0][nzc2[r]];
+        F2 += FE0_C1_D01[ip][r]*w[0][nzc3[r]];
       }// end loop over 'r'
       
-      // Total number of operations to compute function values = 6
-      for (unsigned int r = 0; r < 3; r++)
-      {
-        F0 += FE1_C0[ip][r]*w[0][nzc3[r]];
+      // Total number of operations to compute function values = 12
+      for (unsigned int r = 0; r < 6; r++)
+      {
+        F0 += FE0_C1[ip][r]*w[0][nzc4[r]];
       }// end loop over 'r'
       
       // Number of operations to compute ip constants: 29
+      // Number of operations: 4
+      const double Gip0 = F0*F0*F0*W9[ip]*G0;
+      
+      // Number of operations: 4
+      const double Gip1 = F0*F0*F0*W9[ip]*G1;
+      
       // Number of operations: 1
-      const double Gip0 = W4[ip]*det;
+      const double Gip2 = W9[ip]*det;
       
       // Number of operations: 4
-      const double Gip1 = F0*F0*F0*W4[ip]*G0;
-      
-      // Number of operations: 4
-      const double Gip2 = F0*F0*F0*W4[ip]*G1;
+      const double Gip3 = F0*F0*F0*W9[ip]*G2;
       
       // Number of operations: 1
-      const double Gip3 = W4[ip]*G2;
+      const double Gip4 = W9[ip]*G3;
+      
+      // Number of operations: 1
+      const double Gip5 = W9[ip]*G4;
       
       // Number of operations: 7
-      const double Gip4 = F0*F0*W4[ip]*(G5 + F1*G3 + F2*G4);
+      const double Gip6 = F0*F0*W9[ip]*(G7 + F1*G6 + F2*G5);
       
       // Number of operations: 7
-      const double Gip5 = F0*F0*W4[ip]*(G7 + F1*G4 + F2*G6);
-      
-      // Number of operations: 1
-      const double Gip6 = W4[ip]*G8;
-      
-      // Number of operations: 4
-      const double Gip7 = F0*F0*F0*W4[ip]*G9;
-      
-      
-      // Number of operations for primary indices = 81
-      for (unsigned int j = 0; j < 3; j++)
-      {
-        for (unsigned int k = 0; k < 3; k++)
+      const double Gip7 = F0*F0*W9[ip]*(G9 + F1*G8 + F2*G6);
+      
+      
+      // Number of operations for primary indices = 324
+      for (unsigned int j = 0; j < 6; j++)
+      {
+        for (unsigned int k = 0; k < 6; k++)
         {
           // Number of operations to compute entry = 3
-          A[nzc3[j]*6 + nzc3[k]] += FE1_C0[ip][j]*FE1_C0[ip][k]*Gip0;
+          A[nzc4[j]*12 + nzc4[k]] += FE0_C1[ip][j]*FE0_C1[ip][k]*Gip2;
           // Number of operations to compute entry = 3
-          A[nzc3[j]*6 + nzc0[k]] += FE1_C0[ip][j]*FE1_C0[ip][k]*Gip3;
+          A[nzc5[j]*12 + nzc5[k]] += FE0_C1[ip][j]*FE0_C1[ip][k]*Gip4;
           // Number of operations to compute entry = 3
-          A[nzc0[j]*6 + nzc0[k]] += FE1_C0[ip][j]*FE1_C0[ip][k]*Gip6;
+          A[nzc4[j]*12 + nzc5[k]] += FE0_C1[ip][j]*FE0_C1[ip][k]*Gip5;
         }// end loop over 'k'
       }// end loop over 'j'
       
-      // Number of operations for primary indices = 48
-      for (unsigned int j = 0; j < 2; j++)
-      {
-        for (unsigned int k = 0; k < 2; k++)
+      // Number of operations for primary indices = 180
+      for (unsigned int j = 0; j < 5; j++)
+      {
+        for (unsigned int k = 0; k < 6; k++)
         {
           // Number of operations to compute entry = 3
-          A[nzc5[j]*6 + nzc4[k]] += FE1_C1_D01[ip][j]*FE1_C1_D01[ip][k]*Gip1;
+          A[nzc3[j]*12 + nzc4[k]] += FE0_C1[ip][k]*FE0_C1_D01[ip][j]*Gip6;
           // Number of operations to compute entry = 3
-          A[nzc4[j]*6 + nzc4[k]] += FE1_C1_D01[ip][j]*FE1_C1_D01[ip][k]*Gip2;
-          // Number of operations to compute entry = 3
-          A[nzc4[j]*6 + nzc5[k]] += FE1_C1_D01[ip][j]*FE1_C1_D01[ip][k]*Gip1;
-          // Number of operations to compute entry = 3
-          A[nzc5[j]*6 + nzc5[k]] += FE1_C1_D01[ip][j]*FE1_C1_D01[ip][k]*Gip7;
+          A[nzc2[j]*12 + nzc4[k]] += FE0_C1[ip][k]*FE0_C1_D10[ip][j]*Gip7;
         }// end loop over 'k'
       }// end loop over 'j'
       
-      // Number of operations for primary indices = 36
-      for (unsigned int j = 0; j < 2; j++)
-      {
-        for (unsigned int k = 0; k < 3; k++)
+      // Number of operations for primary indices = 300
+      for (unsigned int j = 0; j < 5; j++)
+      {
+        for (unsigned int k = 0; k < 5; k++)
         {
           // Number of operations to compute entry = 3
-          A[nzc5[j]*6 + nzc3[k]] += FE1_C0[ip][k]*FE1_C1_D01[ip][j]*Gip4;
+          A[nzc2[j]*12 + nzc2[k]] += FE0_C1_D10[ip][j]*FE0_C1_D10[ip][k]*Gip0;
           // Number of operations to compute entry = 3
-          A[nzc4[j]*6 + nzc3[k]] += FE1_C0[ip][k]*FE1_C1_D01[ip][j]*Gip5;
+          A[nzc3[j]*12 + nzc2[k]] += FE0_C1_D01[ip][j]*FE0_C1_D10[ip][k]*Gip1;
+          // Number of operations to compute entry = 3
+          A[nzc3[j]*12 + nzc3[k]] += FE0_C1_D01[ip][j]*FE0_C1_D01[ip][k]*Gip3;
+          // Number of operations to compute entry = 3
+          A[nzc2[j]*12 + nzc3[k]] += FE0_C1_D01[ip][k]*FE0_C1_D10[ip][j]*Gip1;
         }// end loop over 'k'
       }// end loop over 'j'
     }// end loop over 'ip'
@@ -8648,6 +9413,114 @@ void UFC_SolitaryWave2DBilinearForm_cell
     A[33] = 0;
     A[34] = 0;
     A[35] = 0;
+    A[36] = 0;
+    A[37] = 0;
+    A[38] = 0;
+    A[39] = 0;
+    A[40] = 0;
+    A[41] = 0;
+    A[42] = 0;
+    A[43] = 0;
+    A[44] = 0;
+    A[45] = 0;
+    A[46] = 0;
+    A[47] = 0;
+    A[48] = 0;
+    A[49] = 0;
+    A[50] = 0;
+    A[51] = 0;
+    A[52] = 0;
+    A[53] = 0;
+    A[54] = 0;
+    A[55] = 0;
+    A[56] = 0;
+    A[57] = 0;
+    A[58] = 0;
+    A[59] = 0;
+    A[60] = 0;
+    A[61] = 0;
+    A[62] = 0;
+    A[63] = 0;
+    A[64] = 0;
+    A[65] = 0;
+    A[66] = 0;
+    A[67] = 0;
+    A[68] = 0;
+    A[69] = 0;
+    A[70] = 0;
+    A[71] = 0;
+    A[72] = 0;
+    A[73] = 0;
+    A[74] = 0;
+    A[75] = 0;
+    A[76] = 0;
+    A[77] = 0;
+    A[78] = 0;
+    A[79] = 0;
+    A[80] = 0;
+    A[81] = 0;
+    A[82] = 0;
+    A[83] = 0;
+    A[84] = 0;
+    A[85] = 0;
+    A[86] = 0;
+    A[87] = 0;
+    A[88] = 0;
+    A[89] = 0;
+    A[90] = 0;
+    A[91] = 0;
+    A[92] = 0;
+    A[93] = 0;
+    A[94] = 0;
+    A[95] = 0;
+    A[96] = 0;
+    A[97] = 0;
+    A[98] = 0;
+    A[99] = 0;
+    A[100] = 0;
+    A[101] = 0;
+    A[102] = 0;
+    A[103] = 0;
+    A[104] = 0;
+    A[105] = 0;
+    A[106] = 0;
+    A[107] = 0;
+    A[108] = 0;
+    A[109] = 0;
+    A[110] = 0;
+    A[111] = 0;
+    A[112] = 0;
+    A[113] = 0;
+    A[114] = 0;
+    A[115] = 0;
+    A[116] = 0;
+    A[117] = 0;
+    A[118] = 0;
+    A[119] = 0;
+    A[120] = 0;
+    A[121] = 0;
+    A[122] = 0;
+    A[123] = 0;
+    A[124] = 0;
+    A[125] = 0;
+    A[126] = 0;
+    A[127] = 0;
+    A[128] = 0;
+    A[129] = 0;
+    A[130] = 0;
+    A[131] = 0;
+    A[132] = 0;
+    A[133] = 0;
+    A[134] = 0;
+    A[135] = 0;
+    A[136] = 0;
+    A[137] = 0;
+    A[138] = 0;
+    A[139] = 0;
+    A[140] = 0;
+    A[141] = 0;
+    A[142] = 0;
+    A[143] = 0;
     
     // Add all contributions to element tensor
     integral_0_quadrature.tabulate_tensor(A, w, c);
@@ -8694,24 +9567,25 @@ void UFC_SolitaryWave2DBilinearForm_exte
     
     
     // Array of quadrature weights
-    const static double W2[2] = {0.5, 0.5};
-    
-    
-    const static double FE1_f0_C0[2][2] = \
-    {{0.788675134594813, 0.211324865405187},
-    {0.211324865405187, 0.788675134594813}};
-    // Array of non-zero columns
-    static const unsigned int nzc2[2] = {1, 2};
-    // Array of non-zero columns
-    static const unsigned int nzc3[2] = {4, 5};
-    // Array of non-zero columns
-    static const unsigned int nzc4[2] = {0, 1};
-    // Array of non-zero columns
-    static const unsigned int nzc5[2] = {3, 4};
-    // Array of non-zero columns
-    static const unsigned int nzc6[2] = {3, 5};
-    // Array of non-zero columns
-    static const unsigned int nzc7[2] = {0, 2};
+    const static double W3[3] = {0.277777777777778, 0.444444444444444, 0.277777777777778};
+    
+    
+    const static double FE0_f0_C1[3][3] = \
+    {{0.687298334620742, -0.0872983346207417, 0.4},
+    {0, 0, 1},
+    {-0.0872983346207416, 0.687298334620742, 0.4}};
+    // Array of non-zero columns
+    static const unsigned int nzc0[3] = {7, 8, 9};
+    // Array of non-zero columns
+    static const unsigned int nzc1[3] = {1, 2, 3};
+    // Array of non-zero columns
+    static const unsigned int nzc2[3] = {6, 7, 11};
+    // Array of non-zero columns
+    static const unsigned int nzc3[3] = {0, 1, 5};
+    // Array of non-zero columns
+    static const unsigned int nzc6[3] = {0, 2, 4};
+    // Array of non-zero columns
+    static const unsigned int nzc7[3] = {6, 8, 10};
     
     // Number of operations to compute geometry constants: 2
     // Should be added to total operation count.
@@ -8723,34 +9597,34 @@ void UFC_SolitaryWave2DBilinearForm_exte
     {
     case 0:
       {
-      // Total number of operations to compute element tensor (from this point): 38
+      // Total number of operations to compute element tensor (from this point): 108
       
       // Loop quadrature points for integral
-      // Number of operations to compute element tensor for following IP loop = 38
-      for (unsigned int ip = 0; ip < 2; ip++)
+      // Number of operations to compute element tensor for following IP loop = 108
+      for (unsigned int ip = 0; ip < 3; ip++)
       {
         
         // Function declarations
         double F0 = 0;
         
-        // Total number of operations to compute function values = 4
-        for (unsigned int r = 0; r < 2; r++)
-        {
-          F0 += FE1_f0_C0[ip][r]*w[0][nzc3[r]];
+        // Total number of operations to compute function values = 6
+        for (unsigned int r = 0; r < 3; r++)
+        {
+          F0 += FE0_f0_C1[ip][r]*w[0][nzc0[r]];
         }// end loop over 'r'
         
         // Number of operations to compute ip constants: 3
         // Number of operations: 3
-        const double Gip0 = F0*F0*W2[ip]*G0;
-        
-        
-        // Number of operations for primary indices = 12
-        for (unsigned int j = 0; j < 2; j++)
-        {
-          for (unsigned int k = 0; k < 2; k++)
+        const double Gip0 = F0*F0*W3[ip]*G0;
+        
+        
+        // Number of operations for primary indices = 27
+        for (unsigned int j = 0; j < 3; j++)
+        {
+          for (unsigned int k = 0; k < 3; k++)
           {
             // Number of operations to compute entry = 3
-            A[nzc2[j]*6 + nzc3[k]] += FE1_f0_C0[ip][j]*FE1_f0_C0[ip][k]*Gip0;
+            A[nzc1[j]*12 + nzc0[k]] += FE0_f0_C1[ip][j]*FE0_f0_C1[ip][k]*Gip0;
           }// end loop over 'k'
         }// end loop over 'j'
       }// end loop over 'ip'
@@ -8758,34 +9632,34 @@ void UFC_SolitaryWave2DBilinearForm_exte
       break;
     case 1:
       {
-      // Total number of operations to compute element tensor (from this point): 38
+      // Total number of operations to compute element tensor (from this point): 108
       
       // Loop quadrature points for integral
-      // Number of operations to compute element tensor for following IP loop = 38
-      for (unsigned int ip = 0; ip < 2; ip++)
+      // Number of operations to compute element tensor for following IP loop = 108
+      for (unsigned int ip = 0; ip < 3; ip++)
       {
         
         // Function declarations
         double F0 = 0;
         
-        // Total number of operations to compute function values = 4
-        for (unsigned int r = 0; r < 2; r++)
-        {
-          F0 += FE1_f0_C0[ip][r]*w[0][nzc6[r]];
+        // Total number of operations to compute function values = 6
+        for (unsigned int r = 0; r < 3; r++)
+        {
+          F0 += FE0_f0_C1[ip][r]*w[0][nzc7[r]];
         }// end loop over 'r'
         
         // Number of operations to compute ip constants: 3
         // Number of operations: 3
-        const double Gip0 = F0*F0*W2[ip]*G0;
-        
-        
-        // Number of operations for primary indices = 12
-        for (unsigned int j = 0; j < 2; j++)
-        {
-          for (unsigned int k = 0; k < 2; k++)
+        const double Gip0 = F0*F0*W3[ip]*G0;
+        
+        
+        // Number of operations for primary indices = 27
+        for (unsigned int j = 0; j < 3; j++)
+        {
+          for (unsigned int k = 0; k < 3; k++)
           {
             // Number of operations to compute entry = 3
-            A[nzc7[j]*6 + nzc6[k]] += FE1_f0_C0[ip][j]*FE1_f0_C0[ip][k]*Gip0;
+            A[nzc6[j]*12 + nzc7[k]] += FE0_f0_C1[ip][j]*FE0_f0_C1[ip][k]*Gip0;
           }// end loop over 'k'
         }// end loop over 'j'
       }// end loop over 'ip'
@@ -8793,34 +9667,34 @@ void UFC_SolitaryWave2DBilinearForm_exte
       break;
     case 2:
       {
-      // Total number of operations to compute element tensor (from this point): 38
+      // Total number of operations to compute element tensor (from this point): 108
       
       // Loop quadrature points for integral
-      // Number of operations to compute element tensor for following IP loop = 38
-      for (unsigned int ip = 0; ip < 2; ip++)
+      // Number of operations to compute element tensor for following IP loop = 108
+      for (unsigned int ip = 0; ip < 3; ip++)
       {
         
         // Function declarations
         double F0 = 0;
         
-        // Total number of operations to compute function values = 4
-        for (unsigned int r = 0; r < 2; r++)
-        {
-          F0 += FE1_f0_C0[ip][r]*w[0][nzc5[r]];
+        // Total number of operations to compute function values = 6
+        for (unsigned int r = 0; r < 3; r++)
+        {
+          F0 += FE0_f0_C1[ip][r]*w[0][nzc2[r]];
         }// end loop over 'r'
         
         // Number of operations to compute ip constants: 3
         // Number of operations: 3
-        const double Gip0 = F0*F0*W2[ip]*G0;
-        
-        
-        // Number of operations for primary indices = 12
-        for (unsigned int j = 0; j < 2; j++)
-        {
-          for (unsigned int k = 0; k < 2; k++)
+        const double Gip0 = F0*F0*W3[ip]*G0;
+        
+        
+        // Number of operations for primary indices = 27
+        for (unsigned int j = 0; j < 3; j++)
+        {
+          for (unsigned int k = 0; k < 3; k++)
           {
             // Number of operations to compute entry = 3
-            A[nzc4[j]*6 + nzc5[k]] += FE1_f0_C0[ip][j]*FE1_f0_C0[ip][k]*Gip0;
+            A[nzc3[j]*12 + nzc2[k]] += FE0_f0_C1[ip][j]*FE0_f0_C1[ip][k]*Gip0;
           }// end loop over 'k'
         }// end loop over 'j'
       }// end loop over 'ip'
@@ -8884,6 +9758,114 @@ void UFC_SolitaryWave2DBilinearForm_exte
     A[33] = 0;
     A[34] = 0;
     A[35] = 0;
+    A[36] = 0;
+    A[37] = 0;
+    A[38] = 0;
+    A[39] = 0;
+    A[40] = 0;
+    A[41] = 0;
+    A[42] = 0;
+    A[43] = 0;
+    A[44] = 0;
+    A[45] = 0;
+    A[46] = 0;
+    A[47] = 0;
+    A[48] = 0;
+    A[49] = 0;
+    A[50] = 0;
+    A[51] = 0;
+    A[52] = 0;
+    A[53] = 0;
+    A[54] = 0;
+    A[55] = 0;
+    A[56] = 0;
+    A[57] = 0;
+    A[58] = 0;
+    A[59] = 0;
+    A[60] = 0;
+    A[61] = 0;
+    A[62] = 0;
+    A[63] = 0;
+    A[64] = 0;
+    A[65] = 0;
+    A[66] = 0;
+    A[67] = 0;
+    A[68] = 0;
+    A[69] = 0;
+    A[70] = 0;
+    A[71] = 0;
+    A[72] = 0;
+    A[73] = 0;
+    A[74] = 0;
+    A[75] = 0;
+    A[76] = 0;
+    A[77] = 0;
+    A[78] = 0;
+    A[79] = 0;
+    A[80] = 0;
+    A[81] = 0;
+    A[82] = 0;
+    A[83] = 0;
+    A[84] = 0;
+    A[85] = 0;
+    A[86] = 0;
+    A[87] = 0;
+    A[88] = 0;
+    A[89] = 0;
+    A[90] = 0;
+    A[91] = 0;
+    A[92] = 0;
+    A[93] = 0;
+    A[94] = 0;
+    A[95] = 0;
+    A[96] = 0;
+    A[97] = 0;
+    A[98] = 0;
+    A[99] = 0;
+    A[100] = 0;
+    A[101] = 0;
+    A[102] = 0;
+    A[103] = 0;
+    A[104] = 0;
+    A[105] = 0;
+    A[106] = 0;
+    A[107] = 0;
+    A[108] = 0;
+    A[109] = 0;
+    A[110] = 0;
+    A[111] = 0;
+    A[112] = 0;
+    A[113] = 0;
+    A[114] = 0;
+    A[115] = 0;
+    A[116] = 0;
+    A[117] = 0;
+    A[118] = 0;
+    A[119] = 0;
+    A[120] = 0;
+    A[121] = 0;
+    A[122] = 0;
+    A[123] = 0;
+    A[124] = 0;
+    A[125] = 0;
+    A[126] = 0;
+    A[127] = 0;
+    A[128] = 0;
+    A[129] = 0;
+    A[130] = 0;
+    A[131] = 0;
+    A[132] = 0;
+    A[133] = 0;
+    A[134] = 0;
+    A[135] = 0;
+    A[136] = 0;
+    A[137] = 0;
+    A[138] = 0;
+    A[139] = 0;
+    A[140] = 0;
+    A[141] = 0;
+    A[142] = 0;
+    A[143] = 0;
     
     // Add all contributions to element tensor
     integral_0_quadrature.tabulate_tensor(A, w, c, facet);
@@ -8904,7 +9886,7 @@ UFC_SolitaryWave2DBilinearForm::~UFC_Sol
 /// Return a string identifying the form
 const char* UFC_SolitaryWave2DBilinearForm::signature() const
 {
-    return "Form([Integral(Sum(Sum(Product(Indexed(BasisFunction(MixedElement(*[FiniteElement('Lagrange', Cell('triangle', 1), 1), FiniteElement('Lagrange', Cell('triangle', 1), 1)], **{'value_shape': (2,) }), 0), MultiIndex((FixedIndex(1),))), Indexed(BasisFunction(MixedElement(*[FiniteElement('Lagrange', Cell('triangle', 1), 1), FiniteElement('Lagrange', Cell('triangle', 1), 1)], **{'value_shape': (2,) }), 1), MultiIndex((FixedIndex(1),)))), Product(Indexed(BasisFunction(MixedElement(*[FiniteElement('Lagrange', Cell('triangle', 1), 1), FiniteElement('Lagrange', Cell('triangle', 1), 1)], **{'value_shape': (2,) }), 1), MultiIndex((FixedIndex(0),))), Product(Constant(Cell('triangle', 1), 2), Product(Product(FloatValue(0.5, (), (), {}), Constant(Cell('triangle', 1), 1)), Product(IntValue(-1, (), (), {}), Indexed(BasisFunction(MixedElement(*[FiniteElement('Lagrange', Cell('triangle', 1), 1), FiniteElement('Lagrange', Cell('triangle', 1), 1)], **{'value_shape': (2,) }), 0), MultiIndex((FixedIndex(1),)))))))), Sum(Product(Indexed(BasisFunction(MixedElement(*[FiniteElement('Lagrange', Cell('triangle', 1), 1), FiniteElement('Lagrange', Cell('triangle', 1), 1)], **{'value_shape': (2,) }), 1), MultiIndex((FixedIndex(1),))), Sum(Product(IndexSum(Product(Indexed(ComponentTensor(Indexed(SpatialDerivative(BasisFunction(MixedElement(*[FiniteElement('Lagrange', Cell('triangle', 1), 1), FiniteElement('Lagrange', Cell('triangle', 1), 1)], **{'value_shape': (2,) }), 0), MultiIndex((Index(0),))), MultiIndex((FixedIndex(0),))), MultiIndex((Index(0),))), MultiIndex((Index(1),))), Indexed(ComponentTensor(Indexed(SpatialDerivative(Function(MixedElement(*[FiniteElement('Lagrange', Cell('triangle', 1), 1), FiniteElement('Lagrange', Cell('triangle', 1), 1)], **{'value_shape': (2,) }), 0), MultiIndex((Index(2),))), MultiIndex((FixedIndex(0),))), MultiIndex((Index(2),))), MultiIndex((Index(1),)))), MultiIndex((Index(1),))), Product(Indexed(Function(MixedElement(*[FiniteElement('Lagrange', Cell('triangle', 1), 1), FiniteElement('Lagrange', Cell('triangle', 1), 1)], **{'value_shape': (2,) }), 0), MultiIndex((FixedIndex(1),))), Product(IntValue(3, (), (), {}), Indexed(Function(MixedElement(*[FiniteElement('Lagrange', Cell('triangle', 1), 1), FiniteElement('Lagrange', Cell('triangle', 1), 1)], **{'value_shape': (2,) }), 0), MultiIndex((FixedIndex(1),)))))), Product(IntValue(-1, (), (), {}), Product(Indexed(SpatialDerivative(BasisFunction(MixedElement(*[FiniteElement('Lagrange', Cell('triangle', 1), 1), FiniteElement('Lagrange', Cell('triangle', 1), 1)], **{'value_shape': (2,) }), 0), MultiIndex((FixedIndex(1),))), MultiIndex((FixedIndex(0),))), Product(Indexed(Function(MixedElement(*[FiniteElement('Lagrange', Cell('triangle', 1), 1), FiniteElement('Lagrange', Cell('triangle', 1), 1)], **{'value_shape': (2,) }), 0), MultiIndex((FixedIndex(1),))), Product(IntValue(3, (), (), {}), Indexed(Function(MixedElement(*[FiniteElement('Lagrange', Cell('triangle', 1), 1), FiniteElement('Lagrange', Cell('triangle', 1), 1)], **{'value_shape': (2,) }), 0), MultiIndex((FixedIndex(1),))))))))), Sum(Product(IndexSum(Product(Indexed(ComponentTensor(Indexed(SpatialDerivative(BasisFunction(MixedElement(*[FiniteElement('Lagrange', Cell('triangle', 1), 1), FiniteElement('Lagrange', Cell('triangle', 1), 1)], **{'value_shape': (2,) }), 0), MultiIndex((Index(3),))), MultiIndex((FixedIndex(0),))), MultiIndex((Index(3),))), MultiIndex((Index(4),))), Indexed(ComponentTensor(Indexed(SpatialDerivative(BasisFunction(MixedElement(*[FiniteElement('Lagrange', Cell('triangle', 1), 1), FiniteElement('Lagrange', Cell('triangle', 1), 1)], **{'value_shape': (2,) }), 1), MultiIndex((Index(5),))), MultiIndex((FixedIndex(0),))), MultiIndex((Index(5),))), MultiIndex((Index(4),)))), MultiIndex((Index(4),))), Product(Indexed(Function(MixedElement(*[FiniteElement('Lagrange', Cell('triangle', 1), 1), FiniteElement('Lagrange', Cell('triangle', 1), 1)], **{'value_shape': (2,) }), 0), MultiIndex((FixedIndex(1),))), Power(Indexed(Function(MixedElement(*[FiniteElement('Lagrange', Cell('triangle', 1), 1), FiniteElement('Lagrange', Cell('triangle', 1), 1)], **{'value_shape': (2,) }), 0), MultiIndex((FixedIndex(1),))), IntValue(2, (), (), {})))), Product(Indexed(BasisFunction(MixedElement(*[FiniteElement('Lagrange', Cell('triangle', 1), 1), FiniteElement('Lagrange', Cell('triangle', 1), 1)], **{'value_shape': (2,) }), 1), MultiIndex((FixedIndex(0),))), Product(Constant(Cell('triangle', 1), 2), Indexed(BasisFunction(MixedElement(*[FiniteElement('Lagrange', Cell('triangle', 1), 1), FiniteElement('Lagrange', Cell('triangle', 1), 1)], **{'value_shape': (2,) }), 0), MultiIndex((FixedIndex(0),)))))))), Measure('cell', 0, {'ffc_representation': 'quadrature', 'quadrature_order': 2})), Integral(Product(Indexed(VectorConstant(Cell('triangle', 1), 2, 3), MultiIndex((FixedIndex(1),))), Product(Indexed(BasisFunction(MixedElement(*[FiniteElement('Lagrange', Cell('triangle', 1), 1), FiniteElement('Lagrange', Cell('triangle', 1), 1)], **{'value_shape': (2,) }), 0), MultiIndex((FixedIndex(0),))), Product(Indexed(BasisFunction(MixedElement(*[FiniteElement('Lagrange', Cell('triangle', 1), 1), FiniteElement('Lagrange', Cell('triangle', 1), 1)], **{'value_shape': (2,) }), 1), MultiIndex((FixedIndex(1),))), Product(Indexed(Function(MixedElement(*[FiniteElement('Lagrange', Cell('triangle', 1), 1), FiniteElement('Lagrange', Cell('triangle', 1), 1)], **{'value_shape': (2,) }), 0), MultiIndex((FixedIndex(1),))), Product(IntValue(3, (), (), {}), Indexed(Function(MixedElement(*[FiniteElement('Lagrange', Cell('triangle', 1), 1), FiniteElement('Lagrange', Cell('triangle', 1), 1)], **{'value_shape': (2,) }), 0), MultiIndex((FixedIndex(1),)))))))), Measure('exterior_facet', 0, {'ffc_representation': 'quadrature', 'quadrature_order': 2}))])";
+    return "Form([Integral(Sum(Sum(Product(Indexed(BasisFunction(MixedElement(*[FiniteElement('Lagrange', Cell('triangle', 1), 2), FiniteElement('Lagrange', Cell('triangle', 1), 2)], **{'value_shape': (2,) }), 0), MultiIndex((FixedIndex(1),))), Indexed(BasisFunction(MixedElement(*[FiniteElement('Lagrange', Cell('triangle', 1), 2), FiniteElement('Lagrange', Cell('triangle', 1), 2)], **{'value_shape': (2,) }), 1), MultiIndex((FixedIndex(1),)))), Product(Indexed(BasisFunction(MixedElement(*[FiniteElement('Lagrange', Cell('triangle', 1), 2), FiniteElement('Lagrange', Cell('triangle', 1), 2)], **{'value_shape': (2,) }), 1), MultiIndex((FixedIndex(0),))), Product(Constant(Cell('triangle', 1), 2), Product(Product(FloatValue(0.5, (), (), {}), Constant(Cell('triangle', 1), 1)), Product(IntValue(-1, (), (), {}), Indexed(BasisFunction(MixedElement(*[FiniteElement('Lagrange', Cell('triangle', 1), 2), FiniteElement('Lagrange', Cell('triangle', 1), 2)], **{'value_shape': (2,) }), 0), MultiIndex((FixedIndex(1),)))))))), Sum(Product(Indexed(BasisFunction(MixedElement(*[FiniteElement('Lagrange', Cell('triangle', 1), 2), FiniteElement('Lagrange', Cell('triangle', 1), 2)], **{'value_shape': (2,) }), 1), MultiIndex((FixedIndex(1),))), Sum(Product(IndexSum(Product(Indexed(ComponentTensor(Indexed(SpatialDerivative(BasisFunction(MixedElement(*[FiniteElement('Lagrange', Cell('triangle', 1), 2), FiniteElement('Lagrange', Cell('triangle', 1), 2)], **{'value_shape': (2,) }), 0), MultiIndex((Index(0),))), MultiIndex((FixedIndex(0),))), MultiIndex((Index(0),))), MultiIndex((Index(1),))), Indexed(ComponentTensor(Indexed(SpatialDerivative(Function(MixedElement(*[FiniteElement('Lagrange', Cell('triangle', 1), 2), FiniteElement('Lagrange', Cell('triangle', 1), 2)], **{'value_shape': (2,) }), 0), MultiIndex((Index(2),))), MultiIndex((FixedIndex(0),))), MultiIndex((Index(2),))), MultiIndex((Index(1),)))), MultiIndex((Index(1),))), Product(Indexed(Function(MixedElement(*[FiniteElement('Lagrange', Cell('triangle', 1), 2), FiniteElement('Lagrange', Cell('triangle', 1), 2)], **{'value_shape': (2,) }), 0), MultiIndex((FixedIndex(1),))), Product(IntValue(3, (), (), {}), Indexed(Function(MixedElement(*[FiniteElement('Lagrange', Cell('triangle', 1), 2), FiniteElement('Lagrange', Cell('triangle', 1), 2)], **{'value_shape': (2,) }), 0), MultiIndex((FixedIndex(1),)))))), Product(IntValue(-1, (), (), {}), Product(Indexed(SpatialDerivative(BasisFunction(MixedElement(*[FiniteElement('Lagrange', Cell('triangle', 1), 2), FiniteElement('Lagrange', Cell('triangle', 1), 2)], **{'value_shape': (2,) }), 0), MultiIndex((FixedIndex(1),))), MultiIndex((FixedIndex(0),))), Product(Indexed(Function(MixedElement(*[FiniteElement('Lagrange', Cell('triangle', 1), 2), FiniteElement('Lagrange', Cell('triangle', 1), 2)], **{'value_shape': (2,) }), 0), MultiIndex((FixedIndex(1),))), Product(IntValue(3, (), (), {}), Indexed(Function(MixedElement(*[FiniteElement('Lagrange', Cell('triangle', 1), 2), FiniteElement('Lagrange', Cell('triangle', 1), 2)], **{'value_shape': (2,) }), 0), MultiIndex((FixedIndex(1),))))))))), Sum(Product(IndexSum(Product(Indexed(ComponentTensor(Indexed(SpatialDerivative(BasisFunction(MixedElement(*[FiniteElement('Lagrange', Cell('triangle', 1), 2), FiniteElement('Lagrange', Cell('triangle', 1), 2)], **{'value_shape': (2,) }), 0), MultiIndex((Index(3),))), MultiIndex((FixedIndex(0),))), MultiIndex((Index(3),))), MultiIndex((Index(4),))), Indexed(ComponentTensor(Indexed(SpatialDerivative(BasisFunction(MixedElement(*[FiniteElement('Lagrange', Cell('triangle', 1), 2), FiniteElement('Lagrange', Cell('triangle', 1), 2)], **{'value_shape': (2,) }), 1), MultiIndex((Index(5),))), MultiIndex((FixedIndex(0),))), MultiIndex((Index(5),))), MultiIndex((Index(4),)))), MultiIndex((Index(4),))), Product(Indexed(Function(MixedElement(*[FiniteElement('Lagrange', Cell('triangle', 1), 2), FiniteElement('Lagrange', Cell('triangle', 1), 2)], **{'value_shape': (2,) }), 0), MultiIndex((FixedIndex(1),))), Power(Indexed(Function(MixedElement(*[FiniteElement('Lagrange', Cell('triangle', 1), 2), FiniteElement('Lagrange', Cell('triangle', 1), 2)], **{'value_shape': (2,) }), 0), MultiIndex((FixedIndex(1),))), IntValue(2, (), (), {})))), Product(Indexed(BasisFunction(MixedElement(*[FiniteElement('Lagrange', Cell('triangle', 1), 2), FiniteElement('Lagrange', Cell('triangle', 1), 2)], **{'value_shape': (2,) }), 1), MultiIndex((FixedIndex(0),))), Product(Constant(Cell('triangle', 1), 2), Indexed(BasisFunction(MixedElement(*[FiniteElement('Lagrange', Cell('triangle', 1), 2), FiniteElement('Lagrange', Cell('triangle', 1), 2)], **{'value_shape': (2,) }), 0), MultiIndex((FixedIndex(0),)))))))), Measure('cell', 0, {'ffc_representation': 'quadrature', 'quadrature_order': 4})), Integral(Product(Indexed(VectorConstant(Cell('triangle', 1), 2, 3), MultiIndex((FixedIndex(1),))), Product(Indexed(BasisFunction(MixedElement(*[FiniteElement('Lagrange', Cell('triangle', 1), 2), FiniteElement('Lagrange', Cell('triangle', 1), 2)], **{'value_shape': (2,) }), 0), MultiIndex((FixedIndex(0),))), Product(Indexed(BasisFunction(MixedElement(*[FiniteElement('Lagrange', Cell('triangle', 1), 2), FiniteElement('Lagrange', Cell('triangle', 1), 2)], **{'value_shape': (2,) }), 1), MultiIndex((FixedIndex(1),))), Product(Indexed(Function(MixedElement(*[FiniteElement('Lagrange', Cell('triangle', 1), 2), FiniteElement('Lagrange', Cell('triangle', 1), 2)], **{'value_shape': (2,) }), 0), MultiIndex((FixedIndex(1),))), Product(IntValue(3, (), (), {}), Indexed(Function(MixedElement(*[FiniteElement('Lagrange', Cell('triangle', 1), 2), FiniteElement('Lagrange', Cell('triangle', 1), 2)], **{'value_shape': (2,) }), 0), MultiIndex((FixedIndex(1),)))))))), Measure('exterior_facet', 0, {'ffc_representation': 'quadrature', 'quadrature_order': 4}))])";
 }
 
 /// Return the rank of the global tensor (r)
@@ -9025,7 +10007,7 @@ UFC_SolitaryWave2DLinearForm_finite_elem
 /// Return a string identifying the finite element
 const char* UFC_SolitaryWave2DLinearForm_finite_element_0_0::signature() const
 {
-    return "FiniteElement('Lagrange', 'triangle', 1)";
+    return "FiniteElement('Lagrange', 'triangle', 2)";
 }
 
 /// Return the cell shape
@@ -9037,7 +10019,7 @@ ufc::shape UFC_SolitaryWave2DLinearForm_
 /// Return the dimension of the finite element function space
 unsigned int UFC_SolitaryWave2DLinearForm_finite_element_0_0::space_dimension() const
 {
-    return 3;
+    return 6;
 }
 
 /// Return the rank of the value space
@@ -9096,34 +10078,48 @@ void UFC_SolitaryWave2DLinearForm_finite
     // Generate scalings
     const double scalings_y_0 = 1;
     const double scalings_y_1 = scalings_y_0*(0.5 - 0.5*y);
-    
-    // Compute psitilde_a
-    const double psitilde_a_0 = 1;
-    const double psitilde_a_1 = x;
-    
-    // Compute psitilde_bs
-    const double psitilde_bs_0_0 = 1;
-    const double psitilde_bs_0_1 = 1.5*y + 0.5;
-    const double psitilde_bs_1_0 = 1;
-    
-    // Compute basisvalues
-    const double basisvalue0 = 0.707106781186548*psitilde_a_0*scalings_y_0*psitilde_bs_0_0;
-    const double basisvalue1 = 1.73205080756888*psitilde_a_1*scalings_y_1*psitilde_bs_1_0;
-    const double basisvalue2 = psitilde_a_0*scalings_y_0*psitilde_bs_0_1;
-    
-    // Table(s) of coefficients
-    const static double coefficients0[3][3] = \
-    {{0.471404520791032, -0.288675134594813, -0.166666666666667},
-    {0.471404520791032, 0.288675134594813, -0.166666666666667},
-    {0.471404520791032, 0, 0.333333333333333}};
+    const double scalings_y_2 = scalings_y_1*(0.5 - 0.5*y);
+    
+    // Compute psitilde_a
+    const double psitilde_a_0 = 1;
+    const double psitilde_a_1 = x;
+    const double psitilde_a_2 = 1.5*x*psitilde_a_1 - 0.5*psitilde_a_0;
+    
+    // Compute psitilde_bs
+    const double psitilde_bs_0_0 = 1;
+    const double psitilde_bs_0_1 = 1.5*y + 0.5;
+    const double psitilde_bs_0_2 = 0.111111111111111*psitilde_bs_0_1 + 1.66666666666667*y*psitilde_bs_0_1 - 0.555555555555556*psitilde_bs_0_0;
+    const double psitilde_bs_1_0 = 1;
+    const double psitilde_bs_1_1 = 2.5*y + 1.5;
+    const double psitilde_bs_2_0 = 1;
+    
+    // Compute basisvalues
+    const double basisvalue0 = 0.707106781186548*psitilde_a_0*scalings_y_0*psitilde_bs_0_0;
+    const double basisvalue1 = 1.73205080756888*psitilde_a_1*scalings_y_1*psitilde_bs_1_0;
+    const double basisvalue2 = psitilde_a_0*scalings_y_0*psitilde_bs_0_1;
+    const double basisvalue3 = 2.73861278752583*psitilde_a_2*scalings_y_2*psitilde_bs_2_0;
+    const double basisvalue4 = 2.12132034355964*psitilde_a_1*scalings_y_1*psitilde_bs_1_1;
+    const double basisvalue5 = 1.22474487139159*psitilde_a_0*scalings_y_0*psitilde_bs_0_2;
+    
+    // Table(s) of coefficients
+    const static double coefficients0[6][6] = \
+    {{0, -0.173205080756888, -0.1, 0.121716123890037, 0.0942809041582064, 0.0544331053951817},
+    {0, 0.173205080756888, -0.1, 0.121716123890037, -0.0942809041582063, 0.0544331053951818},
+    {0, 0, 0.2, 0, 0, 0.163299316185545},
+    {0.471404520791032, 0.23094010767585, 0.133333333333333, 0, 0.188561808316413, -0.163299316185545},
+    {0.471404520791032, -0.23094010767585, 0.133333333333333, 0, -0.188561808316413, -0.163299316185545},
+    {0.471404520791032, 0, -0.266666666666667, -0.243432247780074, 0, 0.0544331053951817}};
     
     // Extract relevant coefficients
     const double coeff0_0 = coefficients0[dof][0];
     const double coeff0_1 = coefficients0[dof][1];
     const double coeff0_2 = coefficients0[dof][2];
-    
-    // Compute value(s)
-    *values = coeff0_0*basisvalue0 + coeff0_1*basisvalue1 + coeff0_2*basisvalue2;
+    const double coeff0_3 = coefficients0[dof][3];
+    const double coeff0_4 = coefficients0[dof][4];
+    const double coeff0_5 = coefficients0[dof][5];
+    
+    // Compute value(s)
+    *values = coeff0_0*basisvalue0 + coeff0_1*basisvalue1 + coeff0_2*basisvalue2 + coeff0_3*basisvalue3 + coeff0_4*basisvalue4 + coeff0_5*basisvalue5;
 }
 
 /// Evaluate all basis functions at given point in cell
@@ -9239,38 +10235,55 @@ void UFC_SolitaryWave2DLinearForm_finite
     // Generate scalings
     const double scalings_y_0 = 1;
     const double scalings_y_1 = scalings_y_0*(0.5 - 0.5*y);
-    
-    // Compute psitilde_a
-    const double psitilde_a_0 = 1;
-    const double psitilde_a_1 = x;
-    
-    // Compute psitilde_bs
-    const double psitilde_bs_0_0 = 1;
-    const double psitilde_bs_0_1 = 1.5*y + 0.5;
-    const double psitilde_bs_1_0 = 1;
-    
-    // Compute basisvalues
-    const double basisvalue0 = 0.707106781186548*psitilde_a_0*scalings_y_0*psitilde_bs_0_0;
-    const double basisvalue1 = 1.73205080756888*psitilde_a_1*scalings_y_1*psitilde_bs_1_0;
-    const double basisvalue2 = psitilde_a_0*scalings_y_0*psitilde_bs_0_1;
-    
-    // Table(s) of coefficients
-    const static double coefficients0[3][3] = \
-    {{0.471404520791032, -0.288675134594813, -0.166666666666667},
-    {0.471404520791032, 0.288675134594813, -0.166666666666667},
-    {0.471404520791032, 0, 0.333333333333333}};
-    
-    // Interesting (new) part
-    // Tables of derivatives of the polynomial base (transpose)
-    const static double dmats0[3][3] = \
-    {{0, 0, 0},
-    {4.89897948556636, 0, 0},
-    {0, 0, 0}};
-    
-    const static double dmats1[3][3] = \
-    {{0, 0, 0},
-    {2.44948974278318, 0, 0},
-    {4.24264068711928, 0, 0}};
+    const double scalings_y_2 = scalings_y_1*(0.5 - 0.5*y);
+    
+    // Compute psitilde_a
+    const double psitilde_a_0 = 1;
+    const double psitilde_a_1 = x;
+    const double psitilde_a_2 = 1.5*x*psitilde_a_1 - 0.5*psitilde_a_0;
+    
+    // Compute psitilde_bs
+    const double psitilde_bs_0_0 = 1;
+    const double psitilde_bs_0_1 = 1.5*y + 0.5;
+    const double psitilde_bs_0_2 = 0.111111111111111*psitilde_bs_0_1 + 1.66666666666667*y*psitilde_bs_0_1 - 0.555555555555556*psitilde_bs_0_0;
+    const double psitilde_bs_1_0 = 1;
+    const double psitilde_bs_1_1 = 2.5*y + 1.5;
+    const double psitilde_bs_2_0 = 1;
+    
+    // Compute basisvalues
+    const double basisvalue0 = 0.707106781186548*psitilde_a_0*scalings_y_0*psitilde_bs_0_0;
+    const double basisvalue1 = 1.73205080756888*psitilde_a_1*scalings_y_1*psitilde_bs_1_0;
+    const double basisvalue2 = psitilde_a_0*scalings_y_0*psitilde_bs_0_1;
+    const double basisvalue3 = 2.73861278752583*psitilde_a_2*scalings_y_2*psitilde_bs_2_0;
+    const double basisvalue4 = 2.12132034355964*psitilde_a_1*scalings_y_1*psitilde_bs_1_1;
+    const double basisvalue5 = 1.22474487139159*psitilde_a_0*scalings_y_0*psitilde_bs_0_2;
+    
+    // Table(s) of coefficients
+    const static double coefficients0[6][6] = \
+    {{0, -0.173205080756888, -0.1, 0.121716123890037, 0.0942809041582064, 0.0544331053951817},
+    {0, 0.173205080756888, -0.1, 0.121716123890037, -0.0942809041582063, 0.0544331053951818},
+    {0, 0, 0.2, 0, 0, 0.163299316185545},
+    {0.471404520791032, 0.23094010767585, 0.133333333333333, 0, 0.188561808316413, -0.163299316185545},
+    {0.471404520791032, -0.23094010767585, 0.133333333333333, 0, -0.188561808316413, -0.163299316185545},
+    {0.471404520791032, 0, -0.266666666666667, -0.243432247780074, 0, 0.0544331053951817}};
+    
+    // Interesting (new) part
+    // Tables of derivatives of the polynomial base (transpose)
+    const static double dmats0[6][6] = \
+    {{0, 0, 0, 0, 0, 0},
+    {4.89897948556636, 0, 0, 0, 0, 0},
+    {0, 0, 0, 0, 0, 0},
+    {0, 9.48683298050514, 0, 0, 0, 0},
+    {4, 0, 7.07106781186548, 0, 0, 0},
+    {0, 0, 0, 0, 0, 0}};
+    
+    const static double dmats1[6][6] = \
+    {{0, 0, 0, 0, 0, 0},
+    {2.44948974278318, 0, 0, 0, 0, 0},
+    {4.24264068711928, 0, 0, 0, 0, 0},
+    {2.58198889747161, 4.74341649025257, -0.912870929175277, 0, 0, 0},
+    {2, 6.12372435695795, 3.53553390593274, 0, 0, 0},
+    {-2.3094010767585, 0, 8.16496580927726, 0, 0, 0}};
     
     // Compute reference derivatives
     // Declare pointer to array of derivatives on FIAT element
@@ -9280,11 +10293,17 @@ void UFC_SolitaryWave2DLinearForm_finite
     double coeff0_0 = 0;
     double coeff0_1 = 0;
     double coeff0_2 = 0;
+    double coeff0_3 = 0;
+    double coeff0_4 = 0;
+    double coeff0_5 = 0;
     
     // Declare new coefficients
     double new_coeff0_0 = 0;
     double new_coeff0_1 = 0;
     double new_coeff0_2 = 0;
+    double new_coeff0_3 = 0;
+    double new_coeff0_4 = 0;
+    double new_coeff0_5 = 0;
     
     // Loop possible derivatives
     for (unsigned int deriv_num = 0; deriv_num < num_derivatives; deriv_num++)
@@ -9293,6 +10312,9 @@ void UFC_SolitaryWave2DLinearForm_finite
       new_coeff0_0 = coefficients0[dof][0];
       new_coeff0_1 = coefficients0[dof][1];
       new_coeff0_2 = coefficients0[dof][2];
+      new_coeff0_3 = coefficients0[dof][3];
+      new_coeff0_4 = coefficients0[dof][4];
+      new_coeff0_5 = coefficients0[dof][5];
     
       // Loop derivative order
       for (unsigned int j = 0; j < n; j++)
@@ -9301,23 +10323,32 @@ void UFC_SolitaryWave2DLinearForm_finite
         coeff0_0 = new_coeff0_0;
         coeff0_1 = new_coeff0_1;
         coeff0_2 = new_coeff0_2;
-    
-        if(combinations[deriv_num][j] == 0)
-        {
-          new_coeff0_0 = coeff0_0*dmats0[0][0] + coeff0_1*dmats0[1][0] + coeff0_2*dmats0[2][0];
-          new_coeff0_1 = coeff0_0*dmats0[0][1] + coeff0_1*dmats0[1][1] + coeff0_2*dmats0[2][1];
-          new_coeff0_2 = coeff0_0*dmats0[0][2] + coeff0_1*dmats0[1][2] + coeff0_2*dmats0[2][2];
-        }
-        if(combinations[deriv_num][j] == 1)
-        {
-          new_coeff0_0 = coeff0_0*dmats1[0][0] + coeff0_1*dmats1[1][0] + coeff0_2*dmats1[2][0];
-          new_coeff0_1 = coeff0_0*dmats1[0][1] + coeff0_1*dmats1[1][1] + coeff0_2*dmats1[2][1];
-          new_coeff0_2 = coeff0_0*dmats1[0][2] + coeff0_1*dmats1[1][2] + coeff0_2*dmats1[2][2];
-        }
-    
-      }
-      // Compute derivatives on reference element as dot product of coefficients and basisvalues
-      derivatives[deriv_num] = new_coeff0_0*basisvalue0 + new_coeff0_1*basisvalue1 + new_coeff0_2*basisvalue2;
+        coeff0_3 = new_coeff0_3;
+        coeff0_4 = new_coeff0_4;
+        coeff0_5 = new_coeff0_5;
+    
+        if(combinations[deriv_num][j] == 0)
+        {
+          new_coeff0_0 = coeff0_0*dmats0[0][0] + coeff0_1*dmats0[1][0] + coeff0_2*dmats0[2][0] + coeff0_3*dmats0[3][0] + coeff0_4*dmats0[4][0] + coeff0_5*dmats0[5][0];
+          new_coeff0_1 = coeff0_0*dmats0[0][1] + coeff0_1*dmats0[1][1] + coeff0_2*dmats0[2][1] + coeff0_3*dmats0[3][1] + coeff0_4*dmats0[4][1] + coeff0_5*dmats0[5][1];
+          new_coeff0_2 = coeff0_0*dmats0[0][2] + coeff0_1*dmats0[1][2] + coeff0_2*dmats0[2][2] + coeff0_3*dmats0[3][2] + coeff0_4*dmats0[4][2] + coeff0_5*dmats0[5][2];
+          new_coeff0_3 = coeff0_0*dmats0[0][3] + coeff0_1*dmats0[1][3] + coeff0_2*dmats0[2][3] + coeff0_3*dmats0[3][3] + coeff0_4*dmats0[4][3] + coeff0_5*dmats0[5][3];
+          new_coeff0_4 = coeff0_0*dmats0[0][4] + coeff0_1*dmats0[1][4] + coeff0_2*dmats0[2][4] + coeff0_3*dmats0[3][4] + coeff0_4*dmats0[4][4] + coeff0_5*dmats0[5][4];
+          new_coeff0_5 = coeff0_0*dmats0[0][5] + coeff0_1*dmats0[1][5] + coeff0_2*dmats0[2][5] + coeff0_3*dmats0[3][5] + coeff0_4*dmats0[4][5] + coeff0_5*dmats0[5][5];
+        }
+        if(combinations[deriv_num][j] == 1)
+        {
+          new_coeff0_0 = coeff0_0*dmats1[0][0] + coeff0_1*dmats1[1][0] + coeff0_2*dmats1[2][0] + coeff0_3*dmats1[3][0] + coeff0_4*dmats1[4][0] + coeff0_5*dmats1[5][0];
+          new_coeff0_1 = coeff0_0*dmats1[0][1] + coeff0_1*dmats1[1][1] + coeff0_2*dmats1[2][1] + coeff0_3*dmats1[3][1] + coeff0_4*dmats1[4][1] + coeff0_5*dmats1[5][1];
+          new_coeff0_2 = coeff0_0*dmats1[0][2] + coeff0_1*dmats1[1][2] + coeff0_2*dmats1[2][2] + coeff0_3*dmats1[3][2] + coeff0_4*dmats1[4][2] + coeff0_5*dmats1[5][2];
+          new_coeff0_3 = coeff0_0*dmats1[0][3] + coeff0_1*dmats1[1][3] + coeff0_2*dmats1[2][3] + coeff0_3*dmats1[3][3] + coeff0_4*dmats1[4][3] + coeff0_5*dmats1[5][3];
+          new_coeff0_4 = coeff0_0*dmats1[0][4] + coeff0_1*dmats1[1][4] + coeff0_2*dmats1[2][4] + coeff0_3*dmats1[3][4] + coeff0_4*dmats1[4][4] + coeff0_5*dmats1[5][4];
+          new_coeff0_5 = coeff0_0*dmats1[0][5] + coeff0_1*dmats1[1][5] + coeff0_2*dmats1[2][5] + coeff0_3*dmats1[3][5] + coeff0_4*dmats1[4][5] + coeff0_5*dmats1[5][5];
+        }
+    
+      }
+      // Compute derivatives on reference element as dot product of coefficients and basisvalues
+      derivatives[deriv_num] = new_coeff0_0*basisvalue0 + new_coeff0_1*basisvalue1 + new_coeff0_2*basisvalue2 + new_coeff0_3*basisvalue3 + new_coeff0_4*basisvalue4 + new_coeff0_5*basisvalue5;
     }
     
     // Transform derivatives back to physical element
@@ -9357,9 +10388,9 @@ double UFC_SolitaryWave2DLinearForm_fini
                                    const ufc::cell& c) const
 {
     // The reference points, direction and weights:
-    const static double X[3][1][2] = {{{0, 0}}, {{1, 0}}, {{0, 1}}};
-    const static double W[3][1] = {{1}, {1}, {1}};
-    const static double D[3][1][1] = {{{1}}, {{1}}, {{1}}};
+    const static double X[6][1][2] = {{{0, 0}}, {{1, 0}}, {{0, 1}}, {{0.5, 0.5}}, {{0, 0.5}}, {{0.5, 0}}};
+    const static double W[6][1] = {{1}, {1}, {1}, {1}, {1}, {1}};
+    const static double D[6][1][1] = {{{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}};
     
     const double * const * x = c.coordinates;
     double result = 0.0;
@@ -9439,7 +10470,7 @@ UFC_SolitaryWave2DLinearForm_finite_elem
 /// Return a string identifying the finite element
 const char* UFC_SolitaryWave2DLinearForm_finite_element_0_1::signature() const
 {
-    return "FiniteElement('Lagrange', 'triangle', 1)";
+    return "FiniteElement('Lagrange', 'triangle', 2)";
 }
 
 /// Return the cell shape
@@ -9451,7 +10482,7 @@ ufc::shape UFC_SolitaryWave2DLinearForm_
 /// Return the dimension of the finite element function space
 unsigned int UFC_SolitaryWave2DLinearForm_finite_element_0_1::space_dimension() const
 {
-    return 3;
+    return 6;
 }
 
 /// Return the rank of the value space
@@ -9510,34 +10541,48 @@ void UFC_SolitaryWave2DLinearForm_finite
     // Generate scalings
     const double scalings_y_0 = 1;
     const double scalings_y_1 = scalings_y_0*(0.5 - 0.5*y);
-    
-    // Compute psitilde_a
-    const double psitilde_a_0 = 1;
-    const double psitilde_a_1 = x;
-    
-    // Compute psitilde_bs
-    const double psitilde_bs_0_0 = 1;
-    const double psitilde_bs_0_1 = 1.5*y + 0.5;
-    const double psitilde_bs_1_0 = 1;
-    
-    // Compute basisvalues
-    const double basisvalue0 = 0.707106781186548*psitilde_a_0*scalings_y_0*psitilde_bs_0_0;
-    const double basisvalue1 = 1.73205080756888*psitilde_a_1*scalings_y_1*psitilde_bs_1_0;
-    const double basisvalue2 = psitilde_a_0*scalings_y_0*psitilde_bs_0_1;
-    
-    // Table(s) of coefficients
-    const static double coefficients0[3][3] = \
-    {{0.471404520791032, -0.288675134594813, -0.166666666666667},
-    {0.471404520791032, 0.288675134594813, -0.166666666666667},
-    {0.471404520791032, 0, 0.333333333333333}};
+    const double scalings_y_2 = scalings_y_1*(0.5 - 0.5*y);
+    
+    // Compute psitilde_a
+    const double psitilde_a_0 = 1;
+    const double psitilde_a_1 = x;
+    const double psitilde_a_2 = 1.5*x*psitilde_a_1 - 0.5*psitilde_a_0;
+    
+    // Compute psitilde_bs
+    const double psitilde_bs_0_0 = 1;
+    const double psitilde_bs_0_1 = 1.5*y + 0.5;
+    const double psitilde_bs_0_2 = 0.111111111111111*psitilde_bs_0_1 + 1.66666666666667*y*psitilde_bs_0_1 - 0.555555555555556*psitilde_bs_0_0;
+    const double psitilde_bs_1_0 = 1;
+    const double psitilde_bs_1_1 = 2.5*y + 1.5;
+    const double psitilde_bs_2_0 = 1;
+    
+    // Compute basisvalues
+    const double basisvalue0 = 0.707106781186548*psitilde_a_0*scalings_y_0*psitilde_bs_0_0;
+    const double basisvalue1 = 1.73205080756888*psitilde_a_1*scalings_y_1*psitilde_bs_1_0;
+    const double basisvalue2 = psitilde_a_0*scalings_y_0*psitilde_bs_0_1;
+    const double basisvalue3 = 2.73861278752583*psitilde_a_2*scalings_y_2*psitilde_bs_2_0;
+    const double basisvalue4 = 2.12132034355964*psitilde_a_1*scalings_y_1*psitilde_bs_1_1;
+    const double basisvalue5 = 1.22474487139159*psitilde_a_0*scalings_y_0*psitilde_bs_0_2;
+    
+    // Table(s) of coefficients
+    const static double coefficients0[6][6] = \
+    {{0, -0.173205080756888, -0.1, 0.121716123890037, 0.0942809041582064, 0.0544331053951817},
+    {0, 0.173205080756888, -0.1, 0.121716123890037, -0.0942809041582063, 0.0544331053951818},
+    {0, 0, 0.2, 0, 0, 0.163299316185545},
+    {0.471404520791032, 0.23094010767585, 0.133333333333333, 0, 0.188561808316413, -0.163299316185545},
+    {0.471404520791032, -0.23094010767585, 0.133333333333333, 0, -0.188561808316413, -0.163299316185545},
+    {0.471404520791032, 0, -0.266666666666667, -0.243432247780074, 0, 0.0544331053951817}};
     
     // Extract relevant coefficients
     const double coeff0_0 = coefficients0[dof][0];
     const double coeff0_1 = coefficients0[dof][1];
     const double coeff0_2 = coefficients0[dof][2];
-    
-    // Compute value(s)
-    *values = coeff0_0*basisvalue0 + coeff0_1*basisvalue1 + coeff0_2*basisvalue2;
+    const double coeff0_3 = coefficients0[dof][3];
+    const double coeff0_4 = coefficients0[dof][4];
+    const double coeff0_5 = coefficients0[dof][5];
+    
+    // Compute value(s)
+    *values = coeff0_0*basisvalue0 + coeff0_1*basisvalue1 + coeff0_2*basisvalue2 + coeff0_3*basisvalue3 + coeff0_4*basisvalue4 + coeff0_5*basisvalue5;
 }
 
 /// Evaluate all basis functions at given point in cell
@@ -9653,38 +10698,55 @@ void UFC_SolitaryWave2DLinearForm_finite
     // Generate scalings
     const double scalings_y_0 = 1;
     const double scalings_y_1 = scalings_y_0*(0.5 - 0.5*y);
-    
-    // Compute psitilde_a
-    const double psitilde_a_0 = 1;
-    const double psitilde_a_1 = x;
-    
-    // Compute psitilde_bs
-    const double psitilde_bs_0_0 = 1;
-    const double psitilde_bs_0_1 = 1.5*y + 0.5;
-    const double psitilde_bs_1_0 = 1;
-    
-    // Compute basisvalues
-    const double basisvalue0 = 0.707106781186548*psitilde_a_0*scalings_y_0*psitilde_bs_0_0;
-    const double basisvalue1 = 1.73205080756888*psitilde_a_1*scalings_y_1*psitilde_bs_1_0;
-    const double basisvalue2 = psitilde_a_0*scalings_y_0*psitilde_bs_0_1;
-    
-    // Table(s) of coefficients
-    const static double coefficients0[3][3] = \
-    {{0.471404520791032, -0.288675134594813, -0.166666666666667},
-    {0.471404520791032, 0.288675134594813, -0.166666666666667},
-    {0.471404520791032, 0, 0.333333333333333}};
-    
-    // Interesting (new) part
-    // Tables of derivatives of the polynomial base (transpose)
-    const static double dmats0[3][3] = \
-    {{0, 0, 0},
-    {4.89897948556636, 0, 0},
-    {0, 0, 0}};
-    
-    const static double dmats1[3][3] = \
-    {{0, 0, 0},
-    {2.44948974278318, 0, 0},
-    {4.24264068711928, 0, 0}};
+    const double scalings_y_2 = scalings_y_1*(0.5 - 0.5*y);
+    
+    // Compute psitilde_a
+    const double psitilde_a_0 = 1;
+    const double psitilde_a_1 = x;
+    const double psitilde_a_2 = 1.5*x*psitilde_a_1 - 0.5*psitilde_a_0;
+    
+    // Compute psitilde_bs
+    const double psitilde_bs_0_0 = 1;
+    const double psitilde_bs_0_1 = 1.5*y + 0.5;
+    const double psitilde_bs_0_2 = 0.111111111111111*psitilde_bs_0_1 + 1.66666666666667*y*psitilde_bs_0_1 - 0.555555555555556*psitilde_bs_0_0;
+    const double psitilde_bs_1_0 = 1;
+    const double psitilde_bs_1_1 = 2.5*y + 1.5;
+    const double psitilde_bs_2_0 = 1;
+    
+    // Compute basisvalues
+    const double basisvalue0 = 0.707106781186548*psitilde_a_0*scalings_y_0*psitilde_bs_0_0;
+    const double basisvalue1 = 1.73205080756888*psitilde_a_1*scalings_y_1*psitilde_bs_1_0;
+    const double basisvalue2 = psitilde_a_0*scalings_y_0*psitilde_bs_0_1;
+    const double basisvalue3 = 2.73861278752583*psitilde_a_2*scalings_y_2*psitilde_bs_2_0;
+    const double basisvalue4 = 2.12132034355964*psitilde_a_1*scalings_y_1*psitilde_bs_1_1;
+    const double basisvalue5 = 1.22474487139159*psitilde_a_0*scalings_y_0*psitilde_bs_0_2;
+    
+    // Table(s) of coefficients
+    const static double coefficients0[6][6] = \
+    {{0, -0.173205080756888, -0.1, 0.121716123890037, 0.0942809041582064, 0.0544331053951817},
+    {0, 0.173205080756888, -0.1, 0.121716123890037, -0.0942809041582063, 0.0544331053951818},
+    {0, 0, 0.2, 0, 0, 0.163299316185545},
+    {0.471404520791032, 0.23094010767585, 0.133333333333333, 0, 0.188561808316413, -0.163299316185545},
+    {0.471404520791032, -0.23094010767585, 0.133333333333333, 0, -0.188561808316413, -0.163299316185545},
+    {0.471404520791032, 0, -0.266666666666667, -0.243432247780074, 0, 0.0544331053951817}};
+    
+    // Interesting (new) part
+    // Tables of derivatives of the polynomial base (transpose)
+    const static double dmats0[6][6] = \
+    {{0, 0, 0, 0, 0, 0},
+    {4.89897948556636, 0, 0, 0, 0, 0},
+    {0, 0, 0, 0, 0, 0},
+    {0, 9.48683298050514, 0, 0, 0, 0},
+    {4, 0, 7.07106781186548, 0, 0, 0},
+    {0, 0, 0, 0, 0, 0}};
+    
+    const static double dmats1[6][6] = \
+    {{0, 0, 0, 0, 0, 0},
+    {2.44948974278318, 0, 0, 0, 0, 0},
+    {4.24264068711928, 0, 0, 0, 0, 0},
+    {2.58198889747161, 4.74341649025257, -0.912870929175277, 0, 0, 0},
+    {2, 6.12372435695795, 3.53553390593274, 0, 0, 0},
+    {-2.3094010767585, 0, 8.16496580927726, 0, 0, 0}};
     
     // Compute reference derivatives
     // Declare pointer to array of derivatives on FIAT element
@@ -9694,11 +10756,17 @@ void UFC_SolitaryWave2DLinearForm_finite
     double coeff0_0 = 0;
     double coeff0_1 = 0;
     double coeff0_2 = 0;
+    double coeff0_3 = 0;
+    double coeff0_4 = 0;
+    double coeff0_5 = 0;
     
     // Declare new coefficients
     double new_coeff0_0 = 0;
     double new_coeff0_1 = 0;
     double new_coeff0_2 = 0;
+    double new_coeff0_3 = 0;
+    double new_coeff0_4 = 0;
+    double new_coeff0_5 = 0;
     
     // Loop possible derivatives
     for (unsigned int deriv_num = 0; deriv_num < num_derivatives; deriv_num++)
@@ -9707,6 +10775,9 @@ void UFC_SolitaryWave2DLinearForm_finite
       new_coeff0_0 = coefficients0[dof][0];
       new_coeff0_1 = coefficients0[dof][1];
       new_coeff0_2 = coefficients0[dof][2];
+      new_coeff0_3 = coefficients0[dof][3];
+      new_coeff0_4 = coefficients0[dof][4];
+      new_coeff0_5 = coefficients0[dof][5];
     
       // Loop derivative order
       for (unsigned int j = 0; j < n; j++)
@@ -9715,23 +10786,32 @@ void UFC_SolitaryWave2DLinearForm_finite
         coeff0_0 = new_coeff0_0;
         coeff0_1 = new_coeff0_1;
         coeff0_2 = new_coeff0_2;
-    
-        if(combinations[deriv_num][j] == 0)
-        {
-          new_coeff0_0 = coeff0_0*dmats0[0][0] + coeff0_1*dmats0[1][0] + coeff0_2*dmats0[2][0];
-          new_coeff0_1 = coeff0_0*dmats0[0][1] + coeff0_1*dmats0[1][1] + coeff0_2*dmats0[2][1];
-          new_coeff0_2 = coeff0_0*dmats0[0][2] + coeff0_1*dmats0[1][2] + coeff0_2*dmats0[2][2];
-        }
-        if(combinations[deriv_num][j] == 1)
-        {
-          new_coeff0_0 = coeff0_0*dmats1[0][0] + coeff0_1*dmats1[1][0] + coeff0_2*dmats1[2][0];
-          new_coeff0_1 = coeff0_0*dmats1[0][1] + coeff0_1*dmats1[1][1] + coeff0_2*dmats1[2][1];
-          new_coeff0_2 = coeff0_0*dmats1[0][2] + coeff0_1*dmats1[1][2] + coeff0_2*dmats1[2][2];
-        }
-    
-      }
-      // Compute derivatives on reference element as dot product of coefficients and basisvalues
-      derivatives[deriv_num] = new_coeff0_0*basisvalue0 + new_coeff0_1*basisvalue1 + new_coeff0_2*basisvalue2;
+        coeff0_3 = new_coeff0_3;
+        coeff0_4 = new_coeff0_4;
+        coeff0_5 = new_coeff0_5;
+    
+        if(combinations[deriv_num][j] == 0)
+        {
+          new_coeff0_0 = coeff0_0*dmats0[0][0] + coeff0_1*dmats0[1][0] + coeff0_2*dmats0[2][0] + coeff0_3*dmats0[3][0] + coeff0_4*dmats0[4][0] + coeff0_5*dmats0[5][0];
+          new_coeff0_1 = coeff0_0*dmats0[0][1] + coeff0_1*dmats0[1][1] + coeff0_2*dmats0[2][1] + coeff0_3*dmats0[3][1] + coeff0_4*dmats0[4][1] + coeff0_5*dmats0[5][1];
+          new_coeff0_2 = coeff0_0*dmats0[0][2] + coeff0_1*dmats0[1][2] + coeff0_2*dmats0[2][2] + coeff0_3*dmats0[3][2] + coeff0_4*dmats0[4][2] + coeff0_5*dmats0[5][2];
+          new_coeff0_3 = coeff0_0*dmats0[0][3] + coeff0_1*dmats0[1][3] + coeff0_2*dmats0[2][3] + coeff0_3*dmats0[3][3] + coeff0_4*dmats0[4][3] + coeff0_5*dmats0[5][3];
+          new_coeff0_4 = coeff0_0*dmats0[0][4] + coeff0_1*dmats0[1][4] + coeff0_2*dmats0[2][4] + coeff0_3*dmats0[3][4] + coeff0_4*dmats0[4][4] + coeff0_5*dmats0[5][4];
+          new_coeff0_5 = coeff0_0*dmats0[0][5] + coeff0_1*dmats0[1][5] + coeff0_2*dmats0[2][5] + coeff0_3*dmats0[3][5] + coeff0_4*dmats0[4][5] + coeff0_5*dmats0[5][5];
+        }
+        if(combinations[deriv_num][j] == 1)
+        {
+          new_coeff0_0 = coeff0_0*dmats1[0][0] + coeff0_1*dmats1[1][0] + coeff0_2*dmats1[2][0] + coeff0_3*dmats1[3][0] + coeff0_4*dmats1[4][0] + coeff0_5*dmats1[5][0];
+          new_coeff0_1 = coeff0_0*dmats1[0][1] + coeff0_1*dmats1[1][1] + coeff0_2*dmats1[2][1] + coeff0_3*dmats1[3][1] + coeff0_4*dmats1[4][1] + coeff0_5*dmats1[5][1];
+          new_coeff0_2 = coeff0_0*dmats1[0][2] + coeff0_1*dmats1[1][2] + coeff0_2*dmats1[2][2] + coeff0_3*dmats1[3][2] + coeff0_4*dmats1[4][2] + coeff0_5*dmats1[5][2];
+          new_coeff0_3 = coeff0_0*dmats1[0][3] + coeff0_1*dmats1[1][3] + coeff0_2*dmats1[2][3] + coeff0_3*dmats1[3][3] + coeff0_4*dmats1[4][3] + coeff0_5*dmats1[5][3];
+          new_coeff0_4 = coeff0_0*dmats1[0][4] + coeff0_1*dmats1[1][4] + coeff0_2*dmats1[2][4] + coeff0_3*dmats1[3][4] + coeff0_4*dmats1[4][4] + coeff0_5*dmats1[5][4];
+          new_coeff0_5 = coeff0_0*dmats1[0][5] + coeff0_1*dmats1[1][5] + coeff0_2*dmats1[2][5] + coeff0_3*dmats1[3][5] + coeff0_4*dmats1[4][5] + coeff0_5*dmats1[5][5];
+        }
+    
+      }
+      // Compute derivatives on reference element as dot product of coefficients and basisvalues
+      derivatives[deriv_num] = new_coeff0_0*basisvalue0 + new_coeff0_1*basisvalue1 + new_coeff0_2*basisvalue2 + new_coeff0_3*basisvalue3 + new_coeff0_4*basisvalue4 + new_coeff0_5*basisvalue5;
     }
     
     // Transform derivatives back to physical element
@@ -9771,9 +10851,9 @@ double UFC_SolitaryWave2DLinearForm_fini
                                    const ufc::cell& c) const
 {
     // The reference points, direction and weights:
-    const static double X[3][1][2] = {{{0, 0}}, {{1, 0}}, {{0, 1}}};
-    const static double W[3][1] = {{1}, {1}, {1}};
-    const static double D[3][1][1] = {{{1}}, {{1}}, {{1}}};
+    const static double X[6][1][2] = {{{0, 0}}, {{1, 0}}, {{0, 1}}, {{0.5, 0.5}}, {{0, 0.5}}, {{0.5, 0}}};
+    const static double W[6][1] = {{1}, {1}, {1}, {1}, {1}, {1}};
+    const static double D[6][1][1] = {{{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}};
     
     const double * const * x = c.coordinates;
     double result = 0.0;
@@ -9853,7 +10933,7 @@ UFC_SolitaryWave2DLinearForm_finite_elem
 /// Return a string identifying the finite element
 const char* UFC_SolitaryWave2DLinearForm_finite_element_0::signature() const
 {
-    return "MixedElement([FiniteElement('Lagrange', 'triangle', 1), FiniteElement('Lagrange', 'triangle', 1)])";
+    return "MixedElement([FiniteElement('Lagrange', 'triangle', 2), FiniteElement('Lagrange', 'triangle', 2)])";
 }
 
 /// Return the cell shape
@@ -9865,7 +10945,7 @@ ufc::shape UFC_SolitaryWave2DLinearForm_
 /// Return the dimension of the finite element function space
 unsigned int UFC_SolitaryWave2DLinearForm_finite_element_0::space_dimension() const
 {
-    return 6;
+    return 12;
 }
 
 /// Return the rank of the value space
@@ -9919,7 +10999,7 @@ void UFC_SolitaryWave2DLinearForm_finite
     values[0] = 0;
     values[1] = 0;
     
-    if (0 <= i && i <= 2)
+    if (0 <= i && i <= 5)
     {
       // Map degree of freedom to element degree of freedom
       const unsigned int dof = i;
@@ -9927,72 +11007,100 @@ void UFC_SolitaryWave2DLinearForm_finite
       // Generate scalings
       const double scalings_y_0 = 1;
       const double scalings_y_1 = scalings_y_0*(0.5 - 0.5*y);
-    
-      // Compute psitilde_a
-      const double psitilde_a_0 = 1;
-      const double psitilde_a_1 = x;
-    
-      // Compute psitilde_bs
-      const double psitilde_bs_0_0 = 1;
-      const double psitilde_bs_0_1 = 1.5*y + 0.5;
-      const double psitilde_bs_1_0 = 1;
-    
-      // Compute basisvalues
-      const double basisvalue0 = 0.707106781186548*psitilde_a_0*scalings_y_0*psitilde_bs_0_0;
-      const double basisvalue1 = 1.73205080756888*psitilde_a_1*scalings_y_1*psitilde_bs_1_0;
-      const double basisvalue2 = psitilde_a_0*scalings_y_0*psitilde_bs_0_1;
-    
-      // Table(s) of coefficients
-      const static double coefficients0[3][3] =   \
-      {{0.471404520791032, -0.288675134594813, -0.166666666666667},
-      {0.471404520791032, 0.288675134594813, -0.166666666666667},
-      {0.471404520791032, 0, 0.333333333333333}};
+      const double scalings_y_2 = scalings_y_1*(0.5 - 0.5*y);
+    
+      // Compute psitilde_a
+      const double psitilde_a_0 = 1;
+      const double psitilde_a_1 = x;
+      const double psitilde_a_2 = 1.5*x*psitilde_a_1 - 0.5*psitilde_a_0;
+    
+      // Compute psitilde_bs
+      const double psitilde_bs_0_0 = 1;
+      const double psitilde_bs_0_1 = 1.5*y + 0.5;
+      const double psitilde_bs_0_2 = 0.111111111111111*psitilde_bs_0_1 + 1.66666666666667*y*psitilde_bs_0_1 - 0.555555555555556*psitilde_bs_0_0;
+      const double psitilde_bs_1_0 = 1;
+      const double psitilde_bs_1_1 = 2.5*y + 1.5;
+      const double psitilde_bs_2_0 = 1;
+    
+      // Compute basisvalues
+      const double basisvalue0 = 0.707106781186548*psitilde_a_0*scalings_y_0*psitilde_bs_0_0;
+      const double basisvalue1 = 1.73205080756888*psitilde_a_1*scalings_y_1*psitilde_bs_1_0;
+      const double basisvalue2 = psitilde_a_0*scalings_y_0*psitilde_bs_0_1;
+      const double basisvalue3 = 2.73861278752583*psitilde_a_2*scalings_y_2*psitilde_bs_2_0;
+      const double basisvalue4 = 2.12132034355964*psitilde_a_1*scalings_y_1*psitilde_bs_1_1;
+      const double basisvalue5 = 1.22474487139159*psitilde_a_0*scalings_y_0*psitilde_bs_0_2;
+    
+      // Table(s) of coefficients
+      const static double coefficients0[6][6] =   \
+      {{0, -0.173205080756888, -0.1, 0.121716123890037, 0.0942809041582064, 0.0544331053951817},
+      {0, 0.173205080756888, -0.1, 0.121716123890037, -0.0942809041582063, 0.0544331053951818},
+      {0, 0, 0.2, 0, 0, 0.163299316185545},
+      {0.471404520791032, 0.23094010767585, 0.133333333333333, 0, 0.188561808316413, -0.163299316185545},
+      {0.471404520791032, -0.23094010767585, 0.133333333333333, 0, -0.188561808316413, -0.163299316185545},
+      {0.471404520791032, 0, -0.266666666666667, -0.243432247780074, 0, 0.0544331053951817}};
     
       // Extract relevant coefficients
       const double coeff0_0 =   coefficients0[dof][0];
       const double coeff0_1 =   coefficients0[dof][1];
       const double coeff0_2 =   coefficients0[dof][2];
+      const double coeff0_3 =   coefficients0[dof][3];
+      const double coeff0_4 =   coefficients0[dof][4];
+      const double coeff0_5 =   coefficients0[dof][5];
     
       // Compute value(s)
-      values[0] = coeff0_0*basisvalue0 + coeff0_1*basisvalue1 + coeff0_2*basisvalue2;
-    }
-    
-    if (3 <= i && i <= 5)
-    {
-      // Map degree of freedom to element degree of freedom
-      const unsigned int dof = i - 3;
-    
-      // Generate scalings
-      const double scalings_y_0 = 1;
-      const double scalings_y_1 = scalings_y_0*(0.5 - 0.5*y);
-    
-      // Compute psitilde_a
-      const double psitilde_a_0 = 1;
-      const double psitilde_a_1 = x;
-    
-      // Compute psitilde_bs
-      const double psitilde_bs_0_0 = 1;
-      const double psitilde_bs_0_1 = 1.5*y + 0.5;
-      const double psitilde_bs_1_0 = 1;
-    
-      // Compute basisvalues
-      const double basisvalue0 = 0.707106781186548*psitilde_a_0*scalings_y_0*psitilde_bs_0_0;
-      const double basisvalue1 = 1.73205080756888*psitilde_a_1*scalings_y_1*psitilde_bs_1_0;
-      const double basisvalue2 = psitilde_a_0*scalings_y_0*psitilde_bs_0_1;
-    
-      // Table(s) of coefficients
-      const static double coefficients0[3][3] =   \
-      {{0.471404520791032, -0.288675134594813, -0.166666666666667},
-      {0.471404520791032, 0.288675134594813, -0.166666666666667},
-      {0.471404520791032, 0, 0.333333333333333}};
+      values[0] = coeff0_0*basisvalue0 + coeff0_1*basisvalue1 + coeff0_2*basisvalue2 + coeff0_3*basisvalue3 + coeff0_4*basisvalue4 + coeff0_5*basisvalue5;
+    }
+    
+    if (6 <= i && i <= 11)
+    {
+      // Map degree of freedom to element degree of freedom
+      const unsigned int dof = i - 6;
+    
+      // Generate scalings
+      const double scalings_y_0 = 1;
+      const double scalings_y_1 = scalings_y_0*(0.5 - 0.5*y);
+      const double scalings_y_2 = scalings_y_1*(0.5 - 0.5*y);
+    
+      // Compute psitilde_a
+      const double psitilde_a_0 = 1;
+      const double psitilde_a_1 = x;
+      const double psitilde_a_2 = 1.5*x*psitilde_a_1 - 0.5*psitilde_a_0;
+    
+      // Compute psitilde_bs
+      const double psitilde_bs_0_0 = 1;
+      const double psitilde_bs_0_1 = 1.5*y + 0.5;
+      const double psitilde_bs_0_2 = 0.111111111111111*psitilde_bs_0_1 + 1.66666666666667*y*psitilde_bs_0_1 - 0.555555555555556*psitilde_bs_0_0;
+      const double psitilde_bs_1_0 = 1;
+      const double psitilde_bs_1_1 = 2.5*y + 1.5;
+      const double psitilde_bs_2_0 = 1;
+    
+      // Compute basisvalues
+      const double basisvalue0 = 0.707106781186548*psitilde_a_0*scalings_y_0*psitilde_bs_0_0;
+      const double basisvalue1 = 1.73205080756888*psitilde_a_1*scalings_y_1*psitilde_bs_1_0;
+      const double basisvalue2 = psitilde_a_0*scalings_y_0*psitilde_bs_0_1;
+      const double basisvalue3 = 2.73861278752583*psitilde_a_2*scalings_y_2*psitilde_bs_2_0;
+      const double basisvalue4 = 2.12132034355964*psitilde_a_1*scalings_y_1*psitilde_bs_1_1;
+      const double basisvalue5 = 1.22474487139159*psitilde_a_0*scalings_y_0*psitilde_bs_0_2;
+    
+      // Table(s) of coefficients
+      const static double coefficients0[6][6] =   \
+      {{0, -0.173205080756888, -0.1, 0.121716123890037, 0.0942809041582064, 0.0544331053951817},
+      {0, 0.173205080756888, -0.1, 0.121716123890037, -0.0942809041582063, 0.0544331053951818},
+      {0, 0, 0.2, 0, 0, 0.163299316185545},
+      {0.471404520791032, 0.23094010767585, 0.133333333333333, 0, 0.188561808316413, -0.163299316185545},
+      {0.471404520791032, -0.23094010767585, 0.133333333333333, 0, -0.188561808316413, -0.163299316185545},
+      {0.471404520791032, 0, -0.266666666666667, -0.243432247780074, 0, 0.0544331053951817}};
     
       // Extract relevant coefficients
       const double coeff0_0 =   coefficients0[dof][0];
       const double coeff0_1 =   coefficients0[dof][1];
       const double coeff0_2 =   coefficients0[dof][2];
+      const double coeff0_3 =   coefficients0[dof][3];
+      const double coeff0_4 =   coefficients0[dof][4];
+      const double coeff0_5 =   coefficients0[dof][5];
     
       // Compute value(s)
-      values[1] = coeff0_0*basisvalue0 + coeff0_1*basisvalue1 + coeff0_2*basisvalue2;
+      values[1] = coeff0_0*basisvalue0 + coeff0_1*basisvalue1 + coeff0_2*basisvalue2 + coeff0_3*basisvalue3 + coeff0_4*basisvalue4 + coeff0_5*basisvalue5;
     }
     
 }
@@ -10104,7 +11212,7 @@ void UFC_SolitaryWave2DLinearForm_finite
     for (unsigned int j = 0; j < 2*num_derivatives; j++)
       values[j] = 0;
     
-    if (0 <= i && i <= 2)
+    if (0 <= i && i <= 5)
     {
       // Map degree of freedom to element degree of freedom
       const unsigned int dof = i;
@@ -10112,38 +11220,55 @@ void UFC_SolitaryWave2DLinearForm_finite
       // Generate scalings
       const double scalings_y_0 = 1;
       const double scalings_y_1 = scalings_y_0*(0.5 - 0.5*y);
-    
-      // Compute psitilde_a
-      const double psitilde_a_0 = 1;
-      const double psitilde_a_1 = x;
-    
-      // Compute psitilde_bs
-      const double psitilde_bs_0_0 = 1;
-      const double psitilde_bs_0_1 = 1.5*y + 0.5;
-      const double psitilde_bs_1_0 = 1;
-    
-      // Compute basisvalues
-      const double basisvalue0 = 0.707106781186548*psitilde_a_0*scalings_y_0*psitilde_bs_0_0;
-      const double basisvalue1 = 1.73205080756888*psitilde_a_1*scalings_y_1*psitilde_bs_1_0;
-      const double basisvalue2 = psitilde_a_0*scalings_y_0*psitilde_bs_0_1;
-    
-      // Table(s) of coefficients
-      const static double coefficients0[3][3] =   \
-      {{0.471404520791032, -0.288675134594813, -0.166666666666667},
-      {0.471404520791032, 0.288675134594813, -0.166666666666667},
-      {0.471404520791032, 0, 0.333333333333333}};
+      const double scalings_y_2 = scalings_y_1*(0.5 - 0.5*y);
+    
+      // Compute psitilde_a
+      const double psitilde_a_0 = 1;
+      const double psitilde_a_1 = x;
+      const double psitilde_a_2 = 1.5*x*psitilde_a_1 - 0.5*psitilde_a_0;
+    
+      // Compute psitilde_bs
+      const double psitilde_bs_0_0 = 1;
+      const double psitilde_bs_0_1 = 1.5*y + 0.5;
+      const double psitilde_bs_0_2 = 0.111111111111111*psitilde_bs_0_1 + 1.66666666666667*y*psitilde_bs_0_1 - 0.555555555555556*psitilde_bs_0_0;
+      const double psitilde_bs_1_0 = 1;
+      const double psitilde_bs_1_1 = 2.5*y + 1.5;
+      const double psitilde_bs_2_0 = 1;
+    
+      // Compute basisvalues
+      const double basisvalue0 = 0.707106781186548*psitilde_a_0*scalings_y_0*psitilde_bs_0_0;
+      const double basisvalue1 = 1.73205080756888*psitilde_a_1*scalings_y_1*psitilde_bs_1_0;
+      const double basisvalue2 = psitilde_a_0*scalings_y_0*psitilde_bs_0_1;
+      const double basisvalue3 = 2.73861278752583*psitilde_a_2*scalings_y_2*psitilde_bs_2_0;
+      const double basisvalue4 = 2.12132034355964*psitilde_a_1*scalings_y_1*psitilde_bs_1_1;
+      const double basisvalue5 = 1.22474487139159*psitilde_a_0*scalings_y_0*psitilde_bs_0_2;
+    
+      // Table(s) of coefficients
+      const static double coefficients0[6][6] =   \
+      {{0, -0.173205080756888, -0.1, 0.121716123890037, 0.0942809041582064, 0.0544331053951817},
+      {0, 0.173205080756888, -0.1, 0.121716123890037, -0.0942809041582063, 0.0544331053951818},
+      {0, 0, 0.2, 0, 0, 0.163299316185545},
+      {0.471404520791032, 0.23094010767585, 0.133333333333333, 0, 0.188561808316413, -0.163299316185545},
+      {0.471404520791032, -0.23094010767585, 0.133333333333333, 0, -0.188561808316413, -0.163299316185545},
+      {0.471404520791032, 0, -0.266666666666667, -0.243432247780074, 0, 0.0544331053951817}};
     
       // Interesting (new) part
       // Tables of derivatives of the polynomial base (transpose)
-      const static double dmats0[3][3] =   \
-      {{0, 0, 0},
-      {4.89897948556636, 0, 0},
-      {0, 0, 0}};
-    
-      const static double dmats1[3][3] =   \
-      {{0, 0, 0},
-      {2.44948974278318, 0, 0},
-      {4.24264068711928, 0, 0}};
+      const static double dmats0[6][6] =   \
+      {{0, 0, 0, 0, 0, 0},
+      {4.89897948556636, 0, 0, 0, 0, 0},
+      {0, 0, 0, 0, 0, 0},
+      {0, 9.48683298050514, 0, 0, 0, 0},
+      {4, 0, 7.07106781186548, 0, 0, 0},
+      {0, 0, 0, 0, 0, 0}};
+    
+      const static double dmats1[6][6] =   \
+      {{0, 0, 0, 0, 0, 0},
+      {2.44948974278318, 0, 0, 0, 0, 0},
+      {4.24264068711928, 0, 0, 0, 0, 0},
+      {2.58198889747161, 4.74341649025257, -0.912870929175277, 0, 0, 0},
+      {2, 6.12372435695795, 3.53553390593274, 0, 0, 0},
+      {-2.3094010767585, 0, 8.16496580927726, 0, 0, 0}};
     
       // Compute reference derivatives
       // Declare pointer to array of derivatives on FIAT element
@@ -10153,11 +11278,17 @@ void UFC_SolitaryWave2DLinearForm_finite
       double coeff0_0 = 0;
       double coeff0_1 = 0;
       double coeff0_2 = 0;
+      double coeff0_3 = 0;
+      double coeff0_4 = 0;
+      double coeff0_5 = 0;
     
       // Declare new coefficients
       double new_coeff0_0 = 0;
       double new_coeff0_1 = 0;
       double new_coeff0_2 = 0;
+      double new_coeff0_3 = 0;
+      double new_coeff0_4 = 0;
+      double new_coeff0_5 = 0;
     
       // Loop possible derivatives
       for (unsigned int deriv_num = 0; deriv_num < num_derivatives; deriv_num++)
@@ -10166,6 +11297,9 @@ void UFC_SolitaryWave2DLinearForm_finite
         new_coeff0_0 = coefficients0[dof][0];
         new_coeff0_1 = coefficients0[dof][1];
         new_coeff0_2 = coefficients0[dof][2];
+        new_coeff0_3 = coefficients0[dof][3];
+        new_coeff0_4 = coefficients0[dof][4];
+        new_coeff0_5 = coefficients0[dof][5];
     
         // Loop derivative order
         for (unsigned int j = 0; j < n; j++)
@@ -10174,23 +11308,32 @@ void UFC_SolitaryWave2DLinearForm_finite
           coeff0_0 = new_coeff0_0;
           coeff0_1 = new_coeff0_1;
           coeff0_2 = new_coeff0_2;
+          coeff0_3 = new_coeff0_3;
+          coeff0_4 = new_coeff0_4;
+          coeff0_5 = new_coeff0_5;
     
           if(combinations[deriv_num][j] == 0)
           {
-            new_coeff0_0 = coeff0_0*dmats0[0][0] + coeff0_1*dmats0[1][0] + coeff0_2*dmats0[2][0];
-            new_coeff0_1 = coeff0_0*dmats0[0][1] + coeff0_1*dmats0[1][1] + coeff0_2*dmats0[2][1];
-            new_coeff0_2 = coeff0_0*dmats0[0][2] + coeff0_1*dmats0[1][2] + coeff0_2*dmats0[2][2];
+            new_coeff0_0 = coeff0_0*dmats0[0][0] + coeff0_1*dmats0[1][0] + coeff0_2*dmats0[2][0] + coeff0_3*dmats0[3][0] + coeff0_4*dmats0[4][0] + coeff0_5*dmats0[5][0];
+            new_coeff0_1 = coeff0_0*dmats0[0][1] + coeff0_1*dmats0[1][1] + coeff0_2*dmats0[2][1] + coeff0_3*dmats0[3][1] + coeff0_4*dmats0[4][1] + coeff0_5*dmats0[5][1];
+            new_coeff0_2 = coeff0_0*dmats0[0][2] + coeff0_1*dmats0[1][2] + coeff0_2*dmats0[2][2] + coeff0_3*dmats0[3][2] + coeff0_4*dmats0[4][2] + coeff0_5*dmats0[5][2];
+            new_coeff0_3 = coeff0_0*dmats0[0][3] + coeff0_1*dmats0[1][3] + coeff0_2*dmats0[2][3] + coeff0_3*dmats0[3][3] + coeff0_4*dmats0[4][3] + coeff0_5*dmats0[5][3];
+            new_coeff0_4 = coeff0_0*dmats0[0][4] + coeff0_1*dmats0[1][4] + coeff0_2*dmats0[2][4] + coeff0_3*dmats0[3][4] + coeff0_4*dmats0[4][4] + coeff0_5*dmats0[5][4];
+            new_coeff0_5 = coeff0_0*dmats0[0][5] + coeff0_1*dmats0[1][5] + coeff0_2*dmats0[2][5] + coeff0_3*dmats0[3][5] + coeff0_4*dmats0[4][5] + coeff0_5*dmats0[5][5];
           }
           if(combinations[deriv_num][j] == 1)
           {
-            new_coeff0_0 = coeff0_0*dmats1[0][0] + coeff0_1*dmats1[1][0] + coeff0_2*dmats1[2][0];
-            new_coeff0_1 = coeff0_0*dmats1[0][1] + coeff0_1*dmats1[1][1] + coeff0_2*dmats1[2][1];
-            new_coeff0_2 = coeff0_0*dmats1[0][2] + coeff0_1*dmats1[1][2] + coeff0_2*dmats1[2][2];
+            new_coeff0_0 = coeff0_0*dmats1[0][0] + coeff0_1*dmats1[1][0] + coeff0_2*dmats1[2][0] + coeff0_3*dmats1[3][0] + coeff0_4*dmats1[4][0] + coeff0_5*dmats1[5][0];
+            new_coeff0_1 = coeff0_0*dmats1[0][1] + coeff0_1*dmats1[1][1] + coeff0_2*dmats1[2][1] + coeff0_3*dmats1[3][1] + coeff0_4*dmats1[4][1] + coeff0_5*dmats1[5][1];
+            new_coeff0_2 = coeff0_0*dmats1[0][2] + coeff0_1*dmats1[1][2] + coeff0_2*dmats1[2][2] + coeff0_3*dmats1[3][2] + coeff0_4*dmats1[4][2] + coeff0_5*dmats1[5][2];
+            new_coeff0_3 = coeff0_0*dmats1[0][3] + coeff0_1*dmats1[1][3] + coeff0_2*dmats1[2][3] + coeff0_3*dmats1[3][3] + coeff0_4*dmats1[4][3] + coeff0_5*dmats1[5][3];
+            new_coeff0_4 = coeff0_0*dmats1[0][4] + coeff0_1*dmats1[1][4] + coeff0_2*dmats1[2][4] + coeff0_3*dmats1[3][4] + coeff0_4*dmats1[4][4] + coeff0_5*dmats1[5][4];
+            new_coeff0_5 = coeff0_0*dmats1[0][5] + coeff0_1*dmats1[1][5] + coeff0_2*dmats1[2][5] + coeff0_3*dmats1[3][5] + coeff0_4*dmats1[4][5] + coeff0_5*dmats1[5][5];
           }
     
         }
         // Compute derivatives on reference element as dot product of coefficients and basisvalues
-        derivatives[deriv_num] = new_coeff0_0*basisvalue0 + new_coeff0_1*basisvalue1 + new_coeff0_2*basisvalue2;
+        derivatives[deriv_num] = new_coeff0_0*basisvalue0 + new_coeff0_1*basisvalue1 + new_coeff0_2*basisvalue2 + new_coeff0_3*basisvalue3 + new_coeff0_4*basisvalue4 + new_coeff0_5*basisvalue5;
       }
     
       // Transform derivatives back to physical element
@@ -10215,46 +11358,63 @@ void UFC_SolitaryWave2DLinearForm_finite
       delete [] transform;
     }
     
-    if (3 <= i && i <= 5)
-    {
-      // Map degree of freedom to element degree of freedom
-      const unsigned int dof = i - 3;
-    
-      // Generate scalings
-      const double scalings_y_0 = 1;
-      const double scalings_y_1 = scalings_y_0*(0.5 - 0.5*y);
-    
-      // Compute psitilde_a
-      const double psitilde_a_0 = 1;
-      const double psitilde_a_1 = x;
-    
-      // Compute psitilde_bs
-      const double psitilde_bs_0_0 = 1;
-      const double psitilde_bs_0_1 = 1.5*y + 0.5;
-      const double psitilde_bs_1_0 = 1;
-    
-      // Compute basisvalues
-      const double basisvalue0 = 0.707106781186548*psitilde_a_0*scalings_y_0*psitilde_bs_0_0;
-      const double basisvalue1 = 1.73205080756888*psitilde_a_1*scalings_y_1*psitilde_bs_1_0;
-      const double basisvalue2 = psitilde_a_0*scalings_y_0*psitilde_bs_0_1;
-    
-      // Table(s) of coefficients
-      const static double coefficients0[3][3] =   \
-      {{0.471404520791032, -0.288675134594813, -0.166666666666667},
-      {0.471404520791032, 0.288675134594813, -0.166666666666667},
-      {0.471404520791032, 0, 0.333333333333333}};
+    if (6 <= i && i <= 11)
+    {
+      // Map degree of freedom to element degree of freedom
+      const unsigned int dof = i - 6;
+    
+      // Generate scalings
+      const double scalings_y_0 = 1;
+      const double scalings_y_1 = scalings_y_0*(0.5 - 0.5*y);
+      const double scalings_y_2 = scalings_y_1*(0.5 - 0.5*y);
+    
+      // Compute psitilde_a
+      const double psitilde_a_0 = 1;
+      const double psitilde_a_1 = x;
+      const double psitilde_a_2 = 1.5*x*psitilde_a_1 - 0.5*psitilde_a_0;
+    
+      // Compute psitilde_bs
+      const double psitilde_bs_0_0 = 1;
+      const double psitilde_bs_0_1 = 1.5*y + 0.5;
+      const double psitilde_bs_0_2 = 0.111111111111111*psitilde_bs_0_1 + 1.66666666666667*y*psitilde_bs_0_1 - 0.555555555555556*psitilde_bs_0_0;
+      const double psitilde_bs_1_0 = 1;
+      const double psitilde_bs_1_1 = 2.5*y + 1.5;
+      const double psitilde_bs_2_0 = 1;
+    
+      // Compute basisvalues
+      const double basisvalue0 = 0.707106781186548*psitilde_a_0*scalings_y_0*psitilde_bs_0_0;
+      const double basisvalue1 = 1.73205080756888*psitilde_a_1*scalings_y_1*psitilde_bs_1_0;
+      const double basisvalue2 = psitilde_a_0*scalings_y_0*psitilde_bs_0_1;
+      const double basisvalue3 = 2.73861278752583*psitilde_a_2*scalings_y_2*psitilde_bs_2_0;
+      const double basisvalue4 = 2.12132034355964*psitilde_a_1*scalings_y_1*psitilde_bs_1_1;
+      const double basisvalue5 = 1.22474487139159*psitilde_a_0*scalings_y_0*psitilde_bs_0_2;
+    
+      // Table(s) of coefficients
+      const static double coefficients0[6][6] =   \
+      {{0, -0.173205080756888, -0.1, 0.121716123890037, 0.0942809041582064, 0.0544331053951817},
+      {0, 0.173205080756888, -0.1, 0.121716123890037, -0.0942809041582063, 0.0544331053951818},
+      {0, 0, 0.2, 0, 0, 0.163299316185545},
+      {0.471404520791032, 0.23094010767585, 0.133333333333333, 0, 0.188561808316413, -0.163299316185545},
+      {0.471404520791032, -0.23094010767585, 0.133333333333333, 0, -0.188561808316413, -0.163299316185545},
+      {0.471404520791032, 0, -0.266666666666667, -0.243432247780074, 0, 0.0544331053951817}};
     
       // Interesting (new) part
       // Tables of derivatives of the polynomial base (transpose)
-      const static double dmats0[3][3] =   \
-      {{0, 0, 0},
-      {4.89897948556636, 0, 0},
-      {0, 0, 0}};
-    
-      const static double dmats1[3][3] =   \
-      {{0, 0, 0},
-      {2.44948974278318, 0, 0},
-      {4.24264068711928, 0, 0}};
+      const static double dmats0[6][6] =   \
+      {{0, 0, 0, 0, 0, 0},
+      {4.89897948556636, 0, 0, 0, 0, 0},
+      {0, 0, 0, 0, 0, 0},
+      {0, 9.48683298050514, 0, 0, 0, 0},
+      {4, 0, 7.07106781186548, 0, 0, 0},
+      {0, 0, 0, 0, 0, 0}};
+    
+      const static double dmats1[6][6] =   \
+      {{0, 0, 0, 0, 0, 0},
+      {2.44948974278318, 0, 0, 0, 0, 0},
+      {4.24264068711928, 0, 0, 0, 0, 0},
+      {2.58198889747161, 4.74341649025257, -0.912870929175277, 0, 0, 0},
+      {2, 6.12372435695795, 3.53553390593274, 0, 0, 0},
+      {-2.3094010767585, 0, 8.16496580927726, 0, 0, 0}};
     
       // Compute reference derivatives
       // Declare pointer to array of derivatives on FIAT element
@@ -10264,11 +11424,17 @@ void UFC_SolitaryWave2DLinearForm_finite
       double coeff0_0 = 0;
       double coeff0_1 = 0;
       double coeff0_2 = 0;
+      double coeff0_3 = 0;
+      double coeff0_4 = 0;
+      double coeff0_5 = 0;
     
       // Declare new coefficients
       double new_coeff0_0 = 0;
       double new_coeff0_1 = 0;
       double new_coeff0_2 = 0;
+      double new_coeff0_3 = 0;
+      double new_coeff0_4 = 0;
+      double new_coeff0_5 = 0;
     
       // Loop possible derivatives
       for (unsigned int deriv_num = 0; deriv_num < num_derivatives; deriv_num++)
@@ -10277,6 +11443,9 @@ void UFC_SolitaryWave2DLinearForm_finite
         new_coeff0_0 = coefficients0[dof][0];
         new_coeff0_1 = coefficients0[dof][1];
         new_coeff0_2 = coefficients0[dof][2];
+        new_coeff0_3 = coefficients0[dof][3];
+        new_coeff0_4 = coefficients0[dof][4];
+        new_coeff0_5 = coefficients0[dof][5];
     
         // Loop derivative order
         for (unsigned int j = 0; j < n; j++)
@@ -10285,23 +11454,32 @@ void UFC_SolitaryWave2DLinearForm_finite
           coeff0_0 = new_coeff0_0;
           coeff0_1 = new_coeff0_1;
           coeff0_2 = new_coeff0_2;
+          coeff0_3 = new_coeff0_3;
+          coeff0_4 = new_coeff0_4;
+          coeff0_5 = new_coeff0_5;
     
           if(combinations[deriv_num][j] == 0)
           {
-            new_coeff0_0 = coeff0_0*dmats0[0][0] + coeff0_1*dmats0[1][0] + coeff0_2*dmats0[2][0];
-            new_coeff0_1 = coeff0_0*dmats0[0][1] + coeff0_1*dmats0[1][1] + coeff0_2*dmats0[2][1];
-            new_coeff0_2 = coeff0_0*dmats0[0][2] + coeff0_1*dmats0[1][2] + coeff0_2*dmats0[2][2];
+            new_coeff0_0 = coeff0_0*dmats0[0][0] + coeff0_1*dmats0[1][0] + coeff0_2*dmats0[2][0] + coeff0_3*dmats0[3][0] + coeff0_4*dmats0[4][0] + coeff0_5*dmats0[5][0];
+            new_coeff0_1 = coeff0_0*dmats0[0][1] + coeff0_1*dmats0[1][1] + coeff0_2*dmats0[2][1] + coeff0_3*dmats0[3][1] + coeff0_4*dmats0[4][1] + coeff0_5*dmats0[5][1];
+            new_coeff0_2 = coeff0_0*dmats0[0][2] + coeff0_1*dmats0[1][2] + coeff0_2*dmats0[2][2] + coeff0_3*dmats0[3][2] + coeff0_4*dmats0[4][2] + coeff0_5*dmats0[5][2];
+            new_coeff0_3 = coeff0_0*dmats0[0][3] + coeff0_1*dmats0[1][3] + coeff0_2*dmats0[2][3] + coeff0_3*dmats0[3][3] + coeff0_4*dmats0[4][3] + coeff0_5*dmats0[5][3];
+            new_coeff0_4 = coeff0_0*dmats0[0][4] + coeff0_1*dmats0[1][4] + coeff0_2*dmats0[2][4] + coeff0_3*dmats0[3][4] + coeff0_4*dmats0[4][4] + coeff0_5*dmats0[5][4];
+            new_coeff0_5 = coeff0_0*dmats0[0][5] + coeff0_1*dmats0[1][5] + coeff0_2*dmats0[2][5] + coeff0_3*dmats0[3][5] + coeff0_4*dmats0[4][5] + coeff0_5*dmats0[5][5];
           }
           if(combinations[deriv_num][j] == 1)
           {
-            new_coeff0_0 = coeff0_0*dmats1[0][0] + coeff0_1*dmats1[1][0] + coeff0_2*dmats1[2][0];
-            new_coeff0_1 = coeff0_0*dmats1[0][1] + coeff0_1*dmats1[1][1] + coeff0_2*dmats1[2][1];
-            new_coeff0_2 = coeff0_0*dmats1[0][2] + coeff0_1*dmats1[1][2] + coeff0_2*dmats1[2][2];
+            new_coeff0_0 = coeff0_0*dmats1[0][0] + coeff0_1*dmats1[1][0] + coeff0_2*dmats1[2][0] + coeff0_3*dmats1[3][0] + coeff0_4*dmats1[4][0] + coeff0_5*dmats1[5][0];
+            new_coeff0_1 = coeff0_0*dmats1[0][1] + coeff0_1*dmats1[1][1] + coeff0_2*dmats1[2][1] + coeff0_3*dmats1[3][1] + coeff0_4*dmats1[4][1] + coeff0_5*dmats1[5][1];
+            new_coeff0_2 = coeff0_0*dmats1[0][2] + coeff0_1*dmats1[1][2] + coeff0_2*dmats1[2][2] + coeff0_3*dmats1[3][2] + coeff0_4*dmats1[4][2] + coeff0_5*dmats1[5][2];
+            new_coeff0_3 = coeff0_0*dmats1[0][3] + coeff0_1*dmats1[1][3] + coeff0_2*dmats1[2][3] + coeff0_3*dmats1[3][3] + coeff0_4*dmats1[4][3] + coeff0_5*dmats1[5][3];
+            new_coeff0_4 = coeff0_0*dmats1[0][4] + coeff0_1*dmats1[1][4] + coeff0_2*dmats1[2][4] + coeff0_3*dmats1[3][4] + coeff0_4*dmats1[4][4] + coeff0_5*dmats1[5][4];
+            new_coeff0_5 = coeff0_0*dmats1[0][5] + coeff0_1*dmats1[1][5] + coeff0_2*dmats1[2][5] + coeff0_3*dmats1[3][5] + coeff0_4*dmats1[4][5] + coeff0_5*dmats1[5][5];
           }
     
         }
         // Compute derivatives on reference element as dot product of coefficients and basisvalues
-        derivatives[deriv_num] = new_coeff0_0*basisvalue0 + new_coeff0_1*basisvalue1 + new_coeff0_2*basisvalue2;
+        derivatives[deriv_num] = new_coeff0_0*basisvalue0 + new_coeff0_1*basisvalue1 + new_coeff0_2*basisvalue2 + new_coeff0_3*basisvalue3 + new_coeff0_4*basisvalue4 + new_coeff0_5*basisvalue5;
       }
     
       // Transform derivatives back to physical element
@@ -10343,9 +11521,9 @@ double UFC_SolitaryWave2DLinearForm_fini
                                    const ufc::cell& c) const
 {
     // The reference points, direction and weights:
-    const static double X[6][1][2] = {{{0, 0}}, {{1, 0}}, {{0, 1}}, {{0, 0}}, {{1, 0}}, {{0, 1}}};
-    const static double W[6][1] = {{1}, {1}, {1}, {1}, {1}, {1}};
-    const static double D[6][1][2] = {{{1, 0}}, {{1, 0}}, {{1, 0}}, {{0, 1}}, {{0, 1}}, {{0, 1}}};
+    const static double X[12][1][2] = {{{0, 0}}, {{1, 0}}, {{0, 1}}, {{0.5, 0.5}}, {{0, 0.5}}, {{0.5, 0}}, {{0, 0}}, {{1, 0}}, {{0, 1}}, {{0.5, 0.5}}, {{0, 0.5}}, {{0.5, 0}}};
+    const static double W[12][1] = {{1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}};
+    const static double D[12][1][2] = {{{1, 0}}, {{1, 0}}, {{1, 0}}, {{1, 0}}, {{1, 0}}, {{1, 0}}, {{0, 1}}, {{0, 1}}, {{0, 1}}, {{0, 1}}, {{0, 1}}, {{0, 1}}};
     
     const double * const * x = c.coordinates;
     double result = 0.0;
@@ -10396,9 +11574,9 @@ void UFC_SolitaryWave2DLinearForm_finite
     vertex_values[2] = dof_values[1];
     vertex_values[4] = dof_values[2];
     // Evaluate at vertices and use affine mapping
-    vertex_values[1] = dof_values[3];
-    vertex_values[3] = dof_values[4];
-    vertex_values[5] = dof_values[5];
+    vertex_values[1] = dof_values[6];
+    vertex_values[3] = dof_values[7];
+    vertex_values[5] = dof_values[8];
 }
 
 /// Return the number of sub elements (for a mixed element)
@@ -10438,7 +11616,7 @@ UFC_SolitaryWave2DLinearForm_finite_elem
 /// Return a string identifying the finite element
 const char* UFC_SolitaryWave2DLinearForm_finite_element_1_0::signature() const
 {
-    return "FiniteElement('Lagrange', 'triangle', 1)";
+    return "FiniteElement('Lagrange', 'triangle', 2)";
 }
 
 /// Return the cell shape
@@ -10450,7 +11628,7 @@ ufc::shape UFC_SolitaryWave2DLinearForm_
 /// Return the dimension of the finite element function space
 unsigned int UFC_SolitaryWave2DLinearForm_finite_element_1_0::space_dimension() const
 {
-    return 3;
+    return 6;
 }
 
 /// Return the rank of the value space
@@ -10509,34 +11687,48 @@ void UFC_SolitaryWave2DLinearForm_finite
     // Generate scalings
     const double scalings_y_0 = 1;
     const double scalings_y_1 = scalings_y_0*(0.5 - 0.5*y);
-    
-    // Compute psitilde_a
-    const double psitilde_a_0 = 1;
-    const double psitilde_a_1 = x;
-    
-    // Compute psitilde_bs
-    const double psitilde_bs_0_0 = 1;
-    const double psitilde_bs_0_1 = 1.5*y + 0.5;
-    const double psitilde_bs_1_0 = 1;
-    
-    // Compute basisvalues
-    const double basisvalue0 = 0.707106781186548*psitilde_a_0*scalings_y_0*psitilde_bs_0_0;
-    const double basisvalue1 = 1.73205080756888*psitilde_a_1*scalings_y_1*psitilde_bs_1_0;
-    const double basisvalue2 = psitilde_a_0*scalings_y_0*psitilde_bs_0_1;
-    
-    // Table(s) of coefficients
-    const static double coefficients0[3][3] = \
-    {{0.471404520791032, -0.288675134594813, -0.166666666666667},
-    {0.471404520791032, 0.288675134594813, -0.166666666666667},
-    {0.471404520791032, 0, 0.333333333333333}};
+    const double scalings_y_2 = scalings_y_1*(0.5 - 0.5*y);
+    
+    // Compute psitilde_a
+    const double psitilde_a_0 = 1;
+    const double psitilde_a_1 = x;
+    const double psitilde_a_2 = 1.5*x*psitilde_a_1 - 0.5*psitilde_a_0;
+    
+    // Compute psitilde_bs
+    const double psitilde_bs_0_0 = 1;
+    const double psitilde_bs_0_1 = 1.5*y + 0.5;
+    const double psitilde_bs_0_2 = 0.111111111111111*psitilde_bs_0_1 + 1.66666666666667*y*psitilde_bs_0_1 - 0.555555555555556*psitilde_bs_0_0;
+    const double psitilde_bs_1_0 = 1;
+    const double psitilde_bs_1_1 = 2.5*y + 1.5;
+    const double psitilde_bs_2_0 = 1;
+    
+    // Compute basisvalues
+    const double basisvalue0 = 0.707106781186548*psitilde_a_0*scalings_y_0*psitilde_bs_0_0;
+    const double basisvalue1 = 1.73205080756888*psitilde_a_1*scalings_y_1*psitilde_bs_1_0;
+    const double basisvalue2 = psitilde_a_0*scalings_y_0*psitilde_bs_0_1;
+    const double basisvalue3 = 2.73861278752583*psitilde_a_2*scalings_y_2*psitilde_bs_2_0;
+    const double basisvalue4 = 2.12132034355964*psitilde_a_1*scalings_y_1*psitilde_bs_1_1;
+    const double basisvalue5 = 1.22474487139159*psitilde_a_0*scalings_y_0*psitilde_bs_0_2;
+    
+    // Table(s) of coefficients
+    const static double coefficients0[6][6] = \
+    {{0, -0.173205080756888, -0.1, 0.121716123890037, 0.0942809041582064, 0.0544331053951817},
+    {0, 0.173205080756888, -0.1, 0.121716123890037, -0.0942809041582063, 0.0544331053951818},
+    {0, 0, 0.2, 0, 0, 0.163299316185545},
+    {0.471404520791032, 0.23094010767585, 0.133333333333333, 0, 0.188561808316413, -0.163299316185545},
+    {0.471404520791032, -0.23094010767585, 0.133333333333333, 0, -0.188561808316413, -0.163299316185545},
+    {0.471404520791032, 0, -0.266666666666667, -0.243432247780074, 0, 0.0544331053951817}};
     
     // Extract relevant coefficients
     const double coeff0_0 = coefficients0[dof][0];
     const double coeff0_1 = coefficients0[dof][1];
     const double coeff0_2 = coefficients0[dof][2];
-    
-    // Compute value(s)
-    *values = coeff0_0*basisvalue0 + coeff0_1*basisvalue1 + coeff0_2*basisvalue2;
+    const double coeff0_3 = coefficients0[dof][3];
+    const double coeff0_4 = coefficients0[dof][4];
+    const double coeff0_5 = coefficients0[dof][5];
+    
+    // Compute value(s)
+    *values = coeff0_0*basisvalue0 + coeff0_1*basisvalue1 + coeff0_2*basisvalue2 + coeff0_3*basisvalue3 + coeff0_4*basisvalue4 + coeff0_5*basisvalue5;
 }
 
 /// Evaluate all basis functions at given point in cell
@@ -10652,38 +11844,55 @@ void UFC_SolitaryWave2DLinearForm_finite
     // Generate scalings
     const double scalings_y_0 = 1;
     const double scalings_y_1 = scalings_y_0*(0.5 - 0.5*y);
-    
-    // Compute psitilde_a
-    const double psitilde_a_0 = 1;
-    const double psitilde_a_1 = x;
-    
-    // Compute psitilde_bs
-    const double psitilde_bs_0_0 = 1;
-    const double psitilde_bs_0_1 = 1.5*y + 0.5;
-    const double psitilde_bs_1_0 = 1;
-    
-    // Compute basisvalues
-    const double basisvalue0 = 0.707106781186548*psitilde_a_0*scalings_y_0*psitilde_bs_0_0;
-    const double basisvalue1 = 1.73205080756888*psitilde_a_1*scalings_y_1*psitilde_bs_1_0;
-    const double basisvalue2 = psitilde_a_0*scalings_y_0*psitilde_bs_0_1;
-    
-    // Table(s) of coefficients
-    const static double coefficients0[3][3] = \
-    {{0.471404520791032, -0.288675134594813, -0.166666666666667},
-    {0.471404520791032, 0.288675134594813, -0.166666666666667},
-    {0.471404520791032, 0, 0.333333333333333}};
-    
-    // Interesting (new) part
-    // Tables of derivatives of the polynomial base (transpose)
-    const static double dmats0[3][3] = \
-    {{0, 0, 0},
-    {4.89897948556636, 0, 0},
-    {0, 0, 0}};
-    
-    const static double dmats1[3][3] = \
-    {{0, 0, 0},
-    {2.44948974278318, 0, 0},
-    {4.24264068711928, 0, 0}};
+    const double scalings_y_2 = scalings_y_1*(0.5 - 0.5*y);
+    
+    // Compute psitilde_a
+    const double psitilde_a_0 = 1;
+    const double psitilde_a_1 = x;
+    const double psitilde_a_2 = 1.5*x*psitilde_a_1 - 0.5*psitilde_a_0;
+    
+    // Compute psitilde_bs
+    const double psitilde_bs_0_0 = 1;
+    const double psitilde_bs_0_1 = 1.5*y + 0.5;
+    const double psitilde_bs_0_2 = 0.111111111111111*psitilde_bs_0_1 + 1.66666666666667*y*psitilde_bs_0_1 - 0.555555555555556*psitilde_bs_0_0;
+    const double psitilde_bs_1_0 = 1;
+    const double psitilde_bs_1_1 = 2.5*y + 1.5;
+    const double psitilde_bs_2_0 = 1;
+    
+    // Compute basisvalues
+    const double basisvalue0 = 0.707106781186548*psitilde_a_0*scalings_y_0*psitilde_bs_0_0;
+    const double basisvalue1 = 1.73205080756888*psitilde_a_1*scalings_y_1*psitilde_bs_1_0;
+    const double basisvalue2 = psitilde_a_0*scalings_y_0*psitilde_bs_0_1;
+    const double basisvalue3 = 2.73861278752583*psitilde_a_2*scalings_y_2*psitilde_bs_2_0;
+    const double basisvalue4 = 2.12132034355964*psitilde_a_1*scalings_y_1*psitilde_bs_1_1;
+    const double basisvalue5 = 1.22474487139159*psitilde_a_0*scalings_y_0*psitilde_bs_0_2;
+    
+    // Table(s) of coefficients
+    const static double coefficients0[6][6] = \
+    {{0, -0.173205080756888, -0.1, 0.121716123890037, 0.0942809041582064, 0.0544331053951817},
+    {0, 0.173205080756888, -0.1, 0.121716123890037, -0.0942809041582063, 0.0544331053951818},
+    {0, 0, 0.2, 0, 0, 0.163299316185545},
+    {0.471404520791032, 0.23094010767585, 0.133333333333333, 0, 0.188561808316413, -0.163299316185545},
+    {0.471404520791032, -0.23094010767585, 0.133333333333333, 0, -0.188561808316413, -0.163299316185545},
+    {0.471404520791032, 0, -0.266666666666667, -0.243432247780074, 0, 0.0544331053951817}};
+    
+    // Interesting (new) part
+    // Tables of derivatives of the polynomial base (transpose)
+    const static double dmats0[6][6] = \
+    {{0, 0, 0, 0, 0, 0},
+    {4.89897948556636, 0, 0, 0, 0, 0},
+    {0, 0, 0, 0, 0, 0},
+    {0, 9.48683298050514, 0, 0, 0, 0},
+    {4, 0, 7.07106781186548, 0, 0, 0},
+    {0, 0, 0, 0, 0, 0}};
+    
+    const static double dmats1[6][6] = \
+    {{0, 0, 0, 0, 0, 0},
+    {2.44948974278318, 0, 0, 0, 0, 0},
+    {4.24264068711928, 0, 0, 0, 0, 0},
+    {2.58198889747161, 4.74341649025257, -0.912870929175277, 0, 0, 0},
+    {2, 6.12372435695795, 3.53553390593274, 0, 0, 0},
+    {-2.3094010767585, 0, 8.16496580927726, 0, 0, 0}};
     
     // Compute reference derivatives
     // Declare pointer to array of derivatives on FIAT element
@@ -10693,11 +11902,17 @@ void UFC_SolitaryWave2DLinearForm_finite
     double coeff0_0 = 0;
     double coeff0_1 = 0;
     double coeff0_2 = 0;
+    double coeff0_3 = 0;
+    double coeff0_4 = 0;
+    double coeff0_5 = 0;
     
     // Declare new coefficients
     double new_coeff0_0 = 0;
     double new_coeff0_1 = 0;
     double new_coeff0_2 = 0;
+    double new_coeff0_3 = 0;
+    double new_coeff0_4 = 0;
+    double new_coeff0_5 = 0;
     
     // Loop possible derivatives
     for (unsigned int deriv_num = 0; deriv_num < num_derivatives; deriv_num++)
@@ -10706,6 +11921,9 @@ void UFC_SolitaryWave2DLinearForm_finite
       new_coeff0_0 = coefficients0[dof][0];
       new_coeff0_1 = coefficients0[dof][1];
       new_coeff0_2 = coefficients0[dof][2];
+      new_coeff0_3 = coefficients0[dof][3];
+      new_coeff0_4 = coefficients0[dof][4];
+      new_coeff0_5 = coefficients0[dof][5];
     
       // Loop derivative order
       for (unsigned int j = 0; j < n; j++)
@@ -10714,23 +11932,32 @@ void UFC_SolitaryWave2DLinearForm_finite
         coeff0_0 = new_coeff0_0;
         coeff0_1 = new_coeff0_1;
         coeff0_2 = new_coeff0_2;
-    
-        if(combinations[deriv_num][j] == 0)
-        {
-          new_coeff0_0 = coeff0_0*dmats0[0][0] + coeff0_1*dmats0[1][0] + coeff0_2*dmats0[2][0];
-          new_coeff0_1 = coeff0_0*dmats0[0][1] + coeff0_1*dmats0[1][1] + coeff0_2*dmats0[2][1];
-          new_coeff0_2 = coeff0_0*dmats0[0][2] + coeff0_1*dmats0[1][2] + coeff0_2*dmats0[2][2];
-        }
-        if(combinations[deriv_num][j] == 1)
-        {
-          new_coeff0_0 = coeff0_0*dmats1[0][0] + coeff0_1*dmats1[1][0] + coeff0_2*dmats1[2][0];
-          new_coeff0_1 = coeff0_0*dmats1[0][1] + coeff0_1*dmats1[1][1] + coeff0_2*dmats1[2][1];
-          new_coeff0_2 = coeff0_0*dmats1[0][2] + coeff0_1*dmats1[1][2] + coeff0_2*dmats1[2][2];
-        }
-    
-      }
-      // Compute derivatives on reference element as dot product of coefficients and basisvalues
-      derivatives[deriv_num] = new_coeff0_0*basisvalue0 + new_coeff0_1*basisvalue1 + new_coeff0_2*basisvalue2;
+        coeff0_3 = new_coeff0_3;
+        coeff0_4 = new_coeff0_4;
+        coeff0_5 = new_coeff0_5;
+    
+        if(combinations[deriv_num][j] == 0)
+        {
+          new_coeff0_0 = coeff0_0*dmats0[0][0] + coeff0_1*dmats0[1][0] + coeff0_2*dmats0[2][0] + coeff0_3*dmats0[3][0] + coeff0_4*dmats0[4][0] + coeff0_5*dmats0[5][0];
+          new_coeff0_1 = coeff0_0*dmats0[0][1] + coeff0_1*dmats0[1][1] + coeff0_2*dmats0[2][1] + coeff0_3*dmats0[3][1] + coeff0_4*dmats0[4][1] + coeff0_5*dmats0[5][1];
+          new_coeff0_2 = coeff0_0*dmats0[0][2] + coeff0_1*dmats0[1][2] + coeff0_2*dmats0[2][2] + coeff0_3*dmats0[3][2] + coeff0_4*dmats0[4][2] + coeff0_5*dmats0[5][2];
+          new_coeff0_3 = coeff0_0*dmats0[0][3] + coeff0_1*dmats0[1][3] + coeff0_2*dmats0[2][3] + coeff0_3*dmats0[3][3] + coeff0_4*dmats0[4][3] + coeff0_5*dmats0[5][3];
+          new_coeff0_4 = coeff0_0*dmats0[0][4] + coeff0_1*dmats0[1][4] + coeff0_2*dmats0[2][4] + coeff0_3*dmats0[3][4] + coeff0_4*dmats0[4][4] + coeff0_5*dmats0[5][4];
+          new_coeff0_5 = coeff0_0*dmats0[0][5] + coeff0_1*dmats0[1][5] + coeff0_2*dmats0[2][5] + coeff0_3*dmats0[3][5] + coeff0_4*dmats0[4][5] + coeff0_5*dmats0[5][5];
+        }
+        if(combinations[deriv_num][j] == 1)
+        {
+          new_coeff0_0 = coeff0_0*dmats1[0][0] + coeff0_1*dmats1[1][0] + coeff0_2*dmats1[2][0] + coeff0_3*dmats1[3][0] + coeff0_4*dmats1[4][0] + coeff0_5*dmats1[5][0];
+          new_coeff0_1 = coeff0_0*dmats1[0][1] + coeff0_1*dmats1[1][1] + coeff0_2*dmats1[2][1] + coeff0_3*dmats1[3][1] + coeff0_4*dmats1[4][1] + coeff0_5*dmats1[5][1];
+          new_coeff0_2 = coeff0_0*dmats1[0][2] + coeff0_1*dmats1[1][2] + coeff0_2*dmats1[2][2] + coeff0_3*dmats1[3][2] + coeff0_4*dmats1[4][2] + coeff0_5*dmats1[5][2];
+          new_coeff0_3 = coeff0_0*dmats1[0][3] + coeff0_1*dmats1[1][3] + coeff0_2*dmats1[2][3] + coeff0_3*dmats1[3][3] + coeff0_4*dmats1[4][3] + coeff0_5*dmats1[5][3];
+          new_coeff0_4 = coeff0_0*dmats1[0][4] + coeff0_1*dmats1[1][4] + coeff0_2*dmats1[2][4] + coeff0_3*dmats1[3][4] + coeff0_4*dmats1[4][4] + coeff0_5*dmats1[5][4];
+          new_coeff0_5 = coeff0_0*dmats1[0][5] + coeff0_1*dmats1[1][5] + coeff0_2*dmats1[2][5] + coeff0_3*dmats1[3][5] + coeff0_4*dmats1[4][5] + coeff0_5*dmats1[5][5];
+        }
+    
+      }
+      // Compute derivatives on reference element as dot product of coefficients and basisvalues
+      derivatives[deriv_num] = new_coeff0_0*basisvalue0 + new_coeff0_1*basisvalue1 + new_coeff0_2*basisvalue2 + new_coeff0_3*basisvalue3 + new_coeff0_4*basisvalue4 + new_coeff0_5*basisvalue5;
     }
     
     // Transform derivatives back to physical element
@@ -10770,9 +11997,9 @@ double UFC_SolitaryWave2DLinearForm_fini
                                    const ufc::cell& c) const
 {
     // The reference points, direction and weights:
-    const static double X[3][1][2] = {{{0, 0}}, {{1, 0}}, {{0, 1}}};
-    const static double W[3][1] = {{1}, {1}, {1}};
-    const static double D[3][1][1] = {{{1}}, {{1}}, {{1}}};
+    const static double X[6][1][2] = {{{0, 0}}, {{1, 0}}, {{0, 1}}, {{0.5, 0.5}}, {{0, 0.5}}, {{0.5, 0}}};
+    const static double W[6][1] = {{1}, {1}, {1}, {1}, {1}, {1}};
+    const static double D[6][1][1] = {{{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}};
     
     const double * const * x = c.coordinates;
     double result = 0.0;
@@ -10852,7 +12079,7 @@ UFC_SolitaryWave2DLinearForm_finite_elem
 /// Return a string identifying the finite element
 const char* UFC_SolitaryWave2DLinearForm_finite_element_1_1::signature() const
 {
-    return "FiniteElement('Lagrange', 'triangle', 1)";
+    return "FiniteElement('Lagrange', 'triangle', 2)";
 }
 
 /// Return the cell shape
@@ -10864,7 +12091,7 @@ ufc::shape UFC_SolitaryWave2DLinearForm_
 /// Return the dimension of the finite element function space
 unsigned int UFC_SolitaryWave2DLinearForm_finite_element_1_1::space_dimension() const
 {
-    return 3;
+    return 6;
 }
 
 /// Return the rank of the value space
@@ -10923,34 +12150,48 @@ void UFC_SolitaryWave2DLinearForm_finite
     // Generate scalings
     const double scalings_y_0 = 1;
     const double scalings_y_1 = scalings_y_0*(0.5 - 0.5*y);
-    
-    // Compute psitilde_a
-    const double psitilde_a_0 = 1;
-    const double psitilde_a_1 = x;
-    
-    // Compute psitilde_bs
-    const double psitilde_bs_0_0 = 1;
-    const double psitilde_bs_0_1 = 1.5*y + 0.5;
-    const double psitilde_bs_1_0 = 1;
-    
-    // Compute basisvalues
-    const double basisvalue0 = 0.707106781186548*psitilde_a_0*scalings_y_0*psitilde_bs_0_0;
-    const double basisvalue1 = 1.73205080756888*psitilde_a_1*scalings_y_1*psitilde_bs_1_0;
-    const double basisvalue2 = psitilde_a_0*scalings_y_0*psitilde_bs_0_1;
-    
-    // Table(s) of coefficients
-    const static double coefficients0[3][3] = \
-    {{0.471404520791032, -0.288675134594813, -0.166666666666667},
-    {0.471404520791032, 0.288675134594813, -0.166666666666667},
-    {0.471404520791032, 0, 0.333333333333333}};
+    const double scalings_y_2 = scalings_y_1*(0.5 - 0.5*y);
+    
+    // Compute psitilde_a
+    const double psitilde_a_0 = 1;
+    const double psitilde_a_1 = x;
+    const double psitilde_a_2 = 1.5*x*psitilde_a_1 - 0.5*psitilde_a_0;
+    
+    // Compute psitilde_bs
+    const double psitilde_bs_0_0 = 1;
+    const double psitilde_bs_0_1 = 1.5*y + 0.5;
+    const double psitilde_bs_0_2 = 0.111111111111111*psitilde_bs_0_1 + 1.66666666666667*y*psitilde_bs_0_1 - 0.555555555555556*psitilde_bs_0_0;
+    const double psitilde_bs_1_0 = 1;
+    const double psitilde_bs_1_1 = 2.5*y + 1.5;
+    const double psitilde_bs_2_0 = 1;
+    
+    // Compute basisvalues
+    const double basisvalue0 = 0.707106781186548*psitilde_a_0*scalings_y_0*psitilde_bs_0_0;
+    const double basisvalue1 = 1.73205080756888*psitilde_a_1*scalings_y_1*psitilde_bs_1_0;
+    const double basisvalue2 = psitilde_a_0*scalings_y_0*psitilde_bs_0_1;
+    const double basisvalue3 = 2.73861278752583*psitilde_a_2*scalings_y_2*psitilde_bs_2_0;
+    const double basisvalue4 = 2.12132034355964*psitilde_a_1*scalings_y_1*psitilde_bs_1_1;
+    const double basisvalue5 = 1.22474487139159*psitilde_a_0*scalings_y_0*psitilde_bs_0_2;
+    
+    // Table(s) of coefficients
+    const static double coefficients0[6][6] = \
+    {{0, -0.173205080756888, -0.1, 0.121716123890037, 0.0942809041582064, 0.0544331053951817},
+    {0, 0.173205080756888, -0.1, 0.121716123890037, -0.0942809041582063, 0.0544331053951818},
+    {0, 0, 0.2, 0, 0, 0.163299316185545},
+    {0.471404520791032, 0.23094010767585, 0.133333333333333, 0, 0.188561808316413, -0.163299316185545},
+    {0.471404520791032, -0.23094010767585, 0.133333333333333, 0, -0.188561808316413, -0.163299316185545},
+    {0.471404520791032, 0, -0.266666666666667, -0.243432247780074, 0, 0.0544331053951817}};
     
     // Extract relevant coefficients
     const double coeff0_0 = coefficients0[dof][0];
     const double coeff0_1 = coefficients0[dof][1];
     const double coeff0_2 = coefficients0[dof][2];
-    
-    // Compute value(s)
-    *values = coeff0_0*basisvalue0 + coeff0_1*basisvalue1 + coeff0_2*basisvalue2;
+    const double coeff0_3 = coefficients0[dof][3];
+    const double coeff0_4 = coefficients0[dof][4];
+    const double coeff0_5 = coefficients0[dof][5];
+    
+    // Compute value(s)
+    *values = coeff0_0*basisvalue0 + coeff0_1*basisvalue1 + coeff0_2*basisvalue2 + coeff0_3*basisvalue3 + coeff0_4*basisvalue4 + coeff0_5*basisvalue5;
 }
 
 /// Evaluate all basis functions at given point in cell
@@ -11066,38 +12307,55 @@ void UFC_SolitaryWave2DLinearForm_finite
     // Generate scalings
     const double scalings_y_0 = 1;
     const double scalings_y_1 = scalings_y_0*(0.5 - 0.5*y);
-    
-    // Compute psitilde_a
-    const double psitilde_a_0 = 1;
-    const double psitilde_a_1 = x;
-    
-    // Compute psitilde_bs
-    const double psitilde_bs_0_0 = 1;
-    const double psitilde_bs_0_1 = 1.5*y + 0.5;
-    const double psitilde_bs_1_0 = 1;
-    
-    // Compute basisvalues
-    const double basisvalue0 = 0.707106781186548*psitilde_a_0*scalings_y_0*psitilde_bs_0_0;
-    const double basisvalue1 = 1.73205080756888*psitilde_a_1*scalings_y_1*psitilde_bs_1_0;
-    const double basisvalue2 = psitilde_a_0*scalings_y_0*psitilde_bs_0_1;
-    
-    // Table(s) of coefficients
-    const static double coefficients0[3][3] = \
-    {{0.471404520791032, -0.288675134594813, -0.166666666666667},
-    {0.471404520791032, 0.288675134594813, -0.166666666666667},
-    {0.471404520791032, 0, 0.333333333333333}};
-    
-    // Interesting (new) part
-    // Tables of derivatives of the polynomial base (transpose)
-    const static double dmats0[3][3] = \
-    {{0, 0, 0},
-    {4.89897948556636, 0, 0},
-    {0, 0, 0}};
-    
-    const static double dmats1[3][3] = \
-    {{0, 0, 0},
-    {2.44948974278318, 0, 0},
-    {4.24264068711928, 0, 0}};
+    const double scalings_y_2 = scalings_y_1*(0.5 - 0.5*y);
+    
+    // Compute psitilde_a
+    const double psitilde_a_0 = 1;
+    const double psitilde_a_1 = x;
+    const double psitilde_a_2 = 1.5*x*psitilde_a_1 - 0.5*psitilde_a_0;
+    
+    // Compute psitilde_bs
+    const double psitilde_bs_0_0 = 1;
+    const double psitilde_bs_0_1 = 1.5*y + 0.5;
+    const double psitilde_bs_0_2 = 0.111111111111111*psitilde_bs_0_1 + 1.66666666666667*y*psitilde_bs_0_1 - 0.555555555555556*psitilde_bs_0_0;
+    const double psitilde_bs_1_0 = 1;
+    const double psitilde_bs_1_1 = 2.5*y + 1.5;
+    const double psitilde_bs_2_0 = 1;
+    
+    // Compute basisvalues
+    const double basisvalue0 = 0.707106781186548*psitilde_a_0*scalings_y_0*psitilde_bs_0_0;
+    const double basisvalue1 = 1.73205080756888*psitilde_a_1*scalings_y_1*psitilde_bs_1_0;
+    const double basisvalue2 = psitilde_a_0*scalings_y_0*psitilde_bs_0_1;
+    const double basisvalue3 = 2.73861278752583*psitilde_a_2*scalings_y_2*psitilde_bs_2_0;
+    const double basisvalue4 = 2.12132034355964*psitilde_a_1*scalings_y_1*psitilde_bs_1_1;
+    const double basisvalue5 = 1.22474487139159*psitilde_a_0*scalings_y_0*psitilde_bs_0_2;
+    
+    // Table(s) of coefficients
+    const static double coefficients0[6][6] = \
+    {{0, -0.173205080756888, -0.1, 0.121716123890037, 0.0942809041582064, 0.0544331053951817},
+    {0, 0.173205080756888, -0.1, 0.121716123890037, -0.0942809041582063, 0.0544331053951818},
+    {0, 0, 0.2, 0, 0, 0.163299316185545},
+    {0.471404520791032, 0.23094010767585, 0.133333333333333, 0, 0.188561808316413, -0.163299316185545},
+    {0.471404520791032, -0.23094010767585, 0.133333333333333, 0, -0.188561808316413, -0.163299316185545},
+    {0.471404520791032, 0, -0.266666666666667, -0.243432247780074, 0, 0.0544331053951817}};
+    
+    // Interesting (new) part
+    // Tables of derivatives of the polynomial base (transpose)
+    const static double dmats0[6][6] = \
+    {{0, 0, 0, 0, 0, 0},
+    {4.89897948556636, 0, 0, 0, 0, 0},
+    {0, 0, 0, 0, 0, 0},
+    {0, 9.48683298050514, 0, 0, 0, 0},
+    {4, 0, 7.07106781186548, 0, 0, 0},
+    {0, 0, 0, 0, 0, 0}};
+    
+    const static double dmats1[6][6] = \
+    {{0, 0, 0, 0, 0, 0},
+    {2.44948974278318, 0, 0, 0, 0, 0},
+    {4.24264068711928, 0, 0, 0, 0, 0},
+    {2.58198889747161, 4.74341649025257, -0.912870929175277, 0, 0, 0},
+    {2, 6.12372435695795, 3.53553390593274, 0, 0, 0},
+    {-2.3094010767585, 0, 8.16496580927726, 0, 0, 0}};
     
     // Compute reference derivatives
     // Declare pointer to array of derivatives on FIAT element
@@ -11107,11 +12365,17 @@ void UFC_SolitaryWave2DLinearForm_finite
     double coeff0_0 = 0;
     double coeff0_1 = 0;
     double coeff0_2 = 0;
+    double coeff0_3 = 0;
+    double coeff0_4 = 0;
+    double coeff0_5 = 0;
     
     // Declare new coefficients
     double new_coeff0_0 = 0;
     double new_coeff0_1 = 0;
     double new_coeff0_2 = 0;
+    double new_coeff0_3 = 0;
+    double new_coeff0_4 = 0;
+    double new_coeff0_5 = 0;
     
     // Loop possible derivatives
     for (unsigned int deriv_num = 0; deriv_num < num_derivatives; deriv_num++)
@@ -11120,6 +12384,9 @@ void UFC_SolitaryWave2DLinearForm_finite
       new_coeff0_0 = coefficients0[dof][0];
       new_coeff0_1 = coefficients0[dof][1];
       new_coeff0_2 = coefficients0[dof][2];
+      new_coeff0_3 = coefficients0[dof][3];
+      new_coeff0_4 = coefficients0[dof][4];
+      new_coeff0_5 = coefficients0[dof][5];
     
       // Loop derivative order
       for (unsigned int j = 0; j < n; j++)
@@ -11128,23 +12395,32 @@ void UFC_SolitaryWave2DLinearForm_finite
         coeff0_0 = new_coeff0_0;
         coeff0_1 = new_coeff0_1;
         coeff0_2 = new_coeff0_2;
-    
-        if(combinations[deriv_num][j] == 0)
-        {
-          new_coeff0_0 = coeff0_0*dmats0[0][0] + coeff0_1*dmats0[1][0] + coeff0_2*dmats0[2][0];
-          new_coeff0_1 = coeff0_0*dmats0[0][1] + coeff0_1*dmats0[1][1] + coeff0_2*dmats0[2][1];
-          new_coeff0_2 = coeff0_0*dmats0[0][2] + coeff0_1*dmats0[1][2] + coeff0_2*dmats0[2][2];
-        }
-        if(combinations[deriv_num][j] == 1)
-        {
-          new_coeff0_0 = coeff0_0*dmats1[0][0] + coeff0_1*dmats1[1][0] + coeff0_2*dmats1[2][0];
-          new_coeff0_1 = coeff0_0*dmats1[0][1] + coeff0_1*dmats1[1][1] + coeff0_2*dmats1[2][1];
-          new_coeff0_2 = coeff0_0*dmats1[0][2] + coeff0_1*dmats1[1][2] + coeff0_2*dmats1[2][2];
-        }
-    
-      }
-      // Compute derivatives on reference element as dot product of coefficients and basisvalues
-      derivatives[deriv_num] = new_coeff0_0*basisvalue0 + new_coeff0_1*basisvalue1 + new_coeff0_2*basisvalue2;
+        coeff0_3 = new_coeff0_3;
+        coeff0_4 = new_coeff0_4;
+        coeff0_5 = new_coeff0_5;
+    
+        if(combinations[deriv_num][j] == 0)
+        {
+          new_coeff0_0 = coeff0_0*dmats0[0][0] + coeff0_1*dmats0[1][0] + coeff0_2*dmats0[2][0] + coeff0_3*dmats0[3][0] + coeff0_4*dmats0[4][0] + coeff0_5*dmats0[5][0];
+          new_coeff0_1 = coeff0_0*dmats0[0][1] + coeff0_1*dmats0[1][1] + coeff0_2*dmats0[2][1] + coeff0_3*dmats0[3][1] + coeff0_4*dmats0[4][1] + coeff0_5*dmats0[5][1];
+          new_coeff0_2 = coeff0_0*dmats0[0][2] + coeff0_1*dmats0[1][2] + coeff0_2*dmats0[2][2] + coeff0_3*dmats0[3][2] + coeff0_4*dmats0[4][2] + coeff0_5*dmats0[5][2];
+          new_coeff0_3 = coeff0_0*dmats0[0][3] + coeff0_1*dmats0[1][3] + coeff0_2*dmats0[2][3] + coeff0_3*dmats0[3][3] + coeff0_4*dmats0[4][3] + coeff0_5*dmats0[5][3];
+          new_coeff0_4 = coeff0_0*dmats0[0][4] + coeff0_1*dmats0[1][4] + coeff0_2*dmats0[2][4] + coeff0_3*dmats0[3][4] + coeff0_4*dmats0[4][4] + coeff0_5*dmats0[5][4];
+          new_coeff0_5 = coeff0_0*dmats0[0][5] + coeff0_1*dmats0[1][5] + coeff0_2*dmats0[2][5] + coeff0_3*dmats0[3][5] + coeff0_4*dmats0[4][5] + coeff0_5*dmats0[5][5];
+        }
+        if(combinations[deriv_num][j] == 1)
+        {
+          new_coeff0_0 = coeff0_0*dmats1[0][0] + coeff0_1*dmats1[1][0] + coeff0_2*dmats1[2][0] + coeff0_3*dmats1[3][0] + coeff0_4*dmats1[4][0] + coeff0_5*dmats1[5][0];
+          new_coeff0_1 = coeff0_0*dmats1[0][1] + coeff0_1*dmats1[1][1] + coeff0_2*dmats1[2][1] + coeff0_3*dmats1[3][1] + coeff0_4*dmats1[4][1] + coeff0_5*dmats1[5][1];
+          new_coeff0_2 = coeff0_0*dmats1[0][2] + coeff0_1*dmats1[1][2] + coeff0_2*dmats1[2][2] + coeff0_3*dmats1[3][2] + coeff0_4*dmats1[4][2] + coeff0_5*dmats1[5][2];
+          new_coeff0_3 = coeff0_0*dmats1[0][3] + coeff0_1*dmats1[1][3] + coeff0_2*dmats1[2][3] + coeff0_3*dmats1[3][3] + coeff0_4*dmats1[4][3] + coeff0_5*dmats1[5][3];
+          new_coeff0_4 = coeff0_0*dmats1[0][4] + coeff0_1*dmats1[1][4] + coeff0_2*dmats1[2][4] + coeff0_3*dmats1[3][4] + coeff0_4*dmats1[4][4] + coeff0_5*dmats1[5][4];
+          new_coeff0_5 = coeff0_0*dmats1[0][5] + coeff0_1*dmats1[1][5] + coeff0_2*dmats1[2][5] + coeff0_3*dmats1[3][5] + coeff0_4*dmats1[4][5] + coeff0_5*dmats1[5][5];
+        }
+    
+      }
+      // Compute derivatives on reference element as dot product of coefficients and basisvalues
+      derivatives[deriv_num] = new_coeff0_0*basisvalue0 + new_coeff0_1*basisvalue1 + new_coeff0_2*basisvalue2 + new_coeff0_3*basisvalue3 + new_coeff0_4*basisvalue4 + new_coeff0_5*basisvalue5;
     }
     
     // Transform derivatives back to physical element
@@ -11184,9 +12460,9 @@ double UFC_SolitaryWave2DLinearForm_fini
                                    const ufc::cell& c) const
 {
     // The reference points, direction and weights:
-    const static double X[3][1][2] = {{{0, 0}}, {{1, 0}}, {{0, 1}}};
-    const static double W[3][1] = {{1}, {1}, {1}};
-    const static double D[3][1][1] = {{{1}}, {{1}}, {{1}}};
+    const static double X[6][1][2] = {{{0, 0}}, {{1, 0}}, {{0, 1}}, {{0.5, 0.5}}, {{0, 0.5}}, {{0.5, 0}}};
+    const static double W[6][1] = {{1}, {1}, {1}, {1}, {1}, {1}};
+    const static double D[6][1][1] = {{{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}};
     
     const double * const * x = c.coordinates;
     double result = 0.0;
@@ -11266,7 +12542,7 @@ UFC_SolitaryWave2DLinearForm_finite_elem
 /// Return a string identifying the finite element
 const char* UFC_SolitaryWave2DLinearForm_finite_element_1::signature() const
 {
-    return "MixedElement([FiniteElement('Lagrange', 'triangle', 1), FiniteElement('Lagrange', 'triangle', 1)])";
+    return "MixedElement([FiniteElement('Lagrange', 'triangle', 2), FiniteElement('Lagrange', 'triangle', 2)])";
 }
 
 /// Return the cell shape
@@ -11278,7 +12554,7 @@ ufc::shape UFC_SolitaryWave2DLinearForm_
 /// Return the dimension of the finite element function space
 unsigned int UFC_SolitaryWave2DLinearForm_finite_element_1::space_dimension() const
 {
-    return 6;
+    return 12;
 }
 
 /// Return the rank of the value space
@@ -11332,7 +12608,7 @@ void UFC_SolitaryWave2DLinearForm_finite
     values[0] = 0;
     values[1] = 0;
     
-    if (0 <= i && i <= 2)
+    if (0 <= i && i <= 5)
     {
       // Map degree of freedom to element degree of freedom
       const unsigned int dof = i;
@@ -11340,72 +12616,100 @@ void UFC_SolitaryWave2DLinearForm_finite
       // Generate scalings
       const double scalings_y_0 = 1;
       const double scalings_y_1 = scalings_y_0*(0.5 - 0.5*y);
-    
-      // Compute psitilde_a
-      const double psitilde_a_0 = 1;
-      const double psitilde_a_1 = x;
-    
-      // Compute psitilde_bs
-      const double psitilde_bs_0_0 = 1;
-      const double psitilde_bs_0_1 = 1.5*y + 0.5;
-      const double psitilde_bs_1_0 = 1;
-    
-      // Compute basisvalues
-      const double basisvalue0 = 0.707106781186548*psitilde_a_0*scalings_y_0*psitilde_bs_0_0;
-      const double basisvalue1 = 1.73205080756888*psitilde_a_1*scalings_y_1*psitilde_bs_1_0;
-      const double basisvalue2 = psitilde_a_0*scalings_y_0*psitilde_bs_0_1;
-    
-      // Table(s) of coefficients
-      const static double coefficients0[3][3] =   \
-      {{0.471404520791032, -0.288675134594813, -0.166666666666667},
-      {0.471404520791032, 0.288675134594813, -0.166666666666667},
-      {0.471404520791032, 0, 0.333333333333333}};
+      const double scalings_y_2 = scalings_y_1*(0.5 - 0.5*y);
+    
+      // Compute psitilde_a
+      const double psitilde_a_0 = 1;
+      const double psitilde_a_1 = x;
+      const double psitilde_a_2 = 1.5*x*psitilde_a_1 - 0.5*psitilde_a_0;
+    
+      // Compute psitilde_bs
+      const double psitilde_bs_0_0 = 1;
+      const double psitilde_bs_0_1 = 1.5*y + 0.5;
+      const double psitilde_bs_0_2 = 0.111111111111111*psitilde_bs_0_1 + 1.66666666666667*y*psitilde_bs_0_1 - 0.555555555555556*psitilde_bs_0_0;
+      const double psitilde_bs_1_0 = 1;
+      const double psitilde_bs_1_1 = 2.5*y + 1.5;
+      const double psitilde_bs_2_0 = 1;
+    
+      // Compute basisvalues
+      const double basisvalue0 = 0.707106781186548*psitilde_a_0*scalings_y_0*psitilde_bs_0_0;
+      const double basisvalue1 = 1.73205080756888*psitilde_a_1*scalings_y_1*psitilde_bs_1_0;
+      const double basisvalue2 = psitilde_a_0*scalings_y_0*psitilde_bs_0_1;
+      const double basisvalue3 = 2.73861278752583*psitilde_a_2*scalings_y_2*psitilde_bs_2_0;
+      const double basisvalue4 = 2.12132034355964*psitilde_a_1*scalings_y_1*psitilde_bs_1_1;
+      const double basisvalue5 = 1.22474487139159*psitilde_a_0*scalings_y_0*psitilde_bs_0_2;
+    
+      // Table(s) of coefficients
+      const static double coefficients0[6][6] =   \
+      {{0, -0.173205080756888, -0.1, 0.121716123890037, 0.0942809041582064, 0.0544331053951817},
+      {0, 0.173205080756888, -0.1, 0.121716123890037, -0.0942809041582063, 0.0544331053951818},
+      {0, 0, 0.2, 0, 0, 0.163299316185545},
+      {0.471404520791032, 0.23094010767585, 0.133333333333333, 0, 0.188561808316413, -0.163299316185545},
+      {0.471404520791032, -0.23094010767585, 0.133333333333333, 0, -0.188561808316413, -0.163299316185545},
+      {0.471404520791032, 0, -0.266666666666667, -0.243432247780074, 0, 0.0544331053951817}};
     
       // Extract relevant coefficients
       const double coeff0_0 =   coefficients0[dof][0];
       const double coeff0_1 =   coefficients0[dof][1];
       const double coeff0_2 =   coefficients0[dof][2];
+      const double coeff0_3 =   coefficients0[dof][3];
+      const double coeff0_4 =   coefficients0[dof][4];
+      const double coeff0_5 =   coefficients0[dof][5];
     
       // Compute value(s)
-      values[0] = coeff0_0*basisvalue0 + coeff0_1*basisvalue1 + coeff0_2*basisvalue2;
-    }
-    
-    if (3 <= i && i <= 5)
-    {
-      // Map degree of freedom to element degree of freedom
-      const unsigned int dof = i - 3;
-    
-      // Generate scalings
-      const double scalings_y_0 = 1;
-      const double scalings_y_1 = scalings_y_0*(0.5 - 0.5*y);
-    
-      // Compute psitilde_a
-      const double psitilde_a_0 = 1;
-      const double psitilde_a_1 = x;
-    
-      // Compute psitilde_bs
-      const double psitilde_bs_0_0 = 1;
-      const double psitilde_bs_0_1 = 1.5*y + 0.5;
-      const double psitilde_bs_1_0 = 1;
-    
-      // Compute basisvalues
-      const double basisvalue0 = 0.707106781186548*psitilde_a_0*scalings_y_0*psitilde_bs_0_0;
-      const double basisvalue1 = 1.73205080756888*psitilde_a_1*scalings_y_1*psitilde_bs_1_0;
-      const double basisvalue2 = psitilde_a_0*scalings_y_0*psitilde_bs_0_1;
-    
-      // Table(s) of coefficients
-      const static double coefficients0[3][3] =   \
-      {{0.471404520791032, -0.288675134594813, -0.166666666666667},
-      {0.471404520791032, 0.288675134594813, -0.166666666666667},
-      {0.471404520791032, 0, 0.333333333333333}};
+      values[0] = coeff0_0*basisvalue0 + coeff0_1*basisvalue1 + coeff0_2*basisvalue2 + coeff0_3*basisvalue3 + coeff0_4*basisvalue4 + coeff0_5*basisvalue5;
+    }
+    
+    if (6 <= i && i <= 11)
+    {
+      // Map degree of freedom to element degree of freedom
+      const unsigned int dof = i - 6;
+    
+      // Generate scalings
+      const double scalings_y_0 = 1;
+      const double scalings_y_1 = scalings_y_0*(0.5 - 0.5*y);
+      const double scalings_y_2 = scalings_y_1*(0.5 - 0.5*y);
+    
+      // Compute psitilde_a
+      const double psitilde_a_0 = 1;
+      const double psitilde_a_1 = x;
+      const double psitilde_a_2 = 1.5*x*psitilde_a_1 - 0.5*psitilde_a_0;
+    
+      // Compute psitilde_bs
+      const double psitilde_bs_0_0 = 1;
+      const double psitilde_bs_0_1 = 1.5*y + 0.5;
+      const double psitilde_bs_0_2 = 0.111111111111111*psitilde_bs_0_1 + 1.66666666666667*y*psitilde_bs_0_1 - 0.555555555555556*psitilde_bs_0_0;
+      const double psitilde_bs_1_0 = 1;
+      const double psitilde_bs_1_1 = 2.5*y + 1.5;
+      const double psitilde_bs_2_0 = 1;
+    
+      // Compute basisvalues
+      const double basisvalue0 = 0.707106781186548*psitilde_a_0*scalings_y_0*psitilde_bs_0_0;
+      const double basisvalue1 = 1.73205080756888*psitilde_a_1*scalings_y_1*psitilde_bs_1_0;
+      const double basisvalue2 = psitilde_a_0*scalings_y_0*psitilde_bs_0_1;
+      const double basisvalue3 = 2.73861278752583*psitilde_a_2*scalings_y_2*psitilde_bs_2_0;
+      const double basisvalue4 = 2.12132034355964*psitilde_a_1*scalings_y_1*psitilde_bs_1_1;
+      const double basisvalue5 = 1.22474487139159*psitilde_a_0*scalings_y_0*psitilde_bs_0_2;
+    
+      // Table(s) of coefficients
+      const static double coefficients0[6][6] =   \
+      {{0, -0.173205080756888, -0.1, 0.121716123890037, 0.0942809041582064, 0.0544331053951817},
+      {0, 0.173205080756888, -0.1, 0.121716123890037, -0.0942809041582063, 0.0544331053951818},
+      {0, 0, 0.2, 0, 0, 0.163299316185545},
+      {0.471404520791032, 0.23094010767585, 0.133333333333333, 0, 0.188561808316413, -0.163299316185545},
+      {0.471404520791032, -0.23094010767585, 0.133333333333333, 0, -0.188561808316413, -0.163299316185545},
+      {0.471404520791032, 0, -0.266666666666667, -0.243432247780074, 0, 0.0544331053951817}};
     
       // Extract relevant coefficients
       const double coeff0_0 =   coefficients0[dof][0];
       const double coeff0_1 =   coefficients0[dof][1];
       const double coeff0_2 =   coefficients0[dof][2];
+      const double coeff0_3 =   coefficients0[dof][3];
+      const double coeff0_4 =   coefficients0[dof][4];
+      const double coeff0_5 =   coefficients0[dof][5];
     
       // Compute value(s)
-      values[1] = coeff0_0*basisvalue0 + coeff0_1*basisvalue1 + coeff0_2*basisvalue2;
+      values[1] = coeff0_0*basisvalue0 + coeff0_1*basisvalue1 + coeff0_2*basisvalue2 + coeff0_3*basisvalue3 + coeff0_4*basisvalue4 + coeff0_5*basisvalue5;
     }
     
 }
@@ -11517,7 +12821,7 @@ void UFC_SolitaryWave2DLinearForm_finite
     for (unsigned int j = 0; j < 2*num_derivatives; j++)
       values[j] = 0;
     
-    if (0 <= i && i <= 2)
+    if (0 <= i && i <= 5)
     {
       // Map degree of freedom to element degree of freedom
       const unsigned int dof = i;
@@ -11525,38 +12829,55 @@ void UFC_SolitaryWave2DLinearForm_finite
       // Generate scalings
       const double scalings_y_0 = 1;
       const double scalings_y_1 = scalings_y_0*(0.5 - 0.5*y);
-    
-      // Compute psitilde_a
-      const double psitilde_a_0 = 1;
-      const double psitilde_a_1 = x;
-    
-      // Compute psitilde_bs
-      const double psitilde_bs_0_0 = 1;
-      const double psitilde_bs_0_1 = 1.5*y + 0.5;
-      const double psitilde_bs_1_0 = 1;
-    
-      // Compute basisvalues
-      const double basisvalue0 = 0.707106781186548*psitilde_a_0*scalings_y_0*psitilde_bs_0_0;
-      const double basisvalue1 = 1.73205080756888*psitilde_a_1*scalings_y_1*psitilde_bs_1_0;
-      const double basisvalue2 = psitilde_a_0*scalings_y_0*psitilde_bs_0_1;
-    
-      // Table(s) of coefficients
-      const static double coefficients0[3][3] =   \
-      {{0.471404520791032, -0.288675134594813, -0.166666666666667},
-      {0.471404520791032, 0.288675134594813, -0.166666666666667},
-      {0.471404520791032, 0, 0.333333333333333}};
+      const double scalings_y_2 = scalings_y_1*(0.5 - 0.5*y);
+    
+      // Compute psitilde_a
+      const double psitilde_a_0 = 1;
+      const double psitilde_a_1 = x;
+      const double psitilde_a_2 = 1.5*x*psitilde_a_1 - 0.5*psitilde_a_0;
+    
+      // Compute psitilde_bs
+      const double psitilde_bs_0_0 = 1;
+      const double psitilde_bs_0_1 = 1.5*y + 0.5;
+      const double psitilde_bs_0_2 = 0.111111111111111*psitilde_bs_0_1 + 1.66666666666667*y*psitilde_bs_0_1 - 0.555555555555556*psitilde_bs_0_0;
+      const double psitilde_bs_1_0 = 1;
+      const double psitilde_bs_1_1 = 2.5*y + 1.5;
+      const double psitilde_bs_2_0 = 1;
+    
+      // Compute basisvalues
+      const double basisvalue0 = 0.707106781186548*psitilde_a_0*scalings_y_0*psitilde_bs_0_0;
+      const double basisvalue1 = 1.73205080756888*psitilde_a_1*scalings_y_1*psitilde_bs_1_0;
+      const double basisvalue2 = psitilde_a_0*scalings_y_0*psitilde_bs_0_1;
+      const double basisvalue3 = 2.73861278752583*psitilde_a_2*scalings_y_2*psitilde_bs_2_0;
+      const double basisvalue4 = 2.12132034355964*psitilde_a_1*scalings_y_1*psitilde_bs_1_1;
+      const double basisvalue5 = 1.22474487139159*psitilde_a_0*scalings_y_0*psitilde_bs_0_2;
+    
+      // Table(s) of coefficients
+      const static double coefficients0[6][6] =   \
+      {{0, -0.173205080756888, -0.1, 0.121716123890037, 0.0942809041582064, 0.0544331053951817},
+      {0, 0.173205080756888, -0.1, 0.121716123890037, -0.0942809041582063, 0.0544331053951818},
+      {0, 0, 0.2, 0, 0, 0.163299316185545},
+      {0.471404520791032, 0.23094010767585, 0.133333333333333, 0, 0.188561808316413, -0.163299316185545},
+      {0.471404520791032, -0.23094010767585, 0.133333333333333, 0, -0.188561808316413, -0.163299316185545},
+      {0.471404520791032, 0, -0.266666666666667, -0.243432247780074, 0, 0.0544331053951817}};
     
       // Interesting (new) part
       // Tables of derivatives of the polynomial base (transpose)
-      const static double dmats0[3][3] =   \
-      {{0, 0, 0},
-      {4.89897948556636, 0, 0},
-      {0, 0, 0}};
-    
-      const static double dmats1[3][3] =   \
-      {{0, 0, 0},
-      {2.44948974278318, 0, 0},
-      {4.24264068711928, 0, 0}};
+      const static double dmats0[6][6] =   \
+      {{0, 0, 0, 0, 0, 0},
+      {4.89897948556636, 0, 0, 0, 0, 0},
+      {0, 0, 0, 0, 0, 0},
+      {0, 9.48683298050514, 0, 0, 0, 0},
+      {4, 0, 7.07106781186548, 0, 0, 0},
+      {0, 0, 0, 0, 0, 0}};
+    
+      const static double dmats1[6][6] =   \
+      {{0, 0, 0, 0, 0, 0},
+      {2.44948974278318, 0, 0, 0, 0, 0},
+      {4.24264068711928, 0, 0, 0, 0, 0},
+      {2.58198889747161, 4.74341649025257, -0.912870929175277, 0, 0, 0},
+      {2, 6.12372435695795, 3.53553390593274, 0, 0, 0},
+      {-2.3094010767585, 0, 8.16496580927726, 0, 0, 0}};
     
       // Compute reference derivatives
       // Declare pointer to array of derivatives on FIAT element
@@ -11566,11 +12887,17 @@ void UFC_SolitaryWave2DLinearForm_finite
       double coeff0_0 = 0;
       double coeff0_1 = 0;
       double coeff0_2 = 0;
+      double coeff0_3 = 0;
+      double coeff0_4 = 0;
+      double coeff0_5 = 0;
     
       // Declare new coefficients
       double new_coeff0_0 = 0;
       double new_coeff0_1 = 0;
       double new_coeff0_2 = 0;
+      double new_coeff0_3 = 0;
+      double new_coeff0_4 = 0;
+      double new_coeff0_5 = 0;
     
       // Loop possible derivatives
       for (unsigned int deriv_num = 0; deriv_num < num_derivatives; deriv_num++)
@@ -11579,6 +12906,9 @@ void UFC_SolitaryWave2DLinearForm_finite
         new_coeff0_0 = coefficients0[dof][0];
         new_coeff0_1 = coefficients0[dof][1];
         new_coeff0_2 = coefficients0[dof][2];
+        new_coeff0_3 = coefficients0[dof][3];
+        new_coeff0_4 = coefficients0[dof][4];
+        new_coeff0_5 = coefficients0[dof][5];
     
         // Loop derivative order
         for (unsigned int j = 0; j < n; j++)
@@ -11587,23 +12917,32 @@ void UFC_SolitaryWave2DLinearForm_finite
           coeff0_0 = new_coeff0_0;
           coeff0_1 = new_coeff0_1;
           coeff0_2 = new_coeff0_2;
+          coeff0_3 = new_coeff0_3;
+          coeff0_4 = new_coeff0_4;
+          coeff0_5 = new_coeff0_5;
     
           if(combinations[deriv_num][j] == 0)
           {
-            new_coeff0_0 = coeff0_0*dmats0[0][0] + coeff0_1*dmats0[1][0] + coeff0_2*dmats0[2][0];
-            new_coeff0_1 = coeff0_0*dmats0[0][1] + coeff0_1*dmats0[1][1] + coeff0_2*dmats0[2][1];
-            new_coeff0_2 = coeff0_0*dmats0[0][2] + coeff0_1*dmats0[1][2] + coeff0_2*dmats0[2][2];
+            new_coeff0_0 = coeff0_0*dmats0[0][0] + coeff0_1*dmats0[1][0] + coeff0_2*dmats0[2][0] + coeff0_3*dmats0[3][0] + coeff0_4*dmats0[4][0] + coeff0_5*dmats0[5][0];
+            new_coeff0_1 = coeff0_0*dmats0[0][1] + coeff0_1*dmats0[1][1] + coeff0_2*dmats0[2][1] + coeff0_3*dmats0[3][1] + coeff0_4*dmats0[4][1] + coeff0_5*dmats0[5][1];
+            new_coeff0_2 = coeff0_0*dmats0[0][2] + coeff0_1*dmats0[1][2] + coeff0_2*dmats0[2][2] + coeff0_3*dmats0[3][2] + coeff0_4*dmats0[4][2] + coeff0_5*dmats0[5][2];
+            new_coeff0_3 = coeff0_0*dmats0[0][3] + coeff0_1*dmats0[1][3] + coeff0_2*dmats0[2][3] + coeff0_3*dmats0[3][3] + coeff0_4*dmats0[4][3] + coeff0_5*dmats0[5][3];
+            new_coeff0_4 = coeff0_0*dmats0[0][4] + coeff0_1*dmats0[1][4] + coeff0_2*dmats0[2][4] + coeff0_3*dmats0[3][4] + coeff0_4*dmats0[4][4] + coeff0_5*dmats0[5][4];
+            new_coeff0_5 = coeff0_0*dmats0[0][5] + coeff0_1*dmats0[1][5] + coeff0_2*dmats0[2][5] + coeff0_3*dmats0[3][5] + coeff0_4*dmats0[4][5] + coeff0_5*dmats0[5][5];
           }
           if(combinations[deriv_num][j] == 1)
           {
-            new_coeff0_0 = coeff0_0*dmats1[0][0] + coeff0_1*dmats1[1][0] + coeff0_2*dmats1[2][0];
-            new_coeff0_1 = coeff0_0*dmats1[0][1] + coeff0_1*dmats1[1][1] + coeff0_2*dmats1[2][1];
-            new_coeff0_2 = coeff0_0*dmats1[0][2] + coeff0_1*dmats1[1][2] + coeff0_2*dmats1[2][2];
+            new_coeff0_0 = coeff0_0*dmats1[0][0] + coeff0_1*dmats1[1][0] + coeff0_2*dmats1[2][0] + coeff0_3*dmats1[3][0] + coeff0_4*dmats1[4][0] + coeff0_5*dmats1[5][0];
+            new_coeff0_1 = coeff0_0*dmats1[0][1] + coeff0_1*dmats1[1][1] + coeff0_2*dmats1[2][1] + coeff0_3*dmats1[3][1] + coeff0_4*dmats1[4][1] + coeff0_5*dmats1[5][1];
+            new_coeff0_2 = coeff0_0*dmats1[0][2] + coeff0_1*dmats1[1][2] + coeff0_2*dmats1[2][2] + coeff0_3*dmats1[3][2] + coeff0_4*dmats1[4][2] + coeff0_5*dmats1[5][2];
+            new_coeff0_3 = coeff0_0*dmats1[0][3] + coeff0_1*dmats1[1][3] + coeff0_2*dmats1[2][3] + coeff0_3*dmats1[3][3] + coeff0_4*dmats1[4][3] + coeff0_5*dmats1[5][3];
+            new_coeff0_4 = coeff0_0*dmats1[0][4] + coeff0_1*dmats1[1][4] + coeff0_2*dmats1[2][4] + coeff0_3*dmats1[3][4] + coeff0_4*dmats1[4][4] + coeff0_5*dmats1[5][4];
+            new_coeff0_5 = coeff0_0*dmats1[0][5] + coeff0_1*dmats1[1][5] + coeff0_2*dmats1[2][5] + coeff0_3*dmats1[3][5] + coeff0_4*dmats1[4][5] + coeff0_5*dmats1[5][5];
           }
     
         }
         // Compute derivatives on reference element as dot product of coefficients and basisvalues
-        derivatives[deriv_num] = new_coeff0_0*basisvalue0 + new_coeff0_1*basisvalue1 + new_coeff0_2*basisvalue2;
+        derivatives[deriv_num] = new_coeff0_0*basisvalue0 + new_coeff0_1*basisvalue1 + new_coeff0_2*basisvalue2 + new_coeff0_3*basisvalue3 + new_coeff0_4*basisvalue4 + new_coeff0_5*basisvalue5;
       }
     
       // Transform derivatives back to physical element
@@ -11628,46 +12967,63 @@ void UFC_SolitaryWave2DLinearForm_finite
       delete [] transform;
     }
     
-    if (3 <= i && i <= 5)
-    {
-      // Map degree of freedom to element degree of freedom
-      const unsigned int dof = i - 3;
-    
-      // Generate scalings
-      const double scalings_y_0 = 1;
-      const double scalings_y_1 = scalings_y_0*(0.5 - 0.5*y);
-    
-      // Compute psitilde_a
-      const double psitilde_a_0 = 1;
-      const double psitilde_a_1 = x;
-    
-      // Compute psitilde_bs
-      const double psitilde_bs_0_0 = 1;
-      const double psitilde_bs_0_1 = 1.5*y + 0.5;
-      const double psitilde_bs_1_0 = 1;
-    
-      // Compute basisvalues
-      const double basisvalue0 = 0.707106781186548*psitilde_a_0*scalings_y_0*psitilde_bs_0_0;
-      const double basisvalue1 = 1.73205080756888*psitilde_a_1*scalings_y_1*psitilde_bs_1_0;
-      const double basisvalue2 = psitilde_a_0*scalings_y_0*psitilde_bs_0_1;
-    
-      // Table(s) of coefficients
-      const static double coefficients0[3][3] =   \
-      {{0.471404520791032, -0.288675134594813, -0.166666666666667},
-      {0.471404520791032, 0.288675134594813, -0.166666666666667},
-      {0.471404520791032, 0, 0.333333333333333}};
+    if (6 <= i && i <= 11)
+    {
+      // Map degree of freedom to element degree of freedom
+      const unsigned int dof = i - 6;
+    
+      // Generate scalings
+      const double scalings_y_0 = 1;
+      const double scalings_y_1 = scalings_y_0*(0.5 - 0.5*y);
+      const double scalings_y_2 = scalings_y_1*(0.5 - 0.5*y);
+    
+      // Compute psitilde_a
+      const double psitilde_a_0 = 1;
+      const double psitilde_a_1 = x;
+      const double psitilde_a_2 = 1.5*x*psitilde_a_1 - 0.5*psitilde_a_0;
+    
+      // Compute psitilde_bs
+      const double psitilde_bs_0_0 = 1;
+      const double psitilde_bs_0_1 = 1.5*y + 0.5;
+      const double psitilde_bs_0_2 = 0.111111111111111*psitilde_bs_0_1 + 1.66666666666667*y*psitilde_bs_0_1 - 0.555555555555556*psitilde_bs_0_0;
+      const double psitilde_bs_1_0 = 1;
+      const double psitilde_bs_1_1 = 2.5*y + 1.5;
+      const double psitilde_bs_2_0 = 1;
+    
+      // Compute basisvalues
+      const double basisvalue0 = 0.707106781186548*psitilde_a_0*scalings_y_0*psitilde_bs_0_0;
+      const double basisvalue1 = 1.73205080756888*psitilde_a_1*scalings_y_1*psitilde_bs_1_0;
+      const double basisvalue2 = psitilde_a_0*scalings_y_0*psitilde_bs_0_1;
+      const double basisvalue3 = 2.73861278752583*psitilde_a_2*scalings_y_2*psitilde_bs_2_0;
+      const double basisvalue4 = 2.12132034355964*psitilde_a_1*scalings_y_1*psitilde_bs_1_1;
+      const double basisvalue5 = 1.22474487139159*psitilde_a_0*scalings_y_0*psitilde_bs_0_2;
+    
+      // Table(s) of coefficients
+      const static double coefficients0[6][6] =   \
+      {{0, -0.173205080756888, -0.1, 0.121716123890037, 0.0942809041582064, 0.0544331053951817},
+      {0, 0.173205080756888, -0.1, 0.121716123890037, -0.0942809041582063, 0.0544331053951818},
+      {0, 0, 0.2, 0, 0, 0.163299316185545},
+      {0.471404520791032, 0.23094010767585, 0.133333333333333, 0, 0.188561808316413, -0.163299316185545},
+      {0.471404520791032, -0.23094010767585, 0.133333333333333, 0, -0.188561808316413, -0.163299316185545},
+      {0.471404520791032, 0, -0.266666666666667, -0.243432247780074, 0, 0.0544331053951817}};
     
       // Interesting (new) part
       // Tables of derivatives of the polynomial base (transpose)
-      const static double dmats0[3][3] =   \
-      {{0, 0, 0},
-      {4.89897948556636, 0, 0},
-      {0, 0, 0}};
-    
-      const static double dmats1[3][3] =   \
-      {{0, 0, 0},
-      {2.44948974278318, 0, 0},
-      {4.24264068711928, 0, 0}};
+      const static double dmats0[6][6] =   \
+      {{0, 0, 0, 0, 0, 0},
+      {4.89897948556636, 0, 0, 0, 0, 0},
+      {0, 0, 0, 0, 0, 0},
+      {0, 9.48683298050514, 0, 0, 0, 0},
+      {4, 0, 7.07106781186548, 0, 0, 0},
+      {0, 0, 0, 0, 0, 0}};
+    
+      const static double dmats1[6][6] =   \
+      {{0, 0, 0, 0, 0, 0},
+      {2.44948974278318, 0, 0, 0, 0, 0},
+      {4.24264068711928, 0, 0, 0, 0, 0},
+      {2.58198889747161, 4.74341649025257, -0.912870929175277, 0, 0, 0},
+      {2, 6.12372435695795, 3.53553390593274, 0, 0, 0},
+      {-2.3094010767585, 0, 8.16496580927726, 0, 0, 0}};
     
       // Compute reference derivatives
       // Declare pointer to array of derivatives on FIAT element
@@ -11677,11 +13033,17 @@ void UFC_SolitaryWave2DLinearForm_finite
       double coeff0_0 = 0;
       double coeff0_1 = 0;
       double coeff0_2 = 0;
+      double coeff0_3 = 0;
+      double coeff0_4 = 0;
+      double coeff0_5 = 0;
     
       // Declare new coefficients
       double new_coeff0_0 = 0;
       double new_coeff0_1 = 0;
       double new_coeff0_2 = 0;
+      double new_coeff0_3 = 0;
+      double new_coeff0_4 = 0;
+      double new_coeff0_5 = 0;
     
       // Loop possible derivatives
       for (unsigned int deriv_num = 0; deriv_num < num_derivatives; deriv_num++)
@@ -11690,6 +13052,9 @@ void UFC_SolitaryWave2DLinearForm_finite
         new_coeff0_0 = coefficients0[dof][0];
         new_coeff0_1 = coefficients0[dof][1];
         new_coeff0_2 = coefficients0[dof][2];
+        new_coeff0_3 = coefficients0[dof][3];
+        new_coeff0_4 = coefficients0[dof][4];
+        new_coeff0_5 = coefficients0[dof][5];
     
         // Loop derivative order
         for (unsigned int j = 0; j < n; j++)
@@ -11698,23 +13063,32 @@ void UFC_SolitaryWave2DLinearForm_finite
           coeff0_0 = new_coeff0_0;
           coeff0_1 = new_coeff0_1;
           coeff0_2 = new_coeff0_2;
+          coeff0_3 = new_coeff0_3;
+          coeff0_4 = new_coeff0_4;
+          coeff0_5 = new_coeff0_5;
     
           if(combinations[deriv_num][j] == 0)
           {
-            new_coeff0_0 = coeff0_0*dmats0[0][0] + coeff0_1*dmats0[1][0] + coeff0_2*dmats0[2][0];
-            new_coeff0_1 = coeff0_0*dmats0[0][1] + coeff0_1*dmats0[1][1] + coeff0_2*dmats0[2][1];
-            new_coeff0_2 = coeff0_0*dmats0[0][2] + coeff0_1*dmats0[1][2] + coeff0_2*dmats0[2][2];
+            new_coeff0_0 = coeff0_0*dmats0[0][0] + coeff0_1*dmats0[1][0] + coeff0_2*dmats0[2][0] + coeff0_3*dmats0[3][0] + coeff0_4*dmats0[4][0] + coeff0_5*dmats0[5][0];
+            new_coeff0_1 = coeff0_0*dmats0[0][1] + coeff0_1*dmats0[1][1] + coeff0_2*dmats0[2][1] + coeff0_3*dmats0[3][1] + coeff0_4*dmats0[4][1] + coeff0_5*dmats0[5][1];
+            new_coeff0_2 = coeff0_0*dmats0[0][2] + coeff0_1*dmats0[1][2] + coeff0_2*dmats0[2][2] + coeff0_3*dmats0[3][2] + coeff0_4*dmats0[4][2] + coeff0_5*dmats0[5][2];
+            new_coeff0_3 = coeff0_0*dmats0[0][3] + coeff0_1*dmats0[1][3] + coeff0_2*dmats0[2][3] + coeff0_3*dmats0[3][3] + coeff0_4*dmats0[4][3] + coeff0_5*dmats0[5][3];
+            new_coeff0_4 = coeff0_0*dmats0[0][4] + coeff0_1*dmats0[1][4] + coeff0_2*dmats0[2][4] + coeff0_3*dmats0[3][4] + coeff0_4*dmats0[4][4] + coeff0_5*dmats0[5][4];
+            new_coeff0_5 = coeff0_0*dmats0[0][5] + coeff0_1*dmats0[1][5] + coeff0_2*dmats0[2][5] + coeff0_3*dmats0[3][5] + coeff0_4*dmats0[4][5] + coeff0_5*dmats0[5][5];
           }
           if(combinations[deriv_num][j] == 1)
           {
-            new_coeff0_0 = coeff0_0*dmats1[0][0] + coeff0_1*dmats1[1][0] + coeff0_2*dmats1[2][0];
-            new_coeff0_1 = coeff0_0*dmats1[0][1] + coeff0_1*dmats1[1][1] + coeff0_2*dmats1[2][1];
-            new_coeff0_2 = coeff0_0*dmats1[0][2] + coeff0_1*dmats1[1][2] + coeff0_2*dmats1[2][2];
+            new_coeff0_0 = coeff0_0*dmats1[0][0] + coeff0_1*dmats1[1][0] + coeff0_2*dmats1[2][0] + coeff0_3*dmats1[3][0] + coeff0_4*dmats1[4][0] + coeff0_5*dmats1[5][0];
+            new_coeff0_1 = coeff0_0*dmats1[0][1] + coeff0_1*dmats1[1][1] + coeff0_2*dmats1[2][1] + coeff0_3*dmats1[3][1] + coeff0_4*dmats1[4][1] + coeff0_5*dmats1[5][1];
+            new_coeff0_2 = coeff0_0*dmats1[0][2] + coeff0_1*dmats1[1][2] + coeff0_2*dmats1[2][2] + coeff0_3*dmats1[3][2] + coeff0_4*dmats1[4][2] + coeff0_5*dmats1[5][2];
+            new_coeff0_3 = coeff0_0*dmats1[0][3] + coeff0_1*dmats1[1][3] + coeff0_2*dmats1[2][3] + coeff0_3*dmats1[3][3] + coeff0_4*dmats1[4][3] + coeff0_5*dmats1[5][3];
+            new_coeff0_4 = coeff0_0*dmats1[0][4] + coeff0_1*dmats1[1][4] + coeff0_2*dmats1[2][4] + coeff0_3*dmats1[3][4] + coeff0_4*dmats1[4][4] + coeff0_5*dmats1[5][4];
+            new_coeff0_5 = coeff0_0*dmats1[0][5] + coeff0_1*dmats1[1][5] + coeff0_2*dmats1[2][5] + coeff0_3*dmats1[3][5] + coeff0_4*dmats1[4][5] + coeff0_5*dmats1[5][5];
           }
     
         }
         // Compute derivatives on reference element as dot product of coefficients and basisvalues
-        derivatives[deriv_num] = new_coeff0_0*basisvalue0 + new_coeff0_1*basisvalue1 + new_coeff0_2*basisvalue2;
+        derivatives[deriv_num] = new_coeff0_0*basisvalue0 + new_coeff0_1*basisvalue1 + new_coeff0_2*basisvalue2 + new_coeff0_3*basisvalue3 + new_coeff0_4*basisvalue4 + new_coeff0_5*basisvalue5;
       }
     
       // Transform derivatives back to physical element
@@ -11756,9 +13130,9 @@ double UFC_SolitaryWave2DLinearForm_fini
                                    const ufc::cell& c) const
 {
     // The reference points, direction and weights:
-    const static double X[6][1][2] = {{{0, 0}}, {{1, 0}}, {{0, 1}}, {{0, 0}}, {{1, 0}}, {{0, 1}}};
-    const static double W[6][1] = {{1}, {1}, {1}, {1}, {1}, {1}};
-    const static double D[6][1][2] = {{{1, 0}}, {{1, 0}}, {{1, 0}}, {{0, 1}}, {{0, 1}}, {{0, 1}}};
+    const static double X[12][1][2] = {{{0, 0}}, {{1, 0}}, {{0, 1}}, {{0.5, 0.5}}, {{0, 0.5}}, {{0.5, 0}}, {{0, 0}}, {{1, 0}}, {{0, 1}}, {{0.5, 0.5}}, {{0, 0.5}}, {{0.5, 0}}};
+    const static double W[12][1] = {{1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}};
+    const static double D[12][1][2] = {{{1, 0}}, {{1, 0}}, {{1, 0}}, {{1, 0}}, {{1, 0}}, {{1, 0}}, {{0, 1}}, {{0, 1}}, {{0, 1}}, {{0, 1}}, {{0, 1}}, {{0, 1}}};
     
     const double * const * x = c.coordinates;
     double result = 0.0;
@@ -11809,9 +13183,9 @@ void UFC_SolitaryWave2DLinearForm_finite
     vertex_values[2] = dof_values[1];
     vertex_values[4] = dof_values[2];
     // Evaluate at vertices and use affine mapping
-    vertex_values[1] = dof_values[3];
-    vertex_values[3] = dof_values[4];
-    vertex_values[5] = dof_values[5];
+    vertex_values[1] = dof_values[6];
+    vertex_values[3] = dof_values[7];
+    vertex_values[5] = dof_values[8];
 }
 
 /// Return the number of sub elements (for a mixed element)
@@ -13887,7 +15261,7 @@ UFC_SolitaryWave2DLinearForm_dof_map_0_0
 /// Return a string identifying the dof map
 const char* UFC_SolitaryWave2DLinearForm_dof_map_0_0::signature() const
 {
-    return "FFC dof map for FiniteElement('Lagrange', 'triangle', 1)";
+    return "FFC dof map for FiniteElement('Lagrange', 'triangle', 2)";
 }
 
 /// Return true iff mesh entities of topological dimension d are needed
@@ -13899,7 +15273,7 @@ bool UFC_SolitaryWave2DLinearForm_dof_ma
       return true;
       break;
     case 1:
-      return false;
+      return true;
       break;
     case 2:
       return false;
@@ -13911,7 +15285,7 @@ bool UFC_SolitaryWave2DLinearForm_dof_ma
 /// Initialize dof map for mesh (return true iff init_cell() is needed)
 bool UFC_SolitaryWave2DLinearForm_dof_map_0_0::init_mesh(const ufc::mesh& m)
 {
-    __global_dimension = m.num_entities[0];
+    __global_dimension = m.num_entities[0] + m.num_entities[1];
     return false;
 }
 
@@ -13937,19 +15311,19 @@ unsigned int UFC_SolitaryWave2DLinearFor
 /// Return the dimension of the local finite element function space
 unsigned int UFC_SolitaryWave2DLinearForm_dof_map_0_0::local_dimension() const
 {
+    return 6;
+}
+
+// Return the geometric dimension of the coordinates this dof map provides
+unsigned int UFC_SolitaryWave2DLinearForm_dof_map_0_0::geometric_dimension() const
+{
+    return 2;
+}
+
+/// Return the number of dofs on each cell facet
+unsigned int UFC_SolitaryWave2DLinearForm_dof_map_0_0::num_facet_dofs() const
+{
     return 3;
-}
-
-// Return the geometric dimension of the coordinates this dof map provides
-unsigned int UFC_SolitaryWave2DLinearForm_dof_map_0_0::geometric_dimension() const
-{
-    return 2;
-}
-
-/// Return the number of dofs on each cell facet
-unsigned int UFC_SolitaryWave2DLinearForm_dof_map_0_0::num_facet_dofs() const
-{
-    return 2;
 }
 
 /// Return the number of dofs associated with each cell entity of dimension d
@@ -13966,6 +15340,10 @@ void UFC_SolitaryWave2DLinearForm_dof_ma
     dofs[0] = c.entity_indices[0][0];
     dofs[1] = c.entity_indices[0][1];
     dofs[2] = c.entity_indices[0][2];
+    unsigned int offset = m.num_entities[0];
+    dofs[3] = offset + c.entity_indices[1][0];
+    dofs[4] = offset + c.entity_indices[1][1];
+    dofs[5] = offset + c.entity_indices[1][2];
 }
 
 /// Tabulate the local-to-local mapping from facet dofs to cell dofs
@@ -13977,14 +15355,17 @@ void UFC_SolitaryWave2DLinearForm_dof_ma
     case 0:
       dofs[0] = 1;
       dofs[1] = 2;
-      break;
-    case 1:
-      dofs[0] = 0;
-      dofs[1] = 2;
+      dofs[2] = 3;
+      break;
+    case 1:
+      dofs[0] = 0;
+      dofs[1] = 2;
+      dofs[2] = 4;
       break;
     case 2:
       dofs[0] = 0;
       dofs[1] = 1;
+      dofs[2] = 5;
       break;
     }
 }
@@ -14007,6 +15388,12 @@ void UFC_SolitaryWave2DLinearForm_dof_ma
     coordinates[1][1] = x[1][1];
     coordinates[2][0] = x[2][0];
     coordinates[2][1] = x[2][1];
+    coordinates[3][0] = 0.5*x[1][0] + 0.5*x[2][0];
+    coordinates[3][1] = 0.5*x[1][1] + 0.5*x[2][1];
+    coordinates[4][0] = 0.5*x[0][0] + 0.5*x[2][0];
+    coordinates[4][1] = 0.5*x[0][1] + 0.5*x[2][1];
+    coordinates[5][0] = 0.5*x[0][0] + 0.5*x[1][0];
+    coordinates[5][1] = 0.5*x[0][1] + 0.5*x[1][1];
 }
 
 /// Return the number of sub dof maps (for a mixed element)
@@ -14037,7 +15424,7 @@ UFC_SolitaryWave2DLinearForm_dof_map_0_1
 /// Return a string identifying the dof map
 const char* UFC_SolitaryWave2DLinearForm_dof_map_0_1::signature() const
 {
-    return "FFC dof map for FiniteElement('Lagrange', 'triangle', 1)";
+    return "FFC dof map for FiniteElement('Lagrange', 'triangle', 2)";
 }
 
 /// Return true iff mesh entities of topological dimension d are needed
@@ -14049,7 +15436,7 @@ bool UFC_SolitaryWave2DLinearForm_dof_ma
       return true;
       break;
     case 1:
-      return false;
+      return true;
       break;
     case 2:
       return false;
@@ -14061,7 +15448,7 @@ bool UFC_SolitaryWave2DLinearForm_dof_ma
 /// Initialize dof map for mesh (return true iff init_cell() is needed)
 bool UFC_SolitaryWave2DLinearForm_dof_map_0_1::init_mesh(const ufc::mesh& m)
 {
-    __global_dimension = m.num_entities[0];
+    __global_dimension = m.num_entities[0] + m.num_entities[1];
     return false;
 }
 
@@ -14087,19 +15474,19 @@ unsigned int UFC_SolitaryWave2DLinearFor
 /// Return the dimension of the local finite element function space
 unsigned int UFC_SolitaryWave2DLinearForm_dof_map_0_1::local_dimension() const
 {
+    return 6;
+}
+
+// Return the geometric dimension of the coordinates this dof map provides
+unsigned int UFC_SolitaryWave2DLinearForm_dof_map_0_1::geometric_dimension() const
+{
+    return 2;
+}
+
+/// Return the number of dofs on each cell facet
+unsigned int UFC_SolitaryWave2DLinearForm_dof_map_0_1::num_facet_dofs() const
+{
     return 3;
-}
-
-// Return the geometric dimension of the coordinates this dof map provides
-unsigned int UFC_SolitaryWave2DLinearForm_dof_map_0_1::geometric_dimension() const
-{
-    return 2;
-}
-
-/// Return the number of dofs on each cell facet
-unsigned int UFC_SolitaryWave2DLinearForm_dof_map_0_1::num_facet_dofs() const
-{
-    return 2;
 }
 
 /// Return the number of dofs associated with each cell entity of dimension d
@@ -14116,6 +15503,10 @@ void UFC_SolitaryWave2DLinearForm_dof_ma
     dofs[0] = c.entity_indices[0][0];
     dofs[1] = c.entity_indices[0][1];
     dofs[2] = c.entity_indices[0][2];
+    unsigned int offset = m.num_entities[0];
+    dofs[3] = offset + c.entity_indices[1][0];
+    dofs[4] = offset + c.entity_indices[1][1];
+    dofs[5] = offset + c.entity_indices[1][2];
 }
 
 /// Tabulate the local-to-local mapping from facet dofs to cell dofs
@@ -14127,14 +15518,17 @@ void UFC_SolitaryWave2DLinearForm_dof_ma
     case 0:
       dofs[0] = 1;
       dofs[1] = 2;
-      break;
-    case 1:
-      dofs[0] = 0;
-      dofs[1] = 2;
+      dofs[2] = 3;
+      break;
+    case 1:
+      dofs[0] = 0;
+      dofs[1] = 2;
+      dofs[2] = 4;
       break;
     case 2:
       dofs[0] = 0;
       dofs[1] = 1;
+      dofs[2] = 5;
       break;
     }
 }
@@ -14157,6 +15551,12 @@ void UFC_SolitaryWave2DLinearForm_dof_ma
     coordinates[1][1] = x[1][1];
     coordinates[2][0] = x[2][0];
     coordinates[2][1] = x[2][1];
+    coordinates[3][0] = 0.5*x[1][0] + 0.5*x[2][0];
+    coordinates[3][1] = 0.5*x[1][1] + 0.5*x[2][1];
+    coordinates[4][0] = 0.5*x[0][0] + 0.5*x[2][0];
+    coordinates[4][1] = 0.5*x[0][1] + 0.5*x[2][1];
+    coordinates[5][0] = 0.5*x[0][0] + 0.5*x[1][0];
+    coordinates[5][1] = 0.5*x[0][1] + 0.5*x[1][1];
 }
 
 /// Return the number of sub dof maps (for a mixed element)
@@ -14187,7 +15587,7 @@ UFC_SolitaryWave2DLinearForm_dof_map_0::
 /// Return a string identifying the dof map
 const char* UFC_SolitaryWave2DLinearForm_dof_map_0::signature() const
 {
-    return "FFC dof map for MixedElement([FiniteElement('Lagrange', 'triangle', 1), FiniteElement('Lagrange', 'triangle', 1)])";
+    return "FFC dof map for MixedElement([FiniteElement('Lagrange', 'triangle', 2), FiniteElement('Lagrange', 'triangle', 2)])";
 }
 
 /// Return true iff mesh entities of topological dimension d are needed
@@ -14199,7 +15599,7 @@ bool UFC_SolitaryWave2DLinearForm_dof_ma
       return true;
       break;
     case 1:
-      return false;
+      return true;
       break;
     case 2:
       return false;
@@ -14211,7 +15611,7 @@ bool UFC_SolitaryWave2DLinearForm_dof_ma
 /// Initialize dof map for mesh (return true iff init_cell() is needed)
 bool UFC_SolitaryWave2DLinearForm_dof_map_0::init_mesh(const ufc::mesh& m)
 {
-    __global_dimension = 2*m.num_entities[0];
+    __global_dimension = 2*m.num_entities[0] + 2*m.num_entities[1];
     return false;
 }
 
@@ -14237,7 +15637,7 @@ unsigned int UFC_SolitaryWave2DLinearFor
 /// Return the dimension of the local finite element function space
 unsigned int UFC_SolitaryWave2DLinearForm_dof_map_0::local_dimension() const
 {
-    return 6;
+    return 12;
 }
 
 // Return the geometric dimension of the coordinates this dof map provides
@@ -14249,7 +15649,7 @@ unsigned int UFC_SolitaryWave2DLinearFor
 /// Return the number of dofs on each cell facet
 unsigned int UFC_SolitaryWave2DLinearForm_dof_map_0::num_facet_dofs() const
 {
-    return 4;
+    return 6;
 }
 
 /// Return the number of dofs associated with each cell entity of dimension d
@@ -14267,9 +15667,17 @@ void UFC_SolitaryWave2DLinearForm_dof_ma
     dofs[1] = c.entity_indices[0][1];
     dofs[2] = c.entity_indices[0][2];
     unsigned int offset = m.num_entities[0];
-    dofs[3] = offset + c.entity_indices[0][0];
-    dofs[4] = offset + c.entity_indices[0][1];
-    dofs[5] = offset + c.entity_indices[0][2];
+    dofs[3] = offset + c.entity_indices[1][0];
+    dofs[4] = offset + c.entity_indices[1][1];
+    dofs[5] = offset + c.entity_indices[1][2];
+    offset = offset + m.num_entities[1];
+    dofs[6] = offset + c.entity_indices[0][0];
+    dofs[7] = offset + c.entity_indices[0][1];
+    dofs[8] = offset + c.entity_indices[0][2];
+    offset = offset + m.num_entities[0];
+    dofs[9] = offset + c.entity_indices[1][0];
+    dofs[10] = offset + c.entity_indices[1][1];
+    dofs[11] = offset + c.entity_indices[1][2];
 }
 
 /// Tabulate the local-to-local mapping from facet dofs to cell dofs
@@ -14281,20 +15689,26 @@ void UFC_SolitaryWave2DLinearForm_dof_ma
     case 0:
       dofs[0] = 1;
       dofs[1] = 2;
+      dofs[2] = 3;
+      dofs[3] = 7;
+      dofs[4] = 8;
+      dofs[5] = 9;
+      break;
+    case 1:
+      dofs[0] = 0;
+      dofs[1] = 2;
       dofs[2] = 4;
-      dofs[3] = 5;
-      break;
-    case 1:
-      dofs[0] = 0;
-      dofs[1] = 2;
-      dofs[2] = 3;
-      dofs[3] = 5;
+      dofs[3] = 6;
+      dofs[4] = 8;
+      dofs[5] = 10;
       break;
     case 2:
       dofs[0] = 0;
       dofs[1] = 1;
-      dofs[2] = 3;
-      dofs[3] = 4;
+      dofs[2] = 5;
+      dofs[3] = 6;
+      dofs[4] = 7;
+      dofs[5] = 11;
       break;
     }
 }
@@ -14317,12 +15731,24 @@ void UFC_SolitaryWave2DLinearForm_dof_ma
     coordinates[1][1] = x[1][1];
     coordinates[2][0] = x[2][0];
     coordinates[2][1] = x[2][1];
-    coordinates[3][0] = x[0][0];
-    coordinates[3][1] = x[0][1];
-    coordinates[4][0] = x[1][0];
-    coordinates[4][1] = x[1][1];
-    coordinates[5][0] = x[2][0];
-    coordinates[5][1] = x[2][1];
+    coordinates[3][0] = 0.5*x[1][0] + 0.5*x[2][0];
+    coordinates[3][1] = 0.5*x[1][1] + 0.5*x[2][1];
+    coordinates[4][0] = 0.5*x[0][0] + 0.5*x[2][0];
+    coordinates[4][1] = 0.5*x[0][1] + 0.5*x[2][1];
+    coordinates[5][0] = 0.5*x[0][0] + 0.5*x[1][0];
+    coordinates[5][1] = 0.5*x[0][1] + 0.5*x[1][1];
+    coordinates[6][0] = x[0][0];
+    coordinates[6][1] = x[0][1];
+    coordinates[7][0] = x[1][0];
+    coordinates[7][1] = x[1][1];
+    coordinates[8][0] = x[2][0];
+    coordinates[8][1] = x[2][1];
+    coordinates[9][0] = 0.5*x[1][0] + 0.5*x[2][0];
+    coordinates[9][1] = 0.5*x[1][1] + 0.5*x[2][1];
+    coordinates[10][0] = 0.5*x[0][0] + 0.5*x[2][0];
+    coordinates[10][1] = 0.5*x[0][1] + 0.5*x[2][1];
+    coordinates[11][0] = 0.5*x[0][0] + 0.5*x[1][0];
+    coordinates[11][1] = 0.5*x[0][1] + 0.5*x[1][1];
 }
 
 /// Return the number of sub dof maps (for a mixed element)
@@ -14362,7 +15788,7 @@ UFC_SolitaryWave2DLinearForm_dof_map_1_0
 /// Return a string identifying the dof map
 const char* UFC_SolitaryWave2DLinearForm_dof_map_1_0::signature() const
 {
-    return "FFC dof map for FiniteElement('Lagrange', 'triangle', 1)";
+    return "FFC dof map for FiniteElement('Lagrange', 'triangle', 2)";
 }
 
 /// Return true iff mesh entities of topological dimension d are needed
@@ -14374,7 +15800,7 @@ bool UFC_SolitaryWave2DLinearForm_dof_ma
       return true;
       break;
     case 1:
-      return false;
+      return true;
       break;
     case 2:
       return false;
@@ -14386,7 +15812,7 @@ bool UFC_SolitaryWave2DLinearForm_dof_ma
 /// Initialize dof map for mesh (return true iff init_cell() is needed)
 bool UFC_SolitaryWave2DLinearForm_dof_map_1_0::init_mesh(const ufc::mesh& m)
 {
-    __global_dimension = m.num_entities[0];
+    __global_dimension = m.num_entities[0] + m.num_entities[1];
     return false;
 }
 
@@ -14412,19 +15838,19 @@ unsigned int UFC_SolitaryWave2DLinearFor
 /// Return the dimension of the local finite element function space
 unsigned int UFC_SolitaryWave2DLinearForm_dof_map_1_0::local_dimension() const
 {
+    return 6;
+}
+
+// Return the geometric dimension of the coordinates this dof map provides
+unsigned int UFC_SolitaryWave2DLinearForm_dof_map_1_0::geometric_dimension() const
+{
+    return 2;
+}
+
+/// Return the number of dofs on each cell facet
+unsigned int UFC_SolitaryWave2DLinearForm_dof_map_1_0::num_facet_dofs() const
+{
     return 3;
-}
-
-// Return the geometric dimension of the coordinates this dof map provides
-unsigned int UFC_SolitaryWave2DLinearForm_dof_map_1_0::geometric_dimension() const
-{
-    return 2;
-}
-
-/// Return the number of dofs on each cell facet
-unsigned int UFC_SolitaryWave2DLinearForm_dof_map_1_0::num_facet_dofs() const
-{
-    return 2;
 }
 
 /// Return the number of dofs associated with each cell entity of dimension d
@@ -14441,6 +15867,10 @@ void UFC_SolitaryWave2DLinearForm_dof_ma
     dofs[0] = c.entity_indices[0][0];
     dofs[1] = c.entity_indices[0][1];
     dofs[2] = c.entity_indices[0][2];
+    unsigned int offset = m.num_entities[0];
+    dofs[3] = offset + c.entity_indices[1][0];
+    dofs[4] = offset + c.entity_indices[1][1];
+    dofs[5] = offset + c.entity_indices[1][2];
 }
 
 /// Tabulate the local-to-local mapping from facet dofs to cell dofs
@@ -14452,14 +15882,17 @@ void UFC_SolitaryWave2DLinearForm_dof_ma
     case 0:
       dofs[0] = 1;
       dofs[1] = 2;
-      break;
-    case 1:
-      dofs[0] = 0;
-      dofs[1] = 2;
+      dofs[2] = 3;
+      break;
+    case 1:
+      dofs[0] = 0;
+      dofs[1] = 2;
+      dofs[2] = 4;
       break;
     case 2:
       dofs[0] = 0;
       dofs[1] = 1;
+      dofs[2] = 5;
       break;
     }
 }
@@ -14482,6 +15915,12 @@ void UFC_SolitaryWave2DLinearForm_dof_ma
     coordinates[1][1] = x[1][1];
     coordinates[2][0] = x[2][0];
     coordinates[2][1] = x[2][1];
+    coordinates[3][0] = 0.5*x[1][0] + 0.5*x[2][0];
+    coordinates[3][1] = 0.5*x[1][1] + 0.5*x[2][1];
+    coordinates[4][0] = 0.5*x[0][0] + 0.5*x[2][0];
+    coordinates[4][1] = 0.5*x[0][1] + 0.5*x[2][1];
+    coordinates[5][0] = 0.5*x[0][0] + 0.5*x[1][0];
+    coordinates[5][1] = 0.5*x[0][1] + 0.5*x[1][1];
 }
 
 /// Return the number of sub dof maps (for a mixed element)
@@ -14512,7 +15951,7 @@ UFC_SolitaryWave2DLinearForm_dof_map_1_1
 /// Return a string identifying the dof map
 const char* UFC_SolitaryWave2DLinearForm_dof_map_1_1::signature() const
 {
-    return "FFC dof map for FiniteElement('Lagrange', 'triangle', 1)";
+    return "FFC dof map for FiniteElement('Lagrange', 'triangle', 2)";
 }
 
 /// Return true iff mesh entities of topological dimension d are needed
@@ -14524,7 +15963,7 @@ bool UFC_SolitaryWave2DLinearForm_dof_ma
       return true;
       break;
     case 1:
-      return false;
+      return true;
       break;
     case 2:
       return false;
@@ -14536,7 +15975,7 @@ bool UFC_SolitaryWave2DLinearForm_dof_ma
 /// Initialize dof map for mesh (return true iff init_cell() is needed)
 bool UFC_SolitaryWave2DLinearForm_dof_map_1_1::init_mesh(const ufc::mesh& m)
 {
-    __global_dimension = m.num_entities[0];
+    __global_dimension = m.num_entities[0] + m.num_entities[1];
     return false;
 }
 
@@ -14562,19 +16001,19 @@ unsigned int UFC_SolitaryWave2DLinearFor
 /// Return the dimension of the local finite element function space
 unsigned int UFC_SolitaryWave2DLinearForm_dof_map_1_1::local_dimension() const
 {
+    return 6;
+}
+
+// Return the geometric dimension of the coordinates this dof map provides
+unsigned int UFC_SolitaryWave2DLinearForm_dof_map_1_1::geometric_dimension() const
+{
+    return 2;
+}
+
+/// Return the number of dofs on each cell facet
+unsigned int UFC_SolitaryWave2DLinearForm_dof_map_1_1::num_facet_dofs() const
+{
     return 3;
-}
-
-// Return the geometric dimension of the coordinates this dof map provides
-unsigned int UFC_SolitaryWave2DLinearForm_dof_map_1_1::geometric_dimension() const
-{
-    return 2;
-}
-
-/// Return the number of dofs on each cell facet
-unsigned int UFC_SolitaryWave2DLinearForm_dof_map_1_1::num_facet_dofs() const
-{
-    return 2;
 }
 
 /// Return the number of dofs associated with each cell entity of dimension d
@@ -14591,6 +16030,10 @@ void UFC_SolitaryWave2DLinearForm_dof_ma
     dofs[0] = c.entity_indices[0][0];
     dofs[1] = c.entity_indices[0][1];
     dofs[2] = c.entity_indices[0][2];
+    unsigned int offset = m.num_entities[0];
+    dofs[3] = offset + c.entity_indices[1][0];
+    dofs[4] = offset + c.entity_indices[1][1];
+    dofs[5] = offset + c.entity_indices[1][2];
 }
 
 /// Tabulate the local-to-local mapping from facet dofs to cell dofs
@@ -14602,14 +16045,17 @@ void UFC_SolitaryWave2DLinearForm_dof_ma
     case 0:
       dofs[0] = 1;
       dofs[1] = 2;
-      break;
-    case 1:
-      dofs[0] = 0;
-      dofs[1] = 2;
+      dofs[2] = 3;
+      break;
+    case 1:
+      dofs[0] = 0;
+      dofs[1] = 2;
+      dofs[2] = 4;
       break;
     case 2:
       dofs[0] = 0;
       dofs[1] = 1;
+      dofs[2] = 5;
       break;
     }
 }
@@ -14632,6 +16078,12 @@ void UFC_SolitaryWave2DLinearForm_dof_ma
     coordinates[1][1] = x[1][1];
     coordinates[2][0] = x[2][0];
     coordinates[2][1] = x[2][1];
+    coordinates[3][0] = 0.5*x[1][0] + 0.5*x[2][0];
+    coordinates[3][1] = 0.5*x[1][1] + 0.5*x[2][1];
+    coordinates[4][0] = 0.5*x[0][0] + 0.5*x[2][0];
+    coordinates[4][1] = 0.5*x[0][1] + 0.5*x[2][1];
+    coordinates[5][0] = 0.5*x[0][0] + 0.5*x[1][0];
+    coordinates[5][1] = 0.5*x[0][1] + 0.5*x[1][1];
 }
 
 /// Return the number of sub dof maps (for a mixed element)
@@ -14662,7 +16114,7 @@ UFC_SolitaryWave2DLinearForm_dof_map_1::
 /// Return a string identifying the dof map
 const char* UFC_SolitaryWave2DLinearForm_dof_map_1::signature() const
 {
-    return "FFC dof map for MixedElement([FiniteElement('Lagrange', 'triangle', 1), FiniteElement('Lagrange', 'triangle', 1)])";
+    return "FFC dof map for MixedElement([FiniteElement('Lagrange', 'triangle', 2), FiniteElement('Lagrange', 'triangle', 2)])";
 }
 
 /// Return true iff mesh entities of topological dimension d are needed
@@ -14674,7 +16126,7 @@ bool UFC_SolitaryWave2DLinearForm_dof_ma
       return true;
       break;
     case 1:
-      return false;
+      return true;
       break;
     case 2:
       return false;
@@ -14686,7 +16138,7 @@ bool UFC_SolitaryWave2DLinearForm_dof_ma
 /// Initialize dof map for mesh (return true iff init_cell() is needed)
 bool UFC_SolitaryWave2DLinearForm_dof_map_1::init_mesh(const ufc::mesh& m)
 {
-    __global_dimension = 2*m.num_entities[0];
+    __global_dimension = 2*m.num_entities[0] + 2*m.num_entities[1];
     return false;
 }
 
@@ -14712,7 +16164,7 @@ unsigned int UFC_SolitaryWave2DLinearFor
 /// Return the dimension of the local finite element function space
 unsigned int UFC_SolitaryWave2DLinearForm_dof_map_1::local_dimension() const
 {
-    return 6;
+    return 12;
 }
 
 // Return the geometric dimension of the coordinates this dof map provides
@@ -14724,7 +16176,7 @@ unsigned int UFC_SolitaryWave2DLinearFor
 /// Return the number of dofs on each cell facet
 unsigned int UFC_SolitaryWave2DLinearForm_dof_map_1::num_facet_dofs() const
 {
-    return 4;
+    return 6;
 }
 
 /// Return the number of dofs associated with each cell entity of dimension d
@@ -14742,9 +16194,17 @@ void UFC_SolitaryWave2DLinearForm_dof_ma
     dofs[1] = c.entity_indices[0][1];
     dofs[2] = c.entity_indices[0][2];
     unsigned int offset = m.num_entities[0];
-    dofs[3] = offset + c.entity_indices[0][0];
-    dofs[4] = offset + c.entity_indices[0][1];
-    dofs[5] = offset + c.entity_indices[0][2];
+    dofs[3] = offset + c.entity_indices[1][0];
+    dofs[4] = offset + c.entity_indices[1][1];
+    dofs[5] = offset + c.entity_indices[1][2];
+    offset = offset + m.num_entities[1];
+    dofs[6] = offset + c.entity_indices[0][0];
+    dofs[7] = offset + c.entity_indices[0][1];
+    dofs[8] = offset + c.entity_indices[0][2];
+    offset = offset + m.num_entities[0];
+    dofs[9] = offset + c.entity_indices[1][0];
+    dofs[10] = offset + c.entity_indices[1][1];
+    dofs[11] = offset + c.entity_indices[1][2];
 }
 
 /// Tabulate the local-to-local mapping from facet dofs to cell dofs
@@ -14756,20 +16216,26 @@ void UFC_SolitaryWave2DLinearForm_dof_ma
     case 0:
       dofs[0] = 1;
       dofs[1] = 2;
+      dofs[2] = 3;
+      dofs[3] = 7;
+      dofs[4] = 8;
+      dofs[5] = 9;
+      break;
+    case 1:
+      dofs[0] = 0;
+      dofs[1] = 2;
       dofs[2] = 4;
-      dofs[3] = 5;
-      break;
-    case 1:
-      dofs[0] = 0;
-      dofs[1] = 2;
-      dofs[2] = 3;
-      dofs[3] = 5;
+      dofs[3] = 6;
+      dofs[4] = 8;
+      dofs[5] = 10;
       break;
     case 2:
       dofs[0] = 0;
       dofs[1] = 1;
-      dofs[2] = 3;
-      dofs[3] = 4;
+      dofs[2] = 5;
+      dofs[3] = 6;
+      dofs[4] = 7;
+      dofs[5] = 11;
       break;
     }
 }
@@ -14792,12 +16258,24 @@ void UFC_SolitaryWave2DLinearForm_dof_ma
     coordinates[1][1] = x[1][1];
     coordinates[2][0] = x[2][0];
     coordinates[2][1] = x[2][1];
-    coordinates[3][0] = x[0][0];
-    coordinates[3][1] = x[0][1];
-    coordinates[4][0] = x[1][0];
-    coordinates[4][1] = x[1][1];
-    coordinates[5][0] = x[2][0];
-    coordinates[5][1] = x[2][1];
+    coordinates[3][0] = 0.5*x[1][0] + 0.5*x[2][0];
+    coordinates[3][1] = 0.5*x[1][1] + 0.5*x[2][1];
+    coordinates[4][0] = 0.5*x[0][0] + 0.5*x[2][0];
+    coordinates[4][1] = 0.5*x[0][1] + 0.5*x[2][1];
+    coordinates[5][0] = 0.5*x[0][0] + 0.5*x[1][0];
+    coordinates[5][1] = 0.5*x[0][1] + 0.5*x[1][1];
+    coordinates[6][0] = x[0][0];
+    coordinates[6][1] = x[0][1];
+    coordinates[7][0] = x[1][0];
+    coordinates[7][1] = x[1][1];
+    coordinates[8][0] = x[2][0];
+    coordinates[8][1] = x[2][1];
+    coordinates[9][0] = 0.5*x[1][0] + 0.5*x[2][0];
+    coordinates[9][1] = 0.5*x[1][1] + 0.5*x[2][1];
+    coordinates[10][0] = 0.5*x[0][0] + 0.5*x[2][0];
+    coordinates[10][1] = 0.5*x[0][1] + 0.5*x[2][1];
+    coordinates[11][0] = 0.5*x[0][0] + 0.5*x[1][0];
+    coordinates[11][1] = 0.5*x[0][1] + 0.5*x[1][1];
 }
 
 /// Return the number of sub dof maps (for a mixed element)
@@ -15580,49 +17058,70 @@ void UFC_SolitaryWave2DLinearForm_cell_i
     
     
     // Array of quadrature weights
-    const static double W4[4] = {0.159020690871988, 0.0909793091280113, 0.159020690871988, 0.0909793091280113};
-    
-    
-    const static double FE1_C0[4][3] = \
-    {{0.666390246014701, 0.178558728263616, 0.155051025721682},
-    {0.280019915499074, 0.0750311102226082, 0.644948974278318},
-    {0.178558728263616, 0.666390246014701, 0.155051025721682},
-    {0.0750311102226081, 0.280019915499074, 0.644948974278318}};
-    // Array of non-zero columns
-    static const unsigned int nzc0[3] = {0, 1, 2};
-    // Array of non-zero columns
-    static const unsigned int nzc3[3] = {3, 4, 5};
-    
-    const static double FE1_C1_D01[4][2] = \
-    {{-1, 1},
-    {-1, 1},
-    {-1, 1},
-    {-1, 1}};
-    // Array of non-zero columns
-    static const unsigned int nzc1[2] = {3, 5};
-    // Array of non-zero columns
-    static const unsigned int nzc2[2] = {3, 4};
-    // Array of non-zero columns
-    static const unsigned int nzc4[2] = {0, 2};
-    // Array of non-zero columns
-    static const unsigned int nzc5[2] = {0, 1};
+    const static double W9[9] = {0.0558144204830443, 0.063678085099885, 0.0193963833059595, 0.0893030727728709, 0.101884936159816, 0.0310342132895351, 0.0558144204830443, 0.063678085099885, 0.0193963833059595};
+    
+    
+    const static double FE0_C1_D01[9][5] = \
+    {{-2.23477754271068, -0.645648161949184, 0.410870619238505, 2.88042570465986, -0.410870619238505},
+    {-1.0959162708804, 0.63786745776294, 0.266216271356658, 0.458048813117464, -0.266216271356658},
+    {0.246362376191711, 2.15063784704339, 0.0957245291483235, -2.3970002232351, -0.0957245291483225},
+    {-0.822824080974591, -0.645648161949185, 1.82282408097459, 1.46847224292378, -1.82282408097459},
+    {-0.18106627111853, 0.637867457762939, 1.18106627111853, -0.456801186644408, -1.18106627111853},
+    {0.575318923521695, 2.15063784704339, 0.424681076478307, -2.72595677056508, -0.424681076478306},
+    {0.589129380761496, -0.645648161949184, 3.23477754271068, 0.0565187811876888, -3.23477754271068},
+    {0.733783728643343, 0.637867457762939, 2.0959162708804, -1.37165118640628, -2.0959162708804},
+    {0.904275470851678, 2.15063784704339, 0.75363762380829, -3.05491331789507, -0.753637623808289}};
+    // Array of non-zero columns
+    static const unsigned int nzc0[5] = {6, 8, 9, 10, 11};
+    // Array of non-zero columns
+    static const unsigned int nzc3[5] = {0, 2, 3, 4, 5};
+    
+    const static double FE0_C1_D10[9][5] = \
+    {{-2.23477754271068, -0.589129380761495, 0.354351838050815, -0.354351838050815, 2.82390692347217},
+    {-1.0959162708804, -0.733783728643342, 1.63786745776294, -1.63786745776294, 1.82969999952375},
+    {0.246362376191711, -0.904275470851678, 3.15063784704339, -3.15063784704339, 0.657913094659967},
+    {-0.822824080974592, 0.822824080974592, 0.354351838050816, -0.354351838050816, 0},
+    {-0.18106627111853, 0.181066271118531, 1.63786745776294, -1.63786745776294, 0},
+    {0.575318923521695, -0.575318923521694, 3.15063784704339, -3.15063784704339, 0},
+    {0.589129380761495, 2.23477754271068, 0.354351838050816, -0.354351838050816, -2.82390692347217},
+    {0.733783728643342, 1.0959162708804, 1.63786745776294, -1.63786745776294, -1.82969999952375},
+    {0.904275470851678, -0.246362376191711, 3.15063784704339, -3.15063784704339, -0.657913094659967}};
+    // Array of non-zero columns
+    static const unsigned int nzc1[5] = {6, 7, 9, 10, 11};
+    // Array of non-zero columns
+    static const unsigned int nzc2[5] = {0, 1, 3, 4, 5};
+    
+    const static double FE0_C1[9][6] = \
+    {{0.499278833175498, -0.0816158215904472, -0.072892306371455, 0.0363981897820602, 0.286562341986258, 0.332268763018087},
+    {0.0251290590975511, -0.0576951799472843, -0.0741406382908807, 0.109006741895515, 0.858208263567716, 0.139491753677383},
+    {-0.117413197449647, -0.0227857341019971, 0.453155393641927, 0.0753983311062782, 0.593609805131561, 0.0180354016718773},
+    {-0.0403700664710398, -0.0403700664710398, -0.072892306371455, 0.161480265884159, 0.161480265884159, 0.830671907545216},
+    {-0.120901875682904, -0.120901875682904, -0.0741406382908807, 0.483607502731615, 0.483607502731615, 0.348729384193458},
+    {-0.0836260170297299, -0.0836260170297299, 0.453155393641927, 0.33450406811892, 0.33450406811892, 0.0450885041796933},
+    {-0.0816158215904472, 0.499278833175498, -0.072892306371455, 0.286562341986258, 0.0363981897820602, 0.332268763018087},
+    {-0.0576951799472842, 0.0251290590975512, -0.0741406382908807, 0.858208263567716, 0.109006741895515, 0.139491753677383},
+    {-0.0227857341019971, -0.117413197449647, 0.453155393641927, 0.593609805131561, 0.0753983311062783, 0.0180354016718774}};
+    // Array of non-zero columns
+    static const unsigned int nzc4[6] = {6, 7, 8, 9, 10, 11};
+    // Array of non-zero columns
+    static const unsigned int nzc5[6] = {0, 1, 2, 3, 4, 5};
     
     // Number of operations to compute geometry constants: 21
-    const double G0 = det*(Jinv_00*Jinv_10 + Jinv_01*Jinv_11);
-    const double G1 = det*(Jinv_10*Jinv_10 + Jinv_11*Jinv_11);
-    const double G2 =  - Jinv_11*det;
-    const double G3 =  - 0.5*det*w[1][0]*w[2][0];
-    const double G4 = det*w[2][0];
+    const double G0 =  - Jinv_11*det;
+    const double G1 = det*(Jinv_00*Jinv_10 + Jinv_01*Jinv_11);
+    const double G2 = det*(Jinv_10*Jinv_10 + Jinv_11*Jinv_11);
+    const double G3 = det*w[2][0];
+    const double G4 =  - Jinv_01*det;
     const double G5 = det*(Jinv_00*Jinv_00 + Jinv_01*Jinv_01);
-    const double G6 =  - Jinv_01*det;
+    const double G6 =  - 0.5*det*w[1][0]*w[2][0];
     
     // Compute element tensor using UFL quadrature representation
     // Optimisations: ('simplify expressions', True), ('ignore zero tables', True), ('non zero columns', True), ('remove zero terms', True), ('ignore ones', True)
-    // Total number of operations to compute element tensor: 269
+    // Total number of operations to compute element tensor: 1011
     
     // Loop quadrature points for integral
-    // Number of operations to compute element tensor for following IP loop = 248
-    for (unsigned int ip = 0; ip < 4; ip++)
+    // Number of operations to compute element tensor for following IP loop = 990
+    for (unsigned int ip = 0; ip < 9; ip++)
     {
       
       // Function declarations
@@ -15631,50 +17130,50 @@ void UFC_SolitaryWave2DLinearForm_cell_i
       double F2 = 0;
       double F3 = 0;
       
-      // Total number of operations to compute function values = 8
-      for (unsigned int r = 0; r < 2; r++)
-      {
-        F2 += FE1_C1_D01[ip][r]*w[0][nzc5[r]];
-        F3 += FE1_C1_D01[ip][r]*w[0][nzc4[r]];
+      // Total number of operations to compute function values = 20
+      for (unsigned int r = 0; r < 5; r++)
+      {
+        F2 += FE0_C1_D10[ip][r]*w[0][nzc2[r]];
+        F3 += FE0_C1_D01[ip][r]*w[0][nzc3[r]];
       }// end loop over 'r'
       
-      // Total number of operations to compute function values = 12
-      for (unsigned int r = 0; r < 3; r++)
-      {
-        F0 += FE1_C0[ip][r]*w[0][nzc3[r]];
-        F1 += FE1_C0[ip][r]*w[0][nzc0[r]];
+      // Total number of operations to compute function values = 24
+      for (unsigned int r = 0; r < 6; r++)
+      {
+        F0 += FE0_C1[ip][r]*w[0][nzc4[r]];
+        F1 += FE0_C1[ip][r]*w[0][nzc5[r]];
       }// end loop over 'r'
       
       // Number of operations to compute ip constants: 22
       // Number of operations: 8
-      const double Gip0 = F0*F0*F0*W4[ip]*(G2 + F2*G0 + F3*G1);
+      const double Gip0 = F0*F0*F0*W9[ip]*(G0 + F2*G1 + F3*G2);
+      
+      // Number of operations: 2
+      const double Gip1 = F1*W9[ip]*G3;
+      
+      // Number of operations: 8
+      const double Gip2 = F0*F0*F0*W9[ip]*(G4 + F2*G5 + F3*G1);
       
       // Number of operations: 4
-      const double Gip1 = W4[ip]*(F0*det + F1*G3);
-      
-      // Number of operations: 2
-      const double Gip2 = F1*W4[ip]*G4;
-      
-      // Number of operations: 8
-      const double Gip3 = F0*F0*F0*W4[ip]*(G6 + F2*G5 + F3*G0);
-      
-      
-      // Number of operations for primary indices = 12
-      for (unsigned int j = 0; j < 3; j++)
+      const double Gip3 = W9[ip]*(F0*det + F1*G6);
+      
+      
+      // Number of operations for primary indices = 20
+      for (unsigned int j = 0; j < 5; j++)
       {
         // Number of operations to compute entry = 2
-        A[nzc3[j]] += FE1_C0[ip][j]*Gip1;
+        A[nzc3[j]] += FE0_C1_D01[ip][j]*Gip0;
         // Number of operations to compute entry = 2
-        A[nzc0[j]] += FE1_C0[ip][j]*Gip2;
+        A[nzc2[j]] += FE0_C1_D10[ip][j]*Gip2;
       }// end loop over 'j'
       
-      // Number of operations for primary indices = 8
-      for (unsigned int j = 0; j < 2; j++)
+      // Number of operations for primary indices = 24
+      for (unsigned int j = 0; j < 6; j++)
       {
         // Number of operations to compute entry = 2
-        A[nzc4[j]] += FE1_C1_D01[ip][j]*Gip0;
+        A[nzc5[j]] += FE0_C1[ip][j]*Gip1;
         // Number of operations to compute entry = 2
-        A[nzc5[j]] += FE1_C1_D01[ip][j]*Gip3;
+        A[nzc4[j]] += FE0_C1[ip][j]*Gip3;
       }// end loop over 'j'
     }// end loop over 'ip'
 }
@@ -15703,6 +17202,12 @@ void UFC_SolitaryWave2DLinearForm_cell_i
     A[3] = 0;
     A[4] = 0;
     A[5] = 0;
+    A[6] = 0;
+    A[7] = 0;
+    A[8] = 0;
+    A[9] = 0;
+    A[10] = 0;
+    A[11] = 0;
     
     // Add all contributions to element tensor
     integral_0_quadrature.tabulate_tensor(A, w, c);
@@ -15749,24 +17254,25 @@ void UFC_SolitaryWave2DLinearForm_exteri
     
     
     // Array of quadrature weights
-    const static double W2[2] = {0.5, 0.5};
-    
-    
-    const static double FE1_f0_C0[2][2] = \
-    {{0.788675134594813, 0.211324865405187},
-    {0.211324865405187, 0.788675134594813}};
-    // Array of non-zero columns
-    static const unsigned int nzc2[2] = {1, 2};
-    // Array of non-zero columns
-    static const unsigned int nzc3[2] = {4, 5};
-    // Array of non-zero columns
-    static const unsigned int nzc4[2] = {0, 1};
-    // Array of non-zero columns
-    static const unsigned int nzc5[2] = {3, 4};
-    // Array of non-zero columns
-    static const unsigned int nzc6[2] = {3, 5};
-    // Array of non-zero columns
-    static const unsigned int nzc7[2] = {0, 2};
+    const static double W3[3] = {0.277777777777778, 0.444444444444444, 0.277777777777778};
+    
+    
+    const static double FE0_f0_C1[3][3] = \
+    {{0.687298334620742, -0.0872983346207417, 0.4},
+    {0, 0, 1},
+    {-0.0872983346207417, 0.687298334620742, 0.4}};
+    // Array of non-zero columns
+    static const unsigned int nzc0[3] = {7, 8, 9};
+    // Array of non-zero columns
+    static const unsigned int nzc1[3] = {1, 2, 3};
+    // Array of non-zero columns
+    static const unsigned int nzc2[3] = {6, 7, 11};
+    // Array of non-zero columns
+    static const unsigned int nzc3[3] = {0, 1, 5};
+    // Array of non-zero columns
+    static const unsigned int nzc6[3] = {0, 2, 4};
+    // Array of non-zero columns
+    static const unsigned int nzc7[3] = {6, 8, 10};
     
     // Number of operations to compute geometry constants: 1
     // Should be added to total operation count.
@@ -15778,96 +17284,96 @@ void UFC_SolitaryWave2DLinearForm_exteri
     {
     case 0:
       {
-      // Total number of operations to compute element tensor (from this point): 24
+      // Total number of operations to compute element tensor (from this point): 48
       
       // Loop quadrature points for integral
-      // Number of operations to compute element tensor for following IP loop = 24
-      for (unsigned int ip = 0; ip < 2; ip++)
+      // Number of operations to compute element tensor for following IP loop = 48
+      for (unsigned int ip = 0; ip < 3; ip++)
       {
         
         // Function declarations
         double F0 = 0;
         
-        // Total number of operations to compute function values = 4
-        for (unsigned int r = 0; r < 2; r++)
-        {
-          F0 += FE1_f0_C0[ip][r]*w[0][nzc3[r]];
+        // Total number of operations to compute function values = 6
+        for (unsigned int r = 0; r < 3; r++)
+        {
+          F0 += FE0_f0_C1[ip][r]*w[0][nzc0[r]];
         }// end loop over 'r'
         
         // Number of operations to compute ip constants: 4
         // Number of operations: 4
-        const double Gip0 = F0*F0*F0*W2[ip]*G0;
-        
-        
-        // Number of operations for primary indices = 4
-        for (unsigned int j = 0; j < 2; j++)
+        const double Gip0 = F0*F0*F0*W3[ip]*G0;
+        
+        
+        // Number of operations for primary indices = 6
+        for (unsigned int j = 0; j < 3; j++)
         {
           // Number of operations to compute entry = 2
-          A[nzc2[j]] += FE1_f0_C0[ip][j]*Gip0;
+          A[nzc1[j]] += FE0_f0_C1[ip][j]*Gip0;
         }// end loop over 'j'
       }// end loop over 'ip'
       }
       break;
     case 1:
       {
-      // Total number of operations to compute element tensor (from this point): 24
+      // Total number of operations to compute element tensor (from this point): 48
       
       // Loop quadrature points for integral
-      // Number of operations to compute element tensor for following IP loop = 24
-      for (unsigned int ip = 0; ip < 2; ip++)
+      // Number of operations to compute element tensor for following IP loop = 48
+      for (unsigned int ip = 0; ip < 3; ip++)
       {
         
         // Function declarations
         double F0 = 0;
         
-        // Total number of operations to compute function values = 4
-        for (unsigned int r = 0; r < 2; r++)
-        {
-          F0 += FE1_f0_C0[ip][r]*w[0][nzc6[r]];
+        // Total number of operations to compute function values = 6
+        for (unsigned int r = 0; r < 3; r++)
+        {
+          F0 += FE0_f0_C1[ip][r]*w[0][nzc7[r]];
         }// end loop over 'r'
         
         // Number of operations to compute ip constants: 4
         // Number of operations: 4
-        const double Gip0 = F0*F0*F0*W2[ip]*G0;
-        
-        
-        // Number of operations for primary indices = 4
-        for (unsigned int j = 0; j < 2; j++)
+        const double Gip0 = F0*F0*F0*W3[ip]*G0;
+        
+        
+        // Number of operations for primary indices = 6
+        for (unsigned int j = 0; j < 3; j++)
         {
           // Number of operations to compute entry = 2
-          A[nzc7[j]] += FE1_f0_C0[ip][j]*Gip0;
+          A[nzc6[j]] += FE0_f0_C1[ip][j]*Gip0;
         }// end loop over 'j'
       }// end loop over 'ip'
       }
       break;
     case 2:
       {
-      // Total number of operations to compute element tensor (from this point): 24
+      // Total number of operations to compute element tensor (from this point): 48
       
       // Loop quadrature points for integral
-      // Number of operations to compute element tensor for following IP loop = 24
-      for (unsigned int ip = 0; ip < 2; ip++)
+      // Number of operations to compute element tensor for following IP loop = 48
+      for (unsigned int ip = 0; ip < 3; ip++)
       {
         
         // Function declarations
         double F0 = 0;
         
-        // Total number of operations to compute function values = 4
-        for (unsigned int r = 0; r < 2; r++)
-        {
-          F0 += FE1_f0_C0[ip][r]*w[0][nzc5[r]];
+        // Total number of operations to compute function values = 6
+        for (unsigned int r = 0; r < 3; r++)
+        {
+          F0 += FE0_f0_C1[ip][r]*w[0][nzc2[r]];
         }// end loop over 'r'
         
         // Number of operations to compute ip constants: 4
         // Number of operations: 4
-        const double Gip0 = F0*F0*F0*W2[ip]*G0;
-        
-        
-        // Number of operations for primary indices = 4
-        for (unsigned int j = 0; j < 2; j++)
+        const double Gip0 = F0*F0*F0*W3[ip]*G0;
+        
+        
+        // Number of operations for primary indices = 6
+        for (unsigned int j = 0; j < 3; j++)
         {
           // Number of operations to compute entry = 2
-          A[nzc4[j]] += FE1_f0_C0[ip][j]*Gip0;
+          A[nzc3[j]] += FE0_f0_C1[ip][j]*Gip0;
         }// end loop over 'j'
       }// end loop over 'ip'
       }
@@ -15900,6 +17406,12 @@ void UFC_SolitaryWave2DLinearForm_exteri
     A[3] = 0;
     A[4] = 0;
     A[5] = 0;
+    A[6] = 0;
+    A[7] = 0;
+    A[8] = 0;
+    A[9] = 0;
+    A[10] = 0;
+    A[11] = 0;
     
     // Add all contributions to element tensor
     integral_0_quadrature.tabulate_tensor(A, w, c, facet);
@@ -15920,7 +17432,7 @@ UFC_SolitaryWave2DLinearForm::~UFC_Solit
 /// Return a string identifying the form
 const char* UFC_SolitaryWave2DLinearForm::signature() const
 {
-    return "Form([Integral(Sum(Product(Indexed(BasisFunction(MixedElement(*[FiniteElement('Lagrange', Cell('triangle', 1), 1), FiniteElement('Lagrange', Cell('triangle', 1), 1)], **{'value_shape': (2,) }), 0), MultiIndex((FixedIndex(1),))), Sum(Indexed(Function(MixedElement(*[FiniteElement('Lagrange', Cell('triangle', 1), 1), FiniteElement('Lagrange', Cell('triangle', 1), 1)], **{'value_shape': (2,) }), 0), MultiIndex((FixedIndex(1),))), Product(IntValue(-1, (), (), {}), Product(Indexed(Function(MixedElement(*[FiniteElement('Lagrange', Cell('triangle', 1), 1), FiniteElement('Lagrange', Cell('triangle', 1), 1)], **{'value_shape': (2,) }), 0), MultiIndex((FixedIndex(0),))), Product(Constant(Cell('triangle', 1), 2), Product(FloatValue(0.5, (), (), {}), Constant(Cell('triangle', 1), 1))))))), Sum(Product(IntValue(-1, (), (), {}), Product(Indexed(SpatialDerivative(BasisFunction(MixedElement(*[FiniteElement('Lagrange', Cell('triangle', 1), 1), FiniteElement('Lagrange', Cell('triangle', 1), 1)], **{'value_shape': (2,) }), 0), MultiIndex((FixedIndex(1),))), MultiIndex((FixedIndex(0),))), Product(Indexed(Function(MixedElement(*[FiniteElement('Lagrange', Cell('triangle', 1), 1), FiniteElement('Lagrange', Cell('triangle', 1), 1)], **{'value_shape': (2,) }), 0), MultiIndex((FixedIndex(1),))), Power(Indexed(Function(MixedElement(*[FiniteElement('Lagrange', Cell('triangle', 1), 1), FiniteElement('Lagrange', Cell('triangle', 1), 1)], **{'value_shape': (2,) }), 0), MultiIndex((FixedIndex(1),))), IntValue(2, (), (), {}))))), Sum(Product(IndexSum(Product(Indexed(ComponentTensor(Indexed(SpatialDerivative(BasisFunction(MixedElement(*[FiniteElement('Lagrange', Cell('triangle', 1), 1), FiniteElement('Lagrange', Cell('triangle', 1), 1)], **{'value_shape': (2,) }), 0), MultiIndex((Index(0),))), MultiIndex((FixedIndex(0),))), MultiIndex((Index(0),))), MultiIndex((Index(1),))), Indexed(ComponentTensor(Indexed(SpatialDerivative(Function(MixedElement(*[FiniteElement('Lagrange', Cell('triangle', 1), 1), FiniteElement('Lagrange', Cell('triangle', 1), 1)], **{'value_shape': (2,) }), 0), MultiIndex((Index(2),))), MultiIndex((FixedIndex(0),))), MultiIndex((Index(2),))), MultiIndex((Index(1),)))), MultiIndex((Index(1),))), Product(Indexed(Function(MixedElement(*[FiniteElement('Lagrange', Cell('triangle', 1), 1), FiniteElement('Lagrange', Cell('triangle', 1), 1)], **{'value_shape': (2,) }), 0), MultiIndex((FixedIndex(1),))), Power(Indexed(Function(MixedElement(*[FiniteElement('Lagrange', Cell('triangle', 1), 1), FiniteElement('Lagrange', Cell('triangle', 1), 1)], **{'value_shape': (2,) }), 0), MultiIndex((FixedIndex(1),))), IntValue(2, (), (), {})))), Product(Indexed(Function(MixedElement(*[FiniteElement('Lagrange', Cell('triangle', 1), 1), FiniteElement('Lagrange', Cell('triangle', 1), 1)], **{'value_shape': (2,) }), 0), MultiIndex((FixedIndex(0),))), Product(Constant(Cell('triangle', 1), 2), Indexed(BasisFunction(MixedElement(*[FiniteElement('Lagrange', Cell('triangle', 1), 1), FiniteElement('Lagrange', Cell('triangle', 1), 1)], **{'value_shape': (2,) }), 0), MultiIndex((FixedIndex(0),)))))))), Measure('cell', 0, {'ffc_representation': 'quadrature', 'quadrature_order': 2})), Integral(Product(Indexed(VectorConstant(Cell('triangle', 1), 2, 3), MultiIndex((FixedIndex(1),))), Product(Indexed(BasisFunction(MixedElement(*[FiniteElement('Lagrange', Cell('triangle', 1), 1), FiniteElement('Lagrange', Cell('triangle', 1), 1)], **{'value_shape': (2,) }), 0), MultiIndex((FixedIndex(0),))), Product(Indexed(Function(MixedElement(*[FiniteElement('Lagrange', Cell('triangle', 1), 1), FiniteElement('Lagrange', Cell('triangle', 1), 1)], **{'value_shape': (2,) }), 0), MultiIndex((FixedIndex(1),))), Power(Indexed(Function(MixedElement(*[FiniteElement('Lagrange', Cell('triangle', 1), 1), FiniteElement('Lagrange', Cell('triangle', 1), 1)], **{'value_shape': (2,) }), 0), MultiIndex((FixedIndex(1),))), IntValue(2, (), (), {}))))), Measure('exterior_facet', 0, {'ffc_representation': 'quadrature', 'quadrature_order': 2}))])";
+    return "Form([Integral(Sum(Product(Indexed(BasisFunction(MixedElement(*[FiniteElement('Lagrange', Cell('triangle', 1), 2), FiniteElement('Lagrange', Cell('triangle', 1), 2)], **{'value_shape': (2,) }), 0), MultiIndex((FixedIndex(1),))), Sum(Indexed(Function(MixedElement(*[FiniteElement('Lagrange', Cell('triangle', 1), 2), FiniteElement('Lagrange', Cell('triangle', 1), 2)], **{'value_shape': (2,) }), 0), MultiIndex((FixedIndex(1),))), Product(IntValue(-1, (), (), {}), Product(Indexed(Function(MixedElement(*[FiniteElement('Lagrange', Cell('triangle', 1), 2), FiniteElement('Lagrange', Cell('triangle', 1), 2)], **{'value_shape': (2,) }), 0), MultiIndex((FixedIndex(0),))), Product(Constant(Cell('triangle', 1), 2), Product(FloatValue(0.5, (), (), {}), Constant(Cell('triangle', 1), 1))))))), Sum(Product(IntValue(-1, (), (), {}), Product(Indexed(SpatialDerivative(BasisFunction(MixedElement(*[FiniteElement('Lagrange', Cell('triangle', 1), 2), FiniteElement('Lagrange', Cell('triangle', 1), 2)], **{'value_shape': (2,) }), 0), MultiIndex((FixedIndex(1),))), MultiIndex((FixedIndex(0),))), Product(Indexed(Function(MixedElement(*[FiniteElement('Lagrange', Cell('triangle', 1), 2), FiniteElement('Lagrange', Cell('triangle', 1), 2)], **{'value_shape': (2,) }), 0), MultiIndex((FixedIndex(1),))), Power(Indexed(Function(MixedElement(*[FiniteElement('Lagrange', Cell('triangle', 1), 2), FiniteElement('Lagrange', Cell('triangle', 1), 2)], **{'value_shape': (2,) }), 0), MultiIndex((FixedIndex(1),))), IntValue(2, (), (), {}))))), Sum(Product(IndexSum(Product(Indexed(ComponentTensor(Indexed(SpatialDerivative(BasisFunction(MixedElement(*[FiniteElement('Lagrange', Cell('triangle', 1), 2), FiniteElement('Lagrange', Cell('triangle', 1), 2)], **{'value_shape': (2,) }), 0), MultiIndex((Index(0),))), MultiIndex((FixedIndex(0),))), MultiIndex((Index(0),))), MultiIndex((Index(1),))), Indexed(ComponentTensor(Indexed(SpatialDerivative(Function(MixedElement(*[FiniteElement('Lagrange', Cell('triangle', 1), 2), FiniteElement('Lagrange', Cell('triangle', 1), 2)], **{'value_shape': (2,) }), 0), MultiIndex((Index(2),))), MultiIndex((FixedIndex(0),))), MultiIndex((Index(2),))), MultiIndex((Index(1),)))), MultiIndex((Index(1),))), Product(Indexed(Function(MixedElement(*[FiniteElement('Lagrange', Cell('triangle', 1), 2), FiniteElement('Lagrange', Cell('triangle', 1), 2)], **{'value_shape': (2,) }), 0), MultiIndex((FixedIndex(1),))), Power(Indexed(Function(MixedElement(*[FiniteElement('Lagrange', Cell('triangle', 1), 2), FiniteElement('Lagrange', Cell('triangle', 1), 2)], **{'value_shape': (2,) }), 0), MultiIndex((FixedIndex(1),))), IntValue(2, (), (), {})))), Product(Indexed(Function(MixedElement(*[FiniteElement('Lagrange', Cell('triangle', 1), 2), FiniteElement('Lagrange', Cell('triangle', 1), 2)], **{'value_shape': (2,) }), 0), MultiIndex((FixedIndex(0),))), Product(Constant(Cell('triangle', 1), 2), Indexed(BasisFunction(MixedElement(*[FiniteElement('Lagrange', Cell('triangle', 1), 2), FiniteElement('Lagrange', Cell('triangle', 1), 2)], **{'value_shape': (2,) }), 0), MultiIndex((FixedIndex(0),)))))))), Measure('cell', 0, {'ffc_representation': 'quadrature', 'quadrature_order': 4})), Integral(Product(Indexed(VectorConstant(Cell('triangle', 1), 2, 3), MultiIndex((FixedIndex(1),))), Product(Indexed(BasisFunction(MixedElement(*[FiniteElement('Lagrange', Cell('triangle', 1), 2), FiniteElement('Lagrange', Cell('triangle', 1), 2)], **{'value_shape': (2,) }), 0), MultiIndex((FixedIndex(0),))), Product(Indexed(Function(MixedElement(*[FiniteElement('Lagrange', Cell('triangle', 1), 2), FiniteElement('Lagrange', Cell('triangle', 1), 2)], **{'value_shape': (2,) }), 0), MultiIndex((FixedIndex(1),))), Power(Indexed(Function(MixedElement(*[FiniteElement('Lagrange', Cell('triangle', 1), 2), FiniteElement('Lagrange', Cell('triangle', 1), 2)], **{'value_shape': (2,) }), 0), MultiIndex((FixedIndex(1),))), IntValue(2, (), (), {}))))), Measure('exterior_facet', 0, {'ffc_representation': 'quadrature', 'quadrature_order': 4}))])";
 }
 
 /// Return the rank of the global tensor (r)
diff -r d848f74fedd2 -r 78b5d545a3d7 MADDs-4/cpp/SolitaryWave2D.ufl
--- a/MADDs-4/cpp/SolitaryWave2D.ufl	Fri Dec 04 21:18:03 2009 -0500
+++ b/MADDs-4/cpp/SolitaryWave2D.ufl	Sat Dec 05 00:43:06 2009 -0500
@@ -1,1 +1,1 @@ forms/SolitaryWave2D_n3m0_P1.ufl
-forms/SolitaryWave2D_n3m0_P1.ufl
\ No newline at end of file
+forms/SolitaryWave2D_n3m0_P2.ufl
\ No newline at end of file
diff -r d848f74fedd2 -r 78b5d545a3d7 MADDs-4/cpp/SolitaryWave3D.cpp
--- a/MADDs-4/cpp/SolitaryWave3D.cpp	Fri Dec 04 21:18:03 2009 -0500
+++ b/MADDs-4/cpp/SolitaryWave3D.cpp	Sat Dec 05 00:43:06 2009 -0500
@@ -15,7 +15,7 @@ UFC_SolitaryWave3DBilinearForm_finite_el
 /// Return a string identifying the finite element
 const char* UFC_SolitaryWave3DBilinearForm_finite_element_0_0::signature() const
 {
-    return "FiniteElement('Lagrange', 'tetrahedron', 1)";
+    return "FiniteElement('Lagrange', 'tetrahedron', 2)";
 }
 
 /// Return the cell shape
@@ -27,7 +27,7 @@ ufc::shape UFC_SolitaryWave3DBilinearFor
 /// Return the dimension of the finite element function space
 unsigned int UFC_SolitaryWave3DBilinearForm_finite_element_0_0::space_dimension() const
 {
-    return 4;
+    return 10;
 }
 
 /// Return the rank of the value space
@@ -118,45 +118,75 @@ void UFC_SolitaryWave3DBilinearForm_fini
     // Generate scalings
     const double scalings_y_0 = 1;
     const double scalings_y_1 = scalings_y_0*(0.5 - 0.5*y);
+    const double scalings_y_2 = scalings_y_1*(0.5 - 0.5*y);
     const double scalings_z_0 = 1;
     const double scalings_z_1 = scalings_z_0*(0.5 - 0.5*z);
+    const double scalings_z_2 = scalings_z_1*(0.5 - 0.5*z);
     
     // Compute psitilde_a
     const double psitilde_a_0 = 1;
     const double psitilde_a_1 = x;
+    const double psitilde_a_2 = 1.5*x*psitilde_a_1 - 0.5*psitilde_a_0;
     
     // Compute psitilde_bs
     const double psitilde_bs_0_0 = 1;
     const double psitilde_bs_0_1 = 1.5*y + 0.5;
+    const double psitilde_bs_0_2 = 0.111111111111111*psitilde_bs_0_1 + 1.66666666666667*y*psitilde_bs_0_1 - 0.555555555555556*psitilde_bs_0_0;
     const double psitilde_bs_1_0 = 1;
+    const double psitilde_bs_1_1 = 2.5*y + 1.5;
+    const double psitilde_bs_2_0 = 1;
     
     // Compute psitilde_cs
     const double psitilde_cs_00_0 = 1;
     const double psitilde_cs_00_1 = 2*z + 1;
+    const double psitilde_cs_00_2 = 0.3125*psitilde_cs_00_1 + 1.875*z*psitilde_cs_00_1 - 0.5625*psitilde_cs_00_0;
     const double psitilde_cs_01_0 = 1;
+    const double psitilde_cs_01_1 = 3*z + 2;
+    const double psitilde_cs_02_0 = 1;
     const double psitilde_cs_10_0 = 1;
+    const double psitilde_cs_10_1 = 3*z + 2;
+    const double psitilde_cs_11_0 = 1;
+    const double psitilde_cs_20_0 = 1;
     
     // Compute basisvalues
     const double basisvalue0 = 0.866025403784439*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_0;
     const double basisvalue1 = 2.73861278752583*psitilde_a_1*scalings_y_1*psitilde_bs_1_0*scalings_z_1*psitilde_cs_10_0;
     const double basisvalue2 = 1.58113883008419*psitilde_a_0*scalings_y_0*psitilde_bs_0_1*scalings_z_1*psitilde_cs_01_0;
     const double basisvalue3 = 1.11803398874989*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_1;
-    
-    // Table(s) of coefficients
-    const static double coefficients0[4][4] = \
-    {{0.288675134594813, -0.182574185835055, -0.105409255338946, -0.074535599249993},
-    {0.288675134594813, 0.182574185835055, -0.105409255338946, -0.074535599249993},
-    {0.288675134594813, 0, 0.210818510677892, -0.074535599249993},
-    {0.288675134594813, 0, 0, 0.223606797749979}};
+    const double basisvalue4 = 5.1234753829798*psitilde_a_2*scalings_y_2*psitilde_bs_2_0*scalings_z_2*psitilde_cs_20_0;
+    const double basisvalue5 = 3.96862696659689*psitilde_a_1*scalings_y_1*psitilde_bs_1_1*scalings_z_2*psitilde_cs_11_0;
+    const double basisvalue6 = 2.29128784747792*psitilde_a_0*scalings_y_0*psitilde_bs_0_2*scalings_z_2*psitilde_cs_02_0;
+    const double basisvalue7 = 3.24037034920393*psitilde_a_1*scalings_y_1*psitilde_bs_1_0*scalings_z_1*psitilde_cs_10_1;
+    const double basisvalue8 = 1.87082869338697*psitilde_a_0*scalings_y_0*psitilde_bs_0_1*scalings_z_1*psitilde_cs_01_1;
+    const double basisvalue9 = 1.3228756555323*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_2;
+    
+    // Table(s) of coefficients
+    const static double coefficients0[10][10] = \
+    {{-0.0577350269189626, -0.0608580619450185, -0.0351364184463153, -0.0248451997499977, 0.0650600048632355, 0.0503952630678969, 0.0290957186981323, 0.0411475599898912, 0.0237565548366599, 0.0167984210226323},
+    {-0.0577350269189625, 0.0608580619450185, -0.0351364184463153, -0.0248451997499977, 0.0650600048632355, -0.050395263067897, 0.0290957186981323, -0.0411475599898912, 0.0237565548366599, 0.0167984210226323},
+    {-0.0577350269189625, 0, 0.0702728368926306, -0.0248451997499977, 0, 0, 0.0872871560943969, 0, -0.0475131096733199, 0.0167984210226323},
+    {-0.0577350269189626, 0, 0, 0.074535599249993, 0, 0, 0, 0, 0, 0.100790526135794},
+    {0.23094010767585, 0, 0.140545673785261, 0.0993807989999906, 0, 0, 0, 0, 0.1187827741833, -0.0671936840905293},
+    {0.230940107675851, 0.121716123890037, -0.0702728368926306, 0.0993807989999907, 0, 0, 0, 0.102868899974728, -0.0593913870916499, -0.0671936840905293},
+    {0.23094010767585, 0.121716123890037, 0.0702728368926307, -0.0993807989999907, 0, 0.100790526135794, -0.087287156094397, -0.0205737799949456, -0.01187827741833, 0.0167984210226323},
+    {0.23094010767585, -0.121716123890037, -0.0702728368926307, 0.0993807989999906, 0, 0, 0, -0.102868899974728, -0.0593913870916499, -0.0671936840905293},
+    {0.23094010767585, -0.121716123890037, 0.0702728368926306, -0.0993807989999906, 0, -0.100790526135794, -0.0872871560943969, 0.0205737799949456, -0.01187827741833, 0.0167984210226323},
+    {0.23094010767585, 0, -0.140545673785261, -0.0993807989999906, -0.130120009726471, 0, 0.0290957186981323, 0, 0.02375655483666, 0.0167984210226323}};
     
     // Extract relevant coefficients
     const double coeff0_0 = coefficients0[dof][0];
     const double coeff0_1 = coefficients0[dof][1];
     const double coeff0_2 = coefficients0[dof][2];
     const double coeff0_3 = coefficients0[dof][3];
+    const double coeff0_4 = coefficients0[dof][4];
+    const double coeff0_5 = coefficients0[dof][5];
+    const double coeff0_6 = coefficients0[dof][6];
+    const double coeff0_7 = coefficients0[dof][7];
+    const double coeff0_8 = coefficients0[dof][8];
+    const double coeff0_9 = coefficients0[dof][9];
     
     // Compute value(s)
-    *values = coeff0_0*basisvalue0 + coeff0_1*basisvalue1 + coeff0_2*basisvalue2 + coeff0_3*basisvalue3;
+    *values = coeff0_0*basisvalue0 + coeff0_1*basisvalue1 + coeff0_2*basisvalue2 + coeff0_3*basisvalue3 + coeff0_4*basisvalue4 + coeff0_5*basisvalue5 + coeff0_6*basisvalue6 + coeff0_7*basisvalue7 + coeff0_8*basisvalue8 + coeff0_9*basisvalue9;
 }
 
 /// Evaluate all basis functions at given point in cell
@@ -304,56 +334,98 @@ void UFC_SolitaryWave3DBilinearForm_fini
     // Generate scalings
     const double scalings_y_0 = 1;
     const double scalings_y_1 = scalings_y_0*(0.5 - 0.5*y);
+    const double scalings_y_2 = scalings_y_1*(0.5 - 0.5*y);
     const double scalings_z_0 = 1;
     const double scalings_z_1 = scalings_z_0*(0.5 - 0.5*z);
+    const double scalings_z_2 = scalings_z_1*(0.5 - 0.5*z);
     
     // Compute psitilde_a
     const double psitilde_a_0 = 1;
     const double psitilde_a_1 = x;
+    const double psitilde_a_2 = 1.5*x*psitilde_a_1 - 0.5*psitilde_a_0;
     
     // Compute psitilde_bs
     const double psitilde_bs_0_0 = 1;
     const double psitilde_bs_0_1 = 1.5*y + 0.5;
+    const double psitilde_bs_0_2 = 0.111111111111111*psitilde_bs_0_1 + 1.66666666666667*y*psitilde_bs_0_1 - 0.555555555555556*psitilde_bs_0_0;
     const double psitilde_bs_1_0 = 1;
+    const double psitilde_bs_1_1 = 2.5*y + 1.5;
+    const double psitilde_bs_2_0 = 1;
     
     // Compute psitilde_cs
     const double psitilde_cs_00_0 = 1;
     const double psitilde_cs_00_1 = 2*z + 1;
+    const double psitilde_cs_00_2 = 0.3125*psitilde_cs_00_1 + 1.875*z*psitilde_cs_00_1 - 0.5625*psitilde_cs_00_0;
     const double psitilde_cs_01_0 = 1;
+    const double psitilde_cs_01_1 = 3*z + 2;
+    const double psitilde_cs_02_0 = 1;
     const double psitilde_cs_10_0 = 1;
+    const double psitilde_cs_10_1 = 3*z + 2;
+    const double psitilde_cs_11_0 = 1;
+    const double psitilde_cs_20_0 = 1;
     
     // Compute basisvalues
     const double basisvalue0 = 0.866025403784439*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_0;
     const double basisvalue1 = 2.73861278752583*psitilde_a_1*scalings_y_1*psitilde_bs_1_0*scalings_z_1*psitilde_cs_10_0;
     const double basisvalue2 = 1.58113883008419*psitilde_a_0*scalings_y_0*psitilde_bs_0_1*scalings_z_1*psitilde_cs_01_0;
     const double basisvalue3 = 1.11803398874989*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_1;
-    
-    // Table(s) of coefficients
-    const static double coefficients0[4][4] = \
-    {{0.288675134594813, -0.182574185835055, -0.105409255338946, -0.074535599249993},
-    {0.288675134594813, 0.182574185835055, -0.105409255338946, -0.074535599249993},
-    {0.288675134594813, 0, 0.210818510677892, -0.074535599249993},
-    {0.288675134594813, 0, 0, 0.223606797749979}};
+    const double basisvalue4 = 5.1234753829798*psitilde_a_2*scalings_y_2*psitilde_bs_2_0*scalings_z_2*psitilde_cs_20_0;
+    const double basisvalue5 = 3.96862696659689*psitilde_a_1*scalings_y_1*psitilde_bs_1_1*scalings_z_2*psitilde_cs_11_0;
+    const double basisvalue6 = 2.29128784747792*psitilde_a_0*scalings_y_0*psitilde_bs_0_2*scalings_z_2*psitilde_cs_02_0;
+    const double basisvalue7 = 3.24037034920393*psitilde_a_1*scalings_y_1*psitilde_bs_1_0*scalings_z_1*psitilde_cs_10_1;
+    const double basisvalue8 = 1.87082869338697*psitilde_a_0*scalings_y_0*psitilde_bs_0_1*scalings_z_1*psitilde_cs_01_1;
+    const double basisvalue9 = 1.3228756555323*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_2;
+    
+    // Table(s) of coefficients
+    const static double coefficients0[10][10] = \
+    {{-0.0577350269189626, -0.0608580619450185, -0.0351364184463153, -0.0248451997499977, 0.0650600048632355, 0.0503952630678969, 0.0290957186981323, 0.0411475599898912, 0.0237565548366599, 0.0167984210226323},
+    {-0.0577350269189625, 0.0608580619450185, -0.0351364184463153, -0.0248451997499977, 0.0650600048632355, -0.050395263067897, 0.0290957186981323, -0.0411475599898912, 0.0237565548366599, 0.0167984210226323},
+    {-0.0577350269189625, 0, 0.0702728368926306, -0.0248451997499977, 0, 0, 0.0872871560943969, 0, -0.0475131096733199, 0.0167984210226323},
+    {-0.0577350269189626, 0, 0, 0.074535599249993, 0, 0, 0, 0, 0, 0.100790526135794},
+    {0.23094010767585, 0, 0.140545673785261, 0.0993807989999906, 0, 0, 0, 0, 0.1187827741833, -0.0671936840905293},
+    {0.230940107675851, 0.121716123890037, -0.0702728368926306, 0.0993807989999907, 0, 0, 0, 0.102868899974728, -0.0593913870916499, -0.0671936840905293},
+    {0.23094010767585, 0.121716123890037, 0.0702728368926307, -0.0993807989999907, 0, 0.100790526135794, -0.087287156094397, -0.0205737799949456, -0.01187827741833, 0.0167984210226323},
+    {0.23094010767585, -0.121716123890037, -0.0702728368926307, 0.0993807989999906, 0, 0, 0, -0.102868899974728, -0.0593913870916499, -0.0671936840905293},
+    {0.23094010767585, -0.121716123890037, 0.0702728368926306, -0.0993807989999906, 0, -0.100790526135794, -0.0872871560943969, 0.0205737799949456, -0.01187827741833, 0.0167984210226323},
+    {0.23094010767585, 0, -0.140545673785261, -0.0993807989999906, -0.130120009726471, 0, 0.0290957186981323, 0, 0.02375655483666, 0.0167984210226323}};
     
     // Interesting (new) part
     // Tables of derivatives of the polynomial base (transpose)
-    const static double dmats0[4][4] = \
-    {{0, 0, 0, 0},
-    {6.32455532033676, 0, 0, 0},
-    {0, 0, 0, 0},
-    {0, 0, 0, 0}};
-    
-    const static double dmats1[4][4] = \
-    {{0, 0, 0, 0},
-    {3.16227766016838, 0, 0, 0},
-    {5.47722557505166, 0, 0, 0},
-    {0, 0, 0, 0}};
-    
-    const static double dmats2[4][4] = \
-    {{0, 0, 0, 0},
-    {3.16227766016838, 0, 0, 0},
-    {1.82574185835055, 0, 0, 0},
-    {5.16397779494322, 0, 0, 0}};
+    const static double dmats0[10][10] = \
+    {{0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {6.32455532033676, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {0, 11.2249721603218, 0, 0, 0, 0, 0, 0, 0, 0},
+    {4.58257569495584, 0, 8.36660026534076, -1.18321595661992, 0, 0, 0, 0, 0, 0},
+    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {3.74165738677394, 0, 0, 8.69482604771366, 0, 0, 0, 0, 0, 0},
+    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
+    
+    const static double dmats1[10][10] = \
+    {{0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {3.16227766016838, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {5.47722557505166, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {2.95803989154981, 5.61248608016091, -1.08012344973464, -0.763762615825974, 0, 0, 0, 0, 0, 0},
+    {2.29128784747792, 7.24568837309472, 4.18330013267038, -0.591607978309962, 0, 0, 0, 0, 0, 0},
+    {-2.64575131106459, 0, 9.66091783079296, 0.683130051063974, 0, 0, 0, 0, 0, 0},
+    {1.87082869338697, 0, 0, 4.34741302385683, 0, 0, 0, 0, 0, 0},
+    {3.24037034920393, 0, 0, 7.52994023880668, 0, 0, 0, 0, 0, 0},
+    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
+    
+    const static double dmats2[10][10] = \
+    {{0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {3.16227766016838, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {1.82574185835055, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {5.16397779494322, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {2.95803989154981, 5.61248608016091, -1.08012344973464, -0.763762615825974, 0, 0, 0, 0, 0, 0},
+    {2.29128784747792, 1.44913767461894, 4.18330013267038, -0.591607978309962, 0, 0, 0, 0, 0, 0},
+    {1.32287565553229, 0, 3.86436713231718, -0.341565025531986, 0, 0, 0, 0, 0, 0},
+    {1.87082869338697, 7.09929573971954, 0, 4.34741302385683, 0, 0, 0, 0, 0, 0},
+    {1.08012344973464, 0, 7.09929573971954, 2.50998007960223, 0, 0, 0, 0, 0, 0},
+    {-3.81881307912987, 0, 0, 8.87411967464942, 0, 0, 0, 0, 0, 0}};
     
     // Compute reference derivatives
     // Declare pointer to array of derivatives on FIAT element
@@ -364,12 +436,24 @@ void UFC_SolitaryWave3DBilinearForm_fini
     double coeff0_1 = 0;
     double coeff0_2 = 0;
     double coeff0_3 = 0;
+    double coeff0_4 = 0;
+    double coeff0_5 = 0;
+    double coeff0_6 = 0;
+    double coeff0_7 = 0;
+    double coeff0_8 = 0;
+    double coeff0_9 = 0;
     
     // Declare new coefficients
     double new_coeff0_0 = 0;
     double new_coeff0_1 = 0;
     double new_coeff0_2 = 0;
     double new_coeff0_3 = 0;
+    double new_coeff0_4 = 0;
+    double new_coeff0_5 = 0;
+    double new_coeff0_6 = 0;
+    double new_coeff0_7 = 0;
+    double new_coeff0_8 = 0;
+    double new_coeff0_9 = 0;
     
     // Loop possible derivatives
     for (unsigned int deriv_num = 0; deriv_num < num_derivatives; deriv_num++)
@@ -379,6 +463,12 @@ void UFC_SolitaryWave3DBilinearForm_fini
       new_coeff0_1 = coefficients0[dof][1];
       new_coeff0_2 = coefficients0[dof][2];
       new_coeff0_3 = coefficients0[dof][3];
+      new_coeff0_4 = coefficients0[dof][4];
+      new_coeff0_5 = coefficients0[dof][5];
+      new_coeff0_6 = coefficients0[dof][6];
+      new_coeff0_7 = coefficients0[dof][7];
+      new_coeff0_8 = coefficients0[dof][8];
+      new_coeff0_9 = coefficients0[dof][9];
     
       // Loop derivative order
       for (unsigned int j = 0; j < n; j++)
@@ -388,32 +478,56 @@ void UFC_SolitaryWave3DBilinearForm_fini
         coeff0_1 = new_coeff0_1;
         coeff0_2 = new_coeff0_2;
         coeff0_3 = new_coeff0_3;
+        coeff0_4 = new_coeff0_4;
+        coeff0_5 = new_coeff0_5;
+        coeff0_6 = new_coeff0_6;
+        coeff0_7 = new_coeff0_7;
+        coeff0_8 = new_coeff0_8;
+        coeff0_9 = new_coeff0_9;
     
         if(combinations[deriv_num][j] == 0)
         {
-          new_coeff0_0 = coeff0_0*dmats0[0][0] + coeff0_1*dmats0[1][0] + coeff0_2*dmats0[2][0] + coeff0_3*dmats0[3][0];
-          new_coeff0_1 = coeff0_0*dmats0[0][1] + coeff0_1*dmats0[1][1] + coeff0_2*dmats0[2][1] + coeff0_3*dmats0[3][1];
-          new_coeff0_2 = coeff0_0*dmats0[0][2] + coeff0_1*dmats0[1][2] + coeff0_2*dmats0[2][2] + coeff0_3*dmats0[3][2];
-          new_coeff0_3 = coeff0_0*dmats0[0][3] + coeff0_1*dmats0[1][3] + coeff0_2*dmats0[2][3] + coeff0_3*dmats0[3][3];
+          new_coeff0_0 = coeff0_0*dmats0[0][0] + coeff0_1*dmats0[1][0] + coeff0_2*dmats0[2][0] + coeff0_3*dmats0[3][0] + coeff0_4*dmats0[4][0] + coeff0_5*dmats0[5][0] + coeff0_6*dmats0[6][0] + coeff0_7*dmats0[7][0] + coeff0_8*dmats0[8][0] + coeff0_9*dmats0[9][0];
+          new_coeff0_1 = coeff0_0*dmats0[0][1] + coeff0_1*dmats0[1][1] + coeff0_2*dmats0[2][1] + coeff0_3*dmats0[3][1] + coeff0_4*dmats0[4][1] + coeff0_5*dmats0[5][1] + coeff0_6*dmats0[6][1] + coeff0_7*dmats0[7][1] + coeff0_8*dmats0[8][1] + coeff0_9*dmats0[9][1];
+          new_coeff0_2 = coeff0_0*dmats0[0][2] + coeff0_1*dmats0[1][2] + coeff0_2*dmats0[2][2] + coeff0_3*dmats0[3][2] + coeff0_4*dmats0[4][2] + coeff0_5*dmats0[5][2] + coeff0_6*dmats0[6][2] + coeff0_7*dmats0[7][2] + coeff0_8*dmats0[8][2] + coeff0_9*dmats0[9][2];
+          new_coeff0_3 = coeff0_0*dmats0[0][3] + coeff0_1*dmats0[1][3] + coeff0_2*dmats0[2][3] + coeff0_3*dmats0[3][3] + coeff0_4*dmats0[4][3] + coeff0_5*dmats0[5][3] + coeff0_6*dmats0[6][3] + coeff0_7*dmats0[7][3] + coeff0_8*dmats0[8][3] + coeff0_9*dmats0[9][3];
+          new_coeff0_4 = coeff0_0*dmats0[0][4] + coeff0_1*dmats0[1][4] + coeff0_2*dmats0[2][4] + coeff0_3*dmats0[3][4] + coeff0_4*dmats0[4][4] + coeff0_5*dmats0[5][4] + coeff0_6*dmats0[6][4] + coeff0_7*dmats0[7][4] + coeff0_8*dmats0[8][4] + coeff0_9*dmats0[9][4];
+          new_coeff0_5 = coeff0_0*dmats0[0][5] + coeff0_1*dmats0[1][5] + coeff0_2*dmats0[2][5] + coeff0_3*dmats0[3][5] + coeff0_4*dmats0[4][5] + coeff0_5*dmats0[5][5] + coeff0_6*dmats0[6][5] + coeff0_7*dmats0[7][5] + coeff0_8*dmats0[8][5] + coeff0_9*dmats0[9][5];
+          new_coeff0_6 = coeff0_0*dmats0[0][6] + coeff0_1*dmats0[1][6] + coeff0_2*dmats0[2][6] + coeff0_3*dmats0[3][6] + coeff0_4*dmats0[4][6] + coeff0_5*dmats0[5][6] + coeff0_6*dmats0[6][6] + coeff0_7*dmats0[7][6] + coeff0_8*dmats0[8][6] + coeff0_9*dmats0[9][6];
+          new_coeff0_7 = coeff0_0*dmats0[0][7] + coeff0_1*dmats0[1][7] + coeff0_2*dmats0[2][7] + coeff0_3*dmats0[3][7] + coeff0_4*dmats0[4][7] + coeff0_5*dmats0[5][7] + coeff0_6*dmats0[6][7] + coeff0_7*dmats0[7][7] + coeff0_8*dmats0[8][7] + coeff0_9*dmats0[9][7];
+          new_coeff0_8 = coeff0_0*dmats0[0][8] + coeff0_1*dmats0[1][8] + coeff0_2*dmats0[2][8] + coeff0_3*dmats0[3][8] + coeff0_4*dmats0[4][8] + coeff0_5*dmats0[5][8] + coeff0_6*dmats0[6][8] + coeff0_7*dmats0[7][8] + coeff0_8*dmats0[8][8] + coeff0_9*dmats0[9][8];
+          new_coeff0_9 = coeff0_0*dmats0[0][9] + coeff0_1*dmats0[1][9] + coeff0_2*dmats0[2][9] + coeff0_3*dmats0[3][9] + coeff0_4*dmats0[4][9] + coeff0_5*dmats0[5][9] + coeff0_6*dmats0[6][9] + coeff0_7*dmats0[7][9] + coeff0_8*dmats0[8][9] + coeff0_9*dmats0[9][9];
         }
         if(combinations[deriv_num][j] == 1)
         {
-          new_coeff0_0 = coeff0_0*dmats1[0][0] + coeff0_1*dmats1[1][0] + coeff0_2*dmats1[2][0] + coeff0_3*dmats1[3][0];
-          new_coeff0_1 = coeff0_0*dmats1[0][1] + coeff0_1*dmats1[1][1] + coeff0_2*dmats1[2][1] + coeff0_3*dmats1[3][1];
-          new_coeff0_2 = coeff0_0*dmats1[0][2] + coeff0_1*dmats1[1][2] + coeff0_2*dmats1[2][2] + coeff0_3*dmats1[3][2];
-          new_coeff0_3 = coeff0_0*dmats1[0][3] + coeff0_1*dmats1[1][3] + coeff0_2*dmats1[2][3] + coeff0_3*dmats1[3][3];
+          new_coeff0_0 = coeff0_0*dmats1[0][0] + coeff0_1*dmats1[1][0] + coeff0_2*dmats1[2][0] + coeff0_3*dmats1[3][0] + coeff0_4*dmats1[4][0] + coeff0_5*dmats1[5][0] + coeff0_6*dmats1[6][0] + coeff0_7*dmats1[7][0] + coeff0_8*dmats1[8][0] + coeff0_9*dmats1[9][0];
+          new_coeff0_1 = coeff0_0*dmats1[0][1] + coeff0_1*dmats1[1][1] + coeff0_2*dmats1[2][1] + coeff0_3*dmats1[3][1] + coeff0_4*dmats1[4][1] + coeff0_5*dmats1[5][1] + coeff0_6*dmats1[6][1] + coeff0_7*dmats1[7][1] + coeff0_8*dmats1[8][1] + coeff0_9*dmats1[9][1];
+          new_coeff0_2 = coeff0_0*dmats1[0][2] + coeff0_1*dmats1[1][2] + coeff0_2*dmats1[2][2] + coeff0_3*dmats1[3][2] + coeff0_4*dmats1[4][2] + coeff0_5*dmats1[5][2] + coeff0_6*dmats1[6][2] + coeff0_7*dmats1[7][2] + coeff0_8*dmats1[8][2] + coeff0_9*dmats1[9][2];
+          new_coeff0_3 = coeff0_0*dmats1[0][3] + coeff0_1*dmats1[1][3] + coeff0_2*dmats1[2][3] + coeff0_3*dmats1[3][3] + coeff0_4*dmats1[4][3] + coeff0_5*dmats1[5][3] + coeff0_6*dmats1[6][3] + coeff0_7*dmats1[7][3] + coeff0_8*dmats1[8][3] + coeff0_9*dmats1[9][3];
+          new_coeff0_4 = coeff0_0*dmats1[0][4] + coeff0_1*dmats1[1][4] + coeff0_2*dmats1[2][4] + coeff0_3*dmats1[3][4] + coeff0_4*dmats1[4][4] + coeff0_5*dmats1[5][4] + coeff0_6*dmats1[6][4] + coeff0_7*dmats1[7][4] + coeff0_8*dmats1[8][4] + coeff0_9*dmats1[9][4];
+          new_coeff0_5 = coeff0_0*dmats1[0][5] + coeff0_1*dmats1[1][5] + coeff0_2*dmats1[2][5] + coeff0_3*dmats1[3][5] + coeff0_4*dmats1[4][5] + coeff0_5*dmats1[5][5] + coeff0_6*dmats1[6][5] + coeff0_7*dmats1[7][5] + coeff0_8*dmats1[8][5] + coeff0_9*dmats1[9][5];
+          new_coeff0_6 = coeff0_0*dmats1[0][6] + coeff0_1*dmats1[1][6] + coeff0_2*dmats1[2][6] + coeff0_3*dmats1[3][6] + coeff0_4*dmats1[4][6] + coeff0_5*dmats1[5][6] + coeff0_6*dmats1[6][6] + coeff0_7*dmats1[7][6] + coeff0_8*dmats1[8][6] + coeff0_9*dmats1[9][6];
+          new_coeff0_7 = coeff0_0*dmats1[0][7] + coeff0_1*dmats1[1][7] + coeff0_2*dmats1[2][7] + coeff0_3*dmats1[3][7] + coeff0_4*dmats1[4][7] + coeff0_5*dmats1[5][7] + coeff0_6*dmats1[6][7] + coeff0_7*dmats1[7][7] + coeff0_8*dmats1[8][7] + coeff0_9*dmats1[9][7];
+          new_coeff0_8 = coeff0_0*dmats1[0][8] + coeff0_1*dmats1[1][8] + coeff0_2*dmats1[2][8] + coeff0_3*dmats1[3][8] + coeff0_4*dmats1[4][8] + coeff0_5*dmats1[5][8] + coeff0_6*dmats1[6][8] + coeff0_7*dmats1[7][8] + coeff0_8*dmats1[8][8] + coeff0_9*dmats1[9][8];
+          new_coeff0_9 = coeff0_0*dmats1[0][9] + coeff0_1*dmats1[1][9] + coeff0_2*dmats1[2][9] + coeff0_3*dmats1[3][9] + coeff0_4*dmats1[4][9] + coeff0_5*dmats1[5][9] + coeff0_6*dmats1[6][9] + coeff0_7*dmats1[7][9] + coeff0_8*dmats1[8][9] + coeff0_9*dmats1[9][9];
         }
         if(combinations[deriv_num][j] == 2)
         {
-          new_coeff0_0 = coeff0_0*dmats2[0][0] + coeff0_1*dmats2[1][0] + coeff0_2*dmats2[2][0] + coeff0_3*dmats2[3][0];
-          new_coeff0_1 = coeff0_0*dmats2[0][1] + coeff0_1*dmats2[1][1] + coeff0_2*dmats2[2][1] + coeff0_3*dmats2[3][1];
-          new_coeff0_2 = coeff0_0*dmats2[0][2] + coeff0_1*dmats2[1][2] + coeff0_2*dmats2[2][2] + coeff0_3*dmats2[3][2];
-          new_coeff0_3 = coeff0_0*dmats2[0][3] + coeff0_1*dmats2[1][3] + coeff0_2*dmats2[2][3] + coeff0_3*dmats2[3][3];
+          new_coeff0_0 = coeff0_0*dmats2[0][0] + coeff0_1*dmats2[1][0] + coeff0_2*dmats2[2][0] + coeff0_3*dmats2[3][0] + coeff0_4*dmats2[4][0] + coeff0_5*dmats2[5][0] + coeff0_6*dmats2[6][0] + coeff0_7*dmats2[7][0] + coeff0_8*dmats2[8][0] + coeff0_9*dmats2[9][0];
+          new_coeff0_1 = coeff0_0*dmats2[0][1] + coeff0_1*dmats2[1][1] + coeff0_2*dmats2[2][1] + coeff0_3*dmats2[3][1] + coeff0_4*dmats2[4][1] + coeff0_5*dmats2[5][1] + coeff0_6*dmats2[6][1] + coeff0_7*dmats2[7][1] + coeff0_8*dmats2[8][1] + coeff0_9*dmats2[9][1];
+          new_coeff0_2 = coeff0_0*dmats2[0][2] + coeff0_1*dmats2[1][2] + coeff0_2*dmats2[2][2] + coeff0_3*dmats2[3][2] + coeff0_4*dmats2[4][2] + coeff0_5*dmats2[5][2] + coeff0_6*dmats2[6][2] + coeff0_7*dmats2[7][2] + coeff0_8*dmats2[8][2] + coeff0_9*dmats2[9][2];
+          new_coeff0_3 = coeff0_0*dmats2[0][3] + coeff0_1*dmats2[1][3] + coeff0_2*dmats2[2][3] + coeff0_3*dmats2[3][3] + coeff0_4*dmats2[4][3] + coeff0_5*dmats2[5][3] + coeff0_6*dmats2[6][3] + coeff0_7*dmats2[7][3] + coeff0_8*dmats2[8][3] + coeff0_9*dmats2[9][3];
+          new_coeff0_4 = coeff0_0*dmats2[0][4] + coeff0_1*dmats2[1][4] + coeff0_2*dmats2[2][4] + coeff0_3*dmats2[3][4] + coeff0_4*dmats2[4][4] + coeff0_5*dmats2[5][4] + coeff0_6*dmats2[6][4] + coeff0_7*dmats2[7][4] + coeff0_8*dmats2[8][4] + coeff0_9*dmats2[9][4];
+          new_coeff0_5 = coeff0_0*dmats2[0][5] + coeff0_1*dmats2[1][5] + coeff0_2*dmats2[2][5] + coeff0_3*dmats2[3][5] + coeff0_4*dmats2[4][5] + coeff0_5*dmats2[5][5] + coeff0_6*dmats2[6][5] + coeff0_7*dmats2[7][5] + coeff0_8*dmats2[8][5] + coeff0_9*dmats2[9][5];
+          new_coeff0_6 = coeff0_0*dmats2[0][6] + coeff0_1*dmats2[1][6] + coeff0_2*dmats2[2][6] + coeff0_3*dmats2[3][6] + coeff0_4*dmats2[4][6] + coeff0_5*dmats2[5][6] + coeff0_6*dmats2[6][6] + coeff0_7*dmats2[7][6] + coeff0_8*dmats2[8][6] + coeff0_9*dmats2[9][6];
+          new_coeff0_7 = coeff0_0*dmats2[0][7] + coeff0_1*dmats2[1][7] + coeff0_2*dmats2[2][7] + coeff0_3*dmats2[3][7] + coeff0_4*dmats2[4][7] + coeff0_5*dmats2[5][7] + coeff0_6*dmats2[6][7] + coeff0_7*dmats2[7][7] + coeff0_8*dmats2[8][7] + coeff0_9*dmats2[9][7];
+          new_coeff0_8 = coeff0_0*dmats2[0][8] + coeff0_1*dmats2[1][8] + coeff0_2*dmats2[2][8] + coeff0_3*dmats2[3][8] + coeff0_4*dmats2[4][8] + coeff0_5*dmats2[5][8] + coeff0_6*dmats2[6][8] + coeff0_7*dmats2[7][8] + coeff0_8*dmats2[8][8] + coeff0_9*dmats2[9][8];
+          new_coeff0_9 = coeff0_0*dmats2[0][9] + coeff0_1*dmats2[1][9] + coeff0_2*dmats2[2][9] + coeff0_3*dmats2[3][9] + coeff0_4*dmats2[4][9] + coeff0_5*dmats2[5][9] + coeff0_6*dmats2[6][9] + coeff0_7*dmats2[7][9] + coeff0_8*dmats2[8][9] + coeff0_9*dmats2[9][9];
         }
     
       }
       // Compute derivatives on reference element as dot product of coefficients and basisvalues
-      derivatives[deriv_num] = new_coeff0_0*basisvalue0 + new_coeff0_1*basisvalue1 + new_coeff0_2*basisvalue2 + new_coeff0_3*basisvalue3;
+      derivatives[deriv_num] = new_coeff0_0*basisvalue0 + new_coeff0_1*basisvalue1 + new_coeff0_2*basisvalue2 + new_coeff0_3*basisvalue3 + new_coeff0_4*basisvalue4 + new_coeff0_5*basisvalue5 + new_coeff0_6*basisvalue6 + new_coeff0_7*basisvalue7 + new_coeff0_8*basisvalue8 + new_coeff0_9*basisvalue9;
     }
     
     // Transform derivatives back to physical element
@@ -453,9 +567,9 @@ double UFC_SolitaryWave3DBilinearForm_fi
                                    const ufc::cell& c) const
 {
     // The reference points, direction and weights:
-    const static double X[4][1][3] = {{{0, 0, 0}}, {{1, 0, 0}}, {{0, 1, 0}}, {{0, 0, 1}}};
-    const static double W[4][1] = {{1}, {1}, {1}, {1}};
-    const static double D[4][1][1] = {{{1}}, {{1}}, {{1}}, {{1}}};
+    const static double X[10][1][3] = {{{0, 0, 0}}, {{1, 0, 0}}, {{0, 1, 0}}, {{0, 0, 1}}, {{0, 0.5, 0.5}}, {{0.5, 0, 0.5}}, {{0.5, 0.5, 0}}, {{0, 0, 0.5}}, {{0, 0.5, 0}}, {{0.5, 0, 0}}};
+    const static double W[10][1] = {{1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}};
+    const static double D[10][1][1] = {{{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}};
     
     const double * const * x = c.coordinates;
     double result = 0.0;
@@ -538,7 +652,7 @@ UFC_SolitaryWave3DBilinearForm_finite_el
 /// Return a string identifying the finite element
 const char* UFC_SolitaryWave3DBilinearForm_finite_element_0_1::signature() const
 {
-    return "FiniteElement('Lagrange', 'tetrahedron', 1)";
+    return "FiniteElement('Lagrange', 'tetrahedron', 2)";
 }
 
 /// Return the cell shape
@@ -550,7 +664,7 @@ ufc::shape UFC_SolitaryWave3DBilinearFor
 /// Return the dimension of the finite element function space
 unsigned int UFC_SolitaryWave3DBilinearForm_finite_element_0_1::space_dimension() const
 {
-    return 4;
+    return 10;
 }
 
 /// Return the rank of the value space
@@ -641,45 +755,75 @@ void UFC_SolitaryWave3DBilinearForm_fini
     // Generate scalings
     const double scalings_y_0 = 1;
     const double scalings_y_1 = scalings_y_0*(0.5 - 0.5*y);
+    const double scalings_y_2 = scalings_y_1*(0.5 - 0.5*y);
     const double scalings_z_0 = 1;
     const double scalings_z_1 = scalings_z_0*(0.5 - 0.5*z);
+    const double scalings_z_2 = scalings_z_1*(0.5 - 0.5*z);
     
     // Compute psitilde_a
     const double psitilde_a_0 = 1;
     const double psitilde_a_1 = x;
+    const double psitilde_a_2 = 1.5*x*psitilde_a_1 - 0.5*psitilde_a_0;
     
     // Compute psitilde_bs
     const double psitilde_bs_0_0 = 1;
     const double psitilde_bs_0_1 = 1.5*y + 0.5;
+    const double psitilde_bs_0_2 = 0.111111111111111*psitilde_bs_0_1 + 1.66666666666667*y*psitilde_bs_0_1 - 0.555555555555556*psitilde_bs_0_0;
     const double psitilde_bs_1_0 = 1;
+    const double psitilde_bs_1_1 = 2.5*y + 1.5;
+    const double psitilde_bs_2_0 = 1;
     
     // Compute psitilde_cs
     const double psitilde_cs_00_0 = 1;
     const double psitilde_cs_00_1 = 2*z + 1;
+    const double psitilde_cs_00_2 = 0.3125*psitilde_cs_00_1 + 1.875*z*psitilde_cs_00_1 - 0.5625*psitilde_cs_00_0;
     const double psitilde_cs_01_0 = 1;
+    const double psitilde_cs_01_1 = 3*z + 2;
+    const double psitilde_cs_02_0 = 1;
     const double psitilde_cs_10_0 = 1;
+    const double psitilde_cs_10_1 = 3*z + 2;
+    const double psitilde_cs_11_0 = 1;
+    const double psitilde_cs_20_0 = 1;
     
     // Compute basisvalues
     const double basisvalue0 = 0.866025403784439*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_0;
     const double basisvalue1 = 2.73861278752583*psitilde_a_1*scalings_y_1*psitilde_bs_1_0*scalings_z_1*psitilde_cs_10_0;
     const double basisvalue2 = 1.58113883008419*psitilde_a_0*scalings_y_0*psitilde_bs_0_1*scalings_z_1*psitilde_cs_01_0;
     const double basisvalue3 = 1.11803398874989*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_1;
-    
-    // Table(s) of coefficients
-    const static double coefficients0[4][4] = \
-    {{0.288675134594813, -0.182574185835055, -0.105409255338946, -0.074535599249993},
-    {0.288675134594813, 0.182574185835055, -0.105409255338946, -0.074535599249993},
-    {0.288675134594813, 0, 0.210818510677892, -0.074535599249993},
-    {0.288675134594813, 0, 0, 0.223606797749979}};
+    const double basisvalue4 = 5.1234753829798*psitilde_a_2*scalings_y_2*psitilde_bs_2_0*scalings_z_2*psitilde_cs_20_0;
+    const double basisvalue5 = 3.96862696659689*psitilde_a_1*scalings_y_1*psitilde_bs_1_1*scalings_z_2*psitilde_cs_11_0;
+    const double basisvalue6 = 2.29128784747792*psitilde_a_0*scalings_y_0*psitilde_bs_0_2*scalings_z_2*psitilde_cs_02_0;
+    const double basisvalue7 = 3.24037034920393*psitilde_a_1*scalings_y_1*psitilde_bs_1_0*scalings_z_1*psitilde_cs_10_1;
+    const double basisvalue8 = 1.87082869338697*psitilde_a_0*scalings_y_0*psitilde_bs_0_1*scalings_z_1*psitilde_cs_01_1;
+    const double basisvalue9 = 1.3228756555323*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_2;
+    
+    // Table(s) of coefficients
+    const static double coefficients0[10][10] = \
+    {{-0.0577350269189626, -0.0608580619450185, -0.0351364184463153, -0.0248451997499977, 0.0650600048632355, 0.0503952630678969, 0.0290957186981323, 0.0411475599898912, 0.0237565548366599, 0.0167984210226323},
+    {-0.0577350269189625, 0.0608580619450185, -0.0351364184463153, -0.0248451997499977, 0.0650600048632355, -0.050395263067897, 0.0290957186981323, -0.0411475599898912, 0.0237565548366599, 0.0167984210226323},
+    {-0.0577350269189625, 0, 0.0702728368926306, -0.0248451997499977, 0, 0, 0.0872871560943969, 0, -0.0475131096733199, 0.0167984210226323},
+    {-0.0577350269189626, 0, 0, 0.074535599249993, 0, 0, 0, 0, 0, 0.100790526135794},
+    {0.23094010767585, 0, 0.140545673785261, 0.0993807989999906, 0, 0, 0, 0, 0.1187827741833, -0.0671936840905293},
+    {0.230940107675851, 0.121716123890037, -0.0702728368926306, 0.0993807989999907, 0, 0, 0, 0.102868899974728, -0.0593913870916499, -0.0671936840905293},
+    {0.23094010767585, 0.121716123890037, 0.0702728368926307, -0.0993807989999907, 0, 0.100790526135794, -0.087287156094397, -0.0205737799949456, -0.01187827741833, 0.0167984210226323},
+    {0.23094010767585, -0.121716123890037, -0.0702728368926307, 0.0993807989999906, 0, 0, 0, -0.102868899974728, -0.0593913870916499, -0.0671936840905293},
+    {0.23094010767585, -0.121716123890037, 0.0702728368926306, -0.0993807989999906, 0, -0.100790526135794, -0.0872871560943969, 0.0205737799949456, -0.01187827741833, 0.0167984210226323},
+    {0.23094010767585, 0, -0.140545673785261, -0.0993807989999906, -0.130120009726471, 0, 0.0290957186981323, 0, 0.02375655483666, 0.0167984210226323}};
     
     // Extract relevant coefficients
     const double coeff0_0 = coefficients0[dof][0];
     const double coeff0_1 = coefficients0[dof][1];
     const double coeff0_2 = coefficients0[dof][2];
     const double coeff0_3 = coefficients0[dof][3];
+    const double coeff0_4 = coefficients0[dof][4];
+    const double coeff0_5 = coefficients0[dof][5];
+    const double coeff0_6 = coefficients0[dof][6];
+    const double coeff0_7 = coefficients0[dof][7];
+    const double coeff0_8 = coefficients0[dof][8];
+    const double coeff0_9 = coefficients0[dof][9];
     
     // Compute value(s)
-    *values = coeff0_0*basisvalue0 + coeff0_1*basisvalue1 + coeff0_2*basisvalue2 + coeff0_3*basisvalue3;
+    *values = coeff0_0*basisvalue0 + coeff0_1*basisvalue1 + coeff0_2*basisvalue2 + coeff0_3*basisvalue3 + coeff0_4*basisvalue4 + coeff0_5*basisvalue5 + coeff0_6*basisvalue6 + coeff0_7*basisvalue7 + coeff0_8*basisvalue8 + coeff0_9*basisvalue9;
 }
 
 /// Evaluate all basis functions at given point in cell
@@ -827,56 +971,98 @@ void UFC_SolitaryWave3DBilinearForm_fini
     // Generate scalings
     const double scalings_y_0 = 1;
     const double scalings_y_1 = scalings_y_0*(0.5 - 0.5*y);
+    const double scalings_y_2 = scalings_y_1*(0.5 - 0.5*y);
     const double scalings_z_0 = 1;
     const double scalings_z_1 = scalings_z_0*(0.5 - 0.5*z);
+    const double scalings_z_2 = scalings_z_1*(0.5 - 0.5*z);
     
     // Compute psitilde_a
     const double psitilde_a_0 = 1;
     const double psitilde_a_1 = x;
+    const double psitilde_a_2 = 1.5*x*psitilde_a_1 - 0.5*psitilde_a_0;
     
     // Compute psitilde_bs
     const double psitilde_bs_0_0 = 1;
     const double psitilde_bs_0_1 = 1.5*y + 0.5;
+    const double psitilde_bs_0_2 = 0.111111111111111*psitilde_bs_0_1 + 1.66666666666667*y*psitilde_bs_0_1 - 0.555555555555556*psitilde_bs_0_0;
     const double psitilde_bs_1_0 = 1;
+    const double psitilde_bs_1_1 = 2.5*y + 1.5;
+    const double psitilde_bs_2_0 = 1;
     
     // Compute psitilde_cs
     const double psitilde_cs_00_0 = 1;
     const double psitilde_cs_00_1 = 2*z + 1;
+    const double psitilde_cs_00_2 = 0.3125*psitilde_cs_00_1 + 1.875*z*psitilde_cs_00_1 - 0.5625*psitilde_cs_00_0;
     const double psitilde_cs_01_0 = 1;
+    const double psitilde_cs_01_1 = 3*z + 2;
+    const double psitilde_cs_02_0 = 1;
     const double psitilde_cs_10_0 = 1;
+    const double psitilde_cs_10_1 = 3*z + 2;
+    const double psitilde_cs_11_0 = 1;
+    const double psitilde_cs_20_0 = 1;
     
     // Compute basisvalues
     const double basisvalue0 = 0.866025403784439*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_0;
     const double basisvalue1 = 2.73861278752583*psitilde_a_1*scalings_y_1*psitilde_bs_1_0*scalings_z_1*psitilde_cs_10_0;
     const double basisvalue2 = 1.58113883008419*psitilde_a_0*scalings_y_0*psitilde_bs_0_1*scalings_z_1*psitilde_cs_01_0;
     const double basisvalue3 = 1.11803398874989*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_1;
-    
-    // Table(s) of coefficients
-    const static double coefficients0[4][4] = \
-    {{0.288675134594813, -0.182574185835055, -0.105409255338946, -0.074535599249993},
-    {0.288675134594813, 0.182574185835055, -0.105409255338946, -0.074535599249993},
-    {0.288675134594813, 0, 0.210818510677892, -0.074535599249993},
-    {0.288675134594813, 0, 0, 0.223606797749979}};
+    const double basisvalue4 = 5.1234753829798*psitilde_a_2*scalings_y_2*psitilde_bs_2_0*scalings_z_2*psitilde_cs_20_0;
+    const double basisvalue5 = 3.96862696659689*psitilde_a_1*scalings_y_1*psitilde_bs_1_1*scalings_z_2*psitilde_cs_11_0;
+    const double basisvalue6 = 2.29128784747792*psitilde_a_0*scalings_y_0*psitilde_bs_0_2*scalings_z_2*psitilde_cs_02_0;
+    const double basisvalue7 = 3.24037034920393*psitilde_a_1*scalings_y_1*psitilde_bs_1_0*scalings_z_1*psitilde_cs_10_1;
+    const double basisvalue8 = 1.87082869338697*psitilde_a_0*scalings_y_0*psitilde_bs_0_1*scalings_z_1*psitilde_cs_01_1;
+    const double basisvalue9 = 1.3228756555323*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_2;
+    
+    // Table(s) of coefficients
+    const static double coefficients0[10][10] = \
+    {{-0.0577350269189626, -0.0608580619450185, -0.0351364184463153, -0.0248451997499977, 0.0650600048632355, 0.0503952630678969, 0.0290957186981323, 0.0411475599898912, 0.0237565548366599, 0.0167984210226323},
+    {-0.0577350269189625, 0.0608580619450185, -0.0351364184463153, -0.0248451997499977, 0.0650600048632355, -0.050395263067897, 0.0290957186981323, -0.0411475599898912, 0.0237565548366599, 0.0167984210226323},
+    {-0.0577350269189625, 0, 0.0702728368926306, -0.0248451997499977, 0, 0, 0.0872871560943969, 0, -0.0475131096733199, 0.0167984210226323},
+    {-0.0577350269189626, 0, 0, 0.074535599249993, 0, 0, 0, 0, 0, 0.100790526135794},
+    {0.23094010767585, 0, 0.140545673785261, 0.0993807989999906, 0, 0, 0, 0, 0.1187827741833, -0.0671936840905293},
+    {0.230940107675851, 0.121716123890037, -0.0702728368926306, 0.0993807989999907, 0, 0, 0, 0.102868899974728, -0.0593913870916499, -0.0671936840905293},
+    {0.23094010767585, 0.121716123890037, 0.0702728368926307, -0.0993807989999907, 0, 0.100790526135794, -0.087287156094397, -0.0205737799949456, -0.01187827741833, 0.0167984210226323},
+    {0.23094010767585, -0.121716123890037, -0.0702728368926307, 0.0993807989999906, 0, 0, 0, -0.102868899974728, -0.0593913870916499, -0.0671936840905293},
+    {0.23094010767585, -0.121716123890037, 0.0702728368926306, -0.0993807989999906, 0, -0.100790526135794, -0.0872871560943969, 0.0205737799949456, -0.01187827741833, 0.0167984210226323},
+    {0.23094010767585, 0, -0.140545673785261, -0.0993807989999906, -0.130120009726471, 0, 0.0290957186981323, 0, 0.02375655483666, 0.0167984210226323}};
     
     // Interesting (new) part
     // Tables of derivatives of the polynomial base (transpose)
-    const static double dmats0[4][4] = \
-    {{0, 0, 0, 0},
-    {6.32455532033676, 0, 0, 0},
-    {0, 0, 0, 0},
-    {0, 0, 0, 0}};
-    
-    const static double dmats1[4][4] = \
-    {{0, 0, 0, 0},
-    {3.16227766016838, 0, 0, 0},
-    {5.47722557505166, 0, 0, 0},
-    {0, 0, 0, 0}};
-    
-    const static double dmats2[4][4] = \
-    {{0, 0, 0, 0},
-    {3.16227766016838, 0, 0, 0},
-    {1.82574185835055, 0, 0, 0},
-    {5.16397779494322, 0, 0, 0}};
+    const static double dmats0[10][10] = \
+    {{0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {6.32455532033676, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {0, 11.2249721603218, 0, 0, 0, 0, 0, 0, 0, 0},
+    {4.58257569495584, 0, 8.36660026534076, -1.18321595661992, 0, 0, 0, 0, 0, 0},
+    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {3.74165738677394, 0, 0, 8.69482604771366, 0, 0, 0, 0, 0, 0},
+    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
+    
+    const static double dmats1[10][10] = \
+    {{0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {3.16227766016838, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {5.47722557505166, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {2.95803989154981, 5.61248608016091, -1.08012344973464, -0.763762615825974, 0, 0, 0, 0, 0, 0},
+    {2.29128784747792, 7.24568837309472, 4.18330013267038, -0.591607978309962, 0, 0, 0, 0, 0, 0},
+    {-2.64575131106459, 0, 9.66091783079296, 0.683130051063974, 0, 0, 0, 0, 0, 0},
+    {1.87082869338697, 0, 0, 4.34741302385683, 0, 0, 0, 0, 0, 0},
+    {3.24037034920393, 0, 0, 7.52994023880668, 0, 0, 0, 0, 0, 0},
+    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
+    
+    const static double dmats2[10][10] = \
+    {{0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {3.16227766016838, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {1.82574185835055, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {5.16397779494322, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {2.95803989154981, 5.61248608016091, -1.08012344973464, -0.763762615825974, 0, 0, 0, 0, 0, 0},
+    {2.29128784747792, 1.44913767461894, 4.18330013267038, -0.591607978309962, 0, 0, 0, 0, 0, 0},
+    {1.32287565553229, 0, 3.86436713231718, -0.341565025531986, 0, 0, 0, 0, 0, 0},
+    {1.87082869338697, 7.09929573971954, 0, 4.34741302385683, 0, 0, 0, 0, 0, 0},
+    {1.08012344973464, 0, 7.09929573971954, 2.50998007960223, 0, 0, 0, 0, 0, 0},
+    {-3.81881307912987, 0, 0, 8.87411967464942, 0, 0, 0, 0, 0, 0}};
     
     // Compute reference derivatives
     // Declare pointer to array of derivatives on FIAT element
@@ -887,12 +1073,24 @@ void UFC_SolitaryWave3DBilinearForm_fini
     double coeff0_1 = 0;
     double coeff0_2 = 0;
     double coeff0_3 = 0;
+    double coeff0_4 = 0;
+    double coeff0_5 = 0;
+    double coeff0_6 = 0;
+    double coeff0_7 = 0;
+    double coeff0_8 = 0;
+    double coeff0_9 = 0;
     
     // Declare new coefficients
     double new_coeff0_0 = 0;
     double new_coeff0_1 = 0;
     double new_coeff0_2 = 0;
     double new_coeff0_3 = 0;
+    double new_coeff0_4 = 0;
+    double new_coeff0_5 = 0;
+    double new_coeff0_6 = 0;
+    double new_coeff0_7 = 0;
+    double new_coeff0_8 = 0;
+    double new_coeff0_9 = 0;
     
     // Loop possible derivatives
     for (unsigned int deriv_num = 0; deriv_num < num_derivatives; deriv_num++)
@@ -902,6 +1100,12 @@ void UFC_SolitaryWave3DBilinearForm_fini
       new_coeff0_1 = coefficients0[dof][1];
       new_coeff0_2 = coefficients0[dof][2];
       new_coeff0_3 = coefficients0[dof][3];
+      new_coeff0_4 = coefficients0[dof][4];
+      new_coeff0_5 = coefficients0[dof][5];
+      new_coeff0_6 = coefficients0[dof][6];
+      new_coeff0_7 = coefficients0[dof][7];
+      new_coeff0_8 = coefficients0[dof][8];
+      new_coeff0_9 = coefficients0[dof][9];
     
       // Loop derivative order
       for (unsigned int j = 0; j < n; j++)
@@ -911,32 +1115,56 @@ void UFC_SolitaryWave3DBilinearForm_fini
         coeff0_1 = new_coeff0_1;
         coeff0_2 = new_coeff0_2;
         coeff0_3 = new_coeff0_3;
+        coeff0_4 = new_coeff0_4;
+        coeff0_5 = new_coeff0_5;
+        coeff0_6 = new_coeff0_6;
+        coeff0_7 = new_coeff0_7;
+        coeff0_8 = new_coeff0_8;
+        coeff0_9 = new_coeff0_9;
     
         if(combinations[deriv_num][j] == 0)
         {
-          new_coeff0_0 = coeff0_0*dmats0[0][0] + coeff0_1*dmats0[1][0] + coeff0_2*dmats0[2][0] + coeff0_3*dmats0[3][0];
-          new_coeff0_1 = coeff0_0*dmats0[0][1] + coeff0_1*dmats0[1][1] + coeff0_2*dmats0[2][1] + coeff0_3*dmats0[3][1];
-          new_coeff0_2 = coeff0_0*dmats0[0][2] + coeff0_1*dmats0[1][2] + coeff0_2*dmats0[2][2] + coeff0_3*dmats0[3][2];
-          new_coeff0_3 = coeff0_0*dmats0[0][3] + coeff0_1*dmats0[1][3] + coeff0_2*dmats0[2][3] + coeff0_3*dmats0[3][3];
+          new_coeff0_0 = coeff0_0*dmats0[0][0] + coeff0_1*dmats0[1][0] + coeff0_2*dmats0[2][0] + coeff0_3*dmats0[3][0] + coeff0_4*dmats0[4][0] + coeff0_5*dmats0[5][0] + coeff0_6*dmats0[6][0] + coeff0_7*dmats0[7][0] + coeff0_8*dmats0[8][0] + coeff0_9*dmats0[9][0];
+          new_coeff0_1 = coeff0_0*dmats0[0][1] + coeff0_1*dmats0[1][1] + coeff0_2*dmats0[2][1] + coeff0_3*dmats0[3][1] + coeff0_4*dmats0[4][1] + coeff0_5*dmats0[5][1] + coeff0_6*dmats0[6][1] + coeff0_7*dmats0[7][1] + coeff0_8*dmats0[8][1] + coeff0_9*dmats0[9][1];
+          new_coeff0_2 = coeff0_0*dmats0[0][2] + coeff0_1*dmats0[1][2] + coeff0_2*dmats0[2][2] + coeff0_3*dmats0[3][2] + coeff0_4*dmats0[4][2] + coeff0_5*dmats0[5][2] + coeff0_6*dmats0[6][2] + coeff0_7*dmats0[7][2] + coeff0_8*dmats0[8][2] + coeff0_9*dmats0[9][2];
+          new_coeff0_3 = coeff0_0*dmats0[0][3] + coeff0_1*dmats0[1][3] + coeff0_2*dmats0[2][3] + coeff0_3*dmats0[3][3] + coeff0_4*dmats0[4][3] + coeff0_5*dmats0[5][3] + coeff0_6*dmats0[6][3] + coeff0_7*dmats0[7][3] + coeff0_8*dmats0[8][3] + coeff0_9*dmats0[9][3];
+          new_coeff0_4 = coeff0_0*dmats0[0][4] + coeff0_1*dmats0[1][4] + coeff0_2*dmats0[2][4] + coeff0_3*dmats0[3][4] + coeff0_4*dmats0[4][4] + coeff0_5*dmats0[5][4] + coeff0_6*dmats0[6][4] + coeff0_7*dmats0[7][4] + coeff0_8*dmats0[8][4] + coeff0_9*dmats0[9][4];
+          new_coeff0_5 = coeff0_0*dmats0[0][5] + coeff0_1*dmats0[1][5] + coeff0_2*dmats0[2][5] + coeff0_3*dmats0[3][5] + coeff0_4*dmats0[4][5] + coeff0_5*dmats0[5][5] + coeff0_6*dmats0[6][5] + coeff0_7*dmats0[7][5] + coeff0_8*dmats0[8][5] + coeff0_9*dmats0[9][5];
+          new_coeff0_6 = coeff0_0*dmats0[0][6] + coeff0_1*dmats0[1][6] + coeff0_2*dmats0[2][6] + coeff0_3*dmats0[3][6] + coeff0_4*dmats0[4][6] + coeff0_5*dmats0[5][6] + coeff0_6*dmats0[6][6] + coeff0_7*dmats0[7][6] + coeff0_8*dmats0[8][6] + coeff0_9*dmats0[9][6];
+          new_coeff0_7 = coeff0_0*dmats0[0][7] + coeff0_1*dmats0[1][7] + coeff0_2*dmats0[2][7] + coeff0_3*dmats0[3][7] + coeff0_4*dmats0[4][7] + coeff0_5*dmats0[5][7] + coeff0_6*dmats0[6][7] + coeff0_7*dmats0[7][7] + coeff0_8*dmats0[8][7] + coeff0_9*dmats0[9][7];
+          new_coeff0_8 = coeff0_0*dmats0[0][8] + coeff0_1*dmats0[1][8] + coeff0_2*dmats0[2][8] + coeff0_3*dmats0[3][8] + coeff0_4*dmats0[4][8] + coeff0_5*dmats0[5][8] + coeff0_6*dmats0[6][8] + coeff0_7*dmats0[7][8] + coeff0_8*dmats0[8][8] + coeff0_9*dmats0[9][8];
+          new_coeff0_9 = coeff0_0*dmats0[0][9] + coeff0_1*dmats0[1][9] + coeff0_2*dmats0[2][9] + coeff0_3*dmats0[3][9] + coeff0_4*dmats0[4][9] + coeff0_5*dmats0[5][9] + coeff0_6*dmats0[6][9] + coeff0_7*dmats0[7][9] + coeff0_8*dmats0[8][9] + coeff0_9*dmats0[9][9];
         }
         if(combinations[deriv_num][j] == 1)
         {
-          new_coeff0_0 = coeff0_0*dmats1[0][0] + coeff0_1*dmats1[1][0] + coeff0_2*dmats1[2][0] + coeff0_3*dmats1[3][0];
-          new_coeff0_1 = coeff0_0*dmats1[0][1] + coeff0_1*dmats1[1][1] + coeff0_2*dmats1[2][1] + coeff0_3*dmats1[3][1];
-          new_coeff0_2 = coeff0_0*dmats1[0][2] + coeff0_1*dmats1[1][2] + coeff0_2*dmats1[2][2] + coeff0_3*dmats1[3][2];
-          new_coeff0_3 = coeff0_0*dmats1[0][3] + coeff0_1*dmats1[1][3] + coeff0_2*dmats1[2][3] + coeff0_3*dmats1[3][3];
+          new_coeff0_0 = coeff0_0*dmats1[0][0] + coeff0_1*dmats1[1][0] + coeff0_2*dmats1[2][0] + coeff0_3*dmats1[3][0] + coeff0_4*dmats1[4][0] + coeff0_5*dmats1[5][0] + coeff0_6*dmats1[6][0] + coeff0_7*dmats1[7][0] + coeff0_8*dmats1[8][0] + coeff0_9*dmats1[9][0];
+          new_coeff0_1 = coeff0_0*dmats1[0][1] + coeff0_1*dmats1[1][1] + coeff0_2*dmats1[2][1] + coeff0_3*dmats1[3][1] + coeff0_4*dmats1[4][1] + coeff0_5*dmats1[5][1] + coeff0_6*dmats1[6][1] + coeff0_7*dmats1[7][1] + coeff0_8*dmats1[8][1] + coeff0_9*dmats1[9][1];
+          new_coeff0_2 = coeff0_0*dmats1[0][2] + coeff0_1*dmats1[1][2] + coeff0_2*dmats1[2][2] + coeff0_3*dmats1[3][2] + coeff0_4*dmats1[4][2] + coeff0_5*dmats1[5][2] + coeff0_6*dmats1[6][2] + coeff0_7*dmats1[7][2] + coeff0_8*dmats1[8][2] + coeff0_9*dmats1[9][2];
+          new_coeff0_3 = coeff0_0*dmats1[0][3] + coeff0_1*dmats1[1][3] + coeff0_2*dmats1[2][3] + coeff0_3*dmats1[3][3] + coeff0_4*dmats1[4][3] + coeff0_5*dmats1[5][3] + coeff0_6*dmats1[6][3] + coeff0_7*dmats1[7][3] + coeff0_8*dmats1[8][3] + coeff0_9*dmats1[9][3];
+          new_coeff0_4 = coeff0_0*dmats1[0][4] + coeff0_1*dmats1[1][4] + coeff0_2*dmats1[2][4] + coeff0_3*dmats1[3][4] + coeff0_4*dmats1[4][4] + coeff0_5*dmats1[5][4] + coeff0_6*dmats1[6][4] + coeff0_7*dmats1[7][4] + coeff0_8*dmats1[8][4] + coeff0_9*dmats1[9][4];
+          new_coeff0_5 = coeff0_0*dmats1[0][5] + coeff0_1*dmats1[1][5] + coeff0_2*dmats1[2][5] + coeff0_3*dmats1[3][5] + coeff0_4*dmats1[4][5] + coeff0_5*dmats1[5][5] + coeff0_6*dmats1[6][5] + coeff0_7*dmats1[7][5] + coeff0_8*dmats1[8][5] + coeff0_9*dmats1[9][5];
+          new_coeff0_6 = coeff0_0*dmats1[0][6] + coeff0_1*dmats1[1][6] + coeff0_2*dmats1[2][6] + coeff0_3*dmats1[3][6] + coeff0_4*dmats1[4][6] + coeff0_5*dmats1[5][6] + coeff0_6*dmats1[6][6] + coeff0_7*dmats1[7][6] + coeff0_8*dmats1[8][6] + coeff0_9*dmats1[9][6];
+          new_coeff0_7 = coeff0_0*dmats1[0][7] + coeff0_1*dmats1[1][7] + coeff0_2*dmats1[2][7] + coeff0_3*dmats1[3][7] + coeff0_4*dmats1[4][7] + coeff0_5*dmats1[5][7] + coeff0_6*dmats1[6][7] + coeff0_7*dmats1[7][7] + coeff0_8*dmats1[8][7] + coeff0_9*dmats1[9][7];
+          new_coeff0_8 = coeff0_0*dmats1[0][8] + coeff0_1*dmats1[1][8] + coeff0_2*dmats1[2][8] + coeff0_3*dmats1[3][8] + coeff0_4*dmats1[4][8] + coeff0_5*dmats1[5][8] + coeff0_6*dmats1[6][8] + coeff0_7*dmats1[7][8] + coeff0_8*dmats1[8][8] + coeff0_9*dmats1[9][8];
+          new_coeff0_9 = coeff0_0*dmats1[0][9] + coeff0_1*dmats1[1][9] + coeff0_2*dmats1[2][9] + coeff0_3*dmats1[3][9] + coeff0_4*dmats1[4][9] + coeff0_5*dmats1[5][9] + coeff0_6*dmats1[6][9] + coeff0_7*dmats1[7][9] + coeff0_8*dmats1[8][9] + coeff0_9*dmats1[9][9];
         }
         if(combinations[deriv_num][j] == 2)
         {
-          new_coeff0_0 = coeff0_0*dmats2[0][0] + coeff0_1*dmats2[1][0] + coeff0_2*dmats2[2][0] + coeff0_3*dmats2[3][0];
-          new_coeff0_1 = coeff0_0*dmats2[0][1] + coeff0_1*dmats2[1][1] + coeff0_2*dmats2[2][1] + coeff0_3*dmats2[3][1];
-          new_coeff0_2 = coeff0_0*dmats2[0][2] + coeff0_1*dmats2[1][2] + coeff0_2*dmats2[2][2] + coeff0_3*dmats2[3][2];
-          new_coeff0_3 = coeff0_0*dmats2[0][3] + coeff0_1*dmats2[1][3] + coeff0_2*dmats2[2][3] + coeff0_3*dmats2[3][3];
+          new_coeff0_0 = coeff0_0*dmats2[0][0] + coeff0_1*dmats2[1][0] + coeff0_2*dmats2[2][0] + coeff0_3*dmats2[3][0] + coeff0_4*dmats2[4][0] + coeff0_5*dmats2[5][0] + coeff0_6*dmats2[6][0] + coeff0_7*dmats2[7][0] + coeff0_8*dmats2[8][0] + coeff0_9*dmats2[9][0];
+          new_coeff0_1 = coeff0_0*dmats2[0][1] + coeff0_1*dmats2[1][1] + coeff0_2*dmats2[2][1] + coeff0_3*dmats2[3][1] + coeff0_4*dmats2[4][1] + coeff0_5*dmats2[5][1] + coeff0_6*dmats2[6][1] + coeff0_7*dmats2[7][1] + coeff0_8*dmats2[8][1] + coeff0_9*dmats2[9][1];
+          new_coeff0_2 = coeff0_0*dmats2[0][2] + coeff0_1*dmats2[1][2] + coeff0_2*dmats2[2][2] + coeff0_3*dmats2[3][2] + coeff0_4*dmats2[4][2] + coeff0_5*dmats2[5][2] + coeff0_6*dmats2[6][2] + coeff0_7*dmats2[7][2] + coeff0_8*dmats2[8][2] + coeff0_9*dmats2[9][2];
+          new_coeff0_3 = coeff0_0*dmats2[0][3] + coeff0_1*dmats2[1][3] + coeff0_2*dmats2[2][3] + coeff0_3*dmats2[3][3] + coeff0_4*dmats2[4][3] + coeff0_5*dmats2[5][3] + coeff0_6*dmats2[6][3] + coeff0_7*dmats2[7][3] + coeff0_8*dmats2[8][3] + coeff0_9*dmats2[9][3];
+          new_coeff0_4 = coeff0_0*dmats2[0][4] + coeff0_1*dmats2[1][4] + coeff0_2*dmats2[2][4] + coeff0_3*dmats2[3][4] + coeff0_4*dmats2[4][4] + coeff0_5*dmats2[5][4] + coeff0_6*dmats2[6][4] + coeff0_7*dmats2[7][4] + coeff0_8*dmats2[8][4] + coeff0_9*dmats2[9][4];
+          new_coeff0_5 = coeff0_0*dmats2[0][5] + coeff0_1*dmats2[1][5] + coeff0_2*dmats2[2][5] + coeff0_3*dmats2[3][5] + coeff0_4*dmats2[4][5] + coeff0_5*dmats2[5][5] + coeff0_6*dmats2[6][5] + coeff0_7*dmats2[7][5] + coeff0_8*dmats2[8][5] + coeff0_9*dmats2[9][5];
+          new_coeff0_6 = coeff0_0*dmats2[0][6] + coeff0_1*dmats2[1][6] + coeff0_2*dmats2[2][6] + coeff0_3*dmats2[3][6] + coeff0_4*dmats2[4][6] + coeff0_5*dmats2[5][6] + coeff0_6*dmats2[6][6] + coeff0_7*dmats2[7][6] + coeff0_8*dmats2[8][6] + coeff0_9*dmats2[9][6];
+          new_coeff0_7 = coeff0_0*dmats2[0][7] + coeff0_1*dmats2[1][7] + coeff0_2*dmats2[2][7] + coeff0_3*dmats2[3][7] + coeff0_4*dmats2[4][7] + coeff0_5*dmats2[5][7] + coeff0_6*dmats2[6][7] + coeff0_7*dmats2[7][7] + coeff0_8*dmats2[8][7] + coeff0_9*dmats2[9][7];
+          new_coeff0_8 = coeff0_0*dmats2[0][8] + coeff0_1*dmats2[1][8] + coeff0_2*dmats2[2][8] + coeff0_3*dmats2[3][8] + coeff0_4*dmats2[4][8] + coeff0_5*dmats2[5][8] + coeff0_6*dmats2[6][8] + coeff0_7*dmats2[7][8] + coeff0_8*dmats2[8][8] + coeff0_9*dmats2[9][8];
+          new_coeff0_9 = coeff0_0*dmats2[0][9] + coeff0_1*dmats2[1][9] + coeff0_2*dmats2[2][9] + coeff0_3*dmats2[3][9] + coeff0_4*dmats2[4][9] + coeff0_5*dmats2[5][9] + coeff0_6*dmats2[6][9] + coeff0_7*dmats2[7][9] + coeff0_8*dmats2[8][9] + coeff0_9*dmats2[9][9];
         }
     
       }
       // Compute derivatives on reference element as dot product of coefficients and basisvalues
-      derivatives[deriv_num] = new_coeff0_0*basisvalue0 + new_coeff0_1*basisvalue1 + new_coeff0_2*basisvalue2 + new_coeff0_3*basisvalue3;
+      derivatives[deriv_num] = new_coeff0_0*basisvalue0 + new_coeff0_1*basisvalue1 + new_coeff0_2*basisvalue2 + new_coeff0_3*basisvalue3 + new_coeff0_4*basisvalue4 + new_coeff0_5*basisvalue5 + new_coeff0_6*basisvalue6 + new_coeff0_7*basisvalue7 + new_coeff0_8*basisvalue8 + new_coeff0_9*basisvalue9;
     }
     
     // Transform derivatives back to physical element
@@ -976,9 +1204,9 @@ double UFC_SolitaryWave3DBilinearForm_fi
                                    const ufc::cell& c) const
 {
     // The reference points, direction and weights:
-    const static double X[4][1][3] = {{{0, 0, 0}}, {{1, 0, 0}}, {{0, 1, 0}}, {{0, 0, 1}}};
-    const static double W[4][1] = {{1}, {1}, {1}, {1}};
-    const static double D[4][1][1] = {{{1}}, {{1}}, {{1}}, {{1}}};
+    const static double X[10][1][3] = {{{0, 0, 0}}, {{1, 0, 0}}, {{0, 1, 0}}, {{0, 0, 1}}, {{0, 0.5, 0.5}}, {{0.5, 0, 0.5}}, {{0.5, 0.5, 0}}, {{0, 0, 0.5}}, {{0, 0.5, 0}}, {{0.5, 0, 0}}};
+    const static double W[10][1] = {{1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}};
+    const static double D[10][1][1] = {{{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}};
     
     const double * const * x = c.coordinates;
     double result = 0.0;
@@ -1061,7 +1289,7 @@ UFC_SolitaryWave3DBilinearForm_finite_el
 /// Return a string identifying the finite element
 const char* UFC_SolitaryWave3DBilinearForm_finite_element_0::signature() const
 {
-    return "MixedElement([FiniteElement('Lagrange', 'tetrahedron', 1), FiniteElement('Lagrange', 'tetrahedron', 1)])";
+    return "MixedElement([FiniteElement('Lagrange', 'tetrahedron', 2), FiniteElement('Lagrange', 'tetrahedron', 2)])";
 }
 
 /// Return the cell shape
@@ -1073,7 +1301,7 @@ ufc::shape UFC_SolitaryWave3DBilinearFor
 /// Return the dimension of the finite element function space
 unsigned int UFC_SolitaryWave3DBilinearForm_finite_element_0::space_dimension() const
 {
-    return 8;
+    return 20;
 }
 
 /// Return the rank of the value space
@@ -1159,7 +1387,7 @@ void UFC_SolitaryWave3DBilinearForm_fini
     values[0] = 0;
     values[1] = 0;
     
-    if (0 <= i && i <= 3)
+    if (0 <= i && i <= 9)
     {
       // Map degree of freedom to element degree of freedom
       const unsigned int dof = i;
@@ -1167,94 +1395,154 @@ void UFC_SolitaryWave3DBilinearForm_fini
       // Generate scalings
       const double scalings_y_0 = 1;
       const double scalings_y_1 = scalings_y_0*(0.5 - 0.5*y);
+      const double scalings_y_2 = scalings_y_1*(0.5 - 0.5*y);
       const double scalings_z_0 = 1;
       const double scalings_z_1 = scalings_z_0*(0.5 - 0.5*z);
+      const double scalings_z_2 = scalings_z_1*(0.5 - 0.5*z);
     
       // Compute psitilde_a
       const double psitilde_a_0 = 1;
       const double psitilde_a_1 = x;
+      const double psitilde_a_2 = 1.5*x*psitilde_a_1 - 0.5*psitilde_a_0;
     
       // Compute psitilde_bs
       const double psitilde_bs_0_0 = 1;
       const double psitilde_bs_0_1 = 1.5*y + 0.5;
+      const double psitilde_bs_0_2 = 0.111111111111111*psitilde_bs_0_1 + 1.66666666666667*y*psitilde_bs_0_1 - 0.555555555555556*psitilde_bs_0_0;
       const double psitilde_bs_1_0 = 1;
+      const double psitilde_bs_1_1 = 2.5*y + 1.5;
+      const double psitilde_bs_2_0 = 1;
     
       // Compute psitilde_cs
       const double psitilde_cs_00_0 = 1;
       const double psitilde_cs_00_1 = 2*z + 1;
+      const double psitilde_cs_00_2 = 0.3125*psitilde_cs_00_1 + 1.875*z*psitilde_cs_00_1 - 0.5625*psitilde_cs_00_0;
       const double psitilde_cs_01_0 = 1;
+      const double psitilde_cs_01_1 = 3*z + 2;
+      const double psitilde_cs_02_0 = 1;
       const double psitilde_cs_10_0 = 1;
+      const double psitilde_cs_10_1 = 3*z + 2;
+      const double psitilde_cs_11_0 = 1;
+      const double psitilde_cs_20_0 = 1;
     
       // Compute basisvalues
       const double basisvalue0 = 0.866025403784439*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_0;
       const double basisvalue1 = 2.73861278752583*psitilde_a_1*scalings_y_1*psitilde_bs_1_0*scalings_z_1*psitilde_cs_10_0;
       const double basisvalue2 = 1.58113883008419*psitilde_a_0*scalings_y_0*psitilde_bs_0_1*scalings_z_1*psitilde_cs_01_0;
       const double basisvalue3 = 1.11803398874989*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_1;
-    
-      // Table(s) of coefficients
-      const static double coefficients0[4][4] =   \
-      {{0.288675134594813, -0.182574185835055, -0.105409255338946, -0.074535599249993},
-      {0.288675134594813, 0.182574185835055, -0.105409255338946, -0.074535599249993},
-      {0.288675134594813, 0, 0.210818510677892, -0.074535599249993},
-      {0.288675134594813, 0, 0, 0.223606797749979}};
+      const double basisvalue4 = 5.1234753829798*psitilde_a_2*scalings_y_2*psitilde_bs_2_0*scalings_z_2*psitilde_cs_20_0;
+      const double basisvalue5 = 3.96862696659689*psitilde_a_1*scalings_y_1*psitilde_bs_1_1*scalings_z_2*psitilde_cs_11_0;
+      const double basisvalue6 = 2.29128784747792*psitilde_a_0*scalings_y_0*psitilde_bs_0_2*scalings_z_2*psitilde_cs_02_0;
+      const double basisvalue7 = 3.24037034920393*psitilde_a_1*scalings_y_1*psitilde_bs_1_0*scalings_z_1*psitilde_cs_10_1;
+      const double basisvalue8 = 1.87082869338697*psitilde_a_0*scalings_y_0*psitilde_bs_0_1*scalings_z_1*psitilde_cs_01_1;
+      const double basisvalue9 = 1.3228756555323*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_2;
+    
+      // Table(s) of coefficients
+      const static double coefficients0[10][10] =   \
+      {{-0.0577350269189626, -0.0608580619450185, -0.0351364184463153, -0.0248451997499977, 0.0650600048632355, 0.0503952630678969, 0.0290957186981323, 0.0411475599898912, 0.0237565548366599, 0.0167984210226323},
+      {-0.0577350269189625, 0.0608580619450185, -0.0351364184463153, -0.0248451997499977, 0.0650600048632355, -0.050395263067897, 0.0290957186981323, -0.0411475599898912, 0.0237565548366599, 0.0167984210226323},
+      {-0.0577350269189625, 0, 0.0702728368926306, -0.0248451997499977, 0, 0, 0.0872871560943969, 0, -0.0475131096733199, 0.0167984210226323},
+      {-0.0577350269189626, 0, 0, 0.074535599249993, 0, 0, 0, 0, 0, 0.100790526135794},
+      {0.23094010767585, 0, 0.140545673785261, 0.0993807989999906, 0, 0, 0, 0, 0.1187827741833, -0.0671936840905293},
+      {0.230940107675851, 0.121716123890037, -0.0702728368926306, 0.0993807989999907, 0, 0, 0, 0.102868899974728, -0.0593913870916499, -0.0671936840905293},
+      {0.23094010767585, 0.121716123890037, 0.0702728368926307, -0.0993807989999907, 0, 0.100790526135794, -0.087287156094397, -0.0205737799949456, -0.01187827741833, 0.0167984210226323},
+      {0.23094010767585, -0.121716123890037, -0.0702728368926307, 0.0993807989999906, 0, 0, 0, -0.102868899974728, -0.0593913870916499, -0.0671936840905293},
+      {0.23094010767585, -0.121716123890037, 0.0702728368926306, -0.0993807989999906, 0, -0.100790526135794, -0.0872871560943969, 0.0205737799949456, -0.01187827741833, 0.0167984210226323},
+      {0.23094010767585, 0, -0.140545673785261, -0.0993807989999906, -0.130120009726471, 0, 0.0290957186981323, 0, 0.02375655483666, 0.0167984210226323}};
     
       // Extract relevant coefficients
       const double coeff0_0 =   coefficients0[dof][0];
       const double coeff0_1 =   coefficients0[dof][1];
       const double coeff0_2 =   coefficients0[dof][2];
       const double coeff0_3 =   coefficients0[dof][3];
+      const double coeff0_4 =   coefficients0[dof][4];
+      const double coeff0_5 =   coefficients0[dof][5];
+      const double coeff0_6 =   coefficients0[dof][6];
+      const double coeff0_7 =   coefficients0[dof][7];
+      const double coeff0_8 =   coefficients0[dof][8];
+      const double coeff0_9 =   coefficients0[dof][9];
     
       // Compute value(s)
-      values[0] = coeff0_0*basisvalue0 + coeff0_1*basisvalue1 + coeff0_2*basisvalue2 + coeff0_3*basisvalue3;
-    }
-    
-    if (4 <= i && i <= 7)
-    {
-      // Map degree of freedom to element degree of freedom
-      const unsigned int dof = i - 4;
+      values[0] = coeff0_0*basisvalue0 + coeff0_1*basisvalue1 + coeff0_2*basisvalue2 + coeff0_3*basisvalue3 + coeff0_4*basisvalue4 + coeff0_5*basisvalue5 + coeff0_6*basisvalue6 + coeff0_7*basisvalue7 + coeff0_8*basisvalue8 + coeff0_9*basisvalue9;
+    }
+    
+    if (10 <= i && i <= 19)
+    {
+      // Map degree of freedom to element degree of freedom
+      const unsigned int dof = i - 10;
     
       // Generate scalings
       const double scalings_y_0 = 1;
       const double scalings_y_1 = scalings_y_0*(0.5 - 0.5*y);
+      const double scalings_y_2 = scalings_y_1*(0.5 - 0.5*y);
       const double scalings_z_0 = 1;
       const double scalings_z_1 = scalings_z_0*(0.5 - 0.5*z);
+      const double scalings_z_2 = scalings_z_1*(0.5 - 0.5*z);
     
       // Compute psitilde_a
       const double psitilde_a_0 = 1;
       const double psitilde_a_1 = x;
+      const double psitilde_a_2 = 1.5*x*psitilde_a_1 - 0.5*psitilde_a_0;
     
       // Compute psitilde_bs
       const double psitilde_bs_0_0 = 1;
       const double psitilde_bs_0_1 = 1.5*y + 0.5;
+      const double psitilde_bs_0_2 = 0.111111111111111*psitilde_bs_0_1 + 1.66666666666667*y*psitilde_bs_0_1 - 0.555555555555556*psitilde_bs_0_0;
       const double psitilde_bs_1_0 = 1;
+      const double psitilde_bs_1_1 = 2.5*y + 1.5;
+      const double psitilde_bs_2_0 = 1;
     
       // Compute psitilde_cs
       const double psitilde_cs_00_0 = 1;
       const double psitilde_cs_00_1 = 2*z + 1;
+      const double psitilde_cs_00_2 = 0.3125*psitilde_cs_00_1 + 1.875*z*psitilde_cs_00_1 - 0.5625*psitilde_cs_00_0;
       const double psitilde_cs_01_0 = 1;
+      const double psitilde_cs_01_1 = 3*z + 2;
+      const double psitilde_cs_02_0 = 1;
       const double psitilde_cs_10_0 = 1;
+      const double psitilde_cs_10_1 = 3*z + 2;
+      const double psitilde_cs_11_0 = 1;
+      const double psitilde_cs_20_0 = 1;
     
       // Compute basisvalues
       const double basisvalue0 = 0.866025403784439*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_0;
       const double basisvalue1 = 2.73861278752583*psitilde_a_1*scalings_y_1*psitilde_bs_1_0*scalings_z_1*psitilde_cs_10_0;
       const double basisvalue2 = 1.58113883008419*psitilde_a_0*scalings_y_0*psitilde_bs_0_1*scalings_z_1*psitilde_cs_01_0;
       const double basisvalue3 = 1.11803398874989*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_1;
-    
-      // Table(s) of coefficients
-      const static double coefficients0[4][4] =   \
-      {{0.288675134594813, -0.182574185835055, -0.105409255338946, -0.074535599249993},
-      {0.288675134594813, 0.182574185835055, -0.105409255338946, -0.074535599249993},
-      {0.288675134594813, 0, 0.210818510677892, -0.074535599249993},
-      {0.288675134594813, 0, 0, 0.223606797749979}};
+      const double basisvalue4 = 5.1234753829798*psitilde_a_2*scalings_y_2*psitilde_bs_2_0*scalings_z_2*psitilde_cs_20_0;
+      const double basisvalue5 = 3.96862696659689*psitilde_a_1*scalings_y_1*psitilde_bs_1_1*scalings_z_2*psitilde_cs_11_0;
+      const double basisvalue6 = 2.29128784747792*psitilde_a_0*scalings_y_0*psitilde_bs_0_2*scalings_z_2*psitilde_cs_02_0;
+      const double basisvalue7 = 3.24037034920393*psitilde_a_1*scalings_y_1*psitilde_bs_1_0*scalings_z_1*psitilde_cs_10_1;
+      const double basisvalue8 = 1.87082869338697*psitilde_a_0*scalings_y_0*psitilde_bs_0_1*scalings_z_1*psitilde_cs_01_1;
+      const double basisvalue9 = 1.3228756555323*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_2;
+    
+      // Table(s) of coefficients
+      const static double coefficients0[10][10] =   \
+      {{-0.0577350269189626, -0.0608580619450185, -0.0351364184463153, -0.0248451997499977, 0.0650600048632355, 0.0503952630678969, 0.0290957186981323, 0.0411475599898912, 0.0237565548366599, 0.0167984210226323},
+      {-0.0577350269189625, 0.0608580619450185, -0.0351364184463153, -0.0248451997499977, 0.0650600048632355, -0.050395263067897, 0.0290957186981323, -0.0411475599898912, 0.0237565548366599, 0.0167984210226323},
+      {-0.0577350269189625, 0, 0.0702728368926306, -0.0248451997499977, 0, 0, 0.0872871560943969, 0, -0.0475131096733199, 0.0167984210226323},
+      {-0.0577350269189626, 0, 0, 0.074535599249993, 0, 0, 0, 0, 0, 0.100790526135794},
+      {0.23094010767585, 0, 0.140545673785261, 0.0993807989999906, 0, 0, 0, 0, 0.1187827741833, -0.0671936840905293},
+      {0.230940107675851, 0.121716123890037, -0.0702728368926306, 0.0993807989999907, 0, 0, 0, 0.102868899974728, -0.0593913870916499, -0.0671936840905293},
+      {0.23094010767585, 0.121716123890037, 0.0702728368926307, -0.0993807989999907, 0, 0.100790526135794, -0.087287156094397, -0.0205737799949456, -0.01187827741833, 0.0167984210226323},
+      {0.23094010767585, -0.121716123890037, -0.0702728368926307, 0.0993807989999906, 0, 0, 0, -0.102868899974728, -0.0593913870916499, -0.0671936840905293},
+      {0.23094010767585, -0.121716123890037, 0.0702728368926306, -0.0993807989999906, 0, -0.100790526135794, -0.0872871560943969, 0.0205737799949456, -0.01187827741833, 0.0167984210226323},
+      {0.23094010767585, 0, -0.140545673785261, -0.0993807989999906, -0.130120009726471, 0, 0.0290957186981323, 0, 0.02375655483666, 0.0167984210226323}};
     
       // Extract relevant coefficients
       const double coeff0_0 =   coefficients0[dof][0];
       const double coeff0_1 =   coefficients0[dof][1];
       const double coeff0_2 =   coefficients0[dof][2];
       const double coeff0_3 =   coefficients0[dof][3];
+      const double coeff0_4 =   coefficients0[dof][4];
+      const double coeff0_5 =   coefficients0[dof][5];
+      const double coeff0_6 =   coefficients0[dof][6];
+      const double coeff0_7 =   coefficients0[dof][7];
+      const double coeff0_8 =   coefficients0[dof][8];
+      const double coeff0_9 =   coefficients0[dof][9];
     
       // Compute value(s)
-      values[1] = coeff0_0*basisvalue0 + coeff0_1*basisvalue1 + coeff0_2*basisvalue2 + coeff0_3*basisvalue3;
+      values[1] = coeff0_0*basisvalue0 + coeff0_1*basisvalue1 + coeff0_2*basisvalue2 + coeff0_3*basisvalue3 + coeff0_4*basisvalue4 + coeff0_5*basisvalue5 + coeff0_6*basisvalue6 + coeff0_7*basisvalue7 + coeff0_8*basisvalue8 + coeff0_9*basisvalue9;
     }
     
 }
@@ -1398,7 +1686,7 @@ void UFC_SolitaryWave3DBilinearForm_fini
     for (unsigned int j = 0; j < 2*num_derivatives; j++)
       values[j] = 0;
     
-    if (0 <= i && i <= 3)
+    if (0 <= i && i <= 9)
     {
       // Map degree of freedom to element degree of freedom
       const unsigned int dof = i;
@@ -1406,56 +1694,98 @@ void UFC_SolitaryWave3DBilinearForm_fini
       // Generate scalings
       const double scalings_y_0 = 1;
       const double scalings_y_1 = scalings_y_0*(0.5 - 0.5*y);
+      const double scalings_y_2 = scalings_y_1*(0.5 - 0.5*y);
       const double scalings_z_0 = 1;
       const double scalings_z_1 = scalings_z_0*(0.5 - 0.5*z);
+      const double scalings_z_2 = scalings_z_1*(0.5 - 0.5*z);
     
       // Compute psitilde_a
       const double psitilde_a_0 = 1;
       const double psitilde_a_1 = x;
+      const double psitilde_a_2 = 1.5*x*psitilde_a_1 - 0.5*psitilde_a_0;
     
       // Compute psitilde_bs
       const double psitilde_bs_0_0 = 1;
       const double psitilde_bs_0_1 = 1.5*y + 0.5;
+      const double psitilde_bs_0_2 = 0.111111111111111*psitilde_bs_0_1 + 1.66666666666667*y*psitilde_bs_0_1 - 0.555555555555556*psitilde_bs_0_0;
       const double psitilde_bs_1_0 = 1;
+      const double psitilde_bs_1_1 = 2.5*y + 1.5;
+      const double psitilde_bs_2_0 = 1;
     
       // Compute psitilde_cs
       const double psitilde_cs_00_0 = 1;
       const double psitilde_cs_00_1 = 2*z + 1;
+      const double psitilde_cs_00_2 = 0.3125*psitilde_cs_00_1 + 1.875*z*psitilde_cs_00_1 - 0.5625*psitilde_cs_00_0;
       const double psitilde_cs_01_0 = 1;
+      const double psitilde_cs_01_1 = 3*z + 2;
+      const double psitilde_cs_02_0 = 1;
       const double psitilde_cs_10_0 = 1;
+      const double psitilde_cs_10_1 = 3*z + 2;
+      const double psitilde_cs_11_0 = 1;
+      const double psitilde_cs_20_0 = 1;
     
       // Compute basisvalues
       const double basisvalue0 = 0.866025403784439*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_0;
       const double basisvalue1 = 2.73861278752583*psitilde_a_1*scalings_y_1*psitilde_bs_1_0*scalings_z_1*psitilde_cs_10_0;
       const double basisvalue2 = 1.58113883008419*psitilde_a_0*scalings_y_0*psitilde_bs_0_1*scalings_z_1*psitilde_cs_01_0;
       const double basisvalue3 = 1.11803398874989*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_1;
-    
-      // Table(s) of coefficients
-      const static double coefficients0[4][4] =   \
-      {{0.288675134594813, -0.182574185835055, -0.105409255338946, -0.074535599249993},
-      {0.288675134594813, 0.182574185835055, -0.105409255338946, -0.074535599249993},
-      {0.288675134594813, 0, 0.210818510677892, -0.074535599249993},
-      {0.288675134594813, 0, 0, 0.223606797749979}};
+      const double basisvalue4 = 5.1234753829798*psitilde_a_2*scalings_y_2*psitilde_bs_2_0*scalings_z_2*psitilde_cs_20_0;
+      const double basisvalue5 = 3.96862696659689*psitilde_a_1*scalings_y_1*psitilde_bs_1_1*scalings_z_2*psitilde_cs_11_0;
+      const double basisvalue6 = 2.29128784747792*psitilde_a_0*scalings_y_0*psitilde_bs_0_2*scalings_z_2*psitilde_cs_02_0;
+      const double basisvalue7 = 3.24037034920393*psitilde_a_1*scalings_y_1*psitilde_bs_1_0*scalings_z_1*psitilde_cs_10_1;
+      const double basisvalue8 = 1.87082869338697*psitilde_a_0*scalings_y_0*psitilde_bs_0_1*scalings_z_1*psitilde_cs_01_1;
+      const double basisvalue9 = 1.3228756555323*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_2;
+    
+      // Table(s) of coefficients
+      const static double coefficients0[10][10] =   \
+      {{-0.0577350269189626, -0.0608580619450185, -0.0351364184463153, -0.0248451997499977, 0.0650600048632355, 0.0503952630678969, 0.0290957186981323, 0.0411475599898912, 0.0237565548366599, 0.0167984210226323},
+      {-0.0577350269189625, 0.0608580619450185, -0.0351364184463153, -0.0248451997499977, 0.0650600048632355, -0.050395263067897, 0.0290957186981323, -0.0411475599898912, 0.0237565548366599, 0.0167984210226323},
+      {-0.0577350269189625, 0, 0.0702728368926306, -0.0248451997499977, 0, 0, 0.0872871560943969, 0, -0.0475131096733199, 0.0167984210226323},
+      {-0.0577350269189626, 0, 0, 0.074535599249993, 0, 0, 0, 0, 0, 0.100790526135794},
+      {0.23094010767585, 0, 0.140545673785261, 0.0993807989999906, 0, 0, 0, 0, 0.1187827741833, -0.0671936840905293},
+      {0.230940107675851, 0.121716123890037, -0.0702728368926306, 0.0993807989999907, 0, 0, 0, 0.102868899974728, -0.0593913870916499, -0.0671936840905293},
+      {0.23094010767585, 0.121716123890037, 0.0702728368926307, -0.0993807989999907, 0, 0.100790526135794, -0.087287156094397, -0.0205737799949456, -0.01187827741833, 0.0167984210226323},
+      {0.23094010767585, -0.121716123890037, -0.0702728368926307, 0.0993807989999906, 0, 0, 0, -0.102868899974728, -0.0593913870916499, -0.0671936840905293},
+      {0.23094010767585, -0.121716123890037, 0.0702728368926306, -0.0993807989999906, 0, -0.100790526135794, -0.0872871560943969, 0.0205737799949456, -0.01187827741833, 0.0167984210226323},
+      {0.23094010767585, 0, -0.140545673785261, -0.0993807989999906, -0.130120009726471, 0, 0.0290957186981323, 0, 0.02375655483666, 0.0167984210226323}};
     
       // Interesting (new) part
       // Tables of derivatives of the polynomial base (transpose)
-      const static double dmats0[4][4] =   \
-      {{0, 0, 0, 0},
-      {6.32455532033676, 0, 0, 0},
-      {0, 0, 0, 0},
-      {0, 0, 0, 0}};
-    
-      const static double dmats1[4][4] =   \
-      {{0, 0, 0, 0},
-      {3.16227766016838, 0, 0, 0},
-      {5.47722557505166, 0, 0, 0},
-      {0, 0, 0, 0}};
-    
-      const static double dmats2[4][4] =   \
-      {{0, 0, 0, 0},
-      {3.16227766016838, 0, 0, 0},
-      {1.82574185835055, 0, 0, 0},
-      {5.16397779494322, 0, 0, 0}};
+      const static double dmats0[10][10] =   \
+      {{0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {6.32455532033676, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {0, 11.2249721603218, 0, 0, 0, 0, 0, 0, 0, 0},
+      {4.58257569495584, 0, 8.36660026534076, -1.18321595661992, 0, 0, 0, 0, 0, 0},
+      {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {3.74165738677394, 0, 0, 8.69482604771366, 0, 0, 0, 0, 0, 0},
+      {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
+    
+      const static double dmats1[10][10] =   \
+      {{0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {3.16227766016838, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {5.47722557505166, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {2.95803989154981, 5.61248608016091, -1.08012344973464, -0.763762615825974, 0, 0, 0, 0, 0, 0},
+      {2.29128784747792, 7.24568837309472, 4.18330013267038, -0.591607978309962, 0, 0, 0, 0, 0, 0},
+      {-2.64575131106459, 0, 9.66091783079296, 0.683130051063974, 0, 0, 0, 0, 0, 0},
+      {1.87082869338697, 0, 0, 4.34741302385683, 0, 0, 0, 0, 0, 0},
+      {3.24037034920393, 0, 0, 7.52994023880668, 0, 0, 0, 0, 0, 0},
+      {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
+    
+      const static double dmats2[10][10] =   \
+      {{0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {3.16227766016838, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {1.82574185835055, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {5.16397779494322, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {2.95803989154981, 5.61248608016091, -1.08012344973464, -0.763762615825974, 0, 0, 0, 0, 0, 0},
+      {2.29128784747792, 1.44913767461894, 4.18330013267038, -0.591607978309962, 0, 0, 0, 0, 0, 0},
+      {1.32287565553229, 0, 3.86436713231718, -0.341565025531986, 0, 0, 0, 0, 0, 0},
+      {1.87082869338697, 7.09929573971954, 0, 4.34741302385683, 0, 0, 0, 0, 0, 0},
+      {1.08012344973464, 0, 7.09929573971954, 2.50998007960223, 0, 0, 0, 0, 0, 0},
+      {-3.81881307912987, 0, 0, 8.87411967464942, 0, 0, 0, 0, 0, 0}};
     
       // Compute reference derivatives
       // Declare pointer to array of derivatives on FIAT element
@@ -1466,12 +1796,24 @@ void UFC_SolitaryWave3DBilinearForm_fini
       double coeff0_1 = 0;
       double coeff0_2 = 0;
       double coeff0_3 = 0;
+      double coeff0_4 = 0;
+      double coeff0_5 = 0;
+      double coeff0_6 = 0;
+      double coeff0_7 = 0;
+      double coeff0_8 = 0;
+      double coeff0_9 = 0;
     
       // Declare new coefficients
       double new_coeff0_0 = 0;
       double new_coeff0_1 = 0;
       double new_coeff0_2 = 0;
       double new_coeff0_3 = 0;
+      double new_coeff0_4 = 0;
+      double new_coeff0_5 = 0;
+      double new_coeff0_6 = 0;
+      double new_coeff0_7 = 0;
+      double new_coeff0_8 = 0;
+      double new_coeff0_9 = 0;
     
       // Loop possible derivatives
       for (unsigned int deriv_num = 0; deriv_num < num_derivatives; deriv_num++)
@@ -1481,6 +1823,12 @@ void UFC_SolitaryWave3DBilinearForm_fini
         new_coeff0_1 = coefficients0[dof][1];
         new_coeff0_2 = coefficients0[dof][2];
         new_coeff0_3 = coefficients0[dof][3];
+        new_coeff0_4 = coefficients0[dof][4];
+        new_coeff0_5 = coefficients0[dof][5];
+        new_coeff0_6 = coefficients0[dof][6];
+        new_coeff0_7 = coefficients0[dof][7];
+        new_coeff0_8 = coefficients0[dof][8];
+        new_coeff0_9 = coefficients0[dof][9];
     
         // Loop derivative order
         for (unsigned int j = 0; j < n; j++)
@@ -1490,32 +1838,56 @@ void UFC_SolitaryWave3DBilinearForm_fini
           coeff0_1 = new_coeff0_1;
           coeff0_2 = new_coeff0_2;
           coeff0_3 = new_coeff0_3;
+          coeff0_4 = new_coeff0_4;
+          coeff0_5 = new_coeff0_5;
+          coeff0_6 = new_coeff0_6;
+          coeff0_7 = new_coeff0_7;
+          coeff0_8 = new_coeff0_8;
+          coeff0_9 = new_coeff0_9;
     
           if(combinations[deriv_num][j] == 0)
           {
-            new_coeff0_0 = coeff0_0*dmats0[0][0] + coeff0_1*dmats0[1][0] + coeff0_2*dmats0[2][0] + coeff0_3*dmats0[3][0];
-            new_coeff0_1 = coeff0_0*dmats0[0][1] + coeff0_1*dmats0[1][1] + coeff0_2*dmats0[2][1] + coeff0_3*dmats0[3][1];
-            new_coeff0_2 = coeff0_0*dmats0[0][2] + coeff0_1*dmats0[1][2] + coeff0_2*dmats0[2][2] + coeff0_3*dmats0[3][2];
-            new_coeff0_3 = coeff0_0*dmats0[0][3] + coeff0_1*dmats0[1][3] + coeff0_2*dmats0[2][3] + coeff0_3*dmats0[3][3];
+            new_coeff0_0 = coeff0_0*dmats0[0][0] + coeff0_1*dmats0[1][0] + coeff0_2*dmats0[2][0] + coeff0_3*dmats0[3][0] + coeff0_4*dmats0[4][0] + coeff0_5*dmats0[5][0] + coeff0_6*dmats0[6][0] + coeff0_7*dmats0[7][0] + coeff0_8*dmats0[8][0] + coeff0_9*dmats0[9][0];
+            new_coeff0_1 = coeff0_0*dmats0[0][1] + coeff0_1*dmats0[1][1] + coeff0_2*dmats0[2][1] + coeff0_3*dmats0[3][1] + coeff0_4*dmats0[4][1] + coeff0_5*dmats0[5][1] + coeff0_6*dmats0[6][1] + coeff0_7*dmats0[7][1] + coeff0_8*dmats0[8][1] + coeff0_9*dmats0[9][1];
+            new_coeff0_2 = coeff0_0*dmats0[0][2] + coeff0_1*dmats0[1][2] + coeff0_2*dmats0[2][2] + coeff0_3*dmats0[3][2] + coeff0_4*dmats0[4][2] + coeff0_5*dmats0[5][2] + coeff0_6*dmats0[6][2] + coeff0_7*dmats0[7][2] + coeff0_8*dmats0[8][2] + coeff0_9*dmats0[9][2];
+            new_coeff0_3 = coeff0_0*dmats0[0][3] + coeff0_1*dmats0[1][3] + coeff0_2*dmats0[2][3] + coeff0_3*dmats0[3][3] + coeff0_4*dmats0[4][3] + coeff0_5*dmats0[5][3] + coeff0_6*dmats0[6][3] + coeff0_7*dmats0[7][3] + coeff0_8*dmats0[8][3] + coeff0_9*dmats0[9][3];
+            new_coeff0_4 = coeff0_0*dmats0[0][4] + coeff0_1*dmats0[1][4] + coeff0_2*dmats0[2][4] + coeff0_3*dmats0[3][4] + coeff0_4*dmats0[4][4] + coeff0_5*dmats0[5][4] + coeff0_6*dmats0[6][4] + coeff0_7*dmats0[7][4] + coeff0_8*dmats0[8][4] + coeff0_9*dmats0[9][4];
+            new_coeff0_5 = coeff0_0*dmats0[0][5] + coeff0_1*dmats0[1][5] + coeff0_2*dmats0[2][5] + coeff0_3*dmats0[3][5] + coeff0_4*dmats0[4][5] + coeff0_5*dmats0[5][5] + coeff0_6*dmats0[6][5] + coeff0_7*dmats0[7][5] + coeff0_8*dmats0[8][5] + coeff0_9*dmats0[9][5];
+            new_coeff0_6 = coeff0_0*dmats0[0][6] + coeff0_1*dmats0[1][6] + coeff0_2*dmats0[2][6] + coeff0_3*dmats0[3][6] + coeff0_4*dmats0[4][6] + coeff0_5*dmats0[5][6] + coeff0_6*dmats0[6][6] + coeff0_7*dmats0[7][6] + coeff0_8*dmats0[8][6] + coeff0_9*dmats0[9][6];
+            new_coeff0_7 = coeff0_0*dmats0[0][7] + coeff0_1*dmats0[1][7] + coeff0_2*dmats0[2][7] + coeff0_3*dmats0[3][7] + coeff0_4*dmats0[4][7] + coeff0_5*dmats0[5][7] + coeff0_6*dmats0[6][7] + coeff0_7*dmats0[7][7] + coeff0_8*dmats0[8][7] + coeff0_9*dmats0[9][7];
+            new_coeff0_8 = coeff0_0*dmats0[0][8] + coeff0_1*dmats0[1][8] + coeff0_2*dmats0[2][8] + coeff0_3*dmats0[3][8] + coeff0_4*dmats0[4][8] + coeff0_5*dmats0[5][8] + coeff0_6*dmats0[6][8] + coeff0_7*dmats0[7][8] + coeff0_8*dmats0[8][8] + coeff0_9*dmats0[9][8];
+            new_coeff0_9 = coeff0_0*dmats0[0][9] + coeff0_1*dmats0[1][9] + coeff0_2*dmats0[2][9] + coeff0_3*dmats0[3][9] + coeff0_4*dmats0[4][9] + coeff0_5*dmats0[5][9] + coeff0_6*dmats0[6][9] + coeff0_7*dmats0[7][9] + coeff0_8*dmats0[8][9] + coeff0_9*dmats0[9][9];
           }
           if(combinations[deriv_num][j] == 1)
           {
-            new_coeff0_0 = coeff0_0*dmats1[0][0] + coeff0_1*dmats1[1][0] + coeff0_2*dmats1[2][0] + coeff0_3*dmats1[3][0];
-            new_coeff0_1 = coeff0_0*dmats1[0][1] + coeff0_1*dmats1[1][1] + coeff0_2*dmats1[2][1] + coeff0_3*dmats1[3][1];
-            new_coeff0_2 = coeff0_0*dmats1[0][2] + coeff0_1*dmats1[1][2] + coeff0_2*dmats1[2][2] + coeff0_3*dmats1[3][2];
-            new_coeff0_3 = coeff0_0*dmats1[0][3] + coeff0_1*dmats1[1][3] + coeff0_2*dmats1[2][3] + coeff0_3*dmats1[3][3];
+            new_coeff0_0 = coeff0_0*dmats1[0][0] + coeff0_1*dmats1[1][0] + coeff0_2*dmats1[2][0] + coeff0_3*dmats1[3][0] + coeff0_4*dmats1[4][0] + coeff0_5*dmats1[5][0] + coeff0_6*dmats1[6][0] + coeff0_7*dmats1[7][0] + coeff0_8*dmats1[8][0] + coeff0_9*dmats1[9][0];
+            new_coeff0_1 = coeff0_0*dmats1[0][1] + coeff0_1*dmats1[1][1] + coeff0_2*dmats1[2][1] + coeff0_3*dmats1[3][1] + coeff0_4*dmats1[4][1] + coeff0_5*dmats1[5][1] + coeff0_6*dmats1[6][1] + coeff0_7*dmats1[7][1] + coeff0_8*dmats1[8][1] + coeff0_9*dmats1[9][1];
+            new_coeff0_2 = coeff0_0*dmats1[0][2] + coeff0_1*dmats1[1][2] + coeff0_2*dmats1[2][2] + coeff0_3*dmats1[3][2] + coeff0_4*dmats1[4][2] + coeff0_5*dmats1[5][2] + coeff0_6*dmats1[6][2] + coeff0_7*dmats1[7][2] + coeff0_8*dmats1[8][2] + coeff0_9*dmats1[9][2];
+            new_coeff0_3 = coeff0_0*dmats1[0][3] + coeff0_1*dmats1[1][3] + coeff0_2*dmats1[2][3] + coeff0_3*dmats1[3][3] + coeff0_4*dmats1[4][3] + coeff0_5*dmats1[5][3] + coeff0_6*dmats1[6][3] + coeff0_7*dmats1[7][3] + coeff0_8*dmats1[8][3] + coeff0_9*dmats1[9][3];
+            new_coeff0_4 = coeff0_0*dmats1[0][4] + coeff0_1*dmats1[1][4] + coeff0_2*dmats1[2][4] + coeff0_3*dmats1[3][4] + coeff0_4*dmats1[4][4] + coeff0_5*dmats1[5][4] + coeff0_6*dmats1[6][4] + coeff0_7*dmats1[7][4] + coeff0_8*dmats1[8][4] + coeff0_9*dmats1[9][4];
+            new_coeff0_5 = coeff0_0*dmats1[0][5] + coeff0_1*dmats1[1][5] + coeff0_2*dmats1[2][5] + coeff0_3*dmats1[3][5] + coeff0_4*dmats1[4][5] + coeff0_5*dmats1[5][5] + coeff0_6*dmats1[6][5] + coeff0_7*dmats1[7][5] + coeff0_8*dmats1[8][5] + coeff0_9*dmats1[9][5];
+            new_coeff0_6 = coeff0_0*dmats1[0][6] + coeff0_1*dmats1[1][6] + coeff0_2*dmats1[2][6] + coeff0_3*dmats1[3][6] + coeff0_4*dmats1[4][6] + coeff0_5*dmats1[5][6] + coeff0_6*dmats1[6][6] + coeff0_7*dmats1[7][6] + coeff0_8*dmats1[8][6] + coeff0_9*dmats1[9][6];
+            new_coeff0_7 = coeff0_0*dmats1[0][7] + coeff0_1*dmats1[1][7] + coeff0_2*dmats1[2][7] + coeff0_3*dmats1[3][7] + coeff0_4*dmats1[4][7] + coeff0_5*dmats1[5][7] + coeff0_6*dmats1[6][7] + coeff0_7*dmats1[7][7] + coeff0_8*dmats1[8][7] + coeff0_9*dmats1[9][7];
+            new_coeff0_8 = coeff0_0*dmats1[0][8] + coeff0_1*dmats1[1][8] + coeff0_2*dmats1[2][8] + coeff0_3*dmats1[3][8] + coeff0_4*dmats1[4][8] + coeff0_5*dmats1[5][8] + coeff0_6*dmats1[6][8] + coeff0_7*dmats1[7][8] + coeff0_8*dmats1[8][8] + coeff0_9*dmats1[9][8];
+            new_coeff0_9 = coeff0_0*dmats1[0][9] + coeff0_1*dmats1[1][9] + coeff0_2*dmats1[2][9] + coeff0_3*dmats1[3][9] + coeff0_4*dmats1[4][9] + coeff0_5*dmats1[5][9] + coeff0_6*dmats1[6][9] + coeff0_7*dmats1[7][9] + coeff0_8*dmats1[8][9] + coeff0_9*dmats1[9][9];
           }
           if(combinations[deriv_num][j] == 2)
           {
-            new_coeff0_0 = coeff0_0*dmats2[0][0] + coeff0_1*dmats2[1][0] + coeff0_2*dmats2[2][0] + coeff0_3*dmats2[3][0];
-            new_coeff0_1 = coeff0_0*dmats2[0][1] + coeff0_1*dmats2[1][1] + coeff0_2*dmats2[2][1] + coeff0_3*dmats2[3][1];
-            new_coeff0_2 = coeff0_0*dmats2[0][2] + coeff0_1*dmats2[1][2] + coeff0_2*dmats2[2][2] + coeff0_3*dmats2[3][2];
-            new_coeff0_3 = coeff0_0*dmats2[0][3] + coeff0_1*dmats2[1][3] + coeff0_2*dmats2[2][3] + coeff0_3*dmats2[3][3];
+            new_coeff0_0 = coeff0_0*dmats2[0][0] + coeff0_1*dmats2[1][0] + coeff0_2*dmats2[2][0] + coeff0_3*dmats2[3][0] + coeff0_4*dmats2[4][0] + coeff0_5*dmats2[5][0] + coeff0_6*dmats2[6][0] + coeff0_7*dmats2[7][0] + coeff0_8*dmats2[8][0] + coeff0_9*dmats2[9][0];
+            new_coeff0_1 = coeff0_0*dmats2[0][1] + coeff0_1*dmats2[1][1] + coeff0_2*dmats2[2][1] + coeff0_3*dmats2[3][1] + coeff0_4*dmats2[4][1] + coeff0_5*dmats2[5][1] + coeff0_6*dmats2[6][1] + coeff0_7*dmats2[7][1] + coeff0_8*dmats2[8][1] + coeff0_9*dmats2[9][1];
+            new_coeff0_2 = coeff0_0*dmats2[0][2] + coeff0_1*dmats2[1][2] + coeff0_2*dmats2[2][2] + coeff0_3*dmats2[3][2] + coeff0_4*dmats2[4][2] + coeff0_5*dmats2[5][2] + coeff0_6*dmats2[6][2] + coeff0_7*dmats2[7][2] + coeff0_8*dmats2[8][2] + coeff0_9*dmats2[9][2];
+            new_coeff0_3 = coeff0_0*dmats2[0][3] + coeff0_1*dmats2[1][3] + coeff0_2*dmats2[2][3] + coeff0_3*dmats2[3][3] + coeff0_4*dmats2[4][3] + coeff0_5*dmats2[5][3] + coeff0_6*dmats2[6][3] + coeff0_7*dmats2[7][3] + coeff0_8*dmats2[8][3] + coeff0_9*dmats2[9][3];
+            new_coeff0_4 = coeff0_0*dmats2[0][4] + coeff0_1*dmats2[1][4] + coeff0_2*dmats2[2][4] + coeff0_3*dmats2[3][4] + coeff0_4*dmats2[4][4] + coeff0_5*dmats2[5][4] + coeff0_6*dmats2[6][4] + coeff0_7*dmats2[7][4] + coeff0_8*dmats2[8][4] + coeff0_9*dmats2[9][4];
+            new_coeff0_5 = coeff0_0*dmats2[0][5] + coeff0_1*dmats2[1][5] + coeff0_2*dmats2[2][5] + coeff0_3*dmats2[3][5] + coeff0_4*dmats2[4][5] + coeff0_5*dmats2[5][5] + coeff0_6*dmats2[6][5] + coeff0_7*dmats2[7][5] + coeff0_8*dmats2[8][5] + coeff0_9*dmats2[9][5];
+            new_coeff0_6 = coeff0_0*dmats2[0][6] + coeff0_1*dmats2[1][6] + coeff0_2*dmats2[2][6] + coeff0_3*dmats2[3][6] + coeff0_4*dmats2[4][6] + coeff0_5*dmats2[5][6] + coeff0_6*dmats2[6][6] + coeff0_7*dmats2[7][6] + coeff0_8*dmats2[8][6] + coeff0_9*dmats2[9][6];
+            new_coeff0_7 = coeff0_0*dmats2[0][7] + coeff0_1*dmats2[1][7] + coeff0_2*dmats2[2][7] + coeff0_3*dmats2[3][7] + coeff0_4*dmats2[4][7] + coeff0_5*dmats2[5][7] + coeff0_6*dmats2[6][7] + coeff0_7*dmats2[7][7] + coeff0_8*dmats2[8][7] + coeff0_9*dmats2[9][7];
+            new_coeff0_8 = coeff0_0*dmats2[0][8] + coeff0_1*dmats2[1][8] + coeff0_2*dmats2[2][8] + coeff0_3*dmats2[3][8] + coeff0_4*dmats2[4][8] + coeff0_5*dmats2[5][8] + coeff0_6*dmats2[6][8] + coeff0_7*dmats2[7][8] + coeff0_8*dmats2[8][8] + coeff0_9*dmats2[9][8];
+            new_coeff0_9 = coeff0_0*dmats2[0][9] + coeff0_1*dmats2[1][9] + coeff0_2*dmats2[2][9] + coeff0_3*dmats2[3][9] + coeff0_4*dmats2[4][9] + coeff0_5*dmats2[5][9] + coeff0_6*dmats2[6][9] + coeff0_7*dmats2[7][9] + coeff0_8*dmats2[8][9] + coeff0_9*dmats2[9][9];
           }
     
         }
         // Compute derivatives on reference element as dot product of coefficients and basisvalues
-        derivatives[deriv_num] = new_coeff0_0*basisvalue0 + new_coeff0_1*basisvalue1 + new_coeff0_2*basisvalue2 + new_coeff0_3*basisvalue3;
+        derivatives[deriv_num] = new_coeff0_0*basisvalue0 + new_coeff0_1*basisvalue1 + new_coeff0_2*basisvalue2 + new_coeff0_3*basisvalue3 + new_coeff0_4*basisvalue4 + new_coeff0_5*basisvalue5 + new_coeff0_6*basisvalue6 + new_coeff0_7*basisvalue7 + new_coeff0_8*basisvalue8 + new_coeff0_9*basisvalue9;
       }
     
       // Transform derivatives back to physical element
@@ -1540,64 +1912,106 @@ void UFC_SolitaryWave3DBilinearForm_fini
       delete [] transform;
     }
     
-    if (4 <= i && i <= 7)
-    {
-      // Map degree of freedom to element degree of freedom
-      const unsigned int dof = i - 4;
+    if (10 <= i && i <= 19)
+    {
+      // Map degree of freedom to element degree of freedom
+      const unsigned int dof = i - 10;
     
       // Generate scalings
       const double scalings_y_0 = 1;
       const double scalings_y_1 = scalings_y_0*(0.5 - 0.5*y);
+      const double scalings_y_2 = scalings_y_1*(0.5 - 0.5*y);
       const double scalings_z_0 = 1;
       const double scalings_z_1 = scalings_z_0*(0.5 - 0.5*z);
+      const double scalings_z_2 = scalings_z_1*(0.5 - 0.5*z);
     
       // Compute psitilde_a
       const double psitilde_a_0 = 1;
       const double psitilde_a_1 = x;
+      const double psitilde_a_2 = 1.5*x*psitilde_a_1 - 0.5*psitilde_a_0;
     
       // Compute psitilde_bs
       const double psitilde_bs_0_0 = 1;
       const double psitilde_bs_0_1 = 1.5*y + 0.5;
+      const double psitilde_bs_0_2 = 0.111111111111111*psitilde_bs_0_1 + 1.66666666666667*y*psitilde_bs_0_1 - 0.555555555555556*psitilde_bs_0_0;
       const double psitilde_bs_1_0 = 1;
+      const double psitilde_bs_1_1 = 2.5*y + 1.5;
+      const double psitilde_bs_2_0 = 1;
     
       // Compute psitilde_cs
       const double psitilde_cs_00_0 = 1;
       const double psitilde_cs_00_1 = 2*z + 1;
+      const double psitilde_cs_00_2 = 0.3125*psitilde_cs_00_1 + 1.875*z*psitilde_cs_00_1 - 0.5625*psitilde_cs_00_0;
       const double psitilde_cs_01_0 = 1;
+      const double psitilde_cs_01_1 = 3*z + 2;
+      const double psitilde_cs_02_0 = 1;
       const double psitilde_cs_10_0 = 1;
+      const double psitilde_cs_10_1 = 3*z + 2;
+      const double psitilde_cs_11_0 = 1;
+      const double psitilde_cs_20_0 = 1;
     
       // Compute basisvalues
       const double basisvalue0 = 0.866025403784439*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_0;
       const double basisvalue1 = 2.73861278752583*psitilde_a_1*scalings_y_1*psitilde_bs_1_0*scalings_z_1*psitilde_cs_10_0;
       const double basisvalue2 = 1.58113883008419*psitilde_a_0*scalings_y_0*psitilde_bs_0_1*scalings_z_1*psitilde_cs_01_0;
       const double basisvalue3 = 1.11803398874989*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_1;
-    
-      // Table(s) of coefficients
-      const static double coefficients0[4][4] =   \
-      {{0.288675134594813, -0.182574185835055, -0.105409255338946, -0.074535599249993},
-      {0.288675134594813, 0.182574185835055, -0.105409255338946, -0.074535599249993},
-      {0.288675134594813, 0, 0.210818510677892, -0.074535599249993},
-      {0.288675134594813, 0, 0, 0.223606797749979}};
+      const double basisvalue4 = 5.1234753829798*psitilde_a_2*scalings_y_2*psitilde_bs_2_0*scalings_z_2*psitilde_cs_20_0;
+      const double basisvalue5 = 3.96862696659689*psitilde_a_1*scalings_y_1*psitilde_bs_1_1*scalings_z_2*psitilde_cs_11_0;
+      const double basisvalue6 = 2.29128784747792*psitilde_a_0*scalings_y_0*psitilde_bs_0_2*scalings_z_2*psitilde_cs_02_0;
+      const double basisvalue7 = 3.24037034920393*psitilde_a_1*scalings_y_1*psitilde_bs_1_0*scalings_z_1*psitilde_cs_10_1;
+      const double basisvalue8 = 1.87082869338697*psitilde_a_0*scalings_y_0*psitilde_bs_0_1*scalings_z_1*psitilde_cs_01_1;
+      const double basisvalue9 = 1.3228756555323*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_2;
+    
+      // Table(s) of coefficients
+      const static double coefficients0[10][10] =   \
+      {{-0.0577350269189626, -0.0608580619450185, -0.0351364184463153, -0.0248451997499977, 0.0650600048632355, 0.0503952630678969, 0.0290957186981323, 0.0411475599898912, 0.0237565548366599, 0.0167984210226323},
+      {-0.0577350269189625, 0.0608580619450185, -0.0351364184463153, -0.0248451997499977, 0.0650600048632355, -0.050395263067897, 0.0290957186981323, -0.0411475599898912, 0.0237565548366599, 0.0167984210226323},
+      {-0.0577350269189625, 0, 0.0702728368926306, -0.0248451997499977, 0, 0, 0.0872871560943969, 0, -0.0475131096733199, 0.0167984210226323},
+      {-0.0577350269189626, 0, 0, 0.074535599249993, 0, 0, 0, 0, 0, 0.100790526135794},
+      {0.23094010767585, 0, 0.140545673785261, 0.0993807989999906, 0, 0, 0, 0, 0.1187827741833, -0.0671936840905293},
+      {0.230940107675851, 0.121716123890037, -0.0702728368926306, 0.0993807989999907, 0, 0, 0, 0.102868899974728, -0.0593913870916499, -0.0671936840905293},
+      {0.23094010767585, 0.121716123890037, 0.0702728368926307, -0.0993807989999907, 0, 0.100790526135794, -0.087287156094397, -0.0205737799949456, -0.01187827741833, 0.0167984210226323},
+      {0.23094010767585, -0.121716123890037, -0.0702728368926307, 0.0993807989999906, 0, 0, 0, -0.102868899974728, -0.0593913870916499, -0.0671936840905293},
+      {0.23094010767585, -0.121716123890037, 0.0702728368926306, -0.0993807989999906, 0, -0.100790526135794, -0.0872871560943969, 0.0205737799949456, -0.01187827741833, 0.0167984210226323},
+      {0.23094010767585, 0, -0.140545673785261, -0.0993807989999906, -0.130120009726471, 0, 0.0290957186981323, 0, 0.02375655483666, 0.0167984210226323}};
     
       // Interesting (new) part
       // Tables of derivatives of the polynomial base (transpose)
-      const static double dmats0[4][4] =   \
-      {{0, 0, 0, 0},
-      {6.32455532033676, 0, 0, 0},
-      {0, 0, 0, 0},
-      {0, 0, 0, 0}};
-    
-      const static double dmats1[4][4] =   \
-      {{0, 0, 0, 0},
-      {3.16227766016838, 0, 0, 0},
-      {5.47722557505166, 0, 0, 0},
-      {0, 0, 0, 0}};
-    
-      const static double dmats2[4][4] =   \
-      {{0, 0, 0, 0},
-      {3.16227766016838, 0, 0, 0},
-      {1.82574185835055, 0, 0, 0},
-      {5.16397779494322, 0, 0, 0}};
+      const static double dmats0[10][10] =   \
+      {{0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {6.32455532033676, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {0, 11.2249721603218, 0, 0, 0, 0, 0, 0, 0, 0},
+      {4.58257569495584, 0, 8.36660026534076, -1.18321595661992, 0, 0, 0, 0, 0, 0},
+      {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {3.74165738677394, 0, 0, 8.69482604771366, 0, 0, 0, 0, 0, 0},
+      {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
+    
+      const static double dmats1[10][10] =   \
+      {{0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {3.16227766016838, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {5.47722557505166, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {2.95803989154981, 5.61248608016091, -1.08012344973464, -0.763762615825974, 0, 0, 0, 0, 0, 0},
+      {2.29128784747792, 7.24568837309472, 4.18330013267038, -0.591607978309962, 0, 0, 0, 0, 0, 0},
+      {-2.64575131106459, 0, 9.66091783079296, 0.683130051063974, 0, 0, 0, 0, 0, 0},
+      {1.87082869338697, 0, 0, 4.34741302385683, 0, 0, 0, 0, 0, 0},
+      {3.24037034920393, 0, 0, 7.52994023880668, 0, 0, 0, 0, 0, 0},
+      {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
+    
+      const static double dmats2[10][10] =   \
+      {{0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {3.16227766016838, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {1.82574185835055, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {5.16397779494322, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {2.95803989154981, 5.61248608016091, -1.08012344973464, -0.763762615825974, 0, 0, 0, 0, 0, 0},
+      {2.29128784747792, 1.44913767461894, 4.18330013267038, -0.591607978309962, 0, 0, 0, 0, 0, 0},
+      {1.32287565553229, 0, 3.86436713231718, -0.341565025531986, 0, 0, 0, 0, 0, 0},
+      {1.87082869338697, 7.09929573971954, 0, 4.34741302385683, 0, 0, 0, 0, 0, 0},
+      {1.08012344973464, 0, 7.09929573971954, 2.50998007960223, 0, 0, 0, 0, 0, 0},
+      {-3.81881307912987, 0, 0, 8.87411967464942, 0, 0, 0, 0, 0, 0}};
     
       // Compute reference derivatives
       // Declare pointer to array of derivatives on FIAT element
@@ -1608,12 +2022,24 @@ void UFC_SolitaryWave3DBilinearForm_fini
       double coeff0_1 = 0;
       double coeff0_2 = 0;
       double coeff0_3 = 0;
+      double coeff0_4 = 0;
+      double coeff0_5 = 0;
+      double coeff0_6 = 0;
+      double coeff0_7 = 0;
+      double coeff0_8 = 0;
+      double coeff0_9 = 0;
     
       // Declare new coefficients
       double new_coeff0_0 = 0;
       double new_coeff0_1 = 0;
       double new_coeff0_2 = 0;
       double new_coeff0_3 = 0;
+      double new_coeff0_4 = 0;
+      double new_coeff0_5 = 0;
+      double new_coeff0_6 = 0;
+      double new_coeff0_7 = 0;
+      double new_coeff0_8 = 0;
+      double new_coeff0_9 = 0;
     
       // Loop possible derivatives
       for (unsigned int deriv_num = 0; deriv_num < num_derivatives; deriv_num++)
@@ -1623,6 +2049,12 @@ void UFC_SolitaryWave3DBilinearForm_fini
         new_coeff0_1 = coefficients0[dof][1];
         new_coeff0_2 = coefficients0[dof][2];
         new_coeff0_3 = coefficients0[dof][3];
+        new_coeff0_4 = coefficients0[dof][4];
+        new_coeff0_5 = coefficients0[dof][5];
+        new_coeff0_6 = coefficients0[dof][6];
+        new_coeff0_7 = coefficients0[dof][7];
+        new_coeff0_8 = coefficients0[dof][8];
+        new_coeff0_9 = coefficients0[dof][9];
     
         // Loop derivative order
         for (unsigned int j = 0; j < n; j++)
@@ -1632,32 +2064,56 @@ void UFC_SolitaryWave3DBilinearForm_fini
           coeff0_1 = new_coeff0_1;
           coeff0_2 = new_coeff0_2;
           coeff0_3 = new_coeff0_3;
+          coeff0_4 = new_coeff0_4;
+          coeff0_5 = new_coeff0_5;
+          coeff0_6 = new_coeff0_6;
+          coeff0_7 = new_coeff0_7;
+          coeff0_8 = new_coeff0_8;
+          coeff0_9 = new_coeff0_9;
     
           if(combinations[deriv_num][j] == 0)
           {
-            new_coeff0_0 = coeff0_0*dmats0[0][0] + coeff0_1*dmats0[1][0] + coeff0_2*dmats0[2][0] + coeff0_3*dmats0[3][0];
-            new_coeff0_1 = coeff0_0*dmats0[0][1] + coeff0_1*dmats0[1][1] + coeff0_2*dmats0[2][1] + coeff0_3*dmats0[3][1];
-            new_coeff0_2 = coeff0_0*dmats0[0][2] + coeff0_1*dmats0[1][2] + coeff0_2*dmats0[2][2] + coeff0_3*dmats0[3][2];
-            new_coeff0_3 = coeff0_0*dmats0[0][3] + coeff0_1*dmats0[1][3] + coeff0_2*dmats0[2][3] + coeff0_3*dmats0[3][3];
+            new_coeff0_0 = coeff0_0*dmats0[0][0] + coeff0_1*dmats0[1][0] + coeff0_2*dmats0[2][0] + coeff0_3*dmats0[3][0] + coeff0_4*dmats0[4][0] + coeff0_5*dmats0[5][0] + coeff0_6*dmats0[6][0] + coeff0_7*dmats0[7][0] + coeff0_8*dmats0[8][0] + coeff0_9*dmats0[9][0];
+            new_coeff0_1 = coeff0_0*dmats0[0][1] + coeff0_1*dmats0[1][1] + coeff0_2*dmats0[2][1] + coeff0_3*dmats0[3][1] + coeff0_4*dmats0[4][1] + coeff0_5*dmats0[5][1] + coeff0_6*dmats0[6][1] + coeff0_7*dmats0[7][1] + coeff0_8*dmats0[8][1] + coeff0_9*dmats0[9][1];
+            new_coeff0_2 = coeff0_0*dmats0[0][2] + coeff0_1*dmats0[1][2] + coeff0_2*dmats0[2][2] + coeff0_3*dmats0[3][2] + coeff0_4*dmats0[4][2] + coeff0_5*dmats0[5][2] + coeff0_6*dmats0[6][2] + coeff0_7*dmats0[7][2] + coeff0_8*dmats0[8][2] + coeff0_9*dmats0[9][2];
+            new_coeff0_3 = coeff0_0*dmats0[0][3] + coeff0_1*dmats0[1][3] + coeff0_2*dmats0[2][3] + coeff0_3*dmats0[3][3] + coeff0_4*dmats0[4][3] + coeff0_5*dmats0[5][3] + coeff0_6*dmats0[6][3] + coeff0_7*dmats0[7][3] + coeff0_8*dmats0[8][3] + coeff0_9*dmats0[9][3];
+            new_coeff0_4 = coeff0_0*dmats0[0][4] + coeff0_1*dmats0[1][4] + coeff0_2*dmats0[2][4] + coeff0_3*dmats0[3][4] + coeff0_4*dmats0[4][4] + coeff0_5*dmats0[5][4] + coeff0_6*dmats0[6][4] + coeff0_7*dmats0[7][4] + coeff0_8*dmats0[8][4] + coeff0_9*dmats0[9][4];
+            new_coeff0_5 = coeff0_0*dmats0[0][5] + coeff0_1*dmats0[1][5] + coeff0_2*dmats0[2][5] + coeff0_3*dmats0[3][5] + coeff0_4*dmats0[4][5] + coeff0_5*dmats0[5][5] + coeff0_6*dmats0[6][5] + coeff0_7*dmats0[7][5] + coeff0_8*dmats0[8][5] + coeff0_9*dmats0[9][5];
+            new_coeff0_6 = coeff0_0*dmats0[0][6] + coeff0_1*dmats0[1][6] + coeff0_2*dmats0[2][6] + coeff0_3*dmats0[3][6] + coeff0_4*dmats0[4][6] + coeff0_5*dmats0[5][6] + coeff0_6*dmats0[6][6] + coeff0_7*dmats0[7][6] + coeff0_8*dmats0[8][6] + coeff0_9*dmats0[9][6];
+            new_coeff0_7 = coeff0_0*dmats0[0][7] + coeff0_1*dmats0[1][7] + coeff0_2*dmats0[2][7] + coeff0_3*dmats0[3][7] + coeff0_4*dmats0[4][7] + coeff0_5*dmats0[5][7] + coeff0_6*dmats0[6][7] + coeff0_7*dmats0[7][7] + coeff0_8*dmats0[8][7] + coeff0_9*dmats0[9][7];
+            new_coeff0_8 = coeff0_0*dmats0[0][8] + coeff0_1*dmats0[1][8] + coeff0_2*dmats0[2][8] + coeff0_3*dmats0[3][8] + coeff0_4*dmats0[4][8] + coeff0_5*dmats0[5][8] + coeff0_6*dmats0[6][8] + coeff0_7*dmats0[7][8] + coeff0_8*dmats0[8][8] + coeff0_9*dmats0[9][8];
+            new_coeff0_9 = coeff0_0*dmats0[0][9] + coeff0_1*dmats0[1][9] + coeff0_2*dmats0[2][9] + coeff0_3*dmats0[3][9] + coeff0_4*dmats0[4][9] + coeff0_5*dmats0[5][9] + coeff0_6*dmats0[6][9] + coeff0_7*dmats0[7][9] + coeff0_8*dmats0[8][9] + coeff0_9*dmats0[9][9];
           }
           if(combinations[deriv_num][j] == 1)
           {
-            new_coeff0_0 = coeff0_0*dmats1[0][0] + coeff0_1*dmats1[1][0] + coeff0_2*dmats1[2][0] + coeff0_3*dmats1[3][0];
-            new_coeff0_1 = coeff0_0*dmats1[0][1] + coeff0_1*dmats1[1][1] + coeff0_2*dmats1[2][1] + coeff0_3*dmats1[3][1];
-            new_coeff0_2 = coeff0_0*dmats1[0][2] + coeff0_1*dmats1[1][2] + coeff0_2*dmats1[2][2] + coeff0_3*dmats1[3][2];
-            new_coeff0_3 = coeff0_0*dmats1[0][3] + coeff0_1*dmats1[1][3] + coeff0_2*dmats1[2][3] + coeff0_3*dmats1[3][3];
+            new_coeff0_0 = coeff0_0*dmats1[0][0] + coeff0_1*dmats1[1][0] + coeff0_2*dmats1[2][0] + coeff0_3*dmats1[3][0] + coeff0_4*dmats1[4][0] + coeff0_5*dmats1[5][0] + coeff0_6*dmats1[6][0] + coeff0_7*dmats1[7][0] + coeff0_8*dmats1[8][0] + coeff0_9*dmats1[9][0];
+            new_coeff0_1 = coeff0_0*dmats1[0][1] + coeff0_1*dmats1[1][1] + coeff0_2*dmats1[2][1] + coeff0_3*dmats1[3][1] + coeff0_4*dmats1[4][1] + coeff0_5*dmats1[5][1] + coeff0_6*dmats1[6][1] + coeff0_7*dmats1[7][1] + coeff0_8*dmats1[8][1] + coeff0_9*dmats1[9][1];
+            new_coeff0_2 = coeff0_0*dmats1[0][2] + coeff0_1*dmats1[1][2] + coeff0_2*dmats1[2][2] + coeff0_3*dmats1[3][2] + coeff0_4*dmats1[4][2] + coeff0_5*dmats1[5][2] + coeff0_6*dmats1[6][2] + coeff0_7*dmats1[7][2] + coeff0_8*dmats1[8][2] + coeff0_9*dmats1[9][2];
+            new_coeff0_3 = coeff0_0*dmats1[0][3] + coeff0_1*dmats1[1][3] + coeff0_2*dmats1[2][3] + coeff0_3*dmats1[3][3] + coeff0_4*dmats1[4][3] + coeff0_5*dmats1[5][3] + coeff0_6*dmats1[6][3] + coeff0_7*dmats1[7][3] + coeff0_8*dmats1[8][3] + coeff0_9*dmats1[9][3];
+            new_coeff0_4 = coeff0_0*dmats1[0][4] + coeff0_1*dmats1[1][4] + coeff0_2*dmats1[2][4] + coeff0_3*dmats1[3][4] + coeff0_4*dmats1[4][4] + coeff0_5*dmats1[5][4] + coeff0_6*dmats1[6][4] + coeff0_7*dmats1[7][4] + coeff0_8*dmats1[8][4] + coeff0_9*dmats1[9][4];
+            new_coeff0_5 = coeff0_0*dmats1[0][5] + coeff0_1*dmats1[1][5] + coeff0_2*dmats1[2][5] + coeff0_3*dmats1[3][5] + coeff0_4*dmats1[4][5] + coeff0_5*dmats1[5][5] + coeff0_6*dmats1[6][5] + coeff0_7*dmats1[7][5] + coeff0_8*dmats1[8][5] + coeff0_9*dmats1[9][5];
+            new_coeff0_6 = coeff0_0*dmats1[0][6] + coeff0_1*dmats1[1][6] + coeff0_2*dmats1[2][6] + coeff0_3*dmats1[3][6] + coeff0_4*dmats1[4][6] + coeff0_5*dmats1[5][6] + coeff0_6*dmats1[6][6] + coeff0_7*dmats1[7][6] + coeff0_8*dmats1[8][6] + coeff0_9*dmats1[9][6];
+            new_coeff0_7 = coeff0_0*dmats1[0][7] + coeff0_1*dmats1[1][7] + coeff0_2*dmats1[2][7] + coeff0_3*dmats1[3][7] + coeff0_4*dmats1[4][7] + coeff0_5*dmats1[5][7] + coeff0_6*dmats1[6][7] + coeff0_7*dmats1[7][7] + coeff0_8*dmats1[8][7] + coeff0_9*dmats1[9][7];
+            new_coeff0_8 = coeff0_0*dmats1[0][8] + coeff0_1*dmats1[1][8] + coeff0_2*dmats1[2][8] + coeff0_3*dmats1[3][8] + coeff0_4*dmats1[4][8] + coeff0_5*dmats1[5][8] + coeff0_6*dmats1[6][8] + coeff0_7*dmats1[7][8] + coeff0_8*dmats1[8][8] + coeff0_9*dmats1[9][8];
+            new_coeff0_9 = coeff0_0*dmats1[0][9] + coeff0_1*dmats1[1][9] + coeff0_2*dmats1[2][9] + coeff0_3*dmats1[3][9] + coeff0_4*dmats1[4][9] + coeff0_5*dmats1[5][9] + coeff0_6*dmats1[6][9] + coeff0_7*dmats1[7][9] + coeff0_8*dmats1[8][9] + coeff0_9*dmats1[9][9];
           }
           if(combinations[deriv_num][j] == 2)
           {
-            new_coeff0_0 = coeff0_0*dmats2[0][0] + coeff0_1*dmats2[1][0] + coeff0_2*dmats2[2][0] + coeff0_3*dmats2[3][0];
-            new_coeff0_1 = coeff0_0*dmats2[0][1] + coeff0_1*dmats2[1][1] + coeff0_2*dmats2[2][1] + coeff0_3*dmats2[3][1];
-            new_coeff0_2 = coeff0_0*dmats2[0][2] + coeff0_1*dmats2[1][2] + coeff0_2*dmats2[2][2] + coeff0_3*dmats2[3][2];
-            new_coeff0_3 = coeff0_0*dmats2[0][3] + coeff0_1*dmats2[1][3] + coeff0_2*dmats2[2][3] + coeff0_3*dmats2[3][3];
+            new_coeff0_0 = coeff0_0*dmats2[0][0] + coeff0_1*dmats2[1][0] + coeff0_2*dmats2[2][0] + coeff0_3*dmats2[3][0] + coeff0_4*dmats2[4][0] + coeff0_5*dmats2[5][0] + coeff0_6*dmats2[6][0] + coeff0_7*dmats2[7][0] + coeff0_8*dmats2[8][0] + coeff0_9*dmats2[9][0];
+            new_coeff0_1 = coeff0_0*dmats2[0][1] + coeff0_1*dmats2[1][1] + coeff0_2*dmats2[2][1] + coeff0_3*dmats2[3][1] + coeff0_4*dmats2[4][1] + coeff0_5*dmats2[5][1] + coeff0_6*dmats2[6][1] + coeff0_7*dmats2[7][1] + coeff0_8*dmats2[8][1] + coeff0_9*dmats2[9][1];
+            new_coeff0_2 = coeff0_0*dmats2[0][2] + coeff0_1*dmats2[1][2] + coeff0_2*dmats2[2][2] + coeff0_3*dmats2[3][2] + coeff0_4*dmats2[4][2] + coeff0_5*dmats2[5][2] + coeff0_6*dmats2[6][2] + coeff0_7*dmats2[7][2] + coeff0_8*dmats2[8][2] + coeff0_9*dmats2[9][2];
+            new_coeff0_3 = coeff0_0*dmats2[0][3] + coeff0_1*dmats2[1][3] + coeff0_2*dmats2[2][3] + coeff0_3*dmats2[3][3] + coeff0_4*dmats2[4][3] + coeff0_5*dmats2[5][3] + coeff0_6*dmats2[6][3] + coeff0_7*dmats2[7][3] + coeff0_8*dmats2[8][3] + coeff0_9*dmats2[9][3];
+            new_coeff0_4 = coeff0_0*dmats2[0][4] + coeff0_1*dmats2[1][4] + coeff0_2*dmats2[2][4] + coeff0_3*dmats2[3][4] + coeff0_4*dmats2[4][4] + coeff0_5*dmats2[5][4] + coeff0_6*dmats2[6][4] + coeff0_7*dmats2[7][4] + coeff0_8*dmats2[8][4] + coeff0_9*dmats2[9][4];
+            new_coeff0_5 = coeff0_0*dmats2[0][5] + coeff0_1*dmats2[1][5] + coeff0_2*dmats2[2][5] + coeff0_3*dmats2[3][5] + coeff0_4*dmats2[4][5] + coeff0_5*dmats2[5][5] + coeff0_6*dmats2[6][5] + coeff0_7*dmats2[7][5] + coeff0_8*dmats2[8][5] + coeff0_9*dmats2[9][5];
+            new_coeff0_6 = coeff0_0*dmats2[0][6] + coeff0_1*dmats2[1][6] + coeff0_2*dmats2[2][6] + coeff0_3*dmats2[3][6] + coeff0_4*dmats2[4][6] + coeff0_5*dmats2[5][6] + coeff0_6*dmats2[6][6] + coeff0_7*dmats2[7][6] + coeff0_8*dmats2[8][6] + coeff0_9*dmats2[9][6];
+            new_coeff0_7 = coeff0_0*dmats2[0][7] + coeff0_1*dmats2[1][7] + coeff0_2*dmats2[2][7] + coeff0_3*dmats2[3][7] + coeff0_4*dmats2[4][7] + coeff0_5*dmats2[5][7] + coeff0_6*dmats2[6][7] + coeff0_7*dmats2[7][7] + coeff0_8*dmats2[8][7] + coeff0_9*dmats2[9][7];
+            new_coeff0_8 = coeff0_0*dmats2[0][8] + coeff0_1*dmats2[1][8] + coeff0_2*dmats2[2][8] + coeff0_3*dmats2[3][8] + coeff0_4*dmats2[4][8] + coeff0_5*dmats2[5][8] + coeff0_6*dmats2[6][8] + coeff0_7*dmats2[7][8] + coeff0_8*dmats2[8][8] + coeff0_9*dmats2[9][8];
+            new_coeff0_9 = coeff0_0*dmats2[0][9] + coeff0_1*dmats2[1][9] + coeff0_2*dmats2[2][9] + coeff0_3*dmats2[3][9] + coeff0_4*dmats2[4][9] + coeff0_5*dmats2[5][9] + coeff0_6*dmats2[6][9] + coeff0_7*dmats2[7][9] + coeff0_8*dmats2[8][9] + coeff0_9*dmats2[9][9];
           }
     
         }
         // Compute derivatives on reference element as dot product of coefficients and basisvalues
-        derivatives[deriv_num] = new_coeff0_0*basisvalue0 + new_coeff0_1*basisvalue1 + new_coeff0_2*basisvalue2 + new_coeff0_3*basisvalue3;
+        derivatives[deriv_num] = new_coeff0_0*basisvalue0 + new_coeff0_1*basisvalue1 + new_coeff0_2*basisvalue2 + new_coeff0_3*basisvalue3 + new_coeff0_4*basisvalue4 + new_coeff0_5*basisvalue5 + new_coeff0_6*basisvalue6 + new_coeff0_7*basisvalue7 + new_coeff0_8*basisvalue8 + new_coeff0_9*basisvalue9;
       }
     
       // Transform derivatives back to physical element
@@ -1699,9 +2155,9 @@ double UFC_SolitaryWave3DBilinearForm_fi
                                    const ufc::cell& c) const
 {
     // The reference points, direction and weights:
-    const static double X[8][1][3] = {{{0, 0, 0}}, {{1, 0, 0}}, {{0, 1, 0}}, {{0, 0, 1}}, {{0, 0, 0}}, {{1, 0, 0}}, {{0, 1, 0}}, {{0, 0, 1}}};
-    const static double W[8][1] = {{1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}};
-    const static double D[8][1][2] = {{{1, 0}}, {{1, 0}}, {{1, 0}}, {{1, 0}}, {{0, 1}}, {{0, 1}}, {{0, 1}}, {{0, 1}}};
+    const static double X[20][1][3] = {{{0, 0, 0}}, {{1, 0, 0}}, {{0, 1, 0}}, {{0, 0, 1}}, {{0, 0.5, 0.5}}, {{0.5, 0, 0.5}}, {{0.5, 0.5, 0}}, {{0, 0, 0.5}}, {{0, 0.5, 0}}, {{0.5, 0, 0}}, {{0, 0, 0}}, {{1, 0, 0}}, {{0, 1, 0}}, {{0, 0, 1}}, {{0, 0.5, 0.5}}, {{0.5, 0, 0.5}}, {{0.5, 0.5, 0}}, {{0, 0, 0.5}}, {{0, 0.5, 0}}, {{0.5, 0, 0}}};
+    const static double W[20][1] = {{1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}};
+    const static double D[20][1][2] = {{{1, 0}}, {{1, 0}}, {{1, 0}}, {{1, 0}}, {{1, 0}}, {{1, 0}}, {{1, 0}}, {{1, 0}}, {{1, 0}}, {{1, 0}}, {{0, 1}}, {{0, 1}}, {{0, 1}}, {{0, 1}}, {{0, 1}}, {{0, 1}}, {{0, 1}}, {{0, 1}}, {{0, 1}}, {{0, 1}}};
     
     const double * const * x = c.coordinates;
     double result = 0.0;
@@ -1755,10 +2211,10 @@ void UFC_SolitaryWave3DBilinearForm_fini
     vertex_values[4] = dof_values[2];
     vertex_values[6] = dof_values[3];
     // Evaluate at vertices and use affine mapping
-    vertex_values[1] = dof_values[4];
-    vertex_values[3] = dof_values[5];
-    vertex_values[5] = dof_values[6];
-    vertex_values[7] = dof_values[7];
+    vertex_values[1] = dof_values[10];
+    vertex_values[3] = dof_values[11];
+    vertex_values[5] = dof_values[12];
+    vertex_values[7] = dof_values[13];
 }
 
 /// Return the number of sub elements (for a mixed element)
@@ -1798,7 +2254,7 @@ UFC_SolitaryWave3DBilinearForm_finite_el
 /// Return a string identifying the finite element
 const char* UFC_SolitaryWave3DBilinearForm_finite_element_1_0::signature() const
 {
-    return "FiniteElement('Lagrange', 'tetrahedron', 1)";
+    return "FiniteElement('Lagrange', 'tetrahedron', 2)";
 }
 
 /// Return the cell shape
@@ -1810,7 +2266,7 @@ ufc::shape UFC_SolitaryWave3DBilinearFor
 /// Return the dimension of the finite element function space
 unsigned int UFC_SolitaryWave3DBilinearForm_finite_element_1_0::space_dimension() const
 {
-    return 4;
+    return 10;
 }
 
 /// Return the rank of the value space
@@ -1901,45 +2357,75 @@ void UFC_SolitaryWave3DBilinearForm_fini
     // Generate scalings
     const double scalings_y_0 = 1;
     const double scalings_y_1 = scalings_y_0*(0.5 - 0.5*y);
+    const double scalings_y_2 = scalings_y_1*(0.5 - 0.5*y);
     const double scalings_z_0 = 1;
     const double scalings_z_1 = scalings_z_0*(0.5 - 0.5*z);
+    const double scalings_z_2 = scalings_z_1*(0.5 - 0.5*z);
     
     // Compute psitilde_a
     const double psitilde_a_0 = 1;
     const double psitilde_a_1 = x;
+    const double psitilde_a_2 = 1.5*x*psitilde_a_1 - 0.5*psitilde_a_0;
     
     // Compute psitilde_bs
     const double psitilde_bs_0_0 = 1;
     const double psitilde_bs_0_1 = 1.5*y + 0.5;
+    const double psitilde_bs_0_2 = 0.111111111111111*psitilde_bs_0_1 + 1.66666666666667*y*psitilde_bs_0_1 - 0.555555555555556*psitilde_bs_0_0;
     const double psitilde_bs_1_0 = 1;
+    const double psitilde_bs_1_1 = 2.5*y + 1.5;
+    const double psitilde_bs_2_0 = 1;
     
     // Compute psitilde_cs
     const double psitilde_cs_00_0 = 1;
     const double psitilde_cs_00_1 = 2*z + 1;
+    const double psitilde_cs_00_2 = 0.3125*psitilde_cs_00_1 + 1.875*z*psitilde_cs_00_1 - 0.5625*psitilde_cs_00_0;
     const double psitilde_cs_01_0 = 1;
+    const double psitilde_cs_01_1 = 3*z + 2;
+    const double psitilde_cs_02_0 = 1;
     const double psitilde_cs_10_0 = 1;
+    const double psitilde_cs_10_1 = 3*z + 2;
+    const double psitilde_cs_11_0 = 1;
+    const double psitilde_cs_20_0 = 1;
     
     // Compute basisvalues
     const double basisvalue0 = 0.866025403784439*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_0;
     const double basisvalue1 = 2.73861278752583*psitilde_a_1*scalings_y_1*psitilde_bs_1_0*scalings_z_1*psitilde_cs_10_0;
     const double basisvalue2 = 1.58113883008419*psitilde_a_0*scalings_y_0*psitilde_bs_0_1*scalings_z_1*psitilde_cs_01_0;
     const double basisvalue3 = 1.11803398874989*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_1;
-    
-    // Table(s) of coefficients
-    const static double coefficients0[4][4] = \
-    {{0.288675134594813, -0.182574185835055, -0.105409255338946, -0.074535599249993},
-    {0.288675134594813, 0.182574185835055, -0.105409255338946, -0.074535599249993},
-    {0.288675134594813, 0, 0.210818510677892, -0.074535599249993},
-    {0.288675134594813, 0, 0, 0.223606797749979}};
+    const double basisvalue4 = 5.1234753829798*psitilde_a_2*scalings_y_2*psitilde_bs_2_0*scalings_z_2*psitilde_cs_20_0;
+    const double basisvalue5 = 3.96862696659689*psitilde_a_1*scalings_y_1*psitilde_bs_1_1*scalings_z_2*psitilde_cs_11_0;
+    const double basisvalue6 = 2.29128784747792*psitilde_a_0*scalings_y_0*psitilde_bs_0_2*scalings_z_2*psitilde_cs_02_0;
+    const double basisvalue7 = 3.24037034920393*psitilde_a_1*scalings_y_1*psitilde_bs_1_0*scalings_z_1*psitilde_cs_10_1;
+    const double basisvalue8 = 1.87082869338697*psitilde_a_0*scalings_y_0*psitilde_bs_0_1*scalings_z_1*psitilde_cs_01_1;
+    const double basisvalue9 = 1.3228756555323*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_2;
+    
+    // Table(s) of coefficients
+    const static double coefficients0[10][10] = \
+    {{-0.0577350269189626, -0.0608580619450185, -0.0351364184463153, -0.0248451997499977, 0.0650600048632355, 0.0503952630678969, 0.0290957186981323, 0.0411475599898912, 0.0237565548366599, 0.0167984210226323},
+    {-0.0577350269189625, 0.0608580619450185, -0.0351364184463153, -0.0248451997499977, 0.0650600048632355, -0.050395263067897, 0.0290957186981323, -0.0411475599898912, 0.0237565548366599, 0.0167984210226323},
+    {-0.0577350269189625, 0, 0.0702728368926306, -0.0248451997499977, 0, 0, 0.0872871560943969, 0, -0.0475131096733199, 0.0167984210226323},
+    {-0.0577350269189626, 0, 0, 0.074535599249993, 0, 0, 0, 0, 0, 0.100790526135794},
+    {0.23094010767585, 0, 0.140545673785261, 0.0993807989999906, 0, 0, 0, 0, 0.1187827741833, -0.0671936840905293},
+    {0.230940107675851, 0.121716123890037, -0.0702728368926306, 0.0993807989999907, 0, 0, 0, 0.102868899974728, -0.0593913870916499, -0.0671936840905293},
+    {0.23094010767585, 0.121716123890037, 0.0702728368926307, -0.0993807989999907, 0, 0.100790526135794, -0.087287156094397, -0.0205737799949456, -0.01187827741833, 0.0167984210226323},
+    {0.23094010767585, -0.121716123890037, -0.0702728368926307, 0.0993807989999906, 0, 0, 0, -0.102868899974728, -0.0593913870916499, -0.0671936840905293},
+    {0.23094010767585, -0.121716123890037, 0.0702728368926306, -0.0993807989999906, 0, -0.100790526135794, -0.0872871560943969, 0.0205737799949456, -0.01187827741833, 0.0167984210226323},
+    {0.23094010767585, 0, -0.140545673785261, -0.0993807989999906, -0.130120009726471, 0, 0.0290957186981323, 0, 0.02375655483666, 0.0167984210226323}};
     
     // Extract relevant coefficients
     const double coeff0_0 = coefficients0[dof][0];
     const double coeff0_1 = coefficients0[dof][1];
     const double coeff0_2 = coefficients0[dof][2];
     const double coeff0_3 = coefficients0[dof][3];
+    const double coeff0_4 = coefficients0[dof][4];
+    const double coeff0_5 = coefficients0[dof][5];
+    const double coeff0_6 = coefficients0[dof][6];
+    const double coeff0_7 = coefficients0[dof][7];
+    const double coeff0_8 = coefficients0[dof][8];
+    const double coeff0_9 = coefficients0[dof][9];
     
     // Compute value(s)
-    *values = coeff0_0*basisvalue0 + coeff0_1*basisvalue1 + coeff0_2*basisvalue2 + coeff0_3*basisvalue3;
+    *values = coeff0_0*basisvalue0 + coeff0_1*basisvalue1 + coeff0_2*basisvalue2 + coeff0_3*basisvalue3 + coeff0_4*basisvalue4 + coeff0_5*basisvalue5 + coeff0_6*basisvalue6 + coeff0_7*basisvalue7 + coeff0_8*basisvalue8 + coeff0_9*basisvalue9;
 }
 
 /// Evaluate all basis functions at given point in cell
@@ -2087,56 +2573,98 @@ void UFC_SolitaryWave3DBilinearForm_fini
     // Generate scalings
     const double scalings_y_0 = 1;
     const double scalings_y_1 = scalings_y_0*(0.5 - 0.5*y);
+    const double scalings_y_2 = scalings_y_1*(0.5 - 0.5*y);
     const double scalings_z_0 = 1;
     const double scalings_z_1 = scalings_z_0*(0.5 - 0.5*z);
+    const double scalings_z_2 = scalings_z_1*(0.5 - 0.5*z);
     
     // Compute psitilde_a
     const double psitilde_a_0 = 1;
     const double psitilde_a_1 = x;
+    const double psitilde_a_2 = 1.5*x*psitilde_a_1 - 0.5*psitilde_a_0;
     
     // Compute psitilde_bs
     const double psitilde_bs_0_0 = 1;
     const double psitilde_bs_0_1 = 1.5*y + 0.5;
+    const double psitilde_bs_0_2 = 0.111111111111111*psitilde_bs_0_1 + 1.66666666666667*y*psitilde_bs_0_1 - 0.555555555555556*psitilde_bs_0_0;
     const double psitilde_bs_1_0 = 1;
+    const double psitilde_bs_1_1 = 2.5*y + 1.5;
+    const double psitilde_bs_2_0 = 1;
     
     // Compute psitilde_cs
     const double psitilde_cs_00_0 = 1;
     const double psitilde_cs_00_1 = 2*z + 1;
+    const double psitilde_cs_00_2 = 0.3125*psitilde_cs_00_1 + 1.875*z*psitilde_cs_00_1 - 0.5625*psitilde_cs_00_0;
     const double psitilde_cs_01_0 = 1;
+    const double psitilde_cs_01_1 = 3*z + 2;
+    const double psitilde_cs_02_0 = 1;
     const double psitilde_cs_10_0 = 1;
+    const double psitilde_cs_10_1 = 3*z + 2;
+    const double psitilde_cs_11_0 = 1;
+    const double psitilde_cs_20_0 = 1;
     
     // Compute basisvalues
     const double basisvalue0 = 0.866025403784439*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_0;
     const double basisvalue1 = 2.73861278752583*psitilde_a_1*scalings_y_1*psitilde_bs_1_0*scalings_z_1*psitilde_cs_10_0;
     const double basisvalue2 = 1.58113883008419*psitilde_a_0*scalings_y_0*psitilde_bs_0_1*scalings_z_1*psitilde_cs_01_0;
     const double basisvalue3 = 1.11803398874989*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_1;
-    
-    // Table(s) of coefficients
-    const static double coefficients0[4][4] = \
-    {{0.288675134594813, -0.182574185835055, -0.105409255338946, -0.074535599249993},
-    {0.288675134594813, 0.182574185835055, -0.105409255338946, -0.074535599249993},
-    {0.288675134594813, 0, 0.210818510677892, -0.074535599249993},
-    {0.288675134594813, 0, 0, 0.223606797749979}};
+    const double basisvalue4 = 5.1234753829798*psitilde_a_2*scalings_y_2*psitilde_bs_2_0*scalings_z_2*psitilde_cs_20_0;
+    const double basisvalue5 = 3.96862696659689*psitilde_a_1*scalings_y_1*psitilde_bs_1_1*scalings_z_2*psitilde_cs_11_0;
+    const double basisvalue6 = 2.29128784747792*psitilde_a_0*scalings_y_0*psitilde_bs_0_2*scalings_z_2*psitilde_cs_02_0;
+    const double basisvalue7 = 3.24037034920393*psitilde_a_1*scalings_y_1*psitilde_bs_1_0*scalings_z_1*psitilde_cs_10_1;
+    const double basisvalue8 = 1.87082869338697*psitilde_a_0*scalings_y_0*psitilde_bs_0_1*scalings_z_1*psitilde_cs_01_1;
+    const double basisvalue9 = 1.3228756555323*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_2;
+    
+    // Table(s) of coefficients
+    const static double coefficients0[10][10] = \
+    {{-0.0577350269189626, -0.0608580619450185, -0.0351364184463153, -0.0248451997499977, 0.0650600048632355, 0.0503952630678969, 0.0290957186981323, 0.0411475599898912, 0.0237565548366599, 0.0167984210226323},
+    {-0.0577350269189625, 0.0608580619450185, -0.0351364184463153, -0.0248451997499977, 0.0650600048632355, -0.050395263067897, 0.0290957186981323, -0.0411475599898912, 0.0237565548366599, 0.0167984210226323},
+    {-0.0577350269189625, 0, 0.0702728368926306, -0.0248451997499977, 0, 0, 0.0872871560943969, 0, -0.0475131096733199, 0.0167984210226323},
+    {-0.0577350269189626, 0, 0, 0.074535599249993, 0, 0, 0, 0, 0, 0.100790526135794},
+    {0.23094010767585, 0, 0.140545673785261, 0.0993807989999906, 0, 0, 0, 0, 0.1187827741833, -0.0671936840905293},
+    {0.230940107675851, 0.121716123890037, -0.0702728368926306, 0.0993807989999907, 0, 0, 0, 0.102868899974728, -0.0593913870916499, -0.0671936840905293},
+    {0.23094010767585, 0.121716123890037, 0.0702728368926307, -0.0993807989999907, 0, 0.100790526135794, -0.087287156094397, -0.0205737799949456, -0.01187827741833, 0.0167984210226323},
+    {0.23094010767585, -0.121716123890037, -0.0702728368926307, 0.0993807989999906, 0, 0, 0, -0.102868899974728, -0.0593913870916499, -0.0671936840905293},
+    {0.23094010767585, -0.121716123890037, 0.0702728368926306, -0.0993807989999906, 0, -0.100790526135794, -0.0872871560943969, 0.0205737799949456, -0.01187827741833, 0.0167984210226323},
+    {0.23094010767585, 0, -0.140545673785261, -0.0993807989999906, -0.130120009726471, 0, 0.0290957186981323, 0, 0.02375655483666, 0.0167984210226323}};
     
     // Interesting (new) part
     // Tables of derivatives of the polynomial base (transpose)
-    const static double dmats0[4][4] = \
-    {{0, 0, 0, 0},
-    {6.32455532033676, 0, 0, 0},
-    {0, 0, 0, 0},
-    {0, 0, 0, 0}};
-    
-    const static double dmats1[4][4] = \
-    {{0, 0, 0, 0},
-    {3.16227766016838, 0, 0, 0},
-    {5.47722557505166, 0, 0, 0},
-    {0, 0, 0, 0}};
-    
-    const static double dmats2[4][4] = \
-    {{0, 0, 0, 0},
-    {3.16227766016838, 0, 0, 0},
-    {1.82574185835055, 0, 0, 0},
-    {5.16397779494322, 0, 0, 0}};
+    const static double dmats0[10][10] = \
+    {{0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {6.32455532033676, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {0, 11.2249721603218, 0, 0, 0, 0, 0, 0, 0, 0},
+    {4.58257569495584, 0, 8.36660026534076, -1.18321595661992, 0, 0, 0, 0, 0, 0},
+    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {3.74165738677394, 0, 0, 8.69482604771366, 0, 0, 0, 0, 0, 0},
+    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
+    
+    const static double dmats1[10][10] = \
+    {{0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {3.16227766016838, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {5.47722557505166, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {2.95803989154981, 5.61248608016091, -1.08012344973464, -0.763762615825974, 0, 0, 0, 0, 0, 0},
+    {2.29128784747792, 7.24568837309472, 4.18330013267038, -0.591607978309962, 0, 0, 0, 0, 0, 0},
+    {-2.64575131106459, 0, 9.66091783079296, 0.683130051063974, 0, 0, 0, 0, 0, 0},
+    {1.87082869338697, 0, 0, 4.34741302385683, 0, 0, 0, 0, 0, 0},
+    {3.24037034920393, 0, 0, 7.52994023880668, 0, 0, 0, 0, 0, 0},
+    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
+    
+    const static double dmats2[10][10] = \
+    {{0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {3.16227766016838, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {1.82574185835055, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {5.16397779494322, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {2.95803989154981, 5.61248608016091, -1.08012344973464, -0.763762615825974, 0, 0, 0, 0, 0, 0},
+    {2.29128784747792, 1.44913767461894, 4.18330013267038, -0.591607978309962, 0, 0, 0, 0, 0, 0},
+    {1.32287565553229, 0, 3.86436713231718, -0.341565025531986, 0, 0, 0, 0, 0, 0},
+    {1.87082869338697, 7.09929573971954, 0, 4.34741302385683, 0, 0, 0, 0, 0, 0},
+    {1.08012344973464, 0, 7.09929573971954, 2.50998007960223, 0, 0, 0, 0, 0, 0},
+    {-3.81881307912987, 0, 0, 8.87411967464942, 0, 0, 0, 0, 0, 0}};
     
     // Compute reference derivatives
     // Declare pointer to array of derivatives on FIAT element
@@ -2147,12 +2675,24 @@ void UFC_SolitaryWave3DBilinearForm_fini
     double coeff0_1 = 0;
     double coeff0_2 = 0;
     double coeff0_3 = 0;
+    double coeff0_4 = 0;
+    double coeff0_5 = 0;
+    double coeff0_6 = 0;
+    double coeff0_7 = 0;
+    double coeff0_8 = 0;
+    double coeff0_9 = 0;
     
     // Declare new coefficients
     double new_coeff0_0 = 0;
     double new_coeff0_1 = 0;
     double new_coeff0_2 = 0;
     double new_coeff0_3 = 0;
+    double new_coeff0_4 = 0;
+    double new_coeff0_5 = 0;
+    double new_coeff0_6 = 0;
+    double new_coeff0_7 = 0;
+    double new_coeff0_8 = 0;
+    double new_coeff0_9 = 0;
     
     // Loop possible derivatives
     for (unsigned int deriv_num = 0; deriv_num < num_derivatives; deriv_num++)
@@ -2162,6 +2702,12 @@ void UFC_SolitaryWave3DBilinearForm_fini
       new_coeff0_1 = coefficients0[dof][1];
       new_coeff0_2 = coefficients0[dof][2];
       new_coeff0_3 = coefficients0[dof][3];
+      new_coeff0_4 = coefficients0[dof][4];
+      new_coeff0_5 = coefficients0[dof][5];
+      new_coeff0_6 = coefficients0[dof][6];
+      new_coeff0_7 = coefficients0[dof][7];
+      new_coeff0_8 = coefficients0[dof][8];
+      new_coeff0_9 = coefficients0[dof][9];
     
       // Loop derivative order
       for (unsigned int j = 0; j < n; j++)
@@ -2171,32 +2717,56 @@ void UFC_SolitaryWave3DBilinearForm_fini
         coeff0_1 = new_coeff0_1;
         coeff0_2 = new_coeff0_2;
         coeff0_3 = new_coeff0_3;
+        coeff0_4 = new_coeff0_4;
+        coeff0_5 = new_coeff0_5;
+        coeff0_6 = new_coeff0_6;
+        coeff0_7 = new_coeff0_7;
+        coeff0_8 = new_coeff0_8;
+        coeff0_9 = new_coeff0_9;
     
         if(combinations[deriv_num][j] == 0)
         {
-          new_coeff0_0 = coeff0_0*dmats0[0][0] + coeff0_1*dmats0[1][0] + coeff0_2*dmats0[2][0] + coeff0_3*dmats0[3][0];
-          new_coeff0_1 = coeff0_0*dmats0[0][1] + coeff0_1*dmats0[1][1] + coeff0_2*dmats0[2][1] + coeff0_3*dmats0[3][1];
-          new_coeff0_2 = coeff0_0*dmats0[0][2] + coeff0_1*dmats0[1][2] + coeff0_2*dmats0[2][2] + coeff0_3*dmats0[3][2];
-          new_coeff0_3 = coeff0_0*dmats0[0][3] + coeff0_1*dmats0[1][3] + coeff0_2*dmats0[2][3] + coeff0_3*dmats0[3][3];
+          new_coeff0_0 = coeff0_0*dmats0[0][0] + coeff0_1*dmats0[1][0] + coeff0_2*dmats0[2][0] + coeff0_3*dmats0[3][0] + coeff0_4*dmats0[4][0] + coeff0_5*dmats0[5][0] + coeff0_6*dmats0[6][0] + coeff0_7*dmats0[7][0] + coeff0_8*dmats0[8][0] + coeff0_9*dmats0[9][0];
+          new_coeff0_1 = coeff0_0*dmats0[0][1] + coeff0_1*dmats0[1][1] + coeff0_2*dmats0[2][1] + coeff0_3*dmats0[3][1] + coeff0_4*dmats0[4][1] + coeff0_5*dmats0[5][1] + coeff0_6*dmats0[6][1] + coeff0_7*dmats0[7][1] + coeff0_8*dmats0[8][1] + coeff0_9*dmats0[9][1];
+          new_coeff0_2 = coeff0_0*dmats0[0][2] + coeff0_1*dmats0[1][2] + coeff0_2*dmats0[2][2] + coeff0_3*dmats0[3][2] + coeff0_4*dmats0[4][2] + coeff0_5*dmats0[5][2] + coeff0_6*dmats0[6][2] + coeff0_7*dmats0[7][2] + coeff0_8*dmats0[8][2] + coeff0_9*dmats0[9][2];
+          new_coeff0_3 = coeff0_0*dmats0[0][3] + coeff0_1*dmats0[1][3] + coeff0_2*dmats0[2][3] + coeff0_3*dmats0[3][3] + coeff0_4*dmats0[4][3] + coeff0_5*dmats0[5][3] + coeff0_6*dmats0[6][3] + coeff0_7*dmats0[7][3] + coeff0_8*dmats0[8][3] + coeff0_9*dmats0[9][3];
+          new_coeff0_4 = coeff0_0*dmats0[0][4] + coeff0_1*dmats0[1][4] + coeff0_2*dmats0[2][4] + coeff0_3*dmats0[3][4] + coeff0_4*dmats0[4][4] + coeff0_5*dmats0[5][4] + coeff0_6*dmats0[6][4] + coeff0_7*dmats0[7][4] + coeff0_8*dmats0[8][4] + coeff0_9*dmats0[9][4];
+          new_coeff0_5 = coeff0_0*dmats0[0][5] + coeff0_1*dmats0[1][5] + coeff0_2*dmats0[2][5] + coeff0_3*dmats0[3][5] + coeff0_4*dmats0[4][5] + coeff0_5*dmats0[5][5] + coeff0_6*dmats0[6][5] + coeff0_7*dmats0[7][5] + coeff0_8*dmats0[8][5] + coeff0_9*dmats0[9][5];
+          new_coeff0_6 = coeff0_0*dmats0[0][6] + coeff0_1*dmats0[1][6] + coeff0_2*dmats0[2][6] + coeff0_3*dmats0[3][6] + coeff0_4*dmats0[4][6] + coeff0_5*dmats0[5][6] + coeff0_6*dmats0[6][6] + coeff0_7*dmats0[7][6] + coeff0_8*dmats0[8][6] + coeff0_9*dmats0[9][6];
+          new_coeff0_7 = coeff0_0*dmats0[0][7] + coeff0_1*dmats0[1][7] + coeff0_2*dmats0[2][7] + coeff0_3*dmats0[3][7] + coeff0_4*dmats0[4][7] + coeff0_5*dmats0[5][7] + coeff0_6*dmats0[6][7] + coeff0_7*dmats0[7][7] + coeff0_8*dmats0[8][7] + coeff0_9*dmats0[9][7];
+          new_coeff0_8 = coeff0_0*dmats0[0][8] + coeff0_1*dmats0[1][8] + coeff0_2*dmats0[2][8] + coeff0_3*dmats0[3][8] + coeff0_4*dmats0[4][8] + coeff0_5*dmats0[5][8] + coeff0_6*dmats0[6][8] + coeff0_7*dmats0[7][8] + coeff0_8*dmats0[8][8] + coeff0_9*dmats0[9][8];
+          new_coeff0_9 = coeff0_0*dmats0[0][9] + coeff0_1*dmats0[1][9] + coeff0_2*dmats0[2][9] + coeff0_3*dmats0[3][9] + coeff0_4*dmats0[4][9] + coeff0_5*dmats0[5][9] + coeff0_6*dmats0[6][9] + coeff0_7*dmats0[7][9] + coeff0_8*dmats0[8][9] + coeff0_9*dmats0[9][9];
         }
         if(combinations[deriv_num][j] == 1)
         {
-          new_coeff0_0 = coeff0_0*dmats1[0][0] + coeff0_1*dmats1[1][0] + coeff0_2*dmats1[2][0] + coeff0_3*dmats1[3][0];
-          new_coeff0_1 = coeff0_0*dmats1[0][1] + coeff0_1*dmats1[1][1] + coeff0_2*dmats1[2][1] + coeff0_3*dmats1[3][1];
-          new_coeff0_2 = coeff0_0*dmats1[0][2] + coeff0_1*dmats1[1][2] + coeff0_2*dmats1[2][2] + coeff0_3*dmats1[3][2];
-          new_coeff0_3 = coeff0_0*dmats1[0][3] + coeff0_1*dmats1[1][3] + coeff0_2*dmats1[2][3] + coeff0_3*dmats1[3][3];
+          new_coeff0_0 = coeff0_0*dmats1[0][0] + coeff0_1*dmats1[1][0] + coeff0_2*dmats1[2][0] + coeff0_3*dmats1[3][0] + coeff0_4*dmats1[4][0] + coeff0_5*dmats1[5][0] + coeff0_6*dmats1[6][0] + coeff0_7*dmats1[7][0] + coeff0_8*dmats1[8][0] + coeff0_9*dmats1[9][0];
+          new_coeff0_1 = coeff0_0*dmats1[0][1] + coeff0_1*dmats1[1][1] + coeff0_2*dmats1[2][1] + coeff0_3*dmats1[3][1] + coeff0_4*dmats1[4][1] + coeff0_5*dmats1[5][1] + coeff0_6*dmats1[6][1] + coeff0_7*dmats1[7][1] + coeff0_8*dmats1[8][1] + coeff0_9*dmats1[9][1];
+          new_coeff0_2 = coeff0_0*dmats1[0][2] + coeff0_1*dmats1[1][2] + coeff0_2*dmats1[2][2] + coeff0_3*dmats1[3][2] + coeff0_4*dmats1[4][2] + coeff0_5*dmats1[5][2] + coeff0_6*dmats1[6][2] + coeff0_7*dmats1[7][2] + coeff0_8*dmats1[8][2] + coeff0_9*dmats1[9][2];
+          new_coeff0_3 = coeff0_0*dmats1[0][3] + coeff0_1*dmats1[1][3] + coeff0_2*dmats1[2][3] + coeff0_3*dmats1[3][3] + coeff0_4*dmats1[4][3] + coeff0_5*dmats1[5][3] + coeff0_6*dmats1[6][3] + coeff0_7*dmats1[7][3] + coeff0_8*dmats1[8][3] + coeff0_9*dmats1[9][3];
+          new_coeff0_4 = coeff0_0*dmats1[0][4] + coeff0_1*dmats1[1][4] + coeff0_2*dmats1[2][4] + coeff0_3*dmats1[3][4] + coeff0_4*dmats1[4][4] + coeff0_5*dmats1[5][4] + coeff0_6*dmats1[6][4] + coeff0_7*dmats1[7][4] + coeff0_8*dmats1[8][4] + coeff0_9*dmats1[9][4];
+          new_coeff0_5 = coeff0_0*dmats1[0][5] + coeff0_1*dmats1[1][5] + coeff0_2*dmats1[2][5] + coeff0_3*dmats1[3][5] + coeff0_4*dmats1[4][5] + coeff0_5*dmats1[5][5] + coeff0_6*dmats1[6][5] + coeff0_7*dmats1[7][5] + coeff0_8*dmats1[8][5] + coeff0_9*dmats1[9][5];
+          new_coeff0_6 = coeff0_0*dmats1[0][6] + coeff0_1*dmats1[1][6] + coeff0_2*dmats1[2][6] + coeff0_3*dmats1[3][6] + coeff0_4*dmats1[4][6] + coeff0_5*dmats1[5][6] + coeff0_6*dmats1[6][6] + coeff0_7*dmats1[7][6] + coeff0_8*dmats1[8][6] + coeff0_9*dmats1[9][6];
+          new_coeff0_7 = coeff0_0*dmats1[0][7] + coeff0_1*dmats1[1][7] + coeff0_2*dmats1[2][7] + coeff0_3*dmats1[3][7] + coeff0_4*dmats1[4][7] + coeff0_5*dmats1[5][7] + coeff0_6*dmats1[6][7] + coeff0_7*dmats1[7][7] + coeff0_8*dmats1[8][7] + coeff0_9*dmats1[9][7];
+          new_coeff0_8 = coeff0_0*dmats1[0][8] + coeff0_1*dmats1[1][8] + coeff0_2*dmats1[2][8] + coeff0_3*dmats1[3][8] + coeff0_4*dmats1[4][8] + coeff0_5*dmats1[5][8] + coeff0_6*dmats1[6][8] + coeff0_7*dmats1[7][8] + coeff0_8*dmats1[8][8] + coeff0_9*dmats1[9][8];
+          new_coeff0_9 = coeff0_0*dmats1[0][9] + coeff0_1*dmats1[1][9] + coeff0_2*dmats1[2][9] + coeff0_3*dmats1[3][9] + coeff0_4*dmats1[4][9] + coeff0_5*dmats1[5][9] + coeff0_6*dmats1[6][9] + coeff0_7*dmats1[7][9] + coeff0_8*dmats1[8][9] + coeff0_9*dmats1[9][9];
         }
         if(combinations[deriv_num][j] == 2)
         {
-          new_coeff0_0 = coeff0_0*dmats2[0][0] + coeff0_1*dmats2[1][0] + coeff0_2*dmats2[2][0] + coeff0_3*dmats2[3][0];
-          new_coeff0_1 = coeff0_0*dmats2[0][1] + coeff0_1*dmats2[1][1] + coeff0_2*dmats2[2][1] + coeff0_3*dmats2[3][1];
-          new_coeff0_2 = coeff0_0*dmats2[0][2] + coeff0_1*dmats2[1][2] + coeff0_2*dmats2[2][2] + coeff0_3*dmats2[3][2];
-          new_coeff0_3 = coeff0_0*dmats2[0][3] + coeff0_1*dmats2[1][3] + coeff0_2*dmats2[2][3] + coeff0_3*dmats2[3][3];
+          new_coeff0_0 = coeff0_0*dmats2[0][0] + coeff0_1*dmats2[1][0] + coeff0_2*dmats2[2][0] + coeff0_3*dmats2[3][0] + coeff0_4*dmats2[4][0] + coeff0_5*dmats2[5][0] + coeff0_6*dmats2[6][0] + coeff0_7*dmats2[7][0] + coeff0_8*dmats2[8][0] + coeff0_9*dmats2[9][0];
+          new_coeff0_1 = coeff0_0*dmats2[0][1] + coeff0_1*dmats2[1][1] + coeff0_2*dmats2[2][1] + coeff0_3*dmats2[3][1] + coeff0_4*dmats2[4][1] + coeff0_5*dmats2[5][1] + coeff0_6*dmats2[6][1] + coeff0_7*dmats2[7][1] + coeff0_8*dmats2[8][1] + coeff0_9*dmats2[9][1];
+          new_coeff0_2 = coeff0_0*dmats2[0][2] + coeff0_1*dmats2[1][2] + coeff0_2*dmats2[2][2] + coeff0_3*dmats2[3][2] + coeff0_4*dmats2[4][2] + coeff0_5*dmats2[5][2] + coeff0_6*dmats2[6][2] + coeff0_7*dmats2[7][2] + coeff0_8*dmats2[8][2] + coeff0_9*dmats2[9][2];
+          new_coeff0_3 = coeff0_0*dmats2[0][3] + coeff0_1*dmats2[1][3] + coeff0_2*dmats2[2][3] + coeff0_3*dmats2[3][3] + coeff0_4*dmats2[4][3] + coeff0_5*dmats2[5][3] + coeff0_6*dmats2[6][3] + coeff0_7*dmats2[7][3] + coeff0_8*dmats2[8][3] + coeff0_9*dmats2[9][3];
+          new_coeff0_4 = coeff0_0*dmats2[0][4] + coeff0_1*dmats2[1][4] + coeff0_2*dmats2[2][4] + coeff0_3*dmats2[3][4] + coeff0_4*dmats2[4][4] + coeff0_5*dmats2[5][4] + coeff0_6*dmats2[6][4] + coeff0_7*dmats2[7][4] + coeff0_8*dmats2[8][4] + coeff0_9*dmats2[9][4];
+          new_coeff0_5 = coeff0_0*dmats2[0][5] + coeff0_1*dmats2[1][5] + coeff0_2*dmats2[2][5] + coeff0_3*dmats2[3][5] + coeff0_4*dmats2[4][5] + coeff0_5*dmats2[5][5] + coeff0_6*dmats2[6][5] + coeff0_7*dmats2[7][5] + coeff0_8*dmats2[8][5] + coeff0_9*dmats2[9][5];
+          new_coeff0_6 = coeff0_0*dmats2[0][6] + coeff0_1*dmats2[1][6] + coeff0_2*dmats2[2][6] + coeff0_3*dmats2[3][6] + coeff0_4*dmats2[4][6] + coeff0_5*dmats2[5][6] + coeff0_6*dmats2[6][6] + coeff0_7*dmats2[7][6] + coeff0_8*dmats2[8][6] + coeff0_9*dmats2[9][6];
+          new_coeff0_7 = coeff0_0*dmats2[0][7] + coeff0_1*dmats2[1][7] + coeff0_2*dmats2[2][7] + coeff0_3*dmats2[3][7] + coeff0_4*dmats2[4][7] + coeff0_5*dmats2[5][7] + coeff0_6*dmats2[6][7] + coeff0_7*dmats2[7][7] + coeff0_8*dmats2[8][7] + coeff0_9*dmats2[9][7];
+          new_coeff0_8 = coeff0_0*dmats2[0][8] + coeff0_1*dmats2[1][8] + coeff0_2*dmats2[2][8] + coeff0_3*dmats2[3][8] + coeff0_4*dmats2[4][8] + coeff0_5*dmats2[5][8] + coeff0_6*dmats2[6][8] + coeff0_7*dmats2[7][8] + coeff0_8*dmats2[8][8] + coeff0_9*dmats2[9][8];
+          new_coeff0_9 = coeff0_0*dmats2[0][9] + coeff0_1*dmats2[1][9] + coeff0_2*dmats2[2][9] + coeff0_3*dmats2[3][9] + coeff0_4*dmats2[4][9] + coeff0_5*dmats2[5][9] + coeff0_6*dmats2[6][9] + coeff0_7*dmats2[7][9] + coeff0_8*dmats2[8][9] + coeff0_9*dmats2[9][9];
         }
     
       }
       // Compute derivatives on reference element as dot product of coefficients and basisvalues
-      derivatives[deriv_num] = new_coeff0_0*basisvalue0 + new_coeff0_1*basisvalue1 + new_coeff0_2*basisvalue2 + new_coeff0_3*basisvalue3;
+      derivatives[deriv_num] = new_coeff0_0*basisvalue0 + new_coeff0_1*basisvalue1 + new_coeff0_2*basisvalue2 + new_coeff0_3*basisvalue3 + new_coeff0_4*basisvalue4 + new_coeff0_5*basisvalue5 + new_coeff0_6*basisvalue6 + new_coeff0_7*basisvalue7 + new_coeff0_8*basisvalue8 + new_coeff0_9*basisvalue9;
     }
     
     // Transform derivatives back to physical element
@@ -2236,9 +2806,9 @@ double UFC_SolitaryWave3DBilinearForm_fi
                                    const ufc::cell& c) const
 {
     // The reference points, direction and weights:
-    const static double X[4][1][3] = {{{0, 0, 0}}, {{1, 0, 0}}, {{0, 1, 0}}, {{0, 0, 1}}};
-    const static double W[4][1] = {{1}, {1}, {1}, {1}};
-    const static double D[4][1][1] = {{{1}}, {{1}}, {{1}}, {{1}}};
+    const static double X[10][1][3] = {{{0, 0, 0}}, {{1, 0, 0}}, {{0, 1, 0}}, {{0, 0, 1}}, {{0, 0.5, 0.5}}, {{0.5, 0, 0.5}}, {{0.5, 0.5, 0}}, {{0, 0, 0.5}}, {{0, 0.5, 0}}, {{0.5, 0, 0}}};
+    const static double W[10][1] = {{1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}};
+    const static double D[10][1][1] = {{{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}};
     
     const double * const * x = c.coordinates;
     double result = 0.0;
@@ -2321,7 +2891,7 @@ UFC_SolitaryWave3DBilinearForm_finite_el
 /// Return a string identifying the finite element
 const char* UFC_SolitaryWave3DBilinearForm_finite_element_1_1::signature() const
 {
-    return "FiniteElement('Lagrange', 'tetrahedron', 1)";
+    return "FiniteElement('Lagrange', 'tetrahedron', 2)";
 }
 
 /// Return the cell shape
@@ -2333,7 +2903,7 @@ ufc::shape UFC_SolitaryWave3DBilinearFor
 /// Return the dimension of the finite element function space
 unsigned int UFC_SolitaryWave3DBilinearForm_finite_element_1_1::space_dimension() const
 {
-    return 4;
+    return 10;
 }
 
 /// Return the rank of the value space
@@ -2424,45 +2994,75 @@ void UFC_SolitaryWave3DBilinearForm_fini
     // Generate scalings
     const double scalings_y_0 = 1;
     const double scalings_y_1 = scalings_y_0*(0.5 - 0.5*y);
+    const double scalings_y_2 = scalings_y_1*(0.5 - 0.5*y);
     const double scalings_z_0 = 1;
     const double scalings_z_1 = scalings_z_0*(0.5 - 0.5*z);
+    const double scalings_z_2 = scalings_z_1*(0.5 - 0.5*z);
     
     // Compute psitilde_a
     const double psitilde_a_0 = 1;
     const double psitilde_a_1 = x;
+    const double psitilde_a_2 = 1.5*x*psitilde_a_1 - 0.5*psitilde_a_0;
     
     // Compute psitilde_bs
     const double psitilde_bs_0_0 = 1;
     const double psitilde_bs_0_1 = 1.5*y + 0.5;
+    const double psitilde_bs_0_2 = 0.111111111111111*psitilde_bs_0_1 + 1.66666666666667*y*psitilde_bs_0_1 - 0.555555555555556*psitilde_bs_0_0;
     const double psitilde_bs_1_0 = 1;
+    const double psitilde_bs_1_1 = 2.5*y + 1.5;
+    const double psitilde_bs_2_0 = 1;
     
     // Compute psitilde_cs
     const double psitilde_cs_00_0 = 1;
     const double psitilde_cs_00_1 = 2*z + 1;
+    const double psitilde_cs_00_2 = 0.3125*psitilde_cs_00_1 + 1.875*z*psitilde_cs_00_1 - 0.5625*psitilde_cs_00_0;
     const double psitilde_cs_01_0 = 1;
+    const double psitilde_cs_01_1 = 3*z + 2;
+    const double psitilde_cs_02_0 = 1;
     const double psitilde_cs_10_0 = 1;
+    const double psitilde_cs_10_1 = 3*z + 2;
+    const double psitilde_cs_11_0 = 1;
+    const double psitilde_cs_20_0 = 1;
     
     // Compute basisvalues
     const double basisvalue0 = 0.866025403784439*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_0;
     const double basisvalue1 = 2.73861278752583*psitilde_a_1*scalings_y_1*psitilde_bs_1_0*scalings_z_1*psitilde_cs_10_0;
     const double basisvalue2 = 1.58113883008419*psitilde_a_0*scalings_y_0*psitilde_bs_0_1*scalings_z_1*psitilde_cs_01_0;
     const double basisvalue3 = 1.11803398874989*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_1;
-    
-    // Table(s) of coefficients
-    const static double coefficients0[4][4] = \
-    {{0.288675134594813, -0.182574185835055, -0.105409255338946, -0.074535599249993},
-    {0.288675134594813, 0.182574185835055, -0.105409255338946, -0.074535599249993},
-    {0.288675134594813, 0, 0.210818510677892, -0.074535599249993},
-    {0.288675134594813, 0, 0, 0.223606797749979}};
+    const double basisvalue4 = 5.1234753829798*psitilde_a_2*scalings_y_2*psitilde_bs_2_0*scalings_z_2*psitilde_cs_20_0;
+    const double basisvalue5 = 3.96862696659689*psitilde_a_1*scalings_y_1*psitilde_bs_1_1*scalings_z_2*psitilde_cs_11_0;
+    const double basisvalue6 = 2.29128784747792*psitilde_a_0*scalings_y_0*psitilde_bs_0_2*scalings_z_2*psitilde_cs_02_0;
+    const double basisvalue7 = 3.24037034920393*psitilde_a_1*scalings_y_1*psitilde_bs_1_0*scalings_z_1*psitilde_cs_10_1;
+    const double basisvalue8 = 1.87082869338697*psitilde_a_0*scalings_y_0*psitilde_bs_0_1*scalings_z_1*psitilde_cs_01_1;
+    const double basisvalue9 = 1.3228756555323*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_2;
+    
+    // Table(s) of coefficients
+    const static double coefficients0[10][10] = \
+    {{-0.0577350269189626, -0.0608580619450185, -0.0351364184463153, -0.0248451997499977, 0.0650600048632355, 0.0503952630678969, 0.0290957186981323, 0.0411475599898912, 0.0237565548366599, 0.0167984210226323},
+    {-0.0577350269189625, 0.0608580619450185, -0.0351364184463153, -0.0248451997499977, 0.0650600048632355, -0.050395263067897, 0.0290957186981323, -0.0411475599898912, 0.0237565548366599, 0.0167984210226323},
+    {-0.0577350269189625, 0, 0.0702728368926306, -0.0248451997499977, 0, 0, 0.0872871560943969, 0, -0.0475131096733199, 0.0167984210226323},
+    {-0.0577350269189626, 0, 0, 0.074535599249993, 0, 0, 0, 0, 0, 0.100790526135794},
+    {0.23094010767585, 0, 0.140545673785261, 0.0993807989999906, 0, 0, 0, 0, 0.1187827741833, -0.0671936840905293},
+    {0.230940107675851, 0.121716123890037, -0.0702728368926306, 0.0993807989999907, 0, 0, 0, 0.102868899974728, -0.0593913870916499, -0.0671936840905293},
+    {0.23094010767585, 0.121716123890037, 0.0702728368926307, -0.0993807989999907, 0, 0.100790526135794, -0.087287156094397, -0.0205737799949456, -0.01187827741833, 0.0167984210226323},
+    {0.23094010767585, -0.121716123890037, -0.0702728368926307, 0.0993807989999906, 0, 0, 0, -0.102868899974728, -0.0593913870916499, -0.0671936840905293},
+    {0.23094010767585, -0.121716123890037, 0.0702728368926306, -0.0993807989999906, 0, -0.100790526135794, -0.0872871560943969, 0.0205737799949456, -0.01187827741833, 0.0167984210226323},
+    {0.23094010767585, 0, -0.140545673785261, -0.0993807989999906, -0.130120009726471, 0, 0.0290957186981323, 0, 0.02375655483666, 0.0167984210226323}};
     
     // Extract relevant coefficients
     const double coeff0_0 = coefficients0[dof][0];
     const double coeff0_1 = coefficients0[dof][1];
     const double coeff0_2 = coefficients0[dof][2];
     const double coeff0_3 = coefficients0[dof][3];
+    const double coeff0_4 = coefficients0[dof][4];
+    const double coeff0_5 = coefficients0[dof][5];
+    const double coeff0_6 = coefficients0[dof][6];
+    const double coeff0_7 = coefficients0[dof][7];
+    const double coeff0_8 = coefficients0[dof][8];
+    const double coeff0_9 = coefficients0[dof][9];
     
     // Compute value(s)
-    *values = coeff0_0*basisvalue0 + coeff0_1*basisvalue1 + coeff0_2*basisvalue2 + coeff0_3*basisvalue3;
+    *values = coeff0_0*basisvalue0 + coeff0_1*basisvalue1 + coeff0_2*basisvalue2 + coeff0_3*basisvalue3 + coeff0_4*basisvalue4 + coeff0_5*basisvalue5 + coeff0_6*basisvalue6 + coeff0_7*basisvalue7 + coeff0_8*basisvalue8 + coeff0_9*basisvalue9;
 }
 
 /// Evaluate all basis functions at given point in cell
@@ -2610,56 +3210,98 @@ void UFC_SolitaryWave3DBilinearForm_fini
     // Generate scalings
     const double scalings_y_0 = 1;
     const double scalings_y_1 = scalings_y_0*(0.5 - 0.5*y);
+    const double scalings_y_2 = scalings_y_1*(0.5 - 0.5*y);
     const double scalings_z_0 = 1;
     const double scalings_z_1 = scalings_z_0*(0.5 - 0.5*z);
+    const double scalings_z_2 = scalings_z_1*(0.5 - 0.5*z);
     
     // Compute psitilde_a
     const double psitilde_a_0 = 1;
     const double psitilde_a_1 = x;
+    const double psitilde_a_2 = 1.5*x*psitilde_a_1 - 0.5*psitilde_a_0;
     
     // Compute psitilde_bs
     const double psitilde_bs_0_0 = 1;
     const double psitilde_bs_0_1 = 1.5*y + 0.5;
+    const double psitilde_bs_0_2 = 0.111111111111111*psitilde_bs_0_1 + 1.66666666666667*y*psitilde_bs_0_1 - 0.555555555555556*psitilde_bs_0_0;
     const double psitilde_bs_1_0 = 1;
+    const double psitilde_bs_1_1 = 2.5*y + 1.5;
+    const double psitilde_bs_2_0 = 1;
     
     // Compute psitilde_cs
     const double psitilde_cs_00_0 = 1;
     const double psitilde_cs_00_1 = 2*z + 1;
+    const double psitilde_cs_00_2 = 0.3125*psitilde_cs_00_1 + 1.875*z*psitilde_cs_00_1 - 0.5625*psitilde_cs_00_0;
     const double psitilde_cs_01_0 = 1;
+    const double psitilde_cs_01_1 = 3*z + 2;
+    const double psitilde_cs_02_0 = 1;
     const double psitilde_cs_10_0 = 1;
+    const double psitilde_cs_10_1 = 3*z + 2;
+    const double psitilde_cs_11_0 = 1;
+    const double psitilde_cs_20_0 = 1;
     
     // Compute basisvalues
     const double basisvalue0 = 0.866025403784439*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_0;
     const double basisvalue1 = 2.73861278752583*psitilde_a_1*scalings_y_1*psitilde_bs_1_0*scalings_z_1*psitilde_cs_10_0;
     const double basisvalue2 = 1.58113883008419*psitilde_a_0*scalings_y_0*psitilde_bs_0_1*scalings_z_1*psitilde_cs_01_0;
     const double basisvalue3 = 1.11803398874989*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_1;
-    
-    // Table(s) of coefficients
-    const static double coefficients0[4][4] = \
-    {{0.288675134594813, -0.182574185835055, -0.105409255338946, -0.074535599249993},
-    {0.288675134594813, 0.182574185835055, -0.105409255338946, -0.074535599249993},
-    {0.288675134594813, 0, 0.210818510677892, -0.074535599249993},
-    {0.288675134594813, 0, 0, 0.223606797749979}};
+    const double basisvalue4 = 5.1234753829798*psitilde_a_2*scalings_y_2*psitilde_bs_2_0*scalings_z_2*psitilde_cs_20_0;
+    const double basisvalue5 = 3.96862696659689*psitilde_a_1*scalings_y_1*psitilde_bs_1_1*scalings_z_2*psitilde_cs_11_0;
+    const double basisvalue6 = 2.29128784747792*psitilde_a_0*scalings_y_0*psitilde_bs_0_2*scalings_z_2*psitilde_cs_02_0;
+    const double basisvalue7 = 3.24037034920393*psitilde_a_1*scalings_y_1*psitilde_bs_1_0*scalings_z_1*psitilde_cs_10_1;
+    const double basisvalue8 = 1.87082869338697*psitilde_a_0*scalings_y_0*psitilde_bs_0_1*scalings_z_1*psitilde_cs_01_1;
+    const double basisvalue9 = 1.3228756555323*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_2;
+    
+    // Table(s) of coefficients
+    const static double coefficients0[10][10] = \
+    {{-0.0577350269189626, -0.0608580619450185, -0.0351364184463153, -0.0248451997499977, 0.0650600048632355, 0.0503952630678969, 0.0290957186981323, 0.0411475599898912, 0.0237565548366599, 0.0167984210226323},
+    {-0.0577350269189625, 0.0608580619450185, -0.0351364184463153, -0.0248451997499977, 0.0650600048632355, -0.050395263067897, 0.0290957186981323, -0.0411475599898912, 0.0237565548366599, 0.0167984210226323},
+    {-0.0577350269189625, 0, 0.0702728368926306, -0.0248451997499977, 0, 0, 0.0872871560943969, 0, -0.0475131096733199, 0.0167984210226323},
+    {-0.0577350269189626, 0, 0, 0.074535599249993, 0, 0, 0, 0, 0, 0.100790526135794},
+    {0.23094010767585, 0, 0.140545673785261, 0.0993807989999906, 0, 0, 0, 0, 0.1187827741833, -0.0671936840905293},
+    {0.230940107675851, 0.121716123890037, -0.0702728368926306, 0.0993807989999907, 0, 0, 0, 0.102868899974728, -0.0593913870916499, -0.0671936840905293},
+    {0.23094010767585, 0.121716123890037, 0.0702728368926307, -0.0993807989999907, 0, 0.100790526135794, -0.087287156094397, -0.0205737799949456, -0.01187827741833, 0.0167984210226323},
+    {0.23094010767585, -0.121716123890037, -0.0702728368926307, 0.0993807989999906, 0, 0, 0, -0.102868899974728, -0.0593913870916499, -0.0671936840905293},
+    {0.23094010767585, -0.121716123890037, 0.0702728368926306, -0.0993807989999906, 0, -0.100790526135794, -0.0872871560943969, 0.0205737799949456, -0.01187827741833, 0.0167984210226323},
+    {0.23094010767585, 0, -0.140545673785261, -0.0993807989999906, -0.130120009726471, 0, 0.0290957186981323, 0, 0.02375655483666, 0.0167984210226323}};
     
     // Interesting (new) part
     // Tables of derivatives of the polynomial base (transpose)
-    const static double dmats0[4][4] = \
-    {{0, 0, 0, 0},
-    {6.32455532033676, 0, 0, 0},
-    {0, 0, 0, 0},
-    {0, 0, 0, 0}};
-    
-    const static double dmats1[4][4] = \
-    {{0, 0, 0, 0},
-    {3.16227766016838, 0, 0, 0},
-    {5.47722557505166, 0, 0, 0},
-    {0, 0, 0, 0}};
-    
-    const static double dmats2[4][4] = \
-    {{0, 0, 0, 0},
-    {3.16227766016838, 0, 0, 0},
-    {1.82574185835055, 0, 0, 0},
-    {5.16397779494322, 0, 0, 0}};
+    const static double dmats0[10][10] = \
+    {{0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {6.32455532033676, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {0, 11.2249721603218, 0, 0, 0, 0, 0, 0, 0, 0},
+    {4.58257569495584, 0, 8.36660026534076, -1.18321595661992, 0, 0, 0, 0, 0, 0},
+    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {3.74165738677394, 0, 0, 8.69482604771366, 0, 0, 0, 0, 0, 0},
+    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
+    
+    const static double dmats1[10][10] = \
+    {{0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {3.16227766016838, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {5.47722557505166, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {2.95803989154981, 5.61248608016091, -1.08012344973464, -0.763762615825974, 0, 0, 0, 0, 0, 0},
+    {2.29128784747792, 7.24568837309472, 4.18330013267038, -0.591607978309962, 0, 0, 0, 0, 0, 0},
+    {-2.64575131106459, 0, 9.66091783079296, 0.683130051063974, 0, 0, 0, 0, 0, 0},
+    {1.87082869338697, 0, 0, 4.34741302385683, 0, 0, 0, 0, 0, 0},
+    {3.24037034920393, 0, 0, 7.52994023880668, 0, 0, 0, 0, 0, 0},
+    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
+    
+    const static double dmats2[10][10] = \
+    {{0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {3.16227766016838, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {1.82574185835055, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {5.16397779494322, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {2.95803989154981, 5.61248608016091, -1.08012344973464, -0.763762615825974, 0, 0, 0, 0, 0, 0},
+    {2.29128784747792, 1.44913767461894, 4.18330013267038, -0.591607978309962, 0, 0, 0, 0, 0, 0},
+    {1.32287565553229, 0, 3.86436713231718, -0.341565025531986, 0, 0, 0, 0, 0, 0},
+    {1.87082869338697, 7.09929573971954, 0, 4.34741302385683, 0, 0, 0, 0, 0, 0},
+    {1.08012344973464, 0, 7.09929573971954, 2.50998007960223, 0, 0, 0, 0, 0, 0},
+    {-3.81881307912987, 0, 0, 8.87411967464942, 0, 0, 0, 0, 0, 0}};
     
     // Compute reference derivatives
     // Declare pointer to array of derivatives on FIAT element
@@ -2670,12 +3312,24 @@ void UFC_SolitaryWave3DBilinearForm_fini
     double coeff0_1 = 0;
     double coeff0_2 = 0;
     double coeff0_3 = 0;
+    double coeff0_4 = 0;
+    double coeff0_5 = 0;
+    double coeff0_6 = 0;
+    double coeff0_7 = 0;
+    double coeff0_8 = 0;
+    double coeff0_9 = 0;
     
     // Declare new coefficients
     double new_coeff0_0 = 0;
     double new_coeff0_1 = 0;
     double new_coeff0_2 = 0;
     double new_coeff0_3 = 0;
+    double new_coeff0_4 = 0;
+    double new_coeff0_5 = 0;
+    double new_coeff0_6 = 0;
+    double new_coeff0_7 = 0;
+    double new_coeff0_8 = 0;
+    double new_coeff0_9 = 0;
     
     // Loop possible derivatives
     for (unsigned int deriv_num = 0; deriv_num < num_derivatives; deriv_num++)
@@ -2685,6 +3339,12 @@ void UFC_SolitaryWave3DBilinearForm_fini
       new_coeff0_1 = coefficients0[dof][1];
       new_coeff0_2 = coefficients0[dof][2];
       new_coeff0_3 = coefficients0[dof][3];
+      new_coeff0_4 = coefficients0[dof][4];
+      new_coeff0_5 = coefficients0[dof][5];
+      new_coeff0_6 = coefficients0[dof][6];
+      new_coeff0_7 = coefficients0[dof][7];
+      new_coeff0_8 = coefficients0[dof][8];
+      new_coeff0_9 = coefficients0[dof][9];
     
       // Loop derivative order
       for (unsigned int j = 0; j < n; j++)
@@ -2694,32 +3354,56 @@ void UFC_SolitaryWave3DBilinearForm_fini
         coeff0_1 = new_coeff0_1;
         coeff0_2 = new_coeff0_2;
         coeff0_3 = new_coeff0_3;
+        coeff0_4 = new_coeff0_4;
+        coeff0_5 = new_coeff0_5;
+        coeff0_6 = new_coeff0_6;
+        coeff0_7 = new_coeff0_7;
+        coeff0_8 = new_coeff0_8;
+        coeff0_9 = new_coeff0_9;
     
         if(combinations[deriv_num][j] == 0)
         {
-          new_coeff0_0 = coeff0_0*dmats0[0][0] + coeff0_1*dmats0[1][0] + coeff0_2*dmats0[2][0] + coeff0_3*dmats0[3][0];
-          new_coeff0_1 = coeff0_0*dmats0[0][1] + coeff0_1*dmats0[1][1] + coeff0_2*dmats0[2][1] + coeff0_3*dmats0[3][1];
-          new_coeff0_2 = coeff0_0*dmats0[0][2] + coeff0_1*dmats0[1][2] + coeff0_2*dmats0[2][2] + coeff0_3*dmats0[3][2];
-          new_coeff0_3 = coeff0_0*dmats0[0][3] + coeff0_1*dmats0[1][3] + coeff0_2*dmats0[2][3] + coeff0_3*dmats0[3][3];
+          new_coeff0_0 = coeff0_0*dmats0[0][0] + coeff0_1*dmats0[1][0] + coeff0_2*dmats0[2][0] + coeff0_3*dmats0[3][0] + coeff0_4*dmats0[4][0] + coeff0_5*dmats0[5][0] + coeff0_6*dmats0[6][0] + coeff0_7*dmats0[7][0] + coeff0_8*dmats0[8][0] + coeff0_9*dmats0[9][0];
+          new_coeff0_1 = coeff0_0*dmats0[0][1] + coeff0_1*dmats0[1][1] + coeff0_2*dmats0[2][1] + coeff0_3*dmats0[3][1] + coeff0_4*dmats0[4][1] + coeff0_5*dmats0[5][1] + coeff0_6*dmats0[6][1] + coeff0_7*dmats0[7][1] + coeff0_8*dmats0[8][1] + coeff0_9*dmats0[9][1];
+          new_coeff0_2 = coeff0_0*dmats0[0][2] + coeff0_1*dmats0[1][2] + coeff0_2*dmats0[2][2] + coeff0_3*dmats0[3][2] + coeff0_4*dmats0[4][2] + coeff0_5*dmats0[5][2] + coeff0_6*dmats0[6][2] + coeff0_7*dmats0[7][2] + coeff0_8*dmats0[8][2] + coeff0_9*dmats0[9][2];
+          new_coeff0_3 = coeff0_0*dmats0[0][3] + coeff0_1*dmats0[1][3] + coeff0_2*dmats0[2][3] + coeff0_3*dmats0[3][3] + coeff0_4*dmats0[4][3] + coeff0_5*dmats0[5][3] + coeff0_6*dmats0[6][3] + coeff0_7*dmats0[7][3] + coeff0_8*dmats0[8][3] + coeff0_9*dmats0[9][3];
+          new_coeff0_4 = coeff0_0*dmats0[0][4] + coeff0_1*dmats0[1][4] + coeff0_2*dmats0[2][4] + coeff0_3*dmats0[3][4] + coeff0_4*dmats0[4][4] + coeff0_5*dmats0[5][4] + coeff0_6*dmats0[6][4] + coeff0_7*dmats0[7][4] + coeff0_8*dmats0[8][4] + coeff0_9*dmats0[9][4];
+          new_coeff0_5 = coeff0_0*dmats0[0][5] + coeff0_1*dmats0[1][5] + coeff0_2*dmats0[2][5] + coeff0_3*dmats0[3][5] + coeff0_4*dmats0[4][5] + coeff0_5*dmats0[5][5] + coeff0_6*dmats0[6][5] + coeff0_7*dmats0[7][5] + coeff0_8*dmats0[8][5] + coeff0_9*dmats0[9][5];
+          new_coeff0_6 = coeff0_0*dmats0[0][6] + coeff0_1*dmats0[1][6] + coeff0_2*dmats0[2][6] + coeff0_3*dmats0[3][6] + coeff0_4*dmats0[4][6] + coeff0_5*dmats0[5][6] + coeff0_6*dmats0[6][6] + coeff0_7*dmats0[7][6] + coeff0_8*dmats0[8][6] + coeff0_9*dmats0[9][6];
+          new_coeff0_7 = coeff0_0*dmats0[0][7] + coeff0_1*dmats0[1][7] + coeff0_2*dmats0[2][7] + coeff0_3*dmats0[3][7] + coeff0_4*dmats0[4][7] + coeff0_5*dmats0[5][7] + coeff0_6*dmats0[6][7] + coeff0_7*dmats0[7][7] + coeff0_8*dmats0[8][7] + coeff0_9*dmats0[9][7];
+          new_coeff0_8 = coeff0_0*dmats0[0][8] + coeff0_1*dmats0[1][8] + coeff0_2*dmats0[2][8] + coeff0_3*dmats0[3][8] + coeff0_4*dmats0[4][8] + coeff0_5*dmats0[5][8] + coeff0_6*dmats0[6][8] + coeff0_7*dmats0[7][8] + coeff0_8*dmats0[8][8] + coeff0_9*dmats0[9][8];
+          new_coeff0_9 = coeff0_0*dmats0[0][9] + coeff0_1*dmats0[1][9] + coeff0_2*dmats0[2][9] + coeff0_3*dmats0[3][9] + coeff0_4*dmats0[4][9] + coeff0_5*dmats0[5][9] + coeff0_6*dmats0[6][9] + coeff0_7*dmats0[7][9] + coeff0_8*dmats0[8][9] + coeff0_9*dmats0[9][9];
         }
         if(combinations[deriv_num][j] == 1)
         {
-          new_coeff0_0 = coeff0_0*dmats1[0][0] + coeff0_1*dmats1[1][0] + coeff0_2*dmats1[2][0] + coeff0_3*dmats1[3][0];
-          new_coeff0_1 = coeff0_0*dmats1[0][1] + coeff0_1*dmats1[1][1] + coeff0_2*dmats1[2][1] + coeff0_3*dmats1[3][1];
-          new_coeff0_2 = coeff0_0*dmats1[0][2] + coeff0_1*dmats1[1][2] + coeff0_2*dmats1[2][2] + coeff0_3*dmats1[3][2];
-          new_coeff0_3 = coeff0_0*dmats1[0][3] + coeff0_1*dmats1[1][3] + coeff0_2*dmats1[2][3] + coeff0_3*dmats1[3][3];
+          new_coeff0_0 = coeff0_0*dmats1[0][0] + coeff0_1*dmats1[1][0] + coeff0_2*dmats1[2][0] + coeff0_3*dmats1[3][0] + coeff0_4*dmats1[4][0] + coeff0_5*dmats1[5][0] + coeff0_6*dmats1[6][0] + coeff0_7*dmats1[7][0] + coeff0_8*dmats1[8][0] + coeff0_9*dmats1[9][0];
+          new_coeff0_1 = coeff0_0*dmats1[0][1] + coeff0_1*dmats1[1][1] + coeff0_2*dmats1[2][1] + coeff0_3*dmats1[3][1] + coeff0_4*dmats1[4][1] + coeff0_5*dmats1[5][1] + coeff0_6*dmats1[6][1] + coeff0_7*dmats1[7][1] + coeff0_8*dmats1[8][1] + coeff0_9*dmats1[9][1];
+          new_coeff0_2 = coeff0_0*dmats1[0][2] + coeff0_1*dmats1[1][2] + coeff0_2*dmats1[2][2] + coeff0_3*dmats1[3][2] + coeff0_4*dmats1[4][2] + coeff0_5*dmats1[5][2] + coeff0_6*dmats1[6][2] + coeff0_7*dmats1[7][2] + coeff0_8*dmats1[8][2] + coeff0_9*dmats1[9][2];
+          new_coeff0_3 = coeff0_0*dmats1[0][3] + coeff0_1*dmats1[1][3] + coeff0_2*dmats1[2][3] + coeff0_3*dmats1[3][3] + coeff0_4*dmats1[4][3] + coeff0_5*dmats1[5][3] + coeff0_6*dmats1[6][3] + coeff0_7*dmats1[7][3] + coeff0_8*dmats1[8][3] + coeff0_9*dmats1[9][3];
+          new_coeff0_4 = coeff0_0*dmats1[0][4] + coeff0_1*dmats1[1][4] + coeff0_2*dmats1[2][4] + coeff0_3*dmats1[3][4] + coeff0_4*dmats1[4][4] + coeff0_5*dmats1[5][4] + coeff0_6*dmats1[6][4] + coeff0_7*dmats1[7][4] + coeff0_8*dmats1[8][4] + coeff0_9*dmats1[9][4];
+          new_coeff0_5 = coeff0_0*dmats1[0][5] + coeff0_1*dmats1[1][5] + coeff0_2*dmats1[2][5] + coeff0_3*dmats1[3][5] + coeff0_4*dmats1[4][5] + coeff0_5*dmats1[5][5] + coeff0_6*dmats1[6][5] + coeff0_7*dmats1[7][5] + coeff0_8*dmats1[8][5] + coeff0_9*dmats1[9][5];
+          new_coeff0_6 = coeff0_0*dmats1[0][6] + coeff0_1*dmats1[1][6] + coeff0_2*dmats1[2][6] + coeff0_3*dmats1[3][6] + coeff0_4*dmats1[4][6] + coeff0_5*dmats1[5][6] + coeff0_6*dmats1[6][6] + coeff0_7*dmats1[7][6] + coeff0_8*dmats1[8][6] + coeff0_9*dmats1[9][6];
+          new_coeff0_7 = coeff0_0*dmats1[0][7] + coeff0_1*dmats1[1][7] + coeff0_2*dmats1[2][7] + coeff0_3*dmats1[3][7] + coeff0_4*dmats1[4][7] + coeff0_5*dmats1[5][7] + coeff0_6*dmats1[6][7] + coeff0_7*dmats1[7][7] + coeff0_8*dmats1[8][7] + coeff0_9*dmats1[9][7];
+          new_coeff0_8 = coeff0_0*dmats1[0][8] + coeff0_1*dmats1[1][8] + coeff0_2*dmats1[2][8] + coeff0_3*dmats1[3][8] + coeff0_4*dmats1[4][8] + coeff0_5*dmats1[5][8] + coeff0_6*dmats1[6][8] + coeff0_7*dmats1[7][8] + coeff0_8*dmats1[8][8] + coeff0_9*dmats1[9][8];
+          new_coeff0_9 = coeff0_0*dmats1[0][9] + coeff0_1*dmats1[1][9] + coeff0_2*dmats1[2][9] + coeff0_3*dmats1[3][9] + coeff0_4*dmats1[4][9] + coeff0_5*dmats1[5][9] + coeff0_6*dmats1[6][9] + coeff0_7*dmats1[7][9] + coeff0_8*dmats1[8][9] + coeff0_9*dmats1[9][9];
         }
         if(combinations[deriv_num][j] == 2)
         {
-          new_coeff0_0 = coeff0_0*dmats2[0][0] + coeff0_1*dmats2[1][0] + coeff0_2*dmats2[2][0] + coeff0_3*dmats2[3][0];
-          new_coeff0_1 = coeff0_0*dmats2[0][1] + coeff0_1*dmats2[1][1] + coeff0_2*dmats2[2][1] + coeff0_3*dmats2[3][1];
-          new_coeff0_2 = coeff0_0*dmats2[0][2] + coeff0_1*dmats2[1][2] + coeff0_2*dmats2[2][2] + coeff0_3*dmats2[3][2];
-          new_coeff0_3 = coeff0_0*dmats2[0][3] + coeff0_1*dmats2[1][3] + coeff0_2*dmats2[2][3] + coeff0_3*dmats2[3][3];
+          new_coeff0_0 = coeff0_0*dmats2[0][0] + coeff0_1*dmats2[1][0] + coeff0_2*dmats2[2][0] + coeff0_3*dmats2[3][0] + coeff0_4*dmats2[4][0] + coeff0_5*dmats2[5][0] + coeff0_6*dmats2[6][0] + coeff0_7*dmats2[7][0] + coeff0_8*dmats2[8][0] + coeff0_9*dmats2[9][0];
+          new_coeff0_1 = coeff0_0*dmats2[0][1] + coeff0_1*dmats2[1][1] + coeff0_2*dmats2[2][1] + coeff0_3*dmats2[3][1] + coeff0_4*dmats2[4][1] + coeff0_5*dmats2[5][1] + coeff0_6*dmats2[6][1] + coeff0_7*dmats2[7][1] + coeff0_8*dmats2[8][1] + coeff0_9*dmats2[9][1];
+          new_coeff0_2 = coeff0_0*dmats2[0][2] + coeff0_1*dmats2[1][2] + coeff0_2*dmats2[2][2] + coeff0_3*dmats2[3][2] + coeff0_4*dmats2[4][2] + coeff0_5*dmats2[5][2] + coeff0_6*dmats2[6][2] + coeff0_7*dmats2[7][2] + coeff0_8*dmats2[8][2] + coeff0_9*dmats2[9][2];
+          new_coeff0_3 = coeff0_0*dmats2[0][3] + coeff0_1*dmats2[1][3] + coeff0_2*dmats2[2][3] + coeff0_3*dmats2[3][3] + coeff0_4*dmats2[4][3] + coeff0_5*dmats2[5][3] + coeff0_6*dmats2[6][3] + coeff0_7*dmats2[7][3] + coeff0_8*dmats2[8][3] + coeff0_9*dmats2[9][3];
+          new_coeff0_4 = coeff0_0*dmats2[0][4] + coeff0_1*dmats2[1][4] + coeff0_2*dmats2[2][4] + coeff0_3*dmats2[3][4] + coeff0_4*dmats2[4][4] + coeff0_5*dmats2[5][4] + coeff0_6*dmats2[6][4] + coeff0_7*dmats2[7][4] + coeff0_8*dmats2[8][4] + coeff0_9*dmats2[9][4];
+          new_coeff0_5 = coeff0_0*dmats2[0][5] + coeff0_1*dmats2[1][5] + coeff0_2*dmats2[2][5] + coeff0_3*dmats2[3][5] + coeff0_4*dmats2[4][5] + coeff0_5*dmats2[5][5] + coeff0_6*dmats2[6][5] + coeff0_7*dmats2[7][5] + coeff0_8*dmats2[8][5] + coeff0_9*dmats2[9][5];
+          new_coeff0_6 = coeff0_0*dmats2[0][6] + coeff0_1*dmats2[1][6] + coeff0_2*dmats2[2][6] + coeff0_3*dmats2[3][6] + coeff0_4*dmats2[4][6] + coeff0_5*dmats2[5][6] + coeff0_6*dmats2[6][6] + coeff0_7*dmats2[7][6] + coeff0_8*dmats2[8][6] + coeff0_9*dmats2[9][6];
+          new_coeff0_7 = coeff0_0*dmats2[0][7] + coeff0_1*dmats2[1][7] + coeff0_2*dmats2[2][7] + coeff0_3*dmats2[3][7] + coeff0_4*dmats2[4][7] + coeff0_5*dmats2[5][7] + coeff0_6*dmats2[6][7] + coeff0_7*dmats2[7][7] + coeff0_8*dmats2[8][7] + coeff0_9*dmats2[9][7];
+          new_coeff0_8 = coeff0_0*dmats2[0][8] + coeff0_1*dmats2[1][8] + coeff0_2*dmats2[2][8] + coeff0_3*dmats2[3][8] + coeff0_4*dmats2[4][8] + coeff0_5*dmats2[5][8] + coeff0_6*dmats2[6][8] + coeff0_7*dmats2[7][8] + coeff0_8*dmats2[8][8] + coeff0_9*dmats2[9][8];
+          new_coeff0_9 = coeff0_0*dmats2[0][9] + coeff0_1*dmats2[1][9] + coeff0_2*dmats2[2][9] + coeff0_3*dmats2[3][9] + coeff0_4*dmats2[4][9] + coeff0_5*dmats2[5][9] + coeff0_6*dmats2[6][9] + coeff0_7*dmats2[7][9] + coeff0_8*dmats2[8][9] + coeff0_9*dmats2[9][9];
         }
     
       }
       // Compute derivatives on reference element as dot product of coefficients and basisvalues
-      derivatives[deriv_num] = new_coeff0_0*basisvalue0 + new_coeff0_1*basisvalue1 + new_coeff0_2*basisvalue2 + new_coeff0_3*basisvalue3;
+      derivatives[deriv_num] = new_coeff0_0*basisvalue0 + new_coeff0_1*basisvalue1 + new_coeff0_2*basisvalue2 + new_coeff0_3*basisvalue3 + new_coeff0_4*basisvalue4 + new_coeff0_5*basisvalue5 + new_coeff0_6*basisvalue6 + new_coeff0_7*basisvalue7 + new_coeff0_8*basisvalue8 + new_coeff0_9*basisvalue9;
     }
     
     // Transform derivatives back to physical element
@@ -2759,9 +3443,9 @@ double UFC_SolitaryWave3DBilinearForm_fi
                                    const ufc::cell& c) const
 {
     // The reference points, direction and weights:
-    const static double X[4][1][3] = {{{0, 0, 0}}, {{1, 0, 0}}, {{0, 1, 0}}, {{0, 0, 1}}};
-    const static double W[4][1] = {{1}, {1}, {1}, {1}};
-    const static double D[4][1][1] = {{{1}}, {{1}}, {{1}}, {{1}}};
+    const static double X[10][1][3] = {{{0, 0, 0}}, {{1, 0, 0}}, {{0, 1, 0}}, {{0, 0, 1}}, {{0, 0.5, 0.5}}, {{0.5, 0, 0.5}}, {{0.5, 0.5, 0}}, {{0, 0, 0.5}}, {{0, 0.5, 0}}, {{0.5, 0, 0}}};
+    const static double W[10][1] = {{1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}};
+    const static double D[10][1][1] = {{{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}};
     
     const double * const * x = c.coordinates;
     double result = 0.0;
@@ -2844,7 +3528,7 @@ UFC_SolitaryWave3DBilinearForm_finite_el
 /// Return a string identifying the finite element
 const char* UFC_SolitaryWave3DBilinearForm_finite_element_1::signature() const
 {
-    return "MixedElement([FiniteElement('Lagrange', 'tetrahedron', 1), FiniteElement('Lagrange', 'tetrahedron', 1)])";
+    return "MixedElement([FiniteElement('Lagrange', 'tetrahedron', 2), FiniteElement('Lagrange', 'tetrahedron', 2)])";
 }
 
 /// Return the cell shape
@@ -2856,7 +3540,7 @@ ufc::shape UFC_SolitaryWave3DBilinearFor
 /// Return the dimension of the finite element function space
 unsigned int UFC_SolitaryWave3DBilinearForm_finite_element_1::space_dimension() const
 {
-    return 8;
+    return 20;
 }
 
 /// Return the rank of the value space
@@ -2942,7 +3626,7 @@ void UFC_SolitaryWave3DBilinearForm_fini
     values[0] = 0;
     values[1] = 0;
     
-    if (0 <= i && i <= 3)
+    if (0 <= i && i <= 9)
     {
       // Map degree of freedom to element degree of freedom
       const unsigned int dof = i;
@@ -2950,94 +3634,154 @@ void UFC_SolitaryWave3DBilinearForm_fini
       // Generate scalings
       const double scalings_y_0 = 1;
       const double scalings_y_1 = scalings_y_0*(0.5 - 0.5*y);
+      const double scalings_y_2 = scalings_y_1*(0.5 - 0.5*y);
       const double scalings_z_0 = 1;
       const double scalings_z_1 = scalings_z_0*(0.5 - 0.5*z);
+      const double scalings_z_2 = scalings_z_1*(0.5 - 0.5*z);
     
       // Compute psitilde_a
       const double psitilde_a_0 = 1;
       const double psitilde_a_1 = x;
+      const double psitilde_a_2 = 1.5*x*psitilde_a_1 - 0.5*psitilde_a_0;
     
       // Compute psitilde_bs
       const double psitilde_bs_0_0 = 1;
       const double psitilde_bs_0_1 = 1.5*y + 0.5;
+      const double psitilde_bs_0_2 = 0.111111111111111*psitilde_bs_0_1 + 1.66666666666667*y*psitilde_bs_0_1 - 0.555555555555556*psitilde_bs_0_0;
       const double psitilde_bs_1_0 = 1;
+      const double psitilde_bs_1_1 = 2.5*y + 1.5;
+      const double psitilde_bs_2_0 = 1;
     
       // Compute psitilde_cs
       const double psitilde_cs_00_0 = 1;
       const double psitilde_cs_00_1 = 2*z + 1;
+      const double psitilde_cs_00_2 = 0.3125*psitilde_cs_00_1 + 1.875*z*psitilde_cs_00_1 - 0.5625*psitilde_cs_00_0;
       const double psitilde_cs_01_0 = 1;
+      const double psitilde_cs_01_1 = 3*z + 2;
+      const double psitilde_cs_02_0 = 1;
       const double psitilde_cs_10_0 = 1;
+      const double psitilde_cs_10_1 = 3*z + 2;
+      const double psitilde_cs_11_0 = 1;
+      const double psitilde_cs_20_0 = 1;
     
       // Compute basisvalues
       const double basisvalue0 = 0.866025403784439*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_0;
       const double basisvalue1 = 2.73861278752583*psitilde_a_1*scalings_y_1*psitilde_bs_1_0*scalings_z_1*psitilde_cs_10_0;
       const double basisvalue2 = 1.58113883008419*psitilde_a_0*scalings_y_0*psitilde_bs_0_1*scalings_z_1*psitilde_cs_01_0;
       const double basisvalue3 = 1.11803398874989*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_1;
-    
-      // Table(s) of coefficients
-      const static double coefficients0[4][4] =   \
-      {{0.288675134594813, -0.182574185835055, -0.105409255338946, -0.074535599249993},
-      {0.288675134594813, 0.182574185835055, -0.105409255338946, -0.074535599249993},
-      {0.288675134594813, 0, 0.210818510677892, -0.074535599249993},
-      {0.288675134594813, 0, 0, 0.223606797749979}};
+      const double basisvalue4 = 5.1234753829798*psitilde_a_2*scalings_y_2*psitilde_bs_2_0*scalings_z_2*psitilde_cs_20_0;
+      const double basisvalue5 = 3.96862696659689*psitilde_a_1*scalings_y_1*psitilde_bs_1_1*scalings_z_2*psitilde_cs_11_0;
+      const double basisvalue6 = 2.29128784747792*psitilde_a_0*scalings_y_0*psitilde_bs_0_2*scalings_z_2*psitilde_cs_02_0;
+      const double basisvalue7 = 3.24037034920393*psitilde_a_1*scalings_y_1*psitilde_bs_1_0*scalings_z_1*psitilde_cs_10_1;
+      const double basisvalue8 = 1.87082869338697*psitilde_a_0*scalings_y_0*psitilde_bs_0_1*scalings_z_1*psitilde_cs_01_1;
+      const double basisvalue9 = 1.3228756555323*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_2;
+    
+      // Table(s) of coefficients
+      const static double coefficients0[10][10] =   \
+      {{-0.0577350269189626, -0.0608580619450185, -0.0351364184463153, -0.0248451997499977, 0.0650600048632355, 0.0503952630678969, 0.0290957186981323, 0.0411475599898912, 0.0237565548366599, 0.0167984210226323},
+      {-0.0577350269189625, 0.0608580619450185, -0.0351364184463153, -0.0248451997499977, 0.0650600048632355, -0.050395263067897, 0.0290957186981323, -0.0411475599898912, 0.0237565548366599, 0.0167984210226323},
+      {-0.0577350269189625, 0, 0.0702728368926306, -0.0248451997499977, 0, 0, 0.0872871560943969, 0, -0.0475131096733199, 0.0167984210226323},
+      {-0.0577350269189626, 0, 0, 0.074535599249993, 0, 0, 0, 0, 0, 0.100790526135794},
+      {0.23094010767585, 0, 0.140545673785261, 0.0993807989999906, 0, 0, 0, 0, 0.1187827741833, -0.0671936840905293},
+      {0.230940107675851, 0.121716123890037, -0.0702728368926306, 0.0993807989999907, 0, 0, 0, 0.102868899974728, -0.0593913870916499, -0.0671936840905293},
+      {0.23094010767585, 0.121716123890037, 0.0702728368926307, -0.0993807989999907, 0, 0.100790526135794, -0.087287156094397, -0.0205737799949456, -0.01187827741833, 0.0167984210226323},
+      {0.23094010767585, -0.121716123890037, -0.0702728368926307, 0.0993807989999906, 0, 0, 0, -0.102868899974728, -0.0593913870916499, -0.0671936840905293},
+      {0.23094010767585, -0.121716123890037, 0.0702728368926306, -0.0993807989999906, 0, -0.100790526135794, -0.0872871560943969, 0.0205737799949456, -0.01187827741833, 0.0167984210226323},
+      {0.23094010767585, 0, -0.140545673785261, -0.0993807989999906, -0.130120009726471, 0, 0.0290957186981323, 0, 0.02375655483666, 0.0167984210226323}};
     
       // Extract relevant coefficients
       const double coeff0_0 =   coefficients0[dof][0];
       const double coeff0_1 =   coefficients0[dof][1];
       const double coeff0_2 =   coefficients0[dof][2];
       const double coeff0_3 =   coefficients0[dof][3];
+      const double coeff0_4 =   coefficients0[dof][4];
+      const double coeff0_5 =   coefficients0[dof][5];
+      const double coeff0_6 =   coefficients0[dof][6];
+      const double coeff0_7 =   coefficients0[dof][7];
+      const double coeff0_8 =   coefficients0[dof][8];
+      const double coeff0_9 =   coefficients0[dof][9];
     
       // Compute value(s)
-      values[0] = coeff0_0*basisvalue0 + coeff0_1*basisvalue1 + coeff0_2*basisvalue2 + coeff0_3*basisvalue3;
-    }
-    
-    if (4 <= i && i <= 7)
-    {
-      // Map degree of freedom to element degree of freedom
-      const unsigned int dof = i - 4;
+      values[0] = coeff0_0*basisvalue0 + coeff0_1*basisvalue1 + coeff0_2*basisvalue2 + coeff0_3*basisvalue3 + coeff0_4*basisvalue4 + coeff0_5*basisvalue5 + coeff0_6*basisvalue6 + coeff0_7*basisvalue7 + coeff0_8*basisvalue8 + coeff0_9*basisvalue9;
+    }
+    
+    if (10 <= i && i <= 19)
+    {
+      // Map degree of freedom to element degree of freedom
+      const unsigned int dof = i - 10;
     
       // Generate scalings
       const double scalings_y_0 = 1;
       const double scalings_y_1 = scalings_y_0*(0.5 - 0.5*y);
+      const double scalings_y_2 = scalings_y_1*(0.5 - 0.5*y);
       const double scalings_z_0 = 1;
       const double scalings_z_1 = scalings_z_0*(0.5 - 0.5*z);
+      const double scalings_z_2 = scalings_z_1*(0.5 - 0.5*z);
     
       // Compute psitilde_a
       const double psitilde_a_0 = 1;
       const double psitilde_a_1 = x;
+      const double psitilde_a_2 = 1.5*x*psitilde_a_1 - 0.5*psitilde_a_0;
     
       // Compute psitilde_bs
       const double psitilde_bs_0_0 = 1;
       const double psitilde_bs_0_1 = 1.5*y + 0.5;
+      const double psitilde_bs_0_2 = 0.111111111111111*psitilde_bs_0_1 + 1.66666666666667*y*psitilde_bs_0_1 - 0.555555555555556*psitilde_bs_0_0;
       const double psitilde_bs_1_0 = 1;
+      const double psitilde_bs_1_1 = 2.5*y + 1.5;
+      const double psitilde_bs_2_0 = 1;
     
       // Compute psitilde_cs
       const double psitilde_cs_00_0 = 1;
       const double psitilde_cs_00_1 = 2*z + 1;
+      const double psitilde_cs_00_2 = 0.3125*psitilde_cs_00_1 + 1.875*z*psitilde_cs_00_1 - 0.5625*psitilde_cs_00_0;
       const double psitilde_cs_01_0 = 1;
+      const double psitilde_cs_01_1 = 3*z + 2;
+      const double psitilde_cs_02_0 = 1;
       const double psitilde_cs_10_0 = 1;
+      const double psitilde_cs_10_1 = 3*z + 2;
+      const double psitilde_cs_11_0 = 1;
+      const double psitilde_cs_20_0 = 1;
     
       // Compute basisvalues
       const double basisvalue0 = 0.866025403784439*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_0;
       const double basisvalue1 = 2.73861278752583*psitilde_a_1*scalings_y_1*psitilde_bs_1_0*scalings_z_1*psitilde_cs_10_0;
       const double basisvalue2 = 1.58113883008419*psitilde_a_0*scalings_y_0*psitilde_bs_0_1*scalings_z_1*psitilde_cs_01_0;
       const double basisvalue3 = 1.11803398874989*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_1;
-    
-      // Table(s) of coefficients
-      const static double coefficients0[4][4] =   \
-      {{0.288675134594813, -0.182574185835055, -0.105409255338946, -0.074535599249993},
-      {0.288675134594813, 0.182574185835055, -0.105409255338946, -0.074535599249993},
-      {0.288675134594813, 0, 0.210818510677892, -0.074535599249993},
-      {0.288675134594813, 0, 0, 0.223606797749979}};
+      const double basisvalue4 = 5.1234753829798*psitilde_a_2*scalings_y_2*psitilde_bs_2_0*scalings_z_2*psitilde_cs_20_0;
+      const double basisvalue5 = 3.96862696659689*psitilde_a_1*scalings_y_1*psitilde_bs_1_1*scalings_z_2*psitilde_cs_11_0;
+      const double basisvalue6 = 2.29128784747792*psitilde_a_0*scalings_y_0*psitilde_bs_0_2*scalings_z_2*psitilde_cs_02_0;
+      const double basisvalue7 = 3.24037034920393*psitilde_a_1*scalings_y_1*psitilde_bs_1_0*scalings_z_1*psitilde_cs_10_1;
+      const double basisvalue8 = 1.87082869338697*psitilde_a_0*scalings_y_0*psitilde_bs_0_1*scalings_z_1*psitilde_cs_01_1;
+      const double basisvalue9 = 1.3228756555323*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_2;
+    
+      // Table(s) of coefficients
+      const static double coefficients0[10][10] =   \
+      {{-0.0577350269189626, -0.0608580619450185, -0.0351364184463153, -0.0248451997499977, 0.0650600048632355, 0.0503952630678969, 0.0290957186981323, 0.0411475599898912, 0.0237565548366599, 0.0167984210226323},
+      {-0.0577350269189625, 0.0608580619450185, -0.0351364184463153, -0.0248451997499977, 0.0650600048632355, -0.050395263067897, 0.0290957186981323, -0.0411475599898912, 0.0237565548366599, 0.0167984210226323},
+      {-0.0577350269189625, 0, 0.0702728368926306, -0.0248451997499977, 0, 0, 0.0872871560943969, 0, -0.0475131096733199, 0.0167984210226323},
+      {-0.0577350269189626, 0, 0, 0.074535599249993, 0, 0, 0, 0, 0, 0.100790526135794},
+      {0.23094010767585, 0, 0.140545673785261, 0.0993807989999906, 0, 0, 0, 0, 0.1187827741833, -0.0671936840905293},
+      {0.230940107675851, 0.121716123890037, -0.0702728368926306, 0.0993807989999907, 0, 0, 0, 0.102868899974728, -0.0593913870916499, -0.0671936840905293},
+      {0.23094010767585, 0.121716123890037, 0.0702728368926307, -0.0993807989999907, 0, 0.100790526135794, -0.087287156094397, -0.0205737799949456, -0.01187827741833, 0.0167984210226323},
+      {0.23094010767585, -0.121716123890037, -0.0702728368926307, 0.0993807989999906, 0, 0, 0, -0.102868899974728, -0.0593913870916499, -0.0671936840905293},
+      {0.23094010767585, -0.121716123890037, 0.0702728368926306, -0.0993807989999906, 0, -0.100790526135794, -0.0872871560943969, 0.0205737799949456, -0.01187827741833, 0.0167984210226323},
+      {0.23094010767585, 0, -0.140545673785261, -0.0993807989999906, -0.130120009726471, 0, 0.0290957186981323, 0, 0.02375655483666, 0.0167984210226323}};
     
       // Extract relevant coefficients
       const double coeff0_0 =   coefficients0[dof][0];
       const double coeff0_1 =   coefficients0[dof][1];
       const double coeff0_2 =   coefficients0[dof][2];
       const double coeff0_3 =   coefficients0[dof][3];
+      const double coeff0_4 =   coefficients0[dof][4];
+      const double coeff0_5 =   coefficients0[dof][5];
+      const double coeff0_6 =   coefficients0[dof][6];
+      const double coeff0_7 =   coefficients0[dof][7];
+      const double coeff0_8 =   coefficients0[dof][8];
+      const double coeff0_9 =   coefficients0[dof][9];
     
       // Compute value(s)
-      values[1] = coeff0_0*basisvalue0 + coeff0_1*basisvalue1 + coeff0_2*basisvalue2 + coeff0_3*basisvalue3;
+      values[1] = coeff0_0*basisvalue0 + coeff0_1*basisvalue1 + coeff0_2*basisvalue2 + coeff0_3*basisvalue3 + coeff0_4*basisvalue4 + coeff0_5*basisvalue5 + coeff0_6*basisvalue6 + coeff0_7*basisvalue7 + coeff0_8*basisvalue8 + coeff0_9*basisvalue9;
     }
     
 }
@@ -3181,7 +3925,7 @@ void UFC_SolitaryWave3DBilinearForm_fini
     for (unsigned int j = 0; j < 2*num_derivatives; j++)
       values[j] = 0;
     
-    if (0 <= i && i <= 3)
+    if (0 <= i && i <= 9)
     {
       // Map degree of freedom to element degree of freedom
       const unsigned int dof = i;
@@ -3189,56 +3933,98 @@ void UFC_SolitaryWave3DBilinearForm_fini
       // Generate scalings
       const double scalings_y_0 = 1;
       const double scalings_y_1 = scalings_y_0*(0.5 - 0.5*y);
+      const double scalings_y_2 = scalings_y_1*(0.5 - 0.5*y);
       const double scalings_z_0 = 1;
       const double scalings_z_1 = scalings_z_0*(0.5 - 0.5*z);
+      const double scalings_z_2 = scalings_z_1*(0.5 - 0.5*z);
     
       // Compute psitilde_a
       const double psitilde_a_0 = 1;
       const double psitilde_a_1 = x;
+      const double psitilde_a_2 = 1.5*x*psitilde_a_1 - 0.5*psitilde_a_0;
     
       // Compute psitilde_bs
       const double psitilde_bs_0_0 = 1;
       const double psitilde_bs_0_1 = 1.5*y + 0.5;
+      const double psitilde_bs_0_2 = 0.111111111111111*psitilde_bs_0_1 + 1.66666666666667*y*psitilde_bs_0_1 - 0.555555555555556*psitilde_bs_0_0;
       const double psitilde_bs_1_0 = 1;
+      const double psitilde_bs_1_1 = 2.5*y + 1.5;
+      const double psitilde_bs_2_0 = 1;
     
       // Compute psitilde_cs
       const double psitilde_cs_00_0 = 1;
       const double psitilde_cs_00_1 = 2*z + 1;
+      const double psitilde_cs_00_2 = 0.3125*psitilde_cs_00_1 + 1.875*z*psitilde_cs_00_1 - 0.5625*psitilde_cs_00_0;
       const double psitilde_cs_01_0 = 1;
+      const double psitilde_cs_01_1 = 3*z + 2;
+      const double psitilde_cs_02_0 = 1;
       const double psitilde_cs_10_0 = 1;
+      const double psitilde_cs_10_1 = 3*z + 2;
+      const double psitilde_cs_11_0 = 1;
+      const double psitilde_cs_20_0 = 1;
     
       // Compute basisvalues
       const double basisvalue0 = 0.866025403784439*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_0;
       const double basisvalue1 = 2.73861278752583*psitilde_a_1*scalings_y_1*psitilde_bs_1_0*scalings_z_1*psitilde_cs_10_0;
       const double basisvalue2 = 1.58113883008419*psitilde_a_0*scalings_y_0*psitilde_bs_0_1*scalings_z_1*psitilde_cs_01_0;
       const double basisvalue3 = 1.11803398874989*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_1;
-    
-      // Table(s) of coefficients
-      const static double coefficients0[4][4] =   \
-      {{0.288675134594813, -0.182574185835055, -0.105409255338946, -0.074535599249993},
-      {0.288675134594813, 0.182574185835055, -0.105409255338946, -0.074535599249993},
-      {0.288675134594813, 0, 0.210818510677892, -0.074535599249993},
-      {0.288675134594813, 0, 0, 0.223606797749979}};
+      const double basisvalue4 = 5.1234753829798*psitilde_a_2*scalings_y_2*psitilde_bs_2_0*scalings_z_2*psitilde_cs_20_0;
+      const double basisvalue5 = 3.96862696659689*psitilde_a_1*scalings_y_1*psitilde_bs_1_1*scalings_z_2*psitilde_cs_11_0;
+      const double basisvalue6 = 2.29128784747792*psitilde_a_0*scalings_y_0*psitilde_bs_0_2*scalings_z_2*psitilde_cs_02_0;
+      const double basisvalue7 = 3.24037034920393*psitilde_a_1*scalings_y_1*psitilde_bs_1_0*scalings_z_1*psitilde_cs_10_1;
+      const double basisvalue8 = 1.87082869338697*psitilde_a_0*scalings_y_0*psitilde_bs_0_1*scalings_z_1*psitilde_cs_01_1;
+      const double basisvalue9 = 1.3228756555323*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_2;
+    
+      // Table(s) of coefficients
+      const static double coefficients0[10][10] =   \
+      {{-0.0577350269189626, -0.0608580619450185, -0.0351364184463153, -0.0248451997499977, 0.0650600048632355, 0.0503952630678969, 0.0290957186981323, 0.0411475599898912, 0.0237565548366599, 0.0167984210226323},
+      {-0.0577350269189625, 0.0608580619450185, -0.0351364184463153, -0.0248451997499977, 0.0650600048632355, -0.050395263067897, 0.0290957186981323, -0.0411475599898912, 0.0237565548366599, 0.0167984210226323},
+      {-0.0577350269189625, 0, 0.0702728368926306, -0.0248451997499977, 0, 0, 0.0872871560943969, 0, -0.0475131096733199, 0.0167984210226323},
+      {-0.0577350269189626, 0, 0, 0.074535599249993, 0, 0, 0, 0, 0, 0.100790526135794},
+      {0.23094010767585, 0, 0.140545673785261, 0.0993807989999906, 0, 0, 0, 0, 0.1187827741833, -0.0671936840905293},
+      {0.230940107675851, 0.121716123890037, -0.0702728368926306, 0.0993807989999907, 0, 0, 0, 0.102868899974728, -0.0593913870916499, -0.0671936840905293},
+      {0.23094010767585, 0.121716123890037, 0.0702728368926307, -0.0993807989999907, 0, 0.100790526135794, -0.087287156094397, -0.0205737799949456, -0.01187827741833, 0.0167984210226323},
+      {0.23094010767585, -0.121716123890037, -0.0702728368926307, 0.0993807989999906, 0, 0, 0, -0.102868899974728, -0.0593913870916499, -0.0671936840905293},
+      {0.23094010767585, -0.121716123890037, 0.0702728368926306, -0.0993807989999906, 0, -0.100790526135794, -0.0872871560943969, 0.0205737799949456, -0.01187827741833, 0.0167984210226323},
+      {0.23094010767585, 0, -0.140545673785261, -0.0993807989999906, -0.130120009726471, 0, 0.0290957186981323, 0, 0.02375655483666, 0.0167984210226323}};
     
       // Interesting (new) part
       // Tables of derivatives of the polynomial base (transpose)
-      const static double dmats0[4][4] =   \
-      {{0, 0, 0, 0},
-      {6.32455532033676, 0, 0, 0},
-      {0, 0, 0, 0},
-      {0, 0, 0, 0}};
-    
-      const static double dmats1[4][4] =   \
-      {{0, 0, 0, 0},
-      {3.16227766016838, 0, 0, 0},
-      {5.47722557505166, 0, 0, 0},
-      {0, 0, 0, 0}};
-    
-      const static double dmats2[4][4] =   \
-      {{0, 0, 0, 0},
-      {3.16227766016838, 0, 0, 0},
-      {1.82574185835055, 0, 0, 0},
-      {5.16397779494322, 0, 0, 0}};
+      const static double dmats0[10][10] =   \
+      {{0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {6.32455532033676, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {0, 11.2249721603218, 0, 0, 0, 0, 0, 0, 0, 0},
+      {4.58257569495584, 0, 8.36660026534076, -1.18321595661992, 0, 0, 0, 0, 0, 0},
+      {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {3.74165738677394, 0, 0, 8.69482604771366, 0, 0, 0, 0, 0, 0},
+      {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
+    
+      const static double dmats1[10][10] =   \
+      {{0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {3.16227766016838, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {5.47722557505166, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {2.95803989154981, 5.61248608016091, -1.08012344973464, -0.763762615825974, 0, 0, 0, 0, 0, 0},
+      {2.29128784747792, 7.24568837309472, 4.18330013267038, -0.591607978309962, 0, 0, 0, 0, 0, 0},
+      {-2.64575131106459, 0, 9.66091783079296, 0.683130051063974, 0, 0, 0, 0, 0, 0},
+      {1.87082869338697, 0, 0, 4.34741302385683, 0, 0, 0, 0, 0, 0},
+      {3.24037034920393, 0, 0, 7.52994023880668, 0, 0, 0, 0, 0, 0},
+      {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
+    
+      const static double dmats2[10][10] =   \
+      {{0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {3.16227766016838, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {1.82574185835055, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {5.16397779494322, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {2.95803989154981, 5.61248608016091, -1.08012344973464, -0.763762615825974, 0, 0, 0, 0, 0, 0},
+      {2.29128784747792, 1.44913767461894, 4.18330013267038, -0.591607978309962, 0, 0, 0, 0, 0, 0},
+      {1.32287565553229, 0, 3.86436713231718, -0.341565025531986, 0, 0, 0, 0, 0, 0},
+      {1.87082869338697, 7.09929573971954, 0, 4.34741302385683, 0, 0, 0, 0, 0, 0},
+      {1.08012344973464, 0, 7.09929573971954, 2.50998007960223, 0, 0, 0, 0, 0, 0},
+      {-3.81881307912987, 0, 0, 8.87411967464942, 0, 0, 0, 0, 0, 0}};
     
       // Compute reference derivatives
       // Declare pointer to array of derivatives on FIAT element
@@ -3249,12 +4035,24 @@ void UFC_SolitaryWave3DBilinearForm_fini
       double coeff0_1 = 0;
       double coeff0_2 = 0;
       double coeff0_3 = 0;
+      double coeff0_4 = 0;
+      double coeff0_5 = 0;
+      double coeff0_6 = 0;
+      double coeff0_7 = 0;
+      double coeff0_8 = 0;
+      double coeff0_9 = 0;
     
       // Declare new coefficients
       double new_coeff0_0 = 0;
       double new_coeff0_1 = 0;
       double new_coeff0_2 = 0;
       double new_coeff0_3 = 0;
+      double new_coeff0_4 = 0;
+      double new_coeff0_5 = 0;
+      double new_coeff0_6 = 0;
+      double new_coeff0_7 = 0;
+      double new_coeff0_8 = 0;
+      double new_coeff0_9 = 0;
     
       // Loop possible derivatives
       for (unsigned int deriv_num = 0; deriv_num < num_derivatives; deriv_num++)
@@ -3264,6 +4062,12 @@ void UFC_SolitaryWave3DBilinearForm_fini
         new_coeff0_1 = coefficients0[dof][1];
         new_coeff0_2 = coefficients0[dof][2];
         new_coeff0_3 = coefficients0[dof][3];
+        new_coeff0_4 = coefficients0[dof][4];
+        new_coeff0_5 = coefficients0[dof][5];
+        new_coeff0_6 = coefficients0[dof][6];
+        new_coeff0_7 = coefficients0[dof][7];
+        new_coeff0_8 = coefficients0[dof][8];
+        new_coeff0_9 = coefficients0[dof][9];
     
         // Loop derivative order
         for (unsigned int j = 0; j < n; j++)
@@ -3273,32 +4077,56 @@ void UFC_SolitaryWave3DBilinearForm_fini
           coeff0_1 = new_coeff0_1;
           coeff0_2 = new_coeff0_2;
           coeff0_3 = new_coeff0_3;
+          coeff0_4 = new_coeff0_4;
+          coeff0_5 = new_coeff0_5;
+          coeff0_6 = new_coeff0_6;
+          coeff0_7 = new_coeff0_7;
+          coeff0_8 = new_coeff0_8;
+          coeff0_9 = new_coeff0_9;
     
           if(combinations[deriv_num][j] == 0)
           {
-            new_coeff0_0 = coeff0_0*dmats0[0][0] + coeff0_1*dmats0[1][0] + coeff0_2*dmats0[2][0] + coeff0_3*dmats0[3][0];
-            new_coeff0_1 = coeff0_0*dmats0[0][1] + coeff0_1*dmats0[1][1] + coeff0_2*dmats0[2][1] + coeff0_3*dmats0[3][1];
-            new_coeff0_2 = coeff0_0*dmats0[0][2] + coeff0_1*dmats0[1][2] + coeff0_2*dmats0[2][2] + coeff0_3*dmats0[3][2];
-            new_coeff0_3 = coeff0_0*dmats0[0][3] + coeff0_1*dmats0[1][3] + coeff0_2*dmats0[2][3] + coeff0_3*dmats0[3][3];
+            new_coeff0_0 = coeff0_0*dmats0[0][0] + coeff0_1*dmats0[1][0] + coeff0_2*dmats0[2][0] + coeff0_3*dmats0[3][0] + coeff0_4*dmats0[4][0] + coeff0_5*dmats0[5][0] + coeff0_6*dmats0[6][0] + coeff0_7*dmats0[7][0] + coeff0_8*dmats0[8][0] + coeff0_9*dmats0[9][0];
+            new_coeff0_1 = coeff0_0*dmats0[0][1] + coeff0_1*dmats0[1][1] + coeff0_2*dmats0[2][1] + coeff0_3*dmats0[3][1] + coeff0_4*dmats0[4][1] + coeff0_5*dmats0[5][1] + coeff0_6*dmats0[6][1] + coeff0_7*dmats0[7][1] + coeff0_8*dmats0[8][1] + coeff0_9*dmats0[9][1];
+            new_coeff0_2 = coeff0_0*dmats0[0][2] + coeff0_1*dmats0[1][2] + coeff0_2*dmats0[2][2] + coeff0_3*dmats0[3][2] + coeff0_4*dmats0[4][2] + coeff0_5*dmats0[5][2] + coeff0_6*dmats0[6][2] + coeff0_7*dmats0[7][2] + coeff0_8*dmats0[8][2] + coeff0_9*dmats0[9][2];
+            new_coeff0_3 = coeff0_0*dmats0[0][3] + coeff0_1*dmats0[1][3] + coeff0_2*dmats0[2][3] + coeff0_3*dmats0[3][3] + coeff0_4*dmats0[4][3] + coeff0_5*dmats0[5][3] + coeff0_6*dmats0[6][3] + coeff0_7*dmats0[7][3] + coeff0_8*dmats0[8][3] + coeff0_9*dmats0[9][3];
+            new_coeff0_4 = coeff0_0*dmats0[0][4] + coeff0_1*dmats0[1][4] + coeff0_2*dmats0[2][4] + coeff0_3*dmats0[3][4] + coeff0_4*dmats0[4][4] + coeff0_5*dmats0[5][4] + coeff0_6*dmats0[6][4] + coeff0_7*dmats0[7][4] + coeff0_8*dmats0[8][4] + coeff0_9*dmats0[9][4];
+            new_coeff0_5 = coeff0_0*dmats0[0][5] + coeff0_1*dmats0[1][5] + coeff0_2*dmats0[2][5] + coeff0_3*dmats0[3][5] + coeff0_4*dmats0[4][5] + coeff0_5*dmats0[5][5] + coeff0_6*dmats0[6][5] + coeff0_7*dmats0[7][5] + coeff0_8*dmats0[8][5] + coeff0_9*dmats0[9][5];
+            new_coeff0_6 = coeff0_0*dmats0[0][6] + coeff0_1*dmats0[1][6] + coeff0_2*dmats0[2][6] + coeff0_3*dmats0[3][6] + coeff0_4*dmats0[4][6] + coeff0_5*dmats0[5][6] + coeff0_6*dmats0[6][6] + coeff0_7*dmats0[7][6] + coeff0_8*dmats0[8][6] + coeff0_9*dmats0[9][6];
+            new_coeff0_7 = coeff0_0*dmats0[0][7] + coeff0_1*dmats0[1][7] + coeff0_2*dmats0[2][7] + coeff0_3*dmats0[3][7] + coeff0_4*dmats0[4][7] + coeff0_5*dmats0[5][7] + coeff0_6*dmats0[6][7] + coeff0_7*dmats0[7][7] + coeff0_8*dmats0[8][7] + coeff0_9*dmats0[9][7];
+            new_coeff0_8 = coeff0_0*dmats0[0][8] + coeff0_1*dmats0[1][8] + coeff0_2*dmats0[2][8] + coeff0_3*dmats0[3][8] + coeff0_4*dmats0[4][8] + coeff0_5*dmats0[5][8] + coeff0_6*dmats0[6][8] + coeff0_7*dmats0[7][8] + coeff0_8*dmats0[8][8] + coeff0_9*dmats0[9][8];
+            new_coeff0_9 = coeff0_0*dmats0[0][9] + coeff0_1*dmats0[1][9] + coeff0_2*dmats0[2][9] + coeff0_3*dmats0[3][9] + coeff0_4*dmats0[4][9] + coeff0_5*dmats0[5][9] + coeff0_6*dmats0[6][9] + coeff0_7*dmats0[7][9] + coeff0_8*dmats0[8][9] + coeff0_9*dmats0[9][9];
           }
           if(combinations[deriv_num][j] == 1)
           {
-            new_coeff0_0 = coeff0_0*dmats1[0][0] + coeff0_1*dmats1[1][0] + coeff0_2*dmats1[2][0] + coeff0_3*dmats1[3][0];
-            new_coeff0_1 = coeff0_0*dmats1[0][1] + coeff0_1*dmats1[1][1] + coeff0_2*dmats1[2][1] + coeff0_3*dmats1[3][1];
-            new_coeff0_2 = coeff0_0*dmats1[0][2] + coeff0_1*dmats1[1][2] + coeff0_2*dmats1[2][2] + coeff0_3*dmats1[3][2];
-            new_coeff0_3 = coeff0_0*dmats1[0][3] + coeff0_1*dmats1[1][3] + coeff0_2*dmats1[2][3] + coeff0_3*dmats1[3][3];
+            new_coeff0_0 = coeff0_0*dmats1[0][0] + coeff0_1*dmats1[1][0] + coeff0_2*dmats1[2][0] + coeff0_3*dmats1[3][0] + coeff0_4*dmats1[4][0] + coeff0_5*dmats1[5][0] + coeff0_6*dmats1[6][0] + coeff0_7*dmats1[7][0] + coeff0_8*dmats1[8][0] + coeff0_9*dmats1[9][0];
+            new_coeff0_1 = coeff0_0*dmats1[0][1] + coeff0_1*dmats1[1][1] + coeff0_2*dmats1[2][1] + coeff0_3*dmats1[3][1] + coeff0_4*dmats1[4][1] + coeff0_5*dmats1[5][1] + coeff0_6*dmats1[6][1] + coeff0_7*dmats1[7][1] + coeff0_8*dmats1[8][1] + coeff0_9*dmats1[9][1];
+            new_coeff0_2 = coeff0_0*dmats1[0][2] + coeff0_1*dmats1[1][2] + coeff0_2*dmats1[2][2] + coeff0_3*dmats1[3][2] + coeff0_4*dmats1[4][2] + coeff0_5*dmats1[5][2] + coeff0_6*dmats1[6][2] + coeff0_7*dmats1[7][2] + coeff0_8*dmats1[8][2] + coeff0_9*dmats1[9][2];
+            new_coeff0_3 = coeff0_0*dmats1[0][3] + coeff0_1*dmats1[1][3] + coeff0_2*dmats1[2][3] + coeff0_3*dmats1[3][3] + coeff0_4*dmats1[4][3] + coeff0_5*dmats1[5][3] + coeff0_6*dmats1[6][3] + coeff0_7*dmats1[7][3] + coeff0_8*dmats1[8][3] + coeff0_9*dmats1[9][3];
+            new_coeff0_4 = coeff0_0*dmats1[0][4] + coeff0_1*dmats1[1][4] + coeff0_2*dmats1[2][4] + coeff0_3*dmats1[3][4] + coeff0_4*dmats1[4][4] + coeff0_5*dmats1[5][4] + coeff0_6*dmats1[6][4] + coeff0_7*dmats1[7][4] + coeff0_8*dmats1[8][4] + coeff0_9*dmats1[9][4];
+            new_coeff0_5 = coeff0_0*dmats1[0][5] + coeff0_1*dmats1[1][5] + coeff0_2*dmats1[2][5] + coeff0_3*dmats1[3][5] + coeff0_4*dmats1[4][5] + coeff0_5*dmats1[5][5] + coeff0_6*dmats1[6][5] + coeff0_7*dmats1[7][5] + coeff0_8*dmats1[8][5] + coeff0_9*dmats1[9][5];
+            new_coeff0_6 = coeff0_0*dmats1[0][6] + coeff0_1*dmats1[1][6] + coeff0_2*dmats1[2][6] + coeff0_3*dmats1[3][6] + coeff0_4*dmats1[4][6] + coeff0_5*dmats1[5][6] + coeff0_6*dmats1[6][6] + coeff0_7*dmats1[7][6] + coeff0_8*dmats1[8][6] + coeff0_9*dmats1[9][6];
+            new_coeff0_7 = coeff0_0*dmats1[0][7] + coeff0_1*dmats1[1][7] + coeff0_2*dmats1[2][7] + coeff0_3*dmats1[3][7] + coeff0_4*dmats1[4][7] + coeff0_5*dmats1[5][7] + coeff0_6*dmats1[6][7] + coeff0_7*dmats1[7][7] + coeff0_8*dmats1[8][7] + coeff0_9*dmats1[9][7];
+            new_coeff0_8 = coeff0_0*dmats1[0][8] + coeff0_1*dmats1[1][8] + coeff0_2*dmats1[2][8] + coeff0_3*dmats1[3][8] + coeff0_4*dmats1[4][8] + coeff0_5*dmats1[5][8] + coeff0_6*dmats1[6][8] + coeff0_7*dmats1[7][8] + coeff0_8*dmats1[8][8] + coeff0_9*dmats1[9][8];
+            new_coeff0_9 = coeff0_0*dmats1[0][9] + coeff0_1*dmats1[1][9] + coeff0_2*dmats1[2][9] + coeff0_3*dmats1[3][9] + coeff0_4*dmats1[4][9] + coeff0_5*dmats1[5][9] + coeff0_6*dmats1[6][9] + coeff0_7*dmats1[7][9] + coeff0_8*dmats1[8][9] + coeff0_9*dmats1[9][9];
           }
           if(combinations[deriv_num][j] == 2)
           {
-            new_coeff0_0 = coeff0_0*dmats2[0][0] + coeff0_1*dmats2[1][0] + coeff0_2*dmats2[2][0] + coeff0_3*dmats2[3][0];
-            new_coeff0_1 = coeff0_0*dmats2[0][1] + coeff0_1*dmats2[1][1] + coeff0_2*dmats2[2][1] + coeff0_3*dmats2[3][1];
-            new_coeff0_2 = coeff0_0*dmats2[0][2] + coeff0_1*dmats2[1][2] + coeff0_2*dmats2[2][2] + coeff0_3*dmats2[3][2];
-            new_coeff0_3 = coeff0_0*dmats2[0][3] + coeff0_1*dmats2[1][3] + coeff0_2*dmats2[2][3] + coeff0_3*dmats2[3][3];
+            new_coeff0_0 = coeff0_0*dmats2[0][0] + coeff0_1*dmats2[1][0] + coeff0_2*dmats2[2][0] + coeff0_3*dmats2[3][0] + coeff0_4*dmats2[4][0] + coeff0_5*dmats2[5][0] + coeff0_6*dmats2[6][0] + coeff0_7*dmats2[7][0] + coeff0_8*dmats2[8][0] + coeff0_9*dmats2[9][0];
+            new_coeff0_1 = coeff0_0*dmats2[0][1] + coeff0_1*dmats2[1][1] + coeff0_2*dmats2[2][1] + coeff0_3*dmats2[3][1] + coeff0_4*dmats2[4][1] + coeff0_5*dmats2[5][1] + coeff0_6*dmats2[6][1] + coeff0_7*dmats2[7][1] + coeff0_8*dmats2[8][1] + coeff0_9*dmats2[9][1];
+            new_coeff0_2 = coeff0_0*dmats2[0][2] + coeff0_1*dmats2[1][2] + coeff0_2*dmats2[2][2] + coeff0_3*dmats2[3][2] + coeff0_4*dmats2[4][2] + coeff0_5*dmats2[5][2] + coeff0_6*dmats2[6][2] + coeff0_7*dmats2[7][2] + coeff0_8*dmats2[8][2] + coeff0_9*dmats2[9][2];
+            new_coeff0_3 = coeff0_0*dmats2[0][3] + coeff0_1*dmats2[1][3] + coeff0_2*dmats2[2][3] + coeff0_3*dmats2[3][3] + coeff0_4*dmats2[4][3] + coeff0_5*dmats2[5][3] + coeff0_6*dmats2[6][3] + coeff0_7*dmats2[7][3] + coeff0_8*dmats2[8][3] + coeff0_9*dmats2[9][3];
+            new_coeff0_4 = coeff0_0*dmats2[0][4] + coeff0_1*dmats2[1][4] + coeff0_2*dmats2[2][4] + coeff0_3*dmats2[3][4] + coeff0_4*dmats2[4][4] + coeff0_5*dmats2[5][4] + coeff0_6*dmats2[6][4] + coeff0_7*dmats2[7][4] + coeff0_8*dmats2[8][4] + coeff0_9*dmats2[9][4];
+            new_coeff0_5 = coeff0_0*dmats2[0][5] + coeff0_1*dmats2[1][5] + coeff0_2*dmats2[2][5] + coeff0_3*dmats2[3][5] + coeff0_4*dmats2[4][5] + coeff0_5*dmats2[5][5] + coeff0_6*dmats2[6][5] + coeff0_7*dmats2[7][5] + coeff0_8*dmats2[8][5] + coeff0_9*dmats2[9][5];
+            new_coeff0_6 = coeff0_0*dmats2[0][6] + coeff0_1*dmats2[1][6] + coeff0_2*dmats2[2][6] + coeff0_3*dmats2[3][6] + coeff0_4*dmats2[4][6] + coeff0_5*dmats2[5][6] + coeff0_6*dmats2[6][6] + coeff0_7*dmats2[7][6] + coeff0_8*dmats2[8][6] + coeff0_9*dmats2[9][6];
+            new_coeff0_7 = coeff0_0*dmats2[0][7] + coeff0_1*dmats2[1][7] + coeff0_2*dmats2[2][7] + coeff0_3*dmats2[3][7] + coeff0_4*dmats2[4][7] + coeff0_5*dmats2[5][7] + coeff0_6*dmats2[6][7] + coeff0_7*dmats2[7][7] + coeff0_8*dmats2[8][7] + coeff0_9*dmats2[9][7];
+            new_coeff0_8 = coeff0_0*dmats2[0][8] + coeff0_1*dmats2[1][8] + coeff0_2*dmats2[2][8] + coeff0_3*dmats2[3][8] + coeff0_4*dmats2[4][8] + coeff0_5*dmats2[5][8] + coeff0_6*dmats2[6][8] + coeff0_7*dmats2[7][8] + coeff0_8*dmats2[8][8] + coeff0_9*dmats2[9][8];
+            new_coeff0_9 = coeff0_0*dmats2[0][9] + coeff0_1*dmats2[1][9] + coeff0_2*dmats2[2][9] + coeff0_3*dmats2[3][9] + coeff0_4*dmats2[4][9] + coeff0_5*dmats2[5][9] + coeff0_6*dmats2[6][9] + coeff0_7*dmats2[7][9] + coeff0_8*dmats2[8][9] + coeff0_9*dmats2[9][9];
           }
     
         }
         // Compute derivatives on reference element as dot product of coefficients and basisvalues
-        derivatives[deriv_num] = new_coeff0_0*basisvalue0 + new_coeff0_1*basisvalue1 + new_coeff0_2*basisvalue2 + new_coeff0_3*basisvalue3;
+        derivatives[deriv_num] = new_coeff0_0*basisvalue0 + new_coeff0_1*basisvalue1 + new_coeff0_2*basisvalue2 + new_coeff0_3*basisvalue3 + new_coeff0_4*basisvalue4 + new_coeff0_5*basisvalue5 + new_coeff0_6*basisvalue6 + new_coeff0_7*basisvalue7 + new_coeff0_8*basisvalue8 + new_coeff0_9*basisvalue9;
       }
     
       // Transform derivatives back to physical element
@@ -3323,64 +4151,106 @@ void UFC_SolitaryWave3DBilinearForm_fini
       delete [] transform;
     }
     
-    if (4 <= i && i <= 7)
-    {
-      // Map degree of freedom to element degree of freedom
-      const unsigned int dof = i - 4;
+    if (10 <= i && i <= 19)
+    {
+      // Map degree of freedom to element degree of freedom
+      const unsigned int dof = i - 10;
     
       // Generate scalings
       const double scalings_y_0 = 1;
       const double scalings_y_1 = scalings_y_0*(0.5 - 0.5*y);
+      const double scalings_y_2 = scalings_y_1*(0.5 - 0.5*y);
       const double scalings_z_0 = 1;
       const double scalings_z_1 = scalings_z_0*(0.5 - 0.5*z);
+      const double scalings_z_2 = scalings_z_1*(0.5 - 0.5*z);
     
       // Compute psitilde_a
       const double psitilde_a_0 = 1;
       const double psitilde_a_1 = x;
+      const double psitilde_a_2 = 1.5*x*psitilde_a_1 - 0.5*psitilde_a_0;
     
       // Compute psitilde_bs
       const double psitilde_bs_0_0 = 1;
       const double psitilde_bs_0_1 = 1.5*y + 0.5;
+      const double psitilde_bs_0_2 = 0.111111111111111*psitilde_bs_0_1 + 1.66666666666667*y*psitilde_bs_0_1 - 0.555555555555556*psitilde_bs_0_0;
       const double psitilde_bs_1_0 = 1;
+      const double psitilde_bs_1_1 = 2.5*y + 1.5;
+      const double psitilde_bs_2_0 = 1;
     
       // Compute psitilde_cs
       const double psitilde_cs_00_0 = 1;
       const double psitilde_cs_00_1 = 2*z + 1;
+      const double psitilde_cs_00_2 = 0.3125*psitilde_cs_00_1 + 1.875*z*psitilde_cs_00_1 - 0.5625*psitilde_cs_00_0;
       const double psitilde_cs_01_0 = 1;
+      const double psitilde_cs_01_1 = 3*z + 2;
+      const double psitilde_cs_02_0 = 1;
       const double psitilde_cs_10_0 = 1;
+      const double psitilde_cs_10_1 = 3*z + 2;
+      const double psitilde_cs_11_0 = 1;
+      const double psitilde_cs_20_0 = 1;
     
       // Compute basisvalues
       const double basisvalue0 = 0.866025403784439*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_0;
       const double basisvalue1 = 2.73861278752583*psitilde_a_1*scalings_y_1*psitilde_bs_1_0*scalings_z_1*psitilde_cs_10_0;
       const double basisvalue2 = 1.58113883008419*psitilde_a_0*scalings_y_0*psitilde_bs_0_1*scalings_z_1*psitilde_cs_01_0;
       const double basisvalue3 = 1.11803398874989*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_1;
-    
-      // Table(s) of coefficients
-      const static double coefficients0[4][4] =   \
-      {{0.288675134594813, -0.182574185835055, -0.105409255338946, -0.074535599249993},
-      {0.288675134594813, 0.182574185835055, -0.105409255338946, -0.074535599249993},
-      {0.288675134594813, 0, 0.210818510677892, -0.074535599249993},
-      {0.288675134594813, 0, 0, 0.223606797749979}};
+      const double basisvalue4 = 5.1234753829798*psitilde_a_2*scalings_y_2*psitilde_bs_2_0*scalings_z_2*psitilde_cs_20_0;
+      const double basisvalue5 = 3.96862696659689*psitilde_a_1*scalings_y_1*psitilde_bs_1_1*scalings_z_2*psitilde_cs_11_0;
+      const double basisvalue6 = 2.29128784747792*psitilde_a_0*scalings_y_0*psitilde_bs_0_2*scalings_z_2*psitilde_cs_02_0;
+      const double basisvalue7 = 3.24037034920393*psitilde_a_1*scalings_y_1*psitilde_bs_1_0*scalings_z_1*psitilde_cs_10_1;
+      const double basisvalue8 = 1.87082869338697*psitilde_a_0*scalings_y_0*psitilde_bs_0_1*scalings_z_1*psitilde_cs_01_1;
+      const double basisvalue9 = 1.3228756555323*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_2;
+    
+      // Table(s) of coefficients
+      const static double coefficients0[10][10] =   \
+      {{-0.0577350269189626, -0.0608580619450185, -0.0351364184463153, -0.0248451997499977, 0.0650600048632355, 0.0503952630678969, 0.0290957186981323, 0.0411475599898912, 0.0237565548366599, 0.0167984210226323},
+      {-0.0577350269189625, 0.0608580619450185, -0.0351364184463153, -0.0248451997499977, 0.0650600048632355, -0.050395263067897, 0.0290957186981323, -0.0411475599898912, 0.0237565548366599, 0.0167984210226323},
+      {-0.0577350269189625, 0, 0.0702728368926306, -0.0248451997499977, 0, 0, 0.0872871560943969, 0, -0.0475131096733199, 0.0167984210226323},
+      {-0.0577350269189626, 0, 0, 0.074535599249993, 0, 0, 0, 0, 0, 0.100790526135794},
+      {0.23094010767585, 0, 0.140545673785261, 0.0993807989999906, 0, 0, 0, 0, 0.1187827741833, -0.0671936840905293},
+      {0.230940107675851, 0.121716123890037, -0.0702728368926306, 0.0993807989999907, 0, 0, 0, 0.102868899974728, -0.0593913870916499, -0.0671936840905293},
+      {0.23094010767585, 0.121716123890037, 0.0702728368926307, -0.0993807989999907, 0, 0.100790526135794, -0.087287156094397, -0.0205737799949456, -0.01187827741833, 0.0167984210226323},
+      {0.23094010767585, -0.121716123890037, -0.0702728368926307, 0.0993807989999906, 0, 0, 0, -0.102868899974728, -0.0593913870916499, -0.0671936840905293},
+      {0.23094010767585, -0.121716123890037, 0.0702728368926306, -0.0993807989999906, 0, -0.100790526135794, -0.0872871560943969, 0.0205737799949456, -0.01187827741833, 0.0167984210226323},
+      {0.23094010767585, 0, -0.140545673785261, -0.0993807989999906, -0.130120009726471, 0, 0.0290957186981323, 0, 0.02375655483666, 0.0167984210226323}};
     
       // Interesting (new) part
       // Tables of derivatives of the polynomial base (transpose)
-      const static double dmats0[4][4] =   \
-      {{0, 0, 0, 0},
-      {6.32455532033676, 0, 0, 0},
-      {0, 0, 0, 0},
-      {0, 0, 0, 0}};
-    
-      const static double dmats1[4][4] =   \
-      {{0, 0, 0, 0},
-      {3.16227766016838, 0, 0, 0},
-      {5.47722557505166, 0, 0, 0},
-      {0, 0, 0, 0}};
-    
-      const static double dmats2[4][4] =   \
-      {{0, 0, 0, 0},
-      {3.16227766016838, 0, 0, 0},
-      {1.82574185835055, 0, 0, 0},
-      {5.16397779494322, 0, 0, 0}};
+      const static double dmats0[10][10] =   \
+      {{0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {6.32455532033676, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {0, 11.2249721603218, 0, 0, 0, 0, 0, 0, 0, 0},
+      {4.58257569495584, 0, 8.36660026534076, -1.18321595661992, 0, 0, 0, 0, 0, 0},
+      {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {3.74165738677394, 0, 0, 8.69482604771366, 0, 0, 0, 0, 0, 0},
+      {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
+    
+      const static double dmats1[10][10] =   \
+      {{0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {3.16227766016838, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {5.47722557505166, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {2.95803989154981, 5.61248608016091, -1.08012344973464, -0.763762615825974, 0, 0, 0, 0, 0, 0},
+      {2.29128784747792, 7.24568837309472, 4.18330013267038, -0.591607978309962, 0, 0, 0, 0, 0, 0},
+      {-2.64575131106459, 0, 9.66091783079296, 0.683130051063974, 0, 0, 0, 0, 0, 0},
+      {1.87082869338697, 0, 0, 4.34741302385683, 0, 0, 0, 0, 0, 0},
+      {3.24037034920393, 0, 0, 7.52994023880668, 0, 0, 0, 0, 0, 0},
+      {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
+    
+      const static double dmats2[10][10] =   \
+      {{0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {3.16227766016838, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {1.82574185835055, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {5.16397779494322, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {2.95803989154981, 5.61248608016091, -1.08012344973464, -0.763762615825974, 0, 0, 0, 0, 0, 0},
+      {2.29128784747792, 1.44913767461894, 4.18330013267038, -0.591607978309962, 0, 0, 0, 0, 0, 0},
+      {1.32287565553229, 0, 3.86436713231718, -0.341565025531986, 0, 0, 0, 0, 0, 0},
+      {1.87082869338697, 7.09929573971954, 0, 4.34741302385683, 0, 0, 0, 0, 0, 0},
+      {1.08012344973464, 0, 7.09929573971954, 2.50998007960223, 0, 0, 0, 0, 0, 0},
+      {-3.81881307912987, 0, 0, 8.87411967464942, 0, 0, 0, 0, 0, 0}};
     
       // Compute reference derivatives
       // Declare pointer to array of derivatives on FIAT element
@@ -3391,12 +4261,24 @@ void UFC_SolitaryWave3DBilinearForm_fini
       double coeff0_1 = 0;
       double coeff0_2 = 0;
       double coeff0_3 = 0;
+      double coeff0_4 = 0;
+      double coeff0_5 = 0;
+      double coeff0_6 = 0;
+      double coeff0_7 = 0;
+      double coeff0_8 = 0;
+      double coeff0_9 = 0;
     
       // Declare new coefficients
       double new_coeff0_0 = 0;
       double new_coeff0_1 = 0;
       double new_coeff0_2 = 0;
       double new_coeff0_3 = 0;
+      double new_coeff0_4 = 0;
+      double new_coeff0_5 = 0;
+      double new_coeff0_6 = 0;
+      double new_coeff0_7 = 0;
+      double new_coeff0_8 = 0;
+      double new_coeff0_9 = 0;
     
       // Loop possible derivatives
       for (unsigned int deriv_num = 0; deriv_num < num_derivatives; deriv_num++)
@@ -3406,6 +4288,12 @@ void UFC_SolitaryWave3DBilinearForm_fini
         new_coeff0_1 = coefficients0[dof][1];
         new_coeff0_2 = coefficients0[dof][2];
         new_coeff0_3 = coefficients0[dof][3];
+        new_coeff0_4 = coefficients0[dof][4];
+        new_coeff0_5 = coefficients0[dof][5];
+        new_coeff0_6 = coefficients0[dof][6];
+        new_coeff0_7 = coefficients0[dof][7];
+        new_coeff0_8 = coefficients0[dof][8];
+        new_coeff0_9 = coefficients0[dof][9];
     
         // Loop derivative order
         for (unsigned int j = 0; j < n; j++)
@@ -3415,32 +4303,56 @@ void UFC_SolitaryWave3DBilinearForm_fini
           coeff0_1 = new_coeff0_1;
           coeff0_2 = new_coeff0_2;
           coeff0_3 = new_coeff0_3;
+          coeff0_4 = new_coeff0_4;
+          coeff0_5 = new_coeff0_5;
+          coeff0_6 = new_coeff0_6;
+          coeff0_7 = new_coeff0_7;
+          coeff0_8 = new_coeff0_8;
+          coeff0_9 = new_coeff0_9;
     
           if(combinations[deriv_num][j] == 0)
           {
-            new_coeff0_0 = coeff0_0*dmats0[0][0] + coeff0_1*dmats0[1][0] + coeff0_2*dmats0[2][0] + coeff0_3*dmats0[3][0];
-            new_coeff0_1 = coeff0_0*dmats0[0][1] + coeff0_1*dmats0[1][1] + coeff0_2*dmats0[2][1] + coeff0_3*dmats0[3][1];
-            new_coeff0_2 = coeff0_0*dmats0[0][2] + coeff0_1*dmats0[1][2] + coeff0_2*dmats0[2][2] + coeff0_3*dmats0[3][2];
-            new_coeff0_3 = coeff0_0*dmats0[0][3] + coeff0_1*dmats0[1][3] + coeff0_2*dmats0[2][3] + coeff0_3*dmats0[3][3];
+            new_coeff0_0 = coeff0_0*dmats0[0][0] + coeff0_1*dmats0[1][0] + coeff0_2*dmats0[2][0] + coeff0_3*dmats0[3][0] + coeff0_4*dmats0[4][0] + coeff0_5*dmats0[5][0] + coeff0_6*dmats0[6][0] + coeff0_7*dmats0[7][0] + coeff0_8*dmats0[8][0] + coeff0_9*dmats0[9][0];
+            new_coeff0_1 = coeff0_0*dmats0[0][1] + coeff0_1*dmats0[1][1] + coeff0_2*dmats0[2][1] + coeff0_3*dmats0[3][1] + coeff0_4*dmats0[4][1] + coeff0_5*dmats0[5][1] + coeff0_6*dmats0[6][1] + coeff0_7*dmats0[7][1] + coeff0_8*dmats0[8][1] + coeff0_9*dmats0[9][1];
+            new_coeff0_2 = coeff0_0*dmats0[0][2] + coeff0_1*dmats0[1][2] + coeff0_2*dmats0[2][2] + coeff0_3*dmats0[3][2] + coeff0_4*dmats0[4][2] + coeff0_5*dmats0[5][2] + coeff0_6*dmats0[6][2] + coeff0_7*dmats0[7][2] + coeff0_8*dmats0[8][2] + coeff0_9*dmats0[9][2];
+            new_coeff0_3 = coeff0_0*dmats0[0][3] + coeff0_1*dmats0[1][3] + coeff0_2*dmats0[2][3] + coeff0_3*dmats0[3][3] + coeff0_4*dmats0[4][3] + coeff0_5*dmats0[5][3] + coeff0_6*dmats0[6][3] + coeff0_7*dmats0[7][3] + coeff0_8*dmats0[8][3] + coeff0_9*dmats0[9][3];
+            new_coeff0_4 = coeff0_0*dmats0[0][4] + coeff0_1*dmats0[1][4] + coeff0_2*dmats0[2][4] + coeff0_3*dmats0[3][4] + coeff0_4*dmats0[4][4] + coeff0_5*dmats0[5][4] + coeff0_6*dmats0[6][4] + coeff0_7*dmats0[7][4] + coeff0_8*dmats0[8][4] + coeff0_9*dmats0[9][4];
+            new_coeff0_5 = coeff0_0*dmats0[0][5] + coeff0_1*dmats0[1][5] + coeff0_2*dmats0[2][5] + coeff0_3*dmats0[3][5] + coeff0_4*dmats0[4][5] + coeff0_5*dmats0[5][5] + coeff0_6*dmats0[6][5] + coeff0_7*dmats0[7][5] + coeff0_8*dmats0[8][5] + coeff0_9*dmats0[9][5];
+            new_coeff0_6 = coeff0_0*dmats0[0][6] + coeff0_1*dmats0[1][6] + coeff0_2*dmats0[2][6] + coeff0_3*dmats0[3][6] + coeff0_4*dmats0[4][6] + coeff0_5*dmats0[5][6] + coeff0_6*dmats0[6][6] + coeff0_7*dmats0[7][6] + coeff0_8*dmats0[8][6] + coeff0_9*dmats0[9][6];
+            new_coeff0_7 = coeff0_0*dmats0[0][7] + coeff0_1*dmats0[1][7] + coeff0_2*dmats0[2][7] + coeff0_3*dmats0[3][7] + coeff0_4*dmats0[4][7] + coeff0_5*dmats0[5][7] + coeff0_6*dmats0[6][7] + coeff0_7*dmats0[7][7] + coeff0_8*dmats0[8][7] + coeff0_9*dmats0[9][7];
+            new_coeff0_8 = coeff0_0*dmats0[0][8] + coeff0_1*dmats0[1][8] + coeff0_2*dmats0[2][8] + coeff0_3*dmats0[3][8] + coeff0_4*dmats0[4][8] + coeff0_5*dmats0[5][8] + coeff0_6*dmats0[6][8] + coeff0_7*dmats0[7][8] + coeff0_8*dmats0[8][8] + coeff0_9*dmats0[9][8];
+            new_coeff0_9 = coeff0_0*dmats0[0][9] + coeff0_1*dmats0[1][9] + coeff0_2*dmats0[2][9] + coeff0_3*dmats0[3][9] + coeff0_4*dmats0[4][9] + coeff0_5*dmats0[5][9] + coeff0_6*dmats0[6][9] + coeff0_7*dmats0[7][9] + coeff0_8*dmats0[8][9] + coeff0_9*dmats0[9][9];
           }
           if(combinations[deriv_num][j] == 1)
           {
-            new_coeff0_0 = coeff0_0*dmats1[0][0] + coeff0_1*dmats1[1][0] + coeff0_2*dmats1[2][0] + coeff0_3*dmats1[3][0];
-            new_coeff0_1 = coeff0_0*dmats1[0][1] + coeff0_1*dmats1[1][1] + coeff0_2*dmats1[2][1] + coeff0_3*dmats1[3][1];
-            new_coeff0_2 = coeff0_0*dmats1[0][2] + coeff0_1*dmats1[1][2] + coeff0_2*dmats1[2][2] + coeff0_3*dmats1[3][2];
-            new_coeff0_3 = coeff0_0*dmats1[0][3] + coeff0_1*dmats1[1][3] + coeff0_2*dmats1[2][3] + coeff0_3*dmats1[3][3];
+            new_coeff0_0 = coeff0_0*dmats1[0][0] + coeff0_1*dmats1[1][0] + coeff0_2*dmats1[2][0] + coeff0_3*dmats1[3][0] + coeff0_4*dmats1[4][0] + coeff0_5*dmats1[5][0] + coeff0_6*dmats1[6][0] + coeff0_7*dmats1[7][0] + coeff0_8*dmats1[8][0] + coeff0_9*dmats1[9][0];
+            new_coeff0_1 = coeff0_0*dmats1[0][1] + coeff0_1*dmats1[1][1] + coeff0_2*dmats1[2][1] + coeff0_3*dmats1[3][1] + coeff0_4*dmats1[4][1] + coeff0_5*dmats1[5][1] + coeff0_6*dmats1[6][1] + coeff0_7*dmats1[7][1] + coeff0_8*dmats1[8][1] + coeff0_9*dmats1[9][1];
+            new_coeff0_2 = coeff0_0*dmats1[0][2] + coeff0_1*dmats1[1][2] + coeff0_2*dmats1[2][2] + coeff0_3*dmats1[3][2] + coeff0_4*dmats1[4][2] + coeff0_5*dmats1[5][2] + coeff0_6*dmats1[6][2] + coeff0_7*dmats1[7][2] + coeff0_8*dmats1[8][2] + coeff0_9*dmats1[9][2];
+            new_coeff0_3 = coeff0_0*dmats1[0][3] + coeff0_1*dmats1[1][3] + coeff0_2*dmats1[2][3] + coeff0_3*dmats1[3][3] + coeff0_4*dmats1[4][3] + coeff0_5*dmats1[5][3] + coeff0_6*dmats1[6][3] + coeff0_7*dmats1[7][3] + coeff0_8*dmats1[8][3] + coeff0_9*dmats1[9][3];
+            new_coeff0_4 = coeff0_0*dmats1[0][4] + coeff0_1*dmats1[1][4] + coeff0_2*dmats1[2][4] + coeff0_3*dmats1[3][4] + coeff0_4*dmats1[4][4] + coeff0_5*dmats1[5][4] + coeff0_6*dmats1[6][4] + coeff0_7*dmats1[7][4] + coeff0_8*dmats1[8][4] + coeff0_9*dmats1[9][4];
+            new_coeff0_5 = coeff0_0*dmats1[0][5] + coeff0_1*dmats1[1][5] + coeff0_2*dmats1[2][5] + coeff0_3*dmats1[3][5] + coeff0_4*dmats1[4][5] + coeff0_5*dmats1[5][5] + coeff0_6*dmats1[6][5] + coeff0_7*dmats1[7][5] + coeff0_8*dmats1[8][5] + coeff0_9*dmats1[9][5];
+            new_coeff0_6 = coeff0_0*dmats1[0][6] + coeff0_1*dmats1[1][6] + coeff0_2*dmats1[2][6] + coeff0_3*dmats1[3][6] + coeff0_4*dmats1[4][6] + coeff0_5*dmats1[5][6] + coeff0_6*dmats1[6][6] + coeff0_7*dmats1[7][6] + coeff0_8*dmats1[8][6] + coeff0_9*dmats1[9][6];
+            new_coeff0_7 = coeff0_0*dmats1[0][7] + coeff0_1*dmats1[1][7] + coeff0_2*dmats1[2][7] + coeff0_3*dmats1[3][7] + coeff0_4*dmats1[4][7] + coeff0_5*dmats1[5][7] + coeff0_6*dmats1[6][7] + coeff0_7*dmats1[7][7] + coeff0_8*dmats1[8][7] + coeff0_9*dmats1[9][7];
+            new_coeff0_8 = coeff0_0*dmats1[0][8] + coeff0_1*dmats1[1][8] + coeff0_2*dmats1[2][8] + coeff0_3*dmats1[3][8] + coeff0_4*dmats1[4][8] + coeff0_5*dmats1[5][8] + coeff0_6*dmats1[6][8] + coeff0_7*dmats1[7][8] + coeff0_8*dmats1[8][8] + coeff0_9*dmats1[9][8];
+            new_coeff0_9 = coeff0_0*dmats1[0][9] + coeff0_1*dmats1[1][9] + coeff0_2*dmats1[2][9] + coeff0_3*dmats1[3][9] + coeff0_4*dmats1[4][9] + coeff0_5*dmats1[5][9] + coeff0_6*dmats1[6][9] + coeff0_7*dmats1[7][9] + coeff0_8*dmats1[8][9] + coeff0_9*dmats1[9][9];
           }
           if(combinations[deriv_num][j] == 2)
           {
-            new_coeff0_0 = coeff0_0*dmats2[0][0] + coeff0_1*dmats2[1][0] + coeff0_2*dmats2[2][0] + coeff0_3*dmats2[3][0];
-            new_coeff0_1 = coeff0_0*dmats2[0][1] + coeff0_1*dmats2[1][1] + coeff0_2*dmats2[2][1] + coeff0_3*dmats2[3][1];
-            new_coeff0_2 = coeff0_0*dmats2[0][2] + coeff0_1*dmats2[1][2] + coeff0_2*dmats2[2][2] + coeff0_3*dmats2[3][2];
-            new_coeff0_3 = coeff0_0*dmats2[0][3] + coeff0_1*dmats2[1][3] + coeff0_2*dmats2[2][3] + coeff0_3*dmats2[3][3];
+            new_coeff0_0 = coeff0_0*dmats2[0][0] + coeff0_1*dmats2[1][0] + coeff0_2*dmats2[2][0] + coeff0_3*dmats2[3][0] + coeff0_4*dmats2[4][0] + coeff0_5*dmats2[5][0] + coeff0_6*dmats2[6][0] + coeff0_7*dmats2[7][0] + coeff0_8*dmats2[8][0] + coeff0_9*dmats2[9][0];
+            new_coeff0_1 = coeff0_0*dmats2[0][1] + coeff0_1*dmats2[1][1] + coeff0_2*dmats2[2][1] + coeff0_3*dmats2[3][1] + coeff0_4*dmats2[4][1] + coeff0_5*dmats2[5][1] + coeff0_6*dmats2[6][1] + coeff0_7*dmats2[7][1] + coeff0_8*dmats2[8][1] + coeff0_9*dmats2[9][1];
+            new_coeff0_2 = coeff0_0*dmats2[0][2] + coeff0_1*dmats2[1][2] + coeff0_2*dmats2[2][2] + coeff0_3*dmats2[3][2] + coeff0_4*dmats2[4][2] + coeff0_5*dmats2[5][2] + coeff0_6*dmats2[6][2] + coeff0_7*dmats2[7][2] + coeff0_8*dmats2[8][2] + coeff0_9*dmats2[9][2];
+            new_coeff0_3 = coeff0_0*dmats2[0][3] + coeff0_1*dmats2[1][3] + coeff0_2*dmats2[2][3] + coeff0_3*dmats2[3][3] + coeff0_4*dmats2[4][3] + coeff0_5*dmats2[5][3] + coeff0_6*dmats2[6][3] + coeff0_7*dmats2[7][3] + coeff0_8*dmats2[8][3] + coeff0_9*dmats2[9][3];
+            new_coeff0_4 = coeff0_0*dmats2[0][4] + coeff0_1*dmats2[1][4] + coeff0_2*dmats2[2][4] + coeff0_3*dmats2[3][4] + coeff0_4*dmats2[4][4] + coeff0_5*dmats2[5][4] + coeff0_6*dmats2[6][4] + coeff0_7*dmats2[7][4] + coeff0_8*dmats2[8][4] + coeff0_9*dmats2[9][4];
+            new_coeff0_5 = coeff0_0*dmats2[0][5] + coeff0_1*dmats2[1][5] + coeff0_2*dmats2[2][5] + coeff0_3*dmats2[3][5] + coeff0_4*dmats2[4][5] + coeff0_5*dmats2[5][5] + coeff0_6*dmats2[6][5] + coeff0_7*dmats2[7][5] + coeff0_8*dmats2[8][5] + coeff0_9*dmats2[9][5];
+            new_coeff0_6 = coeff0_0*dmats2[0][6] + coeff0_1*dmats2[1][6] + coeff0_2*dmats2[2][6] + coeff0_3*dmats2[3][6] + coeff0_4*dmats2[4][6] + coeff0_5*dmats2[5][6] + coeff0_6*dmats2[6][6] + coeff0_7*dmats2[7][6] + coeff0_8*dmats2[8][6] + coeff0_9*dmats2[9][6];
+            new_coeff0_7 = coeff0_0*dmats2[0][7] + coeff0_1*dmats2[1][7] + coeff0_2*dmats2[2][7] + coeff0_3*dmats2[3][7] + coeff0_4*dmats2[4][7] + coeff0_5*dmats2[5][7] + coeff0_6*dmats2[6][7] + coeff0_7*dmats2[7][7] + coeff0_8*dmats2[8][7] + coeff0_9*dmats2[9][7];
+            new_coeff0_8 = coeff0_0*dmats2[0][8] + coeff0_1*dmats2[1][8] + coeff0_2*dmats2[2][8] + coeff0_3*dmats2[3][8] + coeff0_4*dmats2[4][8] + coeff0_5*dmats2[5][8] + coeff0_6*dmats2[6][8] + coeff0_7*dmats2[7][8] + coeff0_8*dmats2[8][8] + coeff0_9*dmats2[9][8];
+            new_coeff0_9 = coeff0_0*dmats2[0][9] + coeff0_1*dmats2[1][9] + coeff0_2*dmats2[2][9] + coeff0_3*dmats2[3][9] + coeff0_4*dmats2[4][9] + coeff0_5*dmats2[5][9] + coeff0_6*dmats2[6][9] + coeff0_7*dmats2[7][9] + coeff0_8*dmats2[8][9] + coeff0_9*dmats2[9][9];
           }
     
         }
         // Compute derivatives on reference element as dot product of coefficients and basisvalues
-        derivatives[deriv_num] = new_coeff0_0*basisvalue0 + new_coeff0_1*basisvalue1 + new_coeff0_2*basisvalue2 + new_coeff0_3*basisvalue3;
+        derivatives[deriv_num] = new_coeff0_0*basisvalue0 + new_coeff0_1*basisvalue1 + new_coeff0_2*basisvalue2 + new_coeff0_3*basisvalue3 + new_coeff0_4*basisvalue4 + new_coeff0_5*basisvalue5 + new_coeff0_6*basisvalue6 + new_coeff0_7*basisvalue7 + new_coeff0_8*basisvalue8 + new_coeff0_9*basisvalue9;
       }
     
       // Transform derivatives back to physical element
@@ -3482,9 +4394,9 @@ double UFC_SolitaryWave3DBilinearForm_fi
                                    const ufc::cell& c) const
 {
     // The reference points, direction and weights:
-    const static double X[8][1][3] = {{{0, 0, 0}}, {{1, 0, 0}}, {{0, 1, 0}}, {{0, 0, 1}}, {{0, 0, 0}}, {{1, 0, 0}}, {{0, 1, 0}}, {{0, 0, 1}}};
-    const static double W[8][1] = {{1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}};
-    const static double D[8][1][2] = {{{1, 0}}, {{1, 0}}, {{1, 0}}, {{1, 0}}, {{0, 1}}, {{0, 1}}, {{0, 1}}, {{0, 1}}};
+    const static double X[20][1][3] = {{{0, 0, 0}}, {{1, 0, 0}}, {{0, 1, 0}}, {{0, 0, 1}}, {{0, 0.5, 0.5}}, {{0.5, 0, 0.5}}, {{0.5, 0.5, 0}}, {{0, 0, 0.5}}, {{0, 0.5, 0}}, {{0.5, 0, 0}}, {{0, 0, 0}}, {{1, 0, 0}}, {{0, 1, 0}}, {{0, 0, 1}}, {{0, 0.5, 0.5}}, {{0.5, 0, 0.5}}, {{0.5, 0.5, 0}}, {{0, 0, 0.5}}, {{0, 0.5, 0}}, {{0.5, 0, 0}}};
+    const static double W[20][1] = {{1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}};
+    const static double D[20][1][2] = {{{1, 0}}, {{1, 0}}, {{1, 0}}, {{1, 0}}, {{1, 0}}, {{1, 0}}, {{1, 0}}, {{1, 0}}, {{1, 0}}, {{1, 0}}, {{0, 1}}, {{0, 1}}, {{0, 1}}, {{0, 1}}, {{0, 1}}, {{0, 1}}, {{0, 1}}, {{0, 1}}, {{0, 1}}, {{0, 1}}};
     
     const double * const * x = c.coordinates;
     double result = 0.0;
@@ -3538,10 +4450,10 @@ void UFC_SolitaryWave3DBilinearForm_fini
     vertex_values[4] = dof_values[2];
     vertex_values[6] = dof_values[3];
     // Evaluate at vertices and use affine mapping
-    vertex_values[1] = dof_values[4];
-    vertex_values[3] = dof_values[5];
-    vertex_values[5] = dof_values[6];
-    vertex_values[7] = dof_values[7];
+    vertex_values[1] = dof_values[10];
+    vertex_values[3] = dof_values[11];
+    vertex_values[5] = dof_values[12];
+    vertex_values[7] = dof_values[13];
 }
 
 /// Return the number of sub elements (for a mixed element)
@@ -3581,7 +4493,7 @@ UFC_SolitaryWave3DBilinearForm_finite_el
 /// Return a string identifying the finite element
 const char* UFC_SolitaryWave3DBilinearForm_finite_element_2_0::signature() const
 {
-    return "FiniteElement('Lagrange', 'tetrahedron', 1)";
+    return "FiniteElement('Lagrange', 'tetrahedron', 2)";
 }
 
 /// Return the cell shape
@@ -3593,7 +4505,7 @@ ufc::shape UFC_SolitaryWave3DBilinearFor
 /// Return the dimension of the finite element function space
 unsigned int UFC_SolitaryWave3DBilinearForm_finite_element_2_0::space_dimension() const
 {
-    return 4;
+    return 10;
 }
 
 /// Return the rank of the value space
@@ -3684,45 +4596,75 @@ void UFC_SolitaryWave3DBilinearForm_fini
     // Generate scalings
     const double scalings_y_0 = 1;
     const double scalings_y_1 = scalings_y_0*(0.5 - 0.5*y);
+    const double scalings_y_2 = scalings_y_1*(0.5 - 0.5*y);
     const double scalings_z_0 = 1;
     const double scalings_z_1 = scalings_z_0*(0.5 - 0.5*z);
+    const double scalings_z_2 = scalings_z_1*(0.5 - 0.5*z);
     
     // Compute psitilde_a
     const double psitilde_a_0 = 1;
     const double psitilde_a_1 = x;
+    const double psitilde_a_2 = 1.5*x*psitilde_a_1 - 0.5*psitilde_a_0;
     
     // Compute psitilde_bs
     const double psitilde_bs_0_0 = 1;
     const double psitilde_bs_0_1 = 1.5*y + 0.5;
+    const double psitilde_bs_0_2 = 0.111111111111111*psitilde_bs_0_1 + 1.66666666666667*y*psitilde_bs_0_1 - 0.555555555555556*psitilde_bs_0_0;
     const double psitilde_bs_1_0 = 1;
+    const double psitilde_bs_1_1 = 2.5*y + 1.5;
+    const double psitilde_bs_2_0 = 1;
     
     // Compute psitilde_cs
     const double psitilde_cs_00_0 = 1;
     const double psitilde_cs_00_1 = 2*z + 1;
+    const double psitilde_cs_00_2 = 0.3125*psitilde_cs_00_1 + 1.875*z*psitilde_cs_00_1 - 0.5625*psitilde_cs_00_0;
     const double psitilde_cs_01_0 = 1;
+    const double psitilde_cs_01_1 = 3*z + 2;
+    const double psitilde_cs_02_0 = 1;
     const double psitilde_cs_10_0 = 1;
+    const double psitilde_cs_10_1 = 3*z + 2;
+    const double psitilde_cs_11_0 = 1;
+    const double psitilde_cs_20_0 = 1;
     
     // Compute basisvalues
     const double basisvalue0 = 0.866025403784439*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_0;
     const double basisvalue1 = 2.73861278752583*psitilde_a_1*scalings_y_1*psitilde_bs_1_0*scalings_z_1*psitilde_cs_10_0;
     const double basisvalue2 = 1.58113883008419*psitilde_a_0*scalings_y_0*psitilde_bs_0_1*scalings_z_1*psitilde_cs_01_0;
     const double basisvalue3 = 1.11803398874989*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_1;
-    
-    // Table(s) of coefficients
-    const static double coefficients0[4][4] = \
-    {{0.288675134594813, -0.182574185835055, -0.105409255338946, -0.074535599249993},
-    {0.288675134594813, 0.182574185835055, -0.105409255338946, -0.074535599249993},
-    {0.288675134594813, 0, 0.210818510677892, -0.074535599249993},
-    {0.288675134594813, 0, 0, 0.223606797749979}};
+    const double basisvalue4 = 5.1234753829798*psitilde_a_2*scalings_y_2*psitilde_bs_2_0*scalings_z_2*psitilde_cs_20_0;
+    const double basisvalue5 = 3.96862696659689*psitilde_a_1*scalings_y_1*psitilde_bs_1_1*scalings_z_2*psitilde_cs_11_0;
+    const double basisvalue6 = 2.29128784747792*psitilde_a_0*scalings_y_0*psitilde_bs_0_2*scalings_z_2*psitilde_cs_02_0;
+    const double basisvalue7 = 3.24037034920393*psitilde_a_1*scalings_y_1*psitilde_bs_1_0*scalings_z_1*psitilde_cs_10_1;
+    const double basisvalue8 = 1.87082869338697*psitilde_a_0*scalings_y_0*psitilde_bs_0_1*scalings_z_1*psitilde_cs_01_1;
+    const double basisvalue9 = 1.3228756555323*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_2;
+    
+    // Table(s) of coefficients
+    const static double coefficients0[10][10] = \
+    {{-0.0577350269189626, -0.0608580619450185, -0.0351364184463153, -0.0248451997499977, 0.0650600048632355, 0.0503952630678969, 0.0290957186981323, 0.0411475599898912, 0.0237565548366599, 0.0167984210226323},
+    {-0.0577350269189625, 0.0608580619450185, -0.0351364184463153, -0.0248451997499977, 0.0650600048632355, -0.050395263067897, 0.0290957186981323, -0.0411475599898912, 0.0237565548366599, 0.0167984210226323},
+    {-0.0577350269189625, 0, 0.0702728368926306, -0.0248451997499977, 0, 0, 0.0872871560943969, 0, -0.0475131096733199, 0.0167984210226323},
+    {-0.0577350269189626, 0, 0, 0.074535599249993, 0, 0, 0, 0, 0, 0.100790526135794},
+    {0.23094010767585, 0, 0.140545673785261, 0.0993807989999906, 0, 0, 0, 0, 0.1187827741833, -0.0671936840905293},
+    {0.230940107675851, 0.121716123890037, -0.0702728368926306, 0.0993807989999907, 0, 0, 0, 0.102868899974728, -0.0593913870916499, -0.0671936840905293},
+    {0.23094010767585, 0.121716123890037, 0.0702728368926307, -0.0993807989999907, 0, 0.100790526135794, -0.087287156094397, -0.0205737799949456, -0.01187827741833, 0.0167984210226323},
+    {0.23094010767585, -0.121716123890037, -0.0702728368926307, 0.0993807989999906, 0, 0, 0, -0.102868899974728, -0.0593913870916499, -0.0671936840905293},
+    {0.23094010767585, -0.121716123890037, 0.0702728368926306, -0.0993807989999906, 0, -0.100790526135794, -0.0872871560943969, 0.0205737799949456, -0.01187827741833, 0.0167984210226323},
+    {0.23094010767585, 0, -0.140545673785261, -0.0993807989999906, -0.130120009726471, 0, 0.0290957186981323, 0, 0.02375655483666, 0.0167984210226323}};
     
     // Extract relevant coefficients
     const double coeff0_0 = coefficients0[dof][0];
     const double coeff0_1 = coefficients0[dof][1];
     const double coeff0_2 = coefficients0[dof][2];
     const double coeff0_3 = coefficients0[dof][3];
+    const double coeff0_4 = coefficients0[dof][4];
+    const double coeff0_5 = coefficients0[dof][5];
+    const double coeff0_6 = coefficients0[dof][6];
+    const double coeff0_7 = coefficients0[dof][7];
+    const double coeff0_8 = coefficients0[dof][8];
+    const double coeff0_9 = coefficients0[dof][9];
     
     // Compute value(s)
-    *values = coeff0_0*basisvalue0 + coeff0_1*basisvalue1 + coeff0_2*basisvalue2 + coeff0_3*basisvalue3;
+    *values = coeff0_0*basisvalue0 + coeff0_1*basisvalue1 + coeff0_2*basisvalue2 + coeff0_3*basisvalue3 + coeff0_4*basisvalue4 + coeff0_5*basisvalue5 + coeff0_6*basisvalue6 + coeff0_7*basisvalue7 + coeff0_8*basisvalue8 + coeff0_9*basisvalue9;
 }
 
 /// Evaluate all basis functions at given point in cell
@@ -3870,56 +4812,98 @@ void UFC_SolitaryWave3DBilinearForm_fini
     // Generate scalings
     const double scalings_y_0 = 1;
     const double scalings_y_1 = scalings_y_0*(0.5 - 0.5*y);
+    const double scalings_y_2 = scalings_y_1*(0.5 - 0.5*y);
     const double scalings_z_0 = 1;
     const double scalings_z_1 = scalings_z_0*(0.5 - 0.5*z);
+    const double scalings_z_2 = scalings_z_1*(0.5 - 0.5*z);
     
     // Compute psitilde_a
     const double psitilde_a_0 = 1;
     const double psitilde_a_1 = x;
+    const double psitilde_a_2 = 1.5*x*psitilde_a_1 - 0.5*psitilde_a_0;
     
     // Compute psitilde_bs
     const double psitilde_bs_0_0 = 1;
     const double psitilde_bs_0_1 = 1.5*y + 0.5;
+    const double psitilde_bs_0_2 = 0.111111111111111*psitilde_bs_0_1 + 1.66666666666667*y*psitilde_bs_0_1 - 0.555555555555556*psitilde_bs_0_0;
     const double psitilde_bs_1_0 = 1;
+    const double psitilde_bs_1_1 = 2.5*y + 1.5;
+    const double psitilde_bs_2_0 = 1;
     
     // Compute psitilde_cs
     const double psitilde_cs_00_0 = 1;
     const double psitilde_cs_00_1 = 2*z + 1;
+    const double psitilde_cs_00_2 = 0.3125*psitilde_cs_00_1 + 1.875*z*psitilde_cs_00_1 - 0.5625*psitilde_cs_00_0;
     const double psitilde_cs_01_0 = 1;
+    const double psitilde_cs_01_1 = 3*z + 2;
+    const double psitilde_cs_02_0 = 1;
     const double psitilde_cs_10_0 = 1;
+    const double psitilde_cs_10_1 = 3*z + 2;
+    const double psitilde_cs_11_0 = 1;
+    const double psitilde_cs_20_0 = 1;
     
     // Compute basisvalues
     const double basisvalue0 = 0.866025403784439*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_0;
     const double basisvalue1 = 2.73861278752583*psitilde_a_1*scalings_y_1*psitilde_bs_1_0*scalings_z_1*psitilde_cs_10_0;
     const double basisvalue2 = 1.58113883008419*psitilde_a_0*scalings_y_0*psitilde_bs_0_1*scalings_z_1*psitilde_cs_01_0;
     const double basisvalue3 = 1.11803398874989*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_1;
-    
-    // Table(s) of coefficients
-    const static double coefficients0[4][4] = \
-    {{0.288675134594813, -0.182574185835055, -0.105409255338946, -0.074535599249993},
-    {0.288675134594813, 0.182574185835055, -0.105409255338946, -0.074535599249993},
-    {0.288675134594813, 0, 0.210818510677892, -0.074535599249993},
-    {0.288675134594813, 0, 0, 0.223606797749979}};
+    const double basisvalue4 = 5.1234753829798*psitilde_a_2*scalings_y_2*psitilde_bs_2_0*scalings_z_2*psitilde_cs_20_0;
+    const double basisvalue5 = 3.96862696659689*psitilde_a_1*scalings_y_1*psitilde_bs_1_1*scalings_z_2*psitilde_cs_11_0;
+    const double basisvalue6 = 2.29128784747792*psitilde_a_0*scalings_y_0*psitilde_bs_0_2*scalings_z_2*psitilde_cs_02_0;
+    const double basisvalue7 = 3.24037034920393*psitilde_a_1*scalings_y_1*psitilde_bs_1_0*scalings_z_1*psitilde_cs_10_1;
+    const double basisvalue8 = 1.87082869338697*psitilde_a_0*scalings_y_0*psitilde_bs_0_1*scalings_z_1*psitilde_cs_01_1;
+    const double basisvalue9 = 1.3228756555323*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_2;
+    
+    // Table(s) of coefficients
+    const static double coefficients0[10][10] = \
+    {{-0.0577350269189626, -0.0608580619450185, -0.0351364184463153, -0.0248451997499977, 0.0650600048632355, 0.0503952630678969, 0.0290957186981323, 0.0411475599898912, 0.0237565548366599, 0.0167984210226323},
+    {-0.0577350269189625, 0.0608580619450185, -0.0351364184463153, -0.0248451997499977, 0.0650600048632355, -0.050395263067897, 0.0290957186981323, -0.0411475599898912, 0.0237565548366599, 0.0167984210226323},
+    {-0.0577350269189625, 0, 0.0702728368926306, -0.0248451997499977, 0, 0, 0.0872871560943969, 0, -0.0475131096733199, 0.0167984210226323},
+    {-0.0577350269189626, 0, 0, 0.074535599249993, 0, 0, 0, 0, 0, 0.100790526135794},
+    {0.23094010767585, 0, 0.140545673785261, 0.0993807989999906, 0, 0, 0, 0, 0.1187827741833, -0.0671936840905293},
+    {0.230940107675851, 0.121716123890037, -0.0702728368926306, 0.0993807989999907, 0, 0, 0, 0.102868899974728, -0.0593913870916499, -0.0671936840905293},
+    {0.23094010767585, 0.121716123890037, 0.0702728368926307, -0.0993807989999907, 0, 0.100790526135794, -0.087287156094397, -0.0205737799949456, -0.01187827741833, 0.0167984210226323},
+    {0.23094010767585, -0.121716123890037, -0.0702728368926307, 0.0993807989999906, 0, 0, 0, -0.102868899974728, -0.0593913870916499, -0.0671936840905293},
+    {0.23094010767585, -0.121716123890037, 0.0702728368926306, -0.0993807989999906, 0, -0.100790526135794, -0.0872871560943969, 0.0205737799949456, -0.01187827741833, 0.0167984210226323},
+    {0.23094010767585, 0, -0.140545673785261, -0.0993807989999906, -0.130120009726471, 0, 0.0290957186981323, 0, 0.02375655483666, 0.0167984210226323}};
     
     // Interesting (new) part
     // Tables of derivatives of the polynomial base (transpose)
-    const static double dmats0[4][4] = \
-    {{0, 0, 0, 0},
-    {6.32455532033676, 0, 0, 0},
-    {0, 0, 0, 0},
-    {0, 0, 0, 0}};
-    
-    const static double dmats1[4][4] = \
-    {{0, 0, 0, 0},
-    {3.16227766016838, 0, 0, 0},
-    {5.47722557505166, 0, 0, 0},
-    {0, 0, 0, 0}};
-    
-    const static double dmats2[4][4] = \
-    {{0, 0, 0, 0},
-    {3.16227766016838, 0, 0, 0},
-    {1.82574185835055, 0, 0, 0},
-    {5.16397779494322, 0, 0, 0}};
+    const static double dmats0[10][10] = \
+    {{0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {6.32455532033676, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {0, 11.2249721603218, 0, 0, 0, 0, 0, 0, 0, 0},
+    {4.58257569495584, 0, 8.36660026534076, -1.18321595661992, 0, 0, 0, 0, 0, 0},
+    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {3.74165738677394, 0, 0, 8.69482604771366, 0, 0, 0, 0, 0, 0},
+    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
+    
+    const static double dmats1[10][10] = \
+    {{0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {3.16227766016838, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {5.47722557505166, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {2.95803989154981, 5.61248608016091, -1.08012344973464, -0.763762615825974, 0, 0, 0, 0, 0, 0},
+    {2.29128784747792, 7.24568837309472, 4.18330013267038, -0.591607978309962, 0, 0, 0, 0, 0, 0},
+    {-2.64575131106459, 0, 9.66091783079296, 0.683130051063974, 0, 0, 0, 0, 0, 0},
+    {1.87082869338697, 0, 0, 4.34741302385683, 0, 0, 0, 0, 0, 0},
+    {3.24037034920393, 0, 0, 7.52994023880668, 0, 0, 0, 0, 0, 0},
+    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
+    
+    const static double dmats2[10][10] = \
+    {{0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {3.16227766016838, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {1.82574185835055, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {5.16397779494322, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {2.95803989154981, 5.61248608016091, -1.08012344973464, -0.763762615825974, 0, 0, 0, 0, 0, 0},
+    {2.29128784747792, 1.44913767461894, 4.18330013267038, -0.591607978309962, 0, 0, 0, 0, 0, 0},
+    {1.32287565553229, 0, 3.86436713231718, -0.341565025531986, 0, 0, 0, 0, 0, 0},
+    {1.87082869338697, 7.09929573971954, 0, 4.34741302385683, 0, 0, 0, 0, 0, 0},
+    {1.08012344973464, 0, 7.09929573971954, 2.50998007960223, 0, 0, 0, 0, 0, 0},
+    {-3.81881307912987, 0, 0, 8.87411967464942, 0, 0, 0, 0, 0, 0}};
     
     // Compute reference derivatives
     // Declare pointer to array of derivatives on FIAT element
@@ -3930,12 +4914,24 @@ void UFC_SolitaryWave3DBilinearForm_fini
     double coeff0_1 = 0;
     double coeff0_2 = 0;
     double coeff0_3 = 0;
+    double coeff0_4 = 0;
+    double coeff0_5 = 0;
+    double coeff0_6 = 0;
+    double coeff0_7 = 0;
+    double coeff0_8 = 0;
+    double coeff0_9 = 0;
     
     // Declare new coefficients
     double new_coeff0_0 = 0;
     double new_coeff0_1 = 0;
     double new_coeff0_2 = 0;
     double new_coeff0_3 = 0;
+    double new_coeff0_4 = 0;
+    double new_coeff0_5 = 0;
+    double new_coeff0_6 = 0;
+    double new_coeff0_7 = 0;
+    double new_coeff0_8 = 0;
+    double new_coeff0_9 = 0;
     
     // Loop possible derivatives
     for (unsigned int deriv_num = 0; deriv_num < num_derivatives; deriv_num++)
@@ -3945,6 +4941,12 @@ void UFC_SolitaryWave3DBilinearForm_fini
       new_coeff0_1 = coefficients0[dof][1];
       new_coeff0_2 = coefficients0[dof][2];
       new_coeff0_3 = coefficients0[dof][3];
+      new_coeff0_4 = coefficients0[dof][4];
+      new_coeff0_5 = coefficients0[dof][5];
+      new_coeff0_6 = coefficients0[dof][6];
+      new_coeff0_7 = coefficients0[dof][7];
+      new_coeff0_8 = coefficients0[dof][8];
+      new_coeff0_9 = coefficients0[dof][9];
     
       // Loop derivative order
       for (unsigned int j = 0; j < n; j++)
@@ -3954,32 +4956,56 @@ void UFC_SolitaryWave3DBilinearForm_fini
         coeff0_1 = new_coeff0_1;
         coeff0_2 = new_coeff0_2;
         coeff0_3 = new_coeff0_3;
+        coeff0_4 = new_coeff0_4;
+        coeff0_5 = new_coeff0_5;
+        coeff0_6 = new_coeff0_6;
+        coeff0_7 = new_coeff0_7;
+        coeff0_8 = new_coeff0_8;
+        coeff0_9 = new_coeff0_9;
     
         if(combinations[deriv_num][j] == 0)
         {
-          new_coeff0_0 = coeff0_0*dmats0[0][0] + coeff0_1*dmats0[1][0] + coeff0_2*dmats0[2][0] + coeff0_3*dmats0[3][0];
-          new_coeff0_1 = coeff0_0*dmats0[0][1] + coeff0_1*dmats0[1][1] + coeff0_2*dmats0[2][1] + coeff0_3*dmats0[3][1];
-          new_coeff0_2 = coeff0_0*dmats0[0][2] + coeff0_1*dmats0[1][2] + coeff0_2*dmats0[2][2] + coeff0_3*dmats0[3][2];
-          new_coeff0_3 = coeff0_0*dmats0[0][3] + coeff0_1*dmats0[1][3] + coeff0_2*dmats0[2][3] + coeff0_3*dmats0[3][3];
+          new_coeff0_0 = coeff0_0*dmats0[0][0] + coeff0_1*dmats0[1][0] + coeff0_2*dmats0[2][0] + coeff0_3*dmats0[3][0] + coeff0_4*dmats0[4][0] + coeff0_5*dmats0[5][0] + coeff0_6*dmats0[6][0] + coeff0_7*dmats0[7][0] + coeff0_8*dmats0[8][0] + coeff0_9*dmats0[9][0];
+          new_coeff0_1 = coeff0_0*dmats0[0][1] + coeff0_1*dmats0[1][1] + coeff0_2*dmats0[2][1] + coeff0_3*dmats0[3][1] + coeff0_4*dmats0[4][1] + coeff0_5*dmats0[5][1] + coeff0_6*dmats0[6][1] + coeff0_7*dmats0[7][1] + coeff0_8*dmats0[8][1] + coeff0_9*dmats0[9][1];
+          new_coeff0_2 = coeff0_0*dmats0[0][2] + coeff0_1*dmats0[1][2] + coeff0_2*dmats0[2][2] + coeff0_3*dmats0[3][2] + coeff0_4*dmats0[4][2] + coeff0_5*dmats0[5][2] + coeff0_6*dmats0[6][2] + coeff0_7*dmats0[7][2] + coeff0_8*dmats0[8][2] + coeff0_9*dmats0[9][2];
+          new_coeff0_3 = coeff0_0*dmats0[0][3] + coeff0_1*dmats0[1][3] + coeff0_2*dmats0[2][3] + coeff0_3*dmats0[3][3] + coeff0_4*dmats0[4][3] + coeff0_5*dmats0[5][3] + coeff0_6*dmats0[6][3] + coeff0_7*dmats0[7][3] + coeff0_8*dmats0[8][3] + coeff0_9*dmats0[9][3];
+          new_coeff0_4 = coeff0_0*dmats0[0][4] + coeff0_1*dmats0[1][4] + coeff0_2*dmats0[2][4] + coeff0_3*dmats0[3][4] + coeff0_4*dmats0[4][4] + coeff0_5*dmats0[5][4] + coeff0_6*dmats0[6][4] + coeff0_7*dmats0[7][4] + coeff0_8*dmats0[8][4] + coeff0_9*dmats0[9][4];
+          new_coeff0_5 = coeff0_0*dmats0[0][5] + coeff0_1*dmats0[1][5] + coeff0_2*dmats0[2][5] + coeff0_3*dmats0[3][5] + coeff0_4*dmats0[4][5] + coeff0_5*dmats0[5][5] + coeff0_6*dmats0[6][5] + coeff0_7*dmats0[7][5] + coeff0_8*dmats0[8][5] + coeff0_9*dmats0[9][5];
+          new_coeff0_6 = coeff0_0*dmats0[0][6] + coeff0_1*dmats0[1][6] + coeff0_2*dmats0[2][6] + coeff0_3*dmats0[3][6] + coeff0_4*dmats0[4][6] + coeff0_5*dmats0[5][6] + coeff0_6*dmats0[6][6] + coeff0_7*dmats0[7][6] + coeff0_8*dmats0[8][6] + coeff0_9*dmats0[9][6];
+          new_coeff0_7 = coeff0_0*dmats0[0][7] + coeff0_1*dmats0[1][7] + coeff0_2*dmats0[2][7] + coeff0_3*dmats0[3][7] + coeff0_4*dmats0[4][7] + coeff0_5*dmats0[5][7] + coeff0_6*dmats0[6][7] + coeff0_7*dmats0[7][7] + coeff0_8*dmats0[8][7] + coeff0_9*dmats0[9][7];
+          new_coeff0_8 = coeff0_0*dmats0[0][8] + coeff0_1*dmats0[1][8] + coeff0_2*dmats0[2][8] + coeff0_3*dmats0[3][8] + coeff0_4*dmats0[4][8] + coeff0_5*dmats0[5][8] + coeff0_6*dmats0[6][8] + coeff0_7*dmats0[7][8] + coeff0_8*dmats0[8][8] + coeff0_9*dmats0[9][8];
+          new_coeff0_9 = coeff0_0*dmats0[0][9] + coeff0_1*dmats0[1][9] + coeff0_2*dmats0[2][9] + coeff0_3*dmats0[3][9] + coeff0_4*dmats0[4][9] + coeff0_5*dmats0[5][9] + coeff0_6*dmats0[6][9] + coeff0_7*dmats0[7][9] + coeff0_8*dmats0[8][9] + coeff0_9*dmats0[9][9];
         }
         if(combinations[deriv_num][j] == 1)
         {
-          new_coeff0_0 = coeff0_0*dmats1[0][0] + coeff0_1*dmats1[1][0] + coeff0_2*dmats1[2][0] + coeff0_3*dmats1[3][0];
-          new_coeff0_1 = coeff0_0*dmats1[0][1] + coeff0_1*dmats1[1][1] + coeff0_2*dmats1[2][1] + coeff0_3*dmats1[3][1];
-          new_coeff0_2 = coeff0_0*dmats1[0][2] + coeff0_1*dmats1[1][2] + coeff0_2*dmats1[2][2] + coeff0_3*dmats1[3][2];
-          new_coeff0_3 = coeff0_0*dmats1[0][3] + coeff0_1*dmats1[1][3] + coeff0_2*dmats1[2][3] + coeff0_3*dmats1[3][3];
+          new_coeff0_0 = coeff0_0*dmats1[0][0] + coeff0_1*dmats1[1][0] + coeff0_2*dmats1[2][0] + coeff0_3*dmats1[3][0] + coeff0_4*dmats1[4][0] + coeff0_5*dmats1[5][0] + coeff0_6*dmats1[6][0] + coeff0_7*dmats1[7][0] + coeff0_8*dmats1[8][0] + coeff0_9*dmats1[9][0];
+          new_coeff0_1 = coeff0_0*dmats1[0][1] + coeff0_1*dmats1[1][1] + coeff0_2*dmats1[2][1] + coeff0_3*dmats1[3][1] + coeff0_4*dmats1[4][1] + coeff0_5*dmats1[5][1] + coeff0_6*dmats1[6][1] + coeff0_7*dmats1[7][1] + coeff0_8*dmats1[8][1] + coeff0_9*dmats1[9][1];
+          new_coeff0_2 = coeff0_0*dmats1[0][2] + coeff0_1*dmats1[1][2] + coeff0_2*dmats1[2][2] + coeff0_3*dmats1[3][2] + coeff0_4*dmats1[4][2] + coeff0_5*dmats1[5][2] + coeff0_6*dmats1[6][2] + coeff0_7*dmats1[7][2] + coeff0_8*dmats1[8][2] + coeff0_9*dmats1[9][2];
+          new_coeff0_3 = coeff0_0*dmats1[0][3] + coeff0_1*dmats1[1][3] + coeff0_2*dmats1[2][3] + coeff0_3*dmats1[3][3] + coeff0_4*dmats1[4][3] + coeff0_5*dmats1[5][3] + coeff0_6*dmats1[6][3] + coeff0_7*dmats1[7][3] + coeff0_8*dmats1[8][3] + coeff0_9*dmats1[9][3];
+          new_coeff0_4 = coeff0_0*dmats1[0][4] + coeff0_1*dmats1[1][4] + coeff0_2*dmats1[2][4] + coeff0_3*dmats1[3][4] + coeff0_4*dmats1[4][4] + coeff0_5*dmats1[5][4] + coeff0_6*dmats1[6][4] + coeff0_7*dmats1[7][4] + coeff0_8*dmats1[8][4] + coeff0_9*dmats1[9][4];
+          new_coeff0_5 = coeff0_0*dmats1[0][5] + coeff0_1*dmats1[1][5] + coeff0_2*dmats1[2][5] + coeff0_3*dmats1[3][5] + coeff0_4*dmats1[4][5] + coeff0_5*dmats1[5][5] + coeff0_6*dmats1[6][5] + coeff0_7*dmats1[7][5] + coeff0_8*dmats1[8][5] + coeff0_9*dmats1[9][5];
+          new_coeff0_6 = coeff0_0*dmats1[0][6] + coeff0_1*dmats1[1][6] + coeff0_2*dmats1[2][6] + coeff0_3*dmats1[3][6] + coeff0_4*dmats1[4][6] + coeff0_5*dmats1[5][6] + coeff0_6*dmats1[6][6] + coeff0_7*dmats1[7][6] + coeff0_8*dmats1[8][6] + coeff0_9*dmats1[9][6];
+          new_coeff0_7 = coeff0_0*dmats1[0][7] + coeff0_1*dmats1[1][7] + coeff0_2*dmats1[2][7] + coeff0_3*dmats1[3][7] + coeff0_4*dmats1[4][7] + coeff0_5*dmats1[5][7] + coeff0_6*dmats1[6][7] + coeff0_7*dmats1[7][7] + coeff0_8*dmats1[8][7] + coeff0_9*dmats1[9][7];
+          new_coeff0_8 = coeff0_0*dmats1[0][8] + coeff0_1*dmats1[1][8] + coeff0_2*dmats1[2][8] + coeff0_3*dmats1[3][8] + coeff0_4*dmats1[4][8] + coeff0_5*dmats1[5][8] + coeff0_6*dmats1[6][8] + coeff0_7*dmats1[7][8] + coeff0_8*dmats1[8][8] + coeff0_9*dmats1[9][8];
+          new_coeff0_9 = coeff0_0*dmats1[0][9] + coeff0_1*dmats1[1][9] + coeff0_2*dmats1[2][9] + coeff0_3*dmats1[3][9] + coeff0_4*dmats1[4][9] + coeff0_5*dmats1[5][9] + coeff0_6*dmats1[6][9] + coeff0_7*dmats1[7][9] + coeff0_8*dmats1[8][9] + coeff0_9*dmats1[9][9];
         }
         if(combinations[deriv_num][j] == 2)
         {
-          new_coeff0_0 = coeff0_0*dmats2[0][0] + coeff0_1*dmats2[1][0] + coeff0_2*dmats2[2][0] + coeff0_3*dmats2[3][0];
-          new_coeff0_1 = coeff0_0*dmats2[0][1] + coeff0_1*dmats2[1][1] + coeff0_2*dmats2[2][1] + coeff0_3*dmats2[3][1];
-          new_coeff0_2 = coeff0_0*dmats2[0][2] + coeff0_1*dmats2[1][2] + coeff0_2*dmats2[2][2] + coeff0_3*dmats2[3][2];
-          new_coeff0_3 = coeff0_0*dmats2[0][3] + coeff0_1*dmats2[1][3] + coeff0_2*dmats2[2][3] + coeff0_3*dmats2[3][3];
+          new_coeff0_0 = coeff0_0*dmats2[0][0] + coeff0_1*dmats2[1][0] + coeff0_2*dmats2[2][0] + coeff0_3*dmats2[3][0] + coeff0_4*dmats2[4][0] + coeff0_5*dmats2[5][0] + coeff0_6*dmats2[6][0] + coeff0_7*dmats2[7][0] + coeff0_8*dmats2[8][0] + coeff0_9*dmats2[9][0];
+          new_coeff0_1 = coeff0_0*dmats2[0][1] + coeff0_1*dmats2[1][1] + coeff0_2*dmats2[2][1] + coeff0_3*dmats2[3][1] + coeff0_4*dmats2[4][1] + coeff0_5*dmats2[5][1] + coeff0_6*dmats2[6][1] + coeff0_7*dmats2[7][1] + coeff0_8*dmats2[8][1] + coeff0_9*dmats2[9][1];
+          new_coeff0_2 = coeff0_0*dmats2[0][2] + coeff0_1*dmats2[1][2] + coeff0_2*dmats2[2][2] + coeff0_3*dmats2[3][2] + coeff0_4*dmats2[4][2] + coeff0_5*dmats2[5][2] + coeff0_6*dmats2[6][2] + coeff0_7*dmats2[7][2] + coeff0_8*dmats2[8][2] + coeff0_9*dmats2[9][2];
+          new_coeff0_3 = coeff0_0*dmats2[0][3] + coeff0_1*dmats2[1][3] + coeff0_2*dmats2[2][3] + coeff0_3*dmats2[3][3] + coeff0_4*dmats2[4][3] + coeff0_5*dmats2[5][3] + coeff0_6*dmats2[6][3] + coeff0_7*dmats2[7][3] + coeff0_8*dmats2[8][3] + coeff0_9*dmats2[9][3];
+          new_coeff0_4 = coeff0_0*dmats2[0][4] + coeff0_1*dmats2[1][4] + coeff0_2*dmats2[2][4] + coeff0_3*dmats2[3][4] + coeff0_4*dmats2[4][4] + coeff0_5*dmats2[5][4] + coeff0_6*dmats2[6][4] + coeff0_7*dmats2[7][4] + coeff0_8*dmats2[8][4] + coeff0_9*dmats2[9][4];
+          new_coeff0_5 = coeff0_0*dmats2[0][5] + coeff0_1*dmats2[1][5] + coeff0_2*dmats2[2][5] + coeff0_3*dmats2[3][5] + coeff0_4*dmats2[4][5] + coeff0_5*dmats2[5][5] + coeff0_6*dmats2[6][5] + coeff0_7*dmats2[7][5] + coeff0_8*dmats2[8][5] + coeff0_9*dmats2[9][5];
+          new_coeff0_6 = coeff0_0*dmats2[0][6] + coeff0_1*dmats2[1][6] + coeff0_2*dmats2[2][6] + coeff0_3*dmats2[3][6] + coeff0_4*dmats2[4][6] + coeff0_5*dmats2[5][6] + coeff0_6*dmats2[6][6] + coeff0_7*dmats2[7][6] + coeff0_8*dmats2[8][6] + coeff0_9*dmats2[9][6];
+          new_coeff0_7 = coeff0_0*dmats2[0][7] + coeff0_1*dmats2[1][7] + coeff0_2*dmats2[2][7] + coeff0_3*dmats2[3][7] + coeff0_4*dmats2[4][7] + coeff0_5*dmats2[5][7] + coeff0_6*dmats2[6][7] + coeff0_7*dmats2[7][7] + coeff0_8*dmats2[8][7] + coeff0_9*dmats2[9][7];
+          new_coeff0_8 = coeff0_0*dmats2[0][8] + coeff0_1*dmats2[1][8] + coeff0_2*dmats2[2][8] + coeff0_3*dmats2[3][8] + coeff0_4*dmats2[4][8] + coeff0_5*dmats2[5][8] + coeff0_6*dmats2[6][8] + coeff0_7*dmats2[7][8] + coeff0_8*dmats2[8][8] + coeff0_9*dmats2[9][8];
+          new_coeff0_9 = coeff0_0*dmats2[0][9] + coeff0_1*dmats2[1][9] + coeff0_2*dmats2[2][9] + coeff0_3*dmats2[3][9] + coeff0_4*dmats2[4][9] + coeff0_5*dmats2[5][9] + coeff0_6*dmats2[6][9] + coeff0_7*dmats2[7][9] + coeff0_8*dmats2[8][9] + coeff0_9*dmats2[9][9];
         }
     
       }
       // Compute derivatives on reference element as dot product of coefficients and basisvalues
-      derivatives[deriv_num] = new_coeff0_0*basisvalue0 + new_coeff0_1*basisvalue1 + new_coeff0_2*basisvalue2 + new_coeff0_3*basisvalue3;
+      derivatives[deriv_num] = new_coeff0_0*basisvalue0 + new_coeff0_1*basisvalue1 + new_coeff0_2*basisvalue2 + new_coeff0_3*basisvalue3 + new_coeff0_4*basisvalue4 + new_coeff0_5*basisvalue5 + new_coeff0_6*basisvalue6 + new_coeff0_7*basisvalue7 + new_coeff0_8*basisvalue8 + new_coeff0_9*basisvalue9;
     }
     
     // Transform derivatives back to physical element
@@ -4019,9 +5045,9 @@ double UFC_SolitaryWave3DBilinearForm_fi
                                    const ufc::cell& c) const
 {
     // The reference points, direction and weights:
-    const static double X[4][1][3] = {{{0, 0, 0}}, {{1, 0, 0}}, {{0, 1, 0}}, {{0, 0, 1}}};
-    const static double W[4][1] = {{1}, {1}, {1}, {1}};
-    const static double D[4][1][1] = {{{1}}, {{1}}, {{1}}, {{1}}};
+    const static double X[10][1][3] = {{{0, 0, 0}}, {{1, 0, 0}}, {{0, 1, 0}}, {{0, 0, 1}}, {{0, 0.5, 0.5}}, {{0.5, 0, 0.5}}, {{0.5, 0.5, 0}}, {{0, 0, 0.5}}, {{0, 0.5, 0}}, {{0.5, 0, 0}}};
+    const static double W[10][1] = {{1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}};
+    const static double D[10][1][1] = {{{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}};
     
     const double * const * x = c.coordinates;
     double result = 0.0;
@@ -4104,7 +5130,7 @@ UFC_SolitaryWave3DBilinearForm_finite_el
 /// Return a string identifying the finite element
 const char* UFC_SolitaryWave3DBilinearForm_finite_element_2_1::signature() const
 {
-    return "FiniteElement('Lagrange', 'tetrahedron', 1)";
+    return "FiniteElement('Lagrange', 'tetrahedron', 2)";
 }
 
 /// Return the cell shape
@@ -4116,7 +5142,7 @@ ufc::shape UFC_SolitaryWave3DBilinearFor
 /// Return the dimension of the finite element function space
 unsigned int UFC_SolitaryWave3DBilinearForm_finite_element_2_1::space_dimension() const
 {
-    return 4;
+    return 10;
 }
 
 /// Return the rank of the value space
@@ -4207,45 +5233,75 @@ void UFC_SolitaryWave3DBilinearForm_fini
     // Generate scalings
     const double scalings_y_0 = 1;
     const double scalings_y_1 = scalings_y_0*(0.5 - 0.5*y);
+    const double scalings_y_2 = scalings_y_1*(0.5 - 0.5*y);
     const double scalings_z_0 = 1;
     const double scalings_z_1 = scalings_z_0*(0.5 - 0.5*z);
+    const double scalings_z_2 = scalings_z_1*(0.5 - 0.5*z);
     
     // Compute psitilde_a
     const double psitilde_a_0 = 1;
     const double psitilde_a_1 = x;
+    const double psitilde_a_2 = 1.5*x*psitilde_a_1 - 0.5*psitilde_a_0;
     
     // Compute psitilde_bs
     const double psitilde_bs_0_0 = 1;
     const double psitilde_bs_0_1 = 1.5*y + 0.5;
+    const double psitilde_bs_0_2 = 0.111111111111111*psitilde_bs_0_1 + 1.66666666666667*y*psitilde_bs_0_1 - 0.555555555555556*psitilde_bs_0_0;
     const double psitilde_bs_1_0 = 1;
+    const double psitilde_bs_1_1 = 2.5*y + 1.5;
+    const double psitilde_bs_2_0 = 1;
     
     // Compute psitilde_cs
     const double psitilde_cs_00_0 = 1;
     const double psitilde_cs_00_1 = 2*z + 1;
+    const double psitilde_cs_00_2 = 0.3125*psitilde_cs_00_1 + 1.875*z*psitilde_cs_00_1 - 0.5625*psitilde_cs_00_0;
     const double psitilde_cs_01_0 = 1;
+    const double psitilde_cs_01_1 = 3*z + 2;
+    const double psitilde_cs_02_0 = 1;
     const double psitilde_cs_10_0 = 1;
+    const double psitilde_cs_10_1 = 3*z + 2;
+    const double psitilde_cs_11_0 = 1;
+    const double psitilde_cs_20_0 = 1;
     
     // Compute basisvalues
     const double basisvalue0 = 0.866025403784439*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_0;
     const double basisvalue1 = 2.73861278752583*psitilde_a_1*scalings_y_1*psitilde_bs_1_0*scalings_z_1*psitilde_cs_10_0;
     const double basisvalue2 = 1.58113883008419*psitilde_a_0*scalings_y_0*psitilde_bs_0_1*scalings_z_1*psitilde_cs_01_0;
     const double basisvalue3 = 1.11803398874989*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_1;
-    
-    // Table(s) of coefficients
-    const static double coefficients0[4][4] = \
-    {{0.288675134594813, -0.182574185835055, -0.105409255338946, -0.074535599249993},
-    {0.288675134594813, 0.182574185835055, -0.105409255338946, -0.074535599249993},
-    {0.288675134594813, 0, 0.210818510677892, -0.074535599249993},
-    {0.288675134594813, 0, 0, 0.223606797749979}};
+    const double basisvalue4 = 5.1234753829798*psitilde_a_2*scalings_y_2*psitilde_bs_2_0*scalings_z_2*psitilde_cs_20_0;
+    const double basisvalue5 = 3.96862696659689*psitilde_a_1*scalings_y_1*psitilde_bs_1_1*scalings_z_2*psitilde_cs_11_0;
+    const double basisvalue6 = 2.29128784747792*psitilde_a_0*scalings_y_0*psitilde_bs_0_2*scalings_z_2*psitilde_cs_02_0;
+    const double basisvalue7 = 3.24037034920393*psitilde_a_1*scalings_y_1*psitilde_bs_1_0*scalings_z_1*psitilde_cs_10_1;
+    const double basisvalue8 = 1.87082869338697*psitilde_a_0*scalings_y_0*psitilde_bs_0_1*scalings_z_1*psitilde_cs_01_1;
+    const double basisvalue9 = 1.3228756555323*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_2;
+    
+    // Table(s) of coefficients
+    const static double coefficients0[10][10] = \
+    {{-0.0577350269189626, -0.0608580619450185, -0.0351364184463153, -0.0248451997499977, 0.0650600048632355, 0.0503952630678969, 0.0290957186981323, 0.0411475599898912, 0.0237565548366599, 0.0167984210226323},
+    {-0.0577350269189625, 0.0608580619450185, -0.0351364184463153, -0.0248451997499977, 0.0650600048632355, -0.050395263067897, 0.0290957186981323, -0.0411475599898912, 0.0237565548366599, 0.0167984210226323},
+    {-0.0577350269189625, 0, 0.0702728368926306, -0.0248451997499977, 0, 0, 0.0872871560943969, 0, -0.0475131096733199, 0.0167984210226323},
+    {-0.0577350269189626, 0, 0, 0.074535599249993, 0, 0, 0, 0, 0, 0.100790526135794},
+    {0.23094010767585, 0, 0.140545673785261, 0.0993807989999906, 0, 0, 0, 0, 0.1187827741833, -0.0671936840905293},
+    {0.230940107675851, 0.121716123890037, -0.0702728368926306, 0.0993807989999907, 0, 0, 0, 0.102868899974728, -0.0593913870916499, -0.0671936840905293},
+    {0.23094010767585, 0.121716123890037, 0.0702728368926307, -0.0993807989999907, 0, 0.100790526135794, -0.087287156094397, -0.0205737799949456, -0.01187827741833, 0.0167984210226323},
+    {0.23094010767585, -0.121716123890037, -0.0702728368926307, 0.0993807989999906, 0, 0, 0, -0.102868899974728, -0.0593913870916499, -0.0671936840905293},
+    {0.23094010767585, -0.121716123890037, 0.0702728368926306, -0.0993807989999906, 0, -0.100790526135794, -0.0872871560943969, 0.0205737799949456, -0.01187827741833, 0.0167984210226323},
+    {0.23094010767585, 0, -0.140545673785261, -0.0993807989999906, -0.130120009726471, 0, 0.0290957186981323, 0, 0.02375655483666, 0.0167984210226323}};
     
     // Extract relevant coefficients
     const double coeff0_0 = coefficients0[dof][0];
     const double coeff0_1 = coefficients0[dof][1];
     const double coeff0_2 = coefficients0[dof][2];
     const double coeff0_3 = coefficients0[dof][3];
+    const double coeff0_4 = coefficients0[dof][4];
+    const double coeff0_5 = coefficients0[dof][5];
+    const double coeff0_6 = coefficients0[dof][6];
+    const double coeff0_7 = coefficients0[dof][7];
+    const double coeff0_8 = coefficients0[dof][8];
+    const double coeff0_9 = coefficients0[dof][9];
     
     // Compute value(s)
-    *values = coeff0_0*basisvalue0 + coeff0_1*basisvalue1 + coeff0_2*basisvalue2 + coeff0_3*basisvalue3;
+    *values = coeff0_0*basisvalue0 + coeff0_1*basisvalue1 + coeff0_2*basisvalue2 + coeff0_3*basisvalue3 + coeff0_4*basisvalue4 + coeff0_5*basisvalue5 + coeff0_6*basisvalue6 + coeff0_7*basisvalue7 + coeff0_8*basisvalue8 + coeff0_9*basisvalue9;
 }
 
 /// Evaluate all basis functions at given point in cell
@@ -4393,56 +5449,98 @@ void UFC_SolitaryWave3DBilinearForm_fini
     // Generate scalings
     const double scalings_y_0 = 1;
     const double scalings_y_1 = scalings_y_0*(0.5 - 0.5*y);
+    const double scalings_y_2 = scalings_y_1*(0.5 - 0.5*y);
     const double scalings_z_0 = 1;
     const double scalings_z_1 = scalings_z_0*(0.5 - 0.5*z);
+    const double scalings_z_2 = scalings_z_1*(0.5 - 0.5*z);
     
     // Compute psitilde_a
     const double psitilde_a_0 = 1;
     const double psitilde_a_1 = x;
+    const double psitilde_a_2 = 1.5*x*psitilde_a_1 - 0.5*psitilde_a_0;
     
     // Compute psitilde_bs
     const double psitilde_bs_0_0 = 1;
     const double psitilde_bs_0_1 = 1.5*y + 0.5;
+    const double psitilde_bs_0_2 = 0.111111111111111*psitilde_bs_0_1 + 1.66666666666667*y*psitilde_bs_0_1 - 0.555555555555556*psitilde_bs_0_0;
     const double psitilde_bs_1_0 = 1;
+    const double psitilde_bs_1_1 = 2.5*y + 1.5;
+    const double psitilde_bs_2_0 = 1;
     
     // Compute psitilde_cs
     const double psitilde_cs_00_0 = 1;
     const double psitilde_cs_00_1 = 2*z + 1;
+    const double psitilde_cs_00_2 = 0.3125*psitilde_cs_00_1 + 1.875*z*psitilde_cs_00_1 - 0.5625*psitilde_cs_00_0;
     const double psitilde_cs_01_0 = 1;
+    const double psitilde_cs_01_1 = 3*z + 2;
+    const double psitilde_cs_02_0 = 1;
     const double psitilde_cs_10_0 = 1;
+    const double psitilde_cs_10_1 = 3*z + 2;
+    const double psitilde_cs_11_0 = 1;
+    const double psitilde_cs_20_0 = 1;
     
     // Compute basisvalues
     const double basisvalue0 = 0.866025403784439*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_0;
     const double basisvalue1 = 2.73861278752583*psitilde_a_1*scalings_y_1*psitilde_bs_1_0*scalings_z_1*psitilde_cs_10_0;
     const double basisvalue2 = 1.58113883008419*psitilde_a_0*scalings_y_0*psitilde_bs_0_1*scalings_z_1*psitilde_cs_01_0;
     const double basisvalue3 = 1.11803398874989*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_1;
-    
-    // Table(s) of coefficients
-    const static double coefficients0[4][4] = \
-    {{0.288675134594813, -0.182574185835055, -0.105409255338946, -0.074535599249993},
-    {0.288675134594813, 0.182574185835055, -0.105409255338946, -0.074535599249993},
-    {0.288675134594813, 0, 0.210818510677892, -0.074535599249993},
-    {0.288675134594813, 0, 0, 0.223606797749979}};
+    const double basisvalue4 = 5.1234753829798*psitilde_a_2*scalings_y_2*psitilde_bs_2_0*scalings_z_2*psitilde_cs_20_0;
+    const double basisvalue5 = 3.96862696659689*psitilde_a_1*scalings_y_1*psitilde_bs_1_1*scalings_z_2*psitilde_cs_11_0;
+    const double basisvalue6 = 2.29128784747792*psitilde_a_0*scalings_y_0*psitilde_bs_0_2*scalings_z_2*psitilde_cs_02_0;
+    const double basisvalue7 = 3.24037034920393*psitilde_a_1*scalings_y_1*psitilde_bs_1_0*scalings_z_1*psitilde_cs_10_1;
+    const double basisvalue8 = 1.87082869338697*psitilde_a_0*scalings_y_0*psitilde_bs_0_1*scalings_z_1*psitilde_cs_01_1;
+    const double basisvalue9 = 1.3228756555323*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_2;
+    
+    // Table(s) of coefficients
+    const static double coefficients0[10][10] = \
+    {{-0.0577350269189626, -0.0608580619450185, -0.0351364184463153, -0.0248451997499977, 0.0650600048632355, 0.0503952630678969, 0.0290957186981323, 0.0411475599898912, 0.0237565548366599, 0.0167984210226323},
+    {-0.0577350269189625, 0.0608580619450185, -0.0351364184463153, -0.0248451997499977, 0.0650600048632355, -0.050395263067897, 0.0290957186981323, -0.0411475599898912, 0.0237565548366599, 0.0167984210226323},
+    {-0.0577350269189625, 0, 0.0702728368926306, -0.0248451997499977, 0, 0, 0.0872871560943969, 0, -0.0475131096733199, 0.0167984210226323},
+    {-0.0577350269189626, 0, 0, 0.074535599249993, 0, 0, 0, 0, 0, 0.100790526135794},
+    {0.23094010767585, 0, 0.140545673785261, 0.0993807989999906, 0, 0, 0, 0, 0.1187827741833, -0.0671936840905293},
+    {0.230940107675851, 0.121716123890037, -0.0702728368926306, 0.0993807989999907, 0, 0, 0, 0.102868899974728, -0.0593913870916499, -0.0671936840905293},
+    {0.23094010767585, 0.121716123890037, 0.0702728368926307, -0.0993807989999907, 0, 0.100790526135794, -0.087287156094397, -0.0205737799949456, -0.01187827741833, 0.0167984210226323},
+    {0.23094010767585, -0.121716123890037, -0.0702728368926307, 0.0993807989999906, 0, 0, 0, -0.102868899974728, -0.0593913870916499, -0.0671936840905293},
+    {0.23094010767585, -0.121716123890037, 0.0702728368926306, -0.0993807989999906, 0, -0.100790526135794, -0.0872871560943969, 0.0205737799949456, -0.01187827741833, 0.0167984210226323},
+    {0.23094010767585, 0, -0.140545673785261, -0.0993807989999906, -0.130120009726471, 0, 0.0290957186981323, 0, 0.02375655483666, 0.0167984210226323}};
     
     // Interesting (new) part
     // Tables of derivatives of the polynomial base (transpose)
-    const static double dmats0[4][4] = \
-    {{0, 0, 0, 0},
-    {6.32455532033676, 0, 0, 0},
-    {0, 0, 0, 0},
-    {0, 0, 0, 0}};
-    
-    const static double dmats1[4][4] = \
-    {{0, 0, 0, 0},
-    {3.16227766016838, 0, 0, 0},
-    {5.47722557505166, 0, 0, 0},
-    {0, 0, 0, 0}};
-    
-    const static double dmats2[4][4] = \
-    {{0, 0, 0, 0},
-    {3.16227766016838, 0, 0, 0},
-    {1.82574185835055, 0, 0, 0},
-    {5.16397779494322, 0, 0, 0}};
+    const static double dmats0[10][10] = \
+    {{0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {6.32455532033676, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {0, 11.2249721603218, 0, 0, 0, 0, 0, 0, 0, 0},
+    {4.58257569495584, 0, 8.36660026534076, -1.18321595661992, 0, 0, 0, 0, 0, 0},
+    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {3.74165738677394, 0, 0, 8.69482604771366, 0, 0, 0, 0, 0, 0},
+    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
+    
+    const static double dmats1[10][10] = \
+    {{0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {3.16227766016838, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {5.47722557505166, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {2.95803989154981, 5.61248608016091, -1.08012344973464, -0.763762615825974, 0, 0, 0, 0, 0, 0},
+    {2.29128784747792, 7.24568837309472, 4.18330013267038, -0.591607978309962, 0, 0, 0, 0, 0, 0},
+    {-2.64575131106459, 0, 9.66091783079296, 0.683130051063974, 0, 0, 0, 0, 0, 0},
+    {1.87082869338697, 0, 0, 4.34741302385683, 0, 0, 0, 0, 0, 0},
+    {3.24037034920393, 0, 0, 7.52994023880668, 0, 0, 0, 0, 0, 0},
+    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
+    
+    const static double dmats2[10][10] = \
+    {{0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {3.16227766016838, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {1.82574185835055, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {5.16397779494322, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {2.95803989154981, 5.61248608016091, -1.08012344973464, -0.763762615825974, 0, 0, 0, 0, 0, 0},
+    {2.29128784747792, 1.44913767461894, 4.18330013267038, -0.591607978309962, 0, 0, 0, 0, 0, 0},
+    {1.32287565553229, 0, 3.86436713231718, -0.341565025531986, 0, 0, 0, 0, 0, 0},
+    {1.87082869338697, 7.09929573971954, 0, 4.34741302385683, 0, 0, 0, 0, 0, 0},
+    {1.08012344973464, 0, 7.09929573971954, 2.50998007960223, 0, 0, 0, 0, 0, 0},
+    {-3.81881307912987, 0, 0, 8.87411967464942, 0, 0, 0, 0, 0, 0}};
     
     // Compute reference derivatives
     // Declare pointer to array of derivatives on FIAT element
@@ -4453,12 +5551,24 @@ void UFC_SolitaryWave3DBilinearForm_fini
     double coeff0_1 = 0;
     double coeff0_2 = 0;
     double coeff0_3 = 0;
+    double coeff0_4 = 0;
+    double coeff0_5 = 0;
+    double coeff0_6 = 0;
+    double coeff0_7 = 0;
+    double coeff0_8 = 0;
+    double coeff0_9 = 0;
     
     // Declare new coefficients
     double new_coeff0_0 = 0;
     double new_coeff0_1 = 0;
     double new_coeff0_2 = 0;
     double new_coeff0_3 = 0;
+    double new_coeff0_4 = 0;
+    double new_coeff0_5 = 0;
+    double new_coeff0_6 = 0;
+    double new_coeff0_7 = 0;
+    double new_coeff0_8 = 0;
+    double new_coeff0_9 = 0;
     
     // Loop possible derivatives
     for (unsigned int deriv_num = 0; deriv_num < num_derivatives; deriv_num++)
@@ -4468,6 +5578,12 @@ void UFC_SolitaryWave3DBilinearForm_fini
       new_coeff0_1 = coefficients0[dof][1];
       new_coeff0_2 = coefficients0[dof][2];
       new_coeff0_3 = coefficients0[dof][3];
+      new_coeff0_4 = coefficients0[dof][4];
+      new_coeff0_5 = coefficients0[dof][5];
+      new_coeff0_6 = coefficients0[dof][6];
+      new_coeff0_7 = coefficients0[dof][7];
+      new_coeff0_8 = coefficients0[dof][8];
+      new_coeff0_9 = coefficients0[dof][9];
     
       // Loop derivative order
       for (unsigned int j = 0; j < n; j++)
@@ -4477,32 +5593,56 @@ void UFC_SolitaryWave3DBilinearForm_fini
         coeff0_1 = new_coeff0_1;
         coeff0_2 = new_coeff0_2;
         coeff0_3 = new_coeff0_3;
+        coeff0_4 = new_coeff0_4;
+        coeff0_5 = new_coeff0_5;
+        coeff0_6 = new_coeff0_6;
+        coeff0_7 = new_coeff0_7;
+        coeff0_8 = new_coeff0_8;
+        coeff0_9 = new_coeff0_9;
     
         if(combinations[deriv_num][j] == 0)
         {
-          new_coeff0_0 = coeff0_0*dmats0[0][0] + coeff0_1*dmats0[1][0] + coeff0_2*dmats0[2][0] + coeff0_3*dmats0[3][0];
-          new_coeff0_1 = coeff0_0*dmats0[0][1] + coeff0_1*dmats0[1][1] + coeff0_2*dmats0[2][1] + coeff0_3*dmats0[3][1];
-          new_coeff0_2 = coeff0_0*dmats0[0][2] + coeff0_1*dmats0[1][2] + coeff0_2*dmats0[2][2] + coeff0_3*dmats0[3][2];
-          new_coeff0_3 = coeff0_0*dmats0[0][3] + coeff0_1*dmats0[1][3] + coeff0_2*dmats0[2][3] + coeff0_3*dmats0[3][3];
+          new_coeff0_0 = coeff0_0*dmats0[0][0] + coeff0_1*dmats0[1][0] + coeff0_2*dmats0[2][0] + coeff0_3*dmats0[3][0] + coeff0_4*dmats0[4][0] + coeff0_5*dmats0[5][0] + coeff0_6*dmats0[6][0] + coeff0_7*dmats0[7][0] + coeff0_8*dmats0[8][0] + coeff0_9*dmats0[9][0];
+          new_coeff0_1 = coeff0_0*dmats0[0][1] + coeff0_1*dmats0[1][1] + coeff0_2*dmats0[2][1] + coeff0_3*dmats0[3][1] + coeff0_4*dmats0[4][1] + coeff0_5*dmats0[5][1] + coeff0_6*dmats0[6][1] + coeff0_7*dmats0[7][1] + coeff0_8*dmats0[8][1] + coeff0_9*dmats0[9][1];
+          new_coeff0_2 = coeff0_0*dmats0[0][2] + coeff0_1*dmats0[1][2] + coeff0_2*dmats0[2][2] + coeff0_3*dmats0[3][2] + coeff0_4*dmats0[4][2] + coeff0_5*dmats0[5][2] + coeff0_6*dmats0[6][2] + coeff0_7*dmats0[7][2] + coeff0_8*dmats0[8][2] + coeff0_9*dmats0[9][2];
+          new_coeff0_3 = coeff0_0*dmats0[0][3] + coeff0_1*dmats0[1][3] + coeff0_2*dmats0[2][3] + coeff0_3*dmats0[3][3] + coeff0_4*dmats0[4][3] + coeff0_5*dmats0[5][3] + coeff0_6*dmats0[6][3] + coeff0_7*dmats0[7][3] + coeff0_8*dmats0[8][3] + coeff0_9*dmats0[9][3];
+          new_coeff0_4 = coeff0_0*dmats0[0][4] + coeff0_1*dmats0[1][4] + coeff0_2*dmats0[2][4] + coeff0_3*dmats0[3][4] + coeff0_4*dmats0[4][4] + coeff0_5*dmats0[5][4] + coeff0_6*dmats0[6][4] + coeff0_7*dmats0[7][4] + coeff0_8*dmats0[8][4] + coeff0_9*dmats0[9][4];
+          new_coeff0_5 = coeff0_0*dmats0[0][5] + coeff0_1*dmats0[1][5] + coeff0_2*dmats0[2][5] + coeff0_3*dmats0[3][5] + coeff0_4*dmats0[4][5] + coeff0_5*dmats0[5][5] + coeff0_6*dmats0[6][5] + coeff0_7*dmats0[7][5] + coeff0_8*dmats0[8][5] + coeff0_9*dmats0[9][5];
+          new_coeff0_6 = coeff0_0*dmats0[0][6] + coeff0_1*dmats0[1][6] + coeff0_2*dmats0[2][6] + coeff0_3*dmats0[3][6] + coeff0_4*dmats0[4][6] + coeff0_5*dmats0[5][6] + coeff0_6*dmats0[6][6] + coeff0_7*dmats0[7][6] + coeff0_8*dmats0[8][6] + coeff0_9*dmats0[9][6];
+          new_coeff0_7 = coeff0_0*dmats0[0][7] + coeff0_1*dmats0[1][7] + coeff0_2*dmats0[2][7] + coeff0_3*dmats0[3][7] + coeff0_4*dmats0[4][7] + coeff0_5*dmats0[5][7] + coeff0_6*dmats0[6][7] + coeff0_7*dmats0[7][7] + coeff0_8*dmats0[8][7] + coeff0_9*dmats0[9][7];
+          new_coeff0_8 = coeff0_0*dmats0[0][8] + coeff0_1*dmats0[1][8] + coeff0_2*dmats0[2][8] + coeff0_3*dmats0[3][8] + coeff0_4*dmats0[4][8] + coeff0_5*dmats0[5][8] + coeff0_6*dmats0[6][8] + coeff0_7*dmats0[7][8] + coeff0_8*dmats0[8][8] + coeff0_9*dmats0[9][8];
+          new_coeff0_9 = coeff0_0*dmats0[0][9] + coeff0_1*dmats0[1][9] + coeff0_2*dmats0[2][9] + coeff0_3*dmats0[3][9] + coeff0_4*dmats0[4][9] + coeff0_5*dmats0[5][9] + coeff0_6*dmats0[6][9] + coeff0_7*dmats0[7][9] + coeff0_8*dmats0[8][9] + coeff0_9*dmats0[9][9];
         }
         if(combinations[deriv_num][j] == 1)
         {
-          new_coeff0_0 = coeff0_0*dmats1[0][0] + coeff0_1*dmats1[1][0] + coeff0_2*dmats1[2][0] + coeff0_3*dmats1[3][0];
-          new_coeff0_1 = coeff0_0*dmats1[0][1] + coeff0_1*dmats1[1][1] + coeff0_2*dmats1[2][1] + coeff0_3*dmats1[3][1];
-          new_coeff0_2 = coeff0_0*dmats1[0][2] + coeff0_1*dmats1[1][2] + coeff0_2*dmats1[2][2] + coeff0_3*dmats1[3][2];
-          new_coeff0_3 = coeff0_0*dmats1[0][3] + coeff0_1*dmats1[1][3] + coeff0_2*dmats1[2][3] + coeff0_3*dmats1[3][3];
+          new_coeff0_0 = coeff0_0*dmats1[0][0] + coeff0_1*dmats1[1][0] + coeff0_2*dmats1[2][0] + coeff0_3*dmats1[3][0] + coeff0_4*dmats1[4][0] + coeff0_5*dmats1[5][0] + coeff0_6*dmats1[6][0] + coeff0_7*dmats1[7][0] + coeff0_8*dmats1[8][0] + coeff0_9*dmats1[9][0];
+          new_coeff0_1 = coeff0_0*dmats1[0][1] + coeff0_1*dmats1[1][1] + coeff0_2*dmats1[2][1] + coeff0_3*dmats1[3][1] + coeff0_4*dmats1[4][1] + coeff0_5*dmats1[5][1] + coeff0_6*dmats1[6][1] + coeff0_7*dmats1[7][1] + coeff0_8*dmats1[8][1] + coeff0_9*dmats1[9][1];
+          new_coeff0_2 = coeff0_0*dmats1[0][2] + coeff0_1*dmats1[1][2] + coeff0_2*dmats1[2][2] + coeff0_3*dmats1[3][2] + coeff0_4*dmats1[4][2] + coeff0_5*dmats1[5][2] + coeff0_6*dmats1[6][2] + coeff0_7*dmats1[7][2] + coeff0_8*dmats1[8][2] + coeff0_9*dmats1[9][2];
+          new_coeff0_3 = coeff0_0*dmats1[0][3] + coeff0_1*dmats1[1][3] + coeff0_2*dmats1[2][3] + coeff0_3*dmats1[3][3] + coeff0_4*dmats1[4][3] + coeff0_5*dmats1[5][3] + coeff0_6*dmats1[6][3] + coeff0_7*dmats1[7][3] + coeff0_8*dmats1[8][3] + coeff0_9*dmats1[9][3];
+          new_coeff0_4 = coeff0_0*dmats1[0][4] + coeff0_1*dmats1[1][4] + coeff0_2*dmats1[2][4] + coeff0_3*dmats1[3][4] + coeff0_4*dmats1[4][4] + coeff0_5*dmats1[5][4] + coeff0_6*dmats1[6][4] + coeff0_7*dmats1[7][4] + coeff0_8*dmats1[8][4] + coeff0_9*dmats1[9][4];
+          new_coeff0_5 = coeff0_0*dmats1[0][5] + coeff0_1*dmats1[1][5] + coeff0_2*dmats1[2][5] + coeff0_3*dmats1[3][5] + coeff0_4*dmats1[4][5] + coeff0_5*dmats1[5][5] + coeff0_6*dmats1[6][5] + coeff0_7*dmats1[7][5] + coeff0_8*dmats1[8][5] + coeff0_9*dmats1[9][5];
+          new_coeff0_6 = coeff0_0*dmats1[0][6] + coeff0_1*dmats1[1][6] + coeff0_2*dmats1[2][6] + coeff0_3*dmats1[3][6] + coeff0_4*dmats1[4][6] + coeff0_5*dmats1[5][6] + coeff0_6*dmats1[6][6] + coeff0_7*dmats1[7][6] + coeff0_8*dmats1[8][6] + coeff0_9*dmats1[9][6];
+          new_coeff0_7 = coeff0_0*dmats1[0][7] + coeff0_1*dmats1[1][7] + coeff0_2*dmats1[2][7] + coeff0_3*dmats1[3][7] + coeff0_4*dmats1[4][7] + coeff0_5*dmats1[5][7] + coeff0_6*dmats1[6][7] + coeff0_7*dmats1[7][7] + coeff0_8*dmats1[8][7] + coeff0_9*dmats1[9][7];
+          new_coeff0_8 = coeff0_0*dmats1[0][8] + coeff0_1*dmats1[1][8] + coeff0_2*dmats1[2][8] + coeff0_3*dmats1[3][8] + coeff0_4*dmats1[4][8] + coeff0_5*dmats1[5][8] + coeff0_6*dmats1[6][8] + coeff0_7*dmats1[7][8] + coeff0_8*dmats1[8][8] + coeff0_9*dmats1[9][8];
+          new_coeff0_9 = coeff0_0*dmats1[0][9] + coeff0_1*dmats1[1][9] + coeff0_2*dmats1[2][9] + coeff0_3*dmats1[3][9] + coeff0_4*dmats1[4][9] + coeff0_5*dmats1[5][9] + coeff0_6*dmats1[6][9] + coeff0_7*dmats1[7][9] + coeff0_8*dmats1[8][9] + coeff0_9*dmats1[9][9];
         }
         if(combinations[deriv_num][j] == 2)
         {
-          new_coeff0_0 = coeff0_0*dmats2[0][0] + coeff0_1*dmats2[1][0] + coeff0_2*dmats2[2][0] + coeff0_3*dmats2[3][0];
-          new_coeff0_1 = coeff0_0*dmats2[0][1] + coeff0_1*dmats2[1][1] + coeff0_2*dmats2[2][1] + coeff0_3*dmats2[3][1];
-          new_coeff0_2 = coeff0_0*dmats2[0][2] + coeff0_1*dmats2[1][2] + coeff0_2*dmats2[2][2] + coeff0_3*dmats2[3][2];
-          new_coeff0_3 = coeff0_0*dmats2[0][3] + coeff0_1*dmats2[1][3] + coeff0_2*dmats2[2][3] + coeff0_3*dmats2[3][3];
+          new_coeff0_0 = coeff0_0*dmats2[0][0] + coeff0_1*dmats2[1][0] + coeff0_2*dmats2[2][0] + coeff0_3*dmats2[3][0] + coeff0_4*dmats2[4][0] + coeff0_5*dmats2[5][0] + coeff0_6*dmats2[6][0] + coeff0_7*dmats2[7][0] + coeff0_8*dmats2[8][0] + coeff0_9*dmats2[9][0];
+          new_coeff0_1 = coeff0_0*dmats2[0][1] + coeff0_1*dmats2[1][1] + coeff0_2*dmats2[2][1] + coeff0_3*dmats2[3][1] + coeff0_4*dmats2[4][1] + coeff0_5*dmats2[5][1] + coeff0_6*dmats2[6][1] + coeff0_7*dmats2[7][1] + coeff0_8*dmats2[8][1] + coeff0_9*dmats2[9][1];
+          new_coeff0_2 = coeff0_0*dmats2[0][2] + coeff0_1*dmats2[1][2] + coeff0_2*dmats2[2][2] + coeff0_3*dmats2[3][2] + coeff0_4*dmats2[4][2] + coeff0_5*dmats2[5][2] + coeff0_6*dmats2[6][2] + coeff0_7*dmats2[7][2] + coeff0_8*dmats2[8][2] + coeff0_9*dmats2[9][2];
+          new_coeff0_3 = coeff0_0*dmats2[0][3] + coeff0_1*dmats2[1][3] + coeff0_2*dmats2[2][3] + coeff0_3*dmats2[3][3] + coeff0_4*dmats2[4][3] + coeff0_5*dmats2[5][3] + coeff0_6*dmats2[6][3] + coeff0_7*dmats2[7][3] + coeff0_8*dmats2[8][3] + coeff0_9*dmats2[9][3];
+          new_coeff0_4 = coeff0_0*dmats2[0][4] + coeff0_1*dmats2[1][4] + coeff0_2*dmats2[2][4] + coeff0_3*dmats2[3][4] + coeff0_4*dmats2[4][4] + coeff0_5*dmats2[5][4] + coeff0_6*dmats2[6][4] + coeff0_7*dmats2[7][4] + coeff0_8*dmats2[8][4] + coeff0_9*dmats2[9][4];
+          new_coeff0_5 = coeff0_0*dmats2[0][5] + coeff0_1*dmats2[1][5] + coeff0_2*dmats2[2][5] + coeff0_3*dmats2[3][5] + coeff0_4*dmats2[4][5] + coeff0_5*dmats2[5][5] + coeff0_6*dmats2[6][5] + coeff0_7*dmats2[7][5] + coeff0_8*dmats2[8][5] + coeff0_9*dmats2[9][5];
+          new_coeff0_6 = coeff0_0*dmats2[0][6] + coeff0_1*dmats2[1][6] + coeff0_2*dmats2[2][6] + coeff0_3*dmats2[3][6] + coeff0_4*dmats2[4][6] + coeff0_5*dmats2[5][6] + coeff0_6*dmats2[6][6] + coeff0_7*dmats2[7][6] + coeff0_8*dmats2[8][6] + coeff0_9*dmats2[9][6];
+          new_coeff0_7 = coeff0_0*dmats2[0][7] + coeff0_1*dmats2[1][7] + coeff0_2*dmats2[2][7] + coeff0_3*dmats2[3][7] + coeff0_4*dmats2[4][7] + coeff0_5*dmats2[5][7] + coeff0_6*dmats2[6][7] + coeff0_7*dmats2[7][7] + coeff0_8*dmats2[8][7] + coeff0_9*dmats2[9][7];
+          new_coeff0_8 = coeff0_0*dmats2[0][8] + coeff0_1*dmats2[1][8] + coeff0_2*dmats2[2][8] + coeff0_3*dmats2[3][8] + coeff0_4*dmats2[4][8] + coeff0_5*dmats2[5][8] + coeff0_6*dmats2[6][8] + coeff0_7*dmats2[7][8] + coeff0_8*dmats2[8][8] + coeff0_9*dmats2[9][8];
+          new_coeff0_9 = coeff0_0*dmats2[0][9] + coeff0_1*dmats2[1][9] + coeff0_2*dmats2[2][9] + coeff0_3*dmats2[3][9] + coeff0_4*dmats2[4][9] + coeff0_5*dmats2[5][9] + coeff0_6*dmats2[6][9] + coeff0_7*dmats2[7][9] + coeff0_8*dmats2[8][9] + coeff0_9*dmats2[9][9];
         }
     
       }
       // Compute derivatives on reference element as dot product of coefficients and basisvalues
-      derivatives[deriv_num] = new_coeff0_0*basisvalue0 + new_coeff0_1*basisvalue1 + new_coeff0_2*basisvalue2 + new_coeff0_3*basisvalue3;
+      derivatives[deriv_num] = new_coeff0_0*basisvalue0 + new_coeff0_1*basisvalue1 + new_coeff0_2*basisvalue2 + new_coeff0_3*basisvalue3 + new_coeff0_4*basisvalue4 + new_coeff0_5*basisvalue5 + new_coeff0_6*basisvalue6 + new_coeff0_7*basisvalue7 + new_coeff0_8*basisvalue8 + new_coeff0_9*basisvalue9;
     }
     
     // Transform derivatives back to physical element
@@ -4542,9 +5682,9 @@ double UFC_SolitaryWave3DBilinearForm_fi
                                    const ufc::cell& c) const
 {
     // The reference points, direction and weights:
-    const static double X[4][1][3] = {{{0, 0, 0}}, {{1, 0, 0}}, {{0, 1, 0}}, {{0, 0, 1}}};
-    const static double W[4][1] = {{1}, {1}, {1}, {1}};
-    const static double D[4][1][1] = {{{1}}, {{1}}, {{1}}, {{1}}};
+    const static double X[10][1][3] = {{{0, 0, 0}}, {{1, 0, 0}}, {{0, 1, 0}}, {{0, 0, 1}}, {{0, 0.5, 0.5}}, {{0.5, 0, 0.5}}, {{0.5, 0.5, 0}}, {{0, 0, 0.5}}, {{0, 0.5, 0}}, {{0.5, 0, 0}}};
+    const static double W[10][1] = {{1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}};
+    const static double D[10][1][1] = {{{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}};
     
     const double * const * x = c.coordinates;
     double result = 0.0;
@@ -4627,7 +5767,7 @@ UFC_SolitaryWave3DBilinearForm_finite_el
 /// Return a string identifying the finite element
 const char* UFC_SolitaryWave3DBilinearForm_finite_element_2::signature() const
 {
-    return "MixedElement([FiniteElement('Lagrange', 'tetrahedron', 1), FiniteElement('Lagrange', 'tetrahedron', 1)])";
+    return "MixedElement([FiniteElement('Lagrange', 'tetrahedron', 2), FiniteElement('Lagrange', 'tetrahedron', 2)])";
 }
 
 /// Return the cell shape
@@ -4639,7 +5779,7 @@ ufc::shape UFC_SolitaryWave3DBilinearFor
 /// Return the dimension of the finite element function space
 unsigned int UFC_SolitaryWave3DBilinearForm_finite_element_2::space_dimension() const
 {
-    return 8;
+    return 20;
 }
 
 /// Return the rank of the value space
@@ -4725,7 +5865,7 @@ void UFC_SolitaryWave3DBilinearForm_fini
     values[0] = 0;
     values[1] = 0;
     
-    if (0 <= i && i <= 3)
+    if (0 <= i && i <= 9)
     {
       // Map degree of freedom to element degree of freedom
       const unsigned int dof = i;
@@ -4733,94 +5873,154 @@ void UFC_SolitaryWave3DBilinearForm_fini
       // Generate scalings
       const double scalings_y_0 = 1;
       const double scalings_y_1 = scalings_y_0*(0.5 - 0.5*y);
+      const double scalings_y_2 = scalings_y_1*(0.5 - 0.5*y);
       const double scalings_z_0 = 1;
       const double scalings_z_1 = scalings_z_0*(0.5 - 0.5*z);
+      const double scalings_z_2 = scalings_z_1*(0.5 - 0.5*z);
     
       // Compute psitilde_a
       const double psitilde_a_0 = 1;
       const double psitilde_a_1 = x;
+      const double psitilde_a_2 = 1.5*x*psitilde_a_1 - 0.5*psitilde_a_0;
     
       // Compute psitilde_bs
       const double psitilde_bs_0_0 = 1;
       const double psitilde_bs_0_1 = 1.5*y + 0.5;
+      const double psitilde_bs_0_2 = 0.111111111111111*psitilde_bs_0_1 + 1.66666666666667*y*psitilde_bs_0_1 - 0.555555555555556*psitilde_bs_0_0;
       const double psitilde_bs_1_0 = 1;
+      const double psitilde_bs_1_1 = 2.5*y + 1.5;
+      const double psitilde_bs_2_0 = 1;
     
       // Compute psitilde_cs
       const double psitilde_cs_00_0 = 1;
       const double psitilde_cs_00_1 = 2*z + 1;
+      const double psitilde_cs_00_2 = 0.3125*psitilde_cs_00_1 + 1.875*z*psitilde_cs_00_1 - 0.5625*psitilde_cs_00_0;
       const double psitilde_cs_01_0 = 1;
+      const double psitilde_cs_01_1 = 3*z + 2;
+      const double psitilde_cs_02_0 = 1;
       const double psitilde_cs_10_0 = 1;
+      const double psitilde_cs_10_1 = 3*z + 2;
+      const double psitilde_cs_11_0 = 1;
+      const double psitilde_cs_20_0 = 1;
     
       // Compute basisvalues
       const double basisvalue0 = 0.866025403784439*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_0;
       const double basisvalue1 = 2.73861278752583*psitilde_a_1*scalings_y_1*psitilde_bs_1_0*scalings_z_1*psitilde_cs_10_0;
       const double basisvalue2 = 1.58113883008419*psitilde_a_0*scalings_y_0*psitilde_bs_0_1*scalings_z_1*psitilde_cs_01_0;
       const double basisvalue3 = 1.11803398874989*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_1;
-    
-      // Table(s) of coefficients
-      const static double coefficients0[4][4] =   \
-      {{0.288675134594813, -0.182574185835055, -0.105409255338946, -0.074535599249993},
-      {0.288675134594813, 0.182574185835055, -0.105409255338946, -0.074535599249993},
-      {0.288675134594813, 0, 0.210818510677892, -0.074535599249993},
-      {0.288675134594813, 0, 0, 0.223606797749979}};
+      const double basisvalue4 = 5.1234753829798*psitilde_a_2*scalings_y_2*psitilde_bs_2_0*scalings_z_2*psitilde_cs_20_0;
+      const double basisvalue5 = 3.96862696659689*psitilde_a_1*scalings_y_1*psitilde_bs_1_1*scalings_z_2*psitilde_cs_11_0;
+      const double basisvalue6 = 2.29128784747792*psitilde_a_0*scalings_y_0*psitilde_bs_0_2*scalings_z_2*psitilde_cs_02_0;
+      const double basisvalue7 = 3.24037034920393*psitilde_a_1*scalings_y_1*psitilde_bs_1_0*scalings_z_1*psitilde_cs_10_1;
+      const double basisvalue8 = 1.87082869338697*psitilde_a_0*scalings_y_0*psitilde_bs_0_1*scalings_z_1*psitilde_cs_01_1;
+      const double basisvalue9 = 1.3228756555323*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_2;
+    
+      // Table(s) of coefficients
+      const static double coefficients0[10][10] =   \
+      {{-0.0577350269189626, -0.0608580619450185, -0.0351364184463153, -0.0248451997499977, 0.0650600048632355, 0.0503952630678969, 0.0290957186981323, 0.0411475599898912, 0.0237565548366599, 0.0167984210226323},
+      {-0.0577350269189625, 0.0608580619450185, -0.0351364184463153, -0.0248451997499977, 0.0650600048632355, -0.050395263067897, 0.0290957186981323, -0.0411475599898912, 0.0237565548366599, 0.0167984210226323},
+      {-0.0577350269189625, 0, 0.0702728368926306, -0.0248451997499977, 0, 0, 0.0872871560943969, 0, -0.0475131096733199, 0.0167984210226323},
+      {-0.0577350269189626, 0, 0, 0.074535599249993, 0, 0, 0, 0, 0, 0.100790526135794},
+      {0.23094010767585, 0, 0.140545673785261, 0.0993807989999906, 0, 0, 0, 0, 0.1187827741833, -0.0671936840905293},
+      {0.230940107675851, 0.121716123890037, -0.0702728368926306, 0.0993807989999907, 0, 0, 0, 0.102868899974728, -0.0593913870916499, -0.0671936840905293},
+      {0.23094010767585, 0.121716123890037, 0.0702728368926307, -0.0993807989999907, 0, 0.100790526135794, -0.087287156094397, -0.0205737799949456, -0.01187827741833, 0.0167984210226323},
+      {0.23094010767585, -0.121716123890037, -0.0702728368926307, 0.0993807989999906, 0, 0, 0, -0.102868899974728, -0.0593913870916499, -0.0671936840905293},
+      {0.23094010767585, -0.121716123890037, 0.0702728368926306, -0.0993807989999906, 0, -0.100790526135794, -0.0872871560943969, 0.0205737799949456, -0.01187827741833, 0.0167984210226323},
+      {0.23094010767585, 0, -0.140545673785261, -0.0993807989999906, -0.130120009726471, 0, 0.0290957186981323, 0, 0.02375655483666, 0.0167984210226323}};
     
       // Extract relevant coefficients
       const double coeff0_0 =   coefficients0[dof][0];
       const double coeff0_1 =   coefficients0[dof][1];
       const double coeff0_2 =   coefficients0[dof][2];
       const double coeff0_3 =   coefficients0[dof][3];
+      const double coeff0_4 =   coefficients0[dof][4];
+      const double coeff0_5 =   coefficients0[dof][5];
+      const double coeff0_6 =   coefficients0[dof][6];
+      const double coeff0_7 =   coefficients0[dof][7];
+      const double coeff0_8 =   coefficients0[dof][8];
+      const double coeff0_9 =   coefficients0[dof][9];
     
       // Compute value(s)
-      values[0] = coeff0_0*basisvalue0 + coeff0_1*basisvalue1 + coeff0_2*basisvalue2 + coeff0_3*basisvalue3;
-    }
-    
-    if (4 <= i && i <= 7)
-    {
-      // Map degree of freedom to element degree of freedom
-      const unsigned int dof = i - 4;
+      values[0] = coeff0_0*basisvalue0 + coeff0_1*basisvalue1 + coeff0_2*basisvalue2 + coeff0_3*basisvalue3 + coeff0_4*basisvalue4 + coeff0_5*basisvalue5 + coeff0_6*basisvalue6 + coeff0_7*basisvalue7 + coeff0_8*basisvalue8 + coeff0_9*basisvalue9;
+    }
+    
+    if (10 <= i && i <= 19)
+    {
+      // Map degree of freedom to element degree of freedom
+      const unsigned int dof = i - 10;
     
       // Generate scalings
       const double scalings_y_0 = 1;
       const double scalings_y_1 = scalings_y_0*(0.5 - 0.5*y);
+      const double scalings_y_2 = scalings_y_1*(0.5 - 0.5*y);
       const double scalings_z_0 = 1;
       const double scalings_z_1 = scalings_z_0*(0.5 - 0.5*z);
+      const double scalings_z_2 = scalings_z_1*(0.5 - 0.5*z);
     
       // Compute psitilde_a
       const double psitilde_a_0 = 1;
       const double psitilde_a_1 = x;
+      const double psitilde_a_2 = 1.5*x*psitilde_a_1 - 0.5*psitilde_a_0;
     
       // Compute psitilde_bs
       const double psitilde_bs_0_0 = 1;
       const double psitilde_bs_0_1 = 1.5*y + 0.5;
+      const double psitilde_bs_0_2 = 0.111111111111111*psitilde_bs_0_1 + 1.66666666666667*y*psitilde_bs_0_1 - 0.555555555555556*psitilde_bs_0_0;
       const double psitilde_bs_1_0 = 1;
+      const double psitilde_bs_1_1 = 2.5*y + 1.5;
+      const double psitilde_bs_2_0 = 1;
     
       // Compute psitilde_cs
       const double psitilde_cs_00_0 = 1;
       const double psitilde_cs_00_1 = 2*z + 1;
+      const double psitilde_cs_00_2 = 0.3125*psitilde_cs_00_1 + 1.875*z*psitilde_cs_00_1 - 0.5625*psitilde_cs_00_0;
       const double psitilde_cs_01_0 = 1;
+      const double psitilde_cs_01_1 = 3*z + 2;
+      const double psitilde_cs_02_0 = 1;
       const double psitilde_cs_10_0 = 1;
+      const double psitilde_cs_10_1 = 3*z + 2;
+      const double psitilde_cs_11_0 = 1;
+      const double psitilde_cs_20_0 = 1;
     
       // Compute basisvalues
       const double basisvalue0 = 0.866025403784439*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_0;
       const double basisvalue1 = 2.73861278752583*psitilde_a_1*scalings_y_1*psitilde_bs_1_0*scalings_z_1*psitilde_cs_10_0;
       const double basisvalue2 = 1.58113883008419*psitilde_a_0*scalings_y_0*psitilde_bs_0_1*scalings_z_1*psitilde_cs_01_0;
       const double basisvalue3 = 1.11803398874989*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_1;
-    
-      // Table(s) of coefficients
-      const static double coefficients0[4][4] =   \
-      {{0.288675134594813, -0.182574185835055, -0.105409255338946, -0.074535599249993},
-      {0.288675134594813, 0.182574185835055, -0.105409255338946, -0.074535599249993},
-      {0.288675134594813, 0, 0.210818510677892, -0.074535599249993},
-      {0.288675134594813, 0, 0, 0.223606797749979}};
+      const double basisvalue4 = 5.1234753829798*psitilde_a_2*scalings_y_2*psitilde_bs_2_0*scalings_z_2*psitilde_cs_20_0;
+      const double basisvalue5 = 3.96862696659689*psitilde_a_1*scalings_y_1*psitilde_bs_1_1*scalings_z_2*psitilde_cs_11_0;
+      const double basisvalue6 = 2.29128784747792*psitilde_a_0*scalings_y_0*psitilde_bs_0_2*scalings_z_2*psitilde_cs_02_0;
+      const double basisvalue7 = 3.24037034920393*psitilde_a_1*scalings_y_1*psitilde_bs_1_0*scalings_z_1*psitilde_cs_10_1;
+      const double basisvalue8 = 1.87082869338697*psitilde_a_0*scalings_y_0*psitilde_bs_0_1*scalings_z_1*psitilde_cs_01_1;
+      const double basisvalue9 = 1.3228756555323*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_2;
+    
+      // Table(s) of coefficients
+      const static double coefficients0[10][10] =   \
+      {{-0.0577350269189626, -0.0608580619450185, -0.0351364184463153, -0.0248451997499977, 0.0650600048632355, 0.0503952630678969, 0.0290957186981323, 0.0411475599898912, 0.0237565548366599, 0.0167984210226323},
+      {-0.0577350269189625, 0.0608580619450185, -0.0351364184463153, -0.0248451997499977, 0.0650600048632355, -0.050395263067897, 0.0290957186981323, -0.0411475599898912, 0.0237565548366599, 0.0167984210226323},
+      {-0.0577350269189625, 0, 0.0702728368926306, -0.0248451997499977, 0, 0, 0.0872871560943969, 0, -0.0475131096733199, 0.0167984210226323},
+      {-0.0577350269189626, 0, 0, 0.074535599249993, 0, 0, 0, 0, 0, 0.100790526135794},
+      {0.23094010767585, 0, 0.140545673785261, 0.0993807989999906, 0, 0, 0, 0, 0.1187827741833, -0.0671936840905293},
+      {0.230940107675851, 0.121716123890037, -0.0702728368926306, 0.0993807989999907, 0, 0, 0, 0.102868899974728, -0.0593913870916499, -0.0671936840905293},
+      {0.23094010767585, 0.121716123890037, 0.0702728368926307, -0.0993807989999907, 0, 0.100790526135794, -0.087287156094397, -0.0205737799949456, -0.01187827741833, 0.0167984210226323},
+      {0.23094010767585, -0.121716123890037, -0.0702728368926307, 0.0993807989999906, 0, 0, 0, -0.102868899974728, -0.0593913870916499, -0.0671936840905293},
+      {0.23094010767585, -0.121716123890037, 0.0702728368926306, -0.0993807989999906, 0, -0.100790526135794, -0.0872871560943969, 0.0205737799949456, -0.01187827741833, 0.0167984210226323},
+      {0.23094010767585, 0, -0.140545673785261, -0.0993807989999906, -0.130120009726471, 0, 0.0290957186981323, 0, 0.02375655483666, 0.0167984210226323}};
     
       // Extract relevant coefficients
       const double coeff0_0 =   coefficients0[dof][0];
       const double coeff0_1 =   coefficients0[dof][1];
       const double coeff0_2 =   coefficients0[dof][2];
       const double coeff0_3 =   coefficients0[dof][3];
+      const double coeff0_4 =   coefficients0[dof][4];
+      const double coeff0_5 =   coefficients0[dof][5];
+      const double coeff0_6 =   coefficients0[dof][6];
+      const double coeff0_7 =   coefficients0[dof][7];
+      const double coeff0_8 =   coefficients0[dof][8];
+      const double coeff0_9 =   coefficients0[dof][9];
     
       // Compute value(s)
-      values[1] = coeff0_0*basisvalue0 + coeff0_1*basisvalue1 + coeff0_2*basisvalue2 + coeff0_3*basisvalue3;
+      values[1] = coeff0_0*basisvalue0 + coeff0_1*basisvalue1 + coeff0_2*basisvalue2 + coeff0_3*basisvalue3 + coeff0_4*basisvalue4 + coeff0_5*basisvalue5 + coeff0_6*basisvalue6 + coeff0_7*basisvalue7 + coeff0_8*basisvalue8 + coeff0_9*basisvalue9;
     }
     
 }
@@ -4964,7 +6164,7 @@ void UFC_SolitaryWave3DBilinearForm_fini
     for (unsigned int j = 0; j < 2*num_derivatives; j++)
       values[j] = 0;
     
-    if (0 <= i && i <= 3)
+    if (0 <= i && i <= 9)
     {
       // Map degree of freedom to element degree of freedom
       const unsigned int dof = i;
@@ -4972,56 +6172,98 @@ void UFC_SolitaryWave3DBilinearForm_fini
       // Generate scalings
       const double scalings_y_0 = 1;
       const double scalings_y_1 = scalings_y_0*(0.5 - 0.5*y);
+      const double scalings_y_2 = scalings_y_1*(0.5 - 0.5*y);
       const double scalings_z_0 = 1;
       const double scalings_z_1 = scalings_z_0*(0.5 - 0.5*z);
+      const double scalings_z_2 = scalings_z_1*(0.5 - 0.5*z);
     
       // Compute psitilde_a
       const double psitilde_a_0 = 1;
       const double psitilde_a_1 = x;
+      const double psitilde_a_2 = 1.5*x*psitilde_a_1 - 0.5*psitilde_a_0;
     
       // Compute psitilde_bs
       const double psitilde_bs_0_0 = 1;
       const double psitilde_bs_0_1 = 1.5*y + 0.5;
+      const double psitilde_bs_0_2 = 0.111111111111111*psitilde_bs_0_1 + 1.66666666666667*y*psitilde_bs_0_1 - 0.555555555555556*psitilde_bs_0_0;
       const double psitilde_bs_1_0 = 1;
+      const double psitilde_bs_1_1 = 2.5*y + 1.5;
+      const double psitilde_bs_2_0 = 1;
     
       // Compute psitilde_cs
       const double psitilde_cs_00_0 = 1;
       const double psitilde_cs_00_1 = 2*z + 1;
+      const double psitilde_cs_00_2 = 0.3125*psitilde_cs_00_1 + 1.875*z*psitilde_cs_00_1 - 0.5625*psitilde_cs_00_0;
       const double psitilde_cs_01_0 = 1;
+      const double psitilde_cs_01_1 = 3*z + 2;
+      const double psitilde_cs_02_0 = 1;
       const double psitilde_cs_10_0 = 1;
+      const double psitilde_cs_10_1 = 3*z + 2;
+      const double psitilde_cs_11_0 = 1;
+      const double psitilde_cs_20_0 = 1;
     
       // Compute basisvalues
       const double basisvalue0 = 0.866025403784439*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_0;
       const double basisvalue1 = 2.73861278752583*psitilde_a_1*scalings_y_1*psitilde_bs_1_0*scalings_z_1*psitilde_cs_10_0;
       const double basisvalue2 = 1.58113883008419*psitilde_a_0*scalings_y_0*psitilde_bs_0_1*scalings_z_1*psitilde_cs_01_0;
       const double basisvalue3 = 1.11803398874989*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_1;
-    
-      // Table(s) of coefficients
-      const static double coefficients0[4][4] =   \
-      {{0.288675134594813, -0.182574185835055, -0.105409255338946, -0.074535599249993},
-      {0.288675134594813, 0.182574185835055, -0.105409255338946, -0.074535599249993},
-      {0.288675134594813, 0, 0.210818510677892, -0.074535599249993},
-      {0.288675134594813, 0, 0, 0.223606797749979}};
+      const double basisvalue4 = 5.1234753829798*psitilde_a_2*scalings_y_2*psitilde_bs_2_0*scalings_z_2*psitilde_cs_20_0;
+      const double basisvalue5 = 3.96862696659689*psitilde_a_1*scalings_y_1*psitilde_bs_1_1*scalings_z_2*psitilde_cs_11_0;
+      const double basisvalue6 = 2.29128784747792*psitilde_a_0*scalings_y_0*psitilde_bs_0_2*scalings_z_2*psitilde_cs_02_0;
+      const double basisvalue7 = 3.24037034920393*psitilde_a_1*scalings_y_1*psitilde_bs_1_0*scalings_z_1*psitilde_cs_10_1;
+      const double basisvalue8 = 1.87082869338697*psitilde_a_0*scalings_y_0*psitilde_bs_0_1*scalings_z_1*psitilde_cs_01_1;
+      const double basisvalue9 = 1.3228756555323*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_2;
+    
+      // Table(s) of coefficients
+      const static double coefficients0[10][10] =   \
+      {{-0.0577350269189626, -0.0608580619450185, -0.0351364184463153, -0.0248451997499977, 0.0650600048632355, 0.0503952630678969, 0.0290957186981323, 0.0411475599898912, 0.0237565548366599, 0.0167984210226323},
+      {-0.0577350269189625, 0.0608580619450185, -0.0351364184463153, -0.0248451997499977, 0.0650600048632355, -0.050395263067897, 0.0290957186981323, -0.0411475599898912, 0.0237565548366599, 0.0167984210226323},
+      {-0.0577350269189625, 0, 0.0702728368926306, -0.0248451997499977, 0, 0, 0.0872871560943969, 0, -0.0475131096733199, 0.0167984210226323},
+      {-0.0577350269189626, 0, 0, 0.074535599249993, 0, 0, 0, 0, 0, 0.100790526135794},
+      {0.23094010767585, 0, 0.140545673785261, 0.0993807989999906, 0, 0, 0, 0, 0.1187827741833, -0.0671936840905293},
+      {0.230940107675851, 0.121716123890037, -0.0702728368926306, 0.0993807989999907, 0, 0, 0, 0.102868899974728, -0.0593913870916499, -0.0671936840905293},
+      {0.23094010767585, 0.121716123890037, 0.0702728368926307, -0.0993807989999907, 0, 0.100790526135794, -0.087287156094397, -0.0205737799949456, -0.01187827741833, 0.0167984210226323},
+      {0.23094010767585, -0.121716123890037, -0.0702728368926307, 0.0993807989999906, 0, 0, 0, -0.102868899974728, -0.0593913870916499, -0.0671936840905293},
+      {0.23094010767585, -0.121716123890037, 0.0702728368926306, -0.0993807989999906, 0, -0.100790526135794, -0.0872871560943969, 0.0205737799949456, -0.01187827741833, 0.0167984210226323},
+      {0.23094010767585, 0, -0.140545673785261, -0.0993807989999906, -0.130120009726471, 0, 0.0290957186981323, 0, 0.02375655483666, 0.0167984210226323}};
     
       // Interesting (new) part
       // Tables of derivatives of the polynomial base (transpose)
-      const static double dmats0[4][4] =   \
-      {{0, 0, 0, 0},
-      {6.32455532033676, 0, 0, 0},
-      {0, 0, 0, 0},
-      {0, 0, 0, 0}};
-    
-      const static double dmats1[4][4] =   \
-      {{0, 0, 0, 0},
-      {3.16227766016838, 0, 0, 0},
-      {5.47722557505166, 0, 0, 0},
-      {0, 0, 0, 0}};
-    
-      const static double dmats2[4][4] =   \
-      {{0, 0, 0, 0},
-      {3.16227766016838, 0, 0, 0},
-      {1.82574185835055, 0, 0, 0},
-      {5.16397779494322, 0, 0, 0}};
+      const static double dmats0[10][10] =   \
+      {{0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {6.32455532033676, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {0, 11.2249721603218, 0, 0, 0, 0, 0, 0, 0, 0},
+      {4.58257569495584, 0, 8.36660026534076, -1.18321595661992, 0, 0, 0, 0, 0, 0},
+      {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {3.74165738677394, 0, 0, 8.69482604771366, 0, 0, 0, 0, 0, 0},
+      {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
+    
+      const static double dmats1[10][10] =   \
+      {{0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {3.16227766016838, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {5.47722557505166, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {2.95803989154981, 5.61248608016091, -1.08012344973464, -0.763762615825974, 0, 0, 0, 0, 0, 0},
+      {2.29128784747792, 7.24568837309472, 4.18330013267038, -0.591607978309962, 0, 0, 0, 0, 0, 0},
+      {-2.64575131106459, 0, 9.66091783079296, 0.683130051063974, 0, 0, 0, 0, 0, 0},
+      {1.87082869338697, 0, 0, 4.34741302385683, 0, 0, 0, 0, 0, 0},
+      {3.24037034920393, 0, 0, 7.52994023880668, 0, 0, 0, 0, 0, 0},
+      {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
+    
+      const static double dmats2[10][10] =   \
+      {{0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {3.16227766016838, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {1.82574185835055, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {5.16397779494322, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {2.95803989154981, 5.61248608016091, -1.08012344973464, -0.763762615825974, 0, 0, 0, 0, 0, 0},
+      {2.29128784747792, 1.44913767461894, 4.18330013267038, -0.591607978309962, 0, 0, 0, 0, 0, 0},
+      {1.32287565553229, 0, 3.86436713231718, -0.341565025531986, 0, 0, 0, 0, 0, 0},
+      {1.87082869338697, 7.09929573971954, 0, 4.34741302385683, 0, 0, 0, 0, 0, 0},
+      {1.08012344973464, 0, 7.09929573971954, 2.50998007960223, 0, 0, 0, 0, 0, 0},
+      {-3.81881307912987, 0, 0, 8.87411967464942, 0, 0, 0, 0, 0, 0}};
     
       // Compute reference derivatives
       // Declare pointer to array of derivatives on FIAT element
@@ -5032,12 +6274,24 @@ void UFC_SolitaryWave3DBilinearForm_fini
       double coeff0_1 = 0;
       double coeff0_2 = 0;
       double coeff0_3 = 0;
+      double coeff0_4 = 0;
+      double coeff0_5 = 0;
+      double coeff0_6 = 0;
+      double coeff0_7 = 0;
+      double coeff0_8 = 0;
+      double coeff0_9 = 0;
     
       // Declare new coefficients
       double new_coeff0_0 = 0;
       double new_coeff0_1 = 0;
       double new_coeff0_2 = 0;
       double new_coeff0_3 = 0;
+      double new_coeff0_4 = 0;
+      double new_coeff0_5 = 0;
+      double new_coeff0_6 = 0;
+      double new_coeff0_7 = 0;
+      double new_coeff0_8 = 0;
+      double new_coeff0_9 = 0;
     
       // Loop possible derivatives
       for (unsigned int deriv_num = 0; deriv_num < num_derivatives; deriv_num++)
@@ -5047,6 +6301,12 @@ void UFC_SolitaryWave3DBilinearForm_fini
         new_coeff0_1 = coefficients0[dof][1];
         new_coeff0_2 = coefficients0[dof][2];
         new_coeff0_3 = coefficients0[dof][3];
+        new_coeff0_4 = coefficients0[dof][4];
+        new_coeff0_5 = coefficients0[dof][5];
+        new_coeff0_6 = coefficients0[dof][6];
+        new_coeff0_7 = coefficients0[dof][7];
+        new_coeff0_8 = coefficients0[dof][8];
+        new_coeff0_9 = coefficients0[dof][9];
     
         // Loop derivative order
         for (unsigned int j = 0; j < n; j++)
@@ -5056,32 +6316,56 @@ void UFC_SolitaryWave3DBilinearForm_fini
           coeff0_1 = new_coeff0_1;
           coeff0_2 = new_coeff0_2;
           coeff0_3 = new_coeff0_3;
+          coeff0_4 = new_coeff0_4;
+          coeff0_5 = new_coeff0_5;
+          coeff0_6 = new_coeff0_6;
+          coeff0_7 = new_coeff0_7;
+          coeff0_8 = new_coeff0_8;
+          coeff0_9 = new_coeff0_9;
     
           if(combinations[deriv_num][j] == 0)
           {
-            new_coeff0_0 = coeff0_0*dmats0[0][0] + coeff0_1*dmats0[1][0] + coeff0_2*dmats0[2][0] + coeff0_3*dmats0[3][0];
-            new_coeff0_1 = coeff0_0*dmats0[0][1] + coeff0_1*dmats0[1][1] + coeff0_2*dmats0[2][1] + coeff0_3*dmats0[3][1];
-            new_coeff0_2 = coeff0_0*dmats0[0][2] + coeff0_1*dmats0[1][2] + coeff0_2*dmats0[2][2] + coeff0_3*dmats0[3][2];
-            new_coeff0_3 = coeff0_0*dmats0[0][3] + coeff0_1*dmats0[1][3] + coeff0_2*dmats0[2][3] + coeff0_3*dmats0[3][3];
+            new_coeff0_0 = coeff0_0*dmats0[0][0] + coeff0_1*dmats0[1][0] + coeff0_2*dmats0[2][0] + coeff0_3*dmats0[3][0] + coeff0_4*dmats0[4][0] + coeff0_5*dmats0[5][0] + coeff0_6*dmats0[6][0] + coeff0_7*dmats0[7][0] + coeff0_8*dmats0[8][0] + coeff0_9*dmats0[9][0];
+            new_coeff0_1 = coeff0_0*dmats0[0][1] + coeff0_1*dmats0[1][1] + coeff0_2*dmats0[2][1] + coeff0_3*dmats0[3][1] + coeff0_4*dmats0[4][1] + coeff0_5*dmats0[5][1] + coeff0_6*dmats0[6][1] + coeff0_7*dmats0[7][1] + coeff0_8*dmats0[8][1] + coeff0_9*dmats0[9][1];
+            new_coeff0_2 = coeff0_0*dmats0[0][2] + coeff0_1*dmats0[1][2] + coeff0_2*dmats0[2][2] + coeff0_3*dmats0[3][2] + coeff0_4*dmats0[4][2] + coeff0_5*dmats0[5][2] + coeff0_6*dmats0[6][2] + coeff0_7*dmats0[7][2] + coeff0_8*dmats0[8][2] + coeff0_9*dmats0[9][2];
+            new_coeff0_3 = coeff0_0*dmats0[0][3] + coeff0_1*dmats0[1][3] + coeff0_2*dmats0[2][3] + coeff0_3*dmats0[3][3] + coeff0_4*dmats0[4][3] + coeff0_5*dmats0[5][3] + coeff0_6*dmats0[6][3] + coeff0_7*dmats0[7][3] + coeff0_8*dmats0[8][3] + coeff0_9*dmats0[9][3];
+            new_coeff0_4 = coeff0_0*dmats0[0][4] + coeff0_1*dmats0[1][4] + coeff0_2*dmats0[2][4] + coeff0_3*dmats0[3][4] + coeff0_4*dmats0[4][4] + coeff0_5*dmats0[5][4] + coeff0_6*dmats0[6][4] + coeff0_7*dmats0[7][4] + coeff0_8*dmats0[8][4] + coeff0_9*dmats0[9][4];
+            new_coeff0_5 = coeff0_0*dmats0[0][5] + coeff0_1*dmats0[1][5] + coeff0_2*dmats0[2][5] + coeff0_3*dmats0[3][5] + coeff0_4*dmats0[4][5] + coeff0_5*dmats0[5][5] + coeff0_6*dmats0[6][5] + coeff0_7*dmats0[7][5] + coeff0_8*dmats0[8][5] + coeff0_9*dmats0[9][5];
+            new_coeff0_6 = coeff0_0*dmats0[0][6] + coeff0_1*dmats0[1][6] + coeff0_2*dmats0[2][6] + coeff0_3*dmats0[3][6] + coeff0_4*dmats0[4][6] + coeff0_5*dmats0[5][6] + coeff0_6*dmats0[6][6] + coeff0_7*dmats0[7][6] + coeff0_8*dmats0[8][6] + coeff0_9*dmats0[9][6];
+            new_coeff0_7 = coeff0_0*dmats0[0][7] + coeff0_1*dmats0[1][7] + coeff0_2*dmats0[2][7] + coeff0_3*dmats0[3][7] + coeff0_4*dmats0[4][7] + coeff0_5*dmats0[5][7] + coeff0_6*dmats0[6][7] + coeff0_7*dmats0[7][7] + coeff0_8*dmats0[8][7] + coeff0_9*dmats0[9][7];
+            new_coeff0_8 = coeff0_0*dmats0[0][8] + coeff0_1*dmats0[1][8] + coeff0_2*dmats0[2][8] + coeff0_3*dmats0[3][8] + coeff0_4*dmats0[4][8] + coeff0_5*dmats0[5][8] + coeff0_6*dmats0[6][8] + coeff0_7*dmats0[7][8] + coeff0_8*dmats0[8][8] + coeff0_9*dmats0[9][8];
+            new_coeff0_9 = coeff0_0*dmats0[0][9] + coeff0_1*dmats0[1][9] + coeff0_2*dmats0[2][9] + coeff0_3*dmats0[3][9] + coeff0_4*dmats0[4][9] + coeff0_5*dmats0[5][9] + coeff0_6*dmats0[6][9] + coeff0_7*dmats0[7][9] + coeff0_8*dmats0[8][9] + coeff0_9*dmats0[9][9];
           }
           if(combinations[deriv_num][j] == 1)
           {
-            new_coeff0_0 = coeff0_0*dmats1[0][0] + coeff0_1*dmats1[1][0] + coeff0_2*dmats1[2][0] + coeff0_3*dmats1[3][0];
-            new_coeff0_1 = coeff0_0*dmats1[0][1] + coeff0_1*dmats1[1][1] + coeff0_2*dmats1[2][1] + coeff0_3*dmats1[3][1];
-            new_coeff0_2 = coeff0_0*dmats1[0][2] + coeff0_1*dmats1[1][2] + coeff0_2*dmats1[2][2] + coeff0_3*dmats1[3][2];
-            new_coeff0_3 = coeff0_0*dmats1[0][3] + coeff0_1*dmats1[1][3] + coeff0_2*dmats1[2][3] + coeff0_3*dmats1[3][3];
+            new_coeff0_0 = coeff0_0*dmats1[0][0] + coeff0_1*dmats1[1][0] + coeff0_2*dmats1[2][0] + coeff0_3*dmats1[3][0] + coeff0_4*dmats1[4][0] + coeff0_5*dmats1[5][0] + coeff0_6*dmats1[6][0] + coeff0_7*dmats1[7][0] + coeff0_8*dmats1[8][0] + coeff0_9*dmats1[9][0];
+            new_coeff0_1 = coeff0_0*dmats1[0][1] + coeff0_1*dmats1[1][1] + coeff0_2*dmats1[2][1] + coeff0_3*dmats1[3][1] + coeff0_4*dmats1[4][1] + coeff0_5*dmats1[5][1] + coeff0_6*dmats1[6][1] + coeff0_7*dmats1[7][1] + coeff0_8*dmats1[8][1] + coeff0_9*dmats1[9][1];
+            new_coeff0_2 = coeff0_0*dmats1[0][2] + coeff0_1*dmats1[1][2] + coeff0_2*dmats1[2][2] + coeff0_3*dmats1[3][2] + coeff0_4*dmats1[4][2] + coeff0_5*dmats1[5][2] + coeff0_6*dmats1[6][2] + coeff0_7*dmats1[7][2] + coeff0_8*dmats1[8][2] + coeff0_9*dmats1[9][2];
+            new_coeff0_3 = coeff0_0*dmats1[0][3] + coeff0_1*dmats1[1][3] + coeff0_2*dmats1[2][3] + coeff0_3*dmats1[3][3] + coeff0_4*dmats1[4][3] + coeff0_5*dmats1[5][3] + coeff0_6*dmats1[6][3] + coeff0_7*dmats1[7][3] + coeff0_8*dmats1[8][3] + coeff0_9*dmats1[9][3];
+            new_coeff0_4 = coeff0_0*dmats1[0][4] + coeff0_1*dmats1[1][4] + coeff0_2*dmats1[2][4] + coeff0_3*dmats1[3][4] + coeff0_4*dmats1[4][4] + coeff0_5*dmats1[5][4] + coeff0_6*dmats1[6][4] + coeff0_7*dmats1[7][4] + coeff0_8*dmats1[8][4] + coeff0_9*dmats1[9][4];
+            new_coeff0_5 = coeff0_0*dmats1[0][5] + coeff0_1*dmats1[1][5] + coeff0_2*dmats1[2][5] + coeff0_3*dmats1[3][5] + coeff0_4*dmats1[4][5] + coeff0_5*dmats1[5][5] + coeff0_6*dmats1[6][5] + coeff0_7*dmats1[7][5] + coeff0_8*dmats1[8][5] + coeff0_9*dmats1[9][5];
+            new_coeff0_6 = coeff0_0*dmats1[0][6] + coeff0_1*dmats1[1][6] + coeff0_2*dmats1[2][6] + coeff0_3*dmats1[3][6] + coeff0_4*dmats1[4][6] + coeff0_5*dmats1[5][6] + coeff0_6*dmats1[6][6] + coeff0_7*dmats1[7][6] + coeff0_8*dmats1[8][6] + coeff0_9*dmats1[9][6];
+            new_coeff0_7 = coeff0_0*dmats1[0][7] + coeff0_1*dmats1[1][7] + coeff0_2*dmats1[2][7] + coeff0_3*dmats1[3][7] + coeff0_4*dmats1[4][7] + coeff0_5*dmats1[5][7] + coeff0_6*dmats1[6][7] + coeff0_7*dmats1[7][7] + coeff0_8*dmats1[8][7] + coeff0_9*dmats1[9][7];
+            new_coeff0_8 = coeff0_0*dmats1[0][8] + coeff0_1*dmats1[1][8] + coeff0_2*dmats1[2][8] + coeff0_3*dmats1[3][8] + coeff0_4*dmats1[4][8] + coeff0_5*dmats1[5][8] + coeff0_6*dmats1[6][8] + coeff0_7*dmats1[7][8] + coeff0_8*dmats1[8][8] + coeff0_9*dmats1[9][8];
+            new_coeff0_9 = coeff0_0*dmats1[0][9] + coeff0_1*dmats1[1][9] + coeff0_2*dmats1[2][9] + coeff0_3*dmats1[3][9] + coeff0_4*dmats1[4][9] + coeff0_5*dmats1[5][9] + coeff0_6*dmats1[6][9] + coeff0_7*dmats1[7][9] + coeff0_8*dmats1[8][9] + coeff0_9*dmats1[9][9];
           }
           if(combinations[deriv_num][j] == 2)
           {
-            new_coeff0_0 = coeff0_0*dmats2[0][0] + coeff0_1*dmats2[1][0] + coeff0_2*dmats2[2][0] + coeff0_3*dmats2[3][0];
-            new_coeff0_1 = coeff0_0*dmats2[0][1] + coeff0_1*dmats2[1][1] + coeff0_2*dmats2[2][1] + coeff0_3*dmats2[3][1];
-            new_coeff0_2 = coeff0_0*dmats2[0][2] + coeff0_1*dmats2[1][2] + coeff0_2*dmats2[2][2] + coeff0_3*dmats2[3][2];
-            new_coeff0_3 = coeff0_0*dmats2[0][3] + coeff0_1*dmats2[1][3] + coeff0_2*dmats2[2][3] + coeff0_3*dmats2[3][3];
+            new_coeff0_0 = coeff0_0*dmats2[0][0] + coeff0_1*dmats2[1][0] + coeff0_2*dmats2[2][0] + coeff0_3*dmats2[3][0] + coeff0_4*dmats2[4][0] + coeff0_5*dmats2[5][0] + coeff0_6*dmats2[6][0] + coeff0_7*dmats2[7][0] + coeff0_8*dmats2[8][0] + coeff0_9*dmats2[9][0];
+            new_coeff0_1 = coeff0_0*dmats2[0][1] + coeff0_1*dmats2[1][1] + coeff0_2*dmats2[2][1] + coeff0_3*dmats2[3][1] + coeff0_4*dmats2[4][1] + coeff0_5*dmats2[5][1] + coeff0_6*dmats2[6][1] + coeff0_7*dmats2[7][1] + coeff0_8*dmats2[8][1] + coeff0_9*dmats2[9][1];
+            new_coeff0_2 = coeff0_0*dmats2[0][2] + coeff0_1*dmats2[1][2] + coeff0_2*dmats2[2][2] + coeff0_3*dmats2[3][2] + coeff0_4*dmats2[4][2] + coeff0_5*dmats2[5][2] + coeff0_6*dmats2[6][2] + coeff0_7*dmats2[7][2] + coeff0_8*dmats2[8][2] + coeff0_9*dmats2[9][2];
+            new_coeff0_3 = coeff0_0*dmats2[0][3] + coeff0_1*dmats2[1][3] + coeff0_2*dmats2[2][3] + coeff0_3*dmats2[3][3] + coeff0_4*dmats2[4][3] + coeff0_5*dmats2[5][3] + coeff0_6*dmats2[6][3] + coeff0_7*dmats2[7][3] + coeff0_8*dmats2[8][3] + coeff0_9*dmats2[9][3];
+            new_coeff0_4 = coeff0_0*dmats2[0][4] + coeff0_1*dmats2[1][4] + coeff0_2*dmats2[2][4] + coeff0_3*dmats2[3][4] + coeff0_4*dmats2[4][4] + coeff0_5*dmats2[5][4] + coeff0_6*dmats2[6][4] + coeff0_7*dmats2[7][4] + coeff0_8*dmats2[8][4] + coeff0_9*dmats2[9][4];
+            new_coeff0_5 = coeff0_0*dmats2[0][5] + coeff0_1*dmats2[1][5] + coeff0_2*dmats2[2][5] + coeff0_3*dmats2[3][5] + coeff0_4*dmats2[4][5] + coeff0_5*dmats2[5][5] + coeff0_6*dmats2[6][5] + coeff0_7*dmats2[7][5] + coeff0_8*dmats2[8][5] + coeff0_9*dmats2[9][5];
+            new_coeff0_6 = coeff0_0*dmats2[0][6] + coeff0_1*dmats2[1][6] + coeff0_2*dmats2[2][6] + coeff0_3*dmats2[3][6] + coeff0_4*dmats2[4][6] + coeff0_5*dmats2[5][6] + coeff0_6*dmats2[6][6] + coeff0_7*dmats2[7][6] + coeff0_8*dmats2[8][6] + coeff0_9*dmats2[9][6];
+            new_coeff0_7 = coeff0_0*dmats2[0][7] + coeff0_1*dmats2[1][7] + coeff0_2*dmats2[2][7] + coeff0_3*dmats2[3][7] + coeff0_4*dmats2[4][7] + coeff0_5*dmats2[5][7] + coeff0_6*dmats2[6][7] + coeff0_7*dmats2[7][7] + coeff0_8*dmats2[8][7] + coeff0_9*dmats2[9][7];
+            new_coeff0_8 = coeff0_0*dmats2[0][8] + coeff0_1*dmats2[1][8] + coeff0_2*dmats2[2][8] + coeff0_3*dmats2[3][8] + coeff0_4*dmats2[4][8] + coeff0_5*dmats2[5][8] + coeff0_6*dmats2[6][8] + coeff0_7*dmats2[7][8] + coeff0_8*dmats2[8][8] + coeff0_9*dmats2[9][8];
+            new_coeff0_9 = coeff0_0*dmats2[0][9] + coeff0_1*dmats2[1][9] + coeff0_2*dmats2[2][9] + coeff0_3*dmats2[3][9] + coeff0_4*dmats2[4][9] + coeff0_5*dmats2[5][9] + coeff0_6*dmats2[6][9] + coeff0_7*dmats2[7][9] + coeff0_8*dmats2[8][9] + coeff0_9*dmats2[9][9];
           }
     
         }
         // Compute derivatives on reference element as dot product of coefficients and basisvalues
-        derivatives[deriv_num] = new_coeff0_0*basisvalue0 + new_coeff0_1*basisvalue1 + new_coeff0_2*basisvalue2 + new_coeff0_3*basisvalue3;
+        derivatives[deriv_num] = new_coeff0_0*basisvalue0 + new_coeff0_1*basisvalue1 + new_coeff0_2*basisvalue2 + new_coeff0_3*basisvalue3 + new_coeff0_4*basisvalue4 + new_coeff0_5*basisvalue5 + new_coeff0_6*basisvalue6 + new_coeff0_7*basisvalue7 + new_coeff0_8*basisvalue8 + new_coeff0_9*basisvalue9;
       }
     
       // Transform derivatives back to physical element
@@ -5106,64 +6390,106 @@ void UFC_SolitaryWave3DBilinearForm_fini
       delete [] transform;
     }
     
-    if (4 <= i && i <= 7)
-    {
-      // Map degree of freedom to element degree of freedom
-      const unsigned int dof = i - 4;
+    if (10 <= i && i <= 19)
+    {
+      // Map degree of freedom to element degree of freedom
+      const unsigned int dof = i - 10;
     
       // Generate scalings
       const double scalings_y_0 = 1;
       const double scalings_y_1 = scalings_y_0*(0.5 - 0.5*y);
+      const double scalings_y_2 = scalings_y_1*(0.5 - 0.5*y);
       const double scalings_z_0 = 1;
       const double scalings_z_1 = scalings_z_0*(0.5 - 0.5*z);
+      const double scalings_z_2 = scalings_z_1*(0.5 - 0.5*z);
     
       // Compute psitilde_a
       const double psitilde_a_0 = 1;
       const double psitilde_a_1 = x;
+      const double psitilde_a_2 = 1.5*x*psitilde_a_1 - 0.5*psitilde_a_0;
     
       // Compute psitilde_bs
       const double psitilde_bs_0_0 = 1;
       const double psitilde_bs_0_1 = 1.5*y + 0.5;
+      const double psitilde_bs_0_2 = 0.111111111111111*psitilde_bs_0_1 + 1.66666666666667*y*psitilde_bs_0_1 - 0.555555555555556*psitilde_bs_0_0;
       const double psitilde_bs_1_0 = 1;
+      const double psitilde_bs_1_1 = 2.5*y + 1.5;
+      const double psitilde_bs_2_0 = 1;
     
       // Compute psitilde_cs
       const double psitilde_cs_00_0 = 1;
       const double psitilde_cs_00_1 = 2*z + 1;
+      const double psitilde_cs_00_2 = 0.3125*psitilde_cs_00_1 + 1.875*z*psitilde_cs_00_1 - 0.5625*psitilde_cs_00_0;
       const double psitilde_cs_01_0 = 1;
+      const double psitilde_cs_01_1 = 3*z + 2;
+      const double psitilde_cs_02_0 = 1;
       const double psitilde_cs_10_0 = 1;
+      const double psitilde_cs_10_1 = 3*z + 2;
+      const double psitilde_cs_11_0 = 1;
+      const double psitilde_cs_20_0 = 1;
     
       // Compute basisvalues
       const double basisvalue0 = 0.866025403784439*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_0;
       const double basisvalue1 = 2.73861278752583*psitilde_a_1*scalings_y_1*psitilde_bs_1_0*scalings_z_1*psitilde_cs_10_0;
       const double basisvalue2 = 1.58113883008419*psitilde_a_0*scalings_y_0*psitilde_bs_0_1*scalings_z_1*psitilde_cs_01_0;
       const double basisvalue3 = 1.11803398874989*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_1;
-    
-      // Table(s) of coefficients
-      const static double coefficients0[4][4] =   \
-      {{0.288675134594813, -0.182574185835055, -0.105409255338946, -0.074535599249993},
-      {0.288675134594813, 0.182574185835055, -0.105409255338946, -0.074535599249993},
-      {0.288675134594813, 0, 0.210818510677892, -0.074535599249993},
-      {0.288675134594813, 0, 0, 0.223606797749979}};
+      const double basisvalue4 = 5.1234753829798*psitilde_a_2*scalings_y_2*psitilde_bs_2_0*scalings_z_2*psitilde_cs_20_0;
+      const double basisvalue5 = 3.96862696659689*psitilde_a_1*scalings_y_1*psitilde_bs_1_1*scalings_z_2*psitilde_cs_11_0;
+      const double basisvalue6 = 2.29128784747792*psitilde_a_0*scalings_y_0*psitilde_bs_0_2*scalings_z_2*psitilde_cs_02_0;
+      const double basisvalue7 = 3.24037034920393*psitilde_a_1*scalings_y_1*psitilde_bs_1_0*scalings_z_1*psitilde_cs_10_1;
+      const double basisvalue8 = 1.87082869338697*psitilde_a_0*scalings_y_0*psitilde_bs_0_1*scalings_z_1*psitilde_cs_01_1;
+      const double basisvalue9 = 1.3228756555323*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_2;
+    
+      // Table(s) of coefficients
+      const static double coefficients0[10][10] =   \
+      {{-0.0577350269189626, -0.0608580619450185, -0.0351364184463153, -0.0248451997499977, 0.0650600048632355, 0.0503952630678969, 0.0290957186981323, 0.0411475599898912, 0.0237565548366599, 0.0167984210226323},
+      {-0.0577350269189625, 0.0608580619450185, -0.0351364184463153, -0.0248451997499977, 0.0650600048632355, -0.050395263067897, 0.0290957186981323, -0.0411475599898912, 0.0237565548366599, 0.0167984210226323},
+      {-0.0577350269189625, 0, 0.0702728368926306, -0.0248451997499977, 0, 0, 0.0872871560943969, 0, -0.0475131096733199, 0.0167984210226323},
+      {-0.0577350269189626, 0, 0, 0.074535599249993, 0, 0, 0, 0, 0, 0.100790526135794},
+      {0.23094010767585, 0, 0.140545673785261, 0.0993807989999906, 0, 0, 0, 0, 0.1187827741833, -0.0671936840905293},
+      {0.230940107675851, 0.121716123890037, -0.0702728368926306, 0.0993807989999907, 0, 0, 0, 0.102868899974728, -0.0593913870916499, -0.0671936840905293},
+      {0.23094010767585, 0.121716123890037, 0.0702728368926307, -0.0993807989999907, 0, 0.100790526135794, -0.087287156094397, -0.0205737799949456, -0.01187827741833, 0.0167984210226323},
+      {0.23094010767585, -0.121716123890037, -0.0702728368926307, 0.0993807989999906, 0, 0, 0, -0.102868899974728, -0.0593913870916499, -0.0671936840905293},
+      {0.23094010767585, -0.121716123890037, 0.0702728368926306, -0.0993807989999906, 0, -0.100790526135794, -0.0872871560943969, 0.0205737799949456, -0.01187827741833, 0.0167984210226323},
+      {0.23094010767585, 0, -0.140545673785261, -0.0993807989999906, -0.130120009726471, 0, 0.0290957186981323, 0, 0.02375655483666, 0.0167984210226323}};
     
       // Interesting (new) part
       // Tables of derivatives of the polynomial base (transpose)
-      const static double dmats0[4][4] =   \
-      {{0, 0, 0, 0},
-      {6.32455532033676, 0, 0, 0},
-      {0, 0, 0, 0},
-      {0, 0, 0, 0}};
-    
-      const static double dmats1[4][4] =   \
-      {{0, 0, 0, 0},
-      {3.16227766016838, 0, 0, 0},
-      {5.47722557505166, 0, 0, 0},
-      {0, 0, 0, 0}};
-    
-      const static double dmats2[4][4] =   \
-      {{0, 0, 0, 0},
-      {3.16227766016838, 0, 0, 0},
-      {1.82574185835055, 0, 0, 0},
-      {5.16397779494322, 0, 0, 0}};
+      const static double dmats0[10][10] =   \
+      {{0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {6.32455532033676, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {0, 11.2249721603218, 0, 0, 0, 0, 0, 0, 0, 0},
+      {4.58257569495584, 0, 8.36660026534076, -1.18321595661992, 0, 0, 0, 0, 0, 0},
+      {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {3.74165738677394, 0, 0, 8.69482604771366, 0, 0, 0, 0, 0, 0},
+      {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
+    
+      const static double dmats1[10][10] =   \
+      {{0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {3.16227766016838, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {5.47722557505166, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {2.95803989154981, 5.61248608016091, -1.08012344973464, -0.763762615825974, 0, 0, 0, 0, 0, 0},
+      {2.29128784747792, 7.24568837309472, 4.18330013267038, -0.591607978309962, 0, 0, 0, 0, 0, 0},
+      {-2.64575131106459, 0, 9.66091783079296, 0.683130051063974, 0, 0, 0, 0, 0, 0},
+      {1.87082869338697, 0, 0, 4.34741302385683, 0, 0, 0, 0, 0, 0},
+      {3.24037034920393, 0, 0, 7.52994023880668, 0, 0, 0, 0, 0, 0},
+      {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
+    
+      const static double dmats2[10][10] =   \
+      {{0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {3.16227766016838, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {1.82574185835055, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {5.16397779494322, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {2.95803989154981, 5.61248608016091, -1.08012344973464, -0.763762615825974, 0, 0, 0, 0, 0, 0},
+      {2.29128784747792, 1.44913767461894, 4.18330013267038, -0.591607978309962, 0, 0, 0, 0, 0, 0},
+      {1.32287565553229, 0, 3.86436713231718, -0.341565025531986, 0, 0, 0, 0, 0, 0},
+      {1.87082869338697, 7.09929573971954, 0, 4.34741302385683, 0, 0, 0, 0, 0, 0},
+      {1.08012344973464, 0, 7.09929573971954, 2.50998007960223, 0, 0, 0, 0, 0, 0},
+      {-3.81881307912987, 0, 0, 8.87411967464942, 0, 0, 0, 0, 0, 0}};
     
       // Compute reference derivatives
       // Declare pointer to array of derivatives on FIAT element
@@ -5174,12 +6500,24 @@ void UFC_SolitaryWave3DBilinearForm_fini
       double coeff0_1 = 0;
       double coeff0_2 = 0;
       double coeff0_3 = 0;
+      double coeff0_4 = 0;
+      double coeff0_5 = 0;
+      double coeff0_6 = 0;
+      double coeff0_7 = 0;
+      double coeff0_8 = 0;
+      double coeff0_9 = 0;
     
       // Declare new coefficients
       double new_coeff0_0 = 0;
       double new_coeff0_1 = 0;
       double new_coeff0_2 = 0;
       double new_coeff0_3 = 0;
+      double new_coeff0_4 = 0;
+      double new_coeff0_5 = 0;
+      double new_coeff0_6 = 0;
+      double new_coeff0_7 = 0;
+      double new_coeff0_8 = 0;
+      double new_coeff0_9 = 0;
     
       // Loop possible derivatives
       for (unsigned int deriv_num = 0; deriv_num < num_derivatives; deriv_num++)
@@ -5189,6 +6527,12 @@ void UFC_SolitaryWave3DBilinearForm_fini
         new_coeff0_1 = coefficients0[dof][1];
         new_coeff0_2 = coefficients0[dof][2];
         new_coeff0_3 = coefficients0[dof][3];
+        new_coeff0_4 = coefficients0[dof][4];
+        new_coeff0_5 = coefficients0[dof][5];
+        new_coeff0_6 = coefficients0[dof][6];
+        new_coeff0_7 = coefficients0[dof][7];
+        new_coeff0_8 = coefficients0[dof][8];
+        new_coeff0_9 = coefficients0[dof][9];
     
         // Loop derivative order
         for (unsigned int j = 0; j < n; j++)
@@ -5198,32 +6542,56 @@ void UFC_SolitaryWave3DBilinearForm_fini
           coeff0_1 = new_coeff0_1;
           coeff0_2 = new_coeff0_2;
           coeff0_3 = new_coeff0_3;
+          coeff0_4 = new_coeff0_4;
+          coeff0_5 = new_coeff0_5;
+          coeff0_6 = new_coeff0_6;
+          coeff0_7 = new_coeff0_7;
+          coeff0_8 = new_coeff0_8;
+          coeff0_9 = new_coeff0_9;
     
           if(combinations[deriv_num][j] == 0)
           {
-            new_coeff0_0 = coeff0_0*dmats0[0][0] + coeff0_1*dmats0[1][0] + coeff0_2*dmats0[2][0] + coeff0_3*dmats0[3][0];
-            new_coeff0_1 = coeff0_0*dmats0[0][1] + coeff0_1*dmats0[1][1] + coeff0_2*dmats0[2][1] + coeff0_3*dmats0[3][1];
-            new_coeff0_2 = coeff0_0*dmats0[0][2] + coeff0_1*dmats0[1][2] + coeff0_2*dmats0[2][2] + coeff0_3*dmats0[3][2];
-            new_coeff0_3 = coeff0_0*dmats0[0][3] + coeff0_1*dmats0[1][3] + coeff0_2*dmats0[2][3] + coeff0_3*dmats0[3][3];
+            new_coeff0_0 = coeff0_0*dmats0[0][0] + coeff0_1*dmats0[1][0] + coeff0_2*dmats0[2][0] + coeff0_3*dmats0[3][0] + coeff0_4*dmats0[4][0] + coeff0_5*dmats0[5][0] + coeff0_6*dmats0[6][0] + coeff0_7*dmats0[7][0] + coeff0_8*dmats0[8][0] + coeff0_9*dmats0[9][0];
+            new_coeff0_1 = coeff0_0*dmats0[0][1] + coeff0_1*dmats0[1][1] + coeff0_2*dmats0[2][1] + coeff0_3*dmats0[3][1] + coeff0_4*dmats0[4][1] + coeff0_5*dmats0[5][1] + coeff0_6*dmats0[6][1] + coeff0_7*dmats0[7][1] + coeff0_8*dmats0[8][1] + coeff0_9*dmats0[9][1];
+            new_coeff0_2 = coeff0_0*dmats0[0][2] + coeff0_1*dmats0[1][2] + coeff0_2*dmats0[2][2] + coeff0_3*dmats0[3][2] + coeff0_4*dmats0[4][2] + coeff0_5*dmats0[5][2] + coeff0_6*dmats0[6][2] + coeff0_7*dmats0[7][2] + coeff0_8*dmats0[8][2] + coeff0_9*dmats0[9][2];
+            new_coeff0_3 = coeff0_0*dmats0[0][3] + coeff0_1*dmats0[1][3] + coeff0_2*dmats0[2][3] + coeff0_3*dmats0[3][3] + coeff0_4*dmats0[4][3] + coeff0_5*dmats0[5][3] + coeff0_6*dmats0[6][3] + coeff0_7*dmats0[7][3] + coeff0_8*dmats0[8][3] + coeff0_9*dmats0[9][3];
+            new_coeff0_4 = coeff0_0*dmats0[0][4] + coeff0_1*dmats0[1][4] + coeff0_2*dmats0[2][4] + coeff0_3*dmats0[3][4] + coeff0_4*dmats0[4][4] + coeff0_5*dmats0[5][4] + coeff0_6*dmats0[6][4] + coeff0_7*dmats0[7][4] + coeff0_8*dmats0[8][4] + coeff0_9*dmats0[9][4];
+            new_coeff0_5 = coeff0_0*dmats0[0][5] + coeff0_1*dmats0[1][5] + coeff0_2*dmats0[2][5] + coeff0_3*dmats0[3][5] + coeff0_4*dmats0[4][5] + coeff0_5*dmats0[5][5] + coeff0_6*dmats0[6][5] + coeff0_7*dmats0[7][5] + coeff0_8*dmats0[8][5] + coeff0_9*dmats0[9][5];
+            new_coeff0_6 = coeff0_0*dmats0[0][6] + coeff0_1*dmats0[1][6] + coeff0_2*dmats0[2][6] + coeff0_3*dmats0[3][6] + coeff0_4*dmats0[4][6] + coeff0_5*dmats0[5][6] + coeff0_6*dmats0[6][6] + coeff0_7*dmats0[7][6] + coeff0_8*dmats0[8][6] + coeff0_9*dmats0[9][6];
+            new_coeff0_7 = coeff0_0*dmats0[0][7] + coeff0_1*dmats0[1][7] + coeff0_2*dmats0[2][7] + coeff0_3*dmats0[3][7] + coeff0_4*dmats0[4][7] + coeff0_5*dmats0[5][7] + coeff0_6*dmats0[6][7] + coeff0_7*dmats0[7][7] + coeff0_8*dmats0[8][7] + coeff0_9*dmats0[9][7];
+            new_coeff0_8 = coeff0_0*dmats0[0][8] + coeff0_1*dmats0[1][8] + coeff0_2*dmats0[2][8] + coeff0_3*dmats0[3][8] + coeff0_4*dmats0[4][8] + coeff0_5*dmats0[5][8] + coeff0_6*dmats0[6][8] + coeff0_7*dmats0[7][8] + coeff0_8*dmats0[8][8] + coeff0_9*dmats0[9][8];
+            new_coeff0_9 = coeff0_0*dmats0[0][9] + coeff0_1*dmats0[1][9] + coeff0_2*dmats0[2][9] + coeff0_3*dmats0[3][9] + coeff0_4*dmats0[4][9] + coeff0_5*dmats0[5][9] + coeff0_6*dmats0[6][9] + coeff0_7*dmats0[7][9] + coeff0_8*dmats0[8][9] + coeff0_9*dmats0[9][9];
           }
           if(combinations[deriv_num][j] == 1)
           {
-            new_coeff0_0 = coeff0_0*dmats1[0][0] + coeff0_1*dmats1[1][0] + coeff0_2*dmats1[2][0] + coeff0_3*dmats1[3][0];
-            new_coeff0_1 = coeff0_0*dmats1[0][1] + coeff0_1*dmats1[1][1] + coeff0_2*dmats1[2][1] + coeff0_3*dmats1[3][1];
-            new_coeff0_2 = coeff0_0*dmats1[0][2] + coeff0_1*dmats1[1][2] + coeff0_2*dmats1[2][2] + coeff0_3*dmats1[3][2];
-            new_coeff0_3 = coeff0_0*dmats1[0][3] + coeff0_1*dmats1[1][3] + coeff0_2*dmats1[2][3] + coeff0_3*dmats1[3][3];
+            new_coeff0_0 = coeff0_0*dmats1[0][0] + coeff0_1*dmats1[1][0] + coeff0_2*dmats1[2][0] + coeff0_3*dmats1[3][0] + coeff0_4*dmats1[4][0] + coeff0_5*dmats1[5][0] + coeff0_6*dmats1[6][0] + coeff0_7*dmats1[7][0] + coeff0_8*dmats1[8][0] + coeff0_9*dmats1[9][0];
+            new_coeff0_1 = coeff0_0*dmats1[0][1] + coeff0_1*dmats1[1][1] + coeff0_2*dmats1[2][1] + coeff0_3*dmats1[3][1] + coeff0_4*dmats1[4][1] + coeff0_5*dmats1[5][1] + coeff0_6*dmats1[6][1] + coeff0_7*dmats1[7][1] + coeff0_8*dmats1[8][1] + coeff0_9*dmats1[9][1];
+            new_coeff0_2 = coeff0_0*dmats1[0][2] + coeff0_1*dmats1[1][2] + coeff0_2*dmats1[2][2] + coeff0_3*dmats1[3][2] + coeff0_4*dmats1[4][2] + coeff0_5*dmats1[5][2] + coeff0_6*dmats1[6][2] + coeff0_7*dmats1[7][2] + coeff0_8*dmats1[8][2] + coeff0_9*dmats1[9][2];
+            new_coeff0_3 = coeff0_0*dmats1[0][3] + coeff0_1*dmats1[1][3] + coeff0_2*dmats1[2][3] + coeff0_3*dmats1[3][3] + coeff0_4*dmats1[4][3] + coeff0_5*dmats1[5][3] + coeff0_6*dmats1[6][3] + coeff0_7*dmats1[7][3] + coeff0_8*dmats1[8][3] + coeff0_9*dmats1[9][3];
+            new_coeff0_4 = coeff0_0*dmats1[0][4] + coeff0_1*dmats1[1][4] + coeff0_2*dmats1[2][4] + coeff0_3*dmats1[3][4] + coeff0_4*dmats1[4][4] + coeff0_5*dmats1[5][4] + coeff0_6*dmats1[6][4] + coeff0_7*dmats1[7][4] + coeff0_8*dmats1[8][4] + coeff0_9*dmats1[9][4];
+            new_coeff0_5 = coeff0_0*dmats1[0][5] + coeff0_1*dmats1[1][5] + coeff0_2*dmats1[2][5] + coeff0_3*dmats1[3][5] + coeff0_4*dmats1[4][5] + coeff0_5*dmats1[5][5] + coeff0_6*dmats1[6][5] + coeff0_7*dmats1[7][5] + coeff0_8*dmats1[8][5] + coeff0_9*dmats1[9][5];
+            new_coeff0_6 = coeff0_0*dmats1[0][6] + coeff0_1*dmats1[1][6] + coeff0_2*dmats1[2][6] + coeff0_3*dmats1[3][6] + coeff0_4*dmats1[4][6] + coeff0_5*dmats1[5][6] + coeff0_6*dmats1[6][6] + coeff0_7*dmats1[7][6] + coeff0_8*dmats1[8][6] + coeff0_9*dmats1[9][6];
+            new_coeff0_7 = coeff0_0*dmats1[0][7] + coeff0_1*dmats1[1][7] + coeff0_2*dmats1[2][7] + coeff0_3*dmats1[3][7] + coeff0_4*dmats1[4][7] + coeff0_5*dmats1[5][7] + coeff0_6*dmats1[6][7] + coeff0_7*dmats1[7][7] + coeff0_8*dmats1[8][7] + coeff0_9*dmats1[9][7];
+            new_coeff0_8 = coeff0_0*dmats1[0][8] + coeff0_1*dmats1[1][8] + coeff0_2*dmats1[2][8] + coeff0_3*dmats1[3][8] + coeff0_4*dmats1[4][8] + coeff0_5*dmats1[5][8] + coeff0_6*dmats1[6][8] + coeff0_7*dmats1[7][8] + coeff0_8*dmats1[8][8] + coeff0_9*dmats1[9][8];
+            new_coeff0_9 = coeff0_0*dmats1[0][9] + coeff0_1*dmats1[1][9] + coeff0_2*dmats1[2][9] + coeff0_3*dmats1[3][9] + coeff0_4*dmats1[4][9] + coeff0_5*dmats1[5][9] + coeff0_6*dmats1[6][9] + coeff0_7*dmats1[7][9] + coeff0_8*dmats1[8][9] + coeff0_9*dmats1[9][9];
           }
           if(combinations[deriv_num][j] == 2)
           {
-            new_coeff0_0 = coeff0_0*dmats2[0][0] + coeff0_1*dmats2[1][0] + coeff0_2*dmats2[2][0] + coeff0_3*dmats2[3][0];
-            new_coeff0_1 = coeff0_0*dmats2[0][1] + coeff0_1*dmats2[1][1] + coeff0_2*dmats2[2][1] + coeff0_3*dmats2[3][1];
-            new_coeff0_2 = coeff0_0*dmats2[0][2] + coeff0_1*dmats2[1][2] + coeff0_2*dmats2[2][2] + coeff0_3*dmats2[3][2];
-            new_coeff0_3 = coeff0_0*dmats2[0][3] + coeff0_1*dmats2[1][3] + coeff0_2*dmats2[2][3] + coeff0_3*dmats2[3][3];
+            new_coeff0_0 = coeff0_0*dmats2[0][0] + coeff0_1*dmats2[1][0] + coeff0_2*dmats2[2][0] + coeff0_3*dmats2[3][0] + coeff0_4*dmats2[4][0] + coeff0_5*dmats2[5][0] + coeff0_6*dmats2[6][0] + coeff0_7*dmats2[7][0] + coeff0_8*dmats2[8][0] + coeff0_9*dmats2[9][0];
+            new_coeff0_1 = coeff0_0*dmats2[0][1] + coeff0_1*dmats2[1][1] + coeff0_2*dmats2[2][1] + coeff0_3*dmats2[3][1] + coeff0_4*dmats2[4][1] + coeff0_5*dmats2[5][1] + coeff0_6*dmats2[6][1] + coeff0_7*dmats2[7][1] + coeff0_8*dmats2[8][1] + coeff0_9*dmats2[9][1];
+            new_coeff0_2 = coeff0_0*dmats2[0][2] + coeff0_1*dmats2[1][2] + coeff0_2*dmats2[2][2] + coeff0_3*dmats2[3][2] + coeff0_4*dmats2[4][2] + coeff0_5*dmats2[5][2] + coeff0_6*dmats2[6][2] + coeff0_7*dmats2[7][2] + coeff0_8*dmats2[8][2] + coeff0_9*dmats2[9][2];
+            new_coeff0_3 = coeff0_0*dmats2[0][3] + coeff0_1*dmats2[1][3] + coeff0_2*dmats2[2][3] + coeff0_3*dmats2[3][3] + coeff0_4*dmats2[4][3] + coeff0_5*dmats2[5][3] + coeff0_6*dmats2[6][3] + coeff0_7*dmats2[7][3] + coeff0_8*dmats2[8][3] + coeff0_9*dmats2[9][3];
+            new_coeff0_4 = coeff0_0*dmats2[0][4] + coeff0_1*dmats2[1][4] + coeff0_2*dmats2[2][4] + coeff0_3*dmats2[3][4] + coeff0_4*dmats2[4][4] + coeff0_5*dmats2[5][4] + coeff0_6*dmats2[6][4] + coeff0_7*dmats2[7][4] + coeff0_8*dmats2[8][4] + coeff0_9*dmats2[9][4];
+            new_coeff0_5 = coeff0_0*dmats2[0][5] + coeff0_1*dmats2[1][5] + coeff0_2*dmats2[2][5] + coeff0_3*dmats2[3][5] + coeff0_4*dmats2[4][5] + coeff0_5*dmats2[5][5] + coeff0_6*dmats2[6][5] + coeff0_7*dmats2[7][5] + coeff0_8*dmats2[8][5] + coeff0_9*dmats2[9][5];
+            new_coeff0_6 = coeff0_0*dmats2[0][6] + coeff0_1*dmats2[1][6] + coeff0_2*dmats2[2][6] + coeff0_3*dmats2[3][6] + coeff0_4*dmats2[4][6] + coeff0_5*dmats2[5][6] + coeff0_6*dmats2[6][6] + coeff0_7*dmats2[7][6] + coeff0_8*dmats2[8][6] + coeff0_9*dmats2[9][6];
+            new_coeff0_7 = coeff0_0*dmats2[0][7] + coeff0_1*dmats2[1][7] + coeff0_2*dmats2[2][7] + coeff0_3*dmats2[3][7] + coeff0_4*dmats2[4][7] + coeff0_5*dmats2[5][7] + coeff0_6*dmats2[6][7] + coeff0_7*dmats2[7][7] + coeff0_8*dmats2[8][7] + coeff0_9*dmats2[9][7];
+            new_coeff0_8 = coeff0_0*dmats2[0][8] + coeff0_1*dmats2[1][8] + coeff0_2*dmats2[2][8] + coeff0_3*dmats2[3][8] + coeff0_4*dmats2[4][8] + coeff0_5*dmats2[5][8] + coeff0_6*dmats2[6][8] + coeff0_7*dmats2[7][8] + coeff0_8*dmats2[8][8] + coeff0_9*dmats2[9][8];
+            new_coeff0_9 = coeff0_0*dmats2[0][9] + coeff0_1*dmats2[1][9] + coeff0_2*dmats2[2][9] + coeff0_3*dmats2[3][9] + coeff0_4*dmats2[4][9] + coeff0_5*dmats2[5][9] + coeff0_6*dmats2[6][9] + coeff0_7*dmats2[7][9] + coeff0_8*dmats2[8][9] + coeff0_9*dmats2[9][9];
           }
     
         }
         // Compute derivatives on reference element as dot product of coefficients and basisvalues
-        derivatives[deriv_num] = new_coeff0_0*basisvalue0 + new_coeff0_1*basisvalue1 + new_coeff0_2*basisvalue2 + new_coeff0_3*basisvalue3;
+        derivatives[deriv_num] = new_coeff0_0*basisvalue0 + new_coeff0_1*basisvalue1 + new_coeff0_2*basisvalue2 + new_coeff0_3*basisvalue3 + new_coeff0_4*basisvalue4 + new_coeff0_5*basisvalue5 + new_coeff0_6*basisvalue6 + new_coeff0_7*basisvalue7 + new_coeff0_8*basisvalue8 + new_coeff0_9*basisvalue9;
       }
     
       // Transform derivatives back to physical element
@@ -5265,9 +6633,9 @@ double UFC_SolitaryWave3DBilinearForm_fi
                                    const ufc::cell& c) const
 {
     // The reference points, direction and weights:
-    const static double X[8][1][3] = {{{0, 0, 0}}, {{1, 0, 0}}, {{0, 1, 0}}, {{0, 0, 1}}, {{0, 0, 0}}, {{1, 0, 0}}, {{0, 1, 0}}, {{0, 0, 1}}};
-    const static double W[8][1] = {{1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}};
-    const static double D[8][1][2] = {{{1, 0}}, {{1, 0}}, {{1, 0}}, {{1, 0}}, {{0, 1}}, {{0, 1}}, {{0, 1}}, {{0, 1}}};
+    const static double X[20][1][3] = {{{0, 0, 0}}, {{1, 0, 0}}, {{0, 1, 0}}, {{0, 0, 1}}, {{0, 0.5, 0.5}}, {{0.5, 0, 0.5}}, {{0.5, 0.5, 0}}, {{0, 0, 0.5}}, {{0, 0.5, 0}}, {{0.5, 0, 0}}, {{0, 0, 0}}, {{1, 0, 0}}, {{0, 1, 0}}, {{0, 0, 1}}, {{0, 0.5, 0.5}}, {{0.5, 0, 0.5}}, {{0.5, 0.5, 0}}, {{0, 0, 0.5}}, {{0, 0.5, 0}}, {{0.5, 0, 0}}};
+    const static double W[20][1] = {{1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}};
+    const static double D[20][1][2] = {{{1, 0}}, {{1, 0}}, {{1, 0}}, {{1, 0}}, {{1, 0}}, {{1, 0}}, {{1, 0}}, {{1, 0}}, {{1, 0}}, {{1, 0}}, {{0, 1}}, {{0, 1}}, {{0, 1}}, {{0, 1}}, {{0, 1}}, {{0, 1}}, {{0, 1}}, {{0, 1}}, {{0, 1}}, {{0, 1}}};
     
     const double * const * x = c.coordinates;
     double result = 0.0;
@@ -5321,10 +6689,10 @@ void UFC_SolitaryWave3DBilinearForm_fini
     vertex_values[4] = dof_values[2];
     vertex_values[6] = dof_values[3];
     // Evaluate at vertices and use affine mapping
-    vertex_values[1] = dof_values[4];
-    vertex_values[3] = dof_values[5];
-    vertex_values[5] = dof_values[6];
-    vertex_values[7] = dof_values[7];
+    vertex_values[1] = dof_values[10];
+    vertex_values[3] = dof_values[11];
+    vertex_values[5] = dof_values[12];
+    vertex_values[7] = dof_values[13];
 }
 
 /// Return the number of sub elements (for a mixed element)
@@ -8427,7 +9795,7 @@ UFC_SolitaryWave3DBilinearForm_dof_map_0
 /// Return a string identifying the dof map
 const char* UFC_SolitaryWave3DBilinearForm_dof_map_0_0::signature() const
 {
-    return "FFC dof map for FiniteElement('Lagrange', 'tetrahedron', 1)";
+    return "FFC dof map for FiniteElement('Lagrange', 'tetrahedron', 2)";
 }
 
 /// Return true iff mesh entities of topological dimension d are needed
@@ -8439,7 +9807,7 @@ bool UFC_SolitaryWave3DBilinearForm_dof_
       return true;
       break;
     case 1:
-      return false;
+      return true;
       break;
     case 2:
       return false;
@@ -8454,7 +9822,7 @@ bool UFC_SolitaryWave3DBilinearForm_dof_
 /// Initialize dof map for mesh (return true iff init_cell() is needed)
 bool UFC_SolitaryWave3DBilinearForm_dof_map_0_0::init_mesh(const ufc::mesh& m)
 {
-    __global_dimension = m.num_entities[0];
+    __global_dimension = m.num_entities[0] + m.num_entities[1];
     return false;
 }
 
@@ -8480,7 +9848,7 @@ unsigned int UFC_SolitaryWave3DBilinearF
 /// Return the dimension of the local finite element function space
 unsigned int UFC_SolitaryWave3DBilinearForm_dof_map_0_0::local_dimension() const
 {
-    return 4;
+    return 10;
 }
 
 // Return the geometric dimension of the coordinates this dof map provides
@@ -8492,7 +9860,7 @@ unsigned int UFC_SolitaryWave3DBilinearF
 /// Return the number of dofs on each cell facet
 unsigned int UFC_SolitaryWave3DBilinearForm_dof_map_0_0::num_facet_dofs() const
 {
-    return 3;
+    return 6;
 }
 
 /// Return the number of dofs associated with each cell entity of dimension d
@@ -8510,6 +9878,13 @@ void UFC_SolitaryWave3DBilinearForm_dof_
     dofs[1] = c.entity_indices[0][1];
     dofs[2] = c.entity_indices[0][2];
     dofs[3] = c.entity_indices[0][3];
+    unsigned int offset = m.num_entities[0];
+    dofs[4] = offset + c.entity_indices[1][0];
+    dofs[5] = offset + c.entity_indices[1][1];
+    dofs[6] = offset + c.entity_indices[1][2];
+    dofs[7] = offset + c.entity_indices[1][3];
+    dofs[8] = offset + c.entity_indices[1][4];
+    dofs[9] = offset + c.entity_indices[1][5];
 }
 
 /// Tabulate the local-to-local mapping from facet dofs to cell dofs
@@ -8522,21 +9897,33 @@ void UFC_SolitaryWave3DBilinearForm_dof_
       dofs[0] = 1;
       dofs[1] = 2;
       dofs[2] = 3;
-      break;
-    case 1:
-      dofs[0] = 0;
-      dofs[1] = 2;
-      dofs[2] = 3;
-      break;
-    case 2:
-      dofs[0] = 0;
-      dofs[1] = 1;
-      dofs[2] = 3;
+      dofs[3] = 4;
+      dofs[4] = 5;
+      dofs[5] = 6;
+      break;
+    case 1:
+      dofs[0] = 0;
+      dofs[1] = 2;
+      dofs[2] = 3;
+      dofs[3] = 4;
+      dofs[4] = 7;
+      dofs[5] = 8;
+      break;
+    case 2:
+      dofs[0] = 0;
+      dofs[1] = 1;
+      dofs[2] = 3;
+      dofs[3] = 5;
+      dofs[4] = 7;
+      dofs[5] = 9;
       break;
     case 3:
       dofs[0] = 0;
       dofs[1] = 1;
       dofs[2] = 2;
+      dofs[3] = 6;
+      dofs[4] = 8;
+      dofs[5] = 9;
       break;
     }
 }
@@ -8565,6 +9952,24 @@ void UFC_SolitaryWave3DBilinearForm_dof_
     coordinates[3][0] = x[3][0];
     coordinates[3][1] = x[3][1];
     coordinates[3][2] = x[3][2];
+    coordinates[4][0] = 0.5*x[2][0] + 0.5*x[3][0];
+    coordinates[4][1] = 0.5*x[2][1] + 0.5*x[3][1];
+    coordinates[4][2] = 0.5*x[2][2] + 0.5*x[3][2];
+    coordinates[5][0] = 0.5*x[1][0] + 0.5*x[3][0];
+    coordinates[5][1] = 0.5*x[1][1] + 0.5*x[3][1];
+    coordinates[5][2] = 0.5*x[1][2] + 0.5*x[3][2];
+    coordinates[6][0] = 0.5*x[1][0] + 0.5*x[2][0];
+    coordinates[6][1] = 0.5*x[1][1] + 0.5*x[2][1];
+    coordinates[6][2] = 0.5*x[1][2] + 0.5*x[2][2];
+    coordinates[7][0] = 0.5*x[0][0] + 0.5*x[3][0];
+    coordinates[7][1] = 0.5*x[0][1] + 0.5*x[3][1];
+    coordinates[7][2] = 0.5*x[0][2] + 0.5*x[3][2];
+    coordinates[8][0] = 0.5*x[0][0] + 0.5*x[2][0];
+    coordinates[8][1] = 0.5*x[0][1] + 0.5*x[2][1];
+    coordinates[8][2] = 0.5*x[0][2] + 0.5*x[2][2];
+    coordinates[9][0] = 0.5*x[0][0] + 0.5*x[1][0];
+    coordinates[9][1] = 0.5*x[0][1] + 0.5*x[1][1];
+    coordinates[9][2] = 0.5*x[0][2] + 0.5*x[1][2];
 }
 
 /// Return the number of sub dof maps (for a mixed element)
@@ -8595,7 +10000,7 @@ UFC_SolitaryWave3DBilinearForm_dof_map_0
 /// Return a string identifying the dof map
 const char* UFC_SolitaryWave3DBilinearForm_dof_map_0_1::signature() const
 {
-    return "FFC dof map for FiniteElement('Lagrange', 'tetrahedron', 1)";
+    return "FFC dof map for FiniteElement('Lagrange', 'tetrahedron', 2)";
 }
 
 /// Return true iff mesh entities of topological dimension d are needed
@@ -8607,7 +10012,7 @@ bool UFC_SolitaryWave3DBilinearForm_dof_
       return true;
       break;
     case 1:
-      return false;
+      return true;
       break;
     case 2:
       return false;
@@ -8622,7 +10027,7 @@ bool UFC_SolitaryWave3DBilinearForm_dof_
 /// Initialize dof map for mesh (return true iff init_cell() is needed)
 bool UFC_SolitaryWave3DBilinearForm_dof_map_0_1::init_mesh(const ufc::mesh& m)
 {
-    __global_dimension = m.num_entities[0];
+    __global_dimension = m.num_entities[0] + m.num_entities[1];
     return false;
 }
 
@@ -8648,7 +10053,7 @@ unsigned int UFC_SolitaryWave3DBilinearF
 /// Return the dimension of the local finite element function space
 unsigned int UFC_SolitaryWave3DBilinearForm_dof_map_0_1::local_dimension() const
 {
-    return 4;
+    return 10;
 }
 
 // Return the geometric dimension of the coordinates this dof map provides
@@ -8660,7 +10065,7 @@ unsigned int UFC_SolitaryWave3DBilinearF
 /// Return the number of dofs on each cell facet
 unsigned int UFC_SolitaryWave3DBilinearForm_dof_map_0_1::num_facet_dofs() const
 {
-    return 3;
+    return 6;
 }
 
 /// Return the number of dofs associated with each cell entity of dimension d
@@ -8678,6 +10083,13 @@ void UFC_SolitaryWave3DBilinearForm_dof_
     dofs[1] = c.entity_indices[0][1];
     dofs[2] = c.entity_indices[0][2];
     dofs[3] = c.entity_indices[0][3];
+    unsigned int offset = m.num_entities[0];
+    dofs[4] = offset + c.entity_indices[1][0];
+    dofs[5] = offset + c.entity_indices[1][1];
+    dofs[6] = offset + c.entity_indices[1][2];
+    dofs[7] = offset + c.entity_indices[1][3];
+    dofs[8] = offset + c.entity_indices[1][4];
+    dofs[9] = offset + c.entity_indices[1][5];
 }
 
 /// Tabulate the local-to-local mapping from facet dofs to cell dofs
@@ -8690,21 +10102,33 @@ void UFC_SolitaryWave3DBilinearForm_dof_
       dofs[0] = 1;
       dofs[1] = 2;
       dofs[2] = 3;
-      break;
-    case 1:
-      dofs[0] = 0;
-      dofs[1] = 2;
-      dofs[2] = 3;
-      break;
-    case 2:
-      dofs[0] = 0;
-      dofs[1] = 1;
-      dofs[2] = 3;
+      dofs[3] = 4;
+      dofs[4] = 5;
+      dofs[5] = 6;
+      break;
+    case 1:
+      dofs[0] = 0;
+      dofs[1] = 2;
+      dofs[2] = 3;
+      dofs[3] = 4;
+      dofs[4] = 7;
+      dofs[5] = 8;
+      break;
+    case 2:
+      dofs[0] = 0;
+      dofs[1] = 1;
+      dofs[2] = 3;
+      dofs[3] = 5;
+      dofs[4] = 7;
+      dofs[5] = 9;
       break;
     case 3:
       dofs[0] = 0;
       dofs[1] = 1;
       dofs[2] = 2;
+      dofs[3] = 6;
+      dofs[4] = 8;
+      dofs[5] = 9;
       break;
     }
 }
@@ -8733,6 +10157,24 @@ void UFC_SolitaryWave3DBilinearForm_dof_
     coordinates[3][0] = x[3][0];
     coordinates[3][1] = x[3][1];
     coordinates[3][2] = x[3][2];
+    coordinates[4][0] = 0.5*x[2][0] + 0.5*x[3][0];
+    coordinates[4][1] = 0.5*x[2][1] + 0.5*x[3][1];
+    coordinates[4][2] = 0.5*x[2][2] + 0.5*x[3][2];
+    coordinates[5][0] = 0.5*x[1][0] + 0.5*x[3][0];
+    coordinates[5][1] = 0.5*x[1][1] + 0.5*x[3][1];
+    coordinates[5][2] = 0.5*x[1][2] + 0.5*x[3][2];
+    coordinates[6][0] = 0.5*x[1][0] + 0.5*x[2][0];
+    coordinates[6][1] = 0.5*x[1][1] + 0.5*x[2][1];
+    coordinates[6][2] = 0.5*x[1][2] + 0.5*x[2][2];
+    coordinates[7][0] = 0.5*x[0][0] + 0.5*x[3][0];
+    coordinates[7][1] = 0.5*x[0][1] + 0.5*x[3][1];
+    coordinates[7][2] = 0.5*x[0][2] + 0.5*x[3][2];
+    coordinates[8][0] = 0.5*x[0][0] + 0.5*x[2][0];
+    coordinates[8][1] = 0.5*x[0][1] + 0.5*x[2][1];
+    coordinates[8][2] = 0.5*x[0][2] + 0.5*x[2][2];
+    coordinates[9][0] = 0.5*x[0][0] + 0.5*x[1][0];
+    coordinates[9][1] = 0.5*x[0][1] + 0.5*x[1][1];
+    coordinates[9][2] = 0.5*x[0][2] + 0.5*x[1][2];
 }
 
 /// Return the number of sub dof maps (for a mixed element)
@@ -8763,7 +10205,7 @@ UFC_SolitaryWave3DBilinearForm_dof_map_0
 /// Return a string identifying the dof map
 const char* UFC_SolitaryWave3DBilinearForm_dof_map_0::signature() const
 {
-    return "FFC dof map for MixedElement([FiniteElement('Lagrange', 'tetrahedron', 1), FiniteElement('Lagrange', 'tetrahedron', 1)])";
+    return "FFC dof map for MixedElement([FiniteElement('Lagrange', 'tetrahedron', 2), FiniteElement('Lagrange', 'tetrahedron', 2)])";
 }
 
 /// Return true iff mesh entities of topological dimension d are needed
@@ -8775,7 +10217,7 @@ bool UFC_SolitaryWave3DBilinearForm_dof_
       return true;
       break;
     case 1:
-      return false;
+      return true;
       break;
     case 2:
       return false;
@@ -8790,7 +10232,7 @@ bool UFC_SolitaryWave3DBilinearForm_dof_
 /// Initialize dof map for mesh (return true iff init_cell() is needed)
 bool UFC_SolitaryWave3DBilinearForm_dof_map_0::init_mesh(const ufc::mesh& m)
 {
-    __global_dimension = 2*m.num_entities[0];
+    __global_dimension = 2*m.num_entities[0] + 2*m.num_entities[1];
     return false;
 }
 
@@ -8816,7 +10258,7 @@ unsigned int UFC_SolitaryWave3DBilinearF
 /// Return the dimension of the local finite element function space
 unsigned int UFC_SolitaryWave3DBilinearForm_dof_map_0::local_dimension() const
 {
-    return 8;
+    return 20;
 }
 
 // Return the geometric dimension of the coordinates this dof map provides
@@ -8828,7 +10270,7 @@ unsigned int UFC_SolitaryWave3DBilinearF
 /// Return the number of dofs on each cell facet
 unsigned int UFC_SolitaryWave3DBilinearForm_dof_map_0::num_facet_dofs() const
 {
-    return 6;
+    return 12;
 }
 
 /// Return the number of dofs associated with each cell entity of dimension d
@@ -8847,10 +10289,24 @@ void UFC_SolitaryWave3DBilinearForm_dof_
     dofs[2] = c.entity_indices[0][2];
     dofs[3] = c.entity_indices[0][3];
     unsigned int offset = m.num_entities[0];
-    dofs[4] = offset + c.entity_indices[0][0];
-    dofs[5] = offset + c.entity_indices[0][1];
-    dofs[6] = offset + c.entity_indices[0][2];
-    dofs[7] = offset + c.entity_indices[0][3];
+    dofs[4] = offset + c.entity_indices[1][0];
+    dofs[5] = offset + c.entity_indices[1][1];
+    dofs[6] = offset + c.entity_indices[1][2];
+    dofs[7] = offset + c.entity_indices[1][3];
+    dofs[8] = offset + c.entity_indices[1][4];
+    dofs[9] = offset + c.entity_indices[1][5];
+    offset = offset + m.num_entities[1];
+    dofs[10] = offset + c.entity_indices[0][0];
+    dofs[11] = offset + c.entity_indices[0][1];
+    dofs[12] = offset + c.entity_indices[0][2];
+    dofs[13] = offset + c.entity_indices[0][3];
+    offset = offset + m.num_entities[0];
+    dofs[14] = offset + c.entity_indices[1][0];
+    dofs[15] = offset + c.entity_indices[1][1];
+    dofs[16] = offset + c.entity_indices[1][2];
+    dofs[17] = offset + c.entity_indices[1][3];
+    dofs[18] = offset + c.entity_indices[1][4];
+    dofs[19] = offset + c.entity_indices[1][5];
 }
 
 /// Tabulate the local-to-local mapping from facet dofs to cell dofs
@@ -8863,33 +10319,57 @@ void UFC_SolitaryWave3DBilinearForm_dof_
       dofs[0] = 1;
       dofs[1] = 2;
       dofs[2] = 3;
-      dofs[3] = 5;
-      dofs[4] = 6;
-      dofs[5] = 7;
-      break;
-    case 1:
-      dofs[0] = 0;
-      dofs[1] = 2;
-      dofs[2] = 3;
-      dofs[3] = 4;
-      dofs[4] = 6;
-      dofs[5] = 7;
-      break;
-    case 2:
-      dofs[0] = 0;
-      dofs[1] = 1;
-      dofs[2] = 3;
-      dofs[3] = 4;
-      dofs[4] = 5;
-      dofs[5] = 7;
-      break;
-    case 3:
-      dofs[0] = 0;
-      dofs[1] = 1;
-      dofs[2] = 2;
       dofs[3] = 4;
       dofs[4] = 5;
       dofs[5] = 6;
+      dofs[6] = 11;
+      dofs[7] = 12;
+      dofs[8] = 13;
+      dofs[9] = 14;
+      dofs[10] = 15;
+      dofs[11] = 16;
+      break;
+    case 1:
+      dofs[0] = 0;
+      dofs[1] = 2;
+      dofs[2] = 3;
+      dofs[3] = 4;
+      dofs[4] = 7;
+      dofs[5] = 8;
+      dofs[6] = 10;
+      dofs[7] = 12;
+      dofs[8] = 13;
+      dofs[9] = 14;
+      dofs[10] = 17;
+      dofs[11] = 18;
+      break;
+    case 2:
+      dofs[0] = 0;
+      dofs[1] = 1;
+      dofs[2] = 3;
+      dofs[3] = 5;
+      dofs[4] = 7;
+      dofs[5] = 9;
+      dofs[6] = 10;
+      dofs[7] = 11;
+      dofs[8] = 13;
+      dofs[9] = 15;
+      dofs[10] = 17;
+      dofs[11] = 19;
+      break;
+    case 3:
+      dofs[0] = 0;
+      dofs[1] = 1;
+      dofs[2] = 2;
+      dofs[3] = 6;
+      dofs[4] = 8;
+      dofs[5] = 9;
+      dofs[6] = 10;
+      dofs[7] = 11;
+      dofs[8] = 12;
+      dofs[9] = 16;
+      dofs[10] = 18;
+      dofs[11] = 19;
       break;
     }
 }
@@ -8918,18 +10398,54 @@ void UFC_SolitaryWave3DBilinearForm_dof_
     coordinates[3][0] = x[3][0];
     coordinates[3][1] = x[3][1];
     coordinates[3][2] = x[3][2];
-    coordinates[4][0] = x[0][0];
-    coordinates[4][1] = x[0][1];
-    coordinates[4][2] = x[0][2];
-    coordinates[5][0] = x[1][0];
-    coordinates[5][1] = x[1][1];
-    coordinates[5][2] = x[1][2];
-    coordinates[6][0] = x[2][0];
-    coordinates[6][1] = x[2][1];
-    coordinates[6][2] = x[2][2];
-    coordinates[7][0] = x[3][0];
-    coordinates[7][1] = x[3][1];
-    coordinates[7][2] = x[3][2];
+    coordinates[4][0] = 0.5*x[2][0] + 0.5*x[3][0];
+    coordinates[4][1] = 0.5*x[2][1] + 0.5*x[3][1];
+    coordinates[4][2] = 0.5*x[2][2] + 0.5*x[3][2];
+    coordinates[5][0] = 0.5*x[1][0] + 0.5*x[3][0];
+    coordinates[5][1] = 0.5*x[1][1] + 0.5*x[3][1];
+    coordinates[5][2] = 0.5*x[1][2] + 0.5*x[3][2];
+    coordinates[6][0] = 0.5*x[1][0] + 0.5*x[2][0];
+    coordinates[6][1] = 0.5*x[1][1] + 0.5*x[2][1];
+    coordinates[6][2] = 0.5*x[1][2] + 0.5*x[2][2];
+    coordinates[7][0] = 0.5*x[0][0] + 0.5*x[3][0];
+    coordinates[7][1] = 0.5*x[0][1] + 0.5*x[3][1];
+    coordinates[7][2] = 0.5*x[0][2] + 0.5*x[3][2];
+    coordinates[8][0] = 0.5*x[0][0] + 0.5*x[2][0];
+    coordinates[8][1] = 0.5*x[0][1] + 0.5*x[2][1];
+    coordinates[8][2] = 0.5*x[0][2] + 0.5*x[2][2];
+    coordinates[9][0] = 0.5*x[0][0] + 0.5*x[1][0];
+    coordinates[9][1] = 0.5*x[0][1] + 0.5*x[1][1];
+    coordinates[9][2] = 0.5*x[0][2] + 0.5*x[1][2];
+    coordinates[10][0] = x[0][0];
+    coordinates[10][1] = x[0][1];
+    coordinates[10][2] = x[0][2];
+    coordinates[11][0] = x[1][0];
+    coordinates[11][1] = x[1][1];
+    coordinates[11][2] = x[1][2];
+    coordinates[12][0] = x[2][0];
+    coordinates[12][1] = x[2][1];
+    coordinates[12][2] = x[2][2];
+    coordinates[13][0] = x[3][0];
+    coordinates[13][1] = x[3][1];
+    coordinates[13][2] = x[3][2];
+    coordinates[14][0] = 0.5*x[2][0] + 0.5*x[3][0];
+    coordinates[14][1] = 0.5*x[2][1] + 0.5*x[3][1];
+    coordinates[14][2] = 0.5*x[2][2] + 0.5*x[3][2];
+    coordinates[15][0] = 0.5*x[1][0] + 0.5*x[3][0];
+    coordinates[15][1] = 0.5*x[1][1] + 0.5*x[3][1];
+    coordinates[15][2] = 0.5*x[1][2] + 0.5*x[3][2];
+    coordinates[16][0] = 0.5*x[1][0] + 0.5*x[2][0];
+    coordinates[16][1] = 0.5*x[1][1] + 0.5*x[2][1];
+    coordinates[16][2] = 0.5*x[1][2] + 0.5*x[2][2];
+    coordinates[17][0] = 0.5*x[0][0] + 0.5*x[3][0];
+    coordinates[17][1] = 0.5*x[0][1] + 0.5*x[3][1];
+    coordinates[17][2] = 0.5*x[0][2] + 0.5*x[3][2];
+    coordinates[18][0] = 0.5*x[0][0] + 0.5*x[2][0];
+    coordinates[18][1] = 0.5*x[0][1] + 0.5*x[2][1];
+    coordinates[18][2] = 0.5*x[0][2] + 0.5*x[2][2];
+    coordinates[19][0] = 0.5*x[0][0] + 0.5*x[1][0];
+    coordinates[19][1] = 0.5*x[0][1] + 0.5*x[1][1];
+    coordinates[19][2] = 0.5*x[0][2] + 0.5*x[1][2];
 }
 
 /// Return the number of sub dof maps (for a mixed element)
@@ -8969,7 +10485,7 @@ UFC_SolitaryWave3DBilinearForm_dof_map_1
 /// Return a string identifying the dof map
 const char* UFC_SolitaryWave3DBilinearForm_dof_map_1_0::signature() const
 {
-    return "FFC dof map for FiniteElement('Lagrange', 'tetrahedron', 1)";
+    return "FFC dof map for FiniteElement('Lagrange', 'tetrahedron', 2)";
 }
 
 /// Return true iff mesh entities of topological dimension d are needed
@@ -8981,7 +10497,7 @@ bool UFC_SolitaryWave3DBilinearForm_dof_
       return true;
       break;
     case 1:
-      return false;
+      return true;
       break;
     case 2:
       return false;
@@ -8996,7 +10512,7 @@ bool UFC_SolitaryWave3DBilinearForm_dof_
 /// Initialize dof map for mesh (return true iff init_cell() is needed)
 bool UFC_SolitaryWave3DBilinearForm_dof_map_1_0::init_mesh(const ufc::mesh& m)
 {
-    __global_dimension = m.num_entities[0];
+    __global_dimension = m.num_entities[0] + m.num_entities[1];
     return false;
 }
 
@@ -9022,7 +10538,7 @@ unsigned int UFC_SolitaryWave3DBilinearF
 /// Return the dimension of the local finite element function space
 unsigned int UFC_SolitaryWave3DBilinearForm_dof_map_1_0::local_dimension() const
 {
-    return 4;
+    return 10;
 }
 
 // Return the geometric dimension of the coordinates this dof map provides
@@ -9034,7 +10550,7 @@ unsigned int UFC_SolitaryWave3DBilinearF
 /// Return the number of dofs on each cell facet
 unsigned int UFC_SolitaryWave3DBilinearForm_dof_map_1_0::num_facet_dofs() const
 {
-    return 3;
+    return 6;
 }
 
 /// Return the number of dofs associated with each cell entity of dimension d
@@ -9052,6 +10568,13 @@ void UFC_SolitaryWave3DBilinearForm_dof_
     dofs[1] = c.entity_indices[0][1];
     dofs[2] = c.entity_indices[0][2];
     dofs[3] = c.entity_indices[0][3];
+    unsigned int offset = m.num_entities[0];
+    dofs[4] = offset + c.entity_indices[1][0];
+    dofs[5] = offset + c.entity_indices[1][1];
+    dofs[6] = offset + c.entity_indices[1][2];
+    dofs[7] = offset + c.entity_indices[1][3];
+    dofs[8] = offset + c.entity_indices[1][4];
+    dofs[9] = offset + c.entity_indices[1][5];
 }
 
 /// Tabulate the local-to-local mapping from facet dofs to cell dofs
@@ -9064,21 +10587,33 @@ void UFC_SolitaryWave3DBilinearForm_dof_
       dofs[0] = 1;
       dofs[1] = 2;
       dofs[2] = 3;
-      break;
-    case 1:
-      dofs[0] = 0;
-      dofs[1] = 2;
-      dofs[2] = 3;
-      break;
-    case 2:
-      dofs[0] = 0;
-      dofs[1] = 1;
-      dofs[2] = 3;
+      dofs[3] = 4;
+      dofs[4] = 5;
+      dofs[5] = 6;
+      break;
+    case 1:
+      dofs[0] = 0;
+      dofs[1] = 2;
+      dofs[2] = 3;
+      dofs[3] = 4;
+      dofs[4] = 7;
+      dofs[5] = 8;
+      break;
+    case 2:
+      dofs[0] = 0;
+      dofs[1] = 1;
+      dofs[2] = 3;
+      dofs[3] = 5;
+      dofs[4] = 7;
+      dofs[5] = 9;
       break;
     case 3:
       dofs[0] = 0;
       dofs[1] = 1;
       dofs[2] = 2;
+      dofs[3] = 6;
+      dofs[4] = 8;
+      dofs[5] = 9;
       break;
     }
 }
@@ -9107,6 +10642,24 @@ void UFC_SolitaryWave3DBilinearForm_dof_
     coordinates[3][0] = x[3][0];
     coordinates[3][1] = x[3][1];
     coordinates[3][2] = x[3][2];
+    coordinates[4][0] = 0.5*x[2][0] + 0.5*x[3][0];
+    coordinates[4][1] = 0.5*x[2][1] + 0.5*x[3][1];
+    coordinates[4][2] = 0.5*x[2][2] + 0.5*x[3][2];
+    coordinates[5][0] = 0.5*x[1][0] + 0.5*x[3][0];
+    coordinates[5][1] = 0.5*x[1][1] + 0.5*x[3][1];
+    coordinates[5][2] = 0.5*x[1][2] + 0.5*x[3][2];
+    coordinates[6][0] = 0.5*x[1][0] + 0.5*x[2][0];
+    coordinates[6][1] = 0.5*x[1][1] + 0.5*x[2][1];
+    coordinates[6][2] = 0.5*x[1][2] + 0.5*x[2][2];
+    coordinates[7][0] = 0.5*x[0][0] + 0.5*x[3][0];
+    coordinates[7][1] = 0.5*x[0][1] + 0.5*x[3][1];
+    coordinates[7][2] = 0.5*x[0][2] + 0.5*x[3][2];
+    coordinates[8][0] = 0.5*x[0][0] + 0.5*x[2][0];
+    coordinates[8][1] = 0.5*x[0][1] + 0.5*x[2][1];
+    coordinates[8][2] = 0.5*x[0][2] + 0.5*x[2][2];
+    coordinates[9][0] = 0.5*x[0][0] + 0.5*x[1][0];
+    coordinates[9][1] = 0.5*x[0][1] + 0.5*x[1][1];
+    coordinates[9][2] = 0.5*x[0][2] + 0.5*x[1][2];
 }
 
 /// Return the number of sub dof maps (for a mixed element)
@@ -9137,7 +10690,7 @@ UFC_SolitaryWave3DBilinearForm_dof_map_1
 /// Return a string identifying the dof map
 const char* UFC_SolitaryWave3DBilinearForm_dof_map_1_1::signature() const
 {
-    return "FFC dof map for FiniteElement('Lagrange', 'tetrahedron', 1)";
+    return "FFC dof map for FiniteElement('Lagrange', 'tetrahedron', 2)";
 }
 
 /// Return true iff mesh entities of topological dimension d are needed
@@ -9149,7 +10702,7 @@ bool UFC_SolitaryWave3DBilinearForm_dof_
       return true;
       break;
     case 1:
-      return false;
+      return true;
       break;
     case 2:
       return false;
@@ -9164,7 +10717,7 @@ bool UFC_SolitaryWave3DBilinearForm_dof_
 /// Initialize dof map for mesh (return true iff init_cell() is needed)
 bool UFC_SolitaryWave3DBilinearForm_dof_map_1_1::init_mesh(const ufc::mesh& m)
 {
-    __global_dimension = m.num_entities[0];
+    __global_dimension = m.num_entities[0] + m.num_entities[1];
     return false;
 }
 
@@ -9190,7 +10743,7 @@ unsigned int UFC_SolitaryWave3DBilinearF
 /// Return the dimension of the local finite element function space
 unsigned int UFC_SolitaryWave3DBilinearForm_dof_map_1_1::local_dimension() const
 {
-    return 4;
+    return 10;
 }
 
 // Return the geometric dimension of the coordinates this dof map provides
@@ -9202,7 +10755,7 @@ unsigned int UFC_SolitaryWave3DBilinearF
 /// Return the number of dofs on each cell facet
 unsigned int UFC_SolitaryWave3DBilinearForm_dof_map_1_1::num_facet_dofs() const
 {
-    return 3;
+    return 6;
 }
 
 /// Return the number of dofs associated with each cell entity of dimension d
@@ -9220,6 +10773,13 @@ void UFC_SolitaryWave3DBilinearForm_dof_
     dofs[1] = c.entity_indices[0][1];
     dofs[2] = c.entity_indices[0][2];
     dofs[3] = c.entity_indices[0][3];
+    unsigned int offset = m.num_entities[0];
+    dofs[4] = offset + c.entity_indices[1][0];
+    dofs[5] = offset + c.entity_indices[1][1];
+    dofs[6] = offset + c.entity_indices[1][2];
+    dofs[7] = offset + c.entity_indices[1][3];
+    dofs[8] = offset + c.entity_indices[1][4];
+    dofs[9] = offset + c.entity_indices[1][5];
 }
 
 /// Tabulate the local-to-local mapping from facet dofs to cell dofs
@@ -9232,21 +10792,33 @@ void UFC_SolitaryWave3DBilinearForm_dof_
       dofs[0] = 1;
       dofs[1] = 2;
       dofs[2] = 3;
-      break;
-    case 1:
-      dofs[0] = 0;
-      dofs[1] = 2;
-      dofs[2] = 3;
-      break;
-    case 2:
-      dofs[0] = 0;
-      dofs[1] = 1;
-      dofs[2] = 3;
+      dofs[3] = 4;
+      dofs[4] = 5;
+      dofs[5] = 6;
+      break;
+    case 1:
+      dofs[0] = 0;
+      dofs[1] = 2;
+      dofs[2] = 3;
+      dofs[3] = 4;
+      dofs[4] = 7;
+      dofs[5] = 8;
+      break;
+    case 2:
+      dofs[0] = 0;
+      dofs[1] = 1;
+      dofs[2] = 3;
+      dofs[3] = 5;
+      dofs[4] = 7;
+      dofs[5] = 9;
       break;
     case 3:
       dofs[0] = 0;
       dofs[1] = 1;
       dofs[2] = 2;
+      dofs[3] = 6;
+      dofs[4] = 8;
+      dofs[5] = 9;
       break;
     }
 }
@@ -9275,6 +10847,24 @@ void UFC_SolitaryWave3DBilinearForm_dof_
     coordinates[3][0] = x[3][0];
     coordinates[3][1] = x[3][1];
     coordinates[3][2] = x[3][2];
+    coordinates[4][0] = 0.5*x[2][0] + 0.5*x[3][0];
+    coordinates[4][1] = 0.5*x[2][1] + 0.5*x[3][1];
+    coordinates[4][2] = 0.5*x[2][2] + 0.5*x[3][2];
+    coordinates[5][0] = 0.5*x[1][0] + 0.5*x[3][0];
+    coordinates[5][1] = 0.5*x[1][1] + 0.5*x[3][1];
+    coordinates[5][2] = 0.5*x[1][2] + 0.5*x[3][2];
+    coordinates[6][0] = 0.5*x[1][0] + 0.5*x[2][0];
+    coordinates[6][1] = 0.5*x[1][1] + 0.5*x[2][1];
+    coordinates[6][2] = 0.5*x[1][2] + 0.5*x[2][2];
+    coordinates[7][0] = 0.5*x[0][0] + 0.5*x[3][0];
+    coordinates[7][1] = 0.5*x[0][1] + 0.5*x[3][1];
+    coordinates[7][2] = 0.5*x[0][2] + 0.5*x[3][2];
+    coordinates[8][0] = 0.5*x[0][0] + 0.5*x[2][0];
+    coordinates[8][1] = 0.5*x[0][1] + 0.5*x[2][1];
+    coordinates[8][2] = 0.5*x[0][2] + 0.5*x[2][2];
+    coordinates[9][0] = 0.5*x[0][0] + 0.5*x[1][0];
+    coordinates[9][1] = 0.5*x[0][1] + 0.5*x[1][1];
+    coordinates[9][2] = 0.5*x[0][2] + 0.5*x[1][2];
 }
 
 /// Return the number of sub dof maps (for a mixed element)
@@ -9305,7 +10895,7 @@ UFC_SolitaryWave3DBilinearForm_dof_map_1
 /// Return a string identifying the dof map
 const char* UFC_SolitaryWave3DBilinearForm_dof_map_1::signature() const
 {
-    return "FFC dof map for MixedElement([FiniteElement('Lagrange', 'tetrahedron', 1), FiniteElement('Lagrange', 'tetrahedron', 1)])";
+    return "FFC dof map for MixedElement([FiniteElement('Lagrange', 'tetrahedron', 2), FiniteElement('Lagrange', 'tetrahedron', 2)])";
 }
 
 /// Return true iff mesh entities of topological dimension d are needed
@@ -9317,7 +10907,7 @@ bool UFC_SolitaryWave3DBilinearForm_dof_
       return true;
       break;
     case 1:
-      return false;
+      return true;
       break;
     case 2:
       return false;
@@ -9332,7 +10922,7 @@ bool UFC_SolitaryWave3DBilinearForm_dof_
 /// Initialize dof map for mesh (return true iff init_cell() is needed)
 bool UFC_SolitaryWave3DBilinearForm_dof_map_1::init_mesh(const ufc::mesh& m)
 {
-    __global_dimension = 2*m.num_entities[0];
+    __global_dimension = 2*m.num_entities[0] + 2*m.num_entities[1];
     return false;
 }
 
@@ -9358,7 +10948,7 @@ unsigned int UFC_SolitaryWave3DBilinearF
 /// Return the dimension of the local finite element function space
 unsigned int UFC_SolitaryWave3DBilinearForm_dof_map_1::local_dimension() const
 {
-    return 8;
+    return 20;
 }
 
 // Return the geometric dimension of the coordinates this dof map provides
@@ -9370,7 +10960,7 @@ unsigned int UFC_SolitaryWave3DBilinearF
 /// Return the number of dofs on each cell facet
 unsigned int UFC_SolitaryWave3DBilinearForm_dof_map_1::num_facet_dofs() const
 {
-    return 6;
+    return 12;
 }
 
 /// Return the number of dofs associated with each cell entity of dimension d
@@ -9389,10 +10979,24 @@ void UFC_SolitaryWave3DBilinearForm_dof_
     dofs[2] = c.entity_indices[0][2];
     dofs[3] = c.entity_indices[0][3];
     unsigned int offset = m.num_entities[0];
-    dofs[4] = offset + c.entity_indices[0][0];
-    dofs[5] = offset + c.entity_indices[0][1];
-    dofs[6] = offset + c.entity_indices[0][2];
-    dofs[7] = offset + c.entity_indices[0][3];
+    dofs[4] = offset + c.entity_indices[1][0];
+    dofs[5] = offset + c.entity_indices[1][1];
+    dofs[6] = offset + c.entity_indices[1][2];
+    dofs[7] = offset + c.entity_indices[1][3];
+    dofs[8] = offset + c.entity_indices[1][4];
+    dofs[9] = offset + c.entity_indices[1][5];
+    offset = offset + m.num_entities[1];
+    dofs[10] = offset + c.entity_indices[0][0];
+    dofs[11] = offset + c.entity_indices[0][1];
+    dofs[12] = offset + c.entity_indices[0][2];
+    dofs[13] = offset + c.entity_indices[0][3];
+    offset = offset + m.num_entities[0];
+    dofs[14] = offset + c.entity_indices[1][0];
+    dofs[15] = offset + c.entity_indices[1][1];
+    dofs[16] = offset + c.entity_indices[1][2];
+    dofs[17] = offset + c.entity_indices[1][3];
+    dofs[18] = offset + c.entity_indices[1][4];
+    dofs[19] = offset + c.entity_indices[1][5];
 }
 
 /// Tabulate the local-to-local mapping from facet dofs to cell dofs
@@ -9405,33 +11009,57 @@ void UFC_SolitaryWave3DBilinearForm_dof_
       dofs[0] = 1;
       dofs[1] = 2;
       dofs[2] = 3;
-      dofs[3] = 5;
-      dofs[4] = 6;
-      dofs[5] = 7;
-      break;
-    case 1:
-      dofs[0] = 0;
-      dofs[1] = 2;
-      dofs[2] = 3;
-      dofs[3] = 4;
-      dofs[4] = 6;
-      dofs[5] = 7;
-      break;
-    case 2:
-      dofs[0] = 0;
-      dofs[1] = 1;
-      dofs[2] = 3;
-      dofs[3] = 4;
-      dofs[4] = 5;
-      dofs[5] = 7;
-      break;
-    case 3:
-      dofs[0] = 0;
-      dofs[1] = 1;
-      dofs[2] = 2;
       dofs[3] = 4;
       dofs[4] = 5;
       dofs[5] = 6;
+      dofs[6] = 11;
+      dofs[7] = 12;
+      dofs[8] = 13;
+      dofs[9] = 14;
+      dofs[10] = 15;
+      dofs[11] = 16;
+      break;
+    case 1:
+      dofs[0] = 0;
+      dofs[1] = 2;
+      dofs[2] = 3;
+      dofs[3] = 4;
+      dofs[4] = 7;
+      dofs[5] = 8;
+      dofs[6] = 10;
+      dofs[7] = 12;
+      dofs[8] = 13;
+      dofs[9] = 14;
+      dofs[10] = 17;
+      dofs[11] = 18;
+      break;
+    case 2:
+      dofs[0] = 0;
+      dofs[1] = 1;
+      dofs[2] = 3;
+      dofs[3] = 5;
+      dofs[4] = 7;
+      dofs[5] = 9;
+      dofs[6] = 10;
+      dofs[7] = 11;
+      dofs[8] = 13;
+      dofs[9] = 15;
+      dofs[10] = 17;
+      dofs[11] = 19;
+      break;
+    case 3:
+      dofs[0] = 0;
+      dofs[1] = 1;
+      dofs[2] = 2;
+      dofs[3] = 6;
+      dofs[4] = 8;
+      dofs[5] = 9;
+      dofs[6] = 10;
+      dofs[7] = 11;
+      dofs[8] = 12;
+      dofs[9] = 16;
+      dofs[10] = 18;
+      dofs[11] = 19;
       break;
     }
 }
@@ -9460,18 +11088,54 @@ void UFC_SolitaryWave3DBilinearForm_dof_
     coordinates[3][0] = x[3][0];
     coordinates[3][1] = x[3][1];
     coordinates[3][2] = x[3][2];
-    coordinates[4][0] = x[0][0];
-    coordinates[4][1] = x[0][1];
-    coordinates[4][2] = x[0][2];
-    coordinates[5][0] = x[1][0];
-    coordinates[5][1] = x[1][1];
-    coordinates[5][2] = x[1][2];
-    coordinates[6][0] = x[2][0];
-    coordinates[6][1] = x[2][1];
-    coordinates[6][2] = x[2][2];
-    coordinates[7][0] = x[3][0];
-    coordinates[7][1] = x[3][1];
-    coordinates[7][2] = x[3][2];
+    coordinates[4][0] = 0.5*x[2][0] + 0.5*x[3][0];
+    coordinates[4][1] = 0.5*x[2][1] + 0.5*x[3][1];
+    coordinates[4][2] = 0.5*x[2][2] + 0.5*x[3][2];
+    coordinates[5][0] = 0.5*x[1][0] + 0.5*x[3][0];
+    coordinates[5][1] = 0.5*x[1][1] + 0.5*x[3][1];
+    coordinates[5][2] = 0.5*x[1][2] + 0.5*x[3][2];
+    coordinates[6][0] = 0.5*x[1][0] + 0.5*x[2][0];
+    coordinates[6][1] = 0.5*x[1][1] + 0.5*x[2][1];
+    coordinates[6][2] = 0.5*x[1][2] + 0.5*x[2][2];
+    coordinates[7][0] = 0.5*x[0][0] + 0.5*x[3][0];
+    coordinates[7][1] = 0.5*x[0][1] + 0.5*x[3][1];
+    coordinates[7][2] = 0.5*x[0][2] + 0.5*x[3][2];
+    coordinates[8][0] = 0.5*x[0][0] + 0.5*x[2][0];
+    coordinates[8][1] = 0.5*x[0][1] + 0.5*x[2][1];
+    coordinates[8][2] = 0.5*x[0][2] + 0.5*x[2][2];
+    coordinates[9][0] = 0.5*x[0][0] + 0.5*x[1][0];
+    coordinates[9][1] = 0.5*x[0][1] + 0.5*x[1][1];
+    coordinates[9][2] = 0.5*x[0][2] + 0.5*x[1][2];
+    coordinates[10][0] = x[0][0];
+    coordinates[10][1] = x[0][1];
+    coordinates[10][2] = x[0][2];
+    coordinates[11][0] = x[1][0];
+    coordinates[11][1] = x[1][1];
+    coordinates[11][2] = x[1][2];
+    coordinates[12][0] = x[2][0];
+    coordinates[12][1] = x[2][1];
+    coordinates[12][2] = x[2][2];
+    coordinates[13][0] = x[3][0];
+    coordinates[13][1] = x[3][1];
+    coordinates[13][2] = x[3][2];
+    coordinates[14][0] = 0.5*x[2][0] + 0.5*x[3][0];
+    coordinates[14][1] = 0.5*x[2][1] + 0.5*x[3][1];
+    coordinates[14][2] = 0.5*x[2][2] + 0.5*x[3][2];
+    coordinates[15][0] = 0.5*x[1][0] + 0.5*x[3][0];
+    coordinates[15][1] = 0.5*x[1][1] + 0.5*x[3][1];
+    coordinates[15][2] = 0.5*x[1][2] + 0.5*x[3][2];
+    coordinates[16][0] = 0.5*x[1][0] + 0.5*x[2][0];
+    coordinates[16][1] = 0.5*x[1][1] + 0.5*x[2][1];
+    coordinates[16][2] = 0.5*x[1][2] + 0.5*x[2][2];
+    coordinates[17][0] = 0.5*x[0][0] + 0.5*x[3][0];
+    coordinates[17][1] = 0.5*x[0][1] + 0.5*x[3][1];
+    coordinates[17][2] = 0.5*x[0][2] + 0.5*x[3][2];
+    coordinates[18][0] = 0.5*x[0][0] + 0.5*x[2][0];
+    coordinates[18][1] = 0.5*x[0][1] + 0.5*x[2][1];
+    coordinates[18][2] = 0.5*x[0][2] + 0.5*x[2][2];
+    coordinates[19][0] = 0.5*x[0][0] + 0.5*x[1][0];
+    coordinates[19][1] = 0.5*x[0][1] + 0.5*x[1][1];
+    coordinates[19][2] = 0.5*x[0][2] + 0.5*x[1][2];
 }
 
 /// Return the number of sub dof maps (for a mixed element)
@@ -9511,7 +11175,7 @@ UFC_SolitaryWave3DBilinearForm_dof_map_2
 /// Return a string identifying the dof map
 const char* UFC_SolitaryWave3DBilinearForm_dof_map_2_0::signature() const
 {
-    return "FFC dof map for FiniteElement('Lagrange', 'tetrahedron', 1)";
+    return "FFC dof map for FiniteElement('Lagrange', 'tetrahedron', 2)";
 }
 
 /// Return true iff mesh entities of topological dimension d are needed
@@ -9523,7 +11187,7 @@ bool UFC_SolitaryWave3DBilinearForm_dof_
       return true;
       break;
     case 1:
-      return false;
+      return true;
       break;
     case 2:
       return false;
@@ -9538,7 +11202,7 @@ bool UFC_SolitaryWave3DBilinearForm_dof_
 /// Initialize dof map for mesh (return true iff init_cell() is needed)
 bool UFC_SolitaryWave3DBilinearForm_dof_map_2_0::init_mesh(const ufc::mesh& m)
 {
-    __global_dimension = m.num_entities[0];
+    __global_dimension = m.num_entities[0] + m.num_entities[1];
     return false;
 }
 
@@ -9564,7 +11228,7 @@ unsigned int UFC_SolitaryWave3DBilinearF
 /// Return the dimension of the local finite element function space
 unsigned int UFC_SolitaryWave3DBilinearForm_dof_map_2_0::local_dimension() const
 {
-    return 4;
+    return 10;
 }
 
 // Return the geometric dimension of the coordinates this dof map provides
@@ -9576,7 +11240,7 @@ unsigned int UFC_SolitaryWave3DBilinearF
 /// Return the number of dofs on each cell facet
 unsigned int UFC_SolitaryWave3DBilinearForm_dof_map_2_0::num_facet_dofs() const
 {
-    return 3;
+    return 6;
 }
 
 /// Return the number of dofs associated with each cell entity of dimension d
@@ -9594,6 +11258,13 @@ void UFC_SolitaryWave3DBilinearForm_dof_
     dofs[1] = c.entity_indices[0][1];
     dofs[2] = c.entity_indices[0][2];
     dofs[3] = c.entity_indices[0][3];
+    unsigned int offset = m.num_entities[0];
+    dofs[4] = offset + c.entity_indices[1][0];
+    dofs[5] = offset + c.entity_indices[1][1];
+    dofs[6] = offset + c.entity_indices[1][2];
+    dofs[7] = offset + c.entity_indices[1][3];
+    dofs[8] = offset + c.entity_indices[1][4];
+    dofs[9] = offset + c.entity_indices[1][5];
 }
 
 /// Tabulate the local-to-local mapping from facet dofs to cell dofs
@@ -9606,21 +11277,33 @@ void UFC_SolitaryWave3DBilinearForm_dof_
       dofs[0] = 1;
       dofs[1] = 2;
       dofs[2] = 3;
-      break;
-    case 1:
-      dofs[0] = 0;
-      dofs[1] = 2;
-      dofs[2] = 3;
-      break;
-    case 2:
-      dofs[0] = 0;
-      dofs[1] = 1;
-      dofs[2] = 3;
+      dofs[3] = 4;
+      dofs[4] = 5;
+      dofs[5] = 6;
+      break;
+    case 1:
+      dofs[0] = 0;
+      dofs[1] = 2;
+      dofs[2] = 3;
+      dofs[3] = 4;
+      dofs[4] = 7;
+      dofs[5] = 8;
+      break;
+    case 2:
+      dofs[0] = 0;
+      dofs[1] = 1;
+      dofs[2] = 3;
+      dofs[3] = 5;
+      dofs[4] = 7;
+      dofs[5] = 9;
       break;
     case 3:
       dofs[0] = 0;
       dofs[1] = 1;
       dofs[2] = 2;
+      dofs[3] = 6;
+      dofs[4] = 8;
+      dofs[5] = 9;
       break;
     }
 }
@@ -9649,6 +11332,24 @@ void UFC_SolitaryWave3DBilinearForm_dof_
     coordinates[3][0] = x[3][0];
     coordinates[3][1] = x[3][1];
     coordinates[3][2] = x[3][2];
+    coordinates[4][0] = 0.5*x[2][0] + 0.5*x[3][0];
+    coordinates[4][1] = 0.5*x[2][1] + 0.5*x[3][1];
+    coordinates[4][2] = 0.5*x[2][2] + 0.5*x[3][2];
+    coordinates[5][0] = 0.5*x[1][0] + 0.5*x[3][0];
+    coordinates[5][1] = 0.5*x[1][1] + 0.5*x[3][1];
+    coordinates[5][2] = 0.5*x[1][2] + 0.5*x[3][2];
+    coordinates[6][0] = 0.5*x[1][0] + 0.5*x[2][0];
+    coordinates[6][1] = 0.5*x[1][1] + 0.5*x[2][1];
+    coordinates[6][2] = 0.5*x[1][2] + 0.5*x[2][2];
+    coordinates[7][0] = 0.5*x[0][0] + 0.5*x[3][0];
+    coordinates[7][1] = 0.5*x[0][1] + 0.5*x[3][1];
+    coordinates[7][2] = 0.5*x[0][2] + 0.5*x[3][2];
+    coordinates[8][0] = 0.5*x[0][0] + 0.5*x[2][0];
+    coordinates[8][1] = 0.5*x[0][1] + 0.5*x[2][1];
+    coordinates[8][2] = 0.5*x[0][2] + 0.5*x[2][2];
+    coordinates[9][0] = 0.5*x[0][0] + 0.5*x[1][0];
+    coordinates[9][1] = 0.5*x[0][1] + 0.5*x[1][1];
+    coordinates[9][2] = 0.5*x[0][2] + 0.5*x[1][2];
 }
 
 /// Return the number of sub dof maps (for a mixed element)
@@ -9679,7 +11380,7 @@ UFC_SolitaryWave3DBilinearForm_dof_map_2
 /// Return a string identifying the dof map
 const char* UFC_SolitaryWave3DBilinearForm_dof_map_2_1::signature() const
 {
-    return "FFC dof map for FiniteElement('Lagrange', 'tetrahedron', 1)";
+    return "FFC dof map for FiniteElement('Lagrange', 'tetrahedron', 2)";
 }
 
 /// Return true iff mesh entities of topological dimension d are needed
@@ -9691,7 +11392,7 @@ bool UFC_SolitaryWave3DBilinearForm_dof_
       return true;
       break;
     case 1:
-      return false;
+      return true;
       break;
     case 2:
       return false;
@@ -9706,7 +11407,7 @@ bool UFC_SolitaryWave3DBilinearForm_dof_
 /// Initialize dof map for mesh (return true iff init_cell() is needed)
 bool UFC_SolitaryWave3DBilinearForm_dof_map_2_1::init_mesh(const ufc::mesh& m)
 {
-    __global_dimension = m.num_entities[0];
+    __global_dimension = m.num_entities[0] + m.num_entities[1];
     return false;
 }
 
@@ -9732,7 +11433,7 @@ unsigned int UFC_SolitaryWave3DBilinearF
 /// Return the dimension of the local finite element function space
 unsigned int UFC_SolitaryWave3DBilinearForm_dof_map_2_1::local_dimension() const
 {
-    return 4;
+    return 10;
 }
 
 // Return the geometric dimension of the coordinates this dof map provides
@@ -9744,7 +11445,7 @@ unsigned int UFC_SolitaryWave3DBilinearF
 /// Return the number of dofs on each cell facet
 unsigned int UFC_SolitaryWave3DBilinearForm_dof_map_2_1::num_facet_dofs() const
 {
-    return 3;
+    return 6;
 }
 
 /// Return the number of dofs associated with each cell entity of dimension d
@@ -9762,6 +11463,13 @@ void UFC_SolitaryWave3DBilinearForm_dof_
     dofs[1] = c.entity_indices[0][1];
     dofs[2] = c.entity_indices[0][2];
     dofs[3] = c.entity_indices[0][3];
+    unsigned int offset = m.num_entities[0];
+    dofs[4] = offset + c.entity_indices[1][0];
+    dofs[5] = offset + c.entity_indices[1][1];
+    dofs[6] = offset + c.entity_indices[1][2];
+    dofs[7] = offset + c.entity_indices[1][3];
+    dofs[8] = offset + c.entity_indices[1][4];
+    dofs[9] = offset + c.entity_indices[1][5];
 }
 
 /// Tabulate the local-to-local mapping from facet dofs to cell dofs
@@ -9774,21 +11482,33 @@ void UFC_SolitaryWave3DBilinearForm_dof_
       dofs[0] = 1;
       dofs[1] = 2;
       dofs[2] = 3;
-      break;
-    case 1:
-      dofs[0] = 0;
-      dofs[1] = 2;
-      dofs[2] = 3;
-      break;
-    case 2:
-      dofs[0] = 0;
-      dofs[1] = 1;
-      dofs[2] = 3;
+      dofs[3] = 4;
+      dofs[4] = 5;
+      dofs[5] = 6;
+      break;
+    case 1:
+      dofs[0] = 0;
+      dofs[1] = 2;
+      dofs[2] = 3;
+      dofs[3] = 4;
+      dofs[4] = 7;
+      dofs[5] = 8;
+      break;
+    case 2:
+      dofs[0] = 0;
+      dofs[1] = 1;
+      dofs[2] = 3;
+      dofs[3] = 5;
+      dofs[4] = 7;
+      dofs[5] = 9;
       break;
     case 3:
       dofs[0] = 0;
       dofs[1] = 1;
       dofs[2] = 2;
+      dofs[3] = 6;
+      dofs[4] = 8;
+      dofs[5] = 9;
       break;
     }
 }
@@ -9817,6 +11537,24 @@ void UFC_SolitaryWave3DBilinearForm_dof_
     coordinates[3][0] = x[3][0];
     coordinates[3][1] = x[3][1];
     coordinates[3][2] = x[3][2];
+    coordinates[4][0] = 0.5*x[2][0] + 0.5*x[3][0];
+    coordinates[4][1] = 0.5*x[2][1] + 0.5*x[3][1];
+    coordinates[4][2] = 0.5*x[2][2] + 0.5*x[3][2];
+    coordinates[5][0] = 0.5*x[1][0] + 0.5*x[3][0];
+    coordinates[5][1] = 0.5*x[1][1] + 0.5*x[3][1];
+    coordinates[5][2] = 0.5*x[1][2] + 0.5*x[3][2];
+    coordinates[6][0] = 0.5*x[1][0] + 0.5*x[2][0];
+    coordinates[6][1] = 0.5*x[1][1] + 0.5*x[2][1];
+    coordinates[6][2] = 0.5*x[1][2] + 0.5*x[2][2];
+    coordinates[7][0] = 0.5*x[0][0] + 0.5*x[3][0];
+    coordinates[7][1] = 0.5*x[0][1] + 0.5*x[3][1];
+    coordinates[7][2] = 0.5*x[0][2] + 0.5*x[3][2];
+    coordinates[8][0] = 0.5*x[0][0] + 0.5*x[2][0];
+    coordinates[8][1] = 0.5*x[0][1] + 0.5*x[2][1];
+    coordinates[8][2] = 0.5*x[0][2] + 0.5*x[2][2];
+    coordinates[9][0] = 0.5*x[0][0] + 0.5*x[1][0];
+    coordinates[9][1] = 0.5*x[0][1] + 0.5*x[1][1];
+    coordinates[9][2] = 0.5*x[0][2] + 0.5*x[1][2];
 }
 
 /// Return the number of sub dof maps (for a mixed element)
@@ -9847,7 +11585,7 @@ UFC_SolitaryWave3DBilinearForm_dof_map_2
 /// Return a string identifying the dof map
 const char* UFC_SolitaryWave3DBilinearForm_dof_map_2::signature() const
 {
-    return "FFC dof map for MixedElement([FiniteElement('Lagrange', 'tetrahedron', 1), FiniteElement('Lagrange', 'tetrahedron', 1)])";
+    return "FFC dof map for MixedElement([FiniteElement('Lagrange', 'tetrahedron', 2), FiniteElement('Lagrange', 'tetrahedron', 2)])";
 }
 
 /// Return true iff mesh entities of topological dimension d are needed
@@ -9859,7 +11597,7 @@ bool UFC_SolitaryWave3DBilinearForm_dof_
       return true;
       break;
     case 1:
-      return false;
+      return true;
       break;
     case 2:
       return false;
@@ -9874,7 +11612,7 @@ bool UFC_SolitaryWave3DBilinearForm_dof_
 /// Initialize dof map for mesh (return true iff init_cell() is needed)
 bool UFC_SolitaryWave3DBilinearForm_dof_map_2::init_mesh(const ufc::mesh& m)
 {
-    __global_dimension = 2*m.num_entities[0];
+    __global_dimension = 2*m.num_entities[0] + 2*m.num_entities[1];
     return false;
 }
 
@@ -9900,7 +11638,7 @@ unsigned int UFC_SolitaryWave3DBilinearF
 /// Return the dimension of the local finite element function space
 unsigned int UFC_SolitaryWave3DBilinearForm_dof_map_2::local_dimension() const
 {
-    return 8;
+    return 20;
 }
 
 // Return the geometric dimension of the coordinates this dof map provides
@@ -9912,7 +11650,7 @@ unsigned int UFC_SolitaryWave3DBilinearF
 /// Return the number of dofs on each cell facet
 unsigned int UFC_SolitaryWave3DBilinearForm_dof_map_2::num_facet_dofs() const
 {
-    return 6;
+    return 12;
 }
 
 /// Return the number of dofs associated with each cell entity of dimension d
@@ -9931,10 +11669,24 @@ void UFC_SolitaryWave3DBilinearForm_dof_
     dofs[2] = c.entity_indices[0][2];
     dofs[3] = c.entity_indices[0][3];
     unsigned int offset = m.num_entities[0];
-    dofs[4] = offset + c.entity_indices[0][0];
-    dofs[5] = offset + c.entity_indices[0][1];
-    dofs[6] = offset + c.entity_indices[0][2];
-    dofs[7] = offset + c.entity_indices[0][3];
+    dofs[4] = offset + c.entity_indices[1][0];
+    dofs[5] = offset + c.entity_indices[1][1];
+    dofs[6] = offset + c.entity_indices[1][2];
+    dofs[7] = offset + c.entity_indices[1][3];
+    dofs[8] = offset + c.entity_indices[1][4];
+    dofs[9] = offset + c.entity_indices[1][5];
+    offset = offset + m.num_entities[1];
+    dofs[10] = offset + c.entity_indices[0][0];
+    dofs[11] = offset + c.entity_indices[0][1];
+    dofs[12] = offset + c.entity_indices[0][2];
+    dofs[13] = offset + c.entity_indices[0][3];
+    offset = offset + m.num_entities[0];
+    dofs[14] = offset + c.entity_indices[1][0];
+    dofs[15] = offset + c.entity_indices[1][1];
+    dofs[16] = offset + c.entity_indices[1][2];
+    dofs[17] = offset + c.entity_indices[1][3];
+    dofs[18] = offset + c.entity_indices[1][4];
+    dofs[19] = offset + c.entity_indices[1][5];
 }
 
 /// Tabulate the local-to-local mapping from facet dofs to cell dofs
@@ -9947,33 +11699,57 @@ void UFC_SolitaryWave3DBilinearForm_dof_
       dofs[0] = 1;
       dofs[1] = 2;
       dofs[2] = 3;
-      dofs[3] = 5;
-      dofs[4] = 6;
-      dofs[5] = 7;
-      break;
-    case 1:
-      dofs[0] = 0;
-      dofs[1] = 2;
-      dofs[2] = 3;
-      dofs[3] = 4;
-      dofs[4] = 6;
-      dofs[5] = 7;
-      break;
-    case 2:
-      dofs[0] = 0;
-      dofs[1] = 1;
-      dofs[2] = 3;
-      dofs[3] = 4;
-      dofs[4] = 5;
-      dofs[5] = 7;
-      break;
-    case 3:
-      dofs[0] = 0;
-      dofs[1] = 1;
-      dofs[2] = 2;
       dofs[3] = 4;
       dofs[4] = 5;
       dofs[5] = 6;
+      dofs[6] = 11;
+      dofs[7] = 12;
+      dofs[8] = 13;
+      dofs[9] = 14;
+      dofs[10] = 15;
+      dofs[11] = 16;
+      break;
+    case 1:
+      dofs[0] = 0;
+      dofs[1] = 2;
+      dofs[2] = 3;
+      dofs[3] = 4;
+      dofs[4] = 7;
+      dofs[5] = 8;
+      dofs[6] = 10;
+      dofs[7] = 12;
+      dofs[8] = 13;
+      dofs[9] = 14;
+      dofs[10] = 17;
+      dofs[11] = 18;
+      break;
+    case 2:
+      dofs[0] = 0;
+      dofs[1] = 1;
+      dofs[2] = 3;
+      dofs[3] = 5;
+      dofs[4] = 7;
+      dofs[5] = 9;
+      dofs[6] = 10;
+      dofs[7] = 11;
+      dofs[8] = 13;
+      dofs[9] = 15;
+      dofs[10] = 17;
+      dofs[11] = 19;
+      break;
+    case 3:
+      dofs[0] = 0;
+      dofs[1] = 1;
+      dofs[2] = 2;
+      dofs[3] = 6;
+      dofs[4] = 8;
+      dofs[5] = 9;
+      dofs[6] = 10;
+      dofs[7] = 11;
+      dofs[8] = 12;
+      dofs[9] = 16;
+      dofs[10] = 18;
+      dofs[11] = 19;
       break;
     }
 }
@@ -10002,18 +11778,54 @@ void UFC_SolitaryWave3DBilinearForm_dof_
     coordinates[3][0] = x[3][0];
     coordinates[3][1] = x[3][1];
     coordinates[3][2] = x[3][2];
-    coordinates[4][0] = x[0][0];
-    coordinates[4][1] = x[0][1];
-    coordinates[4][2] = x[0][2];
-    coordinates[5][0] = x[1][0];
-    coordinates[5][1] = x[1][1];
-    coordinates[5][2] = x[1][2];
-    coordinates[6][0] = x[2][0];
-    coordinates[6][1] = x[2][1];
-    coordinates[6][2] = x[2][2];
-    coordinates[7][0] = x[3][0];
-    coordinates[7][1] = x[3][1];
-    coordinates[7][2] = x[3][2];
+    coordinates[4][0] = 0.5*x[2][0] + 0.5*x[3][0];
+    coordinates[4][1] = 0.5*x[2][1] + 0.5*x[3][1];
+    coordinates[4][2] = 0.5*x[2][2] + 0.5*x[3][2];
+    coordinates[5][0] = 0.5*x[1][0] + 0.5*x[3][0];
+    coordinates[5][1] = 0.5*x[1][1] + 0.5*x[3][1];
+    coordinates[5][2] = 0.5*x[1][2] + 0.5*x[3][2];
+    coordinates[6][0] = 0.5*x[1][0] + 0.5*x[2][0];
+    coordinates[6][1] = 0.5*x[1][1] + 0.5*x[2][1];
+    coordinates[6][2] = 0.5*x[1][2] + 0.5*x[2][2];
+    coordinates[7][0] = 0.5*x[0][0] + 0.5*x[3][0];
+    coordinates[7][1] = 0.5*x[0][1] + 0.5*x[3][1];
+    coordinates[7][2] = 0.5*x[0][2] + 0.5*x[3][2];
+    coordinates[8][0] = 0.5*x[0][0] + 0.5*x[2][0];
+    coordinates[8][1] = 0.5*x[0][1] + 0.5*x[2][1];
+    coordinates[8][2] = 0.5*x[0][2] + 0.5*x[2][2];
+    coordinates[9][0] = 0.5*x[0][0] + 0.5*x[1][0];
+    coordinates[9][1] = 0.5*x[0][1] + 0.5*x[1][1];
+    coordinates[9][2] = 0.5*x[0][2] + 0.5*x[1][2];
+    coordinates[10][0] = x[0][0];
+    coordinates[10][1] = x[0][1];
+    coordinates[10][2] = x[0][2];
+    coordinates[11][0] = x[1][0];
+    coordinates[11][1] = x[1][1];
+    coordinates[11][2] = x[1][2];
+    coordinates[12][0] = x[2][0];
+    coordinates[12][1] = x[2][1];
+    coordinates[12][2] = x[2][2];
+    coordinates[13][0] = x[3][0];
+    coordinates[13][1] = x[3][1];
+    coordinates[13][2] = x[3][2];
+    coordinates[14][0] = 0.5*x[2][0] + 0.5*x[3][0];
+    coordinates[14][1] = 0.5*x[2][1] + 0.5*x[3][1];
+    coordinates[14][2] = 0.5*x[2][2] + 0.5*x[3][2];
+    coordinates[15][0] = 0.5*x[1][0] + 0.5*x[3][0];
+    coordinates[15][1] = 0.5*x[1][1] + 0.5*x[3][1];
+    coordinates[15][2] = 0.5*x[1][2] + 0.5*x[3][2];
+    coordinates[16][0] = 0.5*x[1][0] + 0.5*x[2][0];
+    coordinates[16][1] = 0.5*x[1][1] + 0.5*x[2][1];
+    coordinates[16][2] = 0.5*x[1][2] + 0.5*x[2][2];
+    coordinates[17][0] = 0.5*x[0][0] + 0.5*x[3][0];
+    coordinates[17][1] = 0.5*x[0][1] + 0.5*x[3][1];
+    coordinates[17][2] = 0.5*x[0][2] + 0.5*x[3][2];
+    coordinates[18][0] = 0.5*x[0][0] + 0.5*x[2][0];
+    coordinates[18][1] = 0.5*x[0][1] + 0.5*x[2][1];
+    coordinates[18][2] = 0.5*x[0][2] + 0.5*x[2][2];
+    coordinates[19][0] = 0.5*x[0][0] + 0.5*x[1][0];
+    coordinates[19][1] = 0.5*x[0][1] + 0.5*x[1][1];
+    coordinates[19][2] = 0.5*x[0][2] + 0.5*x[1][2];
 }
 
 /// Return the number of sub dof maps (for a mixed element)
@@ -11011,71 +12823,167 @@ void UFC_SolitaryWave3DBilinearForm_cell
     
     
     // Array of quadrature weights
-    const static double W8[8] = {0.0369798563588528, 0.0160270405984766, 0.021157006454524, 0.00916942992147972, 0.0369798563588528, 0.0160270405984766, 0.021157006454524, 0.00916942992147972};
-    
-    
-    const static double FE0_C1_D001[8][2] = \
-    {{-1, 1},
-    {-1, 1},
-    {-1, 1},
-    {-1, 1},
-    {-1, 1},
-    {-1, 1},
-    {-1, 1},
-    {-1, 1}};
-    // Array of non-zero columns
-    static const unsigned int nzc0[2] = {4, 7};
-    // Array of non-zero columns
-    static const unsigned int nzc1[2] = {4, 6};
-    // Array of non-zero columns
-    static const unsigned int nzc2[2] = {4, 5};
-    // Array of non-zero columns
-    static const unsigned int nzc3[2] = {0, 1};
-    // Array of non-zero columns
-    static const unsigned int nzc4[2] = {0, 2};
-    // Array of non-zero columns
-    static const unsigned int nzc5[2] = {0, 3};
-    
-    const static double FE0_C1[8][4] = \
-    {{0.584747563204894, 0.156682637336818, 0.136054976802846, 0.122514822655441},
-    {0.303772764814707, 0.0813956670146703, 0.0706797241593969, 0.544151844011225},
-    {0.245713325211713, 0.0658386870600444, 0.565933165072801, 0.122514822655441},
-    {0.127646562120385, 0.0342027932367665, 0.293998800631623, 0.544151844011225},
-    {0.156682637336818, 0.584747563204894, 0.136054976802846, 0.122514822655441},
-    {0.0813956670146703, 0.303772764814707, 0.0706797241593969, 0.544151844011225},
-    {0.0658386870600443, 0.245713325211713, 0.565933165072801, 0.122514822655441},
-    {0.0342027932367664, 0.127646562120385, 0.293998800631623, 0.544151844011225}};
-    // Array of non-zero columns
-    static const unsigned int nzc6[4] = {4, 5, 6, 7};
-    // Array of non-zero columns
-    static const unsigned int nzc7[4] = {0, 1, 2, 3};
+    const static double W27[27] = {0.00877047492965105, 0.00816265076654668, 0.0016716811314837, 0.0100061425721761, 0.00931268237947044, 0.00190720341498178, 0.00304787709051818, 0.00283664869563092, 0.000580935315837384, 0.0140327598874417, 0.0130602412264747, 0.00267468981037392, 0.0160098281154818, 0.0149002918071527, 0.00305152546397085, 0.0048766033448291, 0.00453863791300947, 0.000929496505339815, 0.00877047492965105, 0.00816265076654668, 0.0016716811314837, 0.0100061425721761, 0.00931268237947044, 0.00190720341498178, 0.00304787709051818, 0.00283664869563092, 0.000580935315837384};
+    
+    
+    const static double FE0_C1_D100[27][7] = \
+    {{-1.99865811288677, -0.619120480633141, 0.2919760962926, 0.328486271453771, -0.2919760962926, -0.328486271453771, 2.61777859351991},
+    {-1.11229755309379, -0.731703032991766, 1.38801506415341, 0.231390415744571, -1.38801506415341, -0.231390415744571, 1.84400058608555},
+    {0.0457477733980357, -0.878794075302896, 2.82000883955399, 0.104533009146939, -2.82000883955399, -0.104533009146939, 0.833046301904861},
+    {-0.942926908148453, -0.753215925563414, 0.291976096292599, 1.51831292112236, -0.291976096292599, -1.51831292112236, 1.69614283371187},
+    {-0.368625431583845, -0.82616177738479, 1.38801506415341, 1.06952128164754, -1.38801506415341, -1.06952128164754, 1.19478720896864},
+    {0.381709331831541, -0.921466788258062, 2.82000883955399, 0.483167280535609, -2.82000883955399, -0.48316728053561, 0.539757456426521},
+    {0.301373419046404, -0.911262789436721, 0.291976096292599, 2.92066011219053, -0.291976096292599, -2.92066011219053, 0.609889370390317},
+    {0.507877469881381, -0.937492242968394, 1.38801506415341, 2.05735464869637, -1.38801506415341, -2.05735464869637, 0.429614773087013},
+    {0.77767856643167, -0.971761475441781, 2.82000883955399, 0.929431202319459, -2.82000883955399, -0.929431202319459, 0.194082909010111},
+    {-0.689768816126815, 0.689768816126816, 0.2919760962926, 0.32848627145377, -0.2919760962926, -0.32848627145377, 0},
+    {-0.19029726005101, 0.190297260051011, 1.38801506415341, 0.231390415744571, -1.38801506415341, -0.231390415744571, 0},
+    {0.462270924350466, -0.462270924350466, 2.82000883955399, 0.104533009146939, -2.82000883955399, -0.104533009146939, 0},
+    {-0.0948554912925193, 0.09485549129252, 0.291976096292599, 1.51831292112236, -0.291976096292599, -1.51831292112236, 0},
+    {0.228768172900473, -0.228768172900473, 1.38801506415341, 1.06952128164754, -1.38801506415341, -1.06952128164754, 0},
+    {0.651588060044801, -0.651588060044802, 2.82000883955399, 0.48316728053561, -2.82000883955399, -0.48316728053561, 0},
+    {0.606318104241563, -0.606318104241563, 0.291976096292599, 2.92066011219053, -0.291976096292599, -2.92066011219053, 0},
+    {0.722684856424887, -0.722684856424888, 1.38801506415341, 2.05735464869637, -1.38801506415341, -2.05735464869637, 0},
+    {0.874720020936725, -0.874720020936726, 2.82000883955399, 0.929431202319459, -2.82000883955399, -0.929431202319459, 0},
+    {0.619120480633142, 1.99865811288677, 0.291976096292599, 0.328486271453769, -0.291976096292599, -0.328486271453769, -2.61777859351991},
+    {0.731703032991767, 1.11229755309379, 1.38801506415341, 0.231390415744571, -1.38801506415341, -0.231390415744571, -1.84400058608555},
+    {0.878794075302896, -0.0457477733980358, 2.82000883955399, 0.10453300914694, -2.82000883955399, -0.10453300914694, -0.833046301904861},
+    {0.753215925563415, 0.942926908148454, 0.291976096292599, 1.51831292112236, -0.291976096292599, -1.51831292112236, -1.69614283371187},
+    {0.82616177738479, 0.368625431583845, 1.38801506415341, 1.06952128164754, -1.38801506415341, -1.06952128164754, -1.19478720896864},
+    {0.921466788258061, -0.381709331831542, 2.82000883955399, 0.483167280535611, -2.82000883955399, -0.483167280535611, -0.53975745642652},
+    {0.911262789436721, -0.301373419046404, 0.291976096292599, 2.92066011219053, -0.291976096292599, -2.92066011219053, -0.609889370390318},
+    {0.937492242968393, -0.507877469881382, 1.38801506415341, 2.05735464869637, -1.38801506415341, -2.05735464869637, -0.429614773087011},
+    {0.97176147544178, -0.777678566431672, 2.82000883955399, 0.929431202319459, -2.82000883955399, -0.929431202319459, -0.194082909010108}};
+    // Array of non-zero columns
+    static const unsigned int nzc2[7] = {10, 11, 15, 16, 17, 18, 19};
+    // Array of non-zero columns
+    static const unsigned int nzc3[7] = {0, 1, 5, 6, 7, 8, 9};
+    
+    const static double FE0_C1_D010[27][7] = \
+    {{-1.99865811288677, -0.67151372854623, 0.291976096292601, 0.380879519366861, -0.2919760962926, 2.670171841433, -0.380879519366861},
+    {-1.11229755309379, -0.768609584255429, 1.38801506415341, 0.268296967008234, -1.38801506415341, 1.88090713734922, -0.268296967008233},
+    {0.045747773398036, -0.89546699085306, 2.82000883955399, 0.121205924697102, -2.82000883955399, 0.849719217455024, -0.121205924697102},
+    {-0.942926908148453, 0.518312921122362, 0.291976096292599, 0.246784074436585, -0.291976096292599, 0.424613987026092, -0.246784074436586},
+    {-0.368625431583845, 0.0695212816475372, 1.38801506415341, 0.173838222615209, -1.38801506415341, 0.299104149936307, -0.173838222615209},
+    {0.381709331831541, -0.51683271946439, 2.82000883955399, 0.0785332117419376, -2.82000883955399, 0.135123387632849, -0.0785332117419376},
+    {0.301373419046404, 1.92066011219053, 0.291976096292598, 0.0887372105632775, -0.291976096292598, -2.22203353123693, -0.0887372105632783},
+    {0.507877469881381, 1.05735464869637, 1.38801506415341, 0.0625077570316057, -1.38801506415341, -1.56523211857775, -0.0625077570316058},
+    {0.777678566431671, -0.0705687976805426, 2.82000883955399, 0.0282385245582192, -2.82000883955399, -0.707109768751129, -0.0282385245582191},
+    {-0.689768816126815, -0.67151372854623, 0.2919760962926, 1.68976881612682, -0.2919760962926, 1.36128254467305, -1.68976881612682},
+    {-0.19029726005101, -0.768609584255429, 1.38801506415341, 1.19029726005101, -1.38801506415341, 0.958906844306439, -1.19029726005101},
+    {0.462270924350466, -0.89546699085306, 2.82000883955399, 0.537729075649533, -2.82000883955399, 0.433196066502594, -0.537729075649533},
+    {-0.0948554912925191, 0.518312921122362, 0.291976096292599, 1.09485549129252, -0.291976096292599, -0.423457429829843, -1.09485549129252},
+    {0.228768172900473, 0.0695212816475375, 1.38801506415341, 0.771231827099527, -1.38801506415341, -0.298289454548011, -0.771231827099527},
+    {0.651588060044801, -0.51683271946439, 2.82000883955399, 0.348411939955198, -2.82000883955399, -0.134755340580411, -0.348411939955198},
+    {0.606318104241562, 1.92066011219053, 0.291976096292598, 0.393681895758437, -0.291976096292599, -2.52697821643209, -0.393681895758437},
+    {0.722684856424887, 1.05735464869637, 1.38801506415341, 0.277315143575112, -1.38801506415341, -1.78003950512125, -0.277315143575112},
+    {0.874720020936725, -0.0705687976805425, 2.82000883955399, 0.125279979063274, -2.82000883955399, -0.804151223256183, -0.125279979063274},
+    {0.619120480633141, -0.67151372854623, 0.291976096292599, 2.99865811288677, -0.291976096292599, 0.0523932479130882, -2.99865811288677},
+    {0.731703032991766, -0.768609584255429, 1.38801506415341, 2.11229755309379, -1.38801506415341, 0.0369065512636619, -2.11229755309379},
+    {0.878794075302896, -0.89546699085306, 2.82000883955399, 0.954252226601964, -2.82000883955399, 0.0166729155501636, -0.954252226601964},
+    {0.753215925563415, 0.518312921122363, 0.291976096292599, 1.94292690814845, -0.291976096292599, -1.27152884668578, -1.94292690814845},
+    {0.82616177738479, 0.0695212816475378, 1.38801506415341, 1.36862543158385, -1.38801506415341, -0.895683059032329, -1.36862543158384},
+    {0.921466788258061, -0.51683271946439, 2.82000883955399, 0.618290668168459, -2.82000883955399, -0.404634068793672, -0.618290668168458},
+    {0.911262789436721, 1.92066011219053, 0.291976096292599, 0.698626580953596, -0.291976096292599, -2.83192290162725, -0.698626580953596},
+    {0.937492242968393, 1.05735464869637, 1.38801506415341, 0.492122530118618, -1.38801506415341, -1.99484689166476, -0.492122530118618},
+    {0.97176147544178, -0.0705687976805424, 2.82000883955399, 0.222321433568329, -2.82000883955399, -0.901192677761238, -0.222321433568329}};
+    // Array of non-zero columns
+    static const unsigned int nzc1[7] = {10, 12, 14, 16, 17, 18, 19};
+    // Array of non-zero columns
+    static const unsigned int nzc4[7] = {0, 2, 4, 6, 7, 8, 9};
+    
+    const static double FE0_C1[27][10] = \
+    {{0.374329281526014, -0.0770862288075737, -0.0686336640467425, -0.0623377689723666, 0.0239775348061957, 0.0278019288056344, 0.031278423297481, 0.218884122479203, 0.246254505716693, 0.285531865195462},
+    {0.0296507308273034, -0.0580763339388314, -0.051154913373837, -0.106180538748753, 0.080293345688546, 0.0931000579685249, 0.0155203366847607, 0.73297520591714, 0.122191352246653, 0.141680756728494},
+    {-0.12473839265364, -0.0284651216515657, -0.0247673585365706, 0.289054022006834, 0.073696002454887, 0.0854504447630367, 0.00316750500875634, 0.672749928545405, 0.0249377141829676, 0.0289152558798902},
+    {-0.0138611057361999, -0.0540832211847061, -0.0914189644747005, -0.0623377689723666, 0.11082776991498, 0.0180137626702943, 0.0936738622360728, 0.141822053505759, 0.737492757359529, 0.119870854681338},
+    {-0.108014411398703, -0.0396820896985505, -0.12439584892476, -0.106180538748753, 0.37112791258986, 0.0603225179288914, 0.0464809196626873, 0.474918179055459, 0.365943506420742, 0.0594798531131275},
+    {-0.10678724824909, -0.0188623697671714, -0.0916104925113804, 0.289054022006834, 0.340634000523421, 0.0553660878277078, 0.00948616958726982, 0.435896287412199, 0.0746844551798748, 0.0121390879903345},
+    {-0.113646757786535, -0.0212000160735007, 0.336116908319966, -0.0623377689723666, 0.213190734538724, 0.00647728608404027, 0.0647928078398051, 0.050995565468269, 0.510112697076803, 0.0154985435047957},
+    {-0.0927575594483608, -0.0151385367967613, 0.0147498566399773, -0.106180538748753, 0.71390981117415, 0.0216904270965779, 0.0321501561271397, 0.170768371303483, 0.253117643766939, 0.00769036888560861},
+    {-0.0494020059140976, -0.00695995435590164, -0.12437750559924, 0.289054022006834, 0.655251051574542, 0.0199082222175353, 0.00656144145796828, 0.156737101971251, 0.0516581193256994, 0.00156950731540954},
+    {-0.0655273725373765, -0.0655273725373763, -0.0686336640467425, -0.0623377689723666, 0.0239775348061957, 0.123343025642419, 0.138766464507087, 0.123343025642419, 0.138766464507087, 0.713829662988655},
+    {-0.120473369102135, -0.120473369102135, -0.051154913373837, -0.106180538748753, 0.080293345688546, 0.413037631942832, 0.0688558444657068, 0.413037631942832, 0.0688558444657067, 0.354201891821236},
+    {-0.0982881990625207, -0.0982881990625206, -0.0247673585365706, 0.289054022006834, 0.073696002454887, 0.379100186654221, 0.014052609595862, 0.379100186654221, 0.014052609595862, 0.0722881396997255},
+    {-0.123875304471457, -0.123875304471457, -0.0914189644747004, -0.0623377689723666, 0.11082776991498, 0.0799179080880265, 0.415583309797801, 0.0799179080880263, 0.415583309797801, 0.299677136703346},
+    {-0.118458140383472, -0.118458140383472, -0.12439584892476, -0.106180538748753, 0.37112791258986, 0.267620348492175, 0.206212213041715, 0.267620348492175, 0.206212213041715, 0.148699632782819},
+    {-0.0719291250008815, -0.0719291250008814, -0.0916104925113804, 0.289054022006834, 0.340634000523421, 0.245631187619954, 0.0420853123835723, 0.245631187619953, 0.0420853123835723, 0.0303477199758362},
+    {-0.0790472945586147, -0.0790472945586147, 0.336116908319966, -0.0623377689723666, 0.213190734538724, 0.0287364257761548, 0.287452752458304, 0.0287364257761545, 0.287452752458304, 0.0387463587619893},
+    {-0.0597158247867675, -0.0597158247867675, 0.0147498566399773, -0.106180538748753, 0.71390981117415, 0.0962293992000305, 0.14263389994704, 0.0962293992000302, 0.142633899947039, 0.0192259222140214},
+    {-0.0293581106215567, -0.0293581106215567, -0.12437750559924, 0.289054022006834, 0.655251051574542, 0.0883226620943931, 0.0291097803918338, 0.0883226620943929, 0.0291097803918338, 0.0039237682885237},
+    {-0.0770862288075736, 0.374329281526014, -0.0686336640467425, -0.0623377689723666, 0.0239775348061957, 0.218884122479203, 0.246254505716693, 0.0278019288056342, 0.0312784232974809, 0.285531865195462},
+    {-0.0580763339388314, 0.0296507308273036, -0.051154913373837, -0.106180538748753, 0.080293345688546, 0.73297520591714, 0.122191352246653, 0.0931000579685245, 0.0155203366847606, 0.141680756728494},
+    {-0.0284651216515658, -0.12473839265364, -0.0247673585365706, 0.289054022006834, 0.073696002454887, 0.672749928545405, 0.0249377141829676, 0.0854504447630365, 0.00316750500875629, 0.0289152558798902},
+    {-0.0540832211847061, -0.0138611057361997, -0.0914189644747004, -0.0623377689723666, 0.11082776991498, 0.141822053505759, 0.737492757359529, 0.018013762670294, 0.0936738622360724, 0.119870854681338},
+    {-0.0396820896985505, -0.108014411398703, -0.12439584892476, -0.106180538748753, 0.37112791258986, 0.474918179055459, 0.365943506420742, 0.060322517928891, 0.0464809196626871, 0.0594798531131275},
+    {-0.0188623697671715, -0.10678724824909, -0.0916104925113804, 0.289054022006834, 0.340634000523421, 0.435896287412199, 0.0746844551798748, 0.0553660878277076, 0.00948616958726979, 0.0121390879903345},
+    {-0.0212000160735007, -0.113646757786535, 0.336116908319966, -0.0623377689723666, 0.213190734538724, 0.0509955654682693, 0.510112697076803, 0.00647728608404007, 0.0647928078398048, 0.0154985435047957},
+    {-0.0151385367967613, -0.0927575594483608, 0.0147498566399774, -0.106180538748753, 0.71390981117415, 0.170768371303483, 0.25311764376694, 0.0216904270965777, 0.0321501561271395, 0.00769036888560861},
+    {-0.00695995435590172, -0.0494020059140976, -0.12437750559924, 0.289054022006834, 0.655251051574542, 0.156737101971251, 0.0516581193256993, 0.0199082222175352, 0.00656144145796827, 0.00156950731540955}};
+    // Array of non-zero columns
+    static const unsigned int nzc6[10] = {10, 11, 12, 13, 14, 15, 16, 17, 18, 19};
+    // Array of non-zero columns
+    static const unsigned int nzc7[10] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
+    
+    const static double FE0_C1_D001[27][7] = \
+    {{-1.99865811288677, -0.708023903707401, 0.328486271453771, 0.38087951936686, 2.70668201659417, -0.328486271453771, -0.380879519366859},
+    {-1.11229755309379, 0.388015064153407, 0.231390415744571, 0.268296967008234, 0.72428248894038, -0.231390415744571, -0.268296967008234},
+    {0.0457477733980357, 1.82000883955399, 0.104533009146939, 0.121205924697103, -1.86575661295203, -0.104533009146939, -0.121205924697102},
+    {-0.942926908148453, -0.708023903707401, 1.51831292112236, 0.246784074436586, 1.65095081185585, -1.51831292112236, -0.246784074436585},
+    {-0.368625431583845, 0.388015064153408, 1.06952128164754, 0.173838222615209, -0.0193896325695626, -1.06952128164754, -0.173838222615209},
+    {0.381709331831541, 1.82000883955399, 0.48316728053561, 0.0785332117419377, -2.20171817138554, -0.48316728053561, -0.0785332117419371},
+    {0.301373419046404, -0.708023903707401, 2.92066011219053, 0.0887372105632787, 0.406650484660997, -2.92066011219052, -0.0887372105632779},
+    {0.507877469881381, 0.388015064153408, 2.05735464869637, 0.0625077570316064, -0.895892534034789, -2.05735464869637, -0.0625077570316058},
+    {0.77767856643167, 1.82000883955399, 0.929431202319458, 0.0282385245582191, -2.59768740598566, -0.929431202319458, -0.0282385245582184},
+    {-0.689768816126815, -0.708023903707401, 0.32848627145377, 1.68976881612682, 1.39779271983422, -0.32848627145377, -1.68976881612682},
+    {-0.19029726005101, 0.388015064153408, 0.231390415744571, 1.19029726005101, -0.197717804102397, -0.231390415744571, -1.19029726005101},
+    {0.462270924350466, 1.82000883955399, 0.10453300914694, 0.537729075649533, -2.28227976390446, -0.104533009146939, -0.537729075649533},
+    {-0.0948554912925191, -0.708023903707401, 1.51831292112236, 1.09485549129252, 0.80287939499992, -1.51831292112236, -1.09485549129252},
+    {0.228768172900472, 0.388015064153408, 1.06952128164754, 0.771231827099527, -0.61678323705388, -1.06952128164754, -0.771231827099527},
+    {0.651588060044801, 1.82000883955399, 0.48316728053561, 0.348411939955198, -2.47159689959879, -0.48316728053561, -0.348411939955198},
+    {0.606318104241562, -0.708023903707401, 2.92066011219053, 0.393681895758437, 0.101705799465838, -2.92066011219053, -0.393681895758437},
+    {0.722684856424887, 0.388015064153408, 2.05735464869637, 0.277315143575113, -1.11069992057829, -2.05735464869637, -0.277315143575112},
+    {0.874720020936725, 1.82000883955399, 0.929431202319459, 0.125279979063274, -2.69472886049072, -0.929431202319458, -0.125279979063273},
+    {0.619120480633141, -0.708023903707401, 0.328486271453769, 2.99865811288677, 0.0889034230742589, -0.328486271453769, -2.99865811288677},
+    {0.731703032991766, 0.388015064153408, 0.231390415744571, 2.11229755309379, -1.11971809714517, -0.231390415744571, -2.11229755309379},
+    {0.878794075302896, 1.82000883955399, 0.10453300914694, 0.954252226601964, -2.69880291485689, -0.10453300914694, -0.954252226601964},
+    {0.753215925563415, -0.708023903707401, 1.51831292112236, 1.94292690814845, -0.0451920218560143, -1.51831292112236, -1.94292690814845},
+    {0.82616177738479, 0.388015064153408, 1.06952128164754, 1.36862543158385, -1.2141768415382, -1.06952128164754, -1.36862543158385},
+    {0.921466788258061, 1.82000883955399, 0.483167280535611, 0.618290668168458, -2.74147562781205, -0.48316728053561, -0.618290668168458},
+    {0.911262789436721, -0.708023903707402, 2.92066011219053, 0.698626580953597, -0.203238885729321, -2.92066011219053, -0.698626580953596},
+    {0.937492242968393, 0.388015064153408, 2.05735464869637, 0.492122530118619, -1.3255073071218, -2.05735464869637, -0.492122530118618},
+    {0.971761475441779, 1.82000883955399, 0.929431202319459, 0.222321433568329, -2.79177031499577, -0.929431202319459, -0.222321433568328}};
+    // Array of non-zero columns
+    static const unsigned int nzc0[7] = {10, 13, 14, 15, 17, 18, 19};
+    // Array of non-zero columns
+    static const unsigned int nzc5[7] = {0, 3, 4, 5, 7, 8, 9};
     
     // Number of operations to compute geometry constants: 104
     const double G0 = det*(Jinv_00*Jinv_10 + Jinv_01*Jinv_11 + Jinv_02*Jinv_12);
-    const double G1 = det*(Jinv_10*Jinv_10 + Jinv_11*Jinv_11 + Jinv_12*Jinv_12);
-    const double G2 = det*(Jinv_20*Jinv_20 + Jinv_21*Jinv_21 + Jinv_22*Jinv_22);
-    const double G3 = det*(Jinv_00*Jinv_20 + Jinv_01*Jinv_21 + Jinv_02*Jinv_22);
-    const double G4 =  - 3*Jinv_12*det;
-    const double G5 = det*(3*Jinv_00*Jinv_10 + 3*Jinv_01*Jinv_11 + 3*Jinv_02*Jinv_12);
-    const double G6 = det*(3*Jinv_10*Jinv_10 + 3*Jinv_11*Jinv_11 + 3*Jinv_12*Jinv_12);
-    const double G7 = det*(3*Jinv_10*Jinv_20 + 3*Jinv_11*Jinv_21 + 3*Jinv_12*Jinv_22);
-    const double G8 =  - 3*Jinv_22*det;
-    const double G9 = det*(3*Jinv_00*Jinv_20 + 3*Jinv_01*Jinv_21 + 3*Jinv_02*Jinv_22);
-    const double G10 = det*(3*Jinv_20*Jinv_20 + 3*Jinv_21*Jinv_21 + 3*Jinv_22*Jinv_22);
-    const double G11 = det*(Jinv_10*Jinv_20 + Jinv_11*Jinv_21 + Jinv_12*Jinv_22);
-    const double G12 = det*(Jinv_00*Jinv_00 + Jinv_01*Jinv_01 + Jinv_02*Jinv_02);
-    const double G13 =  - 0.5*det*w[1][0]*w[2][0];
-    const double G14 = det*w[2][0];
-    const double G15 =  - 3*Jinv_02*det;
-    const double G16 = det*(3*Jinv_00*Jinv_00 + 3*Jinv_01*Jinv_01 + 3*Jinv_02*Jinv_02);
+    const double G1 = det*w[2][0];
+    const double G2 = det*(Jinv_00*Jinv_00 + Jinv_01*Jinv_01 + Jinv_02*Jinv_02);
+    const double G3 = det*(Jinv_10*Jinv_20 + Jinv_11*Jinv_21 + Jinv_12*Jinv_22);
+    const double G4 = det*(Jinv_00*Jinv_20 + Jinv_01*Jinv_21 + Jinv_02*Jinv_22);
+    const double G5 = det*(Jinv_20*Jinv_20 + Jinv_21*Jinv_21 + Jinv_22*Jinv_22);
+    const double G6 = det*(3*Jinv_00*Jinv_20 + 3*Jinv_01*Jinv_21 + 3*Jinv_02*Jinv_22);
+    const double G7 = det*(3*Jinv_00*Jinv_10 + 3*Jinv_01*Jinv_11 + 3*Jinv_02*Jinv_12);
+    const double G8 =  - 3*Jinv_02*det;
+    const double G9 = det*(3*Jinv_00*Jinv_00 + 3*Jinv_01*Jinv_01 + 3*Jinv_02*Jinv_02);
+    const double G10 =  - 0.5*det*w[1][0]*w[2][0];
+    const double G11 = det*(3*Jinv_10*Jinv_20 + 3*Jinv_11*Jinv_21 + 3*Jinv_12*Jinv_22);
+    const double G12 = det*(3*Jinv_10*Jinv_10 + 3*Jinv_11*Jinv_11 + 3*Jinv_12*Jinv_12);
+    const double G13 =  - 3*Jinv_12*det;
+    const double G14 = det*(3*Jinv_20*Jinv_20 + 3*Jinv_21*Jinv_21 + 3*Jinv_22*Jinv_22);
+    const double G15 =  - 3*Jinv_22*det;
+    const double G16 = det*(Jinv_10*Jinv_10 + Jinv_11*Jinv_11 + Jinv_12*Jinv_12);
     
     // Compute element tensor using UFL quadrature representation
     // Optimisations: ('simplify expressions', True), ('ignore zero tables', True), ('non zero columns', True), ('remove zero terms', True), ('ignore ones', True)
-    // Total number of operations to compute element tensor: 3288
+    // Total number of operations to compute element tensor: 80267
     
     // Loop quadrature points for integral
-    // Number of operations to compute element tensor for following IP loop = 3184
-    for (unsigned int ip = 0; ip < 8; ip++)
+    // Number of operations to compute element tensor for following IP loop = 80163
+    for (unsigned int ip = 0; ip < 27; ip++)
     {
       
       // Function declarations
@@ -11084,109 +12992,109 @@ void UFC_SolitaryWave3DBilinearForm_cell
       double F2 = 0;
       double F3 = 0;
       
-      // Total number of operations to compute function values = 12
-      for (unsigned int r = 0; r < 2; r++)
-      {
-        F1 += FE0_C1_D001[ip][r]*w[0][nzc3[r]];
-        F2 += FE0_C1_D001[ip][r]*w[0][nzc4[r]];
+      // Total number of operations to compute function values = 20
+      for (unsigned int r = 0; r < 10; r++)
+      {
+        F0 += FE0_C1[ip][r]*w[0][nzc6[r]];
+      }// end loop over 'r'
+      
+      // Total number of operations to compute function values = 42
+      for (unsigned int r = 0; r < 7; r++)
+      {
+        F1 += FE0_C1_D100[ip][r]*w[0][nzc3[r]];
+        F2 += FE0_C1_D010[ip][r]*w[0][nzc4[r]];
         F3 += FE0_C1_D001[ip][r]*w[0][nzc5[r]];
       }// end loop over 'r'
       
-      // Total number of operations to compute function values = 8
-      for (unsigned int r = 0; r < 4; r++)
-      {
-        F0 += FE0_C1[ip][r]*w[0][nzc6[r]];
-      }// end loop over 'r'
-      
       // Number of operations to compute ip constants: 54
       // Number of operations: 4
-      const double Gip0 = F0*F0*F0*W8[ip]*G0;
+      const double Gip0 = F0*F0*F0*W27[ip]*G0;
+      
+      // Number of operations: 1
+      const double Gip1 = W27[ip]*G1;
       
       // Number of operations: 4
-      const double Gip1 = F0*F0*F0*W8[ip]*G1;
+      const double Gip2 = F0*F0*F0*W27[ip]*G2;
+      
+      // Number of operations: 4
+      const double Gip3 = F0*F0*F0*W27[ip]*G3;
+      
+      // Number of operations: 4
+      const double Gip4 = F0*F0*F0*W27[ip]*G4;
+      
+      // Number of operations: 4
+      const double Gip5 = F0*F0*F0*W27[ip]*G5;
+      
+      // Number of operations: 9
+      const double Gip6 = F0*F0*W27[ip]*(G8 + F1*G9 + F2*G7 + F3*G6);
       
       // Number of operations: 1
-      const double Gip2 = W8[ip]*det;
+      const double Gip7 = W27[ip]*det;
+      
+      // Number of operations: 1
+      const double Gip8 = W27[ip]*G10;
+      
+      // Number of operations: 9
+      const double Gip9 = F0*F0*W27[ip]*(G13 + F1*G7 + F2*G12 + F3*G11);
+      
+      // Number of operations: 9
+      const double Gip10 = F0*F0*W27[ip]*(G15 + F1*G6 + F2*G11 + F3*G14);
       
       // Number of operations: 4
-      const double Gip3 = F0*F0*F0*W8[ip]*G2;
-      
-      // Number of operations: 4
-      const double Gip4 = F0*F0*F0*W8[ip]*G3;
-      
-      // Number of operations: 9
-      const double Gip5 = F0*F0*W8[ip]*(G4 + F1*G5 + F2*G6 + F3*G7);
-      
-      // Number of operations: 9
-      const double Gip6 = F0*F0*W8[ip]*(G8 + F1*G9 + F2*G7 + F3*G10);
-      
-      // Number of operations: 4
-      const double Gip7 = F0*F0*F0*W8[ip]*G11;
-      
-      // Number of operations: 4
-      const double Gip8 = F0*F0*F0*W8[ip]*G12;
-      
-      // Number of operations: 1
-      const double Gip9 = W8[ip]*G13;
-      
-      // Number of operations: 1
-      const double Gip10 = W8[ip]*G14;
-      
-      // Number of operations: 9
-      const double Gip11 = F0*F0*W8[ip]*(G15 + F1*G16 + F2*G5 + F3*G9);
-      
-      
-      // Number of operations for primary indices = 72
-      for (unsigned int j = 0; j < 2; j++)
-      {
-        for (unsigned int k = 0; k < 4; k++)
+      const double Gip11 = F0*F0*F0*W27[ip]*G16;
+      
+      
+      // Number of operations for primary indices = 1323
+      for (unsigned int j = 0; j < 7; j++)
+      {
+        for (unsigned int k = 0; k < 7; k++)
         {
           // Number of operations to compute entry = 3
-          A[nzc4[j]*8 + nzc6[k]] += FE0_C1[ip][k]*FE0_C1_D001[ip][j]*Gip5;
+          A[nzc4[j]*20 + nzc3[k]] += FE0_C1_D010[ip][j]*FE0_C1_D100[ip][k]*Gip0;
           // Number of operations to compute entry = 3
-          A[nzc5[j]*8 + nzc6[k]] += FE0_C1[ip][k]*FE0_C1_D001[ip][j]*Gip6;
+          A[nzc3[j]*20 + nzc3[k]] += FE0_C1_D100[ip][j]*FE0_C1_D100[ip][k]*Gip2;
           // Number of operations to compute entry = 3
-          A[nzc3[j]*8 + nzc6[k]] += FE0_C1[ip][k]*FE0_C1_D001[ip][j]*Gip11;
+          A[nzc4[j]*20 + nzc5[k]] += FE0_C1_D001[ip][k]*FE0_C1_D010[ip][j]*Gip3;
+          // Number of operations to compute entry = 3
+          A[nzc3[j]*20 + nzc5[k]] += FE0_C1_D001[ip][k]*FE0_C1_D100[ip][j]*Gip4;
+          // Number of operations to compute entry = 3
+          A[nzc5[j]*20 + nzc5[k]] += FE0_C1_D001[ip][j]*FE0_C1_D001[ip][k]*Gip5;
+          // Number of operations to compute entry = 3
+          A[nzc3[j]*20 + nzc4[k]] += FE0_C1_D010[ip][k]*FE0_C1_D100[ip][j]*Gip0;
+          // Number of operations to compute entry = 3
+          A[nzc5[j]*20 + nzc3[k]] += FE0_C1_D001[ip][j]*FE0_C1_D100[ip][k]*Gip4;
+          // Number of operations to compute entry = 3
+          A[nzc5[j]*20 + nzc4[k]] += FE0_C1_D001[ip][j]*FE0_C1_D010[ip][k]*Gip3;
+          // Number of operations to compute entry = 3
+          A[nzc4[j]*20 + nzc4[k]] += FE0_C1_D010[ip][j]*FE0_C1_D010[ip][k]*Gip11;
         }// end loop over 'k'
       }// end loop over 'j'
       
-      // Number of operations for primary indices = 108
-      for (unsigned int j = 0; j < 2; j++)
-      {
-        for (unsigned int k = 0; k < 2; k++)
+      // Number of operations for primary indices = 900
+      for (unsigned int j = 0; j < 10; j++)
+      {
+        for (unsigned int k = 0; k < 10; k++)
         {
           // Number of operations to compute entry = 3
-          A[nzc4[j]*8 + nzc3[k]] += FE0_C1_D001[ip][j]*FE0_C1_D001[ip][k]*Gip0;
+          A[nzc7[j]*20 + nzc7[k]] += FE0_C1[ip][j]*FE0_C1[ip][k]*Gip1;
           // Number of operations to compute entry = 3
-          A[nzc4[j]*8 + nzc4[k]] += FE0_C1_D001[ip][j]*FE0_C1_D001[ip][k]*Gip1;
+          A[nzc6[j]*20 + nzc6[k]] += FE0_C1[ip][j]*FE0_C1[ip][k]*Gip7;
           // Number of operations to compute entry = 3
-          A[nzc5[j]*8 + nzc5[k]] += FE0_C1_D001[ip][j]*FE0_C1_D001[ip][k]*Gip3;
-          // Number of operations to compute entry = 3
-          A[nzc5[j]*8 + nzc3[k]] += FE0_C1_D001[ip][j]*FE0_C1_D001[ip][k]*Gip4;
-          // Number of operations to compute entry = 3
-          A[nzc4[j]*8 + nzc5[k]] += FE0_C1_D001[ip][j]*FE0_C1_D001[ip][k]*Gip7;
-          // Number of operations to compute entry = 3
-          A[nzc3[j]*8 + nzc4[k]] += FE0_C1_D001[ip][j]*FE0_C1_D001[ip][k]*Gip0;
-          // Number of operations to compute entry = 3
-          A[nzc3[j]*8 + nzc5[k]] += FE0_C1_D001[ip][j]*FE0_C1_D001[ip][k]*Gip4;
-          // Number of operations to compute entry = 3
-          A[nzc3[j]*8 + nzc3[k]] += FE0_C1_D001[ip][j]*FE0_C1_D001[ip][k]*Gip8;
-          // Number of operations to compute entry = 3
-          A[nzc5[j]*8 + nzc4[k]] += FE0_C1_D001[ip][j]*FE0_C1_D001[ip][k]*Gip7;
+          A[nzc6[j]*20 + nzc7[k]] += FE0_C1[ip][j]*FE0_C1[ip][k]*Gip8;
         }// end loop over 'k'
       }// end loop over 'j'
       
-      // Number of operations for primary indices = 144
-      for (unsigned int j = 0; j < 4; j++)
-      {
-        for (unsigned int k = 0; k < 4; k++)
+      // Number of operations for primary indices = 630
+      for (unsigned int j = 0; j < 7; j++)
+      {
+        for (unsigned int k = 0; k < 10; k++)
         {
           // Number of operations to compute entry = 3
-          A[nzc6[j]*8 + nzc6[k]] += FE0_C1[ip][j]*FE0_C1[ip][k]*Gip2;
+          A[nzc3[j]*20 + nzc6[k]] += FE0_C1[ip][k]*FE0_C1_D100[ip][j]*Gip6;
           // Number of operations to compute entry = 3
-          A[nzc6[j]*8 + nzc7[k]] += FE0_C1[ip][j]*FE0_C1[ip][k]*Gip9;
+          A[nzc4[j]*20 + nzc6[k]] += FE0_C1[ip][k]*FE0_C1_D010[ip][j]*Gip9;
           // Number of operations to compute entry = 3
-          A[nzc7[j]*8 + nzc7[k]] += FE0_C1[ip][j]*FE0_C1[ip][k]*Gip10;
+          A[nzc5[j]*20 + nzc6[k]] += FE0_C1[ip][k]*FE0_C1_D001[ip][j]*Gip10;
         }// end loop over 'k'
       }// end loop over 'j'
     }// end loop over 'ip'
@@ -11274,6 +13182,342 @@ void UFC_SolitaryWave3DBilinearForm_cell
     A[61] = 0;
     A[62] = 0;
     A[63] = 0;
+    A[64] = 0;
+    A[65] = 0;
+    A[66] = 0;
+    A[67] = 0;
+    A[68] = 0;
+    A[69] = 0;
+    A[70] = 0;
+    A[71] = 0;
+    A[72] = 0;
+    A[73] = 0;
+    A[74] = 0;
+    A[75] = 0;
+    A[76] = 0;
+    A[77] = 0;
+    A[78] = 0;
+    A[79] = 0;
+    A[80] = 0;
+    A[81] = 0;
+    A[82] = 0;
+    A[83] = 0;
+    A[84] = 0;
+    A[85] = 0;
+    A[86] = 0;
+    A[87] = 0;
+    A[88] = 0;
+    A[89] = 0;
+    A[90] = 0;
+    A[91] = 0;
+    A[92] = 0;
+    A[93] = 0;
+    A[94] = 0;
+    A[95] = 0;
+    A[96] = 0;
+    A[97] = 0;
+    A[98] = 0;
+    A[99] = 0;
+    A[100] = 0;
+    A[101] = 0;
+    A[102] = 0;
+    A[103] = 0;
+    A[104] = 0;
+    A[105] = 0;
+    A[106] = 0;
+    A[107] = 0;
+    A[108] = 0;
+    A[109] = 0;
+    A[110] = 0;
+    A[111] = 0;
+    A[112] = 0;
+    A[113] = 0;
+    A[114] = 0;
+    A[115] = 0;
+    A[116] = 0;
+    A[117] = 0;
+    A[118] = 0;
+    A[119] = 0;
+    A[120] = 0;
+    A[121] = 0;
+    A[122] = 0;
+    A[123] = 0;
+    A[124] = 0;
+    A[125] = 0;
+    A[126] = 0;
+    A[127] = 0;
+    A[128] = 0;
+    A[129] = 0;
+    A[130] = 0;
+    A[131] = 0;
+    A[132] = 0;
+    A[133] = 0;
+    A[134] = 0;
+    A[135] = 0;
+    A[136] = 0;
+    A[137] = 0;
+    A[138] = 0;
+    A[139] = 0;
+    A[140] = 0;
+    A[141] = 0;
+    A[142] = 0;
+    A[143] = 0;
+    A[144] = 0;
+    A[145] = 0;
+    A[146] = 0;
+    A[147] = 0;
+    A[148] = 0;
+    A[149] = 0;
+    A[150] = 0;
+    A[151] = 0;
+    A[152] = 0;
+    A[153] = 0;
+    A[154] = 0;
+    A[155] = 0;
+    A[156] = 0;
+    A[157] = 0;
+    A[158] = 0;
+    A[159] = 0;
+    A[160] = 0;
+    A[161] = 0;
+    A[162] = 0;
+    A[163] = 0;
+    A[164] = 0;
+    A[165] = 0;
+    A[166] = 0;
+    A[167] = 0;
+    A[168] = 0;
+    A[169] = 0;
+    A[170] = 0;
+    A[171] = 0;
+    A[172] = 0;
+    A[173] = 0;
+    A[174] = 0;
+    A[175] = 0;
+    A[176] = 0;
+    A[177] = 0;
+    A[178] = 0;
+    A[179] = 0;
+    A[180] = 0;
+    A[181] = 0;
+    A[182] = 0;
+    A[183] = 0;
+    A[184] = 0;
+    A[185] = 0;
+    A[186] = 0;
+    A[187] = 0;
+    A[188] = 0;
+    A[189] = 0;
+    A[190] = 0;
+    A[191] = 0;
+    A[192] = 0;
+    A[193] = 0;
+    A[194] = 0;
+    A[195] = 0;
+    A[196] = 0;
+    A[197] = 0;
+    A[198] = 0;
+    A[199] = 0;
+    A[200] = 0;
+    A[201] = 0;
+    A[202] = 0;
+    A[203] = 0;
+    A[204] = 0;
+    A[205] = 0;
+    A[206] = 0;
+    A[207] = 0;
+    A[208] = 0;
+    A[209] = 0;
+    A[210] = 0;
+    A[211] = 0;
+    A[212] = 0;
+    A[213] = 0;
+    A[214] = 0;
+    A[215] = 0;
+    A[216] = 0;
+    A[217] = 0;
+    A[218] = 0;
+    A[219] = 0;
+    A[220] = 0;
+    A[221] = 0;
+    A[222] = 0;
+    A[223] = 0;
+    A[224] = 0;
+    A[225] = 0;
+    A[226] = 0;
+    A[227] = 0;
+    A[228] = 0;
+    A[229] = 0;
+    A[230] = 0;
+    A[231] = 0;
+    A[232] = 0;
+    A[233] = 0;
+    A[234] = 0;
+    A[235] = 0;
+    A[236] = 0;
+    A[237] = 0;
+    A[238] = 0;
+    A[239] = 0;
+    A[240] = 0;
+    A[241] = 0;
+    A[242] = 0;
+    A[243] = 0;
+    A[244] = 0;
+    A[245] = 0;
+    A[246] = 0;
+    A[247] = 0;
+    A[248] = 0;
+    A[249] = 0;
+    A[250] = 0;
+    A[251] = 0;
+    A[252] = 0;
+    A[253] = 0;
+    A[254] = 0;
+    A[255] = 0;
+    A[256] = 0;
+    A[257] = 0;
+    A[258] = 0;
+    A[259] = 0;
+    A[260] = 0;
+    A[261] = 0;
+    A[262] = 0;
+    A[263] = 0;
+    A[264] = 0;
+    A[265] = 0;
+    A[266] = 0;
+    A[267] = 0;
+    A[268] = 0;
+    A[269] = 0;
+    A[270] = 0;
+    A[271] = 0;
+    A[272] = 0;
+    A[273] = 0;
+    A[274] = 0;
+    A[275] = 0;
+    A[276] = 0;
+    A[277] = 0;
+    A[278] = 0;
+    A[279] = 0;
+    A[280] = 0;
+    A[281] = 0;
+    A[282] = 0;
+    A[283] = 0;
+    A[284] = 0;
+    A[285] = 0;
+    A[286] = 0;
+    A[287] = 0;
+    A[288] = 0;
+    A[289] = 0;
+    A[290] = 0;
+    A[291] = 0;
+    A[292] = 0;
+    A[293] = 0;
+    A[294] = 0;
+    A[295] = 0;
+    A[296] = 0;
+    A[297] = 0;
+    A[298] = 0;
+    A[299] = 0;
+    A[300] = 0;
+    A[301] = 0;
+    A[302] = 0;
+    A[303] = 0;
+    A[304] = 0;
+    A[305] = 0;
+    A[306] = 0;
+    A[307] = 0;
+    A[308] = 0;
+    A[309] = 0;
+    A[310] = 0;
+    A[311] = 0;
+    A[312] = 0;
+    A[313] = 0;
+    A[314] = 0;
+    A[315] = 0;
+    A[316] = 0;
+    A[317] = 0;
+    A[318] = 0;
+    A[319] = 0;
+    A[320] = 0;
+    A[321] = 0;
+    A[322] = 0;
+    A[323] = 0;
+    A[324] = 0;
+    A[325] = 0;
+    A[326] = 0;
+    A[327] = 0;
+    A[328] = 0;
+    A[329] = 0;
+    A[330] = 0;
+    A[331] = 0;
+    A[332] = 0;
+    A[333] = 0;
+    A[334] = 0;
+    A[335] = 0;
+    A[336] = 0;
+    A[337] = 0;
+    A[338] = 0;
+    A[339] = 0;
+    A[340] = 0;
+    A[341] = 0;
+    A[342] = 0;
+    A[343] = 0;
+    A[344] = 0;
+    A[345] = 0;
+    A[346] = 0;
+    A[347] = 0;
+    A[348] = 0;
+    A[349] = 0;
+    A[350] = 0;
+    A[351] = 0;
+    A[352] = 0;
+    A[353] = 0;
+    A[354] = 0;
+    A[355] = 0;
+    A[356] = 0;
+    A[357] = 0;
+    A[358] = 0;
+    A[359] = 0;
+    A[360] = 0;
+    A[361] = 0;
+    A[362] = 0;
+    A[363] = 0;
+    A[364] = 0;
+    A[365] = 0;
+    A[366] = 0;
+    A[367] = 0;
+    A[368] = 0;
+    A[369] = 0;
+    A[370] = 0;
+    A[371] = 0;
+    A[372] = 0;
+    A[373] = 0;
+    A[374] = 0;
+    A[375] = 0;
+    A[376] = 0;
+    A[377] = 0;
+    A[378] = 0;
+    A[379] = 0;
+    A[380] = 0;
+    A[381] = 0;
+    A[382] = 0;
+    A[383] = 0;
+    A[384] = 0;
+    A[385] = 0;
+    A[386] = 0;
+    A[387] = 0;
+    A[388] = 0;
+    A[389] = 0;
+    A[390] = 0;
+    A[391] = 0;
+    A[392] = 0;
+    A[393] = 0;
+    A[394] = 0;
+    A[395] = 0;
+    A[396] = 0;
+    A[397] = 0;
+    A[398] = 0;
+    A[399] = 0;
     
     // Add all contributions to element tensor
     integral_0_quadrature.tabulate_tensor(A, w, c);
@@ -11329,30 +13573,35 @@ void UFC_SolitaryWave3DBilinearForm_exte
     
     
     // Array of quadrature weights
-    const static double W4[4] = {0.159020690871988, 0.0909793091280113, 0.159020690871988, 0.0909793091280113};
-    
-    
-    const static double FE0_f0_C1[4][3] = \
-    {{0.666390246014701, 0.178558728263616, 0.155051025721682},
-    {0.280019915499074, 0.0750311102226081, 0.644948974278318},
-    {0.178558728263616, 0.666390246014701, 0.155051025721682},
-    {0.0750311102226081, 0.280019915499074, 0.644948974278318}};
-    // Array of non-zero columns
-    static const unsigned int nzc0[3] = {5, 6, 7};
-    // Array of non-zero columns
-    static const unsigned int nzc1[3] = {1, 2, 3};
-    // Array of non-zero columns
-    static const unsigned int nzc2[3] = {4, 5, 7};
-    // Array of non-zero columns
-    static const unsigned int nzc3[3] = {0, 1, 3};
-    // Array of non-zero columns
-    static const unsigned int nzc9[3] = {0, 1, 2};
-    // Array of non-zero columns
-    static const unsigned int nzc10[3] = {4, 5, 6};
-    // Array of non-zero columns
-    static const unsigned int nzc8[3] = {4, 6, 7};
-    // Array of non-zero columns
-    static const unsigned int nzc7[3] = {0, 2, 3};
+    const static double W9[9] = {0.0558144204830443, 0.063678085099885, 0.0193963833059595, 0.0893030727728709, 0.101884936159816, 0.0310342132895351, 0.0558144204830443, 0.063678085099885, 0.0193963833059595};
+    
+    
+    const static double FE0_f0_C1[9][6] = \
+    {{0.499278833175498, -0.0816158215904471, -0.072892306371455, 0.0363981897820603, 0.286562341986258, 0.332268763018086},
+    {0.0251290590975513, -0.0576951799472843, -0.0741406382908806, 0.109006741895514, 0.858208263567717, 0.139491753677383},
+    {-0.117413197449647, -0.0227857341019971, 0.453155393641927, 0.0753983311062781, 0.593609805131561, 0.0180354016718773},
+    {-0.0403700664710396, -0.0403700664710397, -0.072892306371455, 0.161480265884159, 0.161480265884159, 0.830671907545217},
+    {-0.120901875682904, -0.120901875682904, -0.0741406382908806, 0.483607502731615, 0.483607502731616, 0.348729384193458},
+    {-0.0836260170297298, -0.0836260170297299, 0.453155393641927, 0.33450406811892, 0.33450406811892, 0.0450885041796932},
+    {-0.0816158215904472, 0.499278833175498, -0.072892306371455, 0.286562341986258, 0.0363981897820605, 0.332268763018087},
+    {-0.0576951799472843, 0.0251290590975512, -0.0741406382908807, 0.858208263567716, 0.109006741895515, 0.139491753677383},
+    {-0.0227857341019971, -0.117413197449647, 0.453155393641927, 0.593609805131561, 0.0753983311062786, 0.0180354016718773}};
+    // Array of non-zero columns
+    static const unsigned int nzc0[6] = {11, 12, 13, 14, 15, 16};
+    // Array of non-zero columns
+    static const unsigned int nzc1[6] = {1, 2, 3, 4, 5, 6};
+    // Array of non-zero columns
+    static const unsigned int nzc2[6] = {10, 11, 13, 15, 17, 19};
+    // Array of non-zero columns
+    static const unsigned int nzc3[6] = {0, 1, 3, 5, 7, 9};
+    // Array of non-zero columns
+    static const unsigned int nzc9[6] = {0, 1, 2, 6, 8, 9};
+    // Array of non-zero columns
+    static const unsigned int nzc10[6] = {10, 11, 12, 16, 18, 19};
+    // Array of non-zero columns
+    static const unsigned int nzc8[6] = {10, 12, 13, 14, 17, 18};
+    // Array of non-zero columns
+    static const unsigned int nzc7[6] = {0, 2, 3, 4, 7, 8};
     
     // Number of operations to compute geometry constants: 2
     // Should be added to total operation count.
@@ -11364,34 +13613,34 @@ void UFC_SolitaryWave3DBilinearForm_exte
     {
     case 0:
       {
-      // Total number of operations to compute element tensor (from this point): 144
+      // Total number of operations to compute element tensor (from this point): 1107
       
       // Loop quadrature points for integral
-      // Number of operations to compute element tensor for following IP loop = 144
-      for (unsigned int ip = 0; ip < 4; ip++)
+      // Number of operations to compute element tensor for following IP loop = 1107
+      for (unsigned int ip = 0; ip < 9; ip++)
       {
         
         // Function declarations
         double F0 = 0;
         
-        // Total number of operations to compute function values = 6
-        for (unsigned int r = 0; r < 3; r++)
+        // Total number of operations to compute function values = 12
+        for (unsigned int r = 0; r < 6; r++)
         {
           F0 += FE0_f0_C1[ip][r]*w[0][nzc0[r]];
         }// end loop over 'r'
         
         // Number of operations to compute ip constants: 3
         // Number of operations: 3
-        const double Gip0 = F0*F0*W4[ip]*G0;
-        
-        
-        // Number of operations for primary indices = 27
-        for (unsigned int j = 0; j < 3; j++)
-        {
-          for (unsigned int k = 0; k < 3; k++)
+        const double Gip0 = F0*F0*W9[ip]*G0;
+        
+        
+        // Number of operations for primary indices = 108
+        for (unsigned int j = 0; j < 6; j++)
+        {
+          for (unsigned int k = 0; k < 6; k++)
           {
             // Number of operations to compute entry = 3
-            A[nzc1[j]*8 + nzc0[k]] += FE0_f0_C1[ip][j]*FE0_f0_C1[ip][k]*Gip0;
+            A[nzc1[j]*20 + nzc0[k]] += FE0_f0_C1[ip][j]*FE0_f0_C1[ip][k]*Gip0;
           }// end loop over 'k'
         }// end loop over 'j'
       }// end loop over 'ip'
@@ -11399,34 +13648,34 @@ void UFC_SolitaryWave3DBilinearForm_exte
       break;
     case 1:
       {
-      // Total number of operations to compute element tensor (from this point): 144
+      // Total number of operations to compute element tensor (from this point): 1107
       
       // Loop quadrature points for integral
-      // Number of operations to compute element tensor for following IP loop = 144
-      for (unsigned int ip = 0; ip < 4; ip++)
+      // Number of operations to compute element tensor for following IP loop = 1107
+      for (unsigned int ip = 0; ip < 9; ip++)
       {
         
         // Function declarations
         double F0 = 0;
         
-        // Total number of operations to compute function values = 6
-        for (unsigned int r = 0; r < 3; r++)
+        // Total number of operations to compute function values = 12
+        for (unsigned int r = 0; r < 6; r++)
         {
           F0 += FE0_f0_C1[ip][r]*w[0][nzc8[r]];
         }// end loop over 'r'
         
         // Number of operations to compute ip constants: 3
         // Number of operations: 3
-        const double Gip0 = F0*F0*W4[ip]*G0;
-        
-        
-        // Number of operations for primary indices = 27
-        for (unsigned int j = 0; j < 3; j++)
-        {
-          for (unsigned int k = 0; k < 3; k++)
+        const double Gip0 = F0*F0*W9[ip]*G0;
+        
+        
+        // Number of operations for primary indices = 108
+        for (unsigned int j = 0; j < 6; j++)
+        {
+          for (unsigned int k = 0; k < 6; k++)
           {
             // Number of operations to compute entry = 3
-            A[nzc7[j]*8 + nzc8[k]] += FE0_f0_C1[ip][j]*FE0_f0_C1[ip][k]*Gip0;
+            A[nzc7[j]*20 + nzc8[k]] += FE0_f0_C1[ip][j]*FE0_f0_C1[ip][k]*Gip0;
           }// end loop over 'k'
         }// end loop over 'j'
       }// end loop over 'ip'
@@ -11434,34 +13683,34 @@ void UFC_SolitaryWave3DBilinearForm_exte
       break;
     case 2:
       {
-      // Total number of operations to compute element tensor (from this point): 144
+      // Total number of operations to compute element tensor (from this point): 1107
       
       // Loop quadrature points for integral
-      // Number of operations to compute element tensor for following IP loop = 144
-      for (unsigned int ip = 0; ip < 4; ip++)
+      // Number of operations to compute element tensor for following IP loop = 1107
+      for (unsigned int ip = 0; ip < 9; ip++)
       {
         
         // Function declarations
         double F0 = 0;
         
-        // Total number of operations to compute function values = 6
-        for (unsigned int r = 0; r < 3; r++)
+        // Total number of operations to compute function values = 12
+        for (unsigned int r = 0; r < 6; r++)
         {
           F0 += FE0_f0_C1[ip][r]*w[0][nzc2[r]];
         }// end loop over 'r'
         
         // Number of operations to compute ip constants: 3
         // Number of operations: 3
-        const double Gip0 = F0*F0*W4[ip]*G0;
-        
-        
-        // Number of operations for primary indices = 27
-        for (unsigned int j = 0; j < 3; j++)
-        {
-          for (unsigned int k = 0; k < 3; k++)
+        const double Gip0 = F0*F0*W9[ip]*G0;
+        
+        
+        // Number of operations for primary indices = 108
+        for (unsigned int j = 0; j < 6; j++)
+        {
+          for (unsigned int k = 0; k < 6; k++)
           {
             // Number of operations to compute entry = 3
-            A[nzc3[j]*8 + nzc2[k]] += FE0_f0_C1[ip][j]*FE0_f0_C1[ip][k]*Gip0;
+            A[nzc3[j]*20 + nzc2[k]] += FE0_f0_C1[ip][j]*FE0_f0_C1[ip][k]*Gip0;
           }// end loop over 'k'
         }// end loop over 'j'
       }// end loop over 'ip'
@@ -11469,34 +13718,34 @@ void UFC_SolitaryWave3DBilinearForm_exte
       break;
     case 3:
       {
-      // Total number of operations to compute element tensor (from this point): 144
+      // Total number of operations to compute element tensor (from this point): 1107
       
       // Loop quadrature points for integral
-      // Number of operations to compute element tensor for following IP loop = 144
-      for (unsigned int ip = 0; ip < 4; ip++)
+      // Number of operations to compute element tensor for following IP loop = 1107
+      for (unsigned int ip = 0; ip < 9; ip++)
       {
         
         // Function declarations
         double F0 = 0;
         
-        // Total number of operations to compute function values = 6
-        for (unsigned int r = 0; r < 3; r++)
+        // Total number of operations to compute function values = 12
+        for (unsigned int r = 0; r < 6; r++)
         {
           F0 += FE0_f0_C1[ip][r]*w[0][nzc10[r]];
         }// end loop over 'r'
         
         // Number of operations to compute ip constants: 3
         // Number of operations: 3
-        const double Gip0 = F0*F0*W4[ip]*G0;
-        
-        
-        // Number of operations for primary indices = 27
-        for (unsigned int j = 0; j < 3; j++)
-        {
-          for (unsigned int k = 0; k < 3; k++)
+        const double Gip0 = F0*F0*W9[ip]*G0;
+        
+        
+        // Number of operations for primary indices = 108
+        for (unsigned int j = 0; j < 6; j++)
+        {
+          for (unsigned int k = 0; k < 6; k++)
           {
             // Number of operations to compute entry = 3
-            A[nzc9[j]*8 + nzc10[k]] += FE0_f0_C1[ip][j]*FE0_f0_C1[ip][k]*Gip0;
+            A[nzc9[j]*20 + nzc10[k]] += FE0_f0_C1[ip][j]*FE0_f0_C1[ip][k]*Gip0;
           }// end loop over 'k'
         }// end loop over 'j'
       }// end loop over 'ip'
@@ -11588,6 +13837,342 @@ void UFC_SolitaryWave3DBilinearForm_exte
     A[61] = 0;
     A[62] = 0;
     A[63] = 0;
+    A[64] = 0;
+    A[65] = 0;
+    A[66] = 0;
+    A[67] = 0;
+    A[68] = 0;
+    A[69] = 0;
+    A[70] = 0;
+    A[71] = 0;
+    A[72] = 0;
+    A[73] = 0;
+    A[74] = 0;
+    A[75] = 0;
+    A[76] = 0;
+    A[77] = 0;
+    A[78] = 0;
+    A[79] = 0;
+    A[80] = 0;
+    A[81] = 0;
+    A[82] = 0;
+    A[83] = 0;
+    A[84] = 0;
+    A[85] = 0;
+    A[86] = 0;
+    A[87] = 0;
+    A[88] = 0;
+    A[89] = 0;
+    A[90] = 0;
+    A[91] = 0;
+    A[92] = 0;
+    A[93] = 0;
+    A[94] = 0;
+    A[95] = 0;
+    A[96] = 0;
+    A[97] = 0;
+    A[98] = 0;
+    A[99] = 0;
+    A[100] = 0;
+    A[101] = 0;
+    A[102] = 0;
+    A[103] = 0;
+    A[104] = 0;
+    A[105] = 0;
+    A[106] = 0;
+    A[107] = 0;
+    A[108] = 0;
+    A[109] = 0;
+    A[110] = 0;
+    A[111] = 0;
+    A[112] = 0;
+    A[113] = 0;
+    A[114] = 0;
+    A[115] = 0;
+    A[116] = 0;
+    A[117] = 0;
+    A[118] = 0;
+    A[119] = 0;
+    A[120] = 0;
+    A[121] = 0;
+    A[122] = 0;
+    A[123] = 0;
+    A[124] = 0;
+    A[125] = 0;
+    A[126] = 0;
+    A[127] = 0;
+    A[128] = 0;
+    A[129] = 0;
+    A[130] = 0;
+    A[131] = 0;
+    A[132] = 0;
+    A[133] = 0;
+    A[134] = 0;
+    A[135] = 0;
+    A[136] = 0;
+    A[137] = 0;
+    A[138] = 0;
+    A[139] = 0;
+    A[140] = 0;
+    A[141] = 0;
+    A[142] = 0;
+    A[143] = 0;
+    A[144] = 0;
+    A[145] = 0;
+    A[146] = 0;
+    A[147] = 0;
+    A[148] = 0;
+    A[149] = 0;
+    A[150] = 0;
+    A[151] = 0;
+    A[152] = 0;
+    A[153] = 0;
+    A[154] = 0;
+    A[155] = 0;
+    A[156] = 0;
+    A[157] = 0;
+    A[158] = 0;
+    A[159] = 0;
+    A[160] = 0;
+    A[161] = 0;
+    A[162] = 0;
+    A[163] = 0;
+    A[164] = 0;
+    A[165] = 0;
+    A[166] = 0;
+    A[167] = 0;
+    A[168] = 0;
+    A[169] = 0;
+    A[170] = 0;
+    A[171] = 0;
+    A[172] = 0;
+    A[173] = 0;
+    A[174] = 0;
+    A[175] = 0;
+    A[176] = 0;
+    A[177] = 0;
+    A[178] = 0;
+    A[179] = 0;
+    A[180] = 0;
+    A[181] = 0;
+    A[182] = 0;
+    A[183] = 0;
+    A[184] = 0;
+    A[185] = 0;
+    A[186] = 0;
+    A[187] = 0;
+    A[188] = 0;
+    A[189] = 0;
+    A[190] = 0;
+    A[191] = 0;
+    A[192] = 0;
+    A[193] = 0;
+    A[194] = 0;
+    A[195] = 0;
+    A[196] = 0;
+    A[197] = 0;
+    A[198] = 0;
+    A[199] = 0;
+    A[200] = 0;
+    A[201] = 0;
+    A[202] = 0;
+    A[203] = 0;
+    A[204] = 0;
+    A[205] = 0;
+    A[206] = 0;
+    A[207] = 0;
+    A[208] = 0;
+    A[209] = 0;
+    A[210] = 0;
+    A[211] = 0;
+    A[212] = 0;
+    A[213] = 0;
+    A[214] = 0;
+    A[215] = 0;
+    A[216] = 0;
+    A[217] = 0;
+    A[218] = 0;
+    A[219] = 0;
+    A[220] = 0;
+    A[221] = 0;
+    A[222] = 0;
+    A[223] = 0;
+    A[224] = 0;
+    A[225] = 0;
+    A[226] = 0;
+    A[227] = 0;
+    A[228] = 0;
+    A[229] = 0;
+    A[230] = 0;
+    A[231] = 0;
+    A[232] = 0;
+    A[233] = 0;
+    A[234] = 0;
+    A[235] = 0;
+    A[236] = 0;
+    A[237] = 0;
+    A[238] = 0;
+    A[239] = 0;
+    A[240] = 0;
+    A[241] = 0;
+    A[242] = 0;
+    A[243] = 0;
+    A[244] = 0;
+    A[245] = 0;
+    A[246] = 0;
+    A[247] = 0;
+    A[248] = 0;
+    A[249] = 0;
+    A[250] = 0;
+    A[251] = 0;
+    A[252] = 0;
+    A[253] = 0;
+    A[254] = 0;
+    A[255] = 0;
+    A[256] = 0;
+    A[257] = 0;
+    A[258] = 0;
+    A[259] = 0;
+    A[260] = 0;
+    A[261] = 0;
+    A[262] = 0;
+    A[263] = 0;
+    A[264] = 0;
+    A[265] = 0;
+    A[266] = 0;
+    A[267] = 0;
+    A[268] = 0;
+    A[269] = 0;
+    A[270] = 0;
+    A[271] = 0;
+    A[272] = 0;
+    A[273] = 0;
+    A[274] = 0;
+    A[275] = 0;
+    A[276] = 0;
+    A[277] = 0;
+    A[278] = 0;
+    A[279] = 0;
+    A[280] = 0;
+    A[281] = 0;
+    A[282] = 0;
+    A[283] = 0;
+    A[284] = 0;
+    A[285] = 0;
+    A[286] = 0;
+    A[287] = 0;
+    A[288] = 0;
+    A[289] = 0;
+    A[290] = 0;
+    A[291] = 0;
+    A[292] = 0;
+    A[293] = 0;
+    A[294] = 0;
+    A[295] = 0;
+    A[296] = 0;
+    A[297] = 0;
+    A[298] = 0;
+    A[299] = 0;
+    A[300] = 0;
+    A[301] = 0;
+    A[302] = 0;
+    A[303] = 0;
+    A[304] = 0;
+    A[305] = 0;
+    A[306] = 0;
+    A[307] = 0;
+    A[308] = 0;
+    A[309] = 0;
+    A[310] = 0;
+    A[311] = 0;
+    A[312] = 0;
+    A[313] = 0;
+    A[314] = 0;
+    A[315] = 0;
+    A[316] = 0;
+    A[317] = 0;
+    A[318] = 0;
+    A[319] = 0;
+    A[320] = 0;
+    A[321] = 0;
+    A[322] = 0;
+    A[323] = 0;
+    A[324] = 0;
+    A[325] = 0;
+    A[326] = 0;
+    A[327] = 0;
+    A[328] = 0;
+    A[329] = 0;
+    A[330] = 0;
+    A[331] = 0;
+    A[332] = 0;
+    A[333] = 0;
+    A[334] = 0;
+    A[335] = 0;
+    A[336] = 0;
+    A[337] = 0;
+    A[338] = 0;
+    A[339] = 0;
+    A[340] = 0;
+    A[341] = 0;
+    A[342] = 0;
+    A[343] = 0;
+    A[344] = 0;
+    A[345] = 0;
+    A[346] = 0;
+    A[347] = 0;
+    A[348] = 0;
+    A[349] = 0;
+    A[350] = 0;
+    A[351] = 0;
+    A[352] = 0;
+    A[353] = 0;
+    A[354] = 0;
+    A[355] = 0;
+    A[356] = 0;
+    A[357] = 0;
+    A[358] = 0;
+    A[359] = 0;
+    A[360] = 0;
+    A[361] = 0;
+    A[362] = 0;
+    A[363] = 0;
+    A[364] = 0;
+    A[365] = 0;
+    A[366] = 0;
+    A[367] = 0;
+    A[368] = 0;
+    A[369] = 0;
+    A[370] = 0;
+    A[371] = 0;
+    A[372] = 0;
+    A[373] = 0;
+    A[374] = 0;
+    A[375] = 0;
+    A[376] = 0;
+    A[377] = 0;
+    A[378] = 0;
+    A[379] = 0;
+    A[380] = 0;
+    A[381] = 0;
+    A[382] = 0;
+    A[383] = 0;
+    A[384] = 0;
+    A[385] = 0;
+    A[386] = 0;
+    A[387] = 0;
+    A[388] = 0;
+    A[389] = 0;
+    A[390] = 0;
+    A[391] = 0;
+    A[392] = 0;
+    A[393] = 0;
+    A[394] = 0;
+    A[395] = 0;
+    A[396] = 0;
+    A[397] = 0;
+    A[398] = 0;
+    A[399] = 0;
     
     // Add all contributions to element tensor
     integral_0_quadrature.tabulate_tensor(A, w, c, facet);
@@ -11608,7 +14193,7 @@ UFC_SolitaryWave3DBilinearForm::~UFC_Sol
 /// Return a string identifying the form
 const char* UFC_SolitaryWave3DBilinearForm::signature() const
 {
-    return "Form([Integral(Sum(Sum(Product(Indexed(BasisFunction(MixedElement(*[FiniteElement('Lagrange', Cell('tetrahedron', 1), 1), FiniteElement('Lagrange', Cell('tetrahedron', 1), 1)], **{'value_shape': (2,) }), 0), MultiIndex((FixedIndex(1),))), Indexed(BasisFunction(MixedElement(*[FiniteElement('Lagrange', Cell('tetrahedron', 1), 1), FiniteElement('Lagrange', Cell('tetrahedron', 1), 1)], **{'value_shape': (2,) }), 1), MultiIndex((FixedIndex(1),)))), Product(Indexed(BasisFunction(MixedElement(*[FiniteElement('Lagrange', Cell('tetrahedron', 1), 1), FiniteElement('Lagrange', Cell('tetrahedron', 1), 1)], **{'value_shape': (2,) }), 1), MultiIndex((FixedIndex(0),))), Product(Constant(Cell('tetrahedron', 1), 2), Product(Product(FloatValue(0.5, (), (), {}), Constant(Cell('tetrahedron', 1), 1)), Product(IntValue(-1, (), (), {}), Indexed(BasisFunction(MixedElement(*[FiniteElement('Lagrange', Cell('tetrahedron', 1), 1), FiniteElement('Lagrange', Cell('tetrahedron', 1), 1)], **{'value_shape': (2,) }), 0), MultiIndex((FixedIndex(1),)))))))), Sum(Product(Indexed(BasisFunction(MixedElement(*[FiniteElement('Lagrange', Cell('tetrahedron', 1), 1), FiniteElement('Lagrange', Cell('tetrahedron', 1), 1)], **{'value_shape': (2,) }), 1), MultiIndex((FixedIndex(1),))), Sum(Product(IndexSum(Product(Indexed(ComponentTensor(Indexed(SpatialDerivative(BasisFunction(MixedElement(*[FiniteElement('Lagrange', Cell('tetrahedron', 1), 1), FiniteElement('Lagrange', Cell('tetrahedron', 1), 1)], **{'value_shape': (2,) }), 0), MultiIndex((Index(0),))), MultiIndex((FixedIndex(0),))), MultiIndex((Index(0),))), MultiIndex((Index(1),))), Indexed(ComponentTensor(Indexed(SpatialDerivative(Function(MixedElement(*[FiniteElement('Lagrange', Cell('tetrahedron', 1), 1), FiniteElement('Lagrange', Cell('tetrahedron', 1), 1)], **{'value_shape': (2,) }), 0), MultiIndex((Index(2),))), MultiIndex((FixedIndex(0),))), MultiIndex((Index(2),))), MultiIndex((Index(1),)))), MultiIndex((Index(1),))), Product(Indexed(Function(MixedElement(*[FiniteElement('Lagrange', Cell('tetrahedron', 1), 1), FiniteElement('Lagrange', Cell('tetrahedron', 1), 1)], **{'value_shape': (2,) }), 0), MultiIndex((FixedIndex(1),))), Product(IntValue(3, (), (), {}), Indexed(Function(MixedElement(*[FiniteElement('Lagrange', Cell('tetrahedron', 1), 1), FiniteElement('Lagrange', Cell('tetrahedron', 1), 1)], **{'value_shape': (2,) }), 0), MultiIndex((FixedIndex(1),)))))), Product(IntValue(-1, (), (), {}), Product(Indexed(SpatialDerivative(BasisFunction(MixedElement(*[FiniteElement('Lagrange', Cell('tetrahedron', 1), 1), FiniteElement('Lagrange', Cell('tetrahedron', 1), 1)], **{'value_shape': (2,) }), 0), MultiIndex((FixedIndex(2),))), MultiIndex((FixedIndex(0),))), Product(Indexed(Function(MixedElement(*[FiniteElement('Lagrange', Cell('tetrahedron', 1), 1), FiniteElement('Lagrange', Cell('tetrahedron', 1), 1)], **{'value_shape': (2,) }), 0), MultiIndex((FixedIndex(1),))), Product(IntValue(3, (), (), {}), Indexed(Function(MixedElement(*[FiniteElement('Lagrange', Cell('tetrahedron', 1), 1), FiniteElement('Lagrange', Cell('tetrahedron', 1), 1)], **{'value_shape': (2,) }), 0), MultiIndex((FixedIndex(1),))))))))), Sum(Product(IndexSum(Product(Indexed(ComponentTensor(Indexed(SpatialDerivative(BasisFunction(MixedElement(*[FiniteElement('Lagrange', Cell('tetrahedron', 1), 1), FiniteElement('Lagrange', Cell('tetrahedron', 1), 1)], **{'value_shape': (2,) }), 0), MultiIndex((Index(3),))), MultiIndex((FixedIndex(0),))), MultiIndex((Index(3),))), MultiIndex((Index(4),))), Indexed(ComponentTensor(Indexed(SpatialDerivative(BasisFunction(MixedElement(*[FiniteElement('Lagrange', Cell('tetrahedron', 1), 1), FiniteElement('Lagrange', Cell('tetrahedron', 1), 1)], **{'value_shape': (2,) }), 1), MultiIndex((Index(5),))), MultiIndex((FixedIndex(0),))), MultiIndex((Index(5),))), MultiIndex((Index(4),)))), MultiIndex((Index(4),))), Product(Indexed(Function(MixedElement(*[FiniteElement('Lagrange', Cell('tetrahedron', 1), 1), FiniteElement('Lagrange', Cell('tetrahedron', 1), 1)], **{'value_shape': (2,) }), 0), MultiIndex((FixedIndex(1),))), Power(Indexed(Function(MixedElement(*[FiniteElement('Lagrange', Cell('tetrahedron', 1), 1), FiniteElement('Lagrange', Cell('tetrahedron', 1), 1)], **{'value_shape': (2,) }), 0), MultiIndex((FixedIndex(1),))), IntValue(2, (), (), {})))), Product(Indexed(BasisFunction(MixedElement(*[FiniteElement('Lagrange', Cell('tetrahedron', 1), 1), FiniteElement('Lagrange', Cell('tetrahedron', 1), 1)], **{'value_shape': (2,) }), 1), MultiIndex((FixedIndex(0),))), Product(Constant(Cell('tetrahedron', 1), 2), Indexed(BasisFunction(MixedElement(*[FiniteElement('Lagrange', Cell('tetrahedron', 1), 1), FiniteElement('Lagrange', Cell('tetrahedron', 1), 1)], **{'value_shape': (2,) }), 0), MultiIndex((FixedIndex(0),)))))))), Measure('cell', 0, {'ffc_representation': 'quadrature', 'quadrature_order': 2})), Integral(Product(Indexed(VectorConstant(Cell('tetrahedron', 1), 3, 3), MultiIndex((FixedIndex(2),))), Product(Indexed(BasisFunction(MixedElement(*[FiniteElement('Lagrange', Cell('tetrahedron', 1), 1), FiniteElement('Lagrange', Cell('tetrahedron', 1), 1)], **{'value_shape': (2,) }), 0), MultiIndex((FixedIndex(0),))), Product(Indexed(BasisFunction(MixedElement(*[FiniteElement('Lagrange', Cell('tetrahedron', 1), 1), FiniteElement('Lagrange', Cell('tetrahedron', 1), 1)], **{'value_shape': (2,) }), 1), MultiIndex((FixedIndex(1),))), Product(Indexed(Function(MixedElement(*[FiniteElement('Lagrange', Cell('tetrahedron', 1), 1), FiniteElement('Lagrange', Cell('tetrahedron', 1), 1)], **{'value_shape': (2,) }), 0), MultiIndex((FixedIndex(1),))), Product(IntValue(3, (), (), {}), Indexed(Function(MixedElement(*[FiniteElement('Lagrange', Cell('tetrahedron', 1), 1), FiniteElement('Lagrange', Cell('tetrahedron', 1), 1)], **{'value_shape': (2,) }), 0), MultiIndex((FixedIndex(1),)))))))), Measure('exterior_facet', 0, {'ffc_representation': 'quadrature', 'quadrature_order': 2}))])";
+    return "Form([Integral(Sum(Sum(Product(Indexed(BasisFunction(MixedElement(*[FiniteElement('Lagrange', Cell('tetrahedron', 1), 2), FiniteElement('Lagrange', Cell('tetrahedron', 1), 2)], **{'value_shape': (2,) }), 0), MultiIndex((FixedIndex(1),))), Indexed(BasisFunction(MixedElement(*[FiniteElement('Lagrange', Cell('tetrahedron', 1), 2), FiniteElement('Lagrange', Cell('tetrahedron', 1), 2)], **{'value_shape': (2,) }), 1), MultiIndex((FixedIndex(1),)))), Product(Indexed(BasisFunction(MixedElement(*[FiniteElement('Lagrange', Cell('tetrahedron', 1), 2), FiniteElement('Lagrange', Cell('tetrahedron', 1), 2)], **{'value_shape': (2,) }), 1), MultiIndex((FixedIndex(0),))), Product(Constant(Cell('tetrahedron', 1), 2), Product(Product(FloatValue(0.5, (), (), {}), Constant(Cell('tetrahedron', 1), 1)), Product(IntValue(-1, (), (), {}), Indexed(BasisFunction(MixedElement(*[FiniteElement('Lagrange', Cell('tetrahedron', 1), 2), FiniteElement('Lagrange', Cell('tetrahedron', 1), 2)], **{'value_shape': (2,) }), 0), MultiIndex((FixedIndex(1),)))))))), Sum(Product(Indexed(BasisFunction(MixedElement(*[FiniteElement('Lagrange', Cell('tetrahedron', 1), 2), FiniteElement('Lagrange', Cell('tetrahedron', 1), 2)], **{'value_shape': (2,) }), 1), MultiIndex((FixedIndex(1),))), Sum(Product(IndexSum(Product(Indexed(ComponentTensor(Indexed(SpatialDerivative(BasisFunction(MixedElement(*[FiniteElement('Lagrange', Cell('tetrahedron', 1), 2), FiniteElement('Lagrange', Cell('tetrahedron', 1), 2)], **{'value_shape': (2,) }), 0), MultiIndex((Index(0),))), MultiIndex((FixedIndex(0),))), MultiIndex((Index(0),))), MultiIndex((Index(1),))), Indexed(ComponentTensor(Indexed(SpatialDerivative(Function(MixedElement(*[FiniteElement('Lagrange', Cell('tetrahedron', 1), 2), FiniteElement('Lagrange', Cell('tetrahedron', 1), 2)], **{'value_shape': (2,) }), 0), MultiIndex((Index(2),))), MultiIndex((FixedIndex(0),))), MultiIndex((Index(2),))), MultiIndex((Index(1),)))), MultiIndex((Index(1),))), Product(Indexed(Function(MixedElement(*[FiniteElement('Lagrange', Cell('tetrahedron', 1), 2), FiniteElement('Lagrange', Cell('tetrahedron', 1), 2)], **{'value_shape': (2,) }), 0), MultiIndex((FixedIndex(1),))), Product(IntValue(3, (), (), {}), Indexed(Function(MixedElement(*[FiniteElement('Lagrange', Cell('tetrahedron', 1), 2), FiniteElement('Lagrange', Cell('tetrahedron', 1), 2)], **{'value_shape': (2,) }), 0), MultiIndex((FixedIndex(1),)))))), Product(IntValue(-1, (), (), {}), Product(Indexed(SpatialDerivative(BasisFunction(MixedElement(*[FiniteElement('Lagrange', Cell('tetrahedron', 1), 2), FiniteElement('Lagrange', Cell('tetrahedron', 1), 2)], **{'value_shape': (2,) }), 0), MultiIndex((FixedIndex(2),))), MultiIndex((FixedIndex(0),))), Product(Indexed(Function(MixedElement(*[FiniteElement('Lagrange', Cell('tetrahedron', 1), 2), FiniteElement('Lagrange', Cell('tetrahedron', 1), 2)], **{'value_shape': (2,) }), 0), MultiIndex((FixedIndex(1),))), Product(IntValue(3, (), (), {}), Indexed(Function(MixedElement(*[FiniteElement('Lagrange', Cell('tetrahedron', 1), 2), FiniteElement('Lagrange', Cell('tetrahedron', 1), 2)], **{'value_shape': (2,) }), 0), MultiIndex((FixedIndex(1),))))))))), Sum(Product(IndexSum(Product(Indexed(ComponentTensor(Indexed(SpatialDerivative(BasisFunction(MixedElement(*[FiniteElement('Lagrange', Cell('tetrahedron', 1), 2), FiniteElement('Lagrange', Cell('tetrahedron', 1), 2)], **{'value_shape': (2,) }), 0), MultiIndex((Index(3),))), MultiIndex((FixedIndex(0),))), MultiIndex((Index(3),))), MultiIndex((Index(4),))), Indexed(ComponentTensor(Indexed(SpatialDerivative(BasisFunction(MixedElement(*[FiniteElement('Lagrange', Cell('tetrahedron', 1), 2), FiniteElement('Lagrange', Cell('tetrahedron', 1), 2)], **{'value_shape': (2,) }), 1), MultiIndex((Index(5),))), MultiIndex((FixedIndex(0),))), MultiIndex((Index(5),))), MultiIndex((Index(4),)))), MultiIndex((Index(4),))), Product(Indexed(Function(MixedElement(*[FiniteElement('Lagrange', Cell('tetrahedron', 1), 2), FiniteElement('Lagrange', Cell('tetrahedron', 1), 2)], **{'value_shape': (2,) }), 0), MultiIndex((FixedIndex(1),))), Power(Indexed(Function(MixedElement(*[FiniteElement('Lagrange', Cell('tetrahedron', 1), 2), FiniteElement('Lagrange', Cell('tetrahedron', 1), 2)], **{'value_shape': (2,) }), 0), MultiIndex((FixedIndex(1),))), IntValue(2, (), (), {})))), Product(Indexed(BasisFunction(MixedElement(*[FiniteElement('Lagrange', Cell('tetrahedron', 1), 2), FiniteElement('Lagrange', Cell('tetrahedron', 1), 2)], **{'value_shape': (2,) }), 1), MultiIndex((FixedIndex(0),))), Product(Constant(Cell('tetrahedron', 1), 2), Indexed(BasisFunction(MixedElement(*[FiniteElement('Lagrange', Cell('tetrahedron', 1), 2), FiniteElement('Lagrange', Cell('tetrahedron', 1), 2)], **{'value_shape': (2,) }), 0), MultiIndex((FixedIndex(0),)))))))), Measure('cell', 0, {'ffc_representation': 'quadrature', 'quadrature_order': 4})), Integral(Product(Indexed(VectorConstant(Cell('tetrahedron', 1), 3, 3), MultiIndex((FixedIndex(2),))), Product(Indexed(BasisFunction(MixedElement(*[FiniteElement('Lagrange', Cell('tetrahedron', 1), 2), FiniteElement('Lagrange', Cell('tetrahedron', 1), 2)], **{'value_shape': (2,) }), 0), MultiIndex((FixedIndex(0),))), Product(Indexed(BasisFunction(MixedElement(*[FiniteElement('Lagrange', Cell('tetrahedron', 1), 2), FiniteElement('Lagrange', Cell('tetrahedron', 1), 2)], **{'value_shape': (2,) }), 1), MultiIndex((FixedIndex(1),))), Product(Indexed(Function(MixedElement(*[FiniteElement('Lagrange', Cell('tetrahedron', 1), 2), FiniteElement('Lagrange', Cell('tetrahedron', 1), 2)], **{'value_shape': (2,) }), 0), MultiIndex((FixedIndex(1),))), Product(IntValue(3, (), (), {}), Indexed(Function(MixedElement(*[FiniteElement('Lagrange', Cell('tetrahedron', 1), 2), FiniteElement('Lagrange', Cell('tetrahedron', 1), 2)], **{'value_shape': (2,) }), 0), MultiIndex((FixedIndex(1),)))))))), Measure('exterior_facet', 0, {'ffc_representation': 'quadrature', 'quadrature_order': 4}))])";
 }
 
 /// Return the rank of the global tensor (r)
@@ -11729,7 +14314,7 @@ UFC_SolitaryWave3DLinearForm_finite_elem
 /// Return a string identifying the finite element
 const char* UFC_SolitaryWave3DLinearForm_finite_element_0_0::signature() const
 {
-    return "FiniteElement('Lagrange', 'tetrahedron', 1)";
+    return "FiniteElement('Lagrange', 'tetrahedron', 2)";
 }
 
 /// Return the cell shape
@@ -11741,7 +14326,7 @@ ufc::shape UFC_SolitaryWave3DLinearForm_
 /// Return the dimension of the finite element function space
 unsigned int UFC_SolitaryWave3DLinearForm_finite_element_0_0::space_dimension() const
 {
-    return 4;
+    return 10;
 }
 
 /// Return the rank of the value space
@@ -11832,45 +14417,75 @@ void UFC_SolitaryWave3DLinearForm_finite
     // Generate scalings
     const double scalings_y_0 = 1;
     const double scalings_y_1 = scalings_y_0*(0.5 - 0.5*y);
+    const double scalings_y_2 = scalings_y_1*(0.5 - 0.5*y);
     const double scalings_z_0 = 1;
     const double scalings_z_1 = scalings_z_0*(0.5 - 0.5*z);
+    const double scalings_z_2 = scalings_z_1*(0.5 - 0.5*z);
     
     // Compute psitilde_a
     const double psitilde_a_0 = 1;
     const double psitilde_a_1 = x;
+    const double psitilde_a_2 = 1.5*x*psitilde_a_1 - 0.5*psitilde_a_0;
     
     // Compute psitilde_bs
     const double psitilde_bs_0_0 = 1;
     const double psitilde_bs_0_1 = 1.5*y + 0.5;
+    const double psitilde_bs_0_2 = 0.111111111111111*psitilde_bs_0_1 + 1.66666666666667*y*psitilde_bs_0_1 - 0.555555555555556*psitilde_bs_0_0;
     const double psitilde_bs_1_0 = 1;
+    const double psitilde_bs_1_1 = 2.5*y + 1.5;
+    const double psitilde_bs_2_0 = 1;
     
     // Compute psitilde_cs
     const double psitilde_cs_00_0 = 1;
     const double psitilde_cs_00_1 = 2*z + 1;
+    const double psitilde_cs_00_2 = 0.3125*psitilde_cs_00_1 + 1.875*z*psitilde_cs_00_1 - 0.5625*psitilde_cs_00_0;
     const double psitilde_cs_01_0 = 1;
+    const double psitilde_cs_01_1 = 3*z + 2;
+    const double psitilde_cs_02_0 = 1;
     const double psitilde_cs_10_0 = 1;
+    const double psitilde_cs_10_1 = 3*z + 2;
+    const double psitilde_cs_11_0 = 1;
+    const double psitilde_cs_20_0 = 1;
     
     // Compute basisvalues
     const double basisvalue0 = 0.866025403784439*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_0;
     const double basisvalue1 = 2.73861278752583*psitilde_a_1*scalings_y_1*psitilde_bs_1_0*scalings_z_1*psitilde_cs_10_0;
     const double basisvalue2 = 1.58113883008419*psitilde_a_0*scalings_y_0*psitilde_bs_0_1*scalings_z_1*psitilde_cs_01_0;
     const double basisvalue3 = 1.11803398874989*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_1;
-    
-    // Table(s) of coefficients
-    const static double coefficients0[4][4] = \
-    {{0.288675134594813, -0.182574185835055, -0.105409255338946, -0.074535599249993},
-    {0.288675134594813, 0.182574185835055, -0.105409255338946, -0.074535599249993},
-    {0.288675134594813, 0, 0.210818510677892, -0.074535599249993},
-    {0.288675134594813, 0, 0, 0.223606797749979}};
+    const double basisvalue4 = 5.1234753829798*psitilde_a_2*scalings_y_2*psitilde_bs_2_0*scalings_z_2*psitilde_cs_20_0;
+    const double basisvalue5 = 3.96862696659689*psitilde_a_1*scalings_y_1*psitilde_bs_1_1*scalings_z_2*psitilde_cs_11_0;
+    const double basisvalue6 = 2.29128784747792*psitilde_a_0*scalings_y_0*psitilde_bs_0_2*scalings_z_2*psitilde_cs_02_0;
+    const double basisvalue7 = 3.24037034920393*psitilde_a_1*scalings_y_1*psitilde_bs_1_0*scalings_z_1*psitilde_cs_10_1;
+    const double basisvalue8 = 1.87082869338697*psitilde_a_0*scalings_y_0*psitilde_bs_0_1*scalings_z_1*psitilde_cs_01_1;
+    const double basisvalue9 = 1.3228756555323*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_2;
+    
+    // Table(s) of coefficients
+    const static double coefficients0[10][10] = \
+    {{-0.0577350269189626, -0.0608580619450185, -0.0351364184463153, -0.0248451997499977, 0.0650600048632355, 0.0503952630678969, 0.0290957186981323, 0.0411475599898912, 0.0237565548366599, 0.0167984210226323},
+    {-0.0577350269189625, 0.0608580619450185, -0.0351364184463153, -0.0248451997499977, 0.0650600048632355, -0.050395263067897, 0.0290957186981323, -0.0411475599898912, 0.0237565548366599, 0.0167984210226323},
+    {-0.0577350269189625, 0, 0.0702728368926306, -0.0248451997499977, 0, 0, 0.0872871560943969, 0, -0.0475131096733199, 0.0167984210226323},
+    {-0.0577350269189626, 0, 0, 0.074535599249993, 0, 0, 0, 0, 0, 0.100790526135794},
+    {0.23094010767585, 0, 0.140545673785261, 0.0993807989999906, 0, 0, 0, 0, 0.1187827741833, -0.0671936840905293},
+    {0.230940107675851, 0.121716123890037, -0.0702728368926306, 0.0993807989999907, 0, 0, 0, 0.102868899974728, -0.0593913870916499, -0.0671936840905293},
+    {0.23094010767585, 0.121716123890037, 0.0702728368926307, -0.0993807989999907, 0, 0.100790526135794, -0.087287156094397, -0.0205737799949456, -0.01187827741833, 0.0167984210226323},
+    {0.23094010767585, -0.121716123890037, -0.0702728368926307, 0.0993807989999906, 0, 0, 0, -0.102868899974728, -0.0593913870916499, -0.0671936840905293},
+    {0.23094010767585, -0.121716123890037, 0.0702728368926306, -0.0993807989999906, 0, -0.100790526135794, -0.0872871560943969, 0.0205737799949456, -0.01187827741833, 0.0167984210226323},
+    {0.23094010767585, 0, -0.140545673785261, -0.0993807989999906, -0.130120009726471, 0, 0.0290957186981323, 0, 0.02375655483666, 0.0167984210226323}};
     
     // Extract relevant coefficients
     const double coeff0_0 = coefficients0[dof][0];
     const double coeff0_1 = coefficients0[dof][1];
     const double coeff0_2 = coefficients0[dof][2];
     const double coeff0_3 = coefficients0[dof][3];
+    const double coeff0_4 = coefficients0[dof][4];
+    const double coeff0_5 = coefficients0[dof][5];
+    const double coeff0_6 = coefficients0[dof][6];
+    const double coeff0_7 = coefficients0[dof][7];
+    const double coeff0_8 = coefficients0[dof][8];
+    const double coeff0_9 = coefficients0[dof][9];
     
     // Compute value(s)
-    *values = coeff0_0*basisvalue0 + coeff0_1*basisvalue1 + coeff0_2*basisvalue2 + coeff0_3*basisvalue3;
+    *values = coeff0_0*basisvalue0 + coeff0_1*basisvalue1 + coeff0_2*basisvalue2 + coeff0_3*basisvalue3 + coeff0_4*basisvalue4 + coeff0_5*basisvalue5 + coeff0_6*basisvalue6 + coeff0_7*basisvalue7 + coeff0_8*basisvalue8 + coeff0_9*basisvalue9;
 }
 
 /// Evaluate all basis functions at given point in cell
@@ -12018,56 +14633,98 @@ void UFC_SolitaryWave3DLinearForm_finite
     // Generate scalings
     const double scalings_y_0 = 1;
     const double scalings_y_1 = scalings_y_0*(0.5 - 0.5*y);
+    const double scalings_y_2 = scalings_y_1*(0.5 - 0.5*y);
     const double scalings_z_0 = 1;
     const double scalings_z_1 = scalings_z_0*(0.5 - 0.5*z);
+    const double scalings_z_2 = scalings_z_1*(0.5 - 0.5*z);
     
     // Compute psitilde_a
     const double psitilde_a_0 = 1;
     const double psitilde_a_1 = x;
+    const double psitilde_a_2 = 1.5*x*psitilde_a_1 - 0.5*psitilde_a_0;
     
     // Compute psitilde_bs
     const double psitilde_bs_0_0 = 1;
     const double psitilde_bs_0_1 = 1.5*y + 0.5;
+    const double psitilde_bs_0_2 = 0.111111111111111*psitilde_bs_0_1 + 1.66666666666667*y*psitilde_bs_0_1 - 0.555555555555556*psitilde_bs_0_0;
     const double psitilde_bs_1_0 = 1;
+    const double psitilde_bs_1_1 = 2.5*y + 1.5;
+    const double psitilde_bs_2_0 = 1;
     
     // Compute psitilde_cs
     const double psitilde_cs_00_0 = 1;
     const double psitilde_cs_00_1 = 2*z + 1;
+    const double psitilde_cs_00_2 = 0.3125*psitilde_cs_00_1 + 1.875*z*psitilde_cs_00_1 - 0.5625*psitilde_cs_00_0;
     const double psitilde_cs_01_0 = 1;
+    const double psitilde_cs_01_1 = 3*z + 2;
+    const double psitilde_cs_02_0 = 1;
     const double psitilde_cs_10_0 = 1;
+    const double psitilde_cs_10_1 = 3*z + 2;
+    const double psitilde_cs_11_0 = 1;
+    const double psitilde_cs_20_0 = 1;
     
     // Compute basisvalues
     const double basisvalue0 = 0.866025403784439*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_0;
     const double basisvalue1 = 2.73861278752583*psitilde_a_1*scalings_y_1*psitilde_bs_1_0*scalings_z_1*psitilde_cs_10_0;
     const double basisvalue2 = 1.58113883008419*psitilde_a_0*scalings_y_0*psitilde_bs_0_1*scalings_z_1*psitilde_cs_01_0;
     const double basisvalue3 = 1.11803398874989*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_1;
-    
-    // Table(s) of coefficients
-    const static double coefficients0[4][4] = \
-    {{0.288675134594813, -0.182574185835055, -0.105409255338946, -0.074535599249993},
-    {0.288675134594813, 0.182574185835055, -0.105409255338946, -0.074535599249993},
-    {0.288675134594813, 0, 0.210818510677892, -0.074535599249993},
-    {0.288675134594813, 0, 0, 0.223606797749979}};
+    const double basisvalue4 = 5.1234753829798*psitilde_a_2*scalings_y_2*psitilde_bs_2_0*scalings_z_2*psitilde_cs_20_0;
+    const double basisvalue5 = 3.96862696659689*psitilde_a_1*scalings_y_1*psitilde_bs_1_1*scalings_z_2*psitilde_cs_11_0;
+    const double basisvalue6 = 2.29128784747792*psitilde_a_0*scalings_y_0*psitilde_bs_0_2*scalings_z_2*psitilde_cs_02_0;
+    const double basisvalue7 = 3.24037034920393*psitilde_a_1*scalings_y_1*psitilde_bs_1_0*scalings_z_1*psitilde_cs_10_1;
+    const double basisvalue8 = 1.87082869338697*psitilde_a_0*scalings_y_0*psitilde_bs_0_1*scalings_z_1*psitilde_cs_01_1;
+    const double basisvalue9 = 1.3228756555323*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_2;
+    
+    // Table(s) of coefficients
+    const static double coefficients0[10][10] = \
+    {{-0.0577350269189626, -0.0608580619450185, -0.0351364184463153, -0.0248451997499977, 0.0650600048632355, 0.0503952630678969, 0.0290957186981323, 0.0411475599898912, 0.0237565548366599, 0.0167984210226323},
+    {-0.0577350269189625, 0.0608580619450185, -0.0351364184463153, -0.0248451997499977, 0.0650600048632355, -0.050395263067897, 0.0290957186981323, -0.0411475599898912, 0.0237565548366599, 0.0167984210226323},
+    {-0.0577350269189625, 0, 0.0702728368926306, -0.0248451997499977, 0, 0, 0.0872871560943969, 0, -0.0475131096733199, 0.0167984210226323},
+    {-0.0577350269189626, 0, 0, 0.074535599249993, 0, 0, 0, 0, 0, 0.100790526135794},
+    {0.23094010767585, 0, 0.140545673785261, 0.0993807989999906, 0, 0, 0, 0, 0.1187827741833, -0.0671936840905293},
+    {0.230940107675851, 0.121716123890037, -0.0702728368926306, 0.0993807989999907, 0, 0, 0, 0.102868899974728, -0.0593913870916499, -0.0671936840905293},
+    {0.23094010767585, 0.121716123890037, 0.0702728368926307, -0.0993807989999907, 0, 0.100790526135794, -0.087287156094397, -0.0205737799949456, -0.01187827741833, 0.0167984210226323},
+    {0.23094010767585, -0.121716123890037, -0.0702728368926307, 0.0993807989999906, 0, 0, 0, -0.102868899974728, -0.0593913870916499, -0.0671936840905293},
+    {0.23094010767585, -0.121716123890037, 0.0702728368926306, -0.0993807989999906, 0, -0.100790526135794, -0.0872871560943969, 0.0205737799949456, -0.01187827741833, 0.0167984210226323},
+    {0.23094010767585, 0, -0.140545673785261, -0.0993807989999906, -0.130120009726471, 0, 0.0290957186981323, 0, 0.02375655483666, 0.0167984210226323}};
     
     // Interesting (new) part
     // Tables of derivatives of the polynomial base (transpose)
-    const static double dmats0[4][4] = \
-    {{0, 0, 0, 0},
-    {6.32455532033676, 0, 0, 0},
-    {0, 0, 0, 0},
-    {0, 0, 0, 0}};
-    
-    const static double dmats1[4][4] = \
-    {{0, 0, 0, 0},
-    {3.16227766016838, 0, 0, 0},
-    {5.47722557505166, 0, 0, 0},
-    {0, 0, 0, 0}};
-    
-    const static double dmats2[4][4] = \
-    {{0, 0, 0, 0},
-    {3.16227766016838, 0, 0, 0},
-    {1.82574185835055, 0, 0, 0},
-    {5.16397779494322, 0, 0, 0}};
+    const static double dmats0[10][10] = \
+    {{0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {6.32455532033676, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {0, 11.2249721603218, 0, 0, 0, 0, 0, 0, 0, 0},
+    {4.58257569495584, 0, 8.36660026534076, -1.18321595661992, 0, 0, 0, 0, 0, 0},
+    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {3.74165738677394, 0, 0, 8.69482604771366, 0, 0, 0, 0, 0, 0},
+    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
+    
+    const static double dmats1[10][10] = \
+    {{0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {3.16227766016838, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {5.47722557505166, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {2.95803989154981, 5.61248608016091, -1.08012344973464, -0.763762615825974, 0, 0, 0, 0, 0, 0},
+    {2.29128784747792, 7.24568837309472, 4.18330013267038, -0.591607978309962, 0, 0, 0, 0, 0, 0},
+    {-2.64575131106459, 0, 9.66091783079296, 0.683130051063974, 0, 0, 0, 0, 0, 0},
+    {1.87082869338697, 0, 0, 4.34741302385683, 0, 0, 0, 0, 0, 0},
+    {3.24037034920393, 0, 0, 7.52994023880668, 0, 0, 0, 0, 0, 0},
+    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
+    
+    const static double dmats2[10][10] = \
+    {{0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {3.16227766016838, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {1.82574185835055, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {5.16397779494322, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {2.95803989154981, 5.61248608016091, -1.08012344973464, -0.763762615825974, 0, 0, 0, 0, 0, 0},
+    {2.29128784747792, 1.44913767461894, 4.18330013267038, -0.591607978309962, 0, 0, 0, 0, 0, 0},
+    {1.32287565553229, 0, 3.86436713231718, -0.341565025531986, 0, 0, 0, 0, 0, 0},
+    {1.87082869338697, 7.09929573971954, 0, 4.34741302385683, 0, 0, 0, 0, 0, 0},
+    {1.08012344973464, 0, 7.09929573971954, 2.50998007960223, 0, 0, 0, 0, 0, 0},
+    {-3.81881307912987, 0, 0, 8.87411967464942, 0, 0, 0, 0, 0, 0}};
     
     // Compute reference derivatives
     // Declare pointer to array of derivatives on FIAT element
@@ -12078,12 +14735,24 @@ void UFC_SolitaryWave3DLinearForm_finite
     double coeff0_1 = 0;
     double coeff0_2 = 0;
     double coeff0_3 = 0;
+    double coeff0_4 = 0;
+    double coeff0_5 = 0;
+    double coeff0_6 = 0;
+    double coeff0_7 = 0;
+    double coeff0_8 = 0;
+    double coeff0_9 = 0;
     
     // Declare new coefficients
     double new_coeff0_0 = 0;
     double new_coeff0_1 = 0;
     double new_coeff0_2 = 0;
     double new_coeff0_3 = 0;
+    double new_coeff0_4 = 0;
+    double new_coeff0_5 = 0;
+    double new_coeff0_6 = 0;
+    double new_coeff0_7 = 0;
+    double new_coeff0_8 = 0;
+    double new_coeff0_9 = 0;
     
     // Loop possible derivatives
     for (unsigned int deriv_num = 0; deriv_num < num_derivatives; deriv_num++)
@@ -12093,6 +14762,12 @@ void UFC_SolitaryWave3DLinearForm_finite
       new_coeff0_1 = coefficients0[dof][1];
       new_coeff0_2 = coefficients0[dof][2];
       new_coeff0_3 = coefficients0[dof][3];
+      new_coeff0_4 = coefficients0[dof][4];
+      new_coeff0_5 = coefficients0[dof][5];
+      new_coeff0_6 = coefficients0[dof][6];
+      new_coeff0_7 = coefficients0[dof][7];
+      new_coeff0_8 = coefficients0[dof][8];
+      new_coeff0_9 = coefficients0[dof][9];
     
       // Loop derivative order
       for (unsigned int j = 0; j < n; j++)
@@ -12102,32 +14777,56 @@ void UFC_SolitaryWave3DLinearForm_finite
         coeff0_1 = new_coeff0_1;
         coeff0_2 = new_coeff0_2;
         coeff0_3 = new_coeff0_3;
+        coeff0_4 = new_coeff0_4;
+        coeff0_5 = new_coeff0_5;
+        coeff0_6 = new_coeff0_6;
+        coeff0_7 = new_coeff0_7;
+        coeff0_8 = new_coeff0_8;
+        coeff0_9 = new_coeff0_9;
     
         if(combinations[deriv_num][j] == 0)
         {
-          new_coeff0_0 = coeff0_0*dmats0[0][0] + coeff0_1*dmats0[1][0] + coeff0_2*dmats0[2][0] + coeff0_3*dmats0[3][0];
-          new_coeff0_1 = coeff0_0*dmats0[0][1] + coeff0_1*dmats0[1][1] + coeff0_2*dmats0[2][1] + coeff0_3*dmats0[3][1];
-          new_coeff0_2 = coeff0_0*dmats0[0][2] + coeff0_1*dmats0[1][2] + coeff0_2*dmats0[2][2] + coeff0_3*dmats0[3][2];
-          new_coeff0_3 = coeff0_0*dmats0[0][3] + coeff0_1*dmats0[1][3] + coeff0_2*dmats0[2][3] + coeff0_3*dmats0[3][3];
+          new_coeff0_0 = coeff0_0*dmats0[0][0] + coeff0_1*dmats0[1][0] + coeff0_2*dmats0[2][0] + coeff0_3*dmats0[3][0] + coeff0_4*dmats0[4][0] + coeff0_5*dmats0[5][0] + coeff0_6*dmats0[6][0] + coeff0_7*dmats0[7][0] + coeff0_8*dmats0[8][0] + coeff0_9*dmats0[9][0];
+          new_coeff0_1 = coeff0_0*dmats0[0][1] + coeff0_1*dmats0[1][1] + coeff0_2*dmats0[2][1] + coeff0_3*dmats0[3][1] + coeff0_4*dmats0[4][1] + coeff0_5*dmats0[5][1] + coeff0_6*dmats0[6][1] + coeff0_7*dmats0[7][1] + coeff0_8*dmats0[8][1] + coeff0_9*dmats0[9][1];
+          new_coeff0_2 = coeff0_0*dmats0[0][2] + coeff0_1*dmats0[1][2] + coeff0_2*dmats0[2][2] + coeff0_3*dmats0[3][2] + coeff0_4*dmats0[4][2] + coeff0_5*dmats0[5][2] + coeff0_6*dmats0[6][2] + coeff0_7*dmats0[7][2] + coeff0_8*dmats0[8][2] + coeff0_9*dmats0[9][2];
+          new_coeff0_3 = coeff0_0*dmats0[0][3] + coeff0_1*dmats0[1][3] + coeff0_2*dmats0[2][3] + coeff0_3*dmats0[3][3] + coeff0_4*dmats0[4][3] + coeff0_5*dmats0[5][3] + coeff0_6*dmats0[6][3] + coeff0_7*dmats0[7][3] + coeff0_8*dmats0[8][3] + coeff0_9*dmats0[9][3];
+          new_coeff0_4 = coeff0_0*dmats0[0][4] + coeff0_1*dmats0[1][4] + coeff0_2*dmats0[2][4] + coeff0_3*dmats0[3][4] + coeff0_4*dmats0[4][4] + coeff0_5*dmats0[5][4] + coeff0_6*dmats0[6][4] + coeff0_7*dmats0[7][4] + coeff0_8*dmats0[8][4] + coeff0_9*dmats0[9][4];
+          new_coeff0_5 = coeff0_0*dmats0[0][5] + coeff0_1*dmats0[1][5] + coeff0_2*dmats0[2][5] + coeff0_3*dmats0[3][5] + coeff0_4*dmats0[4][5] + coeff0_5*dmats0[5][5] + coeff0_6*dmats0[6][5] + coeff0_7*dmats0[7][5] + coeff0_8*dmats0[8][5] + coeff0_9*dmats0[9][5];
+          new_coeff0_6 = coeff0_0*dmats0[0][6] + coeff0_1*dmats0[1][6] + coeff0_2*dmats0[2][6] + coeff0_3*dmats0[3][6] + coeff0_4*dmats0[4][6] + coeff0_5*dmats0[5][6] + coeff0_6*dmats0[6][6] + coeff0_7*dmats0[7][6] + coeff0_8*dmats0[8][6] + coeff0_9*dmats0[9][6];
+          new_coeff0_7 = coeff0_0*dmats0[0][7] + coeff0_1*dmats0[1][7] + coeff0_2*dmats0[2][7] + coeff0_3*dmats0[3][7] + coeff0_4*dmats0[4][7] + coeff0_5*dmats0[5][7] + coeff0_6*dmats0[6][7] + coeff0_7*dmats0[7][7] + coeff0_8*dmats0[8][7] + coeff0_9*dmats0[9][7];
+          new_coeff0_8 = coeff0_0*dmats0[0][8] + coeff0_1*dmats0[1][8] + coeff0_2*dmats0[2][8] + coeff0_3*dmats0[3][8] + coeff0_4*dmats0[4][8] + coeff0_5*dmats0[5][8] + coeff0_6*dmats0[6][8] + coeff0_7*dmats0[7][8] + coeff0_8*dmats0[8][8] + coeff0_9*dmats0[9][8];
+          new_coeff0_9 = coeff0_0*dmats0[0][9] + coeff0_1*dmats0[1][9] + coeff0_2*dmats0[2][9] + coeff0_3*dmats0[3][9] + coeff0_4*dmats0[4][9] + coeff0_5*dmats0[5][9] + coeff0_6*dmats0[6][9] + coeff0_7*dmats0[7][9] + coeff0_8*dmats0[8][9] + coeff0_9*dmats0[9][9];
         }
         if(combinations[deriv_num][j] == 1)
         {
-          new_coeff0_0 = coeff0_0*dmats1[0][0] + coeff0_1*dmats1[1][0] + coeff0_2*dmats1[2][0] + coeff0_3*dmats1[3][0];
-          new_coeff0_1 = coeff0_0*dmats1[0][1] + coeff0_1*dmats1[1][1] + coeff0_2*dmats1[2][1] + coeff0_3*dmats1[3][1];
-          new_coeff0_2 = coeff0_0*dmats1[0][2] + coeff0_1*dmats1[1][2] + coeff0_2*dmats1[2][2] + coeff0_3*dmats1[3][2];
-          new_coeff0_3 = coeff0_0*dmats1[0][3] + coeff0_1*dmats1[1][3] + coeff0_2*dmats1[2][3] + coeff0_3*dmats1[3][3];
+          new_coeff0_0 = coeff0_0*dmats1[0][0] + coeff0_1*dmats1[1][0] + coeff0_2*dmats1[2][0] + coeff0_3*dmats1[3][0] + coeff0_4*dmats1[4][0] + coeff0_5*dmats1[5][0] + coeff0_6*dmats1[6][0] + coeff0_7*dmats1[7][0] + coeff0_8*dmats1[8][0] + coeff0_9*dmats1[9][0];
+          new_coeff0_1 = coeff0_0*dmats1[0][1] + coeff0_1*dmats1[1][1] + coeff0_2*dmats1[2][1] + coeff0_3*dmats1[3][1] + coeff0_4*dmats1[4][1] + coeff0_5*dmats1[5][1] + coeff0_6*dmats1[6][1] + coeff0_7*dmats1[7][1] + coeff0_8*dmats1[8][1] + coeff0_9*dmats1[9][1];
+          new_coeff0_2 = coeff0_0*dmats1[0][2] + coeff0_1*dmats1[1][2] + coeff0_2*dmats1[2][2] + coeff0_3*dmats1[3][2] + coeff0_4*dmats1[4][2] + coeff0_5*dmats1[5][2] + coeff0_6*dmats1[6][2] + coeff0_7*dmats1[7][2] + coeff0_8*dmats1[8][2] + coeff0_9*dmats1[9][2];
+          new_coeff0_3 = coeff0_0*dmats1[0][3] + coeff0_1*dmats1[1][3] + coeff0_2*dmats1[2][3] + coeff0_3*dmats1[3][3] + coeff0_4*dmats1[4][3] + coeff0_5*dmats1[5][3] + coeff0_6*dmats1[6][3] + coeff0_7*dmats1[7][3] + coeff0_8*dmats1[8][3] + coeff0_9*dmats1[9][3];
+          new_coeff0_4 = coeff0_0*dmats1[0][4] + coeff0_1*dmats1[1][4] + coeff0_2*dmats1[2][4] + coeff0_3*dmats1[3][4] + coeff0_4*dmats1[4][4] + coeff0_5*dmats1[5][4] + coeff0_6*dmats1[6][4] + coeff0_7*dmats1[7][4] + coeff0_8*dmats1[8][4] + coeff0_9*dmats1[9][4];
+          new_coeff0_5 = coeff0_0*dmats1[0][5] + coeff0_1*dmats1[1][5] + coeff0_2*dmats1[2][5] + coeff0_3*dmats1[3][5] + coeff0_4*dmats1[4][5] + coeff0_5*dmats1[5][5] + coeff0_6*dmats1[6][5] + coeff0_7*dmats1[7][5] + coeff0_8*dmats1[8][5] + coeff0_9*dmats1[9][5];
+          new_coeff0_6 = coeff0_0*dmats1[0][6] + coeff0_1*dmats1[1][6] + coeff0_2*dmats1[2][6] + coeff0_3*dmats1[3][6] + coeff0_4*dmats1[4][6] + coeff0_5*dmats1[5][6] + coeff0_6*dmats1[6][6] + coeff0_7*dmats1[7][6] + coeff0_8*dmats1[8][6] + coeff0_9*dmats1[9][6];
+          new_coeff0_7 = coeff0_0*dmats1[0][7] + coeff0_1*dmats1[1][7] + coeff0_2*dmats1[2][7] + coeff0_3*dmats1[3][7] + coeff0_4*dmats1[4][7] + coeff0_5*dmats1[5][7] + coeff0_6*dmats1[6][7] + coeff0_7*dmats1[7][7] + coeff0_8*dmats1[8][7] + coeff0_9*dmats1[9][7];
+          new_coeff0_8 = coeff0_0*dmats1[0][8] + coeff0_1*dmats1[1][8] + coeff0_2*dmats1[2][8] + coeff0_3*dmats1[3][8] + coeff0_4*dmats1[4][8] + coeff0_5*dmats1[5][8] + coeff0_6*dmats1[6][8] + coeff0_7*dmats1[7][8] + coeff0_8*dmats1[8][8] + coeff0_9*dmats1[9][8];
+          new_coeff0_9 = coeff0_0*dmats1[0][9] + coeff0_1*dmats1[1][9] + coeff0_2*dmats1[2][9] + coeff0_3*dmats1[3][9] + coeff0_4*dmats1[4][9] + coeff0_5*dmats1[5][9] + coeff0_6*dmats1[6][9] + coeff0_7*dmats1[7][9] + coeff0_8*dmats1[8][9] + coeff0_9*dmats1[9][9];
         }
         if(combinations[deriv_num][j] == 2)
         {
-          new_coeff0_0 = coeff0_0*dmats2[0][0] + coeff0_1*dmats2[1][0] + coeff0_2*dmats2[2][0] + coeff0_3*dmats2[3][0];
-          new_coeff0_1 = coeff0_0*dmats2[0][1] + coeff0_1*dmats2[1][1] + coeff0_2*dmats2[2][1] + coeff0_3*dmats2[3][1];
-          new_coeff0_2 = coeff0_0*dmats2[0][2] + coeff0_1*dmats2[1][2] + coeff0_2*dmats2[2][2] + coeff0_3*dmats2[3][2];
-          new_coeff0_3 = coeff0_0*dmats2[0][3] + coeff0_1*dmats2[1][3] + coeff0_2*dmats2[2][3] + coeff0_3*dmats2[3][3];
+          new_coeff0_0 = coeff0_0*dmats2[0][0] + coeff0_1*dmats2[1][0] + coeff0_2*dmats2[2][0] + coeff0_3*dmats2[3][0] + coeff0_4*dmats2[4][0] + coeff0_5*dmats2[5][0] + coeff0_6*dmats2[6][0] + coeff0_7*dmats2[7][0] + coeff0_8*dmats2[8][0] + coeff0_9*dmats2[9][0];
+          new_coeff0_1 = coeff0_0*dmats2[0][1] + coeff0_1*dmats2[1][1] + coeff0_2*dmats2[2][1] + coeff0_3*dmats2[3][1] + coeff0_4*dmats2[4][1] + coeff0_5*dmats2[5][1] + coeff0_6*dmats2[6][1] + coeff0_7*dmats2[7][1] + coeff0_8*dmats2[8][1] + coeff0_9*dmats2[9][1];
+          new_coeff0_2 = coeff0_0*dmats2[0][2] + coeff0_1*dmats2[1][2] + coeff0_2*dmats2[2][2] + coeff0_3*dmats2[3][2] + coeff0_4*dmats2[4][2] + coeff0_5*dmats2[5][2] + coeff0_6*dmats2[6][2] + coeff0_7*dmats2[7][2] + coeff0_8*dmats2[8][2] + coeff0_9*dmats2[9][2];
+          new_coeff0_3 = coeff0_0*dmats2[0][3] + coeff0_1*dmats2[1][3] + coeff0_2*dmats2[2][3] + coeff0_3*dmats2[3][3] + coeff0_4*dmats2[4][3] + coeff0_5*dmats2[5][3] + coeff0_6*dmats2[6][3] + coeff0_7*dmats2[7][3] + coeff0_8*dmats2[8][3] + coeff0_9*dmats2[9][3];
+          new_coeff0_4 = coeff0_0*dmats2[0][4] + coeff0_1*dmats2[1][4] + coeff0_2*dmats2[2][4] + coeff0_3*dmats2[3][4] + coeff0_4*dmats2[4][4] + coeff0_5*dmats2[5][4] + coeff0_6*dmats2[6][4] + coeff0_7*dmats2[7][4] + coeff0_8*dmats2[8][4] + coeff0_9*dmats2[9][4];
+          new_coeff0_5 = coeff0_0*dmats2[0][5] + coeff0_1*dmats2[1][5] + coeff0_2*dmats2[2][5] + coeff0_3*dmats2[3][5] + coeff0_4*dmats2[4][5] + coeff0_5*dmats2[5][5] + coeff0_6*dmats2[6][5] + coeff0_7*dmats2[7][5] + coeff0_8*dmats2[8][5] + coeff0_9*dmats2[9][5];
+          new_coeff0_6 = coeff0_0*dmats2[0][6] + coeff0_1*dmats2[1][6] + coeff0_2*dmats2[2][6] + coeff0_3*dmats2[3][6] + coeff0_4*dmats2[4][6] + coeff0_5*dmats2[5][6] + coeff0_6*dmats2[6][6] + coeff0_7*dmats2[7][6] + coeff0_8*dmats2[8][6] + coeff0_9*dmats2[9][6];
+          new_coeff0_7 = coeff0_0*dmats2[0][7] + coeff0_1*dmats2[1][7] + coeff0_2*dmats2[2][7] + coeff0_3*dmats2[3][7] + coeff0_4*dmats2[4][7] + coeff0_5*dmats2[5][7] + coeff0_6*dmats2[6][7] + coeff0_7*dmats2[7][7] + coeff0_8*dmats2[8][7] + coeff0_9*dmats2[9][7];
+          new_coeff0_8 = coeff0_0*dmats2[0][8] + coeff0_1*dmats2[1][8] + coeff0_2*dmats2[2][8] + coeff0_3*dmats2[3][8] + coeff0_4*dmats2[4][8] + coeff0_5*dmats2[5][8] + coeff0_6*dmats2[6][8] + coeff0_7*dmats2[7][8] + coeff0_8*dmats2[8][8] + coeff0_9*dmats2[9][8];
+          new_coeff0_9 = coeff0_0*dmats2[0][9] + coeff0_1*dmats2[1][9] + coeff0_2*dmats2[2][9] + coeff0_3*dmats2[3][9] + coeff0_4*dmats2[4][9] + coeff0_5*dmats2[5][9] + coeff0_6*dmats2[6][9] + coeff0_7*dmats2[7][9] + coeff0_8*dmats2[8][9] + coeff0_9*dmats2[9][9];
         }
     
       }
       // Compute derivatives on reference element as dot product of coefficients and basisvalues
-      derivatives[deriv_num] = new_coeff0_0*basisvalue0 + new_coeff0_1*basisvalue1 + new_coeff0_2*basisvalue2 + new_coeff0_3*basisvalue3;
+      derivatives[deriv_num] = new_coeff0_0*basisvalue0 + new_coeff0_1*basisvalue1 + new_coeff0_2*basisvalue2 + new_coeff0_3*basisvalue3 + new_coeff0_4*basisvalue4 + new_coeff0_5*basisvalue5 + new_coeff0_6*basisvalue6 + new_coeff0_7*basisvalue7 + new_coeff0_8*basisvalue8 + new_coeff0_9*basisvalue9;
     }
     
     // Transform derivatives back to physical element
@@ -12167,9 +14866,9 @@ double UFC_SolitaryWave3DLinearForm_fini
                                    const ufc::cell& c) const
 {
     // The reference points, direction and weights:
-    const static double X[4][1][3] = {{{0, 0, 0}}, {{1, 0, 0}}, {{0, 1, 0}}, {{0, 0, 1}}};
-    const static double W[4][1] = {{1}, {1}, {1}, {1}};
-    const static double D[4][1][1] = {{{1}}, {{1}}, {{1}}, {{1}}};
+    const static double X[10][1][3] = {{{0, 0, 0}}, {{1, 0, 0}}, {{0, 1, 0}}, {{0, 0, 1}}, {{0, 0.5, 0.5}}, {{0.5, 0, 0.5}}, {{0.5, 0.5, 0}}, {{0, 0, 0.5}}, {{0, 0.5, 0}}, {{0.5, 0, 0}}};
+    const static double W[10][1] = {{1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}};
+    const static double D[10][1][1] = {{{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}};
     
     const double * const * x = c.coordinates;
     double result = 0.0;
@@ -12252,7 +14951,7 @@ UFC_SolitaryWave3DLinearForm_finite_elem
 /// Return a string identifying the finite element
 const char* UFC_SolitaryWave3DLinearForm_finite_element_0_1::signature() const
 {
-    return "FiniteElement('Lagrange', 'tetrahedron', 1)";
+    return "FiniteElement('Lagrange', 'tetrahedron', 2)";
 }
 
 /// Return the cell shape
@@ -12264,7 +14963,7 @@ ufc::shape UFC_SolitaryWave3DLinearForm_
 /// Return the dimension of the finite element function space
 unsigned int UFC_SolitaryWave3DLinearForm_finite_element_0_1::space_dimension() const
 {
-    return 4;
+    return 10;
 }
 
 /// Return the rank of the value space
@@ -12355,45 +15054,75 @@ void UFC_SolitaryWave3DLinearForm_finite
     // Generate scalings
     const double scalings_y_0 = 1;
     const double scalings_y_1 = scalings_y_0*(0.5 - 0.5*y);
+    const double scalings_y_2 = scalings_y_1*(0.5 - 0.5*y);
     const double scalings_z_0 = 1;
     const double scalings_z_1 = scalings_z_0*(0.5 - 0.5*z);
+    const double scalings_z_2 = scalings_z_1*(0.5 - 0.5*z);
     
     // Compute psitilde_a
     const double psitilde_a_0 = 1;
     const double psitilde_a_1 = x;
+    const double psitilde_a_2 = 1.5*x*psitilde_a_1 - 0.5*psitilde_a_0;
     
     // Compute psitilde_bs
     const double psitilde_bs_0_0 = 1;
     const double psitilde_bs_0_1 = 1.5*y + 0.5;
+    const double psitilde_bs_0_2 = 0.111111111111111*psitilde_bs_0_1 + 1.66666666666667*y*psitilde_bs_0_1 - 0.555555555555556*psitilde_bs_0_0;
     const double psitilde_bs_1_0 = 1;
+    const double psitilde_bs_1_1 = 2.5*y + 1.5;
+    const double psitilde_bs_2_0 = 1;
     
     // Compute psitilde_cs
     const double psitilde_cs_00_0 = 1;
     const double psitilde_cs_00_1 = 2*z + 1;
+    const double psitilde_cs_00_2 = 0.3125*psitilde_cs_00_1 + 1.875*z*psitilde_cs_00_1 - 0.5625*psitilde_cs_00_0;
     const double psitilde_cs_01_0 = 1;
+    const double psitilde_cs_01_1 = 3*z + 2;
+    const double psitilde_cs_02_0 = 1;
     const double psitilde_cs_10_0 = 1;
+    const double psitilde_cs_10_1 = 3*z + 2;
+    const double psitilde_cs_11_0 = 1;
+    const double psitilde_cs_20_0 = 1;
     
     // Compute basisvalues
     const double basisvalue0 = 0.866025403784439*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_0;
     const double basisvalue1 = 2.73861278752583*psitilde_a_1*scalings_y_1*psitilde_bs_1_0*scalings_z_1*psitilde_cs_10_0;
     const double basisvalue2 = 1.58113883008419*psitilde_a_0*scalings_y_0*psitilde_bs_0_1*scalings_z_1*psitilde_cs_01_0;
     const double basisvalue3 = 1.11803398874989*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_1;
-    
-    // Table(s) of coefficients
-    const static double coefficients0[4][4] = \
-    {{0.288675134594813, -0.182574185835055, -0.105409255338946, -0.074535599249993},
-    {0.288675134594813, 0.182574185835055, -0.105409255338946, -0.074535599249993},
-    {0.288675134594813, 0, 0.210818510677892, -0.074535599249993},
-    {0.288675134594813, 0, 0, 0.223606797749979}};
+    const double basisvalue4 = 5.1234753829798*psitilde_a_2*scalings_y_2*psitilde_bs_2_0*scalings_z_2*psitilde_cs_20_0;
+    const double basisvalue5 = 3.96862696659689*psitilde_a_1*scalings_y_1*psitilde_bs_1_1*scalings_z_2*psitilde_cs_11_0;
+    const double basisvalue6 = 2.29128784747792*psitilde_a_0*scalings_y_0*psitilde_bs_0_2*scalings_z_2*psitilde_cs_02_0;
+    const double basisvalue7 = 3.24037034920393*psitilde_a_1*scalings_y_1*psitilde_bs_1_0*scalings_z_1*psitilde_cs_10_1;
+    const double basisvalue8 = 1.87082869338697*psitilde_a_0*scalings_y_0*psitilde_bs_0_1*scalings_z_1*psitilde_cs_01_1;
+    const double basisvalue9 = 1.3228756555323*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_2;
+    
+    // Table(s) of coefficients
+    const static double coefficients0[10][10] = \
+    {{-0.0577350269189626, -0.0608580619450185, -0.0351364184463153, -0.0248451997499977, 0.0650600048632355, 0.0503952630678969, 0.0290957186981323, 0.0411475599898912, 0.0237565548366599, 0.0167984210226323},
+    {-0.0577350269189625, 0.0608580619450185, -0.0351364184463153, -0.0248451997499977, 0.0650600048632355, -0.050395263067897, 0.0290957186981323, -0.0411475599898912, 0.0237565548366599, 0.0167984210226323},
+    {-0.0577350269189625, 0, 0.0702728368926306, -0.0248451997499977, 0, 0, 0.0872871560943969, 0, -0.0475131096733199, 0.0167984210226323},
+    {-0.0577350269189626, 0, 0, 0.074535599249993, 0, 0, 0, 0, 0, 0.100790526135794},
+    {0.23094010767585, 0, 0.140545673785261, 0.0993807989999906, 0, 0, 0, 0, 0.1187827741833, -0.0671936840905293},
+    {0.230940107675851, 0.121716123890037, -0.0702728368926306, 0.0993807989999907, 0, 0, 0, 0.102868899974728, -0.0593913870916499, -0.0671936840905293},
+    {0.23094010767585, 0.121716123890037, 0.0702728368926307, -0.0993807989999907, 0, 0.100790526135794, -0.087287156094397, -0.0205737799949456, -0.01187827741833, 0.0167984210226323},
+    {0.23094010767585, -0.121716123890037, -0.0702728368926307, 0.0993807989999906, 0, 0, 0, -0.102868899974728, -0.0593913870916499, -0.0671936840905293},
+    {0.23094010767585, -0.121716123890037, 0.0702728368926306, -0.0993807989999906, 0, -0.100790526135794, -0.0872871560943969, 0.0205737799949456, -0.01187827741833, 0.0167984210226323},
+    {0.23094010767585, 0, -0.140545673785261, -0.0993807989999906, -0.130120009726471, 0, 0.0290957186981323, 0, 0.02375655483666, 0.0167984210226323}};
     
     // Extract relevant coefficients
     const double coeff0_0 = coefficients0[dof][0];
     const double coeff0_1 = coefficients0[dof][1];
     const double coeff0_2 = coefficients0[dof][2];
     const double coeff0_3 = coefficients0[dof][3];
+    const double coeff0_4 = coefficients0[dof][4];
+    const double coeff0_5 = coefficients0[dof][5];
+    const double coeff0_6 = coefficients0[dof][6];
+    const double coeff0_7 = coefficients0[dof][7];
+    const double coeff0_8 = coefficients0[dof][8];
+    const double coeff0_9 = coefficients0[dof][9];
     
     // Compute value(s)
-    *values = coeff0_0*basisvalue0 + coeff0_1*basisvalue1 + coeff0_2*basisvalue2 + coeff0_3*basisvalue3;
+    *values = coeff0_0*basisvalue0 + coeff0_1*basisvalue1 + coeff0_2*basisvalue2 + coeff0_3*basisvalue3 + coeff0_4*basisvalue4 + coeff0_5*basisvalue5 + coeff0_6*basisvalue6 + coeff0_7*basisvalue7 + coeff0_8*basisvalue8 + coeff0_9*basisvalue9;
 }
 
 /// Evaluate all basis functions at given point in cell
@@ -12541,56 +15270,98 @@ void UFC_SolitaryWave3DLinearForm_finite
     // Generate scalings
     const double scalings_y_0 = 1;
     const double scalings_y_1 = scalings_y_0*(0.5 - 0.5*y);
+    const double scalings_y_2 = scalings_y_1*(0.5 - 0.5*y);
     const double scalings_z_0 = 1;
     const double scalings_z_1 = scalings_z_0*(0.5 - 0.5*z);
+    const double scalings_z_2 = scalings_z_1*(0.5 - 0.5*z);
     
     // Compute psitilde_a
     const double psitilde_a_0 = 1;
     const double psitilde_a_1 = x;
+    const double psitilde_a_2 = 1.5*x*psitilde_a_1 - 0.5*psitilde_a_0;
     
     // Compute psitilde_bs
     const double psitilde_bs_0_0 = 1;
     const double psitilde_bs_0_1 = 1.5*y + 0.5;
+    const double psitilde_bs_0_2 = 0.111111111111111*psitilde_bs_0_1 + 1.66666666666667*y*psitilde_bs_0_1 - 0.555555555555556*psitilde_bs_0_0;
     const double psitilde_bs_1_0 = 1;
+    const double psitilde_bs_1_1 = 2.5*y + 1.5;
+    const double psitilde_bs_2_0 = 1;
     
     // Compute psitilde_cs
     const double psitilde_cs_00_0 = 1;
     const double psitilde_cs_00_1 = 2*z + 1;
+    const double psitilde_cs_00_2 = 0.3125*psitilde_cs_00_1 + 1.875*z*psitilde_cs_00_1 - 0.5625*psitilde_cs_00_0;
     const double psitilde_cs_01_0 = 1;
+    const double psitilde_cs_01_1 = 3*z + 2;
+    const double psitilde_cs_02_0 = 1;
     const double psitilde_cs_10_0 = 1;
+    const double psitilde_cs_10_1 = 3*z + 2;
+    const double psitilde_cs_11_0 = 1;
+    const double psitilde_cs_20_0 = 1;
     
     // Compute basisvalues
     const double basisvalue0 = 0.866025403784439*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_0;
     const double basisvalue1 = 2.73861278752583*psitilde_a_1*scalings_y_1*psitilde_bs_1_0*scalings_z_1*psitilde_cs_10_0;
     const double basisvalue2 = 1.58113883008419*psitilde_a_0*scalings_y_0*psitilde_bs_0_1*scalings_z_1*psitilde_cs_01_0;
     const double basisvalue3 = 1.11803398874989*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_1;
-    
-    // Table(s) of coefficients
-    const static double coefficients0[4][4] = \
-    {{0.288675134594813, -0.182574185835055, -0.105409255338946, -0.074535599249993},
-    {0.288675134594813, 0.182574185835055, -0.105409255338946, -0.074535599249993},
-    {0.288675134594813, 0, 0.210818510677892, -0.074535599249993},
-    {0.288675134594813, 0, 0, 0.223606797749979}};
+    const double basisvalue4 = 5.1234753829798*psitilde_a_2*scalings_y_2*psitilde_bs_2_0*scalings_z_2*psitilde_cs_20_0;
+    const double basisvalue5 = 3.96862696659689*psitilde_a_1*scalings_y_1*psitilde_bs_1_1*scalings_z_2*psitilde_cs_11_0;
+    const double basisvalue6 = 2.29128784747792*psitilde_a_0*scalings_y_0*psitilde_bs_0_2*scalings_z_2*psitilde_cs_02_0;
+    const double basisvalue7 = 3.24037034920393*psitilde_a_1*scalings_y_1*psitilde_bs_1_0*scalings_z_1*psitilde_cs_10_1;
+    const double basisvalue8 = 1.87082869338697*psitilde_a_0*scalings_y_0*psitilde_bs_0_1*scalings_z_1*psitilde_cs_01_1;
+    const double basisvalue9 = 1.3228756555323*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_2;
+    
+    // Table(s) of coefficients
+    const static double coefficients0[10][10] = \
+    {{-0.0577350269189626, -0.0608580619450185, -0.0351364184463153, -0.0248451997499977, 0.0650600048632355, 0.0503952630678969, 0.0290957186981323, 0.0411475599898912, 0.0237565548366599, 0.0167984210226323},
+    {-0.0577350269189625, 0.0608580619450185, -0.0351364184463153, -0.0248451997499977, 0.0650600048632355, -0.050395263067897, 0.0290957186981323, -0.0411475599898912, 0.0237565548366599, 0.0167984210226323},
+    {-0.0577350269189625, 0, 0.0702728368926306, -0.0248451997499977, 0, 0, 0.0872871560943969, 0, -0.0475131096733199, 0.0167984210226323},
+    {-0.0577350269189626, 0, 0, 0.074535599249993, 0, 0, 0, 0, 0, 0.100790526135794},
+    {0.23094010767585, 0, 0.140545673785261, 0.0993807989999906, 0, 0, 0, 0, 0.1187827741833, -0.0671936840905293},
+    {0.230940107675851, 0.121716123890037, -0.0702728368926306, 0.0993807989999907, 0, 0, 0, 0.102868899974728, -0.0593913870916499, -0.0671936840905293},
+    {0.23094010767585, 0.121716123890037, 0.0702728368926307, -0.0993807989999907, 0, 0.100790526135794, -0.087287156094397, -0.0205737799949456, -0.01187827741833, 0.0167984210226323},
+    {0.23094010767585, -0.121716123890037, -0.0702728368926307, 0.0993807989999906, 0, 0, 0, -0.102868899974728, -0.0593913870916499, -0.0671936840905293},
+    {0.23094010767585, -0.121716123890037, 0.0702728368926306, -0.0993807989999906, 0, -0.100790526135794, -0.0872871560943969, 0.0205737799949456, -0.01187827741833, 0.0167984210226323},
+    {0.23094010767585, 0, -0.140545673785261, -0.0993807989999906, -0.130120009726471, 0, 0.0290957186981323, 0, 0.02375655483666, 0.0167984210226323}};
     
     // Interesting (new) part
     // Tables of derivatives of the polynomial base (transpose)
-    const static double dmats0[4][4] = \
-    {{0, 0, 0, 0},
-    {6.32455532033676, 0, 0, 0},
-    {0, 0, 0, 0},
-    {0, 0, 0, 0}};
-    
-    const static double dmats1[4][4] = \
-    {{0, 0, 0, 0},
-    {3.16227766016838, 0, 0, 0},
-    {5.47722557505166, 0, 0, 0},
-    {0, 0, 0, 0}};
-    
-    const static double dmats2[4][4] = \
-    {{0, 0, 0, 0},
-    {3.16227766016838, 0, 0, 0},
-    {1.82574185835055, 0, 0, 0},
-    {5.16397779494322, 0, 0, 0}};
+    const static double dmats0[10][10] = \
+    {{0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {6.32455532033676, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {0, 11.2249721603218, 0, 0, 0, 0, 0, 0, 0, 0},
+    {4.58257569495584, 0, 8.36660026534076, -1.18321595661992, 0, 0, 0, 0, 0, 0},
+    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {3.74165738677394, 0, 0, 8.69482604771366, 0, 0, 0, 0, 0, 0},
+    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
+    
+    const static double dmats1[10][10] = \
+    {{0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {3.16227766016838, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {5.47722557505166, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {2.95803989154981, 5.61248608016091, -1.08012344973464, -0.763762615825974, 0, 0, 0, 0, 0, 0},
+    {2.29128784747792, 7.24568837309472, 4.18330013267038, -0.591607978309962, 0, 0, 0, 0, 0, 0},
+    {-2.64575131106459, 0, 9.66091783079296, 0.683130051063974, 0, 0, 0, 0, 0, 0},
+    {1.87082869338697, 0, 0, 4.34741302385683, 0, 0, 0, 0, 0, 0},
+    {3.24037034920393, 0, 0, 7.52994023880668, 0, 0, 0, 0, 0, 0},
+    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
+    
+    const static double dmats2[10][10] = \
+    {{0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {3.16227766016838, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {1.82574185835055, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {5.16397779494322, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {2.95803989154981, 5.61248608016091, -1.08012344973464, -0.763762615825974, 0, 0, 0, 0, 0, 0},
+    {2.29128784747792, 1.44913767461894, 4.18330013267038, -0.591607978309962, 0, 0, 0, 0, 0, 0},
+    {1.32287565553229, 0, 3.86436713231718, -0.341565025531986, 0, 0, 0, 0, 0, 0},
+    {1.87082869338697, 7.09929573971954, 0, 4.34741302385683, 0, 0, 0, 0, 0, 0},
+    {1.08012344973464, 0, 7.09929573971954, 2.50998007960223, 0, 0, 0, 0, 0, 0},
+    {-3.81881307912987, 0, 0, 8.87411967464942, 0, 0, 0, 0, 0, 0}};
     
     // Compute reference derivatives
     // Declare pointer to array of derivatives on FIAT element
@@ -12601,12 +15372,24 @@ void UFC_SolitaryWave3DLinearForm_finite
     double coeff0_1 = 0;
     double coeff0_2 = 0;
     double coeff0_3 = 0;
+    double coeff0_4 = 0;
+    double coeff0_5 = 0;
+    double coeff0_6 = 0;
+    double coeff0_7 = 0;
+    double coeff0_8 = 0;
+    double coeff0_9 = 0;
     
     // Declare new coefficients
     double new_coeff0_0 = 0;
     double new_coeff0_1 = 0;
     double new_coeff0_2 = 0;
     double new_coeff0_3 = 0;
+    double new_coeff0_4 = 0;
+    double new_coeff0_5 = 0;
+    double new_coeff0_6 = 0;
+    double new_coeff0_7 = 0;
+    double new_coeff0_8 = 0;
+    double new_coeff0_9 = 0;
     
     // Loop possible derivatives
     for (unsigned int deriv_num = 0; deriv_num < num_derivatives; deriv_num++)
@@ -12616,6 +15399,12 @@ void UFC_SolitaryWave3DLinearForm_finite
       new_coeff0_1 = coefficients0[dof][1];
       new_coeff0_2 = coefficients0[dof][2];
       new_coeff0_3 = coefficients0[dof][3];
+      new_coeff0_4 = coefficients0[dof][4];
+      new_coeff0_5 = coefficients0[dof][5];
+      new_coeff0_6 = coefficients0[dof][6];
+      new_coeff0_7 = coefficients0[dof][7];
+      new_coeff0_8 = coefficients0[dof][8];
+      new_coeff0_9 = coefficients0[dof][9];
     
       // Loop derivative order
       for (unsigned int j = 0; j < n; j++)
@@ -12625,32 +15414,56 @@ void UFC_SolitaryWave3DLinearForm_finite
         coeff0_1 = new_coeff0_1;
         coeff0_2 = new_coeff0_2;
         coeff0_3 = new_coeff0_3;
+        coeff0_4 = new_coeff0_4;
+        coeff0_5 = new_coeff0_5;
+        coeff0_6 = new_coeff0_6;
+        coeff0_7 = new_coeff0_7;
+        coeff0_8 = new_coeff0_8;
+        coeff0_9 = new_coeff0_9;
     
         if(combinations[deriv_num][j] == 0)
         {
-          new_coeff0_0 = coeff0_0*dmats0[0][0] + coeff0_1*dmats0[1][0] + coeff0_2*dmats0[2][0] + coeff0_3*dmats0[3][0];
-          new_coeff0_1 = coeff0_0*dmats0[0][1] + coeff0_1*dmats0[1][1] + coeff0_2*dmats0[2][1] + coeff0_3*dmats0[3][1];
-          new_coeff0_2 = coeff0_0*dmats0[0][2] + coeff0_1*dmats0[1][2] + coeff0_2*dmats0[2][2] + coeff0_3*dmats0[3][2];
-          new_coeff0_3 = coeff0_0*dmats0[0][3] + coeff0_1*dmats0[1][3] + coeff0_2*dmats0[2][3] + coeff0_3*dmats0[3][3];
+          new_coeff0_0 = coeff0_0*dmats0[0][0] + coeff0_1*dmats0[1][0] + coeff0_2*dmats0[2][0] + coeff0_3*dmats0[3][0] + coeff0_4*dmats0[4][0] + coeff0_5*dmats0[5][0] + coeff0_6*dmats0[6][0] + coeff0_7*dmats0[7][0] + coeff0_8*dmats0[8][0] + coeff0_9*dmats0[9][0];
+          new_coeff0_1 = coeff0_0*dmats0[0][1] + coeff0_1*dmats0[1][1] + coeff0_2*dmats0[2][1] + coeff0_3*dmats0[3][1] + coeff0_4*dmats0[4][1] + coeff0_5*dmats0[5][1] + coeff0_6*dmats0[6][1] + coeff0_7*dmats0[7][1] + coeff0_8*dmats0[8][1] + coeff0_9*dmats0[9][1];
+          new_coeff0_2 = coeff0_0*dmats0[0][2] + coeff0_1*dmats0[1][2] + coeff0_2*dmats0[2][2] + coeff0_3*dmats0[3][2] + coeff0_4*dmats0[4][2] + coeff0_5*dmats0[5][2] + coeff0_6*dmats0[6][2] + coeff0_7*dmats0[7][2] + coeff0_8*dmats0[8][2] + coeff0_9*dmats0[9][2];
+          new_coeff0_3 = coeff0_0*dmats0[0][3] + coeff0_1*dmats0[1][3] + coeff0_2*dmats0[2][3] + coeff0_3*dmats0[3][3] + coeff0_4*dmats0[4][3] + coeff0_5*dmats0[5][3] + coeff0_6*dmats0[6][3] + coeff0_7*dmats0[7][3] + coeff0_8*dmats0[8][3] + coeff0_9*dmats0[9][3];
+          new_coeff0_4 = coeff0_0*dmats0[0][4] + coeff0_1*dmats0[1][4] + coeff0_2*dmats0[2][4] + coeff0_3*dmats0[3][4] + coeff0_4*dmats0[4][4] + coeff0_5*dmats0[5][4] + coeff0_6*dmats0[6][4] + coeff0_7*dmats0[7][4] + coeff0_8*dmats0[8][4] + coeff0_9*dmats0[9][4];
+          new_coeff0_5 = coeff0_0*dmats0[0][5] + coeff0_1*dmats0[1][5] + coeff0_2*dmats0[2][5] + coeff0_3*dmats0[3][5] + coeff0_4*dmats0[4][5] + coeff0_5*dmats0[5][5] + coeff0_6*dmats0[6][5] + coeff0_7*dmats0[7][5] + coeff0_8*dmats0[8][5] + coeff0_9*dmats0[9][5];
+          new_coeff0_6 = coeff0_0*dmats0[0][6] + coeff0_1*dmats0[1][6] + coeff0_2*dmats0[2][6] + coeff0_3*dmats0[3][6] + coeff0_4*dmats0[4][6] + coeff0_5*dmats0[5][6] + coeff0_6*dmats0[6][6] + coeff0_7*dmats0[7][6] + coeff0_8*dmats0[8][6] + coeff0_9*dmats0[9][6];
+          new_coeff0_7 = coeff0_0*dmats0[0][7] + coeff0_1*dmats0[1][7] + coeff0_2*dmats0[2][7] + coeff0_3*dmats0[3][7] + coeff0_4*dmats0[4][7] + coeff0_5*dmats0[5][7] + coeff0_6*dmats0[6][7] + coeff0_7*dmats0[7][7] + coeff0_8*dmats0[8][7] + coeff0_9*dmats0[9][7];
+          new_coeff0_8 = coeff0_0*dmats0[0][8] + coeff0_1*dmats0[1][8] + coeff0_2*dmats0[2][8] + coeff0_3*dmats0[3][8] + coeff0_4*dmats0[4][8] + coeff0_5*dmats0[5][8] + coeff0_6*dmats0[6][8] + coeff0_7*dmats0[7][8] + coeff0_8*dmats0[8][8] + coeff0_9*dmats0[9][8];
+          new_coeff0_9 = coeff0_0*dmats0[0][9] + coeff0_1*dmats0[1][9] + coeff0_2*dmats0[2][9] + coeff0_3*dmats0[3][9] + coeff0_4*dmats0[4][9] + coeff0_5*dmats0[5][9] + coeff0_6*dmats0[6][9] + coeff0_7*dmats0[7][9] + coeff0_8*dmats0[8][9] + coeff0_9*dmats0[9][9];
         }
         if(combinations[deriv_num][j] == 1)
         {
-          new_coeff0_0 = coeff0_0*dmats1[0][0] + coeff0_1*dmats1[1][0] + coeff0_2*dmats1[2][0] + coeff0_3*dmats1[3][0];
-          new_coeff0_1 = coeff0_0*dmats1[0][1] + coeff0_1*dmats1[1][1] + coeff0_2*dmats1[2][1] + coeff0_3*dmats1[3][1];
-          new_coeff0_2 = coeff0_0*dmats1[0][2] + coeff0_1*dmats1[1][2] + coeff0_2*dmats1[2][2] + coeff0_3*dmats1[3][2];
-          new_coeff0_3 = coeff0_0*dmats1[0][3] + coeff0_1*dmats1[1][3] + coeff0_2*dmats1[2][3] + coeff0_3*dmats1[3][3];
+          new_coeff0_0 = coeff0_0*dmats1[0][0] + coeff0_1*dmats1[1][0] + coeff0_2*dmats1[2][0] + coeff0_3*dmats1[3][0] + coeff0_4*dmats1[4][0] + coeff0_5*dmats1[5][0] + coeff0_6*dmats1[6][0] + coeff0_7*dmats1[7][0] + coeff0_8*dmats1[8][0] + coeff0_9*dmats1[9][0];
+          new_coeff0_1 = coeff0_0*dmats1[0][1] + coeff0_1*dmats1[1][1] + coeff0_2*dmats1[2][1] + coeff0_3*dmats1[3][1] + coeff0_4*dmats1[4][1] + coeff0_5*dmats1[5][1] + coeff0_6*dmats1[6][1] + coeff0_7*dmats1[7][1] + coeff0_8*dmats1[8][1] + coeff0_9*dmats1[9][1];
+          new_coeff0_2 = coeff0_0*dmats1[0][2] + coeff0_1*dmats1[1][2] + coeff0_2*dmats1[2][2] + coeff0_3*dmats1[3][2] + coeff0_4*dmats1[4][2] + coeff0_5*dmats1[5][2] + coeff0_6*dmats1[6][2] + coeff0_7*dmats1[7][2] + coeff0_8*dmats1[8][2] + coeff0_9*dmats1[9][2];
+          new_coeff0_3 = coeff0_0*dmats1[0][3] + coeff0_1*dmats1[1][3] + coeff0_2*dmats1[2][3] + coeff0_3*dmats1[3][3] + coeff0_4*dmats1[4][3] + coeff0_5*dmats1[5][3] + coeff0_6*dmats1[6][3] + coeff0_7*dmats1[7][3] + coeff0_8*dmats1[8][3] + coeff0_9*dmats1[9][3];
+          new_coeff0_4 = coeff0_0*dmats1[0][4] + coeff0_1*dmats1[1][4] + coeff0_2*dmats1[2][4] + coeff0_3*dmats1[3][4] + coeff0_4*dmats1[4][4] + coeff0_5*dmats1[5][4] + coeff0_6*dmats1[6][4] + coeff0_7*dmats1[7][4] + coeff0_8*dmats1[8][4] + coeff0_9*dmats1[9][4];
+          new_coeff0_5 = coeff0_0*dmats1[0][5] + coeff0_1*dmats1[1][5] + coeff0_2*dmats1[2][5] + coeff0_3*dmats1[3][5] + coeff0_4*dmats1[4][5] + coeff0_5*dmats1[5][5] + coeff0_6*dmats1[6][5] + coeff0_7*dmats1[7][5] + coeff0_8*dmats1[8][5] + coeff0_9*dmats1[9][5];
+          new_coeff0_6 = coeff0_0*dmats1[0][6] + coeff0_1*dmats1[1][6] + coeff0_2*dmats1[2][6] + coeff0_3*dmats1[3][6] + coeff0_4*dmats1[4][6] + coeff0_5*dmats1[5][6] + coeff0_6*dmats1[6][6] + coeff0_7*dmats1[7][6] + coeff0_8*dmats1[8][6] + coeff0_9*dmats1[9][6];
+          new_coeff0_7 = coeff0_0*dmats1[0][7] + coeff0_1*dmats1[1][7] + coeff0_2*dmats1[2][7] + coeff0_3*dmats1[3][7] + coeff0_4*dmats1[4][7] + coeff0_5*dmats1[5][7] + coeff0_6*dmats1[6][7] + coeff0_7*dmats1[7][7] + coeff0_8*dmats1[8][7] + coeff0_9*dmats1[9][7];
+          new_coeff0_8 = coeff0_0*dmats1[0][8] + coeff0_1*dmats1[1][8] + coeff0_2*dmats1[2][8] + coeff0_3*dmats1[3][8] + coeff0_4*dmats1[4][8] + coeff0_5*dmats1[5][8] + coeff0_6*dmats1[6][8] + coeff0_7*dmats1[7][8] + coeff0_8*dmats1[8][8] + coeff0_9*dmats1[9][8];
+          new_coeff0_9 = coeff0_0*dmats1[0][9] + coeff0_1*dmats1[1][9] + coeff0_2*dmats1[2][9] + coeff0_3*dmats1[3][9] + coeff0_4*dmats1[4][9] + coeff0_5*dmats1[5][9] + coeff0_6*dmats1[6][9] + coeff0_7*dmats1[7][9] + coeff0_8*dmats1[8][9] + coeff0_9*dmats1[9][9];
         }
         if(combinations[deriv_num][j] == 2)
         {
-          new_coeff0_0 = coeff0_0*dmats2[0][0] + coeff0_1*dmats2[1][0] + coeff0_2*dmats2[2][0] + coeff0_3*dmats2[3][0];
-          new_coeff0_1 = coeff0_0*dmats2[0][1] + coeff0_1*dmats2[1][1] + coeff0_2*dmats2[2][1] + coeff0_3*dmats2[3][1];
-          new_coeff0_2 = coeff0_0*dmats2[0][2] + coeff0_1*dmats2[1][2] + coeff0_2*dmats2[2][2] + coeff0_3*dmats2[3][2];
-          new_coeff0_3 = coeff0_0*dmats2[0][3] + coeff0_1*dmats2[1][3] + coeff0_2*dmats2[2][3] + coeff0_3*dmats2[3][3];
+          new_coeff0_0 = coeff0_0*dmats2[0][0] + coeff0_1*dmats2[1][0] + coeff0_2*dmats2[2][0] + coeff0_3*dmats2[3][0] + coeff0_4*dmats2[4][0] + coeff0_5*dmats2[5][0] + coeff0_6*dmats2[6][0] + coeff0_7*dmats2[7][0] + coeff0_8*dmats2[8][0] + coeff0_9*dmats2[9][0];
+          new_coeff0_1 = coeff0_0*dmats2[0][1] + coeff0_1*dmats2[1][1] + coeff0_2*dmats2[2][1] + coeff0_3*dmats2[3][1] + coeff0_4*dmats2[4][1] + coeff0_5*dmats2[5][1] + coeff0_6*dmats2[6][1] + coeff0_7*dmats2[7][1] + coeff0_8*dmats2[8][1] + coeff0_9*dmats2[9][1];
+          new_coeff0_2 = coeff0_0*dmats2[0][2] + coeff0_1*dmats2[1][2] + coeff0_2*dmats2[2][2] + coeff0_3*dmats2[3][2] + coeff0_4*dmats2[4][2] + coeff0_5*dmats2[5][2] + coeff0_6*dmats2[6][2] + coeff0_7*dmats2[7][2] + coeff0_8*dmats2[8][2] + coeff0_9*dmats2[9][2];
+          new_coeff0_3 = coeff0_0*dmats2[0][3] + coeff0_1*dmats2[1][3] + coeff0_2*dmats2[2][3] + coeff0_3*dmats2[3][3] + coeff0_4*dmats2[4][3] + coeff0_5*dmats2[5][3] + coeff0_6*dmats2[6][3] + coeff0_7*dmats2[7][3] + coeff0_8*dmats2[8][3] + coeff0_9*dmats2[9][3];
+          new_coeff0_4 = coeff0_0*dmats2[0][4] + coeff0_1*dmats2[1][4] + coeff0_2*dmats2[2][4] + coeff0_3*dmats2[3][4] + coeff0_4*dmats2[4][4] + coeff0_5*dmats2[5][4] + coeff0_6*dmats2[6][4] + coeff0_7*dmats2[7][4] + coeff0_8*dmats2[8][4] + coeff0_9*dmats2[9][4];
+          new_coeff0_5 = coeff0_0*dmats2[0][5] + coeff0_1*dmats2[1][5] + coeff0_2*dmats2[2][5] + coeff0_3*dmats2[3][5] + coeff0_4*dmats2[4][5] + coeff0_5*dmats2[5][5] + coeff0_6*dmats2[6][5] + coeff0_7*dmats2[7][5] + coeff0_8*dmats2[8][5] + coeff0_9*dmats2[9][5];
+          new_coeff0_6 = coeff0_0*dmats2[0][6] + coeff0_1*dmats2[1][6] + coeff0_2*dmats2[2][6] + coeff0_3*dmats2[3][6] + coeff0_4*dmats2[4][6] + coeff0_5*dmats2[5][6] + coeff0_6*dmats2[6][6] + coeff0_7*dmats2[7][6] + coeff0_8*dmats2[8][6] + coeff0_9*dmats2[9][6];
+          new_coeff0_7 = coeff0_0*dmats2[0][7] + coeff0_1*dmats2[1][7] + coeff0_2*dmats2[2][7] + coeff0_3*dmats2[3][7] + coeff0_4*dmats2[4][7] + coeff0_5*dmats2[5][7] + coeff0_6*dmats2[6][7] + coeff0_7*dmats2[7][7] + coeff0_8*dmats2[8][7] + coeff0_9*dmats2[9][7];
+          new_coeff0_8 = coeff0_0*dmats2[0][8] + coeff0_1*dmats2[1][8] + coeff0_2*dmats2[2][8] + coeff0_3*dmats2[3][8] + coeff0_4*dmats2[4][8] + coeff0_5*dmats2[5][8] + coeff0_6*dmats2[6][8] + coeff0_7*dmats2[7][8] + coeff0_8*dmats2[8][8] + coeff0_9*dmats2[9][8];
+          new_coeff0_9 = coeff0_0*dmats2[0][9] + coeff0_1*dmats2[1][9] + coeff0_2*dmats2[2][9] + coeff0_3*dmats2[3][9] + coeff0_4*dmats2[4][9] + coeff0_5*dmats2[5][9] + coeff0_6*dmats2[6][9] + coeff0_7*dmats2[7][9] + coeff0_8*dmats2[8][9] + coeff0_9*dmats2[9][9];
         }
     
       }
       // Compute derivatives on reference element as dot product of coefficients and basisvalues
-      derivatives[deriv_num] = new_coeff0_0*basisvalue0 + new_coeff0_1*basisvalue1 + new_coeff0_2*basisvalue2 + new_coeff0_3*basisvalue3;
+      derivatives[deriv_num] = new_coeff0_0*basisvalue0 + new_coeff0_1*basisvalue1 + new_coeff0_2*basisvalue2 + new_coeff0_3*basisvalue3 + new_coeff0_4*basisvalue4 + new_coeff0_5*basisvalue5 + new_coeff0_6*basisvalue6 + new_coeff0_7*basisvalue7 + new_coeff0_8*basisvalue8 + new_coeff0_9*basisvalue9;
     }
     
     // Transform derivatives back to physical element
@@ -12690,9 +15503,9 @@ double UFC_SolitaryWave3DLinearForm_fini
                                    const ufc::cell& c) const
 {
     // The reference points, direction and weights:
-    const static double X[4][1][3] = {{{0, 0, 0}}, {{1, 0, 0}}, {{0, 1, 0}}, {{0, 0, 1}}};
-    const static double W[4][1] = {{1}, {1}, {1}, {1}};
-    const static double D[4][1][1] = {{{1}}, {{1}}, {{1}}, {{1}}};
+    const static double X[10][1][3] = {{{0, 0, 0}}, {{1, 0, 0}}, {{0, 1, 0}}, {{0, 0, 1}}, {{0, 0.5, 0.5}}, {{0.5, 0, 0.5}}, {{0.5, 0.5, 0}}, {{0, 0, 0.5}}, {{0, 0.5, 0}}, {{0.5, 0, 0}}};
+    const static double W[10][1] = {{1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}};
+    const static double D[10][1][1] = {{{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}};
     
     const double * const * x = c.coordinates;
     double result = 0.0;
@@ -12775,7 +15588,7 @@ UFC_SolitaryWave3DLinearForm_finite_elem
 /// Return a string identifying the finite element
 const char* UFC_SolitaryWave3DLinearForm_finite_element_0::signature() const
 {
-    return "MixedElement([FiniteElement('Lagrange', 'tetrahedron', 1), FiniteElement('Lagrange', 'tetrahedron', 1)])";
+    return "MixedElement([FiniteElement('Lagrange', 'tetrahedron', 2), FiniteElement('Lagrange', 'tetrahedron', 2)])";
 }
 
 /// Return the cell shape
@@ -12787,7 +15600,7 @@ ufc::shape UFC_SolitaryWave3DLinearForm_
 /// Return the dimension of the finite element function space
 unsigned int UFC_SolitaryWave3DLinearForm_finite_element_0::space_dimension() const
 {
-    return 8;
+    return 20;
 }
 
 /// Return the rank of the value space
@@ -12873,7 +15686,7 @@ void UFC_SolitaryWave3DLinearForm_finite
     values[0] = 0;
     values[1] = 0;
     
-    if (0 <= i && i <= 3)
+    if (0 <= i && i <= 9)
     {
       // Map degree of freedom to element degree of freedom
       const unsigned int dof = i;
@@ -12881,94 +15694,154 @@ void UFC_SolitaryWave3DLinearForm_finite
       // Generate scalings
       const double scalings_y_0 = 1;
       const double scalings_y_1 = scalings_y_0*(0.5 - 0.5*y);
+      const double scalings_y_2 = scalings_y_1*(0.5 - 0.5*y);
       const double scalings_z_0 = 1;
       const double scalings_z_1 = scalings_z_0*(0.5 - 0.5*z);
+      const double scalings_z_2 = scalings_z_1*(0.5 - 0.5*z);
     
       // Compute psitilde_a
       const double psitilde_a_0 = 1;
       const double psitilde_a_1 = x;
+      const double psitilde_a_2 = 1.5*x*psitilde_a_1 - 0.5*psitilde_a_0;
     
       // Compute psitilde_bs
       const double psitilde_bs_0_0 = 1;
       const double psitilde_bs_0_1 = 1.5*y + 0.5;
+      const double psitilde_bs_0_2 = 0.111111111111111*psitilde_bs_0_1 + 1.66666666666667*y*psitilde_bs_0_1 - 0.555555555555556*psitilde_bs_0_0;
       const double psitilde_bs_1_0 = 1;
+      const double psitilde_bs_1_1 = 2.5*y + 1.5;
+      const double psitilde_bs_2_0 = 1;
     
       // Compute psitilde_cs
       const double psitilde_cs_00_0 = 1;
       const double psitilde_cs_00_1 = 2*z + 1;
+      const double psitilde_cs_00_2 = 0.3125*psitilde_cs_00_1 + 1.875*z*psitilde_cs_00_1 - 0.5625*psitilde_cs_00_0;
       const double psitilde_cs_01_0 = 1;
+      const double psitilde_cs_01_1 = 3*z + 2;
+      const double psitilde_cs_02_0 = 1;
       const double psitilde_cs_10_0 = 1;
+      const double psitilde_cs_10_1 = 3*z + 2;
+      const double psitilde_cs_11_0 = 1;
+      const double psitilde_cs_20_0 = 1;
     
       // Compute basisvalues
       const double basisvalue0 = 0.866025403784439*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_0;
       const double basisvalue1 = 2.73861278752583*psitilde_a_1*scalings_y_1*psitilde_bs_1_0*scalings_z_1*psitilde_cs_10_0;
       const double basisvalue2 = 1.58113883008419*psitilde_a_0*scalings_y_0*psitilde_bs_0_1*scalings_z_1*psitilde_cs_01_0;
       const double basisvalue3 = 1.11803398874989*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_1;
-    
-      // Table(s) of coefficients
-      const static double coefficients0[4][4] =   \
-      {{0.288675134594813, -0.182574185835055, -0.105409255338946, -0.074535599249993},
-      {0.288675134594813, 0.182574185835055, -0.105409255338946, -0.074535599249993},
-      {0.288675134594813, 0, 0.210818510677892, -0.074535599249993},
-      {0.288675134594813, 0, 0, 0.223606797749979}};
+      const double basisvalue4 = 5.1234753829798*psitilde_a_2*scalings_y_2*psitilde_bs_2_0*scalings_z_2*psitilde_cs_20_0;
+      const double basisvalue5 = 3.96862696659689*psitilde_a_1*scalings_y_1*psitilde_bs_1_1*scalings_z_2*psitilde_cs_11_0;
+      const double basisvalue6 = 2.29128784747792*psitilde_a_0*scalings_y_0*psitilde_bs_0_2*scalings_z_2*psitilde_cs_02_0;
+      const double basisvalue7 = 3.24037034920393*psitilde_a_1*scalings_y_1*psitilde_bs_1_0*scalings_z_1*psitilde_cs_10_1;
+      const double basisvalue8 = 1.87082869338697*psitilde_a_0*scalings_y_0*psitilde_bs_0_1*scalings_z_1*psitilde_cs_01_1;
+      const double basisvalue9 = 1.3228756555323*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_2;
+    
+      // Table(s) of coefficients
+      const static double coefficients0[10][10] =   \
+      {{-0.0577350269189626, -0.0608580619450185, -0.0351364184463153, -0.0248451997499977, 0.0650600048632355, 0.0503952630678969, 0.0290957186981323, 0.0411475599898912, 0.0237565548366599, 0.0167984210226323},
+      {-0.0577350269189625, 0.0608580619450185, -0.0351364184463153, -0.0248451997499977, 0.0650600048632355, -0.050395263067897, 0.0290957186981323, -0.0411475599898912, 0.0237565548366599, 0.0167984210226323},
+      {-0.0577350269189625, 0, 0.0702728368926306, -0.0248451997499977, 0, 0, 0.0872871560943969, 0, -0.0475131096733199, 0.0167984210226323},
+      {-0.0577350269189626, 0, 0, 0.074535599249993, 0, 0, 0, 0, 0, 0.100790526135794},
+      {0.23094010767585, 0, 0.140545673785261, 0.0993807989999906, 0, 0, 0, 0, 0.1187827741833, -0.0671936840905293},
+      {0.230940107675851, 0.121716123890037, -0.0702728368926306, 0.0993807989999907, 0, 0, 0, 0.102868899974728, -0.0593913870916499, -0.0671936840905293},
+      {0.23094010767585, 0.121716123890037, 0.0702728368926307, -0.0993807989999907, 0, 0.100790526135794, -0.087287156094397, -0.0205737799949456, -0.01187827741833, 0.0167984210226323},
+      {0.23094010767585, -0.121716123890037, -0.0702728368926307, 0.0993807989999906, 0, 0, 0, -0.102868899974728, -0.0593913870916499, -0.0671936840905293},
+      {0.23094010767585, -0.121716123890037, 0.0702728368926306, -0.0993807989999906, 0, -0.100790526135794, -0.0872871560943969, 0.0205737799949456, -0.01187827741833, 0.0167984210226323},
+      {0.23094010767585, 0, -0.140545673785261, -0.0993807989999906, -0.130120009726471, 0, 0.0290957186981323, 0, 0.02375655483666, 0.0167984210226323}};
     
       // Extract relevant coefficients
       const double coeff0_0 =   coefficients0[dof][0];
       const double coeff0_1 =   coefficients0[dof][1];
       const double coeff0_2 =   coefficients0[dof][2];
       const double coeff0_3 =   coefficients0[dof][3];
+      const double coeff0_4 =   coefficients0[dof][4];
+      const double coeff0_5 =   coefficients0[dof][5];
+      const double coeff0_6 =   coefficients0[dof][6];
+      const double coeff0_7 =   coefficients0[dof][7];
+      const double coeff0_8 =   coefficients0[dof][8];
+      const double coeff0_9 =   coefficients0[dof][9];
     
       // Compute value(s)
-      values[0] = coeff0_0*basisvalue0 + coeff0_1*basisvalue1 + coeff0_2*basisvalue2 + coeff0_3*basisvalue3;
-    }
-    
-    if (4 <= i && i <= 7)
-    {
-      // Map degree of freedom to element degree of freedom
-      const unsigned int dof = i - 4;
+      values[0] = coeff0_0*basisvalue0 + coeff0_1*basisvalue1 + coeff0_2*basisvalue2 + coeff0_3*basisvalue3 + coeff0_4*basisvalue4 + coeff0_5*basisvalue5 + coeff0_6*basisvalue6 + coeff0_7*basisvalue7 + coeff0_8*basisvalue8 + coeff0_9*basisvalue9;
+    }
+    
+    if (10 <= i && i <= 19)
+    {
+      // Map degree of freedom to element degree of freedom
+      const unsigned int dof = i - 10;
     
       // Generate scalings
       const double scalings_y_0 = 1;
       const double scalings_y_1 = scalings_y_0*(0.5 - 0.5*y);
+      const double scalings_y_2 = scalings_y_1*(0.5 - 0.5*y);
       const double scalings_z_0 = 1;
       const double scalings_z_1 = scalings_z_0*(0.5 - 0.5*z);
+      const double scalings_z_2 = scalings_z_1*(0.5 - 0.5*z);
     
       // Compute psitilde_a
       const double psitilde_a_0 = 1;
       const double psitilde_a_1 = x;
+      const double psitilde_a_2 = 1.5*x*psitilde_a_1 - 0.5*psitilde_a_0;
     
       // Compute psitilde_bs
       const double psitilde_bs_0_0 = 1;
       const double psitilde_bs_0_1 = 1.5*y + 0.5;
+      const double psitilde_bs_0_2 = 0.111111111111111*psitilde_bs_0_1 + 1.66666666666667*y*psitilde_bs_0_1 - 0.555555555555556*psitilde_bs_0_0;
       const double psitilde_bs_1_0 = 1;
+      const double psitilde_bs_1_1 = 2.5*y + 1.5;
+      const double psitilde_bs_2_0 = 1;
     
       // Compute psitilde_cs
       const double psitilde_cs_00_0 = 1;
       const double psitilde_cs_00_1 = 2*z + 1;
+      const double psitilde_cs_00_2 = 0.3125*psitilde_cs_00_1 + 1.875*z*psitilde_cs_00_1 - 0.5625*psitilde_cs_00_0;
       const double psitilde_cs_01_0 = 1;
+      const double psitilde_cs_01_1 = 3*z + 2;
+      const double psitilde_cs_02_0 = 1;
       const double psitilde_cs_10_0 = 1;
+      const double psitilde_cs_10_1 = 3*z + 2;
+      const double psitilde_cs_11_0 = 1;
+      const double psitilde_cs_20_0 = 1;
     
       // Compute basisvalues
       const double basisvalue0 = 0.866025403784439*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_0;
       const double basisvalue1 = 2.73861278752583*psitilde_a_1*scalings_y_1*psitilde_bs_1_0*scalings_z_1*psitilde_cs_10_0;
       const double basisvalue2 = 1.58113883008419*psitilde_a_0*scalings_y_0*psitilde_bs_0_1*scalings_z_1*psitilde_cs_01_0;
       const double basisvalue3 = 1.11803398874989*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_1;
-    
-      // Table(s) of coefficients
-      const static double coefficients0[4][4] =   \
-      {{0.288675134594813, -0.182574185835055, -0.105409255338946, -0.074535599249993},
-      {0.288675134594813, 0.182574185835055, -0.105409255338946, -0.074535599249993},
-      {0.288675134594813, 0, 0.210818510677892, -0.074535599249993},
-      {0.288675134594813, 0, 0, 0.223606797749979}};
+      const double basisvalue4 = 5.1234753829798*psitilde_a_2*scalings_y_2*psitilde_bs_2_0*scalings_z_2*psitilde_cs_20_0;
+      const double basisvalue5 = 3.96862696659689*psitilde_a_1*scalings_y_1*psitilde_bs_1_1*scalings_z_2*psitilde_cs_11_0;
+      const double basisvalue6 = 2.29128784747792*psitilde_a_0*scalings_y_0*psitilde_bs_0_2*scalings_z_2*psitilde_cs_02_0;
+      const double basisvalue7 = 3.24037034920393*psitilde_a_1*scalings_y_1*psitilde_bs_1_0*scalings_z_1*psitilde_cs_10_1;
+      const double basisvalue8 = 1.87082869338697*psitilde_a_0*scalings_y_0*psitilde_bs_0_1*scalings_z_1*psitilde_cs_01_1;
+      const double basisvalue9 = 1.3228756555323*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_2;
+    
+      // Table(s) of coefficients
+      const static double coefficients0[10][10] =   \
+      {{-0.0577350269189626, -0.0608580619450185, -0.0351364184463153, -0.0248451997499977, 0.0650600048632355, 0.0503952630678969, 0.0290957186981323, 0.0411475599898912, 0.0237565548366599, 0.0167984210226323},
+      {-0.0577350269189625, 0.0608580619450185, -0.0351364184463153, -0.0248451997499977, 0.0650600048632355, -0.050395263067897, 0.0290957186981323, -0.0411475599898912, 0.0237565548366599, 0.0167984210226323},
+      {-0.0577350269189625, 0, 0.0702728368926306, -0.0248451997499977, 0, 0, 0.0872871560943969, 0, -0.0475131096733199, 0.0167984210226323},
+      {-0.0577350269189626, 0, 0, 0.074535599249993, 0, 0, 0, 0, 0, 0.100790526135794},
+      {0.23094010767585, 0, 0.140545673785261, 0.0993807989999906, 0, 0, 0, 0, 0.1187827741833, -0.0671936840905293},
+      {0.230940107675851, 0.121716123890037, -0.0702728368926306, 0.0993807989999907, 0, 0, 0, 0.102868899974728, -0.0593913870916499, -0.0671936840905293},
+      {0.23094010767585, 0.121716123890037, 0.0702728368926307, -0.0993807989999907, 0, 0.100790526135794, -0.087287156094397, -0.0205737799949456, -0.01187827741833, 0.0167984210226323},
+      {0.23094010767585, -0.121716123890037, -0.0702728368926307, 0.0993807989999906, 0, 0, 0, -0.102868899974728, -0.0593913870916499, -0.0671936840905293},
+      {0.23094010767585, -0.121716123890037, 0.0702728368926306, -0.0993807989999906, 0, -0.100790526135794, -0.0872871560943969, 0.0205737799949456, -0.01187827741833, 0.0167984210226323},
+      {0.23094010767585, 0, -0.140545673785261, -0.0993807989999906, -0.130120009726471, 0, 0.0290957186981323, 0, 0.02375655483666, 0.0167984210226323}};
     
       // Extract relevant coefficients
       const double coeff0_0 =   coefficients0[dof][0];
       const double coeff0_1 =   coefficients0[dof][1];
       const double coeff0_2 =   coefficients0[dof][2];
       const double coeff0_3 =   coefficients0[dof][3];
+      const double coeff0_4 =   coefficients0[dof][4];
+      const double coeff0_5 =   coefficients0[dof][5];
+      const double coeff0_6 =   coefficients0[dof][6];
+      const double coeff0_7 =   coefficients0[dof][7];
+      const double coeff0_8 =   coefficients0[dof][8];
+      const double coeff0_9 =   coefficients0[dof][9];
     
       // Compute value(s)
-      values[1] = coeff0_0*basisvalue0 + coeff0_1*basisvalue1 + coeff0_2*basisvalue2 + coeff0_3*basisvalue3;
+      values[1] = coeff0_0*basisvalue0 + coeff0_1*basisvalue1 + coeff0_2*basisvalue2 + coeff0_3*basisvalue3 + coeff0_4*basisvalue4 + coeff0_5*basisvalue5 + coeff0_6*basisvalue6 + coeff0_7*basisvalue7 + coeff0_8*basisvalue8 + coeff0_9*basisvalue9;
     }
     
 }
@@ -13112,7 +15985,7 @@ void UFC_SolitaryWave3DLinearForm_finite
     for (unsigned int j = 0; j < 2*num_derivatives; j++)
       values[j] = 0;
     
-    if (0 <= i && i <= 3)
+    if (0 <= i && i <= 9)
     {
       // Map degree of freedom to element degree of freedom
       const unsigned int dof = i;
@@ -13120,56 +15993,98 @@ void UFC_SolitaryWave3DLinearForm_finite
       // Generate scalings
       const double scalings_y_0 = 1;
       const double scalings_y_1 = scalings_y_0*(0.5 - 0.5*y);
+      const double scalings_y_2 = scalings_y_1*(0.5 - 0.5*y);
       const double scalings_z_0 = 1;
       const double scalings_z_1 = scalings_z_0*(0.5 - 0.5*z);
+      const double scalings_z_2 = scalings_z_1*(0.5 - 0.5*z);
     
       // Compute psitilde_a
       const double psitilde_a_0 = 1;
       const double psitilde_a_1 = x;
+      const double psitilde_a_2 = 1.5*x*psitilde_a_1 - 0.5*psitilde_a_0;
     
       // Compute psitilde_bs
       const double psitilde_bs_0_0 = 1;
       const double psitilde_bs_0_1 = 1.5*y + 0.5;
+      const double psitilde_bs_0_2 = 0.111111111111111*psitilde_bs_0_1 + 1.66666666666667*y*psitilde_bs_0_1 - 0.555555555555556*psitilde_bs_0_0;
       const double psitilde_bs_1_0 = 1;
+      const double psitilde_bs_1_1 = 2.5*y + 1.5;
+      const double psitilde_bs_2_0 = 1;
     
       // Compute psitilde_cs
       const double psitilde_cs_00_0 = 1;
       const double psitilde_cs_00_1 = 2*z + 1;
+      const double psitilde_cs_00_2 = 0.3125*psitilde_cs_00_1 + 1.875*z*psitilde_cs_00_1 - 0.5625*psitilde_cs_00_0;
       const double psitilde_cs_01_0 = 1;
+      const double psitilde_cs_01_1 = 3*z + 2;
+      const double psitilde_cs_02_0 = 1;
       const double psitilde_cs_10_0 = 1;
+      const double psitilde_cs_10_1 = 3*z + 2;
+      const double psitilde_cs_11_0 = 1;
+      const double psitilde_cs_20_0 = 1;
     
       // Compute basisvalues
       const double basisvalue0 = 0.866025403784439*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_0;
       const double basisvalue1 = 2.73861278752583*psitilde_a_1*scalings_y_1*psitilde_bs_1_0*scalings_z_1*psitilde_cs_10_0;
       const double basisvalue2 = 1.58113883008419*psitilde_a_0*scalings_y_0*psitilde_bs_0_1*scalings_z_1*psitilde_cs_01_0;
       const double basisvalue3 = 1.11803398874989*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_1;
-    
-      // Table(s) of coefficients
-      const static double coefficients0[4][4] =   \
-      {{0.288675134594813, -0.182574185835055, -0.105409255338946, -0.074535599249993},
-      {0.288675134594813, 0.182574185835055, -0.105409255338946, -0.074535599249993},
-      {0.288675134594813, 0, 0.210818510677892, -0.074535599249993},
-      {0.288675134594813, 0, 0, 0.223606797749979}};
+      const double basisvalue4 = 5.1234753829798*psitilde_a_2*scalings_y_2*psitilde_bs_2_0*scalings_z_2*psitilde_cs_20_0;
+      const double basisvalue5 = 3.96862696659689*psitilde_a_1*scalings_y_1*psitilde_bs_1_1*scalings_z_2*psitilde_cs_11_0;
+      const double basisvalue6 = 2.29128784747792*psitilde_a_0*scalings_y_0*psitilde_bs_0_2*scalings_z_2*psitilde_cs_02_0;
+      const double basisvalue7 = 3.24037034920393*psitilde_a_1*scalings_y_1*psitilde_bs_1_0*scalings_z_1*psitilde_cs_10_1;
+      const double basisvalue8 = 1.87082869338697*psitilde_a_0*scalings_y_0*psitilde_bs_0_1*scalings_z_1*psitilde_cs_01_1;
+      const double basisvalue9 = 1.3228756555323*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_2;
+    
+      // Table(s) of coefficients
+      const static double coefficients0[10][10] =   \
+      {{-0.0577350269189626, -0.0608580619450185, -0.0351364184463153, -0.0248451997499977, 0.0650600048632355, 0.0503952630678969, 0.0290957186981323, 0.0411475599898912, 0.0237565548366599, 0.0167984210226323},
+      {-0.0577350269189625, 0.0608580619450185, -0.0351364184463153, -0.0248451997499977, 0.0650600048632355, -0.050395263067897, 0.0290957186981323, -0.0411475599898912, 0.0237565548366599, 0.0167984210226323},
+      {-0.0577350269189625, 0, 0.0702728368926306, -0.0248451997499977, 0, 0, 0.0872871560943969, 0, -0.0475131096733199, 0.0167984210226323},
+      {-0.0577350269189626, 0, 0, 0.074535599249993, 0, 0, 0, 0, 0, 0.100790526135794},
+      {0.23094010767585, 0, 0.140545673785261, 0.0993807989999906, 0, 0, 0, 0, 0.1187827741833, -0.0671936840905293},
+      {0.230940107675851, 0.121716123890037, -0.0702728368926306, 0.0993807989999907, 0, 0, 0, 0.102868899974728, -0.0593913870916499, -0.0671936840905293},
+      {0.23094010767585, 0.121716123890037, 0.0702728368926307, -0.0993807989999907, 0, 0.100790526135794, -0.087287156094397, -0.0205737799949456, -0.01187827741833, 0.0167984210226323},
+      {0.23094010767585, -0.121716123890037, -0.0702728368926307, 0.0993807989999906, 0, 0, 0, -0.102868899974728, -0.0593913870916499, -0.0671936840905293},
+      {0.23094010767585, -0.121716123890037, 0.0702728368926306, -0.0993807989999906, 0, -0.100790526135794, -0.0872871560943969, 0.0205737799949456, -0.01187827741833, 0.0167984210226323},
+      {0.23094010767585, 0, -0.140545673785261, -0.0993807989999906, -0.130120009726471, 0, 0.0290957186981323, 0, 0.02375655483666, 0.0167984210226323}};
     
       // Interesting (new) part
       // Tables of derivatives of the polynomial base (transpose)
-      const static double dmats0[4][4] =   \
-      {{0, 0, 0, 0},
-      {6.32455532033676, 0, 0, 0},
-      {0, 0, 0, 0},
-      {0, 0, 0, 0}};
-    
-      const static double dmats1[4][4] =   \
-      {{0, 0, 0, 0},
-      {3.16227766016838, 0, 0, 0},
-      {5.47722557505166, 0, 0, 0},
-      {0, 0, 0, 0}};
-    
-      const static double dmats2[4][4] =   \
-      {{0, 0, 0, 0},
-      {3.16227766016838, 0, 0, 0},
-      {1.82574185835055, 0, 0, 0},
-      {5.16397779494322, 0, 0, 0}};
+      const static double dmats0[10][10] =   \
+      {{0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {6.32455532033676, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {0, 11.2249721603218, 0, 0, 0, 0, 0, 0, 0, 0},
+      {4.58257569495584, 0, 8.36660026534076, -1.18321595661992, 0, 0, 0, 0, 0, 0},
+      {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {3.74165738677394, 0, 0, 8.69482604771366, 0, 0, 0, 0, 0, 0},
+      {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
+    
+      const static double dmats1[10][10] =   \
+      {{0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {3.16227766016838, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {5.47722557505166, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {2.95803989154981, 5.61248608016091, -1.08012344973464, -0.763762615825974, 0, 0, 0, 0, 0, 0},
+      {2.29128784747792, 7.24568837309472, 4.18330013267038, -0.591607978309962, 0, 0, 0, 0, 0, 0},
+      {-2.64575131106459, 0, 9.66091783079296, 0.683130051063974, 0, 0, 0, 0, 0, 0},
+      {1.87082869338697, 0, 0, 4.34741302385683, 0, 0, 0, 0, 0, 0},
+      {3.24037034920393, 0, 0, 7.52994023880668, 0, 0, 0, 0, 0, 0},
+      {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
+    
+      const static double dmats2[10][10] =   \
+      {{0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {3.16227766016838, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {1.82574185835055, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {5.16397779494322, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {2.95803989154981, 5.61248608016091, -1.08012344973464, -0.763762615825974, 0, 0, 0, 0, 0, 0},
+      {2.29128784747792, 1.44913767461894, 4.18330013267038, -0.591607978309962, 0, 0, 0, 0, 0, 0},
+      {1.32287565553229, 0, 3.86436713231718, -0.341565025531986, 0, 0, 0, 0, 0, 0},
+      {1.87082869338697, 7.09929573971954, 0, 4.34741302385683, 0, 0, 0, 0, 0, 0},
+      {1.08012344973464, 0, 7.09929573971954, 2.50998007960223, 0, 0, 0, 0, 0, 0},
+      {-3.81881307912987, 0, 0, 8.87411967464942, 0, 0, 0, 0, 0, 0}};
     
       // Compute reference derivatives
       // Declare pointer to array of derivatives on FIAT element
@@ -13180,12 +16095,24 @@ void UFC_SolitaryWave3DLinearForm_finite
       double coeff0_1 = 0;
       double coeff0_2 = 0;
       double coeff0_3 = 0;
+      double coeff0_4 = 0;
+      double coeff0_5 = 0;
+      double coeff0_6 = 0;
+      double coeff0_7 = 0;
+      double coeff0_8 = 0;
+      double coeff0_9 = 0;
     
       // Declare new coefficients
       double new_coeff0_0 = 0;
       double new_coeff0_1 = 0;
       double new_coeff0_2 = 0;
       double new_coeff0_3 = 0;
+      double new_coeff0_4 = 0;
+      double new_coeff0_5 = 0;
+      double new_coeff0_6 = 0;
+      double new_coeff0_7 = 0;
+      double new_coeff0_8 = 0;
+      double new_coeff0_9 = 0;
     
       // Loop possible derivatives
       for (unsigned int deriv_num = 0; deriv_num < num_derivatives; deriv_num++)
@@ -13195,6 +16122,12 @@ void UFC_SolitaryWave3DLinearForm_finite
         new_coeff0_1 = coefficients0[dof][1];
         new_coeff0_2 = coefficients0[dof][2];
         new_coeff0_3 = coefficients0[dof][3];
+        new_coeff0_4 = coefficients0[dof][4];
+        new_coeff0_5 = coefficients0[dof][5];
+        new_coeff0_6 = coefficients0[dof][6];
+        new_coeff0_7 = coefficients0[dof][7];
+        new_coeff0_8 = coefficients0[dof][8];
+        new_coeff0_9 = coefficients0[dof][9];
     
         // Loop derivative order
         for (unsigned int j = 0; j < n; j++)
@@ -13204,32 +16137,56 @@ void UFC_SolitaryWave3DLinearForm_finite
           coeff0_1 = new_coeff0_1;
           coeff0_2 = new_coeff0_2;
           coeff0_3 = new_coeff0_3;
+          coeff0_4 = new_coeff0_4;
+          coeff0_5 = new_coeff0_5;
+          coeff0_6 = new_coeff0_6;
+          coeff0_7 = new_coeff0_7;
+          coeff0_8 = new_coeff0_8;
+          coeff0_9 = new_coeff0_9;
     
           if(combinations[deriv_num][j] == 0)
           {
-            new_coeff0_0 = coeff0_0*dmats0[0][0] + coeff0_1*dmats0[1][0] + coeff0_2*dmats0[2][0] + coeff0_3*dmats0[3][0];
-            new_coeff0_1 = coeff0_0*dmats0[0][1] + coeff0_1*dmats0[1][1] + coeff0_2*dmats0[2][1] + coeff0_3*dmats0[3][1];
-            new_coeff0_2 = coeff0_0*dmats0[0][2] + coeff0_1*dmats0[1][2] + coeff0_2*dmats0[2][2] + coeff0_3*dmats0[3][2];
-            new_coeff0_3 = coeff0_0*dmats0[0][3] + coeff0_1*dmats0[1][3] + coeff0_2*dmats0[2][3] + coeff0_3*dmats0[3][3];
+            new_coeff0_0 = coeff0_0*dmats0[0][0] + coeff0_1*dmats0[1][0] + coeff0_2*dmats0[2][0] + coeff0_3*dmats0[3][0] + coeff0_4*dmats0[4][0] + coeff0_5*dmats0[5][0] + coeff0_6*dmats0[6][0] + coeff0_7*dmats0[7][0] + coeff0_8*dmats0[8][0] + coeff0_9*dmats0[9][0];
+            new_coeff0_1 = coeff0_0*dmats0[0][1] + coeff0_1*dmats0[1][1] + coeff0_2*dmats0[2][1] + coeff0_3*dmats0[3][1] + coeff0_4*dmats0[4][1] + coeff0_5*dmats0[5][1] + coeff0_6*dmats0[6][1] + coeff0_7*dmats0[7][1] + coeff0_8*dmats0[8][1] + coeff0_9*dmats0[9][1];
+            new_coeff0_2 = coeff0_0*dmats0[0][2] + coeff0_1*dmats0[1][2] + coeff0_2*dmats0[2][2] + coeff0_3*dmats0[3][2] + coeff0_4*dmats0[4][2] + coeff0_5*dmats0[5][2] + coeff0_6*dmats0[6][2] + coeff0_7*dmats0[7][2] + coeff0_8*dmats0[8][2] + coeff0_9*dmats0[9][2];
+            new_coeff0_3 = coeff0_0*dmats0[0][3] + coeff0_1*dmats0[1][3] + coeff0_2*dmats0[2][3] + coeff0_3*dmats0[3][3] + coeff0_4*dmats0[4][3] + coeff0_5*dmats0[5][3] + coeff0_6*dmats0[6][3] + coeff0_7*dmats0[7][3] + coeff0_8*dmats0[8][3] + coeff0_9*dmats0[9][3];
+            new_coeff0_4 = coeff0_0*dmats0[0][4] + coeff0_1*dmats0[1][4] + coeff0_2*dmats0[2][4] + coeff0_3*dmats0[3][4] + coeff0_4*dmats0[4][4] + coeff0_5*dmats0[5][4] + coeff0_6*dmats0[6][4] + coeff0_7*dmats0[7][4] + coeff0_8*dmats0[8][4] + coeff0_9*dmats0[9][4];
+            new_coeff0_5 = coeff0_0*dmats0[0][5] + coeff0_1*dmats0[1][5] + coeff0_2*dmats0[2][5] + coeff0_3*dmats0[3][5] + coeff0_4*dmats0[4][5] + coeff0_5*dmats0[5][5] + coeff0_6*dmats0[6][5] + coeff0_7*dmats0[7][5] + coeff0_8*dmats0[8][5] + coeff0_9*dmats0[9][5];
+            new_coeff0_6 = coeff0_0*dmats0[0][6] + coeff0_1*dmats0[1][6] + coeff0_2*dmats0[2][6] + coeff0_3*dmats0[3][6] + coeff0_4*dmats0[4][6] + coeff0_5*dmats0[5][6] + coeff0_6*dmats0[6][6] + coeff0_7*dmats0[7][6] + coeff0_8*dmats0[8][6] + coeff0_9*dmats0[9][6];
+            new_coeff0_7 = coeff0_0*dmats0[0][7] + coeff0_1*dmats0[1][7] + coeff0_2*dmats0[2][7] + coeff0_3*dmats0[3][7] + coeff0_4*dmats0[4][7] + coeff0_5*dmats0[5][7] + coeff0_6*dmats0[6][7] + coeff0_7*dmats0[7][7] + coeff0_8*dmats0[8][7] + coeff0_9*dmats0[9][7];
+            new_coeff0_8 = coeff0_0*dmats0[0][8] + coeff0_1*dmats0[1][8] + coeff0_2*dmats0[2][8] + coeff0_3*dmats0[3][8] + coeff0_4*dmats0[4][8] + coeff0_5*dmats0[5][8] + coeff0_6*dmats0[6][8] + coeff0_7*dmats0[7][8] + coeff0_8*dmats0[8][8] + coeff0_9*dmats0[9][8];
+            new_coeff0_9 = coeff0_0*dmats0[0][9] + coeff0_1*dmats0[1][9] + coeff0_2*dmats0[2][9] + coeff0_3*dmats0[3][9] + coeff0_4*dmats0[4][9] + coeff0_5*dmats0[5][9] + coeff0_6*dmats0[6][9] + coeff0_7*dmats0[7][9] + coeff0_8*dmats0[8][9] + coeff0_9*dmats0[9][9];
           }
           if(combinations[deriv_num][j] == 1)
           {
-            new_coeff0_0 = coeff0_0*dmats1[0][0] + coeff0_1*dmats1[1][0] + coeff0_2*dmats1[2][0] + coeff0_3*dmats1[3][0];
-            new_coeff0_1 = coeff0_0*dmats1[0][1] + coeff0_1*dmats1[1][1] + coeff0_2*dmats1[2][1] + coeff0_3*dmats1[3][1];
-            new_coeff0_2 = coeff0_0*dmats1[0][2] + coeff0_1*dmats1[1][2] + coeff0_2*dmats1[2][2] + coeff0_3*dmats1[3][2];
-            new_coeff0_3 = coeff0_0*dmats1[0][3] + coeff0_1*dmats1[1][3] + coeff0_2*dmats1[2][3] + coeff0_3*dmats1[3][3];
+            new_coeff0_0 = coeff0_0*dmats1[0][0] + coeff0_1*dmats1[1][0] + coeff0_2*dmats1[2][0] + coeff0_3*dmats1[3][0] + coeff0_4*dmats1[4][0] + coeff0_5*dmats1[5][0] + coeff0_6*dmats1[6][0] + coeff0_7*dmats1[7][0] + coeff0_8*dmats1[8][0] + coeff0_9*dmats1[9][0];
+            new_coeff0_1 = coeff0_0*dmats1[0][1] + coeff0_1*dmats1[1][1] + coeff0_2*dmats1[2][1] + coeff0_3*dmats1[3][1] + coeff0_4*dmats1[4][1] + coeff0_5*dmats1[5][1] + coeff0_6*dmats1[6][1] + coeff0_7*dmats1[7][1] + coeff0_8*dmats1[8][1] + coeff0_9*dmats1[9][1];
+            new_coeff0_2 = coeff0_0*dmats1[0][2] + coeff0_1*dmats1[1][2] + coeff0_2*dmats1[2][2] + coeff0_3*dmats1[3][2] + coeff0_4*dmats1[4][2] + coeff0_5*dmats1[5][2] + coeff0_6*dmats1[6][2] + coeff0_7*dmats1[7][2] + coeff0_8*dmats1[8][2] + coeff0_9*dmats1[9][2];
+            new_coeff0_3 = coeff0_0*dmats1[0][3] + coeff0_1*dmats1[1][3] + coeff0_2*dmats1[2][3] + coeff0_3*dmats1[3][3] + coeff0_4*dmats1[4][3] + coeff0_5*dmats1[5][3] + coeff0_6*dmats1[6][3] + coeff0_7*dmats1[7][3] + coeff0_8*dmats1[8][3] + coeff0_9*dmats1[9][3];
+            new_coeff0_4 = coeff0_0*dmats1[0][4] + coeff0_1*dmats1[1][4] + coeff0_2*dmats1[2][4] + coeff0_3*dmats1[3][4] + coeff0_4*dmats1[4][4] + coeff0_5*dmats1[5][4] + coeff0_6*dmats1[6][4] + coeff0_7*dmats1[7][4] + coeff0_8*dmats1[8][4] + coeff0_9*dmats1[9][4];
+            new_coeff0_5 = coeff0_0*dmats1[0][5] + coeff0_1*dmats1[1][5] + coeff0_2*dmats1[2][5] + coeff0_3*dmats1[3][5] + coeff0_4*dmats1[4][5] + coeff0_5*dmats1[5][5] + coeff0_6*dmats1[6][5] + coeff0_7*dmats1[7][5] + coeff0_8*dmats1[8][5] + coeff0_9*dmats1[9][5];
+            new_coeff0_6 = coeff0_0*dmats1[0][6] + coeff0_1*dmats1[1][6] + coeff0_2*dmats1[2][6] + coeff0_3*dmats1[3][6] + coeff0_4*dmats1[4][6] + coeff0_5*dmats1[5][6] + coeff0_6*dmats1[6][6] + coeff0_7*dmats1[7][6] + coeff0_8*dmats1[8][6] + coeff0_9*dmats1[9][6];
+            new_coeff0_7 = coeff0_0*dmats1[0][7] + coeff0_1*dmats1[1][7] + coeff0_2*dmats1[2][7] + coeff0_3*dmats1[3][7] + coeff0_4*dmats1[4][7] + coeff0_5*dmats1[5][7] + coeff0_6*dmats1[6][7] + coeff0_7*dmats1[7][7] + coeff0_8*dmats1[8][7] + coeff0_9*dmats1[9][7];
+            new_coeff0_8 = coeff0_0*dmats1[0][8] + coeff0_1*dmats1[1][8] + coeff0_2*dmats1[2][8] + coeff0_3*dmats1[3][8] + coeff0_4*dmats1[4][8] + coeff0_5*dmats1[5][8] + coeff0_6*dmats1[6][8] + coeff0_7*dmats1[7][8] + coeff0_8*dmats1[8][8] + coeff0_9*dmats1[9][8];
+            new_coeff0_9 = coeff0_0*dmats1[0][9] + coeff0_1*dmats1[1][9] + coeff0_2*dmats1[2][9] + coeff0_3*dmats1[3][9] + coeff0_4*dmats1[4][9] + coeff0_5*dmats1[5][9] + coeff0_6*dmats1[6][9] + coeff0_7*dmats1[7][9] + coeff0_8*dmats1[8][9] + coeff0_9*dmats1[9][9];
           }
           if(combinations[deriv_num][j] == 2)
           {
-            new_coeff0_0 = coeff0_0*dmats2[0][0] + coeff0_1*dmats2[1][0] + coeff0_2*dmats2[2][0] + coeff0_3*dmats2[3][0];
-            new_coeff0_1 = coeff0_0*dmats2[0][1] + coeff0_1*dmats2[1][1] + coeff0_2*dmats2[2][1] + coeff0_3*dmats2[3][1];
-            new_coeff0_2 = coeff0_0*dmats2[0][2] + coeff0_1*dmats2[1][2] + coeff0_2*dmats2[2][2] + coeff0_3*dmats2[3][2];
-            new_coeff0_3 = coeff0_0*dmats2[0][3] + coeff0_1*dmats2[1][3] + coeff0_2*dmats2[2][3] + coeff0_3*dmats2[3][3];
+            new_coeff0_0 = coeff0_0*dmats2[0][0] + coeff0_1*dmats2[1][0] + coeff0_2*dmats2[2][0] + coeff0_3*dmats2[3][0] + coeff0_4*dmats2[4][0] + coeff0_5*dmats2[5][0] + coeff0_6*dmats2[6][0] + coeff0_7*dmats2[7][0] + coeff0_8*dmats2[8][0] + coeff0_9*dmats2[9][0];
+            new_coeff0_1 = coeff0_0*dmats2[0][1] + coeff0_1*dmats2[1][1] + coeff0_2*dmats2[2][1] + coeff0_3*dmats2[3][1] + coeff0_4*dmats2[4][1] + coeff0_5*dmats2[5][1] + coeff0_6*dmats2[6][1] + coeff0_7*dmats2[7][1] + coeff0_8*dmats2[8][1] + coeff0_9*dmats2[9][1];
+            new_coeff0_2 = coeff0_0*dmats2[0][2] + coeff0_1*dmats2[1][2] + coeff0_2*dmats2[2][2] + coeff0_3*dmats2[3][2] + coeff0_4*dmats2[4][2] + coeff0_5*dmats2[5][2] + coeff0_6*dmats2[6][2] + coeff0_7*dmats2[7][2] + coeff0_8*dmats2[8][2] + coeff0_9*dmats2[9][2];
+            new_coeff0_3 = coeff0_0*dmats2[0][3] + coeff0_1*dmats2[1][3] + coeff0_2*dmats2[2][3] + coeff0_3*dmats2[3][3] + coeff0_4*dmats2[4][3] + coeff0_5*dmats2[5][3] + coeff0_6*dmats2[6][3] + coeff0_7*dmats2[7][3] + coeff0_8*dmats2[8][3] + coeff0_9*dmats2[9][3];
+            new_coeff0_4 = coeff0_0*dmats2[0][4] + coeff0_1*dmats2[1][4] + coeff0_2*dmats2[2][4] + coeff0_3*dmats2[3][4] + coeff0_4*dmats2[4][4] + coeff0_5*dmats2[5][4] + coeff0_6*dmats2[6][4] + coeff0_7*dmats2[7][4] + coeff0_8*dmats2[8][4] + coeff0_9*dmats2[9][4];
+            new_coeff0_5 = coeff0_0*dmats2[0][5] + coeff0_1*dmats2[1][5] + coeff0_2*dmats2[2][5] + coeff0_3*dmats2[3][5] + coeff0_4*dmats2[4][5] + coeff0_5*dmats2[5][5] + coeff0_6*dmats2[6][5] + coeff0_7*dmats2[7][5] + coeff0_8*dmats2[8][5] + coeff0_9*dmats2[9][5];
+            new_coeff0_6 = coeff0_0*dmats2[0][6] + coeff0_1*dmats2[1][6] + coeff0_2*dmats2[2][6] + coeff0_3*dmats2[3][6] + coeff0_4*dmats2[4][6] + coeff0_5*dmats2[5][6] + coeff0_6*dmats2[6][6] + coeff0_7*dmats2[7][6] + coeff0_8*dmats2[8][6] + coeff0_9*dmats2[9][6];
+            new_coeff0_7 = coeff0_0*dmats2[0][7] + coeff0_1*dmats2[1][7] + coeff0_2*dmats2[2][7] + coeff0_3*dmats2[3][7] + coeff0_4*dmats2[4][7] + coeff0_5*dmats2[5][7] + coeff0_6*dmats2[6][7] + coeff0_7*dmats2[7][7] + coeff0_8*dmats2[8][7] + coeff0_9*dmats2[9][7];
+            new_coeff0_8 = coeff0_0*dmats2[0][8] + coeff0_1*dmats2[1][8] + coeff0_2*dmats2[2][8] + coeff0_3*dmats2[3][8] + coeff0_4*dmats2[4][8] + coeff0_5*dmats2[5][8] + coeff0_6*dmats2[6][8] + coeff0_7*dmats2[7][8] + coeff0_8*dmats2[8][8] + coeff0_9*dmats2[9][8];
+            new_coeff0_9 = coeff0_0*dmats2[0][9] + coeff0_1*dmats2[1][9] + coeff0_2*dmats2[2][9] + coeff0_3*dmats2[3][9] + coeff0_4*dmats2[4][9] + coeff0_5*dmats2[5][9] + coeff0_6*dmats2[6][9] + coeff0_7*dmats2[7][9] + coeff0_8*dmats2[8][9] + coeff0_9*dmats2[9][9];
           }
     
         }
         // Compute derivatives on reference element as dot product of coefficients and basisvalues
-        derivatives[deriv_num] = new_coeff0_0*basisvalue0 + new_coeff0_1*basisvalue1 + new_coeff0_2*basisvalue2 + new_coeff0_3*basisvalue3;
+        derivatives[deriv_num] = new_coeff0_0*basisvalue0 + new_coeff0_1*basisvalue1 + new_coeff0_2*basisvalue2 + new_coeff0_3*basisvalue3 + new_coeff0_4*basisvalue4 + new_coeff0_5*basisvalue5 + new_coeff0_6*basisvalue6 + new_coeff0_7*basisvalue7 + new_coeff0_8*basisvalue8 + new_coeff0_9*basisvalue9;
       }
     
       // Transform derivatives back to physical element
@@ -13254,64 +16211,106 @@ void UFC_SolitaryWave3DLinearForm_finite
       delete [] transform;
     }
     
-    if (4 <= i && i <= 7)
-    {
-      // Map degree of freedom to element degree of freedom
-      const unsigned int dof = i - 4;
+    if (10 <= i && i <= 19)
+    {
+      // Map degree of freedom to element degree of freedom
+      const unsigned int dof = i - 10;
     
       // Generate scalings
       const double scalings_y_0 = 1;
       const double scalings_y_1 = scalings_y_0*(0.5 - 0.5*y);
+      const double scalings_y_2 = scalings_y_1*(0.5 - 0.5*y);
       const double scalings_z_0 = 1;
       const double scalings_z_1 = scalings_z_0*(0.5 - 0.5*z);
+      const double scalings_z_2 = scalings_z_1*(0.5 - 0.5*z);
     
       // Compute psitilde_a
       const double psitilde_a_0 = 1;
       const double psitilde_a_1 = x;
+      const double psitilde_a_2 = 1.5*x*psitilde_a_1 - 0.5*psitilde_a_0;
     
       // Compute psitilde_bs
       const double psitilde_bs_0_0 = 1;
       const double psitilde_bs_0_1 = 1.5*y + 0.5;
+      const double psitilde_bs_0_2 = 0.111111111111111*psitilde_bs_0_1 + 1.66666666666667*y*psitilde_bs_0_1 - 0.555555555555556*psitilde_bs_0_0;
       const double psitilde_bs_1_0 = 1;
+      const double psitilde_bs_1_1 = 2.5*y + 1.5;
+      const double psitilde_bs_2_0 = 1;
     
       // Compute psitilde_cs
       const double psitilde_cs_00_0 = 1;
       const double psitilde_cs_00_1 = 2*z + 1;
+      const double psitilde_cs_00_2 = 0.3125*psitilde_cs_00_1 + 1.875*z*psitilde_cs_00_1 - 0.5625*psitilde_cs_00_0;
       const double psitilde_cs_01_0 = 1;
+      const double psitilde_cs_01_1 = 3*z + 2;
+      const double psitilde_cs_02_0 = 1;
       const double psitilde_cs_10_0 = 1;
+      const double psitilde_cs_10_1 = 3*z + 2;
+      const double psitilde_cs_11_0 = 1;
+      const double psitilde_cs_20_0 = 1;
     
       // Compute basisvalues
       const double basisvalue0 = 0.866025403784439*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_0;
       const double basisvalue1 = 2.73861278752583*psitilde_a_1*scalings_y_1*psitilde_bs_1_0*scalings_z_1*psitilde_cs_10_0;
       const double basisvalue2 = 1.58113883008419*psitilde_a_0*scalings_y_0*psitilde_bs_0_1*scalings_z_1*psitilde_cs_01_0;
       const double basisvalue3 = 1.11803398874989*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_1;
-    
-      // Table(s) of coefficients
-      const static double coefficients0[4][4] =   \
-      {{0.288675134594813, -0.182574185835055, -0.105409255338946, -0.074535599249993},
-      {0.288675134594813, 0.182574185835055, -0.105409255338946, -0.074535599249993},
-      {0.288675134594813, 0, 0.210818510677892, -0.074535599249993},
-      {0.288675134594813, 0, 0, 0.223606797749979}};
+      const double basisvalue4 = 5.1234753829798*psitilde_a_2*scalings_y_2*psitilde_bs_2_0*scalings_z_2*psitilde_cs_20_0;
+      const double basisvalue5 = 3.96862696659689*psitilde_a_1*scalings_y_1*psitilde_bs_1_1*scalings_z_2*psitilde_cs_11_0;
+      const double basisvalue6 = 2.29128784747792*psitilde_a_0*scalings_y_0*psitilde_bs_0_2*scalings_z_2*psitilde_cs_02_0;
+      const double basisvalue7 = 3.24037034920393*psitilde_a_1*scalings_y_1*psitilde_bs_1_0*scalings_z_1*psitilde_cs_10_1;
+      const double basisvalue8 = 1.87082869338697*psitilde_a_0*scalings_y_0*psitilde_bs_0_1*scalings_z_1*psitilde_cs_01_1;
+      const double basisvalue9 = 1.3228756555323*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_2;
+    
+      // Table(s) of coefficients
+      const static double coefficients0[10][10] =   \
+      {{-0.0577350269189626, -0.0608580619450185, -0.0351364184463153, -0.0248451997499977, 0.0650600048632355, 0.0503952630678969, 0.0290957186981323, 0.0411475599898912, 0.0237565548366599, 0.0167984210226323},
+      {-0.0577350269189625, 0.0608580619450185, -0.0351364184463153, -0.0248451997499977, 0.0650600048632355, -0.050395263067897, 0.0290957186981323, -0.0411475599898912, 0.0237565548366599, 0.0167984210226323},
+      {-0.0577350269189625, 0, 0.0702728368926306, -0.0248451997499977, 0, 0, 0.0872871560943969, 0, -0.0475131096733199, 0.0167984210226323},
+      {-0.0577350269189626, 0, 0, 0.074535599249993, 0, 0, 0, 0, 0, 0.100790526135794},
+      {0.23094010767585, 0, 0.140545673785261, 0.0993807989999906, 0, 0, 0, 0, 0.1187827741833, -0.0671936840905293},
+      {0.230940107675851, 0.121716123890037, -0.0702728368926306, 0.0993807989999907, 0, 0, 0, 0.102868899974728, -0.0593913870916499, -0.0671936840905293},
+      {0.23094010767585, 0.121716123890037, 0.0702728368926307, -0.0993807989999907, 0, 0.100790526135794, -0.087287156094397, -0.0205737799949456, -0.01187827741833, 0.0167984210226323},
+      {0.23094010767585, -0.121716123890037, -0.0702728368926307, 0.0993807989999906, 0, 0, 0, -0.102868899974728, -0.0593913870916499, -0.0671936840905293},
+      {0.23094010767585, -0.121716123890037, 0.0702728368926306, -0.0993807989999906, 0, -0.100790526135794, -0.0872871560943969, 0.0205737799949456, -0.01187827741833, 0.0167984210226323},
+      {0.23094010767585, 0, -0.140545673785261, -0.0993807989999906, -0.130120009726471, 0, 0.0290957186981323, 0, 0.02375655483666, 0.0167984210226323}};
     
       // Interesting (new) part
       // Tables of derivatives of the polynomial base (transpose)
-      const static double dmats0[4][4] =   \
-      {{0, 0, 0, 0},
-      {6.32455532033676, 0, 0, 0},
-      {0, 0, 0, 0},
-      {0, 0, 0, 0}};
-    
-      const static double dmats1[4][4] =   \
-      {{0, 0, 0, 0},
-      {3.16227766016838, 0, 0, 0},
-      {5.47722557505166, 0, 0, 0},
-      {0, 0, 0, 0}};
-    
-      const static double dmats2[4][4] =   \
-      {{0, 0, 0, 0},
-      {3.16227766016838, 0, 0, 0},
-      {1.82574185835055, 0, 0, 0},
-      {5.16397779494322, 0, 0, 0}};
+      const static double dmats0[10][10] =   \
+      {{0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {6.32455532033676, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {0, 11.2249721603218, 0, 0, 0, 0, 0, 0, 0, 0},
+      {4.58257569495584, 0, 8.36660026534076, -1.18321595661992, 0, 0, 0, 0, 0, 0},
+      {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {3.74165738677394, 0, 0, 8.69482604771366, 0, 0, 0, 0, 0, 0},
+      {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
+    
+      const static double dmats1[10][10] =   \
+      {{0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {3.16227766016838, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {5.47722557505166, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {2.95803989154981, 5.61248608016091, -1.08012344973464, -0.763762615825974, 0, 0, 0, 0, 0, 0},
+      {2.29128784747792, 7.24568837309472, 4.18330013267038, -0.591607978309962, 0, 0, 0, 0, 0, 0},
+      {-2.64575131106459, 0, 9.66091783079296, 0.683130051063974, 0, 0, 0, 0, 0, 0},
+      {1.87082869338697, 0, 0, 4.34741302385683, 0, 0, 0, 0, 0, 0},
+      {3.24037034920393, 0, 0, 7.52994023880668, 0, 0, 0, 0, 0, 0},
+      {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
+    
+      const static double dmats2[10][10] =   \
+      {{0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {3.16227766016838, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {1.82574185835055, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {5.16397779494322, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {2.95803989154981, 5.61248608016091, -1.08012344973464, -0.763762615825974, 0, 0, 0, 0, 0, 0},
+      {2.29128784747792, 1.44913767461894, 4.18330013267038, -0.591607978309962, 0, 0, 0, 0, 0, 0},
+      {1.32287565553229, 0, 3.86436713231718, -0.341565025531986, 0, 0, 0, 0, 0, 0},
+      {1.87082869338697, 7.09929573971954, 0, 4.34741302385683, 0, 0, 0, 0, 0, 0},
+      {1.08012344973464, 0, 7.09929573971954, 2.50998007960223, 0, 0, 0, 0, 0, 0},
+      {-3.81881307912987, 0, 0, 8.87411967464942, 0, 0, 0, 0, 0, 0}};
     
       // Compute reference derivatives
       // Declare pointer to array of derivatives on FIAT element
@@ -13322,12 +16321,24 @@ void UFC_SolitaryWave3DLinearForm_finite
       double coeff0_1 = 0;
       double coeff0_2 = 0;
       double coeff0_3 = 0;
+      double coeff0_4 = 0;
+      double coeff0_5 = 0;
+      double coeff0_6 = 0;
+      double coeff0_7 = 0;
+      double coeff0_8 = 0;
+      double coeff0_9 = 0;
     
       // Declare new coefficients
       double new_coeff0_0 = 0;
       double new_coeff0_1 = 0;
       double new_coeff0_2 = 0;
       double new_coeff0_3 = 0;
+      double new_coeff0_4 = 0;
+      double new_coeff0_5 = 0;
+      double new_coeff0_6 = 0;
+      double new_coeff0_7 = 0;
+      double new_coeff0_8 = 0;
+      double new_coeff0_9 = 0;
     
       // Loop possible derivatives
       for (unsigned int deriv_num = 0; deriv_num < num_derivatives; deriv_num++)
@@ -13337,6 +16348,12 @@ void UFC_SolitaryWave3DLinearForm_finite
         new_coeff0_1 = coefficients0[dof][1];
         new_coeff0_2 = coefficients0[dof][2];
         new_coeff0_3 = coefficients0[dof][3];
+        new_coeff0_4 = coefficients0[dof][4];
+        new_coeff0_5 = coefficients0[dof][5];
+        new_coeff0_6 = coefficients0[dof][6];
+        new_coeff0_7 = coefficients0[dof][7];
+        new_coeff0_8 = coefficients0[dof][8];
+        new_coeff0_9 = coefficients0[dof][9];
     
         // Loop derivative order
         for (unsigned int j = 0; j < n; j++)
@@ -13346,32 +16363,56 @@ void UFC_SolitaryWave3DLinearForm_finite
           coeff0_1 = new_coeff0_1;
           coeff0_2 = new_coeff0_2;
           coeff0_3 = new_coeff0_3;
+          coeff0_4 = new_coeff0_4;
+          coeff0_5 = new_coeff0_5;
+          coeff0_6 = new_coeff0_6;
+          coeff0_7 = new_coeff0_7;
+          coeff0_8 = new_coeff0_8;
+          coeff0_9 = new_coeff0_9;
     
           if(combinations[deriv_num][j] == 0)
           {
-            new_coeff0_0 = coeff0_0*dmats0[0][0] + coeff0_1*dmats0[1][0] + coeff0_2*dmats0[2][0] + coeff0_3*dmats0[3][0];
-            new_coeff0_1 = coeff0_0*dmats0[0][1] + coeff0_1*dmats0[1][1] + coeff0_2*dmats0[2][1] + coeff0_3*dmats0[3][1];
-            new_coeff0_2 = coeff0_0*dmats0[0][2] + coeff0_1*dmats0[1][2] + coeff0_2*dmats0[2][2] + coeff0_3*dmats0[3][2];
-            new_coeff0_3 = coeff0_0*dmats0[0][3] + coeff0_1*dmats0[1][3] + coeff0_2*dmats0[2][3] + coeff0_3*dmats0[3][3];
+            new_coeff0_0 = coeff0_0*dmats0[0][0] + coeff0_1*dmats0[1][0] + coeff0_2*dmats0[2][0] + coeff0_3*dmats0[3][0] + coeff0_4*dmats0[4][0] + coeff0_5*dmats0[5][0] + coeff0_6*dmats0[6][0] + coeff0_7*dmats0[7][0] + coeff0_8*dmats0[8][0] + coeff0_9*dmats0[9][0];
+            new_coeff0_1 = coeff0_0*dmats0[0][1] + coeff0_1*dmats0[1][1] + coeff0_2*dmats0[2][1] + coeff0_3*dmats0[3][1] + coeff0_4*dmats0[4][1] + coeff0_5*dmats0[5][1] + coeff0_6*dmats0[6][1] + coeff0_7*dmats0[7][1] + coeff0_8*dmats0[8][1] + coeff0_9*dmats0[9][1];
+            new_coeff0_2 = coeff0_0*dmats0[0][2] + coeff0_1*dmats0[1][2] + coeff0_2*dmats0[2][2] + coeff0_3*dmats0[3][2] + coeff0_4*dmats0[4][2] + coeff0_5*dmats0[5][2] + coeff0_6*dmats0[6][2] + coeff0_7*dmats0[7][2] + coeff0_8*dmats0[8][2] + coeff0_9*dmats0[9][2];
+            new_coeff0_3 = coeff0_0*dmats0[0][3] + coeff0_1*dmats0[1][3] + coeff0_2*dmats0[2][3] + coeff0_3*dmats0[3][3] + coeff0_4*dmats0[4][3] + coeff0_5*dmats0[5][3] + coeff0_6*dmats0[6][3] + coeff0_7*dmats0[7][3] + coeff0_8*dmats0[8][3] + coeff0_9*dmats0[9][3];
+            new_coeff0_4 = coeff0_0*dmats0[0][4] + coeff0_1*dmats0[1][4] + coeff0_2*dmats0[2][4] + coeff0_3*dmats0[3][4] + coeff0_4*dmats0[4][4] + coeff0_5*dmats0[5][4] + coeff0_6*dmats0[6][4] + coeff0_7*dmats0[7][4] + coeff0_8*dmats0[8][4] + coeff0_9*dmats0[9][4];
+            new_coeff0_5 = coeff0_0*dmats0[0][5] + coeff0_1*dmats0[1][5] + coeff0_2*dmats0[2][5] + coeff0_3*dmats0[3][5] + coeff0_4*dmats0[4][5] + coeff0_5*dmats0[5][5] + coeff0_6*dmats0[6][5] + coeff0_7*dmats0[7][5] + coeff0_8*dmats0[8][5] + coeff0_9*dmats0[9][5];
+            new_coeff0_6 = coeff0_0*dmats0[0][6] + coeff0_1*dmats0[1][6] + coeff0_2*dmats0[2][6] + coeff0_3*dmats0[3][6] + coeff0_4*dmats0[4][6] + coeff0_5*dmats0[5][6] + coeff0_6*dmats0[6][6] + coeff0_7*dmats0[7][6] + coeff0_8*dmats0[8][6] + coeff0_9*dmats0[9][6];
+            new_coeff0_7 = coeff0_0*dmats0[0][7] + coeff0_1*dmats0[1][7] + coeff0_2*dmats0[2][7] + coeff0_3*dmats0[3][7] + coeff0_4*dmats0[4][7] + coeff0_5*dmats0[5][7] + coeff0_6*dmats0[6][7] + coeff0_7*dmats0[7][7] + coeff0_8*dmats0[8][7] + coeff0_9*dmats0[9][7];
+            new_coeff0_8 = coeff0_0*dmats0[0][8] + coeff0_1*dmats0[1][8] + coeff0_2*dmats0[2][8] + coeff0_3*dmats0[3][8] + coeff0_4*dmats0[4][8] + coeff0_5*dmats0[5][8] + coeff0_6*dmats0[6][8] + coeff0_7*dmats0[7][8] + coeff0_8*dmats0[8][8] + coeff0_9*dmats0[9][8];
+            new_coeff0_9 = coeff0_0*dmats0[0][9] + coeff0_1*dmats0[1][9] + coeff0_2*dmats0[2][9] + coeff0_3*dmats0[3][9] + coeff0_4*dmats0[4][9] + coeff0_5*dmats0[5][9] + coeff0_6*dmats0[6][9] + coeff0_7*dmats0[7][9] + coeff0_8*dmats0[8][9] + coeff0_9*dmats0[9][9];
           }
           if(combinations[deriv_num][j] == 1)
           {
-            new_coeff0_0 = coeff0_0*dmats1[0][0] + coeff0_1*dmats1[1][0] + coeff0_2*dmats1[2][0] + coeff0_3*dmats1[3][0];
-            new_coeff0_1 = coeff0_0*dmats1[0][1] + coeff0_1*dmats1[1][1] + coeff0_2*dmats1[2][1] + coeff0_3*dmats1[3][1];
-            new_coeff0_2 = coeff0_0*dmats1[0][2] + coeff0_1*dmats1[1][2] + coeff0_2*dmats1[2][2] + coeff0_3*dmats1[3][2];
-            new_coeff0_3 = coeff0_0*dmats1[0][3] + coeff0_1*dmats1[1][3] + coeff0_2*dmats1[2][3] + coeff0_3*dmats1[3][3];
+            new_coeff0_0 = coeff0_0*dmats1[0][0] + coeff0_1*dmats1[1][0] + coeff0_2*dmats1[2][0] + coeff0_3*dmats1[3][0] + coeff0_4*dmats1[4][0] + coeff0_5*dmats1[5][0] + coeff0_6*dmats1[6][0] + coeff0_7*dmats1[7][0] + coeff0_8*dmats1[8][0] + coeff0_9*dmats1[9][0];
+            new_coeff0_1 = coeff0_0*dmats1[0][1] + coeff0_1*dmats1[1][1] + coeff0_2*dmats1[2][1] + coeff0_3*dmats1[3][1] + coeff0_4*dmats1[4][1] + coeff0_5*dmats1[5][1] + coeff0_6*dmats1[6][1] + coeff0_7*dmats1[7][1] + coeff0_8*dmats1[8][1] + coeff0_9*dmats1[9][1];
+            new_coeff0_2 = coeff0_0*dmats1[0][2] + coeff0_1*dmats1[1][2] + coeff0_2*dmats1[2][2] + coeff0_3*dmats1[3][2] + coeff0_4*dmats1[4][2] + coeff0_5*dmats1[5][2] + coeff0_6*dmats1[6][2] + coeff0_7*dmats1[7][2] + coeff0_8*dmats1[8][2] + coeff0_9*dmats1[9][2];
+            new_coeff0_3 = coeff0_0*dmats1[0][3] + coeff0_1*dmats1[1][3] + coeff0_2*dmats1[2][3] + coeff0_3*dmats1[3][3] + coeff0_4*dmats1[4][3] + coeff0_5*dmats1[5][3] + coeff0_6*dmats1[6][3] + coeff0_7*dmats1[7][3] + coeff0_8*dmats1[8][3] + coeff0_9*dmats1[9][3];
+            new_coeff0_4 = coeff0_0*dmats1[0][4] + coeff0_1*dmats1[1][4] + coeff0_2*dmats1[2][4] + coeff0_3*dmats1[3][4] + coeff0_4*dmats1[4][4] + coeff0_5*dmats1[5][4] + coeff0_6*dmats1[6][4] + coeff0_7*dmats1[7][4] + coeff0_8*dmats1[8][4] + coeff0_9*dmats1[9][4];
+            new_coeff0_5 = coeff0_0*dmats1[0][5] + coeff0_1*dmats1[1][5] + coeff0_2*dmats1[2][5] + coeff0_3*dmats1[3][5] + coeff0_4*dmats1[4][5] + coeff0_5*dmats1[5][5] + coeff0_6*dmats1[6][5] + coeff0_7*dmats1[7][5] + coeff0_8*dmats1[8][5] + coeff0_9*dmats1[9][5];
+            new_coeff0_6 = coeff0_0*dmats1[0][6] + coeff0_1*dmats1[1][6] + coeff0_2*dmats1[2][6] + coeff0_3*dmats1[3][6] + coeff0_4*dmats1[4][6] + coeff0_5*dmats1[5][6] + coeff0_6*dmats1[6][6] + coeff0_7*dmats1[7][6] + coeff0_8*dmats1[8][6] + coeff0_9*dmats1[9][6];
+            new_coeff0_7 = coeff0_0*dmats1[0][7] + coeff0_1*dmats1[1][7] + coeff0_2*dmats1[2][7] + coeff0_3*dmats1[3][7] + coeff0_4*dmats1[4][7] + coeff0_5*dmats1[5][7] + coeff0_6*dmats1[6][7] + coeff0_7*dmats1[7][7] + coeff0_8*dmats1[8][7] + coeff0_9*dmats1[9][7];
+            new_coeff0_8 = coeff0_0*dmats1[0][8] + coeff0_1*dmats1[1][8] + coeff0_2*dmats1[2][8] + coeff0_3*dmats1[3][8] + coeff0_4*dmats1[4][8] + coeff0_5*dmats1[5][8] + coeff0_6*dmats1[6][8] + coeff0_7*dmats1[7][8] + coeff0_8*dmats1[8][8] + coeff0_9*dmats1[9][8];
+            new_coeff0_9 = coeff0_0*dmats1[0][9] + coeff0_1*dmats1[1][9] + coeff0_2*dmats1[2][9] + coeff0_3*dmats1[3][9] + coeff0_4*dmats1[4][9] + coeff0_5*dmats1[5][9] + coeff0_6*dmats1[6][9] + coeff0_7*dmats1[7][9] + coeff0_8*dmats1[8][9] + coeff0_9*dmats1[9][9];
           }
           if(combinations[deriv_num][j] == 2)
           {
-            new_coeff0_0 = coeff0_0*dmats2[0][0] + coeff0_1*dmats2[1][0] + coeff0_2*dmats2[2][0] + coeff0_3*dmats2[3][0];
-            new_coeff0_1 = coeff0_0*dmats2[0][1] + coeff0_1*dmats2[1][1] + coeff0_2*dmats2[2][1] + coeff0_3*dmats2[3][1];
-            new_coeff0_2 = coeff0_0*dmats2[0][2] + coeff0_1*dmats2[1][2] + coeff0_2*dmats2[2][2] + coeff0_3*dmats2[3][2];
-            new_coeff0_3 = coeff0_0*dmats2[0][3] + coeff0_1*dmats2[1][3] + coeff0_2*dmats2[2][3] + coeff0_3*dmats2[3][3];
+            new_coeff0_0 = coeff0_0*dmats2[0][0] + coeff0_1*dmats2[1][0] + coeff0_2*dmats2[2][0] + coeff0_3*dmats2[3][0] + coeff0_4*dmats2[4][0] + coeff0_5*dmats2[5][0] + coeff0_6*dmats2[6][0] + coeff0_7*dmats2[7][0] + coeff0_8*dmats2[8][0] + coeff0_9*dmats2[9][0];
+            new_coeff0_1 = coeff0_0*dmats2[0][1] + coeff0_1*dmats2[1][1] + coeff0_2*dmats2[2][1] + coeff0_3*dmats2[3][1] + coeff0_4*dmats2[4][1] + coeff0_5*dmats2[5][1] + coeff0_6*dmats2[6][1] + coeff0_7*dmats2[7][1] + coeff0_8*dmats2[8][1] + coeff0_9*dmats2[9][1];
+            new_coeff0_2 = coeff0_0*dmats2[0][2] + coeff0_1*dmats2[1][2] + coeff0_2*dmats2[2][2] + coeff0_3*dmats2[3][2] + coeff0_4*dmats2[4][2] + coeff0_5*dmats2[5][2] + coeff0_6*dmats2[6][2] + coeff0_7*dmats2[7][2] + coeff0_8*dmats2[8][2] + coeff0_9*dmats2[9][2];
+            new_coeff0_3 = coeff0_0*dmats2[0][3] + coeff0_1*dmats2[1][3] + coeff0_2*dmats2[2][3] + coeff0_3*dmats2[3][3] + coeff0_4*dmats2[4][3] + coeff0_5*dmats2[5][3] + coeff0_6*dmats2[6][3] + coeff0_7*dmats2[7][3] + coeff0_8*dmats2[8][3] + coeff0_9*dmats2[9][3];
+            new_coeff0_4 = coeff0_0*dmats2[0][4] + coeff0_1*dmats2[1][4] + coeff0_2*dmats2[2][4] + coeff0_3*dmats2[3][4] + coeff0_4*dmats2[4][4] + coeff0_5*dmats2[5][4] + coeff0_6*dmats2[6][4] + coeff0_7*dmats2[7][4] + coeff0_8*dmats2[8][4] + coeff0_9*dmats2[9][4];
+            new_coeff0_5 = coeff0_0*dmats2[0][5] + coeff0_1*dmats2[1][5] + coeff0_2*dmats2[2][5] + coeff0_3*dmats2[3][5] + coeff0_4*dmats2[4][5] + coeff0_5*dmats2[5][5] + coeff0_6*dmats2[6][5] + coeff0_7*dmats2[7][5] + coeff0_8*dmats2[8][5] + coeff0_9*dmats2[9][5];
+            new_coeff0_6 = coeff0_0*dmats2[0][6] + coeff0_1*dmats2[1][6] + coeff0_2*dmats2[2][6] + coeff0_3*dmats2[3][6] + coeff0_4*dmats2[4][6] + coeff0_5*dmats2[5][6] + coeff0_6*dmats2[6][6] + coeff0_7*dmats2[7][6] + coeff0_8*dmats2[8][6] + coeff0_9*dmats2[9][6];
+            new_coeff0_7 = coeff0_0*dmats2[0][7] + coeff0_1*dmats2[1][7] + coeff0_2*dmats2[2][7] + coeff0_3*dmats2[3][7] + coeff0_4*dmats2[4][7] + coeff0_5*dmats2[5][7] + coeff0_6*dmats2[6][7] + coeff0_7*dmats2[7][7] + coeff0_8*dmats2[8][7] + coeff0_9*dmats2[9][7];
+            new_coeff0_8 = coeff0_0*dmats2[0][8] + coeff0_1*dmats2[1][8] + coeff0_2*dmats2[2][8] + coeff0_3*dmats2[3][8] + coeff0_4*dmats2[4][8] + coeff0_5*dmats2[5][8] + coeff0_6*dmats2[6][8] + coeff0_7*dmats2[7][8] + coeff0_8*dmats2[8][8] + coeff0_9*dmats2[9][8];
+            new_coeff0_9 = coeff0_0*dmats2[0][9] + coeff0_1*dmats2[1][9] + coeff0_2*dmats2[2][9] + coeff0_3*dmats2[3][9] + coeff0_4*dmats2[4][9] + coeff0_5*dmats2[5][9] + coeff0_6*dmats2[6][9] + coeff0_7*dmats2[7][9] + coeff0_8*dmats2[8][9] + coeff0_9*dmats2[9][9];
           }
     
         }
         // Compute derivatives on reference element as dot product of coefficients and basisvalues
-        derivatives[deriv_num] = new_coeff0_0*basisvalue0 + new_coeff0_1*basisvalue1 + new_coeff0_2*basisvalue2 + new_coeff0_3*basisvalue3;
+        derivatives[deriv_num] = new_coeff0_0*basisvalue0 + new_coeff0_1*basisvalue1 + new_coeff0_2*basisvalue2 + new_coeff0_3*basisvalue3 + new_coeff0_4*basisvalue4 + new_coeff0_5*basisvalue5 + new_coeff0_6*basisvalue6 + new_coeff0_7*basisvalue7 + new_coeff0_8*basisvalue8 + new_coeff0_9*basisvalue9;
       }
     
       // Transform derivatives back to physical element
@@ -13413,9 +16454,9 @@ double UFC_SolitaryWave3DLinearForm_fini
                                    const ufc::cell& c) const
 {
     // The reference points, direction and weights:
-    const static double X[8][1][3] = {{{0, 0, 0}}, {{1, 0, 0}}, {{0, 1, 0}}, {{0, 0, 1}}, {{0, 0, 0}}, {{1, 0, 0}}, {{0, 1, 0}}, {{0, 0, 1}}};
-    const static double W[8][1] = {{1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}};
-    const static double D[8][1][2] = {{{1, 0}}, {{1, 0}}, {{1, 0}}, {{1, 0}}, {{0, 1}}, {{0, 1}}, {{0, 1}}, {{0, 1}}};
+    const static double X[20][1][3] = {{{0, 0, 0}}, {{1, 0, 0}}, {{0, 1, 0}}, {{0, 0, 1}}, {{0, 0.5, 0.5}}, {{0.5, 0, 0.5}}, {{0.5, 0.5, 0}}, {{0, 0, 0.5}}, {{0, 0.5, 0}}, {{0.5, 0, 0}}, {{0, 0, 0}}, {{1, 0, 0}}, {{0, 1, 0}}, {{0, 0, 1}}, {{0, 0.5, 0.5}}, {{0.5, 0, 0.5}}, {{0.5, 0.5, 0}}, {{0, 0, 0.5}}, {{0, 0.5, 0}}, {{0.5, 0, 0}}};
+    const static double W[20][1] = {{1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}};
+    const static double D[20][1][2] = {{{1, 0}}, {{1, 0}}, {{1, 0}}, {{1, 0}}, {{1, 0}}, {{1, 0}}, {{1, 0}}, {{1, 0}}, {{1, 0}}, {{1, 0}}, {{0, 1}}, {{0, 1}}, {{0, 1}}, {{0, 1}}, {{0, 1}}, {{0, 1}}, {{0, 1}}, {{0, 1}}, {{0, 1}}, {{0, 1}}};
     
     const double * const * x = c.coordinates;
     double result = 0.0;
@@ -13469,10 +16510,10 @@ void UFC_SolitaryWave3DLinearForm_finite
     vertex_values[4] = dof_values[2];
     vertex_values[6] = dof_values[3];
     // Evaluate at vertices and use affine mapping
-    vertex_values[1] = dof_values[4];
-    vertex_values[3] = dof_values[5];
-    vertex_values[5] = dof_values[6];
-    vertex_values[7] = dof_values[7];
+    vertex_values[1] = dof_values[10];
+    vertex_values[3] = dof_values[11];
+    vertex_values[5] = dof_values[12];
+    vertex_values[7] = dof_values[13];
 }
 
 /// Return the number of sub elements (for a mixed element)
@@ -13512,7 +16553,7 @@ UFC_SolitaryWave3DLinearForm_finite_elem
 /// Return a string identifying the finite element
 const char* UFC_SolitaryWave3DLinearForm_finite_element_1_0::signature() const
 {
-    return "FiniteElement('Lagrange', 'tetrahedron', 1)";
+    return "FiniteElement('Lagrange', 'tetrahedron', 2)";
 }
 
 /// Return the cell shape
@@ -13524,7 +16565,7 @@ ufc::shape UFC_SolitaryWave3DLinearForm_
 /// Return the dimension of the finite element function space
 unsigned int UFC_SolitaryWave3DLinearForm_finite_element_1_0::space_dimension() const
 {
-    return 4;
+    return 10;
 }
 
 /// Return the rank of the value space
@@ -13615,45 +16656,75 @@ void UFC_SolitaryWave3DLinearForm_finite
     // Generate scalings
     const double scalings_y_0 = 1;
     const double scalings_y_1 = scalings_y_0*(0.5 - 0.5*y);
+    const double scalings_y_2 = scalings_y_1*(0.5 - 0.5*y);
     const double scalings_z_0 = 1;
     const double scalings_z_1 = scalings_z_0*(0.5 - 0.5*z);
+    const double scalings_z_2 = scalings_z_1*(0.5 - 0.5*z);
     
     // Compute psitilde_a
     const double psitilde_a_0 = 1;
     const double psitilde_a_1 = x;
+    const double psitilde_a_2 = 1.5*x*psitilde_a_1 - 0.5*psitilde_a_0;
     
     // Compute psitilde_bs
     const double psitilde_bs_0_0 = 1;
     const double psitilde_bs_0_1 = 1.5*y + 0.5;
+    const double psitilde_bs_0_2 = 0.111111111111111*psitilde_bs_0_1 + 1.66666666666667*y*psitilde_bs_0_1 - 0.555555555555556*psitilde_bs_0_0;
     const double psitilde_bs_1_0 = 1;
+    const double psitilde_bs_1_1 = 2.5*y + 1.5;
+    const double psitilde_bs_2_0 = 1;
     
     // Compute psitilde_cs
     const double psitilde_cs_00_0 = 1;
     const double psitilde_cs_00_1 = 2*z + 1;
+    const double psitilde_cs_00_2 = 0.3125*psitilde_cs_00_1 + 1.875*z*psitilde_cs_00_1 - 0.5625*psitilde_cs_00_0;
     const double psitilde_cs_01_0 = 1;
+    const double psitilde_cs_01_1 = 3*z + 2;
+    const double psitilde_cs_02_0 = 1;
     const double psitilde_cs_10_0 = 1;
+    const double psitilde_cs_10_1 = 3*z + 2;
+    const double psitilde_cs_11_0 = 1;
+    const double psitilde_cs_20_0 = 1;
     
     // Compute basisvalues
     const double basisvalue0 = 0.866025403784439*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_0;
     const double basisvalue1 = 2.73861278752583*psitilde_a_1*scalings_y_1*psitilde_bs_1_0*scalings_z_1*psitilde_cs_10_0;
     const double basisvalue2 = 1.58113883008419*psitilde_a_0*scalings_y_0*psitilde_bs_0_1*scalings_z_1*psitilde_cs_01_0;
     const double basisvalue3 = 1.11803398874989*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_1;
-    
-    // Table(s) of coefficients
-    const static double coefficients0[4][4] = \
-    {{0.288675134594813, -0.182574185835055, -0.105409255338946, -0.074535599249993},
-    {0.288675134594813, 0.182574185835055, -0.105409255338946, -0.074535599249993},
-    {0.288675134594813, 0, 0.210818510677892, -0.074535599249993},
-    {0.288675134594813, 0, 0, 0.223606797749979}};
+    const double basisvalue4 = 5.1234753829798*psitilde_a_2*scalings_y_2*psitilde_bs_2_0*scalings_z_2*psitilde_cs_20_0;
+    const double basisvalue5 = 3.96862696659689*psitilde_a_1*scalings_y_1*psitilde_bs_1_1*scalings_z_2*psitilde_cs_11_0;
+    const double basisvalue6 = 2.29128784747792*psitilde_a_0*scalings_y_0*psitilde_bs_0_2*scalings_z_2*psitilde_cs_02_0;
+    const double basisvalue7 = 3.24037034920393*psitilde_a_1*scalings_y_1*psitilde_bs_1_0*scalings_z_1*psitilde_cs_10_1;
+    const double basisvalue8 = 1.87082869338697*psitilde_a_0*scalings_y_0*psitilde_bs_0_1*scalings_z_1*psitilde_cs_01_1;
+    const double basisvalue9 = 1.3228756555323*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_2;
+    
+    // Table(s) of coefficients
+    const static double coefficients0[10][10] = \
+    {{-0.0577350269189626, -0.0608580619450185, -0.0351364184463153, -0.0248451997499977, 0.0650600048632355, 0.0503952630678969, 0.0290957186981323, 0.0411475599898912, 0.0237565548366599, 0.0167984210226323},
+    {-0.0577350269189625, 0.0608580619450185, -0.0351364184463153, -0.0248451997499977, 0.0650600048632355, -0.050395263067897, 0.0290957186981323, -0.0411475599898912, 0.0237565548366599, 0.0167984210226323},
+    {-0.0577350269189625, 0, 0.0702728368926306, -0.0248451997499977, 0, 0, 0.0872871560943969, 0, -0.0475131096733199, 0.0167984210226323},
+    {-0.0577350269189626, 0, 0, 0.074535599249993, 0, 0, 0, 0, 0, 0.100790526135794},
+    {0.23094010767585, 0, 0.140545673785261, 0.0993807989999906, 0, 0, 0, 0, 0.1187827741833, -0.0671936840905293},
+    {0.230940107675851, 0.121716123890037, -0.0702728368926306, 0.0993807989999907, 0, 0, 0, 0.102868899974728, -0.0593913870916499, -0.0671936840905293},
+    {0.23094010767585, 0.121716123890037, 0.0702728368926307, -0.0993807989999907, 0, 0.100790526135794, -0.087287156094397, -0.0205737799949456, -0.01187827741833, 0.0167984210226323},
+    {0.23094010767585, -0.121716123890037, -0.0702728368926307, 0.0993807989999906, 0, 0, 0, -0.102868899974728, -0.0593913870916499, -0.0671936840905293},
+    {0.23094010767585, -0.121716123890037, 0.0702728368926306, -0.0993807989999906, 0, -0.100790526135794, -0.0872871560943969, 0.0205737799949456, -0.01187827741833, 0.0167984210226323},
+    {0.23094010767585, 0, -0.140545673785261, -0.0993807989999906, -0.130120009726471, 0, 0.0290957186981323, 0, 0.02375655483666, 0.0167984210226323}};
     
     // Extract relevant coefficients
     const double coeff0_0 = coefficients0[dof][0];
     const double coeff0_1 = coefficients0[dof][1];
     const double coeff0_2 = coefficients0[dof][2];
     const double coeff0_3 = coefficients0[dof][3];
+    const double coeff0_4 = coefficients0[dof][4];
+    const double coeff0_5 = coefficients0[dof][5];
+    const double coeff0_6 = coefficients0[dof][6];
+    const double coeff0_7 = coefficients0[dof][7];
+    const double coeff0_8 = coefficients0[dof][8];
+    const double coeff0_9 = coefficients0[dof][9];
     
     // Compute value(s)
-    *values = coeff0_0*basisvalue0 + coeff0_1*basisvalue1 + coeff0_2*basisvalue2 + coeff0_3*basisvalue3;
+    *values = coeff0_0*basisvalue0 + coeff0_1*basisvalue1 + coeff0_2*basisvalue2 + coeff0_3*basisvalue3 + coeff0_4*basisvalue4 + coeff0_5*basisvalue5 + coeff0_6*basisvalue6 + coeff0_7*basisvalue7 + coeff0_8*basisvalue8 + coeff0_9*basisvalue9;
 }
 
 /// Evaluate all basis functions at given point in cell
@@ -13801,56 +16872,98 @@ void UFC_SolitaryWave3DLinearForm_finite
     // Generate scalings
     const double scalings_y_0 = 1;
     const double scalings_y_1 = scalings_y_0*(0.5 - 0.5*y);
+    const double scalings_y_2 = scalings_y_1*(0.5 - 0.5*y);
     const double scalings_z_0 = 1;
     const double scalings_z_1 = scalings_z_0*(0.5 - 0.5*z);
+    const double scalings_z_2 = scalings_z_1*(0.5 - 0.5*z);
     
     // Compute psitilde_a
     const double psitilde_a_0 = 1;
     const double psitilde_a_1 = x;
+    const double psitilde_a_2 = 1.5*x*psitilde_a_1 - 0.5*psitilde_a_0;
     
     // Compute psitilde_bs
     const double psitilde_bs_0_0 = 1;
     const double psitilde_bs_0_1 = 1.5*y + 0.5;
+    const double psitilde_bs_0_2 = 0.111111111111111*psitilde_bs_0_1 + 1.66666666666667*y*psitilde_bs_0_1 - 0.555555555555556*psitilde_bs_0_0;
     const double psitilde_bs_1_0 = 1;
+    const double psitilde_bs_1_1 = 2.5*y + 1.5;
+    const double psitilde_bs_2_0 = 1;
     
     // Compute psitilde_cs
     const double psitilde_cs_00_0 = 1;
     const double psitilde_cs_00_1 = 2*z + 1;
+    const double psitilde_cs_00_2 = 0.3125*psitilde_cs_00_1 + 1.875*z*psitilde_cs_00_1 - 0.5625*psitilde_cs_00_0;
     const double psitilde_cs_01_0 = 1;
+    const double psitilde_cs_01_1 = 3*z + 2;
+    const double psitilde_cs_02_0 = 1;
     const double psitilde_cs_10_0 = 1;
+    const double psitilde_cs_10_1 = 3*z + 2;
+    const double psitilde_cs_11_0 = 1;
+    const double psitilde_cs_20_0 = 1;
     
     // Compute basisvalues
     const double basisvalue0 = 0.866025403784439*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_0;
     const double basisvalue1 = 2.73861278752583*psitilde_a_1*scalings_y_1*psitilde_bs_1_0*scalings_z_1*psitilde_cs_10_0;
     const double basisvalue2 = 1.58113883008419*psitilde_a_0*scalings_y_0*psitilde_bs_0_1*scalings_z_1*psitilde_cs_01_0;
     const double basisvalue3 = 1.11803398874989*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_1;
-    
-    // Table(s) of coefficients
-    const static double coefficients0[4][4] = \
-    {{0.288675134594813, -0.182574185835055, -0.105409255338946, -0.074535599249993},
-    {0.288675134594813, 0.182574185835055, -0.105409255338946, -0.074535599249993},
-    {0.288675134594813, 0, 0.210818510677892, -0.074535599249993},
-    {0.288675134594813, 0, 0, 0.223606797749979}};
+    const double basisvalue4 = 5.1234753829798*psitilde_a_2*scalings_y_2*psitilde_bs_2_0*scalings_z_2*psitilde_cs_20_0;
+    const double basisvalue5 = 3.96862696659689*psitilde_a_1*scalings_y_1*psitilde_bs_1_1*scalings_z_2*psitilde_cs_11_0;
+    const double basisvalue6 = 2.29128784747792*psitilde_a_0*scalings_y_0*psitilde_bs_0_2*scalings_z_2*psitilde_cs_02_0;
+    const double basisvalue7 = 3.24037034920393*psitilde_a_1*scalings_y_1*psitilde_bs_1_0*scalings_z_1*psitilde_cs_10_1;
+    const double basisvalue8 = 1.87082869338697*psitilde_a_0*scalings_y_0*psitilde_bs_0_1*scalings_z_1*psitilde_cs_01_1;
+    const double basisvalue9 = 1.3228756555323*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_2;
+    
+    // Table(s) of coefficients
+    const static double coefficients0[10][10] = \
+    {{-0.0577350269189626, -0.0608580619450185, -0.0351364184463153, -0.0248451997499977, 0.0650600048632355, 0.0503952630678969, 0.0290957186981323, 0.0411475599898912, 0.0237565548366599, 0.0167984210226323},
+    {-0.0577350269189625, 0.0608580619450185, -0.0351364184463153, -0.0248451997499977, 0.0650600048632355, -0.050395263067897, 0.0290957186981323, -0.0411475599898912, 0.0237565548366599, 0.0167984210226323},
+    {-0.0577350269189625, 0, 0.0702728368926306, -0.0248451997499977, 0, 0, 0.0872871560943969, 0, -0.0475131096733199, 0.0167984210226323},
+    {-0.0577350269189626, 0, 0, 0.074535599249993, 0, 0, 0, 0, 0, 0.100790526135794},
+    {0.23094010767585, 0, 0.140545673785261, 0.0993807989999906, 0, 0, 0, 0, 0.1187827741833, -0.0671936840905293},
+    {0.230940107675851, 0.121716123890037, -0.0702728368926306, 0.0993807989999907, 0, 0, 0, 0.102868899974728, -0.0593913870916499, -0.0671936840905293},
+    {0.23094010767585, 0.121716123890037, 0.0702728368926307, -0.0993807989999907, 0, 0.100790526135794, -0.087287156094397, -0.0205737799949456, -0.01187827741833, 0.0167984210226323},
+    {0.23094010767585, -0.121716123890037, -0.0702728368926307, 0.0993807989999906, 0, 0, 0, -0.102868899974728, -0.0593913870916499, -0.0671936840905293},
+    {0.23094010767585, -0.121716123890037, 0.0702728368926306, -0.0993807989999906, 0, -0.100790526135794, -0.0872871560943969, 0.0205737799949456, -0.01187827741833, 0.0167984210226323},
+    {0.23094010767585, 0, -0.140545673785261, -0.0993807989999906, -0.130120009726471, 0, 0.0290957186981323, 0, 0.02375655483666, 0.0167984210226323}};
     
     // Interesting (new) part
     // Tables of derivatives of the polynomial base (transpose)
-    const static double dmats0[4][4] = \
-    {{0, 0, 0, 0},
-    {6.32455532033676, 0, 0, 0},
-    {0, 0, 0, 0},
-    {0, 0, 0, 0}};
-    
-    const static double dmats1[4][4] = \
-    {{0, 0, 0, 0},
-    {3.16227766016838, 0, 0, 0},
-    {5.47722557505166, 0, 0, 0},
-    {0, 0, 0, 0}};
-    
-    const static double dmats2[4][4] = \
-    {{0, 0, 0, 0},
-    {3.16227766016838, 0, 0, 0},
-    {1.82574185835055, 0, 0, 0},
-    {5.16397779494322, 0, 0, 0}};
+    const static double dmats0[10][10] = \
+    {{0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {6.32455532033676, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {0, 11.2249721603218, 0, 0, 0, 0, 0, 0, 0, 0},
+    {4.58257569495584, 0, 8.36660026534076, -1.18321595661992, 0, 0, 0, 0, 0, 0},
+    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {3.74165738677394, 0, 0, 8.69482604771366, 0, 0, 0, 0, 0, 0},
+    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
+    
+    const static double dmats1[10][10] = \
+    {{0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {3.16227766016838, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {5.47722557505166, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {2.95803989154981, 5.61248608016091, -1.08012344973464, -0.763762615825974, 0, 0, 0, 0, 0, 0},
+    {2.29128784747792, 7.24568837309472, 4.18330013267038, -0.591607978309962, 0, 0, 0, 0, 0, 0},
+    {-2.64575131106459, 0, 9.66091783079296, 0.683130051063974, 0, 0, 0, 0, 0, 0},
+    {1.87082869338697, 0, 0, 4.34741302385683, 0, 0, 0, 0, 0, 0},
+    {3.24037034920393, 0, 0, 7.52994023880668, 0, 0, 0, 0, 0, 0},
+    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
+    
+    const static double dmats2[10][10] = \
+    {{0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {3.16227766016838, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {1.82574185835055, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {5.16397779494322, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {2.95803989154981, 5.61248608016091, -1.08012344973464, -0.763762615825974, 0, 0, 0, 0, 0, 0},
+    {2.29128784747792, 1.44913767461894, 4.18330013267038, -0.591607978309962, 0, 0, 0, 0, 0, 0},
+    {1.32287565553229, 0, 3.86436713231718, -0.341565025531986, 0, 0, 0, 0, 0, 0},
+    {1.87082869338697, 7.09929573971954, 0, 4.34741302385683, 0, 0, 0, 0, 0, 0},
+    {1.08012344973464, 0, 7.09929573971954, 2.50998007960223, 0, 0, 0, 0, 0, 0},
+    {-3.81881307912987, 0, 0, 8.87411967464942, 0, 0, 0, 0, 0, 0}};
     
     // Compute reference derivatives
     // Declare pointer to array of derivatives on FIAT element
@@ -13861,12 +16974,24 @@ void UFC_SolitaryWave3DLinearForm_finite
     double coeff0_1 = 0;
     double coeff0_2 = 0;
     double coeff0_3 = 0;
+    double coeff0_4 = 0;
+    double coeff0_5 = 0;
+    double coeff0_6 = 0;
+    double coeff0_7 = 0;
+    double coeff0_8 = 0;
+    double coeff0_9 = 0;
     
     // Declare new coefficients
     double new_coeff0_0 = 0;
     double new_coeff0_1 = 0;
     double new_coeff0_2 = 0;
     double new_coeff0_3 = 0;
+    double new_coeff0_4 = 0;
+    double new_coeff0_5 = 0;
+    double new_coeff0_6 = 0;
+    double new_coeff0_7 = 0;
+    double new_coeff0_8 = 0;
+    double new_coeff0_9 = 0;
     
     // Loop possible derivatives
     for (unsigned int deriv_num = 0; deriv_num < num_derivatives; deriv_num++)
@@ -13876,6 +17001,12 @@ void UFC_SolitaryWave3DLinearForm_finite
       new_coeff0_1 = coefficients0[dof][1];
       new_coeff0_2 = coefficients0[dof][2];
       new_coeff0_3 = coefficients0[dof][3];
+      new_coeff0_4 = coefficients0[dof][4];
+      new_coeff0_5 = coefficients0[dof][5];
+      new_coeff0_6 = coefficients0[dof][6];
+      new_coeff0_7 = coefficients0[dof][7];
+      new_coeff0_8 = coefficients0[dof][8];
+      new_coeff0_9 = coefficients0[dof][9];
     
       // Loop derivative order
       for (unsigned int j = 0; j < n; j++)
@@ -13885,32 +17016,56 @@ void UFC_SolitaryWave3DLinearForm_finite
         coeff0_1 = new_coeff0_1;
         coeff0_2 = new_coeff0_2;
         coeff0_3 = new_coeff0_3;
+        coeff0_4 = new_coeff0_4;
+        coeff0_5 = new_coeff0_5;
+        coeff0_6 = new_coeff0_6;
+        coeff0_7 = new_coeff0_7;
+        coeff0_8 = new_coeff0_8;
+        coeff0_9 = new_coeff0_9;
     
         if(combinations[deriv_num][j] == 0)
         {
-          new_coeff0_0 = coeff0_0*dmats0[0][0] + coeff0_1*dmats0[1][0] + coeff0_2*dmats0[2][0] + coeff0_3*dmats0[3][0];
-          new_coeff0_1 = coeff0_0*dmats0[0][1] + coeff0_1*dmats0[1][1] + coeff0_2*dmats0[2][1] + coeff0_3*dmats0[3][1];
-          new_coeff0_2 = coeff0_0*dmats0[0][2] + coeff0_1*dmats0[1][2] + coeff0_2*dmats0[2][2] + coeff0_3*dmats0[3][2];
-          new_coeff0_3 = coeff0_0*dmats0[0][3] + coeff0_1*dmats0[1][3] + coeff0_2*dmats0[2][3] + coeff0_3*dmats0[3][3];
+          new_coeff0_0 = coeff0_0*dmats0[0][0] + coeff0_1*dmats0[1][0] + coeff0_2*dmats0[2][0] + coeff0_3*dmats0[3][0] + coeff0_4*dmats0[4][0] + coeff0_5*dmats0[5][0] + coeff0_6*dmats0[6][0] + coeff0_7*dmats0[7][0] + coeff0_8*dmats0[8][0] + coeff0_9*dmats0[9][0];
+          new_coeff0_1 = coeff0_0*dmats0[0][1] + coeff0_1*dmats0[1][1] + coeff0_2*dmats0[2][1] + coeff0_3*dmats0[3][1] + coeff0_4*dmats0[4][1] + coeff0_5*dmats0[5][1] + coeff0_6*dmats0[6][1] + coeff0_7*dmats0[7][1] + coeff0_8*dmats0[8][1] + coeff0_9*dmats0[9][1];
+          new_coeff0_2 = coeff0_0*dmats0[0][2] + coeff0_1*dmats0[1][2] + coeff0_2*dmats0[2][2] + coeff0_3*dmats0[3][2] + coeff0_4*dmats0[4][2] + coeff0_5*dmats0[5][2] + coeff0_6*dmats0[6][2] + coeff0_7*dmats0[7][2] + coeff0_8*dmats0[8][2] + coeff0_9*dmats0[9][2];
+          new_coeff0_3 = coeff0_0*dmats0[0][3] + coeff0_1*dmats0[1][3] + coeff0_2*dmats0[2][3] + coeff0_3*dmats0[3][3] + coeff0_4*dmats0[4][3] + coeff0_5*dmats0[5][3] + coeff0_6*dmats0[6][3] + coeff0_7*dmats0[7][3] + coeff0_8*dmats0[8][3] + coeff0_9*dmats0[9][3];
+          new_coeff0_4 = coeff0_0*dmats0[0][4] + coeff0_1*dmats0[1][4] + coeff0_2*dmats0[2][4] + coeff0_3*dmats0[3][4] + coeff0_4*dmats0[4][4] + coeff0_5*dmats0[5][4] + coeff0_6*dmats0[6][4] + coeff0_7*dmats0[7][4] + coeff0_8*dmats0[8][4] + coeff0_9*dmats0[9][4];
+          new_coeff0_5 = coeff0_0*dmats0[0][5] + coeff0_1*dmats0[1][5] + coeff0_2*dmats0[2][5] + coeff0_3*dmats0[3][5] + coeff0_4*dmats0[4][5] + coeff0_5*dmats0[5][5] + coeff0_6*dmats0[6][5] + coeff0_7*dmats0[7][5] + coeff0_8*dmats0[8][5] + coeff0_9*dmats0[9][5];
+          new_coeff0_6 = coeff0_0*dmats0[0][6] + coeff0_1*dmats0[1][6] + coeff0_2*dmats0[2][6] + coeff0_3*dmats0[3][6] + coeff0_4*dmats0[4][6] + coeff0_5*dmats0[5][6] + coeff0_6*dmats0[6][6] + coeff0_7*dmats0[7][6] + coeff0_8*dmats0[8][6] + coeff0_9*dmats0[9][6];
+          new_coeff0_7 = coeff0_0*dmats0[0][7] + coeff0_1*dmats0[1][7] + coeff0_2*dmats0[2][7] + coeff0_3*dmats0[3][7] + coeff0_4*dmats0[4][7] + coeff0_5*dmats0[5][7] + coeff0_6*dmats0[6][7] + coeff0_7*dmats0[7][7] + coeff0_8*dmats0[8][7] + coeff0_9*dmats0[9][7];
+          new_coeff0_8 = coeff0_0*dmats0[0][8] + coeff0_1*dmats0[1][8] + coeff0_2*dmats0[2][8] + coeff0_3*dmats0[3][8] + coeff0_4*dmats0[4][8] + coeff0_5*dmats0[5][8] + coeff0_6*dmats0[6][8] + coeff0_7*dmats0[7][8] + coeff0_8*dmats0[8][8] + coeff0_9*dmats0[9][8];
+          new_coeff0_9 = coeff0_0*dmats0[0][9] + coeff0_1*dmats0[1][9] + coeff0_2*dmats0[2][9] + coeff0_3*dmats0[3][9] + coeff0_4*dmats0[4][9] + coeff0_5*dmats0[5][9] + coeff0_6*dmats0[6][9] + coeff0_7*dmats0[7][9] + coeff0_8*dmats0[8][9] + coeff0_9*dmats0[9][9];
         }
         if(combinations[deriv_num][j] == 1)
         {
-          new_coeff0_0 = coeff0_0*dmats1[0][0] + coeff0_1*dmats1[1][0] + coeff0_2*dmats1[2][0] + coeff0_3*dmats1[3][0];
-          new_coeff0_1 = coeff0_0*dmats1[0][1] + coeff0_1*dmats1[1][1] + coeff0_2*dmats1[2][1] + coeff0_3*dmats1[3][1];
-          new_coeff0_2 = coeff0_0*dmats1[0][2] + coeff0_1*dmats1[1][2] + coeff0_2*dmats1[2][2] + coeff0_3*dmats1[3][2];
-          new_coeff0_3 = coeff0_0*dmats1[0][3] + coeff0_1*dmats1[1][3] + coeff0_2*dmats1[2][3] + coeff0_3*dmats1[3][3];
+          new_coeff0_0 = coeff0_0*dmats1[0][0] + coeff0_1*dmats1[1][0] + coeff0_2*dmats1[2][0] + coeff0_3*dmats1[3][0] + coeff0_4*dmats1[4][0] + coeff0_5*dmats1[5][0] + coeff0_6*dmats1[6][0] + coeff0_7*dmats1[7][0] + coeff0_8*dmats1[8][0] + coeff0_9*dmats1[9][0];
+          new_coeff0_1 = coeff0_0*dmats1[0][1] + coeff0_1*dmats1[1][1] + coeff0_2*dmats1[2][1] + coeff0_3*dmats1[3][1] + coeff0_4*dmats1[4][1] + coeff0_5*dmats1[5][1] + coeff0_6*dmats1[6][1] + coeff0_7*dmats1[7][1] + coeff0_8*dmats1[8][1] + coeff0_9*dmats1[9][1];
+          new_coeff0_2 = coeff0_0*dmats1[0][2] + coeff0_1*dmats1[1][2] + coeff0_2*dmats1[2][2] + coeff0_3*dmats1[3][2] + coeff0_4*dmats1[4][2] + coeff0_5*dmats1[5][2] + coeff0_6*dmats1[6][2] + coeff0_7*dmats1[7][2] + coeff0_8*dmats1[8][2] + coeff0_9*dmats1[9][2];
+          new_coeff0_3 = coeff0_0*dmats1[0][3] + coeff0_1*dmats1[1][3] + coeff0_2*dmats1[2][3] + coeff0_3*dmats1[3][3] + coeff0_4*dmats1[4][3] + coeff0_5*dmats1[5][3] + coeff0_6*dmats1[6][3] + coeff0_7*dmats1[7][3] + coeff0_8*dmats1[8][3] + coeff0_9*dmats1[9][3];
+          new_coeff0_4 = coeff0_0*dmats1[0][4] + coeff0_1*dmats1[1][4] + coeff0_2*dmats1[2][4] + coeff0_3*dmats1[3][4] + coeff0_4*dmats1[4][4] + coeff0_5*dmats1[5][4] + coeff0_6*dmats1[6][4] + coeff0_7*dmats1[7][4] + coeff0_8*dmats1[8][4] + coeff0_9*dmats1[9][4];
+          new_coeff0_5 = coeff0_0*dmats1[0][5] + coeff0_1*dmats1[1][5] + coeff0_2*dmats1[2][5] + coeff0_3*dmats1[3][5] + coeff0_4*dmats1[4][5] + coeff0_5*dmats1[5][5] + coeff0_6*dmats1[6][5] + coeff0_7*dmats1[7][5] + coeff0_8*dmats1[8][5] + coeff0_9*dmats1[9][5];
+          new_coeff0_6 = coeff0_0*dmats1[0][6] + coeff0_1*dmats1[1][6] + coeff0_2*dmats1[2][6] + coeff0_3*dmats1[3][6] + coeff0_4*dmats1[4][6] + coeff0_5*dmats1[5][6] + coeff0_6*dmats1[6][6] + coeff0_7*dmats1[7][6] + coeff0_8*dmats1[8][6] + coeff0_9*dmats1[9][6];
+          new_coeff0_7 = coeff0_0*dmats1[0][7] + coeff0_1*dmats1[1][7] + coeff0_2*dmats1[2][7] + coeff0_3*dmats1[3][7] + coeff0_4*dmats1[4][7] + coeff0_5*dmats1[5][7] + coeff0_6*dmats1[6][7] + coeff0_7*dmats1[7][7] + coeff0_8*dmats1[8][7] + coeff0_9*dmats1[9][7];
+          new_coeff0_8 = coeff0_0*dmats1[0][8] + coeff0_1*dmats1[1][8] + coeff0_2*dmats1[2][8] + coeff0_3*dmats1[3][8] + coeff0_4*dmats1[4][8] + coeff0_5*dmats1[5][8] + coeff0_6*dmats1[6][8] + coeff0_7*dmats1[7][8] + coeff0_8*dmats1[8][8] + coeff0_9*dmats1[9][8];
+          new_coeff0_9 = coeff0_0*dmats1[0][9] + coeff0_1*dmats1[1][9] + coeff0_2*dmats1[2][9] + coeff0_3*dmats1[3][9] + coeff0_4*dmats1[4][9] + coeff0_5*dmats1[5][9] + coeff0_6*dmats1[6][9] + coeff0_7*dmats1[7][9] + coeff0_8*dmats1[8][9] + coeff0_9*dmats1[9][9];
         }
         if(combinations[deriv_num][j] == 2)
         {
-          new_coeff0_0 = coeff0_0*dmats2[0][0] + coeff0_1*dmats2[1][0] + coeff0_2*dmats2[2][0] + coeff0_3*dmats2[3][0];
-          new_coeff0_1 = coeff0_0*dmats2[0][1] + coeff0_1*dmats2[1][1] + coeff0_2*dmats2[2][1] + coeff0_3*dmats2[3][1];
-          new_coeff0_2 = coeff0_0*dmats2[0][2] + coeff0_1*dmats2[1][2] + coeff0_2*dmats2[2][2] + coeff0_3*dmats2[3][2];
-          new_coeff0_3 = coeff0_0*dmats2[0][3] + coeff0_1*dmats2[1][3] + coeff0_2*dmats2[2][3] + coeff0_3*dmats2[3][3];
+          new_coeff0_0 = coeff0_0*dmats2[0][0] + coeff0_1*dmats2[1][0] + coeff0_2*dmats2[2][0] + coeff0_3*dmats2[3][0] + coeff0_4*dmats2[4][0] + coeff0_5*dmats2[5][0] + coeff0_6*dmats2[6][0] + coeff0_7*dmats2[7][0] + coeff0_8*dmats2[8][0] + coeff0_9*dmats2[9][0];
+          new_coeff0_1 = coeff0_0*dmats2[0][1] + coeff0_1*dmats2[1][1] + coeff0_2*dmats2[2][1] + coeff0_3*dmats2[3][1] + coeff0_4*dmats2[4][1] + coeff0_5*dmats2[5][1] + coeff0_6*dmats2[6][1] + coeff0_7*dmats2[7][1] + coeff0_8*dmats2[8][1] + coeff0_9*dmats2[9][1];
+          new_coeff0_2 = coeff0_0*dmats2[0][2] + coeff0_1*dmats2[1][2] + coeff0_2*dmats2[2][2] + coeff0_3*dmats2[3][2] + coeff0_4*dmats2[4][2] + coeff0_5*dmats2[5][2] + coeff0_6*dmats2[6][2] + coeff0_7*dmats2[7][2] + coeff0_8*dmats2[8][2] + coeff0_9*dmats2[9][2];
+          new_coeff0_3 = coeff0_0*dmats2[0][3] + coeff0_1*dmats2[1][3] + coeff0_2*dmats2[2][3] + coeff0_3*dmats2[3][3] + coeff0_4*dmats2[4][3] + coeff0_5*dmats2[5][3] + coeff0_6*dmats2[6][3] + coeff0_7*dmats2[7][3] + coeff0_8*dmats2[8][3] + coeff0_9*dmats2[9][3];
+          new_coeff0_4 = coeff0_0*dmats2[0][4] + coeff0_1*dmats2[1][4] + coeff0_2*dmats2[2][4] + coeff0_3*dmats2[3][4] + coeff0_4*dmats2[4][4] + coeff0_5*dmats2[5][4] + coeff0_6*dmats2[6][4] + coeff0_7*dmats2[7][4] + coeff0_8*dmats2[8][4] + coeff0_9*dmats2[9][4];
+          new_coeff0_5 = coeff0_0*dmats2[0][5] + coeff0_1*dmats2[1][5] + coeff0_2*dmats2[2][5] + coeff0_3*dmats2[3][5] + coeff0_4*dmats2[4][5] + coeff0_5*dmats2[5][5] + coeff0_6*dmats2[6][5] + coeff0_7*dmats2[7][5] + coeff0_8*dmats2[8][5] + coeff0_9*dmats2[9][5];
+          new_coeff0_6 = coeff0_0*dmats2[0][6] + coeff0_1*dmats2[1][6] + coeff0_2*dmats2[2][6] + coeff0_3*dmats2[3][6] + coeff0_4*dmats2[4][6] + coeff0_5*dmats2[5][6] + coeff0_6*dmats2[6][6] + coeff0_7*dmats2[7][6] + coeff0_8*dmats2[8][6] + coeff0_9*dmats2[9][6];
+          new_coeff0_7 = coeff0_0*dmats2[0][7] + coeff0_1*dmats2[1][7] + coeff0_2*dmats2[2][7] + coeff0_3*dmats2[3][7] + coeff0_4*dmats2[4][7] + coeff0_5*dmats2[5][7] + coeff0_6*dmats2[6][7] + coeff0_7*dmats2[7][7] + coeff0_8*dmats2[8][7] + coeff0_9*dmats2[9][7];
+          new_coeff0_8 = coeff0_0*dmats2[0][8] + coeff0_1*dmats2[1][8] + coeff0_2*dmats2[2][8] + coeff0_3*dmats2[3][8] + coeff0_4*dmats2[4][8] + coeff0_5*dmats2[5][8] + coeff0_6*dmats2[6][8] + coeff0_7*dmats2[7][8] + coeff0_8*dmats2[8][8] + coeff0_9*dmats2[9][8];
+          new_coeff0_9 = coeff0_0*dmats2[0][9] + coeff0_1*dmats2[1][9] + coeff0_2*dmats2[2][9] + coeff0_3*dmats2[3][9] + coeff0_4*dmats2[4][9] + coeff0_5*dmats2[5][9] + coeff0_6*dmats2[6][9] + coeff0_7*dmats2[7][9] + coeff0_8*dmats2[8][9] + coeff0_9*dmats2[9][9];
         }
     
       }
       // Compute derivatives on reference element as dot product of coefficients and basisvalues
-      derivatives[deriv_num] = new_coeff0_0*basisvalue0 + new_coeff0_1*basisvalue1 + new_coeff0_2*basisvalue2 + new_coeff0_3*basisvalue3;
+      derivatives[deriv_num] = new_coeff0_0*basisvalue0 + new_coeff0_1*basisvalue1 + new_coeff0_2*basisvalue2 + new_coeff0_3*basisvalue3 + new_coeff0_4*basisvalue4 + new_coeff0_5*basisvalue5 + new_coeff0_6*basisvalue6 + new_coeff0_7*basisvalue7 + new_coeff0_8*basisvalue8 + new_coeff0_9*basisvalue9;
     }
     
     // Transform derivatives back to physical element
@@ -13950,9 +17105,9 @@ double UFC_SolitaryWave3DLinearForm_fini
                                    const ufc::cell& c) const
 {
     // The reference points, direction and weights:
-    const static double X[4][1][3] = {{{0, 0, 0}}, {{1, 0, 0}}, {{0, 1, 0}}, {{0, 0, 1}}};
-    const static double W[4][1] = {{1}, {1}, {1}, {1}};
-    const static double D[4][1][1] = {{{1}}, {{1}}, {{1}}, {{1}}};
+    const static double X[10][1][3] = {{{0, 0, 0}}, {{1, 0, 0}}, {{0, 1, 0}}, {{0, 0, 1}}, {{0, 0.5, 0.5}}, {{0.5, 0, 0.5}}, {{0.5, 0.5, 0}}, {{0, 0, 0.5}}, {{0, 0.5, 0}}, {{0.5, 0, 0}}};
+    const static double W[10][1] = {{1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}};
+    const static double D[10][1][1] = {{{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}};
     
     const double * const * x = c.coordinates;
     double result = 0.0;
@@ -14035,7 +17190,7 @@ UFC_SolitaryWave3DLinearForm_finite_elem
 /// Return a string identifying the finite element
 const char* UFC_SolitaryWave3DLinearForm_finite_element_1_1::signature() const
 {
-    return "FiniteElement('Lagrange', 'tetrahedron', 1)";
+    return "FiniteElement('Lagrange', 'tetrahedron', 2)";
 }
 
 /// Return the cell shape
@@ -14047,7 +17202,7 @@ ufc::shape UFC_SolitaryWave3DLinearForm_
 /// Return the dimension of the finite element function space
 unsigned int UFC_SolitaryWave3DLinearForm_finite_element_1_1::space_dimension() const
 {
-    return 4;
+    return 10;
 }
 
 /// Return the rank of the value space
@@ -14138,45 +17293,75 @@ void UFC_SolitaryWave3DLinearForm_finite
     // Generate scalings
     const double scalings_y_0 = 1;
     const double scalings_y_1 = scalings_y_0*(0.5 - 0.5*y);
+    const double scalings_y_2 = scalings_y_1*(0.5 - 0.5*y);
     const double scalings_z_0 = 1;
     const double scalings_z_1 = scalings_z_0*(0.5 - 0.5*z);
+    const double scalings_z_2 = scalings_z_1*(0.5 - 0.5*z);
     
     // Compute psitilde_a
     const double psitilde_a_0 = 1;
     const double psitilde_a_1 = x;
+    const double psitilde_a_2 = 1.5*x*psitilde_a_1 - 0.5*psitilde_a_0;
     
     // Compute psitilde_bs
     const double psitilde_bs_0_0 = 1;
     const double psitilde_bs_0_1 = 1.5*y + 0.5;
+    const double psitilde_bs_0_2 = 0.111111111111111*psitilde_bs_0_1 + 1.66666666666667*y*psitilde_bs_0_1 - 0.555555555555556*psitilde_bs_0_0;
     const double psitilde_bs_1_0 = 1;
+    const double psitilde_bs_1_1 = 2.5*y + 1.5;
+    const double psitilde_bs_2_0 = 1;
     
     // Compute psitilde_cs
     const double psitilde_cs_00_0 = 1;
     const double psitilde_cs_00_1 = 2*z + 1;
+    const double psitilde_cs_00_2 = 0.3125*psitilde_cs_00_1 + 1.875*z*psitilde_cs_00_1 - 0.5625*psitilde_cs_00_0;
     const double psitilde_cs_01_0 = 1;
+    const double psitilde_cs_01_1 = 3*z + 2;
+    const double psitilde_cs_02_0 = 1;
     const double psitilde_cs_10_0 = 1;
+    const double psitilde_cs_10_1 = 3*z + 2;
+    const double psitilde_cs_11_0 = 1;
+    const double psitilde_cs_20_0 = 1;
     
     // Compute basisvalues
     const double basisvalue0 = 0.866025403784439*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_0;
     const double basisvalue1 = 2.73861278752583*psitilde_a_1*scalings_y_1*psitilde_bs_1_0*scalings_z_1*psitilde_cs_10_0;
     const double basisvalue2 = 1.58113883008419*psitilde_a_0*scalings_y_0*psitilde_bs_0_1*scalings_z_1*psitilde_cs_01_0;
     const double basisvalue3 = 1.11803398874989*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_1;
-    
-    // Table(s) of coefficients
-    const static double coefficients0[4][4] = \
-    {{0.288675134594813, -0.182574185835055, -0.105409255338946, -0.074535599249993},
-    {0.288675134594813, 0.182574185835055, -0.105409255338946, -0.074535599249993},
-    {0.288675134594813, 0, 0.210818510677892, -0.074535599249993},
-    {0.288675134594813, 0, 0, 0.223606797749979}};
+    const double basisvalue4 = 5.1234753829798*psitilde_a_2*scalings_y_2*psitilde_bs_2_0*scalings_z_2*psitilde_cs_20_0;
+    const double basisvalue5 = 3.96862696659689*psitilde_a_1*scalings_y_1*psitilde_bs_1_1*scalings_z_2*psitilde_cs_11_0;
+    const double basisvalue6 = 2.29128784747792*psitilde_a_0*scalings_y_0*psitilde_bs_0_2*scalings_z_2*psitilde_cs_02_0;
+    const double basisvalue7 = 3.24037034920393*psitilde_a_1*scalings_y_1*psitilde_bs_1_0*scalings_z_1*psitilde_cs_10_1;
+    const double basisvalue8 = 1.87082869338697*psitilde_a_0*scalings_y_0*psitilde_bs_0_1*scalings_z_1*psitilde_cs_01_1;
+    const double basisvalue9 = 1.3228756555323*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_2;
+    
+    // Table(s) of coefficients
+    const static double coefficients0[10][10] = \
+    {{-0.0577350269189626, -0.0608580619450185, -0.0351364184463153, -0.0248451997499977, 0.0650600048632355, 0.0503952630678969, 0.0290957186981323, 0.0411475599898912, 0.0237565548366599, 0.0167984210226323},
+    {-0.0577350269189625, 0.0608580619450185, -0.0351364184463153, -0.0248451997499977, 0.0650600048632355, -0.050395263067897, 0.0290957186981323, -0.0411475599898912, 0.0237565548366599, 0.0167984210226323},
+    {-0.0577350269189625, 0, 0.0702728368926306, -0.0248451997499977, 0, 0, 0.0872871560943969, 0, -0.0475131096733199, 0.0167984210226323},
+    {-0.0577350269189626, 0, 0, 0.074535599249993, 0, 0, 0, 0, 0, 0.100790526135794},
+    {0.23094010767585, 0, 0.140545673785261, 0.0993807989999906, 0, 0, 0, 0, 0.1187827741833, -0.0671936840905293},
+    {0.230940107675851, 0.121716123890037, -0.0702728368926306, 0.0993807989999907, 0, 0, 0, 0.102868899974728, -0.0593913870916499, -0.0671936840905293},
+    {0.23094010767585, 0.121716123890037, 0.0702728368926307, -0.0993807989999907, 0, 0.100790526135794, -0.087287156094397, -0.0205737799949456, -0.01187827741833, 0.0167984210226323},
+    {0.23094010767585, -0.121716123890037, -0.0702728368926307, 0.0993807989999906, 0, 0, 0, -0.102868899974728, -0.0593913870916499, -0.0671936840905293},
+    {0.23094010767585, -0.121716123890037, 0.0702728368926306, -0.0993807989999906, 0, -0.100790526135794, -0.0872871560943969, 0.0205737799949456, -0.01187827741833, 0.0167984210226323},
+    {0.23094010767585, 0, -0.140545673785261, -0.0993807989999906, -0.130120009726471, 0, 0.0290957186981323, 0, 0.02375655483666, 0.0167984210226323}};
     
     // Extract relevant coefficients
     const double coeff0_0 = coefficients0[dof][0];
     const double coeff0_1 = coefficients0[dof][1];
     const double coeff0_2 = coefficients0[dof][2];
     const double coeff0_3 = coefficients0[dof][3];
+    const double coeff0_4 = coefficients0[dof][4];
+    const double coeff0_5 = coefficients0[dof][5];
+    const double coeff0_6 = coefficients0[dof][6];
+    const double coeff0_7 = coefficients0[dof][7];
+    const double coeff0_8 = coefficients0[dof][8];
+    const double coeff0_9 = coefficients0[dof][9];
     
     // Compute value(s)
-    *values = coeff0_0*basisvalue0 + coeff0_1*basisvalue1 + coeff0_2*basisvalue2 + coeff0_3*basisvalue3;
+    *values = coeff0_0*basisvalue0 + coeff0_1*basisvalue1 + coeff0_2*basisvalue2 + coeff0_3*basisvalue3 + coeff0_4*basisvalue4 + coeff0_5*basisvalue5 + coeff0_6*basisvalue6 + coeff0_7*basisvalue7 + coeff0_8*basisvalue8 + coeff0_9*basisvalue9;
 }
 
 /// Evaluate all basis functions at given point in cell
@@ -14324,56 +17509,98 @@ void UFC_SolitaryWave3DLinearForm_finite
     // Generate scalings
     const double scalings_y_0 = 1;
     const double scalings_y_1 = scalings_y_0*(0.5 - 0.5*y);
+    const double scalings_y_2 = scalings_y_1*(0.5 - 0.5*y);
     const double scalings_z_0 = 1;
     const double scalings_z_1 = scalings_z_0*(0.5 - 0.5*z);
+    const double scalings_z_2 = scalings_z_1*(0.5 - 0.5*z);
     
     // Compute psitilde_a
     const double psitilde_a_0 = 1;
     const double psitilde_a_1 = x;
+    const double psitilde_a_2 = 1.5*x*psitilde_a_1 - 0.5*psitilde_a_0;
     
     // Compute psitilde_bs
     const double psitilde_bs_0_0 = 1;
     const double psitilde_bs_0_1 = 1.5*y + 0.5;
+    const double psitilde_bs_0_2 = 0.111111111111111*psitilde_bs_0_1 + 1.66666666666667*y*psitilde_bs_0_1 - 0.555555555555556*psitilde_bs_0_0;
     const double psitilde_bs_1_0 = 1;
+    const double psitilde_bs_1_1 = 2.5*y + 1.5;
+    const double psitilde_bs_2_0 = 1;
     
     // Compute psitilde_cs
     const double psitilde_cs_00_0 = 1;
     const double psitilde_cs_00_1 = 2*z + 1;
+    const double psitilde_cs_00_2 = 0.3125*psitilde_cs_00_1 + 1.875*z*psitilde_cs_00_1 - 0.5625*psitilde_cs_00_0;
     const double psitilde_cs_01_0 = 1;
+    const double psitilde_cs_01_1 = 3*z + 2;
+    const double psitilde_cs_02_0 = 1;
     const double psitilde_cs_10_0 = 1;
+    const double psitilde_cs_10_1 = 3*z + 2;
+    const double psitilde_cs_11_0 = 1;
+    const double psitilde_cs_20_0 = 1;
     
     // Compute basisvalues
     const double basisvalue0 = 0.866025403784439*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_0;
     const double basisvalue1 = 2.73861278752583*psitilde_a_1*scalings_y_1*psitilde_bs_1_0*scalings_z_1*psitilde_cs_10_0;
     const double basisvalue2 = 1.58113883008419*psitilde_a_0*scalings_y_0*psitilde_bs_0_1*scalings_z_1*psitilde_cs_01_0;
     const double basisvalue3 = 1.11803398874989*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_1;
-    
-    // Table(s) of coefficients
-    const static double coefficients0[4][4] = \
-    {{0.288675134594813, -0.182574185835055, -0.105409255338946, -0.074535599249993},
-    {0.288675134594813, 0.182574185835055, -0.105409255338946, -0.074535599249993},
-    {0.288675134594813, 0, 0.210818510677892, -0.074535599249993},
-    {0.288675134594813, 0, 0, 0.223606797749979}};
+    const double basisvalue4 = 5.1234753829798*psitilde_a_2*scalings_y_2*psitilde_bs_2_0*scalings_z_2*psitilde_cs_20_0;
+    const double basisvalue5 = 3.96862696659689*psitilde_a_1*scalings_y_1*psitilde_bs_1_1*scalings_z_2*psitilde_cs_11_0;
+    const double basisvalue6 = 2.29128784747792*psitilde_a_0*scalings_y_0*psitilde_bs_0_2*scalings_z_2*psitilde_cs_02_0;
+    const double basisvalue7 = 3.24037034920393*psitilde_a_1*scalings_y_1*psitilde_bs_1_0*scalings_z_1*psitilde_cs_10_1;
+    const double basisvalue8 = 1.87082869338697*psitilde_a_0*scalings_y_0*psitilde_bs_0_1*scalings_z_1*psitilde_cs_01_1;
+    const double basisvalue9 = 1.3228756555323*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_2;
+    
+    // Table(s) of coefficients
+    const static double coefficients0[10][10] = \
+    {{-0.0577350269189626, -0.0608580619450185, -0.0351364184463153, -0.0248451997499977, 0.0650600048632355, 0.0503952630678969, 0.0290957186981323, 0.0411475599898912, 0.0237565548366599, 0.0167984210226323},
+    {-0.0577350269189625, 0.0608580619450185, -0.0351364184463153, -0.0248451997499977, 0.0650600048632355, -0.050395263067897, 0.0290957186981323, -0.0411475599898912, 0.0237565548366599, 0.0167984210226323},
+    {-0.0577350269189625, 0, 0.0702728368926306, -0.0248451997499977, 0, 0, 0.0872871560943969, 0, -0.0475131096733199, 0.0167984210226323},
+    {-0.0577350269189626, 0, 0, 0.074535599249993, 0, 0, 0, 0, 0, 0.100790526135794},
+    {0.23094010767585, 0, 0.140545673785261, 0.0993807989999906, 0, 0, 0, 0, 0.1187827741833, -0.0671936840905293},
+    {0.230940107675851, 0.121716123890037, -0.0702728368926306, 0.0993807989999907, 0, 0, 0, 0.102868899974728, -0.0593913870916499, -0.0671936840905293},
+    {0.23094010767585, 0.121716123890037, 0.0702728368926307, -0.0993807989999907, 0, 0.100790526135794, -0.087287156094397, -0.0205737799949456, -0.01187827741833, 0.0167984210226323},
+    {0.23094010767585, -0.121716123890037, -0.0702728368926307, 0.0993807989999906, 0, 0, 0, -0.102868899974728, -0.0593913870916499, -0.0671936840905293},
+    {0.23094010767585, -0.121716123890037, 0.0702728368926306, -0.0993807989999906, 0, -0.100790526135794, -0.0872871560943969, 0.0205737799949456, -0.01187827741833, 0.0167984210226323},
+    {0.23094010767585, 0, -0.140545673785261, -0.0993807989999906, -0.130120009726471, 0, 0.0290957186981323, 0, 0.02375655483666, 0.0167984210226323}};
     
     // Interesting (new) part
     // Tables of derivatives of the polynomial base (transpose)
-    const static double dmats0[4][4] = \
-    {{0, 0, 0, 0},
-    {6.32455532033676, 0, 0, 0},
-    {0, 0, 0, 0},
-    {0, 0, 0, 0}};
-    
-    const static double dmats1[4][4] = \
-    {{0, 0, 0, 0},
-    {3.16227766016838, 0, 0, 0},
-    {5.47722557505166, 0, 0, 0},
-    {0, 0, 0, 0}};
-    
-    const static double dmats2[4][4] = \
-    {{0, 0, 0, 0},
-    {3.16227766016838, 0, 0, 0},
-    {1.82574185835055, 0, 0, 0},
-    {5.16397779494322, 0, 0, 0}};
+    const static double dmats0[10][10] = \
+    {{0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {6.32455532033676, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {0, 11.2249721603218, 0, 0, 0, 0, 0, 0, 0, 0},
+    {4.58257569495584, 0, 8.36660026534076, -1.18321595661992, 0, 0, 0, 0, 0, 0},
+    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {3.74165738677394, 0, 0, 8.69482604771366, 0, 0, 0, 0, 0, 0},
+    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
+    
+    const static double dmats1[10][10] = \
+    {{0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {3.16227766016838, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {5.47722557505166, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {2.95803989154981, 5.61248608016091, -1.08012344973464, -0.763762615825974, 0, 0, 0, 0, 0, 0},
+    {2.29128784747792, 7.24568837309472, 4.18330013267038, -0.591607978309962, 0, 0, 0, 0, 0, 0},
+    {-2.64575131106459, 0, 9.66091783079296, 0.683130051063974, 0, 0, 0, 0, 0, 0},
+    {1.87082869338697, 0, 0, 4.34741302385683, 0, 0, 0, 0, 0, 0},
+    {3.24037034920393, 0, 0, 7.52994023880668, 0, 0, 0, 0, 0, 0},
+    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
+    
+    const static double dmats2[10][10] = \
+    {{0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {3.16227766016838, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {1.82574185835055, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {5.16397779494322, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+    {2.95803989154981, 5.61248608016091, -1.08012344973464, -0.763762615825974, 0, 0, 0, 0, 0, 0},
+    {2.29128784747792, 1.44913767461894, 4.18330013267038, -0.591607978309962, 0, 0, 0, 0, 0, 0},
+    {1.32287565553229, 0, 3.86436713231718, -0.341565025531986, 0, 0, 0, 0, 0, 0},
+    {1.87082869338697, 7.09929573971954, 0, 4.34741302385683, 0, 0, 0, 0, 0, 0},
+    {1.08012344973464, 0, 7.09929573971954, 2.50998007960223, 0, 0, 0, 0, 0, 0},
+    {-3.81881307912987, 0, 0, 8.87411967464942, 0, 0, 0, 0, 0, 0}};
     
     // Compute reference derivatives
     // Declare pointer to array of derivatives on FIAT element
@@ -14384,12 +17611,24 @@ void UFC_SolitaryWave3DLinearForm_finite
     double coeff0_1 = 0;
     double coeff0_2 = 0;
     double coeff0_3 = 0;
+    double coeff0_4 = 0;
+    double coeff0_5 = 0;
+    double coeff0_6 = 0;
+    double coeff0_7 = 0;
+    double coeff0_8 = 0;
+    double coeff0_9 = 0;
     
     // Declare new coefficients
     double new_coeff0_0 = 0;
     double new_coeff0_1 = 0;
     double new_coeff0_2 = 0;
     double new_coeff0_3 = 0;
+    double new_coeff0_4 = 0;
+    double new_coeff0_5 = 0;
+    double new_coeff0_6 = 0;
+    double new_coeff0_7 = 0;
+    double new_coeff0_8 = 0;
+    double new_coeff0_9 = 0;
     
     // Loop possible derivatives
     for (unsigned int deriv_num = 0; deriv_num < num_derivatives; deriv_num++)
@@ -14399,6 +17638,12 @@ void UFC_SolitaryWave3DLinearForm_finite
       new_coeff0_1 = coefficients0[dof][1];
       new_coeff0_2 = coefficients0[dof][2];
       new_coeff0_3 = coefficients0[dof][3];
+      new_coeff0_4 = coefficients0[dof][4];
+      new_coeff0_5 = coefficients0[dof][5];
+      new_coeff0_6 = coefficients0[dof][6];
+      new_coeff0_7 = coefficients0[dof][7];
+      new_coeff0_8 = coefficients0[dof][8];
+      new_coeff0_9 = coefficients0[dof][9];
     
       // Loop derivative order
       for (unsigned int j = 0; j < n; j++)
@@ -14408,32 +17653,56 @@ void UFC_SolitaryWave3DLinearForm_finite
         coeff0_1 = new_coeff0_1;
         coeff0_2 = new_coeff0_2;
         coeff0_3 = new_coeff0_3;
+        coeff0_4 = new_coeff0_4;
+        coeff0_5 = new_coeff0_5;
+        coeff0_6 = new_coeff0_6;
+        coeff0_7 = new_coeff0_7;
+        coeff0_8 = new_coeff0_8;
+        coeff0_9 = new_coeff0_9;
     
         if(combinations[deriv_num][j] == 0)
         {
-          new_coeff0_0 = coeff0_0*dmats0[0][0] + coeff0_1*dmats0[1][0] + coeff0_2*dmats0[2][0] + coeff0_3*dmats0[3][0];
-          new_coeff0_1 = coeff0_0*dmats0[0][1] + coeff0_1*dmats0[1][1] + coeff0_2*dmats0[2][1] + coeff0_3*dmats0[3][1];
-          new_coeff0_2 = coeff0_0*dmats0[0][2] + coeff0_1*dmats0[1][2] + coeff0_2*dmats0[2][2] + coeff0_3*dmats0[3][2];
-          new_coeff0_3 = coeff0_0*dmats0[0][3] + coeff0_1*dmats0[1][3] + coeff0_2*dmats0[2][3] + coeff0_3*dmats0[3][3];
+          new_coeff0_0 = coeff0_0*dmats0[0][0] + coeff0_1*dmats0[1][0] + coeff0_2*dmats0[2][0] + coeff0_3*dmats0[3][0] + coeff0_4*dmats0[4][0] + coeff0_5*dmats0[5][0] + coeff0_6*dmats0[6][0] + coeff0_7*dmats0[7][0] + coeff0_8*dmats0[8][0] + coeff0_9*dmats0[9][0];
+          new_coeff0_1 = coeff0_0*dmats0[0][1] + coeff0_1*dmats0[1][1] + coeff0_2*dmats0[2][1] + coeff0_3*dmats0[3][1] + coeff0_4*dmats0[4][1] + coeff0_5*dmats0[5][1] + coeff0_6*dmats0[6][1] + coeff0_7*dmats0[7][1] + coeff0_8*dmats0[8][1] + coeff0_9*dmats0[9][1];
+          new_coeff0_2 = coeff0_0*dmats0[0][2] + coeff0_1*dmats0[1][2] + coeff0_2*dmats0[2][2] + coeff0_3*dmats0[3][2] + coeff0_4*dmats0[4][2] + coeff0_5*dmats0[5][2] + coeff0_6*dmats0[6][2] + coeff0_7*dmats0[7][2] + coeff0_8*dmats0[8][2] + coeff0_9*dmats0[9][2];
+          new_coeff0_3 = coeff0_0*dmats0[0][3] + coeff0_1*dmats0[1][3] + coeff0_2*dmats0[2][3] + coeff0_3*dmats0[3][3] + coeff0_4*dmats0[4][3] + coeff0_5*dmats0[5][3] + coeff0_6*dmats0[6][3] + coeff0_7*dmats0[7][3] + coeff0_8*dmats0[8][3] + coeff0_9*dmats0[9][3];
+          new_coeff0_4 = coeff0_0*dmats0[0][4] + coeff0_1*dmats0[1][4] + coeff0_2*dmats0[2][4] + coeff0_3*dmats0[3][4] + coeff0_4*dmats0[4][4] + coeff0_5*dmats0[5][4] + coeff0_6*dmats0[6][4] + coeff0_7*dmats0[7][4] + coeff0_8*dmats0[8][4] + coeff0_9*dmats0[9][4];
+          new_coeff0_5 = coeff0_0*dmats0[0][5] + coeff0_1*dmats0[1][5] + coeff0_2*dmats0[2][5] + coeff0_3*dmats0[3][5] + coeff0_4*dmats0[4][5] + coeff0_5*dmats0[5][5] + coeff0_6*dmats0[6][5] + coeff0_7*dmats0[7][5] + coeff0_8*dmats0[8][5] + coeff0_9*dmats0[9][5];
+          new_coeff0_6 = coeff0_0*dmats0[0][6] + coeff0_1*dmats0[1][6] + coeff0_2*dmats0[2][6] + coeff0_3*dmats0[3][6] + coeff0_4*dmats0[4][6] + coeff0_5*dmats0[5][6] + coeff0_6*dmats0[6][6] + coeff0_7*dmats0[7][6] + coeff0_8*dmats0[8][6] + coeff0_9*dmats0[9][6];
+          new_coeff0_7 = coeff0_0*dmats0[0][7] + coeff0_1*dmats0[1][7] + coeff0_2*dmats0[2][7] + coeff0_3*dmats0[3][7] + coeff0_4*dmats0[4][7] + coeff0_5*dmats0[5][7] + coeff0_6*dmats0[6][7] + coeff0_7*dmats0[7][7] + coeff0_8*dmats0[8][7] + coeff0_9*dmats0[9][7];
+          new_coeff0_8 = coeff0_0*dmats0[0][8] + coeff0_1*dmats0[1][8] + coeff0_2*dmats0[2][8] + coeff0_3*dmats0[3][8] + coeff0_4*dmats0[4][8] + coeff0_5*dmats0[5][8] + coeff0_6*dmats0[6][8] + coeff0_7*dmats0[7][8] + coeff0_8*dmats0[8][8] + coeff0_9*dmats0[9][8];
+          new_coeff0_9 = coeff0_0*dmats0[0][9] + coeff0_1*dmats0[1][9] + coeff0_2*dmats0[2][9] + coeff0_3*dmats0[3][9] + coeff0_4*dmats0[4][9] + coeff0_5*dmats0[5][9] + coeff0_6*dmats0[6][9] + coeff0_7*dmats0[7][9] + coeff0_8*dmats0[8][9] + coeff0_9*dmats0[9][9];
         }
         if(combinations[deriv_num][j] == 1)
         {
-          new_coeff0_0 = coeff0_0*dmats1[0][0] + coeff0_1*dmats1[1][0] + coeff0_2*dmats1[2][0] + coeff0_3*dmats1[3][0];
-          new_coeff0_1 = coeff0_0*dmats1[0][1] + coeff0_1*dmats1[1][1] + coeff0_2*dmats1[2][1] + coeff0_3*dmats1[3][1];
-          new_coeff0_2 = coeff0_0*dmats1[0][2] + coeff0_1*dmats1[1][2] + coeff0_2*dmats1[2][2] + coeff0_3*dmats1[3][2];
-          new_coeff0_3 = coeff0_0*dmats1[0][3] + coeff0_1*dmats1[1][3] + coeff0_2*dmats1[2][3] + coeff0_3*dmats1[3][3];
+          new_coeff0_0 = coeff0_0*dmats1[0][0] + coeff0_1*dmats1[1][0] + coeff0_2*dmats1[2][0] + coeff0_3*dmats1[3][0] + coeff0_4*dmats1[4][0] + coeff0_5*dmats1[5][0] + coeff0_6*dmats1[6][0] + coeff0_7*dmats1[7][0] + coeff0_8*dmats1[8][0] + coeff0_9*dmats1[9][0];
+          new_coeff0_1 = coeff0_0*dmats1[0][1] + coeff0_1*dmats1[1][1] + coeff0_2*dmats1[2][1] + coeff0_3*dmats1[3][1] + coeff0_4*dmats1[4][1] + coeff0_5*dmats1[5][1] + coeff0_6*dmats1[6][1] + coeff0_7*dmats1[7][1] + coeff0_8*dmats1[8][1] + coeff0_9*dmats1[9][1];
+          new_coeff0_2 = coeff0_0*dmats1[0][2] + coeff0_1*dmats1[1][2] + coeff0_2*dmats1[2][2] + coeff0_3*dmats1[3][2] + coeff0_4*dmats1[4][2] + coeff0_5*dmats1[5][2] + coeff0_6*dmats1[6][2] + coeff0_7*dmats1[7][2] + coeff0_8*dmats1[8][2] + coeff0_9*dmats1[9][2];
+          new_coeff0_3 = coeff0_0*dmats1[0][3] + coeff0_1*dmats1[1][3] + coeff0_2*dmats1[2][3] + coeff0_3*dmats1[3][3] + coeff0_4*dmats1[4][3] + coeff0_5*dmats1[5][3] + coeff0_6*dmats1[6][3] + coeff0_7*dmats1[7][3] + coeff0_8*dmats1[8][3] + coeff0_9*dmats1[9][3];
+          new_coeff0_4 = coeff0_0*dmats1[0][4] + coeff0_1*dmats1[1][4] + coeff0_2*dmats1[2][4] + coeff0_3*dmats1[3][4] + coeff0_4*dmats1[4][4] + coeff0_5*dmats1[5][4] + coeff0_6*dmats1[6][4] + coeff0_7*dmats1[7][4] + coeff0_8*dmats1[8][4] + coeff0_9*dmats1[9][4];
+          new_coeff0_5 = coeff0_0*dmats1[0][5] + coeff0_1*dmats1[1][5] + coeff0_2*dmats1[2][5] + coeff0_3*dmats1[3][5] + coeff0_4*dmats1[4][5] + coeff0_5*dmats1[5][5] + coeff0_6*dmats1[6][5] + coeff0_7*dmats1[7][5] + coeff0_8*dmats1[8][5] + coeff0_9*dmats1[9][5];
+          new_coeff0_6 = coeff0_0*dmats1[0][6] + coeff0_1*dmats1[1][6] + coeff0_2*dmats1[2][6] + coeff0_3*dmats1[3][6] + coeff0_4*dmats1[4][6] + coeff0_5*dmats1[5][6] + coeff0_6*dmats1[6][6] + coeff0_7*dmats1[7][6] + coeff0_8*dmats1[8][6] + coeff0_9*dmats1[9][6];
+          new_coeff0_7 = coeff0_0*dmats1[0][7] + coeff0_1*dmats1[1][7] + coeff0_2*dmats1[2][7] + coeff0_3*dmats1[3][7] + coeff0_4*dmats1[4][7] + coeff0_5*dmats1[5][7] + coeff0_6*dmats1[6][7] + coeff0_7*dmats1[7][7] + coeff0_8*dmats1[8][7] + coeff0_9*dmats1[9][7];
+          new_coeff0_8 = coeff0_0*dmats1[0][8] + coeff0_1*dmats1[1][8] + coeff0_2*dmats1[2][8] + coeff0_3*dmats1[3][8] + coeff0_4*dmats1[4][8] + coeff0_5*dmats1[5][8] + coeff0_6*dmats1[6][8] + coeff0_7*dmats1[7][8] + coeff0_8*dmats1[8][8] + coeff0_9*dmats1[9][8];
+          new_coeff0_9 = coeff0_0*dmats1[0][9] + coeff0_1*dmats1[1][9] + coeff0_2*dmats1[2][9] + coeff0_3*dmats1[3][9] + coeff0_4*dmats1[4][9] + coeff0_5*dmats1[5][9] + coeff0_6*dmats1[6][9] + coeff0_7*dmats1[7][9] + coeff0_8*dmats1[8][9] + coeff0_9*dmats1[9][9];
         }
         if(combinations[deriv_num][j] == 2)
         {
-          new_coeff0_0 = coeff0_0*dmats2[0][0] + coeff0_1*dmats2[1][0] + coeff0_2*dmats2[2][0] + coeff0_3*dmats2[3][0];
-          new_coeff0_1 = coeff0_0*dmats2[0][1] + coeff0_1*dmats2[1][1] + coeff0_2*dmats2[2][1] + coeff0_3*dmats2[3][1];
-          new_coeff0_2 = coeff0_0*dmats2[0][2] + coeff0_1*dmats2[1][2] + coeff0_2*dmats2[2][2] + coeff0_3*dmats2[3][2];
-          new_coeff0_3 = coeff0_0*dmats2[0][3] + coeff0_1*dmats2[1][3] + coeff0_2*dmats2[2][3] + coeff0_3*dmats2[3][3];
+          new_coeff0_0 = coeff0_0*dmats2[0][0] + coeff0_1*dmats2[1][0] + coeff0_2*dmats2[2][0] + coeff0_3*dmats2[3][0] + coeff0_4*dmats2[4][0] + coeff0_5*dmats2[5][0] + coeff0_6*dmats2[6][0] + coeff0_7*dmats2[7][0] + coeff0_8*dmats2[8][0] + coeff0_9*dmats2[9][0];
+          new_coeff0_1 = coeff0_0*dmats2[0][1] + coeff0_1*dmats2[1][1] + coeff0_2*dmats2[2][1] + coeff0_3*dmats2[3][1] + coeff0_4*dmats2[4][1] + coeff0_5*dmats2[5][1] + coeff0_6*dmats2[6][1] + coeff0_7*dmats2[7][1] + coeff0_8*dmats2[8][1] + coeff0_9*dmats2[9][1];
+          new_coeff0_2 = coeff0_0*dmats2[0][2] + coeff0_1*dmats2[1][2] + coeff0_2*dmats2[2][2] + coeff0_3*dmats2[3][2] + coeff0_4*dmats2[4][2] + coeff0_5*dmats2[5][2] + coeff0_6*dmats2[6][2] + coeff0_7*dmats2[7][2] + coeff0_8*dmats2[8][2] + coeff0_9*dmats2[9][2];
+          new_coeff0_3 = coeff0_0*dmats2[0][3] + coeff0_1*dmats2[1][3] + coeff0_2*dmats2[2][3] + coeff0_3*dmats2[3][3] + coeff0_4*dmats2[4][3] + coeff0_5*dmats2[5][3] + coeff0_6*dmats2[6][3] + coeff0_7*dmats2[7][3] + coeff0_8*dmats2[8][3] + coeff0_9*dmats2[9][3];
+          new_coeff0_4 = coeff0_0*dmats2[0][4] + coeff0_1*dmats2[1][4] + coeff0_2*dmats2[2][4] + coeff0_3*dmats2[3][4] + coeff0_4*dmats2[4][4] + coeff0_5*dmats2[5][4] + coeff0_6*dmats2[6][4] + coeff0_7*dmats2[7][4] + coeff0_8*dmats2[8][4] + coeff0_9*dmats2[9][4];
+          new_coeff0_5 = coeff0_0*dmats2[0][5] + coeff0_1*dmats2[1][5] + coeff0_2*dmats2[2][5] + coeff0_3*dmats2[3][5] + coeff0_4*dmats2[4][5] + coeff0_5*dmats2[5][5] + coeff0_6*dmats2[6][5] + coeff0_7*dmats2[7][5] + coeff0_8*dmats2[8][5] + coeff0_9*dmats2[9][5];
+          new_coeff0_6 = coeff0_0*dmats2[0][6] + coeff0_1*dmats2[1][6] + coeff0_2*dmats2[2][6] + coeff0_3*dmats2[3][6] + coeff0_4*dmats2[4][6] + coeff0_5*dmats2[5][6] + coeff0_6*dmats2[6][6] + coeff0_7*dmats2[7][6] + coeff0_8*dmats2[8][6] + coeff0_9*dmats2[9][6];
+          new_coeff0_7 = coeff0_0*dmats2[0][7] + coeff0_1*dmats2[1][7] + coeff0_2*dmats2[2][7] + coeff0_3*dmats2[3][7] + coeff0_4*dmats2[4][7] + coeff0_5*dmats2[5][7] + coeff0_6*dmats2[6][7] + coeff0_7*dmats2[7][7] + coeff0_8*dmats2[8][7] + coeff0_9*dmats2[9][7];
+          new_coeff0_8 = coeff0_0*dmats2[0][8] + coeff0_1*dmats2[1][8] + coeff0_2*dmats2[2][8] + coeff0_3*dmats2[3][8] + coeff0_4*dmats2[4][8] + coeff0_5*dmats2[5][8] + coeff0_6*dmats2[6][8] + coeff0_7*dmats2[7][8] + coeff0_8*dmats2[8][8] + coeff0_9*dmats2[9][8];
+          new_coeff0_9 = coeff0_0*dmats2[0][9] + coeff0_1*dmats2[1][9] + coeff0_2*dmats2[2][9] + coeff0_3*dmats2[3][9] + coeff0_4*dmats2[4][9] + coeff0_5*dmats2[5][9] + coeff0_6*dmats2[6][9] + coeff0_7*dmats2[7][9] + coeff0_8*dmats2[8][9] + coeff0_9*dmats2[9][9];
         }
     
       }
       // Compute derivatives on reference element as dot product of coefficients and basisvalues
-      derivatives[deriv_num] = new_coeff0_0*basisvalue0 + new_coeff0_1*basisvalue1 + new_coeff0_2*basisvalue2 + new_coeff0_3*basisvalue3;
+      derivatives[deriv_num] = new_coeff0_0*basisvalue0 + new_coeff0_1*basisvalue1 + new_coeff0_2*basisvalue2 + new_coeff0_3*basisvalue3 + new_coeff0_4*basisvalue4 + new_coeff0_5*basisvalue5 + new_coeff0_6*basisvalue6 + new_coeff0_7*basisvalue7 + new_coeff0_8*basisvalue8 + new_coeff0_9*basisvalue9;
     }
     
     // Transform derivatives back to physical element
@@ -14473,9 +17742,9 @@ double UFC_SolitaryWave3DLinearForm_fini
                                    const ufc::cell& c) const
 {
     // The reference points, direction and weights:
-    const static double X[4][1][3] = {{{0, 0, 0}}, {{1, 0, 0}}, {{0, 1, 0}}, {{0, 0, 1}}};
-    const static double W[4][1] = {{1}, {1}, {1}, {1}};
-    const static double D[4][1][1] = {{{1}}, {{1}}, {{1}}, {{1}}};
+    const static double X[10][1][3] = {{{0, 0, 0}}, {{1, 0, 0}}, {{0, 1, 0}}, {{0, 0, 1}}, {{0, 0.5, 0.5}}, {{0.5, 0, 0.5}}, {{0.5, 0.5, 0}}, {{0, 0, 0.5}}, {{0, 0.5, 0}}, {{0.5, 0, 0}}};
+    const static double W[10][1] = {{1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}};
+    const static double D[10][1][1] = {{{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}};
     
     const double * const * x = c.coordinates;
     double result = 0.0;
@@ -14558,7 +17827,7 @@ UFC_SolitaryWave3DLinearForm_finite_elem
 /// Return a string identifying the finite element
 const char* UFC_SolitaryWave3DLinearForm_finite_element_1::signature() const
 {
-    return "MixedElement([FiniteElement('Lagrange', 'tetrahedron', 1), FiniteElement('Lagrange', 'tetrahedron', 1)])";
+    return "MixedElement([FiniteElement('Lagrange', 'tetrahedron', 2), FiniteElement('Lagrange', 'tetrahedron', 2)])";
 }
 
 /// Return the cell shape
@@ -14570,7 +17839,7 @@ ufc::shape UFC_SolitaryWave3DLinearForm_
 /// Return the dimension of the finite element function space
 unsigned int UFC_SolitaryWave3DLinearForm_finite_element_1::space_dimension() const
 {
-    return 8;
+    return 20;
 }
 
 /// Return the rank of the value space
@@ -14656,7 +17925,7 @@ void UFC_SolitaryWave3DLinearForm_finite
     values[0] = 0;
     values[1] = 0;
     
-    if (0 <= i && i <= 3)
+    if (0 <= i && i <= 9)
     {
       // Map degree of freedom to element degree of freedom
       const unsigned int dof = i;
@@ -14664,94 +17933,154 @@ void UFC_SolitaryWave3DLinearForm_finite
       // Generate scalings
       const double scalings_y_0 = 1;
       const double scalings_y_1 = scalings_y_0*(0.5 - 0.5*y);
+      const double scalings_y_2 = scalings_y_1*(0.5 - 0.5*y);
       const double scalings_z_0 = 1;
       const double scalings_z_1 = scalings_z_0*(0.5 - 0.5*z);
+      const double scalings_z_2 = scalings_z_1*(0.5 - 0.5*z);
     
       // Compute psitilde_a
       const double psitilde_a_0 = 1;
       const double psitilde_a_1 = x;
+      const double psitilde_a_2 = 1.5*x*psitilde_a_1 - 0.5*psitilde_a_0;
     
       // Compute psitilde_bs
       const double psitilde_bs_0_0 = 1;
       const double psitilde_bs_0_1 = 1.5*y + 0.5;
+      const double psitilde_bs_0_2 = 0.111111111111111*psitilde_bs_0_1 + 1.66666666666667*y*psitilde_bs_0_1 - 0.555555555555556*psitilde_bs_0_0;
       const double psitilde_bs_1_0 = 1;
+      const double psitilde_bs_1_1 = 2.5*y + 1.5;
+      const double psitilde_bs_2_0 = 1;
     
       // Compute psitilde_cs
       const double psitilde_cs_00_0 = 1;
       const double psitilde_cs_00_1 = 2*z + 1;
+      const double psitilde_cs_00_2 = 0.3125*psitilde_cs_00_1 + 1.875*z*psitilde_cs_00_1 - 0.5625*psitilde_cs_00_0;
       const double psitilde_cs_01_0 = 1;
+      const double psitilde_cs_01_1 = 3*z + 2;
+      const double psitilde_cs_02_0 = 1;
       const double psitilde_cs_10_0 = 1;
+      const double psitilde_cs_10_1 = 3*z + 2;
+      const double psitilde_cs_11_0 = 1;
+      const double psitilde_cs_20_0 = 1;
     
       // Compute basisvalues
       const double basisvalue0 = 0.866025403784439*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_0;
       const double basisvalue1 = 2.73861278752583*psitilde_a_1*scalings_y_1*psitilde_bs_1_0*scalings_z_1*psitilde_cs_10_0;
       const double basisvalue2 = 1.58113883008419*psitilde_a_0*scalings_y_0*psitilde_bs_0_1*scalings_z_1*psitilde_cs_01_0;
       const double basisvalue3 = 1.11803398874989*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_1;
-    
-      // Table(s) of coefficients
-      const static double coefficients0[4][4] =   \
-      {{0.288675134594813, -0.182574185835055, -0.105409255338946, -0.074535599249993},
-      {0.288675134594813, 0.182574185835055, -0.105409255338946, -0.074535599249993},
-      {0.288675134594813, 0, 0.210818510677892, -0.074535599249993},
-      {0.288675134594813, 0, 0, 0.223606797749979}};
+      const double basisvalue4 = 5.1234753829798*psitilde_a_2*scalings_y_2*psitilde_bs_2_0*scalings_z_2*psitilde_cs_20_0;
+      const double basisvalue5 = 3.96862696659689*psitilde_a_1*scalings_y_1*psitilde_bs_1_1*scalings_z_2*psitilde_cs_11_0;
+      const double basisvalue6 = 2.29128784747792*psitilde_a_0*scalings_y_0*psitilde_bs_0_2*scalings_z_2*psitilde_cs_02_0;
+      const double basisvalue7 = 3.24037034920393*psitilde_a_1*scalings_y_1*psitilde_bs_1_0*scalings_z_1*psitilde_cs_10_1;
+      const double basisvalue8 = 1.87082869338697*psitilde_a_0*scalings_y_0*psitilde_bs_0_1*scalings_z_1*psitilde_cs_01_1;
+      const double basisvalue9 = 1.3228756555323*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_2;
+    
+      // Table(s) of coefficients
+      const static double coefficients0[10][10] =   \
+      {{-0.0577350269189626, -0.0608580619450185, -0.0351364184463153, -0.0248451997499977, 0.0650600048632355, 0.0503952630678969, 0.0290957186981323, 0.0411475599898912, 0.0237565548366599, 0.0167984210226323},
+      {-0.0577350269189625, 0.0608580619450185, -0.0351364184463153, -0.0248451997499977, 0.0650600048632355, -0.050395263067897, 0.0290957186981323, -0.0411475599898912, 0.0237565548366599, 0.0167984210226323},
+      {-0.0577350269189625, 0, 0.0702728368926306, -0.0248451997499977, 0, 0, 0.0872871560943969, 0, -0.0475131096733199, 0.0167984210226323},
+      {-0.0577350269189626, 0, 0, 0.074535599249993, 0, 0, 0, 0, 0, 0.100790526135794},
+      {0.23094010767585, 0, 0.140545673785261, 0.0993807989999906, 0, 0, 0, 0, 0.1187827741833, -0.0671936840905293},
+      {0.230940107675851, 0.121716123890037, -0.0702728368926306, 0.0993807989999907, 0, 0, 0, 0.102868899974728, -0.0593913870916499, -0.0671936840905293},
+      {0.23094010767585, 0.121716123890037, 0.0702728368926307, -0.0993807989999907, 0, 0.100790526135794, -0.087287156094397, -0.0205737799949456, -0.01187827741833, 0.0167984210226323},
+      {0.23094010767585, -0.121716123890037, -0.0702728368926307, 0.0993807989999906, 0, 0, 0, -0.102868899974728, -0.0593913870916499, -0.0671936840905293},
+      {0.23094010767585, -0.121716123890037, 0.0702728368926306, -0.0993807989999906, 0, -0.100790526135794, -0.0872871560943969, 0.0205737799949456, -0.01187827741833, 0.0167984210226323},
+      {0.23094010767585, 0, -0.140545673785261, -0.0993807989999906, -0.130120009726471, 0, 0.0290957186981323, 0, 0.02375655483666, 0.0167984210226323}};
     
       // Extract relevant coefficients
       const double coeff0_0 =   coefficients0[dof][0];
       const double coeff0_1 =   coefficients0[dof][1];
       const double coeff0_2 =   coefficients0[dof][2];
       const double coeff0_3 =   coefficients0[dof][3];
+      const double coeff0_4 =   coefficients0[dof][4];
+      const double coeff0_5 =   coefficients0[dof][5];
+      const double coeff0_6 =   coefficients0[dof][6];
+      const double coeff0_7 =   coefficients0[dof][7];
+      const double coeff0_8 =   coefficients0[dof][8];
+      const double coeff0_9 =   coefficients0[dof][9];
     
       // Compute value(s)
-      values[0] = coeff0_0*basisvalue0 + coeff0_1*basisvalue1 + coeff0_2*basisvalue2 + coeff0_3*basisvalue3;
-    }
-    
-    if (4 <= i && i <= 7)
-    {
-      // Map degree of freedom to element degree of freedom
-      const unsigned int dof = i - 4;
+      values[0] = coeff0_0*basisvalue0 + coeff0_1*basisvalue1 + coeff0_2*basisvalue2 + coeff0_3*basisvalue3 + coeff0_4*basisvalue4 + coeff0_5*basisvalue5 + coeff0_6*basisvalue6 + coeff0_7*basisvalue7 + coeff0_8*basisvalue8 + coeff0_9*basisvalue9;
+    }
+    
+    if (10 <= i && i <= 19)
+    {
+      // Map degree of freedom to element degree of freedom
+      const unsigned int dof = i - 10;
     
       // Generate scalings
       const double scalings_y_0 = 1;
       const double scalings_y_1 = scalings_y_0*(0.5 - 0.5*y);
+      const double scalings_y_2 = scalings_y_1*(0.5 - 0.5*y);
       const double scalings_z_0 = 1;
       const double scalings_z_1 = scalings_z_0*(0.5 - 0.5*z);
+      const double scalings_z_2 = scalings_z_1*(0.5 - 0.5*z);
     
       // Compute psitilde_a
       const double psitilde_a_0 = 1;
       const double psitilde_a_1 = x;
+      const double psitilde_a_2 = 1.5*x*psitilde_a_1 - 0.5*psitilde_a_0;
     
       // Compute psitilde_bs
       const double psitilde_bs_0_0 = 1;
       const double psitilde_bs_0_1 = 1.5*y + 0.5;
+      const double psitilde_bs_0_2 = 0.111111111111111*psitilde_bs_0_1 + 1.66666666666667*y*psitilde_bs_0_1 - 0.555555555555556*psitilde_bs_0_0;
       const double psitilde_bs_1_0 = 1;
+      const double psitilde_bs_1_1 = 2.5*y + 1.5;
+      const double psitilde_bs_2_0 = 1;
     
       // Compute psitilde_cs
       const double psitilde_cs_00_0 = 1;
       const double psitilde_cs_00_1 = 2*z + 1;
+      const double psitilde_cs_00_2 = 0.3125*psitilde_cs_00_1 + 1.875*z*psitilde_cs_00_1 - 0.5625*psitilde_cs_00_0;
       const double psitilde_cs_01_0 = 1;
+      const double psitilde_cs_01_1 = 3*z + 2;
+      const double psitilde_cs_02_0 = 1;
       const double psitilde_cs_10_0 = 1;
+      const double psitilde_cs_10_1 = 3*z + 2;
+      const double psitilde_cs_11_0 = 1;
+      const double psitilde_cs_20_0 = 1;
     
       // Compute basisvalues
       const double basisvalue0 = 0.866025403784439*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_0;
       const double basisvalue1 = 2.73861278752583*psitilde_a_1*scalings_y_1*psitilde_bs_1_0*scalings_z_1*psitilde_cs_10_0;
       const double basisvalue2 = 1.58113883008419*psitilde_a_0*scalings_y_0*psitilde_bs_0_1*scalings_z_1*psitilde_cs_01_0;
       const double basisvalue3 = 1.11803398874989*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_1;
-    
-      // Table(s) of coefficients
-      const static double coefficients0[4][4] =   \
-      {{0.288675134594813, -0.182574185835055, -0.105409255338946, -0.074535599249993},
-      {0.288675134594813, 0.182574185835055, -0.105409255338946, -0.074535599249993},
-      {0.288675134594813, 0, 0.210818510677892, -0.074535599249993},
-      {0.288675134594813, 0, 0, 0.223606797749979}};
+      const double basisvalue4 = 5.1234753829798*psitilde_a_2*scalings_y_2*psitilde_bs_2_0*scalings_z_2*psitilde_cs_20_0;
+      const double basisvalue5 = 3.96862696659689*psitilde_a_1*scalings_y_1*psitilde_bs_1_1*scalings_z_2*psitilde_cs_11_0;
+      const double basisvalue6 = 2.29128784747792*psitilde_a_0*scalings_y_0*psitilde_bs_0_2*scalings_z_2*psitilde_cs_02_0;
+      const double basisvalue7 = 3.24037034920393*psitilde_a_1*scalings_y_1*psitilde_bs_1_0*scalings_z_1*psitilde_cs_10_1;
+      const double basisvalue8 = 1.87082869338697*psitilde_a_0*scalings_y_0*psitilde_bs_0_1*scalings_z_1*psitilde_cs_01_1;
+      const double basisvalue9 = 1.3228756555323*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_2;
+    
+      // Table(s) of coefficients
+      const static double coefficients0[10][10] =   \
+      {{-0.0577350269189626, -0.0608580619450185, -0.0351364184463153, -0.0248451997499977, 0.0650600048632355, 0.0503952630678969, 0.0290957186981323, 0.0411475599898912, 0.0237565548366599, 0.0167984210226323},
+      {-0.0577350269189625, 0.0608580619450185, -0.0351364184463153, -0.0248451997499977, 0.0650600048632355, -0.050395263067897, 0.0290957186981323, -0.0411475599898912, 0.0237565548366599, 0.0167984210226323},
+      {-0.0577350269189625, 0, 0.0702728368926306, -0.0248451997499977, 0, 0, 0.0872871560943969, 0, -0.0475131096733199, 0.0167984210226323},
+      {-0.0577350269189626, 0, 0, 0.074535599249993, 0, 0, 0, 0, 0, 0.100790526135794},
+      {0.23094010767585, 0, 0.140545673785261, 0.0993807989999906, 0, 0, 0, 0, 0.1187827741833, -0.0671936840905293},
+      {0.230940107675851, 0.121716123890037, -0.0702728368926306, 0.0993807989999907, 0, 0, 0, 0.102868899974728, -0.0593913870916499, -0.0671936840905293},
+      {0.23094010767585, 0.121716123890037, 0.0702728368926307, -0.0993807989999907, 0, 0.100790526135794, -0.087287156094397, -0.0205737799949456, -0.01187827741833, 0.0167984210226323},
+      {0.23094010767585, -0.121716123890037, -0.0702728368926307, 0.0993807989999906, 0, 0, 0, -0.102868899974728, -0.0593913870916499, -0.0671936840905293},
+      {0.23094010767585, -0.121716123890037, 0.0702728368926306, -0.0993807989999906, 0, -0.100790526135794, -0.0872871560943969, 0.0205737799949456, -0.01187827741833, 0.0167984210226323},
+      {0.23094010767585, 0, -0.140545673785261, -0.0993807989999906, -0.130120009726471, 0, 0.0290957186981323, 0, 0.02375655483666, 0.0167984210226323}};
     
       // Extract relevant coefficients
       const double coeff0_0 =   coefficients0[dof][0];
       const double coeff0_1 =   coefficients0[dof][1];
       const double coeff0_2 =   coefficients0[dof][2];
       const double coeff0_3 =   coefficients0[dof][3];
+      const double coeff0_4 =   coefficients0[dof][4];
+      const double coeff0_5 =   coefficients0[dof][5];
+      const double coeff0_6 =   coefficients0[dof][6];
+      const double coeff0_7 =   coefficients0[dof][7];
+      const double coeff0_8 =   coefficients0[dof][8];
+      const double coeff0_9 =   coefficients0[dof][9];
     
       // Compute value(s)
-      values[1] = coeff0_0*basisvalue0 + coeff0_1*basisvalue1 + coeff0_2*basisvalue2 + coeff0_3*basisvalue3;
+      values[1] = coeff0_0*basisvalue0 + coeff0_1*basisvalue1 + coeff0_2*basisvalue2 + coeff0_3*basisvalue3 + coeff0_4*basisvalue4 + coeff0_5*basisvalue5 + coeff0_6*basisvalue6 + coeff0_7*basisvalue7 + coeff0_8*basisvalue8 + coeff0_9*basisvalue9;
     }
     
 }
@@ -14895,7 +18224,7 @@ void UFC_SolitaryWave3DLinearForm_finite
     for (unsigned int j = 0; j < 2*num_derivatives; j++)
       values[j] = 0;
     
-    if (0 <= i && i <= 3)
+    if (0 <= i && i <= 9)
     {
       // Map degree of freedom to element degree of freedom
       const unsigned int dof = i;
@@ -14903,56 +18232,98 @@ void UFC_SolitaryWave3DLinearForm_finite
       // Generate scalings
       const double scalings_y_0 = 1;
       const double scalings_y_1 = scalings_y_0*(0.5 - 0.5*y);
+      const double scalings_y_2 = scalings_y_1*(0.5 - 0.5*y);
       const double scalings_z_0 = 1;
       const double scalings_z_1 = scalings_z_0*(0.5 - 0.5*z);
+      const double scalings_z_2 = scalings_z_1*(0.5 - 0.5*z);
     
       // Compute psitilde_a
       const double psitilde_a_0 = 1;
       const double psitilde_a_1 = x;
+      const double psitilde_a_2 = 1.5*x*psitilde_a_1 - 0.5*psitilde_a_0;
     
       // Compute psitilde_bs
       const double psitilde_bs_0_0 = 1;
       const double psitilde_bs_0_1 = 1.5*y + 0.5;
+      const double psitilde_bs_0_2 = 0.111111111111111*psitilde_bs_0_1 + 1.66666666666667*y*psitilde_bs_0_1 - 0.555555555555556*psitilde_bs_0_0;
       const double psitilde_bs_1_0 = 1;
+      const double psitilde_bs_1_1 = 2.5*y + 1.5;
+      const double psitilde_bs_2_0 = 1;
     
       // Compute psitilde_cs
       const double psitilde_cs_00_0 = 1;
       const double psitilde_cs_00_1 = 2*z + 1;
+      const double psitilde_cs_00_2 = 0.3125*psitilde_cs_00_1 + 1.875*z*psitilde_cs_00_1 - 0.5625*psitilde_cs_00_0;
       const double psitilde_cs_01_0 = 1;
+      const double psitilde_cs_01_1 = 3*z + 2;
+      const double psitilde_cs_02_0 = 1;
       const double psitilde_cs_10_0 = 1;
+      const double psitilde_cs_10_1 = 3*z + 2;
+      const double psitilde_cs_11_0 = 1;
+      const double psitilde_cs_20_0 = 1;
     
       // Compute basisvalues
       const double basisvalue0 = 0.866025403784439*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_0;
       const double basisvalue1 = 2.73861278752583*psitilde_a_1*scalings_y_1*psitilde_bs_1_0*scalings_z_1*psitilde_cs_10_0;
       const double basisvalue2 = 1.58113883008419*psitilde_a_0*scalings_y_0*psitilde_bs_0_1*scalings_z_1*psitilde_cs_01_0;
       const double basisvalue3 = 1.11803398874989*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_1;
-    
-      // Table(s) of coefficients
-      const static double coefficients0[4][4] =   \
-      {{0.288675134594813, -0.182574185835055, -0.105409255338946, -0.074535599249993},
-      {0.288675134594813, 0.182574185835055, -0.105409255338946, -0.074535599249993},
-      {0.288675134594813, 0, 0.210818510677892, -0.074535599249993},
-      {0.288675134594813, 0, 0, 0.223606797749979}};
+      const double basisvalue4 = 5.1234753829798*psitilde_a_2*scalings_y_2*psitilde_bs_2_0*scalings_z_2*psitilde_cs_20_0;
+      const double basisvalue5 = 3.96862696659689*psitilde_a_1*scalings_y_1*psitilde_bs_1_1*scalings_z_2*psitilde_cs_11_0;
+      const double basisvalue6 = 2.29128784747792*psitilde_a_0*scalings_y_0*psitilde_bs_0_2*scalings_z_2*psitilde_cs_02_0;
+      const double basisvalue7 = 3.24037034920393*psitilde_a_1*scalings_y_1*psitilde_bs_1_0*scalings_z_1*psitilde_cs_10_1;
+      const double basisvalue8 = 1.87082869338697*psitilde_a_0*scalings_y_0*psitilde_bs_0_1*scalings_z_1*psitilde_cs_01_1;
+      const double basisvalue9 = 1.3228756555323*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_2;
+    
+      // Table(s) of coefficients
+      const static double coefficients0[10][10] =   \
+      {{-0.0577350269189626, -0.0608580619450185, -0.0351364184463153, -0.0248451997499977, 0.0650600048632355, 0.0503952630678969, 0.0290957186981323, 0.0411475599898912, 0.0237565548366599, 0.0167984210226323},
+      {-0.0577350269189625, 0.0608580619450185, -0.0351364184463153, -0.0248451997499977, 0.0650600048632355, -0.050395263067897, 0.0290957186981323, -0.0411475599898912, 0.0237565548366599, 0.0167984210226323},
+      {-0.0577350269189625, 0, 0.0702728368926306, -0.0248451997499977, 0, 0, 0.0872871560943969, 0, -0.0475131096733199, 0.0167984210226323},
+      {-0.0577350269189626, 0, 0, 0.074535599249993, 0, 0, 0, 0, 0, 0.100790526135794},
+      {0.23094010767585, 0, 0.140545673785261, 0.0993807989999906, 0, 0, 0, 0, 0.1187827741833, -0.0671936840905293},
+      {0.230940107675851, 0.121716123890037, -0.0702728368926306, 0.0993807989999907, 0, 0, 0, 0.102868899974728, -0.0593913870916499, -0.0671936840905293},
+      {0.23094010767585, 0.121716123890037, 0.0702728368926307, -0.0993807989999907, 0, 0.100790526135794, -0.087287156094397, -0.0205737799949456, -0.01187827741833, 0.0167984210226323},
+      {0.23094010767585, -0.121716123890037, -0.0702728368926307, 0.0993807989999906, 0, 0, 0, -0.102868899974728, -0.0593913870916499, -0.0671936840905293},
+      {0.23094010767585, -0.121716123890037, 0.0702728368926306, -0.0993807989999906, 0, -0.100790526135794, -0.0872871560943969, 0.0205737799949456, -0.01187827741833, 0.0167984210226323},
+      {0.23094010767585, 0, -0.140545673785261, -0.0993807989999906, -0.130120009726471, 0, 0.0290957186981323, 0, 0.02375655483666, 0.0167984210226323}};
     
       // Interesting (new) part
       // Tables of derivatives of the polynomial base (transpose)
-      const static double dmats0[4][4] =   \
-      {{0, 0, 0, 0},
-      {6.32455532033676, 0, 0, 0},
-      {0, 0, 0, 0},
-      {0, 0, 0, 0}};
-    
-      const static double dmats1[4][4] =   \
-      {{0, 0, 0, 0},
-      {3.16227766016838, 0, 0, 0},
-      {5.47722557505166, 0, 0, 0},
-      {0, 0, 0, 0}};
-    
-      const static double dmats2[4][4] =   \
-      {{0, 0, 0, 0},
-      {3.16227766016838, 0, 0, 0},
-      {1.82574185835055, 0, 0, 0},
-      {5.16397779494322, 0, 0, 0}};
+      const static double dmats0[10][10] =   \
+      {{0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {6.32455532033676, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {0, 11.2249721603218, 0, 0, 0, 0, 0, 0, 0, 0},
+      {4.58257569495584, 0, 8.36660026534076, -1.18321595661992, 0, 0, 0, 0, 0, 0},
+      {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {3.74165738677394, 0, 0, 8.69482604771366, 0, 0, 0, 0, 0, 0},
+      {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
+    
+      const static double dmats1[10][10] =   \
+      {{0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {3.16227766016838, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {5.47722557505166, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {2.95803989154981, 5.61248608016091, -1.08012344973464, -0.763762615825974, 0, 0, 0, 0, 0, 0},
+      {2.29128784747792, 7.24568837309472, 4.18330013267038, -0.591607978309962, 0, 0, 0, 0, 0, 0},
+      {-2.64575131106459, 0, 9.66091783079296, 0.683130051063974, 0, 0, 0, 0, 0, 0},
+      {1.87082869338697, 0, 0, 4.34741302385683, 0, 0, 0, 0, 0, 0},
+      {3.24037034920393, 0, 0, 7.52994023880668, 0, 0, 0, 0, 0, 0},
+      {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
+    
+      const static double dmats2[10][10] =   \
+      {{0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {3.16227766016838, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {1.82574185835055, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {5.16397779494322, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {2.95803989154981, 5.61248608016091, -1.08012344973464, -0.763762615825974, 0, 0, 0, 0, 0, 0},
+      {2.29128784747792, 1.44913767461894, 4.18330013267038, -0.591607978309962, 0, 0, 0, 0, 0, 0},
+      {1.32287565553229, 0, 3.86436713231718, -0.341565025531986, 0, 0, 0, 0, 0, 0},
+      {1.87082869338697, 7.09929573971954, 0, 4.34741302385683, 0, 0, 0, 0, 0, 0},
+      {1.08012344973464, 0, 7.09929573971954, 2.50998007960223, 0, 0, 0, 0, 0, 0},
+      {-3.81881307912987, 0, 0, 8.87411967464942, 0, 0, 0, 0, 0, 0}};
     
       // Compute reference derivatives
       // Declare pointer to array of derivatives on FIAT element
@@ -14963,12 +18334,24 @@ void UFC_SolitaryWave3DLinearForm_finite
       double coeff0_1 = 0;
       double coeff0_2 = 0;
       double coeff0_3 = 0;
+      double coeff0_4 = 0;
+      double coeff0_5 = 0;
+      double coeff0_6 = 0;
+      double coeff0_7 = 0;
+      double coeff0_8 = 0;
+      double coeff0_9 = 0;
     
       // Declare new coefficients
       double new_coeff0_0 = 0;
       double new_coeff0_1 = 0;
       double new_coeff0_2 = 0;
       double new_coeff0_3 = 0;
+      double new_coeff0_4 = 0;
+      double new_coeff0_5 = 0;
+      double new_coeff0_6 = 0;
+      double new_coeff0_7 = 0;
+      double new_coeff0_8 = 0;
+      double new_coeff0_9 = 0;
     
       // Loop possible derivatives
       for (unsigned int deriv_num = 0; deriv_num < num_derivatives; deriv_num++)
@@ -14978,6 +18361,12 @@ void UFC_SolitaryWave3DLinearForm_finite
         new_coeff0_1 = coefficients0[dof][1];
         new_coeff0_2 = coefficients0[dof][2];
         new_coeff0_3 = coefficients0[dof][3];
+        new_coeff0_4 = coefficients0[dof][4];
+        new_coeff0_5 = coefficients0[dof][5];
+        new_coeff0_6 = coefficients0[dof][6];
+        new_coeff0_7 = coefficients0[dof][7];
+        new_coeff0_8 = coefficients0[dof][8];
+        new_coeff0_9 = coefficients0[dof][9];
     
         // Loop derivative order
         for (unsigned int j = 0; j < n; j++)
@@ -14987,32 +18376,56 @@ void UFC_SolitaryWave3DLinearForm_finite
           coeff0_1 = new_coeff0_1;
           coeff0_2 = new_coeff0_2;
           coeff0_3 = new_coeff0_3;
+          coeff0_4 = new_coeff0_4;
+          coeff0_5 = new_coeff0_5;
+          coeff0_6 = new_coeff0_6;
+          coeff0_7 = new_coeff0_7;
+          coeff0_8 = new_coeff0_8;
+          coeff0_9 = new_coeff0_9;
     
           if(combinations[deriv_num][j] == 0)
           {
-            new_coeff0_0 = coeff0_0*dmats0[0][0] + coeff0_1*dmats0[1][0] + coeff0_2*dmats0[2][0] + coeff0_3*dmats0[3][0];
-            new_coeff0_1 = coeff0_0*dmats0[0][1] + coeff0_1*dmats0[1][1] + coeff0_2*dmats0[2][1] + coeff0_3*dmats0[3][1];
-            new_coeff0_2 = coeff0_0*dmats0[0][2] + coeff0_1*dmats0[1][2] + coeff0_2*dmats0[2][2] + coeff0_3*dmats0[3][2];
-            new_coeff0_3 = coeff0_0*dmats0[0][3] + coeff0_1*dmats0[1][3] + coeff0_2*dmats0[2][3] + coeff0_3*dmats0[3][3];
+            new_coeff0_0 = coeff0_0*dmats0[0][0] + coeff0_1*dmats0[1][0] + coeff0_2*dmats0[2][0] + coeff0_3*dmats0[3][0] + coeff0_4*dmats0[4][0] + coeff0_5*dmats0[5][0] + coeff0_6*dmats0[6][0] + coeff0_7*dmats0[7][0] + coeff0_8*dmats0[8][0] + coeff0_9*dmats0[9][0];
+            new_coeff0_1 = coeff0_0*dmats0[0][1] + coeff0_1*dmats0[1][1] + coeff0_2*dmats0[2][1] + coeff0_3*dmats0[3][1] + coeff0_4*dmats0[4][1] + coeff0_5*dmats0[5][1] + coeff0_6*dmats0[6][1] + coeff0_7*dmats0[7][1] + coeff0_8*dmats0[8][1] + coeff0_9*dmats0[9][1];
+            new_coeff0_2 = coeff0_0*dmats0[0][2] + coeff0_1*dmats0[1][2] + coeff0_2*dmats0[2][2] + coeff0_3*dmats0[3][2] + coeff0_4*dmats0[4][2] + coeff0_5*dmats0[5][2] + coeff0_6*dmats0[6][2] + coeff0_7*dmats0[7][2] + coeff0_8*dmats0[8][2] + coeff0_9*dmats0[9][2];
+            new_coeff0_3 = coeff0_0*dmats0[0][3] + coeff0_1*dmats0[1][3] + coeff0_2*dmats0[2][3] + coeff0_3*dmats0[3][3] + coeff0_4*dmats0[4][3] + coeff0_5*dmats0[5][3] + coeff0_6*dmats0[6][3] + coeff0_7*dmats0[7][3] + coeff0_8*dmats0[8][3] + coeff0_9*dmats0[9][3];
+            new_coeff0_4 = coeff0_0*dmats0[0][4] + coeff0_1*dmats0[1][4] + coeff0_2*dmats0[2][4] + coeff0_3*dmats0[3][4] + coeff0_4*dmats0[4][4] + coeff0_5*dmats0[5][4] + coeff0_6*dmats0[6][4] + coeff0_7*dmats0[7][4] + coeff0_8*dmats0[8][4] + coeff0_9*dmats0[9][4];
+            new_coeff0_5 = coeff0_0*dmats0[0][5] + coeff0_1*dmats0[1][5] + coeff0_2*dmats0[2][5] + coeff0_3*dmats0[3][5] + coeff0_4*dmats0[4][5] + coeff0_5*dmats0[5][5] + coeff0_6*dmats0[6][5] + coeff0_7*dmats0[7][5] + coeff0_8*dmats0[8][5] + coeff0_9*dmats0[9][5];
+            new_coeff0_6 = coeff0_0*dmats0[0][6] + coeff0_1*dmats0[1][6] + coeff0_2*dmats0[2][6] + coeff0_3*dmats0[3][6] + coeff0_4*dmats0[4][6] + coeff0_5*dmats0[5][6] + coeff0_6*dmats0[6][6] + coeff0_7*dmats0[7][6] + coeff0_8*dmats0[8][6] + coeff0_9*dmats0[9][6];
+            new_coeff0_7 = coeff0_0*dmats0[0][7] + coeff0_1*dmats0[1][7] + coeff0_2*dmats0[2][7] + coeff0_3*dmats0[3][7] + coeff0_4*dmats0[4][7] + coeff0_5*dmats0[5][7] + coeff0_6*dmats0[6][7] + coeff0_7*dmats0[7][7] + coeff0_8*dmats0[8][7] + coeff0_9*dmats0[9][7];
+            new_coeff0_8 = coeff0_0*dmats0[0][8] + coeff0_1*dmats0[1][8] + coeff0_2*dmats0[2][8] + coeff0_3*dmats0[3][8] + coeff0_4*dmats0[4][8] + coeff0_5*dmats0[5][8] + coeff0_6*dmats0[6][8] + coeff0_7*dmats0[7][8] + coeff0_8*dmats0[8][8] + coeff0_9*dmats0[9][8];
+            new_coeff0_9 = coeff0_0*dmats0[0][9] + coeff0_1*dmats0[1][9] + coeff0_2*dmats0[2][9] + coeff0_3*dmats0[3][9] + coeff0_4*dmats0[4][9] + coeff0_5*dmats0[5][9] + coeff0_6*dmats0[6][9] + coeff0_7*dmats0[7][9] + coeff0_8*dmats0[8][9] + coeff0_9*dmats0[9][9];
           }
           if(combinations[deriv_num][j] == 1)
           {
-            new_coeff0_0 = coeff0_0*dmats1[0][0] + coeff0_1*dmats1[1][0] + coeff0_2*dmats1[2][0] + coeff0_3*dmats1[3][0];
-            new_coeff0_1 = coeff0_0*dmats1[0][1] + coeff0_1*dmats1[1][1] + coeff0_2*dmats1[2][1] + coeff0_3*dmats1[3][1];
-            new_coeff0_2 = coeff0_0*dmats1[0][2] + coeff0_1*dmats1[1][2] + coeff0_2*dmats1[2][2] + coeff0_3*dmats1[3][2];
-            new_coeff0_3 = coeff0_0*dmats1[0][3] + coeff0_1*dmats1[1][3] + coeff0_2*dmats1[2][3] + coeff0_3*dmats1[3][3];
+            new_coeff0_0 = coeff0_0*dmats1[0][0] + coeff0_1*dmats1[1][0] + coeff0_2*dmats1[2][0] + coeff0_3*dmats1[3][0] + coeff0_4*dmats1[4][0] + coeff0_5*dmats1[5][0] + coeff0_6*dmats1[6][0] + coeff0_7*dmats1[7][0] + coeff0_8*dmats1[8][0] + coeff0_9*dmats1[9][0];
+            new_coeff0_1 = coeff0_0*dmats1[0][1] + coeff0_1*dmats1[1][1] + coeff0_2*dmats1[2][1] + coeff0_3*dmats1[3][1] + coeff0_4*dmats1[4][1] + coeff0_5*dmats1[5][1] + coeff0_6*dmats1[6][1] + coeff0_7*dmats1[7][1] + coeff0_8*dmats1[8][1] + coeff0_9*dmats1[9][1];
+            new_coeff0_2 = coeff0_0*dmats1[0][2] + coeff0_1*dmats1[1][2] + coeff0_2*dmats1[2][2] + coeff0_3*dmats1[3][2] + coeff0_4*dmats1[4][2] + coeff0_5*dmats1[5][2] + coeff0_6*dmats1[6][2] + coeff0_7*dmats1[7][2] + coeff0_8*dmats1[8][2] + coeff0_9*dmats1[9][2];
+            new_coeff0_3 = coeff0_0*dmats1[0][3] + coeff0_1*dmats1[1][3] + coeff0_2*dmats1[2][3] + coeff0_3*dmats1[3][3] + coeff0_4*dmats1[4][3] + coeff0_5*dmats1[5][3] + coeff0_6*dmats1[6][3] + coeff0_7*dmats1[7][3] + coeff0_8*dmats1[8][3] + coeff0_9*dmats1[9][3];
+            new_coeff0_4 = coeff0_0*dmats1[0][4] + coeff0_1*dmats1[1][4] + coeff0_2*dmats1[2][4] + coeff0_3*dmats1[3][4] + coeff0_4*dmats1[4][4] + coeff0_5*dmats1[5][4] + coeff0_6*dmats1[6][4] + coeff0_7*dmats1[7][4] + coeff0_8*dmats1[8][4] + coeff0_9*dmats1[9][4];
+            new_coeff0_5 = coeff0_0*dmats1[0][5] + coeff0_1*dmats1[1][5] + coeff0_2*dmats1[2][5] + coeff0_3*dmats1[3][5] + coeff0_4*dmats1[4][5] + coeff0_5*dmats1[5][5] + coeff0_6*dmats1[6][5] + coeff0_7*dmats1[7][5] + coeff0_8*dmats1[8][5] + coeff0_9*dmats1[9][5];
+            new_coeff0_6 = coeff0_0*dmats1[0][6] + coeff0_1*dmats1[1][6] + coeff0_2*dmats1[2][6] + coeff0_3*dmats1[3][6] + coeff0_4*dmats1[4][6] + coeff0_5*dmats1[5][6] + coeff0_6*dmats1[6][6] + coeff0_7*dmats1[7][6] + coeff0_8*dmats1[8][6] + coeff0_9*dmats1[9][6];
+            new_coeff0_7 = coeff0_0*dmats1[0][7] + coeff0_1*dmats1[1][7] + coeff0_2*dmats1[2][7] + coeff0_3*dmats1[3][7] + coeff0_4*dmats1[4][7] + coeff0_5*dmats1[5][7] + coeff0_6*dmats1[6][7] + coeff0_7*dmats1[7][7] + coeff0_8*dmats1[8][7] + coeff0_9*dmats1[9][7];
+            new_coeff0_8 = coeff0_0*dmats1[0][8] + coeff0_1*dmats1[1][8] + coeff0_2*dmats1[2][8] + coeff0_3*dmats1[3][8] + coeff0_4*dmats1[4][8] + coeff0_5*dmats1[5][8] + coeff0_6*dmats1[6][8] + coeff0_7*dmats1[7][8] + coeff0_8*dmats1[8][8] + coeff0_9*dmats1[9][8];
+            new_coeff0_9 = coeff0_0*dmats1[0][9] + coeff0_1*dmats1[1][9] + coeff0_2*dmats1[2][9] + coeff0_3*dmats1[3][9] + coeff0_4*dmats1[4][9] + coeff0_5*dmats1[5][9] + coeff0_6*dmats1[6][9] + coeff0_7*dmats1[7][9] + coeff0_8*dmats1[8][9] + coeff0_9*dmats1[9][9];
           }
           if(combinations[deriv_num][j] == 2)
           {
-            new_coeff0_0 = coeff0_0*dmats2[0][0] + coeff0_1*dmats2[1][0] + coeff0_2*dmats2[2][0] + coeff0_3*dmats2[3][0];
-            new_coeff0_1 = coeff0_0*dmats2[0][1] + coeff0_1*dmats2[1][1] + coeff0_2*dmats2[2][1] + coeff0_3*dmats2[3][1];
-            new_coeff0_2 = coeff0_0*dmats2[0][2] + coeff0_1*dmats2[1][2] + coeff0_2*dmats2[2][2] + coeff0_3*dmats2[3][2];
-            new_coeff0_3 = coeff0_0*dmats2[0][3] + coeff0_1*dmats2[1][3] + coeff0_2*dmats2[2][3] + coeff0_3*dmats2[3][3];
+            new_coeff0_0 = coeff0_0*dmats2[0][0] + coeff0_1*dmats2[1][0] + coeff0_2*dmats2[2][0] + coeff0_3*dmats2[3][0] + coeff0_4*dmats2[4][0] + coeff0_5*dmats2[5][0] + coeff0_6*dmats2[6][0] + coeff0_7*dmats2[7][0] + coeff0_8*dmats2[8][0] + coeff0_9*dmats2[9][0];
+            new_coeff0_1 = coeff0_0*dmats2[0][1] + coeff0_1*dmats2[1][1] + coeff0_2*dmats2[2][1] + coeff0_3*dmats2[3][1] + coeff0_4*dmats2[4][1] + coeff0_5*dmats2[5][1] + coeff0_6*dmats2[6][1] + coeff0_7*dmats2[7][1] + coeff0_8*dmats2[8][1] + coeff0_9*dmats2[9][1];
+            new_coeff0_2 = coeff0_0*dmats2[0][2] + coeff0_1*dmats2[1][2] + coeff0_2*dmats2[2][2] + coeff0_3*dmats2[3][2] + coeff0_4*dmats2[4][2] + coeff0_5*dmats2[5][2] + coeff0_6*dmats2[6][2] + coeff0_7*dmats2[7][2] + coeff0_8*dmats2[8][2] + coeff0_9*dmats2[9][2];
+            new_coeff0_3 = coeff0_0*dmats2[0][3] + coeff0_1*dmats2[1][3] + coeff0_2*dmats2[2][3] + coeff0_3*dmats2[3][3] + coeff0_4*dmats2[4][3] + coeff0_5*dmats2[5][3] + coeff0_6*dmats2[6][3] + coeff0_7*dmats2[7][3] + coeff0_8*dmats2[8][3] + coeff0_9*dmats2[9][3];
+            new_coeff0_4 = coeff0_0*dmats2[0][4] + coeff0_1*dmats2[1][4] + coeff0_2*dmats2[2][4] + coeff0_3*dmats2[3][4] + coeff0_4*dmats2[4][4] + coeff0_5*dmats2[5][4] + coeff0_6*dmats2[6][4] + coeff0_7*dmats2[7][4] + coeff0_8*dmats2[8][4] + coeff0_9*dmats2[9][4];
+            new_coeff0_5 = coeff0_0*dmats2[0][5] + coeff0_1*dmats2[1][5] + coeff0_2*dmats2[2][5] + coeff0_3*dmats2[3][5] + coeff0_4*dmats2[4][5] + coeff0_5*dmats2[5][5] + coeff0_6*dmats2[6][5] + coeff0_7*dmats2[7][5] + coeff0_8*dmats2[8][5] + coeff0_9*dmats2[9][5];
+            new_coeff0_6 = coeff0_0*dmats2[0][6] + coeff0_1*dmats2[1][6] + coeff0_2*dmats2[2][6] + coeff0_3*dmats2[3][6] + coeff0_4*dmats2[4][6] + coeff0_5*dmats2[5][6] + coeff0_6*dmats2[6][6] + coeff0_7*dmats2[7][6] + coeff0_8*dmats2[8][6] + coeff0_9*dmats2[9][6];
+            new_coeff0_7 = coeff0_0*dmats2[0][7] + coeff0_1*dmats2[1][7] + coeff0_2*dmats2[2][7] + coeff0_3*dmats2[3][7] + coeff0_4*dmats2[4][7] + coeff0_5*dmats2[5][7] + coeff0_6*dmats2[6][7] + coeff0_7*dmats2[7][7] + coeff0_8*dmats2[8][7] + coeff0_9*dmats2[9][7];
+            new_coeff0_8 = coeff0_0*dmats2[0][8] + coeff0_1*dmats2[1][8] + coeff0_2*dmats2[2][8] + coeff0_3*dmats2[3][8] + coeff0_4*dmats2[4][8] + coeff0_5*dmats2[5][8] + coeff0_6*dmats2[6][8] + coeff0_7*dmats2[7][8] + coeff0_8*dmats2[8][8] + coeff0_9*dmats2[9][8];
+            new_coeff0_9 = coeff0_0*dmats2[0][9] + coeff0_1*dmats2[1][9] + coeff0_2*dmats2[2][9] + coeff0_3*dmats2[3][9] + coeff0_4*dmats2[4][9] + coeff0_5*dmats2[5][9] + coeff0_6*dmats2[6][9] + coeff0_7*dmats2[7][9] + coeff0_8*dmats2[8][9] + coeff0_9*dmats2[9][9];
           }
     
         }
         // Compute derivatives on reference element as dot product of coefficients and basisvalues
-        derivatives[deriv_num] = new_coeff0_0*basisvalue0 + new_coeff0_1*basisvalue1 + new_coeff0_2*basisvalue2 + new_coeff0_3*basisvalue3;
+        derivatives[deriv_num] = new_coeff0_0*basisvalue0 + new_coeff0_1*basisvalue1 + new_coeff0_2*basisvalue2 + new_coeff0_3*basisvalue3 + new_coeff0_4*basisvalue4 + new_coeff0_5*basisvalue5 + new_coeff0_6*basisvalue6 + new_coeff0_7*basisvalue7 + new_coeff0_8*basisvalue8 + new_coeff0_9*basisvalue9;
       }
     
       // Transform derivatives back to physical element
@@ -15037,64 +18450,106 @@ void UFC_SolitaryWave3DLinearForm_finite
       delete [] transform;
     }
     
-    if (4 <= i && i <= 7)
-    {
-      // Map degree of freedom to element degree of freedom
-      const unsigned int dof = i - 4;
+    if (10 <= i && i <= 19)
+    {
+      // Map degree of freedom to element degree of freedom
+      const unsigned int dof = i - 10;
     
       // Generate scalings
       const double scalings_y_0 = 1;
       const double scalings_y_1 = scalings_y_0*(0.5 - 0.5*y);
+      const double scalings_y_2 = scalings_y_1*(0.5 - 0.5*y);
       const double scalings_z_0 = 1;
       const double scalings_z_1 = scalings_z_0*(0.5 - 0.5*z);
+      const double scalings_z_2 = scalings_z_1*(0.5 - 0.5*z);
     
       // Compute psitilde_a
       const double psitilde_a_0 = 1;
       const double psitilde_a_1 = x;
+      const double psitilde_a_2 = 1.5*x*psitilde_a_1 - 0.5*psitilde_a_0;
     
       // Compute psitilde_bs
       const double psitilde_bs_0_0 = 1;
       const double psitilde_bs_0_1 = 1.5*y + 0.5;
+      const double psitilde_bs_0_2 = 0.111111111111111*psitilde_bs_0_1 + 1.66666666666667*y*psitilde_bs_0_1 - 0.555555555555556*psitilde_bs_0_0;
       const double psitilde_bs_1_0 = 1;
+      const double psitilde_bs_1_1 = 2.5*y + 1.5;
+      const double psitilde_bs_2_0 = 1;
     
       // Compute psitilde_cs
       const double psitilde_cs_00_0 = 1;
       const double psitilde_cs_00_1 = 2*z + 1;
+      const double psitilde_cs_00_2 = 0.3125*psitilde_cs_00_1 + 1.875*z*psitilde_cs_00_1 - 0.5625*psitilde_cs_00_0;
       const double psitilde_cs_01_0 = 1;
+      const double psitilde_cs_01_1 = 3*z + 2;
+      const double psitilde_cs_02_0 = 1;
       const double psitilde_cs_10_0 = 1;
+      const double psitilde_cs_10_1 = 3*z + 2;
+      const double psitilde_cs_11_0 = 1;
+      const double psitilde_cs_20_0 = 1;
     
       // Compute basisvalues
       const double basisvalue0 = 0.866025403784439*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_0;
       const double basisvalue1 = 2.73861278752583*psitilde_a_1*scalings_y_1*psitilde_bs_1_0*scalings_z_1*psitilde_cs_10_0;
       const double basisvalue2 = 1.58113883008419*psitilde_a_0*scalings_y_0*psitilde_bs_0_1*scalings_z_1*psitilde_cs_01_0;
       const double basisvalue3 = 1.11803398874989*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_1;
-    
-      // Table(s) of coefficients
-      const static double coefficients0[4][4] =   \
-      {{0.288675134594813, -0.182574185835055, -0.105409255338946, -0.074535599249993},
-      {0.288675134594813, 0.182574185835055, -0.105409255338946, -0.074535599249993},
-      {0.288675134594813, 0, 0.210818510677892, -0.074535599249993},
-      {0.288675134594813, 0, 0, 0.223606797749979}};
+      const double basisvalue4 = 5.1234753829798*psitilde_a_2*scalings_y_2*psitilde_bs_2_0*scalings_z_2*psitilde_cs_20_0;
+      const double basisvalue5 = 3.96862696659689*psitilde_a_1*scalings_y_1*psitilde_bs_1_1*scalings_z_2*psitilde_cs_11_0;
+      const double basisvalue6 = 2.29128784747792*psitilde_a_0*scalings_y_0*psitilde_bs_0_2*scalings_z_2*psitilde_cs_02_0;
+      const double basisvalue7 = 3.24037034920393*psitilde_a_1*scalings_y_1*psitilde_bs_1_0*scalings_z_1*psitilde_cs_10_1;
+      const double basisvalue8 = 1.87082869338697*psitilde_a_0*scalings_y_0*psitilde_bs_0_1*scalings_z_1*psitilde_cs_01_1;
+      const double basisvalue9 = 1.3228756555323*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_2;
+    
+      // Table(s) of coefficients
+      const static double coefficients0[10][10] =   \
+      {{-0.0577350269189626, -0.0608580619450185, -0.0351364184463153, -0.0248451997499977, 0.0650600048632355, 0.0503952630678969, 0.0290957186981323, 0.0411475599898912, 0.0237565548366599, 0.0167984210226323},
+      {-0.0577350269189625, 0.0608580619450185, -0.0351364184463153, -0.0248451997499977, 0.0650600048632355, -0.050395263067897, 0.0290957186981323, -0.0411475599898912, 0.0237565548366599, 0.0167984210226323},
+      {-0.0577350269189625, 0, 0.0702728368926306, -0.0248451997499977, 0, 0, 0.0872871560943969, 0, -0.0475131096733199, 0.0167984210226323},
+      {-0.0577350269189626, 0, 0, 0.074535599249993, 0, 0, 0, 0, 0, 0.100790526135794},
+      {0.23094010767585, 0, 0.140545673785261, 0.0993807989999906, 0, 0, 0, 0, 0.1187827741833, -0.0671936840905293},
+      {0.230940107675851, 0.121716123890037, -0.0702728368926306, 0.0993807989999907, 0, 0, 0, 0.102868899974728, -0.0593913870916499, -0.0671936840905293},
+      {0.23094010767585, 0.121716123890037, 0.0702728368926307, -0.0993807989999907, 0, 0.100790526135794, -0.087287156094397, -0.0205737799949456, -0.01187827741833, 0.0167984210226323},
+      {0.23094010767585, -0.121716123890037, -0.0702728368926307, 0.0993807989999906, 0, 0, 0, -0.102868899974728, -0.0593913870916499, -0.0671936840905293},
+      {0.23094010767585, -0.121716123890037, 0.0702728368926306, -0.0993807989999906, 0, -0.100790526135794, -0.0872871560943969, 0.0205737799949456, -0.01187827741833, 0.0167984210226323},
+      {0.23094010767585, 0, -0.140545673785261, -0.0993807989999906, -0.130120009726471, 0, 0.0290957186981323, 0, 0.02375655483666, 0.0167984210226323}};
     
       // Interesting (new) part
       // Tables of derivatives of the polynomial base (transpose)
-      const static double dmats0[4][4] =   \
-      {{0, 0, 0, 0},
-      {6.32455532033676, 0, 0, 0},
-      {0, 0, 0, 0},
-      {0, 0, 0, 0}};
-    
-      const static double dmats1[4][4] =   \
-      {{0, 0, 0, 0},
-      {3.16227766016838, 0, 0, 0},
-      {5.47722557505166, 0, 0, 0},
-      {0, 0, 0, 0}};
-    
-      const static double dmats2[4][4] =   \
-      {{0, 0, 0, 0},
-      {3.16227766016838, 0, 0, 0},
-      {1.82574185835055, 0, 0, 0},
-      {5.16397779494322, 0, 0, 0}};
+      const static double dmats0[10][10] =   \
+      {{0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {6.32455532033676, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {0, 11.2249721603218, 0, 0, 0, 0, 0, 0, 0, 0},
+      {4.58257569495584, 0, 8.36660026534076, -1.18321595661992, 0, 0, 0, 0, 0, 0},
+      {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {3.74165738677394, 0, 0, 8.69482604771366, 0, 0, 0, 0, 0, 0},
+      {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
+    
+      const static double dmats1[10][10] =   \
+      {{0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {3.16227766016838, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {5.47722557505166, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {2.95803989154981, 5.61248608016091, -1.08012344973464, -0.763762615825974, 0, 0, 0, 0, 0, 0},
+      {2.29128784747792, 7.24568837309472, 4.18330013267038, -0.591607978309962, 0, 0, 0, 0, 0, 0},
+      {-2.64575131106459, 0, 9.66091783079296, 0.683130051063974, 0, 0, 0, 0, 0, 0},
+      {1.87082869338697, 0, 0, 4.34741302385683, 0, 0, 0, 0, 0, 0},
+      {3.24037034920393, 0, 0, 7.52994023880668, 0, 0, 0, 0, 0, 0},
+      {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
+    
+      const static double dmats2[10][10] =   \
+      {{0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {3.16227766016838, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {1.82574185835055, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {5.16397779494322, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+      {2.95803989154981, 5.61248608016091, -1.08012344973464, -0.763762615825974, 0, 0, 0, 0, 0, 0},
+      {2.29128784747792, 1.44913767461894, 4.18330013267038, -0.591607978309962, 0, 0, 0, 0, 0, 0},
+      {1.32287565553229, 0, 3.86436713231718, -0.341565025531986, 0, 0, 0, 0, 0, 0},
+      {1.87082869338697, 7.09929573971954, 0, 4.34741302385683, 0, 0, 0, 0, 0, 0},
+      {1.08012344973464, 0, 7.09929573971954, 2.50998007960223, 0, 0, 0, 0, 0, 0},
+      {-3.81881307912987, 0, 0, 8.87411967464942, 0, 0, 0, 0, 0, 0}};
     
       // Compute reference derivatives
       // Declare pointer to array of derivatives on FIAT element
@@ -15105,12 +18560,24 @@ void UFC_SolitaryWave3DLinearForm_finite
       double coeff0_1 = 0;
       double coeff0_2 = 0;
       double coeff0_3 = 0;
+      double coeff0_4 = 0;
+      double coeff0_5 = 0;
+      double coeff0_6 = 0;
+      double coeff0_7 = 0;
+      double coeff0_8 = 0;
+      double coeff0_9 = 0;
     
       // Declare new coefficients
       double new_coeff0_0 = 0;
       double new_coeff0_1 = 0;
       double new_coeff0_2 = 0;
       double new_coeff0_3 = 0;
+      double new_coeff0_4 = 0;
+      double new_coeff0_5 = 0;
+      double new_coeff0_6 = 0;
+      double new_coeff0_7 = 0;
+      double new_coeff0_8 = 0;
+      double new_coeff0_9 = 0;
     
       // Loop possible derivatives
       for (unsigned int deriv_num = 0; deriv_num < num_derivatives; deriv_num++)
@@ -15120,6 +18587,12 @@ void UFC_SolitaryWave3DLinearForm_finite
         new_coeff0_1 = coefficients0[dof][1];
         new_coeff0_2 = coefficients0[dof][2];
         new_coeff0_3 = coefficients0[dof][3];
+        new_coeff0_4 = coefficients0[dof][4];
+        new_coeff0_5 = coefficients0[dof][5];
+        new_coeff0_6 = coefficients0[dof][6];
+        new_coeff0_7 = coefficients0[dof][7];
+        new_coeff0_8 = coefficients0[dof][8];
+        new_coeff0_9 = coefficients0[dof][9];
     
         // Loop derivative order
         for (unsigned int j = 0; j < n; j++)
@@ -15129,32 +18602,56 @@ void UFC_SolitaryWave3DLinearForm_finite
           coeff0_1 = new_coeff0_1;
           coeff0_2 = new_coeff0_2;
           coeff0_3 = new_coeff0_3;
+          coeff0_4 = new_coeff0_4;
+          coeff0_5 = new_coeff0_5;
+          coeff0_6 = new_coeff0_6;
+          coeff0_7 = new_coeff0_7;
+          coeff0_8 = new_coeff0_8;
+          coeff0_9 = new_coeff0_9;
     
           if(combinations[deriv_num][j] == 0)
           {
-            new_coeff0_0 = coeff0_0*dmats0[0][0] + coeff0_1*dmats0[1][0] + coeff0_2*dmats0[2][0] + coeff0_3*dmats0[3][0];
-            new_coeff0_1 = coeff0_0*dmats0[0][1] + coeff0_1*dmats0[1][1] + coeff0_2*dmats0[2][1] + coeff0_3*dmats0[3][1];
-            new_coeff0_2 = coeff0_0*dmats0[0][2] + coeff0_1*dmats0[1][2] + coeff0_2*dmats0[2][2] + coeff0_3*dmats0[3][2];
-            new_coeff0_3 = coeff0_0*dmats0[0][3] + coeff0_1*dmats0[1][3] + coeff0_2*dmats0[2][3] + coeff0_3*dmats0[3][3];
+            new_coeff0_0 = coeff0_0*dmats0[0][0] + coeff0_1*dmats0[1][0] + coeff0_2*dmats0[2][0] + coeff0_3*dmats0[3][0] + coeff0_4*dmats0[4][0] + coeff0_5*dmats0[5][0] + coeff0_6*dmats0[6][0] + coeff0_7*dmats0[7][0] + coeff0_8*dmats0[8][0] + coeff0_9*dmats0[9][0];
+            new_coeff0_1 = coeff0_0*dmats0[0][1] + coeff0_1*dmats0[1][1] + coeff0_2*dmats0[2][1] + coeff0_3*dmats0[3][1] + coeff0_4*dmats0[4][1] + coeff0_5*dmats0[5][1] + coeff0_6*dmats0[6][1] + coeff0_7*dmats0[7][1] + coeff0_8*dmats0[8][1] + coeff0_9*dmats0[9][1];
+            new_coeff0_2 = coeff0_0*dmats0[0][2] + coeff0_1*dmats0[1][2] + coeff0_2*dmats0[2][2] + coeff0_3*dmats0[3][2] + coeff0_4*dmats0[4][2] + coeff0_5*dmats0[5][2] + coeff0_6*dmats0[6][2] + coeff0_7*dmats0[7][2] + coeff0_8*dmats0[8][2] + coeff0_9*dmats0[9][2];
+            new_coeff0_3 = coeff0_0*dmats0[0][3] + coeff0_1*dmats0[1][3] + coeff0_2*dmats0[2][3] + coeff0_3*dmats0[3][3] + coeff0_4*dmats0[4][3] + coeff0_5*dmats0[5][3] + coeff0_6*dmats0[6][3] + coeff0_7*dmats0[7][3] + coeff0_8*dmats0[8][3] + coeff0_9*dmats0[9][3];
+            new_coeff0_4 = coeff0_0*dmats0[0][4] + coeff0_1*dmats0[1][4] + coeff0_2*dmats0[2][4] + coeff0_3*dmats0[3][4] + coeff0_4*dmats0[4][4] + coeff0_5*dmats0[5][4] + coeff0_6*dmats0[6][4] + coeff0_7*dmats0[7][4] + coeff0_8*dmats0[8][4] + coeff0_9*dmats0[9][4];
+            new_coeff0_5 = coeff0_0*dmats0[0][5] + coeff0_1*dmats0[1][5] + coeff0_2*dmats0[2][5] + coeff0_3*dmats0[3][5] + coeff0_4*dmats0[4][5] + coeff0_5*dmats0[5][5] + coeff0_6*dmats0[6][5] + coeff0_7*dmats0[7][5] + coeff0_8*dmats0[8][5] + coeff0_9*dmats0[9][5];
+            new_coeff0_6 = coeff0_0*dmats0[0][6] + coeff0_1*dmats0[1][6] + coeff0_2*dmats0[2][6] + coeff0_3*dmats0[3][6] + coeff0_4*dmats0[4][6] + coeff0_5*dmats0[5][6] + coeff0_6*dmats0[6][6] + coeff0_7*dmats0[7][6] + coeff0_8*dmats0[8][6] + coeff0_9*dmats0[9][6];
+            new_coeff0_7 = coeff0_0*dmats0[0][7] + coeff0_1*dmats0[1][7] + coeff0_2*dmats0[2][7] + coeff0_3*dmats0[3][7] + coeff0_4*dmats0[4][7] + coeff0_5*dmats0[5][7] + coeff0_6*dmats0[6][7] + coeff0_7*dmats0[7][7] + coeff0_8*dmats0[8][7] + coeff0_9*dmats0[9][7];
+            new_coeff0_8 = coeff0_0*dmats0[0][8] + coeff0_1*dmats0[1][8] + coeff0_2*dmats0[2][8] + coeff0_3*dmats0[3][8] + coeff0_4*dmats0[4][8] + coeff0_5*dmats0[5][8] + coeff0_6*dmats0[6][8] + coeff0_7*dmats0[7][8] + coeff0_8*dmats0[8][8] + coeff0_9*dmats0[9][8];
+            new_coeff0_9 = coeff0_0*dmats0[0][9] + coeff0_1*dmats0[1][9] + coeff0_2*dmats0[2][9] + coeff0_3*dmats0[3][9] + coeff0_4*dmats0[4][9] + coeff0_5*dmats0[5][9] + coeff0_6*dmats0[6][9] + coeff0_7*dmats0[7][9] + coeff0_8*dmats0[8][9] + coeff0_9*dmats0[9][9];
           }
           if(combinations[deriv_num][j] == 1)
           {
-            new_coeff0_0 = coeff0_0*dmats1[0][0] + coeff0_1*dmats1[1][0] + coeff0_2*dmats1[2][0] + coeff0_3*dmats1[3][0];
-            new_coeff0_1 = coeff0_0*dmats1[0][1] + coeff0_1*dmats1[1][1] + coeff0_2*dmats1[2][1] + coeff0_3*dmats1[3][1];
-            new_coeff0_2 = coeff0_0*dmats1[0][2] + coeff0_1*dmats1[1][2] + coeff0_2*dmats1[2][2] + coeff0_3*dmats1[3][2];
-            new_coeff0_3 = coeff0_0*dmats1[0][3] + coeff0_1*dmats1[1][3] + coeff0_2*dmats1[2][3] + coeff0_3*dmats1[3][3];
+            new_coeff0_0 = coeff0_0*dmats1[0][0] + coeff0_1*dmats1[1][0] + coeff0_2*dmats1[2][0] + coeff0_3*dmats1[3][0] + coeff0_4*dmats1[4][0] + coeff0_5*dmats1[5][0] + coeff0_6*dmats1[6][0] + coeff0_7*dmats1[7][0] + coeff0_8*dmats1[8][0] + coeff0_9*dmats1[9][0];
+            new_coeff0_1 = coeff0_0*dmats1[0][1] + coeff0_1*dmats1[1][1] + coeff0_2*dmats1[2][1] + coeff0_3*dmats1[3][1] + coeff0_4*dmats1[4][1] + coeff0_5*dmats1[5][1] + coeff0_6*dmats1[6][1] + coeff0_7*dmats1[7][1] + coeff0_8*dmats1[8][1] + coeff0_9*dmats1[9][1];
+            new_coeff0_2 = coeff0_0*dmats1[0][2] + coeff0_1*dmats1[1][2] + coeff0_2*dmats1[2][2] + coeff0_3*dmats1[3][2] + coeff0_4*dmats1[4][2] + coeff0_5*dmats1[5][2] + coeff0_6*dmats1[6][2] + coeff0_7*dmats1[7][2] + coeff0_8*dmats1[8][2] + coeff0_9*dmats1[9][2];
+            new_coeff0_3 = coeff0_0*dmats1[0][3] + coeff0_1*dmats1[1][3] + coeff0_2*dmats1[2][3] + coeff0_3*dmats1[3][3] + coeff0_4*dmats1[4][3] + coeff0_5*dmats1[5][3] + coeff0_6*dmats1[6][3] + coeff0_7*dmats1[7][3] + coeff0_8*dmats1[8][3] + coeff0_9*dmats1[9][3];
+            new_coeff0_4 = coeff0_0*dmats1[0][4] + coeff0_1*dmats1[1][4] + coeff0_2*dmats1[2][4] + coeff0_3*dmats1[3][4] + coeff0_4*dmats1[4][4] + coeff0_5*dmats1[5][4] + coeff0_6*dmats1[6][4] + coeff0_7*dmats1[7][4] + coeff0_8*dmats1[8][4] + coeff0_9*dmats1[9][4];
+            new_coeff0_5 = coeff0_0*dmats1[0][5] + coeff0_1*dmats1[1][5] + coeff0_2*dmats1[2][5] + coeff0_3*dmats1[3][5] + coeff0_4*dmats1[4][5] + coeff0_5*dmats1[5][5] + coeff0_6*dmats1[6][5] + coeff0_7*dmats1[7][5] + coeff0_8*dmats1[8][5] + coeff0_9*dmats1[9][5];
+            new_coeff0_6 = coeff0_0*dmats1[0][6] + coeff0_1*dmats1[1][6] + coeff0_2*dmats1[2][6] + coeff0_3*dmats1[3][6] + coeff0_4*dmats1[4][6] + coeff0_5*dmats1[5][6] + coeff0_6*dmats1[6][6] + coeff0_7*dmats1[7][6] + coeff0_8*dmats1[8][6] + coeff0_9*dmats1[9][6];
+            new_coeff0_7 = coeff0_0*dmats1[0][7] + coeff0_1*dmats1[1][7] + coeff0_2*dmats1[2][7] + coeff0_3*dmats1[3][7] + coeff0_4*dmats1[4][7] + coeff0_5*dmats1[5][7] + coeff0_6*dmats1[6][7] + coeff0_7*dmats1[7][7] + coeff0_8*dmats1[8][7] + coeff0_9*dmats1[9][7];
+            new_coeff0_8 = coeff0_0*dmats1[0][8] + coeff0_1*dmats1[1][8] + coeff0_2*dmats1[2][8] + coeff0_3*dmats1[3][8] + coeff0_4*dmats1[4][8] + coeff0_5*dmats1[5][8] + coeff0_6*dmats1[6][8] + coeff0_7*dmats1[7][8] + coeff0_8*dmats1[8][8] + coeff0_9*dmats1[9][8];
+            new_coeff0_9 = coeff0_0*dmats1[0][9] + coeff0_1*dmats1[1][9] + coeff0_2*dmats1[2][9] + coeff0_3*dmats1[3][9] + coeff0_4*dmats1[4][9] + coeff0_5*dmats1[5][9] + coeff0_6*dmats1[6][9] + coeff0_7*dmats1[7][9] + coeff0_8*dmats1[8][9] + coeff0_9*dmats1[9][9];
           }
           if(combinations[deriv_num][j] == 2)
           {
-            new_coeff0_0 = coeff0_0*dmats2[0][0] + coeff0_1*dmats2[1][0] + coeff0_2*dmats2[2][0] + coeff0_3*dmats2[3][0];
-            new_coeff0_1 = coeff0_0*dmats2[0][1] + coeff0_1*dmats2[1][1] + coeff0_2*dmats2[2][1] + coeff0_3*dmats2[3][1];
-            new_coeff0_2 = coeff0_0*dmats2[0][2] + coeff0_1*dmats2[1][2] + coeff0_2*dmats2[2][2] + coeff0_3*dmats2[3][2];
-            new_coeff0_3 = coeff0_0*dmats2[0][3] + coeff0_1*dmats2[1][3] + coeff0_2*dmats2[2][3] + coeff0_3*dmats2[3][3];
+            new_coeff0_0 = coeff0_0*dmats2[0][0] + coeff0_1*dmats2[1][0] + coeff0_2*dmats2[2][0] + coeff0_3*dmats2[3][0] + coeff0_4*dmats2[4][0] + coeff0_5*dmats2[5][0] + coeff0_6*dmats2[6][0] + coeff0_7*dmats2[7][0] + coeff0_8*dmats2[8][0] + coeff0_9*dmats2[9][0];
+            new_coeff0_1 = coeff0_0*dmats2[0][1] + coeff0_1*dmats2[1][1] + coeff0_2*dmats2[2][1] + coeff0_3*dmats2[3][1] + coeff0_4*dmats2[4][1] + coeff0_5*dmats2[5][1] + coeff0_6*dmats2[6][1] + coeff0_7*dmats2[7][1] + coeff0_8*dmats2[8][1] + coeff0_9*dmats2[9][1];
+            new_coeff0_2 = coeff0_0*dmats2[0][2] + coeff0_1*dmats2[1][2] + coeff0_2*dmats2[2][2] + coeff0_3*dmats2[3][2] + coeff0_4*dmats2[4][2] + coeff0_5*dmats2[5][2] + coeff0_6*dmats2[6][2] + coeff0_7*dmats2[7][2] + coeff0_8*dmats2[8][2] + coeff0_9*dmats2[9][2];
+            new_coeff0_3 = coeff0_0*dmats2[0][3] + coeff0_1*dmats2[1][3] + coeff0_2*dmats2[2][3] + coeff0_3*dmats2[3][3] + coeff0_4*dmats2[4][3] + coeff0_5*dmats2[5][3] + coeff0_6*dmats2[6][3] + coeff0_7*dmats2[7][3] + coeff0_8*dmats2[8][3] + coeff0_9*dmats2[9][3];
+            new_coeff0_4 = coeff0_0*dmats2[0][4] + coeff0_1*dmats2[1][4] + coeff0_2*dmats2[2][4] + coeff0_3*dmats2[3][4] + coeff0_4*dmats2[4][4] + coeff0_5*dmats2[5][4] + coeff0_6*dmats2[6][4] + coeff0_7*dmats2[7][4] + coeff0_8*dmats2[8][4] + coeff0_9*dmats2[9][4];
+            new_coeff0_5 = coeff0_0*dmats2[0][5] + coeff0_1*dmats2[1][5] + coeff0_2*dmats2[2][5] + coeff0_3*dmats2[3][5] + coeff0_4*dmats2[4][5] + coeff0_5*dmats2[5][5] + coeff0_6*dmats2[6][5] + coeff0_7*dmats2[7][5] + coeff0_8*dmats2[8][5] + coeff0_9*dmats2[9][5];
+            new_coeff0_6 = coeff0_0*dmats2[0][6] + coeff0_1*dmats2[1][6] + coeff0_2*dmats2[2][6] + coeff0_3*dmats2[3][6] + coeff0_4*dmats2[4][6] + coeff0_5*dmats2[5][6] + coeff0_6*dmats2[6][6] + coeff0_7*dmats2[7][6] + coeff0_8*dmats2[8][6] + coeff0_9*dmats2[9][6];
+            new_coeff0_7 = coeff0_0*dmats2[0][7] + coeff0_1*dmats2[1][7] + coeff0_2*dmats2[2][7] + coeff0_3*dmats2[3][7] + coeff0_4*dmats2[4][7] + coeff0_5*dmats2[5][7] + coeff0_6*dmats2[6][7] + coeff0_7*dmats2[7][7] + coeff0_8*dmats2[8][7] + coeff0_9*dmats2[9][7];
+            new_coeff0_8 = coeff0_0*dmats2[0][8] + coeff0_1*dmats2[1][8] + coeff0_2*dmats2[2][8] + coeff0_3*dmats2[3][8] + coeff0_4*dmats2[4][8] + coeff0_5*dmats2[5][8] + coeff0_6*dmats2[6][8] + coeff0_7*dmats2[7][8] + coeff0_8*dmats2[8][8] + coeff0_9*dmats2[9][8];
+            new_coeff0_9 = coeff0_0*dmats2[0][9] + coeff0_1*dmats2[1][9] + coeff0_2*dmats2[2][9] + coeff0_3*dmats2[3][9] + coeff0_4*dmats2[4][9] + coeff0_5*dmats2[5][9] + coeff0_6*dmats2[6][9] + coeff0_7*dmats2[7][9] + coeff0_8*dmats2[8][9] + coeff0_9*dmats2[9][9];
           }
     
         }
         // Compute derivatives on reference element as dot product of coefficients and basisvalues
-        derivatives[deriv_num] = new_coeff0_0*basisvalue0 + new_coeff0_1*basisvalue1 + new_coeff0_2*basisvalue2 + new_coeff0_3*basisvalue3;
+        derivatives[deriv_num] = new_coeff0_0*basisvalue0 + new_coeff0_1*basisvalue1 + new_coeff0_2*basisvalue2 + new_coeff0_3*basisvalue3 + new_coeff0_4*basisvalue4 + new_coeff0_5*basisvalue5 + new_coeff0_6*basisvalue6 + new_coeff0_7*basisvalue7 + new_coeff0_8*basisvalue8 + new_coeff0_9*basisvalue9;
       }
     
       // Transform derivatives back to physical element
@@ -15196,9 +18693,9 @@ double UFC_SolitaryWave3DLinearForm_fini
                                    const ufc::cell& c) const
 {
     // The reference points, direction and weights:
-    const static double X[8][1][3] = {{{0, 0, 0}}, {{1, 0, 0}}, {{0, 1, 0}}, {{0, 0, 1}}, {{0, 0, 0}}, {{1, 0, 0}}, {{0, 1, 0}}, {{0, 0, 1}}};
-    const static double W[8][1] = {{1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}};
-    const static double D[8][1][2] = {{{1, 0}}, {{1, 0}}, {{1, 0}}, {{1, 0}}, {{0, 1}}, {{0, 1}}, {{0, 1}}, {{0, 1}}};
+    const static double X[20][1][3] = {{{0, 0, 0}}, {{1, 0, 0}}, {{0, 1, 0}}, {{0, 0, 1}}, {{0, 0.5, 0.5}}, {{0.5, 0, 0.5}}, {{0.5, 0.5, 0}}, {{0, 0, 0.5}}, {{0, 0.5, 0}}, {{0.5, 0, 0}}, {{0, 0, 0}}, {{1, 0, 0}}, {{0, 1, 0}}, {{0, 0, 1}}, {{0, 0.5, 0.5}}, {{0.5, 0, 0.5}}, {{0.5, 0.5, 0}}, {{0, 0, 0.5}}, {{0, 0.5, 0}}, {{0.5, 0, 0}}};
+    const static double W[20][1] = {{1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}};
+    const static double D[20][1][2] = {{{1, 0}}, {{1, 0}}, {{1, 0}}, {{1, 0}}, {{1, 0}}, {{1, 0}}, {{1, 0}}, {{1, 0}}, {{1, 0}}, {{1, 0}}, {{0, 1}}, {{0, 1}}, {{0, 1}}, {{0, 1}}, {{0, 1}}, {{0, 1}}, {{0, 1}}, {{0, 1}}, {{0, 1}}, {{0, 1}}};
     
     const double * const * x = c.coordinates;
     double result = 0.0;
@@ -15252,10 +18749,10 @@ void UFC_SolitaryWave3DLinearForm_finite
     vertex_values[4] = dof_values[2];
     vertex_values[6] = dof_values[3];
     // Evaluate at vertices and use affine mapping
-    vertex_values[1] = dof_values[4];
-    vertex_values[3] = dof_values[5];
-    vertex_values[5] = dof_values[6];
-    vertex_values[7] = dof_values[7];
+    vertex_values[1] = dof_values[10];
+    vertex_values[3] = dof_values[11];
+    vertex_values[5] = dof_values[12];
+    vertex_values[7] = dof_values[13];
 }
 
 /// Return the number of sub elements (for a mixed element)
@@ -18358,7 +21855,7 @@ UFC_SolitaryWave3DLinearForm_dof_map_0_0
 /// Return a string identifying the dof map
 const char* UFC_SolitaryWave3DLinearForm_dof_map_0_0::signature() const
 {
-    return "FFC dof map for FiniteElement('Lagrange', 'tetrahedron', 1)";
+    return "FFC dof map for FiniteElement('Lagrange', 'tetrahedron', 2)";
 }
 
 /// Return true iff mesh entities of topological dimension d are needed
@@ -18370,7 +21867,7 @@ bool UFC_SolitaryWave3DLinearForm_dof_ma
       return true;
       break;
     case 1:
-      return false;
+      return true;
       break;
     case 2:
       return false;
@@ -18385,7 +21882,7 @@ bool UFC_SolitaryWave3DLinearForm_dof_ma
 /// Initialize dof map for mesh (return true iff init_cell() is needed)
 bool UFC_SolitaryWave3DLinearForm_dof_map_0_0::init_mesh(const ufc::mesh& m)
 {
-    __global_dimension = m.num_entities[0];
+    __global_dimension = m.num_entities[0] + m.num_entities[1];
     return false;
 }
 
@@ -18411,7 +21908,7 @@ unsigned int UFC_SolitaryWave3DLinearFor
 /// Return the dimension of the local finite element function space
 unsigned int UFC_SolitaryWave3DLinearForm_dof_map_0_0::local_dimension() const
 {
-    return 4;
+    return 10;
 }
 
 // Return the geometric dimension of the coordinates this dof map provides
@@ -18423,7 +21920,7 @@ unsigned int UFC_SolitaryWave3DLinearFor
 /// Return the number of dofs on each cell facet
 unsigned int UFC_SolitaryWave3DLinearForm_dof_map_0_0::num_facet_dofs() const
 {
-    return 3;
+    return 6;
 }
 
 /// Return the number of dofs associated with each cell entity of dimension d
@@ -18441,6 +21938,13 @@ void UFC_SolitaryWave3DLinearForm_dof_ma
     dofs[1] = c.entity_indices[0][1];
     dofs[2] = c.entity_indices[0][2];
     dofs[3] = c.entity_indices[0][3];
+    unsigned int offset = m.num_entities[0];
+    dofs[4] = offset + c.entity_indices[1][0];
+    dofs[5] = offset + c.entity_indices[1][1];
+    dofs[6] = offset + c.entity_indices[1][2];
+    dofs[7] = offset + c.entity_indices[1][3];
+    dofs[8] = offset + c.entity_indices[1][4];
+    dofs[9] = offset + c.entity_indices[1][5];
 }
 
 /// Tabulate the local-to-local mapping from facet dofs to cell dofs
@@ -18453,21 +21957,33 @@ void UFC_SolitaryWave3DLinearForm_dof_ma
       dofs[0] = 1;
       dofs[1] = 2;
       dofs[2] = 3;
-      break;
-    case 1:
-      dofs[0] = 0;
-      dofs[1] = 2;
-      dofs[2] = 3;
-      break;
-    case 2:
-      dofs[0] = 0;
-      dofs[1] = 1;
-      dofs[2] = 3;
+      dofs[3] = 4;
+      dofs[4] = 5;
+      dofs[5] = 6;
+      break;
+    case 1:
+      dofs[0] = 0;
+      dofs[1] = 2;
+      dofs[2] = 3;
+      dofs[3] = 4;
+      dofs[4] = 7;
+      dofs[5] = 8;
+      break;
+    case 2:
+      dofs[0] = 0;
+      dofs[1] = 1;
+      dofs[2] = 3;
+      dofs[3] = 5;
+      dofs[4] = 7;
+      dofs[5] = 9;
       break;
     case 3:
       dofs[0] = 0;
       dofs[1] = 1;
       dofs[2] = 2;
+      dofs[3] = 6;
+      dofs[4] = 8;
+      dofs[5] = 9;
       break;
     }
 }
@@ -18496,6 +22012,24 @@ void UFC_SolitaryWave3DLinearForm_dof_ma
     coordinates[3][0] = x[3][0];
     coordinates[3][1] = x[3][1];
     coordinates[3][2] = x[3][2];
+    coordinates[4][0] = 0.5*x[2][0] + 0.5*x[3][0];
+    coordinates[4][1] = 0.5*x[2][1] + 0.5*x[3][1];
+    coordinates[4][2] = 0.5*x[2][2] + 0.5*x[3][2];
+    coordinates[5][0] = 0.5*x[1][0] + 0.5*x[3][0];
+    coordinates[5][1] = 0.5*x[1][1] + 0.5*x[3][1];
+    coordinates[5][2] = 0.5*x[1][2] + 0.5*x[3][2];
+    coordinates[6][0] = 0.5*x[1][0] + 0.5*x[2][0];
+    coordinates[6][1] = 0.5*x[1][1] + 0.5*x[2][1];
+    coordinates[6][2] = 0.5*x[1][2] + 0.5*x[2][2];
+    coordinates[7][0] = 0.5*x[0][0] + 0.5*x[3][0];
+    coordinates[7][1] = 0.5*x[0][1] + 0.5*x[3][1];
+    coordinates[7][2] = 0.5*x[0][2] + 0.5*x[3][2];
+    coordinates[8][0] = 0.5*x[0][0] + 0.5*x[2][0];
+    coordinates[8][1] = 0.5*x[0][1] + 0.5*x[2][1];
+    coordinates[8][2] = 0.5*x[0][2] + 0.5*x[2][2];
+    coordinates[9][0] = 0.5*x[0][0] + 0.5*x[1][0];
+    coordinates[9][1] = 0.5*x[0][1] + 0.5*x[1][1];
+    coordinates[9][2] = 0.5*x[0][2] + 0.5*x[1][2];
 }
 
 /// Return the number of sub dof maps (for a mixed element)
@@ -18526,7 +22060,7 @@ UFC_SolitaryWave3DLinearForm_dof_map_0_1
 /// Return a string identifying the dof map
 const char* UFC_SolitaryWave3DLinearForm_dof_map_0_1::signature() const
 {
-    return "FFC dof map for FiniteElement('Lagrange', 'tetrahedron', 1)";
+    return "FFC dof map for FiniteElement('Lagrange', 'tetrahedron', 2)";
 }
 
 /// Return true iff mesh entities of topological dimension d are needed
@@ -18538,7 +22072,7 @@ bool UFC_SolitaryWave3DLinearForm_dof_ma
       return true;
       break;
     case 1:
-      return false;
+      return true;
       break;
     case 2:
       return false;
@@ -18553,7 +22087,7 @@ bool UFC_SolitaryWave3DLinearForm_dof_ma
 /// Initialize dof map for mesh (return true iff init_cell() is needed)
 bool UFC_SolitaryWave3DLinearForm_dof_map_0_1::init_mesh(const ufc::mesh& m)
 {
-    __global_dimension = m.num_entities[0];
+    __global_dimension = m.num_entities[0] + m.num_entities[1];
     return false;
 }
 
@@ -18579,7 +22113,7 @@ unsigned int UFC_SolitaryWave3DLinearFor
 /// Return the dimension of the local finite element function space
 unsigned int UFC_SolitaryWave3DLinearForm_dof_map_0_1::local_dimension() const
 {
-    return 4;
+    return 10;
 }
 
 // Return the geometric dimension of the coordinates this dof map provides
@@ -18591,7 +22125,7 @@ unsigned int UFC_SolitaryWave3DLinearFor
 /// Return the number of dofs on each cell facet
 unsigned int UFC_SolitaryWave3DLinearForm_dof_map_0_1::num_facet_dofs() const
 {
-    return 3;
+    return 6;
 }
 
 /// Return the number of dofs associated with each cell entity of dimension d
@@ -18609,6 +22143,13 @@ void UFC_SolitaryWave3DLinearForm_dof_ma
     dofs[1] = c.entity_indices[0][1];
     dofs[2] = c.entity_indices[0][2];
     dofs[3] = c.entity_indices[0][3];
+    unsigned int offset = m.num_entities[0];
+    dofs[4] = offset + c.entity_indices[1][0];
+    dofs[5] = offset + c.entity_indices[1][1];
+    dofs[6] = offset + c.entity_indices[1][2];
+    dofs[7] = offset + c.entity_indices[1][3];
+    dofs[8] = offset + c.entity_indices[1][4];
+    dofs[9] = offset + c.entity_indices[1][5];
 }
 
 /// Tabulate the local-to-local mapping from facet dofs to cell dofs
@@ -18621,21 +22162,33 @@ void UFC_SolitaryWave3DLinearForm_dof_ma
       dofs[0] = 1;
       dofs[1] = 2;
       dofs[2] = 3;
-      break;
-    case 1:
-      dofs[0] = 0;
-      dofs[1] = 2;
-      dofs[2] = 3;
-      break;
-    case 2:
-      dofs[0] = 0;
-      dofs[1] = 1;
-      dofs[2] = 3;
+      dofs[3] = 4;
+      dofs[4] = 5;
+      dofs[5] = 6;
+      break;
+    case 1:
+      dofs[0] = 0;
+      dofs[1] = 2;
+      dofs[2] = 3;
+      dofs[3] = 4;
+      dofs[4] = 7;
+      dofs[5] = 8;
+      break;
+    case 2:
+      dofs[0] = 0;
+      dofs[1] = 1;
+      dofs[2] = 3;
+      dofs[3] = 5;
+      dofs[4] = 7;
+      dofs[5] = 9;
       break;
     case 3:
       dofs[0] = 0;
       dofs[1] = 1;
       dofs[2] = 2;
+      dofs[3] = 6;
+      dofs[4] = 8;
+      dofs[5] = 9;
       break;
     }
 }
@@ -18664,6 +22217,24 @@ void UFC_SolitaryWave3DLinearForm_dof_ma
     coordinates[3][0] = x[3][0];
     coordinates[3][1] = x[3][1];
     coordinates[3][2] = x[3][2];
+    coordinates[4][0] = 0.5*x[2][0] + 0.5*x[3][0];
+    coordinates[4][1] = 0.5*x[2][1] + 0.5*x[3][1];
+    coordinates[4][2] = 0.5*x[2][2] + 0.5*x[3][2];
+    coordinates[5][0] = 0.5*x[1][0] + 0.5*x[3][0];
+    coordinates[5][1] = 0.5*x[1][1] + 0.5*x[3][1];
+    coordinates[5][2] = 0.5*x[1][2] + 0.5*x[3][2];
+    coordinates[6][0] = 0.5*x[1][0] + 0.5*x[2][0];
+    coordinates[6][1] = 0.5*x[1][1] + 0.5*x[2][1];
+    coordinates[6][2] = 0.5*x[1][2] + 0.5*x[2][2];
+    coordinates[7][0] = 0.5*x[0][0] + 0.5*x[3][0];
+    coordinates[7][1] = 0.5*x[0][1] + 0.5*x[3][1];
+    coordinates[7][2] = 0.5*x[0][2] + 0.5*x[3][2];
+    coordinates[8][0] = 0.5*x[0][0] + 0.5*x[2][0];
+    coordinates[8][1] = 0.5*x[0][1] + 0.5*x[2][1];
+    coordinates[8][2] = 0.5*x[0][2] + 0.5*x[2][2];
+    coordinates[9][0] = 0.5*x[0][0] + 0.5*x[1][0];
+    coordinates[9][1] = 0.5*x[0][1] + 0.5*x[1][1];
+    coordinates[9][2] = 0.5*x[0][2] + 0.5*x[1][2];
 }
 
 /// Return the number of sub dof maps (for a mixed element)
@@ -18694,7 +22265,7 @@ UFC_SolitaryWave3DLinearForm_dof_map_0::
 /// Return a string identifying the dof map
 const char* UFC_SolitaryWave3DLinearForm_dof_map_0::signature() const
 {
-    return "FFC dof map for MixedElement([FiniteElement('Lagrange', 'tetrahedron', 1), FiniteElement('Lagrange', 'tetrahedron', 1)])";
+    return "FFC dof map for MixedElement([FiniteElement('Lagrange', 'tetrahedron', 2), FiniteElement('Lagrange', 'tetrahedron', 2)])";
 }
 
 /// Return true iff mesh entities of topological dimension d are needed
@@ -18706,7 +22277,7 @@ bool UFC_SolitaryWave3DLinearForm_dof_ma
       return true;
       break;
     case 1:
-      return false;
+      return true;
       break;
     case 2:
       return false;
@@ -18721,7 +22292,7 @@ bool UFC_SolitaryWave3DLinearForm_dof_ma
 /// Initialize dof map for mesh (return true iff init_cell() is needed)
 bool UFC_SolitaryWave3DLinearForm_dof_map_0::init_mesh(const ufc::mesh& m)
 {
-    __global_dimension = 2*m.num_entities[0];
+    __global_dimension = 2*m.num_entities[0] + 2*m.num_entities[1];
     return false;
 }
 
@@ -18747,7 +22318,7 @@ unsigned int UFC_SolitaryWave3DLinearFor
 /// Return the dimension of the local finite element function space
 unsigned int UFC_SolitaryWave3DLinearForm_dof_map_0::local_dimension() const
 {
-    return 8;
+    return 20;
 }
 
 // Return the geometric dimension of the coordinates this dof map provides
@@ -18759,7 +22330,7 @@ unsigned int UFC_SolitaryWave3DLinearFor
 /// Return the number of dofs on each cell facet
 unsigned int UFC_SolitaryWave3DLinearForm_dof_map_0::num_facet_dofs() const
 {
-    return 6;
+    return 12;
 }
 
 /// Return the number of dofs associated with each cell entity of dimension d
@@ -18778,10 +22349,24 @@ void UFC_SolitaryWave3DLinearForm_dof_ma
     dofs[2] = c.entity_indices[0][2];
     dofs[3] = c.entity_indices[0][3];
     unsigned int offset = m.num_entities[0];
-    dofs[4] = offset + c.entity_indices[0][0];
-    dofs[5] = offset + c.entity_indices[0][1];
-    dofs[6] = offset + c.entity_indices[0][2];
-    dofs[7] = offset + c.entity_indices[0][3];
+    dofs[4] = offset + c.entity_indices[1][0];
+    dofs[5] = offset + c.entity_indices[1][1];
+    dofs[6] = offset + c.entity_indices[1][2];
+    dofs[7] = offset + c.entity_indices[1][3];
+    dofs[8] = offset + c.entity_indices[1][4];
+    dofs[9] = offset + c.entity_indices[1][5];
+    offset = offset + m.num_entities[1];
+    dofs[10] = offset + c.entity_indices[0][0];
+    dofs[11] = offset + c.entity_indices[0][1];
+    dofs[12] = offset + c.entity_indices[0][2];
+    dofs[13] = offset + c.entity_indices[0][3];
+    offset = offset + m.num_entities[0];
+    dofs[14] = offset + c.entity_indices[1][0];
+    dofs[15] = offset + c.entity_indices[1][1];
+    dofs[16] = offset + c.entity_indices[1][2];
+    dofs[17] = offset + c.entity_indices[1][3];
+    dofs[18] = offset + c.entity_indices[1][4];
+    dofs[19] = offset + c.entity_indices[1][5];
 }
 
 /// Tabulate the local-to-local mapping from facet dofs to cell dofs
@@ -18794,33 +22379,57 @@ void UFC_SolitaryWave3DLinearForm_dof_ma
       dofs[0] = 1;
       dofs[1] = 2;
       dofs[2] = 3;
-      dofs[3] = 5;
-      dofs[4] = 6;
-      dofs[5] = 7;
-      break;
-    case 1:
-      dofs[0] = 0;
-      dofs[1] = 2;
-      dofs[2] = 3;
-      dofs[3] = 4;
-      dofs[4] = 6;
-      dofs[5] = 7;
-      break;
-    case 2:
-      dofs[0] = 0;
-      dofs[1] = 1;
-      dofs[2] = 3;
-      dofs[3] = 4;
-      dofs[4] = 5;
-      dofs[5] = 7;
-      break;
-    case 3:
-      dofs[0] = 0;
-      dofs[1] = 1;
-      dofs[2] = 2;
       dofs[3] = 4;
       dofs[4] = 5;
       dofs[5] = 6;
+      dofs[6] = 11;
+      dofs[7] = 12;
+      dofs[8] = 13;
+      dofs[9] = 14;
+      dofs[10] = 15;
+      dofs[11] = 16;
+      break;
+    case 1:
+      dofs[0] = 0;
+      dofs[1] = 2;
+      dofs[2] = 3;
+      dofs[3] = 4;
+      dofs[4] = 7;
+      dofs[5] = 8;
+      dofs[6] = 10;
+      dofs[7] = 12;
+      dofs[8] = 13;
+      dofs[9] = 14;
+      dofs[10] = 17;
+      dofs[11] = 18;
+      break;
+    case 2:
+      dofs[0] = 0;
+      dofs[1] = 1;
+      dofs[2] = 3;
+      dofs[3] = 5;
+      dofs[4] = 7;
+      dofs[5] = 9;
+      dofs[6] = 10;
+      dofs[7] = 11;
+      dofs[8] = 13;
+      dofs[9] = 15;
+      dofs[10] = 17;
+      dofs[11] = 19;
+      break;
+    case 3:
+      dofs[0] = 0;
+      dofs[1] = 1;
+      dofs[2] = 2;
+      dofs[3] = 6;
+      dofs[4] = 8;
+      dofs[5] = 9;
+      dofs[6] = 10;
+      dofs[7] = 11;
+      dofs[8] = 12;
+      dofs[9] = 16;
+      dofs[10] = 18;
+      dofs[11] = 19;
       break;
     }
 }
@@ -18849,18 +22458,54 @@ void UFC_SolitaryWave3DLinearForm_dof_ma
     coordinates[3][0] = x[3][0];
     coordinates[3][1] = x[3][1];
     coordinates[3][2] = x[3][2];
-    coordinates[4][0] = x[0][0];
-    coordinates[4][1] = x[0][1];
-    coordinates[4][2] = x[0][2];
-    coordinates[5][0] = x[1][0];
-    coordinates[5][1] = x[1][1];
-    coordinates[5][2] = x[1][2];
-    coordinates[6][0] = x[2][0];
-    coordinates[6][1] = x[2][1];
-    coordinates[6][2] = x[2][2];
-    coordinates[7][0] = x[3][0];
-    coordinates[7][1] = x[3][1];
-    coordinates[7][2] = x[3][2];
+    coordinates[4][0] = 0.5*x[2][0] + 0.5*x[3][0];
+    coordinates[4][1] = 0.5*x[2][1] + 0.5*x[3][1];
+    coordinates[4][2] = 0.5*x[2][2] + 0.5*x[3][2];
+    coordinates[5][0] = 0.5*x[1][0] + 0.5*x[3][0];
+    coordinates[5][1] = 0.5*x[1][1] + 0.5*x[3][1];
+    coordinates[5][2] = 0.5*x[1][2] + 0.5*x[3][2];
+    coordinates[6][0] = 0.5*x[1][0] + 0.5*x[2][0];
+    coordinates[6][1] = 0.5*x[1][1] + 0.5*x[2][1];
+    coordinates[6][2] = 0.5*x[1][2] + 0.5*x[2][2];
+    coordinates[7][0] = 0.5*x[0][0] + 0.5*x[3][0];
+    coordinates[7][1] = 0.5*x[0][1] + 0.5*x[3][1];
+    coordinates[7][2] = 0.5*x[0][2] + 0.5*x[3][2];
+    coordinates[8][0] = 0.5*x[0][0] + 0.5*x[2][0];
+    coordinates[8][1] = 0.5*x[0][1] + 0.5*x[2][1];
+    coordinates[8][2] = 0.5*x[0][2] + 0.5*x[2][2];
+    coordinates[9][0] = 0.5*x[0][0] + 0.5*x[1][0];
+    coordinates[9][1] = 0.5*x[0][1] + 0.5*x[1][1];
+    coordinates[9][2] = 0.5*x[0][2] + 0.5*x[1][2];
+    coordinates[10][0] = x[0][0];
+    coordinates[10][1] = x[0][1];
+    coordinates[10][2] = x[0][2];
+    coordinates[11][0] = x[1][0];
+    coordinates[11][1] = x[1][1];
+    coordinates[11][2] = x[1][2];
+    coordinates[12][0] = x[2][0];
+    coordinates[12][1] = x[2][1];
+    coordinates[12][2] = x[2][2];
+    coordinates[13][0] = x[3][0];
+    coordinates[13][1] = x[3][1];
+    coordinates[13][2] = x[3][2];
+    coordinates[14][0] = 0.5*x[2][0] + 0.5*x[3][0];
+    coordinates[14][1] = 0.5*x[2][1] + 0.5*x[3][1];
+    coordinates[14][2] = 0.5*x[2][2] + 0.5*x[3][2];
+    coordinates[15][0] = 0.5*x[1][0] + 0.5*x[3][0];
+    coordinates[15][1] = 0.5*x[1][1] + 0.5*x[3][1];
+    coordinates[15][2] = 0.5*x[1][2] + 0.5*x[3][2];
+    coordinates[16][0] = 0.5*x[1][0] + 0.5*x[2][0];
+    coordinates[16][1] = 0.5*x[1][1] + 0.5*x[2][1];
+    coordinates[16][2] = 0.5*x[1][2] + 0.5*x[2][2];
+    coordinates[17][0] = 0.5*x[0][0] + 0.5*x[3][0];
+    coordinates[17][1] = 0.5*x[0][1] + 0.5*x[3][1];
+    coordinates[17][2] = 0.5*x[0][2] + 0.5*x[3][2];
+    coordinates[18][0] = 0.5*x[0][0] + 0.5*x[2][0];
+    coordinates[18][1] = 0.5*x[0][1] + 0.5*x[2][1];
+    coordinates[18][2] = 0.5*x[0][2] + 0.5*x[2][2];
+    coordinates[19][0] = 0.5*x[0][0] + 0.5*x[1][0];
+    coordinates[19][1] = 0.5*x[0][1] + 0.5*x[1][1];
+    coordinates[19][2] = 0.5*x[0][2] + 0.5*x[1][2];
 }
 
 /// Return the number of sub dof maps (for a mixed element)
@@ -18900,7 +22545,7 @@ UFC_SolitaryWave3DLinearForm_dof_map_1_0
 /// Return a string identifying the dof map
 const char* UFC_SolitaryWave3DLinearForm_dof_map_1_0::signature() const
 {
-    return "FFC dof map for FiniteElement('Lagrange', 'tetrahedron', 1)";
+    return "FFC dof map for FiniteElement('Lagrange', 'tetrahedron', 2)";
 }
 
 /// Return true iff mesh entities of topological dimension d are needed
@@ -18912,7 +22557,7 @@ bool UFC_SolitaryWave3DLinearForm_dof_ma
       return true;
       break;
     case 1:
-      return false;
+      return true;
       break;
     case 2:
       return false;
@@ -18927,7 +22572,7 @@ bool UFC_SolitaryWave3DLinearForm_dof_ma
 /// Initialize dof map for mesh (return true iff init_cell() is needed)
 bool UFC_SolitaryWave3DLinearForm_dof_map_1_0::init_mesh(const ufc::mesh& m)
 {
-    __global_dimension = m.num_entities[0];
+    __global_dimension = m.num_entities[0] + m.num_entities[1];
     return false;
 }
 
@@ -18953,7 +22598,7 @@ unsigned int UFC_SolitaryWave3DLinearFor
 /// Return the dimension of the local finite element function space
 unsigned int UFC_SolitaryWave3DLinearForm_dof_map_1_0::local_dimension() const
 {
-    return 4;
+    return 10;
 }
 
 // Return the geometric dimension of the coordinates this dof map provides
@@ -18965,7 +22610,7 @@ unsigned int UFC_SolitaryWave3DLinearFor
 /// Return the number of dofs on each cell facet
 unsigned int UFC_SolitaryWave3DLinearForm_dof_map_1_0::num_facet_dofs() const
 {
-    return 3;
+    return 6;
 }
 
 /// Return the number of dofs associated with each cell entity of dimension d
@@ -18983,6 +22628,13 @@ void UFC_SolitaryWave3DLinearForm_dof_ma
     dofs[1] = c.entity_indices[0][1];
     dofs[2] = c.entity_indices[0][2];
     dofs[3] = c.entity_indices[0][3];
+    unsigned int offset = m.num_entities[0];
+    dofs[4] = offset + c.entity_indices[1][0];
+    dofs[5] = offset + c.entity_indices[1][1];
+    dofs[6] = offset + c.entity_indices[1][2];
+    dofs[7] = offset + c.entity_indices[1][3];
+    dofs[8] = offset + c.entity_indices[1][4];
+    dofs[9] = offset + c.entity_indices[1][5];
 }
 
 /// Tabulate the local-to-local mapping from facet dofs to cell dofs
@@ -18995,21 +22647,33 @@ void UFC_SolitaryWave3DLinearForm_dof_ma
       dofs[0] = 1;
       dofs[1] = 2;
       dofs[2] = 3;
-      break;
-    case 1:
-      dofs[0] = 0;
-      dofs[1] = 2;
-      dofs[2] = 3;
-      break;
-    case 2:
-      dofs[0] = 0;
-      dofs[1] = 1;
-      dofs[2] = 3;
+      dofs[3] = 4;
+      dofs[4] = 5;
+      dofs[5] = 6;
+      break;
+    case 1:
+      dofs[0] = 0;
+      dofs[1] = 2;
+      dofs[2] = 3;
+      dofs[3] = 4;
+      dofs[4] = 7;
+      dofs[5] = 8;
+      break;
+    case 2:
+      dofs[0] = 0;
+      dofs[1] = 1;
+      dofs[2] = 3;
+      dofs[3] = 5;
+      dofs[4] = 7;
+      dofs[5] = 9;
       break;
     case 3:
       dofs[0] = 0;
       dofs[1] = 1;
       dofs[2] = 2;
+      dofs[3] = 6;
+      dofs[4] = 8;
+      dofs[5] = 9;
       break;
     }
 }
@@ -19038,6 +22702,24 @@ void UFC_SolitaryWave3DLinearForm_dof_ma
     coordinates[3][0] = x[3][0];
     coordinates[3][1] = x[3][1];
     coordinates[3][2] = x[3][2];
+    coordinates[4][0] = 0.5*x[2][0] + 0.5*x[3][0];
+    coordinates[4][1] = 0.5*x[2][1] + 0.5*x[3][1];
+    coordinates[4][2] = 0.5*x[2][2] + 0.5*x[3][2];
+    coordinates[5][0] = 0.5*x[1][0] + 0.5*x[3][0];
+    coordinates[5][1] = 0.5*x[1][1] + 0.5*x[3][1];
+    coordinates[5][2] = 0.5*x[1][2] + 0.5*x[3][2];
+    coordinates[6][0] = 0.5*x[1][0] + 0.5*x[2][0];
+    coordinates[6][1] = 0.5*x[1][1] + 0.5*x[2][1];
+    coordinates[6][2] = 0.5*x[1][2] + 0.5*x[2][2];
+    coordinates[7][0] = 0.5*x[0][0] + 0.5*x[3][0];
+    coordinates[7][1] = 0.5*x[0][1] + 0.5*x[3][1];
+    coordinates[7][2] = 0.5*x[0][2] + 0.5*x[3][2];
+    coordinates[8][0] = 0.5*x[0][0] + 0.5*x[2][0];
+    coordinates[8][1] = 0.5*x[0][1] + 0.5*x[2][1];
+    coordinates[8][2] = 0.5*x[0][2] + 0.5*x[2][2];
+    coordinates[9][0] = 0.5*x[0][0] + 0.5*x[1][0];
+    coordinates[9][1] = 0.5*x[0][1] + 0.5*x[1][1];
+    coordinates[9][2] = 0.5*x[0][2] + 0.5*x[1][2];
 }
 
 /// Return the number of sub dof maps (for a mixed element)
@@ -19068,7 +22750,7 @@ UFC_SolitaryWave3DLinearForm_dof_map_1_1
 /// Return a string identifying the dof map
 const char* UFC_SolitaryWave3DLinearForm_dof_map_1_1::signature() const
 {
-    return "FFC dof map for FiniteElement('Lagrange', 'tetrahedron', 1)";
+    return "FFC dof map for FiniteElement('Lagrange', 'tetrahedron', 2)";
 }
 
 /// Return true iff mesh entities of topological dimension d are needed
@@ -19080,7 +22762,7 @@ bool UFC_SolitaryWave3DLinearForm_dof_ma
       return true;
       break;
     case 1:
-      return false;
+      return true;
       break;
     case 2:
       return false;
@@ -19095,7 +22777,7 @@ bool UFC_SolitaryWave3DLinearForm_dof_ma
 /// Initialize dof map for mesh (return true iff init_cell() is needed)
 bool UFC_SolitaryWave3DLinearForm_dof_map_1_1::init_mesh(const ufc::mesh& m)
 {
-    __global_dimension = m.num_entities[0];
+    __global_dimension = m.num_entities[0] + m.num_entities[1];
     return false;
 }
 
@@ -19121,7 +22803,7 @@ unsigned int UFC_SolitaryWave3DLinearFor
 /// Return the dimension of the local finite element function space
 unsigned int UFC_SolitaryWave3DLinearForm_dof_map_1_1::local_dimension() const
 {
-    return 4;
+    return 10;
 }
 
 // Return the geometric dimension of the coordinates this dof map provides
@@ -19133,7 +22815,7 @@ unsigned int UFC_SolitaryWave3DLinearFor
 /// Return the number of dofs on each cell facet
 unsigned int UFC_SolitaryWave3DLinearForm_dof_map_1_1::num_facet_dofs() const
 {
-    return 3;
+    return 6;
 }
 
 /// Return the number of dofs associated with each cell entity of dimension d
@@ -19151,6 +22833,13 @@ void UFC_SolitaryWave3DLinearForm_dof_ma
     dofs[1] = c.entity_indices[0][1];
     dofs[2] = c.entity_indices[0][2];
     dofs[3] = c.entity_indices[0][3];
+    unsigned int offset = m.num_entities[0];
+    dofs[4] = offset + c.entity_indices[1][0];
+    dofs[5] = offset + c.entity_indices[1][1];
+    dofs[6] = offset + c.entity_indices[1][2];
+    dofs[7] = offset + c.entity_indices[1][3];
+    dofs[8] = offset + c.entity_indices[1][4];
+    dofs[9] = offset + c.entity_indices[1][5];
 }
 
 /// Tabulate the local-to-local mapping from facet dofs to cell dofs
@@ -19163,21 +22852,33 @@ void UFC_SolitaryWave3DLinearForm_dof_ma
       dofs[0] = 1;
       dofs[1] = 2;
       dofs[2] = 3;
-      break;
-    case 1:
-      dofs[0] = 0;
-      dofs[1] = 2;
-      dofs[2] = 3;
-      break;
-    case 2:
-      dofs[0] = 0;
-      dofs[1] = 1;
-      dofs[2] = 3;
+      dofs[3] = 4;
+      dofs[4] = 5;
+      dofs[5] = 6;
+      break;
+    case 1:
+      dofs[0] = 0;
+      dofs[1] = 2;
+      dofs[2] = 3;
+      dofs[3] = 4;
+      dofs[4] = 7;
+      dofs[5] = 8;
+      break;
+    case 2:
+      dofs[0] = 0;
+      dofs[1] = 1;
+      dofs[2] = 3;
+      dofs[3] = 5;
+      dofs[4] = 7;
+      dofs[5] = 9;
       break;
     case 3:
       dofs[0] = 0;
       dofs[1] = 1;
       dofs[2] = 2;
+      dofs[3] = 6;
+      dofs[4] = 8;
+      dofs[5] = 9;
       break;
     }
 }
@@ -19206,6 +22907,24 @@ void UFC_SolitaryWave3DLinearForm_dof_ma
     coordinates[3][0] = x[3][0];
     coordinates[3][1] = x[3][1];
     coordinates[3][2] = x[3][2];
+    coordinates[4][0] = 0.5*x[2][0] + 0.5*x[3][0];
+    coordinates[4][1] = 0.5*x[2][1] + 0.5*x[3][1];
+    coordinates[4][2] = 0.5*x[2][2] + 0.5*x[3][2];
+    coordinates[5][0] = 0.5*x[1][0] + 0.5*x[3][0];
+    coordinates[5][1] = 0.5*x[1][1] + 0.5*x[3][1];
+    coordinates[5][2] = 0.5*x[1][2] + 0.5*x[3][2];
+    coordinates[6][0] = 0.5*x[1][0] + 0.5*x[2][0];
+    coordinates[6][1] = 0.5*x[1][1] + 0.5*x[2][1];
+    coordinates[6][2] = 0.5*x[1][2] + 0.5*x[2][2];
+    coordinates[7][0] = 0.5*x[0][0] + 0.5*x[3][0];
+    coordinates[7][1] = 0.5*x[0][1] + 0.5*x[3][1];
+    coordinates[7][2] = 0.5*x[0][2] + 0.5*x[3][2];
+    coordinates[8][0] = 0.5*x[0][0] + 0.5*x[2][0];
+    coordinates[8][1] = 0.5*x[0][1] + 0.5*x[2][1];
+    coordinates[8][2] = 0.5*x[0][2] + 0.5*x[2][2];
+    coordinates[9][0] = 0.5*x[0][0] + 0.5*x[1][0];
+    coordinates[9][1] = 0.5*x[0][1] + 0.5*x[1][1];
+    coordinates[9][2] = 0.5*x[0][2] + 0.5*x[1][2];
 }
 
 /// Return the number of sub dof maps (for a mixed element)
@@ -19236,7 +22955,7 @@ UFC_SolitaryWave3DLinearForm_dof_map_1::
 /// Return a string identifying the dof map
 const char* UFC_SolitaryWave3DLinearForm_dof_map_1::signature() const
 {
-    return "FFC dof map for MixedElement([FiniteElement('Lagrange', 'tetrahedron', 1), FiniteElement('Lagrange', 'tetrahedron', 1)])";
+    return "FFC dof map for MixedElement([FiniteElement('Lagrange', 'tetrahedron', 2), FiniteElement('Lagrange', 'tetrahedron', 2)])";
 }
 
 /// Return true iff mesh entities of topological dimension d are needed
@@ -19248,7 +22967,7 @@ bool UFC_SolitaryWave3DLinearForm_dof_ma
       return true;
       break;
     case 1:
-      return false;
+      return true;
       break;
     case 2:
       return false;
@@ -19263,7 +22982,7 @@ bool UFC_SolitaryWave3DLinearForm_dof_ma
 /// Initialize dof map for mesh (return true iff init_cell() is needed)
 bool UFC_SolitaryWave3DLinearForm_dof_map_1::init_mesh(const ufc::mesh& m)
 {
-    __global_dimension = 2*m.num_entities[0];
+    __global_dimension = 2*m.num_entities[0] + 2*m.num_entities[1];
     return false;
 }
 
@@ -19289,7 +23008,7 @@ unsigned int UFC_SolitaryWave3DLinearFor
 /// Return the dimension of the local finite element function space
 unsigned int UFC_SolitaryWave3DLinearForm_dof_map_1::local_dimension() const
 {
-    return 8;
+    return 20;
 }
 
 // Return the geometric dimension of the coordinates this dof map provides
@@ -19301,7 +23020,7 @@ unsigned int UFC_SolitaryWave3DLinearFor
 /// Return the number of dofs on each cell facet
 unsigned int UFC_SolitaryWave3DLinearForm_dof_map_1::num_facet_dofs() const
 {
-    return 6;
+    return 12;
 }
 
 /// Return the number of dofs associated with each cell entity of dimension d
@@ -19320,10 +23039,24 @@ void UFC_SolitaryWave3DLinearForm_dof_ma
     dofs[2] = c.entity_indices[0][2];
     dofs[3] = c.entity_indices[0][3];
     unsigned int offset = m.num_entities[0];
-    dofs[4] = offset + c.entity_indices[0][0];
-    dofs[5] = offset + c.entity_indices[0][1];
-    dofs[6] = offset + c.entity_indices[0][2];
-    dofs[7] = offset + c.entity_indices[0][3];
+    dofs[4] = offset + c.entity_indices[1][0];
+    dofs[5] = offset + c.entity_indices[1][1];
+    dofs[6] = offset + c.entity_indices[1][2];
+    dofs[7] = offset + c.entity_indices[1][3];
+    dofs[8] = offset + c.entity_indices[1][4];
+    dofs[9] = offset + c.entity_indices[1][5];
+    offset = offset + m.num_entities[1];
+    dofs[10] = offset + c.entity_indices[0][0];
+    dofs[11] = offset + c.entity_indices[0][1];
+    dofs[12] = offset + c.entity_indices[0][2];
+    dofs[13] = offset + c.entity_indices[0][3];
+    offset = offset + m.num_entities[0];
+    dofs[14] = offset + c.entity_indices[1][0];
+    dofs[15] = offset + c.entity_indices[1][1];
+    dofs[16] = offset + c.entity_indices[1][2];
+    dofs[17] = offset + c.entity_indices[1][3];
+    dofs[18] = offset + c.entity_indices[1][4];
+    dofs[19] = offset + c.entity_indices[1][5];
 }
 
 /// Tabulate the local-to-local mapping from facet dofs to cell dofs
@@ -19336,33 +23069,57 @@ void UFC_SolitaryWave3DLinearForm_dof_ma
       dofs[0] = 1;
       dofs[1] = 2;
       dofs[2] = 3;
-      dofs[3] = 5;
-      dofs[4] = 6;
-      dofs[5] = 7;
-      break;
-    case 1:
-      dofs[0] = 0;
-      dofs[1] = 2;
-      dofs[2] = 3;
-      dofs[3] = 4;
-      dofs[4] = 6;
-      dofs[5] = 7;
-      break;
-    case 2:
-      dofs[0] = 0;
-      dofs[1] = 1;
-      dofs[2] = 3;
-      dofs[3] = 4;
-      dofs[4] = 5;
-      dofs[5] = 7;
-      break;
-    case 3:
-      dofs[0] = 0;
-      dofs[1] = 1;
-      dofs[2] = 2;
       dofs[3] = 4;
       dofs[4] = 5;
       dofs[5] = 6;
+      dofs[6] = 11;
+      dofs[7] = 12;
+      dofs[8] = 13;
+      dofs[9] = 14;
+      dofs[10] = 15;
+      dofs[11] = 16;
+      break;
+    case 1:
+      dofs[0] = 0;
+      dofs[1] = 2;
+      dofs[2] = 3;
+      dofs[3] = 4;
+      dofs[4] = 7;
+      dofs[5] = 8;
+      dofs[6] = 10;
+      dofs[7] = 12;
+      dofs[8] = 13;
+      dofs[9] = 14;
+      dofs[10] = 17;
+      dofs[11] = 18;
+      break;
+    case 2:
+      dofs[0] = 0;
+      dofs[1] = 1;
+      dofs[2] = 3;
+      dofs[3] = 5;
+      dofs[4] = 7;
+      dofs[5] = 9;
+      dofs[6] = 10;
+      dofs[7] = 11;
+      dofs[8] = 13;
+      dofs[9] = 15;
+      dofs[10] = 17;
+      dofs[11] = 19;
+      break;
+    case 3:
+      dofs[0] = 0;
+      dofs[1] = 1;
+      dofs[2] = 2;
+      dofs[3] = 6;
+      dofs[4] = 8;
+      dofs[5] = 9;
+      dofs[6] = 10;
+      dofs[7] = 11;
+      dofs[8] = 12;
+      dofs[9] = 16;
+      dofs[10] = 18;
+      dofs[11] = 19;
       break;
     }
 }
@@ -19391,18 +23148,54 @@ void UFC_SolitaryWave3DLinearForm_dof_ma
     coordinates[3][0] = x[3][0];
     coordinates[3][1] = x[3][1];
     coordinates[3][2] = x[3][2];
-    coordinates[4][0] = x[0][0];
-    coordinates[4][1] = x[0][1];
-    coordinates[4][2] = x[0][2];
-    coordinates[5][0] = x[1][0];
-    coordinates[5][1] = x[1][1];
-    coordinates[5][2] = x[1][2];
-    coordinates[6][0] = x[2][0];
-    coordinates[6][1] = x[2][1];
-    coordinates[6][2] = x[2][2];
-    coordinates[7][0] = x[3][0];
-    coordinates[7][1] = x[3][1];
-    coordinates[7][2] = x[3][2];
+    coordinates[4][0] = 0.5*x[2][0] + 0.5*x[3][0];
+    coordinates[4][1] = 0.5*x[2][1] + 0.5*x[3][1];
+    coordinates[4][2] = 0.5*x[2][2] + 0.5*x[3][2];
+    coordinates[5][0] = 0.5*x[1][0] + 0.5*x[3][0];
+    coordinates[5][1] = 0.5*x[1][1] + 0.5*x[3][1];
+    coordinates[5][2] = 0.5*x[1][2] + 0.5*x[3][2];
+    coordinates[6][0] = 0.5*x[1][0] + 0.5*x[2][0];
+    coordinates[6][1] = 0.5*x[1][1] + 0.5*x[2][1];
+    coordinates[6][2] = 0.5*x[1][2] + 0.5*x[2][2];
+    coordinates[7][0] = 0.5*x[0][0] + 0.5*x[3][0];
+    coordinates[7][1] = 0.5*x[0][1] + 0.5*x[3][1];
+    coordinates[7][2] = 0.5*x[0][2] + 0.5*x[3][2];
+    coordinates[8][0] = 0.5*x[0][0] + 0.5*x[2][0];
+    coordinates[8][1] = 0.5*x[0][1] + 0.5*x[2][1];
+    coordinates[8][2] = 0.5*x[0][2] + 0.5*x[2][2];
+    coordinates[9][0] = 0.5*x[0][0] + 0.5*x[1][0];
+    coordinates[9][1] = 0.5*x[0][1] + 0.5*x[1][1];
+    coordinates[9][2] = 0.5*x[0][2] + 0.5*x[1][2];
+    coordinates[10][0] = x[0][0];
+    coordinates[10][1] = x[0][1];
+    coordinates[10][2] = x[0][2];
+    coordinates[11][0] = x[1][0];
+    coordinates[11][1] = x[1][1];
+    coordinates[11][2] = x[1][2];
+    coordinates[12][0] = x[2][0];
+    coordinates[12][1] = x[2][1];
+    coordinates[12][2] = x[2][2];
+    coordinates[13][0] = x[3][0];
+    coordinates[13][1] = x[3][1];
+    coordinates[13][2] = x[3][2];
+    coordinates[14][0] = 0.5*x[2][0] + 0.5*x[3][0];
+    coordinates[14][1] = 0.5*x[2][1] + 0.5*x[3][1];
+    coordinates[14][2] = 0.5*x[2][2] + 0.5*x[3][2];
+    coordinates[15][0] = 0.5*x[1][0] + 0.5*x[3][0];
+    coordinates[15][1] = 0.5*x[1][1] + 0.5*x[3][1];
+    coordinates[15][2] = 0.5*x[1][2] + 0.5*x[3][2];
+    coordinates[16][0] = 0.5*x[1][0] + 0.5*x[2][0];
+    coordinates[16][1] = 0.5*x[1][1] + 0.5*x[2][1];
+    coordinates[16][2] = 0.5*x[1][2] + 0.5*x[2][2];
+    coordinates[17][0] = 0.5*x[0][0] + 0.5*x[3][0];
+    coordinates[17][1] = 0.5*x[0][1] + 0.5*x[3][1];
+    coordinates[17][2] = 0.5*x[0][2] + 0.5*x[3][2];
+    coordinates[18][0] = 0.5*x[0][0] + 0.5*x[2][0];
+    coordinates[18][1] = 0.5*x[0][1] + 0.5*x[2][1];
+    coordinates[18][2] = 0.5*x[0][2] + 0.5*x[2][2];
+    coordinates[19][0] = 0.5*x[0][0] + 0.5*x[1][0];
+    coordinates[19][1] = 0.5*x[0][1] + 0.5*x[1][1];
+    coordinates[19][2] = 0.5*x[0][2] + 0.5*x[1][2];
 }
 
 /// Return the number of sub dof maps (for a mixed element)
@@ -20400,65 +24193,161 @@ void UFC_SolitaryWave3DLinearForm_cell_i
     
     
     // Array of quadrature weights
-    const static double W8[8] = {0.0369798563588528, 0.0160270405984766, 0.021157006454524, 0.00916942992147972, 0.0369798563588528, 0.0160270405984766, 0.021157006454524, 0.00916942992147972};
-    
-    
-    const static double FE0_C1_D001[8][2] = \
-    {{-1, 1},
-    {-1, 1},
-    {-1, 1},
-    {-1, 1},
-    {-1, 1},
-    {-1, 1},
-    {-1, 1},
-    {-1, 1}};
-    // Array of non-zero columns
-    static const unsigned int nzc0[2] = {4, 7};
-    // Array of non-zero columns
-    static const unsigned int nzc1[2] = {4, 6};
-    // Array of non-zero columns
-    static const unsigned int nzc2[2] = {4, 5};
-    // Array of non-zero columns
-    static const unsigned int nzc3[2] = {0, 1};
-    // Array of non-zero columns
-    static const unsigned int nzc4[2] = {0, 2};
-    // Array of non-zero columns
-    static const unsigned int nzc5[2] = {0, 3};
-    
-    const static double FE0_C1[8][4] = \
-    {{0.584747563204894, 0.156682637336818, 0.136054976802846, 0.122514822655441},
-    {0.303772764814707, 0.0813956670146703, 0.0706797241593969, 0.544151844011225},
-    {0.245713325211713, 0.0658386870600444, 0.565933165072801, 0.122514822655441},
-    {0.127646562120385, 0.0342027932367665, 0.293998800631623, 0.544151844011225},
-    {0.156682637336818, 0.584747563204894, 0.136054976802846, 0.122514822655441},
-    {0.0813956670146703, 0.303772764814707, 0.0706797241593969, 0.544151844011225},
-    {0.0658386870600443, 0.245713325211713, 0.565933165072801, 0.122514822655441},
-    {0.0342027932367664, 0.127646562120385, 0.293998800631623, 0.544151844011225}};
-    // Array of non-zero columns
-    static const unsigned int nzc6[4] = {4, 5, 6, 7};
-    // Array of non-zero columns
-    static const unsigned int nzc7[4] = {0, 1, 2, 3};
+    const static double W27[27] = {0.00877047492965105, 0.00816265076654668, 0.0016716811314837, 0.0100061425721761, 0.00931268237947044, 0.00190720341498178, 0.00304787709051818, 0.00283664869563092, 0.000580935315837384, 0.0140327598874417, 0.0130602412264747, 0.00267468981037392, 0.0160098281154818, 0.0149002918071527, 0.00305152546397085, 0.0048766033448291, 0.00453863791300947, 0.000929496505339815, 0.00877047492965105, 0.00816265076654668, 0.0016716811314837, 0.0100061425721761, 0.00931268237947044, 0.00190720341498178, 0.00304787709051818, 0.00283664869563092, 0.000580935315837384};
+    
+    
+    const static double FE0_C1_D100[27][7] = \
+    {{-1.99865811288677, -0.619120480633141, 0.2919760962926, 0.328486271453771, -0.2919760962926, -0.328486271453771, 2.61777859351991},
+    {-1.11229755309379, -0.731703032991766, 1.38801506415341, 0.231390415744571, -1.38801506415341, -0.231390415744571, 1.84400058608555},
+    {0.0457477733980357, -0.878794075302896, 2.82000883955399, 0.104533009146939, -2.82000883955399, -0.104533009146939, 0.833046301904861},
+    {-0.942926908148453, -0.753215925563414, 0.291976096292599, 1.51831292112236, -0.291976096292599, -1.51831292112236, 1.69614283371187},
+    {-0.368625431583845, -0.82616177738479, 1.38801506415341, 1.06952128164754, -1.38801506415341, -1.06952128164754, 1.19478720896864},
+    {0.381709331831541, -0.921466788258062, 2.82000883955399, 0.483167280535609, -2.82000883955399, -0.48316728053561, 0.539757456426521},
+    {0.301373419046404, -0.911262789436721, 0.291976096292598, 2.92066011219053, -0.291976096292598, -2.92066011219053, 0.609889370390317},
+    {0.507877469881381, -0.937492242968394, 1.38801506415341, 2.05735464869637, -1.38801506415341, -2.05735464869637, 0.429614773087012},
+    {0.77767856643167, -0.971761475441781, 2.82000883955399, 0.929431202319459, -2.82000883955399, -0.929431202319459, 0.194082909010111},
+    {-0.689768816126815, 0.689768816126816, 0.2919760962926, 0.32848627145377, -0.2919760962926, -0.32848627145377, 0},
+    {-0.19029726005101, 0.190297260051011, 1.38801506415341, 0.231390415744571, -1.38801506415341, -0.231390415744571, 0},
+    {0.462270924350466, -0.462270924350466, 2.82000883955399, 0.104533009146939, -2.82000883955399, -0.104533009146939, 0},
+    {-0.0948554912925193, 0.09485549129252, 0.291976096292599, 1.51831292112236, -0.291976096292599, -1.51831292112236, 0},
+    {0.228768172900473, -0.228768172900473, 1.38801506415341, 1.06952128164754, -1.38801506415341, -1.06952128164754, 0},
+    {0.651588060044801, -0.651588060044802, 2.82000883955399, 0.48316728053561, -2.82000883955399, -0.48316728053561, 0},
+    {0.606318104241563, -0.606318104241563, 0.291976096292599, 2.92066011219053, -0.291976096292599, -2.92066011219053, 0},
+    {0.722684856424887, -0.722684856424888, 1.38801506415341, 2.05735464869637, -1.38801506415341, -2.05735464869637, 0},
+    {0.874720020936725, -0.874720020936726, 2.82000883955399, 0.929431202319459, -2.82000883955399, -0.929431202319459, 0},
+    {0.619120480633142, 1.99865811288677, 0.291976096292599, 0.328486271453769, -0.291976096292599, -0.328486271453769, -2.61777859351991},
+    {0.731703032991767, 1.11229755309379, 1.38801506415341, 0.231390415744571, -1.38801506415341, -0.231390415744571, -1.84400058608555},
+    {0.878794075302896, -0.0457477733980358, 2.82000883955399, 0.10453300914694, -2.82000883955399, -0.10453300914694, -0.833046301904861},
+    {0.753215925563415, 0.942926908148454, 0.291976096292599, 1.51831292112236, -0.291976096292599, -1.51831292112236, -1.69614283371187},
+    {0.82616177738479, 0.368625431583845, 1.38801506415341, 1.06952128164754, -1.38801506415341, -1.06952128164754, -1.19478720896864},
+    {0.921466788258061, -0.381709331831542, 2.82000883955399, 0.483167280535611, -2.82000883955399, -0.483167280535611, -0.53975745642652},
+    {0.911262789436721, -0.301373419046404, 0.291976096292599, 2.92066011219053, -0.291976096292599, -2.92066011219053, -0.609889370390318},
+    {0.937492242968393, -0.507877469881382, 1.38801506415341, 2.05735464869637, -1.38801506415341, -2.05735464869637, -0.429614773087012},
+    {0.97176147544178, -0.777678566431672, 2.82000883955399, 0.929431202319459, -2.82000883955399, -0.929431202319459, -0.194082909010108}};
+    // Array of non-zero columns
+    static const unsigned int nzc2[7] = {10, 11, 15, 16, 17, 18, 19};
+    // Array of non-zero columns
+    static const unsigned int nzc3[7] = {0, 1, 5, 6, 7, 8, 9};
+    
+    const static double FE0_C1_D010[27][7] = \
+    {{-1.99865811288677, -0.67151372854623, 0.291976096292601, 0.380879519366861, -0.2919760962926, 2.670171841433, -0.380879519366861},
+    {-1.11229755309379, -0.768609584255429, 1.38801506415341, 0.268296967008234, -1.38801506415341, 1.88090713734922, -0.268296967008233},
+    {0.045747773398036, -0.89546699085306, 2.82000883955399, 0.121205924697102, -2.82000883955399, 0.849719217455024, -0.121205924697102},
+    {-0.942926908148453, 0.518312921122362, 0.291976096292599, 0.246784074436585, -0.291976096292599, 0.424613987026092, -0.246784074436586},
+    {-0.368625431583845, 0.0695212816475373, 1.38801506415341, 0.173838222615209, -1.38801506415341, 0.299104149936307, -0.173838222615209},
+    {0.381709331831541, -0.51683271946439, 2.82000883955399, 0.0785332117419375, -2.82000883955399, 0.135123387632849, -0.0785332117419376},
+    {0.301373419046404, 1.92066011219053, 0.291976096292598, 0.0887372105632775, -0.291976096292598, -2.22203353123693, -0.0887372105632784},
+    {0.507877469881381, 1.05735464869637, 1.38801506415341, 0.0625077570316057, -1.38801506415341, -1.56523211857775, -0.0625077570316059},
+    {0.777678566431671, -0.0705687976805426, 2.82000883955399, 0.0282385245582192, -2.82000883955399, -0.707109768751129, -0.0282385245582191},
+    {-0.689768816126815, -0.67151372854623, 0.2919760962926, 1.68976881612682, -0.2919760962926, 1.36128254467305, -1.68976881612682},
+    {-0.19029726005101, -0.768609584255429, 1.38801506415341, 1.19029726005101, -1.38801506415341, 0.958906844306439, -1.19029726005101},
+    {0.462270924350466, -0.89546699085306, 2.82000883955399, 0.537729075649533, -2.82000883955399, 0.433196066502594, -0.537729075649533},
+    {-0.0948554912925191, 0.518312921122362, 0.291976096292599, 1.09485549129252, -0.291976096292599, -0.423457429829843, -1.09485549129252},
+    {0.228768172900473, 0.0695212816475375, 1.38801506415341, 0.771231827099527, -1.38801506415341, -0.298289454548011, -0.771231827099527},
+    {0.651588060044801, -0.51683271946439, 2.82000883955399, 0.348411939955198, -2.82000883955399, -0.134755340580411, -0.348411939955198},
+    {0.606318104241562, 1.92066011219053, 0.291976096292598, 0.393681895758437, -0.291976096292599, -2.52697821643209, -0.393681895758437},
+    {0.722684856424887, 1.05735464869637, 1.38801506415341, 0.277315143575112, -1.38801506415341, -1.78003950512125, -0.277315143575112},
+    {0.874720020936725, -0.0705687976805425, 2.82000883955399, 0.125279979063274, -2.82000883955399, -0.804151223256183, -0.125279979063274},
+    {0.619120480633141, -0.67151372854623, 0.291976096292599, 2.99865811288677, -0.291976096292599, 0.0523932479130882, -2.99865811288677},
+    {0.731703032991766, -0.768609584255429, 1.38801506415341, 2.11229755309379, -1.38801506415341, 0.0369065512636619, -2.11229755309379},
+    {0.878794075302896, -0.89546699085306, 2.82000883955399, 0.954252226601964, -2.82000883955399, 0.0166729155501636, -0.954252226601964},
+    {0.753215925563415, 0.518312921122362, 0.291976096292599, 1.94292690814845, -0.291976096292599, -1.27152884668578, -1.94292690814845},
+    {0.82616177738479, 0.0695212816475377, 1.38801506415341, 1.36862543158385, -1.38801506415341, -0.895683059032329, -1.36862543158384},
+    {0.921466788258061, -0.51683271946439, 2.82000883955399, 0.618290668168459, -2.82000883955399, -0.404634068793672, -0.618290668168458},
+    {0.911262789436721, 1.92066011219053, 0.291976096292599, 0.698626580953596, -0.291976096292599, -2.83192290162725, -0.698626580953596},
+    {0.937492242968393, 1.05735464869637, 1.38801506415341, 0.492122530118618, -1.38801506415341, -1.99484689166476, -0.492122530118618},
+    {0.97176147544178, -0.0705687976805425, 2.82000883955399, 0.222321433568329, -2.82000883955399, -0.901192677761238, -0.222321433568329}};
+    // Array of non-zero columns
+    static const unsigned int nzc1[7] = {10, 12, 14, 16, 17, 18, 19};
+    // Array of non-zero columns
+    static const unsigned int nzc4[7] = {0, 2, 4, 6, 7, 8, 9};
+    
+    const static double FE0_C1[27][10] = \
+    {{0.374329281526014, -0.0770862288075737, -0.0686336640467425, -0.0623377689723666, 0.0239775348061957, 0.0278019288056344, 0.031278423297481, 0.218884122479203, 0.246254505716693, 0.285531865195462},
+    {0.0296507308273034, -0.0580763339388314, -0.051154913373837, -0.106180538748753, 0.080293345688546, 0.0931000579685249, 0.0155203366847607, 0.73297520591714, 0.122191352246653, 0.141680756728494},
+    {-0.12473839265364, -0.0284651216515657, -0.0247673585365706, 0.289054022006834, 0.073696002454887, 0.0854504447630367, 0.00316750500875634, 0.672749928545405, 0.0249377141829676, 0.0289152558798902},
+    {-0.0138611057361999, -0.0540832211847061, -0.0914189644747004, -0.0623377689723666, 0.11082776991498, 0.0180137626702943, 0.0936738622360728, 0.141822053505759, 0.737492757359529, 0.119870854681338},
+    {-0.108014411398703, -0.0396820896985505, -0.12439584892476, -0.106180538748753, 0.37112791258986, 0.0603225179288914, 0.0464809196626873, 0.474918179055459, 0.365943506420742, 0.0594798531131275},
+    {-0.10678724824909, -0.0188623697671714, -0.0916104925113804, 0.289054022006834, 0.340634000523421, 0.0553660878277078, 0.00948616958726982, 0.435896287412199, 0.0746844551798748, 0.0121390879903345},
+    {-0.113646757786535, -0.0212000160735007, 0.336116908319966, -0.0623377689723666, 0.213190734538724, 0.00647728608404029, 0.0647928078398051, 0.050995565468269, 0.510112697076803, 0.0154985435047958},
+    {-0.0927575594483608, -0.0151385367967613, 0.0147498566399773, -0.106180538748753, 0.71390981117415, 0.0216904270965779, 0.0321501561271397, 0.170768371303483, 0.253117643766939, 0.00769036888560862},
+    {-0.0494020059140976, -0.00695995435590164, -0.12437750559924, 0.289054022006834, 0.655251051574542, 0.0199082222175353, 0.00656144145796828, 0.156737101971251, 0.0516581193256994, 0.00156950731540954},
+    {-0.0655273725373765, -0.0655273725373763, -0.0686336640467425, -0.0623377689723666, 0.0239775348061957, 0.123343025642419, 0.138766464507087, 0.123343025642419, 0.138766464507087, 0.713829662988655},
+    {-0.120473369102135, -0.120473369102135, -0.051154913373837, -0.106180538748753, 0.080293345688546, 0.413037631942832, 0.0688558444657068, 0.413037631942832, 0.0688558444657067, 0.354201891821236},
+    {-0.0982881990625207, -0.0982881990625206, -0.0247673585365706, 0.289054022006834, 0.073696002454887, 0.379100186654221, 0.014052609595862, 0.379100186654221, 0.014052609595862, 0.0722881396997255},
+    {-0.123875304471457, -0.123875304471457, -0.0914189644747004, -0.0623377689723666, 0.11082776991498, 0.0799179080880265, 0.415583309797801, 0.0799179080880263, 0.415583309797801, 0.299677136703346},
+    {-0.118458140383472, -0.118458140383472, -0.12439584892476, -0.106180538748753, 0.37112791258986, 0.267620348492175, 0.206212213041715, 0.267620348492175, 0.206212213041715, 0.148699632782819},
+    {-0.0719291250008815, -0.0719291250008814, -0.0916104925113804, 0.289054022006834, 0.340634000523421, 0.245631187619954, 0.0420853123835723, 0.245631187619953, 0.0420853123835723, 0.0303477199758362},
+    {-0.0790472945586147, -0.0790472945586147, 0.336116908319966, -0.0623377689723666, 0.213190734538724, 0.0287364257761548, 0.287452752458304, 0.0287364257761545, 0.287452752458304, 0.0387463587619893},
+    {-0.0597158247867675, -0.0597158247867675, 0.0147498566399773, -0.106180538748753, 0.71390981117415, 0.0962293992000305, 0.14263389994704, 0.0962293992000302, 0.142633899947039, 0.0192259222140214},
+    {-0.0293581106215567, -0.0293581106215567, -0.12437750559924, 0.289054022006834, 0.655251051574542, 0.0883226620943931, 0.0291097803918338, 0.0883226620943929, 0.0291097803918338, 0.0039237682885237},
+    {-0.0770862288075736, 0.374329281526014, -0.0686336640467425, -0.0623377689723666, 0.0239775348061957, 0.218884122479203, 0.246254505716693, 0.0278019288056342, 0.0312784232974808, 0.285531865195462},
+    {-0.0580763339388314, 0.0296507308273036, -0.051154913373837, -0.106180538748753, 0.080293345688546, 0.73297520591714, 0.122191352246653, 0.0931000579685245, 0.0155203366847606, 0.141680756728494},
+    {-0.0284651216515658, -0.12473839265364, -0.0247673585365706, 0.289054022006834, 0.073696002454887, 0.672749928545405, 0.0249377141829676, 0.0854504447630365, 0.00316750500875629, 0.0289152558798902},
+    {-0.0540832211847061, -0.0138611057361997, -0.0914189644747004, -0.0623377689723666, 0.11082776991498, 0.141822053505759, 0.737492757359529, 0.0180137626702941, 0.0936738622360724, 0.119870854681338},
+    {-0.0396820896985505, -0.108014411398703, -0.12439584892476, -0.106180538748753, 0.37112791258986, 0.474918179055459, 0.365943506420742, 0.060322517928891, 0.0464809196626871, 0.0594798531131275},
+    {-0.0188623697671715, -0.10678724824909, -0.0916104925113804, 0.289054022006834, 0.340634000523421, 0.435896287412199, 0.0746844551798748, 0.0553660878277076, 0.00948616958726979, 0.0121390879903345},
+    {-0.0212000160735007, -0.113646757786535, 0.336116908319966, -0.0623377689723666, 0.213190734538724, 0.0509955654682693, 0.510112697076803, 0.00647728608404007, 0.0647928078398048, 0.0154985435047957},
+    {-0.0151385367967613, -0.0927575594483608, 0.0147498566399773, -0.106180538748753, 0.71390981117415, 0.170768371303483, 0.25311764376694, 0.0216904270965777, 0.0321501561271395, 0.0076903688856086},
+    {-0.00695995435590172, -0.0494020059140976, -0.12437750559924, 0.289054022006834, 0.655251051574542, 0.156737101971251, 0.0516581193256993, 0.0199082222175352, 0.00656144145796827, 0.00156950731540955}};
+    // Array of non-zero columns
+    static const unsigned int nzc6[10] = {10, 11, 12, 13, 14, 15, 16, 17, 18, 19};
+    // Array of non-zero columns
+    static const unsigned int nzc7[10] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
+    
+    const static double FE0_C1_D001[27][7] = \
+    {{-1.99865811288677, -0.708023903707401, 0.328486271453771, 0.38087951936686, 2.70668201659417, -0.328486271453771, -0.380879519366859},
+    {-1.11229755309379, 0.388015064153407, 0.231390415744571, 0.268296967008234, 0.72428248894038, -0.231390415744571, -0.268296967008234},
+    {0.0457477733980357, 1.82000883955399, 0.104533009146939, 0.121205924697103, -1.86575661295203, -0.104533009146939, -0.121205924697102},
+    {-0.942926908148453, -0.708023903707401, 1.51831292112236, 0.246784074436586, 1.65095081185585, -1.51831292112236, -0.246784074436585},
+    {-0.368625431583845, 0.388015064153408, 1.06952128164754, 0.173838222615209, -0.0193896325695626, -1.06952128164754, -0.173838222615209},
+    {0.381709331831541, 1.82000883955399, 0.48316728053561, 0.0785332117419377, -2.20171817138554, -0.483167280535609, -0.0785332117419371},
+    {0.301373419046404, -0.708023903707401, 2.92066011219053, 0.0887372105632786, 0.406650484660997, -2.92066011219052, -0.0887372105632779},
+    {0.507877469881381, 0.388015064153408, 2.05735464869637, 0.0625077570316064, -0.895892534034789, -2.05735464869637, -0.0625077570316058},
+    {0.77767856643167, 1.82000883955399, 0.929431202319458, 0.028238524558219, -2.59768740598566, -0.929431202319458, -0.0282385245582184},
+    {-0.689768816126815, -0.708023903707401, 0.32848627145377, 1.68976881612682, 1.39779271983422, -0.32848627145377, -1.68976881612682},
+    {-0.19029726005101, 0.388015064153407, 0.231390415744571, 1.19029726005101, -0.197717804102397, -0.231390415744571, -1.19029726005101},
+    {0.462270924350466, 1.82000883955399, 0.10453300914694, 0.537729075649533, -2.28227976390446, -0.104533009146939, -0.537729075649533},
+    {-0.0948554912925191, -0.708023903707401, 1.51831292112236, 1.09485549129252, 0.80287939499992, -1.51831292112236, -1.09485549129252},
+    {0.228768172900472, 0.388015064153408, 1.06952128164754, 0.771231827099527, -0.61678323705388, -1.06952128164754, -0.771231827099527},
+    {0.651588060044801, 1.82000883955399, 0.48316728053561, 0.348411939955198, -2.47159689959879, -0.48316728053561, -0.348411939955198},
+    {0.606318104241562, -0.708023903707401, 2.92066011219053, 0.393681895758437, 0.101705799465838, -2.92066011219053, -0.393681895758437},
+    {0.722684856424887, 0.388015064153408, 2.05735464869637, 0.277315143575113, -1.11069992057829, -2.05735464869637, -0.277315143575112},
+    {0.874720020936725, 1.82000883955399, 0.929431202319459, 0.125279979063274, -2.69472886049072, -0.929431202319458, -0.125279979063273},
+    {0.619120480633141, -0.708023903707401, 0.328486271453769, 2.99865811288677, 0.0889034230742589, -0.328486271453769, -2.99865811288677},
+    {0.731703032991766, 0.388015064153407, 0.231390415744571, 2.11229755309379, -1.11971809714517, -0.231390415744571, -2.11229755309379},
+    {0.878794075302896, 1.82000883955399, 0.10453300914694, 0.954252226601964, -2.69880291485689, -0.10453300914694, -0.954252226601964},
+    {0.753215925563415, -0.708023903707401, 1.51831292112236, 1.94292690814845, -0.0451920218560143, -1.51831292112236, -1.94292690814845},
+    {0.82616177738479, 0.388015064153408, 1.06952128164754, 1.36862543158385, -1.2141768415382, -1.06952128164754, -1.36862543158385},
+    {0.921466788258061, 1.82000883955399, 0.483167280535611, 0.618290668168458, -2.74147562781205, -0.48316728053561, -0.618290668168458},
+    {0.911262789436721, -0.708023903707401, 2.92066011219053, 0.698626580953597, -0.203238885729321, -2.92066011219053, -0.698626580953596},
+    {0.937492242968393, 0.388015064153408, 2.05735464869637, 0.492122530118619, -1.3255073071218, -2.05735464869637, -0.492122530118618},
+    {0.971761475441779, 1.82000883955399, 0.929431202319459, 0.222321433568329, -2.79177031499577, -0.929431202319458, -0.222321433568328}};
+    // Array of non-zero columns
+    static const unsigned int nzc0[7] = {10, 13, 14, 15, 17, 18, 19};
+    // Array of non-zero columns
+    static const unsigned int nzc5[7] = {0, 3, 4, 5, 7, 8, 9};
     
     // Number of operations to compute geometry constants: 47
-    const double G0 =  - Jinv_22*det;
-    const double G1 = det*(Jinv_00*Jinv_20 + Jinv_01*Jinv_21 + Jinv_02*Jinv_22);
+    const double G0 =  - 0.5*det*w[1][0]*w[2][0];
+    const double G1 =  - Jinv_22*det;
     const double G2 = det*(Jinv_20*Jinv_20 + Jinv_21*Jinv_21 + Jinv_22*Jinv_22);
-    const double G3 = det*(Jinv_10*Jinv_20 + Jinv_11*Jinv_21 + Jinv_12*Jinv_22);
-    const double G4 =  - 0.5*det*w[1][0]*w[2][0];
+    const double G3 = det*(Jinv_00*Jinv_20 + Jinv_01*Jinv_21 + Jinv_02*Jinv_22);
+    const double G4 = det*(Jinv_10*Jinv_20 + Jinv_11*Jinv_21 + Jinv_12*Jinv_22);
     const double G5 =  - Jinv_02*det;
     const double G6 = det*(Jinv_00*Jinv_00 + Jinv_01*Jinv_01 + Jinv_02*Jinv_02);
     const double G7 = det*(Jinv_00*Jinv_10 + Jinv_01*Jinv_11 + Jinv_02*Jinv_12);
-    const double G8 =  - Jinv_12*det;
-    const double G9 = det*(Jinv_10*Jinv_10 + Jinv_11*Jinv_11 + Jinv_12*Jinv_12);
-    const double G10 = det*w[2][0];
+    const double G8 = det*w[2][0];
+    const double G9 =  - Jinv_12*det;
+    const double G10 = det*(Jinv_10*Jinv_10 + Jinv_11*Jinv_11 + Jinv_12*Jinv_12);
     
     // Compute element tensor using UFL quadrature representation
     // Optimisations: ('simplify expressions', True), ('ignore zero tables', True), ('non zero columns', True), ('remove zero terms', True), ('ignore ones', True)
-    // Total number of operations to compute element tensor: 783
+    // Total number of operations to compute element tensor: 5447
     
     // Loop quadrature points for integral
-    // Number of operations to compute element tensor for following IP loop = 736
-    for (unsigned int ip = 0; ip < 8; ip++)
+    // Number of operations to compute element tensor for following IP loop = 5400
+    for (unsigned int ip = 0; ip < 27; ip++)
     {
       
       // Function declarations
@@ -20468,56 +24357,56 @@ void UFC_SolitaryWave3DLinearForm_cell_i
       double F3 = 0;
       double F4 = 0;
       
-      // Total number of operations to compute function values = 12
-      for (unsigned int r = 0; r < 2; r++)
-      {
-        F2 += FE0_C1_D001[ip][r]*w[0][nzc3[r]];
-        F3 += FE0_C1_D001[ip][r]*w[0][nzc4[r]];
-        F4 += FE0_C1_D001[ip][r]*w[0][nzc5[r]];
-      }// end loop over 'r'
-      
-      // Total number of operations to compute function values = 16
-      for (unsigned int r = 0; r < 4; r++)
+      // Total number of operations to compute function values = 40
+      for (unsigned int r = 0; r < 10; r++)
       {
         F0 += FE0_C1[ip][r]*w[0][nzc6[r]];
         F1 += FE0_C1[ip][r]*w[0][nzc7[r]];
       }// end loop over 'r'
       
+      // Total number of operations to compute function values = 42
+      for (unsigned int r = 0; r < 7; r++)
+      {
+        F2 += FE0_C1_D100[ip][r]*w[0][nzc3[r]];
+        F3 += FE0_C1_D010[ip][r]*w[0][nzc4[r]];
+        F4 += FE0_C1_D001[ip][r]*w[0][nzc5[r]];
+      }// end loop over 'r'
+      
       // Number of operations to compute ip constants: 36
+      // Number of operations: 4
+      const double Gip0 = W27[ip]*(F0*det + F1*G0);
+      
       // Number of operations: 10
-      const double Gip0 = F0*F0*F0*W8[ip]*(G0 + F2*G1 + F3*G3 + F4*G2);
-      
-      // Number of operations: 4
-      const double Gip1 = W8[ip]*(F0*det + F1*G4);
+      const double Gip1 = F0*F0*F0*W27[ip]*(G1 + F2*G3 + F3*G4 + F4*G2);
       
       // Number of operations: 10
-      const double Gip2 = F0*F0*F0*W8[ip]*(G5 + F2*G6 + F3*G7 + F4*G1);
+      const double Gip2 = F0*F0*F0*W27[ip]*(G5 + F2*G6 + F3*G7 + F4*G3);
+      
+      // Number of operations: 2
+      const double Gip3 = F1*W27[ip]*G8;
       
       // Number of operations: 10
-      const double Gip3 = F0*F0*F0*W8[ip]*(G8 + F2*G7 + F3*G9 + F4*G3);
-      
-      // Number of operations: 2
-      const double Gip4 = F1*W8[ip]*G10;
-      
-      
-      // Number of operations for primary indices = 12
-      for (unsigned int j = 0; j < 2; j++)
+      const double Gip4 = F0*F0*F0*W27[ip]*(G9 + F2*G7 + F3*G10 + F4*G4);
+      
+      
+      // Number of operations for primary indices = 40
+      for (unsigned int j = 0; j < 10; j++)
       {
         // Number of operations to compute entry = 2
-        A[nzc5[j]] += FE0_C1_D001[ip][j]*Gip0;
+        A[nzc6[j]] += FE0_C1[ip][j]*Gip0;
         // Number of operations to compute entry = 2
-        A[nzc3[j]] += FE0_C1_D001[ip][j]*Gip2;
+        A[nzc7[j]] += FE0_C1[ip][j]*Gip3;
+      }// end loop over 'j'
+      
+      // Number of operations for primary indices = 42
+      for (unsigned int j = 0; j < 7; j++)
+      {
         // Number of operations to compute entry = 2
-        A[nzc4[j]] += FE0_C1_D001[ip][j]*Gip3;
-      }// end loop over 'j'
-      
-      // Number of operations for primary indices = 16
-      for (unsigned int j = 0; j < 4; j++)
-      {
+        A[nzc5[j]] += FE0_C1_D001[ip][j]*Gip1;
         // Number of operations to compute entry = 2
-        A[nzc6[j]] += FE0_C1[ip][j]*Gip1;
+        A[nzc3[j]] += FE0_C1_D100[ip][j]*Gip2;
         // Number of operations to compute entry = 2
-        A[nzc7[j]] += FE0_C1[ip][j]*Gip4;
+        A[nzc4[j]] += FE0_C1_D010[ip][j]*Gip4;
       }// end loop over 'j'
     }// end loop over 'ip'
 }
@@ -20548,6 +24437,18 @@ void UFC_SolitaryWave3DLinearForm_cell_i
     A[5] = 0;
     A[6] = 0;
     A[7] = 0;
+    A[8] = 0;
+    A[9] = 0;
+    A[10] = 0;
+    A[11] = 0;
+    A[12] = 0;
+    A[13] = 0;
+    A[14] = 0;
+    A[15] = 0;
+    A[16] = 0;
+    A[17] = 0;
+    A[18] = 0;
+    A[19] = 0;
     
     // Add all contributions to element tensor
     integral_0_quadrature.tabulate_tensor(A, w, c);
@@ -20603,30 +24504,35 @@ void UFC_SolitaryWave3DLinearForm_exteri
     
     
     // Array of quadrature weights
-    const static double W4[4] = {0.159020690871988, 0.0909793091280113, 0.159020690871988, 0.0909793091280113};
-    
-    
-    const static double FE0_f0_C1[4][3] = \
-    {{0.666390246014701, 0.178558728263616, 0.155051025721682},
-    {0.280019915499074, 0.0750311102226081, 0.644948974278318},
-    {0.178558728263616, 0.666390246014701, 0.155051025721682},
-    {0.0750311102226081, 0.280019915499074, 0.644948974278318}};
-    // Array of non-zero columns
-    static const unsigned int nzc0[3] = {5, 6, 7};
-    // Array of non-zero columns
-    static const unsigned int nzc1[3] = {1, 2, 3};
-    // Array of non-zero columns
-    static const unsigned int nzc2[3] = {4, 5, 7};
-    // Array of non-zero columns
-    static const unsigned int nzc3[3] = {0, 1, 3};
-    // Array of non-zero columns
-    static const unsigned int nzc9[3] = {0, 1, 2};
-    // Array of non-zero columns
-    static const unsigned int nzc10[3] = {4, 5, 6};
-    // Array of non-zero columns
-    static const unsigned int nzc8[3] = {4, 6, 7};
-    // Array of non-zero columns
-    static const unsigned int nzc7[3] = {0, 2, 3};
+    const static double W9[9] = {0.0558144204830443, 0.063678085099885, 0.0193963833059595, 0.0893030727728709, 0.101884936159816, 0.0310342132895351, 0.0558144204830443, 0.063678085099885, 0.0193963833059595};
+    
+    
+    const static double FE0_f0_C1[9][6] = \
+    {{0.499278833175498, -0.0816158215904471, -0.072892306371455, 0.0363981897820603, 0.286562341986258, 0.332268763018086},
+    {0.0251290590975513, -0.0576951799472842, -0.0741406382908807, 0.109006741895514, 0.858208263567717, 0.139491753677383},
+    {-0.117413197449647, -0.0227857341019971, 0.453155393641927, 0.0753983311062781, 0.593609805131561, 0.0180354016718773},
+    {-0.0403700664710396, -0.0403700664710397, -0.072892306371455, 0.161480265884159, 0.161480265884159, 0.830671907545217},
+    {-0.120901875682904, -0.120901875682904, -0.0741406382908807, 0.483607502731615, 0.483607502731616, 0.348729384193458},
+    {-0.0836260170297298, -0.0836260170297299, 0.453155393641927, 0.33450406811892, 0.33450406811892, 0.0450885041796932},
+    {-0.0816158215904472, 0.499278833175498, -0.072892306371455, 0.286562341986258, 0.0363981897820605, 0.332268763018087},
+    {-0.0576951799472843, 0.0251290590975512, -0.0741406382908807, 0.858208263567716, 0.109006741895515, 0.139491753677383},
+    {-0.0227857341019971, -0.117413197449647, 0.453155393641927, 0.593609805131561, 0.0753983311062786, 0.0180354016718773}};
+    // Array of non-zero columns
+    static const unsigned int nzc0[6] = {11, 12, 13, 14, 15, 16};
+    // Array of non-zero columns
+    static const unsigned int nzc1[6] = {1, 2, 3, 4, 5, 6};
+    // Array of non-zero columns
+    static const unsigned int nzc2[6] = {10, 11, 13, 15, 17, 19};
+    // Array of non-zero columns
+    static const unsigned int nzc3[6] = {0, 1, 3, 5, 7, 9};
+    // Array of non-zero columns
+    static const unsigned int nzc9[6] = {0, 1, 2, 6, 8, 9};
+    // Array of non-zero columns
+    static const unsigned int nzc10[6] = {10, 11, 12, 16, 18, 19};
+    // Array of non-zero columns
+    static const unsigned int nzc8[6] = {10, 12, 13, 14, 17, 18};
+    // Array of non-zero columns
+    static const unsigned int nzc7[6] = {0, 2, 3, 4, 7, 8};
     
     // Number of operations to compute geometry constants: 1
     // Should be added to total operation count.
@@ -20638,29 +24544,29 @@ void UFC_SolitaryWave3DLinearForm_exteri
     {
     case 0:
       {
-      // Total number of operations to compute element tensor (from this point): 64
+      // Total number of operations to compute element tensor (from this point): 252
       
       // Loop quadrature points for integral
-      // Number of operations to compute element tensor for following IP loop = 64
-      for (unsigned int ip = 0; ip < 4; ip++)
+      // Number of operations to compute element tensor for following IP loop = 252
+      for (unsigned int ip = 0; ip < 9; ip++)
       {
         
         // Function declarations
         double F0 = 0;
         
-        // Total number of operations to compute function values = 6
-        for (unsigned int r = 0; r < 3; r++)
+        // Total number of operations to compute function values = 12
+        for (unsigned int r = 0; r < 6; r++)
         {
           F0 += FE0_f0_C1[ip][r]*w[0][nzc0[r]];
         }// end loop over 'r'
         
         // Number of operations to compute ip constants: 4
         // Number of operations: 4
-        const double Gip0 = F0*F0*F0*W4[ip]*G0;
-        
-        
-        // Number of operations for primary indices = 6
-        for (unsigned int j = 0; j < 3; j++)
+        const double Gip0 = F0*F0*F0*W9[ip]*G0;
+        
+        
+        // Number of operations for primary indices = 12
+        for (unsigned int j = 0; j < 6; j++)
         {
           // Number of operations to compute entry = 2
           A[nzc1[j]] += FE0_f0_C1[ip][j]*Gip0;
@@ -20670,29 +24576,29 @@ void UFC_SolitaryWave3DLinearForm_exteri
       break;
     case 1:
       {
-      // Total number of operations to compute element tensor (from this point): 64
+      // Total number of operations to compute element tensor (from this point): 252
       
       // Loop quadrature points for integral
-      // Number of operations to compute element tensor for following IP loop = 64
-      for (unsigned int ip = 0; ip < 4; ip++)
+      // Number of operations to compute element tensor for following IP loop = 252
+      for (unsigned int ip = 0; ip < 9; ip++)
       {
         
         // Function declarations
         double F0 = 0;
         
-        // Total number of operations to compute function values = 6
-        for (unsigned int r = 0; r < 3; r++)
+        // Total number of operations to compute function values = 12
+        for (unsigned int r = 0; r < 6; r++)
         {
           F0 += FE0_f0_C1[ip][r]*w[0][nzc8[r]];
         }// end loop over 'r'
         
         // Number of operations to compute ip constants: 4
         // Number of operations: 4
-        const double Gip0 = F0*F0*F0*W4[ip]*G0;
-        
-        
-        // Number of operations for primary indices = 6
-        for (unsigned int j = 0; j < 3; j++)
+        const double Gip0 = F0*F0*F0*W9[ip]*G0;
+        
+        
+        // Number of operations for primary indices = 12
+        for (unsigned int j = 0; j < 6; j++)
         {
           // Number of operations to compute entry = 2
           A[nzc7[j]] += FE0_f0_C1[ip][j]*Gip0;
@@ -20702,29 +24608,29 @@ void UFC_SolitaryWave3DLinearForm_exteri
       break;
     case 2:
       {
-      // Total number of operations to compute element tensor (from this point): 64
+      // Total number of operations to compute element tensor (from this point): 252
       
       // Loop quadrature points for integral
-      // Number of operations to compute element tensor for following IP loop = 64
-      for (unsigned int ip = 0; ip < 4; ip++)
+      // Number of operations to compute element tensor for following IP loop = 252
+      for (unsigned int ip = 0; ip < 9; ip++)
       {
         
         // Function declarations
         double F0 = 0;
         
-        // Total number of operations to compute function values = 6
-        for (unsigned int r = 0; r < 3; r++)
+        // Total number of operations to compute function values = 12
+        for (unsigned int r = 0; r < 6; r++)
         {
           F0 += FE0_f0_C1[ip][r]*w[0][nzc2[r]];
         }// end loop over 'r'
         
         // Number of operations to compute ip constants: 4
         // Number of operations: 4
-        const double Gip0 = F0*F0*F0*W4[ip]*G0;
-        
-        
-        // Number of operations for primary indices = 6
-        for (unsigned int j = 0; j < 3; j++)
+        const double Gip0 = F0*F0*F0*W9[ip]*G0;
+        
+        
+        // Number of operations for primary indices = 12
+        for (unsigned int j = 0; j < 6; j++)
         {
           // Number of operations to compute entry = 2
           A[nzc3[j]] += FE0_f0_C1[ip][j]*Gip0;
@@ -20734,29 +24640,29 @@ void UFC_SolitaryWave3DLinearForm_exteri
       break;
     case 3:
       {
-      // Total number of operations to compute element tensor (from this point): 64
+      // Total number of operations to compute element tensor (from this point): 252
       
       // Loop quadrature points for integral
-      // Number of operations to compute element tensor for following IP loop = 64
-      for (unsigned int ip = 0; ip < 4; ip++)
+      // Number of operations to compute element tensor for following IP loop = 252
+      for (unsigned int ip = 0; ip < 9; ip++)
       {
         
         // Function declarations
         double F0 = 0;
         
-        // Total number of operations to compute function values = 6
-        for (unsigned int r = 0; r < 3; r++)
+        // Total number of operations to compute function values = 12
+        for (unsigned int r = 0; r < 6; r++)
         {
           F0 += FE0_f0_C1[ip][r]*w[0][nzc10[r]];
         }// end loop over 'r'
         
         // Number of operations to compute ip constants: 4
         // Number of operations: 4
-        const double Gip0 = F0*F0*F0*W4[ip]*G0;
-        
-        
-        // Number of operations for primary indices = 6
-        for (unsigned int j = 0; j < 3; j++)
+        const double Gip0 = F0*F0*F0*W9[ip]*G0;
+        
+        
+        // Number of operations for primary indices = 12
+        for (unsigned int j = 0; j < 6; j++)
         {
           // Number of operations to compute entry = 2
           A[nzc9[j]] += FE0_f0_C1[ip][j]*Gip0;
@@ -20794,6 +24700,18 @@ void UFC_SolitaryWave3DLinearForm_exteri
     A[5] = 0;
     A[6] = 0;
     A[7] = 0;
+    A[8] = 0;
+    A[9] = 0;
+    A[10] = 0;
+    A[11] = 0;
+    A[12] = 0;
+    A[13] = 0;
+    A[14] = 0;
+    A[15] = 0;
+    A[16] = 0;
+    A[17] = 0;
+    A[18] = 0;
+    A[19] = 0;
     
     // Add all contributions to element tensor
     integral_0_quadrature.tabulate_tensor(A, w, c, facet);
@@ -20814,7 +24732,7 @@ UFC_SolitaryWave3DLinearForm::~UFC_Solit
 /// Return a string identifying the form
 const char* UFC_SolitaryWave3DLinearForm::signature() const
 {
-    return "Form([Integral(Sum(Product(Indexed(BasisFunction(MixedElement(*[FiniteElement('Lagrange', Cell('tetrahedron', 1), 1), FiniteElement('Lagrange', Cell('tetrahedron', 1), 1)], **{'value_shape': (2,) }), 0), MultiIndex((FixedIndex(1),))), Sum(Indexed(Function(MixedElement(*[FiniteElement('Lagrange', Cell('tetrahedron', 1), 1), FiniteElement('Lagrange', Cell('tetrahedron', 1), 1)], **{'value_shape': (2,) }), 0), MultiIndex((FixedIndex(1),))), Product(IntValue(-1, (), (), {}), Product(Indexed(Function(MixedElement(*[FiniteElement('Lagrange', Cell('tetrahedron', 1), 1), FiniteElement('Lagrange', Cell('tetrahedron', 1), 1)], **{'value_shape': (2,) }), 0), MultiIndex((FixedIndex(0),))), Product(Constant(Cell('tetrahedron', 1), 2), Product(FloatValue(0.5, (), (), {}), Constant(Cell('tetrahedron', 1), 1))))))), Sum(Product(IntValue(-1, (), (), {}), Product(Indexed(SpatialDerivative(BasisFunction(MixedElement(*[FiniteElement('Lagrange', Cell('tetrahedron', 1), 1), FiniteElement('Lagrange', Cell('tetrahedron', 1), 1)], **{'value_shape': (2,) }), 0), MultiIndex((FixedIndex(2),))), MultiIndex((FixedIndex(0),))), Product(Indexed(Function(MixedElement(*[FiniteElement('Lagrange', Cell('tetrahedron', 1), 1), FiniteElement('Lagrange', Cell('tetrahedron', 1), 1)], **{'value_shape': (2,) }), 0), MultiIndex((FixedIndex(1),))), Power(Indexed(Function(MixedElement(*[FiniteElement('Lagrange', Cell('tetrahedron', 1), 1), FiniteElement('Lagrange', Cell('tetrahedron', 1), 1)], **{'value_shape': (2,) }), 0), MultiIndex((FixedIndex(1),))), IntValue(2, (), (), {}))))), Sum(Product(IndexSum(Product(Indexed(ComponentTensor(Indexed(SpatialDerivative(BasisFunction(MixedElement(*[FiniteElement('Lagrange', Cell('tetrahedron', 1), 1), FiniteElement('Lagrange', Cell('tetrahedron', 1), 1)], **{'value_shape': (2,) }), 0), MultiIndex((Index(0),))), MultiIndex((FixedIndex(0),))), MultiIndex((Index(0),))), MultiIndex((Index(1),))), Indexed(ComponentTensor(Indexed(SpatialDerivative(Function(MixedElement(*[FiniteElement('Lagrange', Cell('tetrahedron', 1), 1), FiniteElement('Lagrange', Cell('tetrahedron', 1), 1)], **{'value_shape': (2,) }), 0), MultiIndex((Index(2),))), MultiIndex((FixedIndex(0),))), MultiIndex((Index(2),))), MultiIndex((Index(1),)))), MultiIndex((Index(1),))), Product(Indexed(Function(MixedElement(*[FiniteElement('Lagrange', Cell('tetrahedron', 1), 1), FiniteElement('Lagrange', Cell('tetrahedron', 1), 1)], **{'value_shape': (2,) }), 0), MultiIndex((FixedIndex(1),))), Power(Indexed(Function(MixedElement(*[FiniteElement('Lagrange', Cell('tetrahedron', 1), 1), FiniteElement('Lagrange', Cell('tetrahedron', 1), 1)], **{'value_shape': (2,) }), 0), MultiIndex((FixedIndex(1),))), IntValue(2, (), (), {})))), Product(Indexed(Function(MixedElement(*[FiniteElement('Lagrange', Cell('tetrahedron', 1), 1), FiniteElement('Lagrange', Cell('tetrahedron', 1), 1)], **{'value_shape': (2,) }), 0), MultiIndex((FixedIndex(0),))), Product(Constant(Cell('tetrahedron', 1), 2), Indexed(BasisFunction(MixedElement(*[FiniteElement('Lagrange', Cell('tetrahedron', 1), 1), FiniteElement('Lagrange', Cell('tetrahedron', 1), 1)], **{'value_shape': (2,) }), 0), MultiIndex((FixedIndex(0),)))))))), Measure('cell', 0, {'ffc_representation': 'quadrature', 'quadrature_order': 2})), Integral(Product(Indexed(VectorConstant(Cell('tetrahedron', 1), 3, 3), MultiIndex((FixedIndex(2),))), Product(Indexed(BasisFunction(MixedElement(*[FiniteElement('Lagrange', Cell('tetrahedron', 1), 1), FiniteElement('Lagrange', Cell('tetrahedron', 1), 1)], **{'value_shape': (2,) }), 0), MultiIndex((FixedIndex(0),))), Product(Indexed(Function(MixedElement(*[FiniteElement('Lagrange', Cell('tetrahedron', 1), 1), FiniteElement('Lagrange', Cell('tetrahedron', 1), 1)], **{'value_shape': (2,) }), 0), MultiIndex((FixedIndex(1),))), Power(Indexed(Function(MixedElement(*[FiniteElement('Lagrange', Cell('tetrahedron', 1), 1), FiniteElement('Lagrange', Cell('tetrahedron', 1), 1)], **{'value_shape': (2,) }), 0), MultiIndex((FixedIndex(1),))), IntValue(2, (), (), {}))))), Measure('exterior_facet', 0, {'ffc_representation': 'quadrature', 'quadrature_order': 2}))])";
+    return "Form([Integral(Sum(Product(Indexed(BasisFunction(MixedElement(*[FiniteElement('Lagrange', Cell('tetrahedron', 1), 2), FiniteElement('Lagrange', Cell('tetrahedron', 1), 2)], **{'value_shape': (2,) }), 0), MultiIndex((FixedIndex(1),))), Sum(Indexed(Function(MixedElement(*[FiniteElement('Lagrange', Cell('tetrahedron', 1), 2), FiniteElement('Lagrange', Cell('tetrahedron', 1), 2)], **{'value_shape': (2,) }), 0), MultiIndex((FixedIndex(1),))), Product(IntValue(-1, (), (), {}), Product(Indexed(Function(MixedElement(*[FiniteElement('Lagrange', Cell('tetrahedron', 1), 2), FiniteElement('Lagrange', Cell('tetrahedron', 1), 2)], **{'value_shape': (2,) }), 0), MultiIndex((FixedIndex(0),))), Product(Constant(Cell('tetrahedron', 1), 2), Product(FloatValue(0.5, (), (), {}), Constant(Cell('tetrahedron', 1), 1))))))), Sum(Product(IntValue(-1, (), (), {}), Product(Indexed(SpatialDerivative(BasisFunction(MixedElement(*[FiniteElement('Lagrange', Cell('tetrahedron', 1), 2), FiniteElement('Lagrange', Cell('tetrahedron', 1), 2)], **{'value_shape': (2,) }), 0), MultiIndex((FixedIndex(2),))), MultiIndex((FixedIndex(0),))), Product(Indexed(Function(MixedElement(*[FiniteElement('Lagrange', Cell('tetrahedron', 1), 2), FiniteElement('Lagrange', Cell('tetrahedron', 1), 2)], **{'value_shape': (2,) }), 0), MultiIndex((FixedIndex(1),))), Power(Indexed(Function(MixedElement(*[FiniteElement('Lagrange', Cell('tetrahedron', 1), 2), FiniteElement('Lagrange', Cell('tetrahedron', 1), 2)], **{'value_shape': (2,) }), 0), MultiIndex((FixedIndex(1),))), IntValue(2, (), (), {}))))), Sum(Product(IndexSum(Product(Indexed(ComponentTensor(Indexed(SpatialDerivative(BasisFunction(MixedElement(*[FiniteElement('Lagrange', Cell('tetrahedron', 1), 2), FiniteElement('Lagrange', Cell('tetrahedron', 1), 2)], **{'value_shape': (2,) }), 0), MultiIndex((Index(0),))), MultiIndex((FixedIndex(0),))), MultiIndex((Index(0),))), MultiIndex((Index(1),))), Indexed(ComponentTensor(Indexed(SpatialDerivative(Function(MixedElement(*[FiniteElement('Lagrange', Cell('tetrahedron', 1), 2), FiniteElement('Lagrange', Cell('tetrahedron', 1), 2)], **{'value_shape': (2,) }), 0), MultiIndex((Index(2),))), MultiIndex((FixedIndex(0),))), MultiIndex((Index(2),))), MultiIndex((Index(1),)))), MultiIndex((Index(1),))), Product(Indexed(Function(MixedElement(*[FiniteElement('Lagrange', Cell('tetrahedron', 1), 2), FiniteElement('Lagrange', Cell('tetrahedron', 1), 2)], **{'value_shape': (2,) }), 0), MultiIndex((FixedIndex(1),))), Power(Indexed(Function(MixedElement(*[FiniteElement('Lagrange', Cell('tetrahedron', 1), 2), FiniteElement('Lagrange', Cell('tetrahedron', 1), 2)], **{'value_shape': (2,) }), 0), MultiIndex((FixedIndex(1),))), IntValue(2, (), (), {})))), Product(Indexed(Function(MixedElement(*[FiniteElement('Lagrange', Cell('tetrahedron', 1), 2), FiniteElement('Lagrange', Cell('tetrahedron', 1), 2)], **{'value_shape': (2,) }), 0), MultiIndex((FixedIndex(0),))), Product(Constant(Cell('tetrahedron', 1), 2), Indexed(BasisFunction(MixedElement(*[FiniteElement('Lagrange', Cell('tetrahedron', 1), 2), FiniteElement('Lagrange', Cell('tetrahedron', 1), 2)], **{'value_shape': (2,) }), 0), MultiIndex((FixedIndex(0),)))))))), Measure('cell', 0, {'ffc_representation': 'quadrature', 'quadrature_order': 4})), Integral(Product(Indexed(VectorConstant(Cell('tetrahedron', 1), 3, 3), MultiIndex((FixedIndex(2),))), Product(Indexed(BasisFunction(MixedElement(*[FiniteElement('Lagrange', Cell('tetrahedron', 1), 2), FiniteElement('Lagrange', Cell('tetrahedron', 1), 2)], **{'value_shape': (2,) }), 0), MultiIndex((FixedIndex(0),))), Product(Indexed(Function(MixedElement(*[FiniteElement('Lagrange', Cell('tetrahedron', 1), 2), FiniteElement('Lagrange', Cell('tetrahedron', 1), 2)], **{'value_shape': (2,) }), 0), MultiIndex((FixedIndex(1),))), Power(Indexed(Function(MixedElement(*[FiniteElement('Lagrange', Cell('tetrahedron', 1), 2), FiniteElement('Lagrange', Cell('tetrahedron', 1), 2)], **{'value_shape': (2,) }), 0), MultiIndex((FixedIndex(1),))), IntValue(2, (), (), {}))))), Measure('exterior_facet', 0, {'ffc_representation': 'quadrature', 'quadrature_order': 4}))])";
 }
 
 /// Return the rank of the global tensor (r)
diff -r d848f74fedd2 -r 78b5d545a3d7 MADDs-4/cpp/SolitaryWave3D.ufl
--- a/MADDs-4/cpp/SolitaryWave3D.ufl	Fri Dec 04 21:18:03 2009 -0500
+++ b/MADDs-4/cpp/SolitaryWave3D.ufl	Sat Dec 05 00:43:06 2009 -0500
@@ -1,1 +1,1 @@ forms/SolitaryWave3D_n3m0_P1.ufl
-forms/SolitaryWave3D_n3m0_P1.ufl
\ No newline at end of file
+forms/SolitaryWave3D_n3m0_P2.ufl
\ No newline at end of file
diff -r d848f74fedd2 -r 78b5d545a3d7 MADDs-4/python/PySolwave/magma1d.pyc
Binary file MADDs-4/python/PySolwave/magma1d.pyc has changed
diff -r d848f74fedd2 -r 78b5d545a3d7 MADDs-4/python/PySolwave/magmasinc.pyc
Binary file MADDs-4/python/PySolwave/magmasinc.pyc has changed
diff -r d848f74fedd2 -r 78b5d545a3d7 MADDs-4/python/PySolwave/sinc_eo.pyc
Binary file MADDs-4/python/PySolwave/sinc_eo.pyc has changed
diff -r d848f74fedd2 -r 78b5d545a3d7 MADDs-4/python/PySolwave/sincmats.pyc
Binary file MADDs-4/python/PySolwave/sincmats.pyc has changed
diff -r d848f74fedd2 -r 78b5d545a3d7 MADDs-5/MADDs-5a/cpp/MeltFlux.h
--- a/MADDs-5/MADDs-5a/cpp/MeltFlux.h	Fri Dec 04 21:18:03 2009 -0500
+++ b/MADDs-5/MADDs-5a/cpp/MeltFlux.h	Sat Dec 05 00:43:06 2009 -0500
@@ -2633,8 +2633,8 @@ public:
 
   MeltFluxLinearFormCoefficientSpace0(const dolfin::Mesh& mesh)
     : dolfin::FunctionSpace(boost::shared_ptr<const dolfin::Mesh>(&mesh, dolfin::NoDeleter<const dolfin::Mesh>()),
-                            boost::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(boost::shared_ptr<ufc::finite_element>(new UFC_MeltFluxLinearForm_finite_element_3()))),
-                            boost::shared_ptr<const dolfin::DofMap>(new dolfin::DofMap(boost::shared_ptr<ufc::dof_map>(new UFC_MeltFluxLinearForm_dof_map_3()), mesh)))
+                            boost::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(boost::shared_ptr<ufc::finite_element>(new UFC_MeltFluxLinearForm_finite_element_2()))),
+                            boost::shared_ptr<const dolfin::DofMap>(new dolfin::DofMap(boost::shared_ptr<ufc::dof_map>(new UFC_MeltFluxLinearForm_dof_map_2()), mesh)))
   {
     // Do nothing
   }
@@ -2647,8 +2647,8 @@ public:
 
   MeltFluxLinearFormCoefficientSpace1(const dolfin::Mesh& mesh)
     : dolfin::FunctionSpace(boost::shared_ptr<const dolfin::Mesh>(&mesh, dolfin::NoDeleter<const dolfin::Mesh>()),
-                            boost::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(boost::shared_ptr<ufc::finite_element>(new UFC_MeltFluxLinearForm_finite_element_3()))),
-                            boost::shared_ptr<const dolfin::DofMap>(new dolfin::DofMap(boost::shared_ptr<ufc::dof_map>(new UFC_MeltFluxLinearForm_dof_map_3()), mesh)))
+                            boost::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(boost::shared_ptr<ufc::finite_element>(new UFC_MeltFluxLinearForm_finite_element_2()))),
+                            boost::shared_ptr<const dolfin::DofMap>(new dolfin::DofMap(boost::shared_ptr<ufc::dof_map>(new UFC_MeltFluxLinearForm_dof_map_2()), mesh)))
   {
     // Do nothing
   }



More information about the CIG-COMMITS mailing list