NamedSelection Class Reference

List of all members.

Public Member Functions

void add (const std::string &name)
template<typename DATA>
void initialize (const NamedData< DATA > &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 NamedData 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.

Author:
Guido Kanschat, 2009

Member Function Documentation

void NamedSelection::add ( const std::string &  name  )  [inline]

Add a new name to be searched for in NamedData.

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

References names.

Referenced by MeshWorker::VectorSelector::add().

template<typename DATA>
void NamedSelection::initialize ( const NamedData< DATA > &  data  )  [inline]

Create the index vector pointing into the NamedData object.

References NamedData< DATA >::find(), indices, and names.

Referenced by MeshWorker::VectorSelector::initialize().

unsigned int NamedSelection::size (  )  const [inline]

unsigned int NamedSelection::operator() ( unsigned int  i  )  const [inline]

Return the corresponding index in the NamedData 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().

References Assert, AssertIndexRange, StandardExceptions::ExcNotInitialized(), indices, names, and size().


Member Data Documentation

std::vector<std::string> NamedSelection::names [private]

The selected names.

Referenced by add(), initialize(), operator()(), and size().

std::vector<unsigned int> NamedSelection::indices [private]

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

Referenced by initialize(), and operator()().


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

deal.II documentation generated on Wed Jul 28 23:06:36 2010 by doxygen 1.5.6