16 #ifndef __INTREPID2_CELLTOOLS_DEBUG_DEF_HPP__
17 #define __INTREPID2_CELLTOOLS_DEBUG_DEF_HPP__
20 #if defined (__clang__) && !defined (__INTEL_COMPILER)
21 #pragma clang system_header
33 template<
class Scalar>
34 void CellTools<Scalar>::printSubcellVertices(
const ordinal_type subcellDim,
35 const ordinal_type subcellOrd,
36 const shards::CellTopology & parentCell){
39 ordinal_type subcVertexCount = parentCell.getVertexCount(subcellDim, subcellOrd);
40 ordinal_type cellDim = parentCell.getDimension();
43 FieldContainer<double> subcellVertices(subcVertexCount, cellDim);
46 getReferenceSubcellVertices(subcellVertices,
53 <<
" Subcell " << std::setw(2) << subcellOrd
54 <<
" is " << parentCell.getName(subcellDim, subcellOrd) <<
" with vertices = {";
57 for(ordinal_type subcVertOrd = 0; subcVertOrd < subcVertexCount; subcVertOrd++){
61 for(ordinal_type dim = 0; dim < (ordinal_type)parentCell.getDimension(); dim++){
62 std::cout << subcellVertices(subcVertOrd, dim);
63 if(dim < (ordinal_type)parentCell.getDimension()-1 ) { std::cout <<
","; }
66 if(subcVertOrd < subcVertexCount - 1) { std::cout <<
", "; }
72 template<
class Scalar>
73 template<
class ArrayCell>
74 void CellTools<Scalar>::printWorksetSubcell(
const ArrayCell & cellWorkset,
75 const shards::CellTopology & parentCell,
76 const ordinal_type& pCellOrd,
77 const ordinal_type& subcellDim,
78 const ordinal_type& subcellOrd,
79 const ordinal_type& fieldWidth){
82 ordinal_type subcNodeCount = parentCell.getNodeCount(subcellDim, subcellOrd);
83 ordinal_type pCellDim = parentCell.getDimension();
84 std::vector<ordinal_type> subcNodeOrdinals(subcNodeCount);
86 for(ordinal_type i = 0; i < subcNodeCount; i++){
87 subcNodeOrdinals[i] = parentCell.getNodeMap(subcellDim, subcellOrd, i);
93 <<
" Subcell " << subcellOrd <<
" on parent cell " << pCellOrd <<
" is "
94 << parentCell.getName(subcellDim, subcellOrd) <<
" with node(s) \n ({";
96 for(ordinal_type i = 0; i < subcNodeCount; i++){
99 for(ordinal_type dim = 0; dim < pCellDim; dim++){
101 << std::setw(fieldWidth) << std::right << cellWorkset(pCellOrd, subcNodeOrdinals[i], dim);
102 if(dim < pCellDim - 1){ std::cout <<
","; }
105 if(i < subcNodeCount - 1){ std::cout <<
", {"; }
107 std::cout <<
")\n\n";