ug4
|
Describes the setup of discrete functions on a SubsetHandler. More...
#include <function_pattern.h>
Classes | |
struct | Function |
internal structure to hold all functions More... | |
Public Member Functions | |
void | add (const std::vector< std::string > &vName, LFEID id) |
add single solutions of LocalShapeFunctionSetID to the entire domain More... | |
void | add (const std::vector< std::string > &vName, LFEID id, const std::vector< std::string > &vSubset) |
add single solutions of LocalShapeFunctionSetID to selected subsets More... | |
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 More... | |
void | clear () |
clear all functions More... | |
int | dim (size_t fct) const |
returns the dimension in which solution lives More... | |
int | dim_subset (int si) const |
dimension of subset More... | |
size_t | fct_id (size_t loc_fct, int si) const |
returns function id of the loc_fct's function on subset si More... | |
size_t | fct_id_by_name (const char *name) const |
returns the function id if function with given name found in pattern, exception else More... | |
FunctionPattern (ConstSmartPtr< ISubsetHandler > spSH) | |
Default Constructor. More... | |
bool | is_def_everywhere (size_t fct) const |
returns true if the discrete function nr_fct is defined on all subsets More... | |
bool | is_def_in_subset (size_t fct, int si) const |
returns true if the discrete function nr_fct is defined on subset si More... | |
bool | is_locked () const |
returns if pattern is locked More... | |
void | lock () |
lock pattern (i.e. can not be changed then) More... | |
const char * | name (size_t fct) const |
returns the name of a discrete function More... | |
std::vector< std::string > | names () const |
returns the names of a discrete function More... | |
size_t | num_fct () const |
number of discrete functions this dof distributor handles More... | |
size_t | num_fct (int si) const |
number of discrete functions on a subset More... | |
int | num_subsets () const |
number of subsets More... | |
void | set_subset_handler (ConstSmartPtr< ISubsetHandler > spSH) |
sets new subsets handler More... | |
SubsetGroup | subset_grp_by_name (const char *names) const |
returns a subset group consisting of the subsets specified by their names More... | |
ConstSmartPtr< ISubsetHandler > | subset_handler () const |
get underlying subset handler More... | |
int | subset_id_by_name (const char *name) const |
returns the subset id More... | |
const char * | subset_name (int si) const |
returns the name of a subset More... | |
virtual | ~FunctionPattern () |
virtual destructor More... | |
const LFEID & | local_finite_element_id (size_t fct) const |
const LFEID & | lfeid (size_t fct) const |
Protected Attributes | |
bool | m_bLocked |
ConstSmartPtr< ISubsetHandler > | m_spSH |
std::vector< Function > | m_vFunction |
Private Member Functions | |
void | add (const std::vector< std::string > &vName, LFEID id, const SubsetGroup &ssGrp) |
add single solutions of LocalShapeFunctionSetID to selected subsets More... | |
Describes the setup of discrete functions on a SubsetHandler.
A Function Pattern is used to describe the setup for discrete functions on a domain. Therefore, it has the underlying SubsetHandler of the Domain. The functions (sometimes also called grid functions) are defined with respect to the subsets: A function can 'live' on parts of the subsets as well as on the whole domain.
|
inline |
Default Constructor.
References clear().
|
inlinevirtual |
virtual destructor
void ug::FunctionPattern::add | ( | const std::vector< std::string > & | vName, |
LFEID | id | ||
) |
add single solutions of LocalShapeFunctionSetID to the entire domain
[in] | name | name(s) of single solution (comma separated) |
[in] | id | Shape Function set id |
[in] | dim | Dimension (optional) |
References ug::LFEID::ADAPTIV, ug::SubsetGroup::add_all(), ug::LFEID::dim(), ug::DimensionOfSubsets(), m_bLocked, m_spSH, m_vFunction, name(), ug::LFEID::NONE, ug::LFEID::order(), ug::SubsetGroup::set_subset_handler(), ug::LFEID::type(), and UG_THROW.
Referenced by add().
void ug::FunctionPattern::add | ( | const std::vector< std::string > & | vName, |
LFEID | id, | ||
const std::vector< std::string > & | vSubset | ||
) |
|
private |
add single solutions of LocalShapeFunctionSetID to selected subsets
[in] | name | name(s) of single solution (comma separated) |
[in] | id | Shape Function set id |
[in] | SubsetIndices | SubsetGroup, where solution lives |
[in] | dim | Dimension |
References ug::LFEID::ADAPTIV, ug::LFEID::dim(), ug::SubsetGroup::get_highest_subset_dimension(), m_bLocked, m_spSH, m_vFunction, name(), ug::LFEID::NONE, ug::LFEID::order(), ug::SubsetGroup::subset_handler(), ug::LFEID::type(), and UG_THROW.
|
inline |
returns a subset group consisting of all the subsets in the domain except for the specified ones
References ug::SubsetGroup::add_all(), names(), ug::SubsetGroup::remove(), subset_handler(), and ug::TokenizeString().
|
inline |
clear all functions
References is_locked(), m_vFunction, and UG_THROW.
Referenced by FunctionPattern(), and set_subset_handler().
|
inline |
returns the dimension in which solution lives
References m_vFunction, num_fct(), and UG_ASSERT.
Referenced by ug::DoFDistributionInfo::max_dofs(), ug::DoFDistributionInfo::max_fct_dofs(), and ug::DoFDistributionInfo::print_local_dof_statistic().
|
inline |
dimension of subset
References ug::DimensionOfSubset(), and m_spSH.
Referenced by ug::DoFDistributionInfo::print_local_dof_statistic().
|
inline |
returns function id of the loc_fct's function on subset si
References is_def_in_subset().
size_t ug::FunctionPattern::fct_id_by_name | ( | const char * | name | ) | const |
returns the function id if function with given name found in pattern, exception else
References m_vFunction, name(), and UG_THROW.
|
inline |
returns true if the discrete function nr_fct is defined on all subsets
References m_vFunction, num_fct(), and UG_ASSERT.
Referenced by ug::DoFDistributionInfo::print_local_dof_statistic().
|
inline |
returns true if the discrete function nr_fct is defined on subset si
References m_vFunction, num_fct(), and UG_ASSERT.
Referenced by ug::DoFDistributionInfo::create_offsets(), fct_id(), num_fct(), and ug::DoFDistributionInfo::print_local_dof_statistic().
|
inline |
|
inline |
returns the trial space of a discrete function
References local_finite_element_id().
Referenced by ug::DoFDistributionInfo::create_offsets(), and ug::DoFDistributionInfo::print_local_dof_statistic().
|
inline |
returns the trial space of a discrete function
References m_vFunction, num_fct(), and UG_ASSERT.
Referenced by lfeid().
|
inline |
lock pattern (i.e. can not be changed then)
References m_bLocked.
Referenced by ug::DoFDistributionInfo::init().
|
inline |
returns the name of a discrete function
References m_vFunction, num_fct(), and UG_ASSERT.
Referenced by add(), fct_id_by_name(), names(), ug::DoFDistributionInfo::print_local_dof_statistic(), and subset_id_by_name().
|
inline |
returns the names of a discrete function
References name(), and num_fct().
Referenced by all_subsets_grp_except_for(), and subset_grp_by_name().
|
inline |
number of discrete functions this dof distributor handles
References m_vFunction.
Referenced by ug::DoFDistributionInfo::create_offsets(), dim(), is_def_everywhere(), is_def_in_subset(), local_finite_element_id(), name(), names(), num_fct(), and ug::DoFDistributionInfo::print_local_dof_statistic().
|
inline |
number of discrete functions on a subset
References is_def_in_subset(), m_vFunction, and num_fct().
|
inline |
number of subsets
References m_spSH.
Referenced by ug::DoFDistributionInfo::create_offsets(), and ug::DoFDistributionInfo::print_local_dof_statistic().
void ug::FunctionPattern::set_subset_handler | ( | ConstSmartPtr< ISubsetHandler > | spSH | ) |
|
inline |
returns a subset group consisting of the subsets specified by their names
References names(), subset_handler(), and ug::TokenizeString().
|
inline |
get underlying subset handler
References m_spSH.
Referenced by all_subsets_grp_except_for(), and subset_grp_by_name().
int ug::FunctionPattern::subset_id_by_name | ( | const char * | name | ) | const |
|
inline |
returns the name of a subset
References m_spSH.
Referenced by ug::DoFDistributionInfo::print_local_dof_statistic().
|
protected |
Referenced by add(), is_locked(), lock(), and set_subset_handler().
|
protected |
Referenced by add(), dim_subset(), num_subsets(), set_subset_handler(), subset_handler(), subset_id_by_name(), and subset_name().
|
protected |
Referenced by add(), clear(), dim(), fct_id_by_name(), is_def_everywhere(), is_def_in_subset(), local_finite_element_id(), name(), and num_fct().