本文整理汇总了C++中EBISBox::getAllFaces方法的典型用法代码示例。如果您正苦于以下问题:C++ EBISBox::getAllFaces方法的具体用法?C++ EBISBox::getAllFaces怎么用?C++ EBISBox::getAllFaces使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类EBISBox
的用法示例。
在下文中一共展示了EBISBox::getAllFaces方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: setBorkedFlux
void setBorkedFlux(EBFluxFAB& a_flux,
const EBISBox& a_ebisBox,
const Box& a_box,
const RealVect& a_fluxVal,
const BaseFab<int>& a_map)
{
for (int idir = 0; idir < SpaceDim; idir++)
{
Real bogval = 0;
//the bogus value will be zero so it will not
//do to have the correct value be zero
if (Abs(a_fluxVal[idir]) < 1.0e-3) bogval = 1.0;
a_flux[idir].setVal(a_fluxVal[idir]);
//if i am in a 1d box and the box next to me
//is 2d, set the border flux to
for (SideIterator sit; sit.ok(); ++sit)
{
Box borderBox;
if (sit() == Side::Lo)
{
borderBox = adjCellLo(a_box, idir, -1);
}
else
{
borderBox = adjCellHi(a_box, idir, -1);
}
for (BoxIterator bit(borderBox); bit.ok(); ++bit)
{
const IntVect& thisIV = bit();
IntVect thatIV = thisIV + sign(sit())*BASISV(idir);
if ((a_map(thisIV, 0) == 1) && (a_map(thatIV, 0) == 2))
{
Vector<FaceIndex> faces = a_ebisBox.getAllFaces(thisIV, idir, sit());
for (int iface = 0; iface < faces.size(); iface++)
{
a_flux[idir](faces[iface],0) = bogval;
}
}
}
}
}
}