Loading MultiphaseFlow/main.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -221,8 +221,7 @@ void testHeatConduction1() { constexpr unsigned int ProblemDim = 3; MultiphaseFlow mpf; mpf.setupMeshData("Boiler.vtk"); mpf.setupMeshData("cube_3500_cells.vtk"); FlowData<ProblemDim> initGlobals; initGlobals.R_spec = 287; Loading Loading @@ -269,8 +268,9 @@ void testHeatConduction1() { } } DBGVAR_JSON(mpf.mesh.computeElementMeasures().getDataByDim<3>()); mpf.exportData(0.0, compData); return; double exportStep = 1e-1; for (double t = 0; t < /*300 * */exportStep; t += exportStep){ Loading MultiphaseFlow/multiphaseflow.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -381,7 +381,7 @@ void MultiphaseFlow::setupMeshData(const std::string& fileName){ Type MultiphaseFlow::TypeOfCell(const MeshType::Cell &cell) { if (cell.getIndex() >= BOUNDARY_INDEX(size_t)){ /* if (cell.getCenter()[1] <= 1e-5) { return Type::INFLOW; } Loading @@ -393,7 +393,7 @@ Type MultiphaseFlow::TypeOfCell(const MeshType::Cell &cell) { ) { return Type::OUTFLOW; } */ return Type::WALL; } else { Loading MultiphaseFlow/multiphaseflow.h +2 −2 Original line number Diff line number Diff line Loading @@ -302,7 +302,7 @@ struct CellData{ Vector<Dim, Vector<Dim, double>> grad_u_s; }; MAKE_ATTRIBUTE_TRAIT(CellData<3>, invVolume); Loading Loading @@ -518,7 +518,7 @@ public: std::ofstream ofile(std::string("MultiphaseFlow") + "_" + std::to_string(time) + ".vtk"); writer.writeHeader(ofile, std::string("MPF") + std::to_string(time)); auto polyType = typename std::conditional<ProblemDimension == 2, MeshNativeType<2>::ElementType, MeshNativeType<3>::ElementType>::type(ProblemDimension == 2 ? MeshNativeType<2>::POLYGON : MeshNativeType<3>::POLYHEDRON); auto polyType = typename std::conditional<ProblemDimension == 2, MeshNativeType<2>::ElementType, MeshNativeType<3>::ElementType>::type(ProblemDimension == 2 ? MeshNativeType<2>::POLYGON : MeshNativeType<3>::HEXAHEDRON); writer.writeToStream(ofile, mesh, MeshDataContainer<MeshNativeType<ProblemDimension>::ElementType, ProblemDimension>(mesh, polyType)); VTKMeshDataWriter<ProblemDimension> dataWriter; Loading src/UnstructuredMesh/MeshDataContainer/MeshDataIO/VTKMeshDataWriter.h +2 −2 Original line number Diff line number Diff line Loading @@ -54,7 +54,7 @@ class VTKMeshDataWriter { ost << DefaultIOTraits<T>::getTraits().template getValue<Index>(data.at(realIndex))[j] << ' '; } } while (realIndex < data.size() - 1) { while (realIndex < data.size()) { for (unsigned int j = 0; j < DefaultIOTraits<T>::getTraits().template getValue<Index>(data.at(0)).size(); j++) { ost << DefaultIOTraits<T>::getTraits().template getValue<Index>(data.at(realIndex))[j] << ' '; } Loading Loading @@ -85,7 +85,7 @@ class VTKMeshDataWriter { localIndex++; ost << DefaultIOTraits<T>::getTraits().template getValue<Index>(data.at(realIndex)) << ' '; } while (realIndex < data.size() - 1) { while (realIndex < data.size()) { ost << DefaultIOTraits<T>::getTraits().template getValue<Index>(data.at(realIndex)) << ' '; realIndex++; } Loading Loading
MultiphaseFlow/main.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -221,8 +221,7 @@ void testHeatConduction1() { constexpr unsigned int ProblemDim = 3; MultiphaseFlow mpf; mpf.setupMeshData("Boiler.vtk"); mpf.setupMeshData("cube_3500_cells.vtk"); FlowData<ProblemDim> initGlobals; initGlobals.R_spec = 287; Loading Loading @@ -269,8 +268,9 @@ void testHeatConduction1() { } } DBGVAR_JSON(mpf.mesh.computeElementMeasures().getDataByDim<3>()); mpf.exportData(0.0, compData); return; double exportStep = 1e-1; for (double t = 0; t < /*300 * */exportStep; t += exportStep){ Loading
MultiphaseFlow/multiphaseflow.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -381,7 +381,7 @@ void MultiphaseFlow::setupMeshData(const std::string& fileName){ Type MultiphaseFlow::TypeOfCell(const MeshType::Cell &cell) { if (cell.getIndex() >= BOUNDARY_INDEX(size_t)){ /* if (cell.getCenter()[1] <= 1e-5) { return Type::INFLOW; } Loading @@ -393,7 +393,7 @@ Type MultiphaseFlow::TypeOfCell(const MeshType::Cell &cell) { ) { return Type::OUTFLOW; } */ return Type::WALL; } else { Loading
MultiphaseFlow/multiphaseflow.h +2 −2 Original line number Diff line number Diff line Loading @@ -302,7 +302,7 @@ struct CellData{ Vector<Dim, Vector<Dim, double>> grad_u_s; }; MAKE_ATTRIBUTE_TRAIT(CellData<3>, invVolume); Loading Loading @@ -518,7 +518,7 @@ public: std::ofstream ofile(std::string("MultiphaseFlow") + "_" + std::to_string(time) + ".vtk"); writer.writeHeader(ofile, std::string("MPF") + std::to_string(time)); auto polyType = typename std::conditional<ProblemDimension == 2, MeshNativeType<2>::ElementType, MeshNativeType<3>::ElementType>::type(ProblemDimension == 2 ? MeshNativeType<2>::POLYGON : MeshNativeType<3>::POLYHEDRON); auto polyType = typename std::conditional<ProblemDimension == 2, MeshNativeType<2>::ElementType, MeshNativeType<3>::ElementType>::type(ProblemDimension == 2 ? MeshNativeType<2>::POLYGON : MeshNativeType<3>::HEXAHEDRON); writer.writeToStream(ofile, mesh, MeshDataContainer<MeshNativeType<ProblemDimension>::ElementType, ProblemDimension>(mesh, polyType)); VTKMeshDataWriter<ProblemDimension> dataWriter; Loading
src/UnstructuredMesh/MeshDataContainer/MeshDataIO/VTKMeshDataWriter.h +2 −2 Original line number Diff line number Diff line Loading @@ -54,7 +54,7 @@ class VTKMeshDataWriter { ost << DefaultIOTraits<T>::getTraits().template getValue<Index>(data.at(realIndex))[j] << ' '; } } while (realIndex < data.size() - 1) { while (realIndex < data.size()) { for (unsigned int j = 0; j < DefaultIOTraits<T>::getTraits().template getValue<Index>(data.at(0)).size(); j++) { ost << DefaultIOTraits<T>::getTraits().template getValue<Index>(data.at(realIndex))[j] << ' '; } Loading Loading @@ -85,7 +85,7 @@ class VTKMeshDataWriter { localIndex++; ost << DefaultIOTraits<T>::getTraits().template getValue<Index>(data.at(realIndex)) << ' '; } while (realIndex < data.size() - 1) { while (realIndex < data.size()) { ost << DefaultIOTraits<T>::getTraits().template getValue<Index>(data.at(realIndex)) << ' '; realIndex++; } Loading