Skip to content

Commit

Permalink
Merge pull request #376 from LIHPC-Computational-Geometry/quadfront_n…
Browse files Browse the repository at this point in the history
…ew_component

added a new quadfront component. Optional components are now OFF by d…
  • Loading branch information
nicolaslg committed Apr 1, 2024
2 parents 745114e + 08403b4 commit 665fc85
Show file tree
Hide file tree
Showing 12 changed files with 314 additions and 75 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/continuous-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,24 @@ jobs:
-DWITH_CGNS:BOOL=OFF
-DWITH_CODE_COVERAGE:BOOL=OFF
-DWITH_PYTHON_API:BOOL=ON
-DENABLE_BLOCK_MESHER:BOOL=ON
-DENABLE_BLOCKING:BOOL=ON
-DENABLE_CLAIRE:BOOL=ON
-DENABLE_DUAL_BLOCKING:BOOL=OFF
-DENABLE_ELG3D:BOOL=OFF
-DENABLE_ELGMORPHING:BOOL=OFF
-DENABLE_FRAME:BOOL=ON
-DENABLE_FRAME_3D:BOOL=ON
-DENABLE_GEOD_HONEY_COMB:BOOL=ON
-DENABLE_HYBRIDMESHADAPT:BOOL=ON
-DENABLE_KMDS:BOOL=OFF
-DENABLE_MEDUSA:BOOL=OFF
-DENABLE_MORPHMESH:BOOL=ON
-DENABLE_PADDINGs:BOOL=ON
-DENABLE_POLYBLOCK:BOOL=ON
-DENABLE_QUADFRONT:BOOL=OFF
-DENABLE_RLBLOCKING:BOOL=OFF
-DENABLE_SINGGRAPHBUILD:BOOL=ON
-DCMAKE_PREFIX_PATH="$lcov_ROOT;$glpk_ROOT;$googletest_ROOT;$pybind11_ROOT;$cgal_ROOT;$gmp_ROOT;$mpfr_ROOT;$boost_ROOT;$eigen_ROOT"
-DCMAKE_INSTALL_PREFIX=${{github.workspace}}/
Expand Down
18 changes: 17 additions & 1 deletion .github/workflows/continuous-ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,27 @@ jobs:
spack load py-pytest;
cmake /__w/gmds/gmds -DCMAKE_BUILD_TYPE=${{ matrix.config }}
-DWITH_CODE_COVERAGE:BOOL=ON
-DWITH_TEST:BOOL=ON
-DWITH_CGNS:BOOL=OFF
-DWITH_PYTHON_API:BOOL=ON
-DWITH_TEST:BOOL=ON
-DENABLE_BLOCK_MESHER:BOOL=ON
-DENABLE_BLOCKING:BOOL=ON
-DENABLE_CLAIRE:BOOL=ON
-DENABLE_DUAL_BLOCKING:BOOL=OFF
-DENABLE_ELG3D:BOOL=OFF
-DENABLE_ELGMORPHING:BOOL=OFF
-DENABLE_FRAME:BOOL=ON
-DENABLE_FRAME_3D:BOOL=ON
-DENABLE_GEOD_HONEY_COMB:BOOL=ON
-DENABLE_HYBRIDMESHADAPT:BOOL=ON
-DENABLE_KMDS:BOOL=ON
-DENABLE_MEDUSA:BOOL=OFF
-DENABLE_MORPHMESH:BOOL=ON
-DENABLE_PADDINGs:BOOL=ON
-DENABLE_POLYBLOCK:BOOL=ON
-DENABLE_QUADFRONT:BOOL=OFF
-DENABLE_RLBLOCKING:BOOL=OFF
-DENABLE_SINGGRAPHBUILD:BOOL=ON
-DCMAKE_PREFIX_PATH="/spack/opt/spack/lcov;/spack/opt/spack/glpk;/spack/opt/spack/eigen;/spack/opt/spack/googletest;/spack/opt/spack/py-pybind11;/spack/opt/spack/kokkos;/spack/opt/spack/cgal;/spack/opt/spack/gmp;/spack/opt/spack/mpfr;/spack/opt/spack/boost;/spack/opt/spack/cgns"
-DCMAKE_INSTALL_PREFIX= ${GITHUB_WORKSPACE}/install
Expand Down
14 changes: 13 additions & 1 deletion .github/workflows/continuous-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,24 @@ jobs:
-DVCPKG_TARGET_TRIPLET=x64-windows
-DWITH_TEST:BOOL=ON
-DWITH_PYTHON_API:BOOL=OFF
-DENABLE_BLOCK_MESHER:BOOL=OFF
-DENABLE_BLOCKING:BOOL=OFF
-DENABLE_CLAIRE:BOOL=OFF
-DENABLE_DUAL_BLOCKING:BOOL=OFF
-DENABLE_ELG3D:BOOL=OFF
-DENABLE_ELGMORPHING:BOOL=OFF
-DENABLE_FRAME:BOOL=ON
-DENABLE_FRAME_3D:BOOL=ON
-DENABLE_GEOD_HONEY_COMB:BOOL=OFF
-DENABLE_HYBRIDMESHADAPT:BOOL=OFF
-DENABLE_PADDING:BOOL=OFF
-DENABLE_KMDS:BOOL=OFF
-DENABLE_MEDUSA:BOOL=OFF
-DENABLE_MORPHMESH:BOOL=OFF
-DENABLE_PADDINGs:BOOL=OFF
-DENABLE_POLYBLOCK:BOOL=OFF
-DENABLE_QUADFRONT:BOOL=OFF
-DENABLE_RLBLOCKING:BOOL=OFF
-DENABLE_SINGGRAPHBUILD:BOOL=ON
-DBUILD_SHARED_LIBS:BOOL=ON
-DCMAKE_TOOLCHAIN_FILE="C:/vcpkg/scripts/buildsystems/vcpkg.cmake"
Expand Down
134 changes: 71 additions & 63 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -136,12 +136,21 @@ add_subdirectory(external/HLBFGS)
# OPTIONAL COMPONENTS
#==============================================================================

GMDS_ADD_COMPONENT(
BLOCK_MESHER # cmake variable
blockMesher # src subdirectory name
GMDSBlockMesher # name of the generated library
"Provide the mesh of a block structure classified on a CAD geometry" # description
OFF # is activated
ON # must be covered
)

GMDS_ADD_COMPONENT(
BLOCKING # cmake variable
blocking # src subdirectory name
GMDSBlocking # name of the generated library
"This module provides a data structure for a blocking representation" # description
ON # is activated
OFF # is activated
ON # must be covered
)

Expand All @@ -150,25 +159,43 @@ GMDS_ADD_COMPONENT(
claire # src subdirectory name
GMDSClaire # name of the generated library
" " # description
ON # is activated
ON # is activated
ON # must be covered
)

GMDS_ADD_COMPONENT(
BLOCK_MESHER # cmake variable
blockMesher # src subdirectory name
GMDSBlockMesher # name of the generated library
"Provide the mesh of a block structure classified on a CAD geometry" # description
ON # is activated
ON # must be covered
DUAL_BLOCKING
dualBlocking
GMDSDualBlocking
"Dual blocking component"
OFF
OFF # must be covered
)

GMDS_ADD_COMPONENT(
ELG3D
Elg3D
GMDSelg3d
"overlay-grid algorithm"
OFF
OFF # must be covered
)

GMDS_ADD_COMPONENT(
ELGMORPHING
elgmorphing
GMDSelgmorphing
"morphing the mesh"
OFF
OFF # must be covered
)

GMDS_ADD_COMPONENT(
FRAME # cmake variable
frame # src subdirectory name
GMDSFrame # name of the generated library
"Frame field generation component" # description
ON # is activated
ON # is activated
ON # must be covered
)

Expand All @@ -182,30 +209,21 @@ GMDS_ADD_COMPONENT(
)

GMDS_ADD_COMPONENT(
SINGGRAPHBUILD
singGraphBuild
GMDSSingGraphBuild
"Singularity graph building component"
GEOD_HONEY_COMB
geodHoneyComb
GMDSGeodHoneyComb
"Algorithms to create honeycomb like meshes for spherical geometries"
ON
ON # must be covered
)

GMDS_ADD_COMPONENT(
DUAL_BLOCKING
dualBlocking
GMDSDualBlocking
"Dual blocking component"
OFF
OFF # must be covered
ON # must be covered
)

GMDS_ADD_COMPONENT(
MEDUSA
medusa
GMDSMedusa
"Visualization component"
HYBRIDMESHADAPT
hybridMeshAdapt
GMDSHybridMeshAdapt
"Hybrid remeshing component"
OFF
OFF # must be covered
ON # must be covered
)

GMDS_ADD_COMPONENT(
Expand All @@ -218,38 +236,29 @@ GMDS_ADD_COMPONENT(
)

GMDS_ADD_COMPONENT(
ELG3D
Elg3D
GMDSelg3d
"overlay-grid algorithm"
MEDUSA
medusa
GMDSMedusa
"Visualization component"
OFF
OFF # must be covered
)

GMDS_ADD_COMPONENT(
ELGMORPHING
elgmorphing
GMDSelgmorphing
MORPHMESH
morphMesh
GMDSmorphMesh
"morphing the mesh"
OFF
OFF # must be covered
)

GMDS_ADD_COMPONENT(
HYBRIDMESHADAPT
hybridMeshAdapt
GMDSHybridMeshAdapt
"Hybrid remeshing component"
ON
ON # must be covered
OFF # must be covered
)

GMDS_ADD_COMPONENT(
PADDING
padding
GMDSPadding
"Smart Padding/Pillowing algorithm"
ON
OFF
ON # must be covered
)

Expand All @@ -258,37 +267,36 @@ GMDS_ADD_COMPONENT(
polyblock
GMDSPolyblock
"Polycube_like algorithms for hexahedral blocking"
ON
ON # must be covered
)
GMDS_ADD_COMPONENT(
GEOD_HONEY_COMB
geodHoneyComb
GMDSGeodHoneyComb
"Algorithms to create honeycomb like meshes for spherical geometries"
ON
OFF
ON # must be covered
)

GMDS_ADD_COMPONENT(
MORPHMESH
morphMesh
GMDSmorphMesh
"morphing the mesh"
ON
OFF # must be covered
QUADFRONT # cmake variable
quadfront # src subdirectory name
GMDSquadfront # name of the generated library
"advancing-front quad mesher" # description
OFF # is activated
ON # must be covered
)

GMDS_ADD_COMPONENT(
RLBLOCKING # cmake variable
rlBlocking # src subdirectory name
GMDSRlBlocking # name of the generated library
" " # description
"MCTS-guided blocking modifications" # description
OFF # is activated
OFF # must be covered
)


GMDS_ADD_COMPONENT(
SINGGRAPHBUILD
singGraphBuild
GMDSSingGraphBuild
"Singularity graph building component"
ON
ON # must be covered
)

#==============================================================================
set (GMDS_INCLUDE_DIRS APPEND)
Expand Down
32 changes: 22 additions & 10 deletions docs/mkdocs/dev-guide/developers_doc.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
gmds depends on many external components. In order to compile gmds they need to be installed properly in
order to be used with CMake.

Some are optionnal depending on the gmds functionnalities we want to activate;
Some are optional depending on the gmds functionalities we want to activate;
they include for example:
- `lcov` is used to perform code coverage locally to your computer;
- `py-pybind11` is mandatory for the python API;
- `glpk` is a linear programming solver that we used in some of our *gmds* basic components;
- `googletest` is used for our testing infrastructure;
- `cgal` is required for the blocking component.

On linux systems and macos we suggest using [spack](https://spack.io/) for installing the dependencies.
On linux systems and macOS we suggest using [spack](https://spack.io/) for installing the dependencies.
We use this system for our CI workflows. In a nutshell, spack allows you to install a set of libraries in a
specific directory. You can see it as an equivalent of *Python environment*. In our context,
we will simply install the set of dependencies we need and use them in our CMake build system. As an example,
Expand Down Expand Up @@ -50,7 +50,7 @@ Spack can be configured; you can modify the installation directory to shorten th
of disabling the possibility to have several installations of a same package with differing
options/versions (if choosing that any library `toto` installed with spack will be located in `absolute_path/spack/opt/spack/toto/`.)
```bash
# Optionnal: modifying the install_tree variable to make it shorter and more human readable;
# Optional: modifying the install_tree variable to make it shorter and more human readable;
# the HASH part in install directory names is removed which can lead to collisions.
# The spack/etc/spack/defaults/config.yaml file can be modified by hand
# - in spack version 0.20
Expand Down Expand Up @@ -142,8 +142,8 @@ the dependencies:

## Creation of an optional module

Once a component created, we use a [github workflow](git_workflow.md) in order to structure the code development.
We also intensively use [unit tests](unit_testing.md) to valid our codes and also to perform code coverage when we merge developments.
Once a component is created, we use a [github workflow](git_workflow.md) in order to structure the code development.
We also intensively use [unit tests](unit_test.md) to valid our codes and also to perform code coverage when we merge developments.

The creation of a new GMDS component requires to follow the guideline given below.

Expand Down Expand Up @@ -183,9 +183,9 @@ GMDS_ADD_COMPONENT(
```cmake
#==============================================================================
# LIBRARY DEFINTION (SOURCE FILES)
# LIBRARY DEFINITION (SOURCE FILES)
#==============================================================================
# Explicity used the name given in this preamble
# Explicitly used the name given in this preamble
set(GMDS_LIB ${LIB_GMDS_XXX})
set(GMDS_LIB_PREFIX gmds/xxx)
Expand Down Expand Up @@ -235,11 +235,23 @@ endif(WITH_TEST)
```
This file deserves a few comments:
- You must set the two first variable using the name of your component (XXX) and the name of the subdirectory (xxx).
- You must set the two first variables using the name of your component (XXX) and the name of the subdirectory (xxx).
- Each time you create a new class, the corresponding header and src files must be added to the lists *GMDS_INC* and *GMDS_SRC* respectively.
- Note that the *inc* subidrectory is always structured with two subdirectories, i.e. *inc/gmds/xxx/* for getting a homogeneous way of accessing to gmds header files.
- Note that the *inc* subdirectory is always structured with two subdirectories, i.e. *inc/gmds/xxx/* for getting a homogeneous way of accessing to gmds header files.
- The command **target_link_libraries(${GMDS_LIB} PUBLIC ....)** is very important. It is where you give the dependency of your module to other GDMS module or to external libraries.
- The remainder of the CMakefiles.txt should not be edited. It is used to generate libraries and to define the install procedure
### How to create an executable in a GMDS module
A GMDS module is associated to a library. But sometimes, for debug and test reasons, we can generate an executable. Considering the module *XXX*, you can do it by adding the next lines in the *CMakeLists.txt" file.
A GMDS module is associated to a library, but an executable can also be produced.
Considering the module *XXX*, you can do so it by adding the next lines at the end
of the *CMakeLists.txt* file.
```cmake
#==============================================================================
# EXECUTABLE
#==============================================================================
add_executable(xxx src/main.cpp)
target_link_libraries(xxx PRIVATE ${GMDS_LIB})
target_compile_features(xxx PUBLIC cxx_std_14)
install(TARGETS xxx)
```
Loading

0 comments on commit 665fc85

Please sign in to comment.