Public Member Functions | Private Attributes

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 int > indices

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

Definition at line 180 of file named_data.h.


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.

Definition at line 404 of file named_data.h.

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.

Definition at line 412 of file named_data.h.

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().

Definition at line 430 of file named_data.h.

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


Member Data Documentation

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

The selected names.

Definition at line 225 of file named_data.h.

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

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

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

Definition at line 231 of file named_data.h.

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


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

deal.II documentation generated on Fri Feb 3 2012 06:04:10 by doxygen 1.7.2