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)
71 TEUCHOS_TEST_FOR_EXCEPTION(
basis == wda(workset).basis_names->end(),
73 "Could not find the basis named \"" 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(),
88 TEUCHOS_TEST_FOR_EXCEPTION(
basis == wda(workset).basis_names->end(),
90 "Could not find the basis named \"" 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(),
105 TEUCHOS_TEST_FOR_EXCEPTION(ir == 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
std::vector< std::string >::size_type getBasisIndex(std::string basis_name, 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, panzer::Workset &workset, WorksetDetailsAccessor &wda)
Returns the index in the workset bases for a particular PureBasis name.
void printWorkset(std::ostream &os, const panzer::Workset &workset, WorksetDetailsAccessor &wda)
Teuchos::RCP< const panzer::PureBasis > basis
Interpolates basis DOF values to IP DOF values.
std::vector< std::string >::size_type getIntegrationRuleIndex(int ir_degree, panzer::Workset &workset, WorksetDetailsAccessor &wda)