Changeset 24942
- Timestamp:
- 06/01/20 10:01:04 (5 years ago)
- Location:
- issm/trunk-jpl
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/jenkins/ross-debian_linux-binaries-solid_earth
r24919 r24942 33 33 --with-triangle-dir=${ISSM_DIR}/externalpackages/triangle/install \ 34 34 --with-boost-dir=${ISSM_DIR}/externalpackages/boost/install \ 35 --with-gmsh-dir=${ISSM_DIR}/externalpackages/gmsh/install 35 36 ' 36 37 -
issm/trunk-jpl/m4/issm_options.m4
r24919 r24942 515 515 516 516 AC_MSG_CHECKING(for Dakota version) 517 dnl TODO: Check if this method applies to all other versions of 518 dnl 519 dnl compiled). If so, we can remove the other methods of 520 dnl 517 dnl TODO: Check if this method applies to all other versions of 518 dnl Dakota (it should as long as the Dakota binaries have been 519 dnl compiled). If so, we can remove the other methods of 520 dnl getting the version. 521 521 dnl 522 522 DAKOTA_VERSION_OUTPUT=`${DAKOTA_ROOT}/bin/dakota -v` … … 2299 2299 AM_CONDITIONAL([NEOPZ], [test "x${HAVE_NEOPZ}" == "xyes"]) 2300 2300 dnl }}} 2301 dnl Gmsh{{{ 2302 AC_MSG_CHECKING([for Gmsh]) 2303 AC_ARG_WITH( 2304 [gmsh-dir], 2305 AS_HELP_STRING([--with-gmsh-dir=DIR], [Gmsh root directory]), 2306 [GMSH_ROOT=${withval}], 2307 [GMSH_ROOT="no"] 2308 ) 2309 if test "x${GMSH_ROOT}" == "xno"; then 2310 HAVE_GMSH=no 2311 else 2312 HAVE_GMSH=yes 2313 if ! test -d "${GMSH_ROOT}"; then 2314 AC_MSG_ERROR([Gmsh directory provided (${GMSH_ROOT}) does not exist!]); 2315 fi 2316 fi 2317 AC_MSG_RESULT([${HAVE_GMSH}]) 2318 AM_CONDITIONAL([GMSH], [test "x${HAVE_GMSH}" == "xyes"]) 2319 2320 if test "x${HAVE_GMSH}" == "xyes"; then 2321 AC_DEFINE([_HAVE_GMSH_], [1], [with Gmsh in ISSM src]) 2322 2323 AC_MSG_CHECKING(for Gmsh version) 2324 GMSH_VERSION_MAJOR=`${GMSH_ROOT}/bin/gmsh -info | grep "Version" | sed -e "s/Version@<:@@<:@:blank:@:>@@:>@*:@<:@@<:@:blank:@:>@@:>@//" | cut -d "." -f1` 2325 AC_MSG_RESULT([${GMSH_VERSION_MAJOR}]) 2326 AC_DEFINE_UNQUOTED(_GMSH_VERSION_MAJOR_, $GMSH_VERSION_MAJOR, [Gmsh major version]) 2327 fi 2328 dnl }}} 2301 2329 dnl Capabilities 2302 2330 dnl with-bamg{{{ -
issm/trunk-jpl/packagers/linux/package-issm-linux-binaries-solid_earth.sh
r24919 r24942 35 35 else 36 36 echo "MPICH not found" 37 exit 1 38 fi 39 40 echo "Moving Gmsh binaries to bin/" 41 if [ -f ${ISSM_DIR}/externalpackages/gmsh/install/bin/gmsh ]; then 42 cp ${ISSM_DIR}/externalpackages/gmsh/install/bin/gmsh . 43 else 44 echo "Gmsh not found" 37 45 exit 1 38 46 fi -
issm/trunk-jpl/src/m/mesh/planet/gmsh/gmshplanet.m
r24919 r24942 16 16 17 17 % Get Gmsh version 18 % 19 % NOTE: 20 % - The output of `gmsh -version` does not follow a consistent format 21 % across major versions. 22 % - Under Gmsh 3.*, output of `gmsh -info` needs to be explicitly 23 % redirected to console in order to be grep'ped. 24 % - May need to modify the regex supplied to `sed` for future Gmsh versions. 25 % 26 % TODO: 27 % - Move this so we can retrieve like we do with 28 % `IssmConfig(_DAKOTA_VERSION_)`. 29 % 30 [status,gmshmajorversion]=system('gmsh -info 2>&1 | grep "Version" | sed -e "s/Version[[:blank:]]*:[[:blank:]]//" | cut -d "." -f1'); 31 32 gmshmajorversion=str2int(gmshmajorversion); 18 gmshmajorversion = IssmConfig('_GMSH_VERSION_MAJOR_'); 33 19 34 20 if ~ismember([3,4],gmshmajorversion), -
issm/trunk-jpl/src/m/mesh/planet/gmsh/gmshplanet.py
r24919 r24942 1 import commands1 import os 2 2 import subprocess 3 3 4 4 import numpy as np 5 5 6 from IssmConfig import IssmConfig 6 7 from MatlabFuncs import * 7 8 from mesh3dsurface import * … … 27 28 28 29 # Get Gmsh version 29 # 30 # NOTE: 31 # - The output of `gmsh -version` does not follow a consistent format 32 # across major versions. 33 # - Under Gmsh 3.*, output of `gmsh -info` needs to be explicitly 34 # redirected to console in order to be grep'ped. 35 # - May need to modify the regex supplied to `sed` for future Gmsh versions. 36 # 37 # TODO: 38 # - Move this so we can retrieve like we do with 39 # `IssmConfig(_DAKOTA_VERSION_)`. 40 # 41 gmshmajorversion = commands.getoutput('gmsh -info 2>&1 | grep "Version" | sed -e "s/Version[[:blank:]]*:[[:blank:]]//" | cut -d "." -f1') 42 43 gmshmajorversion = int(gmshmajorversion) 30 gmshmajorversion = IssmConfig('_GMSH_VERSION_MAJOR_')[0] # Stored as IssmDouble, which gets instantiated as a tuple in Python 44 31 45 32 if gmshmajorversion not in [3, 4]: … … 56 43 #initialize mesh: 57 44 mesh = mesh3dsurface() 58 59 45 #create .geo file: {{{ 60 46 fid = open('sphere.geo', 'w') -
issm/trunk-jpl/src/wrappers/IssmConfig/IssmConfig.cpp
r23287 r24942 107 107 #endif 108 108 } 109 else if(strcmp(name,"_GMSH_VERSION_MAJOR_")==0){ 110 #ifdef _GMSH_VERSION_MAJOR_ 111 value = IssmDouble(_GMSH_VERSION_MAJOR_); 112 #else 113 _error_("_GMSH_VERSION_MAJOR_ not found in config.h"); 114 #endif 115 } 109 116 else if(strcmp(name,"ISSM_PREFIX")==0){ 110 117 isstring = true;
Note:
See TracChangeset
for help on using the changeset viewer.