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

Method CreateVariableNames

IO/Geometry/vtkMFIXReader.cxx:1543–1877  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

1541
1542//------------------------------------------------------------------------------
1543void vtkMFIXReader::CreateVariableNames()
1544{
1545 char fileName[VTK_MAXPATH];
1546 int cnt = 0;
1547 char uString[120];
1548 char vString[120];
1549 char wString[120];
1550 char svString[120];
1551 char tempString[120];
1552 char ropString[120];
1553 char temperatureString[120];
1554 char variableString[120];
1555
1556 for (int i = 0; i < this->NumberOfSPXFilesUsed; ++i)
1557 {
1558 for (int k = 0; k < (int)sizeof(fileName); k++)
1559 {
1560 fileName[k] = 0;
1561 }
1562 strncpy(fileName, this->FileName, sizeof(fileName) - 1);
1563 size_t fileNameLength = strlen(fileName);
1564 if (fileNameLength >= 4)
1565 {
1566 fileName[fileNameLength - 4] = '\0';
1567 }
1568
1569 if (i == 0)
1570 {
1571 strcat(fileName, ".SP1");
1572 }
1573 else if (i == 1)
1574 {
1575 strcat(fileName, ".SP2");
1576 }
1577 else if (i == 2)
1578 {
1579 strcat(fileName, ".SP3");
1580 }
1581 else if (i == 3)
1582 {
1583 strcat(fileName, ".SP4");
1584 }
1585 else if (i == 4)
1586 {
1587 strcat(fileName, ".SP5");
1588 }
1589 else if (i == 5)
1590 {
1591 strcat(fileName, ".SP6");
1592 }
1593 else if (i == 6)
1594 {
1595 strcat(fileName, ".SP7");
1596 }
1597 else if (i == 7)
1598 {
1599 strcat(fileName, ".SP8");
1600 }

Callers 1

RequestInformationMethod · 0.95

Calls 4

format_to_nFunction · 0.50
InsertValueMethod · 0.45
GetValueMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected