本文整理汇总了C++中TPZAutoPointer::Print方法的典型用法代码示例。如果您正苦于以下问题:C++ TPZAutoPointer::Print方法的具体用法?C++ TPZAutoPointer::Print怎么用?C++ TPZAutoPointer::Print使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TPZAutoPointer
的用法示例。
在下文中一共展示了TPZAutoPointer::Print方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: PrintLS
void TPZDarcyAnalysis::PrintLS(TPZAnalysis *an)
{
TPZAutoPointer< TPZMatrix<REAL> > KGlobal;
TPZFMatrix<STATE> FGlobal;
KGlobal = an->Solver().Matrix();
FGlobal = an->Rhs();
#ifdef PZDEBUG
#ifdef LOG4CXX
if(logger->isDebugEnabled())
{
std::stringstream sout;
KGlobal->Print("KGlobal = ", sout,EMathematicaInput);
FGlobal.Print("FGlobal = ", sout,EMathematicaInput);
LOGPZ_DEBUG(logger,sout.str())
}
示例2: IterativeProcess
void IterativeProcess(TPZAnalysis *an, std::ostream &out, int numiter)
{
int iter = 0;
REAL error = 1.e10, NormResLambdaLast = 1.e10;;
const REAL tol = 1.e-5;
int numeq = an->Mesh()->NEquations();
TPZFMatrix<STATE> Uatk0(an->Solution());
TPZFMatrix<STATE> Uatk(Uatk0),DeltaU(Uatk0);
if(Uatk0.Rows() != numeq) Uatk0.Redim(numeq,1);
an->Assemble();
an->Rhs() *= -1.0; //- [R(U0)];
TPZAutoPointer< TPZMatrix<STATE> > matK; // getting X(Uatn)
bool converged = false;
while(!converged && iter < numiter) {
#ifdef LOG4CXX
if(logger->isDebugEnabled())
{
std::stringstream sout;
matK=an->Solver().Matrix();
matK->Print("matK = ", sout,EMathematicaInput);
an->Rhs().Print("Rhs = ", sout, EMathematicaInput);
LOGPZ_DEBUG(logger,sout.str())
}
#endif
// Computing Uatk = Uatn + DeltaU;
an->Solve();
DeltaU= an->Solution();
Uatk = Uatk0 + DeltaU;
//Computing ||DeltaU||
REAL NormOfDeltaU = Norm(DeltaU);
#ifdef LOG4CXX
if(logger->isDebugEnabled())
{
std::stringstream sout;
DeltaU.Print("DeltaU = ", sout,EMathematicaInput);
Uatk.Print("Uatk = ", sout,EMathematicaInput);
LOGPZ_DEBUG(logger,sout.str())
}
示例3: main1
//.........这里部分代码省略.........
// 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
{
std::stringstream str;
cmesh->Print(str);
LOGPZ_DEBUG(logger,str.str());
}
#endif
dohrstruct.SetNumThreads(numthreads);
TPZAutoPointer<TPZGuiInterface> gui;
TPZFMatrix<STATE> rhs(cmesh->NEquations(),1,0.);
TPZMatrix<STATE> *matptr = dohrstruct.Create();
dohrstruct.Assemble(*matptr,rhs,gui,numthread_assemble,numthread_decompose);
TPZAutoPointer<TPZMatrix<STATE> > dohr = matptr;
TPZAutoPointer<TPZMatrix<STATE> > precond = dohrstruct.Preconditioner();
{
std::ofstream out("DohrCerta2.txt");
TPZFMatrix<REAL> Subtract(dohr->Rows(),dohr->Rows()), unitary(dohr->Rows(),dohr->Rows());
unitary.Identity();
TPZFMatrix<REAL> result;
dohr->Multiply(unitary, result);
result.Print("DohrCerta2", out);
}
/*
#ifdef LOG4CXX
{