deal.II version GIT relicensing-1936-ge55124254b 2024-10-04 21:10:00+00:00
|
#include <deal.II/fe/fe_values_base.h>
Public Member Functions | |
CellIteratorWrapper ()=default | |
CellIteratorWrapper (const typename Triangulation< dim, spacedim >::cell_iterator &cell) | |
CellIteratorWrapper (const typename DoFHandler< dim, spacedim >::cell_iterator &cell) | |
CellIteratorWrapper (const typename DoFHandler< dim, spacedim >::level_cell_iterator &cell) | |
bool | is_initialized () const |
operator typename Triangulation< dim, spacedim >::cell_iterator () const | |
types::global_dof_index | n_dofs_for_dof_handler () const |
template<typename Number > | |
void | get_interpolated_dof_values (const ReadVector< Number > &in, Vector< Number > &out) const |
Static Public Member Functions | |
static ::ExceptionBase & | ExcNeedsDoFHandler () |
Private Attributes | |
std::optional< std::variant< typename Triangulation< dim, spacedim >::cell_iterator, typename DoFHandler< dim, spacedim >::cell_iterator, typename DoFHandler< dim, spacedim >::level_cell_iterator > > | cell |
Objects of the FEValues class need to store an iterator to the present cell in order to be able to extract the values of the degrees of freedom on this cell in the get_function_values() and assorted functions.
The problem is that the iterators given to the various reinit() functions can either be Triangulation iterators, or DoFHandler cell or level iterators. All three are valid, and provide different functionality that is used in different contexts; as a consequence we need to be able to store all three. This class provides the ability to store an object of any of these types, via a member variable that is a std::variant that encapsulates an object of any of the three types. Because a std::variant always stores an object of one of these types, we wrap the std::variant object into a std::optional that allows us to encode a "not yet initialized" state.
Definition at line 1572 of file fe_values_base.h.
|
default |
Constructor. Creates an unusable object that is not associated with any cell at all.
FEValuesBase< dim, spacedim >::CellIteratorWrapper::CellIteratorWrapper | ( | const typename Triangulation< dim, spacedim >::cell_iterator & | cell | ) |
Constructor.
Definition at line 111 of file fe_values_base.cc.
FEValuesBase< dim, spacedim >::CellIteratorWrapper::CellIteratorWrapper | ( | const typename DoFHandler< dim, spacedim >::cell_iterator & | cell | ) |
Constructor.
Definition at line 119 of file fe_values_base.cc.
FEValuesBase< dim, spacedim >::CellIteratorWrapper::CellIteratorWrapper | ( | const typename DoFHandler< dim, spacedim >::level_cell_iterator & | cell | ) |
Constructor.
Definition at line 127 of file fe_values_base.cc.
bool FEValuesBase< dim, spacedim >::CellIteratorWrapper::is_initialized | ( | ) | const |
Indicate whether FEValues::reinit() was called.
Definition at line 136 of file fe_values_base.cc.
FEValuesBase< dim, spacedim >::CellIteratorWrapper::operator typename Triangulation< dim, spacedim >::cell_iterator | ( | ) | const |
Conversion operator to an iterator for triangulations. This conversion is implicit for the original iterators, since they are derived classes. However, since here we have kind of a parallel class hierarchy, we have to have a conversion operator.
Definition at line 144 of file fe_values_base.cc.
types::global_dof_index FEValuesBase< dim, spacedim >::CellIteratorWrapper::n_dofs_for_dof_handler | ( | ) | const |
Return the number of degrees of freedom the DoF handler object has to which the iterator belongs to.
Definition at line 163 of file fe_values_base.cc.
void FEValuesBase< dim, spacedim >::CellIteratorWrapper::get_interpolated_dof_values | ( | const ReadVector< Number > & | in, |
Vector< Number > & | out | ||
) | const |
Call get_interpolated_dof_values
of the iterator with the given arguments.
Definition at line 184 of file fe_values_base.cc.
|
private |
The cell in question, if one has been assigned to this object. The concrete data type can either be a Triangulation cell iterator, a DoFHandler cell iterator, or a DoFHandler level cell iterator.
Definition at line 1649 of file fe_values_base.h.