Skip to content

Commit c931b7e

Browse files
Merge pull request #314 from corentin-prigent/feature/front-page
Update Github front page
2 parents 4d8232c + eeab6b7 commit c931b7e

File tree

3 files changed

+12
-307
lines changed

3 files changed

+12
-307
lines changed

.github/FUNDING.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
custom: ['https://www.mmgtools.org/mmg-open-source-consortium']
1+
custom: ['https://mmgtools.org/consortium.html']

CONTRIBUTING.md

Lines changed: 2 additions & 119 deletions
Original file line numberDiff line numberDiff line change
@@ -1,119 +1,2 @@
1-
# Developers guide
2-
## I/ Documenting your code using Doxygen
3-
### 1) How
4-
#### General case
5-
Our project use **Doxygen** to automatically generate the developer documentation. If you implement a new function in **Mmg**, please, comment it and give at least its interface description (function arguments and return values).
6-
7-
For example a minimal documentation for the function that saves the mesh may be this one:
8-
<!-- do not mark this as C code or Doxygen will remove the interesting part -->
9-
```
10-
/**
11-
* \param mesh pointer to the mesh structure.
12-
* \param filename pointer to the name of the file.
13-
* \return 0 if failed, 1 otherwise.
14-
*
15-
* Save mesh data.
16-
*
17-
* \warning you must call the \a _MMG3D_packMesh function before saving your
18-
* mesh.
19-
*/
20-
int MMG3D_saveMesh(MMG5_pMesh mesh, char *filename);
21-
```
22-
Additionaly, it is good practice to include text inside the routine to explain the work carried out.
23-
24-
You can refer to the [Doxygen documentation](http://www.stack.nl/~dimitri/doxygen/) for a description of the **Doxygen** commands.
25-
26-
#### API functions
27-
Because the library header for Fortran users is automatically generated from the C header, you must add the interface of the fortran function to your documentation. Each line of this interface must begin with the `>` symbol and end with `\n` (a backslash and the letter n).
28-
29-
For example, if the previous function is an API function, its documentation becomes the following:
30-
<!-- do not mark this as C code or Doxygen will remove the interesting part -->
31-
```
32-
/**
33-
* \param mesh pointer to the mesh structure.
34-
* \param filename pointer to the name of file.
35-
* \return 0 if failed, 1 otherwise.
36-
*
37-
* Save mesh data.
38-
*
39-
* \warning you must call the \a _MMG3D_packMesh function before saving your
40-
* mesh.
41-
*
42-
* \remark Fortran interface:
43-
* > SUBROUTINE MMG3D_saveMesh(mesh,filename,strlen,retval)\n
44-
* > MMG5_DATA_PTR_T, INTENT(INOUT) :: mesh\n
45-
* > CHARACTER(LEN=*), INTENT(IN) :: filename\n
46-
* > INTEGER, INTENT(IN) :: strlen\n
47-
* > INTEGER, INTENT(OUT) :: retval\n
48-
* > END SUBROUTINE\n
49-
*
50-
*/
51-
int MMG3D_saveMesh(MMG5_pMesh mesh, char *filename);
52-
```
53-
54-
### 2) Where
55-
Please, comments only your functions in the `.c` file, except for the **API** functions; these must be documentated in the appropriate `libmmg<X>.h` file (and only there).
56-
57-
## II/ Memory management: dynamic allocations and deallocations
58-
We need to control the memory consumption in our applications so the memory used by dynamic allocations is counted and updated at each allocation and deallocation.
59-
60-
Note that with a high verbosity (at least 6), you can check that at the end of the process the memory count is 0.
61-
62-
To make the update of memory consumption easier, we have wrapped the `malloc`, `calloc`, `realloc` and `free` functions into macros that must be called in place of these functions.
63-
64-
| `C function` | `Mmg macro` |
65-
|----------------------|-----------------------------------|
66-
| `ptr = (type *) malloc(size*sizeof(type));` | `MMG5_SAFE_MALLOC(ptr,size,type,law);` |
67-
| `ptr = (type *) calloc(size,sizeof(type));` | `MMG5_SAFE_CALLOC(ptr,size,type,law);` |
68-
| `ptr = (type *) realloc(ptr,size*sizeof(type));`<br>`if ( high_verbosity )`<br>&nbsp;&nbsp;&nbsp;&nbsp;`printf(" ## Warning:%s:%d: %s reallocation.\n",__FILE__,__LINE__,tab_info);`| `MMG5_SAFE_REALLOC(ptr,prevSize,newSize,type,tab_name,law);` |
69-
| `Decrease_memory_count(size); `<br>`free(ptr); ptr = NULL; `| `MMG5_DEL_MEM(mesh,ptr)`|
70-
71-
Note that other macros which aim to help to manage the memory have been implemented.
72-
73-
### 1) Allocations
74-
To check that we have enough memory to allocate a pointer of size `siz` and to increment the memory counter, you must precede your allocation by a call to the `MMG5_ADD_MEM(mesh, siz, "tab_name", law)` macro.
75-
76-
For example, the following allocation:
77-
```c
78-
Increase_memory_count(5*sizeof(double));
79-
ptr = (double *) malloc (5*sizeof(double));
80-
if ( !ptr ) {
81-
fprintf(stdout," ## Error: unable to allocate my array.");
82-
exit(EXIT_FAILURE);
83-
}
84-
```
85-
86-
must be replaced by the following one in the **Mmg** code:
87-
```c
88-
MMG5_ADD_MEM(mesh,5*sizeof(double),"my array",exit(EXIT_FAILURE));
89-
MMG5_SAFE_MALLOC(ptr,5,double,exit(EXIT_FAILURE));
90-
```
91-
92-
That said, calling `exit` from a library function is not polite. You may wish to do something else in the `law` argument, for example setting a flag that tells your function to free any memory it allocated and return a value indicating failure.
93-
94-
### 2) Deallocations
95-
To decrement the memory counter, to deallocate your pointer and to leave it pointing toward `NULL`, you just need to call the `MMG5_DEL_MEM(mesh,ptr)` macro.
96-
97-
To deallocate the memory allocated in the previous example, instead of the following code:
98-
```c
99-
Decrease_memory_count(5*sizeof(double));
100-
free(ptr);
101-
ptr = NULL;
102-
```
103-
just write:
104-
```c
105-
MMG5_DEL_MEM(mesh,ptr);
106-
```
107-
108-
## III/ Coding style
109-
Please, use the following configuration in your editor:
110-
* no tabs;
111-
* 1 indent = 2 spaces;
112-
* no trailing whitespaces;
113-
* limit the size of your lines to 80 characters;
114-
115-
Besides, try to respect the following rules:
116-
* declaration of variables in the top of the function;
117-
* do not use exit(), use a return value instead;
118-
* do not implement void API functions;
119-
* the main library functions returns `MMG<X>_SUCCESS` if successful, `MMG<X>_LOWFAILURE` if the function fails but we can save the mesh, and `MMG<X>_STRONGFAILURE` if fails and we can't save a conforming mesh.
1+
To contribute to the project according to our guidelines, please refer to the
2+
following [page](https://www.mmgtools.org/contributing.html>).

README.md

Lines changed: 9 additions & 187 deletions
Original file line numberDiff line numberDiff line change
@@ -1,200 +1,22 @@
1-
21
<h1 align="center"> mmg - Surface and volume remeshers </h1>
32
<h3 align="center"> open source software for bidimensional and tridimensional surface and volume remeshing </h3>
43

5-
<div align="center" markdown="1">
6-
7-
[![Release][release-image]][releases] [![License][license-image]][license]
8-
9-
[release-image]: https://img.shields.io/github/v/release/MmgTools/mmg?color=blue&label=release&style=flat
10-
[releases]: https://github.com/MmgTools/mmg/releases
11-
12-
[license-image]: https://img.shields.io/badge/license-LGPL-blue.svg?style=flat
13-
[license]: https://github.com/MmgTools/mmg/blob/master/LICENSE
14-
15-
</div>
16-
<div align="center">
17-
<img src="https://img.shields.io/static/v1?label=macOS&logo=apple&logoColor=white&message=support&color=success" alt="macOS support">
18-
<img src="https://img.shields.io/static/v1?label=Ubuntu&logo=Ubuntu&logoColor=white&message=support&color=success" alt="Ubuntu support">
19-
<img src="https://img.shields.io/static/v1?label=Windows&logo=windows&logoColor=white&message=support&color=success" alt="Windows support">
20-
</div>
21-
22-
---
23-
24-
|**master branch (release)**|[![Build Status][master-build]][master-sq-build]|[![codecov][master-cov]][master-codecov-cov]|
25-
|:---:|:---:|:---:|
26-
|**develop branch**|[![Build Status][dev-build]][dev-sq-build]|[![Coverage][dev-cov]][dev-codecov-cov]|
27-
28-
[master-build]: https://github.com/MmgTools/mmg/actions/workflows/long-tests.yml/badge.svg?branch=master
29-
[master-sq-build]: https://github.com/MmgTools/mmg/actions/workflows/long-tests.yml?query=branch%3Amaster
30-
31-
[master-cov]: https://codecov.io/gh/MmgTools/mmg/branch/master/graph/badge.svg?token=87eWTxuzIb
32-
[master-codecov-cov]: https://codecov.io/gh/MmgTools/mmg
33-
34-
[dev-build]: https://github.com/MmgTools/mmg/actions/workflows/long-tests.yml/badge.svg?branch=develop
35-
[dev-sq-build]: https://github.com/MmgTools/mmg/actions/workflows/long-tests.yml?query=branch%3Adevelop
36-
37-
[dev-cov]: https://codecov.io/gh/MmgTools/mmg/branch/develop/graph/badge.svg?token=87eWTxuzIb
38-
[dev-codecov-cov]: https://codecov.io/gh/MmgTools/mmg
39-
40-
---
41-
42-
Mmg provides 3 applications and 4 libraries:
43-
* the **mmg2d** application and library: mesh generation from a set of edges, adaptation and optimization of a bidimensional triangulation, and isovalue discretization;
44-
* the **mmgs** application and library: adaptation and optimization of a surface triangulation and isovalue discretization;
45-
* the **mmg3d** application and library: adaptation and optimization of a tetrahedral mesh, isovalue discretization and lagrangian movement;
46-
* the **mmg** library gathering the **mmg2d**, **mmgs** and **mmg3d** libraries.
47-
48-
[//]: # ( comment )
49-
50-
## Get and compile the mmg project
51-
### Needed tools
52-
To get and build Mmg, you will need:
53-
* **Git**: to download the code you will have to use a git manager. You can install a git manager from the link below but there are many other git clients that you can use:
54-
* [Official Git client](https://git-scm.com/download) (command-line program)
55-
* [GitKraken](https://www.gitkraken.com/)
56-
* [SourceTree](https://www.sourcetreeapp.com/)
57-
58-
Note that if you uses Microsoft Visual Studio (Windows OS), you can simply activate the Git Module of the application.
59-
60-
* **CMake** : Mmg uses the CMake building system that can be downloaded on the
61-
following web page:
62-
[https://cmake.org/download/](https://cmake.org/download/). On Windows OS,
63-
once CMake is installed, please <span style="color:red"> do not forget to
64-
mark the option:
65-
```
66-
Add CMake to the system PATH for all users
67-
```
68-
</span>
69-
70-
### Mmg download and compilation
71-
#### Unix-like OS (Linux, MacOS...)
72-
73-
1. Get the repository:
74-
```
75-
wget https://github.com/MmgTools/mmg/archive/master.zip
76-
```
77-
78-
or
79-
80-
```
81-
git clone https://github.com/MmgTools/mmg.git
82-
```
83-
84-
The project sources are available under the **src/** directory, see:
85-
* **src/mmg2d/** for files related to the mmg2d application;
86-
* **src/mmgs/** for files related to the mmgs application;
87-
* **src/mmg3d/** for files related to the mmg3d application;
88-
* **src/common/** for files related to all three.
89-
90-
2. Fast compilation (build **mmg2d**, **mmgs**, **mmg3d**, the mmg2d static library (**libmmg3d.a**), the mmgs static library (**libmmgs.a**), the mmg3d static library (**libmmg3d.a**) and the mmg static library (**libmmg.a**)) all at once:
91-
```
92-
cd mmg
93-
mkdir build
94-
cd build
95-
cmake ..
96-
make
97-
make install
98-
```
99-
100-
If the `make install` command fails, try to run the `sudo make install` command.
101-
If you don't have root access, please refer to the [Installation section](https://github.com/MmgTools/Mmg/wiki/Setup-guide#iii-installation) of the [setup guide](https://github.com/MmgTools/Mmg/wiki/Setup-guide#setup-guide).
4+
This is the main repository of mmg, an open source software for bidimensional
5+
and tridimensional surface and volume remeshing.
1026

103-
The **mmg2d**, **mmgs** and **mmg3d** applications are available under the `mmg2d_O3`, `mmgs_O3` and `mmg3d_O3` commands.
7+
For any information regarding, installation, use of, development and contribution in mmg,
8+
please visit [mmgtools.org](https://www.mmgtools.org).
1049

105-
Note that if you use some specific options and want to set them easily, you can use a shell script to execute the previous commands. An example is provided [here](https://github.com/MmgTools/mmg/wiki/Configure-script-for-CMake-(UNIX-like-OS)).
10+
## Contact
10611

107-
#### Windows OS
108-
The following compilation can be performed in any modern version of *Windows*
109-
(AKA 7, 8, 8.1 and 10). A basic knowledge of Windows is assumed (execute
110-
commands in cmd, create directories, etc...).
12+
For technical questions or requests about mmg, please use the mailing list:
11113

112-
##### Compile with VisualStudio
14+
[mmg.users](https://sympa.inria.fr/sympa/subscribe/mmg.users?ticket=ST-699678-efLTKc4VJFEInmwMpWuuS26YfYg-cas.inria.fr)
11315

114-
Universal windows platform development
115-
1. Get the **Visual Studio** software: it can be downloaded [here](https://www.visualstudio.com/downloads/);
116-
117-
2. if not done during the previous step, download **C/C++** compilers: in the Visual Studio searching zone, search **C compiler** and install the **Visual C++ compilers and libraries** (individual componant) and the MSBuild componant;
118-
119-
3. in the Visual Studio searching zone, search the **git** word and select the installation of the **GitHub extension for VisualStudio**;
120-
121-
4. stay in VisualStudio and clone the Mmg repository from the following url: https://github.com/MmgTools/mmg.git;
122-
123-
5. Use **CMake** to configure and generate your project. It can be done either with the graphic mode of CMake (you have to select the "VisualStudio" generator) or with a command line. In this case, it is highly recommended to specify that you intent to build a VisualStudio project.
124-
For example, if you are using VisualStudio 2017:
125-
```
126-
cmake -G "Visual Studio 15 2017 Win64" ^
127-
configure
128-
```
129-
130-
Note that you can use a script to make this step easier (an example of script is provided [here](https://github.com/MmgTools/mmg/wiki/Configure-script-for-CMake-(Windows-OS))).
131-
132-
Once the configuration script has finished without errors a `mmg.sln` file will be generated in the cmake_build directory.
133-
134-
6. Double click this file and the visual studio project will open. Then choose the project configuration (Release, Debug...) and make sure that the project is set to Win32 or x64.
135-
Finally, in order to compile Mmg, right click the `INSTALL` project and select the option `BUILD`.
136-
137-
##### Compile with MinGW
138-
139-
1. Get a **C Compiler**:
140-
* **MinGW** can be downloaded [here](http://mingw.org/). We recommand to install the *mingw-developer-tools*, *mingw32-base*, *mingw32-gcc-fortran*, *mingw32-gcc-g++* and *msys-base* packages;
141-
* Edit the environment variables and add MinGW in your **PATH** variable. It can be done in the **advanced system settings** panel. (note that you must modify the **PATH** variable, not **Path**);
142-
* **MinGW** binaries are probably in `C:\MinGW\bin`
143-
* the MinGW terminal is in `C:\MinGW\msys\1.0\msys`
144-
145-
2. Clone the Mmg repository from the following url: https://github.com/MmgTools/mmg.git;
146-
147-
3. Quit and restart the *CMake* application to take the PATH modification into account then use CMake to configure and generate your project (select the MinGW Makefiles generator of CMake). If you have installed the scotch libraries, you will need to set explicitely the libraries paths;
148-
4. Build the Mmg applications: in the minGW prompt (`C:\MinGW\msys\1.0\msys`) run:
149-
```
150-
mingw32-make
151-
```
152-
153-
Again, if you use some specific options and want to make the CMake configuration step easier, you can use a batch script. An example script is provided [here](https://github.com/MmgTools/mmg/wiki/Configure-script-for-CMake-(Windows-OS)).
154-
155-
## Documentation
156-
### Project web page
157-
Actualities of the project and software tutorials can be found on the [mmgtools](http://www.mmgtools.org) web page.
158-
159-
### Forum
160-
Share your comments and issues with other members of the Mmg community on the [Mmg forum](https://forum.mmgtools.org/).
161-
162-
### GitHub Wiki
163-
More detailed information about the compilation and configuration of Mmg applications is available on the project [wiki](https://github.com/MmgTools/mmg/wiki).
164-
165-
### Man pages
166-
Man pages are available inside the **doc/man** directory:
167-
* To see the **mmg2d** man page, just run `man ./doc/man/mmg2d.1.gz`
168-
* To see the **mmgs** man page, run `man ./doc/man/mmgs.1.gz`
169-
* To see the **mmg3d** man page, run `man ./doc/man/mmg3d.1.gz`
170-
171-
### Code documentation
172-
Run the `make doc` command to build the Doxygen documentation, after running `cmake`
173-
with the option `-DBUILD_DOC=yes` if you did not already do so.
174-
You may wish to adapt `build/Doxyfile` to your liking.
175-
* To see the **mmg** documentation, open the file `<build>/doc/index.html`.
176-
177-
## Platforms
178-
The **mmg** applications are tested on OS X and on most of the Linux platforms.
179-
180-
## Contributing
181-
Your contributions to the **mmg** project are welcome. You can help us to improve
182-
our code by many means:
183-
* pull requests: please follow the [guidelines on the wiki](https://github.com/MmgTools/Mmg/wiki/Developers-wiki#pull-requests);
184-
* feature requests: please use the [Mmg forum](https://forum.mmgtools.org/);
185-
* bug reports: please use the [GitHub issue tracker](https://github.com/MmgTools/mmg/issues/new);
186-
187-
## About the team
188-
Mmg's current developers and maintainers are Charles Dapogny, Cécile Dobrzynski, Pascal Frey and Algiane Froehly.
189-
190-
Contact: contact@mmgtools.org
16+
For questions and remarks about the website, please use contact@mmgtools.org
19117

19218
## License and copyright
19+
19320
Code is under the [terms of the GNU Lesser General Public License](https://raw.githubusercontent.com/MmgTools/mmg/master/LICENSE).
19421

19522
Copyright © Bx INP/Inria/UBordeaux/UPMC, 2004- .
196-
197-
## Reference
198-
[Tetrahedral remeshing in the context of large-scale numerical simulation and high performance computing - _G. Balarac, F. Basile, P. Bénard, F. Bordeu, J.-B. Chapelier, L. Cirrottola, G. Caumon, C. Dapogny, P. Frey, A. Froehly, G. Ghigliotti, R. Laraufie, G. Lartigue, C. Legentil, R. Mercier, V. Moureau, C. Nardoni, S. Pertant and M. Zakari_ - submitted, (2021)](https://membres-ljk.imag.fr/Charles.Dapogny/publis/mmgapp2.pdf)
199-
200-
[Three-dimensional adaptive domain remeshing, implicit domain meshing, and applications to free and moving boundary problems - _C. Dapogny, C. Dobrzynski and P. Frey_ - April 1, 2014 - _JCP_](http://www.sciencedirect.com/science/article/pii/S0021999114000266)

0 commit comments

Comments
 (0)