std::unique_ptr<const FiniteElement<dim>>(projection_fe_.clone()))
, data_size_in_bytes(0)
, n_q_points(rhs_quadrature.size())
- , project_to_fe_matrix(projection_fe->dofs_per_cell, n_q_points)
- , project_to_qp_matrix(n_q_points, projection_fe->dofs_per_cell)
+ , project_to_fe_matrix(projection_fe->n_dofs_per_cell(), n_q_points)
+ , project_to_qp_matrix(n_q_points, projection_fe->n_dofs_per_cell())
, handle(numbers::invalid_unsigned_int)
, data_storage(nullptr)
, triangulation(nullptr)
{
// we need to first use prolongation matrix to get dofvalues on child
// cells based on dofvalues stored in the parent's data_store
- matrix_dofs_child.reinit(projection_fe->dofs_per_cell,
+ matrix_dofs_child.reinit(projection_fe->n_dofs_per_cell(),
number_of_values);
for (unsigned int child = 0; child < cell->n_children(); ++child)
if (cell->child(child)->is_locally_owned())
*
* @param[out] dof_indices The vector into which the indices will be
* written. It has to have the right size (namely,
- * <code>fe.dofs_per_cell</code>, <code>fe.dofs_per_face</code>, or
+ * <code>fe.n_dofs_per_cell()</code>, <code>fe.dofs_per_face</code>, or
* <code>fe.dofs_per_line</code>, depending on which kind of object this
* function is called) before being passed to this function.
*
* argument to this function is called <code>local_dof_indices</code> by
* convention. The name is not meant to indicate the <i>local</i> numbers of
* degrees of freedom (which are always between zero and
- * <code>fe.dofs_per_cell</code>) but instead that the returned values are
+ * <code>fe.n_dofs_per_cell()</code>) but instead that the returned values are
* the <i>global</i> indices of those degrees of freedom that are located
* locally on the current cell.
*
if (d == 0)
dof_handler.object_dof_indices
- [0][0][obj_index * dof_handler.get_fe().dofs_per_vertex +
+ [0][0][obj_index * dof_handler.get_fe().n_dofs_per_vertex() +
local_index] = global_index;
else
dof_handler.object_dof_indices
if (d == 0)
return dof_handler.object_dof_indices
- [0][0][obj_index * dof_handler.get_fe().dofs_per_vertex +
+ [0][0][obj_index * dof_handler.get_fe().n_dofs_per_vertex() +
local_index];
else
return dof_handler.object_dof_indices
"hp::DoFHandler does not implement multilevel DoFs."));
return dof_handler.mg_vertex_dofs[vertex_index].get_index(
- level, i, dof_handler.get_fe().dofs_per_vertex);
+ level, i, dof_handler.get_fe().n_dofs_per_vertex());
}
"hp::DoFHandler does not implement multilevel DoFs."));
return dof_handler.mg_vertex_dofs[vertex_index].set_index(
- level, i, dof_handler.get_fe().dofs_per_vertex, index);
+ level, i, dof_handler.get_fe().n_dofs_per_vertex(), index);
}
dof_indices.begin();
for (const unsigned int vertex : accessor.vertex_indices())
- for (unsigned int dof = 0; dof < fe.dofs_per_vertex; ++dof)
+ for (unsigned int dof = 0; dof < fe.n_dofs_per_vertex(); ++dof)
accessor.set_mg_vertex_dof_index(
level, vertex, dof, *next++, fe_index);
dof_indices.begin();
for (const unsigned int vertex : accessor.vertex_indices())
- for (unsigned int dof = 0; dof < fe.dofs_per_vertex; ++dof)
+ for (unsigned int dof = 0; dof < fe.n_dofs_per_vertex(); ++dof)
accessor.set_mg_vertex_dof_index(
level, vertex, dof, *next++, fe_index);
dof_indices.begin();
for (const unsigned int vertex : accessor.vertex_indices())
- for (unsigned int dof = 0; dof < fe.dofs_per_vertex; ++dof)
+ for (unsigned int dof = 0; dof < fe.n_dofs_per_vertex(); ++dof)
accessor.set_mg_vertex_dof_index(
level, vertex, dof, *next++, fe_index);
const unsigned int fe_index,
const DoFOperation &)
{
- const unsigned int //
- dofs_per_vertex = accessor.get_fe(fe_index).dofs_per_vertex, //
- dofs_per_line = accessor.get_fe(fe_index).dofs_per_line, //
- dofs_per_quad = accessor.get_fe(fe_index).dofs_per_quad, //
- dofs_per_hex = accessor.get_fe(fe_index).dofs_per_hex; //
+ const unsigned int //
+ dofs_per_vertex = accessor.get_fe(fe_index).n_dofs_per_vertex(), //
+ dofs_per_line = accessor.get_fe(fe_index).dofs_per_line, //
+ dofs_per_quad = accessor.get_fe(fe_index).dofs_per_quad, //
+ dofs_per_hex = accessor.get_fe(fe_index).dofs_per_hex; //
const unsigned int inner_dofs =
structdim == 1 ? dofs_per_line :
(void)fe_index;
Assert(this->dof_handler != nullptr, ExcInvalidObject());
AssertIndexRange(vertex, this->n_vertices());
- AssertIndexRange(i, this->dof_handler->get_fe(fe_index).dofs_per_vertex);
+ AssertIndexRange(i, this->dof_handler->get_fe(fe_index).n_dofs_per_vertex());
Assert(dof_handler->hp_capability_enabled == false,
ExcMessage("hp::DoFHandler does not implement multilevel DoFs."));
return this->dof_handler->mg_vertex_dofs[this->vertex_index(vertex)]
- .get_index(level, i, this->dof_handler->get_fe().dofs_per_vertex);
+ .get_index(level, i, this->dof_handler->get_fe().n_dofs_per_vertex());
}
(void)fe_index;
Assert(this->dof_handler != nullptr, ExcInvalidObject());
AssertIndexRange(vertex, this->n_vertices());
- AssertIndexRange(i, this->dof_handler->get_fe(fe_index).dofs_per_vertex);
+ AssertIndexRange(i, this->dof_handler->get_fe(fe_index).n_dofs_per_vertex());
Assert(dof_handler->hp_capability_enabled == false,
ExcMessage("hp::DoFHandler does not implement multilevel DoFs."));
this->dof_handler->mg_vertex_dofs[this->vertex_index(vertex)].set_index(
- level, i, this->dof_handler->get_fe().dofs_per_vertex, index);
+ level, i, this->dof_handler->get_fe().n_dofs_per_vertex(), index);
}
std::vector<types::global_dof_index>::iterator next = dof_indices.begin();
for (const unsigned int vertex : accessor.vertex_indices())
- for (unsigned int dof = 0; dof < fe.dofs_per_vertex; ++dof)
+ for (unsigned int dof = 0; dof < fe.n_dofs_per_vertex(); ++dof)
*next++ = accessor.mg_vertex_dof_index(level, vertex, dof);
for (unsigned int dof = 0; dof < fe.dofs_per_line; ++dof)
std::vector<types::global_dof_index>::iterator next = dof_indices.begin();
for (const unsigned int vertex : accessor.vertex_indices())
- for (unsigned int dof = 0; dof < fe.dofs_per_vertex; ++dof)
+ for (unsigned int dof = 0; dof < fe.n_dofs_per_vertex(); ++dof)
*next++ = accessor.mg_vertex_dof_index(level, vertex, dof);
for (unsigned int line = 0; line < accessor.n_lines(); ++line)
std::vector<types::global_dof_index>::iterator next = dof_indices.begin();
for (const unsigned int vertex : accessor.vertex_indices())
- for (unsigned int dof = 0; dof < fe.dofs_per_vertex; ++dof)
+ for (unsigned int dof = 0; dof < fe.n_dofs_per_vertex(); ++dof)
*next++ = accessor.mg_vertex_dof_index(level, vertex, dof);
for (unsigned int line = 0; line < accessor.n_lines(); ++line)
case 1:
Assert(dof_indices.size() ==
(this->n_vertices() *
- this->dof_handler->get_fe(fe_index).dofs_per_vertex +
+ this->dof_handler->get_fe(fe_index).n_dofs_per_vertex() +
this->dof_handler->get_fe(fe_index).dofs_per_line),
ExcVectorDoesNotMatch());
break;
case 2:
Assert(dof_indices.size() ==
(this->n_vertices() *
- this->dof_handler->get_fe(fe_index).dofs_per_vertex +
+ this->dof_handler->get_fe(fe_index).n_dofs_per_vertex() +
this->n_lines() *
this->dof_handler->get_fe(fe_index).dofs_per_line +
this->dof_handler->get_fe(fe_index).dofs_per_quad),
case 3:
Assert(dof_indices.size() ==
(this->n_vertices() *
- this->dof_handler->get_fe(fe_index).dofs_per_vertex +
+ this->dof_handler->get_fe(fe_index).n_dofs_per_vertex() +
this->n_lines() *
this->dof_handler->get_fe(fe_index).dofs_per_line +
this->n_faces() *
// not allocated for this
// non-active thing
Assert(this->fe_index_is_active(fe_index) ||
- (this->dof_handler->get_fe(fe_index).dofs_per_cell ==
+ (this->dof_handler->get_fe(fe_index).n_dofs_per_cell() ==
this->n_vertices() *
- this->dof_handler->get_fe(fe_index).dofs_per_vertex),
+ this->dof_handler->get_fe(fe_index).n_dofs_per_vertex()),
ExcInternalError());
// now do the actual work
case 1:
Assert(dof_indices.size() ==
(this->n_vertices() *
- this->dof_handler->get_fe(fe_index).dofs_per_vertex +
+ this->dof_handler->get_fe(fe_index).n_dofs_per_vertex() +
this->dof_handler->get_fe(fe_index).dofs_per_line),
ExcVectorDoesNotMatch());
break;
case 2:
Assert(dof_indices.size() ==
(this->n_vertices() *
- this->dof_handler->get_fe(fe_index).dofs_per_vertex +
+ this->dof_handler->get_fe(fe_index).n_dofs_per_vertex() +
this->n_lines() *
this->dof_handler->get_fe(fe_index).dofs_per_line +
this->dof_handler->get_fe(fe_index).dofs_per_quad),
case 3:
Assert(dof_indices.size() ==
(this->n_vertices() *
- this->dof_handler->get_fe(fe_index).dofs_per_vertex +
+ this->dof_handler->get_fe(fe_index).n_dofs_per_vertex() +
this->n_lines() *
this->dof_handler->get_fe(fe_index).dofs_per_line +
this->n_faces() *
{
Assert(dof_indices.size() ==
this->n_vertices() *
- this->dof_handler->get_fe(fe_index).dofs_per_vertex +
+ this->dof_handler->get_fe(fe_index).n_dofs_per_vertex() +
this->dof_handler->get_fe(fe_index).dofs_per_line,
ExcVectorDoesNotMatch());
break;
{
Assert(dof_indices.size() ==
this->n_vertices() *
- this->dof_handler->get_fe(fe_index).dofs_per_vertex +
+ this->dof_handler->get_fe(fe_index).n_dofs_per_vertex() +
this->n_lines() *
this->dof_handler->get_fe(fe_index).dofs_per_line +
this->dof_handler->get_fe(fe_index).dofs_per_quad,
{
Assert(dof_indices.size() ==
this->n_vertices() *
- this->dof_handler->get_fe(fe_index).dofs_per_vertex +
+ this->dof_handler->get_fe(fe_index).n_dofs_per_vertex() +
this->n_lines() *
this->dof_handler->get_fe(fe_index).dofs_per_line +
this->n_faces() *
// FE_Nothing
if (accessor.has_children())
return;
- const unsigned int dofs_per_cell = accessor.get_fe().dofs_per_cell;
+ const unsigned int dofs_per_cell = accessor.get_fe().n_dofs_per_cell();
if (dofs_per_cell == 0)
return;
ExcMessage("get_dof_indices() only works on active cells."));
Assert(this->is_artificial() == false,
ExcMessage("Can't ask for DoF indices on artificial cells."));
- AssertDimension(dof_indices.size(), this->get_fe().dofs_per_cell);
+ AssertDimension(dof_indices.size(), this->get_fe().n_dofs_per_cell());
- const auto dofs_per_cell = this->get_fe().dofs_per_cell;
+ const auto dofs_per_cell = this->get_fe().n_dofs_per_cell();
if (dofs_per_cell > 0)
{
const types::global_dof_index *cache =
Assert(this->dof_handler != nullptr, typename BaseClass::ExcInvalidObject());
Assert(static_cast<unsigned int>(local_values_end - local_values_begin) ==
- this->get_fe().dofs_per_cell,
+ this->get_fe().n_dofs_per_cell(),
typename DoFCellAccessor::ExcVectorDoesNotMatch());
Assert(values.size() == this->get_dof_handler().n_dofs(),
typename DoFCellAccessor::ExcVectorDoesNotMatch());
this->dof_handler,
this->present_level,
this->present_index,
- this->get_fe().dofs_per_cell);
+ this->get_fe().n_dofs_per_cell());
dealii::internal::DoFAccessorImplementation::Implementation::
extract_subvector_to(values,
cache,
- cache + this->get_fe().dofs_per_cell,
+ cache + this->get_fe().n_dofs_per_cell(),
local_values_begin);
}
Assert(this->is_active(), ExcMessage("Cell must be active."));
Assert(static_cast<unsigned int>(local_values_end - local_values_begin) ==
- this->get_fe().dofs_per_cell,
+ this->get_fe().n_dofs_per_cell(),
typename DoFCellAccessor::ExcVectorDoesNotMatch());
Assert(values.size() == this->get_dof_handler().n_dofs(),
typename DoFCellAccessor::ExcVectorDoesNotMatch());
this->dof_handler,
this->present_level,
this->present_index,
- this->get_fe().dofs_per_cell);
+ this->get_fe().n_dofs_per_cell());
constraints.get_dof_values(values,
*cache,
Assert(this->is_active(), ExcMessage("Cell must be active."));
Assert(static_cast<unsigned int>(local_values.size()) ==
- this->get_fe().dofs_per_cell,
+ this->get_fe().n_dofs_per_cell(),
typename DoFCellAccessor::ExcVectorDoesNotMatch());
Assert(values.size() == this->get_dof_handler().n_dofs(),
typename DoFCellAccessor::ExcVectorDoesNotMatch());
this->dof_handler,
this->present_level,
this->present_index,
- this->get_fe().dofs_per_cell);
+ this->get_fe().n_dofs_per_cell());
- for (unsigned int i = 0; i < this->get_fe().dofs_per_cell; ++i, ++cache)
+ for (unsigned int i = 0; i < this->get_fe().n_dofs_per_cell(); ++i, ++cache)
internal::ElementAccess<OutputVector>::set(local_values(i), *cache, values);
}
Assert(this->dof_handler != nullptr,
(typename std::decay<decltype(*this)>::type::ExcInvalidObject()));
Assert(static_cast<unsigned int>(local_source_end - local_source_begin) ==
- this->get_fe().dofs_per_cell,
+ this->get_fe().n_dofs_per_cell(),
(typename std::decay<decltype(*this)>::type::ExcVectorDoesNotMatch()));
Assert(this->dof_handler->n_dofs() == global_destination.size(),
(typename std::decay<decltype(*this)>::type::ExcVectorDoesNotMatch()));
{
Assert(this->dof_handler != nullptr,
(typename std::decay<decltype(*this)>::type::ExcInvalidObject()));
- Assert(local_source_end - local_source_begin == this->get_fe().dofs_per_cell,
+ Assert(local_source_end - local_source_begin ==
+ this->get_fe().n_dofs_per_cell(),
(typename std::decay<decltype(*this)>::type::ExcVectorDoesNotMatch()));
Assert(this->dof_handler->n_dofs() == global_destination.size(),
(typename std::decay<decltype(*this)>::type::ExcVectorDoesNotMatch()));
{
Assert(this->dof_handler != nullptr,
(typename std::decay<decltype(*this)>::type::ExcInvalidObject()));
- Assert(local_source.m() == this->get_fe().dofs_per_cell,
+ Assert(local_source.m() == this->get_fe().n_dofs_per_cell(),
(typename std::decay<decltype(*this)>::type::ExcMatrixDoesNotMatch()));
- Assert(local_source.n() == this->get_fe().dofs_per_cell,
+ Assert(local_source.n() == this->get_fe().n_dofs_per_cell(),
(typename std::decay<decltype(*this)>::type::ExcMatrixDoesNotMatch()));
Assert(this->dof_handler->n_dofs() == global_destination.m(),
(typename std::decay<decltype(*this)>::type::ExcMatrixDoesNotMatch()));
{
Assert(this->dof_handler != nullptr,
(typename std::decay<decltype(*this)>::type::ExcInvalidObject()));
- Assert(local_matrix.m() == this->get_fe().dofs_per_cell,
+ Assert(local_matrix.m() == this->get_fe().n_dofs_per_cell(),
(typename std::decay<decltype(*this)>::type::ExcMatrixDoesNotMatch()));
- Assert(local_matrix.n() == this->get_fe().dofs_per_cell,
+ Assert(local_matrix.n() == this->get_fe().n_dofs_per_cell(),
(typename std::decay<decltype(*this)>::type::ExcVectorDoesNotMatch()));
Assert(this->dof_handler->n_dofs() == global_matrix.m(),
(typename std::decay<decltype(*this)>::type::ExcMatrixDoesNotMatch()));
Assert(this->dof_handler->n_dofs() == global_matrix.n(),
(typename std::decay<decltype(*this)>::type::ExcMatrixDoesNotMatch()));
- Assert(local_vector.size() == this->get_fe().dofs_per_cell,
+ Assert(local_vector.size() == this->get_fe().n_dofs_per_cell(),
(typename std::decay<decltype(*this)>::type::ExcVectorDoesNotMatch()));
Assert(this->dof_handler->n_dofs() == global_vector.size(),
(typename std::decay<decltype(*this)>::type::ExcVectorDoesNotMatch()));
Assert(!this->has_children(), ExcMessage("Cell must be active."));
- const unsigned int n_dofs = this->get_fe().dofs_per_cell;
+ const unsigned int n_dofs = this->get_fe().n_dofs_per_cell();
const types::global_dof_index *dofs =
dealii::internal::DoFAccessorImplementation::Implementation::get_cache_ptr(
this->dof_handler, this->level(), this->present_index, n_dofs);
* on the various levels this vertex exists on.
*
* The starting offset of the DoFs that belong to a @p level are given by
- * <code>dofs_per_vertex * (level-coarsest_level)</code>. @p dofs_per_vertex
+ * <code>n_dofs_per_vertex() * (level-coarsest_level)</code>. @p n_dofs_per_vertex()
* must therefore be passed as an argument to the functions that set or
* read an index.
*/
public:
/**
* Cache for the DoF indices on cells. The size of this array equals the
- * number of cells on a given level times selected_fe.dofs_per_cell.
+ * number of cells on a given level times selected_fe.n_dofs_per_cell().
*/
std::vector<types::global_dof_index> cell_dof_indices_cache;
* following piece of code in the constructor of a class derived from
* FiniteElement to compute the $M$ matrix:
* @code
- * FullMatrix<double> M(this->dofs_per_cell, this->dofs_per_cell);
+ * FullMatrix<double> M(this->n_dofs_per_cell(), this->n_dofs_per_cell());
* FETools::compute_node_matrix(M, *this);
- * this->inverse_node_matrix.reinit(this->dofs_per_cell, this->dofs_per_cell);
- * this->inverse_node_matrix.invert(M);
+ * this->inverse_node_matrix.reinit(this->n_dofs_per_cell(),
+ * this->n_dofs_per_cell()); this->inverse_node_matrix.invert(M);
* @endcode
* Don't forget to make sure
* that #unit_support_points or #generalized_support_points are initialized
* In the latter case, all that is required is the following piece of code:
* @code
* for (unsigned int c=0; c<GeometryInfo<dim>::max_children_per_cell; ++c)
- * this->prolongation[c].reinit (this->dofs_per_cell,
- * this->dofs_per_cell);
+ * this->prolongation[c].reinit (this->n_dofs_per_cell(),
+ * this->n_dofs_per_cell());
* FETools::compute_embedding_matrices (*this, this->prolongation);
* @endcode
* As in this example, prolongation is almost always implemented via
* version hp::DoFHandler, since one can then write code like this:
* @code
* dofs_per_cell =
- * dof_handler->get_fe()[cell->active_fe_index()].dofs_per_cell;
+ * dof_handler->get_fe()[cell->active_fe_index()].n_dofs_per_cell();
* @endcode
*
* This code doesn't work in both situations without the present operator
* reference to a finite element object representing one of the other finite
* elements active on this particular vertex. The function computes which of
* the degrees of freedom of the two finite element objects are equivalent,
- * both numbered between zero and the corresponding value of dofs_per_vertex
- * of the two finite elements. The first index of each pair denotes one of
- * the vertex dofs of the present element, whereas the second is the
- * corresponding index of the other finite element.
+ * both numbered between zero and the corresponding value of
+ * n_dofs_per_vertex() of the two finite elements. The first index of each
+ * pair denotes one of the vertex dofs of the present element, whereas the
+ * second is the corresponding index of the other finite element.
*/
virtual std::vector<std::pair<unsigned int, unsigned int>>
hp_vertex_dof_identities(const FiniteElement<dim, spacedim> &fe_other) const;
FiniteElement<dim, spacedim>::system_to_block_index(
const unsigned int index) const
{
- AssertIndexRange(index, this->dofs_per_cell);
+ AssertIndexRange(index, this->n_dofs_per_cell());
// The block is computed simply as
// first block of this base plus
// the index within the base blocks
FiniteElement<dim, spacedim>::restriction_is_additive(
const unsigned int index) const
{
- AssertIndexRange(index, this->dofs_per_cell);
+ AssertIndexRange(index, this->n_dofs_per_cell());
return restriction_is_additive_flags[index];
}
inline const ComponentMask &
FiniteElement<dim, spacedim>::get_nonzero_components(const unsigned int i) const
{
- AssertIndexRange(i, this->dofs_per_cell);
+ AssertIndexRange(i, this->n_dofs_per_cell());
return nonzero_components[i];
}
inline unsigned int
FiniteElement<dim, spacedim>::n_nonzero_components(const unsigned int i) const
{
- AssertIndexRange(i, this->dofs_per_cell);
+ AssertIndexRange(i, this->n_dofs_per_cell());
return n_nonzero_components_table[i];
}
inline bool
FiniteElement<dim, spacedim>::is_primitive(const unsigned int i) const
{
- AssertIndexRange(i, this->dofs_per_cell);
+ AssertIndexRange(i, this->n_dofs_per_cell());
// return primitivity of a shape
// function by checking whether it
FiniteElement<dim, spacedim>::get_associated_geometry_primitive(
const unsigned int cell_dof_index) const
{
- AssertIndexRange(cell_dof_index, this->dofs_per_cell);
+ AssertIndexRange(cell_dof_index, this->n_dofs_per_cell());
// just go through the usual cases, taking into account how DoFs
// are enumerated on the reference cell
* reference to a finite element object representing one of the other finite
* elements active on this particular vertex. The function computes which of
* the degrees of freedom of the two finite element objects are equivalent,
- * both numbered between zero and the corresponding value of dofs_per_vertex
- * of the two finite elements. The first index of each pair denotes one of
- * the vertex dofs of the present element, whereas the second is the
- * corresponding index of the other finite element.
+ * both numbered between zero and the corresponding value of
+ * n_dofs_per_vertex() of the two finite elements. The first index of each
+ * pair denotes one of the vertex dofs of the present element, whereas the
+ * second is the corresponding index of the other finite element.
*/
virtual std::vector<std::pair<unsigned int, unsigned int>>
hp_vertex_dof_identities(
* reference to a finite element object representing one of the other finite
* elements active on this particular vertex. The function computes which of
* the degrees of freedom of the two finite element objects are equivalent,
- * both numbered between zero and the corresponding value of dofs_per_vertex
- * of the two finite elements. The first index of each pair denotes one of
- * the vertex dofs of the present element, whereas the second is the
- * corresponding index of the other finite element.
+ * both numbered between zero and the corresponding value of
+ * n_dofs_per_vertex() of the two finite elements. The first index of each
+ * pair denotes one of the vertex dofs of the present element, whereas the
+ * second is the corresponding index of the other finite element.
*
* This being a discontinuous element, the set of such constraints is of
* course empty.
* reference to a finite element object representing one of the other finite
* elements active on this particular vertex. The function computes which of
* the degrees of freedom of the two finite element objects are equivalent,
- * both numbered between zero and the corresponding value of dofs_per_vertex
- * of the two finite elements. The first index of each pair denotes one of
- * the vertex dofs of the present element, whereas the second is the
- * corresponding index of the other finite element.
+ * both numbered between zero and the corresponding value of
+ * n_dofs_per_vertex() of the two finite elements. The first index of each
+ * pair denotes one of the vertex dofs of the present element, whereas the
+ * second is the corresponding index of the other finite element.
*
* This being a discontinuous element, the set of such constraints is of
* course empty.
/**
* Return the matrix interpolating from the given finite element to the
* present one. The size of the matrix is then @p dofs_per_cell times
- * <tt>source.dofs_per_cell</tt>.
+ * <tt>source.n_dofs_per_cell()</tt>.
*
* These matrices are only available if the source element is also a @p FE_Q
* element. Otherwise, an exception of type
* reference to a finite element object representing one of the other finite
* elements active on this particular vertex. The function computes which of
* the degrees of freedom of the two finite element objects are equivalent,
- * both numbered between zero and the corresponding value of dofs_per_vertex
- * of the two finite elements. The first index of each pair denotes one of
- * the vertex dofs of the present element, whereas the second is the
- * corresponding index of the other finite element.
+ * both numbered between zero and the corresponding value of
+ * n_dofs_per_vertex() of the two finite elements. The first index of each
+ * pair denotes one of the vertex dofs of the present element, whereas the
+ * second is the corresponding index of the other finite element.
*
* This being a discontinuous element, the set of such constraints is of
* course empty.
/**
* Return the matrix interpolating from the given finite element to the
* present one. The size of the matrix is then @p dofs_per_cell times
- * <tt>source.dofs_per_cell</tt>.
+ * <tt>source.n_dofs_per_cell()</tt>.
*
* These matrices are only available if the source element is also a @p
* FE_DGQ element. Otherwise, an exception of type
* reference to a finite element object representing one of the other finite
* elements active on this particular vertex. The function computes which of
* the degrees of freedom of the two finite element objects are equivalent,
- * both numbered between zero and the corresponding value of dofs_per_vertex
- * of the two finite elements. The first index of each pair denotes one of
- * the vertex dofs of the present element, whereas the second is the
- * corresponding index of the other finite element.
+ * both numbered between zero and the corresponding value of
+ * n_dofs_per_vertex() of the two finite elements. The first index of each
+ * pair denotes one of the vertex dofs of the present element, whereas the
+ * second is the corresponding index of the other finite element.
*
* This being a discontinuous element, the set of such constraints is of
* course empty.
* reference to a finite element object representing one of the other finite
* elements active on this particular vertex. The function computes which of
* the degrees of freedom of the two finite element objects are equivalent,
- * both numbered between zero and the corresponding value of dofs_per_vertex
- * of the two finite elements. The first index of each pair denotes one of
- * the vertex dofs of the present element, whereas the second is the
- * corresponding index of the other finite element.
+ * both numbered between zero and the corresponding value of
+ * n_dofs_per_vertex() of the two finite elements. The first index of each
+ * pair denotes one of the vertex dofs of the present element, whereas the
+ * second is the corresponding index of the other finite element.
*/
virtual std::vector<std::pair<unsigned int, unsigned int>>
hp_vertex_dof_identities(
* reference to a finite element object representing one of the other finite
* elements active on this particular vertex. The function computes which of
* the degrees of freedom of the two finite element objects are equivalent,
- * both numbered between zero and the corresponding value of dofs_per_vertex
- * of the two finite elements. The first index of each pair denotes one of
- * the vertex dofs of the present element, whereas the second is the
- * corresponding index of the other finite element.
+ * both numbered between zero and the corresponding value of
+ * n_dofs_per_vertex() of the two finite elements. The first index of each
+ * pair denotes one of the vertex dofs of the present element, whereas the
+ * second is the corresponding index of the other finite element.
*
* The set of such constraints is non-empty only for dim==1.
*/
* reference to a finite element object representing one of the other finite
* elements active on this particular vertex. The function computes which of
* the degrees of freedom of the two finite element objects are equivalent,
- * both numbered between zero and the corresponding value of dofs_per_vertex
- * of the two finite elements. The first index of each pair denotes one of
- * the vertex dofs of the present element, whereas the second is the
- * corresponding index of the other finite element.
+ * both numbered between zero and the corresponding value of
+ * n_dofs_per_vertex() of the two finite elements. The first index of each
+ * pair denotes one of the vertex dofs of the present element, whereas the
+ * second is the corresponding index of the other finite element.
*
* The set of such constraints is non-empty only for dim==1.
*/
* reference to a finite element object representing one of the other finite
* elements active on this particular vertex. The function computes which of
* the degrees of freedom of the two finite element objects are equivalent,
- * both numbered between zero and the corresponding value of dofs_per_vertex
- * of the two finite elements. The first index of each pair denotes one of
- * the vertex dofs of the present element, whereas the second is the
- * corresponding index of the other finite element.
+ * both numbered between zero and the corresponding value of
+ * n_dofs_per_vertex() of the two finite elements. The first index of each
+ * pair denotes one of the vertex dofs of the present element, whereas the
+ * second is the corresponding index of the other finite element.
*/
virtual std::vector<std::pair<unsigned int, unsigned int>>
hp_vertex_dof_identities(const FiniteElement<dim> &fe_other) const override;
// polynomial to put the values and derivatives of shape functions
// to put there, depending on what the user requested
std::vector<double> values(
- update_flags & update_values ? this->dofs_per_cell : 0);
+ update_flags & update_values ? this->n_dofs_per_cell() : 0);
std::vector<Tensor<1, dim>> grads(
- update_flags & update_gradients ? this->dofs_per_cell : 0);
+ update_flags & update_gradients ? this->n_dofs_per_cell() : 0);
std::vector<Tensor<2, dim>> grad_grads(
- update_flags & update_hessians ? this->dofs_per_cell : 0);
+ update_flags & update_hessians ? this->n_dofs_per_cell() : 0);
std::vector<Tensor<3, dim>> third_derivatives(
- update_flags & update_3rd_derivatives ? this->dofs_per_cell : 0);
+ update_flags & update_3rd_derivatives ? this->n_dofs_per_cell() : 0);
std::vector<Tensor<4, dim>>
fourth_derivatives; // won't be needed, so leave empty
if ((update_flags & update_values) &&
!((output_data.shape_values.n_rows() > 0) &&
(output_data.shape_values.n_cols() == n_q_points)))
- data.shape_values.reinit(this->dofs_per_cell, n_q_points);
+ data.shape_values.reinit(this->n_dofs_per_cell(), n_q_points);
if (update_flags & update_gradients)
- data.shape_gradients.reinit(this->dofs_per_cell, n_q_points);
+ data.shape_gradients.reinit(this->n_dofs_per_cell(), n_q_points);
if (update_flags & update_hessians)
- data.shape_hessians.reinit(this->dofs_per_cell, n_q_points);
+ data.shape_hessians.reinit(this->n_dofs_per_cell(), n_q_points);
if (update_flags & update_3rd_derivatives)
- data.shape_3rd_derivatives.reinit(this->dofs_per_cell, n_q_points);
+ data.shape_3rd_derivatives.reinit(this->n_dofs_per_cell(), n_q_points);
// next already fill those fields of which we have information by
// now. note that the shape gradients are only those on the unit
if (output_data.shape_values.n_rows() > 0)
{
if (output_data.shape_values.n_cols() == n_q_points)
- for (unsigned int k = 0; k < this->dofs_per_cell; ++k)
+ for (unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
output_data.shape_values[k][i] = values[k];
else
- for (unsigned int k = 0; k < this->dofs_per_cell; ++k)
+ for (unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
data.shape_values[k][i] = values[k];
}
// so we write them into our scratch space and only later
// copy stuff into where FEValues wants it
if (update_flags & update_gradients)
- for (unsigned int k = 0; k < this->dofs_per_cell; ++k)
+ for (unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
data.shape_gradients[k][i] = grads[k];
if (update_flags & update_hessians)
- for (unsigned int k = 0; k < this->dofs_per_cell; ++k)
+ for (unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
data.shape_hessians[k][i] = grad_grads[k];
if (update_flags & update_3rd_derivatives)
- for (unsigned int k = 0; k < this->dofs_per_cell; ++k)
+ for (unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
data.shape_3rd_derivatives[k][i] = third_derivatives[k];
}
return data_ptr;
FE_Poly<dim, spacedim>::shape_value(const unsigned int i,
const Point<dim> & p) const
{
- AssertIndexRange(i, this->dofs_per_cell);
+ AssertIndexRange(i, this->n_dofs_per_cell());
return poly_space->compute_value(i, p);
}
const unsigned int component) const
{
(void)component;
- AssertIndexRange(i, this->dofs_per_cell);
+ AssertIndexRange(i, this->n_dofs_per_cell());
AssertIndexRange(component, 1);
return poly_space->compute_value(i, p);
}
FE_Poly<dim, spacedim>::shape_grad(const unsigned int i,
const Point<dim> & p) const
{
- AssertIndexRange(i, this->dofs_per_cell);
+ AssertIndexRange(i, this->n_dofs_per_cell());
return poly_space->template compute_derivative<1>(i, p);
}
const unsigned int component) const
{
(void)component;
- AssertIndexRange(i, this->dofs_per_cell);
+ AssertIndexRange(i, this->n_dofs_per_cell());
AssertIndexRange(component, 1);
return poly_space->template compute_derivative<1>(i, p);
}
FE_Poly<dim, spacedim>::shape_grad_grad(const unsigned int i,
const Point<dim> & p) const
{
- AssertIndexRange(i, this->dofs_per_cell);
+ AssertIndexRange(i, this->n_dofs_per_cell());
return poly_space->template compute_derivative<2>(i, p);
}
const unsigned int component) const
{
(void)component;
- AssertIndexRange(i, this->dofs_per_cell);
+ AssertIndexRange(i, this->n_dofs_per_cell());
AssertIndexRange(component, 1);
return poly_space->template compute_derivative<2>(i, p);
}
FE_Poly<dim, spacedim>::shape_3rd_derivative(const unsigned int i,
const Point<dim> & p) const
{
- AssertIndexRange(i, this->dofs_per_cell);
+ AssertIndexRange(i, this->n_dofs_per_cell());
return poly_space->template compute_derivative<3>(i, p);
}
const unsigned int component) const
{
(void)component;
- AssertIndexRange(i, this->dofs_per_cell);
+ AssertIndexRange(i, this->n_dofs_per_cell());
AssertIndexRange(component, 1);
return poly_space->template compute_derivative<3>(i, p);
}
FE_Poly<dim, spacedim>::shape_4th_derivative(const unsigned int i,
const Point<dim> & p) const
{
- AssertIndexRange(i, this->dofs_per_cell);
+ AssertIndexRange(i, this->n_dofs_per_cell());
return poly_space->template compute_derivative<4>(i, p);
}
const unsigned int component) const
{
(void)component;
- AssertIndexRange(i, this->dofs_per_cell);
+ AssertIndexRange(i, this->n_dofs_per_cell());
AssertIndexRange(component, 1);
return poly_space->template compute_derivative<4>(i, p);
}
// we were in get_data()
if (flags & update_gradients &&
cell_similarity != CellSimilarity::translation)
- for (unsigned int k = 0; k < this->dofs_per_cell; ++k)
+ for (unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
mapping.transform(make_array_view(fe_data.shape_gradients, k),
mapping_covariant,
mapping_internal,
if (flags & update_hessians && cell_similarity != CellSimilarity::translation)
{
- for (unsigned int k = 0; k < this->dofs_per_cell; ++k)
+ for (unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
mapping.transform(make_array_view(fe_data.shape_hessians, k),
mapping_covariant_gradient,
mapping_internal,
if (flags & update_3rd_derivatives &&
cell_similarity != CellSimilarity::translation)
{
- for (unsigned int k = 0; k < this->dofs_per_cell; ++k)
+ for (unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
mapping.transform(make_array_view(fe_data.shape_3rd_derivatives, k),
mapping_covariant_hessian,
mapping_internal,
// the values (unlike in the case of fill_fe_values()) since
// we need to take into account the offsets
if (flags & update_values)
- for (unsigned int k = 0; k < this->dofs_per_cell; ++k)
+ for (unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
for (unsigned int i = 0; i < quadrature.size(); ++i)
output_data.shape_values(k, i) = fe_data.shape_values[k][i + offset];
if (flags & update_gradients)
- for (unsigned int k = 0; k < this->dofs_per_cell; ++k)
+ for (unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
mapping.transform(
make_array_view(fe_data.shape_gradients, k, offset, quadrature.size()),
mapping_covariant,
if (flags & update_hessians)
{
- for (unsigned int k = 0; k < this->dofs_per_cell; ++k)
+ for (unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
mapping.transform(
make_array_view(fe_data.shape_hessians, k, offset, quadrature.size()),
mapping_covariant_gradient,
if (flags & update_3rd_derivatives)
{
- for (unsigned int k = 0; k < this->dofs_per_cell; ++k)
+ for (unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
mapping.transform(make_array_view(fe_data.shape_3rd_derivatives,
k,
offset,
// the values (unlike in the case of fill_fe_values()) since
// we need to take into account the offsets
if (flags & update_values)
- for (unsigned int k = 0; k < this->dofs_per_cell; ++k)
+ for (unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
for (unsigned int i = 0; i < quadrature.size(); ++i)
output_data.shape_values(k, i) = fe_data.shape_values[k][i + offset];
if (flags & update_gradients)
- for (unsigned int k = 0; k < this->dofs_per_cell; ++k)
+ for (unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
mapping.transform(
make_array_view(fe_data.shape_gradients, k, offset, quadrature.size()),
mapping_covariant,
if (flags & update_hessians)
{
- for (unsigned int k = 0; k < this->dofs_per_cell; ++k)
+ for (unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
mapping.transform(
make_array_view(fe_data.shape_hessians, k, offset, quadrature.size()),
mapping_covariant_gradient,
if (flags & update_3rd_derivatives)
{
- for (unsigned int k = 0; k < this->dofs_per_cell; ++k)
+ for (unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
mapping.transform(make_array_view(fe_data.shape_3rd_derivatives,
k,
offset,
& mapping_data,
const unsigned int n_q_points) const
{
- for (unsigned int dof = 0; dof < this->dofs_per_cell; ++dof)
+ for (unsigned int dof = 0; dof < this->n_dofs_per_cell(); ++dof)
for (unsigned int i = 0; i < n_q_points; ++i)
for (unsigned int j = 0; j < spacedim; ++j)
output_data.shape_hessians[dof][i] -=
& mapping_data,
const unsigned int n_q_points) const
{
- for (unsigned int dof = 0; dof < this->dofs_per_cell; ++dof)
+ for (unsigned int dof = 0; dof < this->n_dofs_per_cell(); ++dof)
for (unsigned int i = 0; i < n_q_points; ++i)
for (unsigned int j = 0; j < spacedim; ++j)
for (unsigned int k = 0; k < spacedim; ++k)
if (fe_data.update_each & update_values)
for (unsigned int i = 0; i < quadrature.size(); ++i)
{
- for (unsigned int k = 0; k < this->dofs_per_cell; ++k)
+ for (unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
output_data.shape_values(k, i) = 0.;
switch (dim)
{
case 1:
{
// Fill data for vertex shape functions
- if (this->dofs_per_vertex != 0)
+ if (this->n_dofs_per_vertex() != 0)
for (unsigned int lvertex = 0;
lvertex < GeometryInfo<dim>::vertices_per_face;
++lvertex)
if (fe_data.update_each & update_values)
{
- for (unsigned int k = 0; k < this->dofs_per_cell; ++k)
+ for (unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
for (unsigned int i = 0; i < quadrature.size(); ++i)
output_data.shape_values(k, i) = 0.;
for (unsigned int k = 0; k < fe_data.shape_values.size(); ++k)
std::vector<Tensor<5, dim>> fourth_derivatives(0);
if (update_flags & (update_values | update_gradients | update_hessians))
- data.sign_change.resize(this->dofs_per_cell);
+ data.sign_change.resize(this->n_dofs_per_cell());
// initialize fields only if really
// necessary. otherwise, don't
if (update_flags & update_values)
{
- values.resize(this->dofs_per_cell);
- data.shape_values.reinit(this->dofs_per_cell, n_q_points);
+ values.resize(this->n_dofs_per_cell());
+ data.shape_values.reinit(this->n_dofs_per_cell(), n_q_points);
if (update_transformed_shape_values)
data.transformed_shape_values.resize(n_q_points);
}
if (update_flags & update_gradients)
{
- grads.resize(this->dofs_per_cell);
- data.shape_grads.reinit(this->dofs_per_cell, n_q_points);
+ grads.resize(this->n_dofs_per_cell());
+ data.shape_grads.reinit(this->n_dofs_per_cell(), n_q_points);
data.transformed_shape_grads.resize(n_q_points);
if (update_transformed_shape_grads)
if (update_flags & update_hessians)
{
- grad_grads.resize(this->dofs_per_cell);
- data.shape_grad_grads.reinit(this->dofs_per_cell, n_q_points);
+ grad_grads.resize(this->n_dofs_per_cell());
+ data.shape_grad_grads.reinit(this->n_dofs_per_cell(), n_q_points);
data.transformed_shape_hessians.resize(n_q_points);
if (update_transformed_shape_hessian_tensors)
data.untransformed_shape_hessian_tensors.resize(n_q_points);
if (update_flags & update_values)
{
if (inverse_node_matrix.n_cols() == 0)
- for (unsigned int i = 0; i < this->dofs_per_cell; ++i)
+ for (unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
data.shape_values[i][k] = values[i];
else
- for (unsigned int i = 0; i < this->dofs_per_cell; ++i)
+ for (unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
{
Tensor<1, dim> add_values;
- for (unsigned int j = 0; j < this->dofs_per_cell; ++j)
+ for (unsigned int j = 0; j < this->n_dofs_per_cell(); ++j)
add_values += inverse_node_matrix(j, i) * values[j];
data.shape_values[i][k] = add_values;
}
if (update_flags & update_gradients)
{
if (inverse_node_matrix.n_cols() == 0)
- for (unsigned int i = 0; i < this->dofs_per_cell; ++i)
+ for (unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
data.shape_grads[i][k] = grads[i];
else
- for (unsigned int i = 0; i < this->dofs_per_cell; ++i)
+ for (unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
{
Tensor<2, dim> add_grads;
- for (unsigned int j = 0; j < this->dofs_per_cell; ++j)
+ for (unsigned int j = 0; j < this->n_dofs_per_cell(); ++j)
add_grads += inverse_node_matrix(j, i) * grads[j];
data.shape_grads[i][k] = add_grads;
}
if (update_flags & update_hessians)
{
if (inverse_node_matrix.n_cols() == 0)
- for (unsigned int i = 0; i < this->dofs_per_cell; ++i)
+ for (unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
data.shape_grad_grads[i][k] = grad_grads[i];
else
- for (unsigned int i = 0; i < this->dofs_per_cell; ++i)
+ for (unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
{
Tensor<3, dim> add_grad_grads;
- for (unsigned int j = 0; j < this->dofs_per_cell; ++j)
+ for (unsigned int j = 0; j < this->n_dofs_per_cell(); ++j)
add_grad_grads +=
inverse_node_matrix(j, i) * grad_grads[j];
data.shape_grad_grads[i][k] = add_grad_grads;
/**
* Return the matrix interpolating from the given finite element to the
* present one. The size of the matrix is then @p dofs_per_cell times
- * <tt>source.dofs_per_cell</tt>.
+ * <tt>source.n_dofs_per_cell()</tt>.
*
* These matrices are only available if the source element is also a @p FE_Q
* element. Otherwise, an exception of type
* reference to a finite element object representing one of the other finite
* elements active on this particular vertex. The function computes which of
* the degrees of freedom of the two finite element objects are equivalent,
- * both numbered between zero and the corresponding value of dofs_per_vertex
- * of the two finite elements. The first index of each pair denotes one of
- * the vertex dofs of the present element, whereas the second is the
- * corresponding index of the other finite element.
+ * both numbered between zero and the corresponding value of
+ * n_dofs_per_vertex() of the two finite elements. The first index of each
+ * pair denotes one of the vertex dofs of the present element, whereas the
+ * second is the corresponding index of the other finite element.
*/
virtual std::vector<std::pair<unsigned int, unsigned int>>
hp_vertex_dof_identities(
/**
* Return the matrix interpolating from the given finite element to the
* present one. The size of the matrix is then @p dofs_per_cell times
- * <tt>source.dofs_per_cell</tt>.
+ * <tt>source.n_dofs_per_cell()</tt>.
*
* These matrices are only available if the source element is also a @p
* FE_Q_Bubbles element. Otherwise, an exception of type
/**
* Return the matrix interpolating from the given finite element to the
* present one. The size of the matrix is then @p dofs_per_cell times
- * <tt>source.dofs_per_cell</tt>.
+ * <tt>source.n_dofs_per_cell()</tt>.
*
* These matrices are only available if the source element is also a @p
* FE_Q_DG0 element. Otherwise, an exception of type
* reference to a finite element object representing one of the other finite
* elements active on this particular vertex. The function computes which of
* the degrees of freedom of the two finite element objects are equivalent,
- * both numbered between zero and the corresponding value of dofs_per_vertex
- * of the two finite elements. The first index of each pair denotes one of
- * the vertex dofs of the present element, whereas the second is the
- * corresponding index of the other finite element.
+ * both numbered between zero and the corresponding value of
+ * n_dofs_per_vertex() of the two finite elements. The first index of each
+ * pair denotes one of the vertex dofs of the present element, whereas the
+ * second is the corresponding index of the other finite element.
*/
virtual std::vector<std::pair<unsigned int, unsigned int>>
hp_vertex_dof_identities(const FiniteElement<dim> &fe_other) const override;
/**
* Return the matrix interpolating from the given finite element to the
* present one. The size of the matrix is then @p dofs_per_cell times
- * <tt>source.dofs_per_cell</tt>.
+ * <tt>source.n_dofs_per_cell()</tt>.
*
* These matrices are available if source and destination element are both
* @p FESystem elements, have the same number of base elements with same
* reference to a finite element object representing one of the other finite
* elements active on this particular vertex. The function computes which of
* the degrees of freedom of the two finite element objects are equivalent,
- * both numbered between zero and the corresponding value of dofs_per_vertex
- * of the two finite elements. The first index of each pair denotes one of
- * the vertex dofs of the present element, whereas the second is the
- * corresponding index of the other finite element.
+ * both numbered between zero and the corresponding value of
+ * n_dofs_per_vertex() of the two finite elements. The first index of each
+ * pair denotes one of the vertex dofs of the present element, whereas the
+ * second is the corresponding index of the other finite element.
*/
virtual std::vector<std::pair<unsigned int, unsigned int>>
hp_vertex_dof_identities(
/**
* Compute the interpolation matrix that interpolates a @p fe1-function to a
* @p fe2-function on each cell. The interpolation_matrix needs to be of
- * size <tt>(fe2.dofs_per_cell, fe1.dofs_per_cell)</tt>.
+ * size <tt>(fe2.n_dofs_per_cell(), fe1.n_dofs_per_cell())</tt>.
*
* Note, that if the finite element space @p fe1 is a subset of the finite
* element space @p fe2 then the @p interpolation_matrix is an embedding
* Compute the interpolation matrix that interpolates a @p fe1-function to a
* @p fe2-function, and interpolates this to a second @p fe1-function on
* each cell. The interpolation_matrix needs to be of size
- * <tt>(fe1.dofs_per_cell, fe1.dofs_per_cell)</tt>.
+ * <tt>(fe1.n_dofs_per_cell(), fe1.n_dofs_per_cell())</tt>.
*
* Note, that this function only makes sense if the finite element space due
* to @p fe1 is not a subset of the finite element space due to @p fe2, as
/**
* Compute the identity matrix minus the back interpolation matrix.
- * The @p difference_matrix will be of size <tt>(fe1.dofs_per_cell,
- * fe1.dofs_per_cell)</tt> after this function. Previous content
+ * The @p difference_matrix will be of size <tt>(fe1.n_dofs_per_cell(),
+ * fe1.n_dofs_per_cell())</tt> after this function. Previous content
* of the argument will be overwritten.
*
* This function computes the matrix that transforms a @p fe1 function $z$ to
* This method implements the
* FETools::compute_projection_from_quadrature_points_matrix method for
* faces of a mesh. The matrix that it returns, X, is face specific and its
- * size is fe.dofs_per_cell by rhs_quadrature.size(). The dimension, dim
+ * size is fe.n_dofs_per_cell() by rhs_quadrature.size(). The dimension, dim
* must be larger than 1 for this class, since Quadrature<dim-1> objects are
* required. See the documentation on the Quadrature class for more
* information.
if (multiplicities[i] > 0)
{
multiplied_dofs_per_vertex +=
- fes[i]->dofs_per_vertex * multiplicities[i];
+ fes[i]->n_dofs_per_vertex() * multiplicities[i];
multiplied_dofs_per_line +=
fes[i]->dofs_per_line * multiplicities[i];
multiplied_dofs_per_quad +=
for (unsigned int base = 0; base < fes.size(); ++base)
for (unsigned int m = 0; m < multiplicities[base]; ++m)
- block_indices.push_back(fes[base]->dofs_per_cell);
+ block_indices.push_back(fes[base]->n_dofs_per_cell());
return FiniteElementData<dim>(dpo,
(do_tensor_product ?
unsigned int n_shape_functions = 0;
for (unsigned int i = 0; i < fes.size(); ++i)
if (multiplicities[i] > 0) // check needed as fe might be nullptr
- n_shape_functions += fes[i]->dofs_per_cell * multiplicities[i];
+ n_shape_functions += fes[i]->n_dofs_per_cell() * multiplicities[i];
// generate the array that will hold the output
std::vector<bool> retval(n_shape_functions, false);
for (unsigned int base = 0; base < fes.size(); ++base)
for (unsigned int m = 0; m < multiplicities[base]; ++m)
for (unsigned int local_index = 0;
- local_index < fes[base]->dofs_per_vertex;
+ local_index < fes[base]->n_dofs_per_vertex();
++local_index, ++total_index)
{
const unsigned int index_in_base =
- (fes[base]->dofs_per_vertex * vertex_number + local_index);
+ (fes[base]->n_dofs_per_vertex() * vertex_number +
+ local_index);
- Assert(index_in_base < fes[base]->dofs_per_cell,
+ Assert(index_in_base < fes[base]->n_dofs_per_cell(),
ExcInternalError());
retval[total_index] =
fes[base]->restriction_is_additive(index_in_base);
(fes[base]->dofs_per_line * line_number + local_index +
fes[base]->first_line_index);
- Assert(index_in_base < fes[base]->dofs_per_cell,
+ Assert(index_in_base < fes[base]->n_dofs_per_cell(),
ExcInternalError());
retval[total_index] =
fes[base]->restriction_is_additive(index_in_base);
(fes[base]->dofs_per_quad * quad_number + local_index +
fes[base]->first_quad_index);
- Assert(index_in_base < fes[base]->dofs_per_cell,
+ Assert(index_in_base < fes[base]->n_dofs_per_cell(),
ExcInternalError());
retval[total_index] =
fes[base]->restriction_is_additive(index_in_base);
(fes[base]->dofs_per_hex * hex_number + local_index +
fes[base]->first_hex_index);
- Assert(index_in_base < fes[base]->dofs_per_cell,
+ Assert(index_in_base < fes[base]->n_dofs_per_cell(),
ExcInternalError());
retval[total_index] =
fes[base]->restriction_is_additive(index_in_base);
unsigned int n_shape_functions = 0;
for (unsigned int i = 0; i < fes.size(); ++i)
if (multiplicities[i] > 0) // needed because fe might be nullptr
- n_shape_functions += fes[i]->dofs_per_cell * multiplicities[i];
+ n_shape_functions += fes[i]->n_dofs_per_cell() * multiplicities[i];
unsigned int n_components = 0;
if (do_tensor_product)
comp_start +=
fes[base]->n_components() * do_tensor_product)
for (unsigned int local_index = 0;
- local_index < fes[base]->dofs_per_vertex;
+ local_index < fes[base]->n_dofs_per_vertex();
++local_index, ++total_index)
{
const unsigned int index_in_base =
- (fes[base]->dofs_per_vertex * vertex_number + local_index);
+ (fes[base]->n_dofs_per_vertex() * vertex_number +
+ local_index);
Assert(comp_start + fes[base]->n_components() <=
retval[total_index].size(),
fe.base_element(base).n_components() *
do_tensor_product)
for (unsigned int local_index = 0;
- local_index < fe.base_element(base).dofs_per_vertex;
+ local_index < fe.base_element(base).n_dofs_per_vertex();
++local_index, ++total_index)
{
const unsigned int index_in_base =
- (fe.base_element(base).dofs_per_vertex * vertex_number +
+ (fe.base_element(base).n_dofs_per_vertex() * vertex_number +
local_index);
system_to_base_table[total_index] =
fe.base_element(base).n_components() *
do_tensor_product)
for (unsigned int local_index = 0;
- local_index < fe.base_element(base).dofs_per_vertex;
+ local_index < fe.base_element(base).n_dofs_per_vertex();
++local_index, ++total_index)
{
// get (cell) index of this shape function inside the base
// taken as representative for all others located on the same
// type of object):
const unsigned int index_in_base =
- (fe.base_element(base).dofs_per_vertex * vertex_number +
+ (fe.base_element(base).n_dofs_per_vertex() * vertex_number +
local_index);
const unsigned int face_index_in_base =
- (fe.base_element(base).dofs_per_vertex * vertex_number +
+ (fe.base_element(base).n_dofs_per_vertex() * vertex_number +
local_index);
face_system_to_base_table[total_index] =
std::vector<unsigned int> & renumbering,
std::vector<std::vector<unsigned int>> &comp_start)
{
- Assert(renumbering.size() == element.dofs_per_cell,
- ExcDimensionMismatch(renumbering.size(), element.dofs_per_cell));
+ Assert(renumbering.size() == element.n_dofs_per_cell(),
+ ExcDimensionMismatch(renumbering.size(), element.n_dofs_per_cell()));
comp_start.resize(element.n_base_elements());
for (unsigned int i = 0; i < comp_start.size(); ++i)
{
comp_start[i].resize(element.element_multiplicity(i));
- const unsigned int increment = element.base_element(i).dofs_per_cell;
+ const unsigned int increment =
+ element.base_element(i).n_dofs_per_cell();
for (unsigned int &first_index_of_component : comp_start[i])
{
// numbering, renumbering
// contains the index of the
// cell-block numbering
- for (unsigned int i = 0; i < element.dofs_per_cell; ++i)
+ for (unsigned int i = 0; i < element.n_dofs_per_cell(); ++i)
{
std::pair<std::pair<unsigned int, unsigned int>, unsigned int> indices =
element.system_to_base_index(i);
std::vector<types::global_dof_index> &block_data,
bool return_start_indices)
{
- Assert(renumbering.size() == element.dofs_per_cell,
- ExcDimensionMismatch(renumbering.size(), element.dofs_per_cell));
+ Assert(renumbering.size() == element.n_dofs_per_cell(),
+ ExcDimensionMismatch(renumbering.size(), element.n_dofs_per_cell()));
Assert(block_data.size() == element.n_blocks(),
ExcDimensionMismatch(block_data.size(), element.n_blocks()));
k += block_data[i];
}
- for (unsigned int i = 0; i < element.dofs_per_cell; ++i)
+ for (unsigned int i = 0; i < element.n_dofs_per_cell(); ++i)
{
std::pair<unsigned int, types::global_dof_index> indices =
element.system_to_block_index(i);
{
Assert(fe1.n_components() == fe2.n_components(),
ExcDimensionMismatch(fe1.n_components(), fe2.n_components()));
- Assert(interpolation_matrix.m() == fe2.dofs_per_cell &&
- interpolation_matrix.n() == fe1.dofs_per_cell,
+ Assert(interpolation_matrix.m() == fe2.n_dofs_per_cell() &&
+ interpolation_matrix.n() == fe1.n_dofs_per_cell(),
ExcMatrixDimensionMismatch(interpolation_matrix.m(),
interpolation_matrix.n(),
- fe2.dofs_per_cell,
- fe1.dofs_per_cell));
+ fe2.n_dofs_per_cell(),
+ fe1.n_dofs_per_cell()));
// first try the easy way: maybe the FE wants to implement things itself:
try
const std::vector<Point<dim>> &fe2_support_points =
fe2.get_unit_support_points();
- Assert(fe2_support_points.size() == fe2.dofs_per_cell,
+ Assert(fe2_support_points.size() == fe2.n_dofs_per_cell(),
(typename FiniteElement<dim, spacedim>::ExcFEHasNoSupportPoints()));
- for (unsigned int i = 0; i < fe2.dofs_per_cell; ++i)
+ for (unsigned int i = 0; i < fe2.n_dofs_per_cell(); ++i)
{
const unsigned int i1 = fe2.system_to_component_index(i).first;
- for (unsigned int j = 0; j < fe1.dofs_per_cell; ++j)
+ for (unsigned int j = 0; j < fe1.n_dofs_per_cell(); ++j)
{
const unsigned int j1 = fe1.system_to_component_index(j).first;
if (i1 == j1)
{
Assert(fe1.n_components() == fe2.n_components(),
ExcDimensionMismatch(fe1.n_components(), fe2.n_components()));
- Assert(interpolation_matrix.m() == fe1.dofs_per_cell &&
- interpolation_matrix.n() == fe1.dofs_per_cell,
+ Assert(interpolation_matrix.m() == fe1.n_dofs_per_cell() &&
+ interpolation_matrix.n() == fe1.n_dofs_per_cell(),
ExcMatrixDimensionMismatch(interpolation_matrix.m(),
interpolation_matrix.n(),
- fe1.dofs_per_cell,
- fe1.dofs_per_cell));
+ fe1.n_dofs_per_cell(),
+ fe1.n_dofs_per_cell()));
- FullMatrix<number> first_matrix(fe2.dofs_per_cell, fe1.dofs_per_cell);
- FullMatrix<number> second_matrix(fe1.dofs_per_cell, fe2.dofs_per_cell);
+ FullMatrix<number> first_matrix(fe2.n_dofs_per_cell(),
+ fe1.n_dofs_per_cell());
+ FullMatrix<number> second_matrix(fe1.n_dofs_per_cell(),
+ fe2.n_dofs_per_cell());
get_interpolation_matrix(fe1, fe2, first_matrix);
get_interpolation_matrix(fe2, fe1, second_matrix);
{
Assert(fe1.n_components() == fe2.n_components(),
ExcDimensionMismatch(fe1.n_components(), fe2.n_components()));
- Assert(difference_matrix.m() == fe1.dofs_per_cell &&
- difference_matrix.n() == fe1.dofs_per_cell,
+ Assert(difference_matrix.m() == fe1.n_dofs_per_cell() &&
+ difference_matrix.n() == fe1.n_dofs_per_cell(),
ExcMatrixDimensionMismatch(difference_matrix.m(),
difference_matrix.n(),
- fe1.dofs_per_cell,
- fe1.dofs_per_cell));
+ fe1.n_dofs_per_cell(),
+ fe1.n_dofs_per_cell()));
- FullMatrix<number> interpolation_matrix(fe1.dofs_per_cell);
+ FullMatrix<number> interpolation_matrix(fe1.n_dofs_per_cell());
get_back_interpolation_matrix(fe1, fe2, interpolation_matrix);
// compute difference
- difference_matrix = IdentityMatrix(fe1.dofs_per_cell);
+ difference_matrix = IdentityMatrix(fe1.n_dofs_per_cell());
difference_matrix.add(-1, interpolation_matrix);
}
Assert(fe1.n_components() == 1, ExcNotImplemented());
Assert(fe1.n_components() == fe2.n_components(),
ExcDimensionMismatch(fe1.n_components(), fe2.n_components()));
- Assert(matrix.m() == fe2.dofs_per_cell && matrix.n() == fe1.dofs_per_cell,
- ExcMatrixDimensionMismatch(
- matrix.m(), matrix.n(), fe2.dofs_per_cell, fe1.dofs_per_cell));
+ Assert(matrix.m() == fe2.n_dofs_per_cell() &&
+ matrix.n() == fe1.n_dofs_per_cell(),
+ ExcMatrixDimensionMismatch(matrix.m(),
+ matrix.n(),
+ fe2.n_dofs_per_cell(),
+ fe1.n_dofs_per_cell()));
matrix = 0;
- const unsigned int n1 = fe1.dofs_per_cell;
- const unsigned int n2 = fe2.dofs_per_cell;
+ const unsigned int n1 = fe1.n_dofs_per_cell();
+ const unsigned int n2 = fe2.n_dofs_per_cell();
// First, create a local mass matrix for the unit cell
Triangulation<dim, spacedim> tr;
FullMatrix<double>
compute_node_matrix(const FiniteElement<dim, spacedim> &fe)
{
- const unsigned int n_dofs = fe.dofs_per_cell;
+ const unsigned int n_dofs = fe.n_dofs_per_cell();
FullMatrix<double> N(n_dofs, n_dofs);
FullMatrix<number> & this_matrix,
const double threshold)
{
- const unsigned int n = fe.dofs_per_cell;
+ const unsigned int n = fe.n_dofs_per_cell();
const unsigned int nd = fe.n_components();
const unsigned int nq = coarse.n_quadrature_points;
const unsigned int ref_case,
const double threshold)
{
- const unsigned int n = fe.dofs_per_cell;
+ const unsigned int n = fe.n_dofs_per_cell();
const unsigned int nc =
GeometryInfo<dim>::n_children(RefinementCase<dim>(ref_case));
for (unsigned int i = 0; i < nc; ++i)
{
const unsigned int offset_c =
GeometryInfo<dim>::face_to_cell_vertices(face_coarse, i) *
- fe.dofs_per_vertex;
+ fe.n_dofs_per_vertex();
const unsigned int offset_f =
GeometryInfo<dim>::face_to_cell_vertices(face_fine, i) *
- fe.dofs_per_vertex;
- for (unsigned int j = 0; j < fe.dofs_per_vertex; ++j)
+ fe.n_dofs_per_vertex();
+ for (unsigned int j = 0; j < fe.n_dofs_per_vertex(); ++j)
{
face_c_dofs[face_dof] = offset_c + j;
face_f_dofs[face_dof] = offset_f + j;
> & matrices,
const bool isotropic_only)
{
- const unsigned int n = fe.dofs_per_cell;
+ const unsigned int n = fe.n_dofs_per_cell();
const unsigned int nd = fe.n_components();
const unsigned int degree = fe.degree;
const std::vector<double> &JxW = fine.get_JxW_values();
// Outer loop over all fine grid shape functions phi_j
- for (unsigned int j = 0; j < fe.dofs_per_cell; ++j)
+ for (unsigned int j = 0; j < fe.n_dofs_per_cell(); ++j)
{
- for (unsigned int i = 0; i < fe.dofs_per_cell; ++i)
+ for (unsigned int i = 0; i < fe.n_dofs_per_cell(); ++i)
{
if (fe.
// RHS ready. Solve system and enter row into matrix
inverse_mass_matrix.vmult(v_coarse, v_fine);
- for (unsigned int i = 0; i < fe.dofs_per_cell; ++i)
+ for (unsigned int i = 0; i < fe.n_dofs_per_cell(); ++i)
this_matrix(i, j) = v_coarse(i);
}
// first build the matrices M and Q
// described in the documentation
- FullMatrix<double> M(fe.dofs_per_cell, fe.dofs_per_cell);
- FullMatrix<double> Q(fe.dofs_per_cell, rhs_quadrature.size());
+ FullMatrix<double> M(fe.n_dofs_per_cell(), fe.n_dofs_per_cell());
+ FullMatrix<double> Q(fe.n_dofs_per_cell(), rhs_quadrature.size());
- for (unsigned int i = 0; i < fe.dofs_per_cell; ++i)
- for (unsigned int j = 0; j < fe.dofs_per_cell; ++j)
+ for (unsigned int i = 0; i < fe.n_dofs_per_cell(); ++i)
+ for (unsigned int j = 0; j < fe.n_dofs_per_cell(); ++j)
for (unsigned int q = 0; q < lhs_quadrature.size(); ++q)
M(i, j) += fe.shape_value(i, lhs_quadrature.point(q)) *
fe.shape_value(j, lhs_quadrature.point(q)) *
lhs_quadrature.weight(q);
- for (unsigned int i = 0; i < fe.dofs_per_cell; ++i)
+ for (unsigned int i = 0; i < fe.n_dofs_per_cell(); ++i)
for (unsigned int q = 0; q < rhs_quadrature.size(); ++q)
Q(i, q) +=
fe.shape_value(i, rhs_quadrature.point(q)) * rhs_quadrature.weight(q);
// then invert M
- FullMatrix<double> M_inverse(fe.dofs_per_cell, fe.dofs_per_cell);
+ FullMatrix<double> M_inverse(fe.n_dofs_per_cell(), fe.n_dofs_per_cell());
M_inverse.invert(M);
// finally compute the result
- X.reinit(fe.dofs_per_cell, rhs_quadrature.size());
+ X.reinit(fe.n_dofs_per_cell(), rhs_quadrature.size());
M_inverse.mmult(X, Q);
- Assert(X.m() == fe.dofs_per_cell, ExcInternalError());
+ Assert(X.m() == fe.n_dofs_per_cell(), ExcInternalError());
Assert(X.n() == rhs_quadrature.size(), ExcInternalError());
}
{
Assert(fe.n_components() == 1, ExcNotImplemented());
Assert(I_q.m() == quadrature.size(), ExcMessage("Wrong matrix size"));
- Assert(I_q.n() == fe.dofs_per_cell, ExcMessage("Wrong matrix size"));
+ Assert(I_q.n() == fe.n_dofs_per_cell(), ExcMessage("Wrong matrix size"));
for (unsigned int q = 0; q < quadrature.size(); ++q)
- for (unsigned int i = 0; i < fe.dofs_per_cell; ++i)
+ for (unsigned int i = 0; i < fe.n_dofs_per_cell(); ++i)
I_q(q, i) = fe.shape_value(i, quadrature.point(q));
}
// build the matrices M and Q
// described in the documentation
- FullMatrix<double> M(fe.dofs_per_cell, fe.dofs_per_cell);
- FullMatrix<double> Q(fe.dofs_per_cell, rhs_quadrature.size());
+ FullMatrix<double> M(fe.n_dofs_per_cell(), fe.n_dofs_per_cell());
+ FullMatrix<double> Q(fe.n_dofs_per_cell(), rhs_quadrature.size());
{
// need an FEFaceValues object to evaluate shape function
FEFaceValues<dim> fe_face_values(fe, lhs_quadrature, update_values);
fe_face_values.reinit(cell, face); // setup shape_value on this face.
- for (unsigned int i = 0; i < fe.dofs_per_cell; ++i)
- for (unsigned int j = 0; j < fe.dofs_per_cell; ++j)
+ for (unsigned int i = 0; i < fe.n_dofs_per_cell(); ++i)
+ for (unsigned int j = 0; j < fe.n_dofs_per_cell(); ++j)
for (unsigned int q = 0; q < lhs_quadrature.size(); ++q)
M(i, j) += fe_face_values.shape_value(i, q) *
fe_face_values.shape_value(j, q) *
lhs_quadrature.weight(q);
- for (unsigned int i = 0; i < fe.dofs_per_cell; ++i)
+ for (unsigned int i = 0; i < fe.n_dofs_per_cell(); ++i)
{
M(i, i) = (M(i, i) == 0 ? 1 : M(i, i));
}
FEFaceValues<dim> fe_face_values(fe, rhs_quadrature, update_values);
fe_face_values.reinit(cell, face); // setup shape_value on this face.
- for (unsigned int i = 0; i < fe.dofs_per_cell; ++i)
+ for (unsigned int i = 0; i < fe.n_dofs_per_cell(); ++i)
for (unsigned int q = 0; q < rhs_quadrature.size(); ++q)
Q(i, q) +=
fe_face_values.shape_value(i, q) * rhs_quadrature.weight(q);
}
// then invert M
- FullMatrix<double> M_inverse(fe.dofs_per_cell, fe.dofs_per_cell);
+ FullMatrix<double> M_inverse(fe.n_dofs_per_cell(), fe.n_dofs_per_cell());
M_inverse.invert(M);
// finally compute the result
- X.reinit(fe.dofs_per_cell, rhs_quadrature.size());
+ X.reinit(fe.n_dofs_per_cell(), rhs_quadrature.size());
M_inverse.mmult(X, Q);
- Assert(X.m() == fe.dofs_per_cell, ExcInternalError());
+ Assert(X.m() == fe.n_dofs_per_cell(), ExcInternalError());
Assert(X.n() == rhs_quadrature.size(), ExcInternalError());
}
{
AssertDimension(support_point_values.size(),
finite_element.get_generalized_support_points().size());
- AssertDimension(dof_values.size(), finite_element.dofs_per_cell);
+ AssertDimension(dof_values.size(), finite_element.n_dofs_per_cell());
internal::FEToolsConvertHelper::convert_helper<dim, spacedim>(
finite_element, support_point_values, dof_values);
hierarchic_to_lexicographic_numbering(const FiniteElementData<dim> &fe,
std::vector<unsigned int> & h2l)
{
- Assert(h2l.size() == fe.dofs_per_cell,
- ExcDimensionMismatch(h2l.size(), fe.dofs_per_cell));
+ Assert(h2l.size() == fe.n_dofs_per_cell(),
+ ExcDimensionMismatch(h2l.size(), fe.n_dofs_per_cell()));
hierarchic_to_lexicographic_numbering<dim>(fe.dofs_per_line + 1, h2l);
}
{
const FiniteElement<dim, spacedim> &fe =
dealii_cell->get_dof_handler().get_fe();
- const unsigned int dofs_per_cell = fe.dofs_per_cell;
+ const unsigned int dofs_per_cell = fe.n_dofs_per_cell();
Vector<typename OutVector::value_type> interpolated_values(
dofs_per_cell);
{
const FiniteElement<dim, spacedim> &fe =
dealii_cell->get_dof_handler().get_fe();
- const unsigned int dofs_per_cell = fe.dofs_per_cell;
+ const unsigned int dofs_per_cell = fe.n_dofs_per_cell();
Assert(interpolated_values.size() == dofs_per_cell,
ExcDimensionMismatch(interpolated_values.size(),
{
const FiniteElement<dim, spacedim> &fe =
dealii_cell->get_dof_handler().get_fe();
- const unsigned int dofs_per_cell = fe.dofs_per_cell;
+ const unsigned int dofs_per_cell = fe.n_dofs_per_cell();
if (dealii_cell->is_active())
{
{
const FiniteElement<dim, spacedim> &fe =
dealii_cell->get_dof_handler().get_fe();
- const unsigned int dofs_per_cell = fe.dofs_per_cell;
+ const unsigned int dofs_per_cell = fe.n_dofs_per_cell();
CellData cell_data(dofs_per_cell);
cell_data.quadrant = p4est_cell;
const unsigned int dofs_per_face = fe.dofs_per_face;
if (dofs_per_face > 0)
{
- const unsigned int dofs_per_cell = fe.dofs_per_cell;
+ const unsigned int dofs_per_cell = fe.n_dofs_per_cell();
std::vector<types::global_dof_index> indices(dofs_per_cell);
typename DoFHandler<dim, spacedim>::active_cell_iterator
cell = dof2.begin_active(),
const DoFHandler<dim, spacedim> &dof2,
OutVector & u2)
{
- const unsigned int dofs_per_cell = dof2.get_fe().dofs_per_cell;
+ const unsigned int dofs_per_cell = dof2.get_fe().n_dofs_per_cell();
Vector<typename OutVector::value_type> dof_values(dofs_per_cell);
// then traverse grid bottom up
// hanging node constraints. Consequently, when the elements are
// continuous no hanging node constraints are allowed.
const bool hanging_nodes_not_allowed =
- ((cell2->get_fe().dofs_per_vertex != 0) &&
+ ((cell2->get_fe().n_dofs_per_vertex() != 0) &&
(constraints.n_constraints() == 0));
if (hanging_nodes_not_allowed)
ExcHangingNodesNotAllowed());
#endif
- const unsigned int dofs_per_cell1 = cell1->get_fe().dofs_per_cell;
- const unsigned int dofs_per_cell2 = cell2->get_fe().dofs_per_cell;
+ const unsigned int dofs_per_cell1 = cell1->get_fe().n_dofs_per_cell();
+ const unsigned int dofs_per_cell2 = cell2->get_fe().n_dofs_per_cell();
u1_local.reinit(dofs_per_cell1);
u2_local.reinit(dofs_per_cell2);
// hanging node constraints. Consequently, when the elements are
// continuous no hanging node constraints are allowed.
const bool hanging_nodes_not_allowed =
- (cell->get_fe().dofs_per_vertex != 0) || (fe2.dofs_per_vertex != 0);
+ (cell->get_fe().n_dofs_per_vertex() != 0) ||
+ (fe2.n_dofs_per_vertex() != 0);
if (hanging_nodes_not_allowed)
for (const unsigned int face : cell->face_indices())
ExcHangingNodesNotAllowed());
#endif
- const unsigned int dofs_per_cell1 = cell->get_fe().dofs_per_cell;
+ const unsigned int dofs_per_cell1 = cell->get_fe().n_dofs_per_cell();
// make sure back_interpolation matrix is available
if (interpolation_matrices[&cell->get_fe()] == nullptr)
{
// For discontinuous elements without constraints take the simpler version
// of the back_interpolate function.
- if (dof1.get_fe().dofs_per_vertex == 0 &&
- dof2.get_fe().dofs_per_vertex == 0 &&
+ if (dof1.get_fe().n_dofs_per_vertex() == 0 &&
+ dof2.get_fe().n_dofs_per_vertex() == 0 &&
constraints1.n_constraints() == 0 && constraints2.n_constraints() == 0)
back_interpolate(dof1, u1, dof2.get_fe(), u1_interpolated);
else
" index sets."));
#endif
- const unsigned int dofs_per_cell = dof1.get_fe().dofs_per_cell;
+ const unsigned int dofs_per_cell = dof1.get_fe().n_dofs_per_cell();
Vector<typename OutVector::value_type> u1_local(dofs_per_cell);
Vector<typename OutVector::value_type> u1_diff_local(dofs_per_cell);
// hanging node constraints. Consequently, when the elements are
// continuous no hanging node constraints are allowed.
const bool hanging_nodes_not_allowed =
- (dof1.get_fe().dofs_per_vertex != 0) || (fe2.dofs_per_vertex != 0);
+ (dof1.get_fe().n_dofs_per_vertex() != 0) ||
+ (fe2.n_dofs_per_vertex() != 0);
if (hanging_nodes_not_allowed)
for (const unsigned int face : cell->face_indices())
// without constraints take the
// cheaper version of the
// interpolation_difference function.
- if (dof1.get_fe().dofs_per_vertex == 0 &&
- dof2.get_fe().dofs_per_vertex == 0 &&
+ if (dof1.get_fe().n_dofs_per_vertex() == 0 &&
+ dof2.get_fe().n_dofs_per_vertex() == 0 &&
constraints1.n_constraints() == 0 && constraints2.n_constraints() == 0)
interpolation_difference(dof1, u1, dof2.get_fe(), u1_difference);
else
dof2.begin_active();
typename DoFHandler<dim, spacedim>::active_cell_iterator end = dof2.end();
- const unsigned int n1 = dof1.get_fe().dofs_per_cell;
- const unsigned int n2 = dof2.get_fe().dofs_per_cell;
+ const unsigned int n1 = dof1.get_fe().n_dofs_per_cell();
+ const unsigned int n2 = dof2.get_fe().n_dofs_per_cell();
Vector<typename OutVector::value_type> u1_local(n1);
Vector<typename OutVector::value_type> u2_local(n2);
*
* The DoF values typically would be obtained in the following way:
* @code
- * Vector<double> local_dof_values(cell->get_fe().dofs_per_cell);
+ * Vector<double> local_dof_values(cell->get_fe().n_dofs_per_cell());
* cell->get_dof_values(solution, local_dof_values);
* @endcode
* or, for a generic @p Number type,
* @code
- * std::vector<Number> local_dof_values(cell->get_fe().dofs_per_cell);
+ * std::vector<Number> local_dof_values(cell->get_fe().n_dofs_per_cell());
* cell->get_dof_values(solution,
* local_dof_values.begin(),
* local_dof_values.end());
*
* The DoF values typically would be obtained in the following way:
* @code
- * Vector<double> local_dof_values(cell->get_fe().dofs_per_cell);
+ * Vector<double> local_dof_values(cell->get_fe().n_dofs_per_cell());
* cell->get_dof_values(solution, local_dof_values);
* @endcode
* or, for a generic @p Number type,
* @code
- * std::vector<Number> local_dof_values(cell->get_fe().dofs_per_cell);
+ * std::vector<Number> local_dof_values(cell->get_fe().n_dofs_per_cell());
* cell->get_dof_values(solution,
* local_dof_values.begin(),
* local_dof_values.end());
*
* The DoF values typically would be obtained in the following way:
* @code
- * Vector<double> local_dof_values(cell->get_fe().dofs_per_cell);
+ * Vector<double> local_dof_values(cell->get_fe().n_dofs_per_cell());
* cell->get_dof_values(solution, local_dof_values);
* @endcode
* or, for a generic @p Number type,
* @code
- * std::vector<Number> local_dof_values(cell->get_fe().dofs_per_cell);
+ * std::vector<Number> local_dof_values(cell->get_fe().n_dofs_per_cell());
* cell->get_dof_values(solution,
* local_dof_values.begin(),
* local_dof_values.end());
*
* The DoF values typically would be obtained in the following way:
* @code
- * Vector<double> local_dof_values(cell->get_fe().dofs_per_cell);
+ * Vector<double> local_dof_values(cell->get_fe().n_dofs_per_cell());
* cell->get_dof_values(solution, local_dof_values);
* @endcode
* or, for a generic @p Number type,
* @code
- * std::vector<Number> local_dof_values(cell->get_fe().dofs_per_cell);
+ * std::vector<Number> local_dof_values(cell->get_fe().n_dofs_per_cell());
* cell->get_dof_values(solution,
* local_dof_values.begin(),
* local_dof_values.end());
* {
* values.reinit(cell);
* for (unsigned int q=0; q<quadrature.size(); ++q)
- * for (unsigned int i=0; i<finite_element.dofs_per_cell; ++i)
- * for (unsigned int j=0; j<finite_element.dofs_per_cell; ++j)
+ * for (unsigned int i=0; i<finite_element.n_dofs_per_cell(); ++i)
+ * for (unsigned int j=0; j<finite_element.n_dofs_per_cell(); ++j)
* A(i,j) += fe_values.shape_value(i,q) *
* fe_values.shape_value(j,q) *
* fe_values.JxW(q);
Scalar<dim, spacedim>::value(const unsigned int shape_function,
const unsigned int q_point) const
{
- AssertIndexRange(shape_function, fe_values->fe->dofs_per_cell);
+ AssertIndexRange(shape_function, fe_values->fe->n_dofs_per_cell());
Assert(
fe_values->update_flags & update_values,
((typename FEValuesBase<dim, spacedim>::ExcAccessToUninitializedField(
Scalar<dim, spacedim>::gradient(const unsigned int shape_function,
const unsigned int q_point) const
{
- AssertIndexRange(shape_function, fe_values->fe->dofs_per_cell);
+ AssertIndexRange(shape_function, fe_values->fe->n_dofs_per_cell());
Assert(fe_values->update_flags & update_gradients,
(typename FEValuesBase<dim, spacedim>::ExcAccessToUninitializedField(
"update_gradients")));
Scalar<dim, spacedim>::hessian(const unsigned int shape_function,
const unsigned int q_point) const
{
- AssertIndexRange(shape_function, fe_values->fe->dofs_per_cell);
+ AssertIndexRange(shape_function, fe_values->fe->n_dofs_per_cell());
Assert(fe_values->update_flags & update_hessians,
(typename FEValuesBase<dim, spacedim>::ExcAccessToUninitializedField(
"update_hessians")));
Scalar<dim, spacedim>::third_derivative(const unsigned int shape_function,
const unsigned int q_point) const
{
- AssertIndexRange(shape_function, fe_values->fe->dofs_per_cell);
+ AssertIndexRange(shape_function, fe_values->fe->n_dofs_per_cell());
Assert(fe_values->update_flags & update_3rd_derivatives,
(typename FEValuesBase<dim, spacedim>::ExcAccessToUninitializedField(
"update_3rd_derivatives")));
Vector<dim, spacedim>::value(const unsigned int shape_function,
const unsigned int q_point) const
{
- AssertIndexRange(shape_function, fe_values->fe->dofs_per_cell);
+ AssertIndexRange(shape_function, fe_values->fe->n_dofs_per_cell());
Assert(fe_values->update_flags & update_values,
(typename FEValuesBase<dim, spacedim>::ExcAccessToUninitializedField(
"update_values")));
Vector<dim, spacedim>::gradient(const unsigned int shape_function,
const unsigned int q_point) const
{
- AssertIndexRange(shape_function, fe_values->fe->dofs_per_cell);
+ AssertIndexRange(shape_function, fe_values->fe->n_dofs_per_cell());
Assert(fe_values->update_flags & update_gradients,
(typename FEValuesBase<dim, spacedim>::ExcAccessToUninitializedField(
"update_gradients")));
const unsigned int q_point) const
{
// this function works like in the case above
- AssertIndexRange(shape_function, fe_values->fe->dofs_per_cell);
+ AssertIndexRange(shape_function, fe_values->fe->n_dofs_per_cell());
Assert(fe_values->update_flags & update_gradients,
(typename FEValuesBase<dim, spacedim>::ExcAccessToUninitializedField(
"update_gradients")));
{
// this function works like in the case above
- AssertIndexRange(shape_function, fe_values->fe->dofs_per_cell);
+ AssertIndexRange(shape_function, fe_values->fe->n_dofs_per_cell());
Assert(fe_values->update_flags & update_gradients,
(typename FEValuesBase<dim, spacedim>::ExcAccessToUninitializedField(
"update_gradients")));
const unsigned int q_point) const
{
// this function works like in the case above
- AssertIndexRange(shape_function, fe_values->fe->dofs_per_cell);
+ AssertIndexRange(shape_function, fe_values->fe->n_dofs_per_cell());
Assert(fe_values->update_flags & update_hessians,
(typename FEValuesBase<dim, spacedim>::ExcAccessToUninitializedField(
"update_hessians")));
const unsigned int q_point) const
{
// this function works like in the case above
- AssertIndexRange(shape_function, fe_values->fe->dofs_per_cell);
+ AssertIndexRange(shape_function, fe_values->fe->n_dofs_per_cell());
Assert(fe_values->update_flags & update_3rd_derivatives,
(typename FEValuesBase<dim, spacedim>::ExcAccessToUninitializedField(
"update_3rd_derivatives")));
Vector<dim, spacedim>::symmetric_gradient(const unsigned int shape_function,
const unsigned int q_point) const
{
- AssertIndexRange(shape_function, fe_values->fe->dofs_per_cell);
+ AssertIndexRange(shape_function, fe_values->fe->n_dofs_per_cell());
Assert(fe_values->update_flags & update_gradients,
(typename FEValuesBase<dim, spacedim>::ExcAccessToUninitializedField(
"update_gradients")));
SymmetricTensor<2, dim, spacedim>::value(const unsigned int shape_function,
const unsigned int q_point) const
{
- AssertIndexRange(shape_function, fe_values->fe->dofs_per_cell);
+ AssertIndexRange(shape_function, fe_values->fe->n_dofs_per_cell());
Assert(fe_values->update_flags & update_values,
(typename FEValuesBase<dim, spacedim>::ExcAccessToUninitializedField(
"update_values")));
const unsigned int shape_function,
const unsigned int q_point) const
{
- AssertIndexRange(shape_function, fe_values->fe->dofs_per_cell);
+ AssertIndexRange(shape_function, fe_values->fe->n_dofs_per_cell());
Assert(fe_values->update_flags & update_gradients,
(typename FEValuesBase<dim, spacedim>::ExcAccessToUninitializedField(
"update_gradients")));
Tensor<2, dim, spacedim>::value(const unsigned int shape_function,
const unsigned int q_point) const
{
- AssertIndexRange(shape_function, fe_values->fe->dofs_per_cell);
+ AssertIndexRange(shape_function, fe_values->fe->n_dofs_per_cell());
Assert(fe_values->update_flags & update_values,
(typename FEValuesBase<dim, spacedim>::ExcAccessToUninitializedField(
"update_values")));
Tensor<2, dim, spacedim>::divergence(const unsigned int shape_function,
const unsigned int q_point) const
{
- AssertIndexRange(shape_function, fe_values->fe->dofs_per_cell);
+ AssertIndexRange(shape_function, fe_values->fe->n_dofs_per_cell());
Assert(fe_values->update_flags & update_gradients,
(typename FEValuesBase<dim, spacedim>::ExcAccessToUninitializedField(
"update_gradients")));
Tensor<2, dim, spacedim>::gradient(const unsigned int shape_function,
const unsigned int q_point) const
{
- AssertIndexRange(shape_function, fe_values->fe->dofs_per_cell);
+ AssertIndexRange(shape_function, fe_values->fe->n_dofs_per_cell());
Assert(fe_values->update_flags & update_gradients,
(typename FEValuesBase<dim, spacedim>::ExcAccessToUninitializedField(
"update_gradients")));
FEValuesBase<dim, spacedim>::shape_value(const unsigned int i,
const unsigned int j) const
{
- AssertIndexRange(i, fe->dofs_per_cell);
+ AssertIndexRange(i, fe->n_dofs_per_cell());
Assert(this->update_flags & update_values,
ExcAccessToUninitializedField("update_values"));
Assert(fe->is_primitive(i), ExcShapeFunctionNotPrimitive(i));
const unsigned int j,
const unsigned int component) const
{
- AssertIndexRange(i, fe->dofs_per_cell);
+ AssertIndexRange(i, fe->n_dofs_per_cell());
Assert(this->update_flags & update_values,
ExcAccessToUninitializedField("update_values"));
AssertIndexRange(component, fe->n_components());
FEValuesBase<dim, spacedim>::shape_grad(const unsigned int i,
const unsigned int j) const
{
- AssertIndexRange(i, fe->dofs_per_cell);
+ AssertIndexRange(i, fe->n_dofs_per_cell());
Assert(this->update_flags & update_gradients,
ExcAccessToUninitializedField("update_gradients"));
Assert(fe->is_primitive(i), ExcShapeFunctionNotPrimitive(i));
const unsigned int j,
const unsigned int component) const
{
- AssertIndexRange(i, fe->dofs_per_cell);
+ AssertIndexRange(i, fe->n_dofs_per_cell());
Assert(this->update_flags & update_gradients,
ExcAccessToUninitializedField("update_gradients"));
AssertIndexRange(component, fe->n_components());
FEValuesBase<dim, spacedim>::shape_hessian(const unsigned int i,
const unsigned int j) const
{
- AssertIndexRange(i, fe->dofs_per_cell);
+ AssertIndexRange(i, fe->n_dofs_per_cell());
Assert(this->update_flags & update_hessians,
ExcAccessToUninitializedField("update_hessians"));
Assert(fe->is_primitive(i), ExcShapeFunctionNotPrimitive(i));
const unsigned int j,
const unsigned int component) const
{
- AssertIndexRange(i, fe->dofs_per_cell);
+ AssertIndexRange(i, fe->n_dofs_per_cell());
Assert(this->update_flags & update_hessians,
ExcAccessToUninitializedField("update_hessians"));
AssertIndexRange(component, fe->n_components());
FEValuesBase<dim, spacedim>::shape_3rd_derivative(const unsigned int i,
const unsigned int j) const
{
- AssertIndexRange(i, fe->dofs_per_cell);
+ AssertIndexRange(i, fe->n_dofs_per_cell());
Assert(this->update_flags & update_3rd_derivatives,
ExcAccessToUninitializedField("update_3rd_derivatives"));
Assert(fe->is_primitive(i), ExcShapeFunctionNotPrimitive(i));
const unsigned int j,
const unsigned int component) const
{
- AssertIndexRange(i, fe->dofs_per_cell);
+ AssertIndexRange(i, fe->n_dofs_per_cell());
Assert(this->update_flags & update_3rd_derivatives,
ExcAccessToUninitializedField("update_3rd_derivatives"));
AssertIndexRange(component, fe->n_components());
unsigned int max = 0;
for (unsigned int i = 0; i < finite_elements.size(); ++i)
- if (finite_elements[i]->dofs_per_vertex > max)
- max = finite_elements[i]->dofs_per_vertex;
+ if (finite_elements[i]->n_dofs_per_vertex() > max)
+ max = finite_elements[i]->n_dofs_per_vertex();
return max;
}
unsigned int max = 0;
for (unsigned int i = 0; i < finite_elements.size(); ++i)
- if (finite_elements[i]->dofs_per_cell > max)
- max = finite_elements[i]->dofs_per_cell;
+ if (finite_elements[i]->n_dofs_per_cell() > max)
+ max = finite_elements[i]->n_dofs_per_cell();
return max;
}
const double factor1 = 1.,
const double factor2 = 1.)
{
- const unsigned int n1_dofs = fe1.dofs_per_cell;
- const unsigned int n2_dofs = fe2.dofs_per_cell;
+ const unsigned int n1_dofs = fe1.n_dofs_per_cell();
+ const unsigned int n2_dofs = fe2.n_dofs_per_cell();
const unsigned int n_components = fe1.get_fe().n_components();
Assert(n1_dofs == n2_dofs, ExcNotImplemented());
const double factor1 = 1.,
const double factor2 = -1.)
{
- const unsigned int n_dofs = fe1.dofs_per_cell;
+ const unsigned int n_dofs = fe1.n_dofs_per_cell();
AssertDimension(fe1.get_fe().n_components(), dim);
AssertDimension(fe2.get_fe().n_components(), dim);
const UpdateFlags & update_flags)
: data(data)
, fe_degree(data->fe_degree)
- , dofs_per_cell(data->dofs_per_cell)
+ , dofs_per_cell(data->n_dofs_per_cell())
, q_points_per_cell(data->q_points_per_cell)
, fe_values(mapping,
fe,
, padding_length(data->get_padding_length())
, hanging_nodes(fe_degree, dof_handler, lexicographic_inv)
{
- local_dof_indices.resize(data->dofs_per_cell);
+ local_dof_indices.resize(data->n_dofs_per_cell());
lexicographic_dof_indices.resize(dofs_per_cell);
}
const AffineConstraints<number> &constraints)
{
std::vector<types::global_dof_index> local_dof_indices(
- cell->get_fe().dofs_per_cell);
+ cell->get_fe().n_dofs_per_cell());
cell->get_dof_indices(local_dof_indices);
constraints.resolve_indices(local_dof_indices);
padding_length = 1 << static_cast<unsigned int>(
std::ceil(dim * std::log2(fe_degree + 1.)));
- dofs_per_cell = fe.dofs_per_cell;
+ dofs_per_cell = fe.n_dofs_per_cell();
q_points_per_cell = std::pow(n_q_points_1d, dim);
const ::dealii::internal::MatrixFreeFunctions::ShapeInfo<Number> shape_info(
Assert(this->mapped_geometry.get() != nullptr, ExcNotInitialized());
this->mapped_geometry->reinit(
static_cast<typename Triangulation<dim>::cell_iterator>(cell));
- this->local_dof_indices.resize(cell->get_fe().dofs_per_cell);
+ this->local_dof_indices.resize(cell->get_fe().n_dofs_per_cell());
if (level_dof_access)
cell->get_mg_dof_indices(this->local_dof_indices);
else
dof_info[i].start_components[c] + dof_info[i].n_components[c];
}
dof_info[i].dofs_per_cell.push_back(
- dof_handler[i]->get_fe(0).dofs_per_cell);
+ dof_handler[i]->get_fe(0).n_dofs_per_cell());
// if indices are not initialized, the cell_level_index might not be
// divisible by the vectorization length. But it must be for
dof_info[no].cell_active_fe_index.resize(
n_active_cells, numbers::invalid_unsigned_int);
- is_fe_dg[no] = fes[0].dofs_per_vertex == 0;
+ is_fe_dg[no] = fes[0].n_dofs_per_vertex() == 0;
lexicographic[no].resize(fes.size());
{
const FiniteElement<dim> &fe = fes[fe_index];
// cache number of finite elements and dofs_per_cell
- dof_info[no].dofs_per_cell.push_back(fe.dofs_per_cell);
+ dof_info[no].dofs_per_cell.push_back(fe.n_dofs_per_cell());
dof_info[no].dofs_per_face.push_back(fe.dofs_per_face);
dof_info[no].dimension = dim;
dof_info[no].n_base_elements = fe.n_base_elements();
.push_back(dof_info[no]
.component_dof_indices_offset[fe_index]
.back() +
- fe.base_element(c).dofs_per_cell);
+ fe.base_element(c).n_dofs_per_cell());
dof_info[no].fe_index_conversion[fe_index].push_back(
fe.base_element(c).degree);
}
dof_indices.resize(
cell->neighbor_or_periodic_neighbor(f)
->get_fe()
- .dofs_per_cell);
+ .n_dofs_per_cell());
cell->neighbor_or_periodic_neighbor(f)
->get_mg_dof_indices(dof_indices);
for (const auto dof_index : dof_indices)
const unsigned int fe_degree = fe->degree;
const unsigned int n_q_points_1d = quad.size();
- const unsigned int n_dofs_1d = std::min(fe->dofs_per_cell, fe_degree + 1);
+ const unsigned int n_dofs_1d =
+ std::min(fe->n_dofs_per_cell(), fe_degree + 1);
// renumber (this is necessary for FE_Q, for example, since there the
// vertex DoFs come first, which is incompatible with the lexicographic
scalar_lexicographic = fe_poly->get_poly_space_numbering_inverse();
else if (fe_dgp != nullptr)
{
- scalar_lexicographic.resize(fe_dgp->dofs_per_cell);
- for (unsigned int i = 0; i < fe_dgp->dofs_per_cell; ++i)
+ scalar_lexicographic.resize(fe_dgp->n_dofs_per_cell());
+ for (unsigned int i = 0; i < fe_dgp->n_dofs_per_cell(); ++i)
scalar_lexicographic[i] = i;
element_type = truncated_tensor;
}
scalar_lexicographic = fe_q_dg0->get_poly_space_numbering_inverse();
element_type = tensor_symmetric_plus_dg0;
}
- else if (fe->dofs_per_cell == 0)
+ else if (fe->n_dofs_per_cell() == 0)
{
// FE_Nothing case -> nothing to do here
}
std::vector<unsigned int> scalar_inv =
Utilities::invert_permutation(scalar_lexicographic);
std::vector<unsigned int> lexicographic(
- fe_in.dofs_per_cell, numbers::invalid_unsigned_int);
+ fe_in.n_dofs_per_cell(), numbers::invalid_unsigned_int);
unsigned int components_before = 0;
for (unsigned int e = 0; e < base_element_number; ++e)
components_before += fe_in.element_multiplicity(e);
// have undefined blocks
lexicographic_numbering.resize(fe_in.element_multiplicity(
base_element_number) *
- fe->dofs_per_cell,
+ fe->n_dofs_per_cell(),
numbers::invalid_unsigned_int);
for (unsigned int i = 0; i < lexicographic.size(); ++i)
if (lexicographic[i] != numbers::invalid_unsigned_int)
// by reading the name, as done before r29356)
if (fe->has_support_points())
unit_point = fe->get_unit_support_points()[scalar_lexicographic[0]];
- Assert(fe->dofs_per_cell == 0 ||
+ Assert(fe->n_dofs_per_cell() == 0 ||
std::abs(fe->shape_value(scalar_lexicographic[0], unit_point) -
1) < 1e-13,
ExcInternalError("Could not decode 1D shape functions for the "
n_q_points = Utilities::fixed_power<dim>(n_q_points_1d);
n_q_points_face =
dim > 1 ? Utilities::fixed_power<dim - 1>(n_q_points_1d) : 1;
- dofs_per_component_on_cell = fe->dofs_per_cell;
+ dofs_per_component_on_cell = fe->n_dofs_per_cell();
dofs_per_component_on_face =
dim > 1 ? Utilities::fixed_power<dim - 1>(fe_degree + 1) : 1;
, level_cell(false)
{
std::vector<types::global_dof_index> aux(1);
- aux[0] = dof_handler.get_fe().dofs_per_cell;
+ aux[0] = dof_handler.get_fe().n_dofs_per_cell();
aux_local_indices.reinit(aux);
}
inline void
DoFInfo<dim, spacedim, number>::get_indices(const DHCellIterator &c)
{
- indices.resize(c->get_fe().dofs_per_cell);
+ indices.resize(c->get_fe().n_dofs_per_cell());
if (block_info == nullptr || block_info->local().size() == 0)
c->get_active_or_mg_dof_indices(indices);
else
{
- indices_org.resize(c->get_fe().dofs_per_cell);
+ indices_org.resize(c->get_fe().n_dofs_per_cell());
c->get_active_or_mg_dof_indices(indices_org);
set_block_indices();
}
const std::string &global_vector_name,
Number dummy) const
{
- const unsigned int n_dofs = get_current_fe_values().get_fe().dofs_per_cell;
+ const unsigned int n_dofs =
+ get_current_fe_values().get_fe().n_dofs_per_cell();
const std::string dofs_name =
get_unique_dofs_name(global_vector_name, n_dofs, dummy);
/**
* A variable storing the number of degrees of freedom on all child cells.
- * It is <tt>2<sup>dim</sup>*fe.dofs_per_cell</tt> for DG elements and
+ * It is <tt>2<sup>dim</sup>*fe.n_dofs_per_cell()</tt> for DG elements and
* somewhat less for continuous elements.
*/
unsigned int n_child_cell_dofs;
/**
* A variable storing the number of degrees of freedom on all child cells. It
- * is <tt>2<sup>dim</sup>*fe.dofs_per_cell</tt> for DG elements and somewhat
- * less for continuous elements.
+ * is <tt>2<sup>dim</sup>*fe.n_dofs_per_cell()</tt> for DG elements and
+ * somewhat less for continuous elements.
*/
unsigned int n_child_cell_dofs;
ghosted_vector = dst[level];
ghosted_vector.update_ghost_values();
- std::vector<Number> dof_values_coarse(fe.dofs_per_cell);
- Vector<Number> dof_values_fine(fe.dofs_per_cell);
- Vector<Number> tmp(fe.dofs_per_cell);
- std::vector<types::global_dof_index> dof_indices(fe.dofs_per_cell);
+ std::vector<Number> dof_values_coarse(fe.n_dofs_per_cell());
+ Vector<Number> dof_values_fine(fe.n_dofs_per_cell());
+ Vector<Number> tmp(fe.n_dofs_per_cell());
+ std::vector<types::global_dof_index> dof_indices(fe.n_dofs_per_cell());
typename DoFHandler<dim>::cell_iterator cell =
dof_handler.begin(level - 1);
typename DoFHandler<dim>::cell_iterator endc = dof_handler.end(level - 1);
for (unsigned int child = 0; child < cell->n_children(); ++child)
{
cell->child(child)->get_mg_dof_indices(dof_indices);
- for (unsigned int i = 0; i < fe.dofs_per_cell; ++i)
+ for (unsigned int i = 0; i < fe.n_dofs_per_cell(); ++i)
dof_values_fine(i) = ghosted_vector(dof_indices[i]);
fe.get_restriction_matrix(child, cell->refinement_case())
.vmult(tmp, dof_values_fine);
- for (unsigned int i = 0; i < fe.dofs_per_cell; ++i)
+ for (unsigned int i = 0; i < fe.n_dofs_per_cell(); ++i)
if (fe.restriction_is_additive(i))
dof_values_coarse[i] += tmp[i];
else if (tmp(i) != 0.)
dof_values_coarse[i] = tmp[i];
}
cell->get_mg_dof_indices(dof_indices);
- for (unsigned int i = 0; i < fe.dofs_per_cell; ++i)
+ for (unsigned int i = 0; i < fe.n_dofs_per_cell(); ++i)
dst[level - 1](dof_indices[i]) = dof_values_coarse[i];
}
const VectorType *vector = &((*vectors)[dof_cell->level()]);
const unsigned int dofs_per_cell =
- this->dof_handler->get_fe(0).dofs_per_cell;
+ this->dof_handler->get_fe(0).n_dofs_per_cell();
std::vector<types::global_dof_index> dof_indices(dofs_per_cell);
dof_cell->get_mg_dof_indices(dof_indices);
const VectorType *vector = &((*vectors)[dof_cell->level()]);
const unsigned int dofs_per_cell =
- this->dof_handler->get_fe(0).dofs_per_cell;
+ this->dof_handler->get_fe(0).n_dofs_per_cell();
std::vector<types::global_dof_index> dof_indices(dofs_per_cell);
dof_cell->get_mg_dof_indices(dof_indices);
const unsigned int dofs_per_face = fe.dofs_per_face;
copy_data.cell = cell;
- copy_data.dofs_per_cell = fe.dofs_per_cell;
+ copy_data.dofs_per_cell = fe.n_dofs_per_cell();
UpdateFlags update_flags =
UpdateFlags(update_values | update_JxW_values | update_normal_vectors |
const unsigned int dofs_per_face = fe.dofs_per_face;
copy_data.cell = cell;
- copy_data.dofs_per_cell = fe.dofs_per_cell;
+ copy_data.dofs_per_cell = fe.n_dofs_per_cell();
copy_data.dofs.resize(copy_data.dofs_per_cell);
cell->get_dof_indices(copy_data.dofs);
boundary_function.vector_value(cell->vertex(direction),
function_values);
- for (unsigned int i = 0; i < fe.dofs_per_vertex; ++i)
+ for (unsigned int i = 0; i < fe.n_dofs_per_vertex(); ++i)
if (component_mask[fe.face_system_to_component_index(i)
.first])
boundary_values[cell->vertex_dof_index(
// interested in, however. make sure that all shape functions
// that are non-zero for the components we are interested in,
// are in fact primitive
- for (unsigned int i = 0; i < cell->get_fe().dofs_per_cell;
+ for (unsigned int i = 0; i < cell->get_fe().n_dofs_per_cell();
++i)
{
const ComponentMask &nonzero_component_array =
(dim == 1 ?
i :
(dim == 2 ?
- (i < 2 * fe.dofs_per_vertex ?
+ (i < 2 * fe.n_dofs_per_vertex() ?
i :
- i + 2 * fe.dofs_per_vertex) :
+ i + 2 * fe.n_dofs_per_vertex()) :
(dim == 3 ?
- (i < 4 * fe.dofs_per_vertex ?
+ (i < 4 * fe.n_dofs_per_vertex() ?
i :
- (i < 4 * fe.dofs_per_vertex +
+ (i < 4 * fe.n_dofs_per_vertex() +
4 * fe.dofs_per_line ?
- i + 4 * fe.dofs_per_vertex :
- i + 4 * fe.dofs_per_vertex +
+ i +
+ 4 *
+ fe.n_dofs_per_vertex() :
+ i +
+ 4 *
+ fe.n_dofs_per_vertex() +
8 * fe.dofs_per_line)) :
numbers::invalid_unsigned_int)));
- Assert(cell_i < fe.dofs_per_cell,
+ Assert(cell_i < fe.n_dofs_per_cell(),
ExcInternalError());
// make sure that if this is not a primitive
// and so on.
const unsigned int face_dof_idx =
- GeometryInfo<dim>::vertices_per_face * fe.dofs_per_vertex +
+ GeometryInfo<dim>::vertices_per_face * fe.n_dofs_per_vertex() +
line * fe.dofs_per_line + line_dof_idx;
// Note, assuming that the edge orientations are "standard"
// (degree+1),..,2*(degree+1) and so on.
const unsigned int face_dof_idx =
GeometryInfo<dim>::vertices_per_face *
- fe.dofs_per_vertex +
+ fe.n_dofs_per_vertex() +
line * fe.dofs_per_line + line_dof_idx;
// Next, translate from face to cell. Note, this might be
++quad_dof_idx)
{
const unsigned int face_idx =
- GeometryInfo<dim>::vertices_per_face * fe.dofs_per_vertex +
+ GeometryInfo<dim>::vertices_per_face *
+ fe.n_dofs_per_vertex() +
lines_per_face * fe.dofs_per_line + quad_dof_idx;
const unsigned int cell_idx =
fe.face_to_cell_index(face_idx, face);
const unsigned int fe_index = cell->active_fe_index();
// Do nothing if there are no local degrees of freedom.
- if (fe[fe_index].dofs_per_cell == 0)
+ if (fe[fe_index].n_dofs_per_cell() == 0)
continue;
// Skip processing of the current cell if the function object is
fe_values.get_present_fe_values().get_quadrature_points();
// Get indices of the dofs on this cell
- const auto n_dofs = fe[fe_index].dofs_per_cell;
+ const auto n_dofs = fe[fe_index].n_dofs_per_cell();
dofs_on_cell.resize(n_dofs);
cell->get_dof_indices(dofs_on_cell);
OutVector & data_2)
{
using number = typename OutVector::value_type;
- Vector<number> cell_data_1(dof_1.get_fe().dofs_per_cell);
- Vector<number> cell_data_2(dof_2.get_fe().dofs_per_cell);
+ Vector<number> cell_data_1(dof_1.get_fe().n_dofs_per_cell());
+ Vector<number> cell_data_2(dof_2.get_fe().n_dofs_per_cell());
// Reset output vector.
data_2 = static_cast<number>(0);
touch_count.reinit(data_2);
std::vector<types::global_dof_index> local_dof_indices(
- dof_2.get_fe().dofs_per_cell);
+ dof_2.get_fe().n_dofs_per_cell());
typename DoFHandler<dim, spacedim>::active_cell_iterator cell_1 =
dof_1.begin_active();
cell_2->get_dof_indices(local_dof_indices);
// Distribute cell vector.
- for (unsigned int j = 0; j < dof_2.get_fe().dofs_per_cell; ++j)
+ for (unsigned int j = 0; j < dof_2.get_fe().n_dofs_per_cell(); ++j)
{
::dealii::internal::ElementAccess<OutVector>::add(
cell_data_2(j), local_dof_indices[j], data_2);
MappingQGeneric<dim, spacedim> map_q(fe.degree);
FEValues<dim, spacedim> fe_v(map_q, fe, quad, update_quadrature_points);
- std::vector<types::global_dof_index> dofs(fe.dofs_per_cell);
+ std::vector<types::global_dof_index> dofs(fe.n_dofs_per_cell());
- AssertDimension(fe.dofs_per_cell, fe.get_unit_support_points().size());
+ AssertDimension(fe.n_dofs_per_cell(),
+ fe.get_unit_support_points().size());
Assert(fe.is_primitive(),
ExcMessage("FE is not Primitive! This won't work."));
const ComponentMask maskq(spacedim, true);
get_position_vector(dhq, eulerq);
- FullMatrix<double> transfer(fe.dofs_per_cell, feq.dofs_per_cell);
- FullMatrix<double> local_transfer(feq.dofs_per_cell);
+ FullMatrix<double> transfer(fe.n_dofs_per_cell(),
+ feq.n_dofs_per_cell());
+ FullMatrix<double> local_transfer(feq.n_dofs_per_cell());
const std::vector<Point<dim>> &points = feq.get_unit_support_points();
// Here we construct the interpolation matrix from
// and check that this is the case. If not, we bail out, not
// knowing what to do in this case.
- std::vector<unsigned int> fe_to_feq(fe.dofs_per_cell,
+ std::vector<unsigned int> fe_to_feq(fe.n_dofs_per_cell(),
numbers::invalid_unsigned_int);
unsigned int index = 0;
- for (unsigned int i = 0; i < fe.dofs_per_cell; ++i)
+ for (unsigned int i = 0; i < fe.n_dofs_per_cell(); ++i)
if (fe_mask[fe.system_to_component_index(i).first])
fe_to_feq[i] = index++;
- // If index is not the same as feq.dofs_per_cell, we won't
+ // If index is not the same as feq.n_dofs_per_cell(), we won't
// know how to invert the resulting matrix. Bail out.
- Assert(index == feq.dofs_per_cell, ExcNotImplemented());
+ Assert(index == feq.n_dofs_per_cell(), ExcNotImplemented());
- for (unsigned int j = 0; j < fe.dofs_per_cell; ++j)
+ for (unsigned int j = 0; j < fe.n_dofs_per_cell(); ++j)
{
const unsigned int comp_j = fe.system_to_component_index(j).first;
if (fe_mask[comp_j])
// one is filled only with the information from the components
// of the displacement. The rest is set to zero.
local_transfer.invert(local_transfer);
- for (unsigned int i = 0; i < fe.dofs_per_cell; ++i)
+ for (unsigned int i = 0; i < fe.n_dofs_per_cell(); ++i)
if (fe_to_feq[i] != numbers::invalid_unsigned_int)
- for (unsigned int j = 0; j < feq.dofs_per_cell; ++j)
+ for (unsigned int j = 0; j < feq.n_dofs_per_cell(); ++j)
transfer(i, j) = local_transfer(fe_to_feq[i], j);
// The interpolation matrix is then passed to the
// dof_values by interpolation.
if (cell1->is_active())
{
- cache.reinit(cell1->get_fe().dofs_per_cell);
+ cache.reinit(cell1->get_fe().n_dofs_per_cell());
cell1->get_interpolated_dof_values(u1,
cache,
cell1->active_fe_index());
}
else
{
- cache.reinit(cell2->get_fe().dofs_per_cell);
+ cache.reinit(cell2->get_fe().n_dofs_per_cell());
cell1->get_interpolated_dof_values(u1,
cache,
cell2->active_fe_index());
UpdateFlags(update_values));
fe_values.reinit(cell_point.first);
- const unsigned int dofs_per_cell = dof_handler.get_fe().dofs_per_cell;
+ const unsigned int dofs_per_cell = dof_handler.get_fe().n_dofs_per_cell();
std::vector<types::global_dof_index> local_dof_indices(dofs_per_cell);
cell_point.first->get_dof_indices(local_dof_indices);
UpdateFlags(update_values));
fe_values.reinit(cell_point.first);
- const unsigned int dofs_per_cell = cell_point.first->get_fe().dofs_per_cell;
+ const unsigned int dofs_per_cell =
+ cell_point.first->get_fe().n_dofs_per_cell();
std::vector<types::global_dof_index> local_dof_indices(dofs_per_cell);
cell_point.first->get_dof_indices(local_dof_indices);
UpdateFlags(update_values));
fe_values.reinit(cell_point.first);
- const unsigned int dofs_per_cell = dof_handler.get_fe().dofs_per_cell;
+ const unsigned int dofs_per_cell = dof_handler.get_fe().n_dofs_per_cell();
std::vector<types::global_dof_index> local_dof_indices(dofs_per_cell);
cell_point.first->get_dof_indices(local_dof_indices);
UpdateFlags(update_values));
fe_values.reinit(cell_point.first);
- const unsigned int dofs_per_cell = cell_point.first->get_fe().dofs_per_cell;
+ const unsigned int dofs_per_cell =
+ cell_point.first->get_fe().n_dofs_per_cell();
std::vector<types::global_dof_index> local_dof_indices(dofs_per_cell);
cell_point.first->get_dof_indices(local_dof_indices);
quadrature,
update_values | update_JxW_values);
- const unsigned int dofs_per_cell = dof.get_fe().dofs_per_cell;
+ const unsigned int dofs_per_cell = dof.get_fe().n_dofs_per_cell();
const unsigned int n_q_points = quadrature.size();
Vector<Number> cell_rhs(dofs_per_cell);
std::vector<types::global_dof_index> local_dof_indices(dofs_per_cell);
if (comps[i])
space_gtl[i] = j++;
- std::vector<types::global_dof_index> dof_indices(fe.dofs_per_cell);
+ std::vector<types::global_dof_index> dof_indices(fe.n_dofs_per_cell());
while (particle != particle_handler.end())
{
const auto id = particle->get_id();
- for (unsigned int j = 0; j < fe.dofs_per_cell; ++j)
+ for (unsigned int j = 0; j < fe.n_dofs_per_cell(); ++j)
{
const auto comp_j =
space_gtl[fe.system_to_component_index(j).first];
const FiniteElement<dim, spacedim> &future_fe) -> unsigned int {
const float result =
std::trunc(coefficients.first *
- std::pow(future_fe.dofs_per_cell, coefficients.second));
+ std::pow(future_fe.n_dofs_per_cell(), coefficients.second));
Assert(result >= 0. &&
result <=
const FiniteElement<dim, spacedim> &future_fe) -> unsigned int {
float result = 0;
for (const auto &pair : coefficients)
- result += pair.first * std::pow(future_fe.dofs_per_cell, pair.second);
+ result +=
+ pair.first * std::pow(future_fe.n_dofs_per_cell(), pair.second);
result = std::trunc(result);
Assert(result >= 0. &&
}
const unsigned int dofs_per_cell =
- dof_handler->get_fe(fe_index).dofs_per_cell;
+ dof_handler->get_fe(fe_index).n_dofs_per_cell();
if (dofs_per_cell == 0)
return std::vector<char>(); // nothing to do for FE_Nothing
}
const unsigned int dofs_per_cell =
- dof_handler->get_fe(fe_index).dofs_per_cell;
+ dof_handler->get_fe(fe_index).n_dofs_per_cell();
if (dofs_per_cell == 0)
return; // nothing to do for FE_Nothing
Assert(this->dof_handler != nullptr, typename BaseClass::ExcInvalidObject());
- AssertDimension(local_dof_indices.size(), this->get_fe().dofs_per_cell);
+ AssertDimension(local_dof_indices.size(), this->get_fe().n_dofs_per_cell());
internal::DoFAccessorImplementation::Implementation::
template set_dof_indices<dim, spacedim, lda, dim>(*this,
// well, here we need to first get the values from the current
// cell and then interpolate it to the element requested. this
// can clearly only happen for hp::DoFHandler objects
- const unsigned int dofs_per_cell = this->get_fe().dofs_per_cell;
+ const unsigned int dofs_per_cell = this->get_fe().n_dofs_per_cell();
if (dofs_per_cell == 0)
{
interpolated_values = 0;
this->get_dof_values(values, tmp);
FullMatrix<double> interpolation(
- this->dof_handler->get_fe(fe_index).dofs_per_cell,
- this->get_fe().dofs_per_cell);
+ this->dof_handler->get_fe(fe_index).n_dofs_per_cell(),
+ this->get_fe().n_dofs_per_cell());
this->dof_handler->get_fe(fe_index).get_interpolation_matrix(
this->get_fe(), interpolation);
interpolation.vmult(interpolated_values, tmp);
const FiniteElement<dim, spacedim> &fe =
this->get_dof_handler().get_fe(fe_index);
- const unsigned int dofs_per_cell = fe.dofs_per_cell;
+ const unsigned int dofs_per_cell = fe.n_dofs_per_cell();
Assert(this->dof_handler != nullptr,
typename BaseClass::ExcInvalidObject());
// interpolating FE_Nothing), then simply skip all of the
// following since the output vector would be of size zero
// anyway (and in fact is of size zero, see the assertion above)
- if (fe.dofs_per_cell > 0)
+ if (fe.n_dofs_per_cell() > 0)
{
Vector<number> tmp1(dofs_per_cell);
Vector<number> tmp2(dofs_per_cell);
else
{
Assert(local_values.size() ==
- this->dof_handler->get_fe(fe_index).dofs_per_cell,
+ this->dof_handler->get_fe(fe_index).n_dofs_per_cell(),
ExcMessage("Incorrect size of local_values vector."));
FullMatrix<double> interpolation(
- this->get_fe().dofs_per_cell,
- this->dof_handler->get_fe(fe_index).dofs_per_cell);
+ this->get_fe().n_dofs_per_cell(),
+ this->dof_handler->get_fe(fe_index).n_dofs_per_cell());
this->get_fe().get_interpolation_matrix(
this->dof_handler->get_fe(fe_index), interpolation);
// do the interpolation to the target space. for historical
// reasons, matrices are set to size 0x0 internally even
// we reinit as 4x0, so we have to treat this case specially
- Vector<number> tmp(this->get_fe().dofs_per_cell);
+ Vector<number> tmp(this->get_fe().n_dofs_per_cell());
if ((tmp.size() > 0) && (local_values.size() > 0))
interpolation.vmult(tmp, local_values);
const FiniteElement<dim, spacedim> &fe =
this->get_dof_handler().get_fe(fe_index);
- const unsigned int dofs_per_cell = fe.dofs_per_cell;
+ const unsigned int dofs_per_cell = fe.n_dofs_per_cell();
Assert(this->dof_handler != nullptr,
typename BaseClass::ExcInvalidObject());
// the following numbers are not based on actual counting but by
// extrapolating the number sequences from the previous ones (for
- // example, for dofs_per_vertex, the sequence above is 19, 21, 28,
- // 30, 37, and is continued as follows):
+ // example, for n_dofs_per_vertex(), the sequence above is 19, 21,
+ // 28, 30, 37, and is continued as follows):
case 9:
max_couplings =
39 * dof_handler.fe_collection.max_dofs_per_vertex() +
static void reserve_space(DoFHandler<1, spacedim> &dof_handler)
{
dof_handler.object_dof_indices[0][0].resize(
- dof_handler.tria->n_vertices() * dof_handler.get_fe().dofs_per_vertex,
+ dof_handler.tria->n_vertices() *
+ dof_handler.get_fe().n_dofs_per_vertex(),
numbers::invalid_dof_index);
for (unsigned int i = 0; i < dof_handler.tria->n_levels(); ++i)
dof_handler.cell_dof_cache_indices[i].resize(
dof_handler.tria->n_raw_cells(i) *
- dof_handler.get_fe().dofs_per_cell,
+ dof_handler.get_fe().n_dofs_per_cell(),
numbers::invalid_dof_index);
dof_handler.cell_dof_cache_ptr[i].reserve(
for (unsigned int j = 0; j < dof_handler.tria->n_raw_cells(i) + 1;
j++)
dof_handler.cell_dof_cache_ptr[i].push_back(
- j * dof_handler.get_fe().dofs_per_cell);
+ j * dof_handler.get_fe().n_dofs_per_cell());
}
dof_handler.object_dof_indices[0][0].resize(
- dof_handler.tria->n_vertices() * dof_handler.get_fe().dofs_per_vertex,
+ dof_handler.tria->n_vertices() *
+ dof_handler.get_fe().n_dofs_per_vertex(),
numbers::invalid_dof_index);
}
static void reserve_space(DoFHandler<2, spacedim> &dof_handler)
{
dof_handler.object_dof_indices[0][0].resize(
- dof_handler.tria->n_vertices() * dof_handler.get_fe().dofs_per_vertex,
+ dof_handler.tria->n_vertices() *
+ dof_handler.get_fe().n_dofs_per_vertex(),
numbers::invalid_dof_index);
for (unsigned int i = 0; i < dof_handler.tria->n_levels(); ++i)
dof_handler.cell_dof_cache_indices[i].resize(
dof_handler.tria->n_raw_cells(i) *
- dof_handler.get_fe().dofs_per_cell,
+ dof_handler.get_fe().n_dofs_per_cell(),
numbers::invalid_dof_index);
dof_handler.cell_dof_cache_ptr[i].reserve(
for (unsigned int j = 0; j < dof_handler.tria->n_raw_cells(i) + 1;
j++)
dof_handler.cell_dof_cache_ptr[i].push_back(
- j * dof_handler.get_fe().dofs_per_cell);
+ j * dof_handler.get_fe().n_dofs_per_cell());
}
dof_handler.object_dof_indices[0][0].resize(
- dof_handler.tria->n_vertices() * dof_handler.get_fe().dofs_per_vertex,
+ dof_handler.tria->n_vertices() *
+ dof_handler.get_fe().n_dofs_per_vertex(),
numbers::invalid_dof_index);
if (dof_handler.tria->n_cells() > 0)
static void reserve_space(DoFHandler<3, spacedim> &dof_handler)
{
dof_handler.object_dof_indices[0][0].resize(
- dof_handler.tria->n_vertices() * dof_handler.get_fe().dofs_per_vertex,
+ dof_handler.tria->n_vertices() *
+ dof_handler.get_fe().n_dofs_per_vertex(),
numbers::invalid_dof_index);
for (unsigned int i = 0; i < dof_handler.tria->n_levels(); ++i)
dof_handler.cell_dof_cache_indices[i].resize(
dof_handler.tria->n_raw_cells(i) *
- dof_handler.get_fe().dofs_per_cell,
+ dof_handler.get_fe().n_dofs_per_cell(),
numbers::invalid_dof_index);
dof_handler.cell_dof_cache_ptr[i].reserve(
for (unsigned int j = 0; j < dof_handler.tria->n_raw_cells(i) + 1;
j++)
dof_handler.cell_dof_cache_ptr[i].push_back(
- j * dof_handler.get_fe().dofs_per_cell);
+ j * dof_handler.get_fe().n_dofs_per_cell());
}
dof_handler.object_dof_indices[0][0].resize(
- dof_handler.tria->n_vertices() * dof_handler.get_fe().dofs_per_vertex,
+ dof_handler.tria->n_vertices() *
+ dof_handler.get_fe().n_dofs_per_vertex(),
numbers::invalid_dof_index);
if (dof_handler.tria->n_cells() > 0)
dof_handler.mg_vertex_dofs[vertex].init(
min_level[vertex],
max_level[vertex],
- dof_handler.get_fe().dofs_per_vertex);
+ dof_handler.get_fe().n_dofs_per_vertex());
}
else
ExcInternalError());
dof_handler.mg_vertex_dofs[vertex].init(min_level[vertex],
max_level[vertex],
- fe.dofs_per_vertex);
+ fe.n_dofs_per_vertex());
}
else
ExcInternalError());
dof_handler.mg_vertex_dofs[vertex].init(min_level[vertex],
max_level[vertex],
- fe.dofs_per_vertex);
+ fe.n_dofs_per_vertex());
}
else
{
fe_slots_needed++;
vertex_slots_needed +=
- dof_handler.get_fe(fe).dofs_per_vertex;
+ dof_handler.get_fe(fe).n_dofs_per_vertex();
}
}
}
dof_handler.object_dof_indices[l][d].size());
for (unsigned int i = 0;
- i < dof_handler.get_fe(fe).dofs_per_vertex;
+ i < dof_handler.get_fe(fe).n_dofs_per_vertex();
i++)
dof_handler.object_dof_indices[l][d].push_back(
numbers::invalid_dof_index);
dof_handler.cell_dof_cache_ptr[level][cell->index()] =
cache_size;
- cache_size += cell->get_fe().dofs_per_cell;
+ cache_size += cell->get_fe().n_dofs_per_cell();
}
dof_handler.object_dof_indices[level][dim] =
if ((subdomain_id == numbers::invalid_subdomain_id) ||
(cell->subdomain_id() == subdomain_id))
{
- dof_indices.resize(cell->get_fe().dofs_per_cell);
+ dof_indices.resize(cell->get_fe().n_dofs_per_cell());
// circumvent cache
internal::DoFAccessorImplementation::Implementation::
// delete all dofs that live there and that we have
// previously assigned a number to (i.e. the ones on
// the interface)
- local_dof_indices.resize(cell->get_fe().dofs_per_cell);
+ local_dof_indices.resize(cell->get_fe().n_dofs_per_cell());
cell->get_dof_indices(local_dof_indices);
for (const auto &local_dof_index : local_dof_indices)
if (local_dof_index != numbers::invalid_dof_index)
if ((level_subdomain_id == numbers::invalid_subdomain_id) ||
(cell->level_subdomain_id() == level_subdomain_id))
{
- dof_indices.resize(cell->get_fe().dofs_per_cell);
+ dof_indices.resize(cell->get_fe().n_dofs_per_cell());
cell->get_mg_dof_indices(dof_indices);
// really is unused
Assert(dof_handler.get_triangulation().vertex_used(
(i - dof_handler.object_dof_indices[0][0].begin()) /
- dof_handler.get_fe().dofs_per_vertex) == false,
+ dof_handler.get_fe().n_dofs_per_vertex()) == false,
ExcInternalError());
return;
}
std::integral_constant<int, 0>());
for (unsigned int d = 0;
- d < dof_handler.get_fe(fe_index).dofs_per_vertex;
+ d < dof_handler.get_fe(fe_index).n_dofs_per_vertex();
++d)
{
const types::global_dof_index old_dof_index =
// if the present vertex lives on the current level
if ((i->get_coarsest_level() <= level) &&
(i->get_finest_level() >= level))
- for (unsigned int d = 0; d < dof_handler.get_fe().dofs_per_vertex;
+ for (unsigned int d = 0;
+ d < dof_handler.get_fe().n_dofs_per_vertex();
++d)
{
const dealii::types::global_dof_index idx =
i->get_index(level,
d,
- dof_handler.get_fe().dofs_per_vertex);
+ dof_handler.get_fe().n_dofs_per_vertex());
if (idx != numbers::invalid_dof_index)
{
ExcInternalError());
i->set_index(level,
d,
- dof_handler.get_fe().dofs_per_vertex,
+ dof_handler.get_fe().n_dofs_per_vertex(),
(indices_we_care_about.size() == 0) ?
(new_numbers[idx]) :
(new_numbers[indices_we_care_about
// that all cells are either locally owned or ghosts (not
// artificial), so this call will always yield the true owner
const types::subdomain_id subdomain_id = cell->subdomain_id();
- const unsigned int dofs_per_cell = cell->get_fe().dofs_per_cell;
+ const unsigned int dofs_per_cell =
+ cell->get_fe().n_dofs_per_cell();
local_dof_indices.resize(dofs_per_cell);
cell->get_dof_indices(local_dof_indices);
// artificial), so this call will always yield the true owner
const types::subdomain_id level_subdomain_id =
cell->level_subdomain_id();
- const unsigned int dofs_per_cell = cell->get_fe().dofs_per_cell;
+ const unsigned int dofs_per_cell =
+ cell->get_fe().n_dofs_per_cell();
local_dof_indices.resize(dofs_per_cell);
cell->get_mg_dof_indices(local_dof_indices);
ExcInternalError());
std::vector<dealii::types::global_dof_index> data(
- cell->get_fe().dofs_per_cell);
+ cell->get_fe().n_dofs_per_cell());
cell->get_mg_dof_indices(data);
return data;
};
const auto unpack = [](const auto &cell, const auto &dofs) {
- Assert(cell->get_fe().dofs_per_cell == dofs.size(),
+ Assert(cell->get_fe().n_dofs_per_cell() == dofs.size(),
ExcInternalError());
Assert(cell->level_subdomain_id() !=
ExcInternalError());
std::vector<dealii::types::global_dof_index> dof_indices(
- cell->get_fe().dofs_per_cell);
+ cell->get_fe().n_dofs_per_cell());
cell->get_mg_dof_indices(dof_indices);
bool complete = true;
Assert(cell->is_locally_owned(), ExcInternalError());
std::vector<dealii::types::global_dof_index> data(
- cell->get_fe().dofs_per_cell);
+ cell->get_fe().n_dofs_per_cell());
cell->get_dof_indices(data);
return data;
};
const auto unpack = [](const auto &cell, const auto &dofs) {
- Assert(cell->get_fe().dofs_per_cell == dofs.size(),
+ Assert(cell->get_fe().n_dofs_per_cell() == dofs.size(),
ExcInternalError());
Assert(cell->is_ghost(), ExcInternalError());
std::vector<dealii::types::global_dof_index> dof_indices(
- cell->get_fe().dofs_per_cell);
+ cell->get_fe().n_dofs_per_cell());
cell->update_cell_dof_indices_cache();
cell->get_dof_indices(dof_indices);
for (const auto &cell : dof_handler->active_cell_iterators())
if (!cell->is_artificial())
{
- local_dof_indices.resize(cell->get_fe().dofs_per_cell);
+ local_dof_indices.resize(cell->get_fe().n_dofs_per_cell());
cell->get_dof_indices(local_dof_indices);
if (local_dof_indices.end() !=
std::find(local_dof_indices.begin(),
// delete all dofs that live there and that we
// have previously assigned a number to
// (i.e. the ones on the interface)
- local_dof_indices.resize(cell->get_fe().dofs_per_cell);
+ local_dof_indices.resize(
+ cell->get_fe().n_dofs_per_cell());
cell->get_mg_dof_indices(local_dof_indices);
- for (unsigned int i = 0; i < cell->get_fe().dofs_per_cell;
+ for (unsigned int i = 0;
+ i < cell->get_fe().n_dofs_per_cell();
++i)
if (local_dof_indices[i] != numbers::invalid_dof_index)
renumbering[local_dof_indices[i]] =
if (cell->level_subdomain_id() !=
dealii::numbers::artificial_subdomain_id)
{
- local_dof_indices.resize(cell->get_fe().dofs_per_cell);
+ local_dof_indices.resize(cell->get_fe().n_dofs_per_cell());
cell->get_mg_dof_indices(local_dof_indices);
if (local_dof_indices.end() !=
std::find(local_dof_indices.begin(),
for (auto cell : dof_handler->active_cell_iterators())
if (cell->is_ghost())
{
- local_dof_indices.resize(cell->get_fe().dofs_per_cell);
+ local_dof_indices.resize(cell->get_fe().n_dofs_per_cell());
cell->get_dof_indices(local_dof_indices);
- for (unsigned int i = 0; i < cell->get_fe().dofs_per_cell;
+ for (unsigned int i = 0;
+ i < cell->get_fe().n_dofs_per_cell();
++i)
// delete a DoF index if it has not already been deleted
// (e.g., by visiting a neighboring cell, if it is on the
for (const auto &cell : dof_handler.active_cell_iterators())
{
- const unsigned int dofs_per_cell = cell->get_fe().dofs_per_cell;
+ const unsigned int dofs_per_cell = cell->get_fe().n_dofs_per_cell();
dofs_on_this_cell.resize(dofs_per_cell);
std::vector<std::vector<unsigned int>> component_list(fe_collection.size());
for (unsigned int f = 0; f < fe_collection.size(); ++f)
{
- const FiniteElement<dim, spacedim> &fe = fe_collection[f];
- const unsigned int dofs_per_cell = fe.dofs_per_cell;
+ const FiniteElement<dim, spacedim> &fe = fe_collection[f];
+ const unsigned int dofs_per_cell = fe.n_dofs_per_cell();
component_list[f].resize(dofs_per_cell);
for (unsigned int i = 0; i < dofs_per_cell; ++i)
if (fe.is_primitive(i))
// list using their component
const unsigned int fe_index = cell->active_fe_index();
const unsigned int dofs_per_cell =
- fe_collection[fe_index].dofs_per_cell;
+ fe_collection[fe_index].n_dofs_per_cell();
local_dof_indices.resize(dofs_per_cell);
cell->get_active_or_mg_dof_indices(local_dof_indices);
for (unsigned int f = 0; f < fe_collection.size(); ++f)
{
const FiniteElement<dim, spacedim> &fe = fe_collection[f];
- block_list[f].resize(fe.dofs_per_cell);
- for (unsigned int i = 0; i < fe.dofs_per_cell; ++i)
+ block_list[f].resize(fe.n_dofs_per_cell());
+ for (unsigned int i = 0; i < fe.n_dofs_per_cell(); ++i)
block_list[f][i] = fe.system_to_block_index(i).first;
}
// list using their component
const unsigned int fe_index = cell->active_fe_index();
const unsigned int dofs_per_cell =
- fe_collection[fe_index].dofs_per_cell;
+ fe_collection[fe_index].n_dofs_per_cell();
local_dof_indices.resize(dofs_per_cell);
cell->get_active_or_mg_dof_indices(local_dof_indices);
if (cell->is_locally_owned())
{
// first get the existing DoF indices
- const unsigned int dofs_per_cell = cell->get_fe().dofs_per_cell;
+ const unsigned int dofs_per_cell =
+ cell->get_fe().n_dofs_per_cell();
std::vector<types::global_dof_index> local_dof_indices(
dofs_per_cell);
cell->get_dof_indices(local_dof_indices);
for (const auto &cell : dof.active_cell_iterators())
{
- const unsigned int dofs_per_cell = cell->get_fe().dofs_per_cell;
+ const unsigned int dofs_per_cell = cell->get_fe().n_dofs_per_cell();
local_dof_indices.resize(dofs_per_cell);
hp_fe_values.reinit(cell);
const FEValues<dim> &fe_values =
std::vector<bool> already_touched(dof.n_dofs(), false);
- const unsigned int dofs_per_cell = dof.get_fe().dofs_per_cell;
+ const unsigned int dofs_per_cell = dof.get_fe().n_dofs_per_cell();
std::vector<types::global_dof_index> local_dof_indices(dofs_per_cell);
typename DoFHandler<dim, spacedim>::level_cell_iterator begin =
dof.begin(level);
const ComponentMask &component_mask)
{
std::vector<unsigned char> local_component_association(
- fe.dofs_per_cell, static_cast<unsigned char>(-1));
+ fe.n_dofs_per_cell(), static_cast<unsigned char>(-1));
// compute the component each local dof belongs to.
// if the shape function is primitive, then this
// is simple and we can just associate it with
// what system_to_component_index gives us
- for (unsigned int i = 0; i < fe.dofs_per_cell; ++i)
+ for (unsigned int i = 0; i < fe.n_dofs_per_cell(); ++i)
if (fe.is_primitive(i))
local_component_association[i] =
fe.system_to_component_index(i).first;
if (c->is_locally_owned())
{
const unsigned int fe_index = c->active_fe_index();
- const unsigned int dofs_per_cell = c->get_fe().dofs_per_cell;
+ const unsigned int dofs_per_cell = c->get_fe().n_dofs_per_cell();
indices.resize(dofs_per_cell);
c->get_dof_indices(indices);
for (unsigned int i = 0; i < dofs_per_cell; ++i)
for (unsigned int f = 0; f < fe_collection.size(); ++f)
{
const FiniteElement<dim, spacedim> &fe = fe_collection[f];
- local_block_association[f].resize(fe.dofs_per_cell,
+ local_block_association[f].resize(fe.n_dofs_per_cell(),
static_cast<unsigned char>(-1));
- for (unsigned int i = 0; i < fe.dofs_per_cell; ++i)
+ for (unsigned int i = 0; i < fe.n_dofs_per_cell(); ++i)
local_block_association[f][i] = fe.system_to_block_index(i).first;
Assert(std::find(local_block_association[f].begin(),
if (cell->is_locally_owned())
{
const unsigned int fe_index = cell->active_fe_index();
- const unsigned int dofs_per_cell = cell->get_fe().dofs_per_cell;
+ const unsigned int dofs_per_cell = cell->get_fe().n_dofs_per_cell();
indices.resize(dofs_per_cell);
cell->get_dof_indices(indices);
for (unsigned int i = 0; i < dofs_per_cell; ++i)
for (unsigned int present_cell = 0; cell != endc; ++cell, ++present_cell)
{
- const unsigned int dofs_per_cell = cell->get_fe().dofs_per_cell;
+ const unsigned int dofs_per_cell = cell->get_fe().n_dofs_per_cell();
dof_indices.resize(dofs_per_cell);
cell->get_dof_indices(dof_indices);
component_mask);
// Check which dofs were selected
- std::vector<bool> this_selected_dofs(fe_collection[f].dofs_per_cell);
- for (unsigned int i = 0; i < fe_collection[f].dofs_per_cell; ++i)
+ std::vector<bool> this_selected_dofs(
+ fe_collection[f].n_dofs_per_cell());
+ for (unsigned int i = 0; i < fe_collection[f].n_dofs_per_cell(); ++i)
this_selected_dofs[i] =
component_mask[local_component_association[i]];
if (c->is_locally_owned())
{
const unsigned int fe_index = c->active_fe_index();
- const unsigned int dofs_per_cell = c->get_fe().dofs_per_cell;
+ const unsigned int dofs_per_cell = c->get_fe().n_dofs_per_cell();
local_dof_indices.resize(dofs_per_cell);
c->get_dof_indices(local_dof_indices);
for (unsigned int i = 0; i < dofs_per_cell; ++i)
// whether it is something interesting or not
std::vector<unsigned char> local_component_asssociation =
internal::get_local_component_association(fe, component_mask);
- std::vector<bool> local_selected_dofs(fe.dofs_per_cell);
- for (unsigned int i = 0; i < fe.dofs_per_cell; ++i)
+ std::vector<bool> local_selected_dofs(fe.n_dofs_per_cell());
+ for (unsigned int i = 0; i < fe.n_dofs_per_cell(); ++i)
local_selected_dofs[i] = component_mask[local_component_asssociation[i]];
// then loop over all cells and do work
- std::vector<types::global_dof_index> indices(fe.dofs_per_cell);
+ std::vector<types::global_dof_index> indices(fe.n_dofs_per_cell());
typename DoFHandler<dim, spacedim>::level_cell_iterator c;
for (c = dof.begin(level); c != dof.end(level); ++c)
{
c->get_mg_dof_indices(indices);
- for (unsigned int i = 0; i < fe.dofs_per_cell; ++i)
+ for (unsigned int i = 0; i < fe.n_dofs_per_cell(); ++i)
selected_dofs[indices[i]] = local_selected_dofs[i];
}
}
(dim == 1 ?
i :
(dim == 2 ?
- (i < 2 * fe.dofs_per_vertex ?
+ (i < 2 * fe.n_dofs_per_vertex() ?
i :
- i + 2 * fe.dofs_per_vertex) :
- (dim == 3 ? (i < 4 * fe.dofs_per_vertex ?
+ i + 2 * fe.n_dofs_per_vertex()) :
+ (dim == 3 ? (i < 4 * fe.n_dofs_per_vertex() ?
i :
- (i < 4 * fe.dofs_per_vertex +
+ (i < 4 * fe.n_dofs_per_vertex() +
4 * fe.dofs_per_line ?
- i + 4 * fe.dofs_per_vertex :
- i + 4 * fe.dofs_per_vertex +
+ i + 4 * fe.n_dofs_per_vertex() :
+ i + 4 * fe.n_dofs_per_vertex() +
8 * fe.dofs_per_line)) :
numbers::invalid_unsigned_int)));
if (fe.is_primitive(cell_index))
{
const FiniteElement<dim, spacedim> &fe = cell->get_fe();
- const unsigned int dofs_per_cell = fe.dofs_per_cell;
+ const unsigned int dofs_per_cell = fe.n_dofs_per_cell();
cell_dof_indices.resize(dofs_per_cell);
cell->get_dof_indices(cell_dof_indices);
- for (unsigned int i = 0; i < fe.dofs_per_cell; ++i)
+ for (unsigned int i = 0; i < fe.n_dofs_per_cell(); ++i)
if (fe.has_support_on_face(i, face))
{
if (!check_vector_component)
for (; cell != endc; ++cell)
if (!cell->is_artificial() && predicate(cell))
{
- local_dof_indices.resize(cell->get_fe().dofs_per_cell);
+ local_dof_indices.resize(cell->get_fe().n_dofs_per_cell());
cell->get_dof_indices(local_dof_indices);
predicate_dofs.insert(local_dof_indices.begin(),
local_dof_indices.end());
continue;
}
- const unsigned int dofs_per_cell = (*it)->get_fe().dofs_per_cell;
+ const unsigned int dofs_per_cell = (*it)->get_fe().n_dofs_per_cell();
local_dof_indices.resize(dofs_per_cell);
(*it)->get_dof_indices(local_dof_indices);
dofs_with_support_on_halo_cells.insert(local_dof_indices.begin(),
spacedim>::line_iterator
line = cell->face(face);
- for (unsigned int dof = 0; dof != fe.dofs_per_vertex; ++dof)
+ for (unsigned int dof = 0; dof != fe.n_dofs_per_vertex();
+ ++dof)
selected_dofs.add_index(
line->child(0)->vertex_dof_index(1, dof));
// and subtract (in the end) all the indices which a shared
// between this face and its subfaces
for (unsigned int vertex = 0; vertex < 4; ++vertex)
- for (unsigned int dof = 0; dof != fe.dofs_per_vertex;
+ for (unsigned int dof = 0; dof != fe.n_dofs_per_vertex();
++dof)
unconstrained_dofs.add_index(
face->vertex_dof_index(vertex, dof));
for (; cell != endc; ++cell)
if (cell->subdomain_id() == subdomain_id)
{
- const unsigned int dofs_per_cell = cell->get_fe().dofs_per_cell;
+ const unsigned int dofs_per_cell = cell->get_fe().n_dofs_per_cell();
local_dof_indices.resize(dofs_per_cell);
cell->get_dof_indices(local_dof_indices);
for (unsigned int i = 0; i < dofs_per_cell; ++i)
for (; cell != endc; ++cell)
if (cell->is_locally_owned())
{
- dof_indices.resize(cell->get_fe().dofs_per_cell);
+ dof_indices.resize(cell->get_fe().n_dofs_per_cell());
cell->get_dof_indices(dof_indices);
for (const types::global_dof_index dof_index : dof_indices)
for (; cell != endc; ++cell)
if (cell->is_ghost())
{
- dof_indices.resize(cell->get_fe().dofs_per_cell);
+ dof_indices.resize(cell->get_fe().n_dofs_per_cell());
cell->get_dof_indices(dof_indices);
for (const auto dof_index : dof_indices)
if (!dof_set.is_element(dof_index))
id == numbers::artificial_subdomain_id)
continue;
- dof_indices.resize(cell->get_fe().dofs_per_cell);
+ dof_indices.resize(cell->get_fe().n_dofs_per_cell());
cell->get_mg_dof_indices(dof_indices);
for (const auto dof_index : dof_indices)
if (!dof_set.is_element(dof_index))
for (const auto &cell : dof_handler.active_cell_iterators())
if (cell->is_locally_owned())
{
- dof_indices.resize(cell->get_fe().dofs_per_cell);
+ dof_indices.resize(cell->get_fe().n_dofs_per_cell());
cell->get_dof_indices(dof_indices);
for (unsigned int i = 0; i < dof_indices.size(); ++i)
ExcMessage(
"The subdomain ID of the halo cell should not match that of the vector entry."));
- local_dof_indices.resize(cell->get_fe().dofs_per_cell);
+ local_dof_indices.resize(cell->get_fe().n_dofs_per_cell());
cell->get_dof_indices(local_dof_indices);
for (const types::global_dof_index local_dof_index :
{
const types::subdomain_id subdomain_id =
cell_owners[cell->active_cell_index()];
- const unsigned int dofs_per_cell = cell->get_fe().dofs_per_cell;
+ const unsigned int dofs_per_cell = cell->get_fe().n_dofs_per_cell();
local_dof_indices.resize(dofs_per_cell);
cell->get_dof_indices(local_dof_indices);
if ((cell->is_artificial() == false) &&
(cell->subdomain_id() == subdomain))
{
- const unsigned int dofs_per_cell = cell->get_fe().dofs_per_cell;
+ const unsigned int dofs_per_cell = cell->get_fe().n_dofs_per_cell();
local_dof_indices.resize(dofs_per_cell);
cell->get_dof_indices(local_dof_indices);
subdomain_indices.insert(subdomain_indices.end(),
const FEValues<dim, spacedim> &fe_values =
hp_fe_values.get_present_fe_values();
- local_dof_indices.resize(cell->get_fe().dofs_per_cell);
+ local_dof_indices.resize(cell->get_fe().n_dofs_per_cell());
cell->get_dof_indices(local_dof_indices);
const std::vector<Point<spacedim>> &points =
fe_values.get_quadrature_points();
- for (unsigned int i = 0; i < cell->get_fe().dofs_per_cell; ++i)
+ for (unsigned int i = 0; i < cell->get_fe().n_dofs_per_cell();
+ ++i)
{
const unsigned int dof_comp =
cell->get_fe().system_to_component_index(i).first;
++i;
block_list.reinit(i,
dof_handler.n_dofs(),
- dof_handler.get_fe().dofs_per_cell);
+ dof_handler.get_fe().n_dofs_per_cell());
i = 0;
for (cell = dof_handler.begin(level); cell != endc; ++cell)
if (cell->is_locally_owned_on_level())
{
- indices.resize(cell->get_fe().dofs_per_cell);
+ indices.resize(cell->get_fe().n_dofs_per_cell());
cell->get_mg_dof_indices(indices);
if (selected_dofs.size() != 0)
for (cell = dof_handler.begin(level); cell != endc; ++cell)
{
- indices.resize(cell->get_fe().dofs_per_cell);
+ indices.resize(cell->get_fe().n_dofs_per_cell());
cell->get_mg_dof_indices(indices);
if (interior_only)
{
// Exclude degrees of freedom on faces opposite to the vertex
- exclude.resize(fe.dofs_per_cell);
+ exclude.resize(fe.n_dofs_per_cell());
std::fill(exclude.begin(), exclude.end(), false);
const unsigned int dpf = fe.dofs_per_face;
// For hp, only this line here would have to be replaced.
const FiniteElement<dim> &fe = dof_handler.get_fe();
- const unsigned int n_dofs = fe.dofs_per_cell;
+ const unsigned int n_dofs = fe.n_dofs_per_cell();
indices.resize(n_dofs);
exclude.resize(n_dofs);
std::fill(exclude.begin(), exclude.end(), false);
for (const unsigned int v : GeometryInfo<dim>::vertex_indices())
{
const unsigned int vg = cell->vertex_index(v);
- vertex_dof_count[vg] += cell->get_fe().dofs_per_cell;
+ vertex_dof_count[vg] += cell->get_fe().n_dofs_per_cell();
++vertex_cell_count[vg];
for (unsigned int d = 0; d < dim; ++d)
{
for (cell = dof_handler.begin(level); cell != endc; ++cell)
{
const FiniteElement<dim> &fe = cell->get_fe();
- indices.resize(fe.dofs_per_cell);
+ indices.resize(fe.n_dofs_per_cell());
cell->get_mg_dof_indices(indices);
for (const unsigned int v : GeometryInfo<dim>::vertex_indices())
{
// Exclude degrees of freedom on faces opposite to the
// vertex
- exclude.resize(fe.dofs_per_cell);
+ exclude.resize(fe.n_dofs_per_cell());
std::fill(exclude.begin(), exclude.end(), false);
const unsigned int dpf = fe.dofs_per_face;
Assert(cell->is_artificial() == false,
ExcMessage("This function can not be called with cells that are "
"not either locally owned or ghost cells."));
- local_dof_indices.resize(cell->get_fe().dofs_per_cell);
+ local_dof_indices.resize(cell->get_fe().n_dofs_per_cell());
cell->get_dof_indices(local_dof_indices);
dofs_on_patch.insert(local_dof_indices.begin(),
local_dof_indices.end());
Assert(cell->is_artificial() == false,
ExcMessage("This function can not be called with cells that are "
"not either locally owned or ghost cells."));
- local_dof_indices.resize(cell->get_fe().dofs_per_cell);
+ local_dof_indices.resize(cell->get_fe().n_dofs_per_cell());
cell->get_dof_indices(local_dof_indices);
dofs_on_patch.insert(local_dof_indices.begin(),
local_dof_indices.end());
Assert(fe1.dofs_per_face >= fe2.dofs_per_face, ExcInternalError());
AssertDimension(primary_dof_mask.size(), fe1.dofs_per_face);
- Assert(fe2.dofs_per_vertex <= fe1.dofs_per_vertex, ExcInternalError());
+ Assert(fe2.n_dofs_per_vertex() <= fe1.n_dofs_per_vertex(),
+ ExcInternalError());
Assert(fe2.dofs_per_line <= fe1.dofs_per_line, ExcInternalError());
Assert((dim < 3) || (fe2.dofs_per_quad <= fe1.dofs_per_quad),
ExcInternalError());
{
unsigned int dofs_added = 0;
unsigned int i = 0;
- while (dofs_added < fe2.dofs_per_vertex)
+ while (dofs_added < fe2.n_dofs_per_vertex())
{
// make sure that we were able to find a set of primary dofs and
// that the code down below didn't just reject all our efforts
- Assert(i < fe1.dofs_per_vertex, ExcInternalError());
+ Assert(i < fe1.n_dofs_per_vertex(), ExcInternalError());
// tentatively push this vertex dof
primary_dof_list.push_back(index + i);
// forward counter by one
++i;
}
- index += fe1.dofs_per_vertex;
+ index += fe1.n_dofs_per_vertex();
}
for (int l = 0;
const unsigned int fe_index = cell->active_fe_index();
const unsigned int n_dofs_on_mother =
- 2 * fe.dofs_per_vertex + fe.dofs_per_line,
- n_dofs_on_children =
- fe.dofs_per_vertex + 2 * fe.dofs_per_line;
+ 2 * fe.n_dofs_per_vertex() +
+ fe.dofs_per_line,
+ n_dofs_on_children = fe.n_dofs_per_vertex() +
+ 2 * fe.dofs_per_line;
dofs_on_mother.resize(n_dofs_on_mother);
// we might not use all of those in case of artificial cells, so
// @p{FiniteElement::constraints()}
unsigned int next_index = 0;
for (unsigned int vertex = 0; vertex < 2; ++vertex)
- for (unsigned int dof = 0; dof != fe.dofs_per_vertex; ++dof)
+ for (unsigned int dof = 0; dof != fe.n_dofs_per_vertex();
+ ++dof)
dofs_on_mother[next_index++] =
this_face->vertex_dof_index(vertex, dof, fe_index);
for (unsigned int dof = 0; dof != fe.dofs_per_line; ++dof)
this_face->dof_index(dof, fe_index);
AssertDimension(next_index, dofs_on_mother.size());
- for (unsigned int dof = 0; dof != fe.dofs_per_vertex; ++dof)
+ for (unsigned int dof = 0; dof != fe.n_dofs_per_vertex(); ++dof)
dofs_on_children.push_back(
this_face->child(0)->vertex_dof_index(1, dof, fe_index));
for (unsigned int child = 0; child < 2; ++child)
const unsigned int n_dofs_on_mother = fe.dofs_per_face;
const unsigned int n_dofs_on_children =
- (5 * fe.dofs_per_vertex + 12 * fe.dofs_per_line +
+ (5 * fe.n_dofs_per_vertex() + 12 * fe.dofs_per_line +
4 * fe.dofs_per_quad);
// TODO[TL]: think about this and the following in case of
// @p{FiniteElement::constraints()}
unsigned int next_index = 0;
for (unsigned int vertex = 0; vertex < 4; ++vertex)
- for (unsigned int dof = 0; dof != fe.dofs_per_vertex; ++dof)
+ for (unsigned int dof = 0; dof != fe.n_dofs_per_vertex();
+ ++dof)
dofs_on_mother[next_index++] =
this_face->vertex_dof_index(vertex, dof, fe_index);
for (unsigned int line = 0; line < 4; ++line)
this_face->child(3)->vertex_index(0))),
ExcInternalError());
- for (unsigned int dof = 0; dof != fe.dofs_per_vertex; ++dof)
+ for (unsigned int dof = 0; dof != fe.n_dofs_per_vertex(); ++dof)
dofs_on_children.push_back(
this_face->child(0)->vertex_dof_index(3, dof));
// dof numbers on the centers of the lines bounding this face
for (unsigned int line = 0; line < 4; ++line)
- for (unsigned int dof = 0; dof != fe.dofs_per_vertex; ++dof)
+ for (unsigned int dof = 0; dof != fe.n_dofs_per_vertex();
+ ++dof)
dofs_on_children.push_back(
this_face->line(line)->child(0)->vertex_dof_index(
1, dof, fe_index));
// vector to hold the representation of a single degree of freedom on
// the coarse grid (for the selected fe) on the fine grid
- copy_data.dofs_per_cell = coarse_fe.dofs_per_cell;
+ copy_data.dofs_per_cell = coarse_fe.n_dofs_per_cell();
copy_data.parameter_dof_indices.resize(copy_data.dofs_per_cell);
// get the global indices of the parameter dofs on this parameter grid
unsigned int n_interesting_dofs = 0;
for (unsigned int local_dof = 0;
- local_dof < coarse_grid.get_fe().dofs_per_cell;
+ local_dof < coarse_grid.get_fe().n_dofs_per_cell();
++local_dof)
if (coarse_grid.get_fe().system_to_component_index(local_dof).first ==
coarse_component)
n_fine_dofs = fine_grid.n_dofs();
// local numbers of dofs
- const unsigned int fine_dofs_per_cell = fine_fe.dofs_per_cell;
+ const unsigned int fine_dofs_per_cell = fine_fe.n_dofs_per_cell();
// alias the number of dofs per cell belonging to the coarse_component
// which is to be the restriction of the fine grid:
coarse_fe
.base_element(
coarse_fe.component_to_base_index(coarse_component).first)
- .dofs_per_cell;
+ .n_dofs_per_cell();
// Try to find out whether the grids stem from the same coarse grid.
for (unsigned int local_coarse_dof = 0;
local_coarse_dof < coarse_dofs_per_cell_component;
++local_coarse_dof)
- for (unsigned int fine_dof = 0; fine_dof < fine_fe.dofs_per_cell;
+ for (unsigned int fine_dof = 0; fine_dof < fine_fe.n_dofs_per_cell();
++fine_dof)
if (fine_fe.system_to_component_index(fine_dof) ==
std::make_pair(fine_component, local_coarse_dof))
// this is an interesting dof. finally count how many true's there
std::vector<bool> dof_is_interesting(fine_grid.n_dofs(), false);
std::vector<types::global_dof_index> local_dof_indices(
- fine_fe.dofs_per_cell);
+ fine_fe.n_dofs_per_cell());
for (const auto &cell : fine_grid.active_cell_iterators())
if (cell->is_locally_owned())
{
cell->get_dof_indices(local_dof_indices);
- for (unsigned int i = 0; i < fine_fe.dofs_per_cell; ++i)
+ for (unsigned int i = 0; i < fine_fe.n_dofs_per_cell(); ++i)
if (fine_fe.system_to_component_index(i).first ==
fine_component)
dof_is_interesting[local_dof_indices[i]] = true;
{
std::vector<types::global_dof_index> local_dof_indices(
- fine_fe.dofs_per_cell);
+ fine_fe.n_dofs_per_cell());
unsigned int next_free_index = 0;
for (const auto &cell : fine_grid.active_cell_iterators())
if (cell->is_locally_owned())
{
cell->get_dof_indices(local_dof_indices);
- for (unsigned int i = 0; i < fine_fe.dofs_per_cell; ++i)
+ for (unsigned int i = 0; i < fine_fe.n_dofs_per_cell(); ++i)
// if this DoF is a parameter dof and has not yet been
// numbered, then do so
if ((fine_fe.system_to_component_index(i).first ==
const FiniteElement<dim, spacedim> &fe = cell->get_fe();
// get global indices of dofs on the cell
- cell_dofs.resize(fe.dofs_per_cell);
+ cell_dofs.resize(fe.n_dofs_per_cell());
cell->get_dof_indices(cell_dofs);
for (const auto face_no : cell->face_indices())
(subdomain_id == cell->subdomain_id())) &&
cell->is_locally_owned())
{
- const unsigned int dofs_per_cell = cell->get_fe().dofs_per_cell;
+ const unsigned int dofs_per_cell = cell->get_fe().n_dofs_per_cell();
dofs_on_this_cell.resize(dofs_per_cell);
cell->get_dof_indices(dofs_on_this_cell);
for (unsigned int f = 0; f < fe_collection.size(); ++f)
{
bool_dof_mask[f].reinit(
- TableIndices<2>(fe_collection[f].dofs_per_cell,
- fe_collection[f].dofs_per_cell));
+ TableIndices<2>(fe_collection[f].n_dofs_per_cell(),
+ fe_collection[f].n_dofs_per_cell()));
bool_dof_mask[f].fill(false);
- for (unsigned int i = 0; i < fe_collection[f].dofs_per_cell; ++i)
- for (unsigned int j = 0; j < fe_collection[f].dofs_per_cell; ++j)
+ for (unsigned int i = 0; i < fe_collection[f].n_dofs_per_cell(); ++i)
+ for (unsigned int j = 0; j < fe_collection[f].n_dofs_per_cell(); ++j)
if (dof_mask[f](i, j) != none)
bool_dof_mask[f](i, j) = true;
}
{
const unsigned int fe_index = cell->active_fe_index();
const unsigned int dofs_per_cell =
- fe_collection[fe_index].dofs_per_cell;
+ fe_collection[fe_index].n_dofs_per_cell();
dofs_on_this_cell.resize(dofs_per_cell);
cell->get_dof_indices(dofs_on_this_cell);
if (cell_row->is_active() && cell_col->is_active())
{
const unsigned int dofs_per_cell_row =
- cell_row->get_fe().dofs_per_cell;
+ cell_row->get_fe().n_dofs_per_cell();
const unsigned int dofs_per_cell_col =
- cell_col->get_fe().dofs_per_cell;
+ cell_col->get_fe().n_dofs_per_cell();
std::vector<types::global_dof_index> local_dof_indices_row(
dofs_per_cell_row);
std::vector<types::global_dof_index> local_dof_indices_col(
const typename DoFHandler<dim, spacedim>::cell_iterator
cell_row_child = child_cells[i];
const unsigned int dofs_per_cell_row =
- cell_row_child->get_fe().dofs_per_cell;
+ cell_row_child->get_fe().n_dofs_per_cell();
const unsigned int dofs_per_cell_col =
- cell_col->get_fe().dofs_per_cell;
+ cell_col->get_fe().n_dofs_per_cell();
std::vector<types::global_dof_index> local_dof_indices_row(
dofs_per_cell_row);
std::vector<types::global_dof_index> local_dof_indices_col(
const typename DoFHandler<dim, spacedim>::active_cell_iterator
cell_col_child = child_cells[i];
const unsigned int dofs_per_cell_row =
- cell_row->get_fe().dofs_per_cell;
+ cell_row->get_fe().n_dofs_per_cell();
const unsigned int dofs_per_cell_col =
- cell_col_child->get_fe().dofs_per_cell;
+ cell_col_child->get_fe().n_dofs_per_cell();
std::vector<types::global_dof_index> local_dof_indices_row(
dofs_per_cell_row);
std::vector<types::global_dof_index> local_dof_indices_col(
while (!cell->is_active())
cell = cell->child(direction);
- const unsigned int dofs_per_vertex = cell->get_fe().dofs_per_vertex;
+ const unsigned int dofs_per_vertex =
+ cell->get_fe().n_dofs_per_vertex();
std::vector<types::global_dof_index> boundary_dof_boundary_indices(
dofs_per_vertex);
(subdomain_id == cell->subdomain_id())) &&
cell->is_locally_owned())
{
- const unsigned int n_dofs_on_this_cell = cell->get_fe().dofs_per_cell;
+ const unsigned int n_dofs_on_this_cell =
+ cell->get_fe().n_dofs_per_cell();
dofs_on_this_cell.resize(n_dofs_on_this_cell);
cell->get_dof_indices(dofs_on_this_cell);
cell->neighbor_child_on_subface(face, sub_nr);
const unsigned int n_dofs_on_neighbor =
- sub_neighbor->get_fe().dofs_per_cell;
+ sub_neighbor->get_fe().n_dofs_per_cell();
dofs_on_other_cell.resize(n_dofs_on_neighbor);
sub_neighbor->get_dof_indices(dofs_on_other_cell);
continue;
const unsigned int n_dofs_on_neighbor =
- neighbor->get_fe().dofs_per_cell;
+ neighbor->get_fe().n_dofs_per_cell();
dofs_on_other_cell.resize(n_dofs_on_neighbor);
neighbor->get_dof_indices(dofs_on_other_cell);
ExcDimensionMismatch(component_couplings.n_cols(),
fe.n_components()));
- const unsigned int n_dofs = fe.dofs_per_cell;
+ const unsigned int n_dofs = fe.n_dofs_per_cell();
Table<2, Coupling> dof_couplings(n_dofs, n_dofs);
const FiniteElement<dim, spacedim> &fe = dof.get_fe();
std::vector<types::global_dof_index> dofs_on_this_cell(
- fe.dofs_per_cell);
+ fe.n_dofs_per_cell());
std::vector<types::global_dof_index> dofs_on_other_cell(
- fe.dofs_per_cell);
+ fe.n_dofs_per_cell());
const Table<2, Coupling>
int_dof_mask =
flux_dof_mask =
dof_couplings_from_component_couplings(fe, flux_mask);
- Table<2, bool> support_on_face(fe.dofs_per_cell,
+ Table<2, bool> support_on_face(fe.n_dofs_per_cell(),
GeometryInfo<dim>::faces_per_cell);
- for (unsigned int i = 0; i < fe.dofs_per_cell; ++i)
+ for (unsigned int i = 0; i < fe.n_dofs_per_cell(); ++i)
for (const unsigned int f : GeometryInfo<dim>::face_indices())
support_on_face(i, f) = fe.has_support_on_face(i, f);
// Convert the int_dof_mask to bool_int_dof_mask so we can pass it
// to constraints.add_entries_local_to_global()
- Table<2, bool> bool_int_dof_mask(fe.dofs_per_cell,
- fe.dofs_per_cell);
+ Table<2, bool> bool_int_dof_mask(fe.n_dofs_per_cell(),
+ fe.n_dofs_per_cell());
bool_int_dof_mask.fill(false);
- for (unsigned int i = 0; i < fe.dofs_per_cell; ++i)
- for (unsigned int j = 0; j < fe.dofs_per_cell; ++j)
+ for (unsigned int i = 0; i < fe.n_dofs_per_cell(); ++i)
+ for (unsigned int j = 0; j < fe.n_dofs_per_cell(); ++j)
if (int_dof_mask(i, j) != none)
bool_int_dof_mask(i, j) = true;
if (cell->at_boundary(face_n) && (!periodic_neighbor))
{
- for (unsigned int i = 0; i < fe.dofs_per_cell; ++i)
+ for (unsigned int i = 0; i < fe.n_dofs_per_cell();
+ ++i)
{
const bool i_non_zero_i =
support_on_face(i, face_n);
- for (unsigned int j = 0; j < fe.dofs_per_cell;
+ for (unsigned int j = 0; j < fe.n_dofs_per_cell();
++j)
{
const bool j_non_zero_i =
sub_neighbor->get_dof_indices(
dofs_on_other_cell);
- for (unsigned int i = 0; i < fe.dofs_per_cell;
+ for (unsigned int i = 0;
+ i < fe.n_dofs_per_cell();
++i)
{
const bool i_non_zero_i =
const bool i_non_zero_e =
support_on_face(i, neighbor_face_n);
for (unsigned int j = 0;
- j < fe.dofs_per_cell;
+ j < fe.n_dofs_per_cell();
++j)
{
const bool j_non_zero_i =
else
{
neighbor->get_dof_indices(dofs_on_other_cell);
- for (unsigned int i = 0; i < fe.dofs_per_cell;
+ for (unsigned int i = 0; i < fe.n_dofs_per_cell();
++i)
{
const bool i_non_zero_i =
support_on_face(i, face_n);
const bool i_non_zero_e =
support_on_face(i, neighbor_face_n);
- for (unsigned int j = 0; j < fe.dofs_per_cell;
+ for (unsigned int j = 0;
+ j < fe.n_dofs_per_cell();
++j)
{
const bool j_non_zero_i =
for (unsigned int f = 0; f < fe.size(); ++f)
{
bool_int_and_flux_dof_mask[f].reinit(
- TableIndices<2>(fe[f].dofs_per_cell, fe[f].dofs_per_cell));
+ TableIndices<2>(fe[f].n_dofs_per_cell(),
+ fe[f].n_dofs_per_cell()));
bool_int_and_flux_dof_mask[f].fill(false);
- for (unsigned int i = 0; i < fe[f].dofs_per_cell; ++i)
- for (unsigned int j = 0; j < fe[f].dofs_per_cell; ++j)
+ for (unsigned int i = 0; i < fe[f].n_dofs_per_cell(); ++i)
+ for (unsigned int j = 0; j < fe[f].n_dofs_per_cell(); ++j)
if (int_and_flux_dof_mask[f](i, j) != none)
bool_int_and_flux_dof_mask[f](i, j) = true;
}
(subdomain_id == cell->subdomain_id())) &&
cell->is_locally_owned())
{
- dofs_on_this_cell.resize(cell->get_fe().dofs_per_cell);
+ dofs_on_this_cell.resize(cell->get_fe().n_dofs_per_cell());
cell->get_dof_indices(dofs_on_this_cell);
// make sparsity pattern for this cell also taking into
sub_nr);
dofs_on_other_cell.resize(
- sub_neighbor->get_fe().dofs_per_cell);
+ sub_neighbor->get_fe().n_dofs_per_cell());
sub_neighbor->get_dof_indices(
dofs_on_other_cell);
for (unsigned int i = 0;
- i < cell->get_fe().dofs_per_cell;
+ i < cell->get_fe().n_dofs_per_cell();
++i)
{
const unsigned int ii =
ExcInternalError());
for (unsigned int j = 0;
- j <
- sub_neighbor->get_fe().dofs_per_cell;
+ j < sub_neighbor->get_fe()
+ .n_dofs_per_cell();
++j)
{
const unsigned int jj =
else
{
dofs_on_other_cell.resize(
- neighbor->get_fe().dofs_per_cell);
+ neighbor->get_fe().n_dofs_per_cell());
neighbor->get_dof_indices(dofs_on_other_cell);
for (unsigned int i = 0;
- i < cell->get_fe().dofs_per_cell;
+ i < cell->get_fe().n_dofs_per_cell();
++i)
{
const unsigned int ii =
ExcInternalError());
for (unsigned int j = 0;
- j < neighbor->get_fe().dofs_per_cell;
+ j < neighbor->get_fe().n_dofs_per_cell();
++j)
{
const unsigned int jj =
dim == 3 ? 8 : 0)
, adjust_line_dof_index_for_line_orientation_table(
dim == 3 ? this->dofs_per_line : 0)
- , system_to_base_table(this->dofs_per_cell)
+ , system_to_base_table(this->n_dofs_per_cell())
, face_system_to_base_table(this->dofs_per_face)
, component_to_base_table(this->components,
std::make_pair(std::make_pair(0U, 0U), 0U))
// Special handling of vectors of length one: in this case, we
// assume that all entries were supposed to be equal
restriction_is_additive_flags(
- r_i_a_f.size() == 1 ? std::vector<bool>(fe_data.dofs_per_cell, r_i_a_f[0]) :
- r_i_a_f)
+ r_i_a_f.size() == 1 ?
+ std::vector<bool>(fe_data.n_dofs_per_cell(), r_i_a_f[0]) :
+ r_i_a_f)
, nonzero_components(
nonzero_c.size() == 1 ?
- std::vector<ComponentMask>(fe_data.dofs_per_cell, nonzero_c[0]) :
+ std::vector<ComponentMask>(fe_data.n_dofs_per_cell(), nonzero_c[0]) :
nonzero_c)
, n_nonzero_components_table(compute_n_nonzero_components(nonzero_components))
, cached_primitivity(std::find_if(n_nonzero_components_table.begin(),
return n_components != 1U;
}) == n_nonzero_components_table.end())
{
- Assert(restriction_is_additive_flags.size() == this->dofs_per_cell,
+ Assert(restriction_is_additive_flags.size() == this->n_dofs_per_cell(),
ExcDimensionMismatch(restriction_is_additive_flags.size(),
- this->dofs_per_cell));
- AssertDimension(nonzero_components.size(), this->dofs_per_cell);
+ this->n_dofs_per_cell()));
+ AssertDimension(nonzero_components.size(), this->n_dofs_per_cell());
for (unsigned int i = 0; i < nonzero_components.size(); ++i)
{
Assert(nonzero_components[i].size() == this->n_components(),
// empty.
if (this->is_primitive())
{
- system_to_component_table.resize(this->dofs_per_cell);
+ system_to_component_table.resize(this->n_dofs_per_cell());
face_system_to_component_table.resize(this->dofs_per_face);
- for (unsigned int j = 0; j < this->dofs_per_cell; ++j)
+ for (unsigned int j = 0; j < this->n_dofs_per_cell(); ++j)
system_to_component_table[j] = std::pair<unsigned, unsigned>(0, j);
for (unsigned int j = 0; j < this->dofs_per_face; ++j)
face_system_to_component_table[j] = std::pair<unsigned, unsigned>(0, j);
}
- for (unsigned int j = 0; j < this->dofs_per_cell; ++j)
+ for (unsigned int j = 0; j < this->n_dofs_per_cell(); ++j)
system_to_base_table[j] = std::make_pair(std::make_pair(0U, 0U), j);
for (unsigned int j = 0; j < this->dofs_per_face; ++j)
face_system_to_base_table[j] = std::make_pair(std::make_pair(0U, 0U), j);
for (unsigned int i = 0; i < nc; ++i)
{
- if (this->restriction[ref_case - 1][i].m() != this->dofs_per_cell &&
+ if (this->restriction[ref_case - 1][i].m() !=
+ this->n_dofs_per_cell() &&
(!isotropic_restriction_only ||
ref_case == RefinementCase<dim>::isotropic_refinement))
- this->restriction[ref_case - 1][i].reinit(this->dofs_per_cell,
- this->dofs_per_cell);
- if (this->prolongation[ref_case - 1][i].m() != this->dofs_per_cell &&
+ this->restriction[ref_case - 1][i].reinit(this->n_dofs_per_cell(),
+ this->n_dofs_per_cell());
+ if (this->prolongation[ref_case - 1][i].m() !=
+ this->n_dofs_per_cell() &&
(!isotropic_prolongation_only ||
ref_case == RefinementCase<dim>::isotropic_refinement))
- this->prolongation[ref_case - 1][i].reinit(this->dofs_per_cell,
- this->dofs_per_cell);
+ this->prolongation[ref_case - 1][i].reinit(this->n_dofs_per_cell(),
+ this->n_dofs_per_cell());
}
}
}
// we use refinement_case-1 here. the -1 takes care of the origin of the
// vector, as for RefinementCase<dim>::no_refinement (=0) there is no data
// available and so the vector indices are shifted
- Assert(restriction[refinement_case - 1][child].n() == this->dofs_per_cell,
+ Assert(restriction[refinement_case - 1][child].n() == this->n_dofs_per_cell(),
ExcProjectionVoid());
return restriction[refinement_case - 1][child];
}
// RefinementCase::no_refinement (=0) there is no
// data available and so the vector indices
// are shifted
- Assert(prolongation[refinement_case - 1][child].n() == this->dofs_per_cell,
+ Assert(prolongation[refinement_case - 1][child].n() ==
+ this->n_dofs_per_cell(),
ExcEmbeddingVoid());
return prolongation[refinement_case - 1][child];
}
{
// get the number of the vertex on the face that corresponds to this DoF,
// along with the number of the DoF on this vertex
- const unsigned int face_vertex = face_index / this->dofs_per_vertex;
+ const unsigned int face_vertex = face_index / this->n_dofs_per_vertex();
const unsigned int dof_index_on_vertex =
- face_index % this->dofs_per_vertex;
+ face_index % this->n_dofs_per_vertex();
// then get the number of this vertex on the cell and translate
// this to a DoF number on the cell
return (GeometryInfo<dim>::face_to_cell_vertices(
face, face_vertex, face_orientation, face_flip, face_rotation) *
- this->dofs_per_vertex +
+ this->n_dofs_per_vertex() +
dof_index_on_vertex);
}
else if (face_index < this->first_face_quad_index)
{
// make sure also the lazily initialized matrices are created
get_prolongation_matrix(c, RefinementCase<dim>(ref_case));
- Assert((prolongation[ref_case - 1][c].m() == this->dofs_per_cell) ||
+ Assert((prolongation[ref_case - 1][c].m() == this->n_dofs_per_cell()) ||
(prolongation[ref_case - 1][c].m() == 0),
ExcInternalError());
- Assert((prolongation[ref_case - 1][c].n() == this->dofs_per_cell) ||
+ Assert((prolongation[ref_case - 1][c].n() == this->n_dofs_per_cell()) ||
(prolongation[ref_case - 1][c].n() == 0),
ExcInternalError());
if ((prolongation[ref_case - 1][c].m() == 0) ||
{
// make sure also the lazily initialized matrices are created
get_restriction_matrix(c, RefinementCase<dim>(ref_case));
- Assert((restriction[ref_case - 1][c].m() == this->dofs_per_cell) ||
+ Assert((restriction[ref_case - 1][c].m() == this->n_dofs_per_cell()) ||
(restriction[ref_case - 1][c].m() == 0),
ExcInternalError());
- Assert((restriction[ref_case - 1][c].n() == this->dofs_per_cell) ||
+ Assert((restriction[ref_case - 1][c].n() == this->n_dofs_per_cell()) ||
(restriction[ref_case - 1][c].n() == 0),
ExcInternalError());
if ((restriction[ref_case - 1][c].m() == 0) ||
{
// make sure also the lazily initialized matrices are created
get_prolongation_matrix(c, RefinementCase<dim>(ref_case));
- Assert((prolongation[ref_case - 1][c].m() == this->dofs_per_cell) ||
+ Assert((prolongation[ref_case - 1][c].m() == this->n_dofs_per_cell()) ||
(prolongation[ref_case - 1][c].m() == 0),
ExcInternalError());
- Assert((prolongation[ref_case - 1][c].n() == this->dofs_per_cell) ||
+ Assert((prolongation[ref_case - 1][c].n() == this->n_dofs_per_cell()) ||
(prolongation[ref_case - 1][c].n() == 0),
ExcInternalError());
if ((prolongation[ref_case - 1][c].m() == 0) ||
{
// make sure also the lazily initialized matrices are created
get_restriction_matrix(c, RefinementCase<dim>(ref_case));
- Assert((restriction[ref_case - 1][c].m() == this->dofs_per_cell) ||
+ Assert((restriction[ref_case - 1][c].m() == this->n_dofs_per_cell()) ||
(restriction[ref_case - 1][c].m() == 0),
ExcInternalError());
- Assert((restriction[ref_case - 1][c].n() == this->dofs_per_cell) ||
+ Assert((restriction[ref_case - 1][c].n() == this->n_dofs_per_cell()) ||
(restriction[ref_case - 1][c].n() == 0),
ExcInternalError());
if ((restriction[ref_case - 1][c].m() == 0) ||
case 1:
return {0U, 0U};
case 2:
- return {this->dofs_per_vertex + 2 * this->dofs_per_line,
+ return {this->n_dofs_per_vertex() + 2 * this->dofs_per_line,
this->dofs_per_face};
case 3:
- return {5 * this->dofs_per_vertex + 12 * this->dofs_per_line +
+ return {5 * this->n_dofs_per_vertex() + 12 * this->dofs_per_line +
4 * this->dofs_per_quad,
this->dofs_per_face};
default:
// there are as many as there are
// degrees of freedom
Assert((unit_support_points.size() == 0) ||
- (unit_support_points.size() == this->dofs_per_cell),
+ (unit_support_points.size() == this->n_dofs_per_cell()),
ExcInternalError());
return unit_support_points;
}
Point<dim>
FiniteElement<dim, spacedim>::unit_support_point(const unsigned int index) const
{
- AssertIndexRange(index, this->dofs_per_cell);
- Assert(unit_support_points.size() == this->dofs_per_cell,
+ AssertIndexRange(index, this->n_dofs_per_cell());
+ Assert(unit_support_points.size() == this->n_dofs_per_cell(),
ExcFEHasNoSupportPoints());
return unit_support_points[index];
}
{
Assert(false, ExcNotImplemented());
return std::pair<Table<2, bool>, std::vector<unsigned int>>(
- Table<2, bool>(this->n_components(), this->dofs_per_cell),
+ Table<2, bool>(this->n_components(), this->n_dofs_per_cell()),
std::vector<unsigned int>(this->n_components()));
}
, rt_order(deg)
{
Assert(dim >= 2, ExcImpossibleInDim(dim));
- const unsigned int n_dofs = this->dofs_per_cell;
+ const unsigned int n_dofs = this->n_dofs_per_cell();
this->mapping_kind = {mapping_raviart_thomas};
// First, initialize the
// Store shape values, since the
// evaluation suffers if not
// ordered by point
- Table<2, double> cached_values_face(this->dofs_per_cell, q_face.size());
+ Table<2, double> cached_values_face(this->n_dofs_per_cell(),
+ q_face.size());
for (unsigned int k = 0; k < q_face.size(); ++k)
- for (unsigned int i = 0; i < this->dofs_per_cell; ++i)
+ for (unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
cached_values_face(i, k) = this->shape_value_component(
i, q_face.point(k), GeometryInfo<dim>::unit_normal_direction[face]);
// corresponding shape
// functions.
for (unsigned int k = 0; k < n_face_points; ++k)
- for (unsigned int i_child = 0; i_child < this->dofs_per_cell;
+ for (unsigned int i_child = 0; i_child < this->n_dofs_per_cell();
++i_child)
for (unsigned int i_face = 0; i_face < this->dofs_per_face;
++i_face)
// Store shape values, since the
// evaluation suffers if not
// ordered by point
- Table<3, double> cached_values_cell(this->dofs_per_cell, q_cell.size(), dim);
+ Table<3, double> cached_values_cell(this->n_dofs_per_cell(),
+ q_cell.size(),
+ dim);
for (unsigned int k = 0; k < q_cell.size(); ++k)
- for (unsigned int i = 0; i < this->dofs_per_cell; ++i)
+ for (unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
for (unsigned int d = 0; d < dim; ++d)
cached_values_cell(i, k, d) =
this->shape_value_component(i, q_cell.point(k), d);
Quadrature<dim> q_sub = QProjector<dim>::project_to_child(q_cell, child);
for (unsigned int k = 0; k < q_sub.size(); ++k)
- for (unsigned int i_child = 0; i_child < this->dofs_per_cell; ++i_child)
+ for (unsigned int i_child = 0; i_child < this->n_dofs_per_cell();
+ ++i_child)
for (unsigned int d = 0; d < dim; ++d)
for (unsigned int i_weight = 0; i_weight < polynomials[d]->n();
++i_weight)
FE_ABF<dim>::has_support_on_face(const unsigned int shape_index,
const unsigned int face_index) const
{
- AssertIndexRange(shape_index, this->dofs_per_cell);
+ AssertIndexRange(shape_index, this->n_dofs_per_cell());
AssertIndexRange(face_index, GeometryInfo<dim>::faces_per_cell);
// Return computed values if we
Assert(support_point_values[0].size() == this->n_components(),
ExcDimensionMismatch(support_point_values[0].size(),
this->n_components()));
- Assert(nodal_values.size() == this->dofs_per_cell,
- ExcDimensionMismatch(nodal_values.size(), this->dofs_per_cell));
+ Assert(nodal_values.size() == this->n_dofs_per_cell(),
+ ExcDimensionMismatch(nodal_values.size(), this->n_dofs_per_cell()));
std::fill(nodal_values.begin(), nodal_values.end(), 0.);
ExcMessage(
"Lowest order BDM element are degree 1, but you asked for degree 0"));
- const unsigned int n_dofs = this->dofs_per_cell;
+ const unsigned int n_dofs = this->n_dofs_per_cell();
this->mapping_kind = {mapping_bdm};
// These must be done first, since
ExcDimensionMismatch(support_point_values.size(),
this->generalized_support_points.size()));
AssertDimension(support_point_values[0].size(), dim);
- Assert(nodal_values.size() == this->dofs_per_cell,
- ExcDimensionMismatch(nodal_values.size(), this->dofs_per_cell));
+ Assert(nodal_values.size() == this->n_dofs_per_cell(),
+ ExcDimensionMismatch(nodal_values.size(), this->n_dofs_per_cell()));
// First do interpolation on faces. There, the component evaluated
// depends on the face direction and orientation.
test_values_cell.size());
// Done for BDM1
- if (dbase == this->dofs_per_cell)
+ if (dbase == this->n_dofs_per_cell())
return;
// What's missing are the interior
// degrees of freedom. In each
// point, we take all components of
// the solution.
- Assert((this->dofs_per_cell - dbase) % dim == 0, ExcInternalError());
+ Assert((this->n_dofs_per_cell() - dbase) % dim == 0, ExcInternalError());
for (unsigned int d = 0; d < dim; ++d, dbase += test_values_cell[0].size())
{
}
}
- Assert(dbase == this->dofs_per_cell, ExcInternalError());
+ Assert(dbase == this->n_dofs_per_cell(), ExcInternalError());
}
Assert(dim == 2 || dim == 3, ExcImpossibleInDim(dim));
Assert(p == 1, ExcMessage("Only BR1 elements are available"));
- // const unsigned int n_dofs = this->dofs_per_cell;
+ // const unsigned int n_dofs = this->n_dofs_per_cell();
this->mapping_kind = {mapping_none};
// These must be done first, since
ExcDimensionMismatch(support_point_values.size(),
this->generalized_support_points.size()));
AssertDimension(support_point_values[0].size(), dim);
- Assert(nodal_values.size() == this->dofs_per_cell,
- ExcDimensionMismatch(nodal_values.size(), this->dofs_per_cell));
+ Assert(nodal_values.size() == this->n_dofs_per_cell(),
+ ExcDimensionMismatch(nodal_values.size(), this->n_dofs_per_cell()));
std::vector<Tensor<1, dim>> normals;
for (unsigned int i : GeometryInfo<dim>::face_indices())
{
// The support points for our shape functions are the vertices and
// the face midpoints, for a total of #vertices + #faces points
- this->generalized_support_points.resize(this->dofs_per_cell);
+ this->generalized_support_points.resize(this->n_dofs_per_cell());
// We need dim copies of each vertex for the first dim*vertices_per_cell
// generalized support points
degree,
FiniteElementData<dim>::L2),
std::vector<bool>(
- FiniteElementData<dim>(get_dpo_vector(degree), 1, degree).dofs_per_cell,
+ FiniteElementData<dim>(get_dpo_vector(degree), 1, degree)
+ .n_dofs_per_cell(),
true),
std::vector<ComponentMask>(
- FiniteElementData<dim>(get_dpo_vector(degree), 1, degree).dofs_per_cell,
+ FiniteElementData<dim>(get_dpo_vector(degree), 1, degree)
+ .n_dofs_per_cell(),
std::vector<bool>(1, true)))
{
// Reinit the vectors of restriction and prolongation matrices to the right
std::pair<Table<2, bool>, std::vector<unsigned int>>
FE_DGP<dim, spacedim>::get_constant_modes() const
{
- Table<2, bool> constant_modes(1, this->dofs_per_cell);
+ Table<2, bool> constant_modes(1, this->n_dofs_per_cell());
constant_modes(0, 0) = true;
return std::pair<Table<2, bool>, std::vector<unsigned int>>(
constant_modes, std::vector<unsigned int>(1, 0));
template <int dim>
FE_DGPMonomial<dim>::FE_DGPMonomial(const unsigned int degree)
- : FE_Poly<dim>(
- PolynomialsP<dim>(degree),
- FiniteElementData<dim>(get_dpo_vector(degree),
- 1,
- degree,
- FiniteElementData<dim>::L2),
- std::vector<bool>(
- FiniteElementData<dim>(get_dpo_vector(degree), 1, degree).dofs_per_cell,
- true),
- std::vector<ComponentMask>(
- FiniteElementData<dim>(get_dpo_vector(degree), 1, degree).dofs_per_cell,
- std::vector<bool>(1, true)))
+ : FE_Poly<dim>(PolynomialsP<dim>(degree),
+ FiniteElementData<dim>(get_dpo_vector(degree),
+ 1,
+ degree,
+ FiniteElementData<dim>::L2),
+ std::vector<bool>(
+ FiniteElementData<dim>(get_dpo_vector(degree), 1, degree)
+ .n_dofs_per_cell(),
+ true),
+ std::vector<ComponentMask>(
+ FiniteElementData<dim>(get_dpo_vector(degree), 1, degree)
+ .n_dofs_per_cell(),
+ std::vector<bool>(1, true)))
{
- Assert(this->poly_space->n() == this->dofs_per_cell, ExcInternalError());
+ Assert(this->poly_space->n() == this->n_dofs_per_cell(), ExcInternalError());
Assert(this->poly_space->degree() == this->degree, ExcInternalError());
// DG doesn't have constraints, so
const unsigned int n = interpolation_matrix.n();
(void)m;
(void)n;
- Assert(m == this->dofs_per_cell,
- ExcDimensionMismatch(m, this->dofs_per_cell));
- Assert(n == source_dgp_monomial->dofs_per_cell,
- ExcDimensionMismatch(n, source_dgp_monomial->dofs_per_cell));
+ Assert(m == this->n_dofs_per_cell(),
+ ExcDimensionMismatch(m, this->n_dofs_per_cell()));
+ Assert(n == source_dgp_monomial->n_dofs_per_cell(),
+ ExcDimensionMismatch(n, source_dgp_monomial->n_dofs_per_cell()));
const unsigned int min_mn =
interpolation_matrix.m() < interpolation_matrix.n() ?
}
else
{
- std::vector<Point<dim>> unit_points(this->dofs_per_cell);
+ std::vector<Point<dim>> unit_points(this->n_dofs_per_cell());
internal::FE_DGPMonomial::generate_unit_points(this->degree, unit_points);
FullMatrix<double> source_fe_matrix(unit_points.size(),
- source_fe.dofs_per_cell);
- for (unsigned int j = 0; j < source_fe.dofs_per_cell; ++j)
+ source_fe.n_dofs_per_cell());
+ for (unsigned int j = 0; j < source_fe.n_dofs_per_cell(); ++j)
for (unsigned int k = 0; k < unit_points.size(); ++k)
source_fe_matrix(k, j) = source_fe.shape_value(j, unit_points[k]);
- FullMatrix<double> this_matrix(this->dofs_per_cell, this->dofs_per_cell);
- for (unsigned int j = 0; j < this->dofs_per_cell; ++j)
+ FullMatrix<double> this_matrix(this->n_dofs_per_cell(),
+ this->n_dofs_per_cell());
+ for (unsigned int j = 0; j < this->n_dofs_per_cell(); ++j)
for (unsigned int k = 0; k < unit_points.size(); ++k)
this_matrix(k, j) =
this->poly_space->compute_value(j, unit_points[k]);
degree,
FiniteElementData<dim>::L2),
std::vector<bool>(
- FiniteElementData<dim>(get_dpo_vector(degree), 1, degree).dofs_per_cell,
+ FiniteElementData<dim>(get_dpo_vector(degree), 1, degree)
+ .n_dofs_per_cell(),
true),
std::vector<ComponentMask>(
- FiniteElementData<dim>(get_dpo_vector(degree), 1, degree).dofs_per_cell,
+ FiniteElementData<dim>(get_dpo_vector(degree), 1, degree)
+ .n_dofs_per_cell(),
std::vector<bool>(1, true)))
, polynomial_space(Polynomials::Legendre::generate_complete_basis(degree))
{
- const unsigned int n_dofs = this->dofs_per_cell;
+ const unsigned int n_dofs = this->n_dofs_per_cell();
for (unsigned int ref_case = RefinementCase<dim>::cut_x;
ref_case < RefinementCase<dim>::isotropic_refinement + 1;
++ref_case)
{
(void)i;
(void)p;
- AssertIndexRange(i, this->dofs_per_cell);
+ AssertIndexRange(i, this->n_dofs_per_cell());
AssertThrow(false,
(typename FiniteElement<dim>::ExcUnitShapeValuesDoNotExist()));
return 0;
(void)i;
(void)p;
(void)component;
- AssertIndexRange(i, this->dofs_per_cell);
+ AssertIndexRange(i, this->n_dofs_per_cell());
AssertIndexRange(component, 1);
AssertThrow(false,
(typename FiniteElement<dim>::ExcUnitShapeValuesDoNotExist()));
{
(void)i;
(void)p;
- AssertIndexRange(i, this->dofs_per_cell);
+ AssertIndexRange(i, this->n_dofs_per_cell());
AssertThrow(false,
(typename FiniteElement<dim>::ExcUnitShapeValuesDoNotExist()));
return Tensor<1, dim>();
(void)i;
(void)p;
(void)component;
- AssertIndexRange(i, this->dofs_per_cell);
+ AssertIndexRange(i, this->n_dofs_per_cell());
AssertIndexRange(component, 1);
AssertThrow(false,
(typename FiniteElement<dim>::ExcUnitShapeValuesDoNotExist()));
{
(void)i;
(void)p;
- AssertIndexRange(i, this->dofs_per_cell);
+ AssertIndexRange(i, this->n_dofs_per_cell());
AssertThrow(false,
(typename FiniteElement<dim>::ExcUnitShapeValuesDoNotExist()));
return Tensor<2, dim>();
(void)i;
(void)p;
(void)component;
- AssertIndexRange(i, this->dofs_per_cell);
+ AssertIndexRange(i, this->n_dofs_per_cell());
AssertIndexRange(component, 1);
AssertThrow(false,
(typename FiniteElement<dim>::ExcUnitShapeValuesDoNotExist()));
const unsigned int n_q_points = mapping_data.quadrature_points.size();
std::vector<double> values(
- (fe_internal.update_each & update_values) ? this->dofs_per_cell : 0);
+ (fe_internal.update_each & update_values) ? this->n_dofs_per_cell() : 0);
std::vector<Tensor<1, dim>> grads(
- (fe_internal.update_each & update_gradients) ? this->dofs_per_cell : 0);
+ (fe_internal.update_each & update_gradients) ? this->n_dofs_per_cell() : 0);
std::vector<Tensor<2, dim>> grad_grads(
- (fe_internal.update_each & update_hessians) ? this->dofs_per_cell : 0);
+ (fe_internal.update_each & update_hessians) ? this->n_dofs_per_cell() : 0);
std::vector<Tensor<3, dim>> empty_vector_of_3rd_order_tensors;
std::vector<Tensor<4, dim>> empty_vector_of_4th_order_tensors;
empty_vector_of_4th_order_tensors);
if (fe_internal.update_each & update_values)
- for (unsigned int k = 0; k < this->dofs_per_cell; ++k)
+ for (unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
output_data.shape_values[k][i] = values[k];
if (fe_internal.update_each & update_gradients)
- for (unsigned int k = 0; k < this->dofs_per_cell; ++k)
+ for (unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
output_data.shape_gradients[k][i] = grads[k];
if (fe_internal.update_each & update_hessians)
- for (unsigned int k = 0; k < this->dofs_per_cell; ++k)
+ for (unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
output_data.shape_hessians[k][i] = grad_grads[k];
}
}
const unsigned int n_q_points = mapping_data.quadrature_points.size();
std::vector<double> values(
- (fe_internal.update_each & update_values) ? this->dofs_per_cell : 0);
+ (fe_internal.update_each & update_values) ? this->n_dofs_per_cell() : 0);
std::vector<Tensor<1, dim>> grads(
- (fe_internal.update_each & update_gradients) ? this->dofs_per_cell : 0);
+ (fe_internal.update_each & update_gradients) ? this->n_dofs_per_cell() : 0);
std::vector<Tensor<2, dim>> grad_grads(
- (fe_internal.update_each & update_hessians) ? this->dofs_per_cell : 0);
+ (fe_internal.update_each & update_hessians) ? this->n_dofs_per_cell() : 0);
std::vector<Tensor<3, dim>> empty_vector_of_3rd_order_tensors;
std::vector<Tensor<4, dim>> empty_vector_of_4th_order_tensors;
empty_vector_of_4th_order_tensors);
if (fe_internal.update_each & update_values)
- for (unsigned int k = 0; k < this->dofs_per_cell; ++k)
+ for (unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
output_data.shape_values[k][i] = values[k];
if (fe_internal.update_each & update_gradients)
- for (unsigned int k = 0; k < this->dofs_per_cell; ++k)
+ for (unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
output_data.shape_gradients[k][i] = grads[k];
if (fe_internal.update_each & update_hessians)
- for (unsigned int k = 0; k < this->dofs_per_cell; ++k)
+ for (unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
output_data.shape_hessians[k][i] = grad_grads[k];
}
}
const unsigned int n_q_points = mapping_data.quadrature_points.size();
std::vector<double> values(
- (fe_internal.update_each & update_values) ? this->dofs_per_cell : 0);
+ (fe_internal.update_each & update_values) ? this->n_dofs_per_cell() : 0);
std::vector<Tensor<1, dim>> grads(
- (fe_internal.update_each & update_gradients) ? this->dofs_per_cell : 0);
+ (fe_internal.update_each & update_gradients) ? this->n_dofs_per_cell() : 0);
std::vector<Tensor<2, dim>> grad_grads(
- (fe_internal.update_each & update_hessians) ? this->dofs_per_cell : 0);
+ (fe_internal.update_each & update_hessians) ? this->n_dofs_per_cell() : 0);
std::vector<Tensor<3, dim>> empty_vector_of_3rd_order_tensors;
std::vector<Tensor<4, dim>> empty_vector_of_4th_order_tensors;
empty_vector_of_4th_order_tensors);
if (fe_internal.update_each & update_values)
- for (unsigned int k = 0; k < this->dofs_per_cell; ++k)
+ for (unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
output_data.shape_values[k][i] = values[k];
if (fe_internal.update_each & update_gradients)
- for (unsigned int k = 0; k < this->dofs_per_cell; ++k)
+ for (unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
output_data.shape_gradients[k][i] = grads[k];
if (fe_internal.update_each & update_hessians)
- for (unsigned int k = 0; k < this->dofs_per_cell; ++k)
+ for (unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
output_data.shape_hessians[k][i] = grad_grads[k];
}
}
degree,
FiniteElementData<dim>::L2),
std::vector<bool>(
- FiniteElementData<dim>(get_dpo_vector(degree), 1, degree).dofs_per_cell,
+ FiniteElementData<dim>(get_dpo_vector(degree), 1, degree)
+ .n_dofs_per_cell(),
true),
std::vector<ComponentMask>(
- FiniteElementData<dim>(get_dpo_vector(degree), 1, degree).dofs_per_cell,
+ FiniteElementData<dim>(get_dpo_vector(degree), 1, degree)
+ .n_dofs_per_cell(),
std::vector<bool>(1, true)))
{
// Compute support points, which are the tensor product of the Lagrange
polynomials.size() - 1),
1,
polynomials.size() - 1)
- .dofs_per_cell,
+ .n_dofs_per_cell(),
true),
std::vector<ComponentMask>(
FiniteElementData<dim>(get_dpo_vector(polynomials.size() - 1),
1,
polynomials.size() - 1)
- .dofs_per_cell,
+ .n_dofs_per_cell(),
std::vector<bool>(1, true)))
{
// No support points can be defined in general. Derived classes might define
AssertDimension(support_point_values.size(),
this->get_unit_support_points().size());
AssertDimension(support_point_values.size(), nodal_values.size());
- AssertDimension(this->dofs_per_cell, nodal_values.size());
+ AssertDimension(this->n_dofs_per_cell(), nodal_values.size());
- for (unsigned int i = 0; i < this->dofs_per_cell; ++i)
+ for (unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
{
AssertDimension(support_point_values[i].size(), 1);
const FE_DGQ<dim, spacedim> &source_fe =
dynamic_cast<const FE_DGQ<dim, spacedim> &>(x_source_fe);
- Assert(interpolation_matrix.m() == this->dofs_per_cell,
- ExcDimensionMismatch(interpolation_matrix.m(), this->dofs_per_cell));
- Assert(interpolation_matrix.n() == source_fe.dofs_per_cell,
+ Assert(interpolation_matrix.m() == this->n_dofs_per_cell(),
+ ExcDimensionMismatch(interpolation_matrix.m(),
+ this->n_dofs_per_cell()));
+ Assert(interpolation_matrix.n() == source_fe.n_dofs_per_cell(),
ExcDimensionMismatch(interpolation_matrix.n(),
- source_fe.dofs_per_cell));
+ source_fe.n_dofs_per_cell()));
// compute the interpolation
// matrices in much the same way as
// we do for the embedding matrices
// from mother to child.
- FullMatrix<double> cell_interpolation(this->dofs_per_cell,
- this->dofs_per_cell);
- FullMatrix<double> source_interpolation(this->dofs_per_cell,
- source_fe.dofs_per_cell);
- FullMatrix<double> tmp(this->dofs_per_cell, source_fe.dofs_per_cell);
- for (unsigned int j = 0; j < this->dofs_per_cell; ++j)
+ FullMatrix<double> cell_interpolation(this->n_dofs_per_cell(),
+ this->n_dofs_per_cell());
+ FullMatrix<double> source_interpolation(this->n_dofs_per_cell(),
+ source_fe.n_dofs_per_cell());
+ FullMatrix<double> tmp(this->n_dofs_per_cell(), source_fe.n_dofs_per_cell());
+ for (unsigned int j = 0; j < this->n_dofs_per_cell(); ++j)
{
// generate a point on this
// cell and evaluate the
// shape functions there
const Point<dim> p = this->unit_support_points[j];
- for (unsigned int i = 0; i < this->dofs_per_cell; ++i)
+ for (unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
cell_interpolation(j, i) = this->poly_space->compute_value(i, p);
- for (unsigned int i = 0; i < source_fe.dofs_per_cell; ++i)
+ for (unsigned int i = 0; i < source_fe.n_dofs_per_cell(); ++i)
source_interpolation(j, i) = source_fe.poly_space->compute_value(i, p);
}
cell_interpolation.mmult(interpolation_matrix, source_interpolation);
// cut off very small values
- for (unsigned int i = 0; i < this->dofs_per_cell; ++i)
- for (unsigned int j = 0; j < source_fe.dofs_per_cell; ++j)
+ for (unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
+ for (unsigned int j = 0; j < source_fe.n_dofs_per_cell(); ++j)
if (std::fabs(interpolation_matrix(i, j)) < 1e-15)
interpolation_matrix(i, j) = 0.;
// this point. this must be so
// since the shape functions sum up
// to 1
- for (unsigned int i = 0; i < this->dofs_per_cell; ++i)
+ for (unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
{
double sum = 0.;
- for (unsigned int j = 0; j < source_fe.dofs_per_cell; ++j)
+ for (unsigned int j = 0; j < source_fe.n_dofs_per_cell(); ++j)
sum += interpolation_matrix(i, j);
Assert(std::fabs(sum - 1) < 5e-14 * std::max(this->degree, 1U) * dim,
// if matrix got updated while waiting for the lock
if (this->prolongation[refinement_case - 1][child].n() ==
- this->dofs_per_cell)
+ this->n_dofs_per_cell())
return this->prolongation[refinement_case - 1][child];
// now do the work. need to get a non-const version of data in order to
RefinementCase<dim>::isotropic_refinement);
isotropic_matrices.back().resize(
GeometryInfo<dim>::n_children(RefinementCase<dim>(refinement_case)),
- FullMatrix<double>(this->dofs_per_cell, this->dofs_per_cell));
+ FullMatrix<double>(this->n_dofs_per_cell(),
+ this->n_dofs_per_cell()));
if (dim == spacedim)
FETools::compute_embedding_matrices(*this,
isotropic_matrices,
// if matrix got updated while waiting for the lock...
if (this->restriction[refinement_case - 1][child].n() ==
- this->dofs_per_cell)
+ this->n_dofs_per_cell())
return this->restriction[refinement_case - 1][child];
// now do the work. need to get a non-const version of data in order to
RefinementCase<dim>::isotropic_refinement);
isotropic_matrices.back().resize(
GeometryInfo<dim>::n_children(RefinementCase<dim>(refinement_case)),
- FullMatrix<double>(this->dofs_per_cell, this->dofs_per_cell));
+ FullMatrix<double>(this->n_dofs_per_cell(),
+ this->n_dofs_per_cell()));
if (dim == spacedim)
FETools::compute_projection_matrices(*this,
isotropic_matrices,
FE_DGQ<dim, spacedim>::has_support_on_face(const unsigned int shape_index,
const unsigned int face_index) const
{
- AssertIndexRange(shape_index, this->dofs_per_cell);
+ AssertIndexRange(shape_index, this->n_dofs_per_cell());
AssertIndexRange(face_index, GeometryInfo<dim>::faces_per_cell);
unsigned int n = this->degree + 1;
return true;
if (face_index == 2 && shape_index < n)
return true;
- if (face_index == 3 && shape_index >= this->dofs_per_cell - n)
+ if (face_index == 3 && shape_index >= this->n_dofs_per_cell() - n)
return true;
return false;
}
if (face_index == 4 && shape_index < n2)
return true;
// z=1
- if (face_index == 5 && shape_index >= this->dofs_per_cell - n2)
+ if (face_index == 5 && shape_index >= this->n_dofs_per_cell() - n2)
return true;
return false;
}
std::pair<Table<2, bool>, std::vector<unsigned int>>
FE_DGQ<dim, spacedim>::get_constant_modes() const
{
- Table<2, bool> constant_modes(1, this->dofs_per_cell);
+ Table<2, bool> constant_modes(1, this->n_dofs_per_cell());
constant_modes.fill(true);
return std::pair<Table<2, bool>, std::vector<unsigned int>>(
constant_modes, std::vector<unsigned int>(1, 0));
AssertDimension(support_point_values.size(),
this->get_unit_support_points().size());
AssertDimension(support_point_values.size(), nodal_values.size());
- AssertDimension(this->dofs_per_cell, nodal_values.size());
+ AssertDimension(this->n_dofs_per_cell(), nodal_values.size());
- for (unsigned int i = 0; i < this->dofs_per_cell; ++i)
+ for (unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
{
AssertDimension(support_point_values[i].size(), 1);
{
// Legendre represents a constant function by one in the first basis
// function and zero in all others
- Table<2, bool> constant_modes(1, this->dofs_per_cell);
+ Table<2, bool> constant_modes(1, this->n_dofs_per_cell());
constant_modes(0, 0) = true;
return std::pair<Table<2, bool>, std::vector<unsigned int>>(
constant_modes, std::vector<unsigned int>(1, 0));
this->n_base_elements()));
// build the map: (base_no, base_m) -> vector of local element DoFs
- for (unsigned int system_index = 0; system_index < this->dofs_per_cell;
+ for (unsigned int system_index = 0; system_index < this->n_dofs_per_cell();
++system_index)
{
const unsigned int base_no =
m < base_no_mult_local_enriched_dofs[base_no].size();
m++)
Assert(base_no_mult_local_enriched_dofs[base_no][m].size() ==
- fes[base_no]->dofs_per_cell,
+ fes[base_no]->n_dofs_per_cell(),
ExcDimensionMismatch(
base_no_mult_local_enriched_dofs[base_no][m].size(),
- fes[base_no]->dofs_per_cell));
+ fes[base_no]->n_dofs_per_cell()));
}
}
{
// If the system is not primitive, these have not been initialized by
// FiniteElement
- this->system_to_component_table.resize(this->dofs_per_cell);
+ this->system_to_component_table.resize(this->n_dofs_per_cell());
this->face_system_to_component_table.resize(this->dofs_per_face);
FETools::Compositing::build_cell_tables(this->system_to_base_table,
const UpdateFlags base_flags = base_fe_data.update_each;
- for (unsigned int system_index = 0; system_index < this->dofs_per_cell;
+ for (unsigned int system_index = 0;
+ system_index < this->n_dofs_per_cell();
++system_index)
if (this->system_to_base_table[system_index].first.first == base_no)
{
const unsigned int base_index =
this->system_to_base_table[system_index].second;
- Assert(base_index < base_fe.dofs_per_cell, ExcInternalError());
+ Assert(base_index < base_fe.n_dofs_per_cell(),
+ ExcInternalError());
// now copy. if the shape function is primitive, then there
// is only one value to be copied, but for non-primitive
std::pair<Table<2, bool>, std::vector<unsigned int>>
FE_FaceQ<dim, spacedim>::get_constant_modes() const
{
- Table<2, bool> constant_modes(1, this->dofs_per_cell);
- for (unsigned int i = 0; i < this->dofs_per_cell; ++i)
+ Table<2, bool> constant_modes(1, this->n_dofs_per_cell());
+ for (unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
constant_modes(0, i) = true;
return std::pair<Table<2, bool>, std::vector<unsigned int>>(
constant_modes, std::vector<unsigned int>(1, 0));
AssertDimension(support_point_values.size(),
this->get_unit_support_points().size());
AssertDimension(support_point_values.size(), nodal_values.size());
- AssertDimension(this->dofs_per_cell, nodal_values.size());
+ AssertDimension(this->n_dofs_per_cell(), nodal_values.size());
- for (unsigned int i = 0; i < this->dofs_per_cell; ++i)
+ for (unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
{
AssertDimension(support_point_values[i].size(), 1);
std::pair<Table<2, bool>, std::vector<unsigned int>>
FE_FaceQ<1, spacedim>::get_constant_modes() const
{
- Table<2, bool> constant_modes(1, this->dofs_per_cell);
- for (unsigned int i = 0; i < this->dofs_per_cell; ++i)
+ Table<2, bool> constant_modes(1, this->n_dofs_per_cell());
+ for (unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
constant_modes(0, i) = true;
return std::pair<Table<2, bool>, std::vector<unsigned int>>(
constant_modes, std::vector<unsigned int>(1, 0));
const unsigned int foffset = face;
if (fe_internal.update_each & update_values)
{
- for (unsigned int k = 0; k < this->dofs_per_cell; ++k)
+ for (unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
output_data.shape_values(k, 0) = 0.;
output_data.shape_values(foffset, 0) = 1;
}
std::pair<Table<2, bool>, std::vector<unsigned int>>
FE_FaceP<dim, spacedim>::get_constant_modes() const
{
- Table<2, bool> constant_modes(1, this->dofs_per_cell);
+ Table<2, bool> constant_modes(1, this->n_dofs_per_cell());
for (unsigned int face : GeometryInfo<dim>::face_indices())
constant_modes(0, face * this->dofs_per_face) = true;
return std::pair<Table<2, bool>, std::vector<unsigned int>>(
Assert(dim >= 2, ExcImpossibleInDim(dim));
- const unsigned int n_dofs = this->dofs_per_cell;
+ const unsigned int n_dofs = this->n_dofs_per_cell();
this->mapping_kind = {mapping_nedelec};
// First, initialize the
// functions of the child cells
// to the lowest order shape
// functions of the parent cell.
- for (unsigned int dof = 0; dof < this->dofs_per_cell; ++dof)
+ for (unsigned int dof = 0; dof < this->n_dofs_per_cell(); ++dof)
for (unsigned int q_point = 0; q_point < n_edge_quadrature_points;
++q_point)
{
FullMatrix<double> system_rhs(this->degree - 1, 4);
Vector<double> tmp(4);
- for (unsigned int dof = 0; dof < this->dofs_per_cell; ++dof)
+ for (unsigned int dof = 0; dof < this->n_dofs_per_cell(); ++dof)
for (unsigned int i = 0; i < 2; ++i)
{
system_rhs = 0.0;
system_rhs.reinit(system_matrix_inv.m(), 8);
tmp.reinit(8);
- for (unsigned int dof = 0; dof < this->dofs_per_cell; ++dof)
+ for (unsigned int dof = 0; dof < this->n_dofs_per_cell(); ++dof)
{
system_rhs = 0.0;
// functions of the child cells
// to the lowest order shape
// functions of the parent cell.
- for (unsigned int dof = 0; dof < this->dofs_per_cell; ++dof)
+ for (unsigned int dof = 0; dof < this->n_dofs_per_cell(); ++dof)
for (unsigned int q_point = 0; q_point < n_edge_quadrature_points;
++q_point)
{
for (unsigned int i = 0; i < 2; ++i)
for (unsigned int j = 0; j < 2; ++j)
- for (unsigned int dof = 0; dof < this->dofs_per_cell; ++dof)
+ for (unsigned int dof = 0; dof < this->n_dofs_per_cell();
+ ++dof)
{
system_rhs = 0.0;
tmp.reinit(24);
for (unsigned int i = 0; i < 2; ++i)
- for (unsigned int dof = 0; dof < this->dofs_per_cell; ++dof)
+ for (unsigned int dof = 0; dof < this->n_dofs_per_cell(); ++dof)
{
system_rhs = 0.0;
system_rhs.reinit(system_matrix_inv.m(), 24);
tmp.reinit(24);
- for (unsigned int dof = 0; dof < this->dofs_per_cell; ++dof)
+ for (unsigned int dof = 0; dof < this->n_dofs_per_cell(); ++dof)
{
system_rhs = 0.0;
FE_Nedelec<dim>::has_support_on_face(const unsigned int shape_index,
const unsigned int face_index) const
{
- AssertIndexRange(shape_index, this->dofs_per_cell);
+ AssertIndexRange(shape_index, this->n_dofs_per_cell());
AssertIndexRange(face_index, GeometryInfo<dim>::faces_per_cell);
const unsigned int deg = this->degree - 1;
// if matrix got updated while waiting for the lock
if (this->prolongation[refinement_case - 1][child].n() ==
- this->dofs_per_cell)
+ this->n_dofs_per_cell())
return this->prolongation[refinement_case - 1][child];
// now do the work. need to get a non-const version of data in order to
// if matrix got updated while waiting for the lock...
if (this->restriction[refinement_case - 1][child].n() ==
- this->dofs_per_cell)
+ this->n_dofs_per_cell())
return this->restriction[refinement_case - 1][child];
// now do the work. need to get a non-const version of data in order to
Assert(support_point_values[0].size() == this->n_components(),
ExcDimensionMismatch(support_point_values[0].size(),
this->n_components()));
- Assert(nodal_values.size() == this->dofs_per_cell,
- ExcDimensionMismatch(nodal_values.size(), this->dofs_per_cell));
+ Assert(nodal_values.size() == this->n_dofs_per_cell(),
+ ExcDimensionMismatch(nodal_values.size(), this->n_dofs_per_cell()));
std::fill(nodal_values.begin(), nodal_values.end(), 0.0);
switch (dim)
std::pair<Table<2, bool>, std::vector<unsigned int>>
FE_Nedelec<dim>::get_constant_modes() const
{
- Table<2, bool> constant_modes(dim, this->dofs_per_cell);
+ Table<2, bool> constant_modes(dim, this->n_dofs_per_cell());
for (unsigned int d = 0; d < dim; ++d)
- for (unsigned int i = 0; i < this->dofs_per_cell; ++i)
+ for (unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
constant_modes(d, i) = true;
std::vector<unsigned int> components;
for (unsigned int d = 0; d < dim; ++d)
// Resize shape function arrays according to update flags:
if (flags & update_values)
{
- data.shape_values.resize(this->dofs_per_cell,
+ data.shape_values.resize(this->n_dofs_per_cell(),
std::vector<Tensor<1, dim>>(n_q_points));
}
if (flags & update_gradients)
{
- data.shape_grads.resize(this->dofs_per_cell,
+ data.shape_grads.resize(this->n_dofs_per_cell(),
std::vector<DerivativeForm<1, dim, dim>>(
n_q_points));
}
const unsigned int n_q_points = quadrature.size();
Assert(!(flags & update_values) ||
- fe_data.shape_values.size() == this->dofs_per_cell,
+ fe_data.shape_values.size() == this->n_dofs_per_cell(),
ExcDimensionMismatch(fe_data.shape_values.size(),
- this->dofs_per_cell));
+ this->n_dofs_per_cell()));
Assert(!(flags & update_values) ||
fe_data.shape_values[0].size() == n_q_points,
ExcDimensionMismatch(fe_data.shape_values[0].size(), n_q_points));
const unsigned int n_q_points = quadrature.size();
Assert(!(flags & update_values) ||
- fe_data.shape_values.size() == this->dofs_per_cell,
+ fe_data.shape_values.size() == this->n_dofs_per_cell(),
ExcDimensionMismatch(fe_data.shape_values.size(),
- this->dofs_per_cell));
+ this->n_dofs_per_cell()));
Assert(!(flags & update_values) ||
fe_data.shape_values[0].size() == n_q_points,
ExcDimensionMismatch(fe_data.shape_values[0].size(),
const unsigned int n_q_points = quadrature.size();
Assert(!(flags & update_values) ||
- fe_data.shape_values.size() == this->dofs_per_cell,
+ fe_data.shape_values.size() == this->n_dofs_per_cell(),
ExcDimensionMismatch(fe_data.shape_values.size(),
- this->dofs_per_cell));
+ this->n_dofs_per_cell()));
Assert(!(flags & update_values) ||
fe_data.shape_values[0].size() == n_q_points,
ExcDimensionMismatch(fe_data.shape_values[0].size(), n_q_points));
// Now have all shape_values stored on the reference cell.
// Must now transform to the physical cell.
std::vector<Tensor<1, dim>> transformed_shape_values(n_q_points);
- for (unsigned int dof = 0; dof < this->dofs_per_cell; ++dof)
+ for (unsigned int dof = 0; dof < this->n_dofs_per_cell(); ++dof)
{
const unsigned int first =
data.shape_function_to_row_table[dof * this->n_components() +
// Must now transform to the physical cell.
std::vector<Tensor<2, dim>> input(n_q_points);
std::vector<Tensor<2, dim>> transformed_shape_grads(n_q_points);
- for (unsigned int dof = 0; dof < this->dofs_per_cell; ++dof)
+ for (unsigned int dof = 0; dof < this->n_dofs_per_cell(); ++dof)
{
for (unsigned int q = 0; q < n_q_points; ++q)
{
// Now have all shape_values stored on the reference cell.
// Must now transform to the physical cell.
std::vector<Tensor<1, dim>> transformed_shape_values(n_q_points);
- for (unsigned int dof = 0; dof < this->dofs_per_cell; ++dof)
+ for (unsigned int dof = 0; dof < this->n_dofs_per_cell(); ++dof)
{
mapping.transform(make_array_view(fe_data.shape_values[dof],
offset,
// Must now transform to the physical cell.
std::vector<Tensor<2, dim>> input(n_q_points);
std::vector<Tensor<2, dim>> transformed_shape_grads(n_q_points);
- for (unsigned int dof = 0; dof < this->dofs_per_cell; ++dof)
+ for (unsigned int dof = 0; dof < this->n_dofs_per_cell(); ++dof)
{
for (unsigned int q = 0; q < n_q_points; ++q)
{
// compute on the cell
if (flags & update_values)
for (unsigned int i = 0; i < n_q_points; ++i)
- for (unsigned int k = 0; k < this->dofs_per_cell; ++k)
+ for (unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
output_data.shape_values[k][i] =
(coeffs[k][0] * mapping_data.quadrature_points[i](0) +
coeffs[k][1] * mapping_data.quadrature_points[i](1) + coeffs[k][2]);
if (flags & update_gradients)
for (unsigned int i = 0; i < n_q_points; ++i)
- for (unsigned int k = 0; k < this->dofs_per_cell; ++k)
+ for (unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
output_data.shape_gradients[k][i] =
Point<2>(coeffs[k][0], coeffs[k][1]);
}
if (flags & update_values)
for (unsigned int i = 0; i < quadrature_on_face.size(); ++i)
- for (unsigned int k = 0; k < this->dofs_per_cell; ++k)
+ for (unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
{
const Point<2> quadrature_point =
mapping.transform_unit_to_real_cell(cell,
if (flags & update_gradients)
for (unsigned int i = 0; i < quadrature_on_face.size(); ++i)
- for (unsigned int k = 0; k < this->dofs_per_cell; ++k)
+ for (unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
output_data.shape_gradients[k][i] =
Point<2>(coeffs[k][0], coeffs[k][1]);
}
if (flags & update_values)
for (unsigned int i = 0; i < quadrature_on_subface.size(); ++i)
{
- for (unsigned int k = 0; k < this->dofs_per_cell; ++k)
+ for (unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
{
const Point<2> quadrature_point =
mapping.transform_unit_to_real_cell(
if (flags & update_gradients)
for (unsigned int i = 0; i < quadrature_on_subface.size(); ++i)
- for (unsigned int k = 0; k < this->dofs_per_cell; ++k)
+ for (unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
output_data.shape_gradients[k][i] =
Point<2>(coeffs[k][0], coeffs[k][1]);
}
const Point<dim> & p,
const unsigned int component) const
{
- AssertIndexRange(i, this->dofs_per_cell);
+ AssertIndexRange(i, this->n_dofs_per_cell());
AssertIndexRange(component, dim);
std::lock_guard<std::mutex> lock(cache_mutex);
const Point<dim> & p,
const unsigned int component) const
{
- AssertIndexRange(i, this->dofs_per_cell);
+ AssertIndexRange(i, this->n_dofs_per_cell());
AssertIndexRange(component, dim);
std::lock_guard<std::mutex> lock(cache_mutex);
const Point<dim> & p,
const unsigned int component) const
{
- AssertIndexRange(i, this->dofs_per_cell);
+ AssertIndexRange(i, this->n_dofs_per_cell());
AssertIndexRange(component, dim);
std::lock_guard<std::mutex> lock(cache_mutex);
const unsigned int n_q_points = quadrature.size();
Assert(!(fe_data.update_each & update_values) ||
- fe_data.shape_values.size()[0] == this->dofs_per_cell,
+ fe_data.shape_values.size()[0] == this->n_dofs_per_cell(),
ExcDimensionMismatch(fe_data.shape_values.size()[0],
- this->dofs_per_cell));
+ this->n_dofs_per_cell()));
Assert(!(fe_data.update_each & update_values) ||
fe_data.shape_values.size()[1] == n_q_points,
ExcDimensionMismatch(fe_data.shape_values.size()[1], n_q_points));
fe_data.sign_change);
- for (unsigned int i = 0; i < this->dofs_per_cell; ++i)
+ for (unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
{
const MappingKind mapping_kind = get_mapping_kind(i);
this->mapping_kind,
fe_data.sign_change);
- for (unsigned int i = 0; i < this->dofs_per_cell; ++i)
+ for (unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
{
const MappingKind mapping_kind = get_mapping_kind(i);
this->mapping_kind,
fe_data.sign_change);
- for (unsigned int i = 0; i < this->dofs_per_cell; ++i)
+ for (unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
{
const MappingKind mapping_kind = get_mapping_kind(i);
{
UpdateFlags out = update_default;
- for (unsigned int i = 0; i < this->dofs_per_cell; ++i)
+ for (unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
{
const MappingKind mapping_kind = get_mapping_kind(i);
AssertDimension(support_point_values.size(),
this->get_unit_support_points().size());
AssertDimension(support_point_values.size(), nodal_values.size());
- AssertDimension(this->dofs_per_cell, nodal_values.size());
+ AssertDimension(this->n_dofs_per_cell(), nodal_values.size());
- for (unsigned int i = 0; i < this->dofs_per_cell; ++i)
+ for (unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
{
AssertDimension(support_point_values[i].size(), 1);
// class FE_Q_DG0 that otherwise shares 95% of the code.
const unsigned int q_dofs_per_cell =
Utilities::fixed_power<dim>(q_degree + 1);
- Assert(q_dofs_per_cell == this->dofs_per_cell ||
- q_dofs_per_cell + 1 == this->dofs_per_cell ||
- q_dofs_per_cell + dim == this->dofs_per_cell,
+ Assert(q_dofs_per_cell == this->n_dofs_per_cell() ||
+ q_dofs_per_cell + 1 == this->n_dofs_per_cell() ||
+ q_dofs_per_cell + dim == this->n_dofs_per_cell(),
ExcInternalError());
[this, q_dofs_per_cell]() {
std::vector<unsigned int> renumber =
FETools::hierarchic_to_lexicographic_numbering<dim>(q_degree);
- for (unsigned int i = q_dofs_per_cell; i < this->dofs_per_cell; ++i)
+ for (unsigned int i = q_dofs_per_cell; i < this->n_dofs_per_cell(); ++i)
renumber.push_back(i);
auto *tensor_poly_space_ptr =
dynamic_cast<TensorProductPolynomials<dim> *>(this->poly_space.get());
&x_source_fe))
{
// ok, source is a Q element, so we will be able to do the work
- Assert(interpolation_matrix.m() == this->dofs_per_cell,
+ Assert(interpolation_matrix.m() == this->n_dofs_per_cell(),
ExcDimensionMismatch(interpolation_matrix.m(),
- this->dofs_per_cell));
- Assert(interpolation_matrix.n() == x_source_fe.dofs_per_cell,
+ this->n_dofs_per_cell()));
+ Assert(interpolation_matrix.n() == x_source_fe.n_dofs_per_cell(),
ExcDimensionMismatch(interpolation_matrix.m(),
- x_source_fe.dofs_per_cell));
+ x_source_fe.n_dofs_per_cell()));
// only evaluate Q dofs
const unsigned int q_dofs_per_cell =
}
// for FE_Q_DG0, add one last row of identity
- if (q_dofs_per_cell < this->dofs_per_cell)
+ if (q_dofs_per_cell < this->n_dofs_per_cell())
{
- AssertDimension(source_q_dofs_per_cell + 1, source_fe->dofs_per_cell);
+ AssertDimension(source_q_dofs_per_cell + 1,
+ source_fe->n_dofs_per_cell());
for (unsigned int i = 0; i < source_q_dofs_per_cell; ++i)
interpolation_matrix(q_dofs_per_cell, i) = 0.;
for (unsigned int j = 0; j < q_dofs_per_cell; ++j)
// cut off very small values
const double eps = 2e-13 * q_degree * dim;
- for (unsigned int i = 0; i < this->dofs_per_cell; ++i)
- for (unsigned int j = 0; j < source_fe->dofs_per_cell; ++j)
+ for (unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
+ for (unsigned int j = 0; j < source_fe->n_dofs_per_cell(); ++j)
if (std::fabs(interpolation_matrix(i, j)) < eps)
interpolation_matrix(i, j) = 0.;
// make sure that the row sum of each of the matrices is 1 at this
// point. this must be so since the shape functions sum up to 1
- for (unsigned int i = 0; i < this->dofs_per_cell; ++i)
+ for (unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
{
double sum = 0.;
- for (unsigned int j = 0; j < source_fe->dofs_per_cell; ++j)
+ for (unsigned int j = 0; j < source_fe->n_dofs_per_cell(); ++j)
sum += interpolation_matrix(i, j);
Assert(std::fabs(sum - 1) < eps, ExcInternalError());
// with a n_dofs x 0 matrix. there is nothing to do here
// we would like to verify that the number of rows and columns of
- // the matrix equals this->dofs_per_cell and zero. unfortunately,
+ // the matrix equals this->n_dofs_per_cell() and zero. unfortunately,
// whenever we do FullMatrix::reinit(m,0), it sets both rows and
// columns to zero, instead of m and zero. thus, only test the
// number of columns
- Assert(interpolation_matrix.n() == x_source_fe.dofs_per_cell,
+ Assert(interpolation_matrix.n() == x_source_fe.n_dofs_per_cell(),
ExcDimensionMismatch(interpolation_matrix.m(),
- x_source_fe.dofs_per_cell));
+ x_source_fe.n_dofs_per_cell()));
}
else
AssertThrow(
{
// get the number of the vertex on the face that corresponds to this DoF,
// along with the number of the DoF on this vertex
- const unsigned int face_vertex = face_index / this->dofs_per_vertex;
+ const unsigned int face_vertex = face_index / this->n_dofs_per_vertex();
const unsigned int dof_index_on_vertex =
- face_index % this->dofs_per_vertex;
+ face_index % this->n_dofs_per_vertex();
// then get the number of this vertex on the cell and translate
// this to a DoF number on the cell
return (GeometryInfo<dim>::face_to_cell_vertices(
face, face_vertex, face_orientation, face_flip, face_rotation) *
- this->dofs_per_vertex +
+ this->n_dofs_per_vertex() +
dof_index_on_vertex);
}
else if (face_index < this->first_face_quad_index)
// if matrix got updated while waiting for the lock
if (this->prolongation[refinement_case - 1][child].n() ==
- this->dofs_per_cell)
+ this->n_dofs_per_cell())
return this->prolongation[refinement_case - 1][child];
// distinguish q/q_dg0 case: only treat Q dofs first
}
}
- FullMatrix<double> prolongate(this->dofs_per_cell, this->dofs_per_cell);
+ FullMatrix<double> prolongate(this->n_dofs_per_cell(),
+ this->n_dofs_per_cell());
// go through the points in diagonal to capture variation in all
// directions simultaneously
// the discontinuous node is simply mapped on the discontinuous node on
// the child element
- if (q_dofs_per_cell < this->dofs_per_cell)
+ if (q_dofs_per_cell < this->n_dofs_per_cell())
prolongate(q_dofs_per_cell, q_dofs_per_cell) = 1.;
// and make sure that the row sum is 1. this must be so since for this
// element, the shape functions add up to one
#ifdef DEBUG
- for (unsigned int row = 0; row < this->dofs_per_cell; ++row)
+ for (unsigned int row = 0; row < this->n_dofs_per_cell(); ++row)
{
double sum = 0;
- for (unsigned int col = 0; col < this->dofs_per_cell; ++col)
+ for (unsigned int col = 0; col < this->n_dofs_per_cell(); ++col)
sum += prolongate(row, col);
Assert(std::fabs(sum - 1.) <
- std::max(eps, 5e-16 * std::sqrt(this->dofs_per_cell)),
+ std::max(eps, 5e-16 * std::sqrt(this->n_dofs_per_cell())),
ExcInternalError("The entries in a row of the local "
"prolongation matrix do not add to one. "
"This typically indicates that the "
// if matrix got updated while waiting for the lock...
if (this->restriction[refinement_case - 1][child].n() ==
- this->dofs_per_cell)
+ this->n_dofs_per_cell())
return this->restriction[refinement_case - 1][child];
- FullMatrix<double> my_restriction(this->dofs_per_cell,
- this->dofs_per_cell);
+ FullMatrix<double> my_restriction(this->n_dofs_per_cell(),
+ this->n_dofs_per_cell());
// distinguish q/q_dg0 case
const unsigned int q_dofs_per_cell =
Utilities::fixed_power<dim>(q_degree + 1);
const unsigned int dofs1d = q_degree + 1;
std::vector<Tensor<1, dim>> evaluations1d(dofs1d);
- my_restriction.reinit(this->dofs_per_cell, this->dofs_per_cell);
+ my_restriction.reinit(this->n_dofs_per_cell(), this->n_dofs_per_cell());
for (unsigned int i = 0; i < q_dofs_per_cell; ++i)
{
dofs1d);
}
Assert(std::fabs(sum_check - 1) <
- std::max(eps, 5e-16 * std::sqrt(this->dofs_per_cell)),
+ std::max(eps,
+ 5e-16 * std::sqrt(this->n_dofs_per_cell())),
ExcInternalError("The entries in a row of the local "
"restriction matrix do not add to one. "
"This typically indicates that the "
}
// part for FE_Q_DG0
- if (q_dofs_per_cell < this->dofs_per_cell)
- my_restriction(this->dofs_per_cell - 1, this->dofs_per_cell - 1) =
+ if (q_dofs_per_cell < this->n_dofs_per_cell())
+ my_restriction(this->n_dofs_per_cell() - 1,
+ this->n_dofs_per_cell() - 1) =
1. / GeometryInfo<dim>::n_children(
RefinementCase<dim>(refinement_case));
}
const unsigned int shape_index,
const unsigned int face_index) const
{
- AssertIndexRange(shape_index, this->dofs_per_cell);
+ AssertIndexRange(shape_index, this->n_dofs_per_cell());
AssertIndexRange(face_index, GeometryInfo<dim>::faces_per_cell);
// in 1d, things are simple. since there is only one degree of freedom per
std::pair<Table<2, bool>, std::vector<unsigned int>>
FE_Q_Base<PolynomialType, dim, spacedim>::get_constant_modes() const
{
- Table<2, bool> constant_modes(1, this->dofs_per_cell);
+ Table<2, bool> constant_modes(1, this->n_dofs_per_cell());
// We here just care for the constant mode due to the polynomial space
// without any enrichments
// As there may be more constant modes derived classes may to implement this
std::vector<std::vector<FullMatrix<double>>> &matrices,
const bool isotropic_only)
{
- const unsigned int dpc = fe.dofs_per_cell;
+ const unsigned int dpc = fe.n_dofs_per_cell();
const unsigned int degree = fe.degree;
// Initialize quadrature formula on fine cells
FullMatrix<double> coarse_rhs_matrix(n_dofs, dpc);
std::vector<std::vector<types::global_dof_index>> child_ldi(
- nc, std::vector<types::global_dof_index>(fe.dofs_per_cell));
+ nc, std::vector<types::global_dof_index>(fe.n_dofs_per_cell()));
// now create the mass matrix and all the right_hand sides
unsigned int child_no = 0;
point[d] = 0.5;
for (unsigned int i = 0; i < n_bubbles; ++i)
this->unit_support_points.push_back(point);
- AssertDimension(this->dofs_per_cell, this->unit_support_points.size());
+ AssertDimension(this->n_dofs_per_cell(), this->unit_support_points.size());
this->reinit_restriction_and_prolongation_matrices();
if (dim == spacedim)
point[d] = 0.5;
for (unsigned int i = 0; i < n_bubbles; ++i)
this->unit_support_points.push_back(point);
- AssertDimension(this->dofs_per_cell, this->unit_support_points.size());
+ AssertDimension(this->n_dofs_per_cell(), this->unit_support_points.size());
this->reinit_restriction_and_prolongation_matrices();
if (dim == spacedim)
bool type = true;
const unsigned int n_points = this->degree;
std::vector<double> points(n_points);
- const unsigned int dofs_per_cell = this->dofs_per_cell;
+ const unsigned int dofs_per_cell = this->n_dofs_per_cell();
const std::vector<Point<dim>> &unit_support_points =
this->unit_support_points;
unsigned int index = 0;
Assert(support_point_values.size() == this->unit_support_points.size(),
ExcDimensionMismatch(support_point_values.size(),
this->unit_support_points.size()));
- Assert(nodal_values.size() == this->dofs_per_cell,
- ExcDimensionMismatch(nodal_values.size(), this->dofs_per_cell));
+ Assert(nodal_values.size() == this->n_dofs_per_cell(),
+ ExcDimensionMismatch(nodal_values.size(), this->n_dofs_per_cell()));
Assert(support_point_values[0].size() == this->n_components(),
ExcDimensionMismatch(support_point_values[0].size(),
this->n_components()));
- for (unsigned int i = 0; i < this->dofs_per_cell - 1; ++i)
+ for (unsigned int i = 0; i < this->n_dofs_per_cell() - 1; ++i)
{
const std::pair<unsigned int, unsigned int> index =
this->system_to_component_index(i);
(x_source_fe.get_name().find("FE_Q_Bubbles<") == 0) ||
(dynamic_cast<const FEQBUBBLES *>(&x_source_fe) != nullptr),
(typename FiniteElement<dim, spacedim>::ExcInterpolationNotImplemented()));
- Assert(interpolation_matrix.m() == this->dofs_per_cell,
- ExcDimensionMismatch(interpolation_matrix.m(), this->dofs_per_cell));
- Assert(interpolation_matrix.n() == x_source_fe.dofs_per_cell,
+ Assert(interpolation_matrix.m() == this->n_dofs_per_cell(),
ExcDimensionMismatch(interpolation_matrix.m(),
- x_source_fe.dofs_per_cell));
+ this->n_dofs_per_cell()));
+ Assert(interpolation_matrix.n() == x_source_fe.n_dofs_per_cell(),
+ ExcDimensionMismatch(interpolation_matrix.m(),
+ x_source_fe.n_dofs_per_cell()));
// Provide a short cut in case we are just inquiring the identity
auto casted_fe = dynamic_cast<const FEQBUBBLES *>(&x_source_fe);
for (unsigned int d = 0; d < dim; ++d)
point[d] = 0.5;
this->unit_support_points.push_back(point);
- AssertDimension(this->dofs_per_cell, this->unit_support_points.size());
+ AssertDimension(this->n_dofs_per_cell(), this->unit_support_points.size());
}
for (unsigned int d = 0; d < dim; ++d)
point[d] = 0.5;
this->unit_support_points.push_back(point);
- AssertDimension(this->dofs_per_cell, this->unit_support_points.size());
+ AssertDimension(this->n_dofs_per_cell(), this->unit_support_points.size());
}
bool type = true;
const unsigned int n_points = this->degree + 1;
std::vector<double> points(n_points);
- const unsigned int dofs_per_cell = this->dofs_per_cell;
+ const unsigned int dofs_per_cell = this->n_dofs_per_cell();
const std::vector<Point<dim>> &unit_support_points =
this->unit_support_points;
unsigned int index = 0;
Assert(support_point_values.size() == this->unit_support_points.size(),
ExcDimensionMismatch(support_point_values.size(),
this->unit_support_points.size()));
- Assert(nodal_dofs.size() == this->dofs_per_cell,
- ExcDimensionMismatch(nodal_dofs.size(), this->dofs_per_cell));
+ Assert(nodal_dofs.size() == this->n_dofs_per_cell(),
+ ExcDimensionMismatch(nodal_dofs.size(), this->n_dofs_per_cell()));
Assert(support_point_values[0].size() == this->n_components(),
ExcDimensionMismatch(support_point_values[0].size(),
this->n_components()));
- for (unsigned int i = 0; i < this->dofs_per_cell - 1; ++i)
+ for (unsigned int i = 0; i < this->n_dofs_per_cell() - 1; ++i)
{
const std::pair<unsigned int, unsigned int> index =
this->system_to_component_index(i);
(dynamic_cast<const FEQDG0 *>(&x_source_fe) != nullptr),
(typename FiniteElement<dim, spacedim>::ExcInterpolationNotImplemented()));
- Assert(interpolation_matrix.m() == this->dofs_per_cell,
- ExcDimensionMismatch(interpolation_matrix.m(), this->dofs_per_cell));
- Assert(interpolation_matrix.n() == x_source_fe.dofs_per_cell,
+ Assert(interpolation_matrix.m() == this->n_dofs_per_cell(),
ExcDimensionMismatch(interpolation_matrix.m(),
- x_source_fe.dofs_per_cell));
+ this->n_dofs_per_cell()));
+ Assert(interpolation_matrix.n() == x_source_fe.n_dofs_per_cell(),
+ ExcDimensionMismatch(interpolation_matrix.m(),
+ x_source_fe.n_dofs_per_cell()));
this->FE_Q_Base<TensorProductPolynomialsConst<dim>, dim, spacedim>::
get_interpolation_matrix(x_source_fe, interpolation_matrix);
const unsigned int face_index) const
{
// discontinuous function has support on all faces
- if (shape_index == this->dofs_per_cell - 1)
+ if (shape_index == this->n_dofs_per_cell() - 1)
return true;
else
return FE_Q_Base<TensorProductPolynomialsConst<dim>, dim, spacedim>::
std::pair<Table<2, bool>, std::vector<unsigned int>>
FE_Q_DG0<dim, spacedim>::get_constant_modes() const
{
- Table<2, bool> constant_modes(2, this->dofs_per_cell);
+ Table<2, bool> constant_modes(2, this->n_dofs_per_cell());
// 1 represented by FE_Q part
- for (unsigned int i = 0; i < this->dofs_per_cell - 1; ++i)
+ for (unsigned int i = 0; i < this->n_dofs_per_cell() - 1; ++i)
constant_modes(0, i) = true;
// 1 represented by DG0 part
- constant_modes(1, this->dofs_per_cell - 1) = true;
+ constant_modes(1, this->n_dofs_per_cell() - 1) = true;
return std::pair<Table<2, bool>, std::vector<unsigned int>>(
constant_modes, std::vector<unsigned int>(2, 0));
template <int dim>
FE_Q_Hierarchical<dim>::FE_Q_Hierarchical(const unsigned int degree)
- : FE_Poly<dim>(
- TensorProductPolynomials<dim>(
- Polynomials::Hierarchical::generate_complete_basis(degree)),
- FiniteElementData<dim>(get_dpo_vector(degree),
- 1,
- degree,
- FiniteElementData<dim>::H1),
- std::vector<bool>(
- FiniteElementData<dim>(get_dpo_vector(degree), 1, degree).dofs_per_cell,
- false),
- std::vector<ComponentMask>(
- FiniteElementData<dim>(get_dpo_vector(degree), 1, degree).dofs_per_cell,
- std::vector<bool>(1, true)))
+ : FE_Poly<dim>(TensorProductPolynomials<dim>(
+ Polynomials::Hierarchical::generate_complete_basis(degree)),
+ FiniteElementData<dim>(get_dpo_vector(degree),
+ 1,
+ degree,
+ FiniteElementData<dim>::H1),
+ std::vector<bool>(
+ FiniteElementData<dim>(get_dpo_vector(degree), 1, degree)
+ .n_dofs_per_cell(),
+ false),
+ std::vector<ComponentMask>(
+ FiniteElementData<dim>(get_dpo_vector(degree), 1, degree)
+ .n_dofs_per_cell(),
+ std::vector<bool>(1, true)))
, face_renumber(face_fe_q_hierarchical_to_hierarchic_numbering(degree))
{
TensorProductPolynomials<dim> *poly_space_derived_ptr =
// for all dimensions.
std::vector<FullMatrix<double>> dofs_cell(
GeometryInfo<1>::max_children_per_cell,
- FullMatrix<double>(2 * this->dofs_per_vertex + this->dofs_per_line,
- 2 * this->dofs_per_vertex + this->dofs_per_line));
+ FullMatrix<double>(2 * this->n_dofs_per_vertex() + this->dofs_per_line,
+ 2 * this->n_dofs_per_vertex() + this->dofs_per_line));
std::vector<FullMatrix<double>> dofs_subcell(
GeometryInfo<1>::max_children_per_cell,
- FullMatrix<double>(2 * this->dofs_per_vertex + this->dofs_per_line,
- 2 * this->dofs_per_vertex + this->dofs_per_line));
+ FullMatrix<double>(2 * this->n_dofs_per_vertex() + this->dofs_per_line,
+ 2 * this->n_dofs_per_vertex() + this->dofs_per_line));
// build these fields, as they are
// needed as auxiliary fields later
// on
{
// ok, source is a Q_Hierarchical element, so we will be able to do the
// work
- Assert(matrix.m() == this->dofs_per_cell,
- ExcDimensionMismatch(matrix.m(), this->dofs_per_cell));
- Assert(matrix.n() == source.dofs_per_cell,
- ExcDimensionMismatch(matrix.m(), source_fe->dofs_per_cell));
+ Assert(matrix.m() == this->n_dofs_per_cell(),
+ ExcDimensionMismatch(matrix.m(), this->n_dofs_per_cell()));
+ Assert(matrix.n() == source.n_dofs_per_cell(),
+ ExcDimensionMismatch(matrix.m(), source_fe->n_dofs_per_cell()));
// Recall that DoFs are renumbered in the following order:
// vertices, lines, quads, hexes.
matrix = 0.;
// distinguish between the case when we interpolate to a richer element
- if (this->dofs_per_cell >= source_fe->dofs_per_cell)
+ if (this->n_dofs_per_cell() >= source_fe->n_dofs_per_cell())
{
const std::vector<unsigned int> dof_map =
this->get_embedding_dofs(source_fe->degree);
std::vector<FullMatrix<double>> &dofs_cell,
std::vector<FullMatrix<double>> &dofs_subcell) const
{
- const unsigned int dofs_1d = 2 * this->dofs_per_vertex + this->dofs_per_line;
+ const unsigned int dofs_1d =
+ 2 * this->n_dofs_per_vertex() + this->dofs_per_line;
// The dofs_subcell matrices are transposed
// (4.19), (4.21) and (4.27),(4.28),(4.30) in
FE_Q_Hierarchical<dim>::initialize_constraints(
const std::vector<FullMatrix<double>> &dofs_subcell)
{
- const unsigned int dofs_1d = 2 * this->dofs_per_vertex + this->dofs_per_line;
+ const unsigned int dofs_1d =
+ 2 * this->n_dofs_per_vertex() + this->dofs_per_line;
this->interface_constraints.TableBase<2, double>::reinit(
this->interface_constraints_size());
{
unsigned int iso = RefinementCase<dim>::isotropic_refinement - 1;
- const unsigned int dofs_1d = 2 * this->dofs_per_vertex + this->dofs_per_line;
+ const unsigned int dofs_1d =
+ 2 * this->n_dofs_per_vertex() + this->dofs_per_line;
TensorProductPolynomials<dim> *poly_space_derived_ptr =
dynamic_cast<TensorProductPolynomials<dim> *>(this->poly_space.get());
const std::vector<unsigned int> &renumber =
for (unsigned int c = 0; c < GeometryInfo<dim>::max_children_per_cell; ++c)
{
- this->prolongation[iso][c].reinit(this->dofs_per_cell,
- this->dofs_per_cell);
- this->restriction[iso][c].reinit(this->dofs_per_cell,
- this->dofs_per_cell);
+ this->prolongation[iso][c].reinit(this->n_dofs_per_cell(),
+ this->n_dofs_per_cell());
+ this->restriction[iso][c].reinit(this->n_dofs_per_cell(),
+ this->n_dofs_per_cell());
}
// the 1d case is particularly
// i loops over the dofs in the
// parent cell. These are the
// columns in the embedding matrix.
- for (unsigned int j = 0; j < this->dofs_per_cell; ++j)
- for (unsigned int i = 0; i < this->dofs_per_cell; ++i)
+ for (unsigned int j = 0; j < this->n_dofs_per_cell(); ++j)
+ for (unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
switch (dim)
{
case 2:
const FiniteElementData<dim> &fe)
{
Assert(fe.n_components() == 1, ExcInternalError());
- std::vector<unsigned int> h2l(fe.dofs_per_cell);
+ std::vector<unsigned int> h2l(fe.n_dofs_per_cell());
// polynomial degree
const unsigned int degree = fe.dofs_per_line + 1;
{
case 1:
{
- for (unsigned int i = 0; i < fe.dofs_per_cell; ++i)
+ for (unsigned int i = 0; i < fe.n_dofs_per_cell(); ++i)
h2l[i] = i;
break;
for (unsigned int j = 0; j < fe.dofs_per_line; ++j)
h2l[next_index++] = (2 + i) * n + 2 + j;
- Assert(next_index == fe.dofs_per_cell, ExcInternalError());
+ Assert(next_index == fe.n_dofs_per_cell(), ExcInternalError());
break;
}
for (unsigned int k = 0; k < fe.dofs_per_line; ++k)
h2l[next_index++] = (2 + i) * n2 + (2 + j) * n + 2 + k;
- Assert(next_index == fe.dofs_per_cell, ExcInternalError());
+ Assert(next_index == fe.n_dofs_per_cell(), ExcInternalError());
break;
}
FE_Q_Hierarchical<1>::has_support_on_face(const unsigned int shape_index,
const unsigned int face_index) const
{
- AssertIndexRange(shape_index, this->dofs_per_cell);
+ AssertIndexRange(shape_index, this->n_dofs_per_cell());
AssertIndexRange(face_index, GeometryInfo<1>::faces_per_cell);
FE_Q_Hierarchical<dim>::has_support_on_face(const unsigned int shape_index,
const unsigned int face_index) const
{
- AssertIndexRange(shape_index, this->dofs_per_cell);
+ AssertIndexRange(shape_index, this->n_dofs_per_cell());
AssertIndexRange(face_index, GeometryInfo<dim>::faces_per_cell);
// first, special-case interior
}
else if (sub_degree == this->degree)
{
- std::vector<unsigned int> embedding_dofs(this->dofs_per_cell);
- for (unsigned int i = 0; i < this->dofs_per_cell; ++i)
+ std::vector<unsigned int> embedding_dofs(this->n_dofs_per_cell());
+ for (unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
embedding_dofs[i] = i;
return embedding_dofs;
std::pair<Table<2, bool>, std::vector<unsigned int>>
FE_Q_Hierarchical<dim>::get_constant_modes() const
{
- Table<2, bool> constant_modes(1, this->dofs_per_cell);
+ Table<2, bool> constant_modes(1, this->n_dofs_per_cell());
for (const unsigned int i : GeometryInfo<dim>::vertex_indices())
constant_modes(0, i) = true;
for (unsigned int i = GeometryInfo<dim>::vertices_per_cell;
- i < this->dofs_per_cell;
+ i < this->n_dofs_per_cell();
++i)
constant_modes(0, i) = false;
return std::pair<Table<2, bool>, std::vector<unsigned int>>(
AssertDimension(support_point_values.size(),
this->get_unit_support_points().size());
AssertDimension(support_point_values.size(), nodal_values.size());
- AssertDimension(this->dofs_per_cell, nodal_values.size());
+ AssertDimension(this->n_dofs_per_cell(), nodal_values.size());
- for (unsigned int i = 0; i < this->dofs_per_cell; ++i)
+ for (unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
{
AssertDimension(support_point_values[i].size(), 1);
{
AssertDimension(support_point_values.size(),
this->generalized_support_points.size());
- AssertDimension(nodal_values.size(), this->dofs_per_cell);
+ AssertDimension(nodal_values.size(), this->n_dofs_per_cell());
const unsigned int q_points_per_face = this->weights.size();
std::fill(nodal_values.begin(), nodal_values.end(), 0.0);
std::vector<bool>(dim, true)))
{
Assert(dim >= 2, ExcImpossibleInDim(dim));
- const unsigned int n_dofs = this->dofs_per_cell;
+ const unsigned int n_dofs = this->n_dofs_per_cell();
this->mapping_kind = {mapping_raviart_thomas};
// First, initialize the
// Store shape values, since the
// evaluation suffers if not
// ordered by point
- Table<2, double> cached_values_on_face(this->dofs_per_cell,
+ Table<2, double> cached_values_on_face(this->n_dofs_per_cell(),
q_face.size());
for (unsigned int k = 0; k < q_face.size(); ++k)
- for (unsigned int i = 0; i < this->dofs_per_cell; ++i)
+ for (unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
cached_values_on_face(i, k) = this->shape_value_component(
i, q_face.point(k), GeometryInfo<dim>::unit_normal_direction[face]);
// corresponding shape
// functions.
for (unsigned int k = 0; k < n_face_points; ++k)
- for (unsigned int i_child = 0; i_child < this->dofs_per_cell;
+ for (unsigned int i_child = 0; i_child < this->n_dofs_per_cell();
++i_child)
for (unsigned int i_face = 0; i_face < this->dofs_per_face;
++i_face)
// Store shape values, since the
// evaluation suffers if not
// ordered by point
- Table<3, double> cached_values_on_cell(this->dofs_per_cell,
+ Table<3, double> cached_values_on_cell(this->n_dofs_per_cell(),
q_cell.size(),
dim);
for (unsigned int k = 0; k < q_cell.size(); ++k)
- for (unsigned int i = 0; i < this->dofs_per_cell; ++i)
+ for (unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
for (unsigned int d = 0; d < dim; ++d)
cached_values_on_cell(i, k, d) =
this->shape_value_component(i, q_cell.point(k), d);
Quadrature<dim> q_sub = QProjector<dim>::project_to_child(q_cell, child);
for (unsigned int k = 0; k < q_sub.size(); ++k)
- for (unsigned int i_child = 0; i_child < this->dofs_per_cell; ++i_child)
+ for (unsigned int i_child = 0; i_child < this->n_dofs_per_cell();
+ ++i_child)
for (unsigned int d = 0; d < dim; ++d)
for (unsigned int i_weight = 0; i_weight < polynomials[d]->n();
++i_weight)
std::pair<Table<2, bool>, std::vector<unsigned int>>
FE_RaviartThomas<dim>::get_constant_modes() const
{
- Table<2, bool> constant_modes(dim, this->dofs_per_cell);
+ Table<2, bool> constant_modes(dim, this->n_dofs_per_cell());
for (unsigned int d = 0; d < dim; ++d)
- for (unsigned int i = 0; i < this->dofs_per_cell; ++i)
+ for (unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
constant_modes(d, i) = true;
std::vector<unsigned int> components;
for (unsigned int d = 0; d < dim; ++d)
FE_RaviartThomas<dim>::has_support_on_face(const unsigned int shape_index,
const unsigned int face_index) const
{
- AssertIndexRange(shape_index, this->dofs_per_cell);
+ AssertIndexRange(shape_index, this->n_dofs_per_cell());
AssertIndexRange(face_index, GeometryInfo<dim>::faces_per_cell);
// Return computed values if we
Assert(support_point_values.size() == this->generalized_support_points.size(),
ExcDimensionMismatch(support_point_values.size(),
this->generalized_support_points.size()));
- Assert(nodal_values.size() == this->dofs_per_cell,
- ExcDimensionMismatch(nodal_values.size(), this->dofs_per_cell));
+ Assert(nodal_values.size() == this->n_dofs_per_cell(),
+ ExcDimensionMismatch(nodal_values.size(), this->n_dofs_per_cell()));
Assert(support_point_values[0].size() == this->n_components(),
ExcDimensionMismatch(support_point_values[0].size(),
this->n_components()));
std::vector<bool>(dim, true)))
{
Assert(dim >= 2, ExcImpossibleInDim(dim));
- const unsigned int n_dofs = this->dofs_per_cell;
+ const unsigned int n_dofs = this->n_dofs_per_cell();
this->mapping_kind = {mapping_raviart_thomas};
// First, initialize the
void
FE_RaviartThomasNodal<dim>::initialize_support_points(const unsigned int deg)
{
- this->generalized_support_points.resize(this->dofs_per_cell);
+ this->generalized_support_points.resize(this->n_dofs_per_cell());
this->generalized_face_support_points.resize(this->dofs_per_face);
// Number of the point being entered
for (unsigned int k = 0; k < quadrature->size(); ++k)
this->generalized_support_points[current++] = quadrature->point(k);
}
- Assert(current == this->dofs_per_cell, ExcInternalError());
+ Assert(current == this->n_dofs_per_cell(), ExcInternalError());
}
const unsigned int shape_index,
const unsigned int face_index) const
{
- AssertIndexRange(shape_index, this->dofs_per_cell);
+ AssertIndexRange(shape_index, this->n_dofs_per_cell());
AssertIndexRange(face_index, GeometryInfo<dim>::faces_per_cell);
// The first degrees of freedom are
Assert(support_point_values.size() == this->generalized_support_points.size(),
ExcDimensionMismatch(support_point_values.size(),
this->generalized_support_points.size()));
- Assert(nodal_values.size() == this->dofs_per_cell,
- ExcDimensionMismatch(nodal_values.size(), this->dofs_per_cell));
+ Assert(nodal_values.size() == this->n_dofs_per_cell(),
+ ExcDimensionMismatch(nodal_values.size(), this->n_dofs_per_cell()));
Assert(support_point_values[0].size() == this->n_components(),
ExcDimensionMismatch(support_point_values[0].size(),
this->n_components()));
// The remaining points form dim
// chunks, one for each component.
- const unsigned int istep = (this->dofs_per_cell - fbase) / dim;
- Assert((this->dofs_per_cell - fbase) % dim == 0, ExcInternalError());
+ const unsigned int istep = (this->n_dofs_per_cell() - fbase) / dim;
+ Assert((this->n_dofs_per_cell() - fbase) % dim == 0, ExcInternalError());
f = 0;
- while (fbase < this->dofs_per_cell)
+ while (fbase < this->n_dofs_per_cell())
{
for (unsigned int i = 0; i < istep; ++i)
{
fbase += istep;
++f;
}
- Assert(fbase == this->dofs_per_cell, ExcInternalError());
+ Assert(fbase == this->n_dofs_per_cell(), ExcInternalError());
}
deg >= 1,
ExcMessage(
"Lowest order RT_Bubbles element is degree 1, but you requested for degree 0"));
- const unsigned int n_dofs = this->dofs_per_cell;
+ const unsigned int n_dofs = this->n_dofs_per_cell();
this->mapping_kind = {mapping_raviart_thomas};
// Initialize support points and quadrature weights
void
FE_RT_Bubbles<dim>::initialize_support_points(const unsigned int deg)
{
- this->generalized_support_points.resize(this->dofs_per_cell);
+ this->generalized_support_points.resize(this->n_dofs_per_cell());
this->generalized_face_support_points.resize(this->dofs_per_face);
// Index of the point being entered
for (unsigned int k = 0; k < quadrature->size(); ++k)
this->generalized_support_points[current++] = quadrature->point(k);
}
- Assert(current == this->dofs_per_cell, ExcInternalError());
+ Assert(current == this->n_dofs_per_cell(), ExcInternalError());
}
Assert(support_point_values.size() == this->generalized_support_points.size(),
ExcDimensionMismatch(support_point_values.size(),
this->generalized_support_points.size()));
- Assert(nodal_values.size() == this->dofs_per_cell,
- ExcDimensionMismatch(nodal_values.size(), this->dofs_per_cell));
+ Assert(nodal_values.size() == this->n_dofs_per_cell(),
+ ExcDimensionMismatch(nodal_values.size(), this->n_dofs_per_cell()));
Assert(support_point_values[0].size() == this->n_components(),
ExcDimensionMismatch(support_point_values[0].size(),
this->n_components()));
}
// The remaining points form dim chunks, one for each component.
- const unsigned int istep = (this->dofs_per_cell - fbase) / dim;
- Assert((this->dofs_per_cell - fbase) % dim == 0, ExcInternalError());
+ const unsigned int istep = (this->n_dofs_per_cell() - fbase) / dim;
+ Assert((this->n_dofs_per_cell() - fbase) % dim == 0, ExcInternalError());
f = 0;
- while (fbase < this->dofs_per_cell)
+ while (fbase < this->n_dofs_per_cell())
{
for (unsigned int i = 0; i < istep; ++i)
{
fbase += istep;
++f;
}
- Assert(fbase == this->dofs_per_cell, ExcInternalError());
+ Assert(fbase == this->n_dofs_per_cell(), ExcInternalError());
}
if (fourier_transform_matrices[fe].m() == 0)
{
- fourier_transform_matrices[fe].reinit(n_coefficients_per_direction[fe],
- fe_collection[fe].dofs_per_cell);
+ fourier_transform_matrices[fe].reinit(
+ n_coefficients_per_direction[fe],
+ fe_collection[fe].n_dofs_per_cell());
for (unsigned int k = 0; k < n_coefficients_per_direction[fe]; ++k)
- for (unsigned int j = 0; j < fe_collection[fe].dofs_per_cell; ++j)
+ for (unsigned int j = 0; j < fe_collection[fe].n_dofs_per_cell(); ++j)
fourier_transform_matrices[fe](k, j) =
integrate(fe_collection[fe], q_collection[fe], k_vectors(k), j);
}
{
fourier_transform_matrices[fe].reinit(
Utilities::fixed_power<2>(n_coefficients_per_direction[fe]),
- fe_collection[fe].dofs_per_cell);
+ fe_collection[fe].n_dofs_per_cell());
unsigned int k = 0;
for (unsigned int k1 = 0; k1 < n_coefficients_per_direction[fe]; ++k1)
for (unsigned int k2 = 0; k2 < n_coefficients_per_direction[fe];
++k2, ++k)
- for (unsigned int j = 0; j < fe_collection[fe].dofs_per_cell; ++j)
+ for (unsigned int j = 0; j < fe_collection[fe].n_dofs_per_cell();
+ ++j)
fourier_transform_matrices[fe](k, j) = integrate(
fe_collection[fe], q_collection[fe], k_vectors(k1, k2), j);
}
{
fourier_transform_matrices[fe].reinit(
Utilities::fixed_power<3>(n_coefficients_per_direction[fe]),
- fe_collection[fe].dofs_per_cell);
+ fe_collection[fe].n_dofs_per_cell());
unsigned int k = 0;
for (unsigned int k1 = 0; k1 < n_coefficients_per_direction[fe]; ++k1)
for (unsigned int k2 = 0; k2 < n_coefficients_per_direction[fe]; ++k2)
for (unsigned int k3 = 0; k3 < n_coefficients_per_direction[fe];
++k3, ++k)
- for (unsigned int j = 0; j < fe_collection[fe].dofs_per_cell; ++j)
+ for (unsigned int j = 0; j < fe_collection[fe].n_dofs_per_cell();
+ ++j)
fourier_transform_matrices[fe](k, j) =
integrate(fe_collection[fe],
q_collection[fe],
if (legendre_transform_matrices[fe].m() == 0)
{
- legendre_transform_matrices[fe].reinit(n_coefficients_per_direction[fe],
- fe_collection[fe].dofs_per_cell);
+ legendre_transform_matrices[fe].reinit(
+ n_coefficients_per_direction[fe],
+ fe_collection[fe].n_dofs_per_cell());
for (unsigned int k = 0; k < n_coefficients_per_direction[fe]; ++k)
- for (unsigned int j = 0; j < fe_collection[fe].dofs_per_cell; ++j)
+ for (unsigned int j = 0; j < fe_collection[fe].n_dofs_per_cell(); ++j)
legendre_transform_matrices[fe](k, j) = integrate(
fe_collection[fe], q_collection[fe], TableIndices<1>(k), j);
}
{
legendre_transform_matrices[fe].reinit(
Utilities::fixed_power<2>(n_coefficients_per_direction[fe]),
- fe_collection[fe].dofs_per_cell);
+ fe_collection[fe].n_dofs_per_cell());
unsigned int k = 0;
for (unsigned int k1 = 0; k1 < n_coefficients_per_direction[fe]; ++k1)
for (unsigned int k2 = 0; k2 < n_coefficients_per_direction[fe];
++k2, k++)
- for (unsigned int j = 0; j < fe_collection[fe].dofs_per_cell; ++j)
+ for (unsigned int j = 0; j < fe_collection[fe].n_dofs_per_cell();
+ ++j)
legendre_transform_matrices[fe](k, j) =
integrate(fe_collection[fe],
q_collection[fe],
{
legendre_transform_matrices[fe].reinit(
Utilities::fixed_power<3>(n_coefficients_per_direction[fe]),
- fe_collection[fe].dofs_per_cell);
+ fe_collection[fe].n_dofs_per_cell());
unsigned int k = 0;
for (unsigned int k1 = 0; k1 < n_coefficients_per_direction[fe]; ++k1)
for (unsigned int k2 = 0; k2 < n_coefficients_per_direction[fe]; ++k2)
for (unsigned int k3 = 0; k3 < n_coefficients_per_direction[fe];
++k3, k++)
- for (unsigned int j = 0; j < fe_collection[fe].dofs_per_cell; ++j)
+ for (unsigned int j = 0; j < fe_collection[fe].n_dofs_per_cell();
+ ++j)
legendre_transform_matrices[fe](k, j) =
integrate(fe_collection[fe],
q_collection[fe],
FESystem<dim, spacedim>::shape_value(const unsigned int i,
const Point<dim> & p) const
{
- AssertIndexRange(i, this->dofs_per_cell);
+ AssertIndexRange(i, this->n_dofs_per_cell());
Assert(this->is_primitive(i),
(typename FiniteElement<dim, spacedim>::ExcShapeFunctionNotPrimitive(
i)));
const Point<dim> & p,
const unsigned int component) const
{
- AssertIndexRange(i, this->dofs_per_cell);
+ AssertIndexRange(i, this->n_dofs_per_cell());
AssertIndexRange(component, this->n_components());
// if this value is supposed to be
FESystem<dim, spacedim>::shape_grad(const unsigned int i,
const Point<dim> & p) const
{
- AssertIndexRange(i, this->dofs_per_cell);
+ AssertIndexRange(i, this->n_dofs_per_cell());
Assert(this->is_primitive(i),
(typename FiniteElement<dim, spacedim>::ExcShapeFunctionNotPrimitive(
i)));
const Point<dim> & p,
const unsigned int component) const
{
- AssertIndexRange(i, this->dofs_per_cell);
+ AssertIndexRange(i, this->n_dofs_per_cell());
AssertIndexRange(component, this->n_components());
// if this value is supposed to be zero, then return right away...
FESystem<dim, spacedim>::shape_grad_grad(const unsigned int i,
const Point<dim> & p) const
{
- AssertIndexRange(i, this->dofs_per_cell);
+ AssertIndexRange(i, this->n_dofs_per_cell());
Assert(this->is_primitive(i),
(typename FiniteElement<dim, spacedim>::ExcShapeFunctionNotPrimitive(
i)));
const Point<dim> & p,
const unsigned int component) const
{
- AssertIndexRange(i, this->dofs_per_cell);
+ AssertIndexRange(i, this->n_dofs_per_cell());
AssertIndexRange(component, this->n_components());
// if this value is supposed to be zero, then return right away...
FESystem<dim, spacedim>::shape_3rd_derivative(const unsigned int i,
const Point<dim> & p) const
{
- AssertIndexRange(i, this->dofs_per_cell);
+ AssertIndexRange(i, this->n_dofs_per_cell());
Assert(this->is_primitive(i),
(typename FiniteElement<dim, spacedim>::ExcShapeFunctionNotPrimitive(
i)));
const Point<dim> & p,
const unsigned int component) const
{
- AssertIndexRange(i, this->dofs_per_cell);
+ AssertIndexRange(i, this->n_dofs_per_cell());
AssertIndexRange(component, this->n_components());
// if this value is supposed to be zero, then return right away...
FESystem<dim, spacedim>::shape_4th_derivative(const unsigned int i,
const Point<dim> & p) const
{
- AssertIndexRange(i, this->dofs_per_cell);
+ AssertIndexRange(i, this->n_dofs_per_cell());
Assert(this->is_primitive(i),
(typename FiniteElement<dim, spacedim>::ExcShapeFunctionNotPrimitive(
i)));
const Point<dim> & p,
const unsigned int component) const
{
- AssertIndexRange(i, this->dofs_per_cell);
+ AssertIndexRange(i, this->n_dofs_per_cell());
AssertIndexRange(component, this->n_components());
// if this value is supposed to be zero, then return right away...
// reasons, if you call matrix.reinit(8,0), it sets the sizes
// to m==n==0 internally. this may happen when we use a FE_Nothing,
// so write the test in a more lenient way
- Assert((interpolation_matrix.m() == this->dofs_per_cell) ||
- (x_source_fe.dofs_per_cell == 0),
- ExcDimensionMismatch(interpolation_matrix.m(), this->dofs_per_cell));
- Assert((interpolation_matrix.n() == x_source_fe.dofs_per_cell) ||
- (this->dofs_per_cell == 0),
+ Assert((interpolation_matrix.m() == this->n_dofs_per_cell()) ||
+ (x_source_fe.n_dofs_per_cell() == 0),
ExcDimensionMismatch(interpolation_matrix.m(),
- x_source_fe.dofs_per_cell));
+ this->n_dofs_per_cell()));
+ Assert((interpolation_matrix.n() == x_source_fe.n_dofs_per_cell()) ||
+ (this->n_dofs_per_cell() == 0),
+ ExcDimensionMismatch(interpolation_matrix.m(),
+ x_source_fe.n_dofs_per_cell()));
// there are certain conditions that the two elements have to satisfy so
// that this can work.
std::vector<FullMatrix<double>> base_matrices(this->n_base_elements());
for (unsigned int i = 0; i < this->n_base_elements(); ++i)
{
- base_matrices[i].reinit(base_element(i).dofs_per_cell,
- source_fe.base_element(i).dofs_per_cell);
+ base_matrices[i].reinit(base_element(i).n_dofs_per_cell(),
+ source_fe.base_element(i).n_dofs_per_cell());
base_element(i).get_interpolation_matrix(source_fe.base_element(i),
base_matrices[i]);
}
// different bases (or multiplicity indices) are really zero. then assign
// entries
interpolation_matrix = 0;
- for (unsigned int i = 0; i < this->dofs_per_cell; ++i)
- for (unsigned int j = 0; j < source_fe.dofs_per_cell; ++j)
+ for (unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
+ for (unsigned int j = 0; j < source_fe.n_dofs_per_cell(); ++j)
if (this->system_to_base_table[i].first ==
source_fe.system_to_base_table[j].first)
interpolation_matrix(i, j) =
// check if updated while waiting for lock
if (this->restriction[refinement_case - 1][child].n() ==
- this->dofs_per_cell)
+ this->n_dofs_per_cell())
return this->restriction[refinement_case - 1][child];
// Check if some of the matrices of the base elements are void.
{
base_matrices[i] =
&base_element(i).get_restriction_matrix(child, refinement_case);
- if (base_matrices[i]->n() != base_element(i).dofs_per_cell)
+ if (base_matrices[i]->n() != base_element(i).n_dofs_per_cell())
do_restriction = false;
}
Assert(do_restriction,
// if we did not encounter void matrices, initialize the matrix sizes
if (do_restriction)
{
- FullMatrix<double> restriction(this->dofs_per_cell,
- this->dofs_per_cell);
+ FullMatrix<double> restriction(this->n_dofs_per_cell(),
+ this->n_dofs_per_cell());
// distribute the matrices of the base finite elements to the
// matrices of this object. for this, loop over all degrees of
// note that we by definition of a base element, they are
// independent, i.e. do not couple. only DoFs that belong to the
// same instance of a base element may couple
- for (unsigned int i = 0; i < this->dofs_per_cell; ++i)
- for (unsigned int j = 0; j < this->dofs_per_cell; ++j)
+ for (unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
+ for (unsigned int j = 0; j < this->n_dofs_per_cell(); ++j)
{
// first find out to which base element indices i and j
// belong, and which instance thereof in case the base element
std::lock_guard<std::mutex> lock(this->mutex);
if (this->prolongation[refinement_case - 1][child].n() ==
- this->dofs_per_cell)
+ this->n_dofs_per_cell())
return this->prolongation[refinement_case - 1][child];
bool do_prolongation = true;
{
base_matrices[i] =
&base_element(i).get_prolongation_matrix(child, refinement_case);
- if (base_matrices[i]->n() != base_element(i).dofs_per_cell)
+ if (base_matrices[i]->n() != base_element(i).n_dofs_per_cell())
do_prolongation = false;
}
Assert(do_prolongation,
if (do_prolongation)
{
- FullMatrix<double> prolongate(this->dofs_per_cell,
- this->dofs_per_cell);
+ FullMatrix<double> prolongate(this->n_dofs_per_cell(),
+ this->n_dofs_per_cell());
- for (unsigned int i = 0; i < this->dofs_per_cell; ++i)
- for (unsigned int j = 0; j < this->dofs_per_cell; ++j)
+ for (unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
+ for (unsigned int j = 0; j < this->n_dofs_per_cell(); ++j)
{
if (this->system_to_base_table[i].first !=
this->system_to_base_table[j].first)
// to the one we're interested in -- crude, maybe, but works for now
const std::pair<std::pair<unsigned int, unsigned int>, unsigned int> target =
std::make_pair(face_base_index.first, base_face_to_cell_index);
- for (unsigned int i = 0; i < this->dofs_per_cell; ++i)
+ for (unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
if (this->system_to_base_index(i) == target)
return i;
// also in case we detected a cell similarity (but no heavy work will
// be done inside the individual elements in case we have a
// translation and simple elements).
- for (unsigned int system_index = 0; system_index < this->dofs_per_cell;
+ for (unsigned int system_index = 0;
+ system_index < this->n_dofs_per_cell();
++system_index)
if (this->system_to_base_table[system_index].first.first == base_no)
{
const unsigned int base_index =
this->system_to_base_table[system_index].second;
- Assert(base_index < base_fe.dofs_per_cell, ExcInternalError());
+ Assert(base_index < base_fe.n_dofs_per_cell(),
+ ExcInternalError());
// now copy. if the shape function is primitive, then there
// is only one value to be copied, but for non-primitive
// order is the same as for the first vertex of the whole cell,
// so we can use the system_to_base_table variable (using the
// face_s_t_base_t function would yield the same)
- if (m < this->dofs_per_vertex)
+ if (m < this->n_dofs_per_vertex())
m_index = this->system_to_base_table[m];
else
// then come the two sets of line indices
{
const unsigned int index_in_line =
- (m - this->dofs_per_vertex) % this->dofs_per_line;
+ (m - this->n_dofs_per_vertex()) % this->dofs_per_line;
const unsigned int sub_line =
- (m - this->dofs_per_vertex) / this->dofs_per_line;
+ (m - this->n_dofs_per_vertex()) / this->dofs_per_line;
Assert(sub_line < 2, ExcInternalError());
// from this information, try to get base element and
// corresponding face index of m in the present element,
// then use face_system_to_base_table
const unsigned int tmp1 =
- 2 * this->dofs_per_vertex + index_in_line;
+ 2 * this->n_dofs_per_vertex() + index_in_line;
m_index.first = this->face_system_to_base_table[tmp1].first;
// what we are still missing is the index of m within the
// dof, we can construct the rest: tmp2 will denote the
// index of this shape function among the line shape
// functions:
- Assert(
- this->face_system_to_base_table[tmp1].second >=
- 2 * base_element(m_index.first.first).dofs_per_vertex,
- ExcInternalError());
+ Assert(this->face_system_to_base_table[tmp1].second >=
+ 2 * base_element(m_index.first.first)
+ .n_dofs_per_vertex(),
+ ExcInternalError());
const unsigned int tmp2 =
this->face_system_to_base_table[tmp1].second -
- 2 * base_element(m_index.first.first).dofs_per_vertex;
+ 2 * base_element(m_index.first.first).n_dofs_per_vertex();
Assert(tmp2 <
base_element(m_index.first.first).dofs_per_line,
ExcInternalError());
m_index.second =
- base_element(m_index.first.first).dofs_per_vertex +
+ base_element(m_index.first.first).n_dofs_per_vertex() +
base_element(m_index.first.first).dofs_per_line *
sub_line +
tmp2;
// the indices m=0..5*d_v-1 are from the center and the four
// subline vertices. their order is the same as for the first
// vertex of the whole cell, so we can use the simple arithmetic
- if (m < 5 * this->dofs_per_vertex)
+ if (m < 5 * this->n_dofs_per_vertex())
m_index = this->system_to_base_table[m];
else
// then come the 12 sets of line indices
- if (m < 5 * this->dofs_per_vertex + 12 * this->dofs_per_line)
+ if (m <
+ 5 * this->n_dofs_per_vertex() + 12 * this->dofs_per_line)
{
// for the meaning of all this, see the 2d part
const unsigned int index_in_line =
- (m - 5 * this->dofs_per_vertex) % this->dofs_per_line;
+ (m - 5 * this->n_dofs_per_vertex()) % this->dofs_per_line;
const unsigned int sub_line =
- (m - 5 * this->dofs_per_vertex) / this->dofs_per_line;
+ (m - 5 * this->n_dofs_per_vertex()) / this->dofs_per_line;
Assert(sub_line < 12, ExcInternalError());
const unsigned int tmp1 =
- 4 * this->dofs_per_vertex + index_in_line;
+ 4 * this->n_dofs_per_vertex() + index_in_line;
m_index.first = this->face_system_to_base_table[tmp1].first;
- Assert(
- this->face_system_to_base_table[tmp1].second >=
- 4 * base_element(m_index.first.first).dofs_per_vertex,
- ExcInternalError());
+ Assert(this->face_system_to_base_table[tmp1].second >=
+ 4 * base_element(m_index.first.first)
+ .n_dofs_per_vertex(),
+ ExcInternalError());
const unsigned int tmp2 =
this->face_system_to_base_table[tmp1].second -
- 4 * base_element(m_index.first.first).dofs_per_vertex;
+ 4 * base_element(m_index.first.first).n_dofs_per_vertex();
Assert(tmp2 <
base_element(m_index.first.first).dofs_per_line,
ExcInternalError());
m_index.second =
- 5 * base_element(m_index.first.first).dofs_per_vertex +
+ 5 *
+ base_element(m_index.first.first).n_dofs_per_vertex() +
base_element(m_index.first.first).dofs_per_line *
sub_line +
tmp2;
{
// for the meaning of all this, see the 2d part
const unsigned int index_in_quad =
- (m - 5 * this->dofs_per_vertex -
+ (m - 5 * this->n_dofs_per_vertex() -
12 * this->dofs_per_line) %
this->dofs_per_quad;
Assert(index_in_quad < this->dofs_per_quad,
ExcInternalError());
const unsigned int sub_quad =
- ((m - 5 * this->dofs_per_vertex -
+ ((m - 5 * this->n_dofs_per_vertex() -
12 * this->dofs_per_line) /
this->dofs_per_quad);
Assert(sub_quad < 4, ExcInternalError());
- const unsigned int tmp1 = 4 * this->dofs_per_vertex +
+ const unsigned int tmp1 = 4 * this->n_dofs_per_vertex() +
4 * this->dofs_per_line +
index_in_quad;
Assert(tmp1 < this->face_system_to_base_table.size(),
Assert(
this->face_system_to_base_table[tmp1].second >=
- 4 * base_element(m_index.first.first).dofs_per_vertex +
+ 4 * base_element(m_index.first.first)
+ .n_dofs_per_vertex() +
4 * base_element(m_index.first.first).dofs_per_line,
ExcInternalError());
const unsigned int tmp2 =
this->face_system_to_base_table[tmp1].second -
- 4 * base_element(m_index.first.first).dofs_per_vertex -
+ 4 *
+ base_element(m_index.first.first).n_dofs_per_vertex() -
4 * base_element(m_index.first.first).dofs_per_line;
Assert(tmp2 <
base_element(m_index.first.first).dofs_per_quad,
ExcInternalError());
m_index.second =
- 5 * base_element(m_index.first.first).dofs_per_vertex +
+ 5 *
+ base_element(m_index.first.first).n_dofs_per_vertex() +
12 * base_element(m_index.first.first).dofs_per_line +
base_element(m_index.first.first).dofs_per_quad *
sub_quad +
{
// If the system is not primitive, these have not been initialized by
// FiniteElement
- this->system_to_component_table.resize(this->dofs_per_cell);
+ this->system_to_component_table.resize(this->n_dofs_per_cell());
this->face_system_to_component_table.resize(this->dofs_per_face);
FETools::Compositing::build_cell_tables(this->system_to_base_table,
// logic.
for (unsigned int base_el = 0; base_el < this->n_base_elements(); ++base_el)
if (!base_element(base_el).has_support_points() &&
- base_element(base_el).dofs_per_cell != 0)
+ base_element(base_el).n_dofs_per_cell() != 0)
{
this->unit_support_points.resize(0);
return;
}
// generate unit support points from unit support points of sub elements
- this->unit_support_points.resize(this->dofs_per_cell);
+ this->unit_support_points.resize(this->n_dofs_per_cell());
- for (unsigned int i = 0; i < this->dofs_per_cell; ++i)
+ for (unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
{
const unsigned int base = this->system_to_base_table[i].first.first,
base_index = this->system_to_base_table[i].second;
Point<dim>
FESystem<dim, spacedim>::unit_support_point(const unsigned int index) const
{
- AssertIndexRange(index, this->dofs_per_cell);
- Assert((this->unit_support_points.size() == this->dofs_per_cell) ||
+ AssertIndexRange(index, this->n_dofs_per_cell());
+ Assert((this->unit_support_points.size() == this->n_dofs_per_cell()) ||
(this->unit_support_points.size() == 0),
(typename FiniteElement<dim, spacedim>::ExcFEHasNoSupportPoints()));
// Note that this->n_components() is actually only an estimate of how many
// constant modes we will need. There might be more than one such mode
// (e.g. FE_Q_DG0).
- Table<2, bool> constant_modes(this->n_components(), this->dofs_per_cell);
+ Table<2, bool> constant_modes(this->n_components(), this->n_dofs_per_cell());
std::vector<unsigned int> components;
for (unsigned int i = 0; i < base_elements.size(); ++i)
{
element_multiplicity,
constant_modes.n_cols());
for (unsigned int r = 0; r < comp; ++r)
- for (unsigned int c = 0; c < this->dofs_per_cell; ++c)
+ for (unsigned int c = 0; c < this->n_dofs_per_cell(); ++c)
new_constant_modes(r, c) = constant_modes(r, c);
constant_modes.swap(new_constant_modes);
}
// next, fill the constant modes from the individual components as well
// as the component numbers corresponding to the constant mode rows
- for (unsigned int k = 0; k < this->dofs_per_cell; ++k)
+ for (unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
{
std::pair<std::pair<unsigned int, unsigned int>, unsigned int> ind =
this->system_to_base_index(k);
AssertDimension(point_values.size(),
this->get_generalized_support_points().size());
- AssertDimension(dof_values.size(), this->dofs_per_cell);
+ AssertDimension(dof_values.size(), this->n_dofs_per_cell());
std::vector<double> base_dof_values;
std::vector<Vector<double>> base_point_values;
// number of components we're dealing with.
const auto & base_element = this->base_element(base);
const unsigned int multiplicity = this->element_multiplicity(base);
- const unsigned int n_base_dofs = base_element.dofs_per_cell;
+ const unsigned int n_base_dofs = base_element.n_dofs_per_cell();
const unsigned int n_base_components = base_element.n_components();
// If the number of base degrees of freedom is zero, there is nothing
// function, but that doesn't exist -- just do it by using the
// reverse table -- the amount of work done here is not worth
// trying to optimizing this.
- for (unsigned int i = 0; i < this->dofs_per_cell; ++i)
+ for (unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
if (this->system_to_base_index(i).first ==
std::make_pair(base, m))
dof_values[i] =
// reverse table -- the amount of work done here is not worth
// trying to optimizing this.
for (unsigned int m = 0; m < multiplicity; ++m)
- for (unsigned int i = 0; i < this->dofs_per_cell; ++i)
+ for (unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
if (this->system_to_base_index(i).first ==
std::make_pair(base, m))
dof_values[i] = std::numeric_limits<double>::signaling_NaN();
// initialize unit support points (this makes it possible to assign initial
// values to FE_TraceQ). Note that we simply take the points of fe_q but
// skip the last ones which are associated with the interior of FE_Q.
- this->unit_support_points.resize(this->dofs_per_cell);
- for (unsigned int i = 0; i < this->dofs_per_cell; ++i)
+ this->unit_support_points.resize(this->n_dofs_per_cell());
+ for (unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
this->unit_support_points[i] = fe_q.get_unit_support_points()[i];
// Initialize constraint matrices
const unsigned int shape_index,
const unsigned int face_index) const
{
- AssertIndexRange(shape_index, this->dofs_per_cell);
+ AssertIndexRange(shape_index, this->n_dofs_per_cell());
AssertIndexRange(face_index, GeometryInfo<dim>::faces_per_cell);
// FE_TraceQ shares the numbering of elemental degrees of freedom with FE_Q
// except for the missing interior ones (quad dofs in 2D and hex dofs in
// 3D). Therefore, it is safe to ask fe_q for the corresponding
- // information. The assertion 'shape_index < this->dofs_per_cell' will make
- // sure that we only access the trace dofs.
+ // information. The assertion 'shape_index < this->n_dofs_per_cell()' will
+ // make sure that we only access the trace dofs.
return fe_q.has_support_on_face(shape_index, face_index);
}
std::pair<Table<2, bool>, std::vector<unsigned int>>
FE_TraceQ<dim, spacedim>::get_constant_modes() const
{
- Table<2, bool> constant_modes(1, this->dofs_per_cell);
- for (unsigned int i = 0; i < this->dofs_per_cell; ++i)
+ Table<2, bool> constant_modes(1, this->n_dofs_per_cell());
+ for (unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
constant_modes(0, i) = true;
return std::pair<Table<2, bool>, std::vector<unsigned int>>(
constant_modes, std::vector<unsigned int>(1, 0));
AssertDimension(support_point_values.size(),
this->get_unit_support_points().size());
AssertDimension(support_point_values.size(), nodal_values.size());
- AssertDimension(this->dofs_per_cell, nodal_values.size());
+ AssertDimension(this->n_dofs_per_cell(), nodal_values.size());
- for (unsigned int i = 0; i < this->dofs_per_cell; ++i)
+ for (unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
{
AssertDimension(support_point_values[i].size(), 1);
make_shape_function_to_row_table(const FiniteElement<dim, spacedim> &fe)
{
std::vector<unsigned int> shape_function_to_row_table(
- fe.dofs_per_cell * fe.n_components(), numbers::invalid_unsigned_int);
+ fe.n_dofs_per_cell() * fe.n_components(), numbers::invalid_unsigned_int);
unsigned int row = 0;
- for (unsigned int i = 0; i < fe.dofs_per_cell; ++i)
+ for (unsigned int i = 0; i < fe.n_dofs_per_cell(); ++i)
{
// loop over all components that are nonzero for this particular
// shape function. if a component is zero then we leave the
const unsigned int component)
: fe_values(&fe_values)
, component(component)
- , shape_function_data(this->fe_values->fe->dofs_per_cell)
+ , shape_function_data(this->fe_values->fe->n_dofs_per_cell())
{
const FiniteElement<dim, spacedim> &fe = *this->fe_values->fe;
AssertIndexRange(component, fe.n_components());
const std::vector<unsigned int> shape_function_to_row_table =
dealii::internal::make_shape_function_to_row_table(fe);
- for (unsigned int i = 0; i < fe.dofs_per_cell; ++i)
+ for (unsigned int i = 0; i < fe.n_dofs_per_cell(); ++i)
{
const bool is_primitive = fe.is_primitive() || fe.is_primitive(i);
const unsigned int first_vector_component)
: fe_values(&fe_values)
, first_vector_component(first_vector_component)
- , shape_function_data(this->fe_values->fe->dofs_per_cell)
+ , shape_function_data(this->fe_values->fe->n_dofs_per_cell())
{
const FiniteElement<dim, spacedim> &fe = *this->fe_values->fe;
AssertIndexRange(first_vector_component + spacedim - 1, fe.n_components());
{
const unsigned int component = first_vector_component + d;
- for (unsigned int i = 0; i < fe.dofs_per_cell; ++i)
+ for (unsigned int i = 0; i < fe.n_dofs_per_cell(); ++i)
{
const bool is_primitive = fe.is_primitive() || fe.is_primitive(i);
}
}
- for (unsigned int i = 0; i < fe.dofs_per_cell; ++i)
+ for (unsigned int i = 0; i < fe.n_dofs_per_cell(); ++i)
{
unsigned int n_nonzero_components = 0;
for (unsigned int d = 0; d < spacedim; ++d)
const unsigned int first_tensor_component)
: fe_values(&fe_values)
, first_tensor_component(first_tensor_component)
- , shape_function_data(this->fe_values->fe->dofs_per_cell)
+ , shape_function_data(this->fe_values->fe->n_dofs_per_cell())
{
const FiniteElement<dim, spacedim> &fe = *this->fe_values->fe;
Assert(first_tensor_component + (dim * dim + dim) / 2 - 1 <
{
const unsigned int component = first_tensor_component + d;
- for (unsigned int i = 0; i < fe.dofs_per_cell; ++i)
+ for (unsigned int i = 0; i < fe.n_dofs_per_cell(); ++i)
{
const bool is_primitive = fe.is_primitive() || fe.is_primitive(i);
}
}
- for (unsigned int i = 0; i < fe.dofs_per_cell; ++i)
+ for (unsigned int i = 0; i < fe.n_dofs_per_cell(); ++i)
{
unsigned int n_nonzero_components = 0;
for (unsigned int d = 0;
const unsigned int first_tensor_component)
: fe_values(&fe_values)
, first_tensor_component(first_tensor_component)
- , shape_function_data(this->fe_values->fe->dofs_per_cell)
+ , shape_function_data(this->fe_values->fe->n_dofs_per_cell())
{
const FiniteElement<dim, spacedim> &fe = *this->fe_values->fe;
AssertIndexRange(first_tensor_component + dim * dim - 1, fe.n_components());
{
const unsigned int component = first_tensor_component + d;
- for (unsigned int i = 0; i < fe.dofs_per_cell; ++i)
+ for (unsigned int i = 0; i < fe.n_dofs_per_cell(); ++i)
{
const bool is_primitive = fe.is_primitive() || fe.is_primitive(i);
}
}
- for (unsigned int i = 0; i < fe.dofs_per_cell; ++i)
+ for (unsigned int i = 0; i < fe.n_dofs_per_cell(); ++i)
{
unsigned int n_nonzero_components = 0;
for (unsigned int d = 0; d < dim * dim; ++d)
Assert(cell->is_active(), ExcNotImplemented());
std::vector<types::global_dof_index> dof_indices(
- cell->get_fe().dofs_per_cell);
+ cell->get_fe().n_dofs_per_cell());
cell->get_dof_indices(dof_indices);
- for (unsigned int i = 0; i < cell->get_fe().dofs_per_cell; ++i)
+ for (unsigned int i = 0; i < cell->get_fe().n_dofs_per_cell(); ++i)
out[i] = (in.is_element(dof_indices[i]) ? 1 : 0);
}
// count the total number of non-zero components accumulated
// over all shape functions
unsigned int n_nonzero_shape_components = 0;
- for (unsigned int i = 0; i < fe.dofs_per_cell; ++i)
+ for (unsigned int i = 0; i < fe.n_dofs_per_cell(); ++i)
n_nonzero_shape_components += fe.n_nonzero_components(i);
- Assert(n_nonzero_shape_components >= fe.dofs_per_cell,
+ Assert(n_nonzero_shape_components >= fe.n_dofs_per_cell(),
ExcInternalError());
// with the number of rows now known, initialize those fields
// see if there the current cell has DoFs at all, and if not
// then there is nothing else to do.
- const unsigned int dofs_per_cell = fe.dofs_per_cell;
+ const unsigned int dofs_per_cell = fe.n_dofs_per_cell();
if (dofs_per_cell == 0)
return;
// see if there the current cell has DoFs at all, and if not
// then there is nothing else to do.
- const unsigned int dofs_per_cell = fe.dofs_per_cell;
+ const unsigned int dofs_per_cell = fe.n_dofs_per_cell();
if (dofs_per_cell == 0)
return;
// see if there the current cell has DoFs at all, and if not
// then there is nothing else to do.
- const unsigned int dofs_per_cell = fe.dofs_per_cell;
+ const unsigned int dofs_per_cell = fe.n_dofs_per_cell();
if (dofs_per_cell == 0)
return;
const Quadrature<dim> & q,
const UpdateFlags update_flags)
: FEValuesBase<dim, spacedim>(q.size(),
- fe.dofs_per_cell,
+ fe.n_dofs_per_cell(),
update_default,
mapping,
fe)
const Quadrature<dim> & q,
const UpdateFlags update_flags)
: FEValuesBase<dim, spacedim>(q.size(),
- fe.dofs_per_cell,
+ fe.n_dofs_per_cell(),
update_default,
StaticMappingQ1<dim, spacedim>::mapping,
fe)
const Quadrature<dim - 1> & quadrature,
const UpdateFlags update_flags)
: FEFaceValuesBase<dim, spacedim>(quadrature.size(),
- fe.dofs_per_cell,
+ fe.n_dofs_per_cell(),
update_flags,
mapping,
fe,
const Quadrature<dim - 1> & quadrature,
const UpdateFlags update_flags)
: FEFaceValuesBase<dim, spacedim>(quadrature.size(),
- fe.dofs_per_cell,
+ fe.n_dofs_per_cell(),
update_flags,
StaticMappingQ1<dim, spacedim>::mapping,
fe,
const Quadrature<dim - 1> & quadrature,
const UpdateFlags update_flags)
: FEFaceValuesBase<dim, spacedim>(quadrature.size(),
- fe.dofs_per_cell,
+ fe.n_dofs_per_cell(),
update_flags,
mapping,
fe,
const Quadrature<dim - 1> & quadrature,
const UpdateFlags update_flags)
: FEFaceValuesBase<dim, spacedim>(quadrature.size(),
- fe.dofs_per_cell,
+ fe.n_dofs_per_cell(),
update_flags,
StaticMappingQ1<dim, spacedim>::mapping,
fe,
InternalData(const FiniteElement<dim, spacedim> &fe,
const ComponentMask & mask)
: unit_tangentials()
- , n_shape_functions(fe.dofs_per_cell)
+ , n_shape_functions(fe.n_dofs_per_cell())
, mask(mask)
- , local_dof_indices(fe.dofs_per_cell)
- , local_dof_values(fe.dofs_per_cell)
+ , local_dof_indices(fe.n_dofs_per_cell())
+ , local_dof_values(fe.n_dofs_per_cell())
{}
std::lock_guard<std::mutex> lock(fe_values_mutex);
fe_values.reinit(dof_cell);
}
- const unsigned int dofs_per_cell = euler_dof_handler->get_fe().dofs_per_cell;
+ const unsigned int dofs_per_cell =
+ euler_dof_handler->get_fe().n_dofs_per_cell();
std::vector<types::global_dof_index> dof_indices(dofs_per_cell);
if (uses_level_dofs)
dof_cell->get_mg_dof_indices(dof_indices);
// now get the values of the shift vectors at the vertices
Vector<typename VectorType::value_type> mapping_values(
- shiftmap_dof_handler->get_fe().dofs_per_cell);
+ shiftmap_dof_handler->get_fe().n_dofs_per_cell());
dof_cell->get_dof_values(*euler_transform_vectors, mapping_values);
for (const unsigned int i : GeometryInfo<dim>::vertex_indices())
n_support_pts, Vector<typename VectorType::value_type>(n_components));
std::vector<types::global_dof_index> dof_indices(
- mapping_q_eulerian.euler_dof_handler->get_fe(0).dofs_per_cell);
+ mapping_q_eulerian.euler_dof_handler->get_fe(0).n_dofs_per_cell());
// fill shift vector for each support point using an fe_values object. make
// sure that the fe_values variable isn't used simultaneously from different
// threads
// cells including ghost cells
if (cell->is_artificial() == false)
{
- const unsigned int n_dofs_per_cell = cell->get_fe().dofs_per_cell;
+ const unsigned int n_dofs_per_cell =
+ cell->get_fe().n_dofs_per_cell();
local_dof_indices.resize(n_dofs_per_cell);
// Take care of adding cell pointer to each
// dofs_per_line returns number of dofs
// on line not including the vertices of the line.
const unsigned int n_dofs_per_line =
- 2 * cell->get_fe().dofs_per_vertex +
+ 2 * cell->get_fe().n_dofs_per_vertex() +
cell->get_fe().dofs_per_line;
local_line_dof_indices.resize(n_dofs_per_line);
// dofs_per_line returns number of dofs
// on line not including the vertices of the line.
const unsigned int n_dofs_per_line =
- 2 * cell->get_fe().dofs_per_vertex +
+ 2 * cell->get_fe().n_dofs_per_vertex() +
cell->get_fe().dofs_per_line;
local_line_dof_indices.resize(n_dofs_per_line);
ExcInternalError());
const unsigned int n_dofs_per_line =
- 2 * cell->get_fe().dofs_per_vertex +
+ 2 * cell->get_fe().n_dofs_per_vertex() +
cell->get_fe().dofs_per_line;
local_line_dof_indices.resize(n_dofs_per_line);
, neighbor_cell_update_flags(update_flags)
, face_update_flags(face_update_flags)
, neighbor_face_update_flags(face_update_flags)
- , local_dof_indices(fe.dofs_per_cell)
- , neighbor_dof_indices(fe.dofs_per_cell)
+ , local_dof_indices(fe.n_dofs_per_cell())
+ , neighbor_dof_indices(fe.n_dofs_per_cell())
{}
, neighbor_cell_update_flags(neighbor_update_flags)
, face_update_flags(face_update_flags)
, neighbor_face_update_flags(neighbor_face_update_flags)
- , local_dof_indices(fe.dofs_per_cell)
- , neighbor_dof_indices(fe.dofs_per_cell)
+ , local_dof_indices(fe.n_dofs_per_cell())
+ , neighbor_dof_indices(fe.n_dofs_per_cell())
{}
*mapping, *fe, face_quadrature, face_update_flags);
fe_face_values->reinit(cell, face_no);
- local_dof_indices.resize(fe->dofs_per_cell);
+ local_dof_indices.resize(fe->n_dofs_per_cell());
cell->get_dof_indices(local_dof_indices);
current_fe_values = fe_face_values.get();
return *fe_face_values;
fe_subface_values = std::make_unique<FESubfaceValues<dim, spacedim>>(
*mapping, *fe, face_quadrature, face_update_flags);
fe_subface_values->reinit(cell, face_no, subface_no);
- local_dof_indices.resize(fe->dofs_per_cell);
+ local_dof_indices.resize(fe->n_dofs_per_cell());
cell->get_dof_indices(local_dof_indices);
current_fe_values = fe_subface_values.get();
for (const auto &cell : dofs.cell_iterators_on_level(level))
{
const FiniteElement<dim> &fe = cell->get_fe();
- cell_indices.resize(fe.dofs_per_cell);
+ cell_indices.resize(fe.n_dofs_per_cell());
cell->get_mg_dof_indices(cell_indices);
unsigned int i = 0;
// First, dofs on
// are identical. Nevertheless,
// this will only work if
// dofs_per_face is zero and
- // dofs_per_vertex is
+ // n_dofs_per_vertex() is
// arbitrary, not the other way
// round.
// TODO: This assumes that even in hp context, the dofs per face
// coincide!
- unsigned int increment = fe.dofs_per_cell - dim * fe.dofs_per_face;
+ unsigned int increment = fe.n_dofs_per_cell() - dim * fe.dofs_per_face;
while (i < fe.first_line_index)
row_lengths[cell_indices[i++]] += increment;
// From now on, if an object is
// subtract adjacent faces to be
// added in the loop below.
increment = (dim > 1) ?
- fe.dofs_per_cell - (dim - 1) * fe.dofs_per_face :
- fe.dofs_per_cell -
+ fe.n_dofs_per_cell() - (dim - 1) * fe.dofs_per_face :
+ fe.n_dofs_per_cell() -
GeometryInfo<dim>::faces_per_cell * fe.dofs_per_face;
while (i < fe.first_quad_index)
row_lengths[cell_indices[i++]] += increment;
// Now quads in 2D and 3D
increment = (dim > 2) ?
- fe.dofs_per_cell - (dim - 2) * fe.dofs_per_face :
- fe.dofs_per_cell -
+ fe.n_dofs_per_cell() - (dim - 2) * fe.dofs_per_face :
+ fe.n_dofs_per_cell() -
GeometryInfo<dim>::faces_per_cell * fe.dofs_per_face;
while (i < fe.first_hex_index)
row_lengths[cell_indices[i++]] += increment;
// Finally, cells in 3D
- increment = fe.dofs_per_cell -
+ increment = fe.n_dofs_per_cell() -
GeometryInfo<dim>::faces_per_cell * fe.dofs_per_face;
- while (i < fe.dofs_per_cell)
+ while (i < fe.n_dofs_per_cell())
row_lengths[cell_indices[i++]] += increment;
// At this point, we have
if (level_boundary)
{
- for (unsigned int local_dof = 0; local_dof < fe.dofs_per_cell;
+ for (unsigned int local_dof = 0;
+ local_dof < fe.n_dofs_per_cell();
++local_dof)
row_lengths[cell_indices[local_dof]] += fe.dofs_per_face;
continue;
if (flux_coupling != DoFTools::none)
{
const unsigned int dof_increment =
- nfe.dofs_per_cell - nfe.dofs_per_face;
- for (unsigned int local_dof = 0; local_dof < fe.dofs_per_cell;
+ nfe.n_dofs_per_cell() - nfe.dofs_per_face;
+ for (unsigned int local_dof = 0;
+ local_dof < fe.n_dofs_per_cell();
++local_dof)
row_lengths[cell_indices[local_dof]] += dof_increment;
}
// is refined, all the fine
// face dofs couple with
// the coarse one.
- neighbor_indices.resize(nfe.dofs_per_cell);
+ neighbor_indices.resize(nfe.n_dofs_per_cell());
neighbor->get_mg_dof_indices(neighbor_indices);
- for (unsigned int local_dof = 0; local_dof < fe.dofs_per_cell;
+ for (unsigned int local_dof = 0; local_dof < fe.n_dofs_per_cell();
++local_dof)
row_lengths[cell_indices[local_dof]] += nfe.dofs_per_face;
- for (unsigned int local_dof = 0; local_dof < nfe.dofs_per_cell;
+ for (unsigned int local_dof = 0; local_dof < nfe.n_dofs_per_cell();
++local_dof)
row_lengths[neighbor_indices[local_dof]] += fe.dofs_per_face;
}
ExcDimensionMismatch(flux_couplings.n_cols(),
fe.n_components()));
- cell_indices.resize(fe.dofs_per_cell);
+ cell_indices.resize(fe.n_dofs_per_cell());
cell->get_mg_dof_indices(cell_indices);
unsigned int i = 0;
// First, dofs on
// are identical. Nevertheless,
// this will only work if
// dofs_per_face is zero and
- // dofs_per_vertex is
+ // n_dofs_per_vertex() is
// arbitrary, not the other way
// round.
unsigned int increment;
fe.first_block_of_base(base) +
mult) != DoFTools::none)
{
- increment = fe.base_element(base).dofs_per_cell -
+ increment = fe.base_element(base).n_dofs_per_cell() -
dim * fe.base_element(base).dofs_per_face;
row_lengths[cell_indices[i]] += increment;
}
mult) != DoFTools::none)
{
increment =
- fe.base_element(base).dofs_per_cell -
+ fe.base_element(base).n_dofs_per_cell() -
((dim > 1) ? (dim - 1) :
GeometryInfo<dim>::faces_per_cell) *
fe.base_element(base).dofs_per_face;
mult) != DoFTools::none)
{
increment =
- fe.base_element(base).dofs_per_cell -
+ fe.base_element(base).n_dofs_per_cell() -
((dim > 2) ? (dim - 2) :
GeometryInfo<dim>::faces_per_cell) *
fe.base_element(base).dofs_per_face;
}
// Finally, cells in 3D
- while (i < fe.dofs_per_cell)
+ while (i < fe.n_dofs_per_cell())
{
for (unsigned int base = 0; base < fe.n_base_elements(); ++base)
for (unsigned int mult = 0; mult < fe.element_multiplicity(base);
fe.first_block_of_base(base) +
mult) != DoFTools::none)
{
- increment = fe.base_element(base).dofs_per_cell -
+ increment = fe.base_element(base).n_dofs_per_cell() -
GeometryInfo<dim>::faces_per_cell *
fe.base_element(base).dofs_per_face;
row_lengths[cell_indices[i]] += increment;
if (level_boundary)
{
- for (unsigned int local_dof = 0; local_dof < fe.dofs_per_cell;
+ for (unsigned int local_dof = 0;
+ local_dof < fe.n_dofs_per_cell();
++local_dof)
row_lengths[cell_indices[local_dof]] += fe.dofs_per_face;
continue;
for (unsigned int base = 0; base < nfe.n_base_elements(); ++base)
for (unsigned int mult = 0; mult < nfe.element_multiplicity(base);
++mult)
- for (unsigned int local_dof = 0; local_dof < fe.dofs_per_cell;
+ for (unsigned int local_dof = 0;
+ local_dof < fe.n_dofs_per_cell();
++local_dof)
if (couple_face[fe_index](
fe.system_to_block_index(local_dof).first,
nfe.first_block_of_base(base) + mult) != DoFTools::none)
{
const unsigned int dof_increment =
- nfe.base_element(base).dofs_per_cell -
+ nfe.base_element(base).n_dofs_per_cell() -
nfe.base_element(base).dofs_per_face;
row_lengths[cell_indices[local_dof]] += dof_increment;
}
// This will not work with
// different couplings on
// different cells.
- neighbor_indices.resize(nfe.dofs_per_cell);
+ neighbor_indices.resize(nfe.n_dofs_per_cell());
neighbor->get_mg_dof_indices(neighbor_indices);
for (unsigned int base = 0; base < nfe.n_base_elements(); ++base)
for (unsigned int mult = 0; mult < nfe.element_multiplicity(base);
++mult)
- for (unsigned int local_dof = 0; local_dof < fe.dofs_per_cell;
+ for (unsigned int local_dof = 0;
+ local_dof < fe.n_dofs_per_cell();
++local_dof)
if (couple_cell[fe_index](
fe.system_to_component_index(local_dof).first,
for (unsigned int base = 0; base < fe.n_base_elements(); ++base)
for (unsigned int mult = 0; mult < fe.element_multiplicity(base);
++mult)
- for (unsigned int local_dof = 0; local_dof < nfe.dofs_per_cell;
+ for (unsigned int local_dof = 0;
+ local_dof < nfe.n_dofs_per_cell();
++local_dof)
if (couple_cell[fe_index](
nfe.system_to_component_index(local_dof).first,
Assert(sparsity.n_cols() == n_dofs,
ExcDimensionMismatch(sparsity.n_cols(), n_dofs));
- const unsigned int dofs_per_cell = dof.get_fe().dofs_per_cell;
+ const unsigned int dofs_per_cell = dof.get_fe().n_dofs_per_cell();
std::vector<types::global_dof_index> dofs_on_this_cell(dofs_per_cell);
typename DoFHandler<dim, spacedim>::cell_iterator cell = dof.begin(level),
endc = dof.end(level);
Assert(sparsity.n_cols() == n_dofs,
ExcDimensionMismatch(sparsity.n_cols(), n_dofs));
- const unsigned int dofs_per_cell = dof.get_fe().dofs_per_cell;
+ const unsigned int dofs_per_cell = dof.get_fe().n_dofs_per_cell();
std::vector<types::global_dof_index> dofs_on_this_cell(dofs_per_cell);
std::vector<types::global_dof_index> dofs_on_other_cell(dofs_per_cell);
typename DoFHandler<dim, spacedim>::cell_iterator cell = dof.begin(level),
Assert(sparsity.n_cols() == fine_dofs,
ExcDimensionMismatch(sparsity.n_cols(), fine_dofs));
- const unsigned int dofs_per_cell = dof.get_fe().dofs_per_cell;
+ const unsigned int dofs_per_cell = dof.get_fe().n_dofs_per_cell();
std::vector<types::global_dof_index> dofs_on_this_cell(dofs_per_cell);
std::vector<types::global_dof_index> dofs_on_other_cell(dofs_per_cell);
typename DoFHandler<dim, spacedim>::cell_iterator cell = dof.begin(level),
Assert(flux_mask.n_cols() == n_comp,
ExcDimensionMismatch(flux_mask.n_cols(), n_comp));
- const unsigned int total_dofs = fe.dofs_per_cell;
+ const unsigned int total_dofs = fe.n_dofs_per_cell();
std::vector<types::global_dof_index> dofs_on_this_cell(total_dofs);
std::vector<types::global_dof_index> dofs_on_other_cell(total_dofs);
Table<2, bool> support_on_face(total_dofs,
Assert(flux_mask.n_cols() == n_comp,
ExcDimensionMismatch(flux_mask.n_cols(), n_comp));
- const unsigned int dofs_per_cell = dof.get_fe().dofs_per_cell;
+ const unsigned int dofs_per_cell = dof.get_fe().n_dofs_per_cell();
std::vector<types::global_dof_index> dofs_on_this_cell(dofs_per_cell);
std::vector<types::global_dof_index> dofs_on_other_cell(dofs_per_cell);
Table<2, bool> support_on_face(dofs_per_cell,
Assert(sparsity.n_cols() == n_dofs,
ExcDimensionMismatch(sparsity.n_cols(), n_dofs));
- const unsigned int dofs_per_cell = dof.get_fe().dofs_per_cell;
+ const unsigned int dofs_per_cell = dof.get_fe().n_dofs_per_cell();
std::vector<types::global_dof_index> dofs_on_this_cell(dofs_per_cell);
typename DoFHandler<dim, spacedim>::cell_iterator cell = dof.begin(level),
endc = dof.end(level);
if (boundary_ids.find(boundary_component) != boundary_ids.end())
// we want to constrain this boundary
{
- for (unsigned int i = 0; i < cell->get_fe().dofs_per_cell;
+ for (unsigned int i = 0;
+ i < cell->get_fe().n_dofs_per_cell();
++i)
{
const ComponentMask &nonzero_component_array =
const FiniteElement<dim, spacedim> &fe = mg_dof_handler.get_fe();
- const unsigned int dofs_per_cell = fe.dofs_per_cell;
+ const unsigned int dofs_per_cell = fe.n_dofs_per_cell();
const unsigned int dofs_per_face = fe.dofs_per_face;
std::vector<types::global_dof_index> local_dof_indices(dofs_per_cell);
{
const FiniteElement<dim> &fe = dof_handler.get_fe();
const unsigned int n_blocks = fe.n_blocks();
- const unsigned int dofs_per_cell = fe.dofs_per_cell;
+ const unsigned int dofs_per_cell = fe.n_dofs_per_cell();
const unsigned int n_levels = dof_handler.get_triangulation().n_levels();
Assert(selected.size() == n_blocks,
MGTransferBlockBase::build(dof_handler);
std::vector<types::global_dof_index> temp_copy_indices;
- std::vector<types::global_dof_index> global_dof_indices(fe.dofs_per_cell);
- std::vector<types::global_dof_index> level_dof_indices(fe.dofs_per_cell);
+ std::vector<types::global_dof_index> global_dof_indices(fe.n_dofs_per_cell());
+ std::vector<types::global_dof_index> level_dof_indices(fe.n_dofs_per_cell());
for (int level = dof_handler.get_triangulation().n_levels() - 1; level >= 0;
--level)
level_cell->get_dof_indices(global_dof_indices);
level_cell->get_mg_dof_indices(level_dof_indices);
- for (unsigned int i = 0; i < fe.dofs_per_cell; ++i)
+ for (unsigned int i = 0; i < fe.n_dofs_per_cell(); ++i)
{
const unsigned int block = fe.system_to_block_index(i).first;
if (selected[block])
MGTransferBlockBase::build(dof_handler);
std::vector<std::vector<types::global_dof_index>> temp_copy_indices(n_blocks);
- std::vector<types::global_dof_index> global_dof_indices(fe.dofs_per_cell);
- std::vector<types::global_dof_index> level_dof_indices(fe.dofs_per_cell);
+ std::vector<types::global_dof_index> global_dof_indices(fe.n_dofs_per_cell());
+ std::vector<types::global_dof_index> level_dof_indices(fe.n_dofs_per_cell());
for (int level = dof_handler.get_triangulation().n_levels() - 1; level >= 0;
--level)
{
level_cell->get_dof_indices(global_dof_indices);
level_cell->get_mg_dof_indices(level_dof_indices);
- for (unsigned int i = 0; i < fe.dofs_per_cell; ++i)
+ for (unsigned int i = 0; i < fe.n_dofs_per_cell(); ++i)
{
const unsigned int block = fe.system_to_block_index(i).first;
if (selected[block])
const unsigned int n_components =
*std::max_element(mg_target_component.begin(), mg_target_component.end()) +
1;
- const unsigned int dofs_per_cell = fe.dofs_per_cell;
+ const unsigned int dofs_per_cell = fe.n_dofs_per_cell();
const unsigned int n_levels = mg_dof.get_triangulation().n_levels();
Assert(mg_component_mask.represents_n_components(fe.n_components()),
// use a temporary vector to create the
// relation between global and level dofs
std::vector<types::global_dof_index> temp_copy_indices;
- std::vector<types::global_dof_index> global_dof_indices(fe.dofs_per_cell);
- std::vector<types::global_dof_index> level_dof_indices(fe.dofs_per_cell);
+ std::vector<types::global_dof_index> global_dof_indices(fe.n_dofs_per_cell());
+ std::vector<types::global_dof_index> level_dof_indices(fe.n_dofs_per_cell());
for (int level = mg_dof.get_triangulation().n_levels() - 1; level >= 0;
--level)
{
level_cell->get_dof_indices(global_dof_indices);
level_cell->get_mg_dof_indices(level_dof_indices);
- for (unsigned int i = 0; i < fe.dofs_per_cell; ++i)
+ for (unsigned int i = 0; i < fe.n_dofs_per_cell(); ++i)
{
const unsigned int component =
fe.system_to_component_index(i).first;
IndexSet globally_relevant;
DoFTools::extract_locally_relevant_dofs(dof_handler, globally_relevant);
- const unsigned int dofs_per_cell = dof_handler.get_fe().dofs_per_cell;
+ const unsigned int dofs_per_cell = dof_handler.get_fe().n_dofs_per_cell();
std::vector<types::global_dof_index> global_dof_indices(dofs_per_cell);
std::vector<types::global_dof_index> level_dof_indices(dofs_per_cell);
{
// currently, we have only FE_Q and FE_DGQ type elements implemented
elem_info.n_components = dof_handler.get_fe().element_multiplicity(0);
- AssertDimension(Utilities::fixed_power<dim>(fe.dofs_per_cell) *
+ AssertDimension(Utilities::fixed_power<dim>(fe.n_dofs_per_cell()) *
elem_info.n_components,
- dof_handler.get_fe().dofs_per_cell);
+ dof_handler.get_fe().n_dofs_per_cell());
AssertDimension(fe.degree, dof_handler.get_fe().degree);
elem_info.fe_degree = fe.degree;
- elem_info.element_is_continuous = fe.dofs_per_vertex > 0;
- Assert(fe.dofs_per_vertex < 2, ExcNotImplemented());
+ elem_info.element_is_continuous = fe.n_dofs_per_vertex() > 0;
+ Assert(fe.n_dofs_per_vertex() < 2, ExcNotImplemented());
// step 1.2: get renumbering of 1D basis functions to lexicographic
- // numbers. The distinction according to fe.dofs_per_vertex is to support
- // both continuous and discontinuous bases.
- std::vector<unsigned int> renumbering(fe.dofs_per_cell);
+ // numbers. The distinction according to fe.n_dofs_per_vertex() is to
+ // support both continuous and discontinuous bases.
+ std::vector<unsigned int> renumbering(fe.n_dofs_per_cell());
{
- AssertIndexRange(fe.dofs_per_vertex, 2);
+ AssertIndexRange(fe.n_dofs_per_vertex(), 2);
renumbering[0] = 0;
for (unsigned int i = 0; i < fe.dofs_per_line; ++i)
- renumbering[i + fe.dofs_per_vertex] =
- GeometryInfo<1>::vertices_per_cell * fe.dofs_per_vertex + i;
- if (fe.dofs_per_vertex > 0)
- renumbering[fe.dofs_per_cell - fe.dofs_per_vertex] =
- fe.dofs_per_vertex;
+ renumbering[i + fe.n_dofs_per_vertex()] =
+ GeometryInfo<1>::vertices_per_cell * fe.n_dofs_per_vertex() + i;
+ if (fe.n_dofs_per_vertex() > 0)
+ renumbering[fe.n_dofs_per_cell() - fe.n_dofs_per_vertex()] =
+ fe.n_dofs_per_vertex();
}
// step 1.3: create a dummy 1D quadrature formula to extract the
// lexicographic numbering for the elements
- Assert(fe.dofs_per_vertex == 0 || fe.dofs_per_vertex == 1,
+ Assert(fe.n_dofs_per_vertex() == 0 || fe.n_dofs_per_vertex() == 1,
ExcNotImplemented());
- const unsigned int shift = fe.dofs_per_cell - fe.dofs_per_vertex;
+ const unsigned int shift = fe.n_dofs_per_cell() - fe.n_dofs_per_vertex();
const unsigned int n_child_dofs_1d =
- (fe.dofs_per_vertex > 0 ? (2 * fe.dofs_per_cell - 1) :
- (2 * fe.dofs_per_cell));
+ (fe.n_dofs_per_vertex() > 0 ? (2 * fe.n_dofs_per_cell() - 1) :
+ (2 * fe.n_dofs_per_cell()));
elem_info.n_child_cell_dofs =
elem_info.n_components * Utilities::fixed_power<dim>(n_child_dofs_1d);
elem_info.lexicographic_numbering = shape_info.lexicographic_numbering;
// step 1.4: get the 1d prolongation matrix and combine from both children
- elem_info.prolongation_matrix_1d.resize(fe.dofs_per_cell *
+ elem_info.prolongation_matrix_1d.resize(fe.n_dofs_per_cell() *
n_child_dofs_1d);
for (unsigned int c = 0; c < GeometryInfo<1>::max_children_per_cell; ++c)
- for (unsigned int i = 0; i < fe.dofs_per_cell; ++i)
- for (unsigned int j = 0; j < fe.dofs_per_cell; ++j)
+ for (unsigned int i = 0; i < fe.n_dofs_per_cell(); ++i)
+ for (unsigned int j = 0; j < fe.n_dofs_per_cell(); ++j)
elem_info
.prolongation_matrix_1d[i * n_child_dofs_1d + j + c * shift] =
fe.get_prolongation_matrix(c)(renumbering[j], renumbering[i]);
coarse_level_indices[level].resize(tria.n_raw_cells(level),
numbers::invalid_unsigned_int);
std::vector<types::global_dof_index> local_dof_indices(
- dof_handler.get_fe().dofs_per_cell);
+ dof_handler.get_fe().n_dofs_per_cell());
dirichlet_indices.resize(n_levels - 1);
AssertDimension(target_partitioners.max_level(), n_levels - 1);
ghosted_level_dofs.push_back(local_dof_index);
add_child_indices<dim>(c,
- fe->dofs_per_cell -
- fe->dofs_per_vertex,
+ fe->n_dofs_per_cell() -
+ fe->n_dofs_per_vertex(),
fe->degree,
elem_info.lexicographic_numbering,
local_dof_indices,
tria.n_cells(level);
parent_child_connect[level][child_index] =
std::make_pair(parent_index, c);
- AssertIndexRange(dof_handler.get_fe().dofs_per_cell,
+ AssertIndexRange(dof_handler.get_fe().n_dofs_per_cell(),
static_cast<unsigned short>(-1));
// set Dirichlet boundary conditions (as a list of
// constrained DoFs) for the child
if (mg_constrained_dofs != nullptr)
for (unsigned int i = 0;
- i < dof_handler.get_fe().dofs_per_cell;
+ i < dof_handler.get_fe().n_dofs_per_cell();
++i)
if (mg_constrained_dofs->is_boundary_index(
level,
numbers::invalid_dof_index);
add_child_indices<dim>(
0,
- fe->dofs_per_cell - fe->dofs_per_vertex,
+ fe->n_dofs_per_cell() - fe->n_dofs_per_vertex(),
fe->degree,
elem_info.lexicographic_numbering,
local_dof_indices,
dirichlet_indices[0].emplace_back();
if (mg_constrained_dofs != nullptr)
for (unsigned int i = 0;
- i < dof_handler.get_fe().dofs_per_cell;
+ i < dof_handler.get_fe().n_dofs_per_cell();
++i)
if (mg_constrained_dofs->is_boundary_index(
0,
// ---------------------- 3. compute weights to make restriction additive
const unsigned int n_child_dofs_1d =
- fe->degree + 1 + fe->dofs_per_cell - fe->dofs_per_vertex;
+ fe->degree + 1 + fe->n_dofs_per_cell() - fe->n_dofs_per_vertex();
// get the valence of the individual components and compute the weights as
// the inverse of the valence
{
const unsigned int n_levels =
dof_handler.get_triangulation().n_global_levels();
- const unsigned int dofs_per_cell = dof_handler.get_fe().dofs_per_cell;
+ const unsigned int dofs_per_cell = dof_handler.get_fe().n_dofs_per_cell();
this->sizes.resize(n_levels);
for (unsigned int l = 0; l < n_levels; ++l)
const auto &immersed_fe = immersed_dh.get_fe();
// Dof indices
- std::vector<types::global_dof_index> dofs(immersed_fe.dofs_per_cell);
- std::vector<types::global_dof_index> odofs(space_fe.dofs_per_cell);
+ std::vector<types::global_dof_index> dofs(immersed_fe.n_dofs_per_cell());
+ std::vector<types::global_dof_index> odofs(space_fe.n_dofs_per_cell());
// Take care of components
const ComponentMask space_c =
// the version with the dof_mask, this should be uncommented.
//
// // Construct a dof_mask, used to distribute entries to the sparsity
- // able< 2, bool > dof_mask(space_fe.dofs_per_cell,
- // immersed_fe.dofs_per_cell);
+ // able< 2, bool > dof_mask(space_fe.n_dofs_per_cell(),
+ // immersed_fe.n_dofs_per_cell());
// of_mask.fill(false);
- // or (unsigned int i=0; i<space_fe.dofs_per_cell; ++i)
+ // or (unsigned int i=0; i<space_fe.n_dofs_per_cell(); ++i)
// {
// const auto comp_i = space_fe.system_to_component_index(i).first;
// if (space_gtl[comp_i] != numbers::invalid_unsigned_int)
- // for (unsigned int j=0; j<immersed_fe.dofs_per_cell; ++j)
+ // for (unsigned int j=0; j<immersed_fe.n_dofs_per_cell(); ++j)
// {
// const auto comp_j =
// immersed_fe.system_to_component_index(j).first; if
const auto &immersed_fe = immersed_dh.get_fe();
// Dof indices
- std::vector<types::global_dof_index> dofs(immersed_fe.dofs_per_cell);
- std::vector<types::global_dof_index> odofs(space_fe.dofs_per_cell);
+ std::vector<types::global_dof_index> dofs(immersed_fe.n_dofs_per_cell());
+ std::vector<types::global_dof_index> odofs(space_fe.n_dofs_per_cell());
// Take care of components
const ComponentMask space_c =
immersed_gtl[i] = j++;
FullMatrix<typename Matrix::value_type> cell_matrix(
- space_dh.get_fe().dofs_per_cell, immersed_dh.get_fe().dofs_per_cell);
+ space_dh.get_fe().n_dofs_per_cell(),
+ immersed_dh.get_fe().n_dofs_per_cell());
FEValues<dim1, spacedim> fe_v(immersed_mapping,
immersed_dh.get_fe(),
// Reset the matrices.
cell_matrix = typename Matrix::value_type();
- for (unsigned int i = 0; i < space_dh.get_fe().dofs_per_cell;
+ for (unsigned int i = 0;
+ i < space_dh.get_fe().n_dofs_per_cell();
++i)
{
const auto comp_i =
space_dh.get_fe().system_to_component_index(i).first;
if (space_gtl[comp_i] != numbers::invalid_unsigned_int)
for (unsigned int j = 0;
- j < immersed_dh.get_fe().dofs_per_cell;
+ j < immersed_dh.get_fe().n_dofs_per_cell();
++j)
{
const auto comp_j = immersed_dh.get_fe()
const auto &fe1 = dh1.get_fe();
// Dof indices
- std::vector<types::global_dof_index> dofs0(fe0.dofs_per_cell);
- std::vector<types::global_dof_index> dofs1(fe1.dofs_per_cell);
+ std::vector<types::global_dof_index> dofs0(fe0.n_dofs_per_cell());
+ std::vector<types::global_dof_index> dofs1(fe1.n_dofs_per_cell());
if (outer_loop_on_zero)
{
update_quadrature_points);
// Dof indices
- std::vector<types::global_dof_index> dofs0(fe0.dofs_per_cell);
- std::vector<types::global_dof_index> dofs1(fe1.dofs_per_cell);
+ std::vector<types::global_dof_index> dofs0(fe0.n_dofs_per_cell());
+ std::vector<types::global_dof_index> dofs1(fe1.n_dofs_per_cell());
// Local Matrix
- FullMatrix<typename Matrix::value_type> cell_matrix(fe0.dofs_per_cell,
- fe1.dofs_per_cell);
+ FullMatrix<typename Matrix::value_type> cell_matrix(fe0.n_dofs_per_cell(),
+ fe1.n_dofs_per_cell());
// Global to local indices
const auto p =
{
kernel.set_center(fev0.quadrature_point(q0));
kernel.value_list(fev1.get_quadrature_points(), kernel_values);
- for (unsigned int j = 0; j < fe1.dofs_per_cell; ++j)
+ for (unsigned int j = 0; j < fe1.n_dofs_per_cell(); ++j)
{
const auto comp_j = fe1.system_to_component_index(j).first;
// Now compute the main integral with the sum over q1 already
// completed - this gives a cubic complexity as usual rather
// than a quartic one with naive loops
- for (unsigned int i = 0; i < fe0.dofs_per_cell; ++i)
+ for (unsigned int i = 0; i < fe0.n_dofs_per_cell(); ++i)
{
const auto comp_i = fe0.system_to_component_index(i).first;
if (gtl0[comp_i] != numbers::invalid_unsigned_int &&
std::vector<types::global_dof_index> local_dof_indices(
- dof_handler->get_fe().dofs_per_cell);
+ dof_handler->get_fe().n_dofs_per_cell());
std::vector<types::global_dof_index> new_solution_indices;
current_cell->get_dof_indices(local_dof_indices);
// there is an implicit assumption here
}
std::vector<types::global_dof_index> local_dof_indices(
- dof_handler->get_fe().dofs_per_cell);
+ dof_handler->get_fe().n_dofs_per_cell());
for (unsigned int point = 0; point < locations.size(); point++)
{
current_cell[point]->get_dof_indices(local_dof_indices);
cell->active_fe_index());
resize(expansion_coefficients, n_modes);
- local_dof_values.reinit(cell->get_fe().dofs_per_cell);
+ local_dof_values.reinit(cell->get_fe().n_dofs_per_cell());
cell->get_dof_values(solution, local_dof_values);
fe_legendre.calculate(local_dof_values,
// at least N=pe+1
AssertIndexRange(pe, n_modes);
- local_dof_values.reinit(cell->get_fe().dofs_per_cell);
+ local_dof_values.reinit(cell->get_fe().n_dofs_per_cell());
cell->get_dof_values(solution, local_dof_values);
fe_legendre.calculate(local_dof_values,
// degrees of freedom and then need to compute the series
// expansion by multiplying this vector with the matrix ${\cal
// F}$ corresponding to this finite element.
- local_dof_values.reinit(cell->get_fe().dofs_per_cell);
+ local_dof_values.reinit(cell->get_fe().n_dofs_per_cell());
cell->get_dof_values(solution, local_dof_values);
fe_fourier.calculate(local_dof_values,
// at least N=pe+1
AssertIndexRange(pe, n_modes);
- local_dof_values.reinit(cell->get_fe().dofs_per_cell);
+ local_dof_values.reinit(cell->get_fe().n_dofs_per_cell());
cell->get_dof_values(solution, local_dof_values);
fe_fourier.calculate(local_dof_values,
for (unsigned int i = 0; cell != endc; ++cell, ++i)
{
- indices_on_cell[i].resize(cell->get_fe().dofs_per_cell);
+ indices_on_cell[i].resize(cell->get_fe().n_dofs_per_cell());
// on each cell store the indices of the
// dofs. after refining we get the values
// on the children by taking these
const unsigned int this_fe_index =
pointerstruct->second.active_fe_index;
const unsigned int dofs_per_cell =
- cell->get_dof_handler().get_fe(this_fe_index).dofs_per_cell;
+ cell->get_dof_handler().get_fe(this_fe_index).n_dofs_per_cell();
local_values.reinit(dofs_per_cell, true);
// make sure that the size of the stored indices is the same as
for (unsigned int j = 0; j < fe.size(); ++j)
if (i != j)
{
- matrices(i, j).reinit(fe[i].dofs_per_cell, fe[j].dofs_per_cell);
+ matrices(i, j).reinit(fe[i].n_dofs_per_cell(),
+ fe[j].n_dofs_per_cell());
// see if we can get the interpolation matrices for this
// combination of elements. if not, reset the matrix sizes to zero
restriction_is_additive.resize(fe.size());
for (unsigned int f = 0; f < fe.size(); ++f)
{
- restriction_is_additive[f].resize(fe[f].dofs_per_cell);
- for (unsigned int i = 0; i < fe[f].dofs_per_cell; ++i)
+ restriction_is_additive[f].resize(fe[f].n_dofs_per_cell());
+ for (unsigned int i = 0; i < fe[f].n_dofs_per_cell(); ++i)
restriction_is_additive[f][i] = fe[f].restriction_is_additive(i);
}
}
// CASE 1: active cell that remains as it is
if (cell->is_active() && !cell->coarsen_flag_set())
{
- const unsigned int dofs_per_cell = cell->get_fe().dofs_per_cell;
+ const unsigned int dofs_per_cell = cell->get_fe().n_dofs_per_cell();
indices_on_cell[n_sr].resize(dofs_per_cell);
// cell will not be coarsened,
// so we get away by storing the
dim>::ExcNoDominatedFiniteElementAmongstChildren());
const unsigned int dofs_per_cell =
- dof_handler->get_fe(target_fe_index).dofs_per_cell;
+ dof_handler->get_fe(target_fe_index).n_dofs_per_cell();
std::vector<Vector<typename VectorType::value_type>>(
in_size, Vector<typename VectorType::value_type>(dofs_per_cell))
Assert(!cell->has_children(), ExcInternalError());
Assert(indexptr == nullptr, ExcInternalError());
- const unsigned int dofs_per_cell = cell->get_fe().dofs_per_cell;
+ const unsigned int dofs_per_cell =
+ cell->get_fe().n_dofs_per_cell();
dofs.resize(dofs_per_cell);
// get the local
// indices
// the version with the dof_mask, this should be uncommented.
// // Construct a dof_mask, used to distribute entries to the sparsity
// Table<2, bool> dof_mask(max_particles_per_cell * n_comps,
- // fe.dofs_per_cell);
+ // fe.n_dofs_per_cell());
// dof_mask.fill(false);
- // for (unsigned int i = 0; i < space_fe.dofs_per_cell; ++i)
+ // for (unsigned int i = 0; i < space_fe.n_dofs_per_cell(); ++i)
// {
// const auto comp_i = space_fe.system_to_component_index(i).first;
// if (space_gtl[comp_i] != numbers::invalid_unsigned_int)
// dof_mask(i, j * n_comps + space_gtl[comp_i]) = true;
// }
- std::vector<types::global_dof_index> dof_indices(fe.dofs_per_cell);
+ std::vector<types::global_dof_index> dof_indices(fe.n_dofs_per_cell());
std::vector<types::particle_index> particle_indices(
max_particles_per_cell * n_comps);
for (unsigned int i = 0; particle != pic.end(); ++particle, ++i)
{
const auto p_id = particle->get_id();
- for (unsigned int j = 0; j < fe.dofs_per_cell; ++j)
+ for (unsigned int j = 0; j < fe.n_dofs_per_cell(); ++j)
{
const auto comp_j =
space_gtl[fe.system_to_component_index(j).first];
// the version with the dof_mask, this should be uncommented.
// // Construct a dof_mask, used to distribute entries to the sparsity
// Table<2, bool> dof_mask(max_particles_per_cell * n_comps,
- // fe.dofs_per_cell);
+ // fe.n_dofs_per_cell());
// dof_mask.fill(false);
- // for (unsigned int i = 0; i < space_fe.dofs_per_cell; ++i)
+ // for (unsigned int i = 0; i < space_fe.n_dofs_per_cell(); ++i)
// {
// const auto comp_i = space_fe.system_to_component_index(i).first;
// if (space_gtl[comp_i] != numbers::invalid_unsigned_int)
// dof_mask(i, j * n_comps + space_gtl[comp_i]) = true;
// }
- std::vector<types::global_dof_index> dof_indices(fe.dofs_per_cell);
+ std::vector<types::global_dof_index> dof_indices(fe.n_dofs_per_cell());
std::vector<types::particle_index> particle_indices(
max_particles_per_cell * n_comps);
FullMatrix<typename MatrixType::value_type> local_matrix(
- max_particles_per_cell * n_comps, fe.dofs_per_cell);
+ max_particles_per_cell * n_comps, fe.n_dofs_per_cell());
auto particle = particle_handler.begin();
while (particle != particle_handler.end())
const auto pic = particle_handler.particles_in_cell(cell);
const auto n_particles = particle_handler.n_particles_in_cell(cell);
particle_indices.resize(n_particles * n_comps);
- local_matrix.reinit({n_particles * n_comps, fe.dofs_per_cell});
+ local_matrix.reinit({n_particles * n_comps, fe.n_dofs_per_cell()});
Assert(pic.begin() == particle, ExcInternalError());
for (unsigned int i = 0; particle != pic.end(); ++particle, ++i)
{
particle_indices[i * n_comps + d] =
particle->get_id() * n_comps + d;
- for (unsigned int j = 0; j < fe.dofs_per_cell; ++j)
+ for (unsigned int j = 0; j < fe.n_dofs_per_cell(); ++j)
{
const auto comp_j =
space_gtl[fe.system_to_component_index(j).first];