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
2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright 2025-2026 Jonathan Demaeyer
Copyright 2025-2026 Jonathan Demaeyer and Oisín Hamilton

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Expand Down
41 changes: 37 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,30 @@ LayerCake has been designed with geophysics in mind, although it may be useful f

## About

(c) 2025-2026 Jonathan Demaeyer
(c) 2025-2026 Jonathan Demaeyer and Oisín Hamilton

See [LICENSE.txt](./LICENSE.txt) for license information.
See [LICENSE.txt](https://github.com/Climdyn/LayerCake/blob/main/LICENSE.txt) for license information.

## Installation

### With pip

Not yet available.
The easiest way to install and run LayerCake is to use [pip](https://pypi.org/).
Type in a terminal

pip install layercake-model

and you are set!

Additionally, you can clone the repository

git clone https://github.com/Climdyn/LayerCake.git

and perform a test by running the script

python examples/atmospheric/barotropic_one_layer.py

to see if everything runs smoothly (this should take less than 5 minutes).

### With Anaconda

Expand Down Expand Up @@ -64,12 +79,30 @@ To build the documentation, please run (with the conda environment activated):
You may need to install [make](https://www.gnu.org/software/make/) if it is not already present on your system.
Once built, the documentation is available [here](./documentation/build/html/index.html).

The documentation is also available online at https://climdyn.github.io/LayerCake/. In particular,
please consider reading the [User guide](https://climdyn.github.io/LayerCake/files/user_guide.html#).

## Examples

A few examples are available in the [examples](./examples) folder. More examples will be provided as the code is
developed.
further developed.

## Dependencies

LayerCake needs mainly:

* [Numpy](https://numpy.org/) for numeric support
* [sparse](https://sparse.pydata.org/) for sparse multidimensional arrays support
* [Numba](https://numba.pydata.org/) for code acceleration
* [Sympy](https://www.sympy.org/) for symbolic manipulation of inner products

Check the YAML file [environment.yml](https://raw.githubusercontent.com/Climdyn/LayerCake/main/environment.yml) for the dependencies.

## Contributing

LayerCake is in beta development phase, bug reports and tests of the features are welcome.
Please simply raise an issue on [Github](https://github.com/Climdyn/LayerCake/issues).

If you want to contribute actively to the development, please contact the main authors.
In addition, if you have made changes that you think will be useful to others, please feel free to suggest these as a pull request
on the [LayerCake Github repository](https://github.com/Climdyn/LayerCake/pulls).
48 changes: 44 additions & 4 deletions documentation/source/files/general_information.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,32 @@ LayerCake has been designed with geophysics in mind, although it may be useful f
About
-----

(c) 2025-2026 Jonathan Demaeyer
© 2025-2026 Jonathan Demaeyer and Oisín Hamilton

See `LICENSE.txt <../../../../LICENSE.txt>`_ for license information.
See `LICENSE.txt <https://github.com/Climdyn/LayerCake/blob/main/LICENSE.txt>`_ for license information.

Installation
------------

With pip
~~~~~~~~

Not yet available.
The easiest way to install and run LayerCake is to use `pip <https://pypi.org/>`_.
Type in a terminal ::

pip install layercake-model

and you are set!

Additionally, you can clone the repository ::

git clone https://github.com/Climdyn/LayerCake.git

and perform a test by running the script ::

python examples/atmospheric/barotropic_one_layer.py

to see if everything runs smoothly (this should take less than 5 minutes).

With Anaconda
~~~~~~~~~~~~~
Expand Down Expand Up @@ -62,14 +77,39 @@ To build the documentation, please run (with the conda environment activated): :
You may need to install `make <https://www.gnu.org/software/make/>`_ if it is not already present on your system.
Once built, the documentation is available `here <../index.html>`_.

The documentation is also available online at https://climdyn.github.io/LayerCake/. In particular,
please consider reading the `User guide <https://climdyn.github.io/LayerCake/files/user_guide.html#>`_.

Examples
--------

A few examples are available in the `examples <../../../../examples>`_ folder. More examples will be provided as the code is
developed.
further developed.

Dependencies
------------

LayerCake needs mainly:


* `Numpy`_ for numeric support
* `sparse`_ for sparse multidimensional arrays support
* `Numba`_ for code acceleration
* `Sympy`_ for symbolic manipulation of inner products

Check the YAML file `environment.yml <https://raw.githubusercontent.com/Climdyn/LayerCake/main/environment.yml>`_ for the dependencies.

Contributing
------------

LayerCake is in beta development phase, bug reports and tests of the features are welcome.
Please simply raise an issue on `Github <https://github.com/Climdyn/LayerCake/issues>`_.

If you want to contribute actively to the development, please contact the main authors.
In addition, if you have made changes that you think will be useful to others, please feel free to suggest these as a pull request
on the `LayerCake Github repository <https://github.com/Climdyn/LayerCake/pulls>`_.

.. _Numba: https://numba.pydata.org/
.. _Sympy: https://www.sympy.org/
.. _sparse: https://sparse.pydata.org/
.. _Numpy: https://numpy.org/
2 changes: 1 addition & 1 deletion documentation/source/files/tricks.rst
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ variables:

If this environment variable is not defined, then LayerCake default behavior is to use threads.
* The :code:`LAYERCAKE_PARALLEL_INTEGRATION` environment variable controls the Sympy symbolic integration parallelization. If set to :code:`none`, the parallelization will be deactivated.
Otherwise, it will parallelized using processes.
Otherwise, it will be parallelized using processes.
If this environment variable is not defined, then LayerCake default behavior is to parallelize using processes.

For example,
Expand Down
2 changes: 2 additions & 0 deletions layercake/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,5 @@
__all__ = ['Parameter', 'ParameterField', 'FunctionField', 'Field', 'Expression', 'SymbolicBasis', 'vorticity_advection', 'Jacobian',
'OperatorTerm', 'ProductOfTerms', 'AdditionOfTerms', 'LinearTerm', 'ConstantTerm', 'Equation', 'Laplacian', 'D',
'Layer', 'Cake']

__version__ = '1.0.2a0'
61 changes: 61 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@

# pyproject.toml

[build-system]
requires = ["setuptools", "wheel"]

[project]
requires-python = ">=3.10"
name = "layercake_model"
version = "1.0.2-alpha"
description = "A framework to design systems of partial differential equations (PDEs), and convert them to ordinary differential equations (ODEs) via Galerkin-type expansions. "
readme = "README.md"
authors = [
{ name = "Jonathan Demaeyer", email = "jodemaey@meteo.be" },
{ name = "Oisín Hamilton", email = "ush.hamilton@gmail.com" },
]
license = "BSD-3-Clause"
license-files = [ "LICENSE.txt" ]
classifiers = [
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Operating System :: OS Independent",
"Development Status :: 4 - Beta",
# "Development Status :: 5 - Production/Stable",
"Intended Audience :: Science/Research",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: Atmospheric Science",

]
keywords = ["pde", "symbolic-computation", "ode-model"]
dependencies = [
"matplotlib",
"numpy",
"numba",
"scipy",
"sympy",
"sparse",
"pebble",
]

[project.urls]
homepage = "https://github.com/Climdyn/LayerCake"
documentation = "https://climdyn.github.io/LayerCake/"

[tool.setuptools]
packages = ["layercake",
"layercake.arithmetic",
"layercake.arithmetic.symbolic",
"layercake.arithmetic.terms",
"layercake.bakery",
"layercake.basis",
"layercake.formatters",
"layercake.inner_products",
"layercake.utils",
"layercake.variables",
]
Loading