You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Merge pull request #33 from DataAnalyticsEngineering/FANS-v0.3.0
* Mention dependency on compiler support for OpenMP in README
* Rename container user also in fans_dev image to fix broken entrypoint script (#27)
* Add python3-dev to fans-ci stage already
* Remove clang-format check via GitHub Action (#29)
* Bump clang-format version
* Formatting
* Use a different Action workflow to run clang-format
* Remove the Action to run clang-format, as it will go out of sync with the pre-commit run
* Bump mirror-clang-format to latest version in the pre-commit-config
* Update clang-format config file to also format JSON
* Manually specify which extensions to format in the mirror-clang-format hooks in the pre-commit config
* Exclude JSON files from clang-format
* Exclude JSON files from clang-format
* Correctly exclude JSON files from clang-format checking
* Rather than excluding json, specifically suggest c++
* Added API to get homogenized stress and homogenized tangent (#31)
* worked on getting the algorithmic tangent via finite differences
* linear elastic triclinic material model
* refactored material properties from type map<string, vector<double>> to type json
* J2Plasticity time_step is double not a vector
* refactored compute_error to accept different error measure and type
* added additional error control when get_homogenized_tangent is called
* in get_homogenized_tangent linear materials are handled seperately
* added linear thermal triclinic model (#32)
* added linear thermal triclinic model similar to linear elastic triclinic model
* fixed readme.md indent causing linting error
* Update CHANGELOG
* Bump version
---------
Co-authored-by: Moritz Sigg <[email protected]>
Co-authored-by: Moritz Sigg <[email protected]>
Co-authored-by: Ishaan Desai <[email protected]>
Copy file name to clipboardexpand all lines: README.md
+12-5
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,7 @@ Fourier Accelerated Nodal Solvers (FANS) is an FFT-based homogenization solver d
16
16
17
17
FANS has the following dependencies:
18
18
19
-
- A C++ compiler (e.g. GCC)
19
+
- A C++ compiler with OpenMP support (e.g. GCC, or Clang with OpenMP libraries installed)
20
20
- CMake (version 3.0 or higher) (+ Unix file utility for creating .deb packages)
21
21
- Git (for cloning this repo)
22
22
- MPI (mpicc and mpic++)
@@ -178,13 +178,20 @@ FANS requires a JSON input file specifying the problem parameters. Example input
178
178
179
179
```json
180
180
"method": "cg",
181
-
"TOL": 1e-10,
182
-
"n_it": 100
181
+
"error_parameters":{
182
+
"measure": "Linfinity",
183
+
"type": "absolute",
184
+
"tolerance": 1e-10
185
+
},
186
+
"n_it": 100,
183
187
```
184
188
185
189
- `method`: This indicates the numerical method to be used for solving the system of equations. `cg` stands for the Conjugate Gradient method, and `fp` stands for the Fixed Point method.
186
-
- `TOL`: This sets the tolerance level for the solver. It defines the convergence criterion which is based on the L-infinity norm of the nodal finite element residual; the solver iterates until the solution meets this tolerance.
187
-
- `n_it`: This specifies the maximum number of iterations allowed for the FANS solver.
190
+
- `error_parameters`: This section defines the error parameters for the solver. Error control is applied on the finite element nodal residual of the problem.
191
+
- `measure`: Specifies the norm used to measure the error. Options include `Linfinity`, `L1`, or `L2`.
192
+
- `type`: Defines the type of error measurement. Options are `absolute` or `relative`.
193
+
- `tolerance`: Sets the tolerance level for the solver, defining the convergence criterion based on the chosen error measure. The solver iterates until the solution meets this tolerance.
194
+
- `n_it`: Specifies the maximum number of iterations allowed for the FANS solver.
Copy file name to clipboardexpand all lines: docker/README.md
+4-4
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@
3
3
We provide a set of docker images for different use cases on our [Dockerhub profile](https://hub.docker.com/u/unistuttgartdae):
4
4
5
5
-**fans-ci**: Contains the minimum tools to build FANS (including dev packages of dependencies with the required headers), but does not include FANS itself. Meant for a CI workflow.
6
-
-**fans-dev**: Based upon fans-ci, but offers a non-root user (`develop`) and handling of UID and GID to not mess up permissions when volume mounting into the container. Meant as an quick to setup build environment for FANS.
6
+
-**fans-dev**: Based upon fans-ci, but offers a non-root user (`fans`) and handling of UID and GID to not mess up permissions when volume mounting into the container. Meant as an quick to setup build environment for FANS.
7
7
8
8
Both images are built for linux/amd64 and linux/arm64 as well as for the three most recent Ubuntu LTS versions (focal, jammy, noble). The Ubuntu version can be selected through tags, e.g. `fans-dev:focal`; `noble` is equivalent to the `latest` tag. The architecture is selected automatically depending on your host platform.
9
9
@@ -75,7 +75,7 @@ You can attach VS Code to the newly created container in order to actually work
75
75
76
76
To attach VS Code you need to install the `Remote Development Extension Pack` and the `Docker` Extension. Then open the Docker menu, right click our newly created `fans-dev` container and select "Start" (if not running already) and then "Attach Visual Studio Code".
77
77
78
-
After attaching VS Code you unfortunately are user `root` in VS Code due to the way the UID and GID mapping is implemented: The container starts as root, executes the entrypoint script which changes UID and GID and only then drops privileges using `gosu`. VS Code though skips the entrypoint script and thus doesn't switch to the non-root user `develop`. You however can do so manually by typing `gosu develop bash`in your terminal sessions inside VS Code.
78
+
After attaching VS Code you unfortunately are user `root` in VS Code due to the way the UID and GID mapping is implemented: The container starts as root, executes the entrypoint script which changes UID and GID and only then drops privileges using `gosu`. VS Code though skips the entrypoint script and thus doesn't switch to the non-root user `fans`. You however can do so manually by typing `gosu fans bash`in your terminal sessions inside VS Code.
79
79
80
80
For further reading and alternative approaches like a full DevContainer setup have a look at
81
81
@@ -87,10 +87,10 @@ For further reading and alternative approaches like a full DevContainer setup ha
87
87
88
88
By building inside the container, FANS is linked against the container's libs and therefore must run inside the container. After attaching to the container you can then continue to use FANS as described in the main [README](../README.md#usage). Just remember that any input and output files need to visible to the container and thus must lie somewhere inside the mounted volumes.
89
89
90
-
Special care has to be taken if you need to use FANS within scripts on the host, as Docker's interactive mode (`-i`) is not suitable in this case. Instead you need to use `docker exec`. One basically replaces the original `FANS` call by `docker exec -u develop -w /FANS/test fans-dev [original call]`. For example in conjunction with nohup:
90
+
Special care has to be taken if you need to use FANS within scripts on the host, as Docker's interactive mode (`-i`) is not suitable in this case. Instead you need to use `docker exec`. One basically replaces the original `FANS` call by `docker exec -u fans -w /FANS/test fans-dev [original call]`. For example in conjunction with nohup:
0 commit comments