Commit cee01c61 authored by Jean-François Remacle's avatar Jean-François Remacle


Merge branch 'master' of
parents 48cfe12a 7d3d27b9
Pipeline #1464 failed with stage
in 36 minutes and 12 seconds
......@@ -2092,7 +2092,7 @@ void gmsh::model::occ::fillet(const std::vector<int> &volumeTags,
void gmsh::model::occ::fuse(const vector_pair &objectDimTags,
const vector_pair &toolDimTags,
vector_pair &outDimTags,
std::vector<vector_pair > &outDimTagsMap,
std::vector<vector_pair> &outDimTagsMap,
const int tag,
const bool removeObject,
const bool removeTool)
......@@ -172,10 +172,8 @@ void computeLevelset(GModel *gm, cartesianBox<double> &box)
printf(" CAD surface \n");
//look in utils_api_demos maincartesian
// for (GModel::fiter fit = _model->firstFace(); fit != _model->lastFace(); fit++){
// for (int i = 0; i < (*fit)->stl_triangles.size(); i += 3){
// we should use the STL here
Msg::Info("Levelset computation on CAD surface not implemented");
......@@ -20,6 +20,7 @@
#include "GmshConfig.h"
#if defined(HAVE_GMP)
#include <cstddef>
#include "gmp.h"
#include <gmshc.h>
int main(int argc, char **argv)
int ierr;
gmshInitialize(argc, argv, 1, &ierr);
gmshModelAdd("square", &ierr);
gmshModelGeoAddPoint(0, 0, 0, 0.1, 1, &ierr);
gmshModelGeoAddPoint(1, 0, 0, 0.1, 2, &ierr);
gmshModelGeoAddPoint(1, 1, 0, 0.1, 3, &ierr);
gmshModelGeoAddPoint(0, 1, 0, 0.1, 4, &ierr);
gmshModelGeoAddLine(1, 2, 1, &ierr);
gmshModelGeoAddLine(2, 3, 2, &ierr);
gmshModelGeoAddLine(3, 4, 3, &ierr);
// try automatic assignement of tag
int line4 = gmshModelGeoAddLine(4, 1, -1, &ierr);
int ll[] = {1, 2, 3, line4};
gmshModelGeoAddCurveLoop(ll, 4, 1, &ierr);
int s[]= { 1 };
gmshModelGeoAddPlaneSurface(ll, 1, 6, &ierr);
gmshModelMeshGenerate(2, &ierr);
gmshWrite("square.msh", &ierr);
return 0;
#include <gmsh.h>
int main(int argc, char **argv)
gmsh::initialize(argc, argv);
gmsh::model::geo::addPoint(0, 0, 0, 0.1, 1);
gmsh::model::geo::addPoint(1, 0, 0, 0.1, 2);
gmsh::model::geo::addPoint(1, 1, 0, 0.1, 3);
gmsh::model::geo::addPoint(0, 1, 0, 0.1, 4);
gmsh::model::geo::addLine(1, 2, 1);
gmsh::model::geo::addLine(2, 3, 2);
gmsh::model::geo::addLine(3, 4, 3);
// try automatic assignement of tag
int line4 = gmsh::model::geo::addLine(4, 1);
gmsh::model::geo::addCurveLoop({1, 2, 3, line4}, 1);
gmsh::model::geo::addPlaneSurface({1}, 6);
return 0;
import gmsh
import sys
gmsh.model.geo.addPoint(0, 0, 0, 0.1, 1)
gmsh.model.geo.addPoint(1, 0, 0, 0.1, 2)
gmsh.model.geo.addPoint(1, 1, 0, 0.1, 3)
gmsh.model.geo.addPoint(0, 1, 0, 0.1, 4)
gmsh.model.geo.addLine(1, 2, 1)
gmsh.model.geo.addLine(2, 3, 2)
gmsh.model.geo.addLine(3, 4, 3)
# try automatic assignement of tag
line4 = gmsh.model.geo.addLine(4, 1)
gmsh.model.geo.addCurveLoop([1, 2, 3, line4], 1)
gmsh.model.geo.addPlaneSurface([1], 6)
DATE=`date "+%d/%m/%Y"`
echo "This ONELAB bundle was built on ${DATE} with the latest nightly snapshots
of Gmsh ( and GetDP (
Launch Gmsh and open a GetDP .pro file (e.g. models/magnetometer/
with the File/Open menu, then click on \"Run\".
The software is distributed under the terms of the GNU General Public License.
See the LICENSE and CREDITS files for more information.
The 'models' directory contains a selection of ready-to-use examples from The 'template' directory contains GetDP templates. The
'tutorial' directory contains the Gmsh tutorial.
See, and for additional
examples, up-to-date versions and documentation." > /tmp/README.txt
MODELS='machines relay inductor indheat magnetometer antennas acoustic_scattering time_reversal shielding waveguides transfo_simple ddm_waves bloch_periodic_waveguides magnets thermal_conduction magnetostriction superconductors'
# get onelab models
mkdir /tmp/models
for m in ${MODELS}; do
curl -O${m}.zip
unzip -q -o ${m}.zip -d /tmp/models
rm -f ${m}.zip
if [ $# -lt 1 ] || [ $1 == "source" ]; then
rm -rf onelab-source*
mkdir onelab-source
curl -O${GMSH}-source.tgz
curl -O${GETDP}-source.tgz
mv gmsh-${GMSH}-source.tgz /tmp
mv getdp-${GETDP}-source.tgz /tmp
tar zxvf /tmp/gmsh-${GMSH}-source.tgz -C /tmp
tar zxvf /tmp/getdp-${GETDP}-source.tgz -C /tmp
cp /tmp/README.txt onelab-source
mv /tmp/gmsh-*${GMSH}*-source onelab-source
mv /tmp/getdp-*${GETDP}*-source onelab-source
cp onelab-source/gmsh-*${GMSH}*-source/LICENSE.txt onelab-source/LICENSE.txt
echo "\n\n" >> onelab-source/LICENSE.txt
cat onelab-source/getdp-*${GETDP}*-source/LICENSE.txt >> onelab-source/LICENSE.txt
cp onelab-source/gmsh-*${GMSH}*-source/CREDITS.txt onelab-source/CREDITS.txt
echo "\n\n" >> onelab-source/CREDITS.txt
cat onelab-source/getdp-*${GETDP}*-source/CREDITS.txt >> onelab-source/CREDITS.txt
cp -R /tmp/models onelab-source
rm -rf /tmp/gmsh-*
rm -rf /tmp/getdp-*
zip -r onelab-source
rm -rf onelab-source
if [ $# -lt 1 ] || [ $1 == "win64" ]; then
rm -rf onelab-Windows64*
mkdir onelab-Windows64
curl -O${GMSH}
curl -O${GETDP}
mv gmsh-${GMSH} /tmp
mv getdp-${GETDP} /tmp
unzip -q -o /tmp/gmsh-${GMSH} -d /tmp
unzip -q -o /tmp/getdp-${GETDP} -d /tmp
cp /tmp/README.txt onelab-Windows64
perl -pi -e 's/\n/\r\n/' onelab-Windows64/README.txt
mv /tmp/gmsh-*${GMSH}-Windows64/gmsh.exe onelab-Windows64
mv /tmp/gmsh-*${GMSH}-Windows64/ onelab-Windows64
mv /tmp/getdp-*${GETDP}-Windows64/getdp.exe onelab-Windows64
mv /tmp/gmsh-*${GMSH}-Windows64/LICENSE.txt onelab-Windows64/LICENSE.txt
echo "\n\n" >> onelab-Windows64/LICENSE.txt
cat /tmp/getdp-*${GETDP}-Windows64/LICENSE.txt >> onelab-Windows64/LICENSE.txt
mv /tmp/gmsh-*${GMSH}-Windows64/CREDITS.txt onelab-Windows64/CREDITS.txt
echo "\n\n" >> onelab-Windows64/CREDITS.txt
cat /tmp/getdp-*${GETDP}-Windows64/CREDITS.txt >> onelab-Windows64/CREDITS.txt
mv /tmp/getdp-*${GETDP}-Windows64/templates onelab-Windows64
mv /tmp/gmsh-*${GMSH}-Windows64/tutorial onelab-Windows64
cp -R /tmp/models onelab-Windows64
rm -rf /tmp/gmsh-*
rm -rf /tmp/getdp-*
zip -r onelab-Windows64
rm -rf onelab-Windows64
if [ $# -lt 1 ] || [ $1 == "win32" ]; then
rm -rf onelab-Windows32*
mkdir onelab-Windows32
curl -O${GMSH}
curl -O${GETDP}
mv gmsh-${GMSH} /tmp
mv getdp-${GETDP} /tmp
unzip -q -o /tmp/gmsh-${GMSH} -d /tmp
unzip -q -o /tmp/getdp-${GETDP} -d /tmp
cp /tmp/README.txt onelab-Windows32
perl -pi -e 's/\n/\r\n/' onelab-Windows32/README.txt
mv /tmp/gmsh-*${GMSH}-Windows32/gmsh.exe onelab-Windows32
mv /tmp/gmsh-*${GMSH}-Windows32/ onelab-Windows32
mv /tmp/getdp-*${GETDP}-Windows32/getdp.exe onelab-Windows32
mv /tmp/gmsh-*${GMSH}-Windows32/LICENSE.txt onelab-Windows32/LICENSE.txt
echo "\n\n" >> onelab-Windows32/LICENSE.txt
cat /tmp/getdp-*${GETDP}-Windows32/LICENSE.txt >> onelab-Windows32/LICENSE.txt
mv /tmp/gmsh-*${GMSH}-Windows32/CREDITS.txt onelab-Windows32/CREDITS.txt
echo "\n\n" >> onelab-Windows32/CREDITS.txt
cat /tmp/getdp-*${GETDP}-Windows32/CREDITS.txt >> onelab-Windows32/CREDITS.txt
mv /tmp/getdp-*${GETDP}-Windows32/templates onelab-Windows32
mv /tmp/gmsh-*${GMSH}-Windows32/tutorial onelab-Windows32
cp -R /tmp/models onelab-Windows32
rm -rf /tmp/gmsh-*
rm -rf /tmp/getdp-*
zip -r onelab-Windows32
rm -rf onelab-Windows32
if [ $# -lt 1 ] || [ $1 == "linux64" ]; then
rm -rf onelab-Linux64*
mkdir onelab-Linux64
curl -O${GMSH}-Linux64.tgz
curl -O${GETDP}-Linux64c.tgz
mv gmsh-${GMSH}-Linux64.tgz /tmp
mv getdp-${GETDP}-Linux64c.tgz /tmp
tar zxvf /tmp/gmsh-${GMSH}-Linux64.tgz -C /tmp
tar zxvf /tmp/getdp-${GETDP}-Linux64c.tgz -C /tmp
cp /tmp/README.txt onelab-Linux64
mv /tmp/gmsh-*${GMSH}-Linux64/bin/gmsh onelab-Linux64
mv /tmp/gmsh-*${GMSH}-Linux64/bin/ onelab-Linux64
mv /tmp/getdp-*${GETDP}-Linux64/bin/getdp onelab-Linux64
mv /tmp/gmsh-*${GMSH}-Linux64/share/doc/gmsh/LICENSE.txt onelab-Linux64/LICENSE.txt
echo "\n\n" >> onelab-Linux64/LICENSE.txt
cat /tmp/getdp-*${GETDP}-Linux64/share/doc/getdp/LICENSE.txt >> onelab-Linux64/LICENSE.txt
mv /tmp/gmsh-*${GMSH}-Linux64/share/doc/gmsh/CREDITS.txt onelab-Linux64/CREDITS.txt
echo "\n\n" >> onelab-Linux64/CREDITS.txt
cat /tmp/getdp-*${GETDP}-Linux64/share/doc/getdp/CREDITS.txt >> onelab-Linux64/CREDITS.txt
mv /tmp/getdp-*${GETDP}-Linux64/share/doc/getdp/templates onelab-Linux64
mv /tmp/gmsh-*${GMSH}-Linux64/share/doc/gmsh/tutorial onelab-Linux64
cp -R /tmp/models onelab-Linux64
rm -rf /tmp/gmsh-*
rm -rf /tmp/getdp-*
zip -r onelab-Linux64
rm -rf onelab-Linux64
if [ $# -lt 1 ] || [ $1 == "linux32" ]; then
rm -rf onelab-Linux32*
mkdir onelab-Linux32
curl -O${GMSH}-Linux32.tgz
curl -O${GETDP}-Linux32c.tgz
mv gmsh-${GMSH}-Linux32.tgz /tmp
mv getdp-${GETDP}-Linux32c.tgz /tmp
tar zxvf /tmp/gmsh-${GMSH}-Linux32.tgz -C /tmp
tar zxvf /tmp/getdp-${GETDP}-Linux32c.tgz -C /tmp
cp /tmp/README.txt onelab-Linux32
mv /tmp/gmsh-*${GMSH}-Linux32/bin/gmsh onelab-Linux32
mv /tmp/gmsh-*${GMSH}-Linux32/bin/ onelab-Linux32
mv /tmp/getdp-*${GETDP}-Linux32/bin/getdp onelab-Linux32
mv /tmp/gmsh-*${GMSH}-Linux32/share/doc/gmsh/LICENSE.txt onelab-Linux32/LICENSE.txt
echo "\n\n" >> onelab-Linux32/LICENSE.txt
cat /tmp/getdp-*${GETDP}-Linux32/share/doc/getdp/LICENSE.txt >> onelab-Linux32/LICENSE.txt
mv /tmp/gmsh-*${GMSH}-Linux32/share/doc/gmsh/CREDITS.txt onelab-Linux32/CREDITS.txt
echo "\n\n" >> onelab-Linux32/CREDITS.txt
cat /tmp/getdp-*${GETDP}-Linux32/share/doc/getdp/CREDITS.txt >> onelab-Linux32/CREDITS.txt
mv /tmp/getdp-*${GETDP}-Linux32/share/doc/getdp/templates onelab-Linux32
mv /tmp/gmsh-*${GMSH}-Linux32/share/doc/gmsh/tutorial onelab-Linux32
cp -R /tmp/models onelab-Linux32
rm -rf /tmp/gmsh-*
rm -rf /tmp/getdp-*
zip -r onelab-Linux32
rm -rf onelab-Linux32
if [ $# -lt 1 ] || [ $1 == "mac" ]; then
rm -rf onelab-MacOSX*
mkdir onelab-MacOSX
curl -O${GMSH}-MacOSX.dmg
curl -O${GETDP}-MacOSXc.tgz
mv gmsh-${GMSH}-MacOSX.dmg /tmp
mv getdp-${GETDP}-MacOSXc.tgz /tmp
hdiutil convert /tmp/gmsh-${GMSH}-MacOSX.dmg -format UDTO -o /tmp/gmsh-tmp.cdr
hdiutil attach -nobrowse -noverify -noautoopen -mountpoint gmsh_mount /tmp/gmsh-tmp.cdr
tar zxvf /tmp/getdp-${GETDP}-MacOSXc.tgz -C /tmp
cp /tmp/README.txt onelab-MacOSX
cp -R gmsh_mount/ onelab-MacOSX
mv /tmp/getdp-*${GETDP}-MacOSX/bin/getdp onelab-MacOSX/
security unlock-keychain -p "FIXME!" ${HOME}/Library/Keychains/login.keychain
codesign -v --force --deep --sign "Developer ID Application: Christophe Geuzaine" onelab-MacOSX/
cp gmsh_mount/LICENSE.txt onelab-MacOSX/LICENSE.txt
echo "\n\n" >> onelab-MacOSX/LICENSE.txt
cat /tmp/getdp-*${GETDP}-MacOSX/share/doc/getdp/LICENSE.txt >> onelab-MacOSX/LICENSE.txt
cp gmsh_mount/CREDITS.txt onelab-MacOSX/CREDITS.txt
echo "\n\n" >> onelab-MacOSX/CREDITS.txt
cat /tmp/getdp-*${GETDP}-MacOSX/share/doc/getdp/CREDITS.txt >> onelab-MacOSX/CREDITS.txt
mv /tmp/getdp-*${GETDP}-MacOSX/share/doc/getdp/templates onelab-MacOSX
cp -R gmsh_mount/tutorial onelab-MacOSX
cp -R /tmp/models onelab-MacOSX
hdiutil eject gmsh_mount
rm -rf /tmp/gmsh-*
rm -rf /tmp/getdp-*
# cannot use zip file: it destroys the signature for
hdiutil create -srcfolder onelab-MacOSX onelab-MacOSX.dmg
codesign -v --sign "Developer ID Application: Christophe Geuzaine" onelab-MacOSX.dmg
rm -rf onelab-MacOSX
rm -rf /tmp/models
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment