Skip to content

Commit

Permalink
Add hook to ensure we link to https://precice.org (#483)
Browse files Browse the repository at this point in the history
  • Loading branch information
fsimonis authored Mar 20, 2024
1 parent 7c60277 commit f640182
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,8 @@ repos:
language: script
entry: tools/check.sh
pass_filenames: false
- id: check-links-to-precice
name: check links to precice.org
language: script
entry: tools/check-links-to-precice.sh
types_or: ["markdown", "html"]
4 changes: 2 additions & 2 deletions flow-over-heated-plate-two-meshes/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Get the [case files of this tutorial](https://github.com/precice/tutorials/tree/

## Setup

The scenario is exactly the same as the one described in the [flow over heated plate tutorial](http://precice.org/tutorials-flow-over-heated-plate.html). However, this tutorial is specialized for the case when heat fluxes and temperatures live on different meshes. This is the case with CalculiX: heat fluxes are written on face centers, while temperatures are read on nodes. This requires updating the `precice-config.xml` file to take this into account. On the fluid side, a single mesh can still be used.
The scenario is exactly the same as the one described in the [flow over heated plate tutorial](https://precice.org/tutorials-flow-over-heated-plate.html). However, this tutorial is specialized for the case when heat fluxes and temperatures live on different meshes. This is the case with CalculiX: heat fluxes are written on face centers, while temperatures are read on nodes. This requires updating the `precice-config.xml` file to take this into account. On the fluid side, a single mesh can still be used.

## Available solvers

Expand All @@ -24,7 +24,7 @@ Fluid participant:

Solid participant:

* CalculiX. For more information, have a look at the [CalculiX adapter documentation](http://precice.org/adapter-calculix-overview.html). Be sure to use at least version 2.19.1 of the adapter.
* CalculiX. For more information, have a look at the [CalculiX adapter documentation](https://precice.org/adapter-calculix-overview.html). Be sure to use at least version 2.19.1 of the adapter.

## Running the Simulation

Expand Down
2 changes: 1 addition & 1 deletion heat-exchanger-simplified/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Fluid participants:

Solid participant:

* CalculiX. For more information, have a look at the [CalculiX adapter documentation](http://precice.org/adapter-calculix-overview.html). Be sure to use at least version 2.19.1 of the adapter.
* CalculiX. For more information, have a look at the [CalculiX adapter documentation](https://precice.org/adapter-calculix-overview.html). Be sure to use at least version 2.19.1 of the adapter.

## Running the Simulation

Expand Down
2 changes: 1 addition & 1 deletion perpendicular-flap/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Solid participant:

* FEniCS. The structural model is currently limited to linear elasticity. For more information, have a look at the [FEniCS adapter documentation](https://www.precice.org/adapter-fenics.html).

* CalculiX. In order to allow a reasonable comparison to all solid codes, the geometrically non-linear solver has been disabled and only a linear model is used by default. For more information, have a look at the [CalculiX adapter documentation](https://www.precice.org/adapter-calculix-overview.html). Two cases are provided: one as a regular simulation, and one with modal dynamic simulations where a few eigenmodes are computed, and then used to simulate a reduced model. In that case, the `run.sh` script runs the frequency analysis, renames the output file to match with the actual input file, and then runs it. For more details, see the [adapter configuration documentation](http://precice.org/adapter-calculix-config.html). To run the modal dynamic version, add the `-modal` argument to the `run.sh` script.
* CalculiX. In order to allow a reasonable comparison to all solid codes, the geometrically non-linear solver has been disabled and only a linear model is used by default. For more information, have a look at the [CalculiX adapter documentation](https://www.precice.org/adapter-calculix-overview.html). Two cases are provided: one as a regular simulation, and one with modal dynamic simulations where a few eigenmodes are computed, and then used to simulate a reduced model. In that case, the `run.sh` script runs the frequency analysis, renames the output file to match with the actual input file, and then runs it. For more details, see the [adapter configuration documentation](https://precice.org/adapter-calculix-config.html). To run the modal dynamic version, add the `-modal` argument to the `run.sh` script.

* deal.II. This tutorial works only with `Model = linear` since the deal.II codes were developed with read data `Stress` instead of `Force` as applied here (example given in Turek-Hron-FSI) in the first place. The `./run.sh` script takes the compiled executable `elasticity` as input argument (`run.sh -e=/path/to/elasticity`) and is required in case the executable is not discoverable at runtime (e.g. has been added to the system `PATH`). For more information, have a look at the [deal.II adapter documentation](https://www.precice.org/adapter-dealii-overview.html).

Expand Down
3 changes: 3 additions & 0 deletions tools/check-links-to-precice.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

sed -i "s/http:\/\/precice.org/https:\/\/precice.org/g" "$@"

0 comments on commit f640182

Please sign in to comment.