Skip to content

Commit a66cb96

Browse files
authored
Merge pull request #4 from CEED/fms-v0.2-dev
Final changes for FMS v0.2
2 parents 6b2cb5c + 52a1000 commit a66cb96

29 files changed

+1478
-1194
lines changed

.github/workflows/build-and-test.yaml

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# Copyright (c) 2021, Lawrence Livermore National Security, LLC. Produced at
2+
# the Lawrence Livermore National Laboratory. LLNL-CODE-734707. All Rights
3+
# reserved. See files LICENSE and NOTICE for details.
4+
#
5+
# This file is part of CEED, a collection of benchmarks, miniapps, software
6+
# libraries and APIs for efficient high-order finite element and spectral
7+
# element discretizations for exascale applications. For more information and
8+
# source code availability see http://github.com/ceed.
9+
#
10+
# The CEED research is supported by the Exascale Computing Project (17-SC-20-SC)
11+
# a collaborative effort of two U.S. Department of Energy organizations (Office
12+
# of Science and the National Nuclear Security Administration) responsible for
13+
# the planning and preparation of a capable exascale ecosystem, including
14+
# software, applications, hardware, advanced system engineering and early
15+
# testbed platforms, in support of the nation's exascale computing imperative.
16+
17+
name: Build and test
18+
19+
on:
20+
push:
21+
branches: [ master ]
22+
pull_request:
23+
branches: [ master ]
24+
25+
env:
26+
BUILD_C_FLAGS: -Wall -Wextra -pedantic -Werror
27+
BUILD_CXX_FLAGS: -Wall -Wextra -pedantic -Werror
28+
29+
jobs:
30+
build-and-test:
31+
runs-on: ${{matrix.os}}
32+
strategy:
33+
matrix:
34+
os: [ubuntu-latest, macos-latest]
35+
build-type: [Debug, Release]
36+
name: ${{matrix.os}}-${{matrix.build-type}}
37+
38+
steps:
39+
- uses: actions/checkout@v2
40+
with:
41+
submodules: recursive
42+
43+
- name: Configure
44+
run: |
45+
cmake \
46+
-B ${{github.workspace}}/build \
47+
-DCMAKE_BUILD_TYPE=${{matrix.build-type}} \
48+
-DFMS_ENABLE_TESTS=ON \
49+
-DCMAKE_C_FLAGS="$BUILD_C_FLAGS" \
50+
-DCMAKE_CXX_FLAGS="$BUILD_CXX_FLAGS" \
51+
-DCMAKE_INSTALL_PREFIX=${{github.workspace}}/install \
52+
-DCMAKE_VERBOSE_MAKEFILE=ON
53+
54+
- name: Build
55+
run: |
56+
cmake \
57+
--build ${{github.workspace}}/build \
58+
--config ${{matrix.build-type}}
59+
60+
- name: Install
61+
run: |
62+
cmake \
63+
--build ${{github.workspace}}/build \
64+
--config ${{matrix.build-type}} \
65+
--target install
66+
67+
- name: Test
68+
working-directory: ${{github.workspace}}/build
69+
run: ctest -C ${{matrix.build-type}} --output-on-failure

.github/workflows/check-style.yaml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Copyright (c) 2021, Lawrence Livermore National Security, LLC. Produced at
2+
# the Lawrence Livermore National Laboratory. LLNL-CODE-734707. All Rights
3+
# reserved. See files LICENSE and NOTICE for details.
4+
#
5+
# This file is part of CEED, a collection of benchmarks, miniapps, software
6+
# libraries and APIs for efficient high-order finite element and spectral
7+
# element discretizations for exascale applications. For more information and
8+
# source code availability see http://github.com/ceed.
9+
#
10+
# The CEED research is supported by the Exascale Computing Project (17-SC-20-SC)
11+
# a collaborative effort of two U.S. Department of Energy organizations (Office
12+
# of Science and the National Nuclear Security Administration) responsible for
13+
# the planning and preparation of a capable exascale ecosystem, including
14+
# software, applications, hardware, advanced system engineering and early
15+
# testbed platforms, in support of the nation's exascale computing imperative.
16+
17+
name: Check style
18+
19+
on:
20+
push:
21+
branches: [ master ]
22+
pull_request:
23+
branches: [ master ]
24+
25+
jobs:
26+
check-style:
27+
runs-on: ubuntu-20.04
28+
29+
steps:
30+
- name: Checkout
31+
uses: actions/checkout@v2
32+
33+
- name: Get astyle
34+
run: sudo apt-get install astyle
35+
36+
- name: Check style
37+
run: ./apply-style.sh

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ data/
66
*.out
77

88
# IDE directories
9-
.vscode/
9+
.vscode/

CHANGELOG

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
███████ ███ ███ ███████
2+
██ ████ ████ ██
3+
█████ ██ ████ ██ ███████
4+
██ ██ ██ ██ ██
5+
██ ██ ██ ███████
6+
7+
CEED's high-order Field and Mesh Specification
8+
9+
10+
Version 0.2, released on Sep 10, 2021
11+
=====================================
12+
13+
- Added support for writing and reading FmsDataCollections both in ASCII and
14+
binary format via Conduit.
15+
16+
- Visualization for FMS files is available in VisIt v3.2, visit.llnl.gov.
17+
18+
- Added regression and code styling.
19+
20+
21+
Version 0.1, released on Jul 8, 2018
22+
====================================
23+
24+
- Initial release.

CMakeLists.txt

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2017, Lawrence Livermore National Security, LLC. Produced at
1+
# Copyright (c) 2021, Lawrence Livermore National Security, LLC. Produced at
22
# the Lawrence Livermore National Laboratory. LLNL-CODE-734707. All Rights
33
# reserved. See files LICENSE and NOTICE for details.
44
#
@@ -17,8 +17,9 @@
1717
# We use the C_STANDARD target property introduced in CMake 3.1
1818
cmake_minimum_required (VERSION 3.1)
1919

20-
# Project name
21-
project(FMS VERSION 0.1 LANGUAGES C)
20+
# Project name and version.
21+
# The version is also defined in the files: fms.h and Doxyfile.
22+
project(FMS VERSION 0.2 LANGUAGES C)
2223

2324
# Optional demo - see examples/README.md for more information
2425
option(FMS_ENABLE_DEMO "Enable the PUMI + MFEM demo" OFF)
@@ -37,7 +38,8 @@ endif()
3738
# Setup thirdparty dependencies
3839
# Optional conduit implementation for IO functions
3940
if(CONDUIT_DIR)
40-
find_package(Conduit 0.5.1 REQUIRED
41+
enable_language(CXX)
42+
find_package(Conduit 0.7.1 REQUIRED
4143
HINTS ${CONDUIT_DIR}
4244
NO_DEFAULT_PATH)
4345
set(FMS_HAVE_CONDUIT TRUE)
@@ -67,9 +69,9 @@ if(FMS_ENABLE_DEMO)
6769
endif()
6870

6971
if(PUMI_DIR)
70-
find_package(SCOREC 2.1.0 REQUIRED
71-
CONFIG
72-
HINTS ${PUMI_DIR}
72+
find_package(SCOREC 2.1.0 REQUIRED
73+
CONFIG
74+
HINTS ${PUMI_DIR}
7375
NO_DEFAULT_PATH)
7476
set(FMS_HAVE_PUMI TRUE)
7577
message(STATUS "Demo using PUMI: ${SCOREC_DIR}")

Doxyfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ PROJECT_NAME = "FMS"
3838
# could be handy for archiving the generated documentation or if some version
3939
# control system is used.
4040

41-
PROJECT_NUMBER = v0.1
41+
PROJECT_NUMBER = v0.2
4242

4343
# Using the PROJECT_BRIEF tag one can provide an optional one line description
4444
# for a project that appears at the top of each page and should give viewer a
@@ -2034,7 +2034,7 @@ PERLMOD_MAKEVAR_PREFIX =
20342034
# C-preprocessor directives found in the sources and include files.
20352035
# The default value is: YES.
20362036

2037-
ENABLE_PREPROCESSING = NO
2037+
ENABLE_PREPROCESSING = YES
20382038

20392039
# If the MACRO_EXPANSION tag is set to YES, doxygen will expand all macro names
20402040
# in the source code. If set to NO, only conditional compilation will be

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
BSD 2-Clause License
22

3-
Copyright (c) 2017 Lawrence Livermore National Security, LLC.
3+
Copyright (c) 2021 Lawrence Livermore National Security, LLC.
44
All rights reserved.
55

66
Redistribution and use in source and binary forms, with or without

README.md

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,17 @@
1-
# FMS: CEED's high-order Field and Mesh Specification
1+
███████ ███ ███ ███████
2+
██ ████ ████ ██
3+
█████ ██ ████ ██ ███████
4+
██ ██ ██ ██ ██
5+
██ ██ ██ ███████
6+
7+
CEED's high-order Field and Mesh Specification
8+
29

310
[![License](https://img.shields.io/badge/License-BSD%202--Clause-orange.svg)](https://opensource.org/licenses/BSD-2-Clause)
411
[![Documentation](https://codedocs.xyz/CEED/FMS.svg)](https://codedocs.xyz/CEED/FMS/)
12+
[![Build and Test (GH Actions)](https://github.com/CEED/FMS/actions/workflows/build-and-test.yaml/badge.svg?branch=master)](https://github.com/CEED/FMS/actions?query=workflow%3Abuild-and-test)
13+
[![Build and Test (GH Actions)](https://github.com/CEED/FMS/actions/workflows/check-style.yaml/badge.svg?branch=master)](https://github.com/CEED/FMS/actions?query=workflow%3Acheck-style)
14+
515

616
## High-Order Data Description
717

@@ -16,6 +26,9 @@ solutions and meshes, as those depicted below, as well as non-standard finite
1626
elements, such as Nedelec and Raviart-Thomas elements. See the [FMS
1727
documentation](doc/fms.md) for more details.
1828

29+
Initial support for the FMS file formats is available in
30+
[VisIt](https://visit.llnl.gov/) version 3.2.
31+
1932
![High-order mesh and solution](doc/triple-pt-2x2.png)
2033

2134
The following diagram illustrates the current and planned components of FMS.
@@ -42,7 +55,8 @@ exchange and high-order visualization and data analysis.
4255

4356
## Building
4457

45-
You can get started with the default build configuration using the command line listed below. Checkout the [build documentation](doc/build.md) for more info.
58+
You can get started with the default build configuration using the command line
59+
listed below. Checkout the [build documentation](doc/build.md) for more info.
4660

4761
```console
4862
mkdir build
@@ -61,7 +75,7 @@ or by leaving a comment in the [issue tracker](https://github.com/CEED/FMS/issue
6175
The following copyright applies to each file in the CEED software suite, unless
6276
otherwise stated in the file:
6377

64-
> Copyright (c) 2017, Lawrence Livermore National Security, LLC. Produced at the
78+
> Copyright (c) 2021, Lawrence Livermore National Security, LLC. Produced at the
6579
> Lawrence Livermore National Laboratory. LLNL-CODE-734707. All Rights reserved.
6680
6781
See files LICENSE and NOTICE for details.

apply-style.sh

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
#!/bin/bash
2+
3+
# Copyright (c) 2021, Lawrence Livermore National Security, LLC. Produced at
4+
# the Lawrence Livermore National Laboratory. LLNL-CODE-734707. All Rights
5+
# reserved. See files LICENSE and NOTICE for details.
6+
#
7+
# This file is part of CEED, a collection of benchmarks, miniapps, software
8+
# libraries and APIs for efficient high-order finite element and spectral
9+
# element discretizations for exascale applications. For more information and
10+
# source code availability see http://github.com/ceed.
11+
#
12+
# The CEED research is supported by the Exascale Computing Project (17-SC-20-SC)
13+
# a collaborative effort of two U.S. Department of Energy organizations (Office
14+
# of Science and the National Nuclear Security Administration) responsible for
15+
# the planning and preparation of a capable exascale ecosystem, including
16+
# software, applications, hardware, advanced system engineering and early
17+
# testbed platforms, in support of the nation's exascale computing imperative.
18+
19+
function main()
20+
{
21+
cd $(dirname "$0")
22+
fms_astyle_file="fms.astylerc"
23+
if [[ ! -r "${fms_astyle_file}" ]]; then
24+
echo "FMS's astyle format file not found: '${fms_astyle_file}'. Stop."
25+
exit 21
26+
fi
27+
28+
find_astyle
29+
30+
local old_IFS="${IFS}"
31+
IFS=$'\n'
32+
format_files=($(git ls-files "*.[ch]" "*.[ch]pp"))
33+
if [[ "$?" -ne 0 ]]; then
34+
echo "Error getting list of C/C++ source files from Git. Stop."
35+
exit 22
36+
fi
37+
IFS="${old_IFS}"
38+
39+
if ${astyle_bin} --options="${fms_astyle_file}" "${format_files[@]}" | \
40+
grep "Formatted"; then
41+
printf "\nPlease make sure the changes are committed.\n\n"
42+
return 1
43+
else
44+
printf "All source files are properly formatted.\n"
45+
fi
46+
return 0
47+
} # end of function 'main'
48+
49+
function find_astyle()
50+
{
51+
astyle_req_version="Artistic Style Version 3.1"
52+
astyle_bin_list=("${ASTYLE_BIN:-astyle}" astyle-3.1)
53+
for astyle_bin in "${astyle_bin_list[@]}"; do
54+
if ! command -v "${astyle_bin}" > /dev/null 2>&1; then
55+
continue
56+
fi
57+
astyle_version="$("${astyle_bin}" --version)"
58+
if [[ "${astyle_version}" != "${astyle_req_version}" ]]; then
59+
continue
60+
fi
61+
return 0
62+
done
63+
echo "Required astyle version not found: '${astyle_req_version}'."
64+
printf "Astyle commands tried:"
65+
printf " '%s'" "${astyle_bin_list[@]}"
66+
printf ".\n"
67+
exit 23
68+
} # end of function 'find_astyle'
69+
70+
71+
# Invoke the 'main' function
72+
main "$@"

doc/build.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,4 +60,4 @@ cd build
6060
cmake -DFMS_DIR=*fms/install/prefix* ..
6161
make
6262
./main
63-
```
63+
```

doc/components.png

-188 KB
Loading

examples/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2020, Lawrence Livermore National Security, LLC. Produced at
1+
# Copyright (c) 2021, Lawrence Livermore National Security, LLC. Produced at
22
# the Lawrence Livermore National Laboratory. LLNL-CODE-734707. All Rights
33
# reserved. See files LICENSE and NOTICE for details.
44
#

examples/demo_pumi_mfem/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2020, Lawrence Livermore National Security, LLC. Produced at
1+
# Copyright (c) 2021, Lawrence Livermore National Security, LLC. Produced at
22
# the Lawrence Livermore National Laboratory. LLNL-CODE-734707. All Rights
33
# reserved. See files LICENSE and NOTICE for details.
44
#

examples/demo_pumi_mfem/demo_pumi_mfem.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ int main(int argc, char *argv[]) {
123123
}
124124

125125
// Edges
126-
FmsInt nvtxs = 2;
126+
const FmsInt nvtxs = 2;
127127
FmsInt num_edges = 0;
128128
int edge[nvtxs];
129129
itr = pumi_mesh->begin(1);
@@ -157,7 +157,7 @@ int main(int argc, char *argv[]) {
157157
pumi_mesh->end(itr);
158158

159159
// Define Face based on edge Id's
160-
FmsInt nedges = 3;
160+
const FmsInt nedges = 3;
161161
int face[nedges];
162162
int num_triangles = 0;
163163
itr = pumi_mesh->begin(2);
@@ -191,7 +191,7 @@ int main(int argc, char *argv[]) {
191191
pumi_mesh->end(itr);
192192

193193
// Define Elem based on face Id's
194-
FmsInt nfaces = 4;
194+
const FmsInt nfaces = 4;
195195
FmsEntityReordering EntReord;
196196
int tetOrd[4] = {0,1,3,2}; // PUMI order for tet element faces
197197
EntReord[FMS_TETRAHEDRON] = &tetOrd[0];

examples/include-fms/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ int main(int, char**) {
66
auto a = FmsMeshConstruct(&m);
77
printf("Hello %d\n", a);
88
return a;
9-
}
9+
}

0 commit comments

Comments
 (0)