README.md 6.52 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
<!-- # Project Title

One Paragraph of project description goes here -->

# HO_homog

**TODO** : *One Paragraph of project description goes here*

## Getting Started

The **HO_homog** project is developped on Ubuntu 18.04 with the programming language Python3.

The current stable release of the **HO_homog** Python library can be downloaded from this [repository](https://gitlab.enpc.fr/baptiste.durand/HO_homog/tree/master).

### Prerequisites

17
Before using the **HO_homog** tools FEniCS and `pip` (or setuptools) must be installed.
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32

#### FEniCS

To install the FEniCS on Ubuntu, run the following commands:

```bash
sudo apt-get install software-properties-common
sudo add-apt-repository ppa:fenics-packages/fenics
sudo apt-get update
sudo apt-get install --no-install-recommends fenics
```

For more information about installation or instructions for other platforms see the [fenicsproject website](https://fenicsproject.org/download/) and the [FEniCS reference manual](https://fenics.readthedocs.io/en/latest/installation.html#debian-ubuntu-packages).


33 34
#### Virtual Environment
Using a virtual environment for Python projects is recommended. **HO_homog** and Gmsh can be installed inside a virtual environment but FEniCS cannot.
35

36 37 38 39 40 41 42 43 44
Make a new virtual environment :
```bash
python3 -m venv /path/to/project/project_name
```
Then activate it :
```bash
source /path/to/project/project_name/bin/activate
```
Now, the HO_homog package and its dependencies can be installed inside this virtual environment (see instructions below).
45

Baptiste Durand's avatar
Baptiste Durand committed
46
Supposing FEniCS has been already installed on the system, the settings of the virtual environment should be modified to make it accessible. In `/path/to/project/project_name/pyenv.cfg` : `include-system-site-packages = true`.
47

48 49 50
### Installing
The **HO_homog** Python package can be installed with `pip`.
- Install it from the gitlab repository directly (preferred way):
Baptiste Durand's avatar
Baptiste Durand committed
51

52
```bash
Baptiste Durand's avatar
Baptiste Durand committed
53
pip3 install git+https://baptiste.durand@gitlab.enpc.fr/baptiste.durand/HO_homog.git#egg=ho_homog
54
```
Baptiste Durand's avatar
Baptiste Durand committed
55

Baptiste Durand's avatar
Baptiste Durand committed
56
- Or [download](https://gitlab.enpc.fr/baptiste.durand/HO_homog/repository/archive.tar?ref=master) the HO_homog repository files. Then, move to the HO_homog directory and use `pip` :
Baptiste Durand's avatar
Baptiste Durand committed
57

58 59 60
```bash
 pip3 install . --no-cache-dir
```
61

Baptiste Durand's avatar
Baptiste Durand committed
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77
#### Recommended tools
For designing microstructures and generating meshes with HO_homog features, gmsh and its API must be installed.\ 
The gmsh SDK that containt gmsh and the python API can be downloaded from the [official gmsh website](http://gmsh.info/). The files should then be put into the right directories by hand.The files must then be put into the right directories by hand.
\ Alternatively, gmsh SDK can be directly install *in a pythonic way* using the unofficial Gmsh SDK installer : [gmsh-sdk](https://pypi.org/project/gmsh-sdk/) :
```bash
pip install --upgrade gmsh-sdk
```

The fenicstools toolbox can be useful for field reconstructions when the RVE mesh and the full_scale mesh do not match.
> With the function interpolate_nonmatching_mesh_any it is possible to interpolate from a Function of any space on one mesh to a Function of any space on a different mesh. 

This python package can be install with pip :
```bash
pip install git+https://github.com/mikaem/fenicstools.git --prefix=/.../lib/python3.6[or other version]/site-packages/
```

Baptiste Durand's avatar
Baptiste Durand committed
78 79
<!--
## Getting Started
80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

### Prerequisites

What things you need to install the software and how to install them

```
Give examples
```

### Installing

A step by step series of examples that tell you how to get a development env running

Say what the step will be

```
Give the example
```

And repeat

```
until finished
```

Baptiste Durand's avatar
Baptiste Durand committed
107 108 109 110
End with an example of getting some data out of the system or using it for a little demo
-->

<!--
111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132
## Running the tests

Explain how to run the automated tests for this system

### Break down into end to end tests

Explain what these tests test and why

```
Give an example
```

### And coding style tests

Explain what these tests test and why

```
Give an example
```

<!-- ## Deployment

Baptiste Durand's avatar
Baptiste Durand committed
133
Add additional notes about how to deploy this on a live system -->
134 135 136 137 138 139 140 141 142

## Built With

The HO_homog tools have been developped with Python 3.6.7.
They make use of the following applications. The numbers in brackets represent the versions used for the development.

- Python 3 (3.6.7);
- [Gmsh](http://gmsh.info/) - Used to generate finite element meshes, by means of its API for Python (4.0.6);
- [FEniCS](https://fenicsproject.org/) - Finite element computing platform (2018.1.0)
Baptiste Durand's avatar
Baptiste Durand committed
143 144

<!--
145 146 147 148 149 150 151 152 153 154
## Contributing

Please read [CONTRIBUTING.md](https://gist.github.com/PurpleBooth/b24679402957c63ec426) for details on our code of conduct, and the process for submitting pull requests to us.

## Versioning

We use [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](https://github.com/your/project/tags).  -->

## Authors

Baptiste Durand's avatar
Baptiste Durand committed
155 156
- **Baptiste Durand** - *PhD student* - Laboratoire NAVIER, UMR 8205 - [@baptiste.durand](https://gitlab.enpc.fr/baptiste.durand) - [baptiste.durand@enpc.fr](mailto:baptiste.durand@enpc.fr) - [Student page on Laboratoire Navier website](https://navier-lab.fr/baptiste-durand/)
- **Arthur Lebée** - *Researcher* - Laboratoire NAVIER, UMR 8205 - [@arthur.lebee](https://gitlab.enpc.fr/arthur.lebee) - [Researcher page on Laboratoire Navier website](https://navier-lab.fr/arthur-lebee/)
157 158 159 160 161 162 163 164 165 166 167 168 169

See also the graphs of all [contributions](https://gitlab.enpc.fr/baptiste.durand/HO_homog/graphs/master) to this project.

<!-- ## Authors

* **Billie Thompson** - *Initial work* - [PurpleBooth](https://github.com/PurpleBooth)

See also the list of [contributors](https://github.com/your/project/contributors) who participated in this project. -->

<!-- ## License

This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details -->

Baptiste Durand's avatar
Baptiste Durand committed
170 171 172
## Acknowledgments

The authors acknowledge the support of the French Agence Nationale de la Recherche (ANR), under grant ANR-17-CE08-0039 ([project ArchiMatHOS](http://www.agence-nationale-recherche.fr/Projet-ANR-17-CE08-0039)).
Baptiste Durand's avatar
Baptiste Durand committed
173
<img src="/img/ArchiMATHOS_ANR.png" height="250">
174 175


176
<!--
177 178 179 180
## Ressources pour la rédaction du fichier README

- [Cheatsheet](https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet) for writing in markdown.
- [Template](https://gist.github.com/PurpleBooth/109311bb0361f32d87a2) of a README<span></span>.md file.
181
- [Examples](https://github.com/matiassingers/awesome-readme) of readme files.
Baptiste Durand's avatar
Baptiste Durand committed
182
-->