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