Loading Unstructured_mesh/UnstructuredMesh/MeshDataContainer/MeshDataIO/VTKMeshDataReader.h +1 −0 Original line number Diff line number Diff line Loading @@ -33,6 +33,7 @@ class VTKMeshDataReader { for (unsigned int j = 0; j < Traits<T>::ttype::template getValue<Index>(data.at(i)).size(); j++){ ist >> value[j]; } DBGVAR(value); Traits<T>::ttype::template setValue<Index>(data.at(i), value); } Loading Unstructured_mesh/UnstructuredMesh/MeshDataContainer/MeshDataIO/VTKMeshDataWriter.h +29 −23 Original line number Diff line number Diff line Loading @@ -35,20 +35,26 @@ class VTKMeshDataWriter { IndexType realIndex = 0; for (IndexType i = 0; i < writer.getNumberOfCells(); i++) { auto iterator = writer.backwardCellIndexMapping.find(i); if (iterator == writer.backwardCellIndexMapping.end()){ IndexType localIndex = 0; for(const std::pair<IndexType, IndexType>& key : writer.backwardCellIndexMapping) { while (localIndex < key.first) { for (unsigned int j = 0; j < Traits<T>::ttype::template getReference<Index>()->getValue(data.at(0)).size(); j++) { ost << Traits<T>::ttype::template getValue<Index>(data.at(realIndex))[j] << ' '; } realIndex++; } else { realIndex = iterator->second; localIndex++; } realIndex = key.second; localIndex++; for (unsigned int j = 0; j < Traits<T>::ttype::template getReference<Index>()->getValue(data.at(0)).size(); j++) { ost << Traits<T>::ttype::template getValue<Index>(data.at(realIndex))[j] << ' '; } } while (realIndex < data.size() - 1) { for (unsigned int j = 0; j < Traits<T>::ttype::template getReference<Index>()->getValue(data.at(0)).size(); j++) { ost << Traits<T>::ttype::template getValue<Index>(data.at(realIndex))[j] << ' '; } realIndex++; } } Loading @@ -64,20 +70,20 @@ class VTKMeshDataWriter { ost << "SCALARS " << Traits<T>::ttype::template getName<Index>() << " double 1\nLOOKUP_TABLE default\n"; IndexType realIndex = 0; for (IndexType i = 0; i < writer.getNumberOfCells(); i++) { auto iterator = writer.backwardCellIndexMapping.find(i); if (iterator == writer.backwardCellIndexMapping.end()){ IndexType localIndex = 0; for(const std::pair<IndexType, IndexType>& key : writer.backwardCellIndexMapping) { while (localIndex < key.first) { ost << Traits<T>::ttype::template getValue<Index>(data.at(realIndex)) << ' '; realIndex++; } else { realIndex = iterator->second; localIndex++; } realIndex = key.second; localIndex++; ost << Traits<T>::ttype::template getValue<Index>(data.at(realIndex)) << ' '; } while (realIndex < data.size() - 1) { ost << Traits<T>::ttype::template getValue<Index>(data.at(realIndex)) << ' '; realIndex++; } } Loading Loading
Unstructured_mesh/UnstructuredMesh/MeshDataContainer/MeshDataIO/VTKMeshDataReader.h +1 −0 Original line number Diff line number Diff line Loading @@ -33,6 +33,7 @@ class VTKMeshDataReader { for (unsigned int j = 0; j < Traits<T>::ttype::template getValue<Index>(data.at(i)).size(); j++){ ist >> value[j]; } DBGVAR(value); Traits<T>::ttype::template setValue<Index>(data.at(i), value); } Loading
Unstructured_mesh/UnstructuredMesh/MeshDataContainer/MeshDataIO/VTKMeshDataWriter.h +29 −23 Original line number Diff line number Diff line Loading @@ -35,20 +35,26 @@ class VTKMeshDataWriter { IndexType realIndex = 0; for (IndexType i = 0; i < writer.getNumberOfCells(); i++) { auto iterator = writer.backwardCellIndexMapping.find(i); if (iterator == writer.backwardCellIndexMapping.end()){ IndexType localIndex = 0; for(const std::pair<IndexType, IndexType>& key : writer.backwardCellIndexMapping) { while (localIndex < key.first) { for (unsigned int j = 0; j < Traits<T>::ttype::template getReference<Index>()->getValue(data.at(0)).size(); j++) { ost << Traits<T>::ttype::template getValue<Index>(data.at(realIndex))[j] << ' '; } realIndex++; } else { realIndex = iterator->second; localIndex++; } realIndex = key.second; localIndex++; for (unsigned int j = 0; j < Traits<T>::ttype::template getReference<Index>()->getValue(data.at(0)).size(); j++) { ost << Traits<T>::ttype::template getValue<Index>(data.at(realIndex))[j] << ' '; } } while (realIndex < data.size() - 1) { for (unsigned int j = 0; j < Traits<T>::ttype::template getReference<Index>()->getValue(data.at(0)).size(); j++) { ost << Traits<T>::ttype::template getValue<Index>(data.at(realIndex))[j] << ' '; } realIndex++; } } Loading @@ -64,20 +70,20 @@ class VTKMeshDataWriter { ost << "SCALARS " << Traits<T>::ttype::template getName<Index>() << " double 1\nLOOKUP_TABLE default\n"; IndexType realIndex = 0; for (IndexType i = 0; i < writer.getNumberOfCells(); i++) { auto iterator = writer.backwardCellIndexMapping.find(i); if (iterator == writer.backwardCellIndexMapping.end()){ IndexType localIndex = 0; for(const std::pair<IndexType, IndexType>& key : writer.backwardCellIndexMapping) { while (localIndex < key.first) { ost << Traits<T>::ttype::template getValue<Index>(data.at(realIndex)) << ' '; realIndex++; } else { realIndex = iterator->second; localIndex++; } realIndex = key.second; localIndex++; ost << Traits<T>::ttype::template getValue<Index>(data.at(realIndex)) << ' '; } while (realIndex < data.size() - 1) { ost << Traits<T>::ttype::template getValue<Index>(data.at(realIndex)) << ' '; realIndex++; } } Loading