Skip to content

Commit f90e4ec

Browse files
committed
Merge branch 'rework-readme-and-add-license' into 'main'
Rework of the readme and update of requirements See merge request cschmidt/4c-webviewer!8
2 parents dd6533d + 6afa56e commit f90e4ec

File tree

6 files changed

+383
-21
lines changed

6 files changed

+383
-21
lines changed

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2025 4C-Webviewer Authors
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

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).

0 commit comments

Comments
 (0)