return false;
// shape values should be zero at x=0.5 for all basis functions except
- // for one which is one
+ // for the middle one
if (n_q_points_1d%2 == 1 && n_dofs_1d%2 == 1)
{
for (unsigned int i=0; i<n_dofs_1d/2; ++i)
if (std::abs(get_first_array_element(shape_values[i*n_q_points_1d+
n_q_points_1d/2])) > zero_tol)
return false;
- if (std::abs(get_first_array_element(shape_values[(n_dofs_1d/2)*n_q_points_1d+
- n_q_points_1d/2])-1.)> zero_tol)
- return false;
}
// skew-symmetry for gradient, zero of middle basis function in middle
if ( type == 0 && contract_over_rows == true && nn%2==1 && mm%2==1 )
{
if (add==false)
- out[stride*n_cols] = xmid;
+ out[stride*n_cols] = shapes[mid*offset+n_cols] * xmid;
else
- out[stride*n_cols] += xmid;
+ out[stride*n_cols] += shapes[mid*offset+n_cols] * xmid;
}
else if (contract_over_rows == true && nn%2==1)
{
else
r0 = Number();
- if (type == 0 && mm % 2 == 1)
- r0 += xmid;
- else if (type == 2 && mm % 2 == 1)
+ if ((type == 0 || type == 2) && mm % 2 == 1)
r0 += shapes[n_cols*offset+mid] * xmid;
if (add == false)
{
for (unsigned int i=0; i<M; ++i)
shape[i][N/2] = 0.;
- shape[M/2][N/2] = 1;
+ shape[M/2][N/2] = 0.9;
}
if (type == 1 && M%2 == 1 && N%2 == 1)
shape[M/2][N/2] = 0.;
{
for (unsigned int i=0; i<M; ++i)
shape[i][N/2] = 0.;
- shape[M/2][N/2] = 1;
+ shape[M/2][N/2] = 0.9;
}
if (type == 1 && M%2 == 1 && N%2 == 1)
shape[M/2][N/2] = 0.;
// check the correctness of the 1d evaluation functions used in FEEvaluation,
-// path evaluate_general, when using a double array for coefficients but
+// path evaluate_evenodd, when using a double array for coefficients but
// VectorizedArray for the input and output vector
#include "../tests.h"
{
for (unsigned int i=0; i<M; ++i)
shape[i][N/2] = 0.;
- shape[M/2][N/2] = 1;
+ shape[M/2][N/2] = 0.9;
}
if (type == 1 && M%2 == 1 && N%2 == 1)
shape[M/2][N/2] = 0.;