Skip to content
Merged
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
12 changes: 10 additions & 2 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
*.ipynb linguist-detectable=false

# handles large files via git-lfs
*.ref filter=lfs diff=lfs merge=lfs -text

# handles lf and crlf for those using git on windows with wsl
* text=auto
*.sh text eol=lf
*.sh text eol=lf
*.bash text eol=lf
*.csv text eol=lf

# makes ipynb extension not detectable by linguist
*.ipynb linguist-detectable=false
6 changes: 2 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
push:
branches:
- "master"
- "dev-ci"
- "dev"
pull_request:
branches: [ "master" ]
workflow_dispatch:
Expand All @@ -16,7 +16,7 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4
with:
lfs: true # Keep enabled as you use LFS
lfs: true # we use LFS to store large files (e.g. data.nc)

- name: Install Dependencies (Build + Test)
run: |
Expand All @@ -39,7 +39,6 @@ jobs:
- name: Check ForeFire version
run: ./bin/forefire -v

# --- KEEPING DIAGNOSTIC STEPS ---
- name: Add Build/Runtime Diagnostics
run: |
echo "--- ForeFire Linkage ---"
Expand All @@ -49,7 +48,6 @@ jobs:
# Install ncdump tool and check the format kind
sudo apt-get install -y --no-install-recommends netcdf-bin
ncdump -k tests/runff/data.nc || echo "Could not check data.nc format"
# --- END DIAGNOSTIC STEPS ---

- name: Run 'runff' Test Script
run: |
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ We welcome code contributions, from bug fixes to new features.

2. **Set Up Development Environment:**

Follow the instructions in the [Installation Guide](https://firefront.readthedocs.io/en/latest/getting_started/installation.html) to build ForeFire from source. *(Update link if RTD URL changes)*
Follow the instructions in the [Installation Guide](https://forefire.readthedocs.io/en/latest/getting_started/installation.html) to build ForeFire from source. *(Update link if RTD URL changes)*

3. **Fork the Repository:**

Expand All @@ -64,7 +64,7 @@ We welcome code contributions, from bug fixes to new features.
Implement your code changes, following existing coding style and conventions where possible.
6. **Add Tests (if applicable):**

For new features or significant bug fixes, please add corresponding tests or update existing ones. See the [Testing Documentation](https://firefront.readthedocs.io/en/latest/developer_guide/testing.html) *(Placeholder: Link to testing section once created)* for details on how to run tests. Ensure all tests pass locally.
For new features or significant bug fixes, please add corresponding tests or update existing ones. See the [Testing Documentation](https://forefire.readthedocs.io/en/latest/developer_guide/testing.html) *(Placeholder: Link to testing section once created)* for details on how to run tests. Ensure all tests pass locally.
```bash
# Example command to run tests (adjust as needed)
cd tests && bash run.bash
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@
[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)
![Language](https://img.shields.io/badge/C++-00599C?logo=c%2B%2B&logoColor=white)
![Language](https://img.shields.io/badge/Python-3776AB?logo=python&logoColor=white)
[![Documentation Status](https://readthedocs.org/projects/firefront/badge/?version=latest)](https://firefront.readthedocs.io/en/latest/?badge=latest)
[![Documentation Status](https://readthedocs.org/projects/forefire/badge/?version=latest)](https://forefire.readthedocs.io/en/latest/?badge=latest)
[![DOI](https://img.shields.io/badge/DOI-10.14195/978--989--26--0884--6_29-blue)](https://www.researchgate.net/publication/278769168_ForeFire_open-source_code_for_wildland_fire_spread_models) <!-- Or use Zenodo DOI if available -->


**ForeFire** is an open-source **wildfire simulation engine** written in C++. Developed by CNRS at the [Université de Corse Pascal Paoli](https://www.univ-corse.fr/), it is used for research and operational forecasting. The engine implements various fire behavior models and enables high-fidelity coupled fire-atmosphere simulations, aiming to improve wildfire prediction and understanding for complex environments.


**Key Links:**
- 📚 **Full Documentation:** [forefire.readthedocs.io](https://firefront.readthedocs.io/en/latest/)
- 📚 **Full Documentation:** [forefire.readthedocs.io](https://forefire.readthedocs.io/en/latest/)
- 🚀 **Live Demo:** [forefire.univ-corse.fr/sim](http://forefire.univ-corse.fr/sim)
- 🌍 **Website:** [forefire.univ-corse.fr](https://forefire.univ-corse.fr/)

Expand Down Expand Up @@ -74,7 +74,7 @@ The easiest way to get started is often using Docker and the interactive console
forefire> listenHTTP[]

# the output should be
>> HTTP command server listening at http://localhost:8000
>> ForeFire HTTP command server listening at http://localhost:8000
```

This server provides a grafical user interface that you can access on your browser at http://localhost:8000/
Expand Down
2 changes: 1 addition & 1 deletion bindings/python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

# Determine current directory (where setup.py resides)
this_dir = os.path.abspath(os.path.dirname(__file__))
# Compute the top-level ForeFire directory (two levels up: bindings/python -> bindings -> firefront)
# Compute the top-level ForeFire directory (two levels up: bindings/python -> bindings -> forefire)
FOREFIRE_DIR = os.path.abspath(os.path.join(this_dir, "..", ".."))
FOREFIRE_LIB = "forefireL" # as used in lib/libforefireL.dylib (or .so/.dll)

Expand Down
14 changes: 7 additions & 7 deletions docs/source/getting_started/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ The repository provides a convenience script (`install-forefire.sh`) that automa
.. code-block:: bash

git clone https://github.com/forefireAPI/forefire.git
cd firefront
cd forefire

2. **Run the install script:**

Expand Down Expand Up @@ -66,7 +66,7 @@ Use this method if you are not on Debian/Ubuntu, prefer manual control, or don't
.. code-block:: bash

git clone https://github.com/forefireAPI/forefire.git
cd firefront
cd forefire

2. **Install Prerequisites Manually:**

Expand Down Expand Up @@ -102,21 +102,21 @@ The main executable `forefire` will be located at `../bin/forefire` (relative to

.. code-block:: bash

# Execute this from the root of the firefront repository
# Execute this from the root of the forefire repository
export PATH=$PATH:`pwd`/bin

**Permanently:**

Add the following line to your shell's configuration file (e.g., `~/.bashrc`, `~/.zshrc`, `~/.profile`, or `~/.config/fish/config.fish`). Replace `/path/to/firefront` with the actual absolute path to the cloned repository.
Add the following line to your shell's configuration file (e.g., `~/.bashrc`, `~/.zshrc`, `~/.profile`, or `~/.config/fish/config.fish`). Replace `/path/to/forefire` with the actual absolute path to the cloned repository.

.. code-block:: bash

export PATH="/path/to/firefront/bin:$PATH"
export PATH="/path/to/forefire/bin:$PATH"

*Optional:* The install script also sets `export FOREFIREHOME="/path/to/firefront"`. You may want to add this line as well, as some scripts or components might potentially use it.
*Optional:* The install script also sets `export FOREFIREHOME="/path/to/forefire"`. You may want to add this line as well, as some scripts or components might potentially use it.

.. code-block:: bash

export FOREFIREHOME="/path/to/firefront"
export FOREFIREHOME="/path/to/forefire"

After editing your configuration file, either restart your terminal or reload the configuration (e.g., `source ~/.bashrc`).
4 changes: 2 additions & 2 deletions docs/source/getting_started/quickstart.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Steps

.. code-block:: bash

cd firefront
cd forefire
docker build . -t forefire:latest

This might take a few minutes the first time as it downloads base images and installs dependencies inside the Docker build environment.
Expand Down Expand Up @@ -58,7 +58,7 @@ Steps

forefire> listenHTTP[]

You should see output like: `>> HTTP command server listening at http://localhost:8000`
You should see the output : `>> ForeFire HTTP command server listening at http://localhost:8000`

7. **Access the Web Console:**

Expand Down
20 changes: 17 additions & 3 deletions docs/source/getting_started/running_the_example.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ This is the simplest way to run a simulation non-interactively by feeding the en

1. **Navigate to the test directory:**

Ensure your terminal's current directory is the root of the cloned `firefront` repository. Then navigate:
Ensure your terminal's current directory is the root of the cloned `forefire` repository. Then navigate:

.. code-block:: bash

Expand Down Expand Up @@ -100,16 +100,30 @@ This method uses the built-in HTTP server to provide a web-based console and map

cd tests/runff

2. **Start the ForeFire interpreter** (as shown in Method 2, ensuring you start it from *within* the `tests/runff` directory for simplicity with file paths in the next steps).
2. **Start the ForeFire interpreter and launch the HTTP server:**

3. **Launch the HTTP server:**
Assuming ``forefire`` is in your PATH:

.. code-block:: bash

forefire

At the ``forefire>`` prompt, type:

.. code-block:: none

forefire> listenHTTP[]

You should see the output: `>> ForeFire HTTP command server listening at http://localhost:8000`.

**Alternative Shortcut** using ``-l`` (listen) flag:

Alternatively, to launch the HTTP server directly without entering the interactive console first, you can use the `-l` command-line option. This is convenient if you primarily want to use the web interface.

.. code-block:: none

forefire -l

4. **Use the Web Interface:**

- Open your browser to ``http://localhost:8000/`` (or the specified port).
Expand Down
52 changes: 41 additions & 11 deletions docs/source/reference/api_reference.rst
Original file line number Diff line number Diff line change
@@ -1,22 +1,30 @@
C++ API Reference
=================

This section will contain the C++ API reference, automatically generated from source code comments using Doxygen and Breathe.
This section provides a high-level overview of the most fundamental C++ classes and interfaces that constitute the ForeFire simulation engine. For a comprehensive, detailed API reference for all classes and functions, please consult the full Doxygen-generated documentation.

Key C++ classes providing the core functionality of ForeFire include:
Core Simulation Objects
-----------------------

These classes represent the primary entities in a wildfire simulation.

.. doxygenclass:: libforefire::FireDomain
:project: ForeFire
:members:

.. doxygenclass:: libforefire::FireNode
.. doxygenclass:: libforefire::FireFront
:project: ForeFire
:members:

.. doxygenclass:: libforefire::FireFront
.. doxygenclass:: libforefire::FireNode
:project: ForeFire
:members:

Data Management
---------------

These classes are central to how ForeFire handles environmental and simulation data.

.. doxygenclass:: libforefire::DataBroker
:project: ForeFire
:members:
Expand All @@ -25,13 +33,26 @@ Key C++ classes providing the core functionality of ForeFire include:
:project: ForeFire
:members:

.. .. doxygenclass:: libforefire::PropagationModel
.. :project: ForeFire
.. :members:
.. rubric:: Note
ForeFire provides various specializations of ``DataLayer`` (e.g., for 2D/3D arrays, NetCDF files, fuel properties, atmospheric data) to handle different data sources and types. Refer to the full Doxygen documentation for details on specific implementations like ``Array2DdataLayer``, ``NCXYZTDataLayer``, ``FuelDataLayer``, etc.

Scientific Model Interfaces
---------------------------

These abstract base classes define how new scientific models for fire spread and flux calculations can be integrated.

.. doxygenclass:: libforefire::PropagationModel
:project: ForeFire
:members:

.. doxygenclass:: libforefire::FluxModel
:project: ForeFire
:members:

User Interaction & Configuration
--------------------------------

.. .. doxygenclass:: libforefire::FluxModel
.. :project: ForeFire
.. :members:
These components manage user commands and simulation parameters.

.. doxygenclass:: libforefire::Command
:project: ForeFire
Expand All @@ -41,6 +62,15 @@ Key C++ classes providing the core functionality of ForeFire include:
:project: ForeFire
:members:

.. doxygenclass:: libforefire::Simulator
Fundamental Utilities
---------------------

Basic geometric data types used throughout the simulation.

.. doxygenclass:: libforefire::FFPoint
:project: ForeFire
:members:

.. doxygenclass:: libforefire::FFVector
:project: ForeFire
:members: