Skip to content

Commit

Permalink
add Gmsh mesh file parser
Browse files Browse the repository at this point in the history
In this commit added mesh file io for modmesh, it lets modmesh has
capabilty to read third-party mesh generator generated file and convert
the content to a data structure that allow modmesh can use it to do some
calculation.

Currently mesh io only support Gmsh format.
  • Loading branch information
j8xixo12 committed Jul 22, 2023
1 parent 9c32560 commit 82b1843
Show file tree
Hide file tree
Showing 14 changed files with 959 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cpp/modmesh/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ add_subdirectory(onedim)
add_subdirectory(python)
add_subdirectory(spacetime)
add_subdirectory(view)
add_subdirectory(io)

set(MODMESH_ROOT_HEADERS
${CMAKE_CURRENT_SOURCE_DIR}/modmesh.hpp
Expand Down Expand Up @@ -80,6 +81,7 @@ set(MODMESH_TERMINAL_FILES
${MODMESH_ONEDIM_FILES}
${MODMESH_SPACETIME_FILES}
${MODMESH_PYTHON_FILES}
${MODMESH_IO_FILES}
CACHE FILEPATH "" FORCE)

set(MODMESH_GRAPHIC_FILES
Expand Down
23 changes: 23 additions & 0 deletions cpp/modmesh/io/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@

cmake_minimum_required(VERSION 3.16)

set(MODMESH_IO_HEADERS
${CMAKE_CURRENT_SOURCE_DIR}/io.hpp
${CMAKE_CURRENT_SOURCE_DIR}/gmsh.hpp
CACHE FILEPATH "" FORCE)

set(MODMESH_IO_PYMODHEADERS
${CMAKE_CURRENT_SOURCE_DIR}/pymod/io_pymod.hpp
CACHE FILEPATH "" FORCE)

set(MODMESH_IO_PYMODSOURCES
${CMAKE_CURRENT_SOURCE_DIR}/pymod/io_pymod.cpp
${CMAKE_CURRENT_SOURCE_DIR}/pymod/wrap_Gmsh.cpp
CACHE FILEPATH "" FORCE)

set(MODMESH_IO_FILES
${MODMESH_IO_HEADERS}
${MODMESH_IO_PYMODHEADERS}
${MODMESH_IO_PYMODSOURCES}
CACHE FILEPATH "" FORCE)
# vim: set ff=unix fenc=utf8 nobomb et sw=4 ts=4 sts=4:
Loading

0 comments on commit 82b1843

Please sign in to comment.