本文整理汇总了C++中BFPtr::setUseExtendedPrecisionSolveForOptimalTestFunctions方法的典型用法代码示例。如果您正苦于以下问题:C++ BFPtr::setUseExtendedPrecisionSolveForOptimalTestFunctions方法的具体用法?C++ BFPtr::setUseExtendedPrecisionSolveForOptimalTestFunctions怎么用?C++ BFPtr::setUseExtendedPrecisionSolveForOptimalTestFunctions使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BFPtr
的用法示例。
在下文中一共展示了BFPtr::setUseExtendedPrecisionSolveForOptimalTestFunctions方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
//.........这里部分代码省略.........
stokesBF = Teuchos::rcp( new BF(varFactory) );
// tau1 terms:
stokesBF->addTerm(u1,tau1->div());
stokesBF->addTerm(sigma11,tau1->x()); // (sigma1, tau1)
stokesBF->addTerm(sigma12,tau1->y());
stokesBF->addTerm(-u1hat, tau1->dot_normal());
// tau2 terms:
stokesBF->addTerm(u2, tau2->div());
stokesBF->addTerm(sigma21,tau2->x()); // (sigma2, tau2)
stokesBF->addTerm(sigma22,tau2->y());
stokesBF->addTerm(-u2hat, tau2->dot_normal());
// v1:
stokesBF->addTerm(mu * sigma11,v1->dx()); // (mu sigma1, grad v1)
stokesBF->addTerm(mu * sigma12,v1->dy());
stokesBF->addTerm( - p, v1->dx() );
stokesBF->addTerm( -t1n, v1);
// v2:
stokesBF->addTerm(mu * sigma21,v2->dx()); // (mu sigma2, grad v2)
stokesBF->addTerm(mu * sigma22,v2->dy());
stokesBF->addTerm( -p, v2->dy());
stokesBF->addTerm( -t2n, v2);
// q:
stokesBF->addTerm(-u1,q->dx()); // (-u, grad q)
stokesBF->addTerm(-u2,q->dy());
stokesBF->addTerm(u1hat->times_normal_x() + u2hat->times_normal_y(), q);
if (rank==0)
stokesBF->printTrialTestInteractions();
stokesBF->setUseExtendedPrecisionSolveForOptimalTestFunctions(useExtendedPrecisionForOptimalTestInversion);
mesh = MeshFactory::quadMesh(stokesBF, H1Order, pToAdd);
//////////////////// CREATE BCs ///////////////////////
BCPtr bc = BC::bc();
//////////////////// CREATE RHS ///////////////////////
RHSPtr rhs = RHS::rhs(); // zero for now...
IPPtr ip;
qoptIP = Teuchos::rcp(new IP());
if (useCompliantGraphNorm) {
qoptIP->addTerm( mu * v1->dx() + tau1->x() ); // sigma11
qoptIP->addTerm( mu * v1->dy() + tau1->y() ); // sigma12
qoptIP->addTerm( mu * v2->dx() + tau2->x() ); // sigma21
qoptIP->addTerm( mu * v2->dy() + tau2->y() ); // sigma22
qoptIP->addTerm( mu * v1->dx() + mu * v2->dy() ); // pressure
qoptIP->addTerm( h * tau1->div() - h * q->dx() ); // u1
qoptIP->addTerm( h * tau2->div() - h * q->dy()); // u2
qoptIP->addTerm( (mu / h) * v1 );
qoptIP->addTerm( (mu / h) * v2 );
qoptIP->addTerm( q );
qoptIP->addTerm( tau1 );
qoptIP->addTerm( tau2 );
} else { // standard graph norm, then
qoptIP = stokesBF->graphNorm();
}
ip = qoptIP;