33 #ifndef __H__UG__LIB_DISC__DOF_MANAGER__FUNCTION_PATTERN__
34 #define __H__UG__LIB_DISC__DOF_MANAGER__FUNCTION_PATTERN__
79 void add(
const std::vector<std::string>& vName,
LFEID id);
88 void add(
const std::vector<std::string>& vName,
LFEID id,
89 const std::vector<std::string>& vSubset);
149 for(
size_t fct = 0; fct <
num_fct(); ++fct)
167 const char*
name(
size_t fct)
const
174 std::vector<std::string>
names()
const
176 std::vector<std::string> vName(
num_fct());
177 for(
size_t fct = 0; fct < vName.size(); ++fct)
178 vName[fct] =
name(fct);
183 size_t fct_id(
size_t loc_fct,
int si)
const
186 for(
size_t i = 0; i < loc_fct; ++i)
Definition: smart_pointer.h:296
Describes the setup of discrete functions on a SubsetHandler.
Definition: function_pattern.h:60
void set_subset_handler(ConstSmartPtr< ISubsetHandler > spSH)
sets new subsets handler
Definition: function_pattern.cpp:44
const LFEID & lfeid(size_t fct) const
Definition: function_pattern.h:163
const LFEID & local_finite_element_id(size_t fct) const
Definition: function_pattern.h:158
size_t fct_id(size_t loc_fct, int si) const
returns function id of the loc_fct's function on subset si
Definition: function_pattern.h:183
std::vector< std::string > names() const
returns the names of a discrete function
Definition: function_pattern.h:174
ConstSmartPtr< ISubsetHandler > m_spSH
Definition: function_pattern.h:249
void add(const std::vector< std::string > &vName, LFEID id)
add single solutions of LocalShapeFunctionSetID to the entire domain
Definition: function_pattern.cpp:53
bool is_def_everywhere(size_t fct) const
returns true if the discrete function nr_fct is defined on all subsets
Definition: function_pattern.h:211
size_t num_fct(int si) const
number of discrete functions on a subset
Definition: function_pattern.h:146
const char * name(size_t fct) const
returns the name of a discrete function
Definition: function_pattern.h:167
int dim_subset(int si) const
dimension of subset
Definition: function_pattern.h:137
size_t num_fct() const
number of discrete functions this dof distributor handles
Definition: function_pattern.h:143
std::vector< Function > m_vFunction
Definition: function_pattern.h:252
int dim(size_t fct) const
returns the dimension in which solution lives
Definition: function_pattern.h:197
ConstSmartPtr< ISubsetHandler > subset_handler() const
get underlying subset handler
Definition: function_pattern.h:71
size_t fct_id_by_name(const char *name) const
returns the function id if function with given name found in pattern, exception else
Definition: function_pattern.cpp:128
void lock()
lock pattern (i.e. can not be changed then)
Definition: function_pattern.h:103
bool m_bLocked
Definition: function_pattern.h:246
SubsetGroup subset_grp_by_name(const char *names) const
returns a subset group consisting of the subsets specified by their names
Definition: function_pattern.h:119
FunctionPattern(ConstSmartPtr< ISubsetHandler > spSH)
Default Constructor.
Definition: function_pattern.h:63
void clear()
clear all functions
Definition: function_pattern.h:109
int subset_id_by_name(const char *name) const
returns the subset id
Definition: function_pattern.cpp:139
const char * subset_name(int si) const
returns the name of a subset
Definition: function_pattern.h:140
SubsetGroup all_subsets_grp_except_for(const char *names) const
returns a subset group consisting of all the subsets in the domain except for the specified ones
Definition: function_pattern.h:125
bool is_def_in_subset(size_t fct, int si) const
returns true if the discrete function nr_fct is defined on subset si
Definition: function_pattern.h:204
int num_subsets() const
number of subsets
Definition: function_pattern.h:116
bool is_locked() const
returns if pattern is locked
Definition: function_pattern.h:106
virtual ~FunctionPattern()
virtual destructor
Definition: function_pattern.h:218
Identifier for Local Finite Elements.
Definition: local_finite_element_id.h:98
Group of subsets.
Definition: subset_group.h:51
void add_all()
select all subsets of underlying subset handler
Definition: subset_group.cpp:133
void remove(int si)
removes a subset from this group
Definition: subset_group.cpp:142
bool contains(int si) const
returns true if subset is contained in this group
Definition: subset_group.cpp:272
#define UG_ASSERT(expr, msg)
Definition: assert.h:70
#define UG_THROW(msg)
Definition: error.h:57
void TokenizeString(const string &str, vector< string > &vToken, const char delimiter)
Definition: string_util.cpp:56
int DimensionOfSubset(const ISubsetHandler &sh, int si)
returns the current dimension of the subset
Definition: subset_dim_util.cpp:89
internal structure to hold all functions
Definition: function_pattern.h:223
LFEID id
Definition: function_pattern.h:230
Function(const char *name_, LFEID id_, bool everywhere_, const SubsetGroup &subsetIndices_)
Definition: function_pattern.h:224
bool is_def_everywhere() const
Definition: function_pattern.h:241
SubsetGroup subsetIndices
Definition: function_pattern.h:232
bool is_def_in_subset(int si) const
Definition: function_pattern.h:234
bool everywhere
Definition: function_pattern.h:231
std::string name
Definition: function_pattern.h:227