Skip to main content

FEALPy: Finite Element Analysis Library in Python

Project description

FEALPy:Finite Element Analysis Library in Python

Python package Upload Python Package

While beginning with the finite element algorithm, FEALPy's sights are set on exploring vast horizons.

We hope FEALPy will be an open-source library for intelligent CAX algorithms, integrating CAX fundamentals with AI to support advanced algorithm research and the cultivation of versatile talent.

We also hope FEALPy can accelerate the creation and testing of next-gen intelligent CAX apps, paving the way for advanced algorithms in industrial applications.

So FEALPy's development goal is to become the next generation intelligent CAX computing engine.

The word "FEAL" is an archaic or poetic term in English, meaning faithful or loyal. Though not commonly used in modern English, it carries strong connotations of unwavering dedication and reliability.

The name "FEALPy" embodies this essence of loyalty and faithfulness. It signifies the software's commitment to being a dependable and trustworthy tool in the field of intelligent CAX computation. Just as "FEAL" suggests steadfastness, FEALPy aims to provide consistent, reliable support for researchers, engineers, and developers in their pursuit of innovative solutions and advancements in CAX computation. The name reflects the software's mission to be a loyal companion in the journey toward groundbreaking discoveries and industrial applications.

Installation

Miniconda

mkdir -p ~/miniconda3
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda3/miniconda.sh
bash ~/miniconda3/miniconda.sh -b -u -p ~/miniconda3
rm -rf ~/miniconda3/miniconda.sh
~/miniconda3/bin/conda init bash
conda create -n gpufealpy310 python=3.10
conda activate gpufealpy310
conda install numpy=2.0.1 -c conda-forge #2.0.1
conda install ipython notebook -c conda-forge
conda install jaxlib=*=*cuda* jax cuda-nvcc -c conda-forge -c nvidia # 0.4.31
conda install cupy -c conda-forge  -c nvidia
conda install pytorch=2.3.1 -c conda-forge -c nvidia

From Source (Recommanded)

First, clone the FEALPy repository from GitHub

git clone https://github.com/weihuayi/fealpy.git

If you can't access GitHub, you can clone it from Gitee

git clone https://gitee.com/whymath/fealpy

It is recommended to create a virtual environment to manage dependencies:

python -m venv fealpy_env
source fealpy_env/bin/activate  # On Windows, use `fealpy_env\Scripts\activate`

Then change directory to the cloned repository and install FEALPy in editable(-e) mode:

cd fealpy
pip install -e .

If you want to install optional dependencies, such as pypardiso, pyamg, meshpy and so on, you can do so by specifying the [optional] extra:

pip install -e ".[optional]"

To install both development and optional dependencies, use:

pip install -e ".[dev,optional]"

To verify that FEALPy is installed correctly, you can run the following command:

python -c "import fealpy; print(fealpy.__version__)"

To update your FEALPy installation to the latest version from the source repository, navigate to the FEALPy directory and pull the latest changes:

cd fealpy
git pull origin main

To uninstall FEALPy, just run the following command:

pip uninstall fealpy

Development

For FEALPy developers, the first step is to create a fork of the https://github.com/weihuayi/fealpy repository in your own Github account.

Clone the FEALPy repository under your own account to the local repository:

# replace<user name>with your own GitHub username
git clone git@github.com:<user name>/fealpy.git 

Note that the following operations need to be operated in the fealpy folder.

Set up the upstream repository:

git remote add upstream git@github.com:weihuayi/fealpy.git

Before local development, need to pull the latest version from the upstream repository and merge it into the local repository:

git fetch upstream
git merge upstream/master

After local development, push the modifications to your own remote repository:

git add modified_files_name
git commit -m "Explanation on modifications"
git push

Finally, in your own Github remote repository, open a pull request to the upstream repository and wait for the modifications to be merged.

Warning

The sparse pattern of the matrix A generated by FEALPy may not be the same as the theoretical pattern, since there exists nonzero values that are close to machine precision due to rounding. If you care about the sparse pattern of the matrix, you can use the following commands to eliminate them

eps = 10**(-15)
A.data[ np.abs(A.data) < eps ] = 0
A.eliminate_zeros()

Docker

To be added.

Reference and Acknowledgement

We thank Dr. Long Chen for the guidance and compiling a systematic documentation for programming finite element methods.

Citation

Please cite fealpy if you use it in your paper

H. Wei and Y. Huang, FEALPy: Finite Element Analysis Library in Python, https://github.com/weihuayi/fealpy, Xiangtan University, 2017-2024.

@misc{fealpy,
	title = {FEALPy: Finite Element Analysis Library in Python. https://github.com/weihuayi/fealpy},
	url = {https://github.com/weihuayi/fealpy},
	author = {Wei, Huayi and Huang, Yunqing},
    institution = {Xiangtan University},
	year = {Xiangtan University, 2017-2024},
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fealpy-3.4.0.tar.gz (2.0 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fealpy-3.4.0-py3-none-any.whl (2.7 MB view details)

Uploaded Python 3

File details

Details for the file fealpy-3.4.0.tar.gz.

File metadata

  • Download URL: fealpy-3.4.0.tar.gz
  • Upload date:
  • Size: 2.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for fealpy-3.4.0.tar.gz
Algorithm Hash digest
SHA256 2e474a029bb19e039e96ca5999c55ad62e8c7cbb37e199bdf00cacddcffcd910
MD5 b5f688b48ceaccd099c0f5f32ea37a66
BLAKE2b-256 434e7c217768579991fc29db1cc3aa94172791975277f1b57777e2b84e237866

See more details on using hashes here.

File details

Details for the file fealpy-3.4.0-py3-none-any.whl.

File metadata

  • Download URL: fealpy-3.4.0-py3-none-any.whl
  • Upload date:
  • Size: 2.7 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for fealpy-3.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 002968c3efdca724fe2c8ed101f1912b84bce5ef3b55386b0ec1e253cac94122
MD5 8045037a2aed83574f0705aa6a4844d4
BLAKE2b-256 075564b69e0577da2186a6344c8f31e3799d41b27351646236ac2abbfb7092a5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page