本文整理匯總了C++中TPZAutoPointer::CleanUp方法的典型用法代碼示例。如果您正苦於以下問題:C++ TPZAutoPointer::CleanUp方法的具體用法?C++ TPZAutoPointer::CleanUp怎麽用?C++ TPZAutoPointer::CleanUp使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類TPZAutoPointer
的用法示例。
在下文中一共展示了TPZAutoPointer::CleanUp方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。
示例1: mainfem
int mainfem(int argc, char *argv[])
{
//InitializePZLOG();
gRefDBase.InitializeUniformRefPattern(EOned);
gRefDBase.InitializeUniformRefPattern(EQuadrilateral);
gRefDBase.InitializeUniformRefPattern(ETriangle);
ofstream saidaerros("ErroProjecaoSemiH1.txt");
saidaerros << "\nCalculo do Erro\n";
int h= 0;
int p=0;
saidaerros.precision(16);
for(p=1; p<5; p++)
{
saidaerros << "\n";
saidaerros << "Ordens p = " << p <<"\n";
for(h=0; h<6; h++)
{
saidaerros << "\nRefinamento: h = "<< h <<"\n";
//TPZGeoMesh * gmesh = MalhaGeom(1.,1.,false);
TPZAutoPointer<TPZGeoMesh> gmesh = MalhaGeom(1.,1.,false);
TPZVec<int> dims(2,0);
dims[0]=1; dims[1]=2;
int nref = h;
RefinamentoUniforme(gmesh, nref, dims);
TPZCompMesh * cmesh = CompMesh(gmesh.operator->(),p);
//analysis
TPZAnalysis an(cmesh,false);
TPZSkylineStructMatrix skyl(cmesh);
an.SetStructuralMatrix(skyl);
TPZStepSolver<STATE> step;
step.SetDirect(ELDLt);
an.SetSolver(step);
an.Assemble();
an.Solve();
// std::string plotfile("result.vtk");
// TPZStack<std::string> scalnames,vecnames;
// scalnames.Push("Solution");
// scalnames.Push("ExactPressure");
// an.DefineGraphMesh(cmesh->Dimension(), scalnames, vecnames, plotfile);
// an.PostProcess(0,2);
// TPZVec<REAL> erros(3);
// an.SetExact(*SolSuave);
// an.PostProcessError(erros,saidaerros);
ErrorH1(cmesh, saidaerros);
cmesh->CleanUp();
gmesh->CleanUp();
delete cmesh;
}
}
return EXIT_SUCCESS;
}