|
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> |
2 | 8 |
|
3 | | -## Purpose |
| 9 | +<h1 align="center"> |
| 10 | + 4C-Webviewer |
| 11 | +</h1> |
4 | 12 |
|
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. |
6 | 14 |
|
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. |
8 | 16 |
|
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: |
10 | 18 |
|
11 | | -This is already rather nice because we only have acceptable dependencies, i.e. open source dependencies: |
| 19 | + |
12 | 20 |
|
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 |
17 | 29 |
|
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: |
19 | 31 |
|
20 | | -Go to the source directory and in the activated environment run |
| 32 | +```bash |
| 33 | +conda create -n 4c-webviewer python=3.12 |
21 | 34 | ``` |
| 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 |
22 | 43 | pip install -e . |
23 | 44 | ``` |
24 | 45 |
|
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 |
26 | 53 |
|
27 | 54 | To start the webviewer, in the conda environment run: |
28 | 55 | ``` |
29 | 56 | fourc_webviewer |
30 | 57 | ``` |
31 | | -To directly open a dat file use |
| 58 | +To directly open a YAML input file use |
32 | 59 | ``` |
33 | | -fourc_webviewer --dat_file <path-to-file> |
| 60 | +fourc_webviewer --fourc_yaml_file <path-to-4C-YAML-input-file> |
34 | 61 | ``` |
35 | 62 |
|
36 | 63 | Alternatively change to the directory of the repo. Activate the created conda environment and run |
37 | 64 | ``` |
38 | 65 | python main.py |
39 | 66 | ``` |
| 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