33 #ifndef __H__UG__LIB_DISC__COMMON__FUNCTION_GROUP__
34 #define __H__UG__LIB_DISC__COMMON__FUNCTION_GROUP__
86 void add(
const std::vector<std::string>&
name);
104 void remove(
const std::vector<std::string>& vName);
119 const char*
name(
size_t i)
const;
122 std::string
names()
const;
139 int dim(
size_t i)
const;
159 bool contains(
size_t uniqueID)
const;
214 for(
size_t i = 0; i < map.
num_fct(); ++i)
217 if(i != map.num_fct()-1) outStream <<
',';
227 for(
size_t i = 0; i < grp.
size(); ++i)
230 if(i != grp.size()-1) outStream <<
',';
Definition: smart_pointer.h:296
Definition: function_group.h:52
size_t local_index(size_t uniqueID) const
return index in Function group for a function
Definition: function_group.cpp:302
FunctionGroup()
Default Constructor.
Definition: function_group.cpp:43
bool is_init() const
returns if FunctionGroup is ready for use
Definition: function_group.h:169
void remove(const std::string &name)
removes function with a given name from this group
ConstSmartPtr< FunctionPattern > function_pattern() const
get underlying function pattern
Definition: function_group.h:73
int dim() const
common dimension of all functions
Definition: function_group.cpp:259
LFEID local_finite_element_id(size_t i) const
Definition: function_group.cpp:231
const char * name(size_t i) const
returns the name of a function
Definition: function_group.cpp:205
size_t operator[](size_t i) const
returns unique function id of a function
Definition: function_group.h:125
bool empty() const
returns if function group is empty
Definition: function_group.h:113
bool contains(size_t uniqueID) const
returns true if unique id is contained in this group
Definition: function_group.cpp:279
size_t unique_id(size_t i) const
returns unique function id of a function
Definition: function_group.h:128
LFEID lfeid(size_t i) const
Definition: function_group.cpp:243
void remove(size_t fct)
removes a function by id from this group
Definition: function_group.cpp:159
void add(size_t fct)
adds a function by id to this group
Definition: function_group.cpp:79
size_t size() const
number of functions in this group
Definition: function_group.h:116
void remove(const std::vector< std::string > &vName)
removes functions with a given names from this group
void add_all()
selects all subsets in the order of the underlying pattern
Definition: function_group.cpp:145
std::string names() const
returns the comma-separted names of all functions
Definition: function_group.cpp:217
ConstSmartPtr< FunctionPattern > m_spFunctionPattern
underlying function pattern
Definition: function_group.h:173
std::vector< size_t > m_vFunction
vector holding all selected unique function ids
Definition: function_group.h:176
void add(const std::string &name)
adds function with a given name to this group
void clear()
clear all subsets
Definition: function_group.h:107
void sort()
sorts the selected functions by increasing unique id
Definition: function_group.cpp:154
void set_function_pattern(ConstSmartPtr< FunctionPattern > spFuncPattern)
set underlying function pattern
Definition: function_group.cpp:72
void add(const std::vector< std::string > &name)
adds functions with a given names to this group
describes a mapping between two local index sets
Definition: function_group.h:186
void push_back(size_t indexTo)
adds a mapping between indexFrom and indexTo
Definition: function_group.h:192
size_t num_fct() const
returns the number of indices that are mapped
Definition: function_group.h:195
size_t operator[](size_t i) const
returns the mapped index
Definition: function_group.h:198
void clear()
removes all connections
Definition: function_group.h:189
std::vector< size_t > m_vMapping
vector holding the mapped indices
Definition: function_group.h:206
Identifier for Local Finite Elements.
Definition: local_finite_element_id.h:98
std::ostream & operator<<(std::ostream &outStream, const ug::MathMatrix< 2, 2 > &m)
Definition: math_matrix.cpp:38
#define UG_ASSERT(expr, msg)
Definition: assert.h:70