-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Add support for EGADS geometry system #330
Open
tuckerbabcock
wants to merge
91
commits into
SCOREC:develop
Choose a base branch
from
tuckerbabcock:egads-dev
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
91 commits
Select commit
Hold shift + click to select a range
0232dae
Created barebones framework for EGADS model support. Need to look at …
tuckerbabcock 9ffeda7
Added implementation of gmi_egads_load. Reqiuired adding methods to E…
tuckerbabcock 4678b2d
re-implemented gmi_egads_load to use existing EGADS functions
tuckerbabcock dd0c9bd
more implementation of gmi functions.
tuckerbabcock a71b5c3
all methods have preliminary implementation. Now trying to link and c…
tuckerbabcock 4698365
moved gmi_egads files to new gmi_egads directory
tuckerbabcock 494b48c
Added cmake files for finding and compiling with EGADS. Currently the…
tuckerbabcock 56de2bd
fix some typos causing compile erros
tuckerbabcock 4d11165
gmi-egads builds without any erros now
tuckerbabcock 749572f
gmi_egads compiles and links, though mesh verify fails.
tuckerbabcock 542eb7f
testing fails with 3D and 2D meshes.For 2D at least it seems the AFLR…
tuckerbabcock 13c02dc
added 2D ugrid support
tuckerbabcock 25ffd58
Merge branch 'ugrid2D-dev' into egads-dev
tuckerbabcock 79a1869
read dummy face ID
tuckerbabcock 432bea2
Merge branch 'ugrid2D-dev' into egads-dev
tuckerbabcock f7f35a2
fix read amount for dummy face ID
tuckerbabcock e56f39d
Merge branch 'ugrid2D-dev' into egads-dev
tuckerbabcock 83bab38
changed to egads reader based on how memory was being managed. Needs …
tuckerbabcock c7f8a65
2D ugrid reader now reads a 2D ugrid mesh and can verify and write to…
tuckerbabcock c6cdfc6
Merge branch 'ugrid2D-dev' into egads-dev
tuckerbabcock 4619442
added algorithm include
tuckerbabcock e77a4ef
Merge branch 'ugrid1D-dev' into egads-dev
tuckerbabcock dbe89db
changed gmi_normal to use correct get topology
tuckerbabcock f474a5b
added print statements for debug
tuckerbabcock 6e64cda
added function for vertex reparameterization on an edge
tuckerbabcock dc51601
added parameterization of vertices onto edges and faces in ugrid read…
tuckerbabcock 761f5e5
Merge branch 'ugrid2D-dev' into egads-dev
tuckerbabcock 67b60e9
rewrote apf function loadMdsFromUgrid to read the header and figure o…
tuckerbabcock dc71643
Merge branch 'ugrid2D-dev' into egads-dev
tuckerbabcock 8964abe
cleaning up code prior to pull request
tuckerbabcock 640d67b
removed static from gmi_egads_load
tuckerbabcock faf8e46
Merge branch 'ugrid2D-dev' into egads-dev
tuckerbabcock 24dab6d
curved 2D meshing works with EGADS with ugrid reading
tuckerbabcock 2576981
removing old code
tuckerbabcock 7437a90
removed print statements
tuckerbabcock 2f07637
Merge branch 'ugrid2D-dev' into egads-dev
tuckerbabcock dd95ea8
added egads_ent struct that wraps ego, and attempts to support 3D mod…
tuckerbabcock c733e03
quick change to struct typedef so it will compile on scorec
tuckerbabcock eae7fd6
changing pointers and mallocs
tuckerbabcock 572326e
Merge branch 'egads-dev' of github.com:tuckerbabcock/core into egads-dev
tuckerbabcock 5e2ef43
more pointer/reference changes
tuckerbabcock 383e168
changes from last night on scorec
tuckerbabcock 843e549
merged changes
tuckerbabcock 23de3fc
seem to have fixed strange malloc issue. Wasn't allocating room for t…
tuckerbabcock 54d6a06
Added new method to initialize used in pumiAIM
tuckerbabcock 114273a
changed FindEGADS file to make it work better.
tuckerbabcock a55157a
Merge branch 'egads-dev' of github.com:tuckerbabcock/core into egads-dev
tuckerbabcock 420a015
re-wrote gmi_egads to use new global array of ents to handle allocati…
tuckerbabcock 7bbb112
implemented getVertexUV
tuckerbabcock 7571748
pumi verifies tetgen mesh with multiple regions
tuckerbabcock a4e7219
can read adjacency binary file from PUMI AIM
tuckerbabcock edef983
freeing adjacency table
tuckerbabcock b63e7e5
commenting out prints
tuckerbabcock cb96614
fix errors
tuckerbabcock e317b7e
temporarily making isParamPointInsideModel always return true to allo…
tuckerbabcock 4664d05
cleaning up memory use more
tuckerbabcock f5b9220
merge upstream develop into egads-dev
tuckerbabcock 38f65e1
merge updates
tuckerbabcock 7c43f81
made everything not part of the interface static, moved non-public pa…
tuckerbabcock 38b539f
fix compiler warnings related to fread on gcc 10
tuckerbabcock cf181ef
removing unneeded forward declaration of struct
tuckerbabcock c51a0fa
adding egads related things to the split executable, making egads_glo…
tuckerbabcock e14c8fe
Merge branch 'develop' into egads-dev
tuckerbabcock bdaf4ca
Merge branch 'egads-dev' of github.com:tuckerbabcock/core into egads-dev
tuckerbabcock 7d5d26e
reverting example_config
tuckerbabcock f3c0892
address clang warning about firstFace being used uninitialized
tuckerbabcock 1832ccc
attempting to add EGADS split tests
tuckerbabcock 46f75a8
introduced new egads_model struct to store model specific things and …
tuckerbabcock 9a47057
cleaning up old print statements
tuckerbabcock a7e41e3
document sup filename and free it
tuckerbabcock ad8ab1f
use private linkage and header file includes for EGADS headers and li…
tuckerbabcock bf4420b
revert changes from isParamPointInsideModel
tuckerbabcock 31a02f5
remove iostream include from apfMesh.cc
tuckerbabcock 2e505f6
using cmake's configure_file to define the locations of the egads and…
tuckerbabcock 6bfd4c6
added function pointers and routines for opening/closing dylib
tuckerbabcock a4a41ef
function pointers loaded and switched to using them
tuckerbabcock 2e1012d
switched to lazy symbol loading
tuckerbabcock 0f8ea73
added error checking to make sure EGADS is loaded correctly
tuckerbabcock 3ae5571
got rid of EG_isEquivalent since it does not work with EGADSlite
tuckerbabcock 3fa7bc7
added egads stuff to verify executable
tuckerbabcock 64e1dec
remove goto from getVertexUV
tuckerbabcock 9aff5b6
make fail str buffers larger to address compile error on gcc 8.1.0
tuckerbabcock b6f2b42
switching to only using EGADSlite
tuckerbabcock 4f58438
added back the option to build gmi_egads with EGADS or EGADSlite, opt…
tuckerbabcock f145720
change USE_EGADSLITE to PUMI_USE_EGADSLITE
tuckerbabcock f98fe6d
remove egadslite include accidentally commited
tuckerbabcock 83e59a5
Merge branch 'master' into egads-dev
tuckerbabcock 407ead5
Merge branch 'master' into egads-dev
tuckerbabcock afb21d5
update CMake support for finding EGADS, import it as a target now, an…
tuckerbabcock 910b12a
Update gmi EGADS CMake setup to use target_compile_definitions for HA…
tuckerbabcock 3f13376
enable testing EGADS with EGADSLITE enabled
tuckerbabcock File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,256 @@ | ||
#[=======================================================================[.rst: | ||
FindESP | ||
--------- | ||
|
||
Find ESP include dirs and libraries | ||
|
||
Use this module by invoking :command:`find_package` with the form: | ||
|
||
.. code-block:: cmake | ||
|
||
find_package(ESP | ||
[version] [EXACT] # Minimum or EXACT version e.g. 1.19.0 | ||
[REQUIRED] # Fail with error if ESP is not found | ||
[COMPONENTS <libs>...] # ESP libraries by their canonical name | ||
# e.g. "egads" for "libegads" | ||
[OPTIONAL_COMPONENTS <libs>...] | ||
# Optional ESP libraries by their canonical name | ||
) # e.g. "egads" for "libegads" | ||
|
||
This module finds headers and requested component libraries from ESP | ||
|
||
Result Variables | ||
^^^^^^^^^^^^^^^^ | ||
|
||
This module defines the following variables: | ||
|
||
``ESP_FOUND`` | ||
True if headers and requested libraries were found. | ||
|
||
``ESP_INCLUDE_DIRS`` | ||
ESP include directories. | ||
|
||
``ESP_LIBRARY_DIRS`` | ||
Link directories for ESP libraries. | ||
|
||
``ESP_LIBRARIES`` | ||
ESP component libraries to be linked. | ||
|
||
``ESP_<COMPONENT>_FOUND`` | ||
True if component ``<COMPONENT>`` was found. | ||
|
||
``ESP_<COMPONENT>_LIBRARY`` | ||
Libraries to link for component ``<COMPONENT>`` (may include | ||
:command:`target_link_libraries` debug/optimized keywords). | ||
|
||
Cache variables | ||
^^^^^^^^^^^^^^^ | ||
|
||
Search results are saved persistently in CMake cache entries: | ||
|
||
``ESP_INCLUDE_DIR`` | ||
Directory containing ESP headers. | ||
|
||
``ESP_LIBRARY_DIR`` | ||
Directory containing ESP libraries. | ||
|
||
Hints | ||
^^^^^ | ||
|
||
This module reads hints about search locations from variables: | ||
|
||
``ESP_ROOT``, ``ESPROOT`` | ||
Preferred installation prefix. | ||
|
||
``ESP_INCLUDEDIR`` | ||
Preferred include directory e.g. ``<prefix>/include``. | ||
|
||
``ESP_LIBRARYDIR`` | ||
Preferred library directory e.g. ``<prefix>/lib``. | ||
|
||
``ESP_NO_SYSTEM_PATHS`` | ||
Set to ``ON`` to disable searching in locations not | ||
specified by these hint variables. Default is ``OFF``. | ||
|
||
``ESP_ADDITIONAL_VERSIONS`` | ||
List of ESP versions not known to this module. | ||
(ESP install locations may contain the version). | ||
|
||
Users may set these hints or results as ``CACHE`` entries. Projects | ||
should not read these entries directly but instead use the above | ||
result variables. Note that some hint names start in upper-case | ||
``ESP``. One may specify these as environment variables if they are | ||
not specified as CMake variables or cache entries. | ||
|
||
This module first searches for the ESP header files using the above | ||
hint variables (excluding ``ESP_LIBRARYDIR``) and saves the result in | ||
``ESP_INCLUDE_DIR``. Then it searches for requested component libraries | ||
using the above hints (excluding ``ESP_INCLUDEDIR``), "lib" directories | ||
near ``ESP_INCLUDE_DIR``, and the library name configuration settings below. | ||
It saves the library directories in ``ESP_LIBRARY_DIR`` and individual library | ||
locations in ``ESP_<COMPONENT>_LIBRARY``. | ||
When one changes settings used by previous searches in the same build | ||
tree (excluding environment variables) this module discards previous | ||
search results affected by the changes and searches again. | ||
|
||
Imported Targets | ||
^^^^^^^^^^^^^^^^ | ||
|
||
This module defines the following :prop_tgt:`IMPORTED` targets: | ||
|
||
``ESP::ESP`` | ||
Interface target for all components linking against all components. | ||
|
||
``ESP::<component>`` | ||
Target for specific component dependency (shared or static library). | ||
|
||
It is important to note that the imported targets behave differently | ||
than variables created by this module: multiple calls to | ||
:command:`find_package(ESP)` in the same directory or sub-directories with | ||
different options (e.g. static or shared) will not override the | ||
values of the targets created by the first call. | ||
|
||
Examples | ||
^^^^^^^^ | ||
|
||
Find ESP libraries and use imported targets: | ||
|
||
.. code-block:: cmake | ||
|
||
find_package(ESP REQUIRED COMPONENTS | ||
egads ocsm) | ||
add_executable(foo foo.cc) | ||
target_link_libraries(foo ESP::egads ESP::aimUtil) | ||
|
||
#]=======================================================================] | ||
|
||
include(GNUInstallDirs) | ||
|
||
set(quiet "") | ||
if(ESP_FIND_QUIETLY) | ||
set(quiet QUIET) | ||
endif() | ||
|
||
# ------------------------------------------------------------------------ | ||
# Find ESP include dir | ||
# ------------------------------------------------------------------------ | ||
if(NOT ESP_INCLUDE_DIR) | ||
|
||
set(_ESP_INCLUDE_SEARCH_DIRS "") | ||
if(ESP_INCLUDEDIR) | ||
list(APPEND _ESP_INCLUDE_SEARCH_DIRS ${ESP_INCLUDEDIR}) | ||
endif() | ||
|
||
if(DEFINED ENV{ESP_ROOT}) | ||
list(APPEND _ESP_INCLUDE_SEARCH_DIRS $ENV{ESP_ROOT}/include $ENV{ESP_ROOT}) | ||
endif() | ||
|
||
if(DEFINED ENV{ESPROOT}) | ||
list(APPEND _ESP_INCLUDE_SEARCH_DIRS $ENV{ESPROOT}/include $ENV{ESPROOT}) | ||
endif() | ||
|
||
find_path(ESP_INCLUDE_DIR NAMES egads.h HINTS ${_ESP_INCLUDE_SEARCH_DIRS}) | ||
endif() | ||
|
||
message(STATUS "ESP include dir: ${ESP_INCLUDE_DIR}") | ||
|
||
# ------------------------------------------------------------------------ | ||
# Extract version information from egadsTypes.h | ||
# ------------------------------------------------------------------------ | ||
if(ESP_INCLUDE_DIR) | ||
|
||
# Extract ESP_VERSION_MAJOR AND ESP_VERISON_MINOR from egadsTypes.h | ||
set(ESP_VERSION_MAJOR 0) | ||
set(ESP_VERSION_MINOR 0) | ||
file(STRINGS "${ESP_INCLUDE_DIR}/egadsTypes.h" _ESP_VERSION_CONTENTS REGEX "#define EGADSMAJOR ") | ||
if("${_ESP_VERSION_CONTENTS}" MATCHES "#define EGADSMAJOR[ \t\r\n]+([0-9]+)") | ||
set(ESP_VERSION_MAJOR "${CMAKE_MATCH_1}") | ||
endif() | ||
unset(_ESP_VERSION_HEADER_CONTENTS) | ||
|
||
file(STRINGS "${ESP_INCLUDE_DIR}/egadsTypes.h" _ESP_VERSION_CONTENTS REGEX "#define EGADSMINOR ") | ||
if("${_ESP_VERSION_CONTENTS}" MATCHES "#define EGADSMINOR[ \t\r\n]+([0-9]+)") | ||
set(ESP_VERSION_MINOR "${CMAKE_MATCH_1}") | ||
endif() | ||
unset(_ESP_VERSION_HEADER_CONTENTS) | ||
|
||
# ESP versioning does not include a patch number so we set it to zero | ||
SET(ESP_VERSION_PATCH 0) | ||
|
||
# Define alias variables for backwards compat. | ||
set(ESP_MAJOR_VERSION ${ESP_VERSION_MAJOR}) | ||
set(ESP_MINOR_VERSION ${ESP_VERSION_MINOR}) | ||
set(ESP_SUBMINOR_VERSION ${ESP_VERSION_PATCH}) | ||
|
||
# Define ESP version in x.y.z format | ||
set(ESP_VERSION_STRING "${ESP_VERSION_MAJOR}.${ESP_VERSION_MINOR}.${ESP_VERSION_PATCH}") | ||
|
||
# message(STATUS "ESP Version: ${ESP_VERSION_STRING}") | ||
endif() | ||
|
||
# ------------------------------------------------------------------------ | ||
# Begin finding ESP libraries | ||
# ------------------------------------------------------------------------ | ||
|
||
# all potential ESP components | ||
set(ESP_COMPONENTS caps egads ocsm) | ||
|
||
# if not explicitly asking for any component, find all of them | ||
if(NOT ESP_FIND_COMPONENTS) | ||
set(ESP_FIND_COMPONENTS ${ESP_COMPONENTS}) | ||
endif() | ||
|
||
foreach(component ${ESP_FIND_COMPONENTS}) | ||
|
||
if(component STREQUAL "egads") | ||
if (ESP_USE_EGADSLITE) | ||
find_library(egads_LIBRARY NAMES egadslite) | ||
else() | ||
find_library(egads_LIBRARY NAMES egads) | ||
endif() | ||
else() | ||
find_library(${component}_LIBRARY NAMES ${component}) | ||
endif() | ||
|
||
if(${component}_LIBRARY) | ||
set(ESP_${component}_FOUND True) | ||
else() | ||
set(ESP_${component}_FOUND False) | ||
endif() | ||
|
||
# Create a library target only if the above checks passed | ||
if(ESP_${component}_FOUND AND NOT TARGET ESP::${component}) | ||
# Can't easily tell how ESP was compiled, so just default to UNKNOWN | ||
# library type and CMake will make a best effort guess | ||
add_library(ESP::${component} UNKNOWN IMPORTED) | ||
|
||
set_property( | ||
TARGET ESP::${component} PROPERTY | ||
INTERFACE_INCLUDE_DIRECTORIES "${ESP_INCLUDE_DIR}" | ||
) | ||
if(EXISTS "${${component}_LIBRARY}") | ||
set_property( | ||
TARGET ESP::${component} PROPERTY | ||
IMPORTED_LOCATION "${${component}_LIBRARY}" | ||
) | ||
endif() | ||
endif() | ||
endforeach() | ||
|
||
# Create INTERFACE target that bundles all the found libraries together | ||
if(NOT TARGET ESP::ESP) | ||
add_library(ESP::ESP INTERFACE IMPORTED) | ||
foreach(component ${ESP_FIND_COMPONENTS}) | ||
if(TARGET ESP::${component}) | ||
target_link_libraries(ESP::ESP INTERFACE ESP::${component}) | ||
endif() | ||
endforeach() | ||
endif() | ||
|
||
# Use CMake provided module to check the variables | ||
include(FindPackageHandleStandardArgs) | ||
find_package_handle_standard_args(ESP | ||
REQUIRED_VARS ESP_INCLUDE_DIR | ||
VERSION_VAR ESP_VERSION_STRING | ||
HANDLE_COMPONENTS | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
if(DEFINED TRIBITS_PACKAGE) | ||
include(pkg_tribits.cmake) | ||
return() | ||
endif() | ||
|
||
if(NOT ENABLE_EGADS) | ||
return() | ||
endif() | ||
|
||
#Sources & Headers | ||
set(SOURCES gmi_egads.c) | ||
set(HEADERS gmi_egads.h) | ||
|
||
add_library(gmi_egads ${SOURCES}) | ||
|
||
target_link_libraries(gmi_egads | ||
PUBLIC | ||
gmi | ||
PRIVATE | ||
ESP::egads | ||
) | ||
|
||
target_compile_definitions(gmi_egads | ||
INTERFACE | ||
PUMI_HAS_EGADS | ||
) | ||
|
||
if (PUMI_USE_EGADSLITE) | ||
target_compile_definitions(gmi_egads | ||
PRIVATE | ||
PUMI_USE_EGADSLITE | ||
) | ||
endif() | ||
|
||
# Include directories | ||
target_include_directories(gmi_egads PUBLIC | ||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}> | ||
$<INSTALL_INTERFACE:include> | ||
) | ||
|
||
scorec_export_library(gmi_egads) | ||
|
||
bob_end_subdir() |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tuckerbabcock is this something you wrote? The style of the commenting looks different which indicates it might come from elsewhere. If so, we need to include the source/licensing information.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jacobmerson you're right, I should have put some attribution in this file. I "wrote" it, by looking at CMake's built in "FindBoost.cmake" file (https://github.com/Kitware/CMake/blob/master/Modules/FindBoost.cmake) and used that as a template