Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/smillerc/coarray_field
A simple high-level field object in Fortran that manages domain decomposition via coarrays
https://github.com/smillerc/coarray_field
coarray-fortran fortran fortran2018
Last synced: about 1 month ago
JSON representation
A simple high-level field object in Fortran that manages domain decomposition via coarrays
- Host: GitHub
- URL: https://github.com/smillerc/coarray_field
- Owner: smillerc
- Created: 2020-10-26T19:10:54.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2020-12-03T15:01:56.000Z (about 4 years ago)
- Last Synced: 2024-01-30T09:11:49.579Z (12 months ago)
- Topics: coarray-fortran, fortran, fortran2018
- Language: Fortran
- Homepage:
- Size: 84 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# A high level coarray field object to manage domain decomposition
* The goal of this project is to demonstrate how coarrays can be used to decompose a domain for physics-type simulations.
* This project starts off with the `Field` class from the book [Modern Fortran](https://github.com/modern-fortran/tsunami) by Milan Curcic
* Rudimentary field serialization is via the [`h5fortran`](https://github.com/geospace-code/h5fortran) library by Michael Hirsch
* Eventual OpenCL integration via the [`Focal`](https://github.com/LKedward/focal) library by Laurence Kedward## Build instructions
```bash
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE="Debug" \
-DENABLE_COARRAY=ON \
-DUSE_OPENMP_THREADS=NO \
-DUSE_OPENMP_SIMD=YES \
-DUSE_OPENCL=NO \
-DENABLE_TESTING=YES
```## Example Use [WIP]
```fortran
type(field_2d_t) :: rho, u, rho_urho = field_2d(name='rho', long_name='density', &
descrip='Cell-centered mass density', &
units='g/cc', global_dims=[20, 20], n_halo_cells=2)u = field_2d(name='u', long_name='x-velocity', &
descrip='Cell-centered x-velocity', &
units='cm/s', global_dims=[20, 20], n_halo_cells=2)! Create a new field based off of existing ones
rho_u = rho * u! Get max
call rho_u%maxval()
```