Reference documentation for deal.II version GIT relicensing-1054-gedd46abbd6 2024-07-12 01:20:01+00:00
\(\newcommand{\dealvcentcolon}{\mathrel{\mathop{:}}}\) \(\newcommand{\dealcoloneq}{\dealvcentcolon\mathrel{\mkern-1.2mu}=}\) \(\newcommand{\jump}[1]{\left[\!\left[ #1 \right]\!\right]}\) \(\newcommand{\average}[1]{\left\{\!\left\{ #1 \right\}\!\right\}}\)
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
FEValuesBase< dim, spacedim >::CellIteratorWrapper Class Reference

#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 ::ExceptionBaseExcNeedsDoFHandler ()
 

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
 

Detailed Description

template<int dim, int spacedim>
class FEValuesBase< dim, spacedim >::CellIteratorWrapper

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.

Constructor & Destructor Documentation

◆ CellIteratorWrapper() [1/4]

template<int dim, int spacedim>
FEValuesBase< dim, spacedim >::CellIteratorWrapper::CellIteratorWrapper ( )
default

Constructor. Creates an unusable object that is not associated with any cell at all.

◆ CellIteratorWrapper() [2/4]

template<int dim, int spacedim>
FEValuesBase< dim, spacedim >::CellIteratorWrapper::CellIteratorWrapper ( const typename Triangulation< dim, spacedim >::cell_iterator &  cell)

Constructor.

Definition at line 111 of file fe_values_base.cc.

◆ CellIteratorWrapper() [3/4]

template<int dim, int spacedim>
FEValuesBase< dim, spacedim >::CellIteratorWrapper::CellIteratorWrapper ( const typename DoFHandler< dim, spacedim >::cell_iterator &  cell)

Constructor.

Definition at line 119 of file fe_values_base.cc.

◆ CellIteratorWrapper() [4/4]

template<int dim, int spacedim>
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.

Member Function Documentation

◆ is_initialized()

template<int dim, int spacedim>
bool FEValuesBase< dim, spacedim >::CellIteratorWrapper::is_initialized ( ) const

Indicate whether FEValues::reinit() was called.

Definition at line 136 of file fe_values_base.cc.

◆ operator typename Triangulation< dim, spacedim >::cell_iterator()

template<int dim, int spacedim>
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.

◆ n_dofs_for_dof_handler()

template<int dim, int spacedim>
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.

◆ get_interpolated_dof_values()

template<int dim, int spacedim>
template<typename Number >
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.

Member Data Documentation

◆ cell

template<int dim, int spacedim>
std::optional< std::variant<typename Triangulation<dim, spacedim>::cell_iterator, typename DoFHandler<dim, spacedim>::cell_iterator, typename DoFHandler<dim, spacedim>::level_cell_iterator> > FEValuesBase< dim, spacedim >::CellIteratorWrapper::cell
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.


The documentation for this class was generated from the following files: