本文整理汇总了C++中FEInterpolation::boundarySurfaceGiveNodes方法的典型用法代码示例。如果您正苦于以下问题:C++ FEInterpolation::boundarySurfaceGiveNodes方法的具体用法?C++ FEInterpolation::boundarySurfaceGiveNodes怎么用?C++ FEInterpolation::boundarySurfaceGiveNodes使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FEInterpolation
的用法示例。
在下文中一共展示了FEInterpolation::boundarySurfaceGiveNodes方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: afflictedNodes
const IntArray &Set :: giveNodeList()
{
// Lazy evaluation, we compute the unique set of nodes if needed (and store it).
if ( this->totalNodes.giveSize() == 0 ) {
IntArray afflictedNodes( this->domain->giveNumberOfDofManagers() );
afflictedNodes.zero();
for ( int ielem = 1; ielem <= this->elements.giveSize(); ++ielem ) {
Element *e = this->domain->giveElement( this->elements.at(ielem) );
for ( int inode = 1; inode <= e->giveNumberOfNodes(); ++inode ) {
afflictedNodes.at( e->giveNode(inode)->giveNumber() ) = 1;
}
}
/* boundary entities are obsolete, use edges and/or surfaces instead */
IntArray bNodes;
for ( int ibnd = 1; ibnd <= this->elementBoundaries.giveSize() / 2; ++ibnd ) {
Element *e = this->domain->giveElement( this->elementBoundaries.at(ibnd * 2 - 1) );
int boundary = this->elementBoundaries.at(ibnd * 2);
FEInterpolation *fei = e->giveInterpolation();
fei->boundaryGiveNodes(bNodes, boundary);
for ( int inode = 1; inode <= bNodes.giveSize(); ++inode ) {
afflictedNodes.at( e->giveNode( bNodes.at(inode) )->giveNumber() ) = 1;
}
}
IntArray eNodes;
for ( int iedge = 1; iedge <= this->elementEdges.giveSize() / 2; ++iedge ) {
Element *e = this->domain->giveElement( this->elementEdges.at(iedge * 2 - 1) );
int edge = this->elementEdges.at(iedge * 2);
FEInterpolation *fei = e->giveInterpolation();
fei->boundaryEdgeGiveNodes(eNodes, edge);
for ( int inode = 1; inode <= eNodes.giveSize(); ++inode ) {
afflictedNodes.at( e->giveNode( eNodes.at(inode) )->giveNumber() ) = 1;
}
}
for ( int isurf = 1; isurf <= this->elementSurfaces.giveSize() / 2; ++isurf ) {
Element *e = this->domain->giveElement( this->elementSurfaces.at(isurf * 2 - 1) );
int surf = this->elementSurfaces.at(isurf * 2);
FEInterpolation *fei = e->giveInterpolation();
fei->boundarySurfaceGiveNodes(eNodes, surf);
for ( int inode = 1; inode <= eNodes.giveSize(); ++inode ) {
afflictedNodes.at( e->giveNode( eNodes.at(inode) )->giveNumber() ) = 1;
}
}
for ( int inode = 1; inode <= this->nodes.giveSize(); ++inode ) {
afflictedNodes.at( this->nodes.at(inode) ) = 1;
}
totalNodes.findNonzeros(afflictedNodes);
}
return this->totalNodes;
}