FLUE_constants
Module FLUE_constants Numerical constants and precision definitions for the FLUE codebase.
Purpose: This module provides a centralised and portable definition of working precisions and commonly used mathematical constants using ISO_C_BINDING.
Design:
WPdefines the working real precision (double precision).WCdefines the corresponding complex precision.SPprovides single precision support where needed.
Mathematical constants:
PIis defined viaacos(-1)for portability.TWO_PIis provided to avoid repeated computation and magic numbers.
Example:
use FLUE_constants, only: WP, PI
real(kind=WP) :: theta
theta = 2.0_WP * PISource: src/constants.f90
Dependencies
Variables
| Name | Type | Attributes | Description |
|---|---|---|---|
WP | integer | parameter | Working precision for real-valued computations [double precision] |
WC | integer | parameter | Working precision for complex-valued computations [double precision complex]. |
PI | real(kind=WP) | parameter | Circular constant π ~ 3.14..... |
TWO_PI | real(kind=WP) | parameter | 2π. |
SP | integer | parameter | Single precision kind |