Skip to content
Open
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
42 changes: 42 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Pre-commit configuration for OPM-grid
# This configuration uses the pre-commit framework to automatically format source files
# before commits, ensuring consistent code style across the project.
#
# Installation:
# -------------
# 1. Install pre-commit (choose one method):
# - Via pip: pip install pre-commit
# - Via conda: conda install -c conda-forge pre-commit
# - Via homebrew (macOS): brew install pre-commit
# - Via package manager (Ubuntu/Debian): apt install pre-commit
#
# 2. Install the hooks in your local repository:
# pre-commit install
#
# Usage:
# ------
# - Hooks run automatically on every commit
# - To run manually on all files: pre-commit run --all-files
# - To run on specific files: pre-commit run --files <file1> <file2>
# - To skip hooks for a commit: git commit --no-verify
# - To update hook versions: pre-commit autoupdate
#
# What these hooks do:
# -------------------
# - trailing-whitespace: Removes trailing whitespace from lines
# (preserves Markdown hard line breaks with --markdown-linebreak-ext=md)
# - end-of-file-fixer: Ensures files end with exactly one newline
#

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0 # Latest release as of August 2025
hooks:
- id: trailing-whitespace
args: [--markdown-linebreak-ext=md]
types_or: [c, c++, python, shell, yaml, cmake, markdown, text]
exclude: '^(build/|\.git/)'

- id: end-of-file-fixer
types_or: [c, c++, python, shell, yaml, cmake, markdown, text]
exclude: '^(build/|\.git/)'
6 changes: 3 additions & 3 deletions INSTALL
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Getting started

Suppose you have downloaded all DUNE modules of interest to your
computer and extracted then in one common directory. See [1] for a
list of available modules.
list of available modules.

To compile the modules Dune has to check several components of
your system and whether prerequisites within the modules are met. For
Expand All @@ -22,7 +22,7 @@ automake tools. Run
to commence those tests and build all modules you have
downloaded. Don't worry about messages telling you that libraries are
missing: they are only needed for grid-self-checks we need for
developing.
developing.

You can customize the build to your specific needs by using an options file
(see below)
Expand Down Expand Up @@ -74,7 +74,7 @@ dunecontrol --only=dune-common autogen --help
(In the svn version this has to be calles after running autogen.)


An example of an options file is
An example of an options file is

# use a special compiler (g++ version 3.4) and install to a custom
# directory, default is /usr/local/bin
Expand Down
4 changes: 2 additions & 2 deletions doc/EquationNotes.tex
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ \subsection{The transport equation}
\end{align*}
Using equation \eqref{eq:GradPcap} we eliminate the phase pressures.
\begin{align*}
\Kb\nabla p_{cow} & = -\lambda_o^{-1}\vb_o + \rho_o\Kb\gb
\Kb\nabla p_{cow} & = -\lambda_o^{-1}\vb_o + \rho_o\Kb\gb
+ \lambda_w^{-1}\vb_w - \rho_w\Kb\gb \\
& = -\lambda_o^{-1}\vb_o
& = -\lambda_o^{-1}\vb_o
+ \lambda_w^{-1}\vb_w + (\rho_o - \rho_w)\Kb\gb \\
\end{align*}
Now we use equation~\eqref{eq:Vtot} to eliminate $\vb_o$:
Expand Down
2 changes: 1 addition & 1 deletion doc/doxygen/bestpractice.wml
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,4 @@ source files and by the include statements in these source files.</p>
source files are parsed. Entering a <tt>@defgroup</tt> statement makes
this module known to doxygen so that all modules mentioned in the
<tt>modules</tt> file are listed first and in the order they are
defined there.</p>
defined there.</p>
2 changes: 1 addition & 1 deletion doc/man1/mirror_grid.1
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
.SH NAME
mirror_grid \- Mirror the grid in one direction.
.SH SYNOPSIS
.B mirror_grid
.B mirror_grid
\fI\,filename.grdecl\/\fR
\fI\,direction\/\fR
.SH DESCRIPTION
Expand Down
4 changes: 2 additions & 2 deletions tests/CORNERPOINT_ACTNUM.DATA
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
RUNSPEC
RUNSPEC

DIMENS
10 10 5 /
Expand Down Expand Up @@ -200,7 +200,7 @@ ZCORN
/

ACTNUM
200*0 100*1 200*0 /
200*0 100*1 200*0 /

PORO
500*0.15 /
Expand Down