-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from autotwin/dev
Dev
- Loading branch information
Showing
22 changed files
with
510 additions
and
126 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,73 @@ | ||
name: Python | ||
on: | ||
pull_request: | ||
branches: main | ||
release: | ||
types: published | ||
jobs: | ||
test: | ||
if: github.event_name != 'release' | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [macos-latest, ubuntu-latest, windows-latest] | ||
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v4 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: 1.79.0 | ||
default: true | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: maturin | ||
run: pip install maturin | ||
- name: build | ||
run: maturin build --release --features python | ||
- name: install | ||
run: pip install --find-links=target/wheels/ automesh[develop] | ||
- name: pycodestyle | ||
run: pycodestyle --verbose . | ||
- name: pytest | ||
run: pytest --verbose . | ||
wheels: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [macos-latest, ubuntu-latest, windows-latest] | ||
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: 1.79.0 | ||
default: true | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: maturin | ||
run: pip install maturin | ||
- name: build | ||
run: maturin build --release --features python | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: ${{ matrix.os }}-${{ matrix.python-version }}-wheel | ||
path: target/wheels | ||
twine: | ||
needs: wheels | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/download-artifact@v4 | ||
- name: check | ||
run: | | ||
mkdir -p wheelhouse/ | ||
mv ./*-wheel*/*.whl wheelhouse/ | ||
pip install twine | ||
twine check wheelhouse/*.whl | ||
- name: upload | ||
if: github.event_name == 'release' | ||
run: twine upload -u __token__ -p ${{ secrets.PYPI_TOKEN }} wheelhouse/*.whl |
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,47 @@ | ||
name: Rust | ||
on: | ||
pull_request: | ||
branches: main | ||
release: | ||
types: published | ||
env: | ||
CARGO_TERM_COLOR: always | ||
jobs: | ||
test: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [macos-latest, ubuntu-latest, windows-latest] | ||
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v4 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
components: clippy, rustfmt | ||
default: true | ||
toolchain: 1.79.0 | ||
- name: build | ||
run: cargo build --release | ||
- name: clippy | ||
run: cargo clippy --release -- -D warnings | ||
- name: doc | ||
run: cargo doc --release | ||
- name: fmt | ||
run: cargo fmt --all -- --check | ||
- name: test | ||
run: cargo test --release | ||
package: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v4 | ||
- name: package | ||
run: cargo package | ||
- name: login | ||
if: github.event_name == 'release' | ||
run: cargo login ${{ secrets.CRATES_IO_TOKEN }} | ||
- name: publish | ||
if: github.event_name == 'release' | ||
run: cargo publish |
This file was deleted.
Oops, something went wrong.
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,22 @@ | ||
# README | ||
|
||
* [Exodus II file format](exodus.md) | ||
|
||
|
||
## Discussions | ||
|
||
### 2024-07-03 | ||
|
||
* weekly interval pair programming Wed 1100-1300 EST (0900-1100 MST) | ||
* repo updates | ||
* pre-commit, prevent a local from commiting prior to push | ||
* maturin, PyO3 is the rust package for Python binding in Rust, and muturin is the packager | ||
* iterators are great, https://doc.rust-lang.org/std/iter/trait.Iterator.html | ||
|
||
```bash | ||
python -m pip install --upgrade pip | ||
pip install maturin | ||
maturin develop --release --extras dev | ||
# pip install pre-commit # already installed with maturin | ||
pre-commit install | ||
``` |
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,128 @@ | ||
# Exodus II | ||
|
||
## Excerpts from Schoof-1994[^Schoof-1994]: | ||
|
||
"EXODUS II is a model developed to store and retrieve data for finite element analyses. It is used for preprocesing (problem definition), postprocessing (results visualization), as well as code to code data transfer. An EXODUS II data file is a random access, machine independent binary file..." | ||
|
||
EXODUS II depends on the Network Common Data Form ([NetCDF](https://www.unidata.ucar.edu/software/netcdf/)) library. | ||
|
||
NetCDF is a public domain database library that provides low-level data storage. The NetCDF library stores data in eXternal Data Representation (XDR) format, which provides machine independency. | ||
|
||
EXODUS II library functions provide a map between finite element data objects and NetCDF dimensions, attributes, and variables. | ||
|
||
EXODUS II data objects: | ||
|
||
* Initialization Data | ||
* Number of nodes | ||
* Number of elements | ||
* *optional* informational text | ||
* et cetera | ||
* Model - static objects (i.e., objects that do not change over time) | ||
* Nodal coordinates | ||
* Element connectivity | ||
* Node sets | ||
* Side sets | ||
* *optional* Results | ||
* Nodal results | ||
* Element results | ||
* Global results | ||
|
||
Note: automesh will use Initialization Data and Model sections; it will not use the Results section. | ||
|
||
Quadrilateral | Hexahedral | ||
:---: | :---: | ||
![exodus_quad_node_numbering](fig/exodus_quad_node_numbering.png) | ![exodus_hex_node_numbering](fig/exodus_hex_node_numbering.png) | ||
|
||
> Figure 1: EXODUS II node numbering scheme for quadrilateral and hexahedral finite elements. | ||
Quadrilateral | Hexahedral | ||
:---: | :---: | ||
![exodus_quad_sideset_numbering](fig/exodus_quad_sideset_numbering.png) | ![exodus_hex_sideset_numbering](fig/exodus_hex_sideset_numbering.png) | ||
|
||
> Figure 2: EXODUS II sideset numbering scheme for quadrilateral and hexahedral finite elements. | ||
## Pattern | ||
|
||
```bash | ||
------ | ||
Test 1 | ||
------ | ||
nsd = 2 | ||
nelx = nely = 1 | ||
y | ||
^ | ||
3| 4 | ||
*-----* | ||
|4 3| | ||
| (1) | | ||
|1 2| | ||
*-----* --> x | ||
1 2 | ||
connectivity | ||
1 2 4 3 | ||
|
||
------ | ||
Test 2 | ||
------ | ||
nelx = 2 | ||
nely = 1 | ||
y | ||
^ | ||
4| 5 6 | ||
*-----*-----* | ||
|4 3|4 3| | ||
| (1) | (2) | | ||
|1 2|1 2| | ||
*-----*-----* --> x | ||
1 2 3 | ||
connectivity | ||
1 2 5 4 | ||
2 3 6 5 | ||
|
||
------ | ||
Test 3 | ||
------ | ||
nelx = 3 | ||
nely = 1 | ||
y | ||
^ | ||
5| 6 7 8 | ||
*-----*-----*-----* | ||
|4 3|4 3|4 3| | ||
| (1) | (2) | (3) | | ||
|1 2|1 2|1 2| | ||
*-----*-----*-----* --> x | ||
1 2 3 4 | ||
connectivity | ||
1 2 6 5 | ||
2 3 7 6 | ||
3 4 8 7 | ||
|
||
------ | ||
Test 4 | ||
------ | ||
nelx = 2 | ||
nely = 2 | ||
y | ||
^ | ||
7| 8 9 | ||
*-----*-----* | ||
|4 3|4 3| | ||
| (3) | (4) | | ||
|1 2|1 2| | ||
4*-----*-----*6 | ||
|4 3|4 3| | ||
| (1) | (2) | | ||
|1 2|1 2| | ||
*-----*-----* --> x | ||
1 2 3 | ||
connectivity | ||
1 2 5 4 | ||
2 3 6 4 | ||
4 6 8 7 | ||
5 6 9 8 | ||
``` | ||
|
||
## References | ||
|
||
[^Schoof-1994]: Schoof LA, Yarberry VR. EXODUS II: a finite element data model. Sandia National Lab.(SNL-NM), Albuquerque, NM (United States); 1994 Sep 1. [link](https://www.osti.gov/biblio/10102115) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.