Skip to content

Commit

Permalink
Merge branch 'develop' into task/2023_12_raja_binning_fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
cyrush authored May 10, 2024
2 parents b0aecec + d424e4b commit 5b82d68
Show file tree
Hide file tree
Showing 166 changed files with 9,189 additions and 574 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build_ascent_cuda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
CMAKE_VERSION: 3.23.3
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Install CMake
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build_ascent_gcc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
libopenmpi-dev \
cmake
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Build TPLs
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build_ascent_hip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
CMAKE_VERSION: 3.23.2
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Install CMake
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build_ascent_icc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
sudo apt install -y intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic-2023.1.0 \
intel-oneapi-compiler-fortran-2023.1.0
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Build TPLs
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build_ascent_macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
CXX: clang++
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Build TPLs
Expand Down
16 changes: 14 additions & 2 deletions .github/workflows/build_ascent_win.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
uses: mpi4py/setup-mpi@v1
- name: Setup Python Env
run: python3 -m pip install --upgrade pip numpy mpi4py
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Build TPLs
Expand All @@ -40,4 +40,16 @@ jobs:
- name: Run Ascent Unit Tests
run: |
echo "**** Ascent Unit Tests"
cmake -E env CTEST_OUTPUT_ON_FAILURE=1 cmake --build build --config Release --target RUN_TESTS
cmake -E env CTEST_OUTPUT_ON_FAILURE=1 cmake --build build --config Release --target RUN_TESTS
# NOT READY FOR THIS ON WINDOWS YET
# - name: Create Unit Test Report
# if: always()
# run: |
# echo "**** Ascent Unit Tests Report Ggen"
# cmake --build build --target gen_report
# - name: Archive Test Results
# if: always()
# uses: actions/upload-artifact@v1
# with:
# name: test-results
# path: build/tests/_output/
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,19 @@ and this project aspires to adhere to [Semantic Versioning](https://semver.org/s
## Unreleased
### Preferred dependency versions for ascent@develop
- [email protected]
- vtk-m@2.0.0
- vtk-m@2.1.0

### Added
- Added `refinement_level` option to Relay Extract. When used this will refine high order meshes to a low order representation and save the low order result as the extract data.
- Added parameters to control HDF5 compression options to the Relay Extract.
- Added check to make sure all domain IDs are unique
- Added a `vtk` extract that saves each mesh domain to a legacy vtk file grouped, with all domain data grouped by a `.visit` file.
- Added WarpX Streamline filter that uses charged particles.
- Added seed population options for particle advection: point, point list, line, and box

### Changed
- Changed the Data Binning filter to accept a `reduction_field` parameter (instead of `var`), and similarly the axis parameters to take `field` (instead of `var`). The `var` style parameters are still accepted, but deprecated and will be removed in a future release.
- Changed the Streamline and WarpXStreamline filters to apply the VTK-m Tube filter to their outputs, allowing for the results to be rendered.

## [0.9.2] - Released 2023-06-30
### Preferred dependency versions for [email protected]
Expand Down
21 changes: 11 additions & 10 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@
########################

variables:
ubuntu_20_04_tag: alpinedav/ascent-devel:ubuntu-20.04-x86_64-tpls_2023-12-06-sha497882
ubuntu_22_04_tag: alpinedav/ascent-devel:ubuntu-22.04-x86_64-tpls_2023-12-06-sha9574c7
ubuntu_20_04_cuda_11_4_3_tag: alpinedav/ascent-devel:ubuntu-20.04-cuda-12.1.1-x86_64-tpls_2023-12-09-sha5d53a0
ubuntu_20_04_cuda_12_1_1_tag: alpinedav/ascent-devel:ubuntu-20.04-cuda-11.4.3-x86_64-tpls_2023-12-09-sha5d53a0
ubuntu_20_04_rocm_5_1_3_tag: alpinedav/ascent-devel:ubuntu-20.04-rocm-5.1.3-x86_64-tpls_2023-12-09-sha5d53a0
ubuntu_20_04_tag: alpinedav/ascent-devel:ubuntu-20.04-x86_64-tpls_2024-04-29-sha3234b3
ubuntu_22_04_tag: alpinedav/ascent-devel:ubuntu-22.04-x86_64-tpls_2024-04-29-sha3234b3
ubuntu_20_04_cuda_11_4_3_tag: alpinedav/ascent-devel:ubuntu-20.04-cuda-11.4.3-x86_64-tpls_2024-04-30-shad5b6a9
ubuntu_20_04_cuda_12_1_1_tag: alpinedav/ascent-devel:ubuntu-20.04-cuda-12.1.1-x86_64-tpls_2024-04-30-shad5b6a9
ubuntu_20_04_rocm_6_0_0_tag: alpinedav/ascent-devel:ubuntu-20.04-rocm-6.0.0--x86_64-build-ascent-tpls_2024-04-19-shaee18b8


# only build merge target pr to develop
Expand Down Expand Up @@ -446,7 +446,7 @@ stages:
ubuntu_20.04_static_cuda_12.1.1:
containerImage: ${{ variables.ubuntu_20_04_cuda_12_1_1_tag }}
BUILD_SHARED_LIBS: OFF
CMAKE_BUILD_TYPE: Release
CMAKE_BUILD_TYPE: MinSizeRel
ENABLE_DRAY: ON
ENABLE_MFEM: ON
BLT_CXX_STD: c++14
Expand All @@ -457,7 +457,7 @@ stages:
ubuntu_20.04_static_cuda_11.4.3:
containerImage: ${{ variables.ubuntu_20_04_cuda_11_4_3_tag }}
BUILD_SHARED_LIBS: OFF
CMAKE_BUILD_TYPE: Release
CMAKE_BUILD_TYPE: MinSizeRel
ENABLE_DRAY: ON
ENABLE_MFEM: ON
BLT_CXX_STD: c++14
Expand All @@ -467,7 +467,7 @@ stages:
ubuntu_20.04_static_cuda_11.4.3_no_mfem:
containerImage: ${{ variables.ubuntu_20_04_cuda_11_4_3_tag }}
BUILD_SHARED_LIBS: OFF
CMAKE_BUILD_TYPE: Release
CMAKE_BUILD_TYPE: MinSizeRel
ENABLE_DRAY: ON
ENABLE_MFEM: OFF
BLT_CXX_STD: c++14
Expand Down Expand Up @@ -552,6 +552,7 @@ stages:
#################################
cd build
make install
make clean
displayName: 'Install'
- script: |
Expand Down Expand Up @@ -594,8 +595,8 @@ stages:
CMAKE_EXE: /cmake-3.23.2-linux-x86_64/bin/cmake
strategy:
matrix:
ubuntu_20.04_rocm_5.1.3_build_ascent:
containerImage: ${{ variables.ubuntu_20_04_rocm_5_1_3_tag }}
ubuntu_20.04_rocm_6.0.0_build_ascent:
containerImage: ${{ variables.ubuntu_20_04_rocm_6_0_0_tag }}
BUILD_SHARED_LIBS: ON
CMAKE_BUILD_TYPE: Release
BLT_CXX_STD: c++14
Expand Down
2 changes: 1 addition & 1 deletion hashes.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
vtkm branch='master' commit='982e965536b41b334bd2bbb765373e6503c823ec'
blt branch='main' commit='84fe0d15d841a79d923e97a9105b86b59147bfed'
blt branch='main' commit='9ff77344f0b2a6ee345e452bddd6bfd46cbbfa35'
Original file line number Diff line number Diff line change
@@ -0,0 +1,156 @@
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
// Copyright (c) Lawrence Livermore National Security, LLC and other Ascent
// Project developers. See top-level LICENSE AND COPYRIGHT files for dates and
// other details. No copyright assignment is required to contribute to Ascent.
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//

//-----------------------------------------------------------------------------
///
/// file: ascent_tutorial_cpp_utils.hpp
///
//-----------------------------------------------------------------------------

#ifndef ASCENT_TUTORIAL_CPP_UTILS_H
#define ASCENT_TUTORIAL_CPP_UTILS_H

#include <iostream>
#include "conduit_blueprint.hpp"

#include <math.h>

using namespace conduit;

const float64 PI_VALUE = 3.14159265359;

// --------------------------------------------------------------------------//
void
tutorial_tets_example(Node &mesh)
{
mesh.reset();

//
// (create example tet mesh from blueprint example 2)
//
// Create a 3D mesh defined on an explicit set of points,
// composed of two tets, with two element associated fields
// (`var1` and `var2`)
//

// create an explicit coordinate set
double X[5] = { -1.0, 0.0, 0.0, 0.0, 1.0 };
double Y[5] = { 0.0, -1.0, 0.0, 1.0, 0.0 };
double Z[5] = { 0.0, 0.0, 1.0, 0.0, 0.0 };
mesh["coordsets/coords/type"] = "explicit";
mesh["coordsets/coords/values/x"].set(X, 5);
mesh["coordsets/coords/values/y"].set(Y, 5);
mesh["coordsets/coords/values/z"].set(Z, 5);


// add an unstructured topology
mesh["topologies/mesh/type"] = "unstructured";
// reference the coordinate set by name
mesh["topologies/mesh/coordset"] = "coords";
// set topology shape type
mesh["topologies/mesh/elements/shape"] = "tet";
// add a connectivity array for the tets
int64 connectivity[8] = { 0, 1, 3, 2, 4, 3, 1, 2 };
mesh["topologies/mesh/elements/connectivity"].set(connectivity, 8);

const int num_elements = 2;
float var1_vals[num_elements] = { 0, 1 };
float var2_vals[num_elements] = { 1, 0 };

// create a field named var1
mesh["fields/var1/association"] = "element";
mesh["fields/var1/topology"] = "mesh";
mesh["fields/var1/values"].set(var1_vals, 2);

// create a field named var2
mesh["fields/var2/association"] = "element";
mesh["fields/var2/topology"] = "mesh";
mesh["fields/var2/values"].set(var2_vals, 2);

// make sure the mesh we created conforms to the blueprint
Node verify_info;
if(!blueprint::mesh::verify(mesh, verify_info))
{
std::cout << "Mesh Verify failed!" << std::endl;
std::cout << verify_info.to_yaml() << std::endl;
}
}

// --------------------------------------------------------------------------//
void
tutorial_gyre_example(float64 time_value, Node &mesh)
{
mesh.reset();
int xy_dims = 40;
int z_dims = 2;

conduit::blueprint::mesh::examples::braid("hexs",
xy_dims,
xy_dims,
z_dims,
mesh);

mesh["state/time"] = time_value;
Node &field = mesh["fields/gyre"];
field["association"] = "vertex";
field["topology"] = "mesh";
field["values"].set(DataType::float64(xy_dims*xy_dims*z_dims));

Node &vec_field = mesh["fields/gyre_vel"];
vec_field["association"] = "vertex";
vec_field["topology"] = "mesh";
vec_field["values/u"].set(DataType::float64(xy_dims*xy_dims*z_dims));
vec_field["values/v"].set(DataType::float64(xy_dims*xy_dims*z_dims));
vec_field["values/w"].set(DataType::float64(xy_dims*xy_dims*z_dims));

float64 *values_ptr = field["values"].value();
float64 *u_values_ptr = vec_field["values/u"].value();
float64 *v_values_ptr = vec_field["values/v"].value();
float64 *w_values_ptr = vec_field["values/w"].value();

float64 e = 0.25;
float64 A = 0.1;
float64 w = (2.0 * PI_VALUE) / 10.0;
float64 a_t = e * sin(w * time_value);
float64 b_t = 1.0 - 2 * e * sin(w * time_value);
// print("e: " + str(e) + " A " + str(A) + " w " + str(w) + " a_t " + str(a_t) + " b_t " + str(b_t))
// print(b_t)
// print(w)
int idx = 0;
for (int z=0; z < z_dims; z++)
{
for (int y=0; y < xy_dims; y++)
{
// scale y to 0-1
float64 y_n = float64(y)/float64(xy_dims);
float64 y_t = sin(PI_VALUE * y_n);
for (int x=0; x < xy_dims; x++)
{
// scale x to 0-1
float64 x_f = float(x)/ (float(xy_dims) * .5);
float64 f_t = a_t * x_f * x_f + b_t * x_f;
// print(f_t)
float64 value = A * sin(PI_VALUE * f_t) * y_t;
float64 u = -PI_VALUE * A * sin(PI_VALUE * f_t) * cos(PI_VALUE * y_n);
float64 df_dx = 2.0 * a_t + b_t;
// print("df_dx " + str(df_dx))
float64 v = PI_VALUE * A * cos(PI_VALUE * f_t) * sin(PI_VALUE * y_n) * df_dx;
values_ptr[idx] = sqrt(u * u + v * v);
u_values_ptr[idx] = u;
v_values_ptr[idx] = v;
w_values_ptr[idx] = 0;
// values[idx] = u * u + v * v
// values[idx] = value
// print("u " + str(u) + " v " + str(v) + " mag " + str(math.sqrt(u * u + v * v)))
idx++;
}
}
}

//print(values)
}

#endif
Loading

0 comments on commit 5b82d68

Please sign in to comment.