| 900 | } |
| 901 | |
| 902 | bool vtkHyperTreeGridSource::IsLevelDescriptorConsistent(bool isRootLevel, unsigned int nRefined, |
| 903 | unsigned int nLeaves, unsigned int nTotal, unsigned int nNextLevel, |
| 904 | const std::ostringstream& descriptor) |
| 905 | { |
| 906 | // Check whether cursor is still at rool level |
| 907 | if (isRootLevel) |
| 908 | { |
| 909 | // Verify that total number of root cells is consistent with descriptor |
| 910 | if (nRefined + nLeaves != nTotal) |
| 911 | { |
| 912 | vtkErrorMacro(<< "String " << this->Descriptor << " describes " << nRefined + nLeaves |
| 913 | << " root cells != " << nTotal); |
| 914 | return false; |
| 915 | } |
| 916 | } // if (rootLevel) |
| 917 | else |
| 918 | { |
| 919 | // Verify that level descriptor cardinality matches expected value |
| 920 | if (descriptor.str().size() != nNextLevel) |
| 921 | { |
| 922 | vtkErrorMacro(<< "String level descriptor " << descriptor.str() << " has cardinality " |
| 923 | << descriptor.str().size() << " which is not expected value of " << nNextLevel); |
| 924 | return false; |
| 925 | } |
| 926 | } |
| 927 | |
| 928 | return true; |
| 929 | } |
| 930 | |
| 931 | //------------------------------------------------------------------------------ |
| 932 | void vtkHyperTreeGridSource::SubdivideFromStringDescriptor(vtkHyperTreeGrid* output, |
no test coverage detected