本文整理汇总了C++中Epetra_MultiVector::NormInf方法的典型用法代码示例。如果您正苦于以下问题:C++ Epetra_MultiVector::NormInf方法的具体用法?C++ Epetra_MultiVector::NormInf怎么用?C++ Epetra_MultiVector::NormInf使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Epetra_MultiVector
的用法示例。
在下文中一共展示了Epetra_MultiVector::NormInf方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: dz
int FSIExactJacobian::Epetra_ExactJacobian::Apply (const Epetra_MultiVector& X, Epetra_MultiVector& Y) const
{
LifeChrono chronoFluid, chronoSolid, chronoInterface;
M_comm->Barrier();
double xnorm = 0.;
X.NormInf (&xnorm);
Epetra_FEVector dz (Y.Map() );
if (M_ej->isSolid() )
{
std::cout << "\n ***** norm (z)= " << xnorm << std::endl << std::endl;
}
if ( xnorm == 0.0 )
{
Y.Scale (0.);
dz.Scale (0.);
}
else
{
vector_Type const z (X, M_ej->solidInterfaceMap(), Unique);
M_ej->displayer().leaderPrint ( "NormInf res " , z.normInf(), "\n" );
//M_ej->solid().residual() *= 0.;
//M_ej->transferInterfaceOnSolid(z, M_ej->solid().residual());
//std::cout << "NormInf res_d " << M_ej->solid().residual().NormInf() << std::endl;
//if (M_ej->isSolid())
// M_ej->solid().postProcess();
M_ej->setLambdaFluid (z);
//M_ej->transferInterfaceOnSolid(z, M_ej->solid().disp());
chronoInterface.start();
vector_Type sigmaFluidUnique (M_ej->sigmaFluid(), Unique);
chronoInterface.stop();
M_comm->Barrier();
chronoFluid.start();
if (M_ej->isFluid() )
{
//to be used when we correct the other lines
if (true || ( !this->M_ej->dataFluid()->isSemiImplicit() /*|| this->M_ej->dataFluid().semiImplicit()==-1*/) )
{
M_ej->meshMotion().iterate (*M_ej->BCh_harmonicExtension() );
//std::cout<<" mesh motion iterated!!!"<<std::endl;
}
M_ej->displayer().leaderPrint ( " norm inf dx = " , M_ej->meshMotion().disp().normInf(), "\n" );
M_ej->solveLinearFluid();
M_ej->transferFluidOnInterface (M_ej->fluid().residual(), sigmaFluidUnique);
//M_ej->fluidPostProcess();
}
M_comm->Barrier();
chronoFluid.stop();
M_ej->displayer().leaderPrintMax ( "Fluid linear solution: total time : ", chronoFluid.diff() );
chronoInterface.start();
// M_ej->setSigmaFluid(sigmaFluidUnique);
M_ej->setSigmaSolid (sigmaFluidUnique);
vector_Type lambdaSolidUnique (M_ej->lambdaSolid(), Unique);
chronoInterface.stop();
M_comm->Barrier();
chronoFluid.start();
if (M_ej->isSolid() )
{
M_ej->solveLinearSolid();
M_ej->transferSolidOnInterface (M_ej->solid().displacement(), lambdaSolidUnique);
}
M_comm->Barrier();
chronoSolid.stop();
M_ej->displayer().leaderPrintMax ( "Solid linear solution: total time : " , chronoSolid.diff() );
chronoInterface.start();
M_ej->setLambdaSolid (lambdaSolidUnique);
chronoInterface.stop();
M_ej->displayer().leaderPrintMax ( "Interface linear transfer: total time : " , chronoInterface.diffCumul() );
dz = lambdaSolidUnique.epetraVector();
//.........这里部分代码省略.........