Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into feature/sunstepper
Browse files Browse the repository at this point in the history
  • Loading branch information
balos1 committed Jul 1, 2024
2 parents c04f24a + b578eab commit f9ff00c
Show file tree
Hide file tree
Showing 88 changed files with 3,595 additions and 2,393 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/check-clang-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ jobs:
apt update
apt install -y git python3-pip
- name: Install black
run: pip install black

- name: Print black version
run: black --version

- name: Install fprettify
run: pip install fprettify

Expand Down
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
# SUNDIALS Changelog

## Changes to SUNDIALS in release X.Y.Z

### Major Features

### New Features and Enhancements

### Bug Fixes

### Deprecation Notices

## Changes to SUNDIALS in release 7.1.1

### Bug Fixes

Fixed a [bug](https://github.com/LLNL/sundials/pull/523) in v7.1.0 with the SYCL
N_Vector `N_VSpace` function.

## Changes to SUNDIALS in release 7.1.0

### Major Features
Expand Down
12 changes: 6 additions & 6 deletions CITATIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ they are using rather than the combined SUNDIALS online guide:
author = {Daniel R. Reynolds and David J. Gardner and Carol S. Woodward and Cody J. Balos},
title = {User Documentation for ARKODE},
year = {2024},
note = {v6.1.0}
note = {v6.1.1}
}
```

Expand All @@ -78,7 +78,7 @@ they are using rather than the combined SUNDIALS online guide:
author = {Alan C. Hindmarsh and Radu Serban and Cody J. Balos and David J. Gardner and Daniel R. Reynolds and Carol S. Woodward},
title = {User Documentation for CVODE},
year = {2024},
note = {v7.1.0}
note = {v7.1.1}
}
```

Expand All @@ -87,7 +87,7 @@ they are using rather than the combined SUNDIALS online guide:
author = {Alan C. Hindmarsh and Radu Serban and Cody J. Balos and David J. Gardner and Daniel R. Reynolds and Carol S. Woodward},
title = {User Documentation for CVODES},
year = {2024},
note = {v7.1.0}
note = {v7.1.1}
}
```

Expand All @@ -96,7 +96,7 @@ they are using rather than the combined SUNDIALS online guide:
author = {Alan C. Hindmarsh and Radu Serban and Cody J. Balos and David J. Gardner and Daniel R. Reynolds and Carol S. Woodward},
title = {User Documentation for IDA},
year = {2024},
note = {v7.1.0}
note = {v7.1.1}
}
```

Expand All @@ -105,7 +105,7 @@ they are using rather than the combined SUNDIALS online guide:
author = {Radu Serban and Cosmin Petra and Alan C. Hindmarsh and Cody J. Balos and David J. Gardner and Daniel R. Reynolds and Carol S. Woodward},
title = {User Documentation for IDAS},
year = {2024},
note = {v6.1.0}
note = {v6.1.1}
}
```

Expand All @@ -114,6 +114,6 @@ they are using rather than the combined SUNDIALS online guide:
author = {Alan C. Hindmarsh and Radu Serban and Cody J. Balos and David J. Gardner and Daniel R. Reynolds and Carol S. Woodward},
title = {User Documentation for KINSOL},
year = {2024},
note = {v7.1.0}
note = {v7.1.1}
}
```
26 changes: 13 additions & 13 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ include(FindPackageHandleStandardArgs)
# Set some variables with info on the SUNDIALS project
set(PACKAGE_BUGREPORT "[email protected]")
set(PACKAGE_NAME "SUNDIALS")
set(PACKAGE_STRING "SUNDIALS 7.1.0")
set(PACKAGE_STRING "SUNDIALS 7.1.1")
set(PACKAGE_TARNAME "sundials")

# Set SUNDIALS version numbers
Expand All @@ -58,7 +58,7 @@ message(STATUS "SUNDIALS_GIT_VERSION: ${SUNDIALS_GIT_VERSION}")
# (use "" for the version label if none is needed)
set(PACKAGE_VERSION_MAJOR "7")
set(PACKAGE_VERSION_MINOR "1")
set(PACKAGE_VERSION_PATCH "0")
set(PACKAGE_VERSION_PATCH "1")
set(PACKAGE_VERSION_LABEL "")

if(PACKAGE_VERSION_LABEL)
Expand All @@ -73,37 +73,37 @@ endif()

# Specify the VERSION and SOVERSION for shared libraries

set(arkodelib_VERSION "6.1.0")
set(arkodelib_VERSION "6.1.1")
set(arkodelib_SOVERSION "6")

set(cvodelib_VERSION "7.1.0")
set(cvodelib_VERSION "7.1.1")
set(cvodelib_SOVERSION "7")

set(cvodeslib_VERSION "7.1.0")
set(cvodeslib_VERSION "7.1.1")
set(cvodeslib_SOVERSION "7")

set(idalib_VERSION "7.1.0")
set(idalib_VERSION "7.1.1")
set(idalib_SOVERSION "7")

set(idaslib_VERSION "6.1.0")
set(idaslib_VERSION "6.1.1")
set(idaslib_SOVERSION "6")

set(kinsollib_VERSION "7.1.0")
set(kinsollib_VERSION "7.1.1")
set(kinsollib_SOVERSION "7")

set(cpodeslib_VERSION "0.0.0")
set(cpodeslib_SOVERSION "0")

set(nveclib_VERSION "7.1.0")
set(nveclib_VERSION "7.1.1")
set(nveclib_SOVERSION "7")

set(sunmatrixlib_VERSION "5.1.0")
set(sunmatrixlib_VERSION "5.1.1")
set(sunmatrixlib_SOVERSION "5")

set(sunlinsollib_VERSION "5.1.0")
set(sunlinsollib_VERSION "5.1.1")
set(sunlinsollib_SOVERSION "5")

set(sunnonlinsollib_VERSION "4.1.0")
set(sunnonlinsollib_VERSION "4.1.1")
set(sunnonlinsollib_SOVERSION "4")

set(sundialslib_VERSION
Expand All @@ -117,7 +117,7 @@ set(sundialslib_SOVERSION "${PACKAGE_VERSION_MAJOR}")

# Prohibit in-source build
if("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}")
print_error("In-source build prohibited.")
message(FATAL_ERROR "In-source build prohibited.")
endif()

# Organize targets into folders when using an IDE
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# SUNDIALS: SUite of Nonlinear and DIfferential/ALgebraic equation Solvers #
### Version 7.1.0 (Jun 2024) ###
### Version 7.1.1 (Jun 2024) ###

**Center for Applied Scientific Computing, Lawrence Livermore National Laboratory**

Expand Down
83 changes: 42 additions & 41 deletions benchmarks/advection_reaction_3D/scripts/compare_error.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
import glob
import sys
import matplotlib
matplotlib.use('Agg')

matplotlib.use("Agg")
from mpl_toolkits.mplot3d import Axes3D
import matplotlib.pyplot as plt
import pandas as pd
Expand All @@ -25,75 +26,75 @@
# load pickled data
def load_data(file):
data = np.load(file)
m = data['mesh']
t = data['t']
u = data['u']
v = data['v']
w = data['w']
m = data["mesh"]
t = data["t"]
u = data["u"]
v = data["v"]
w = data["w"]

hx = m[0,1] - m[0,0]
hy = m[1,1] - m[1,0]
hz = m[2,1] - m[2,0]
hx = m[0, 1] - m[0, 0]
hy = m[1, 1] - m[1, 0]
hz = m[2, 1] - m[2, 0]

return { 'm': m, 'h': (hx,hy,hz), 't': t, 'u': u, 'v': v, 'w': w }
return {"m": m, "h": (hx, hy, hz), "t": t, "u": u, "v": v, "w": w}


# grid function norm
def norm_3Dgrid(h, x, q=1):
hx,hy,hz = h
hx, hy, hz = h
s = np.shape(x)
return (hx*hy*hz*np.sum(np.abs(x)**q, axis=(1,2,3)))**(1./q)
return (hx * hy * hz * np.sum(np.abs(x) ** q, axis=(1, 2, 3))) ** (1.0 / q)


# load data files
np111 = load_data('np-111/output-with-h-8.33e-02.npz')
np211 = load_data('np-211/output-with-h-8.33e-02.npz')
np311 = load_data('np-311/output-with-h-8.33e-02.npz')
np131 = load_data('np-131/output-with-h-8.33e-02.npz')
np113 = load_data('np-113/output-with-h-8.33e-02.npz')
np911 = load_data('np-911/output-with-h-8.33e-02.npz')
np111 = load_data("np-111/output-with-h-8.33e-02.npz")
np211 = load_data("np-211/output-with-h-8.33e-02.npz")
np311 = load_data("np-311/output-with-h-8.33e-02.npz")
np131 = load_data("np-131/output-with-h-8.33e-02.npz")
np113 = load_data("np-113/output-with-h-8.33e-02.npz")
np911 = load_data("np-911/output-with-h-8.33e-02.npz")
# np133 = load_data('np-133/output-with-h-8.33e-02.npz')
np313 = load_data('np-313/output-with-h-8.33e-02.npz')
np331 = load_data('np-331/output-with-h-8.33e-02.npz')
np333 = load_data('np-333/output-with-h-8.33e-02.npz')
np313 = load_data("np-313/output-with-h-8.33e-02.npz")
np331 = load_data("np-331/output-with-h-8.33e-02.npz")
np333 = load_data("np-333/output-with-h-8.33e-02.npz")
# np666 = load_data('np-666/output-with-h-8.33e-02.npz')

for component in ['u', 'v', 'w']:
for component in ["u", "v", "w"]:
# Reference solution
ref = np111[component]

# Now compute E(h) = ||U(h) - \bar{U}(h)|| using the grid-function norm
E_np211 = norm_3Dgrid(np211['h'], np211[component] - ref)
E_np311 = norm_3Dgrid(np311['h'], np311[component] - ref)
E_np131 = norm_3Dgrid(np131['h'], np131[component] - ref)
E_np113 = norm_3Dgrid(np113['h'], np113[component] - ref)
E_np911 = norm_3Dgrid(np911['h'], np911[component] - ref)
E_np211 = norm_3Dgrid(np211["h"], np211[component] - ref)
E_np311 = norm_3Dgrid(np311["h"], np311[component] - ref)
E_np131 = norm_3Dgrid(np131["h"], np131[component] - ref)
E_np113 = norm_3Dgrid(np113["h"], np113[component] - ref)
E_np911 = norm_3Dgrid(np911["h"], np911[component] - ref)
# E_np133 = norm_3Dgrid(np133['h'], np133[component] - ref)
E_np313 = norm_3Dgrid(np313['h'], np313[component] - ref)
E_np331 = norm_3Dgrid(np331['h'], np331[component] - ref)
E_np333 = norm_3Dgrid(np333['h'], np333[component] - ref)
E_np313 = norm_3Dgrid(np313["h"], np313[component] - ref)
E_np331 = norm_3Dgrid(np331["h"], np331[component] - ref)
E_np333 = norm_3Dgrid(np333["h"], np333[component] - ref)
# E_np666 = norm_3Dgrid(np666['h'], np666[component] - ref)

# Plot error across time
X, Y = np.meshgrid(np111['m'][0,:], np111['t'])
X, Y = np.meshgrid(np111["m"][0, :], np111["t"])
# fig = plt.figure()
# ax = plt.subplot(311, projection='3d')
# ax.plot_surface(X, Y, np.abs(np911[component][:,:,0,0] - ref[:,:,0,0]))
# ax = plt.subplot(312, projection='3d')
# ax.plot_surface(X, Y, np.abs(np911[component][:,0,:,0] - ref[:,0,:,0]))
# ax = plt.subplot(313, projection='3d')
# ax.plot_surface(X, Y, np.abs(np911[component][:,0,0,:] - ref[:,0,0,:]))
plt.plot(np111['t'], E_np211)
plt.plot(np111['t'], E_np131)
plt.plot(np111['t'], E_np113)
plt.plot(np111['t'], E_np911)
plt.plot(np111["t"], E_np211)
plt.plot(np111["t"], E_np131)
plt.plot(np111["t"], E_np113)
plt.plot(np111["t"], E_np911)
# plt.plot(np111['t'], E_np133)
plt.plot(np111['t'], E_np313)
plt.plot(np111['t'], E_np331)
plt.plot(np111['t'], E_np333)
plt.plot(np111["t"], E_np313)
plt.plot(np111["t"], E_np331)
plt.plot(np111["t"], E_np333)
# plt.plot(np111['t'], E_np666)
# plt.legend(['2 1 1', '3 1 1', '1 3 3', '3 1 3', '3 3 1', '3 3 3', '6 6 6'])
# plt.legend(['3 1 1', '1 3 1', '1 1 3', '9 1 1', '1 3 3', '3 1 3', '3 3 1'])
plt.ylabel('||E(hx,hy,hz)||')
plt.xlabel('time')
plt.savefig('compare-error-plot-%s.png' % component)
plt.ylabel("||E(hx,hy,hz)||")
plt.xlabel("time")
plt.savefig("compare-error-plot-%s.png" % component)
Loading

0 comments on commit f9ff00c

Please sign in to comment.