Write standalone FE in capitals.
*
* Transferring a solution across refinement works exactly like in the
* non-hp-case. However, when considering serialization, we also have to
- * store the active_fe_indices in an additional step. A code snippet
+ * store the active FE indices in an additional step. A code snippet
* demonstrating serialization with the
* parallel::distributed::SolutionTransfer class with DoFHandler objects
* with hp-capabilities is provided in the following. Here VectorType is
*
* DoFHandler<dim,spacedim> hp_dof_handler(triangulation);
* // We need to introduce our dof_handler to the fe_collection
- * // before setting all active_fe_indices.
+ * // before setting all active FE indices.
* hp_dof_handler.deserialize_active_fe_indices();
* hp_dof_handler.distribute_dofs(fe_collection);
*
n_active_fe_indices() const;
/**
- * Return the @p n-th active fe index on this object. For cells and all non-
- * hp-objects, there is only a single active fe index, so the argument must
+ * Return the @p n-th active FE index on this object. For cells and all non-
+ * hp-objects, there is only a single active FE index, so the argument must
* be equal to zero. For lower-dimensional hp-objects, there are
* n_active_fe_indices() active finite elements, and this function can be
* queried for their indices.
nth_active_fe_index(const unsigned int n) const;
/**
- * Returns all active fe indices on this object.
+ * Returns all active FE indices on this object.
*
* The size of the returned set equals the number of finite elements that
* are active on this object.
n_active_fe_indices() const;
/**
- * Return the @p n-th active fe index on this object.
+ * Return the @p n-th active FE index on this object.
*
* Since vertices do not store the information necessary for this to be
* calculated, this method just raises an exception and only exists to
/**
- * Return the fe index of the n-th finite element active on a given
+ * Return the FE index of the n-th finite element active on a given
* vertex.
*/
template <int dim, int spacedim, int d>
{
Assert(d == dim || obj_level == 0, ExcNotImplemented());
- // for cells only one active fe index available
+ // for cells only one active FE index available
Assert(((d == dim) &&
(local_index != DoFHandler<dim, spacedim>::default_fe_index)) ==
false,
/**
- * Returns all active fe indices on a given vertex.
+ * Returns all active FE indices on a given vertex.
*
* The size of the returned set equals the number of finite elements that
* are active on this vertex.
const unsigned int fe_index) const
{
Assert(fe_index_is_active(fe_index) == true,
- ExcMessage("This function can only be called for active fe indices"));
+ ExcMessage("This function can only be called for active FE indices"));
return this->dof_handler->get_fe(fe_index);
}
const DoFCellAccessor<dim, spacedim, level_dof_access> &accessor)
{
if (accessor.dof_handler->hp_capability_enabled == false)
- return 0; // ::DoFHandler only supports a single active fe with index
+ return 0; // ::DoFHandler only supports a single active FE with index
// zero
Assert(
{
if (accessor.dof_handler->hp_capability_enabled == false)
{
- // ::DoFHandler only supports a single active fe with index zero
+ // ::DoFHandler only supports a single active FE with index zero
AssertDimension(i, (DoFHandler<dim, spacedim>::default_fe_index));
return;
}
if (accessor.dof_handler->hp_capability_enabled == false)
return DoFHandler<dim, spacedim>::
default_fe_index; // ::DoFHandler only supports
- // a single active fe with
+ // a single active FE with
// index zero
Assert(
{
if (accessor.dof_handler->hp_capability_enabled == false)
{
- // ::DoFHandler only supports a single active fe with index zero
+ // ::DoFHandler only supports a single active FE with index zero
AssertDimension(i, (DoFHandler<dim, spacedim>::default_fe_index));
return;
}
const DoFCellAccessor<dim, spacedim, level_dof_access> &accessor)
{
if (accessor.dof_handler->hp_capability_enabled == false)
- return false; // ::DoFHandler only supports a single active fe with
+ return false; // ::DoFHandler only supports a single active FE with
// index zero
Assert(
const DoFCellAccessor<dim, spacedim, level_dof_access> &accessor)
{
if (accessor.dof_handler->hp_capability_enabled == false)
- return; // ::DoFHandler only supports a single active fe with index
+ return; // ::DoFHandler only supports a single active FE with index
// zero
Assert(
Assert((this->dof_handler->hp_capability_enabled == false) ||
this->is_active(),
ExcMessage(
- "You can not ask for the active_fe_index on a cell that has "
+ "You can not ask for the active FE index on a cell that has "
"children because no degrees of freedom are assigned "
"to this cell and, consequently, no finite element "
"is associated with it."));
Assert((this->dof_handler->hp_capability_enabled == false) ||
(this->is_locally_owned() || this->is_ghost()),
- ExcMessage("You can only query active_fe_index information on cells "
+ ExcMessage("You can only query active FE index information on cells "
"that are either locally owned or (after distributing "
"degrees of freedom) are ghost cells."));
{
Assert((this->dof_handler->hp_capability_enabled == false) ||
this->is_active(),
- ExcMessage("You can not set the active_fe_index on a cell that has "
+ ExcMessage("You can not set the active FE index on a cell that has "
"children because no degrees of freedom will be assigned "
"to this cell."));
Assert((this->dof_handler->hp_capability_enabled == false) ||
this->is_locally_owned(),
- ExcMessage("You can only set active_fe_index information on cells "
+ ExcMessage("You can only set active FE index information on cells "
"that are locally owned. On ghost cells, this information "
"will automatically be propagated from the owning process "
"of that cell, and there is no information at all on "
Assert((this->dof_handler->hp_capability_enabled == false) ||
(this->has_children() == false),
ExcMessage(
- "You can not ask for the future_fe_index on a cell that has "
+ "You can not ask for the future FE index on a cell that has "
"children because no degrees of freedom are assigned "
"to this cell and, consequently, no finite element "
"is associated with it."));
Assert((this->dof_handler->hp_capability_enabled == false) ||
(this->is_locally_owned()),
- ExcMessage("You can only query future_fe_index information on cells "
+ ExcMessage("You can only query future FE index information on cells "
"that are locally owned."));
return dealii::internal::DoFCellAccessorImplementation::Implementation::
{
Assert((this->dof_handler->hp_capability_enabled == false) ||
(this->has_children() == false),
- ExcMessage("You can not set the future_fe_index on a cell that has "
+ ExcMessage("You can not set the future FE index on a cell that has "
"children because no degrees of freedom will be assigned "
"to this cell."));
Assert((this->dof_handler->hp_capability_enabled == false) ||
this->is_locally_owned(),
- ExcMessage("You can only set future_fe_index information on cells "
+ ExcMessage("You can only set future FE index information on cells "
"that are locally owned."));
dealii::internal::DoFCellAccessorImplementation::Implementation::
Assert((this->dof_handler->hp_capability_enabled == false) ||
(this->has_children() == false),
ExcMessage(
- "You can not ask for the future_fe_index on a cell that has "
+ "You can not ask for the future FE index on a cell that has "
"children because no degrees of freedom are assigned "
"to this cell and, consequently, no finite element "
"is associated with it."));
Assert((this->dof_handler->hp_capability_enabled == false) ||
(this->is_locally_owned()),
- ExcMessage("You can only query future_fe_index information on cells "
+ ExcMessage("You can only query future FE index information on cells "
"that are locally owned."));
return dealii::internal::DoFCellAccessorImplementation::Implementation::
Assert((this->dof_handler->hp_capability_enabled == false) ||
(this->has_children() == false),
ExcMessage(
- "You can not ask for the future_fe_index on a cell that has "
+ "You can not ask for the future FE index on a cell that has "
"children because no degrees of freedom are assigned "
"to this cell and, consequently, no finite element "
"is associated with it."));
Assert((this->dof_handler->hp_capability_enabled == false) ||
(this->is_locally_owned()),
- ExcMessage("You can only query future_fe_index information on cells "
+ ExcMessage("You can only query future FE index information on cells "
"that are locally owned."));
dealii::internal::DoFCellAccessorImplementation::Implementation::
using offset_type = unsigned int;
/**
- * Invalid active_fe_index which will be used as a default value to determine
- * whether a future_fe_index has been set or not.
+ * Invalid active FE index which will be used as a default value to determine
+ * whether a future FE index has been set or not.
*/
static const active_fe_index_type invalid_active_fe_index =
static_cast<active_fe_index_type>(-1);
/**
* Whenever serialization with a parallel::distributed::Triangulation as the
* underlying triangulation is considered, we also need to consider storing
- * the active_fe_indices on all active cells as well.
+ * the active FE indices on all active cells as well.
*
* This function registers that these indices are to be stored whenever the
* parallel::distributed::Triangulation::save() function is called on the
/**
* Whenever serialization with a parallel::distributed::Triangulation as the
* underlying triangulation is considered, we also need to consider storing
- * the active_fe_indices on all active cells as well.
+ * the active FE indices on all active cells as well.
*
* This function deserializes and distributes the previously stored
- * active_fe_indices on all active cells.
+ * active FE indices on all active cells.
*
* @note Currently only implemented for triangulations of type
* parallel::distributed::Triangulation. An assertion will be triggered if
DeclException2(ExcInvalidFEIndex,
int,
int,
- << "The mesh contains a cell with an active_fe_index of "
+ << "The mesh contains a cell with an active FE index of "
<< arg1 << ", but the finite element collection only has "
<< arg2 << " elements");
/**
* Whenever the underlying triangulation changes by either
- * h/p refinement/coarsening and serialization, the active_fe_index of cells
+ * h/p-refinement/coarsening and serialization, the active FE index of cells
* needs to be transferred. This structure stores all temporary information
* required during that process.
*/
std::map<const cell_iterator, const unsigned int> coarsened_cells_fe_index;
/**
- * Container to temporarily store the active_fe_index of every locally
+ * Container to temporarily store the active FE index of every locally
* owned cell for transfer across parallel::distributed::Triangulation
* objects.
*/
std::vector<unsigned int> active_fe_indices;
/**
- * Helper object to transfer all active_fe_indices on
+ * Helper object to transfer all active FE indices on
* parallel::distributed::Triangulation objects during
* refinement/coarsening and serialization.
*/
object_dof_ptr;
/**
- * Active fe indices of each geometric object. Identification
+ * Active FE indices of each geometric object. Identification
* of the appropriate position of a cell in the vectors is done via
* hp_object_fe_ptr (CRS scheme).
*/
hp_object_fe_indices;
/**
- * Pointer to the first fe index of a geometric object.
+ * Pointer to the first FE index of a geometric object.
*/
mutable std::array<std::vector<offset_type>, dim + 1> hp_object_fe_ptr;
/**
- * Active fe index of an active cell (identified by level and level index).
+ * Active FE index of an active cell (identified by level and level index).
* This vector is only used in hp-mode.
*/
mutable std::vector<std::vector<active_fe_index_type>>
hp_cell_active_fe_indices;
/**
- * Future fe index of an active cell (identified by level and level index).
+ * Future FE index of an active cell (identified by level and level index).
* This vector is only used in hp-mode.
*/
mutable std::vector<std::vector<active_fe_index_type>>
* Update tables for active and future fe_indices.
*
* Whenever the underlying triangulation changes (either by adaptation or
- * deserialization), active and future fe index tables will be adjusted to the
+ * deserialization), active and future FE index tables will be adjusted to the
* current structure of the triangulation. Missing values of active and future
* indices will be initialized with their defaults (see
* create_active_fe_table()).
* signal just before the associated Triangulation or
* parallel::shared::Triangulation is modified.
*
- * The function that stores the active_fe_indices of all cells that will
+ * The function that stores the active FE indices of all cells that will
* be refined or coarsened before the refinement happens, so that
* they can be set again after refinement.
*/
* signal just after the associated Triangulation or
* parallel::shared::Triangulation is modified.
*
- * The function that restores the active_fe_indices of all cells that
+ * The function that restores the active FE indices of all cells that
* were refined or coarsened.
*/
void
* signal just before the associated parallel::distributed::Triangulation is
* modified.
*
- * The function that stores all active_fe_indices on locally owned cells for
+ * The function that stores all active FE indices on locally owned cells for
* distribution over all participating processors.
*/
void
* signal just after the associated parallel::distributed::Triangulation is
* modified.
*
- * The function that restores all active_fe_indices on locally owned cells
+ * The function that restores all active FE indices on locally owned cells
* that have been communicated.
*/
void
// given FEs
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
+ if (multiplicities[i] > 0) // check needed as FE might be nullptr
n_shape_functions += fes[i]->n_dofs_per_cell() * multiplicities[i];
// generate the array that will hold the output
// given FEs
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
+ if (multiplicities[i] > 0) // needed because FE might be nullptr
n_shape_functions += fes[i]->n_dofs_per_cell() * multiplicities[i];
unsigned int n_components = 0;
if (do_tensor_product)
{
for (unsigned int i = 0; i < fes.size(); ++i)
- if (multiplicities[i] > 0) // needed because fe might be nullptr
+ if (multiplicities[i] > 0) // needed because FE might be nullptr
n_components += fes[i]->n_components() * multiplicities[i];
}
else
{
for (unsigned int i = 0; i < fes.size(); ++i)
- if (multiplicities[i] > 0) // needed because fe might be nullptr
+ if (multiplicities[i] > 0) // needed because FE might be nullptr
{
n_components = fes[i]->n_components();
break;
}
// Now check that all FEs have the same number of components:
for (unsigned int i = 0; i < fes.size(); ++i)
- if (multiplicities[i] > 0) // needed because fe might be nullptr
+ if (multiplicities[i] > 0) // needed because FE might be nullptr
Assert(n_components == fes[i]->n_components(),
ExcDimensionMismatch(n_components,
fes[i]->n_components()));
cell = dof1.begin_active(),
endc = dof1.end();
- // map from possible fe objects in
+ // map from possible FE objects in
// dof1 to the back_interpolation
// matrices
std::map<const FiniteElement<dim> *, std::unique_ptr<FullMatrix<double>>>
* hp::FECollection and hp::QCollection. Later on, when one sits on a
* concrete cell, one would call the reinit() function for this particular
* cell, just as one does for a regular ::FEValues object. The difference is
- * that this time, the reinit() function looks up the active_fe_index of
+ * that this time, the reinit() function looks up the active FE index of
* that cell, if necessary creates a ::FEValues object that matches the
* finite element and quadrature formulas with that particular index in
* their collections, and then re-initializes it for the current cell. The
* The reinit() functions have additional arguments with default values. If
* not specified, the function takes the index into the hp::FECollection,
* hp::QCollection, and hp::MappingCollection objects from the
- * active_fe_index of the cell, as explained above. However, one can also
+ * active FE index of the cell, as explained above. However, one can also
* select different indices for a current cell. For example, by specifying a
* different index into the hp::QCollection class, one does not need to sort
* the quadrature objects in the quadrature collection so that they match
/**
* Return the mapping object which was specified by the user for the
- * active_fe_index which is provided as a parameter to this method.
+ * active FE index which is provided as a parameter to this method.
*
* @pre @p index must be between zero and the number of elements of the
* collection.
* account. This information is encoded in the row_starts variables
* directly.
*
- * The outer vector goes through the various fe indices in the hp-case,
+ * The outer vector goes through the various FE indices in the hp-case,
* similarly to the @p dofs_per_cell variable.
*/
std::vector<std::vector<unsigned int>> component_dof_indices_offset;
{
(void)constraint_pool_row_index;
- // first reorder the active fe index.
+ // first reorder the active FE index.
const bool have_hp = dofs_per_cell.size() > 1;
if (cell_active_fe_index.size() > 0)
{
operator()(const FaceToCellTopology<length> &face1,
const FaceToCellTopology<length> &face2) const
{
- // check if active fe indices match
+ // check if active FE indices match
if (active_fe_indices.size() > 0)
{
// ... for interior faces
get_current_cell_index() const;
/**
- * Return the active fe index for this class for efficient indexing in the hp-
+ * Return the active FE index for this class for efficient indexing in the hp-
* case.
*/
unsigned int
VectorizedArrayType> *mapping_data;
/**
- * The active fe index for this class for efficient indexing in the hp-case.
+ * The active FE index for this class for efficient indexing in the hp-case.
*/
const unsigned int active_fe_index;
dealii::FEValues<dim> &fe_val = *fe_values[my_q][fe_index];
cell_data.resize(n_q_points);
- // if the fe index has changed from the previous cell, set the
+ // if the FE index has changed from the previous cell, set the
// old cell type to invalid (otherwise, we might detect
// similarity due to some cells further ahead)
if (my_q > 0)
1);
#endif
- // We assume that we have the faces sorted by the active fe
- // indices so that the active fe index of the interior side of the
- // face batch is the same as the fe index of the interior side of
+ // We assume that we have the faces sorted by the active FE
+ // indices so that the active FE index of the interior side of the
+ // face batch is the same as the FE index of the interior side of
// its first entry.
const unsigned int fe_index =
active_fe_index.size() > 0 ?
GeometryInfo<dim>::max_children_per_cell)
{
// We assume that we have the faces sorted by the
- // active fe indices so that the active fe index of
+ // active FE indices so that the active FE index of
// the exterior side of the face batch is the same as
- // the fe index of the exterior side of its first
+ // the FE index of the exterior side of its first
// entry.
const unsigned int fe_index =
active_fe_index.size() > 0 ?
/**
* In the hp-adaptive case, a subrange of internal faces as computed during
* loop() might contain internal faces with elements of different active
- * fe indices. Use this function to compute what the subrange for a given pair
- * of active fe indices is.
+ * FE indices. Use this function to compute what the subrange for a given pair
+ * of active FE indices is.
*/
std::pair<unsigned int, unsigned int>
create_inner_face_subrange_hp_by_index(
/**
* In the hp-adaptive case, a subrange of boundary faces as computed during
* loop() might contain boundary faces with elements of different active
- * fe indices. Use this function to compute what the subrange for a given
- * active fe indices is.
+ * FE indices. Use this function to compute what the subrange for a given
+ * active FE indices is.
*/
std::pair<unsigned int, unsigned int>
create_boundary_face_subrange_hp_by_index(
Assert(
fe_indices[i] >= fe_indices[i - 1],
ExcMessage(
- "Cell range must be over sorted range of fe indices in hp-case!"));
+ "Cell range must be over sorted range of FE indices in hp-case!"));
AssertIndexRange(range.first, fe_indices.size() + 1);
AssertIndexRange(range.second, fe_indices.size() + 1);
#endif
dof_handler_coarse.get_fe(0).dofs_per_cell *
GeometryInfo<dim>::max_children_per_cell;
- // degree of fe on coarse and fine cell
+ // degree of FE on coarse and fine cell
transfer.schemes[0].degree_coarse = transfer.schemes[0].degree_fine =
transfer.schemes[1].degree_coarse = dof_handler_coarse.get_fe(0).degree;
transfer.schemes[1].degree_fine =
* finite elements that are part of the hp::FECollection associated with the
* DoFHandler, should be considered on cells that are not active (i.e., that
* have children). This is because degrees of freedom are only allocated for
- * active cells and, in fact, it is not allowed to set an active_fe_index on
+ * active cells and, in fact, it is not allowed to set an active FE index on
* non- active cells using DoFAccessor::set_active_fe_index().
*
* It is, thus, not entirely natural what should happen if, for example, a few
* cell. After refinement, this Q3 function on the mother cell is then
* interpolated into the space the user has selected for this cell (which may
* be different from Q3, in this example, if the user has set the
- * active_fe_index for a different space post-refinement and before calling
+ * active FE index for a different space post-refinement and before calling
* DoFHandler::distribute_dofs()).
*
* @note In the context of hp-refinement, if cells are coarsened or the
}
}
else
- // fe has only one component, so save some computations
+ // FE has only one component, so save some computations
{
// get only the one component that this function has
dof_values_scalar.resize(fe.n_dofs_per_face(face_no));
for (unsigned int m = 0; m < multiplicity; ++m)
{
// recursively call apply_transform to make sure to
- // correctly handle nested fe systems.
+ // correctly handle nested FE systems.
current_offset = apply_transform(base_fe,
current_offset,
fe_values_jacobians,
std::vector<types::global_dof_index> dofs_on_cell(fe.max_dofs_per_cell());
// Temporary storage for cell-wise interpolation operation. We store a
- // variant for every fe we encounter to speed up resizing operations.
+ // variant for every FE we encounter to speed up resizing operations.
// The first vector is used for local function evaluation. The vector
// dof_values is used to store intermediate cell-wise interpolation
// results (see the detailed explanation in the for loop further down
* Call the create_point_source_vector() function, see above, with
* an implied default $Q_1$ mapping object.
*
- * Note that if your DoFHandler uses any active fe index other than zero, then
+ * Note that if your DoFHandler uses any active FE index other than zero, then
* you need to call the function above that provides a mapping object for each
- * active fe index.
+ * active FE index.
*/
template <int dim, int spacedim>
void
* Call the create_point_source_vector() function for vector-valued finite
* elements, see above, with an implied default $Q_1$ mapping object.
*
- * Note that if your DoFHandler uses any active fe index other than zero, then
+ * Note that if your DoFHandler uses any active FE index other than zero, then
* you need to call the function above that provides a mapping object for each
- * active fe index.
+ * active FE index.
*/
template <int dim, int spacedim>
void
/**
* Call the create_boundary_right_hand_side() function, see above, with a
* single Q1 mapping as collection. This function therefore will only work
- * if the only active fe index in use is zero.
+ * if the only active FE index in use is zero.
*
* @see
* @ref GlossBoundaryIndicator "Glossary entry on boundary indicators"
(**estimated_error_it)[cell->active_cell_index()] *
(gamma_h * std::pow(.5, future_fe_degree));
- // If the future fe index differs from the active one, also take
+ // If the future FE index differs from the active one, also take
// into account p-adaptation.
if (cell->future_fe_index_set())
*predicted_error_it *=
dim,
DoFHandlerType::space_dimension>::CELL_COARSEN:
{
- // In case of coarsening, we need to find a suitable fe index
+ // In case of coarsening, we need to find a suitable FE index
// for the parent cell. We choose the 'least dominant fe'
// on all children from the associated FECollection.
# ifdef DEBUG
DoFHandlerType::space_dimension>::CELL_REFINE:
{
// After refinement, this particular cell is no longer active,
- // and its children have inherited its fe index. However, to
- // unpack the data on the old cell, we need to recover its fe
+ // and its children have inherited its FE index. However, to
+ // unpack the data on the old cell, we need to recover its FE
// index from one of the children. Just to be sure, we also
- // check if all children have the same fe index.
+ // check if all children have the same FE index.
fe_index = cell->child(0)->active_fe_index();
for (unsigned int child_index = 1;
child_index < cell->n_children();
"finite element index because they do not have naturally "
"associated finite element spaces associated: degrees "
"of freedom are only distributed on active cells for which "
- "the active_fe_index has been set."));
+ "the active FE index has been set."));
const FiniteElement<dim, spacedim> &fe =
this->get_dof_handler().get_fe(fe_index);
"finite element index because they do not have naturally "
"associated finite element spaces associated: degrees "
"of freedom are only distributed on active cells for which "
- "the active_fe_index has been set."));
+ "the active FE index has been set."));
const FiniteElement<dim, spacedim> &fe =
this->get_dof_handler().get_fe(fe_index);
struct Implementation
{
/**
- * No future_fe_indices should have been assigned when partitioning a
+ * No future FE indices should have been assigned when partitioning a
* triangulation, since they are only available locally and will not be
* communicated.
*/
[cell->vertex_index(v)] = true;
// in debug mode, make sure that each vertex is associated
- // with at least one fe (note that except for unused
+ // with at least one FE (note that except for unused
// vertices, all vertices are actually active). this is of
// course only true for vertices that are part of either
// ghost or locally owned cells
// description in hp::DoFLevel) with the indices we will
// need. Note that our task is more complicated than for the
// cell case above since two adjacent cells may have different
- // active_fe_indices, in which case we need to allocate
+ // active FE indices, in which case we need to allocate
// *two* sets of face dofs for the same face. But they don't
// *have* to be different, and so we need to prepare for this
// as well.
/**
* Given a DoFHandler object in hp-mode, make sure that the
- * active_fe_indices that a user has set for locally owned cells are
+ * active FE indices that a user has set for locally owned cells are
* communicated to all other relevant cells as well.
*
* For parallel::shared::Triangulation objects,
{
// we have a shared triangulation. in this case, every processor
// knows about all cells, but every processor only has knowledge
- // about the active_fe_index on the cells it owns.
+ // about the active FE index on the cells it owns.
//
- // we can create a complete set of active_fe_indices by letting
+ // we can create a complete set of active FE indices by letting
// every processor create a vector of indices for all cells,
// filling only those on the cells it owns and setting the indices
// on the other cells to zero. then we add all of these vectors
tr->get_communicator(),
active_fe_indices);
- // now go back and fill the active_fe_index on all other
+ // now go back and fill the active FE index on all other
// cells. we would like to call cell->set_active_fe_index(),
// but that function does not allow setting these indices on
// non-locally_owned cells. so we have to work around the
* future refinement and coarsening. Further, prepare those indices to
* be distributed on on the updated triangulation later.
*
- * On cells to be refined, the active_fe_index will be inherited to
+ * On cells to be refined, the active FE index will be inherited to
* their children and thus will be stored as such.
*
* On cells to be coarsened, we choose the finite element on the parent
* information.
*
* On cells intended for p-refinement or p-coarsening, those
- * active_fe_indices will be determined by the corresponding flags that
+ * active FE indices will be determined by the corresponding flags that
* have been set on the relevant cells.
*/
template <int dim, int spacedim>
{
if (cell->refine_flag_set())
{
- // Store the active_fe_index of each cell that will be
+ // Store the active FE index of each cell that will be
// refined to and distribute it later on its children.
// Pick their future index if flagged for p-refinement.
fe_transfer->refined_cells_fe_index.insert(
else if (cell->coarsen_flag_set())
{
// From all cells that will be coarsened, determine their
- // parent and calculate its proper active_fe_index, so that
+ // parent and calculate its proper active FE index, so that
// it can be set after refinement. But first, check if that
// particular cell has a parent at all.
Assert(cell->level() > 0, ExcInternalError());
const auto &parent = cell->parent();
- // Check if the active_fe_index for the current cell has
+ // Check if the active FE index for the current cell has
// been determined already.
if (fe_transfer->coarsened_cells_fe_index.find(parent) ==
fe_transfer->coarsened_cells_fe_index.end())
{
- // Find a suitable active_fe_index for the parent cell
+ // Find a suitable active FE index for the parent cell
// based on the 'least dominant finite element' of its
// children. Consider the childrens' hypothetical future
// index when they have been flagged for p-refinement.
{
// No h-refinement is scheduled for this cell.
// However, it may have p-refinement indicators, so we
- // choose a new active_fe_index based on its flags.
+ // choose a new active FE index based on its flags.
if (cell->future_fe_index_set() == true)
fe_transfer->persisting_cells_fe_index.insert(
{cell, cell->future_fe_index()});
{
const auto &fe_transfer = dof_handler.active_fe_index_transfer;
- // Set active_fe_indices on persisting cells.
+ // Set active FE indices on persisting cells.
for (const auto &persist : fe_transfer->persisting_cells_fe_index)
{
const auto &cell = persist.first;
}
}
- // Distribute active_fe_indices from all refined cells on their
+ // Distribute active FE indices from all refined cells on their
// respective children.
for (const auto &refine : fe_transfer->refined_cells_fe_index)
{
}
}
- // Set active_fe_indices on coarsened cells that have been determined
+ // Set active FE indices on coarsened cells that have been determined
// before the actual coarsening happened.
for (const auto &coarsen : fe_transfer->coarsened_cells_fe_index)
{
/**
* Coarsening strategy for the CellDataTransfer object responsible for
- * transferring the active_fe_index of each cell on
+ * transferring the active FE index of each cell on
* parallel::distributed::Triangulation objects that have been refined.
*
* A finite element index needs to be determined for the (not yet
this->hp_cell_future_fe_indices.shrink_to_fit();
}
- // re-enabling hp-mode is not permitted since the active and future fe
+ // re-enabling hp-mode is not permitted since the active and future FE
// tables are no longer available
AssertThrow(
hp_capability_enabled || !contains_multiple_fes,
if (hp_capability_enabled)
{
- // make sure every processor knows the active_fe_indices
+ // make sure every processor knows the active FE indices
// on both its own cells and all ghost cells
dealii::internal::hp::DoFHandlerImplementation::Implementation::
communicate_active_fe_indices(*this);
- // make sure that the fe collection is large enough to
- // cover all fe indices presently in use on the mesh
+ // make sure that the FE collection is large enough to
+ // cover all FE indices presently in use on the mesh
for (const auto &cell : this->active_cell_iterators())
if (!cell->is_artificial())
Assert(cell->active_fe_index() < this->fe_collection.size(),
this->hp_cell_future_fe_indices.shrink_to_fit();
}
- // re-enabling hp-mode is not permitted since the active and future fe
+ // re-enabling hp-mode is not permitted since the active and future FE
// tables are no longer available
AssertThrow(
hp_capability_enabled || !contains_multiple_fes,
//
if (hp_capability_enabled)
{
- // make sure every processor knows the active_fe_indices
+ // make sure every processor knows the active FE indices
// on both its own cells and all ghost cells
internal::hp::DoFHandlerImplementation::Implementation::
communicate_active_fe_indices(*this);
#ifdef DEBUG
- // make sure that the fe collection is large enough to
- // cover all fe indices presently in use on the mesh
+ // make sure that the FE collection is large enough to
+ // cover all FE indices presently in use on the mesh
for (const auto &cell : this->active_cell_iterators())
{
if (!cell->is_artificial())
[this]() { this->create_active_fe_table(); }));
// attach corresponding callback functions dealing with the transfer of
- // active_fe_indices depending on the type of triangulation
+ // active FE indices depending on the type of triangulation
if (dynamic_cast<
const dealii::parallel::DistributedTriangulationBase<dim, spacedim> *>(
&this->get_triangulation()))
this->hp_cell_future_fe_indices.resize(this->tria->n_levels());
// then make sure that on each level we have the appropriate size
- // of active_fe_indices; preset them to zero, i.e. the default FE
+ // of active FE indices; preset them to zero, i.e. the default FE
for (unsigned int level = 0; level < this->hp_cell_future_fe_indices.size();
++level)
{
}
else
{
- // Either the active_fe_indices have size zero because
+ // Either the active FE indices have size zero because
// they were just created, or the correct size. Other
// sizes indicate that something went wrong.
Assert(this->hp_cell_active_fe_indices[level].size() ==
}
// it may be that the previous table was compressed; in that
- // case, restore the correct active_fe_index. the fact that
+ // case, restore the correct active FE index. the fact that
// this no longer matches the indices in the table is of no
// importance because the current function is called at a
// point where we have to recreate the dof_indices tables in
for (unsigned int i = 0; i < this->hp_cell_future_fe_indices.size(); ++i)
{
- // Resize active_fe_indices vectors. Use zero indicator to extend.
+ // Resize active FE indices vectors. Use zero indicator to extend.
this->hp_cell_active_fe_indices[i].resize(this->tria->n_raw_cells(i), 0);
- // Resize future_fe_indices vectors. Make sure that all
- // future_fe_indices have been cleared after refinement happened.
+ // Resize future FE indices vectors. Make sure that all
+ // future FE indices have been cleared after refinement happened.
//
- // We have used future_fe_indices to update all active_fe_indices
+ // We have used future FE indices to update all active FE indices
// before refinement happened, thus we are safe to clear them now.
this->hp_cell_future_fe_indices[i].assign(this->tria->n_raw_cells(i),
invalid_active_fe_index);
active_fe_index_transfer = std::make_unique<ActiveFEIndexTransfer>();
// If we work on a p::d::Triangulation, we have to transfer all
- // active_fe_indices since ownership of cells may change. We will
+ // active FE indices since ownership of cells may change. We will
// use our p::d::CellDataTransfer member to achieve this. Further,
// we prepare the values in such a way that they will correspond to
- // the active_fe_indices on the new mesh.
+ // the active FE indices on the new mesh.
- // Gather all current future_fe_indices.
+ // Gather all current future FE indices.
active_fe_index_transfer->active_fe_indices.resize(
get_triangulation().n_active_cells(), numbers::invalid_unsigned_int);
dealii::internal::hp::DoFHandlerImplementation::Implementation::
distribute_fe_indices_on_refined_cells(*this);
- // We have to distribute the information about active_fe_indices
+ // We have to distribute the information about active FE indices
// of all cells (including the artificial ones) on all processors,
// if a parallel::shared::Triangulation has been used.
dealii::internal::hp::DoFHandlerImplementation::Implementation::
Assert(this->active_fe_index_transfer != nullptr, ExcInternalError());
- // Unpack active_fe_indices.
+ // Unpack active FE indices.
this->active_fe_index_transfer->active_fe_indices.resize(
this->get_triangulation().n_active_cells(), numbers::invalid_unsigned_int);
this->active_fe_index_transfer->cell_data_transfer->unpack(
this->active_fe_index_transfer->active_fe_indices);
- // Update all locally owned active_fe_indices.
+ // Update all locally owned active FE indices.
this->set_active_fe_indices(
this->active_fe_index_transfer->active_fe_indices);
- // Update active_fe_indices on ghost cells.
+ // Update active FE indices on ghost cells.
dealii::internal::hp::DoFHandlerImplementation::Implementation::
communicate_active_fe_indices(*this);
});
// If we work on a p::d::Triangulation, we have to transfer all
- // active fe indices since ownership of cells may change.
+ // active FE indices since ownership of cells may change.
- // Gather all current active_fe_indices
+ // Gather all current active FE indices
get_active_fe_indices(active_fe_index_transfer->active_fe_indices);
// Attach to transfer object
fe_collection);
});
- // Unpack active_fe_indices.
+ // Unpack active FE indices.
active_fe_index_transfer->active_fe_indices.resize(
get_triangulation().n_active_cells(), numbers::invalid_unsigned_int);
active_fe_index_transfer->cell_data_transfer->deserialize(
active_fe_index_transfer->active_fe_indices);
- // Update all locally owned active_fe_indices.
+ // Update all locally owned active FE indices.
set_active_fe_indices(active_fe_index_transfer->active_fe_indices);
- // Update active_fe_indices on ghost cells.
+ // Update active FE indices on ghost cells.
dealii::internal::hp::DoFHandlerImplementation::Implementation::
communicate_active_fe_indices(*this);
// Note: we may wish to have something here similar to what
// we do for lines and quads, namely that we only identify
- // dofs for any fe towards the most dominating one. however,
+ // dofs for any FE towards the most dominating one. however,
// it is not clear whether this is actually necessary for
// vertices at all, I can't think of a finite element that
// would make that necessary...
// are not yet constrained to anything else,
// except for to each other. use the rule that
// we will always constrain the dof with the
- // higher fe index to the one with the lower,
+ // higher FE index to the one with the lower,
// to avoid circular reasoning.
for (const auto &identity : identities)
{
// Note: we may wish to have something here similar to what
// we do for lines and quads, namely that we only identify
- // dofs for any fe towards the most dominating one. however,
+ // dofs for any FE towards the most dominating one. however,
// it is not clear whether this is actually necessary for
// vertices at all, I can't think of a finite element that
// would make that necessary...
// are not yet constrained to anything else,
// except for to each other. use the rule that
// we will always constrain the dof with the
- // higher fe index to the one with the lower,
+ // higher FE index to the one with the lower,
// to avoid circular reasoning.
for (const auto &identity : identities)
{
// we need to work on.
//
// all degrees of freedom belonging to
- // dominating fe indices or to a processor
+ // dominating FE indices or to a processor
// with a higher rank have been set at this
// point (either in Phase 2, or after the
// first ghost exchange in Phase 5). thus,
// we need to work on.
//
// all degrees of freedom belonging to
- // dominating fe indices or to a processor
+ // dominating FE indices or to a processor
// with a higher rank have been set at this
// point (either in Phase 2, or after the
// first ghost exchange in Phase 5). thus,
// we need to work on.
//
// all degrees of freedom belonging to
- // dominating fe indices or to a processor with
+ // dominating FE indices or to a processor with
// a higher rank have been set at this point
// (either in Phase 2, or after the first ghost
// exchange in Phase 5). thus, we only have to
// the previous indices were all valid. this really should
// be the case: we allocated space for these vertex dofs,
// i.e., at least one adjacent cell has a valid
- // active_fe_index, so there are DoFs that really live
+ // active FE index, so there are DoFs that really live
// on this vertex. if check_validity is set, then we
// must make sure that they have been set to something
// useful
// If the DoFHandler has hp-capabilities enabled, then we may have
// received valid indices of degrees of freedom that are dominated
- // by a fe object adjacent to a ghost interface. thus, we overwrite
+ // by a FE object adjacent to a ghost interface. thus, we overwrite
// the remaining invalid indices with the valid ones in this step.
Implementation::merge_invalid_dof_indices_on_ghost_interfaces(
*dof_handler);
// if the DoFHandler has hp-capabilities then we may have
// received valid indices of degrees of freedom that are
- // dominated by a fe object adjacent to a ghost interface.
+ // dominated by a FE object adjacent to a ghost interface.
// thus, we overwrite the remaining invalid indices with the
// valid ones in this step.
Implementation::merge_invalid_dof_indices_on_ghost_interfaces(
// non-primitive, but use usual convention (see docs)
{
// first get at the cell-global number of a face dof,
- // to ask the fe certain questions
+ // to ask the FE certain questions
const unsigned int cell_index =
(dim == 1 ?
i :
for (unsigned int fe_index = 0; fe_index < fe_collection.size();
++fe_index)
{
- // check whether every fe in the collection has support points
+ // check whether every FE in the collection has support points
Assert(fe_collection[fe_index].has_support_points(),
typename FiniteElement<dim>::ExcFEHasNoSupportPoints());
q_coll_dummy.push_back(Quadrature<dim>(
for (const unsigned int face : cell->face_indices())
if (cell->face(face)->has_children())
{
- // in any case, faces can have at most two active fe indices,
+ // in any case, faces can have at most two active FE indices,
// but here the face can have only one (namely the same as that
// from the cell we're sitting on), and each of the children can
// have only one as well. check this
ExcInternalError());
// right now, all that is implemented is the case that both
- // sides use the same fe
+ // sides use the same FE
for (unsigned int c = 0; c < cell->face(face)->n_children();
++c)
if (!cell->neighbor_child_on_subface(face, c)
else
{
// this face has no children, but it could still be that it is
- // shared by two cells that use a different fe index. check a
+ // shared by two cells that use a different FE index. check a
// couple of things, but ignore the case that the neighbor is an
// artificial cell
if (!cell->at_boundary(face) &&
RefinementCase<dim - 1>::isotropic_refinement,
ExcNotImplemented());
- // in any case, faces can have at most two active fe indices,
+ // in any case, faces can have at most two active FE indices,
// but here the face can have only one (namely the same as that
// from the cell we're sitting on), and each of the children can
// have only one as well. check this
// right now, all that is implemented is the case that both
// sides use the same fe, and not only that but also that all
- // lines bounding this face and the children have the same fe
+ // lines bounding this face and the children have the same FE
for (unsigned int c = 0; c < cell->face(face)->n_children();
++c)
if (!cell->neighbor_child_on_subface(face, c)
else
{
// this face has no children, but it could still be that it is
- // shared by two cells that use a different fe index. check a
+ // shared by two cells that use a different FE index. check a
// couple of things, but ignore the case that the neighbor is an
// artificial cell
if (!cell->at_boundary(face) &&
// so now we've found a face of an active cell that has
// children. that means that there are hanging nodes here.
- // in any case, faces can have at most two sets of active fe
+ // in any case, faces can have at most two sets of active FE
// indices, but here the face can have only one (namely the same
// as that from the cell we're sitting on), and each of the
// children can have only one as well. check this
else
{
// this face has no children, but it could still be that it is
- // shared by two cells that use a different fe index
+ // shared by two cells that use a different FE index
Assert(cell->face(face)->fe_index_is_active(
cell->active_fe_index()) == true,
ExcInternalError());
// see if there is a neighbor that is an artificial cell. in
// that case, we're not interested in this interface. we test
// this case first since artificial cells may not have an
- // active_fe_index set, etc
+ // active FE index set, etc
if (!cell->at_boundary(face) &&
cell->neighbor(face)->is_artificial())
continue;
- // Only if there is a neighbor with a different active_fe_index
+ // Only if there is a neighbor with a different active FE index
// and the same h-level, some action has to be taken.
if ((dof_handler.has_hp_capabilities()) &&
!cell->face(face)->at_boundary() &&
FE_Bernstein<dim, spacedim>::hp_line_dof_identities(
const FiniteElement<dim, spacedim> &) const
{
- // Since this fe is not interpolatory but on the vertices, we can
+ // Since this FE is not interpolatory but on the vertices, we can
// not identify dofs on lines and on quads even if there are dofs
// on lines and on quads.
//
const FiniteElement<dim, spacedim> &,
const unsigned int) const
{
- // Since this fe is not interpolatory but on the vertices, we can
+ // Since this FE is not interpolatory but on the vertices, we can
// not identify dofs on lines and on quads even if there are dofs
// on lines and on quads.
//
Assert(fes.size() == multiplicities.size(),
ExcDimensionMismatch(fes.size(), multiplicities.size()));
- // Note that we need to skip every fe with multiplicity 0 in the following
+ // Note that we need to skip every FE with multiplicity 0 in the following
// block of code
this->base_to_block_indices.reinit(0, 0);
// However, functions like interpolate_boundary_values() need all FEs inside
// FECollection to be able to provide support points irrespectively whether
// this FE sits on the boundary or not. Thus for moment just copy support
- // points from fe system:
+ // points from FE system:
{
this->unit_support_points = fe_system->unit_support_points;
this->unit_face_support_points = fe_system->unit_face_support_points;
* on adjacent cells, an enriched FE [0 0 1] should exist and is
* found as the least dominating finite element for the two cells by
* DoFTools::make_hanging_node_constraints, using the above mentioned
- * hp::FECollection functions. Denoting the fe set in adjacent cells as
- * {1,3} and {2,3}, this implies that an fe set {3} needs to be added!
+ * hp::FECollection functions. Denoting the FE set in adjacent cells as
+ * {1,3} and {2,3}, this implies that an FE set {3} needs to be added!
* Based on the predicate configuration, this may not be automatically
* done without the following special treatment.
*/
const auto nbr_fe_index =
cell->neighbor(face)->active_fe_index();
- // find corresponding fe set
+ // find corresponding FE set
const auto nbr_fe_set = fe_sets.at(nbr_fe_index);
- // find intersection of the fe sets: fe_set and nbr_fe_set
+ // find intersection of the FE sets: fe_set and nbr_fe_set
std::set<unsigned int> intersection_set;
std::set_intersection(
fe_set.begin(),
// if it does and the other is FE_Nothing, either can dominate
return FiniteElementDomination::either_element_can_dominate;
else
- // otherwise we dominate whatever fe is provided
+ // otherwise we dominate whatever FE is provided
return FiniteElementDomination::this_element_dominates;
}
Assert(count_nonzeros(multiplicities) > 0,
ExcMessage("You only passed FiniteElements with multiplicity 0."));
- // Note that we need to skip every fe with multiplicity 0 in the following
+ // Note that we need to skip every FE with multiplicity 0 in the following
// block of code
this->base_to_block_indices.reinit(0, 0);
// derivatives
typename DerivativeDescription::Derivative projected_derivative;
- // reinit fe values object...
+ // reinit FE values object...
x_fe_midpoint_value.reinit(cell);
const FEValues<dim> &fe_midpoint_value =
x_fe_midpoint_value.get_present_fe_values();
{
const auto neighbor = *neighbor_ptr;
- // reinit fe values object...
+ // reinit FE values object...
x_fe_midpoint_value.reinit(neighbor);
const FEValues<dim> &neighbor_fe_midpoint_value =
x_fe_midpoint_value.get_present_fe_values();
// the requested point for all finite
// element components lie in the same cell.
// this could possibly be violated if
- // components use different fe orders,
+ // components use different FE orders,
// requested points are on the edge or
// vertex of a cell and we are unlucky with
// floating point rounding. Worst case
{
// make sure that the size of the stored indices is the same
// as dofs_per_cell. this is kind of a test if we use the same
- // fe in the hp-case. to really do that test we would have to
+ // FE in the hp-case. to really do that test we would have to
// store the fe_index of all cells
const Vector<typename VectorType::value_type> *data = nullptr;
const unsigned int active_fe_index = cell->active_fe_index();
void
check_this(const FiniteElement<dim> &fe1, const FiniteElement<dim> &fe2)
{
- // check that the name of the fe
- // and the name of the fe that we
+ // check that the name of the FE
+ // and the name of the FE that we
// re-create from this name are
// identitical. this is also a
// pretty good indication that the
void
check_this(const FiniteElement<dim> &fe1, const FiniteElement<dim> &fe2)
{
- // check that the name of the fe
- // and the name of the fe that we
+ // check that the name of the FE
+ // and the name of the FE that we
// re-create from this name are
// identitical. this is also a
// pretty good indication that the
void
check_this(const FiniteElement<dim> &fe1, const FiniteElement<dim> &fe2)
{
- // check that the name of the fe
- // and the name of the fe that we
+ // check that the name of the FE
+ // and the name of the FE that we
// re-create from this name are
// identitical. this is also a
// pretty good indication that the
if (fe.n_components() != 1)
return;
- // ignore this check if this fe has already
+ // ignore this check if this FE has already
// been treated
static std::set<std::string> already_checked;
if (already_checked.find(fe.get_name()) != already_checked.end())
if (fe.n_components() != 1)
return;
- // ignore this check if this fe has already
+ // ignore this check if this FE has already
// been treated
static std::set<std::string> already_checked;
if (already_checked.find(fe.get_name()) != already_checked.end())
if (fe.n_components() != 1)
return;
- // ignore this check if this fe has already
+ // ignore this check if this FE has already
// been treated
static std::set<std::string> already_checked;
if (already_checked.find(fe.get_name()) != already_checked.end())
if (fe.n_components() != 1)
return;
- // ignore this check if this fe has already
+ // ignore this check if this FE has already
// been treated
static std::set<std::string> already_checked;
if (already_checked.find(fe.get_name()) != already_checked.end())
if (fe.n_components() != 1)
return;
- // ignore this check if this fe has already
+ // ignore this check if this FE has already
// been treated
static std::set<std::string> already_checked;
if (already_checked.find(fe.get_name()) != already_checked.end())
void
check_this(const DoFHandler<dim> &dof_handler)
{
- // don't check if fe has no support
+ // don't check if FE has no support
// points
if (dof_handler.get_fe().get_unit_support_points().size() == 0)
return;
/*
* Test function - ColorEnriched::internal::set_cellwise_color_set_and_fe_index
* for a set of predicates.
- * Check for each cell, if appropriate fe index and color-index map is set.
+ * Check for each cell, if appropriate FE index and color-index map is set.
* Color-index map associates different colors of different enrichment
* functions with corresponding enrichment function index.
*/
fe_sets);
/*
- * Run through active cells to check fe index, colors of
+ * Run through active cells to check FE index, colors of
* enrichment functions associated with it.
*
- * A unique color set corresponds to an fe index.
+ * A unique color set corresponds to an FE index.
*
- * Eg: If an fe index 1 corresponds to color set {2,3},
- * means that a cell with fe index 1 has enrichment functions
+ * Eg: If an FE index 1 corresponds to color set {2,3},
+ * means that a cell with FE index 1 has enrichment functions
* which are colored 2 and 3. Here different enrichment function
* have same color 2 but for a given cell only one of them would
* be relevant. So all additional information we need is which
<< color_predicate_pair.second << "):";
}
- // For a cell, print fe active index and corresponding fe set.
+ // For a cell, print FE active index and corresponding FE set.
//{1,2} indicates 2 enrichment functions of color 1 and 2 are relevant.
deallog << ":fe_active_index:" << cell->active_fe_index() << ":fe_set:";
for (auto fe_set_element : fe_sets[cell->active_fe_index()])
fe_nothing,
fe_collection);
- // print all the different fe sets needed by different cells
+ // print all the different FE sets needed by different cells
deallog << "fe sets:" << std::endl;
for (auto fe_set : fe_sets)
{
vec_enrichments.push_back(std::make_shared<ConstantFunction<dim>>(func));
}
- // Construct helper class to construct fe collection
+ // Construct helper class to construct FE collection
FE_Q<dim> fe_base(2);
FE_Q<dim> fe_enriched(1);
static ColorEnriched::Helper<dim> fe_space(fe_base,
{
pcout << "...start print fe indices" << std::endl;
- // print fe index
+ // print FE index
const std::string base_filename =
"fe_indices" + dealii::Utilities::int_to_string(dim) + "_p" +
dealii::Utilities::int_to_string(0);
pcout << "...run problem" << std::endl;
double norm_soln_old(0), norm_rel_change_old(1);
- // Run making grids and building fe space only once.
+ // Run making grids and building FE space only once.
initialize();
build_fe_space();
std::make_shared<Functions::ConstantFunction<dim>>(func));
}
- // Construct helper class to construct fe collection
+ // Construct helper class to construct FE collection
FE_Q<dim> fe_base(2);
FE_Q<dim> fe_enriched(1);
fe_collection.push_back(
FE_Enriched<dim>(FE_Q<dim>(2), FE_Q<dim>(1), &enrichment));
- // assign fe index in the constructor so that FE/FE+POU is determined
+ // assign FE index in the constructor so that FE/FE+POU is determined
// on the coarsest mesh to avoid issues like
// +---------+----+----+
// | | fe | |
// enriched elements (active_fe_index==1):
fe_collection.push_back(FESystem<dim>(FE_Q<dim>(2), 1, FE_Q<dim>(1), 1));
- // assign fe index in the constructor so that FE/FE+POU is determined
+ // assign FE index in the constructor so that FE/FE+POU is determined
// on the coarsest mesh to avoid issues like
// +---------+----+----+
// | | fe | |
// Store computed values at quad points:
fe_values[E_re].get_function_values(solution, sol);
- // Calc values of curlE from fe solution:
+ // Calc values of curlE from FE solution:
cell->get_dof_indices(local_dof_indices);
// Loop over quad points to calculate solution:
for (const auto q_point : fe_values.quadrature_point_indices())
}
// check 2: first to finer cells,
- // then to finer fe
+ // then to finer FE
{
FullMatrix<double> tmp1(coarse_fe.dofs_per_cell,
coarse_fe.dofs_per_cell);
DoFHandler<dim, spacedim> dh(tria);
dh.distribute_dofs(fe);
- // This stores a pointer to the fe in dh.
+ // This stores a pointer to the FE in dh.
FEValues<dim, spacedim> fe_v(dh.get_fe(), QGauss<dim>(1), update_values);
tria.refine_global(1);
DoFHandler<dim, spacedim> dh(tria);
dh.distribute_dofs(fe_collection);
- // This stores a pointer to the fe in dh.
+ // This stores a pointer to the FE in dh.
hp::FEValues<dim, spacedim> fe_v(dh.get_fe_collection(),
hp::QCollection<dim>(QGauss<dim>(1)),
update_values);
deallog << "Testing " << fe[i].get_name() << " vs. " << fe[j].get_name()
<< std::endl;
- // set fe on coarse cell to 'i', on
+ // set FE on coarse cell to 'i', on
// all fine cells to 'j'
typename DoFHandler<dim>::active_cell_iterator cell =
dof_handler.begin_active();
// Store computed values at quad points:
fe_values[E_re].get_function_values(solution, sol);
- // Calc values of curlE from fe solution:
+ // Calc values of curlE from FE solution:
cell->get_dof_indices(local_dof_indices);
// Loop over quad points to calculate solution:
for (const auto q_point : fe_values.quadrature_point_indices())
GridGenerator::hyper_cube(tria);
tria.refine_global(1);
- // Vector fe
+ // Vector FE
FESystem<dim, spacedim> fe{FE_Q<dim, spacedim>(1), spacedim};
DoFHandler<dim, spacedim> dh(tria);
dh.distribute_dofs(fe);
GridGenerator::hyper_cube(tria);
tria.refine_global(1);
- // Vector fe
+ // Vector FE
FESystem<dim, spacedim> fe{FE_Q<dim, spacedim>(1), spacedim};
DoFHandler<dim, spacedim> dh(tria);
dh.distribute_dofs(fe);
GridGenerator::hyper_cube(tria);
tria.refine_global();
- // Vector fe
+ // Vector FE
FESystem<dim, spacedim> fe{FE_Q<dim, spacedim>(1), spacedim};
DoFHandler<dim, spacedim> dh(tria);
dh.distribute_dofs(fe);
write_vtk(dof_handler, filename.c_str());
}
- // Compute a halo layer around active fe index 2 and set it to active fe index
+ // Compute a halo layer around active FE index 2 and set it to active FE index
// 3
std::function<bool(const cell_iterator &)> predicate =
IteratorFilters::ActiveFEIndexEqualTo(2, true);
write_vtk(dof_handler, filename.c_str());
}
- // Compute a halo layer around active fe indices 2,3 and set it to active fe
+ // Compute a halo layer around active FE indices 2,3 and set it to active FE
// index 4
std::set<unsigned int> index_set;
index_set.insert(2);
// out the numbers of the dofs that
// belong to the shared edge
// (that's the one that has three
- // different fe indices associated
+ // different FE indices associated
// with it). note that there is
// only one such line so we can
// quit the loop once we find it
// out the numbers of the dofs that
// belong to the shared edge
// (that's the one that has four
- // different fe indices associated
+ // different FE indices associated
// with it). note that there is
// only one such line so we can
// quit the loop once we find it
//
// this code in particular tests some compensating code in
// dof_tools.cc, where we have to make sure that we select a suitable
-// set of primary dofs. this is mostly trivial in 2d and for most fe
+// set of primary dofs. this is mostly trivial in 2d and for most FE
// combinations in 3d as well. the exceptions are that it doesn't work
// as easily in 3d for the combinations Q4/Q3, Q5/Q3, and
// Q5/Q4. Higher order finite elements in 3d will probably only
deallog << "Testing " << fe[i].get_name() << " vs. " << fe[j].get_name()
<< std::endl;
- // set fe on coarse cell to 'i', on
+ // set FE on coarse cell to 'i', on
// all fine cells to 'j'
typename DoFHandler<dim>::active_cell_iterator cell =
dof_handler.begin_active();
}
- // if there are multiple active fe
+ // if there are multiple active FE
// indices, make sure that all their
- // fe indices were unified
+ // FE indices were unified
for (unsigned int i = 0; i < cell->line(line)->n_active_fe_indices();
++i)
for (unsigned int j = i + 1;
// if the mesh is generated after the hp::DoFHandler is attached to the
-// triangulation object, then we can't set active fe indices -- which is
-// somewhat tragic since we have to assign active fe indices before we can
+// triangulation object, then we can't set active FE indices -- which is
+// somewhat tragic since we have to assign active FE indices before we can
// call distribute_dofs
//
// originally, this problem was avoided because the hp::DoFHandler listens to
DoFHandler<2> hp_dof_handler(triangulation);
DoFHandler<2> hp_dof_handler2(triangulation);
- // set different fe for testing
+ // set different FE for testing
DoFHandler<2>::active_cell_iterator cell = hp_dof_handler.begin_active(),
endc = hp_dof_handler.end();
/* clang-format off */
-// find the least dominating fe from a set of fes on faces (codim=1).
+// find the least dominating FE from a set of FEs on faces (codim=1).
// for this task we concatenate the two functions
// FECollection::find_common_subspace() and FECollection::find_dominated_fe().
// we test the results for the following collections:
/* clang-format off */
-// find the most dominating fe from a set of fes on faces (codim=1).
+// find the most dominating FE from a set of FEs on faces (codim=1).
// for this task we concatenate the two functions
// FECollection::find_encapsulating_space() and FECollection::find_dominating_fe().
// we test the results for the following collections:
while (fe_collection.size() < 3)
{
- // add dummy fe to collection
+ // add dummy FE to collection
fe_collection.push_back(FE_Q<dim>(1));
deallog << "size:" << fe_collection.size() << std::endl;
-// check if future fe indices will be set correctly
+// check if future FE indices will be set correctly
#include <deal.II/dofs/dof_handler.h>
DEAL::Yes, exception 1!
DEAL::ExcMessage( "For DoFHandler objects in hp-mode, finite elements are only " "associated with active cells. Consequently, you can not ask " "for the active finite element on cells with children.")
DEAL::Yes, exception 2!
-DEAL::ExcMessage( "You cannot call this function on non-active cells " "of DoFHandler objects unless you provide an explicit " "finite element index because they do not have naturally " "associated finite element spaces associated: degrees " "of freedom are only distributed on active cells for which " "the active_fe_index has been set.")
+DEAL::ExcMessage( "You cannot call this function on non-active cells " "of DoFHandler objects unless you provide an explicit " "finite element index because they do not have naturally " "associated finite element spaces associated: degrees " "of freedom are only distributed on active cells for which " "the active FE index has been set.")
DEAL::Yes, exception 1!
DEAL::ExcMessage( "For DoFHandler objects in hp-mode, finite elements are only " "associated with active cells. Consequently, you can not ask " "for the active finite element on cells with children.")
DEAL::Yes, exception 2!
-DEAL::ExcMessage( "You cannot call this function on non-active cells " "of DoFHandler objects unless you provide an explicit " "finite element index because they do not have naturally " "associated finite element spaces associated: degrees " "of freedom are only distributed on active cells for which " "the active_fe_index has been set.")
+DEAL::ExcMessage( "You cannot call this function on non-active cells " "of DoFHandler objects unless you provide an explicit " "finite element index because they do not have naturally " "associated finite element spaces associated: degrees " "of freedom are only distributed on active cells for which " "the active FE index has been set.")
DEAL::Yes, exception 1!
DEAL::ExcMessage( "For DoFHandler objects in hp-mode, finite elements are only " "associated with active cells. Consequently, you can not ask " "for the active finite element on cells with children.")
DEAL::Yes, exception 2!
-DEAL::ExcMessage( "You cannot call this function on non-active cells " "of DoFHandler objects unless you provide an explicit " "finite element index because they do not have naturally " "associated finite element spaces associated: degrees " "of freedom are only distributed on active cells for which " "the active_fe_index has been set.")
+DEAL::ExcMessage( "You cannot call this function on non-active cells " "of DoFHandler objects unless you provide an explicit " "finite element index because they do not have naturally " "associated finite element spaces associated: degrees " "of freedom are only distributed on active cells for which " "the active FE index has been set.")
deallog << "Testing " << fe[fe1].get_name() << " vs. "
<< fe[fe2].get_name() << std::endl;
- // set fe on coarse cell to 'i', on
+ // set FE on coarse cell to 'i', on
// all fine cells to 'j'
typename DoFHandler<dim>::active_cell_iterator cell =
dof_handler.begin_active();
// ---------------------------------------------------------------------
-// common framework to check hp-constraints for fe without support points
+// common framework to check hp-constraints for FE without support points
#include <deal.II/base/function.h>
#include <deal.II/base/function_lib.h>
deallog << "Testing " << fe[fe1].get_name() << " vs. "
<< fe[fe2].get_name() << std::endl;
- // set fe on coarse cell to 'i', on
+ // set FE on coarse cell to 'i', on
// all fine cells to 'j'
typename DoFHandler<dim>::active_cell_iterator cell =
dof_handler.begin_active();
AffineConstraints<double> constraints; // for boundary conditions
- // populate fe system:
+ // populate FE system:
fe.push_back(FE_Q_Hierarchical<dim>(2));
fe.push_back(FE_Q_Hierarchical<dim>(4));
cell->set_active_fe_index(1);
// need to distribute dofs before refinement,
- // otherwise active fe index will not transfer to child cells
+ // otherwise active FE index will not transfer to child cells
dof_handler.distribute_dofs(fe);
// refine first cell (simple case)
return (cell->material_id() == omega2_domain_id);
}
-// Set active fe indices in each sub-domain
+// Set active FE indices in each sub-domain
template <int dim>
void
diffusionMechanics<dim>::set_active_fe_indices()
-// like hp/matrices, but with different fe objects
+// like hp/matrices, but with different FE objects
#include <deal.II/base/function_lib.h>
GridGenerator::hyper_cube(tria);
tria.refine_global(2);
- // Set all active fe indices to 1.
+ // Set all active FE indices to 1.
// Flag first half of cells for refinement, and the other half for coarsening.
typename DoFHandler<dim>::cell_iterator cell = dh.begin(1), endc = dh.end(1);
for (unsigned int counter = 0; cell != endc; ++counter, ++cell)
GridGenerator::hyper_cube(tria);
tria.refine_global(2);
- // Set all active fe indices to 1.
+ // Set all active FE indices to 1.
// Flag first half of cells for refinement, and the other half for coarsening.
typename DoFHandler<dim>::cell_iterator cell = dh.begin(1), endc = dh.end(1);
for (unsigned int counter = 0; cell != endc; ++counter, ++cell)
GridGenerator::hyper_cube(tria);
tria.refine_global(2);
- // Set all active fe indices to 1.
+ // Set all active FE indices to 1.
// Flag first half of cells for refinement, and the other half for coarsening.
typename DoFHandler<dim>::cell_iterator cell = dh.begin(1), endc = dh.end(1);
for (unsigned int counter = 0; cell != endc; ++counter, ++cell)
GridGenerator::hyper_cube(tria);
tria.refine_global(2);
- // Set all active fe indices to 1.
+ // Set all active FE indices to 1.
// Flag first half of cells for refinement, and the other half for coarsening.
typename DoFHandler<dim>::cell_iterator cell = dh.begin(1), endc = dh.end(1);
for (unsigned int counter = 0; cell != endc; ++counter, ++cell)
GridGenerator::hyper_cube(tria);
tria.refine_global(2);
- // Set all active fe indices to 1.
+ // Set all active FE indices to 1.
// Flag first half of cells for refinement, and the other half for coarsening.
typename DoFHandler<dim>::cell_iterator cell = dh.begin(1), endc = dh.end(1);
for (unsigned int counter = 0; cell != endc; ++counter, ++cell)
GridGenerator::hyper_cube(tria);
tria.refine_global(2);
- // Set all active fe indices to 1.
+ // Set all active FE indices to 1.
// Flag first half of cells for refinement, and the other half for coarsening.
typename DoFHandler<dim>::cell_iterator cell = dh.begin(1), endc = dh.end(1);
for (unsigned int counter = 0; cell != endc; ++counter, ++cell)
GridGenerator::hyper_cube(tria);
tria.refine_global(2);
- // Set all active fe indices to 1.
+ // Set all active FE indices to 1.
// Flag first half of cells for refinement, and the other half for coarsening.
typename DoFHandler<dim>::cell_iterator cell = dh.begin(1), endc = dh.end(1);
for (unsigned int counter = 0; cell != endc; ++counter, ++cell)
for (cell = dh.begin_active(); cell != dh.end(); ++cell)
{
- // set active fe index
+ // set active FE index
if (i >= fe_collection.size())
i = 0;
cell->set_active_fe_index(i++);
DEAL::Yes, exception 1!
DEAL::ExcMessage( "For DoFHandler objects in hp-mode, finite elements are only " "associated with active cells. Consequently, you can not ask " "for the active finite element on cells with children.")
DEAL::Yes, exception!
-DEAL::ExcMessage( "You cannot call this function on non-active cells " "of DoFHandler objects unless you provide an explicit " "finite element index because they do not have naturally " "associated finite element spaces associated: degrees " "of freedom are only distributed on active cells for which " "the active_fe_index has been set.")
+DEAL::ExcMessage( "You cannot call this function on non-active cells " "of DoFHandler objects unless you provide an explicit " "finite element index because they do not have naturally " "associated finite element spaces associated: degrees " "of freedom are only distributed on active cells for which " "the active FE index has been set.")
DEAL::Yes, exception 1!
DEAL::ExcMessage( "For DoFHandler objects in hp-mode, finite elements are only " "associated with active cells. Consequently, you can not ask " "for the active finite element on cells with children.")
DEAL::Yes, exception!
-DEAL::ExcMessage( "You cannot call this function on non-active cells " "of DoFHandler objects unless you provide an explicit " "finite element index because they do not have naturally " "associated finite element spaces associated: degrees " "of freedom are only distributed on active cells for which " "the active_fe_index has been set.")
+DEAL::ExcMessage( "You cannot call this function on non-active cells " "of DoFHandler objects unless you provide an explicit " "finite element index because they do not have naturally " "associated finite element spaces associated: degrees " "of freedom are only distributed on active cells for which " "the active FE index has been set.")
DEAL::Yes, exception 1!
DEAL::ExcMessage( "For DoFHandler objects in hp-mode, finite elements are only " "associated with active cells. Consequently, you can not ask " "for the active finite element on cells with children.")
DEAL::Yes, exception!
-DEAL::ExcMessage( "You cannot call this function on non-active cells " "of DoFHandler objects unless you provide an explicit " "finite element index because they do not have naturally " "associated finite element spaces associated: degrees " "of freedom are only distributed on active cells for which " "the active_fe_index has been set.")
+DEAL::ExcMessage( "You cannot call this function on non-active cells " "of DoFHandler objects unless you provide an explicit " "finite element index because they do not have naturally " "associated finite element spaces associated: degrees " "of freedom are only distributed on active cells for which " "the active FE index has been set.")
-// Like _07 but with all same fe indices. This triggered yet another place
+// Like _07 but with all same FE indices. This triggered yet another place
// where we had the same kind of error.
#include <deal.II/dofs/dof_handler.h>
constraints.print(logfile);
- // release fe
+ // release FE
dof.clear();
deallog << std::endl;
DoFHandler<dim> dh(tria);
for (const auto &cell : dh.active_cell_iterators())
{
- // set active fe index
+ // set active FE index
if (cell->is_locally_owned())
cell->set_active_fe_index(1);
}
-// active fe indices transfer on refinement
+// active FE indices transfer on refinement
#include <deal.II/distributed/tria.h>
for (auto &cell : dh.active_cell_iterators())
if (cell->is_locally_owned())
{
- // set active fe index
+ // set active FE index
if (!(cell->is_artificial()))
{
if (i >= fe_collection.size())
-// active fe indices transfer on serialization
+// active FE indices transfer on serialization
#include <deal.II/distributed/tria.h>
for (auto &cell : dh.active_cell_iterators())
if (cell->is_locally_owned())
{
- // set active fe index
+ // set active FE index
if (!(cell->is_artificial()))
{
if (i >= fe_collection.size())
-// active fe indices transfer on repartitioning
+// active FE indices transfer on repartitioning
#include <deal.II/distributed/cell_weights.h>
for (auto &cell : dh.active_cell_iterators())
if (cell->is_locally_owned())
{
- // set active fe index
+ // set active FE index
if (!(cell->is_artificial()))
cell->set_active_fe_index(myid);
-// active fe indices serialization with a different number of cpus
+// active FE indices serialization with a different number of cpus
#include <deal.II/distributed/tria.h>
for (auto &cell : dh.active_cell_iterators())
if (cell->is_locally_owned())
{
- // set active fe index
+ // set active FE index
if (i >= fe_collection.size())
i = 0;
cell->set_active_fe_index(i++);
for (const auto &cell : dh.active_cell_iterators())
if (cell->is_locally_owned() && cell->id().to_string() == "1_0:")
{
- // set different fe on center cell
+ // set different FE on center cell
cell->set_active_fe_index(1);
#ifdef DEBUG
for (const auto &cell : dh.active_cell_iterators())
if (cell->is_locally_owned() && cell->id().to_string() == "1_0:")
{
- // set different fe on center cell
+ // set different FE on center cell
cell->set_active_fe_index(1);
#ifdef DEBUG
{
if (cell->id().to_string() == "1_0:")
{
- // set different fe on center cell
+ // set different FE on center cell
cell->set_active_fe_index(1);
#ifdef DEBUG
if (cell->is_locally_owned())
{
- // set active fe index
+ // set active FE index
if (i >= fe_collection.size())
i = 0;
cell->set_active_fe_index(i++);
if (cell->is_locally_owned())
{
- // set active fe index
+ // set active FE index
if (i >= fe_collection.size())
i = 0;
cell->set_active_fe_index(i++);
// This test provides a hp::DoFHandler with two FE_Q(2) elements
// assigned on a p::d::Triangulation consisting of 64x64 cells, on which
-// active fe indices are mostly randomly distributed. This DoF
+// active FE indices are mostly randomly distributed. This DoF
// distribution test repeats for an increasing amount of processors.
//
// At some point, this test failed to provide a consistent number of
GridGenerator::subdivided_hyper_cube(tria, 4);
Assert(tria.n_cells(0) == tria.n_global_active_cells(), ExcInternalError());
- // Set all active fe indices to 1.
+ // Set all active FE indices to 1.
// Flag first half of cells for refinement, and the other half for coarsening.
for (const auto &cell : dh.active_cell_iterators())
if (!cell->is_artificial() && cell->is_locally_owned())
{
if (cell->is_locally_owned())
{
- // set active fe index
+ // set active FE index
if (!(cell->is_artificial()))
{
if (i >= fe_collection.size())
DoFHandler<dim> dgq_dof_handler(tria);
- // randomly assign fes
+ // randomly assign FEs
for (const auto &cell : dgq_dof_handler.active_cell_iterators())
if (cell->is_locally_owned())
cell->set_active_fe_index(Testing::rand() % max_degree);
}
-// same as above but for multiple fes
+// same as above but for multiple FEs
template <int fe_degree, int n_q_points_1d, int dim>
void
test_with_hanging_nodes(const std::vector<const FiniteElement<dim> *> &fes,