Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

modernize the f77 eigenvalue module, prettify #282

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .github/workflows/pretty.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Pretty

on:
push:

pull_request:

workflow_dispatch:

jobs:
docs:
name: Code formatting
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Count
run: ./mfc.sh format diff
19 changes: 15 additions & 4 deletions mfc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -159,10 +159,21 @@ elif [ "$1" == "format" ]; then
pip3 install --upgrade fprettify
fi

fprettify ${@:-src} --exclude "src/*/autogen" --recursive --silent \
--indent 4 --c-relations --enable-replacements --enable-decl \
--whitespace-comma 1 --whitespace-multdiv 1 --whitespace-plusminus 1 \
--case 1 1 1 1 --strict-indent
opts="--recursive --silent --indent 4 --c-relations --enable-replacements --enable-decl --whitespace-comma 0 --whitespace-multdiv 0 --whitespace-plusminus 1 --case 1 1 1 1 --strict-indent --line-length 1000"
if [ "$1" == "diff" ]; then
shift
out=$(fprettify ${@:-src} --exclude "src/*/autogen" $opts -s -d)
if [ -z "${out}" ]; then
sbryngelson marked this conversation as resolved.
Show resolved Hide resolved
echo "Already pretty!"
exit 0
else
error "Not pretty, run ./mfc.sh format"

exit 1
fi
fi

fprettify ${@:-src} --exclude "src/*/autogen" $opts
ret="$?"

if [ "$ret" != '0' ]; then
Expand Down
6 changes: 6 additions & 0 deletions src/common/m_derived_types.fpp
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,9 @@ module m_derived_types
real(kind(0d0)), dimension(num_fluids_max) :: alpha
real(kind(0d0)) :: gamma
real(kind(0d0)) :: pi_inf !<
real(kind(0d0)) :: cv !<
real(kind(0d0)) :: qv !<
real(kind(0d0)) :: qvp !<


!! Primitive variables associated with the patch. In order, these include
Expand All @@ -178,6 +181,9 @@ module m_derived_types
real(kind(0d0)) :: gamma !< Sp. heat ratio
real(kind(0d0)) :: pi_inf !< Liquid stiffness
real(kind(0d0)), dimension(2) :: Re !< Reynolds number
REAL(KIND(0d0)) :: cv !< heat capacity
REAL(KIND(0d0)) :: qv !< reference energy per unit mass for SGEOS, q (see Le Metayer (2004))
REAL(KIND(0d0)) :: qvp !< reference entropy per unit mass for SGEOS, q' (see Le Metayer (2004))
real(kind(0d0)) :: mul0 !< Bubble viscosity
real(kind(0d0)) :: ss !< Bubble surface tension
real(kind(0d0)) :: pv !< Bubble vapour pressure
Expand Down
Loading
Loading