本文整理汇总了C++中IPPtr::printInteractions方法的典型用法代码示例。如果您正苦于以下问题:C++ IPPtr::printInteractions方法的具体用法?C++ IPPtr::printInteractions怎么用?C++ IPPtr::printInteractions使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IPPtr
的用法示例。
在下文中一共展示了IPPtr::printInteractions方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
//.........这里部分代码省略.........
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;
if (rank==0)
ip->printInteractions();
// aim is just to answer one simple question:
// have I figured out a trial-space preimage for optimal test function (q=1, tau=0, v=0)?
SolutionPtr soln = Teuchos::rcp(new Solution(mesh));
FunctionPtr x = Function::xn();
FunctionPtr y = Function::yn();
// u1 = u1_hat = x / 2
FunctionPtr u1_exact = x / 2;
// u2 = u2_hat = y / 2
FunctionPtr u2_exact = y / 2;
// sigma = 0.5 * I
FunctionPtr sigma11_exact = Function::constant(0.5);
FunctionPtr sigma22_exact = Function::constant(0.5);
// tn_hat = 0.5 * n
FunctionPtr n = Function::normal();
FunctionPtr t1n_exact = n->x() / 2;
FunctionPtr t2n_exact = n->y() / 2;
map<int, FunctionPtr > exact_soln;
exact_soln[u1->ID()] = u1_exact;
exact_soln[u1hat->ID()] = u1_exact;
exact_soln[u2->ID()] = u2_exact;
exact_soln[u2hat->ID()] = u2_exact;
exact_soln[sigma11->ID()] = sigma11_exact;
exact_soln[sigma22->ID()] = sigma22_exact;
exact_soln[t1n->ID()] = t1n_exact;