Loading src/GTMesh/UnstructuredMesh/MeshElements/MeshElement.h +1 −1 Changes for src/GTMesh/UnstructuredMesh/MeshElements/MeshElement.h: 1 added line, 1 removed line. Original line number Original line Diff line number Diff line Loading @@ -70,7 +70,7 @@ public: return numberOfElements; return numberOfElements; } } unsigned int reserve() const { constexpr unsigned int reserve() const { return Reserve; return Reserve; } } Loading src/GTMesh/UnstructuredMesh/MeshFunctions/MeshColoring.h +1 −1 Changes for src/GTMesh/UnstructuredMesh/MeshFunctions/MeshColoring.h: 1 added line, 1 removed line. Original line number Original line Diff line number Diff line Loading @@ -167,7 +167,7 @@ struct _MeshColoring <ColoredDim, ConnectingDim, METHOD_RANDOM, Descend> { // if the random index of new color is equal to // if the random index of new color is equal to // the number of possible colors, // the number of possible colors, // then the color of the element remains the same // then the color of the element remains the same if (rnd == nPossibleColors) break; if (rnd == nPossibleColors) continue; while (rnd != 0 || !freeColors[selectedColor]) { while (rnd != 0 || !freeColors[selectedColor]) { if(freeColors[selectedColor]){ if(freeColors[selectedColor]){ Loading src/GTMesh/UnstructuredMesh/UnstructuredMesh.h +6 −6 Changes for src/GTMesh/UnstructuredMesh/UnstructuredMesh.h: 6 added lines, 6 removed lines. Original line number Original line Diff line number Diff line Loading @@ -64,7 +64,7 @@ public: * 3D by averaging using the measures of partial triangles. * 3D by averaging using the measures of partial triangles. */ */ template<ComputationMethod Method = ComputationMethod::METHOD_DEFAULT> template<ComputationMethod Method = ComputationMethod::METHOD_DEFAULT> void computeElementCenters(){ auto computeElementCenters(){ return computeCenters<Method>(*this); return computeCenters<Method>(*this); } } Loading Loading @@ -415,7 +415,7 @@ public: * @param writer instance of MeshWriter (e.g. VTKMeshWriter). * @param writer instance of MeshWriter (e.g. VTKMeshWriter). */ */ template<typename...T, unsigned int MeshDim = MeshDimension, typename std::enable_if<MeshDim == 2, bool>::type = true> template<typename...T, unsigned int MeshDim = MeshDimension, typename std::enable_if<MeshDim == 2, bool>::type = true> std::unique_ptr<MeshReader<MeshDimension>> std::unique_ptr<MeshWriter<MeshDimension>> write(const std::string& filePath, write(const std::string& filePath, const MeshDataContainer<typename MeshWriter<MeshDimension>::elementType::ElementType, MeshDim>& cellTypes, const MeshDataContainer<typename MeshWriter<MeshDimension>::elementType::ElementType, MeshDim>& cellTypes, const std::string& dataHeader = ""){ const std::string& dataHeader = ""){ Loading @@ -423,7 +423,7 @@ public: typedef std::unique_ptr<MeshWriter<MeshDimension>> retType; typedef std::unique_ptr<MeshWriter<MeshDimension>> retType; retType writer_ptr; retType writer_ptr; if (filePath.find(".vtk") != filePath.npos){ if (checkExtension(filePath, ".vtk")){ DBGMSG("file recognized as VTK"); DBGMSG("file recognized as VTK"); writer_ptr = std::make_unique<VTKMeshWriter<MeshDimension>>(); writer_ptr = std::make_unique<VTKMeshWriter<MeshDimension>>(); write(filePath, writer_ptr, cellTypes, dataHeader); write(filePath, writer_ptr, cellTypes, dataHeader); Loading Loading @@ -453,9 +453,6 @@ public: if (typeid (*writer.get()) == typeid (VTKMeshWriter<MeshDimension>)){ if (typeid (*writer.get()) == typeid (VTKMeshWriter<MeshDimension>)){ if (checkExtension(filePath, ".vtk")){ if (checkExtension(filePath, ".vtk")){ DBGMSG("The writer type and file name does not match!"); writer = write(filePath, cellTypes, dataHeader); } else { DBGMSG("writer recognized as VTK"); DBGMSG("writer recognized as VTK"); auto writer_loc = dynamic_cast<VTKMeshWriter<MeshDimension>*>(writer.get()); auto writer_loc = dynamic_cast<VTKMeshWriter<MeshDimension>*>(writer.get()); writer_loc->writeHeader(file, dataHeader); writer_loc->writeHeader(file, dataHeader); Loading @@ -465,6 +462,9 @@ public: } else { } else { writer_loc->writeToStream(file, *this, cellTypes); writer_loc->writeToStream(file, *this, cellTypes); } } } else { DBGMSG("The writer type and file name does not match!"); writer = write(filePath, cellTypes, dataHeader); } } } } Loading Loading
src/GTMesh/UnstructuredMesh/MeshElements/MeshElement.h +1 −1 Changes for src/GTMesh/UnstructuredMesh/MeshElements/MeshElement.h: 1 added line, 1 removed line. Original line number Original line Diff line number Diff line Loading @@ -70,7 +70,7 @@ public: return numberOfElements; return numberOfElements; } } unsigned int reserve() const { constexpr unsigned int reserve() const { return Reserve; return Reserve; } } Loading
src/GTMesh/UnstructuredMesh/MeshFunctions/MeshColoring.h +1 −1 Changes for src/GTMesh/UnstructuredMesh/MeshFunctions/MeshColoring.h: 1 added line, 1 removed line. Original line number Original line Diff line number Diff line Loading @@ -167,7 +167,7 @@ struct _MeshColoring <ColoredDim, ConnectingDim, METHOD_RANDOM, Descend> { // if the random index of new color is equal to // if the random index of new color is equal to // the number of possible colors, // the number of possible colors, // then the color of the element remains the same // then the color of the element remains the same if (rnd == nPossibleColors) break; if (rnd == nPossibleColors) continue; while (rnd != 0 || !freeColors[selectedColor]) { while (rnd != 0 || !freeColors[selectedColor]) { if(freeColors[selectedColor]){ if(freeColors[selectedColor]){ Loading
src/GTMesh/UnstructuredMesh/UnstructuredMesh.h +6 −6 Changes for src/GTMesh/UnstructuredMesh/UnstructuredMesh.h: 6 added lines, 6 removed lines. Original line number Original line Diff line number Diff line Loading @@ -64,7 +64,7 @@ public: * 3D by averaging using the measures of partial triangles. * 3D by averaging using the measures of partial triangles. */ */ template<ComputationMethod Method = ComputationMethod::METHOD_DEFAULT> template<ComputationMethod Method = ComputationMethod::METHOD_DEFAULT> void computeElementCenters(){ auto computeElementCenters(){ return computeCenters<Method>(*this); return computeCenters<Method>(*this); } } Loading Loading @@ -415,7 +415,7 @@ public: * @param writer instance of MeshWriter (e.g. VTKMeshWriter). * @param writer instance of MeshWriter (e.g. VTKMeshWriter). */ */ template<typename...T, unsigned int MeshDim = MeshDimension, typename std::enable_if<MeshDim == 2, bool>::type = true> template<typename...T, unsigned int MeshDim = MeshDimension, typename std::enable_if<MeshDim == 2, bool>::type = true> std::unique_ptr<MeshReader<MeshDimension>> std::unique_ptr<MeshWriter<MeshDimension>> write(const std::string& filePath, write(const std::string& filePath, const MeshDataContainer<typename MeshWriter<MeshDimension>::elementType::ElementType, MeshDim>& cellTypes, const MeshDataContainer<typename MeshWriter<MeshDimension>::elementType::ElementType, MeshDim>& cellTypes, const std::string& dataHeader = ""){ const std::string& dataHeader = ""){ Loading @@ -423,7 +423,7 @@ public: typedef std::unique_ptr<MeshWriter<MeshDimension>> retType; typedef std::unique_ptr<MeshWriter<MeshDimension>> retType; retType writer_ptr; retType writer_ptr; if (filePath.find(".vtk") != filePath.npos){ if (checkExtension(filePath, ".vtk")){ DBGMSG("file recognized as VTK"); DBGMSG("file recognized as VTK"); writer_ptr = std::make_unique<VTKMeshWriter<MeshDimension>>(); writer_ptr = std::make_unique<VTKMeshWriter<MeshDimension>>(); write(filePath, writer_ptr, cellTypes, dataHeader); write(filePath, writer_ptr, cellTypes, dataHeader); Loading Loading @@ -453,9 +453,6 @@ public: if (typeid (*writer.get()) == typeid (VTKMeshWriter<MeshDimension>)){ if (typeid (*writer.get()) == typeid (VTKMeshWriter<MeshDimension>)){ if (checkExtension(filePath, ".vtk")){ if (checkExtension(filePath, ".vtk")){ DBGMSG("The writer type and file name does not match!"); writer = write(filePath, cellTypes, dataHeader); } else { DBGMSG("writer recognized as VTK"); DBGMSG("writer recognized as VTK"); auto writer_loc = dynamic_cast<VTKMeshWriter<MeshDimension>*>(writer.get()); auto writer_loc = dynamic_cast<VTKMeshWriter<MeshDimension>*>(writer.get()); writer_loc->writeHeader(file, dataHeader); writer_loc->writeHeader(file, dataHeader); Loading @@ -465,6 +462,9 @@ public: } else { } else { writer_loc->writeToStream(file, *this, cellTypes); writer_loc->writeToStream(file, *this, cellTypes); } } } else { DBGMSG("The writer type and file name does not match!"); writer = write(filePath, cellTypes, dataHeader); } } } } Loading