本文整理汇总了C++中TPZStack::push_back方法的典型用法代码示例。如果您正苦于以下问题:C++ TPZStack::push_back方法的具体用法?C++ TPZStack::push_back怎么用?C++ TPZStack::push_back使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TPZStack
的用法示例。
在下文中一共展示了TPZStack::push_back方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Write
void TPZGeoCloneMesh::Write(TPZStream &buf, int withclassid) const
{
TPZGeoMesh::Write(buf,withclassid);
try
{
if(!fGeoReference) {
std::cout << "Cloned geo mesh without geometric mesh from which this mesh is cloned." << std::endl;
DebugStop();
}
TPZPersistenceManager::WritePointer(fGeoReference, &buf);
buf.Write(fMapNodes);
// Maps elements with original elements
std::map<int64_t,int64_t> MappingElements;
TPZGeoEl *gel;
int64_t indexorig, indexcloned;
std::map<TPZGeoEl* , TPZGeoEl* >::const_iterator it;
for(it=fMapElements.begin();it!=fMapElements.end();it++) {
gel = it->first;
indexorig = gel->Index();
gel = it->second;
indexcloned = gel->Index();
MappingElements.insert(std::make_pair(indexorig,indexcloned));
}
buf.Write(MappingElements);
// Writing index of the elements in fReferenceElement
TPZStack<int64_t> RefElements;
int64_t sz = fReferenceElement.size();
for(int64_t ii=0;ii<sz;ii++) {
RefElements.push_back(fReferenceElement[ii]->Index());
}
buf.Write(RefElements);
// Have to save a compact structure of the vector??
// Writing index of the elements in fPatchElement
std::set<int> PatchElements;
std::set<TPZGeoEl* >::iterator itpatch = fPatchElements.begin();
while(itpatch != fPatchElements.end()) {
PatchElements.insert((*itpatch)->Index());
itpatch++;
}
buf.Write(PatchElements);
int64_t rootindex = fGeoRoot->Index();
buf.Write(&rootindex,1);
}
catch(const exception& e)
{
cout << "Exception catched! " << e.what() << std::endl;
cout.flush();
DebugStop();
}
}//method