59 const std::map<std::string,WorksetNeeds> & needs)
60 : wkstFactory_(factory), worksetSize_(-1)
70 : wkstFactory_(wc.wkstFactory_)
71 , worksetSize_(wc.worksetSize_)
94 std::map<std::string,WorksetNeeds>::const_iterator itr =
ebToNeeds_.find(eBlock);
97 "WorksetContainer::lookupNeeds no WorksetNeeds object is associated "
98 "with the element block \""+eBlock+
"\".");
107 WorksetMap::iterator itr =
worksets_.find(wd);
118 if(worksetVector!=Teuchos::null)
125 worksetVector = itr->second;
127 return worksetVector;
150 if(worksetMap!=Teuchos::null)
153 if(worksetMap!=Teuchos::null)
160 worksetMap = itr->second;
175 addBasis(
const std::string & type,
int order,
const std::string & rep_field)
185 needs.
bases.push_back(basis);
203 "global indexer is not set yet");
207 for(WorksetMap::iterator itr=
worksets_.begin();
209 std::string eBlock = itr->first.getElementBlock();
225 std::size_t hash = std::hash<WorksetDescriptor>()(wd);
226 for(std::size_t i=0;i<worksets.size();i++)
227 worksets[i].setIdentifier(hash+i);
233 std::size_t hash = std::hash<WorksetDescriptor>()(wd);
234 std::size_t offset = 0;
235 for(
auto itr : workset_map) {
237 workset_map[itr.first].setIdentifier(hash+offset);
257 fout <<
"Panzer Warning: No global indexer assigned to a workset container. "
258 <<
"Orientation of the basis for edge basis functions cannot be applied, "
259 <<
"if those basis functions are used, there will be problems!" << std::endl;
265 "intrepid2 orientation is not constructed");
274 if(needs.
bases.size()>0) {
278 for(std::size_t w=0;w<needs.
bases.size();w++) {
286 std::vector<Intrepid2::Orientation> ortsPerBlock;
289 for(std::size_t i=0;i<worksets.size();i++) {
291 if(worksets[i].num_cells<=0)
continue;
293 for(std::size_t j=0;j<worksets[i].numDetails();j++) {
296 ortsPerBlock.clear();
297 for (
int k=0;k<worksets[i].num_cells;++k) {
301 for(std::size_t basis_index=0;basis_index<details.
bases.size();basis_index++) {
305 if(layout->getBasis()->name()!=basis.
name())
310 if(layout->getBasis()->requiresOrientations()) {
312 details.
bases[basis_index]->applyOrientations(ortsPerBlock);
319 else if(needs.
getBases().size()>0) {
325 for(
const auto & bd : needs.
getBases()) {
328 std::vector<Intrepid2::Orientation> ortsPerBlock;
331 for(std::size_t i=0;i<worksets.size();i++) {
333 if(worksets[i].num_cells<=0)
continue;
335 for(std::size_t j=0;j<worksets[i].numDetails();j++) {
338 ortsPerBlock.clear();
369 fout <<
"Panzer Warning: No global indexer assigned to a workset container. "
370 <<
"Orientation of the basis for edge basis functions cannot be applied, "
371 <<
"if those basis functions are used, there will be problems!";
381 if(needs.
bases.size()>0) {
384 for(std::size_t i=0;i<needs.
bases.size();i++) {
391 std::vector<Intrepid2::Orientation> ortsPerBlock;
394 for(std::map<unsigned,Workset>::iterator itr=worksets.begin();
395 itr!=worksets.end();++itr) {
398 if(itr->second.num_cells<=0)
continue;
400 for(std::size_t j=0;j<itr->second.numDetails();j++) {
403 ortsPerBlock.clear();
404 for (
int k=0;k<itr->second.num_cells;++k) {
408 for(std::size_t basis_index=0;basis_index<details.
bases.size();basis_index++) {
412 if(layout->getBasis()->name()!=basis.
name())
417 if(layout->getBasis()->requiresOrientations()) {
419 details.
bases[basis_index]->applyOrientations(ortsPerBlock);
426 else if(needs.
getBases().size()>0) {
432 for(
const auto & bd : needs.
getBases()) {
435 std::vector<Intrepid2::Orientation> ortsPerBlock;
438 for(std::map<unsigned,Workset>::iterator itr=worksets.begin();
439 itr!=worksets.end();++itr) {
442 if(itr->second.num_cells<=0)
continue;
444 for(std::size_t j=0;j<itr->second.numDetails();j++) {
447 ortsPerBlock.clear();
448 for (
int k=0;k<itr->second.num_cells;++k) {
463 const std::vector<std::string> & elementBlockNames,
464 std::map<std::string,
Teuchos::RCP<std::vector<Workset> > > & volumeWksts)
466 for(std::size_t i=0;i<elementBlockNames.size();i++) {
468 volumeWksts[elementBlockNames[i]] = wc.
getWorksets(wd);
473 const std::vector<BC> & bcs,
476 for(std::size_t i=0;i<bcs.size();i++) {
479 if(wksts!=Teuchos::null)
480 sideWksts[bcs[i]] = wksts;