Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
965f151
Merge remote-tracking branch 'scorec/cws/libmeshb' into cws/egadsLite…
cwsmith Feb 14, 2022
02e0cd7
builds with egadslite and cuda and meshb
joshia5 Nov 6, 2021
1562a27
fix bugs for standalone compilation with lite
joshia5 Nov 7, 2021
ae3ac3c
working egads_lite_adapt_test from device
joshia5 Nov 7, 2021
272bd07
last egads changes
joshia5 Feb 14, 2022
9daf681
egadslite: fix test name
cwsmith Feb 14, 2022
c95c6be
egadslite: add input var
cwsmith Feb 14, 2022
5acdf05
egadslite: using version without renamed header
cwsmith Feb 14, 2022
405ae23
egadslite: fwd declare egads struct
cwsmith Feb 14, 2022
563d580
egadslite: drop lite from names
cwsmith Feb 14, 2022
eadcd20
egadslite: use egadslite cmake config file
cwsmith Feb 15, 2022
1e2f7e5
egadslite: separable compilation appears to be required
cwsmith Feb 15, 2022
0ef432f
egadslite: links all exe except egads_lite_adapt_test
cwsmith Feb 15, 2022
3aef4ac
egadslite: use tll
cwsmith Feb 15, 2022
1e01733
egadslite: a few dirty hacks, links
cwsmith Feb 15, 2022
f68480c
egadslite: getTopo on device
cwsmith Feb 17, 2022
7bc5d96
egadslite: store outputs from getTopo
cwsmith Feb 17, 2022
5ffd58e
egadslite: white space, helper fns
cwsmith Feb 17, 2022
7cb1f8e
egadslite: build vector of sets
cwsmith Feb 17, 2022
b02a5d6
egadslite: remove lambda index, copy dev ent ptrs to host
cwsmith Feb 17, 2022
126da8b
egadslite: egads_lite_adapt_test executes without segfault
cwsmith Feb 17, 2022
d1b65a1
egadslite: fix pproc conditionals, remove rc api calls
cwsmith Feb 17, 2022
9cf6bc0
egadslite: store dev ptrs, dies in EG_invEvaLimits
cwsmith Feb 18, 2022
6d0e8f5
egadslite: wrap egads calls with return check
cwsmith Feb 19, 2022
b402d32
debug: write vtk, isolate face vertex
cwsmith Feb 19, 2022
a13b4df
debug: target a single known vertex
cwsmith Feb 22, 2022
92f3b5c
egadslite: increase the cuda stack size
cwsmith Feb 22, 2022
fd730b7
egadslite: remove debug prints and vtx isolation
cwsmith Feb 22, 2022
fa55e2c
egadslite: finish the previous commit...
cwsmith Feb 22, 2022
8dfdac6
debug: write pt data to csv
cwsmith Feb 22, 2022
3090ede
egadslite: hack classification for wacky topology
cwsmith Feb 23, 2022
12cacb9
fix compilation bug
joshia5 Apr 7, 2022
8930b23
compile changes
Angelyr Jul 31, 2026
914d859
Merge branch 'master' into ac/egads-cuda
Angelyr Aug 5, 2026
421a7ba
fixed compile errors
Angelyr Aug 5, 2026
5b845c4
fixed runtime tests
Angelyr Aug 6, 2026
4a76c1b
export egadslite
Angelyr Aug 14, 2026
d8bc406
export egadslite
Angelyr Aug 27, 2026
0cec0fe
removed unnecessary
Angelyr Aug 28, 2026
758aa4b
simplify build
Angelyr Aug 29, 2026
ec55331
removed duplicate code
Angelyr Aug 29, 2026
195888e
reuse classification and cudastacksize
Angelyr Aug 29, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ bob_option(Omega_h_CHECK_BOUNDS "Check array bounds when running on host (makes
bob_option(Omega_h_THROW "Errors throw exceptions instead of abort" ${USE_XSDK_DEFAULTS})
bob_input(Omega_h_DATA "" PATH "Path to omega_h-data test files")
bob_option(Omega_h_USE_EGADS "Use EGADS from ESP for geometry" OFF)
bob_option(Omega_h_USE_egadslite "Use EGADSlite from ESP for geometry" OFF)
bob_input(EGADS_PREFIX "" PATH "EGADS (or ESP) installation directory")
bob_option(Omega_h_USE_Kokkos "Use Kokkos as a backend" OFF)
bob_input(Kokkos_PREFIX "" PATH "Path to Kokkos install")
Expand Down Expand Up @@ -62,6 +63,9 @@ if (Omega_h_USE_Kokkos)
set_target_properties(Kokkos::kokkos PROPERTIES INTERFACE_COMPILE_OPTIONS "")
endif()

set(Omega_h_USE_egadslite_DEFAULT OFF)
bob_add_dependency(PUBLIC NAME egadslite TARGETS egadslite::egadslite)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should prefix our egadslite branch as 'scorec-v####' and check for that version here; I don't think any of the other branches/versions will work.


set(libMeshb_REQUIRED_VERSION 7.24)
set(Omega_h_USE_libMeshb_DEFAULT OFF)
bob_add_dependency(PUBLIC NAME libMeshb TARGETS libMeshb::Meshb.7)
Expand Down Expand Up @@ -151,6 +155,7 @@ set(Omega_h_KEY_BOOLS
Omega_h_USE_ZLIB
Omega_h_USE_libMeshb
Omega_h_USE_EGADS
Omega_h_USE_egadslite
Omega_h_USE_SEACASExodus
Omega_h_USE_SimModSuite
Omega_h_USE_SimDiscrete
Expand Down
10 changes: 10 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,10 @@ if(Omega_h_USE_ADIOS2)
find_package(ADIOS2 REQUIRED)
endif()

if(Omega_h_USE_egadslite)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this support both the CPU and CUDA versions?

list(APPEND Omega_h_SOURCES Omega_h_egads_lite.cpp)
endif()

if(Omega_h_USE_SEACASExodus)
list(APPEND Omega_h_SOURCES Omega_h_exodus.cpp)
endif()
Expand Down Expand Up @@ -214,6 +218,8 @@ bob_link_dependency(omega_h PUBLIC libMeshb)

bob_link_dependency(omega_h PUBLIC Gmsh)

bob_link_dependency(omega_h PUBLIC egadslite)

if(Omega_h_USE_EGADS)
target_include_directories(omega_h PUBLIC "${EGADS_INCLUDE_DIR}")
target_link_libraries(omega_h PUBLIC "${EGADS_LIBRARY}")
Expand Down Expand Up @@ -644,6 +650,9 @@ if(BUILD_TESTING)
if(Omega_h_USE_EGADS)
osh_add_exe(egads_test)
endif()
if(Omega_h_USE_egadslite)
osh_add_exe(egads_lite_adapt_test)
endif()
osh_add_exe(advect2d_test)
if(Omega_h_DATA)
list(APPEND TEST_EXES advect2d_test)
Expand Down Expand Up @@ -770,6 +779,7 @@ set(Omega_h_HEADERS
Omega_h_dist.hpp
Omega_h_eigen.hpp
Omega_h_egads.hpp
Omega_h_egads_lite.hpp
Omega_h_element.hpp
Omega_h_expr.hpp
Omega_h_fail.hpp
Expand Down
17 changes: 13 additions & 4 deletions src/Omega_h_adapt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
#ifdef OMEGA_H_USE_EGADS
#include "Omega_h_egads.hpp"
#endif
#ifdef OMEGA_H_USE_EGADSLITE
#include "Omega_h_egads_lite.hpp"
#endif

namespace Omega_h {

Expand Down Expand Up @@ -73,11 +76,11 @@ AdaptOpts::AdaptOpts(Int dim) {
length_histogram_max = 3.0;
nlength_histogram_bins = 10;
nquality_histogram_bins = 10;
#ifdef OMEGA_H_USE_EGADS
egads_model = nullptr;
should_smooth_snap = true;
snap_smooth_tolerance = 1e-2;
allow_snap_failure = false;
#if defined(OMEGA_H_USE_EGADS) || defined(OMEGA_H_USE_EGADSLITE)
egads_model = nullptr;
#endif
should_refine = true;
should_coarsen = true;
Expand Down Expand Up @@ -212,7 +215,7 @@ static bool satisfy_quality(Mesh* mesh, AdaptOpts const& opts) {
}

static void snap_and_satisfy_quality(Mesh* mesh, AdaptOpts const& opts) {
#ifdef OMEGA_H_USE_EGADS
#if defined(OMEGA_H_USE_EGADS) || defined(OMEGA_H_USE_EGADSLITE)
if (opts.egads_model) {
ScopedTimer snap_timer("snap");

Expand All @@ -222,8 +225,14 @@ static void snap_and_satisfy_quality(Mesh* mesh, AdaptOpts const& opts) {

//mesh->change_all_rcFieldsToMesh();

#ifdef OMEGA_H_USE_EGADSLITE
auto warp = egads_lite_get_snap_warp(
mesh, opts.egads_model, opts.verbosity >= EACH_REBUILD);
#else
auto warp = egads_get_snap_warp(
mesh, opts.egads_model, opts.verbosity >= EACH_REBUILD);
#endif

if (opts.should_smooth_snap) {
if (opts.verbosity >= EACH_REBUILD) {
std::cout << "Solving Laplacian of warp field...\n";
Expand Down Expand Up @@ -260,7 +269,7 @@ static void post_adapt(
std::cout << "addressing edge lengths took " << (t2 - t1) << " seconds\n";
}
if (opts.verbosity > SILENT && !mesh->comm()->rank()) {
#ifdef OMEGA_H_USE_EGADS
#if defined(OMEGA_H_USE_EGADS) || defined(OMEGA_H_USE_EGADSLITE)
if (opts.egads_model) std::cout << "snapping while ";
#endif
std::cout << "addressing element qualities took " << (t3 - t2);
Expand Down
6 changes: 3 additions & 3 deletions src/Omega_h_adapt.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ struct TransferOpts {

enum Verbosity { SILENT, EACH_ADAPT, EACH_REBUILD, EXTRA_STATS };

#ifdef OMEGA_H_USE_EGADS
#if defined (OMEGA_H_USE_EGADS) || defined(OMEGA_H_USE_EGADSLITE)
struct Egads;
#endif

Expand All @@ -168,11 +168,11 @@ struct AdaptOpts {
Real length_histogram_max;
Int nlength_histogram_bins;
Int nquality_histogram_bins;
#ifdef OMEGA_H_USE_EGADS
Egads* egads_model;
bool should_smooth_snap;
Real snap_smooth_tolerance;
bool allow_snap_failure;
#if defined(OMEGA_H_USE_EGADS) || defined(OMEGA_H_USE_EGADSLITE)
Egads* egads_model;
#endif
bool should_refine;
bool should_coarsen;
Expand Down
Loading
Loading