本文整理汇总了C++中Domain::giveConnectivityTable方法的典型用法代码示例。如果您正苦于以下问题:C++ Domain::giveConnectivityTable方法的具体用法?C++ Domain::giveConnectivityTable怎么用?C++ Domain::giveConnectivityTable使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Domain
的用法示例。
在下文中一共展示了Domain::giveConnectivityTable方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: currCell
bool
LEPlicElementInterface :: isBoundary()
{
int i, nneighbr, ineighbr;
double fvk, fvi = this->giveTempVolumeFraction();
IntArray currCell(1), neighborList;
LEPlicElementInterface *ineghbrInterface;
Domain *domain = this->giveElement()->giveDomain();
ConnectivityTable *contable = domain->giveConnectivityTable();
if ( ( fvi > 0. ) && ( fvi <= 1.0 ) ) {
// potentially boundary cell
if ( ( fvi > 0. ) && ( fvi < 1.0 ) ) {
return true;
}
currCell.at(1) = this->giveElement()->giveNumber();
contable->giveElementNeighbourList(neighborList, currCell);
// loop over neighbors to assemble normal equations
nneighbr = neighborList.giveSize();
for ( i = 1; i <= nneighbr; i++ ) {
ineighbr = neighborList.at(i);
if ( ( ineghbrInterface =
( LEPlicElementInterface * ) ( domain->giveElement(ineighbr)->giveInterface(LEPlicElementInterfaceType) ) ) ) {
fvk = ineghbrInterface->giveTempVolumeFraction();
if ( fvk < 1.0 ) {
return true;
}
}
}
}
return false;
}
示例2: updateNodeEnrichmentItemMap
void XfemManager :: updateNodeEnrichmentItemMap()
{
Domain *domain = giveDomain();
int nDMan = domain->giveNumberOfDofManagers();
mNodeEnrichmentItemIndices.clear();
mNodeEnrichmentItemIndices.resize(nDMan);
int nElem = domain->giveNumberOfElements();
mElementEnrichmentItemIndices.clear();
for ( int i = 1; i <= nElem; i++ ) {
int elIndex = domain->giveElement(i)->giveGlobalNumber();
int elPlaceInArray = domain->giveElementPlaceInArray(elIndex);
if ( i != elPlaceInArray ) {
printf("i != elPlaceInArray.\n");
exit(0);
}
mElementEnrichmentItemIndices [ elPlaceInArray ].clear();
}
int nEI = giveNumberOfEnrichmentItems();
for ( int eiIndex = 1; eiIndex <= nEI; eiIndex++ ) {
EnrichmentItem *ei = giveEnrichmentItem(eiIndex);
const std :: unordered_map< int, NodeEnrichmentType > &enrNodeInd = ei->giveEnrNodeMap();
//for(size_t i = 0; i < enrNodeInd.size(); i++) {
for ( auto &nodeEiPair: enrNodeInd ) {
mNodeEnrichmentItemIndices [ nodeEiPair.first - 1 ].push_back(eiIndex);
ConnectivityTable *ct = domain->giveConnectivityTable();
//const IntArray *nodeElements = ct->giveDofManConnectivityArray(nodeEiPair.first);
IntArray nodeElements;
IntArray nodeList = {
nodeEiPair.first
};
ct->giveNodeNeighbourList(nodeElements, nodeList);
for ( int i = 1; i <= nodeElements.giveSize(); i++ ) {
int elInd = nodeElements.at(i);
bool found = false;
for ( size_t j = 0; j < mElementEnrichmentItemIndices [ elInd ].size(); j++ ) {
if ( mElementEnrichmentItemIndices [ elInd ] [ j ] == eiIndex ) {
found = true;
break;
}
}
if ( !found ) {
mElementEnrichmentItemIndices [ elInd ].push_back(eiIndex);
}
}
}
}
mMaterialModifyingEnrItemIndices.clear();
for ( int eiIndex = 1; eiIndex <= nEI; eiIndex++ ) {
EnrichmentItem *ei = giveEnrichmentItem(eiIndex);
if ( ei->canModifyMaterial() ) {
mMaterialModifyingEnrItemIndices.push_back(eiIndex);
}
}
}