-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into discontinuous-galerkin
- Loading branch information
Showing
304 changed files
with
4,035 additions
and
2,501 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# This is a basic workflow to help you get started with Actions | ||
name: SEACAS Spack build | ||
|
||
# Controls when the action will run. Triggers the workflow on push | ||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
concurrency: | ||
group: ${{ github.workflow}}-${{ github.head_ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Set up Spack | ||
uses: spack/setup-spack@v2 | ||
with: | ||
ref: develop # Spack version (examples: develop, releases/v0.21) | ||
buildcache: true # Configure oci://ghcr.io/spack/github-actions-buildcache | ||
color: true # Force color output (SPACK_COLOR=always) | ||
path: spack # Where to clone Spack | ||
- run: | | ||
spack external find | ||
spack compiler find | ||
spack spec seacas~mpi | ||
spack install seacas~mpi | ||
spack find | ||
# spack spec seacas+mpi | ||
# spack install seacas+mpi |
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,64 @@ | ||
From 3c1871b84b24f14c3b5c6b99ead40c5aa2a0907e Mon Sep 17 00:00:00 2001 | ||
From: Greg Sjaardema <[email protected]> | ||
Date: Fri, 5 Apr 2024 09:09:46 -0600 | ||
Subject: [PATCH] CGNS: Allow more liberal version matching | ||
|
||
The main difference between CGNS-3.X and CGNS-4.X is the handling | ||
of polyhedral elements. If the cgns file does not contain those | ||
elements, then the library should be able to read the file correctly. | ||
|
||
We have modified the library version from the original 4.4.X to | ||
be 3.99 so that files written by this version of the CGNS library | ||
(assuming they don't use polyhedral elements) will be readable by | ||
applications that are still using CGNS-3.X | ||
|
||
This is a kluge and not officially supported by the CGNS developers. | ||
--- | ||
src/cgnslib.c | 11 ++++++----- | ||
src/cgnslib.h | 5 +++++ | ||
2 files changed, 11 insertions(+), 5 deletions(-) | ||
|
||
diff --git a/src/cgnslib.c b/src/cgnslib.c | ||
index d60daf6..78bd25a 100644 | ||
--- a/src/cgnslib.c | ||
+++ b/src/cgnslib.c | ||
@@ -434,12 +434,13 @@ int cg_open(const char *filename, int mode, int *file_number) | ||
/* This code allows reading version newer than the lib, | ||
as long as the 1st digit of the versions are equal */ | ||
if ((cg->version / 1000) > (CGNSLibVersion / 1000)) { | ||
- cgi_error("A more recent version of the CGNS library created the file. Therefore, the CGNS library needs updating before reading the file '%s'.",filename); | ||
- return CG_ERROR; | ||
- } | ||
+ cgi_warning("A more recent version of the CGNS library created the file. Assuming it is OK to read, but may have problems (%d vs %d).", | ||
+ cg->version, CGNSLibVersion); | ||
+ } | ||
/* warn only if different in second digit */ | ||
- if ((cg->version / 100) > (CGNSLibVersion / 100)) { | ||
- cgi_warning("The file being read is more recent that the CGNS library used"); | ||
+ else if ((cg->version / 100) > (CGNSLibVersion / 100)) { | ||
+ cgi_warning("The file being read is more recent than the CGNS library used (%d vs %d).", | ||
+ cg->version, CGNSLibVersion); | ||
} | ||
} | ||
#if CG_SIZEOF_SIZE == 32 | ||
diff --git a/src/cgnslib.h b/src/cgnslib.h | ||
index 476c768..a4b66df 100644 | ||
--- a/src/cgnslib.h | ||
+++ b/src/cgnslib.h | ||
@@ -43,8 +43,13 @@ | ||
#ifndef CGNSLIB_H | ||
#define CGNSLIB_H | ||
|
||
+#if 0 | ||
#define CGNS_VERSION 4400 | ||
#define CGNS_DOTVERS 4.40 | ||
+#else | ||
+#define CGNS_VERSION 3990 | ||
+#define CGNS_DOTVERS 3.99 | ||
+#endif | ||
|
||
#define CGNS_COMPATVERSION 2540 | ||
#define CGNS_COMPATDOTVERS 2.54 | ||
-- | ||
2.39.3 (Apple Git-146) | ||
|
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
File renamed without changes.
File renamed without changes.
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,7 @@ | ||
cmake_minimum_required(VERSION 3.1...3.26) | ||
project(IossCMakeExample VERSION 1.0 LANGUAGES CXX) | ||
|
||
#### C++ IOSS #### | ||
find_package(SEACASIoss CONFIG) | ||
add_executable(IossExample IossExample.C) | ||
target_link_libraries(IossExample PRIVATE SEACASIoss::all_libs) |
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 @@ | ||
#include <Ionit_Initializer.h> | ||
#include <Ioss_DatabaseIO.h> | ||
#include <Ioss_IOFactory.h> | ||
#include <Ioss_Region.h> | ||
#include <Ioss_Utils.h> | ||
|
||
#include <assert.h> | ||
#include <iostream> | ||
#include <string> | ||
|
||
int main(int argc, char *argv[]) { | ||
#ifdef SEACAS_HAVE_MPI | ||
MPI_Init(&argc, &argv); | ||
ON_BLOCK_EXIT(MPI_Finalize); | ||
#endif | ||
|
||
if (argc == 1) { | ||
std::cerr << "SYNTAX: " << argv[0] | ||
<< " '--show-config' or 'filename'\n" | ||
" Will either show the Ioss build configuration\n" | ||
" Or will show a summary of the data in `filename`\n"; | ||
std::exit(EXIT_SUCCESS); | ||
} | ||
|
||
Ioss::Init::Initializer io; | ||
std::string filename = argv[1]; | ||
if (filename == "--show-config") { | ||
std::cerr << Ioss::IOFactory::show_configuration() << "\n"; | ||
} else { | ||
auto dbtype = Ioss::Utils::get_type_from_file(filename); | ||
auto *dbi = Ioss::IOFactory::create(dbtype, filename, Ioss::READ_RESTART, | ||
Ioss::ParallelUtils::comm_world()); | ||
|
||
if (dbi == NULL || !dbi->ok(true)) { | ||
std::exit(EXIT_FAILURE); | ||
} | ||
|
||
// NOTE: 'region' owns 'dbi' pointer at this time and will close | ||
// and call dbi destructor. | ||
Ioss::Region region(dbi, "example_region"); | ||
region.output_summary(std::cerr); | ||
} | ||
} |
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
Oops, something went wrong.