13 { 1, 1, 1 }, { -1, 1, 1 },
29 { -1, 0, 0 }, { 0, 0, -1 }, { 0, 0, 1 }, { 0, 0, 0 } };
36 return ( params * params - params ) / 2;
38 return 1 - params * params;
40 return ( params * params + params ) / 2;
67 assert( params && field && num_tuples > 0 );
68 std::fill( result, result + num_tuples, 0.0 );
69 for(
int i = 0; i < 27; i++ )
72 for(
int j = 0; j < num_tuples; j++ )
73 result[j] += sh * field[num_tuples * i + j];
86 assert( 27 == nverts && params && verts );
87 if( 27 != nverts )
return MB_FAILURE;
89 for(
int i = 0; i < 27; i++ )
91 const double sh[3] = {
SH(
corner[i][0], params[0] ),
SH(
corner[i][1], params[1] ),
93 const double dsh[3] = {
DSH(
corner[i][0], params[0] ),
DSH(
corner[i][1], params[1] ),
96 for(
int j = 0; j < 3; j++ )
98 ( *J )( j, 0 ) += dsh[0] * sh[1] * sh[2] * verts[ndim * i + j];
99 ( *J )( j, 1 ) += sh[0] * dsh[1] * sh[2] * verts[ndim * i + j];
100 ( *J )( j, 2 ) += sh[0] * sh[1] * dsh[2] * verts[ndim * i + j];
125 const double iter_tol,
126 const double inside_tol,
131 assert( posn && verts );
132 return EvalSet::evaluate_reverse( eval, jacob, ins, posn, verts, nverts, ndim, iter_tol, inside_tol, work, params,