cell_matrix.clear ();
cell->get_dof_indices (dof_indices);
- const std::vector<std::vector<Tensor<1,dim> > >
- &grads = fe_values.get_shape_grads ();
-
if (coefficient != 0)
{
if (coefficient->n_components==1)
const double weight = fe_values.JxW(point);
for (unsigned int i=0; i<dofs_per_cell; ++i)
{
+ const Tensor<1,dim>& Dv = fe_values.shape_grad(i,point);
for (unsigned int j=0; j<dofs_per_cell; ++j)
{
+ const Tensor<1,dim>& Du = fe_values.shape_grad(j,point);
if ((n_components==1) ||
(fe.system_to_component_index(i).first ==
fe.system_to_component_index(j).first))
- cell_matrix(i,j) += (grads[i][point] *
- grads[j][point] *
- weight *
+ cell_matrix(i,j) += (Du * Dv * weight *
coefficient_values[point]);
}
}
const double weight = fe_values.JxW(point);
for (unsigned int i=0; i<dofs_per_cell; ++i)
{
+ const Tensor<1,dim>& Dv = fe_values.shape_grad(i,point);
const unsigned int component_i=
fe.system_to_component_index(i).first;
for (unsigned int j=0; j<dofs_per_cell; ++j)
{
+ const Tensor<1,dim>& Du = fe_values.shape_grad(j,point);
if ((n_components==1) ||
(fe.system_to_component_index(j).first == component_i))
- cell_matrix(i,j) += (grads[i][point] *
- grads[j][point] *
- weight *
+ cell_matrix(i,j) += (Du * Dv * weight *
coefficient_vector_values[point](component_i));
}
const double weight = fe_values.JxW(point);
for (unsigned int i=0; i<dofs_per_cell; ++i)
{
+ const Tensor<1,dim>& Dv = fe_values.shape_grad(i,point);
for (unsigned int j=0; j<dofs_per_cell; ++j)
{
+ const Tensor<1,dim>& Du = fe_values.shape_grad(j,point);
if ((n_components==1) ||
(fe.system_to_component_index(i).first ==
fe.system_to_component_index(j).first))
- cell_matrix(i,j) += (grads[i][point] *
- grads[j][point] *
- weight);
+ cell_matrix(i,j) += (Du * Dv * weight);
}
}
}
local_rhs.clear ();
cell->get_dof_indices (dof_indices);
- const std::vector<std::vector<Tensor<1,dim> > >
- &grads = fe_values.get_shape_grads ();
rhs.value_list (fe_values.get_quadrature_points(), rhs_values);
if (coefficient != 0)
for (unsigned int i=0; i<dofs_per_cell; ++i)
{
const double v = fe_values.shape_value(i,point);
+ const Tensor<1,dim>& Dv = fe_values.shape_grad(i,point);
for (unsigned int j=0; j<dofs_per_cell; ++j)
{
+ const Tensor<1,dim>& Du = fe_values.shape_grad(j,point);
if ((n_components==1) ||
(fe.system_to_component_index(i).first ==
fe.system_to_component_index(j).first))
- cell_matrix(i,j) += (grads[i][point] *
- grads[j][point] *
- weight *
+ cell_matrix(i,j) += (Du * Dv * weight *
coefficient_values[point]);
local_rhs(i) += v * rhs_values[point] * weight;
}
for (unsigned int i=0; i<dofs_per_cell; ++i)
{
const double v = fe_values.shape_value(i,point);
+ const Tensor<1,dim>& Dv = fe_values.shape_grad(i,point);
const unsigned int component_i=
fe.system_to_component_index(i).first;
for (unsigned int j=0; j<dofs_per_cell; ++j)
{
+ const Tensor<1,dim>& Du = fe_values.shape_grad(j,point);
if ((n_components==1) ||
(fe.system_to_component_index(j).first == component_i))
- cell_matrix(i,j) += (grads[i][point] *
- grads[j][point] *
- weight *
+ cell_matrix(i,j) += (Du * Dv * weight *
coefficient_vector_values[point](component_i));
local_rhs(i) += v * rhs_values[point] * weight;
}
for (unsigned int i=0; i<dofs_per_cell; ++i)
{
const double v = fe_values.shape_value(i,point);
+ const Tensor<1,dim>& Dv = fe_values.shape_grad(i,point);
for (unsigned int j=0; j<dofs_per_cell; ++j)
{
+ const Tensor<1,dim>& Du = fe_values.shape_grad(j,point);
if ((n_components==1) ||
(fe.system_to_component_index(i).first ==
fe.system_to_component_index(j).first))
- cell_matrix(i,j) += (grads[i][point] *
- grads[j][point] *
- weight);
+ cell_matrix(i,j) += (Du * Dv * weight);
local_rhs(i) += v * rhs_values[point] * weight;
}
}
{
fe_values.reinit(cell);
- const FullMatrix<double> &values = fe_values.get_shape_values ();
const std::vector<double> &weights = fe_values.get_JxW_values ();
rhs_function.value_list (fe_values.get_quadrature_points(), rhs_values);
for (unsigned int point=0; point<n_q_points; ++point)
for (unsigned int i=0; i<dofs_per_cell; ++i)
cell_vector(i) += rhs_values[point] *
- values(i,point) *
+ fe_values.shape_value(i,point) *
weights[point];
cell->get_dof_indices (dofs);
{
fe_values.reinit(cell);
- const FullMatrix<double> &values = fe_values.get_shape_values ();
const std::vector<double> &weights = fe_values.get_JxW_values ();
rhs_function.vector_value_list (fe_values.get_quadrature_points(), rhs_values);
= fe.system_to_component_index(i).first;
cell_vector(i) += rhs_values[point](component) *
- values(i,point) *
+ fe_values.shape_value(i,point) *
weights[point];
}
{
fe_values.reinit(cell, face);
- const FullMatrix<double> &values = fe_values.get_shape_values ();
const std::vector<double> &weights = fe_values.get_JxW_values ();
rhs_function.value_list (fe_values.get_quadrature_points(), rhs_values);
for (unsigned int point=0; point<n_q_points; ++point)
for (unsigned int i=0; i<dofs_per_cell; ++i)
cell_vector(i) += rhs_values[point] *
- values(i,point) *
+ fe_values.shape_value(i,point) *
weights[point];
cell->get_dof_indices (dofs);
{
fe_values.reinit(cell, face);
- const FullMatrix<double> &values = fe_values.get_shape_values ();
const std::vector<double> &weights = fe_values.get_JxW_values ();
rhs_function.vector_value_list (fe_values.get_quadrature_points(), rhs_values);
= fe.system_to_component_index(i).first;
cell_vector(i) += rhs_values[point](component) *
- values(i,point) *
+ fe_values.shape_value(i,point) *
weights[point];
}