Plugins
|
Class for subdomain-dependent data for the E-based formulated problems. More...
#include <em_material.h>
Classes | |
struct | TSubdomData |
data item type More... | |
Public Member Functions | |
void | add (const char *subsets, number mu) |
adds a insulator More... | |
void | add (const char *subsets, number mu, number sigma) |
adds a generic subset data item More... | |
const std::vector< int > & | base_conductor_index () const |
int | base_conductor_index (int si) const |
const std::vector< int > & | base_conductors () const |
void | close () |
finalizes the object More... | |
ConstSmartPtr< domain_type > | domain () const |
returns pointer to the domain More... | |
EMaterial (ConstSmartPtr< domain_type > domain) | |
Constructor. More... | |
bool | finalized () const |
returns true iff closed More... | |
bool | get_mu_sigma (int si, number &mu, number &sigma) const |
reads the data for a subdomain from the data item More... | |
const std::vector< int > & | min_conductor_ssi () const |
int | min_conductor_ssi (int si) const |
ConstSmartPtr< subset_handler_type > | subset_handler () const |
constant access to the subset handler More... | |
const char * | subset_names () const |
returns the string of the subset names More... | |
Private Types | |
typedef TDomain | domain_type |
domain type More... | |
typedef domain_type::subset_handler_type | subset_handler_type |
subset handler type More... | |
typedef std::map< int, TSubdomData * > | t_data_map |
Data map type. More... | |
typedef EMaterial< TDomain > | this_type |
own type More... | |
Private Member Functions | |
void | analyze_topology () |
analyzes the conductor topology of the domain More... | |
void | connectivity (std::vector< int > &minCondInd) |
computes the connectivity of the conductions More... | |
Private Attributes | |
std::vector< int > | m_baseCondInd |
std::vector< int > | m_baseConductors |
bool | m_bClosed |
Flag that indicates that the description of the domain has been completed. More... | |
std::vector< int > | m_minCondSsI |
t_data_map | m_mUserDataBC |
Map assigning subdomain indices to the subdomain data items. More... | |
ConstSmartPtr< domain_type > | m_spDomain |
domain More... | |
std::string | m_sSsNames |
String of all the subset names mentioned in the data items. More... | |
std::vector< TSubdomData > | m_vSdD |
Subdomain data items. More... | |
Static Private Attributes | |
static const int | dim = domain_type::dim |
world dimension More... | |
Class for subdomain-dependent data for the E-based formulated problems.
This class stores the magnetic permeabilities and electric conductivities for the subdomains. It is used as a parameter set for the discretizations. Furthermore, this class finds out the connectivity of the conductors. This information is used (in particular) for the projection of the solution to the divergence-free space.
|
private |
domain type
|
private |
subset handler type
|
private |
Data map type.
|
private |
own type
ug::Electromagnetism::EMaterial< TDomain >::EMaterial | ( | ConstSmartPtr< domain_type > | domain | ) |
Constructor.
Constructor: initializes the object and checks the validity of its parts
[in] | domain | domain of the problem |
References ug::Electromagnetism::EMaterial< TDomain >::domain(), ConstSmartPtr< class, FreePolicy >::invalid(), ug::Electromagnetism::EMaterial< TDomain >::subset_handler(), and UG_THROW.
|
inline |
adds a insulator
[in] | subsets | names of the subsets |
[in] | mu | (nonzero) magnetic permeability |
References ug::Electromagnetism::EMaterial< TDomain >::add().
void ug::Electromagnetism::EMaterial< TDomain >::add | ( | const char * | subsets, |
number | mu, | ||
number | sigma | ||
) |
adds a generic subset data item
Adds a data item to the object.
[in] | subsets | names of the subsets |
[in] | mu | (nonzero) magnetic permeability |
[in] | sigma | electric conductivity |
References subset_handler(), and UG_THROW.
Referenced by ug::Electromagnetism::EMaterial< TDomain >::add().
|
private |
analyzes the conductor topology of the domain
Analyses the conductor topology of the domain.
|
inline |
This function returns the array that assignes to every subset index of a conductor the index of its base conductor in the list of based conductors (as returned by base_conductors). Thus, for a conductor in subset si, min_conductor_ssi (si) == base_conductors () [base_conductor_index () [si]]. If the subset represents an insulator, the array assignes -1 to it. To other subsets, the array assignes <= -2.
References ug::Electromagnetism::EMaterial< TDomain >::m_baseCondInd.
|
inline |
Returns index of the base conductor in base_conductors () for a conductor identified by the subset index of its subset. If the subset represents an insulator, the function returns -1. For other subsets, <= -2 is returned.
si | the subset index of the conductor |
References ug::Electromagnetism::EMaterial< TDomain >::m_baseCondInd.
|
inline |
This function returns the array of the base conductor subset indices: The list of the smallest indices of the subsets representing conductors. The length of this array is the 2nd Betti number: the number of the insulator-separated subdomains occupied by the conductors. Note that the Dirichlet BC is not taken into account here and some of the conductors may be grounded.
References ug::Electromagnetism::EMaterial< TDomain >::m_baseConductors.
void ug::Electromagnetism::EMaterial< TDomain >::close |
finalizes the object
Performs finalization steps for the object.
References ug::SubsetGroup::add(), ug::SubsetGroup::clear(), dim, ug::DimensionOfSubset(), SmartPtr< class, FreePolicy >::get(), ug::SubsetGroup::name(), ug::RemoveWhitespaceFromString(), ug::SubsetGroup::size(), ug::Electromagnetism::EMaterial< TDomain >::TSubdomData::ssGrp, ug::Electromagnetism::EMaterial< TDomain >::TSubdomData::ssNames, subset_handler(), ug::TokenizeString(), UG_CATCH_THROW, UG_LOG, and UG_THROW.
|
private |
computes the connectivity of the conductions
Computes the connectivity of the conductors and therefore finds out the topology of the domain.
[out] | minCondInd | an array indexed by the subset indices, so that every entry of a conductor is initialized with the smallest conductor subset id connected to it (and with < 0 for the other subdomains including insulators) |
[out] | minCondInd | min. subset ind. of the conductor connected to a given one (or -1) |
References get(), ug::NHT_VERTEX_NEIGHBORS, num_subsets(), subset_handler(), and UG_THROW.
|
inline |
returns pointer to the domain
References ug::Electromagnetism::EMaterial< TDomain >::m_spDomain.
Referenced by ug::Electromagnetism::EMaterial< TDomain >::EMaterial().
|
inline |
returns true iff closed
References ug::Electromagnetism::EMaterial< TDomain >::m_bClosed.
bool ug::Electromagnetism::EMaterial< TDomain >::get_mu_sigma | ( | int | si, |
number & | mu, | ||
number & | sigma | ||
) | const |
reads the data for a subdomain from the data item
Gets the data from a subset data item. This function returns true if the specified subset index is not listed in the object, or the required data are not supplied for this subset. (For example, it should return true for low-dimensional subsets.) Otherwise the function returns false. If the object is not finalized, the function throws and exception.
[in] | si | subset index |
[out] | mu | magnetic permeability |
[out] | sigma | electric conductivity |
References ug::Electromagnetism::EMaterial< TDomain >::TSubdomData::mu, ug::Electromagnetism::EMaterial< TDomain >::TSubdomData::sigma, and UG_THROW.
|
inline |
The connectivity of the conductors: This function returns the array indexed by the subset indices, so that to every subset index of a conductor, it assignes the smallest conductor subset index connected to it (and -1 to insulators as well as <= -2 to the other subdomains)
References ug::Electromagnetism::EMaterial< TDomain >::m_minCondSsI.
|
inline |
For every subset index of a conductor, this function returns the smallest conductor subset index connected to the given conductor (and -1 for insulators as well as <= -2 for the other subdomains)
si | the subset index of the conductor |
References ug::Electromagnetism::EMaterial< TDomain >::m_minCondSsI.
|
inline |
constant access to the subset handler
References ug::Electromagnetism::EMaterial< TDomain >::m_spDomain.
Referenced by ug::Electromagnetism::EMaterial< TDomain >::EMaterial().
|
inline |
returns the string of the subset names
References ug::Electromagnetism::EMaterial< TDomain >::m_bClosed, ug::Electromagnetism::EMaterial< TDomain >::m_sSsNames, and UG_THROW.
|
staticprivate |
world dimension
|
private |
Correspondence of subset indices to the indices of the base conductors in m_baseConductors: For every conductor with subset index si, m_minCondSsI [si] == m_baseConductors [m_baseCondInd [si]]. For other subsets, this array keeps either -1 (for insulators) or <= -2 (for low-dimensional subsets etc).
Referenced by ug::Electromagnetism::EMaterial< TDomain >::base_conductor_index().
|
private |
Base conductor subset indices: The list of the smallest indices of the subsets representing conductors. The length of this list is the 2nd Betti number: the number of the insulator- separated subdomains occupied by the conductors. Note that the Dirichlet BC is not taken into account here so that some of the base conductors may be grounded.
Referenced by ug::Electromagnetism::EMaterial< TDomain >::base_conductors().
|
private |
Flag that indicates that the description of the domain has been completed.
Referenced by ug::Electromagnetism::EMaterial< TDomain >::finalized(), and ug::Electromagnetism::EMaterial< TDomain >::subset_names().
|
private |
The connectivity of the conductors: This array is indexed by the subset indices and assignes to every subset of a conductor the smallest conductor subset index connected to this conductor (and -1 to insulators as well as <= -2 to the other subdomains)
Referenced by ug::Electromagnetism::EMaterial< TDomain >::min_conductor_ssi().
|
private |
Map assigning subdomain indices to the subdomain data items.
|
private |
domain
Referenced by ug::Electromagnetism::EMaterial< TDomain >::domain(), and ug::Electromagnetism::EMaterial< TDomain >::subset_handler().
|
private |
String of all the subset names mentioned in the data items.
Referenced by ug::Electromagnetism::EMaterial< TDomain >::subset_names().
|
private |
Subdomain data items.