本文整理匯總了C++中TPZAutoPointer::SetAllCreateFunctionsContinuousWithMem方法的典型用法代碼示例。如果您正苦於以下問題:C++ TPZAutoPointer::SetAllCreateFunctionsContinuousWithMem方法的具體用法?C++ TPZAutoPointer::SetAllCreateFunctionsContinuousWithMem怎麽用?C++ TPZAutoPointer::SetAllCreateFunctionsContinuousWithMem使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類TPZAutoPointer
的用法示例。
在下文中一共展示了TPZAutoPointer::SetAllCreateFunctionsContinuousWithMem方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。
示例1: main1
int main1(int argc, char *argv[])
{
#ifdef LOG4CXX
InitializePZLOG();
#endif
TPZTimer total;
total.start();
std::cout << "COMECA O TEMPO"<< std::endl;
int dimension = 3;
int dim = 2;
int maxlevel = 5;
int sublevel = 3;
int plevel = 1;
TPZPairStructMatrix::gNumThreads = 20;
int numthreads = 20;
// tempo.fNumthreads = numthreads; // alimenta timeTemp com o numero de threads
TPZGeoMesh *gmesh = 0;
{
TPZCompEl::SetgOrder(plevel);
TPZAutoPointer<TPZCompMesh> cmesh;
if(0)
{
TPZGenSubStruct sub(dim,maxlevel,sublevel);
cmesh = sub.GenerateMesh();
cmesh->SetDimModel(dim);
gmesh = cmesh->Reference();
}
else
{
dim = 3;
if (1) // Predio Viscoso
{
int dimension = 3;
gmesh = MalhaPredio();
cmesh = new TPZCompMesh(gmesh);
cmesh->SetDimModel(3);
cmesh->SetDefaultOrder(plevel);
cmesh->SetAllCreateFunctionsContinuousWithMem(dimension);
InsertViscoElasticity(cmesh);
cmesh->AutoBuild();
}
else // Cubo Viscoso
{
int dimension = 3;
gmesh = MalhaCubo();
cmesh = new TPZCompMesh(gmesh);
cmesh->SetDimModel(3);
cmesh->SetDefaultOrder(plevel);
cmesh->SetAllCreateFunctionsContinuousWithMem(dimension);
InsertViscoElasticityCubo(cmesh);
cmesh->AutoBuild();
}
}
std::cout << "Numero de equacoes " << cmesh->NEquations() << std::endl;
int numthread_assemble = 20;
int numthread_decompose = 20;
TPZAutoPointer<TPZCompMesh> cmeshauto(cmesh);
TPZDohrStructMatrix dohrstruct(cmeshauto);
dohrstruct.IdentifyExternalConnectIndexes();
std::cout << "Substructuring the mesh\n";
// TPZfTime timetosub; // init of timer
//REAL height = Height(gmesh);
//int nsubstruct = SubStructure(cmesh, height/2);
dohrstruct.SubStructure(16);
// tempo.ft0sub = timetosub.ReturnTimeDouble(); // end of timer
// std::cout << tempo.ft0sub << std::endl;
// sub.SubStructure();
//Teste Skyline
/*
TPZSkylineStructMatrix skyl(cmesh);
TPZFMatrix<REAL> rhsfake(cmesh->NEquations(),1,0);
int numsubmesh = cmesh->NElements();
TPZAutoPointer<TPZGuiInterface> fakegui = new TPZGuiInterface;
int nel = cmesh->NElements();
for (int iel = 0 ; iel < nel ; iel++)
{
TPZSubCompMesh *subcompmesh = dynamic_cast<TPZSubCompMesh*>(cmesh->ElementVec()[iel]);
if(subcompmesh)
{
subcompmesh->SetAnalysisSkyline(0,0,fakegui);
}
}
TPZMatrix<REAL> *stiff2 = skyl.CreateAssemble(rhsfake, fakegui,numthread_assemble,numthread_decompose);
*/
#ifdef LOG4CXX
//.........這裏部分代碼省略.........