當前位置: 首頁>>代碼示例>>C++>>正文


C++ TPZAutoPointer::Name方法代碼示例

本文整理匯總了C++中TPZAutoPointer::Name方法的典型用法代碼示例。如果您正苦於以下問題:C++ TPZAutoPointer::Name方法的具體用法?C++ TPZAutoPointer::Name怎麽用?C++ TPZAutoPointer::Name使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在TPZAutoPointer的用法示例。


在下文中一共展示了TPZAutoPointer::Name方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。

示例1: InitializeUniformRefPattern

//.........................................................................................................................................
void TPZRefPatternDataBase::InitializeUniformRefPattern(MElementType elType)
{
	switch (elType)
	{
		case 0://EPoint
		{
			break;
		}
		case 1://EOned
		{
			std::cout << "\n\tinserting uniform refpattern: line\n";
			char buf[] =
			"3     3  "
			"-50       UnifLin	"
			"-1.     0.     0. "
			" 1.     0.     0. "
			" 0.     0.     0. "
			" 1     2     0     1 "
			" 1     2     0     2 "
			" 1     2     2     1 ";
			std::istringstream str(buf);
			TPZAutoPointer<TPZRefPattern> refpat = new TPZRefPattern(str);
			TPZAutoPointer<TPZRefPattern> refpatFound = FindRefPattern(refpat);
			if(!refpatFound)
			{
				InsertRefPattern(refpat);
			}
			else
			{
				refpatFound->SetName(refpat->Name());
			}
			refpat->InsertPermuted();
			
			break;
		}
		case 2://ETriangle
		{
			std::cout << "\n\tinserting uniform refpattern: triangle\n";
			char buf[] =
			"6     5  "
			"-50       UnifTri	"
			"0.     0.     0. "
			"1.     0.     0. "
			"0.     1.     0. "
			"0.5    0.     0. "
			"0.5    0.5    0. "
			"0.     0.5     0. "
			"2     3     0     1     2 "
			"2     3     0     3     5 "
			"2     3     3     1     4 "
			"2     3     5     4     2 "
			"2     3     4     5     3 ";
			std::istringstream str(buf);
			TPZAutoPointer<TPZRefPattern> refpat = new TPZRefPattern(str);
			TPZAutoPointer<TPZRefPattern> refpatFound = FindRefPattern(refpat);
			if(!refpatFound)
			{
				InsertRefPattern(refpat);
			}
			else
			{
				refpatFound->SetName(refpat->Name());
			}
			refpat->InsertPermuted();
			
			break;
		}
		case 3://EQuadrilateral
		{
			std::cout << "\n\tinserting uniform refpattern: quadrilateral\n";
			char buf[] =
			"9     5  "
			"-50       UnifQua	"
			"-1.    -1.     0. "
			" 1.    -1.     0. "
			" 1.     1.     0. "
			"-1.     1.     0.	"
			" 0.    -1.     0. "
			" 1.     0.     0. "
			" 0.     1.     0. "
			"-1.     0.     0. "
			" 0.     0.     0. "
			" 3     4     0     1     2     3 "
			" 3     4     0     4     8     7 "
			" 3     4     4     1     5     8 "
			" 3     4     8     5     2     6 "
			" 3     4     7     8     6     3 ";
			std::istringstream str(buf);
			TPZAutoPointer<TPZRefPattern> refpat = new TPZRefPattern(str);
			TPZAutoPointer<TPZRefPattern> refpatFound = FindRefPattern(refpat);
			if(!refpatFound)
			{
				InsertRefPattern(refpat);
			}
			else
			{
				refpatFound->SetName(refpat->Name());
			}
			refpat->InsertPermuted();
//.........這裏部分代碼省略.........
開發者ID:labmec,項目名稱:neopz,代碼行數:101,代碼來源:TPZRefPatternDataBase.cpp


注:本文中的TPZAutoPointer::Name方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。