Skip to content

Commit b3730a7

Browse files
committed
docs: dedupe precision definition and point to authoritative forbidden-patterns list
1 parent 9597e3a commit b3730a7

2 files changed

Lines changed: 3 additions & 4 deletions

File tree

.claude/rules/fortran-conventions.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,8 @@ Enforced by convention/code review (not automated):
5353
- Fortran-side runtime validation also exists in `m_checker*.fpp` files using `@:PROHIBIT`
5454

5555
## Precision Types
56-
- `wp` (working precision): used for computation. Double by default.
57-
- `stp` (storage precision): used for field data arrays and I/O. Double by default.
58-
- In single-precision mode (`--single`): both become single.
59-
- In mixed-precision mode (`--mixed`): wp=double, stp=half.
56+
`wp`/`stp` are defined in `CLAUDE.md` (`wp` = computation, `stp` = field-data storage + I/O). Detail:
57+
- Modes: default both double; `--single` → both single; `--mixed` → wp=double, stp=half.
6058
- MPI type matching: `mpi_p` must match `wp`, `mpi_io_p` must match `stp`.
6159
- Always use generic intrinsics: `sqrt` not `dsqrt`, `abs` not `dabs`.
6260
- Cast with `real(..., wp)` or `real(..., stp)`, never `dble(...)`.

CLAUDE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ NEVER use double-precision intrinsics: `dsqrt`, `dexp`, `dlog`, `dble`, `dabs`,
104104
NEVER use `d` exponent literals (`1.0d0`). Use `1.0_wp` instead.
105105
NEVER use `stop` or `error stop`. Use `call s_mpi_abort()` or `@:PROHIBIT()`/`@:ASSERT()`.
106106
NEVER use `goto`, `COMMON` blocks, or global `save` variables.
107+
(Headline subset; full lint-enforced list — incl. Python/shell rules — in `.claude/rules/fortran-conventions.md`.)
107108

108109
Every `@:ALLOCATE(...)` MUST have a matching `@:DEALLOCATE(...)`.
109110
Every new parameter MUST be added in at least 2 places (3 if it has constraints):

0 commit comments

Comments
 (0)