--- /dev/null
+Removed: The deprecated method hp::DoFHandler::get_fe() has been removed. Please use
+hp::DoFHandler::get_fe_collection() instead.
+<br>
+(Peter Munch, 2020/03/26)
DEAL_II_DEPRECATED const std::vector<IndexSet> &
locally_owned_mg_dofs_per_processor(const unsigned int level) const;
- /**
- * Return a constant reference to the set of finite element objects that
- * are used by this @p DoFHandler.
- *
- * @deprecated Use get_fe_collection() instead.
- */
- DEAL_II_DEPRECATED
- const hp::FECollection<dim, spacedim> &
- get_fe() const;
-
/**
* Return a constant reference to the indexth finite element object that is
* used by this @p DoFHandler.
- template <int dim, int spacedim>
- inline const hp::FECollection<dim, spacedim> &
- DoFHandler<dim, spacedim>::get_fe() const
- {
- Assert(fe_collection.size() > 0,
- ExcMessage("No finite element collection is associated with "
- "this DoFHandler"));
- return fe_collection;
- }
-
-
-
template <int dim, int spacedim>
inline const FiniteElement<dim, spacedim> &
DoFHandler<dim, spacedim>::get_fe(const unsigned int number) const
{
unsigned int n_components = 0;
for (unsigned int no = 0; no < dof_handler.size(); ++no)
- n_components += dof_handler[no]->get_fe()[0].n_base_elements();
+ n_components += dof_handler[no]->get_fe(0).n_base_elements();
const unsigned int n_quad = quad.size();
unsigned int n_fe_in_collection = 0;
for (unsigned int i = 0; i < n_components; ++i)
additional_data.store_plain_indices;
dof_info[no].global_base_element_offset =
no > 0 ? dof_info[no - 1].global_base_element_offset +
- dof_handler[no - 1]->get_fe()[0].n_base_elements() :
+ dof_handler[no - 1]->get_fe(0).n_base_elements() :
0;
}
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).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).dofs_per_cell;
std::vector<types::global_dof_index> dof_indices(dofs_per_cell);
dof_cell->get_mg_dof_indices(dof_indices);
const ComponentMask & component_mask)
{
Assert(component_mask.represents_n_components(
- dof_handler.get_fe().n_components()),
+ dof_handler.get_fe_collection().n_components()),
ExcMessage(
"The number of components in the mask has to be either "
"zero or equal to the number of components in the finite "
ExcDimensionMismatch(vec.size(), dof_handler.n_dofs()));
Assert(component_mask.n_selected_components(
- dof_handler.get_fe().n_components()) > 0,
+ dof_handler.get_fe_collection().n_components()) > 0,
ComponentMask::ExcNoComponentSelected());
//
dof_values.resize(n_dofs);
// Get all function values:
- Assert(n_components == function(cell)->n_components,
- ExcDimensionMismatch(dof_handler.get_fe().n_components(),
- function(cell)->n_components));
+ Assert(
+ n_components == function(cell)->n_components,
+ ExcDimensionMismatch(dof_handler.get_fe_collection().n_components(),
+ function(cell)->n_components));
function(cell)->vector_value_list(generalized_support_points,
function_values);
VectorType & vec,
const ComponentMask & component_mask)
{
- Assert(dof_handler.get_fe().n_components() == function.n_components,
- ExcDimensionMismatch(dof_handler.get_fe().n_components(),
+ Assert(dof_handler.get_fe_collection().n_components() ==
+ function.n_components,
+ ExcDimensionMismatch(dof_handler.get_fe_collection().n_components(),
function.n_components));
// Create a small lambda capture wrapping function and call the
typename hp::DoFHandler<dim>::active_cell_iterator cell = dofh.begin_active();
- const unsigned int dofs_per_cell = dofh.get_fe()[0].dofs_per_cell;
+ const unsigned int dofs_per_cell = dofh.get_fe(0).dofs_per_cell;
std::vector<types::global_dof_index> local_dof_indices(dofs_per_cell);
void
check_this(const DoFHandlerType &dof_handler)
{
- std::vector<bool> mask(dof_handler.get_fe().n_components(), false);
+ std::vector<bool> mask(dof_handler.get_fe(0).n_components(), false);
// only select first component
mask[0] = true;
void
check_renumbering(hp::DoFHandler<dim> &dof)
{
- for (unsigned int i = 0; i < dof.get_fe().size(); ++i)
+ for (unsigned int i = 0; i < dof.get_fe_collection().size(); ++i)
{
- const FiniteElement<dim> &element = dof.get_fe()[i];
+ const FiniteElement<dim> &element = dof.get_fe_collection()[i];
deallog << element.get_name() << std::endl;
}
void
check_renumbering(hp::DoFHandler<dim> &dof)
{
- for (unsigned int i = 0; i < dof.get_fe().size(); ++i)
+ for (unsigned int i = 0; i < dof.get_fe_collection().size(); ++i)
{
- const FiniteElement<dim> &element = dof.get_fe()[i];
+ const FiniteElement<dim> &element = dof.get_fe_collection()[i];
deallog << element.get_name() << std::endl;
}
void
check_renumbering(hp::DoFHandler<dim> &dof)
{
- for (unsigned int i = 0; i < dof.get_fe().size(); ++i)
+ for (unsigned int i = 0; i < dof.get_fe_collection().size(); ++i)
{
- const FiniteElement<dim> &element = dof.get_fe()[i];
+ const FiniteElement<dim> &element = dof.get_fe_collection()[i];
deallog << element.get_name() << std::endl;
}
deallog << "cell=" << cell << std::endl;
deallog << "n=" << cell->n_active_fe_indices() << std::endl;
deallog << "x=";
- for (unsigned int i = 0; i < dof_handler.get_fe().size(); ++i)
+ for (unsigned int i = 0; i < dof_handler.get_fe_collection().size(); ++i)
deallog << cell->fe_index_is_active(i);
deallog << std::endl;
deallog << "face=" << cell->face(f) << std::endl;
deallog << "n=" << cell->face(f)->n_active_fe_indices() << std::endl;
deallog << "x=";
- for (unsigned int i = 0; i < dof_handler.get_fe().size(); ++i)
+ for (unsigned int i = 0; i < dof_handler.get_fe_collection().size();
+ ++i)
deallog << cell->face(f)->fe_index_is_active(i);
deallog << std::endl;
deallog << "edge=" << cell->line(e) << std::endl;
deallog << "n=" << cell->line(e)->n_active_fe_indices() << std::endl;
deallog << "x=";
- for (unsigned int i = 0; i < dof_handler.get_fe().size(); ++i)
+ for (unsigned int i = 0; i < dof_handler.get_fe_collection().size();
+ ++i)
deallog << cell->line(e)->fe_index_is_active(i);
deallog << std::endl;
Assert(cell->line(e)->n_active_fe_indices() >= 1, ExcInternalError());
Assert(cell->line(e)->n_active_fe_indices() <=
- dof_handler.get_fe().size(),
+ dof_handler.get_fe_collection().size(),
ExcInternalError());
}
}
// components so that each
// component maps to its natural
// block
- std::vector<unsigned int> order(dof.get_fe().n_components());
+ std::vector<unsigned int> order(dof.get_fe_collection().n_components());
order[0] = 0;
order[1] = 1;
order[2] = 1;
{
// Prepare a reordering of
// components for later use
- std::vector<unsigned int> order(dof.get_fe().n_components());
+ std::vector<unsigned int> order(dof.get_fe_collection().n_components());
for (unsigned int i = 0; i < order.size(); ++i)
order[i] = order.size() - i - 1;
void
DGMethod<dim>::assemble_system1()
{
- const unsigned int dofs_per_cell = dof_handler.get_fe()[0].dofs_per_cell;
+ const unsigned int dofs_per_cell = dof_handler.get_fe(0).dofs_per_cell;
std::vector<types::global_dof_index> dofs(dofs_per_cell);
std::vector<types::global_dof_index> dofs_neighbor(dofs_per_cell);
void
DGMethod<dim>::assemble_system2()
{
- const unsigned int dofs_per_cell = dof_handler.get_fe()[0].dofs_per_cell;
+ const unsigned int dofs_per_cell = dof_handler.get_fe(0).dofs_per_cell;
std::vector<types::global_dof_index> dofs(dofs_per_cell);
std::vector<types::global_dof_index> dofs_neighbor(dofs_per_cell);