MCPcopy Create free account
hub / github.com/Kitware/VTK / StartIntegrationPoints

Method StartIntegrationPoints

IO/Exodus/vtkExodusIIReaderVariableCheck.cxx:392–435  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

390*/
391
392bool vtkExodusIIReaderIntPointCheck::StartIntegrationPoints(
393 std::string cellType, std::string iptName)
394{
395 struct
396 {
397 const char* RE;
398 int Rank;
399 } cellTypes[] = { { "[Qq][Uu][Aa][Dd]", 2 }, { "[Hh][Ee][Xx]", 3 }, { "[Tt][Ee][Tt]", 3 },
400 { "[Tt][Rr][Ii]", 2 }, { "[Ww][Ee][Dd][Gg][Ee]", 3 }, { "[Pp][Yy][Rr]", 3 } };
401 vtksys::RegularExpression ctrexp;
402 std::string::size_type expectedRank = static_cast<std::string::size_type>(-1);
403 for (unsigned int i = 0; i < sizeof(cellTypes) / sizeof(cellTypes[0]); ++i)
404 {
405 ctrexp.compile(cellTypes[i].RE);
406 if (ctrexp.find(cellType))
407 {
408 expectedRank = cellTypes[i].Rank;
409 break;
410 }
411 }
412 std::string::size_type rank = iptName.size();
413 if (expectedRank > 0 && rank != expectedRank)
414 {
415 this->Rank = 0;
416 return false;
417 }
418 this->Rank = rank;
419 this->IntPtMin.clear();
420 this->IntPtMax.clear();
421 for (std::string::size_type i = 0; i < rank; ++i)
422 {
423 int ival = iptName[i] - '0';
424 if (ival < 0 || ival > 9)
425 {
426 this->Rank = 0;
427 return false;
428 }
429 this->IntPtMin.push_back(ival);
430 this->IntPtMax.push_back(ival);
431 }
432 this->IntPtNames.clear(); // clear out any old values
433 this->IntPtNames.insert(iptName);
434 return true;
435}
436
437bool vtkExodusIIReaderIntPointCheck::AddIntegrationPoint(std::string iptName)
438{

Callers 1

StartInternalMethod · 0.95

Calls 6

compileMethod · 0.80
findMethod · 0.45
sizeMethod · 0.45
clearMethod · 0.45
push_backMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected