本文整理汇总了C++中Orientation::setFaceOrientation方法的典型用法代码示例。如果您正苦于以下问题:C++ Orientation::setFaceOrientation方法的具体用法?C++ Orientation::setFaceOrientation怎么用?C++ Orientation::setFaceOrientation使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Orientation
的用法示例。
在下文中一共展示了Orientation::setFaceOrientation方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
//.........这里部分代码省略.........
const bool left_handed = cell_topo.getNodeMap(2, test_face, 1) > cell_topo.getNodeMap(2, test_face, 2);
for (int test_ort=0;test_ort<6;++test_ort) {
*outStream << "\n" \
<< "===============================================================================\n" \
<< " Order = " << test_order << " , Face = " << test_face << " , Orientation = " << test_ort << "\n" \
<< "===============================================================================\n";
// Step 1 : create reference and modified triangle points
// reference triangle points
FieldContainer<value_type> ref_face_pts(npts, ndim_face);
PointTools::getLattice<value_type>(ref_face_pts,
face_topo,
order, 1);
// modified triangle points
const int left_ort[] = { 0, 2, 1, 3, 5, 4 };
FieldContainer<value_type> ort_face_pts(npts, ndim_face);
OrientationTools<value_type>::mapToModifiedReference(ort_face_pts,
ref_face_pts,
face_topo,
(left_handed ? left_ort[test_ort] : test_ort));
// Step 2 : map face points to cell points appropriately
const int nface = cell_topo.getFaceCount();
// create orientation object
int orts[4] = {};
orts[test_face] = test_ort;
Orientation ort;
ort.setFaceOrientation(nface, orts);
// map triangle points and modified points to reference coordinates
FieldContainer<value_type> ref_cell_pts(npts, ndim_cell);
CellTools<value_type>::mapToReferenceSubcell(ref_cell_pts,
ref_face_pts,
ndim_face,
test_face,
cell_topo);
// Step 3 : evaluate modified basis functions with orientation for reference cell points
FieldContainer<double> ort_cell_vals(nbf_cell, npts);
{
// temporary cell workspace
FieldContainer<double> tmp_cell_vals(nbf_cell, npts);
cell_basis.getValues(tmp_cell_vals, ref_cell_pts, OPERATOR_VALUE);
OrientationTools<value_type>::getBasisFunctionsByTopology(ort_cell_vals,
tmp_cell_vals,
cell_basis);
for (int i=0;i<nbf_cell;++i)
for (int j=0;j<npts;++j)
tmp_cell_vals(i, j) = ort_cell_vals(i, j);
OrientationTools<value_type>::verbose = verbose;
OrientationTools<value_type>::reverse = true; // for point matching only
OrientationTools<value_type>::getModifiedBasisFunctions(ort_cell_vals,
tmp_cell_vals,
basis_set,
ort);
OrientationTools<value_type>::verbose = false;
}