11 #ifndef PANZER_WORKSET_UTILITIES_HPP
12 #define PANZER_WORKSET_UTILITIES_HPP
16 #include "Teuchos_Assert.hpp"
24 std::vector<std::string>::size_type
27 std::vector<std::string>::iterator basis = wda(workset).basis_names->begin();
28 std::vector<std::string>::const_iterator last = wda(workset).basis_names->end();
30 while (basis != last) {
32 std::vector<std::string>::size_type index = std::distance(wda(workset).basis_names->begin(), basis);
33 if (wda(workset).bases[index]->basis_layout->getBasis()->name() == basis_name)
41 "Could not find the basis named \""
42 << basis_name <<
"\" in the workset!");
44 return std::distance(wda(workset).basis_names->begin(), basis);
47 std::vector<std::string>::size_type
50 std::vector<std::string>::iterator basis;
52 basis = std::find(wda(workset).basis_names->begin(),
53 wda(workset).basis_names->end(),
58 "Could not find the basis named \""
59 << basis_name <<
"\" in the workset!");
61 return std::distance(wda(workset).basis_names->begin(), basis);
64 std::vector<int>::size_type
67 std::vector<int>::iterator ir;
69 ir = std::find(wda(workset).ir_degrees->begin(),
70 wda(workset).ir_degrees->end(),
75 "Could not find the integration rule degree \""
76 << ir_degree <<
"\" in the workset!");
78 return std::distance(wda(workset).ir_degrees->begin(), ir);
84 <<
" block_id = \"" << wda(workset).block_id <<
"\""
85 <<
" num_cells = \"" << workset.
num_cells <<
"\"\n";
86 os <<
" cell_local_ids = [ ";
88 os << wda(workset).cell_local_ids[i] <<
" ";
90 os <<
" ir_degrees = [ ";
91 for(std::size_t i=0;i<wda(workset).ir_degrees->size();i++)
92 os << (*wda(workset).ir_degrees)[i] <<
" ";
94 os <<
" basis_names = [ ";
95 for(std::size_t i=0;i<wda(workset).basis_names->size();i++)
96 os << (*wda(workset).basis_names)[i] <<
" ";
171 std::vector<std::string>::size_type
176 std::vector<std::string>::size_type
181 std::vector<int>::size_type
int num_cells
DEPRECATED - use: numCells()
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
std::vector< int >::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.