Reference documentation for deal.II version 9.5.0
\(\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\}}\)
No Matches
Public Member Functions | Private Attributes | List of all members
NamedSelection Class Reference

#include <deal.II/algorithms/named_selection.h>

Public Member Functions

void add (const std::string &name)
void initialize (const AnyData &data)
unsigned int size () const
unsigned int operator() (unsigned int i) const

Private Attributes

std::vector< std::string > names
std::vector< unsigned intindices

Detailed Description

Select data from AnyData corresponding to the attached name.

Given a list of names to search for (provided by add()), objects of this class provide an index list of the selected data.

Definition at line 33 of file named_selection.h.

Member Function Documentation

◆ add()

void NamedSelection::add ( const std::string &  name)

Add a new name to be searched for in data supplied in initialize().

Names will be added to the end of the current list.

Definition at line 91 of file named_selection.h.

◆ initialize()

void NamedSelection::initialize ( const AnyData data)

Create the index vector pointing into the AnyData object.

Definition at line 22 of file

◆ size()

unsigned int NamedSelection::size ( ) const

The number of names in this object. This function may be used whether initialize() was called before or not.

Definition at line 84 of file named_selection.h.

◆ operator()()

unsigned int NamedSelection::operator() ( unsigned int  i) const

Return the corresponding index in the AnyData object supplied to the last initialize(). It is an error if initialize() has not been called before.

Indices are in the same order as the calls to add().

Definition at line 98 of file named_selection.h.

Member Data Documentation

◆ names

std::vector<std::string> NamedSelection::names

The selected names.

Definition at line 74 of file named_selection.h.

◆ indices

std::vector<unsigned int> NamedSelection::indices

The index map generated by initialize() and accessed by operator().

Definition at line 79 of file named_selection.h.

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