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

Method Model

IO/IOSS/vtkIOSSModel.cxx:1813–1845  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1811 }
1812
1813 void Model(Ioss::Region& region) const override
1814 {
1815 auto entity = this->GetEntity(region, this->Name);
1816
1817 std::vector<int32_t> elementSide;
1818 elementSide.reserve(this->Count * 2);
1819
1820 const bool removeGhosts = this->Writer->GetRemoveGhosts();
1821 for (auto& ds : this->DataSets)
1822 {
1823 if (ds->GetNumberOfCells() == 0)
1824 {
1825 continue;
1826 }
1827 auto elemSideArray = vtkIntArray::SafeDownCast(ds->GetCellData()->GetArray("element_side"));
1828 vtkUnsignedCharArray* ghost = ds->GetCellGhostArray();
1829 const auto elementSideRange = vtk::DataArrayTupleRange(elemSideArray);
1830 for (vtkIdType cc = 0; cc < elementSideRange.size(); ++cc)
1831 {
1832 const bool process = !removeGhosts || !ghost || ghost->GetValue(cc) == 0;
1833 if (process)
1834 {
1835 for (const auto& comp : elementSideRange[cc])
1836 {
1837 elementSide.push_back(comp);
1838 }
1839 }
1840 }
1841 }
1842
1843 assert(elementSide.size() == static_cast<size_t>(this->Count * 2));
1844 entity->put_field_data("element_side", elementSide);
1845 }
1846
1847 void Transient(Ioss::Region& region) const override
1848 {

Callers

nothing calls this directly

Calls 11

GetCellGhostArrayMethod · 0.80
put_field_dataMethod · 0.80
assertFunction · 0.50
GetEntityMethod · 0.45
reserveMethod · 0.45
GetNumberOfCellsMethod · 0.45
GetArrayMethod · 0.45
GetCellDataMethod · 0.45
sizeMethod · 0.45
GetValueMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected