/************************************************************************* * 2022 Tóth János * * * * This program is free software; it is licensed under the terms of the * * GNU General Public License v2 or later. See file LICENSE for details. * *************************************************************************/ #pragma once #include "BoundaryParser.hpp" #include "FacesParser.hpp" #include "PointsParser.hpp" #include #include #include #include #include namespace yade { namespace ymport { namespace foamfile { class PolyMesh { public: PolyMesh(const std::string& baseDirPath, bool patchAsWall, bool emptyAsWall); const py::list& facetCoords() const { return m_facetCoords; } private: void buildFacets(bool patchAsWall, bool emptyAsWall); void error(const char* fmt, ...); std::string m_baseDirPath; std::unique_ptr m_pointsParser { nullptr }; std::unique_ptr m_facesParser { nullptr }; std::unique_ptr m_boundaryParser { nullptr }; std::vector m_points; std::vector m_faces; std::vector m_boundaries; py::list m_facetCoords; }; } // namespace foamfile } // namespace ymport } // namespace yade