43 #ifndef PANZER_WORKSET_UTILITIES_HPP
44 #define PANZER_WORKSET_UTILITIES_HPP
48 #include "Teuchos_Assert.hpp"
56 std::vector<std::string>::size_type
59 std::vector<std::string>::iterator basis = wda(workset).basis_names->begin();
60 std::vector<std::string>::const_iterator last = wda(workset).basis_names->end();
62 while (basis != last) {
64 std::vector<std::string>::size_type index = std::distance(wda(workset).basis_names->begin(), basis);
65 if (wda(workset).bases[index]->basis_layout->getBasis()->name() == basis_name)
73 "Could not find the basis named \""
74 << basis_name <<
"\" in the workset!");
76 return std::distance(wda(workset).basis_names->begin(), basis);
79 std::vector<std::string>::size_type
82 std::vector<std::string>::iterator basis;
84 basis = std::find(wda(workset).basis_names->begin(),
85 wda(workset).basis_names->end(),
90 "Could not find the basis named \""
91 << basis_name <<
"\" in the workset!");
93 return std::distance(wda(workset).basis_names->begin(), basis);
96 std::vector<std::string>::size_type
99 std::vector<int>::iterator ir;
101 ir = std::find(wda(workset).ir_degrees->begin(),
102 wda(workset).ir_degrees->end(),
107 "Could not find the integration rule degree \""
108 << ir_degree <<
"\" in the workset!");
110 return std::distance(wda(workset).ir_degrees->begin(), ir);
116 <<
" block_id = \"" << wda(workset).block_id <<
"\""
117 <<
" num_cells = \"" << workset.
num_cells <<
"\"\n";
118 os <<
" cell_local_ids = [ ";
120 os << wda(workset).cell_local_ids[i] <<
" ";
122 os <<
" ir_degrees = [ ";
123 for(std::size_t i=0;i<wda(workset).ir_degrees->size();i++)
124 os << (*wda(workset).ir_degrees)[i] <<
" ";
126 os <<
" basis_names = [ ";
127 for(std::size_t i=0;i<wda(workset).basis_names->size();i++)
128 os << (*wda(workset).basis_names)[i] <<
" ";
203 std::vector<std::string>::size_type
208 std::vector<std::string>::size_type
213 std::vector<int>::size_type
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
std::vector< std::string >::size_type getIntegrationRuleIndex(int ir_degree, const panzer::Workset &workset, WorksetDetailsAccessor &wda)
void printWorkset(std::ostream &os, const panzer::Workset &workset, WorksetDetailsAccessor &wda)
std::vector< std::string >::size_type getBasisIndex(std::string basis_name, const panzer::Workset &workset, WorksetDetailsAccessor &wda)
Returns the index in the workset bases for a particular BasisIRLayout name.
std::vector< std::string >::size_type getPureBasisIndex(std::string basis_name, const panzer::Workset &workset, WorksetDetailsAccessor &wda)
Returns the index in the workset bases for a particular PureBasis name.