Commit ce63509c authored by Fabian's avatar Fabian
Browse files

Updated README.md and changed comments in Makefile so that it looks nicer

parent 21fb201b
......@@ -2,21 +2,30 @@
# A user can choose between HTTPS (default) and SSH
# Changes to .gitmodules have to be made in .gitlab-modules/
# Both https and ssh do the following:
# 1. Change Betl2 source
# 2. Change config if necessary
# 3. Update Betl2 submodule
# 4. Change EthGenericGrid source
# 5. Change config if necessary
# 6. Update EthGenericGrid submodule
## HTTPS
https:
cp .gitlab-modules/betl2-module-https .gitmodules # Change Betl2 source
git submodule sync # Change config if necessary
git submodule update --init # Update Betl2 submodule
cp .gitlab-modules/ethGG-module-https Betl2/.gitmodules # Change EthGenericGrid source
git submodule sync --recursive # Change config if necessary
git submodule update --init --recursive # Update EthGenericGrid submodule
cp .gitlab-modules/betl2-module-https .gitmodules
git submodule sync
git submodule update --init
cp .gitlab-modules/ethGG-module-https Betl2/.gitmodules
git submodule sync --recursive
git submodule update --init --recursive
## SSH
ssh:
cp .gitlab-modules/betl2-module-ssh .gitmodules # Change Betl2 source
git submodule sync # Change config if necessary
git submodule update --init # Update Betl2 submodule
cp .gitlab-modules/ethGG-module-ssh Betl2/.gitmodules # Change EthGenericGrid source
git submodule sync --recursive # Change config if necessary
git submodule update --init --recursive # Update EthGenericGrid submodule
cp .gitlab-modules/betl2-module-ssh .gitmodules
git submodule sync
git submodule update --init
cp .gitlab-modules/ethGG-module-ssh Betl2/.gitmodules
git submodule sync --recursive
git submodule update --init --recursive
......@@ -9,11 +9,44 @@ The following programs should be available:
- Python3 (used for plotting)
- Matplotlib (used for plotting)
## How to Download
You need access to Betl2. In this specific case, the submodule of NumPDE16 was
used.
To download the complete code using HTTPS do:
```
git clone https://gitlab.ethz.ch/hifabian/Code_DofHandler.git
cd Code_DofHandler
make
```
If you prefer SSH over HTTPS do:
```
git clone git@gitlab.ethz.ch:hifabian/Code_DofHandler.git
cd Code_DofHandler
make ssh
```
Or for using SSH only for Betl2 and EthGenericGrid do:
```
git clone https://gitlab.ethz.ch/hifabian/Code_DofHandler.git
cd Code_DofHandler
make ssh
```
The `.gitmodules`-files that are used by `Makefile` are stored in `.gitlab-modules/`.
Please do not do `git clone --recursive https://gitlab.ethz.ch/hifabian/Code_DofHandler.git` or `git clone --recursive git@gitlab.ethz.ch:hifabian/Code_DofHandler.git`.
If you have Betl2 but do not get the submodules working, you should be able to
just copy a Betl2 folder into `/Code_Dofhandler/` and it should work. However,
due to changes in Betl2 some files may throw errors. For example, the intersection
marker changed the member function `inactiveFESpace()` to `constrainedFESpace()`.
## Compilation
### Single executables
### Single Executables
To compile a specific executable do:
```
# Starting in Code_DofHandler/
mkdir build && cd build
cmake ..
make <executable>
......@@ -32,15 +65,16 @@ The following executables are available:
To run use:
```
# Starting in Code_DofHandler/
cd build
./bin/<executable>
```
Some <executable>s need a mesh. Meshes are provided in `Example/RefinedMeshes/`
Some executables need a mesh. Meshes are provided in `Example/RefinedMeshes/`
and for hp-Lagrangian in `Example/Example_hpLagr_2d/Meshes/`. Not all meshes
are supported for all executables.
### Everything at once
A bash file `run.sh` is provided that can be run from `/Code_Dofhandler/` like:
### Everything at Once
A bash file `run.sh` is provided that can be run from `Code_Dofhandler/` like:
```
sh run.sh
```
......@@ -49,45 +83,14 @@ It will then override some of the executables with the debug version of them and
peform some benchmarking for runtime. The output are plots with the ratio of
the averaged runtimes compared to the size of the mesh stored in `build/Data/`.
To only run validation type:
To only run validation:
```
sh run.sh v
```
and for only benchmarking type:
and for only benchmarking:
```
sh run.sh b
```
Warning: The benchmarking runs signifcantly longer than the validation.
## On downloading it
You need access to Betl2. In this specific case, the submodule of NumPDE16 was
used. Even if you have access, you may encounter errors with gitlab not asking
for authentication when using HTTPS or a connection time out when using SSH.
This should be resolved when installing the repository as follows (`->` indicate
changes that have to be made):
```
git clone https://gitlab.ethz.ch/hifabian/Code_DofHandler.git
vim .gitmodules
url = https://gitlab.math.ethz.ch/NumPDE/Betl2.git
-> url = https://<username>@gitlab.math.ethz.ch/NumPDE/Betl2.git
git submodule init
git submodule update
cd Belt2 && vim .gitmodules
url = git@gitlab.math.ethz.ch:betl2/EthGenericGrid.git
-> url = https://<username>@gitlab.math.ethz.ch/NumPDE/EthGenericGrid.git
git submodule init
git submodule update
```
Or using the SSH in place of the HTTPS urls may also work.
Please do not do `git clone --recursive https://gitlab.ethz.ch/hifabian/Code_DofHandler.git` or `git clone --recursive git@gitlab.ethz.ch:hifabian/Code_DofHandler.git`.
Betl2 provides a submodule that may not exist anymore and has to be changed.
If you have Betl2 but do not get the submodules working, you should be able to
just copy a Betl2 folder into `/Code_Dofhandler/` and it should work. However,
due to changes in Betl2 some files may throw errors. For example, the intersection
marker changed the member function `inactiveFESpace()` to `constrainedFESpace()`.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment