Skip to content

Commit 6afa56e

Browse files
committed
Rework of the readme and update of requirements
- A rework of the README is done, based on FourCIPP because I like that README - Added the 4C logo - Updated requirements, mainly because FourCIPP requested that - Added pyvista to the requirements because it is needed by the webviewer - Currently there is a contradiction of requirements from lnmmeshio and FourCIPP, therefore force installation of lnmmeshio is temporarily necessary
1 parent 1eaf043 commit 6afa56e

File tree

5 files changed

+362
-21
lines changed

5 files changed

+362
-21
lines changed

README.md

Lines changed: 67 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,91 @@
1-
# 4C-Webviewer
1+
<div align="center">
2+
<picture>
3+
<source media="(prefers-color-scheme: dark)" srcset="images/4C-logo/negative-white/4C-logo-landscape_negative.svg">
4+
<source media="(prefers-color-scheme: light)" srcset="images/4C-logo/standard-color/4C-logo-landscape_rgb.svg">
5+
<img alt="4C logo" src="images/4C-logo/standard-color/4C-logo-landscape_rgb.svg" width="400">
6+
</picture>
7+
</div>
28

3-
## Purpose
9+
<h1 align="center">
10+
4C-Webviewer
11+
</h1>
412

5-
This repo is meant to improve the 4C Webviewer to get it to a stage to make it public to all interested people. It is already subdivided into smaller parts, however it is certainly not optimal yet.
13+
The **4C-Webviewer** is designed to visualize and edit the input of [4C](https://github.com/4C-multiphysics/4C). Instead of working with the text-based YAML input files directly, users can view and interact with the geometry of the problem they want to solve using **4C** within their browser.
614

7-
Furthermore, there is no testing included at this stage.
15+
Beyond visualization of the geometry, the webviewer helps users to explore material and boundary condition assignments, including any functions defined through them. This offers a more transparent and efficient way to understand and adjust the simulation setup.
816

9-
## How to install the conda environment needed for the 4C-Webviewer
17+
Below we show a first impression on how the **4C-Webviewer** looks like:
1018

11-
This is already rather nice because we only have acceptable dependencies, i.e. open source dependencies:
19+
![4C-Webviewer Teaser](images/webviewer-teaser.png)
1220

13-
```
14-
conda create --name <name-of-environment> python=3.10
15-
conda activate <name-of-environment>
16-
```
21+
## Overview
22+
- [Installation](#installation)
23+
- [Using the 4C-Webviewer](#using-the-4c-webviewer)
24+
- [Dependency Management](#dependency-management)
25+
- [Disclaimer](#disclaimer)
26+
- [License](#license)
27+
28+
## Installation
1729

18-
## How to install the 4C-webviewer
30+
An Anaconda/Miniconda environment is highly recommended to install the required dependencies. After installing Anaconda/Miniconda execute the following steps:
1931

20-
Go to the source directory and in the activated environment run
32+
```bash
33+
conda create -n 4c-webviewer python=3.12
2134
```
35+
36+
Navigate to the source directory and activate the newly created environment:
37+
```bash
38+
conda activate 4c-webviewer
39+
```
40+
41+
Install all requirements with:
42+
```bash
2243
pip install -e .
2344
```
2445

25-
## How to run the 4C-Webviewer
46+
Finally, you need to force the installation of a specific `lnmmeshio` version due to a dependency mismatch with:
47+
```bash
48+
pip install lnmmeshio==5.6.2 --force
49+
```
50+
We are already working on the resolution of this issue.
51+
52+
## Using the 4C-Webviewer
2653

2754
To start the webviewer, in the conda environment run:
2855
```
2956
fourc_webviewer
3057
```
31-
To directly open a dat file use
58+
To directly open a YAML input file use
3259
```
33-
fourc_webviewer --dat_file <path-to-file>
60+
fourc_webviewer --fourc_yaml_file <path-to-4C-YAML-input-file>
3461
```
3562

3663
Alternatively change to the directory of the repo. Activate the created conda environment and run
3764
```
3865
python main.py
3966
```
67+
68+
## Dependency Management
69+
70+
To ease the dependency update process [`pip-tools`](https://github.com/jazzband/pip-tools) is utilized. To create the necessary [`requirements.txt`](./requirements.txt) file simply execute
71+
72+
```
73+
pip-compile --all-extras --output-file=requirements.txt requirements.in
74+
````
75+
76+
To upgrade the dependencies simply execute
77+
78+
```
79+
pip-compile --all-extras --output-file=requirements.txt --upgrade requirements.in
80+
````
81+
82+
## Disclaimer
83+
84+
Please note that this project is still at an early stage of development.
85+
86+
We encourage you to test the current state and provide feedback on what functionality would help you by opening an issue or a discussion, or even contribute to the progress yourself.
87+
88+
89+
## License
90+
91+
This project is licensed under a MIT license. For further information check [`LICENSE`](./LICENSE).
Lines changed: 96 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)