* FiniteElement to schedule auxiliary data fields for updating. Still, it is
* recommended to give <b>all</b> needed update flags to FEValues.
*
- * The mechanisms by which this class works is also discussed on the page on
- * @ref UpdateFlags.
+ *
+ * <h3>Internals about the implementation</h3>
+ *
+ * The mechanisms by which this class work are discussed on the page on
+ * @ref UpdateFlags "Update flags" and about the
+ * @ref FE_vs_Mapping_vs_FEValues "How Mapping, FiniteElement, and FEValues work together".
+ *
*
* @ingroup feaccess
* @author Wolfgang Bangerth, 1998, 2003, Guido Kanschat, 2001
*/
template <int dim, int spacedim>
-class FEValuesBase : protected dealii::internal::FEValues::MappingRelatedData<dim, spacedim>,
- protected dealii::internal::FEValues::FiniteElementRelatedData<dim, spacedim>,
+class FEValuesBase :
public Subscriptor
{
public:
* Destructor.
*/
~FEValuesBase ();
- /// @name ShapeAccess Access to shape function values. These fields are filled by the finite element
+
+
+ /// @name ShapeAccess Access to shape function values. These fields are filled by the finite element.
//@{
/**
maybe_invalidate_previous_present_cell (const typename Triangulation<dim,spacedim>::cell_iterator &cell);
/**
- * Storage for the mapping object.
+ * A pointer to the mapping object associated with this FEValues object.
*/
const SmartPointer<const Mapping<dim,spacedim>,FEValuesBase<dim,spacedim> > mapping;
/**
- * Store the finite element for later use.
+ * A pointer to the internal data object of mapping, obtained from
+ * Mapping::get_data(), Mapping::get_face_data(), or
+ * Mapping::get_subface_data().
*/
- const SmartPointer<const FiniteElement<dim,spacedim>,FEValuesBase<dim,spacedim> > fe;
+ std_cxx11::unique_ptr<typename Mapping<dim,spacedim>::InternalDataBase> mapping_data;
/**
- * Internal data of mapping.
+ * An object into which the Mapping::fill_fe_values() and similar
+ * functions place their output.
*/
- std_cxx11::unique_ptr<typename Mapping<dim,spacedim>::InternalDataBase> mapping_data;
+ dealii::internal::FEValues::MappingRelatedData<dim, spacedim> mapping_output;
+
/**
- * Internal data of finite element.
+ * A pointer to the finite element object associated with this FEValues object.
+ */
+ const SmartPointer<const FiniteElement<dim,spacedim>,FEValuesBase<dim,spacedim> > fe;
+
+ /**
+ * A pointer to the internal data object of finite element, obtained from
+ * FiniteElement::get_data(), Mapping::get_face_data(), or
+ * FiniteElement::get_subface_data().
*/
std_cxx11::unique_ptr<typename FiniteElement<dim,spacedim>::InternalDataBase> fe_data;
+ /**
+ * An object into which the FiniteElement::fill_fe_values() and similar
+ * functions place their output.
+ */
+ dealii::internal::FEValues::FiniteElementRelatedData<dim, spacedim> finite_element_output;
+
+
/**
* Original update flags handed to the constructor of FEValues.
*/
// except that here we know the component as fixed and we have
// pre-computed and cached a bunch of information. See the comments there.
if (shape_function_data[shape_function].is_nonzero_shape_function_component)
- return fe_values.shape_values(shape_function_data[shape_function]
- .row_index,
- q_point);
+ return fe_values.finite_element_output.shape_values(shape_function_data[shape_function]
+ .row_index,
+ q_point);
else
return 0;
}
// pre-computed and cached a bunch of
// information. See the comments there.
if (shape_function_data[shape_function].is_nonzero_shape_function_component)
- return fe_values.shape_gradients[shape_function_data[shape_function]
- .row_index][q_point];
+ return fe_values.finite_element_output.shape_gradients[shape_function_data[shape_function]
+ .row_index][q_point];
else
return gradient_type();
}
// pre-computed and cached a bunch of
// information. See the comments there.
if (shape_function_data[shape_function].is_nonzero_shape_function_component)
- return fe_values.shape_hessians[shape_function_data[shape_function].row_index][q_point];
+ return fe_values.finite_element_output.shape_hessians[shape_function_data[shape_function].row_index][q_point];
else
return hessian_type();
}
{
value_type return_value;
return_value[shape_function_data[shape_function].single_nonzero_component_index]
- = fe_values.shape_values(snc,q_point);
+ = fe_values.finite_element_output.shape_values(snc,q_point);
return return_value;
}
else
for (unsigned int d=0; d<dim; ++d)
if (shape_function_data[shape_function].is_nonzero_shape_function_component[d])
return_value[d]
- = fe_values.shape_values(shape_function_data[shape_function].row_index[d],q_point);
+ = fe_values.finite_element_output.shape_values(shape_function_data[shape_function].row_index[d],q_point);
return return_value;
}
{
gradient_type return_value;
return_value[shape_function_data[shape_function].single_nonzero_component_index]
- = fe_values.shape_gradients[snc][q_point];
+ = fe_values.finite_element_output.shape_gradients[snc][q_point];
return return_value;
}
else
for (unsigned int d=0; d<dim; ++d)
if (shape_function_data[shape_function].is_nonzero_shape_function_component[d])
return_value[d]
- = fe_values.shape_gradients[shape_function_data[shape_function].row_index[d]][q_point];
+ = fe_values.finite_element_output.shape_gradients[shape_function_data[shape_function].row_index[d]][q_point];
return return_value;
}
return divergence_type();
else if (snc != -1)
return
- fe_values.shape_gradients[snc][q_point][shape_function_data[shape_function].single_nonzero_component_index];
+ fe_values.finite_element_output.shape_gradients[snc][q_point][shape_function_data[shape_function].single_nonzero_component_index];
else
{
divergence_type return_value = 0;
for (unsigned int d=0; d<dim; ++d)
if (shape_function_data[shape_function].is_nonzero_shape_function_component[d])
return_value
- += fe_values.shape_gradients[shape_function_data[shape_function].row_index[d]][q_point][d];
+ += fe_values.finite_element_output.shape_gradients[shape_function_data[shape_function].row_index[d]][q_point][d];
return return_value;
}
// can only be zero
// or one in 2d
if (shape_function_data[shape_function].single_nonzero_component_index == 0)
- return_value[0] = -1.0 * fe_values.shape_gradients[snc][q_point][1];
+ return_value[0] = -1.0 * fe_values.finite_element_output.shape_gradients[snc][q_point][1];
else
- return_value[0] = fe_values.shape_gradients[snc][q_point][0];
+ return_value[0] = fe_values.finite_element_output.shape_gradients[snc][q_point][0];
return return_value;
}
if (shape_function_data[shape_function].is_nonzero_shape_function_component[0])
return_value[0]
- -= fe_values.shape_gradients[shape_function_data[shape_function].row_index[0]][q_point][1];
+ -= fe_values.finite_element_output.shape_gradients[shape_function_data[shape_function].row_index[0]][q_point][1];
if (shape_function_data[shape_function].is_nonzero_shape_function_component[1])
return_value[0]
- += fe_values.shape_gradients[shape_function_data[shape_function].row_index[1]][q_point][0];
+ += fe_values.finite_element_output.shape_gradients[shape_function_data[shape_function].row_index[1]][q_point][0];
return return_value;
}
case 0:
{
return_value[0] = 0;
- return_value[1] = fe_values.shape_gradients[snc][q_point][2];
- return_value[2] = -1.0 * fe_values.shape_gradients[snc][q_point][1];
+ return_value[1] = fe_values.finite_element_output.shape_gradients[snc][q_point][2];
+ return_value[2] = -1.0 * fe_values.finite_element_output.shape_gradients[snc][q_point][1];
return return_value;
}
case 1:
{
- return_value[0] = -1.0 * fe_values.shape_gradients[snc][q_point][2];
+ return_value[0] = -1.0 * fe_values.finite_element_output.shape_gradients[snc][q_point][2];
return_value[1] = 0;
- return_value[2] = fe_values.shape_gradients[snc][q_point][0];
+ return_value[2] = fe_values.finite_element_output.shape_gradients[snc][q_point][0];
return return_value;
}
default:
{
- return_value[0] = fe_values.shape_gradients[snc][q_point][1];
- return_value[1] = -1.0 * fe_values.shape_gradients[snc][q_point][0];
+ return_value[0] = fe_values.finite_element_output.shape_gradients[snc][q_point][1];
+ return_value[1] = -1.0 * fe_values.finite_element_output.shape_gradients[snc][q_point][0];
return_value[2] = 0;
return return_value;
}
if (shape_function_data[shape_function].is_nonzero_shape_function_component[0])
{
return_value[1]
- += fe_values.shape_gradients[shape_function_data[shape_function].row_index[0]][q_point][2];
+ += fe_values.finite_element_output.shape_gradients[shape_function_data[shape_function].row_index[0]][q_point][2];
return_value[2]
- -= fe_values.shape_gradients[shape_function_data[shape_function].row_index[0]][q_point][1];
+ -= fe_values.finite_element_output.shape_gradients[shape_function_data[shape_function].row_index[0]][q_point][1];
}
if (shape_function_data[shape_function].is_nonzero_shape_function_component[1])
{
return_value[0]
- -= fe_values.shape_gradients[shape_function_data[shape_function].row_index[1]][q_point][2];
+ -= fe_values.finite_element_output.shape_gradients[shape_function_data[shape_function].row_index[1]][q_point][2];
return_value[2]
- += fe_values.shape_gradients[shape_function_data[shape_function].row_index[1]][q_point][0];
+ += fe_values.finite_element_output.shape_gradients[shape_function_data[shape_function].row_index[1]][q_point][0];
}
if (shape_function_data[shape_function].is_nonzero_shape_function_component[2])
{
return_value[0]
- += fe_values.shape_gradients[shape_function_data[shape_function].row_index[2]][q_point][1];
+ += fe_values.finite_element_output.shape_gradients[shape_function_data[shape_function].row_index[2]][q_point][1];
return_value[1]
- -= fe_values.shape_gradients[shape_function_data[shape_function].row_index[2]][q_point][0];
+ -= fe_values.finite_element_output.shape_gradients[shape_function_data[shape_function].row_index[2]][q_point][0];
}
return return_value;
{
hessian_type return_value;
return_value[shape_function_data[shape_function].single_nonzero_component_index]
- = fe_values.shape_hessians[snc][q_point];
+ = fe_values.finite_element_output.shape_hessians[snc][q_point];
return return_value;
}
else
for (unsigned int d=0; d<dim; ++d)
if (shape_function_data[shape_function].is_nonzero_shape_function_component[d])
return_value[d]
- = fe_values.shape_hessians[shape_function_data[shape_function].row_index[d]][q_point];
+ = fe_values.finite_element_output.shape_hessians[shape_function_data[shape_function].row_index[d]][q_point];
return return_value;
}
return symmetric_gradient_type();
else if (snc != -1)
return symmetrize_single_row (shape_function_data[shape_function].single_nonzero_component_index,
- fe_values.shape_gradients[snc][q_point]);
+ fe_values.finite_element_output.shape_gradients[snc][q_point]);
else
{
gradient_type return_value;
for (unsigned int d=0; d<dim; ++d)
if (shape_function_data[shape_function].is_nonzero_shape_function_component[d])
return_value[d]
- = fe_values.shape_gradients[shape_function_data[shape_function].row_index[d]][q_point];
+ = fe_values.finite_element_output.shape_gradients[shape_function_data[shape_function].row_index[d]][q_point];
return symmetrize(return_value);
}
const unsigned int comp =
shape_function_data[shape_function].single_nonzero_component_index;
return_value[value_type::unrolled_to_component_indices(comp)]
- = fe_values.shape_values(snc,q_point);
+ = fe_values.finite_element_output.shape_values(snc,q_point);
return return_value;
}
else
for (unsigned int d = 0; d < value_type::n_independent_components; ++d)
if (shape_function_data[shape_function].is_nonzero_shape_function_component[d])
return_value[value_type::unrolled_to_component_indices(d)]
- = fe_values.shape_values(shape_function_data[shape_function].row_index[d],q_point);
+ = fe_values.finite_element_output.shape_values(shape_function_data[shape_function].row_index[d],q_point);
return return_value;
}
}
// b_jj := \dfrac{\partial phi_{ii,jj}}{\partial x_jj}.
// again, all other entries of 'b' are
// zero
- const dealii::Tensor<1, spacedim> phi_grad = fe_values.shape_gradients[snc][q_point];
+ const dealii::Tensor<1, spacedim> phi_grad = fe_values.finite_element_output.shape_gradients[snc][q_point];
divergence_type return_value;
return_value[ii] = phi_grad[jj];
const unsigned int comp =
shape_function_data[shape_function].single_nonzero_component_index;
const TableIndices<2> indices = dealii::Tensor<2,spacedim>::unrolled_to_component_indices(comp);
- return_value[indices] = fe_values.shape_values(snc,q_point);
+ return_value[indices] = fe_values.finite_element_output.shape_values(snc,q_point);
return return_value;
}
else
{
const TableIndices<2> indices = dealii::Tensor<2,spacedim>::unrolled_to_component_indices(d);
return_value[indices]
- = fe_values.shape_values(shape_function_data[shape_function].row_index[d],q_point);
+ = fe_values.finite_element_output.shape_values(shape_function_data[shape_function].row_index[d],q_point);
}
return return_value;
}
const unsigned int ii = indices[0];
const unsigned int jj = indices[1];
- const dealii::Tensor<1, spacedim> phi_grad = fe_values.shape_gradients[snc][q_point];
+ const dealii::Tensor<1, spacedim> phi_grad = fe_values.finite_element_output.shape_gradients[snc][q_point];
divergence_type return_value;
return_value[jj] = phi_grad[ii];
// if the entire FE is primitive,
// then we can take a short-cut:
if (fe->is_primitive())
- return this->shape_values(i,j);
+ return this->finite_element_output.shape_values(i,j);
else
{
// otherwise, use the mapping
// so we can call
// system_to_component_index
const unsigned int
- row = this->shape_function_to_row_table[i * fe->n_components() + fe->system_to_component_index(i).first];
- return this->shape_values(row, j);
+ row = this->finite_element_output.shape_function_to_row_table[i * fe->n_components() + fe->system_to_component_index(i).first];
+ return this->finite_element_output.shape_values(row, j);
}
}
// table and take the data from
// there
const unsigned int
- row = this->shape_function_to_row_table[i * fe->n_components() + component];
- return this->shape_values(row, j);
+ row = this->finite_element_output.shape_function_to_row_table[i * fe->n_components() + component];
+ return this->finite_element_output.shape_values(row, j);
}
ExcAccessToUninitializedField("update_gradients"));
Assert (fe->is_primitive (i),
ExcShapeFunctionNotPrimitive(i));
- Assert (i<this->shape_gradients.size(),
- ExcIndexRange (i, 0, this->shape_gradients.size()));
- Assert (j<this->shape_gradients[0].size(),
- ExcIndexRange (j, 0, this->shape_gradients[0].size()));
+ Assert (i<this->finite_element_output.shape_gradients.size(),
+ ExcIndexRange (i, 0, this->finite_element_output.shape_gradients.size()));
+ Assert (j<this->finite_element_output.shape_gradients[0].size(),
+ ExcIndexRange (j, 0, this->finite_element_output.shape_gradients[0].size()));
// if the entire FE is primitive,
// then we can take a short-cut:
if (fe->is_primitive())
- return this->shape_gradients[i][j];
+ return this->finite_element_output.shape_gradients[i][j];
else
{
// otherwise, use the mapping
// so we can call
// system_to_component_index
const unsigned int
- row = this->shape_function_to_row_table[i * fe->n_components() + fe->system_to_component_index(i).first];
- return this->shape_gradients[row][j];
+ row = this->finite_element_output.shape_function_to_row_table[i * fe->n_components() + fe->system_to_component_index(i).first];
+ return this->finite_element_output.shape_gradients[row][j];
}
}
// table and take the data from
// there
const unsigned int
- row = this->shape_function_to_row_table[i * fe->n_components() + component];
- return this->shape_gradients[row][j];
+ row = this->finite_element_output.shape_function_to_row_table[i * fe->n_components() + component];
+ return this->finite_element_output.shape_gradients[row][j];
}
ExcAccessToUninitializedField("update_hessians"));
Assert (fe->is_primitive (i),
ExcShapeFunctionNotPrimitive(i));
- Assert (i<this->shape_hessians.size(),
- ExcIndexRange (i, 0, this->shape_hessians.size()));
- Assert (j<this->shape_hessians[0].size(),
- ExcIndexRange (j, 0, this->shape_hessians[0].size()));
+ Assert (i<this->finite_element_output.shape_hessians.size(),
+ ExcIndexRange (i, 0, this->finite_element_output.shape_hessians.size()));
+ Assert (j<this->finite_element_output.shape_hessians[0].size(),
+ ExcIndexRange (j, 0, this->finite_element_output.shape_hessians[0].size()));
// if the entire FE is primitive,
// then we can take a short-cut:
if (fe->is_primitive())
- return this->shape_hessians[i][j];
+ return this->finite_element_output.shape_hessians[i][j];
else
{
// otherwise, use the mapping
// so we can call
// system_to_component_index
const unsigned int
- row = this->shape_function_to_row_table[i * fe->n_components() + fe->system_to_component_index(i).first];
- return this->shape_hessians[row][j];
+ row = this->finite_element_output.shape_function_to_row_table[i * fe->n_components() + fe->system_to_component_index(i).first];
+ return this->finite_element_output.shape_hessians[row][j];
}
}
// table and take the data from
// there
const unsigned int
- row = this->shape_function_to_row_table[i * fe->n_components() + component];
- return this->shape_hessians[row][j];
+ row = this->finite_element_output.shape_function_to_row_table[i * fe->n_components() + component];
+ return this->finite_element_output.shape_hessians[row][j];
}
{
Assert (this->update_flags & update_quadrature_points,
ExcAccessToUninitializedField("update_quadrature_points"));
- return this->quadrature_points;
+ return this->mapping_output.quadrature_points;
}
{
Assert (this->update_flags & update_JxW_values,
ExcAccessToUninitializedField("update_JxW_values"));
- return this->JxW_values;
+ return this->mapping_output.JxW_values;
}
{
Assert (this->update_flags & update_jacobians,
ExcAccessToUninitializedField("update_jacobians"));
- return this->jacobians;
+ return this->mapping_output.jacobians;
}
{
Assert (this->update_flags & update_jacobian_grads,
ExcAccessToUninitializedField("update_jacobians_grads"));
- return this->jacobian_grads;
+ return this->mapping_output.jacobian_grads;
}
{
Assert (this->update_flags & update_inverse_jacobians,
ExcAccessToUninitializedField("update_inverse_jacobians"));
- return this->inverse_jacobians;
+ return this->mapping_output.inverse_jacobians;
}
{
Assert (this->update_flags & update_quadrature_points,
ExcAccessToUninitializedField("update_quadrature_points"));
- Assert (i<this->quadrature_points.size(), ExcIndexRange(i, 0, this->quadrature_points.size()));
+ Assert (i<this->mapping_output.quadrature_points.size(),
+ ExcIndexRange(i, 0, this->mapping_output.quadrature_points.size()));
- return this->quadrature_points[i];
+ return this->mapping_output.quadrature_points[i];
}
{
Assert (this->update_flags & update_JxW_values,
ExcAccessToUninitializedField("update_JxW_values"));
- Assert (i<this->JxW_values.size(), ExcIndexRange(i, 0, this->JxW_values.size()));
+ Assert (i<this->mapping_output.JxW_values.size(),
+ ExcIndexRange(i, 0, this->mapping_output.JxW_values.size()));
- return this->JxW_values[i];
+ return this->mapping_output.JxW_values[i];
}
{
Assert (this->update_flags & update_jacobians,
ExcAccessToUninitializedField("update_jacobians"));
- Assert (i<this->jacobians.size(), ExcIndexRange(i, 0, this->jacobians.size()));
+ Assert (i<this->mapping_output.jacobians.size(),
+ ExcIndexRange(i, 0, this->mapping_output.jacobians.size()));
- return this->jacobians[i];
+ return this->mapping_output.jacobians[i];
}
{
Assert (this->update_flags & update_jacobian_grads,
ExcAccessToUninitializedField("update_jacobians_grads"));
- Assert (i<this->jacobian_grads.size(), ExcIndexRange(i, 0, this->jacobian_grads.size()));
+ Assert (i<this->mapping_output.jacobian_grads.size(),
+ ExcIndexRange(i, 0, this->mapping_output.jacobian_grads.size()));
- return this->jacobian_grads[i];
+ return this->mapping_output.jacobian_grads[i];
}
{
Assert (this->update_flags & update_inverse_jacobians,
ExcAccessToUninitializedField("update_inverse_jacobians"));
- Assert (i<this->inverse_jacobians.size(), ExcIndexRange(i, 0, this->inverse_jacobians.size()));
+ Assert (i<this->mapping_output.inverse_jacobians.size(),
+ ExcIndexRange(i, 0, this->mapping_output.inverse_jacobians.size()));
- return this->inverse_jacobians[i];
+ return this->mapping_output.inverse_jacobians[i];
}
typedef FEValuesBase<dim,spacedim> FVB;
Assert (this->update_flags & update_normal_vectors,
typename FVB::ExcAccessToUninitializedField("update_normal_vectors"));
- Assert (i<this->normal_vectors.size(),
- ExcIndexRange(i, 0, this->normal_vectors.size()));
+ Assert (i<this->mapping_output.normal_vectors.size(),
+ ExcIndexRange(i, 0, this->mapping_output.normal_vectors.size()));
- return this->normal_vectors[i];
+ return this->mapping_output.normal_vectors[i];
}
FEFaceValuesBase<dim,spacedim>::boundary_form (const unsigned int i) const
{
typedef FEValuesBase<dim,spacedim> FVB;
- Assert (i<this->boundary_forms.size(),
- ExcIndexRange(i, 0, this->boundary_forms.size()));
+ Assert (i<this->mapping_output.boundary_forms.size(),
+ ExcIndexRange(i, 0, this->mapping_output.boundary_forms.size()));
Assert (this->update_flags & update_boundary_forms,
typename FVB::ExcAccessToUninitializedField("update_boundary_forms"));
- return this->boundary_forms[i];
+ return this->mapping_output.boundary_forms[i];
}
#endif // DOXYGEN
dealii::Vector<typename InputVector::value_type> dof_values(fe_values.dofs_per_cell);
fe_values.present_cell->get_interpolated_dof_values(fe_function, dof_values);
internal::do_function_values<dim,spacedim>
- (dof_values, fe_values.shape_values, shape_function_data, values);
+ (dof_values, fe_values.finite_element_output.shape_values, shape_function_data, values);
}
dealii::Vector<typename InputVector::value_type> dof_values (fe_values.dofs_per_cell);
fe_values.present_cell->get_interpolated_dof_values(fe_function, dof_values);
internal::do_function_derivatives<1,dim,spacedim>
- (dof_values, fe_values.shape_gradients, shape_function_data, gradients);
+ (dof_values, fe_values.finite_element_output.shape_gradients, shape_function_data, gradients);
}
dealii::Vector<typename InputVector::value_type> dof_values (fe_values.dofs_per_cell);
fe_values.present_cell->get_interpolated_dof_values(fe_function, dof_values);
internal::do_function_derivatives<2,dim,spacedim>
- (dof_values, fe_values.shape_hessians, shape_function_data, hessians);
+ (dof_values, fe_values.finite_element_output.shape_hessians, shape_function_data, hessians);
}
dealii::Vector<typename InputVector::value_type> dof_values (fe_values.dofs_per_cell);
fe_values.present_cell->get_interpolated_dof_values(fe_function, dof_values);
internal::do_function_laplacians<dim,spacedim>
- (dof_values, fe_values.shape_hessians, shape_function_data, laplacians);
+ (dof_values, fe_values.finite_element_output.shape_hessians, shape_function_data, laplacians);
}
dealii::Vector<typename InputVector::value_type> dof_values (fe_values.dofs_per_cell);
fe_values.present_cell->get_interpolated_dof_values(fe_function, dof_values);
internal::do_function_values<dim,spacedim>
- (dof_values, fe_values.shape_values, shape_function_data, values);
+ (dof_values, fe_values.finite_element_output.shape_values, shape_function_data, values);
}
dealii::Vector<typename InputVector::value_type> dof_values (fe_values.dofs_per_cell);
fe_values.present_cell->get_interpolated_dof_values(fe_function, dof_values);
internal::do_function_derivatives<1,dim,spacedim>
- (dof_values, fe_values.shape_gradients, shape_function_data, gradients);
+ (dof_values, fe_values.finite_element_output.shape_gradients, shape_function_data, gradients);
}
dealii::Vector<typename InputVector::value_type> dof_values (fe_values.dofs_per_cell);
fe_values.present_cell->get_interpolated_dof_values(fe_function, dof_values);
internal::do_function_symmetric_gradients<dim,spacedim>
- (dof_values, fe_values.shape_gradients, shape_function_data,
+ (dof_values, fe_values.finite_element_output.shape_gradients, shape_function_data,
symmetric_gradients);
}
dealii::Vector<typename InputVector::value_type> dof_values (fe_values.dofs_per_cell);
fe_values.present_cell->get_interpolated_dof_values(fe_function, dof_values);
internal::do_function_divergences<dim,spacedim>
- (dof_values, fe_values.shape_gradients, shape_function_data, divergences);
+ (dof_values, fe_values.finite_element_output.shape_gradients, shape_function_data, divergences);
}
template <int dim, int spacedim>
dealii::Vector<typename InputVector::value_type> dof_values (fe_values.dofs_per_cell);
fe_values.present_cell->get_interpolated_dof_values (fe_function, dof_values);
internal::do_function_curls<dim,spacedim>
- (dof_values, fe_values.shape_gradients, shape_function_data, curls);
+ (dof_values, fe_values.finite_element_output.shape_gradients, shape_function_data, curls);
}
dealii::Vector<typename InputVector::value_type> dof_values (fe_values.dofs_per_cell);
fe_values.present_cell->get_interpolated_dof_values(fe_function, dof_values);
internal::do_function_derivatives<2,dim,spacedim>
- (dof_values, fe_values.shape_hessians, shape_function_data, hessians);
+ (dof_values, fe_values.finite_element_output.shape_hessians, shape_function_data, hessians);
}
dealii::Vector<typename InputVector::value_type> dof_values (fe_values.dofs_per_cell);
fe_values.present_cell->get_interpolated_dof_values(fe_function, dof_values);
internal::do_function_laplacians<dim,spacedim>
- (dof_values, fe_values.shape_hessians, shape_function_data, laplacians);
+ (dof_values, fe_values.finite_element_output.shape_hessians, shape_function_data, laplacians);
}
dealii::Vector<typename InputVector::value_type> dof_values(fe_values.dofs_per_cell);
fe_values.present_cell->get_interpolated_dof_values(fe_function, dof_values);
internal::do_function_values<dim,spacedim>
- (dof_values, fe_values.shape_values, shape_function_data, values);
+ (dof_values, fe_values.finite_element_output.shape_values, shape_function_data, values);
}
dealii::Vector<typename InputVector::value_type> dof_values(fe_values.dofs_per_cell);
fe_values.present_cell->get_interpolated_dof_values(fe_function, dof_values);
internal::do_function_divergences<dim,spacedim>
- (dof_values, fe_values.shape_gradients, shape_function_data, divergences);
+ (dof_values, fe_values.finite_element_output.shape_gradients, shape_function_data, divergences);
}
template <int dim, int spacedim>
dealii::Vector<typename InputVector::value_type> dof_values(fe_values.dofs_per_cell);
fe_values.present_cell->get_interpolated_dof_values(fe_function, dof_values);
internal::do_function_values<dim,spacedim>
- (dof_values, fe_values.shape_values, shape_function_data, values);
+ (dof_values, fe_values.finite_element_output.shape_values, shape_function_data, values);
}
dealii::Vector<typename InputVector::value_type> dof_values(fe_values.dofs_per_cell);
fe_values.present_cell->get_interpolated_dof_values(fe_function, dof_values);
internal::do_function_divergences<dim,spacedim>
- (dof_values, fe_values.shape_gradients, shape_function_data, divergences);
+ (dof_values, fe_values.finite_element_output.shape_gradients, shape_function_data, divergences);
}
}
}
+
+ template <int dim, int spacedim>
+ std::size_t
+ MappingRelatedData<dim,spacedim>::memory_consumption () const
+ {
+ return (MemoryConsumption::memory_consumption (JxW_values) +
+ MemoryConsumption::memory_consumption (jacobians) +
+ MemoryConsumption::memory_consumption (jacobian_grads) +
+ MemoryConsumption::memory_consumption (inverse_jacobians) +
+ MemoryConsumption::memory_consumption (quadrature_points) +
+ MemoryConsumption::memory_consumption (normal_vectors) +
+ MemoryConsumption::memory_consumption (boundary_forms));
+ }
+
+
+
+
template <int dim, int spacedim>
void
FiniteElementRelatedData<dim,spacedim>::initialize (const unsigned int n_quadrature_points,
this->shape_hessians.resize (n_nonzero_shape_components,
std::vector<Tensor<2,spacedim> > (n_quadrature_points));
}
+
+
+
+
+ template <int dim, int spacedim>
+ std::size_t
+ FiniteElementRelatedData<dim,spacedim>::memory_consumption () const
+ {
+ return (MemoryConsumption::memory_consumption (shape_values) +
+ MemoryConsumption::memory_consumption (shape_gradients) +
+ MemoryConsumption::memory_consumption (shape_hessians) +
+ MemoryConsumption::memory_consumption (shape_function_to_row_table));
+ }
}
}
// get function values of dofs on this cell
Vector<Number> dof_values (dofs_per_cell);
present_cell->get_interpolated_dof_values(fe_function, dof_values);
- internal::do_function_values (dof_values.begin(), this->shape_values,
+ internal::do_function_values (dof_values.begin(), this->finite_element_output.shape_values,
values);
}
Number dof_values[100];
for (unsigned int i=0; i<dofs_per_cell; ++i)
dof_values[i] = get_vector_element (fe_function, indices[i]);
- internal::do_function_values(&dof_values[0], this->shape_values, values);
+ internal::do_function_values(&dof_values[0], this->finite_element_output.shape_values, values);
}
else
{
Vector<Number> dof_values(dofs_per_cell);
for (unsigned int i=0; i<dofs_per_cell; ++i)
dof_values[i] = get_vector_element (fe_function, indices[i]);
- internal::do_function_values(dof_values.begin(), this->shape_values,
+ internal::do_function_values(dof_values.begin(), this->finite_element_output.shape_values,
values);
}
}
Vector<Number> dof_values (dofs_per_cell);
present_cell->get_interpolated_dof_values(fe_function, dof_values);
VectorSlice<std::vector<Vector<Number> > > val(values);
- internal::do_function_values(dof_values.begin(), this->shape_values, *fe,
- this->shape_function_to_row_table, val);
+ internal::do_function_values(dof_values.begin(), this->finite_element_output.shape_values, *fe,
+ this->finite_element_output.shape_function_to_row_table, val);
}
Number dof_values[100];
for (unsigned int i=0; i<dofs_per_cell; ++i)
dof_values[i] = get_vector_element (fe_function, indices[i]);
- internal::do_function_values(&dof_values[0], this->shape_values, *fe,
- this->shape_function_to_row_table, val,
+ internal::do_function_values(&dof_values[0], this->finite_element_output.shape_values, *fe,
+ this->finite_element_output.shape_function_to_row_table, val,
false, indices.size()/dofs_per_cell);
}
else
Vector<Number> dof_values(100);
for (unsigned int i=0; i<dofs_per_cell; ++i)
dof_values[i] = get_vector_element (fe_function, indices[i]);
- internal::do_function_values(dof_values.begin(), this->shape_values, *fe,
- this->shape_function_to_row_table, val,
+ internal::do_function_values(dof_values.begin(), this->finite_element_output.shape_values, *fe,
+ this->finite_element_output.shape_function_to_row_table, val,
false, indices.size()/dofs_per_cell);
}
}
Number dof_values[100];
for (unsigned int i=0; i<indices.size(); ++i)
dof_values[i] = get_vector_element (fe_function, indices[i]);
- internal::do_function_values(&dof_values[0], this->shape_values, *fe,
- this->shape_function_to_row_table, values,
+ internal::do_function_values(&dof_values[0], this->finite_element_output.shape_values, *fe,
+ this->finite_element_output.shape_function_to_row_table, values,
quadrature_points_fastest,
indices.size()/dofs_per_cell);
}
Vector<Number> dof_values(indices.size());
for (unsigned int i=0; i<indices.size(); ++i)
dof_values[i] = get_vector_element (fe_function, indices[i]);
- internal::do_function_values(dof_values.begin(), this->shape_values, *fe,
- this->shape_function_to_row_table, values,
+ internal::do_function_values(dof_values.begin(), this->finite_element_output.shape_values, *fe,
+ this->finite_element_output.shape_function_to_row_table, values,
quadrature_points_fastest,
indices.size()/dofs_per_cell);
}
// get function values of dofs on this cell
Vector<Number> dof_values (dofs_per_cell);
present_cell->get_interpolated_dof_values(fe_function, dof_values);
- internal::do_function_derivatives(dof_values.begin(), this->shape_gradients,
+ internal::do_function_derivatives(dof_values.begin(), this->finite_element_output.shape_gradients,
gradients);
}
Number dof_values[100];
for (unsigned int i=0; i<dofs_per_cell; ++i)
dof_values[i] = get_vector_element (fe_function, indices[i]);
- internal::do_function_derivatives(&dof_values[0], this->shape_gradients,
+ internal::do_function_derivatives(&dof_values[0], this->finite_element_output.shape_gradients,
gradients);
}
else
Vector<Number> dof_values(dofs_per_cell);
for (unsigned int i=0; i<dofs_per_cell; ++i)
dof_values[i] = get_vector_element (fe_function, indices[i]);
- internal::do_function_derivatives(dof_values.begin(), this->shape_gradients,
+ internal::do_function_derivatives(dof_values.begin(), this->finite_element_output.shape_gradients,
gradients);
}
}
Vector<Number> dof_values (dofs_per_cell);
present_cell->get_interpolated_dof_values(fe_function, dof_values);
VectorSlice<std::vector<std::vector<Tensor<1,spacedim,Number> > > > grads(gradients);
- internal::do_function_derivatives(dof_values.begin(), this->shape_gradients,
- *fe, this->shape_function_to_row_table,
+ internal::do_function_derivatives(dof_values.begin(), this->finite_element_output.shape_gradients,
+ *fe, this->finite_element_output.shape_function_to_row_table,
grads);
}
Number dof_values[100];
for (unsigned int i=0; i<indices.size(); ++i)
dof_values[i] = get_vector_element (fe_function, indices[i]);
- internal::do_function_derivatives(&dof_values[0], this->shape_gradients,
- *fe, this->shape_function_to_row_table,
+ internal::do_function_derivatives(&dof_values[0], this->finite_element_output.shape_gradients,
+ *fe, this->finite_element_output.shape_function_to_row_table,
gradients, quadrature_points_fastest,
indices.size()/dofs_per_cell);
}
Vector<Number> dof_values(indices.size());
for (unsigned int i=0; i<indices.size(); ++i)
dof_values[i] = get_vector_element (fe_function, indices[i]);
- internal::do_function_derivatives(dof_values.begin(),this->shape_gradients,
- *fe, this->shape_function_to_row_table,
+ internal::do_function_derivatives(dof_values.begin(),this->finite_element_output.shape_gradients,
+ *fe, this->finite_element_output.shape_function_to_row_table,
gradients, quadrature_points_fastest,
indices.size()/dofs_per_cell);
}
// get function values of dofs on this cell
Vector<Number> dof_values (dofs_per_cell);
present_cell->get_interpolated_dof_values(fe_function, dof_values);
- internal::do_function_derivatives(dof_values.begin(), this->shape_hessians,
+ internal::do_function_derivatives(dof_values.begin(), this->finite_element_output.shape_hessians,
hessians);
}
Number dof_values[100];
for (unsigned int i=0; i<dofs_per_cell; ++i)
dof_values[i] = get_vector_element (fe_function, indices[i]);
- internal::do_function_derivatives(&dof_values[0], this->shape_hessians,
+ internal::do_function_derivatives(&dof_values[0], this->finite_element_output.shape_hessians,
hessians);
}
else
Vector<Number> dof_values(dofs_per_cell);
for (unsigned int i=0; i<dofs_per_cell; ++i)
dof_values[i] = get_vector_element (fe_function, indices[i]);
- internal::do_function_derivatives(dof_values.begin(), this->shape_hessians,
+ internal::do_function_derivatives(dof_values.begin(), this->finite_element_output.shape_hessians,
hessians);
}
}
Vector<Number> dof_values (dofs_per_cell);
present_cell->get_interpolated_dof_values(fe_function, dof_values);
VectorSlice<std::vector<std::vector<Tensor<2,spacedim,Number> > > > hes(hessians);
- internal::do_function_derivatives(dof_values.begin(), this->shape_hessians,
- *fe, this->shape_function_to_row_table,
+ internal::do_function_derivatives(dof_values.begin(), this->finite_element_output.shape_hessians,
+ *fe, this->finite_element_output.shape_function_to_row_table,
hes, quadrature_points_fastest);
}
Number dof_values[100];
for (unsigned int i=0; i<indices.size(); ++i)
dof_values[i] = get_vector_element (fe_function, indices[i]);
- internal::do_function_derivatives(&dof_values[0], this->shape_hessians,
- *fe, this->shape_function_to_row_table,
+ internal::do_function_derivatives(&dof_values[0], this->finite_element_output.shape_hessians,
+ *fe, this->finite_element_output.shape_function_to_row_table,
hessians, quadrature_points_fastest,
indices.size()/dofs_per_cell);
}
Vector<Number> dof_values(indices.size());
for (unsigned int i=0; i<indices.size(); ++i)
dof_values[i] = get_vector_element (fe_function, indices[i]);
- internal::do_function_derivatives(dof_values.begin(),this->shape_hessians,
- *fe, this->shape_function_to_row_table,
+ internal::do_function_derivatives(dof_values.begin(),this->finite_element_output.shape_hessians,
+ *fe, this->finite_element_output.shape_function_to_row_table,
hessians, quadrature_points_fastest,
indices.size()/dofs_per_cell);
}
// get function values of dofs on this cell
Vector<Number> dof_values (dofs_per_cell);
present_cell->get_interpolated_dof_values(fe_function, dof_values);
- internal::do_function_laplacians(dof_values.begin(), this->shape_hessians,
+ internal::do_function_laplacians(dof_values.begin(), this->finite_element_output.shape_hessians,
laplacians);
}
Number dof_values[100];
for (unsigned int i=0; i<dofs_per_cell; ++i)
dof_values[i] = get_vector_element (fe_function, indices[i]);
- internal::do_function_laplacians(&dof_values[0], this->shape_hessians,
+ internal::do_function_laplacians(&dof_values[0], this->finite_element_output.shape_hessians,
laplacians);
}
else
Vector<Number> dof_values(dofs_per_cell);
for (unsigned int i=0; i<dofs_per_cell; ++i)
dof_values[i] = get_vector_element (fe_function, indices[i]);
- internal::do_function_laplacians(dof_values.begin(), this->shape_hessians,
+ internal::do_function_laplacians(dof_values.begin(), this->finite_element_output.shape_hessians,
laplacians);
}
}
// get function values of dofs on this cell
Vector<Number> dof_values (dofs_per_cell);
present_cell->get_interpolated_dof_values(fe_function, dof_values);
- internal::do_function_laplacians(dof_values.begin(), this->shape_hessians,
- *fe, this->shape_function_to_row_table,
+ internal::do_function_laplacians(dof_values.begin(), this->finite_element_output.shape_hessians,
+ *fe, this->finite_element_output.shape_function_to_row_table,
laplacians);
}
Number dof_values[100];
for (unsigned int i=0; i<indices.size(); ++i)
dof_values[i] = get_vector_element (fe_function, indices[i]);
- internal::do_function_laplacians(&dof_values[0], this->shape_hessians,
- *fe, this->shape_function_to_row_table,
+ internal::do_function_laplacians(&dof_values[0], this->finite_element_output.shape_hessians,
+ *fe, this->finite_element_output.shape_function_to_row_table,
laplacians, false,
indices.size()/dofs_per_cell);
}
Vector<Number> dof_values(indices.size());
for (unsigned int i=0; i<indices.size(); ++i)
dof_values[i] = get_vector_element (fe_function, indices[i]);
- internal::do_function_laplacians(dof_values.begin(),this->shape_hessians,
- *fe, this->shape_function_to_row_table,
+ internal::do_function_laplacians(dof_values.begin(),this->finite_element_output.shape_hessians,
+ *fe, this->finite_element_output.shape_function_to_row_table,
laplacians, false,
indices.size()/dofs_per_cell);
}
Number dof_values[100];
for (unsigned int i=0; i<indices.size(); ++i)
dof_values[i] = get_vector_element (fe_function, indices[i]);
- internal::do_function_laplacians(&dof_values[0], this->shape_hessians,
- *fe, this->shape_function_to_row_table,
+ internal::do_function_laplacians(&dof_values[0], this->finite_element_output.shape_hessians,
+ *fe, this->finite_element_output.shape_function_to_row_table,
laplacians, quadrature_points_fastest,
indices.size()/dofs_per_cell);
}
Vector<Number> dof_values(indices.size());
for (unsigned int i=0; i<indices.size(); ++i)
dof_values[i] = get_vector_element (fe_function, indices[i]);
- internal::do_function_laplacians(dof_values.begin(),this->shape_hessians,
- *fe, this->shape_function_to_row_table,
+ internal::do_function_laplacians(dof_values.begin(),this->finite_element_output.shape_hessians,
+ *fe, this->finite_element_output.shape_function_to_row_table,
laplacians, quadrature_points_fastest,
indices.size()/dofs_per_cell);
}
typedef FEValuesBase<dim,spacedim> FEVB;
Assert (this->update_flags & update_normal_vectors,
typename FEVB::ExcAccessToUninitializedField("update_normal_vectors"));
- return this->normal_vectors;
+ return this->mapping_output.normal_vectors;
}
typename FEVB::ExcAccessToUninitializedField("update_normal_vectors"));
// copy things into a vector of Points, then return that
- std::vector<Point<spacedim> > tmp (this->normal_vectors.size());
- for (unsigned int q=0; q<this->normal_vectors.size(); ++q)
- tmp[q] = Point<spacedim>(this->normal_vectors[q]);
+ std::vector<Point<spacedim> > tmp (this->mapping_output.normal_vectors.size());
+ for (unsigned int q=0; q<this->mapping_output.normal_vectors.size(); ++q)
+ tmp[q] = Point<spacedim>(this->mapping_output.normal_vectors[q]);
return tmp;
}
std::size_t
FEValuesBase<dim,spacedim>::memory_consumption () const
{
- return (MemoryConsumption::memory_consumption (this->shape_values) +
- MemoryConsumption::memory_consumption (this->shape_gradients) +
- MemoryConsumption::memory_consumption (this->shape_hessians) +
- MemoryConsumption::memory_consumption (this->JxW_values) +
- MemoryConsumption::memory_consumption (this->jacobians) +
- MemoryConsumption::memory_consumption (this->jacobian_grads) +
- MemoryConsumption::memory_consumption (this->inverse_jacobians) +
- MemoryConsumption::memory_consumption (this->quadrature_points) +
- MemoryConsumption::memory_consumption (this->normal_vectors) +
- MemoryConsumption::memory_consumption (this->boundary_forms) +
- sizeof(this->update_flags) +
+ return (sizeof(this->update_flags) +
MemoryConsumption::memory_consumption (n_quadrature_points) +
+ sizeof (cell_similarity) +
MemoryConsumption::memory_consumption (dofs_per_cell) +
MemoryConsumption::memory_consumption (mapping) +
- MemoryConsumption::memory_consumption (fe) +
MemoryConsumption::memory_consumption (mapping_data) +
MemoryConsumption::memory_consumption (*mapping_data) +
+ MemoryConsumption::memory_consumption (mapping_output) +
+ MemoryConsumption::memory_consumption (fe) +
MemoryConsumption::memory_consumption (fe_data) +
MemoryConsumption::memory_consumption (*fe_data) +
- MemoryConsumption::memory_consumption (this->shape_function_to_row_table));
+ MemoryConsumption::memory_consumption (finite_element_output));
}
quadrature);
// initialize the base classes
- internal::FEValues::MappingRelatedData<dim,spacedim>::initialize(this->n_quadrature_points, flags);
- internal::FEValues::FiniteElementRelatedData<dim,spacedim>::initialize(this->n_quadrature_points, *this->fe, flags);
+ this->mapping_output.initialize(this->n_quadrature_points, flags);
+ this->finite_element_output.initialize(this->n_quadrature_points, *this->fe, flags);
this->update_flags = flags;
this->cell_similarity,
quadrature,
*this->mapping_data,
- *this);
+ this->mapping_output);
// then call the finite element and, with the data
// already filled by the mapping, let it compute the
quadrature,
*this->mapping_data,
*this->fe_data,
- *this,
- *this,
+ this->mapping_output,
+ this->finite_element_output,
this->cell_similarity);
this->fe_data->clear_first_cell ();
typedef FEValuesBase<dim,spacedim> FEVB;
Assert (this->update_flags & update_boundary_forms,
typename FEVB::ExcAccessToUninitializedField("update_boundary_forms"));
- return this->boundary_forms;
+ return this->mapping_output.boundary_forms;
}
this->quadrature);
// initialize the base classes
- internal::FEValues::MappingRelatedData<dim,spacedim>::initialize(this->n_quadrature_points, flags);
- internal::FEValues::FiniteElementRelatedData<dim,spacedim>::initialize(this->n_quadrature_points, *this->fe, flags);
+ this->mapping_output.initialize(this->n_quadrature_points, flags);
+ this->finite_element_output.initialize(this->n_quadrature_points, *this->fe, flags);
this->update_flags = flags;
face_no,
this->quadrature,
*this->mapping_data,
- *this);
+ this->mapping_output);
this->get_fe().fill_fe_face_values(this->get_mapping(),
*this->present_cell, face_no,
this->quadrature,
*this->mapping_data,
*this->fe_data,
- *this,
- *this);
+ this->mapping_output,
+ this->finite_element_output);
this->fe_data->clear_first_cell ();
}
this->quadrature);
// initialize the base classes
- internal::FEValues::MappingRelatedData<dim,spacedim>::initialize(this->n_quadrature_points, flags);
- internal::FEValues::FiniteElementRelatedData<dim,spacedim>::initialize(this->n_quadrature_points, *this->fe, flags);
+ this->mapping_output.initialize(this->n_quadrature_points, flags);
+ this->finite_element_output.initialize(this->n_quadrature_points, *this->fe, flags);
this->update_flags = flags;
subface_no,
this->quadrature,
*this->mapping_data,
- *this);
+ this->mapping_output);
this->get_fe().fill_fe_subface_values(this->get_mapping(),
*this->present_cell,
this->quadrature,
*this->mapping_data,
*this->fe_data,
- *this,
- *this);
+ this->mapping_output,
+ this->finite_element_output);
this->fe_data->clear_first_cell ();
}