Spring 2022 – Topology optimization of engineering systems

MMg

Installing Mmg on your machine

In order to do implement topology optimization algorithms, we will use the open source software Mmg for remeshing. I recommend that you use the following recipe to install it:

git clone https://gitlab.com/florian.feppon/software-recipes.git
cd software-recipes
sh install_mmg_fedora.sh
export SOFTWARE="$HOME/software"
export PATH="$SOFTWARE/bin:$PATH"

If everything has gone well, you should have access to the commands mmg2d_O3, mmg3d_O3 and mmgs (open a new terminal):

$ mmg2d_O3 -h
  -- MMG2D, Release 5.6.0 (Nov. 05, 2021) 
     Copyright (c) Bdx INP/CNRS/Inria/UPMC, 2004-
     Feb 22 2022 11:15:29

Usage: mmg2d_O3 [-v [n]] [opts..] filein [fileout]

** Generic options
-h        Print this message
-v [n]    Tune level of verbosity, [-1..10]
-m [n]    Set maximal memory size to n Mbytes
-d        Turn on debug mode
-val      Print the default parameters values
-default  Save a local parameters file for default parameters values

ISCD software

Similarly, run

sh install_iscd_fedora.sh

which will download and install the software mshdist and advect that we also needs for topology optimization. mshdist computes the signed distance function of a meshed subdomain, while advect solves the transport equation on triangle or tetrahedral meshes.

Verify your installation by running

 $ advect -h
usage: advect [+/-v | -h] [-dt step] data_mesh[.mesh] [-c chi[.sol]] [-s data_vel[.sol]] [-o output[.sol]]

Options and flags:
  --help       show the syntax and exit.
  --version    show the version and date of release and exit.

  -dt step     time step (time units)
  -nocfl       avoid truncation of the advection time period. 
  -v           suppress any message (for use with function call).
  +v           increase the verbosity level for output.

  source.mesh    name of the mesh file
  chi.sol        characteristic function (scalar)
  data.sol       name of file containing the initial solution or boundary conditions
  output.sol     name of the output file (displacement field)

and

$ mshdist -h
  -- MSHDIST, Release 1.1b (June 21, 2010) 
     Copyright (c) LJLL, 2010
     Mar 14 mar 2017 15:15:30 CET 
usage: mshdist [-v[n]] [-h] file1[.mesh] [file2[.mesh]] options

** Generic options :
-d      Turn on debug mode
-h      Print this message
-dt     Time stepping (hmin)
-it n   Max number of iterations
-ncpu n Use n CPUs
-r res  Residual
-v [n]  Tune level of verbosity