// Instead of writing
// fe_values.shape_value(j,q)
// we can now write
- // shape_values(j,q), i.e. the
+ // shape_values[j][q], i.e. the
// function call needed
// previously for each access
- // has been optimized away.
+ // will be optimized away.
//
// There are alike functions
// for almost all data elements
// in the matrix (j,q) now
// needs to be the gradient of
// the shape function, which is
- // a vector.
+ // a tensor rather than a
+ // scalar.
//
// Similarly, access to the
// place where quadrature
// fe_values object is no more
// explicitely needed to access
// the different fields (see
- // below). Unfortunately,
- // things became a bit
- // inconsistent, since the
- // shape values are accessed
- // via the FullMatrix operator
- // (), i.e. using parentheses,
- // while all the other fields
- // are accessed through vector
- // operator [], i.e. using
- // brackets. This is due to
- // historical reasons and
- // frequently leads to a bit of
- // confusion, but since the
- // places where this happens
- // are few in well-written
- // programs, this is not too
- // big a problem.
+ // below).
// There is one more thing: in
// this example, we want to use
// For the right hand
// side, a constant value
// is used again:
- cell_rhs(i) += (shape_values (i,q_point) *
+ cell_rhs(i) += (shape_values[i][q_point] *
1.0 *
JxW_values[q_point]);
};
shape_grads[j][q_point]) *
JxW_values[q_point]);
- cell_rhs(i) += (shape_values (i,q_point) *
+ cell_rhs(i) += (shape_values[i][q_point] *
1.0 *
- fe_values.JxW (q_point));
+ JxW_values[q_point]);
};
shape_grads[j][q_point] *
JxW_values[q_point])
+
- (shape_values(i,q_point) *
- shape_values(j,q_point) *
+ (shape_values[i][q_point] *
+ shape_values[j][q_point] *
JxW_values[q_point]));
cell_rhs(i) += (shape_values (i,q_point) *
rhs_values [q_point] *
- fe_values.JxW (q_point));
+ JxW_values[q_point]);
};
// Then there is that second
// shape function:
for (unsigned int i=0; i<dofs_per_cell; ++i)
cell_rhs(i) += (neumann_value *
- face_shape_values(i,q_point) *
+ face_shape_values[i][q_point] *
face_JxW_values[q_point]);
};
};
component_i = fe.system_to_component_index(i).first;
for (unsigned int q_point=0; q_point<n_q_points; ++q_point)
- cell_rhs(i) += shape_values(i,q_point) *
+ cell_rhs(i) += shape_values[i][q_point] *
rhs_values[q_point](component_i) *
JxW_values[q_point];
};
for (unsigned int j=0; j<dofs_per_cell; ++j)
cell_matrix(i,j) += ((advection_directions[q_point] *
shape_grads[j][q_point] *
- (shape_values(i,q_point) +
+ (shape_values[i][q_point] +
delta *
(advection_directions[q_point] *
shape_grads[i][q_point]))) *
JxW_values[q_point]);
- cell_rhs(i) += ((shape_values (i,q_point) +
+ cell_rhs(i) += ((shape_values[i][q_point] +
delta *
(advection_directions[q_point] *
shape_grads[i][q_point]) ) *
for (unsigned int j=0; j<dofs_per_cell; ++j)
cell_matrix(i,j) -= (face_advection_directions[q_point] *
normal_vectors[q_point] *
- face_shape_values(i,q_point) *
- face_shape_values(j,q_point) *
+ face_shape_values[i][q_point] *
+ face_shape_values[j][q_point] *
face_JxW_values[q_point]);
cell_rhs(i) -= (face_advection_directions[q_point] *
normal_vectors[q_point] *
face_boundary_values[q_point] *
- face_shape_values(i,q_point) *
+ face_shape_values[i][q_point] *
face_JxW_values[q_point]);
};
};