Some notes on preparing your system for Fabien's mesh generation scripts. This worked on Linux Mint running on VMWare on a Windows 7 laptop. It should be pretty similar on any Mint or Ubuntu installation.


# script for getting software needed for Fabien's approach to mesh generation

# This worked on my laptop running Linux Mint in VMWare with a Wondows 7 host.
# Elmer was already installed, and I used the Elmer installof blas and lapack 
# (which Fabien's code uses).  I installed yams and medit using Fabien's makefiles 
# with some minor adjustments.  I installed GLUT, a pre-req for medit.  OpenGL 
# was already installed on my system.
# I compiled Fabien's mesh generation code and ran the examples provided in his 
# zip files.
# This script gets the files needed and carries out the above installations and 
# generates Fabien's example meshes.
# But it comes with no error checking or safety mechanisms.  Maybe it will work for 
# you.

# Rupert Gladstone ( March 2014.

# download source files
wget -O gillet_meshadaptation.pdf
wget -O meshadaptation.tar.gz
wget -O yamsmakefiles_ubuntu64-bit.tar.gz

# unpack
mkdir yams
mv freeyams.2012.02.05.tgz yams
cd yams
gunzip freeyams.2012.02.05.tgz 
tar -xf freeyams.2012.02.05.tar
cd ..

mkdir medit
mv medit.2012.02.05.tgz medit
cd medit
gunzip medit.2012.02.05.tgz 
tar -xf medit.2012.02.05.tar
cd ..

tar -xf meshadaptation.tar.gz
tar -xf yamsmakefiles_ubuntu64-bit.tar.gz

# use Fabien's make files for yams and medit instead of the default ones
cp medit.2012.02.05/* medit
rm -rf medit.2012.02.05
cp freeyams.2012.02.05/* yams
rm -rf freeyams.2012.02.05

# install yams
cd yams
# there is a function call that may cause a seg fault.  work around is to comment it out.
cd sources
sed -i 's@outqua1_a(sm);@/* outqua1_a(sm); */@g' yams.c
cd ..
cd ..

# medit needs openGL plus GLUT. most systems will have openGL already, but 
# you may need to install GLUT.

#install GLUT in Linux Mint
sudo apt-get install g++ cmake
sudo apt-get install freeglut3 freeglut3-dev
#check where these files were installed
#dpkg --listfiles freeglut3
#dpkg --listfiles freeglut3-dev
#probably here: /usr/lib/x86_64-linux-gnu/libglut.a

# need libxmu for medit as well...
sudo apt-get install libxmu-dev

# install medit
cd medit
make linux
cd ..

# we can now make and run Fabien's mesh generation code for the first example
cd MeshAdaptation/Case0_Gaussian

# for Greenland we need to download and process (in Matlab) the measures data
cd ../Data

# we've downloaded the measures vels with a slightly different directory structure...
sed -i "s@2000/@@g" CreatDEM.m
sed -i "s@2005/@@g" CreatDEM.m
sed -i "s@2006/@@g" CreatDEM.m
sed -i "s@2007/@@g" CreatDEM.m
sed -i "s@2008/@@g" CreatDEM.m

# then run the matlab script CreatDEM (I did this on a different machine as I 
# didn't have matlab avialable)

# then we can run the second example
cd ../Case1_Greenland
courses/yamsnotes.txt · Last modified: 2014/03/07 04:10 by rgladstone
CC Attribution-Share Alike 4.0 International Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0